@vezham/hooks 0.2.0 → 0.2.1
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 +25 -0
- package/index.mjs +658 -714
- package/package.json +9 -9
package/index.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react"),lr=require("react-dom");let ie={app:"",__DEBUG__:!0,__DEV__:!1};const cr=({app:e="",__DEBUG__:t=!0,__DEV__:n=!0,...r})=>ie={app:e,__DEBUG__:t,__DEV__:n,...r},ur=()=>new Date().toISOString(),Te=(e,t,n)=>`[vezham] [${ur()}] [${e}] [${t}] ${n}`,lt=()=>!ie.__DEV__,B={log:(e=ie.app,t,n)=>{console.log(Te("LOG",e,t),n||"")},debug:(e=ie.app,t,n)=>{ie.__DEBUG__&&console.info(Te("DEBUG",e,t),n||"")},info:(e=ie.app,t,n)=>{lt()||console.info(Te("INFO",e,t),n||"")},warn:(e=ie.app,t,n)=>{lt()||console.warn(Te("WARN",e,t),n||"")},error:(e=ie.app,t,n)=>{lt()||console.error(Te("ERROR",e,t),n||"")}};var dr=e=>{switch(e){case"success":return pr;case"info":return gr;case"warning":return mr;case"error":return wr;default:return null}},fr=Array(12).fill(0),hr=({visible:e,className:t})=>c.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},c.createElement("div",{className:"sonner-spinner"},fr.map((n,r)=>c.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),pr=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"})),mr=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"})),gr=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"})),wr=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"})),br=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"})),yr=()=>{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,vr=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(Er(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 vr,Sr=(e,t)=>{let n=(t==null?void 0:t.id)||wt++;return z.addToast({title:e,...t,id:n}),n},Er=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",xr=Sr,Rr=()=>z.toasts,Tr=()=>z.getActiveToasts(),kr=Object.assign(xr,{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:Rr,getToasts:Tr});function Cr(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))}Cr(`: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 Or=3,Ar="32px",Lr="16px",jt=4e3,_r=356,Nr=14,Mr=20,Pr=200;function Q(...e){return e.filter(Boolean).join(" ")}function Ir(e){let[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}var Dr=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:Me="",duration:pe,position:Pe,gap:le,loadingIcon:re,expandByDefault:Ie,classNames:x,icons:$,closeButtonAriaLabel:nt="Close toast",pauseWhenPageIsHidden:O}=e,[A,N]=c.useState(null),[j,me]=c.useState(null),[P,rt]=c.useState(!1),[Ee,De]=c.useState(!1),[xe,ot]=c.useState(!1),[Nt,Yn]=c.useState(!1),[Gn,Mt]=c.useState(!1),[Xn,st]=c.useState(0),[Qn,Pt]=c.useState(0),Re=c.useRef(l.duration||pe||jt),It=c.useRef(null),ce=c.useRef(null),Zn=T===0,er=T+1<=R,J=l.type,ge=l.dismissible!==!1,tr=l.className||"",nr=l.descriptionClassName||"",Be=c.useMemo(()=>E.findIndex(y=>y.toastId===l.id)||0,[E,l.id]),rr=c.useMemo(()=>{var y;return(y=l.closeButton)!=null?y:U},[l.closeButton,U]),Dt=c.useMemo(()=>l.duration||pe||jt,[l.duration,pe]),at=c.useRef(0),we=c.useRef(0),Bt=c.useRef(0),be=c.useRef(null),[or,sr]=Pe.split("-"),Ft=c.useMemo(()=>E.reduce((y,k,_)=>_>=Be?y:y+k.height,0),[E,Be]),Ut=yr(),ar=l.invert||p,it=J==="loading";we.current=c.useMemo(()=>Be*le+Ft,[Be,Ft]),c.useEffect(()=>{Re.current=Dt},[Dt]),c.useEffect(()=>{rt(!0)},[]),c.useEffect(()=>{let y=ce.current;if(y){let k=y.getBoundingClientRect().height;return Pt(k),b(_=>[{toastId:l.id,height:k,position:l.position},..._]),()=>b(_=>_.filter(Y=>Y.toastId!==l.id))}},[b,l.id]),c.useLayoutEffect(()=>{if(!P)return;let y=ce.current,k=y.style.height;y.style.height="auto";let _=y.getBoundingClientRect().height;y.style.height=k,Pt(_),b(Y=>Y.find(G=>G.toastId===l.id)?Y.map(G=>G.toastId===l.id?{...G,height:_}:G):[{toastId:l.id,height:_,position:l.position},...Y])},[P,l.title,l.description,b,l.id]);let oe=c.useCallback(()=>{De(!0),st(we.current),b(y=>y.filter(k=>k.toastId!==l.id)),setTimeout(()=>{S(l)},Pr)},[l,S,b,we]);c.useEffect(()=>{if(l.promise&&J==="loading"||l.duration===1/0||l.type==="loading")return;let y;return L||g||O&&Ut?(()=>{if(Bt.current<at.current){let k=new Date().getTime()-at.current;Re.current=Re.current-k}Bt.current=new Date().getTime()})():Re.current!==1/0&&(at.current=new Date().getTime(),y=setTimeout(()=>{var k;(k=l.onAutoClose)==null||k.call(l,l),oe()},Re.current)),()=>clearTimeout(y)},[L,g,l,J,O,Ut,oe]),c.useEffect(()=>{l.delete&&oe()},[oe,l.delete]);function ir(){var y,k,_;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(hr,{className:Q(x==null?void 0:x.loader,(_=l==null?void 0:l.classNames)==null?void 0:_.loader),visible:J==="loading"})}return c.createElement("li",{tabIndex:0,ref:ce,className:Q(ne,tr,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":Gn,"data-removed":Ee,"data-visible":er,"data-y-position":or,"data-x-position":sr,"data-index":T,"data-front":Zn,"data-swiping":xe,"data-dismissible":ge,"data-type":J,"data-invert":ar,"data-swipe-out":Nt,"data-swipe-direction":j,"data-expanded":!!(L||Ie&&P),style:{"--index":T,"--toasts-before":T,"--z-index":D.length-T,"--offset":`${Ee?Xn:we.current}px`,"--initial-height":Ie?"auto":`${Qn}px`,...ee,...l.style},onDragEnd:()=>{ot(!1),N(null),be.current=null},onPointerDown:y=>{it||!ge||(It.current=new Date,st(we.current),y.target.setPointerCapture(y.pointerId),y.target.tagName!=="BUTTON"&&(ot(!0),be.current={x:y.clientX,y:y.clientY}))},onPointerUp:()=>{var y,k,_,Y;if(Nt||!ge)return;be.current=null;let G=Number(((y=ce.current)==null?void 0:y.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),se=Number(((k=ce.current)==null?void 0:k.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),ue=new Date().getTime()-((_=It.current)==null?void 0:_.getTime()),X=A==="x"?G:se,ae=Math.abs(X)/ue;if(Math.abs(X)>=Mr||ae>.11){st(we.current),(Y=l.onDismiss)==null||Y.call(l,l),me(A==="x"?G>0?"right":"left":se>0?"down":"up"),oe(),Yn(!0),Mt(!1);return}ot(!1),N(null)},onPointerMove:y=>{var k,_,Y,G;if(!be.current||!ge||((k=window.getSelection())==null?void 0:k.toString().length)>0)return;let se=y.clientY-be.current.y,ue=y.clientX-be.current.x,X=(_=e.swipeDirections)!=null?_:Ir(Pe);!A&&(Math.abs(ue)>1||Math.abs(se)>1)&&N(Math.abs(ue)>Math.abs(se)?"x":"y");let ae={x:0,y:0};A==="y"?(X.includes("top")||X.includes("bottom"))&&(X.includes("top")&&se<0||X.includes("bottom")&&se>0)&&(ae.y=se):A==="x"&&(X.includes("left")||X.includes("right"))&&(X.includes("left")&&ue<0||X.includes("right")&&ue>0)&&(ae.x=ue),(Math.abs(ae.x)>0||Math.abs(ae.y)>0)&&Mt(!0),(Y=ce.current)==null||Y.style.setProperty("--swipe-amount-x",`${ae.x}px`),(G=ce.current)==null||G.style.setProperty("--swipe-amount-y",`${ae.y}px`)}},rr&&!l.jsx?c.createElement("button",{"aria-label":nt,"data-disabled":it,"data-close-button":!0,onClick:it||!ge?()=>{}:()=>{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:br):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||ir():null,l.type!=="loading"?l.icon||($==null?void 0:$[J])||dr(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(Me,nr,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,_;Fe(l.cancel)&&ge&&((_=(k=l.cancel).onClick)==null||_.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,_;Fe(l.action)&&((_=(k=l.action).onClick)==null||_.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 zt(){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 Br(e,t){let n={};return[e,t].forEach((r,o)=>{let a=o===1,s=a?"--mobile-offset":"--offset",i=a?Lr:Ar;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=Or,toastOptions:g,dir:b=zt(),gap:R=Nr,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),[Me,pe]=c.useState(!1),[Pe,le]=c.useState(h!=="system"?h:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),re=c.useRef(null),Ie=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),x=c.useRef(null),$=c.useRef(!1),nt=c.useCallback(O=>{M(A=>{var N;return(N=A.find(j=>j.id===O.id))!=null&&N.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(N=>N.id===O.id?{...N,delete:!0}:N));return}setTimeout(()=>{lr.flushSync(()=>{M(A=>{let N=A.findIndex(j=>j.id===O.id);return N!==-1?[...A.slice(0,N),{...A[N],...O},...A.slice(N+1)]:[O,...A]})})})}),[]),c.useEffect(()=>{if(h!=="system"){le(h);return}if(h==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?le("dark"):le("light")),typeof window>"u")return;let O=window.matchMedia("(prefers-color-scheme: dark)");try{O.addEventListener("change",({matches:A})=>{le(A?"dark":"light")})}catch{O.addListener(({matches:N})=>{try{le(N?"dark":"light")}catch(j){console.error(j)}})}},[h]),c.useEffect(()=>{S.length<=1&&ne(!1)},[S]),c.useEffect(()=>{let O=A=>{var N,j;o.every(me=>A[me]||A.code===me)&&(ne(!0),(N=re.current)==null||N.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} ${Ie}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},U.map((O,A)=>{var N;let[j,me]=O.split("-");return S.length?c.createElement("ol",{key:O,dir:b==="auto"?zt():b,tabIndex:-1,ref:re,className:i,"data-sonner-toaster":!0,"data-theme":Pe,"data-y-position":j,"data-lifted":Ne&&S.length>1&&!a,"data-x-position":me,style:{"--front-toast-height":`${((N=ee[0])==null?void 0:N.height)||0}px`,"--width":`${_r}px`,"--gap":`${R}px`,...l,...Br(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:()=>{Me||ne(!1)},onDragEnd:()=>ne(!1),onPointerDown:P=>{P.target instanceof HTMLElement&&P.target.dataset.dismissible==="false"||pe(!0)},onPointerUp:()=>pe(!1)},S.filter(P=>!P.position&&A===0||P.position===O).map((P,rt)=>{var Ee,De;return c.createElement(Dr,{key:P.id,icons:T,index:rt,toast:P,defaultRichColors:m,duration:(Ee=g==null?void 0:g.duration)!=null?Ee:p,className:g==null?void 0:g.className,descriptionClassName:g==null?void 0:g.descriptionClassName,invert:n,visibleToasts:w,closeButton:(De=g==null?void 0:g.closeButton)!=null?De:s,interacting:Me,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(xe=>xe.position==P.position),heights:ee.filter(xe=>xe.position==P.position),setHeights:tt,expandByDefault:a,gap:R,loadingIcon:E,expanded:Ne,pauseWhenPageIsHidden:L,swipeDirections:e.swipeDirections})})):null}))});function pn(){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}),kr(n,s)}}}var Ue=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Fr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ur="Expected a function",Ht=NaN,jr="[object Symbol]",zr=/^\s+|\s+$/g,Hr=/^[-+]0x[0-9a-f]+$/i,qr=/^0b[01]+$/i,$r=/^0o[0-7]+$/i,Wr=parseInt,Vr=typeof Ue=="object"&&Ue&&Ue.Object===Object&&Ue,Jr=typeof self=="object"&&self&&self.Object===Object&&self,Kr=Vr||Jr||Function("return this")(),Yr=Object.prototype,Gr=Yr.toString,Xr=Math.max,Qr=Math.min,ct=function(){return Kr.Date.now()};function Zr(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(Ur);t=qt(t)||0,bt(n)&&(h=!!n.leading,m="maxWait"in n,a=m?Xr(qt(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?Qr(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 eo(e){return!!e&&typeof e=="object"}function to(e){return typeof e=="symbol"||eo(e)&&Gr.call(e)==jr}function qt(e){if(typeof e=="number")return e;if(to(e))return Ht;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(zr,"");var n=qr.test(e);return n||$r.test(e)?Wr(e.slice(2),n?2:8):Hr.test(e)?Ht:+e}var no=Zr;const $t=Fr(no);function mn(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 ro(e){q("click",t=>{e(t)})}var ut="useCopyToClipboard";function oo(){const[e,t]=c.useState(null),{toast:n}=pn(),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 gn(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 wn(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 so({countStart:e,countStop:t=0,intervalMs:n=1e3,isIncrement:r=!1}){const{count:o,increment:a,decrement:s,reset:i}=gn(e),{value:d,setTrue:u,setFalse:h}=mn(!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 wn(p,d?n:null),[o,{startCountdown:u,stopCountdown:h,resetCountdown:m}]}function Oe(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 ke="useLocalStorage",dt=typeof window>"u";function kt(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(ke,"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(ke,`Error reading localStorage key “${e}”:`,l),p}},[t,e,a]),[i,d]=c.useState(()=>r?s():t instanceof Function?t():t),u=Oe(p=>{dt&&B.warn(ke,`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(ke,`Error setting localStorage key “${e}”:`,l)}}),h=Oe(()=>{dt&&B.warn(ke,`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 ao=typeof window>"u";function Ct(e,{defaultValue:t=!1,initializeWithValue:n=!0}={}){const r=i=>ao?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 io="(prefers-color-scheme: dark)",lo="usehooks-ts-dark-mode";function co(e={}){const{defaultValue:t,localStorageKey:n=lo,initializeWithValue:r=!0}=e,o=Ct(io,{initializeWithValue:r,defaultValue:t}),[a,s]=kt(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 Ot(e){const t=c.useRef(e);t.current=e,c.useEffect(()=>()=>{t.current()},[])}function Ke(e,t=500,n){const r=c.useRef();Ot(()=>{r.current&&r.current.cancel()});const o=c.useMemo(()=>{const a=$t(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=$t(e,t,n)},[e,t,n]),o}function uo(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 fo(e,t={}){const{preserveTitleOnUnmount:n=!0}=t,r=c.useRef(null);K(()=>{r.current=window.document.title},[]),K(()=>{window.document.title=e},[e]),Ot(()=>{!n&&r.current&&(window.document.title=r.current)})}function bn(){const e=c.useRef(!0);return e.current?(e.current=!1,!0):e.current}function ho(e,t){const n=bn();c.useEffect(()=>{if(!n)return e()},t)}function po(e){const[t,n]=c.useState(!1),r=()=>{n(!0)},o=()=>{n(!1)};return q("mouseenter",r,e),q("mouseleave",o,e),t}function mo({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 go(){const[e,t]=c.useState(!1);return c.useEffect(()=>{t(!0)},[]),e}function yn(){const e=c.useRef(!1);return c.useEffect(()=>(e.current=!0,()=>{e.current=!1}),[]),c.useCallback(()=>e.current,[])}function wo(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 bo(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 Wt=typeof window>"u";function yo(e,t={}){let{initializeWithValue:n=!0}=t;Wt&&(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(Wt)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 Vt={width:void 0,height:void 0};function vo(e){const{ref:t,box:n="content-box"}=e,[{width:r,height:o},a]=c.useState(Vt),s=yn(),i=c.useRef({...Vt}),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=Jt(h,m,"inlineSize"),l=Jt(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 Jt(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 Kt=typeof window>"u";function So(e={}){let{initializeWithValue:t=!0}=e;Kt&&(t=!1);const n=()=>{if(!Kt)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 Eo(e){const t=document.querySelector(`script[src="${e}"]`),n=t==null?void 0:t.getAttribute("data-status");return{node:t,status:n}}function xo(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=Eo(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 Ro=typeof window>"u";function To(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(!Ro)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 ko(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=Oe(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=Oe(()=>{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 Co(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 Oo="(prefers-color-scheme: dark)",Ao="usehooks-ts-ternary-dark-mode";function Lo({defaultValue:e="system",localStorageKey:t=Ao,initializeWithValue:n=!0}={}){const r=Ct(Oo,{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 h=(d.indexOf(u)+1)%d.length;return d[h]})}}}function _o(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 No(e){const[t,n]=c.useState(!!e),r=c.useCallback(()=>{n(o=>!o)},[]);return[t,r,n]}var Mo=typeof window>"u";function Po(e={}){let{initializeWithValue:t=!0}=e;Mo&&(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 vn(e,t){return function(){return e.apply(t,arguments)}}const{toString:Io}=Object.prototype,{getPrototypeOf:At}=Object,Ye=(e=>t=>{const n=Io.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Z=e=>(e=e.toLowerCase(),t=>Ye(t)===e),Ge=e=>t=>typeof t===e,{isArray:ve}=Array,Ae=Ge("undefined");function Do(e){return e!==null&&!Ae(e)&&e.constructor!==null&&!Ae(e.constructor)&&V(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Sn=Z("ArrayBuffer");function Bo(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Sn(e.buffer),t}const Fo=Ge("string"),V=Ge("function"),En=Ge("number"),Xe=e=>e!==null&&typeof e=="object",Uo=e=>e===!0||e===!1,qe=e=>{if(Ye(e)!=="object")return!1;const t=At(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},jo=Z("Date"),zo=Z("File"),Ho=Z("Blob"),qo=Z("FileList"),$o=e=>Xe(e)&&V(e.pipe),Wo=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]"))},Vo=Z("URLSearchParams"),[Jo,Ko,Yo,Go]=["ReadableStream","Request","Response","Headers"].map(Z),Xo=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Le(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),ve(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 xn(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 de=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Rn=e=>!Ae(e)&&e!==de;function yt(){const{caseless:e}=Rn(this)&&this||{},t={},n=(r,o)=>{const a=e&&xn(t,o)||o;qe(t[a])&&qe(r)?t[a]=yt(t[a],r):qe(r)?t[a]=yt({},r):ve(r)?t[a]=r.slice():t[a]=r};for(let r=0,o=arguments.length;r<o;r++)arguments[r]&&Le(arguments[r],n);return t}const Qo=(e,t,n,{allOwnKeys:r}={})=>(Le(t,(o,a)=>{n&&V(o)?e[a]=vn(o,n):e[a]=o},{allOwnKeys:r}),e),Zo=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),es=(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)},ts=(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&&At(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},ns=(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},rs=e=>{if(!e)return null;if(ve(e))return e;let t=e.length;if(!En(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},os=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&At(Uint8Array)),ss=(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])}},as=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},is=Z("HTMLFormElement"),ls=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),Yt=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),cs=Z("RegExp"),Tn=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Le(n,(o,a)=>{let s;(s=t(o,a,e))!==!1&&(r[a]=s||o)}),Object.defineProperties(e,r)},us=e=>{Tn(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+"'")})}})},ds=(e,t)=>{const n={},r=o=>{o.forEach(a=>{n[a]=!0})};return ve(e)?r(e):r(String(e).split(t)),n},fs=()=>{},hs=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function ps(e){return!!(e&&V(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const ms=e=>{const t=new Array(10),n=(r,o)=>{if(Xe(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const a=ve(r)?[]:{};return Le(r,(s,i)=>{const d=n(s,o+1);!Ae(d)&&(a[i]=d)}),t[o]=void 0,a}}return r};return n(e,0)},gs=Z("AsyncFunction"),ws=e=>e&&(Xe(e)||V(e))&&V(e.then)&&V(e.catch),kn=((e,t)=>e?setImmediate:t?((n,r)=>(de.addEventListener("message",({source:o,data:a})=>{o===de&&a===n&&r.length&&r.shift()()},!1),o=>{r.push(o),de.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",V(de.postMessage)),bs=typeof queueMicrotask<"u"?queueMicrotask.bind(de):typeof process<"u"&&process.nextTick||kn,f={isArray:ve,isArrayBuffer:Sn,isBuffer:Do,isFormData:Wo,isArrayBufferView:Bo,isString:Fo,isNumber:En,isBoolean:Uo,isObject:Xe,isPlainObject:qe,isReadableStream:Jo,isRequest:Ko,isResponse:Yo,isHeaders:Go,isUndefined:Ae,isDate:jo,isFile:zo,isBlob:Ho,isRegExp:cs,isFunction:V,isStream:$o,isURLSearchParams:Vo,isTypedArray:os,isFileList:qo,forEach:Le,merge:yt,extend:Qo,trim:Xo,stripBOM:Zo,inherits:es,toFlatObject:ts,kindOf:Ye,kindOfTest:Z,endsWith:ns,toArray:rs,forEachEntry:ss,matchAll:as,isHTMLForm:is,hasOwnProperty:Yt,hasOwnProp:Yt,reduceDescriptors:Tn,freezeMethods:us,toObjectSet:ds,toCamelCase:ls,noop:fs,toFiniteNumber:hs,findKey:xn,global:de,isContextDefined:Rn,isSpecCompliantForm:ps,toJSONObject:ms,isAsyncFn:gs,isThenable:ws,setImmediate:kn,asap:bs};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 Cn=v.prototype,On={};["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=>{On[e]={value:e}});Object.defineProperties(v,On);Object.defineProperty(Cn,"isAxiosError",{value:!0});v.from=(e,t,n,r,o,a)=>{const s=Object.create(Cn);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 ys=null;function vt(e){return f.isPlainObject(e)||f.isArray(e)}function An(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=An(o),!n&&a?"["+o+"]":o}).join(n?".":""):t}function vs(e){return f.isArray(e)&&!e.some(vt)}const Ss=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)&&vs(w)||(f.isFileList(w)||f.endsWith(g,"[]"))&&(R=f.toArray(w)))return g=An(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(Ss,{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 Xt(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Lt(e,t){this._pairs=[],e&&Qe(e,this,t)}const Ln=Lt.prototype;Ln.append=function(t,n){this._pairs.push([t,n])};Ln.toString=function(t){const n=t?function(r){return t.call(this,r,Xt)}:Xt;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function Es(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function _n(e,t,n){if(!t)return e;const r=n&&n.encode||Es;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 Lt(t,n).toString(r),a){const s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class Qt{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 Nn={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},xs=typeof URLSearchParams<"u"?URLSearchParams:Lt,Rs=typeof FormData<"u"?FormData:null,Ts=typeof Blob<"u"?Blob:null,ks={isBrowser:!0,classes:{URLSearchParams:xs,FormData:Rs,Blob:Ts},protocols:["http","https","file","blob","url","data"]},_t=typeof window<"u"&&typeof document<"u",St=typeof navigator=="object"&&navigator||void 0,Cs=_t&&(!St||["ReactNative","NativeScript","NS"].indexOf(St.product)<0),Os=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",As=_t&&window.location.href||"http://localhost",Ls=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:_t,hasStandardBrowserEnv:Cs,hasStandardBrowserWebWorkerEnv:Os,navigator:St,origin:As},Symbol.toStringTag,{value:"Module"})),F={...Ls,...ks};function _s(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 Ns(e){return f.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Ms(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 Mn(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]=Ms(o[s])),!i)}if(f.isFormData(e)&&f.isFunction(e.entries)){const n={};return f.forEachEntry(e,(r,o)=>{t(Ns(r),o,n,0)}),n}return null}function Ps(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 _e={transitional:Nn,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(Mn(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 _s(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),Ps(t)):t}],transformResponse:[function(t){const n=this.transitional||_e.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=>{_e.headers[e]={}});const Is=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"]),Ds=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]&&Is[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},Zt=Symbol("internals");function Ce(e){return e&&String(e).trim().toLowerCase()}function $e(e){return e===!1||e==null?e:f.isArray(e)?e.map($e):String(e)}function Bs(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 Fs=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function ht(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 Us(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function js(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 h=Ce(d);if(!h)throw new Error("header name must be a non-empty string");const m=f.findKey(o,h);(!m||o[m]===void 0||u===!0||u===void 0&&o[m]!==!1)&&(o[m||d]=$e(i))}const s=(i,d)=>f.forEach(i,(u,h)=>a(u,h,d));if(f.isPlainObject(t)||t instanceof this.constructor)s(t,n);else if(f.isString(t)&&(t=t.trim())&&!Fs(t))s(Ds(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=Ce(t),t){const r=f.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return Bs(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=Ce(t),t){const r=f.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||ht(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function a(s){if(s=Ce(s),s){const i=f.findKey(r,s);i&&(!n||ht(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||ht(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]=$e(o),delete n[a];return}const i=t?Us(a):String(a).trim();i!==a&&delete n[a],n[i]=$e(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[Zt]=this[Zt]={accessors:{}}).accessors,o=this.prototype;function a(s){const i=Ce(s);r[i]||(js(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||_e,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 Pn(e){return!!(e&&e.__CANCEL__)}function Se(e,t,n){v.call(this,e??"canceled",v.ERR_CANCELED,t,n),this.name="CanceledError"}f.inherits(Se,v,{__CANCEL__:!0});function In(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 zs(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Hs(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 qs(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=Hs(50,250);return qs(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)},en=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},tn=e=>(...t)=>f.asap(()=>e(...t)),$s=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,Ws=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 Vs(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Js(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Dn(e,t,n){let r=!Vs(t);return e&&r||n==!1?Js(e,t):t}const nn=e=>e instanceof H?{...e}:e;function he(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(nn(u),nn(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 Bn=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=_n(Dn(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&&$s(t.url))){const u=o&&a&&Ws.read(a);u&&s.set(o,u)}return t},Ks=typeof XMLHttpRequest<"u",Ys=Ks&&function(e){return new Promise(function(n,r){const o=Bn(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};In(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||Nn;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 Se(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=zs(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)})},Gs=(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 Se(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}},Xs=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},Qs=async function*(e,t){for await(const n of Zs(e))yield*Xs(n,t)},Zs=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()}},rn=(e,t,n,r)=>{const o=Qs(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",Fn=Ze&&typeof ReadableStream=="function",ea=Ze&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Un=(e,...t)=>{try{return!!e(...t)}catch{return!1}},ta=Fn&&Un(()=>{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}),on=64*1024,Et=Fn&&Un(()=>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 na=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 ea(e)).byteLength},ra=async(e,t)=>{const n=f.toFiniteNumber(e.getContentLength());return n??na(t)},oa=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}=Bn(e);u=u?(u+"").toLowerCase():"text";let l=Gs([o,a&&a.toAbortSignal()],s),w;const g=l&&l.unsubscribe&&(()=>{l.unsubscribe()});let b;try{if(d&&ta&&n!=="get"&&n!=="head"&&(b=await ra(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]=en(b,Ve(tn(d)));r=rn(L.body,on,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&&en(S,Ve(tn(i),!0))||[];E=new Response(rn(E.body,on,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)=>{In(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:ys,xhr:Ys,fetch:oa};f.forEach(xt,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const sn=e=>`- ${e}`,sa=e=>f.isFunction(e)||e===null||e===!1,jn={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,!sa(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(sn).join(`
|
|
6
|
+
`):" "+sn(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:xt};function mt(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Se(null,e)}function an(e){return mt(e),e.headers=H.from(e.headers),e.data=pt.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),jn.getAdapter(e.adapter||_e.adapter)(e).then(function(r){return mt(e),r.data=pt.call(e,e.transformResponse,r),r.headers=H.from(r.headers),r},function(r){return Pn(r)||(mt(e),r&&r.response&&(r.response.data=pt.call(e,e.transformResponse,r.response),r.response.headers=H.from(r.response.headers))),Promise.reject(r)})}const zn="1.8.2",et={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{et[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const ln={};et.transitional=function(t,n,r){function o(a,s){return"[Axios v"+zn+"] 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&&!ln[s]&&(ln[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}};et.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function aa(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 We={assertOptions:aa,validators:et},te=We.validators;let fe=class{constructor(t){this.defaults=t,this.interceptors={request:new Qt,response:new Qt}}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&&We.assertOptions(r,{silentJSONParsing:te.transitional(te.boolean),forcedJSONParsing:te.transitional(te.boolean),clarifyTimeoutError:te.transitional(te.boolean)},!1),o!=null&&(f.isFunction(o)?n.paramsSerializer={serialize:o}:We.assertOptions(o,{encode:te.function,serialize:te.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),We.assertOptions(n,{baseUrl:te.spelling("baseURL"),withXsrfToken:te.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 h,m=0,p;if(!d){const w=[an.bind(this),void 0];for(w.unshift.apply(w,i),w.push.apply(w,u),p=w.length,h=Promise.resolve(n);m<p;)h=h.then(w[m++],w[m++]);return h}p=i.length;let l=n;for(m=0;m<p;){const w=i[m++],g=i[m++];try{l=w(l)}catch(b){g.call(this,b);break}}try{h=an.call(this,l)}catch(w){return Promise.reject(w)}for(m=0,p=u.length;m<p;)h=h.then(u[m++],u[m++]);return h}getUri(t){t=he(this.defaults,t);const n=Dn(t.baseURL,t.url,t.allowAbsoluteUrls);return _n(n,t.params,t.paramsSerializer)}};f.forEach(["delete","get","head","options"],function(t){fe.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}))}}fe.prototype[t]=n(),fe.prototype[t+"Form"]=n(!0)});let ia=class Hn{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 Se(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 Hn(function(o){t=o}),cancel:t}}};function la(e){return function(n){return e.apply(null,n)}}function ca(e){return f.isObject(e)&&e.isAxiosError===!0}const Rt={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(Rt).forEach(([e,t])=>{Rt[t]=e});function qn(e){const t=new fe(e),n=vn(fe.prototype.request,t);return f.extend(n,fe.prototype,t,{allOwnKeys:!0}),f.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return qn(he(e,o))},n}const C=qn(_e);C.Axios=fe;C.CanceledError=Se;C.CancelToken=ia;C.isCancel=Pn;C.VERSION=zn;C.toFormData=Qe;C.AxiosError=v;C.Cancel=C.CanceledError;C.all=function(t){return Promise.all(t)};C.spread=la;C.isAxiosError=ca;C.mergeConfig=he;C.AxiosHeaders=H;C.formToJSON=e=>Mn(f.isHTMLForm(e)?new FormData(e):e);C.getAdapter=jn.getAdapter;C.HttpStatusCode=Rt;C.default=C;const{Axios:Ta,AxiosError:ka,CanceledError:Ca,isCancel:Oa,CancelToken:Aa,VERSION:La,all:_a,Cancel:Na,isAxiosError:Ma,spread:Pa,toFormData:Ia,AxiosHeaders:Da,HttpStatusCode:Ba,formToJSON:Fa,getAdapter:Ua,mergeConfig:ja}=C,Tt="useAxios",ua=async(e,t=r=>"",n=r=>{})=>(e.baseURL=t(e),B.debug(Tt,`baseURL::${e.baseURL}`),n(e),e),da=async(e=n=>{},t)=>{var r;if(e(t),t.response.status!==500){if(t.response.status<=401)return B.info(Tt,t.response.data.meta),Promise.reject(t.response.data.meta);if(t.response.status===404)return B.info(Tt,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=C(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},ze="useAxios",fa=({onRequest:e,onError:t,defineEnv:n})=>{C.interceptors.request.use(r=>ua(r,n,e)),C.interceptors.response.use(r=>r.data.data,r=>da(t,r)),C.defaults.headers.common["content-type"]="application/json"},ha={get:async(e,t)=>(B.debug(ze,`[get] url | ${e}`),C.get(e,t)),post:async(e,t,n)=>(B.debug(ze,`[post] url | ${e} | payload | ${t}`),C.post(e,t,n)),put:async(e,t,n)=>(B.debug(ze,`[put] url | ${e} | payload | ${t}`),C.put(e,t,n)),delete:async(e,t)=>(B.debug(ze,`[delete] url | ${e}`),C.delete(e,t))};var W=(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))(W||{});const cn={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}}},$n=()=>({width:window.innerWidth,height:window.innerHeight}),pa=({width:e,height:t})=>{const{width:n,height:r}=$n();return e.min<=n&&e.max>=n&&t.min<=r&&t.max>=r},Wn=()=>{for(const r of Object.keys(cn)){const o=cn[r];if(pa(o))return o.vdevice||W.MOBILE_LANDSCAPE_XL}const{width:e,height:t}=$n(),n=t>=e;return e<=320?W.MINI_MOBILE:e<=480&&e>=320?W.MOBILE_PORTRAIT:e<=767&&e>=481?W.MOBILE_LANDSCAPE:e<=1024&&e>=768?n?W.TAB_PORTRAIT:W.TAB_LANDSCAPE:e<=1280&&e>=1025?W.LAPTOP:(e>=1281,W.DESKTOP)},ma=["h1","h3","blockquote","br"],ga={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)(?:'|"|"))/},gt=e=>e.replace(/\*/g,"*").replace(/\_/g,"_").replace(/\~/g,"~"),wa=e=>e.replace(/*/g,"*").replace(/_/g,"_").replace(/~/g,"~"),un=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),ye=(e,t)=>{let n="",r="";return(e[0]===`
|
|
9
|
+
`||e[0]===" ")&&(n=e[0]),(e[e.length-1]===`
|
|
10
|
+
`||e[e.length-1]===" ")&&(r=e[e.length-1]),n+t+r},dn=e=>new RegExp(`<${e}.*?/?>`,"gm"),fn=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},hn=(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
|
+
<source src="${n}" type="audio/mp3"/>
|
|
12
|
+
</audio>`:o=="video"?`<video vmd="video" controls ${r}>
|
|
13
|
+
<source src="${n}" type="video/mp4"/>
|
|
14
|
+
</video>`:`<img vmd="image" src="${n}" alt="${e}" title="${t}" ${r}>`},ba={applyReverseMarkdown:e=>(e=e.replace(dn("br"),`
|
|
15
|
+
`),e=un(e),e=Markdown.reverseAnchor(e),e=e.replace(dn("hr")," --- "),e=Markdown.reverseRecursive(e),e.trim()),reverseRecursive:e=>{let n=new DOMParser().parseFromString(e,"text/html").body.childNodes,r=e===`
|
|
16
|
+
`?`
|
|
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=ga[s]||"",u=o.childNodes.length?Markdown.reverseRecursive(o.innerHTML):i;r+=!u.trim()&&u.includes(`
|
|
19
|
+
`)?`
|
|
20
|
+
`:"";let h=u[u.length-1]===`
|
|
21
|
+
`,m=ma.includes(s)?"":d;r+=d+(h?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=un(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=wa(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 ye(e," <h"+r+` vmd="h${r}">`+gt(n)+"</h"+r+"> ")},getBlockQuoteHTML:(e,t)=>(t=t.trim(),t.length?ye(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">“'+gt(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}>${gt(n)}</a>`},getImageHTML:(e,t,n,r,o)=>{let a=hn(t,r,fn(n),o);return ye(e,a)},getVideoHTML:(e,t,n,r,o,a,s,i)=>{let d=hn(t,r,fn(n),o);return ye(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 ye(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)?ye(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 ya(){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=Wn();i=d===W.MINI_MOBILE||d===W.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,h=a.getBoundingClientRect().top-i-s;window.scroll({top:h,behavior:"smooth"})}}}function va({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 Sa="useStore";let Vn="v0xapp",Jn="1.0.5-alpha";function He(e){return`vezham-ls-${Vn}-${Jn}-${e}`}const Ea=e=>{e.pretext&&(Vn=e.pretext),e.version&&(Jn=e.version)},Kn={get:(e,t)=>{try{const n=window.localStorage.getItem(He(e));return n&&n!=="undefined"?n:t||""}catch(n){return B.error(Sa,`key | ${He(e)} | err: `,n),t||""}},has:e=>!!Kn.get(e),set:(e,t)=>window.localStorage.setItem(He(e),t),delete:e=>window.localStorage.removeItem(He(e)),purge:()=>window.localStorage.clear()};exports.GetDevice=Wn;exports.Vdevice=W;exports.defineAxios=fa;exports.defineLogger=cr;exports.defineStore=Ea;exports.useAxios=ha;exports.useBoolean=mn;exports.useClickAnyWhere=ro;exports.useCopyToClipboard=oo;exports.useCountdown=so;exports.useCounter=gn;exports.useDarkMode=co;exports.useDebounceCallback=Ke;exports.useDebounceValue=uo;exports.useDocumentTitle=fo;exports.useEffect=ho;exports.useEventCallback=Oe;exports.useEventListener=q;exports.useHover=po;exports.useIntersectionObserver=mo;exports.useInterval=wn;exports.useIsClient=go;exports.useIsFirstRender=bn;exports.useIsMounted=yn;exports.useIsomorphicLayoutEffect=K;exports.useLocalStorage=kt;exports.useLogger=B;exports.useMap=wo;exports.useMarkdown=ba;exports.useMediaQuery=Ct;exports.useOnClickOutside=bo;exports.useReadLocalStorage=yo;exports.useResizeObserver=vo;exports.useScreen=So;exports.useScript=xo;exports.useScrollLock=To;exports.useScrollTo=ya;exports.useSessionStorage=ko;exports.useShortcut=va;exports.useStep=Co;exports.useStore=Kn;exports.useTernaryDarkMode=Lo;exports.useTimeout=_o;exports.useToast=pn;exports.useToggle=No;exports.useUnmount=Ot;exports.useWindowSize=Po;
|