(()=>{var e={54938:function(e,t,r){"use strict";r.d(t,{A:()=>_});/* import */var n=r(24221);/* import */var i=r(63822);/* import */var a=r(88975);/* import */var o=r(37822);/* import */var s=r(92027);/* import */var u=r(97943);/* import */var c=r(49116);var l=function e(e,t,r){var n=0;var a=0;while(true){n=a;a=(0,i/* .peek */.se)();// &\f
if(n===38&&a===12){t[r]=1}if((0,i/* .token */.Sh)(a)){break}(0,i/* .next */.K2)()}return(0,i/* .slice */.di)(e,i/* .position */.G1)};var d=function e(e,t){// pretend we've started with a comma
var r=-1;var n=44;do{switch((0,i/* .token */.Sh)(n)){case 0:// &\f
if(n===38&&(0,i/* .peek */.se)()===12){// this is not 100% correct, we don't account for literal sequences here - like for example quoted strings
// stylis inserts \f after & to know when & where it should replace this sequence with the context selector
// and when it should just concatenate the outer and inner selectors
// it's very unlikely for this sequence to actually appear in a different context, so we just leverage this fact here
t[r]=1}e[r]+=l(i/* .position */.G1-1,t,r);break;case 2:e[r]+=(0,i/* .delimit */.Tb)(n);break;case 4:// comma
if(n===44){// colon
e[++r]=(0,i/* .peek */.se)()===58?"&\f":"";t[r]=e[r].length;break}// fallthrough
default:e[r]+=(0,a/* .from */.HT)(n)}}while(n=(0,i/* .next */.K2)())return e};var f=function e(e,t){return(0,i/* .dealloc */.VF)(d((0,i/* .alloc */.c4)(e),t))};// WeakSet would be more appropriate, but only WeakMap is supported in IE11
var p=/* #__PURE__ */new WeakMap;var h=function e(e){if(e.type!=="rule"||!e.parent||// positive .length indicates that this rule contains pseudo
// negative .length indicates that this rule has been already prefixed
e.length<1){return}var t=e.value;var r=e.parent;var n=e.column===r.column&&e.line===r.line;while(r.type!=="rule"){r=r.parent;if(!r)return}// short-circuit for the simplest case
if(e.props.length===1&&t.charCodeAt(0)!==58&&!p.get(r)){return}// if this is an implicitly inserted rule (the one eagerly inserted at the each new nested level)
// then the props has already been manipulated beforehand as they that array is shared between it and its "rule parent"
if(n){return}p.set(e,true);var i=[];var a=f(t,i);var o=r.props;for(var s=0,u=0;s<a.length;s++){for(var c=0;c<o.length;c++,u++){e.props[u]=i[s]?a[s].replace(/&\f/g,o[c]):o[c]+" "+a[s]}}};var v=function e(e){if(e.type==="decl"){var t=e.value;if(t.charCodeAt(0)===108&&// charcode for b
t.charCodeAt(2)===98){// this ignores label
e["return"]="";e.value=""}}};/* eslint-disable no-fallthrough */function m(e,t){switch((0,a/* .hash */.tW)(e,t)){// color-adjust
case 5103:return o/* .WEBKIT */.j+"print-"+e+e;// animation, animation-(delay|direction|duration|fill-mode|iteration-count|name|play-state|timing-function)
case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return o/* .WEBKIT */.j+e+e;// appearance, user-select, transform, hyphens, text-size-adjust
case 5349:case 4246:case 4810:case 6968:case 2756:return o/* .WEBKIT */.j+e+o/* .MOZ */.vd+e+o.MS+e+e;// flex, flex-direction
case 6828:case 4268:return o/* .WEBKIT */.j+e+o.MS+e+e;// order
case 6165:return o/* .WEBKIT */.j+e+o.MS+"flex-"+e+e;// align-items
case 5187:return o/* .WEBKIT */.j+e+(0,a/* .replace */.HC)(e,/(\w+).+(:[^]+)/,o/* .WEBKIT */.j+"box-$1$2"+o.MS+"flex-$1$2")+e;// align-self
case 5443:return o/* .WEBKIT */.j+e+o.MS+"flex-item-"+(0,a/* .replace */.HC)(e,/flex-|-self/,"")+e;// align-content
case 4675:return o/* .WEBKIT */.j+e+o.MS+"flex-line-pack"+(0,a/* .replace */.HC)(e,/align-content|flex-|-self/,"")+e;// flex-shrink
case 5548:return o/* .WEBKIT */.j+e+o.MS+(0,a/* .replace */.HC)(e,"shrink","negative")+e;// flex-basis
case 5292:return o/* .WEBKIT */.j+e+o.MS+(0,a/* .replace */.HC)(e,"basis","preferred-size")+e;// flex-grow
case 6060:return o/* .WEBKIT */.j+"box-"+(0,a/* .replace */.HC)(e,"-grow","")+o/* .WEBKIT */.j+e+o.MS+(0,a/* .replace */.HC)(e,"grow","positive")+e;// transition
case 4554:return o/* .WEBKIT */.j+(0,a/* .replace */.HC)(e,/([^-])(transform)/g,"$1"+o/* .WEBKIT */.j+"$2")+e;// cursor
case 6187:return(0,a/* .replace */.HC)((0,a/* .replace */.HC)((0,a/* .replace */.HC)(e,/(zoom-|grab)/,o/* .WEBKIT */.j+"$1"),/(image-set)/,o/* .WEBKIT */.j+"$1"),e,"")+e;// background, background-image
case 5495:case 3959:return(0,a/* .replace */.HC)(e,/(image-set\([^]*)/,o/* .WEBKIT */.j+"$1"+"$`$1");// justify-content
case 4968:return(0,a/* .replace */.HC)((0,a/* .replace */.HC)(e,/(.+:)(flex-)?(.*)/,o/* .WEBKIT */.j+"box-pack:$3"+o.MS+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+o/* .WEBKIT */.j+e+e;// (margin|padding)-inline-(start|end)
case 4095:case 3583:case 4068:case 2532:return(0,a/* .replace */.HC)(e,/(.+)-inline(.+)/,o/* .WEBKIT */.j+"$1$2")+e;// (min|max)?(width|height|inline-size|block-size)
case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:// stretch, max-content, min-content, fill-available
if((0,a/* .strlen */.b2)(e)-1-t>6)switch((0,a/* .charat */.wN)(e,t+1)){// (m)ax-content, (m)in-content
case 109:// -
if((0,a/* .charat */.wN)(e,t+4)!==45)break;// (f)ill-available, (f)it-content
case 102:return(0,a/* .replace */.HC)(e,/(.+:)(.+)-([^]+)/,"$1"+o/* .WEBKIT */.j+"$2-$3"+"$1"+o/* .MOZ */.vd+((0,a/* .charat */.wN)(e,t+3)==108?"$3":"$2-$3"))+e;// (s)tretch
case 115:return~(0,a/* .indexof */.K5)(e,"stretch")?m((0,a/* .replace */.HC)(e,"stretch","fill-available"),t)+e:e}break;// position: sticky
case 4949:// (s)ticky?
if((0,a/* .charat */.wN)(e,t+1)!==115)break;// display: (flex|inline-flex)
case 6444:switch((0,a/* .charat */.wN)(e,(0,a/* .strlen */.b2)(e)-3-(~(0,a/* .indexof */.K5)(e,"!important")&&10))){// stic(k)y
case 107:return(0,a/* .replace */.HC)(e,":",":"+o/* .WEBKIT */.j)+e;// (inline-)?fl(e)x
case 101:return(0,a/* .replace */.HC)(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+o/* .WEBKIT */.j+((0,a/* .charat */.wN)(e,14)===45?"inline-":"")+"box$3"+"$1"+o/* .WEBKIT */.j+"$2$3"+"$1"+o.MS+"$2box$3")+e}break;// writing-mode
case 5936:switch((0,a/* .charat */.wN)(e,t+11)){// vertical-l(r)
case 114:return o/* .WEBKIT */.j+e+o.MS+(0,a/* .replace */.HC)(e,/[svh]\w+-[tblr]{2}/,"tb")+e;// vertical-r(l)
case 108:return o/* .WEBKIT */.j+e+o.MS+(0,a/* .replace */.HC)(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;// horizontal(-)tb
case 45:return o/* .WEBKIT */.j+e+o.MS+(0,a/* .replace */.HC)(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return o/* .WEBKIT */.j+e+o.MS+e+e}return e}var g=function e(e,t,r,n){if(e.length>-1){if(!e["return"])switch(e.type){case o/* .DECLARATION */.LU:e["return"]=m(e.value,e.length);break;case o/* .KEYFRAMES */.Sv:return(0,s/* .serialize */.l)([(0,i/* .copy */.C)(e,{value:(0,a/* .replace */.HC)(e.value,"@","@"+o/* .WEBKIT */.j)})],n);case o/* .RULESET */.XZ:if(e.length)return(0,a/* .combine */.kg)(e.props,function(t){switch((0,a/* .match */.YW)(t,/(::plac\w+|:read-\w+)/)){// :read-(only|write)
case":read-only":case":read-write":return(0,s/* .serialize */.l)([(0,i/* .copy */.C)(e,{props:[(0,a/* .replace */.HC)(t,/:(read-\w+)/,":"+o/* .MOZ */.vd+"$1")]})],n);// :placeholder
case"::placeholder":return(0,s/* .serialize */.l)([(0,i/* .copy */.C)(e,{props:[(0,a/* .replace */.HC)(t,/:(plac\w+)/,":"+o/* .WEBKIT */.j+"input-$1")]}),(0,i/* .copy */.C)(e,{props:[(0,a/* .replace */.HC)(t,/:(plac\w+)/,":"+o/* .MOZ */.vd+"$1")]}),(0,i/* .copy */.C)(e,{props:[(0,a/* .replace */.HC)(t,/:(plac\w+)/,o.MS+"input-$1")]})],n)}return""})}}};var b=[g];var _=function e(e){var t=e.key;if(t==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");// get SSRed styles out of the way of React's hydration
// document.head is a safe place to move them to(though note document.head is not necessarily the last place they will be)
// note this very very intentionally targets all style elements regardless of the key to ensure
// that creating a cache works inside of render of a React component
Array.prototype.forEach.call(r,function(e){// we want to only move elements which have a space in the data-emotion attribute value
// because that indicates that it is an Emotion 11 server-side rendered style elements
// while we will already ignore Emotion 11 client-side inserted styles because of the :not([data-s]) part in the selector
// Emotion 10 client-side inserted styles did not have data-s (but importantly did not have a space in their data-emotion attributes)
// so checking for the space ensures that loading Emotion 11 after Emotion 10 has inserted some styles
// will not result in the Emotion 10 styles being destroyed
var t=e.getAttribute("data-emotion");if(t.indexOf(" ")===-1){return}document.head.appendChild(e);e.setAttribute("data-s","")})}var i=e.stylisPlugins||b;var a={};var o;var l=[];{o=e.container||document.head;Array.prototype.forEach.call(// means that the style elements we're looking at are only Emotion 11 server-rendered style elements
document.querySelectorAll('style[data-emotion^="'+t+' "]'),function(e){var t=e.getAttribute("data-emotion").split(" ");for(var r=1;r<t.length;r++){a[t[r]]=true}l.push(e)})}var d;var f=[h,v];{var p;var m=[s/* .stringify */.A,(0,u/* .rulesheet */.MY)(function(e){p.insert(e)})];var g=(0,u/* .middleware */.r1)(f.concat(i,m));var _=function e(e){return(0,s/* .serialize */.l)((0,c/* .compile */.wE)(e),g)};d=function e(e,t,r,n){p=r;_(e?e+"{"+t.styles+"}":t.styles);if(n){y.inserted[t.name]=true}}}var y={key:t,sheet:new n/* .StyleSheet */.v({key:t,container:o,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:a,registered:{},insert:d};y.sheet.hydrate(l);return y}},51078:function(e,t,r){"use strict";r.d(t,{A:()=>n});/* eslint-disable */// Inspired by https://github.com/garycourt/murmurhash-js
// Ported from https://github.com/aappleby/smhasher/blob/61a0530f28277f2e850bfc39600ce61d02b518de/src/MurmurHash2.cpp#L37-L86
function n(e){// 'm' and 'r' are mixing constants generated offline.
// They're not really 'magic', they just happen to work well.
// const m = 0x5bd1e995;
// const r = 24;
// Initialize the hash
var t=0;// Mix 4 bytes at a time into the hash
var r,n=0,i=e.length;for(;i>=4;++n,i-=4){r=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24;r=/* Math.imul(k, m): */(r&65535)*0x5bd1e995+((r>>>16)*59797<<16);r^=/* k >>> r: */r>>>24;t=/* Math.imul(k, m): */(r&65535)*0x5bd1e995+((r>>>16)*59797<<16)^/* Math.imul(h, m): */(t&65535)*0x5bd1e995+((t>>>16)*59797<<16)}// Handle the last few bytes of the input array
switch(i){case 3:t^=(e.charCodeAt(n+2)&255)<<16;case 2:t^=(e.charCodeAt(n+1)&255)<<8;case 1:t^=e.charCodeAt(n)&255;t=/* Math.imul(h, m): */(t&65535)*0x5bd1e995+((t>>>16)*59797<<16)}// Do a few final mixes of the hash to ensure the last few
// bytes are well-incorporated.
t^=t>>>13;t=/* Math.imul(h, m): */(t&65535)*0x5bd1e995+((t>>>16)*59797<<16);return((t^t>>>15)>>>0).toString(36)}},96606:function(e,t,r){"use strict";r.d(t,{A:()=>n});function n(e){var t=Object.create(null);return function(r){if(t[r]===undefined)t[r]=e(r);return t[r]}}},48354:function(e,t,r){"use strict";r.d(t,{C:()=>d,E:()=>O,T:()=>h,c:()=>A,h:()=>y,w:()=>p});/* import */var n=r(41594);/* import */var i=/*#__PURE__*/r.n(n);/* import */var a=r(54938);/* import */var o=r(83595);/* import */var s=r(46624);/* import */var u=r(75035);var c=false;var l=/* #__PURE__ */n.createContext(// because this module is primarily intended for the browser and node
// but it's also required in react native and similar environments sometimes
// and we could have a special build just for that
// but this is much easier and the native packages
// might use a different theme context in the future anyway
typeof HTMLElement!=="undefined"?/* #__PURE__ */(0,a/* ["default"] */.A)({key:"css"}):null);var d=l.Provider;var f=function e(){return useContext(l)};var p=function e(e){return/*#__PURE__*/(0,n.forwardRef)(function(t,r){// the cache will never be null in the browser
var i=(0,n.useContext)(l);return e(t,i,r)})};var h=/* #__PURE__ */n.createContext({});var v=function e(){return React.useContext(h)};var m=function e(e,t){if(typeof t==="function"){var r=t(e);return r}return _extends({},e,t)};var g=/* #__PURE__ *//* unused pure expression or super */null&&weakMemoize(function(e){return weakMemoize(function(t){return m(e,t)})});var b=function e(e){var t=React.useContext(h);if(e.theme!==t){t=g(t)(e.theme)}return /*#__PURE__*/React.createElement(h.Provider,{value:t},e.children)};function _(e){var t=e.displayName||e.name||"Component";var r=/*#__PURE__*/React.forwardRef(function t(t,r){var n=React.useContext(h);return /*#__PURE__*/React.createElement(e,_extends({theme:n,ref:r},t))});r.displayName="WithTheme("+t+")";return hoistNonReactStatics(r,e)}var y={}.hasOwnProperty;var w="__EMOTION_TYPE_PLEASE_DO_NOT_USE__";var A=function e(e,t){var r={};for(var n in t){if(y.call(t,n)){r[n]=t[n]}}r[w]=e;// Runtime labeling is an opt-in feature because:
return r};var x=function e(e){var t=e.cache,r=e.serialized,n=e.isStringTag;(0,o/* .registerStyles */.SF)(t,r,n);(0,u/* .useInsertionEffectAlwaysWithSyncFallback */.s)(function(){return(0,o/* .insertStyles */.sk)(t,r,n)});return null};var E=/* #__PURE__ */p(function(e,t,r){var i=e.css;// so that using `css` from `emotion` and passing the result to the css prop works
// not passing the registered cache to serializeStyles because it would
// make certain babel optimisations not possible
if(typeof i==="string"&&t.registered[i]!==undefined){i=t.registered[i]}var a=e[w];var u=[i];var l="";if(typeof e.className==="string"){l=(0,o/* .getRegisteredStyles */.Rk)(t.registered,u,e.className)}else if(e.className!=null){l=e.className+" "}var d=(0,s/* .serializeStyles */.J)(u,undefined,n.useContext(h));l+=t.key+"-"+d.name;var f={};for(var p in e){if(y.call(e,p)&&p!=="css"&&p!==w&&!c){f[p]=e[p]}}f.className=l;if(r){f.ref=r}return /*#__PURE__*/n.createElement(n.Fragment,null,/*#__PURE__*/n.createElement(x,{cache:t,serialized:d,isStringTag:typeof a==="string"}),/*#__PURE__*/n.createElement(a,f))});var O=E},42771:function(e,t,r){"use strict";r.d(t,{AH:()=>h,i7:()=>v,mL:()=>p,n:()=>f});/* import */var n=r(48354);/* import */var i=r(41594);/* import */var a=/*#__PURE__*/r.n(i);/* import */var o=r(83595);/* import */var s=r(75035);/* import */var u=r(46624);/* import */var c=r(54938);/* import */var l=r(31035);/* import */var d=/*#__PURE__*/r.n(l);var f=function e(e,t){// eslint-disable-next-line prefer-rest-params
var r=arguments;if(t==null||!n.h.call(t,"css")){return i.createElement.apply(undefined,r)}var a=r.length;var o=new Array(a);o[0]=n.E;o[1]=(0,n.c)(e,t);for(var s=2;s<a;s++){o[s]=r[s]}return i.createElement.apply(null,o)};(function(e){var t;(function(e){})(t||(t=e.JSX||(e.JSX={})))})(f||(f={}));// initial render from browser, insertBefore context.sheet.tags[0] or if a style hasn't been inserted there yet, appendChild
// initial client-side render from SSR, use place of hydrating tag
var p=/* #__PURE__ */(0,n.w)(function(e,t){var r=e.styles;var a=(0,u/* .serializeStyles */.J)([r],undefined,i.useContext(n.T));// but it is based on a constant that will never change at runtime
// it's effectively like having two implementations and switching them out
// so it's not actually breaking anything
var c=i.useRef();(0,s/* .useInsertionEffectWithLayoutFallback */.i)(function(){var e=t.key+"-global";// use case of https://github.com/emotion-js/emotion/issues/2675
var r=new t.sheet.constructor({key:e,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy});var n=false;var i=document.querySelector('style[data-emotion="'+e+" "+a.name+'"]');if(t.sheet.tags.length){r.before=t.sheet.tags[0]}if(i!==null){n=true;// clear the hash so this node won't be recognizable as rehydratable by other <Global/>s
i.setAttribute("data-emotion",e);r.hydrate([i])}c.current=[r,n];return function(){r.flush()}},[t]);(0,s/* .useInsertionEffectWithLayoutFallback */.i)(function(){var e=c.current;var r=e[0],n=e[1];if(n){e[1]=false;return}if(a.next!==undefined){// insert keyframes
(0,o/* .insertStyles */.sk)(t,a.next,true)}if(r.tags.length){// if this doesn't exist then it will be null so the style element will be appended
var i=r.tags[r.tags.length-1].nextElementSibling;r.before=i;r.flush()}t.insert("",a,r,false)},[t,a.name]);return null});function h(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++){t[r]=arguments[r]}return(0,u/* .serializeStyles */.J)(t)}function v(){var e=h.apply(void 0,arguments);var t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function e(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}var m=function e(t){var r=t.length;var n=0;var i="";for(;n<r;n++){var a=t[n];if(a==null)continue;var o=void 0;switch(typeof a){case"boolean":break;case"object":{if(Array.isArray(a)){o=e(a)}else{o="";for(var s in a){if(a[s]&&s){o&&(o+=" ");o+=s}}}break}default:{o=a}}if(o){i&&(i+=" ");i+=o}}return i};function g(e,t,r){var n=[];var i=getRegisteredStyles(e,n,r);if(n.length<2){return r}return i+t(n)}var b=function e(e){var t=e.cache,r=e.serializedArr;useInsertionEffectAlwaysWithSyncFallback(function(){for(var e=0;e<r.length;e++){insertStyles(t,r[e],false)}});return null};var _=/* #__PURE__ *//* unused pure expression or super */null&&withEmotionCache(function(e,t){var r=false;var n=[];var i=function e(){if(r&&isDevelopment){throw new Error("css can only be used during render")}for(var e=arguments.length,i=new Array(e),a=0;a<e;a++){i[a]=arguments[a]}var o=serializeStyles(i,t.registered);n.push(o);// registration has to happen here as the result of this might get consumed by `cx`
registerStyles(t,o,false);return t.key+"-"+o.name};var a=function e(){if(r&&isDevelopment){throw new Error("cx can only be used during render")}for(var e=arguments.length,n=new Array(e),a=0;a<e;a++){n[a]=arguments[a]}return g(t.registered,i,m(n))};var o={css:i,cx:a,theme:React.useContext(ThemeContext)};var s=e.children(o);r=true;return /*#__PURE__*/React.createElement(React.Fragment,null,/*#__PURE__*/React.createElement(b,{cache:t,serializedArr:n}),s)})},52639:function(e,t,r){"use strict";r.d(t,{FD:()=>p,FK:()=>d,Y:()=>f});/* import */var n=r(86070);/* import */var i=r(48354);/* import */var a=r(41594);/* import */var o=/*#__PURE__*/r.n(a);/* import */var s=r(54938);/* import */var u=r(31035);/* import */var c=/*#__PURE__*/r.n(u);/* import */var l=r(75035);var d=n.Fragment;var f=function e(e,t,r){if(!i.h.call(t,"css")){return n.jsx(e,t,r)}return n.jsx(i.E,(0,i.c)(e,t),r)};var p=function e(e,t,r){if(!i.h.call(t,"css")){return n.jsxs(e,t,r)}return n.jsxs(i.E,(0,i.c)(e,t),r)}},46624:function(e,t,r){"use strict";r.d(t,{J:()=>b});/* import */var n=r(51078);/* import */var i=r(32691);/* import */var a=r(96606);var o=false;var s=/[A-Z]|^ms/g;var u=/_EMO_([^_]+?)_([^]*?)_EMO_/g;var c=function e(e){return e.charCodeAt(1)===45};var l=function e(e){return e!=null&&typeof e!=="boolean"};var d=/* #__PURE__ */(0,a/* ["default"] */.A)(function(e){return c(e)?e:e.replace(s,"-$&").toLowerCase()});var f=function e(e,t){switch(e){case"animation":case"animationName":{if(typeof t==="string"){return t.replace(u,function(e,t,r){g={name:t,styles:r,next:g};return t})}}}if(i/* ["default"] */.A[e]!==1&&!c(e)&&typeof t==="number"&&t!==0){return t+"px"}return t};var p="Component selectors can only be used in conjunction with "+"@emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware "+"compiler transform.";function h(e,t,r){if(r==null){return""}var n=r;if(n.__emotion_styles!==undefined){return n}switch(typeof r){case"boolean":{return""}case"object":{var i=r;if(i.anim===1){g={name:i.name,styles:i.styles,next:g};return i.name}var a=r;if(a.styles!==undefined){var o=a.next;if(o!==undefined){// not the most efficient thing ever but this is a pretty rare case
// and there will be very few iterations of this generally
while(o!==undefined){g={name:o.name,styles:o.styles,next:g};o=o.next}}var s=a.styles+";";return s}return v(e,t,r)}case"function":{if(e!==undefined){var u=g;var c=r(e);g=u;return h(e,t,c)}break}}// finalize string values (regular strings and functions interpolated into css calls)
var l=r;if(t==null){return l}var d=t[l];return d!==undefined?d:l}function v(e,t,r){var n="";if(Array.isArray(r)){for(var i=0;i<r.length;i++){n+=h(e,t,r[i])+";"}}else{for(var a in r){var s=r[a];if(typeof s!=="object"){var u=s;if(t!=null&&t[u]!==undefined){n+=a+"{"+t[u]+"}"}else if(l(u)){n+=d(a)+":"+f(a,u)+";"}}else{if(a==="NO_COMPONENT_SELECTOR"&&o){throw new Error(p)}if(Array.isArray(s)&&typeof s[0]==="string"&&(t==null||t[s[0]]===undefined)){for(var c=0;c<s.length;c++){if(l(s[c])){n+=d(a)+":"+f(a,s[c])+";"}}}else{var v=h(e,t,s);switch(a){case"animation":case"animationName":{n+=d(a)+":"+v+";";break}default:{n+=a+"{"+v+"}"}}}}}}return n}var m=/label:\s*([^\s;{]+)\s*(;|$)/g;// this is the cursor for keyframes
// keyframes are stored on the SerializedStyles object as a linked list
var g;function b(e,t,r){if(e.length===1&&typeof e[0]==="object"&&e[0]!==null&&e[0].styles!==undefined){return e[0]}var i=true;var a="";g=undefined;var o=e[0];if(o==null||o.raw===undefined){i=false;a+=h(r,t,o)}else{var s=o;a+=s[0]}// we start at 1 since we've already handled the first arg
for(var u=1;u<e.length;u++){a+=h(r,t,e[u]);if(i){var c=o;a+=c[u]}}// using a global regex with .exec is stateful so lastIndex has to be reset each time
m.lastIndex=0;var l="";var d;// https://esbench.com/bench/5b809c2cf2949800a0f61fb5
while((d=m.exec(a))!==null){l+="-"+d[1]}var f=(0,n/* ["default"] */.A)(a)+l;return{name:f,styles:a,next:g}}},24221:function(e,t,r){"use strict";r.d(t,{v:()=>o});var n=false;/*

Based off glamor's StyleSheet, thanks Sunil ❤️

high performance StyleSheet for css-in-js systems

- uses multiple style tags behind the scenes for millions of rules
- uses `insertRule` for appending in production for *much* faster performance

// usage

import { StyleSheet } from '@emotion/sheet'

let styleSheet = new StyleSheet({ key: '', container: document.head })

styleSheet.insert('#box { border: 1px solid red; }')
- appends a css rule into the stylesheet

styleSheet.flush()
- empties the stylesheet of all its contents

*/function i(e){if(e.sheet){return e.sheet}// this weirdness brought to you by firefox
/* istanbul ignore next */for(var t=0;t<document.styleSheets.length;t++){if(document.styleSheets[t].ownerNode===e){return document.styleSheets[t]}}// this function should always return with a value
// TS can't understand it though so we make it stop complaining here
return undefined}function a(e){var t=document.createElement("style");t.setAttribute("data-emotion",e.key);if(e.nonce!==undefined){t.setAttribute("nonce",e.nonce)}t.appendChild(document.createTextNode(""));t.setAttribute("data-s","");return t}var o=/*#__PURE__*/function(){// Using Node instead of HTMLElement since container may be a ShadowRoot
function e(e){var t=this;this._insertTag=function(e){var r;if(t.tags.length===0){if(t.insertionPoint){r=t.insertionPoint.nextSibling}else if(t.prepend){r=t.container.firstChild}else{r=t.before}}else{r=t.tags[t.tags.length-1].nextSibling}t.container.insertBefore(e,r);t.tags.push(e)};this.isSpeedy=e.speedy===undefined?!n:e.speedy;this.tags=[];this.ctr=0;this.nonce=e.nonce;// key is the value of the data-emotion attribute, it's used to identify different sheets
this.key=e.key;this.container=e.container;this.prepend=e.prepend;this.insertionPoint=e.insertionPoint;this.before=null}var t=e.prototype;t.hydrate=function e(e){e.forEach(this._insertTag)};t.insert=function e(e){// the max length is how many rules we have per style tag, it's 65000 in speedy mode
// it's 1 in dev because we insert source maps that map a single rule to a location
// and you can only have one source map per style tag
if(this.ctr%(this.isSpeedy?65e3:1)===0){this._insertTag(a(this))}var t=this.tags[this.tags.length-1];if(this.isSpeedy){var r=i(t);try{// this is the ultrafast version, works across browsers
// the big drawback is that the css won't be editable in devtools
r.insertRule(e,r.cssRules.length)}catch(e){}}else{t.appendChild(document.createTextNode(e))}this.ctr++};t.flush=function e(){this.tags.forEach(function(e){var t;return(t=e.parentNode)==null?void 0:t.removeChild(e)});this.tags=[];this.ctr=0};return e}()},32691:function(e,t,r){"use strict";r.d(t,{A:()=>n});var n={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,// SVG-related properties
fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1}},75035:function(e,t,r){"use strict";r.d(t,{i:()=>u,s:()=>s});/* import */var n=r(41594);/* import */var i=/*#__PURE__*/r.n(n);var a=function e(e){return e()};var o=n["useInsertion"+"Effect"]?n["useInsertion"+"Effect"]:false;var s=o||a;var u=o||n.useLayoutEffect},83595:function(e,t,r){"use strict";r.d(t,{Rk:()=>i,SF:()=>a,sk:()=>o});var n=true;function i(e,t,r){var n="";r.split(" ").forEach(function(r){if(e[r]!==undefined){t.push(e[r]+";")}else if(r){n+=r+" "}});return n}var a=function e(e,t,r){var i=e.key+"-"+t.name;if(// class name could be used further down
// the tree but if it's a string tag, we know it won't
// so we don't have to add it to registered cache.
// this improves memory usage since we can avoid storing the whole style string
(r===false||// we need to always store it if we're in compat mode and
// in node since emotion-server relies on whether a style is in
// the registered cache to know whether a style is global or not
// also, note that this check will be dead code eliminated in the browser
n===false)&&e.registered[i]===undefined){e.registered[i]=t.styles}};var o=function e(e,t,r){a(e,t,r);var n=e.key+"-"+t.name;if(e.inserted[t.name]===undefined){var i=t;do{e.insert(t===i?"."+n:"",i,e.sheet,true);i=i.next}while(i!==undefined)}}},24323:function(e,t,r){"use strict";r.d(t,{U:()=>p});/* import */var n=r(72761);/* import */var i=r(16622);/* import */var a=r(93708);/* import */var o=r(22553);/* import */var s=r(52289);/* import */var u=r(20456);/* import */var c=r(25781);/* import */var l=r(40918);var d={placement:"bottom",modifiers:[],strategy:"absolute"};function f(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++){t[r]=arguments[r]}return!t.some(function(e){return!(e&&typeof e.getBoundingClientRect==="function")})}function p(e){if(e===void 0){e={}}var t=e,r=t.defaultModifiers,p=r===void 0?[]:r,h=t.defaultOptions,v=h===void 0?d:h;return function e(e,t,r){if(r===void 0){r=v}var h={placement:"bottom",orderedModifiers:[],options:Object.assign({},d,v),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}};var m=[];var g=false;var b={state:h,setOptions:function r(r){var n=typeof r==="function"?r(h.options):r;y();h.options=Object.assign({},v,h.options,n);h.scrollParents={reference:(0,l/* .isElement */.vq)(e)?(0,a/* ["default"] */.A)(e):e.contextElement?(0,a/* ["default"] */.A)(e.contextElement):[],popper:(0,a/* ["default"] */.A)(t)};// Orders the modifiers based on their dependencies and `phase`
// properties
var i=(0,s/* ["default"] */.A)((0,c/* ["default"] */.A)([].concat(p,h.options.modifiers)));// Strip out disabled modifiers
h.orderedModifiers=i.filter(function(e){return e.enabled});_();return b.update()},// Sync update – it will always be executed, even if not necessary. This
// is useful for low frequency updates where sync behavior simplifies the
// logic.
// For high frequency updates (e.g. `resize` and `scroll` events), always
// prefer the async Popper#update method
forceUpdate:function e(){if(g){return}var e=h.elements,t=e.reference,r=e.popper;// Don't proceed if `reference` or `popper` are not valid elements
// anymore
if(!f(t,r)){return}// Store the reference and popper rects to be read by modifiers
h.rects={reference:(0,n/* ["default"] */.A)(t,(0,o/* ["default"] */.A)(r),h.options.strategy==="fixed"),popper:(0,i/* ["default"] */.A)(r)};// Modifiers have the ability to reset the current update cycle. The
// most common use case for this is the `flip` modifier changing the
// placement, which then needs to re-run all the modifiers, because the
// logic was previously ran for the previous placement and is therefore
// stale/incorrect
h.reset=false;h.placement=h.options.placement;// On each update cycle, the `modifiersData` property for each modifier
// is filled with the initial data specified by the modifier. This means
// it doesn't persist and is fresh on each update.
// To ensure persistent data, use `${name}#persistent`
h.orderedModifiers.forEach(function(e){return h.modifiersData[e.name]=Object.assign({},e.data)});for(var a=0;a<h.orderedModifiers.length;a++){if(h.reset===true){h.reset=false;a=-1;continue}var s=h.orderedModifiers[a],u=s.fn,c=s.options,l=c===void 0?{}:c,d=s.name;if(typeof u==="function"){h=u({state:h,options:l,name:d,instance:b})||h}}},// Async and optimistically optimized update – it will not be executed if
// not necessary (debounced to run at most once-per-tick)
update:(0,u/* ["default"] */.A)(function(){return new Promise(function(e){b.forceUpdate();e(h)})}),destroy:function e(){y();g=true}};if(!f(e,t)){return b}b.setOptions(r).then(function(e){if(!g&&r.onFirstUpdate){r.onFirstUpdate(e)}});// Modifiers have the ability to execute arbitrary code before the first
// update cycle runs. They will be executed in the same order as the update
// cycle. This is useful when a modifier adds some persistent data that
// other modifiers need to use, but the modifier is run after the dependent
// one.
function _(){h.orderedModifiers.forEach(function(e){var t=e.name,r=e.options,n=r===void 0?{}:r,i=e.effect;if(typeof i==="function"){var a=i({state:h,name:t,instance:b,options:n});var o=function e(){};m.push(a||o)}})}function y(){m.forEach(function(e){return e()});m=[]}return b}}var h=/*#__PURE__*//* unused pure expression or super */null&&p();// eslint-disable-next-line import/no-unused-modules
},19049:function(e,t,r){"use strict";r.d(t,{A:()=>i});/* import */var n=r(40918);function i(e,t){var r=t.getRootNode&&t.getRootNode();// First, attempt with faster native method
if(e.contains(t)){return true}else if(r&&(0,n/* .isShadowRoot */.Ng)(r)){var i=t;do{if(i&&e.isSameNode(i)){return true}// $FlowFixMe[prop-missing]: need a better way to handle this...
i=i.parentNode||i.host}while(i)}// Give up, the result is false
return false}},77727:function(e,t,r){"use strict";r.d(t,{A:()=>s});/* import */var n=r(40918);/* import */var i=r(27353);/* import */var a=r(23890);/* import */var o=r(25564);function s(e,t,r){if(t===void 0){t=false}if(r===void 0){r=false}var s=e.getBoundingClientRect();var u=1;var c=1;if(t&&(0,n/* .isHTMLElement */.sb)(e)){u=e.offsetWidth>0?(0,i/* .round */.LI)(s.width)/e.offsetWidth||1:1;c=e.offsetHeight>0?(0,i/* .round */.LI)(s.height)/e.offsetHeight||1:1}var l=(0,n/* .isElement */.vq)(e)?(0,a/* ["default"] */.A)(e):window,d=l.visualViewport;var f=!(0,o/* ["default"] */.A)()&&r;var p=(s.left+(f&&d?d.offsetLeft:0))/u;var h=(s.top+(f&&d?d.offsetTop:0))/c;var v=s.width/u;var m=s.height/c;return{width:v,height:m,top:h,right:p+v,bottom:h+m,left:p,x:p,y:h}}},96846:function(e,t,r){"use strict";r.d(t,{A:()=>y});/* import */var n=r(14711);/* import */var i=r(60154);/* import */var a=r(44025);/* import */var o=r(93708);/* import */var s=r(22553);/* import */var u=r(50583);/* import */var c=r(55520);/* import */var l=r(40918);/* import */var d=r(77727);/* import */var f=r(45722);/* import */var p=r(19049);/* import */var h=r(73213);/* import */var v=r(93989);/* import */var m=r(27353);function g(e,t){var r=(0,d/* ["default"] */.A)(e,false,t==="fixed");r.top=r.top+e.clientTop;r.left=r.left+e.clientLeft;r.bottom=r.top+e.clientHeight;r.right=r.left+e.clientWidth;r.width=e.clientWidth;r.height=e.clientHeight;r.x=r.left;r.y=r.top;return r}function b(e,t,r){return t===n/* .viewport */.R9?(0,v/* ["default"] */.A)((0,i/* ["default"] */.A)(e,r)):(0,l/* .isElement */.vq)(t)?g(t,r):(0,v/* ["default"] */.A)((0,a/* ["default"] */.A)((0,u/* ["default"] */.A)(e)))}// A "clipping parent" is an overflowable container with the characteristic of
// clipping (or hiding) overflowing elements with a position different from
// `initial`
function _(e){var t=(0,o/* ["default"] */.A)((0,f/* ["default"] */.A)(e));var r=["absolute","fixed"].indexOf((0,c/* ["default"] */.A)(e).position)>=0;var n=r&&(0,l/* .isHTMLElement */.sb)(e)?(0,s/* ["default"] */.A)(e):e;if(!(0,l/* .isElement */.vq)(n)){return[]}// $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414
return t.filter(function(e){return(0,l/* .isElement */.vq)(e)&&(0,p/* ["default"] */.A)(e,n)&&(0,h/* ["default"] */.A)(e)!=="body"})}// Gets the maximum area that the element is visible in due to any number of
// clipping parents
function y(e,t,r,n){var i=t==="clippingParents"?_(e):[].concat(t);var a=[].concat(i,[r]);var o=a[0];var s=a.reduce(function(t,r){var i=b(e,r,n);t.top=(0,m/* .max */.T9)(i.top,t.top);t.right=(0,m/* .min */.jk)(i.right,t.right);t.bottom=(0,m/* .min */.jk)(i.bottom,t.bottom);t.left=(0,m/* .max */.T9)(i.left,t.left);return t},b(e,o,n));s.width=s.right-s.left;s.height=s.bottom-s.top;s.x=s.left;s.y=s.top;return s}},72761:function(e,t,r){"use strict";r.d(t,{A:()=>f});/* import */var n=r(77727);/* import */var i=r(59359);/* import */var a=r(73213);/* import */var o=r(40918);/* import */var s=r(13076);/* import */var u=r(50583);/* import */var c=r(16077);/* import */var l=r(27353);function d(e){var t=e.getBoundingClientRect();var r=(0,l/* .round */.LI)(t.width)/e.offsetWidth||1;var n=(0,l/* .round */.LI)(t.height)/e.offsetHeight||1;return r!==1||n!==1}// Returns the composite rect of an element relative to its offsetParent.
// Composite means it takes into account transforms as well as layout.
function f(e,t,r){if(r===void 0){r=false}var l=(0,o/* .isHTMLElement */.sb)(t);var f=(0,o/* .isHTMLElement */.sb)(t)&&d(t);var p=(0,u/* ["default"] */.A)(t);var h=(0,n/* ["default"] */.A)(e,f,r);var v={scrollLeft:0,scrollTop:0};var m={x:0,y:0};if(l||!l&&!r){if((0,a/* ["default"] */.A)(t)!=="body"||// https://github.com/popperjs/popper-core/issues/1078
(0,c/* ["default"] */.A)(p)){v=(0,i/* ["default"] */.A)(t)}if((0,o/* .isHTMLElement */.sb)(t)){m=(0,n/* ["default"] */.A)(t,true);m.x+=t.clientLeft;m.y+=t.clientTop}else if(p){m.x=(0,s/* ["default"] */.A)(p)}}return{x:h.left+v.scrollLeft-m.x,y:h.top+v.scrollTop-m.y,width:h.width,height:h.height}}},55520:function(e,t,r){"use strict";r.d(t,{A:()=>i});/* import */var n=r(23890);function i(e){return(0,n/* ["default"] */.A)(e).getComputedStyle(e)}},50583:function(e,t,r){"use strict";r.d(t,{A:()=>i});/* import */var n=r(40918);function i(e){// $FlowFixMe[incompatible-return]: assume body is always available
return(((0,n/* .isElement */.vq)(e)?e.ownerDocument:e.document)||window.document).documentElement}},44025:function(e,t,r){"use strict";r.d(t,{A:()=>u});/* import */var n=r(50583);/* import */var i=r(55520);/* import */var a=r(13076);/* import */var o=r(80927);/* import */var s=r(27353);// Gets the entire size of the scrollable document area, even extending outside
// of the `<html>` and `<body>` rect bounds if horizontally scrollable
function u(e){var t;var r=(0,n/* ["default"] */.A)(e);var u=(0,o/* ["default"] */.A)(e);var c=(t=e.ownerDocument)==null?void 0:t.body;var l=(0,s/* .max */.T9)(r.scrollWidth,r.clientWidth,c?c.scrollWidth:0,c?c.clientWidth:0);var d=(0,s/* .max */.T9)(r.scrollHeight,r.clientHeight,c?c.scrollHeight:0,c?c.clientHeight:0);var f=-u.scrollLeft+(0,a/* ["default"] */.A)(e);var p=-u.scrollTop;if((0,i/* ["default"] */.A)(c||r).direction==="rtl"){f+=(0,s/* .max */.T9)(r.clientWidth,c?c.clientWidth:0)-l}return{width:l,height:d,x:f,y:p}}},49686:function(e,t,r){"use strict";r.d(t,{A:()=>n});function n(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}},16622:function(e,t,r){"use strict";r.d(t,{A:()=>i});/* import */var n=r(77727);// Returns the layout rect of an element relative to its offsetParent. Layout
// means it doesn't take into account transforms.
function i(e){var t=(0,n/* ["default"] */.A)(e);// Use the clientRect sizes if it's not been transformed.
// Fixes https://github.com/popperjs/popper-core/issues/1223
var r=e.offsetWidth;var i=e.offsetHeight;if(Math.abs(t.width-r)<=1){r=t.width}if(Math.abs(t.height-i)<=1){i=t.height}return{x:e.offsetLeft,y:e.offsetTop,width:r,height:i}}},73213:function(e,t,r){"use strict";r.d(t,{A:()=>n});function n(e){return e?(e.nodeName||"").toLowerCase():null}},59359:function(e,t,r){"use strict";r.d(t,{A:()=>s});/* import */var n=r(80927);/* import */var i=r(23890);/* import */var a=r(40918);/* import */var o=r(49686);function s(e){if(e===(0,i/* ["default"] */.A)(e)||!(0,a/* .isHTMLElement */.sb)(e)){return(0,n/* ["default"] */.A)(e)}else{return(0,o/* ["default"] */.A)(e)}}},22553:function(e,t,r){"use strict";r.d(t,{A:()=>f});/* import */var n=r(23890);/* import */var i=r(73213);/* import */var a=r(55520);/* import */var o=r(40918);/* import */var s=r(32796);/* import */var u=r(45722);/* import */var c=r(11623);function l(e){if(!(0,o/* .isHTMLElement */.sb)(e)||// https://github.com/popperjs/popper-core/issues/837
(0,a/* ["default"] */.A)(e).position==="fixed"){return null}return e.offsetParent}// `.offsetParent` reports `null` for fixed elements, while absolute elements
// return the containing block
function d(e){var t=/firefox/i.test((0,c/* ["default"] */.A)());var r=/Trident/i.test((0,c/* ["default"] */.A)());if(r&&(0,o/* .isHTMLElement */.sb)(e)){// In IE 9, 10 and 11 fixed elements containing block is always established by the viewport
var n=(0,a/* ["default"] */.A)(e);if(n.position==="fixed"){return null}}var s=(0,u/* ["default"] */.A)(e);if((0,o/* .isShadowRoot */.Ng)(s)){s=s.host}while((0,o/* .isHTMLElement */.sb)(s)&&["html","body"].indexOf((0,i/* ["default"] */.A)(s))<0){var l=(0,a/* ["default"] */.A)(s);// This is non-exhaustive but covers the most common CSS properties that
// create a containing block.
// https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
if(l.transform!=="none"||l.perspective!=="none"||l.contain==="paint"||["transform","perspective"].indexOf(l.willChange)!==-1||t&&l.willChange==="filter"||t&&l.filter&&l.filter!=="none"){return s}else{s=s.parentNode}}return null}// Gets the closest ancestor positioned element. Handles some edge cases,
// such as table ancestors and cross browser bugs.
function f(e){var t=(0,n/* ["default"] */.A)(e);var r=l(e);while(r&&(0,s/* ["default"] */.A)(r)&&(0,a/* ["default"] */.A)(r).position==="static"){r=l(r)}if(r&&((0,i/* ["default"] */.A)(r)==="html"||(0,i/* ["default"] */.A)(r)==="body"&&(0,a/* ["default"] */.A)(r).position==="static")){return t}return r||d(e)||t}},45722:function(e,t,r){"use strict";r.d(t,{A:()=>o});/* import */var n=r(73213);/* import */var i=r(50583);/* import */var a=r(40918);function o(e){if((0,n/* ["default"] */.A)(e)==="html"){return e}return(// $FlowFixMe[incompatible-return]
// $FlowFixMe[prop-missing]
e.assignedSlot||// step into the shadow DOM of the parent of a slotted node
e.parentNode||((0,a/* .isShadowRoot */.Ng)(e)?e.host:null)||// ShadowRoot detected
// $FlowFixMe[incompatible-call]: HTMLElement is a Node
(0,i/* ["default"] */.A)(e)// fallback
)}},31791:function(e,t,r){"use strict";r.d(t,{A:()=>s});/* import */var n=r(45722);/* import */var i=r(16077);/* import */var a=r(73213);/* import */var o=r(40918);function s(e){if(["html","body","#document"].indexOf((0,a/* ["default"] */.A)(e))>=0){// $FlowFixMe[incompatible-return]: assume body is always available
return e.ownerDocument.body}if((0,o/* .isHTMLElement */.sb)(e)&&(0,i/* ["default"] */.A)(e)){return e}return s((0,n/* ["default"] */.A)(e))}},60154:function(e,t,r){"use strict";r.d(t,{A:()=>s});/* import */var n=r(23890);/* import */var i=r(50583);/* import */var a=r(13076);/* import */var o=r(25564);function s(e,t){var r=(0,n/* ["default"] */.A)(e);var s=(0,i/* ["default"] */.A)(e);var u=r.visualViewport;var c=s.clientWidth;var l=s.clientHeight;var d=0;var f=0;if(u){c=u.width;l=u.height;var p=(0,o/* ["default"] */.A)();if(p||!p&&t==="fixed"){d=u.offsetLeft;f=u.offsetTop}}return{width:c,height:l,x:d+(0,a/* ["default"] */.A)(e),y:f}}},23890:function(e,t,r){"use strict";r.d(t,{A:()=>n});function n(e){if(e==null){return window}if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t?t.defaultView||window:window}return e}},80927:function(e,t,r){"use strict";r.d(t,{A:()=>i});/* import */var n=r(23890);function i(e){var t=(0,n/* ["default"] */.A)(e);var r=t.pageXOffset;var i=t.pageYOffset;return{scrollLeft:r,scrollTop:i}}},13076:function(e,t,r){"use strict";r.d(t,{A:()=>o});/* import */var n=r(77727);/* import */var i=r(50583);/* import */var a=r(80927);function o(e){// If <html> has a CSS width greater than the viewport, then this will be
// incorrect for RTL.
// Popper 1 is broken in this case and never had a bug report so let's assume
// it's not an issue. I don't think anyone ever specifies width on <html>
// anyway.
// Browsers where the left scrollbar doesn't cause an issue report `0` for
// this (e.g. Edge 2019, IE11, Safari)
return(0,n/* ["default"] */.A)((0,i/* ["default"] */.A)(e)).left+(0,a/* ["default"] */.A)(e).scrollLeft}},40918:function(e,t,r){"use strict";r.d(t,{Ng:()=>o,sb:()=>a,vq:()=>i});/* import */var n=r(23890);function i(e){var t=(0,n/* ["default"] */.A)(e).Element;return e instanceof t||e instanceof Element}function a(e){var t=(0,n/* ["default"] */.A)(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function o(e){// IE 11 has no ShadowRoot
if(typeof ShadowRoot==="undefined"){return false}var t=(0,n/* ["default"] */.A)(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}},25564:function(e,t,r){"use strict";r.d(t,{A:()=>i});/* import */var n=r(11623);function i(){return!/^((?!chrome|android).)*safari/i.test((0,n/* ["default"] */.A)())}},16077:function(e,t,r){"use strict";r.d(t,{A:()=>i});/* import */var n=r(55520);function i(e){// Firefox wants us to check `-x` and `-y` variations as well
var t=(0,n/* ["default"] */.A)(e),r=t.overflow,i=t.overflowX,a=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+a+i)}},32796:function(e,t,r){"use strict";r.d(t,{A:()=>i});/* import */var n=r(73213);function i(e){return["table","td","th"].indexOf((0,n/* ["default"] */.A)(e))>=0}},93708:function(e,t,r){"use strict";r.d(t,{A:()=>s});/* import */var n=r(31791);/* import */var i=r(45722);/* import */var a=r(23890);/* import */var o=r(16077);/*
given a DOM element, return the list of all scroll parents, up the list of ancesors
until we get to the top window object. This list is what we attach scroll listeners
to, because if any of these parent elements scroll, we'll need to re-calculate the
reference element's position.
*/function s(e,t){var r;if(t===void 0){t=[]}var u=(0,n/* ["default"] */.A)(e);var c=u===((r=e.ownerDocument)==null?void 0:r.body);var l=(0,a/* ["default"] */.A)(u);var d=c?[l].concat(l.visualViewport||[],(0,o/* ["default"] */.A)(u)?u:[]):u;var f=t.concat(d);return c?f:f.concat(s((0,i/* ["default"] */.A)(d)))}},14711:function(e,t,r){"use strict";r.d(t,{DD:()=>m,GM:()=>S,Mn:()=>n,OM:()=>u,Ol:()=>v,R9:()=>f,WY:()=>d,_N:()=>l,ir:()=>h,kb:()=>o,ni:()=>c,pG:()=>a,qZ:()=>s,sQ:()=>i,xf:()=>p});var n="top";var i="bottom";var a="right";var o="left";var s="auto";var u=[n,i,a,o];var c="start";var l="end";var d="clippingParents";var f="viewport";var p="popper";var h="reference";var v=/*#__PURE__*/u.reduce(function(e,t){return e.concat([t+"-"+c,t+"-"+l])},[]);var m=/*#__PURE__*/[].concat(u,[s]).reduce(function(e,t){return e.concat([t,t+"-"+c,t+"-"+l])},[]);// modifiers that need to read the DOM
var g="beforeRead";var b="read";var _="afterRead";// pure-logic modifiers
var y="beforeMain";var w="main";var A="afterMain";// modifier with the purpose to write to the DOM (or write into a framework state)
var x="beforeWrite";var E="write";var O="afterWrite";var S=[g,b,_,y,w,A,x,E,O]},78578:function(e,t,r){"use strict";r.d(t,{A:()=>s});/* import */var n=r(73213);/* import */var i=r(40918);// This modifier takes the styles prepared by the `computeStyles` modifier
// and applies them to the HTMLElements such as popper and arrow
function a(e){var t=e.state;Object.keys(t.elements).forEach(function(e){var r=t.styles[e]||{};var a=t.attributes[e]||{};var o=t.elements[e];// arrow is optional + virtual elements
if(!(0,i/* .isHTMLElement */.sb)(o)||!(0,n/* ["default"] */.A)(o)){return}// Flow doesn't support to extend this property, but it's the most
// effective way to apply styles to an HTMLElement
// $FlowFixMe[cannot-write]
Object.assign(o.style,r);Object.keys(a).forEach(function(e){var t=a[e];if(t===false){o.removeAttribute(e)}else{o.setAttribute(e,t===true?"":t)}})})}function o(e){var t=e.state;var r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(t.elements.popper.style,r.popper);t.styles=r;if(t.elements.arrow){Object.assign(t.elements.arrow.style,r.arrow)}return function(){Object.keys(t.elements).forEach(function(e){var a=t.elements[e];var o=t.attributes[e]||{};var s=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:r[e]);// Set all values to an empty string to unset them
var u=s.reduce(function(e,t){e[t]="";return e},{});// arrow is optional + virtual elements
if(!(0,i/* .isHTMLElement */.sb)(a)||!(0,n/* ["default"] */.A)(a)){return}Object.assign(a.style,u);Object.keys(o).forEach(function(e){a.removeAttribute(e)})})}}// eslint-disable-next-line import/no-unused-modules
/* export default */const s={name:"applyStyles",enabled:true,phase:"write",fn:a,effect:o,requires:["computeStyles"]}},51669:function(e,t,r){"use strict";r.d(t,{A:()=>v});/* import */var n=r(94195);/* import */var i=r(16622);/* import */var a=r(19049);/* import */var o=r(22553);/* import */var s=r(19148);/* import */var u=r(4092);/* import */var c=r(34393);/* import */var l=r(46298);/* import */var d=r(14711);// eslint-disable-next-line import/no-unused-modules
var f=function e(e,t){e=typeof e==="function"?e(Object.assign({},t.rects,{placement:t.placement})):e;return(0,c/* ["default"] */.A)(typeof e!=="number"?e:(0,l/* ["default"] */.A)(e,d/* .basePlacements */.OM))};function p(e){var t;var r=e.state,a=e.name,c=e.options;var l=r.elements.arrow;var p=r.modifiersData.popperOffsets;var h=(0,n/* ["default"] */.A)(r.placement);var v=(0,s/* ["default"] */.A)(h);var m=[d/* .left */.kb,d/* .right */.pG].indexOf(h)>=0;var g=m?"height":"width";if(!l||!p){return}var b=f(c.padding,r);var _=(0,i/* ["default"] */.A)(l);var y=v==="y"?d/* .top */.Mn:d/* .left */.kb;var w=v==="y"?d/* .bottom */.sQ:d/* .right */.pG;var A=r.rects.reference[g]+r.rects.reference[v]-p[v]-r.rects.popper[g];var x=p[v]-r.rects.reference[v];var E=(0,o/* ["default"] */.A)(l);var O=E?v==="y"?E.clientHeight||0:E.clientWidth||0:0;var S=A/2-x/2;// Make sure the arrow doesn't overflow the popper if the center point is
// outside of the popper bounds
var T=b[y];var k=O-_[g]-b[w];var C=O/2-_[g]/2+S;var I=(0,u/* .within */.u)(T,C,k);// Prevents breaking syntax highlighting...
var R=v;r.modifiersData[a]=(t={},t[R]=I,t.centerOffset=I-C,t)}function h(e){var t=e.state,r=e.options;var n=r.element,i=n===void 0?"[data-popper-arrow]":n;if(i==null){return}// CSS selector
if(typeof i==="string"){i=t.elements.popper.querySelector(i);if(!i){return}}if(!(0,a/* ["default"] */.A)(t.elements.popper,i)){return}t.elements.arrow=i}// eslint-disable-next-line import/no-unused-modules
/* export default */const v={name:"arrow",enabled:true,phase:"main",fn:p,effect:h,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]}},27503:function(e,t,r){"use strict";r.d(t,{A:()=>v});/* import */var n=r(14711);/* import */var i=r(22553);/* import */var a=r(23890);/* import */var o=r(50583);/* import */var s=r(55520);/* import */var u=r(94195);/* import */var c=r(38122);/* import */var l=r(27353);// eslint-disable-next-line import/no-unused-modules
var d={top:"auto",right:"auto",bottom:"auto",left:"auto"};// Round the offsets to the nearest suitable subpixel based on the DPR.
// Zooming can change the DPR, but it seems to report a value that will
// cleanly divide the values into the appropriate subpixels.
function f(e,t){var r=e.x,n=e.y;var i=t.devicePixelRatio||1;return{x:(0,l/* .round */.LI)(r*i)/i||0,y:(0,l/* .round */.LI)(n*i)/i||0}}function p(e){var t;var r=e.popper,u=e.popperRect,c=e.placement,l=e.variation,p=e.offsets,h=e.position,v=e.gpuAcceleration,m=e.adaptive,g=e.roundOffsets,b=e.isFixed;var _=p.x,y=_===void 0?0:_,w=p.y,A=w===void 0?0:w;var x=typeof g==="function"?g({x:y,y:A}):{x:y,y:A};y=x.x;A=x.y;var E=p.hasOwnProperty("x");var O=p.hasOwnProperty("y");var S=n/* .left */.kb;var T=n/* .top */.Mn;var k=window;if(m){var C=(0,i/* ["default"] */.A)(r);var I="clientHeight";var R="clientWidth";if(C===(0,a/* ["default"] */.A)(r)){C=(0,o/* ["default"] */.A)(r);if((0,s/* ["default"] */.A)(C).position!=="static"&&h==="absolute"){I="scrollHeight";R="scrollWidth"}}// $FlowFixMe[incompatible-cast]: force type refinement, we compare offsetParent with window above, but Flow doesn't detect it
C=C;if(c===n/* .top */.Mn||(c===n/* .left */.kb||c===n/* .right */.pG)&&l===n/* .end */._N){T=n/* .bottom */.sQ;var D=b&&C===k&&k.visualViewport?k.visualViewport.height:C[I];A-=D-u.height;A*=v?1:-1}if(c===n/* .left */.kb||(c===n/* .top */.Mn||c===n/* .bottom */.sQ)&&l===n/* .end */._N){S=n/* .right */.pG;var P=b&&C===k&&k.visualViewport?k.visualViewport.width:C[R];y-=P-u.width;y*=v?1:-1}}var M=Object.assign({position:h},m&&d);var F=g===true?f({x:y,y:A},(0,a/* ["default"] */.A)(r)):{x:y,y:A};y=F.x;A=F.y;if(v){var Y;return Object.assign({},M,(Y={},Y[T]=O?"0":"",Y[S]=E?"0":"",Y.transform=(k.devicePixelRatio||1)<=1?"translate("+y+"px, "+A+"px)":"translate3d("+y+"px, "+A+"px, 0)",Y))}return Object.assign({},M,(t={},t[T]=O?A+"px":"",t[S]=E?y+"px":"",t.transform="",t))}function h(e){var t=e.state,r=e.options;var n=r.gpuAcceleration,i=n===void 0?true:n,a=r.adaptive,o=a===void 0?true:a,s=r.roundOffsets,l=s===void 0?true:s;var d={placement:(0,u/* ["default"] */.A)(t.placement),variation:(0,c/* ["default"] */.A)(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};if(t.modifiersData.popperOffsets!=null){t.styles.popper=Object.assign({},t.styles.popper,p(Object.assign({},d,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o,roundOffsets:l})))}if(t.modifiersData.arrow!=null){t.styles.arrow=Object.assign({},t.styles.arrow,p(Object.assign({},d,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:false,roundOffsets:l})))}t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}// eslint-disable-next-line import/no-unused-modules
/* export default */const v={name:"computeStyles",enabled:true,phase:"beforeWrite",fn:h,data:{}}},13599:function(e,t,r){"use strict";r.d(t,{A:()=>o});/* import */var n=r(23890);// eslint-disable-next-line import/no-unused-modules
var i={passive:true};function a(e){var t=e.state,r=e.instance,a=e.options;var o=a.scroll,s=o===void 0?true:o,u=a.resize,c=u===void 0?true:u;var l=(0,n/* ["default"] */.A)(t.elements.popper);var d=[].concat(t.scrollParents.reference,t.scrollParents.popper);if(s){d.forEach(function(e){e.addEventListener("scroll",r.update,i)})}if(c){l.addEventListener("resize",r.update,i)}return function(){if(s){d.forEach(function(e){e.removeEventListener("scroll",r.update,i)})}if(c){l.removeEventListener("resize",r.update,i)}}}// eslint-disable-next-line import/no-unused-modules
/* export default */const o={name:"eventListeners",enabled:true,phase:"write",fn:function e(){},effect:a,data:{}}},58101:function(e,t,r){"use strict";r.d(t,{A:()=>f});/* import */var n=r(54171);/* import */var i=r(94195);/* import */var a=r(96494);/* import */var o=r(88326);/* import */var s=r(6182);/* import */var u=r(14711);/* import */var c=r(38122);// eslint-disable-next-line import/no-unused-modules
function l(e){if((0,i/* ["default"] */.A)(e)===u/* .auto */.qZ){return[]}var t=(0,n/* ["default"] */.A)(e);return[(0,a/* ["default"] */.A)(e),t,(0,a/* ["default"] */.A)(t)]}function d(e){var t=e.state,r=e.options,a=e.name;if(t.modifiersData[a]._skip){return}var d=r.mainAxis,f=d===void 0?true:d,p=r.altAxis,h=p===void 0?true:p,v=r.fallbackPlacements,m=r.padding,g=r.boundary,b=r.rootBoundary,_=r.altBoundary,y=r.flipVariations,w=y===void 0?true:y,A=r.allowedAutoPlacements;var x=t.options.placement;var E=(0,i/* ["default"] */.A)(x);var O=E===x;var S=v||(O||!w?[(0,n/* ["default"] */.A)(x)]:l(x));var T=[x].concat(S).reduce(function(e,r){return e.concat((0,i/* ["default"] */.A)(r)===u/* .auto */.qZ?(0,s/* ["default"] */.A)(t,{placement:r,boundary:g,rootBoundary:b,padding:m,flipVariations:w,allowedAutoPlacements:A}):r)},[]);var k=t.rects.reference;var C=t.rects.popper;var I=new Map;var R=true;var D=T[0];for(var P=0;P<T.length;P++){var M=T[P];var F=(0,i/* ["default"] */.A)(M);var Y=(0,c/* ["default"] */.A)(M)===u/* .start */.ni;var L=[u/* .top */.Mn,u/* .bottom */.sQ].indexOf(F)>=0;var N=L?"width":"height";var H=(0,o/* ["default"] */.A)(t,{placement:M,boundary:g,rootBoundary:b,altBoundary:_,padding:m});var j=L?Y?u/* .right */.pG:u/* .left */.kb:Y?u/* .bottom */.sQ:u/* .top */.Mn;if(k[N]>C[N]){j=(0,n/* ["default"] */.A)(j)}var U=(0,n/* ["default"] */.A)(j);var B=[];if(f){B.push(H[F]<=0)}if(h){B.push(H[j]<=0,H[U]<=0)}if(B.every(function(e){return e})){D=M;R=false;break}I.set(M,B)}if(R){// `2` may be desired in some cases – research later
var K=w?3:1;var z=function e(e){var t=T.find(function(t){var r=I.get(t);if(r){return r.slice(0,e).every(function(e){return e})}});if(t){D=t;return"break"}};for(var q=K;q>0;q--){var V=z(q);if(V==="break")break}}if(t.placement!==D){t.modifiersData[a]._skip=true;t.placement=D;t.reset=true}}// eslint-disable-next-line import/no-unused-modules
/* export default */const f={name:"flip",enabled:true,phase:"main",fn:d,requiresIfExists:["offset"],data:{_skip:false}}},87186:function(e,t,r){"use strict";r.d(t,{A:()=>u});/* import */var n=r(14711);/* import */var i=r(88326);function a(e,t,r){if(r===void 0){r={x:0,y:0}}return{top:e.top-t.height-r.y,right:e.right-t.width+r.x,bottom:e.bottom-t.height+r.y,left:e.left-t.width-r.x}}function o(e){return[n/* .top */.Mn,n/* .right */.pG,n/* .bottom */.sQ,n/* .left */.kb].some(function(t){return e[t]>=0})}function s(e){var t=e.state,r=e.name;var n=t.rects.reference;var s=t.rects.popper;var u=t.modifiersData.preventOverflow;var c=(0,i/* ["default"] */.A)(t,{elementContext:"reference"});var l=(0,i/* ["default"] */.A)(t,{altBoundary:true});var d=a(c,n);var f=a(l,s,u);var p=o(d);var h=o(f);t.modifiersData[r]={referenceClippingOffsets:d,popperEscapeOffsets:f,isReferenceHidden:p,hasPopperEscaped:h};t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":p,"data-popper-escaped":h})}// eslint-disable-next-line import/no-unused-modules
/* export default */const u={name:"hide",enabled:true,phase:"main",requiresIfExists:["preventOverflow"],fn:s}},95009:function(e,t,r){"use strict";r.d(t,{A:()=>s});/* import */var n=r(94195);/* import */var i=r(14711);// eslint-disable-next-line import/no-unused-modules
function a(e,t,r){var a=(0,n/* ["default"] */.A)(e);var o=[i/* .left */.kb,i/* .top */.Mn].indexOf(a)>=0?-1:1;var s=typeof r==="function"?r(Object.assign({},t,{placement:e})):r,u=s[0],c=s[1];u=u||0;c=(c||0)*o;return[i/* .left */.kb,i/* .right */.pG].indexOf(a)>=0?{x:c,y:u}:{x:u,y:c}}function o(e){var t=e.state,r=e.options,n=e.name;var o=r.offset,s=o===void 0?[0,0]:o;var u=i/* .placements.reduce */.DD.reduce(function(e,r){e[r]=a(r,t.rects,s);return e},{});var c=u[t.placement],l=c.x,d=c.y;if(t.modifiersData.popperOffsets!=null){t.modifiersData.popperOffsets.x+=l;t.modifiersData.popperOffsets.y+=d}t.modifiersData[n]=u}// eslint-disable-next-line import/no-unused-modules
/* export default */const s={name:"offset",enabled:true,phase:"main",requires:["popperOffsets"],fn:o}},11938:function(e,t,r){"use strict";r.d(t,{A:()=>a});/* import */var n=r(91100);function i(e){var t=e.state,r=e.name;// Offsets are the actual position the popper needs to have to be
// properly positioned near its reference element
// This is the most basic placement, and will be adjusted by
// the modifiers in the next step
t.modifiersData[r]=(0,n/* ["default"] */.A)({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}// eslint-disable-next-line import/no-unused-modules
/* export default */const a={name:"popperOffsets",enabled:true,phase:"read",fn:i,data:{}}},38740:function(e,t,r){"use strict";r.d(t,{A:()=>v});/* import */var n=r(14711);/* import */var i=r(94195);/* import */var a=r(19148);/* import */var o=r(62613);/* import */var s=r(4092);/* import */var u=r(16622);/* import */var c=r(22553);/* import */var l=r(88326);/* import */var d=r(38122);/* import */var f=r(68263);/* import */var p=r(27353);function h(e){var t=e.state,r=e.options,h=e.name;var v=r.mainAxis,m=v===void 0?true:v,g=r.altAxis,b=g===void 0?false:g,_=r.boundary,y=r.rootBoundary,w=r.altBoundary,A=r.padding,x=r.tether,E=x===void 0?true:x,O=r.tetherOffset,S=O===void 0?0:O;var T=(0,l/* ["default"] */.A)(t,{boundary:_,rootBoundary:y,padding:A,altBoundary:w});var k=(0,i/* ["default"] */.A)(t.placement);var C=(0,d/* ["default"] */.A)(t.placement);var I=!C;var R=(0,a/* ["default"] */.A)(k);var D=(0,o/* ["default"] */.A)(R);var P=t.modifiersData.popperOffsets;var M=t.rects.reference;var F=t.rects.popper;var Y=typeof S==="function"?S(Object.assign({},t.rects,{placement:t.placement})):S;var L=typeof Y==="number"?{mainAxis:Y,altAxis:Y}:Object.assign({mainAxis:0,altAxis:0},Y);var N=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null;var H={x:0,y:0};if(!P){return}if(m){var j;var U=R==="y"?n/* .top */.Mn:n/* .left */.kb;var B=R==="y"?n/* .bottom */.sQ:n/* .right */.pG;var K=R==="y"?"height":"width";var z=P[R];var q=z+T[U];var V=z-T[B];var W=E?-F[K]/2:0;var G=C===n/* .start */.ni?M[K]:F[K];var $=C===n/* .start */.ni?-F[K]:-M[K];// We need to include the arrow in the calculation so the arrow doesn't go
// outside the reference bounds
var Q=t.elements.arrow;var X=E&&Q?(0,u/* ["default"] */.A)(Q):{width:0,height:0};var J=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:(0,f/* ["default"] */.A)();var Z=J[U];var ee=J[B];// If the reference length is smaller than the arrow length, we don't want
// to include its full size in the calculation. If the reference is small
// and near the edge of a boundary, the popper can overflow even if the
// reference is not overflowing as well (e.g. virtual elements with no
// width or height)
var et=(0,s/* .within */.u)(0,M[K],X[K]);var er=I?M[K]/2-W-et-Z-L.mainAxis:G-et-Z-L.mainAxis;var en=I?-M[K]/2+W+et+ee+L.mainAxis:$+et+ee+L.mainAxis;var ei=t.elements.arrow&&(0,c/* ["default"] */.A)(t.elements.arrow);var ea=ei?R==="y"?ei.clientTop||0:ei.clientLeft||0:0;var eo=(j=N==null?void 0:N[R])!=null?j:0;var es=z+er-eo-ea;var eu=z+en-eo;var ec=(0,s/* .within */.u)(E?(0,p/* .min */.jk)(q,es):q,z,E?(0,p/* .max */.T9)(V,eu):V);P[R]=ec;H[R]=ec-z}if(b){var el;var ed=R==="x"?n/* .top */.Mn:n/* .left */.kb;var ef=R==="x"?n/* .bottom */.sQ:n/* .right */.pG;var ep=P[D];var eh=D==="y"?"height":"width";var ev=ep+T[ed];var em=ep-T[ef];var eg=[n/* .top */.Mn,n/* .left */.kb].indexOf(k)!==-1;var eb=(el=N==null?void 0:N[D])!=null?el:0;var e_=eg?ev:ep-M[eh]-F[eh]-eb+L.altAxis;var ey=eg?ep+M[eh]+F[eh]-eb-L.altAxis:em;var ew=E&&eg?(0,s/* .withinMaxClamp */.P)(e_,ep,ey):(0,s/* .within */.u)(E?e_:ev,ep,E?ey:em);P[D]=ew;H[D]=ew-ep}t.modifiersData[h]=H}// eslint-disable-next-line import/no-unused-modules
/* export default */const v={name:"preventOverflow",enabled:true,phase:"main",fn:h,requiresIfExists:["offset"]}},3439:function(e,t,r){"use strict";r.d(t,{n:()=>h});/* import */var n=r(24323);/* import */var i=r(13599);/* import */var a=r(11938);/* import */var o=r(27503);/* import */var s=r(78578);/* import */var u=r(95009);/* import */var c=r(58101);/* import */var l=r(38740);/* import */var d=r(51669);/* import */var f=r(87186);var p=[i/* ["default"] */.A,a/* ["default"] */.A,o/* ["default"] */.A,s/* ["default"] */.A,u/* ["default"] */.A,c/* ["default"] */.A,l/* ["default"] */.A,d/* ["default"] */.A,f/* ["default"] */.A];var h=/*#__PURE__*/(0,n/* .popperGenerator */.U)({defaultModifiers:p});// eslint-disable-next-line import/no-unused-modules
// eslint-disable-next-line import/no-unused-modules
// eslint-disable-next-line import/no-unused-modules
},6182:function(e,t,r){"use strict";r.d(t,{A:()=>s});/* import */var n=r(38122);/* import */var i=r(14711);/* import */var a=r(88326);/* import */var o=r(94195);function s(e,t){if(t===void 0){t={}}var r=t,s=r.placement,u=r.boundary,c=r.rootBoundary,l=r.padding,d=r.flipVariations,f=r.allowedAutoPlacements,p=f===void 0?i/* .placements */.DD:f;var h=(0,n/* ["default"] */.A)(s);var v=h?d?i/* .variationPlacements */.Ol:i/* .variationPlacements.filter */.Ol.filter(function(e){return(0,n/* ["default"] */.A)(e)===h}):i/* .basePlacements */.OM;var m=v.filter(function(e){return p.indexOf(e)>=0});if(m.length===0){m=v}// $FlowFixMe[incompatible-type]: Flow seems to have problems with two array unions...
var g=m.reduce(function(t,r){t[r]=(0,a/* ["default"] */.A)(e,{placement:r,boundary:u,rootBoundary:c,padding:l})[(0,o/* ["default"] */.A)(r)];return t},{});return Object.keys(g).sort(function(e,t){return g[e]-g[t]})}},91100:function(e,t,r){"use strict";r.d(t,{A:()=>s});/* import */var n=r(94195);/* import */var i=r(38122);/* import */var a=r(19148);/* import */var o=r(14711);function s(e){var t=e.reference,r=e.element,s=e.placement;var u=s?(0,n/* ["default"] */.A)(s):null;var c=s?(0,i/* ["default"] */.A)(s):null;var l=t.x+t.width/2-r.width/2;var d=t.y+t.height/2-r.height/2;var f;switch(u){case o/* .top */.Mn:f={x:l,y:t.y-r.height};break;case o/* .bottom */.sQ:f={x:l,y:t.y+t.height};break;case o/* .right */.pG:f={x:t.x+t.width,y:d};break;case o/* .left */.kb:f={x:t.x-r.width,y:d};break;default:f={x:t.x,y:t.y}}var p=u?(0,a/* ["default"] */.A)(u):null;if(p!=null){var h=p==="y"?"height":"width";switch(c){case o/* .start */.ni:f[p]=f[p]-(t[h]/2-r[h]/2);break;case o/* .end */._N:f[p]=f[p]+(t[h]/2-r[h]/2);break;default:}}return f}},20456:function(e,t,r){"use strict";r.d(t,{A:()=>n});function n(e){var t;return function(){if(!t){t=new Promise(function(r){Promise.resolve().then(function(){t=undefined;r(e())})})}return t}}},88326:function(e,t,r){"use strict";r.d(t,{A:()=>f});/* import */var n=r(96846);/* import */var i=r(50583);/* import */var a=r(77727);/* import */var o=r(91100);/* import */var s=r(93989);/* import */var u=r(14711);/* import */var c=r(40918);/* import */var l=r(34393);/* import */var d=r(46298);// eslint-disable-next-line import/no-unused-modules
function f(e,t){if(t===void 0){t={}}var r=t,f=r.placement,p=f===void 0?e.placement:f,h=r.strategy,v=h===void 0?e.strategy:h,m=r.boundary,g=m===void 0?u/* .clippingParents */.WY:m,b=r.rootBoundary,_=b===void 0?u/* .viewport */.R9:b,y=r.elementContext,w=y===void 0?u/* .popper */.xf:y,A=r.altBoundary,x=A===void 0?false:A,E=r.padding,O=E===void 0?0:E;var S=(0,l/* ["default"] */.A)(typeof O!=="number"?O:(0,d/* ["default"] */.A)(O,u/* .basePlacements */.OM));var T=w===u/* .popper */.xf?u/* .reference */.ir:u/* .popper */.xf;var k=e.rects.popper;var C=e.elements[x?T:w];var I=(0,n/* ["default"] */.A)((0,c/* .isElement */.vq)(C)?C:C.contextElement||(0,i/* ["default"] */.A)(e.elements.popper),g,_,v);var R=(0,a/* ["default"] */.A)(e.elements.reference);var D=(0,o/* ["default"] */.A)({reference:R,element:k,strategy:"absolute",placement:p});var P=(0,s/* ["default"] */.A)(Object.assign({},k,D));var M=w===u/* .popper */.xf?P:R;// positive = overflowing the clipping rect
// 0 or negative = within the clipping rect
var F={top:I.top-M.top+S.top,bottom:M.bottom-I.bottom+S.bottom,left:I.left-M.left+S.left,right:M.right-I.right+S.right};var Y=e.modifiersData.offset;// Offsets can be applied only to the popper element
if(w===u/* .popper */.xf&&Y){var L=Y[p];Object.keys(F).forEach(function(e){var t=[u/* .right */.pG,u/* .bottom */.sQ].indexOf(e)>=0?1:-1;var r=[u/* .top */.Mn,u/* .bottom */.sQ].indexOf(e)>=0?"y":"x";F[e]+=L[r]*t})}return F}},46298:function(e,t,r){"use strict";r.d(t,{A:()=>n});function n(e,t){return t.reduce(function(t,r){t[r]=e;return t},{})}},62613:function(e,t,r){"use strict";r.d(t,{A:()=>n});function n(e){return e==="x"?"y":"x"}},94195:function(e,t,r){"use strict";r.d(t,{A:()=>n});function n(e){return e.split("-")[0]}},68263:function(e,t,r){"use strict";r.d(t,{A:()=>n});function n(){return{top:0,right:0,bottom:0,left:0}}},19148:function(e,t,r){"use strict";r.d(t,{A:()=>n});function n(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}},54171:function(e,t,r){"use strict";r.d(t,{A:()=>i});var n={left:"right",right:"left",bottom:"top",top:"bottom"};function i(e){return e.replace(/left|right|bottom|top/g,function(e){return n[e]})}},96494:function(e,t,r){"use strict";r.d(t,{A:()=>i});var n={start:"end",end:"start"};function i(e){return e.replace(/start|end/g,function(e){return n[e]})}},38122:function(e,t,r){"use strict";r.d(t,{A:()=>n});function n(e){return e.split("-")[1]}},27353:function(e,t,r){"use strict";r.d(t,{LI:()=>a,T9:()=>n,jk:()=>i});var n=Math.max;var i=Math.min;var a=Math.round},25781:function(e,t,r){"use strict";r.d(t,{A:()=>n});function n(e){var t=e.reduce(function(e,t){var r=e[t.name];e[t.name]=r?Object.assign({},r,t,{options:Object.assign({},r.options,t.options),data:Object.assign({},r.data,t.data)}):t;return e},{});// IE11 does not support Object.values
return Object.keys(t).map(function(e){return t[e]})}},34393:function(e,t,r){"use strict";r.d(t,{A:()=>i});/* import */var n=r(68263);function i(e){return Object.assign({},(0,n/* ["default"] */.A)(),e)}},52289:function(e,t,r){"use strict";r.d(t,{A:()=>a});/* import */var n=r(14711);// source: https://stackoverflow.com/questions/49875255
function i(e){var t=new Map;var r=new Set;var n=[];e.forEach(function(e){t.set(e.name,e)});// On visiting object, check for its dependencies and visit them recursively
function i(e){r.add(e.name);var a=[].concat(e.requires||[],e.requiresIfExists||[]);a.forEach(function(e){if(!r.has(e)){var n=t.get(e);if(n){i(n)}}});n.push(e)}e.forEach(function(e){if(!r.has(e.name)){// check for visited object
i(e)}});return n}function a(e){// order based on dependencies
var t=i(e);// order based on phase
return n/* .modifierPhases.reduce */.GM.reduce(function(e,r){return e.concat(t.filter(function(e){return e.phase===r}))},[])}},93989:function(e,t,r){"use strict";r.d(t,{A:()=>n});function n(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}},11623:function(e,t,r){"use strict";r.d(t,{A:()=>n});function n(){var e=navigator.userAgentData;if(e!=null&&e.brands&&Array.isArray(e.brands)){return e.brands.map(function(e){return e.brand+"/"+e.version}).join(" ")}return navigator.userAgent}},4092:function(e,t,r){"use strict";r.d(t,{P:()=>a,u:()=>i});/* import */var n=r(27353);function i(e,t,r){return(0,n/* .max */.T9)(e,(0,n/* .min */.jk)(t,r))}function a(e,t,r){var n=i(e,t,r);return n>r?r:n}},98988:function(e,t,r){"use strict";r.d(t,{Gh:()=>$,HS:()=>X,Oi:()=>c,Rr:()=>v,TM:()=>u,pX:()=>ep,pb:()=>U,rc:()=>i,tH:()=>ei,ue:()=>w,yD:()=>G});/**
 * @remix-run/router v1.23.1
 *
 * Copyright (c) Remix Software Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE.md file in the root directory of this source tree.
 *
 * @license MIT
 */function n(){n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r){if(Object.prototype.hasOwnProperty.call(r,n)){e[n]=r[n]}}}return e};return n.apply(this,arguments)}////////////////////////////////////////////////////////////////////////////////
//#region Types and Constants
////////////////////////////////////////////////////////////////////////////////
/**
 * Actions represent the type of change to a location value.
 */var i;(function(e){/**
   * A POP indicates a change to an arbitrary index in the history stack, such
   * as a back or forward navigation. It does not describe the direction of the
   * navigation, only that the current index changed.
   *
   * Note: This is the default action for newly created history objects.
   */e["Pop"]="POP";/**
   * A PUSH indicates a new entry being added to the history stack, such as when
   * a link is clicked and a new page loads. When this happens, all subsequent
   * entries in the stack are lost.
   */e["Push"]="PUSH";/**
   * A REPLACE indicates the entry at the current index in the history stack
   * being replaced by a new one.
   */e["Replace"]="REPLACE"})(i||(i={}));const a="popstate";/**
 * Memory history stores the current location in memory. It is designed for use
 * in stateful non-browser environments like tests and React Native.
 */function o(e){if(e===void 0){e={}}let{initialEntries:t=["/"],initialIndex:r,v5Compat:n=false}=e;let a;// Declare so we can access from createMemoryLocation
a=t.map((e,t)=>f(e,typeof e==="string"?null:e.state,t===0?"default":undefined));let o=c(r==null?a.length-1:r);let s=i.Pop;let u=null;function c(e){return Math.min(Math.max(e,0),a.length-1)}function d(){return a[o]}function f(e,t,r){if(t===void 0){t=null}let n=p(a?d().pathname:"/",e,t,r);l(n.pathname.charAt(0)==="/","relative pathnames are not supported in memory history: "+JSON.stringify(e));return n}function m(e){return typeof e==="string"?e:h(e)}let g={get index(){return o},get action(){return s},get location(){return d()},createHref:m,createURL(e){return new URL(m(e),"http://localhost")},encodeLocation(e){let t=typeof e==="string"?v(e):e;return{pathname:t.pathname||"",search:t.search||"",hash:t.hash||""}},push(e,t){s=i.Push;let r=f(e,t);o+=1;a.splice(o,a.length,r);if(n&&u){u({action:s,location:r,delta:1})}},replace(e,t){s=i.Replace;let r=f(e,t);a[o]=r;if(n&&u){u({action:s,location:r,delta:0})}},go(e){s=i.Pop;let t=c(o+e);let r=a[t];o=t;if(u){u({action:s,location:r,delta:e})}},listen(e){u=e;return()=>{u=null}}};return g}/**
 * Browser history stores the location in regular URLs. This is the standard for
 * most web apps, but it requires some configuration on the server to ensure you
 * serve the same app at multiple URLs.
 *
 * @see https://github.com/remix-run/history/tree/main/docs/api-reference.md#createbrowserhistory
 */function s(e){if(e===void 0){e={}}function t(e,t){let{pathname:r,search:n,hash:i}=e.location;return p("",{pathname:r,search:n,hash:i},// state defaults to `null` because `window.history.state` does
t.state&&t.state.usr||null,t.state&&t.state.key||"default")}function r(e,t){return typeof t==="string"?t:h(t)}return m(t,r,null,e)}/**
 * Hash history stores the location in window.location.hash. This makes it ideal
 * for situations where you don't want to send the location to the server for
 * some reason, either because you do cannot configure it or the URL space is
 * reserved for something else.
 *
 * @see https://github.com/remix-run/history/tree/main/docs/api-reference.md#createhashhistory
 */function u(e){if(e===void 0){e={}}function t(e,t){let{pathname:r="/",search:n="",hash:i=""}=v(e.location.hash.substr(1));// Hash URL should always have a leading / just like window.location.pathname
// does, so if an app ends up at a route like /#something then we add a
// leading slash so all of our path-matching behaves the same as if it would
// in a browser router.  This is particularly important when there exists a
// root splat route (<Route path="*">) since that matches internally against
// "/*" and we'd expect /#something to 404 in a hash router app.
if(!r.startsWith("/")&&!r.startsWith(".")){r="/"+r}return p("",{pathname:r,search:n,hash:i},// state defaults to `null` because `window.history.state` does
t.state&&t.state.usr||null,t.state&&t.state.key||"default")}function r(e,t){let r=e.document.querySelector("base");let n="";if(r&&r.getAttribute("href")){let t=e.location.href;let r=t.indexOf("#");n=r===-1?t:t.slice(0,r)}return n+"#"+(typeof t==="string"?t:h(t))}function n(e,t){l(e.pathname.charAt(0)==="/","relative pathnames are not supported in hash history.push("+JSON.stringify(t)+")")}return m(t,r,n,e)}function c(e,t){if(e===false||e===null||typeof e==="undefined"){throw new Error(t)}}function l(e,t){if(!e){// eslint-disable-next-line no-console
if(typeof console!=="undefined")console.warn(t);try{// Welcome to debugging history!
//
// This error is thrown as a convenience, so you can more easily
// find the source for a warning that appears in the console by
// enabling "pause on exceptions" in your JavaScript debugger.
throw new Error(t);// eslint-disable-next-line no-empty
}catch(e){}}}function d(){return Math.random().toString(36).substr(2,8)}/**
 * For browser-based histories, we combine the state and key into an object
 */function f(e,t){return{usr:e.state,key:e.key,idx:t}}/**
 * Creates a Location object with a unique key from the given Path
 */function p(e,t,r,i){if(r===void 0){r=null}let a=n({pathname:typeof e==="string"?e:e.pathname,search:"",hash:""},typeof t==="string"?v(t):t,{state:r,// TODO: This could be cleaned up.  push/replace should probably just take
// full Locations now and avoid the need to run through this flow at all
// But that's a pretty big refactor to the current test suite so going to
// keep as is for the time being and just let any incoming keys take precedence
key:t&&t.key||i||d()});return a}/**
 * Creates a string URL path from the given pathname, search, and hash components.
 */function h(e){let{pathname:t="/",search:r="",hash:n=""}=e;if(r&&r!=="?")t+=r.charAt(0)==="?"?r:"?"+r;if(n&&n!=="#")t+=n.charAt(0)==="#"?n:"#"+n;return t}/**
 * Parses a string URL path into its separate pathname, search, and hash components.
 */function v(e){let t={};if(e){let r=e.indexOf("#");if(r>=0){t.hash=e.substr(r);e=e.substr(0,r)}let n=e.indexOf("?");if(n>=0){t.search=e.substr(n);e=e.substr(0,n)}if(e){t.pathname=e}}return t}function m(e,t,r,o){if(o===void 0){o={}}let{window:s=document.defaultView,v5Compat:u=false}=o;let l=s.history;let d=i.Pop;let v=null;let m=g();// Index should only be null when we initialize. If not, it's because the
// user called history.pushState or history.replaceState directly, in which
// case we should log a warning as it will result in bugs.
if(m==null){m=0;l.replaceState(n({},l.state,{idx:m}),"")}function g(){let e=l.state||{idx:null};return e.idx}function b(){d=i.Pop;let e=g();let t=e==null?null:e-m;m=e;if(v){v({action:d,location:A.location,delta:t})}}function _(e,t){d=i.Push;let n=p(A.location,e,t);if(r)r(n,e);m=g()+1;let a=f(n,m);let o=A.createHref(n);// try...catch because iOS limits us to 100 pushState calls :/
try{l.pushState(a,"",o)}catch(e){// If the exception is because `state` can't be serialized, let that throw
// outwards just like a replace call would so the dev knows the cause
// https://html.spec.whatwg.org/multipage/nav-history-apis.html#shared-history-push/replace-state-steps
// https://html.spec.whatwg.org/multipage/structured-data.html#structuredserializeinternal
if(e instanceof DOMException&&e.name==="DataCloneError"){throw e}// They are going to lose state here, but there is no real
// way to warn them about it since the page will refresh...
s.location.assign(o)}if(u&&v){v({action:d,location:A.location,delta:1})}}function y(e,t){d=i.Replace;let n=p(A.location,e,t);if(r)r(n,e);m=g();let a=f(n,m);let o=A.createHref(n);l.replaceState(a,"",o);if(u&&v){v({action:d,location:A.location,delta:0})}}function w(e){// window.location.origin is "null" (the literal string value) in Firefox
// under certain conditions, notably when serving from a local HTML file
// See https://bugzilla.mozilla.org/show_bug.cgi?id=878297
let t=s.location.origin!=="null"?s.location.origin:s.location.href;let r=typeof e==="string"?e:h(e);// Treating this as a full URL will strip any trailing spaces so we need to
// pre-encode them since they might be part of a matching splat param from
// an ancestor route
r=r.replace(/ $/,"%20");c(t,"No window.location.(origin|href) available to create URL for href: "+r);return new URL(r,t)}let A={get action(){return d},get location(){return e(s,l)},listen(e){if(v){throw new Error("A history only accepts one active listener")}s.addEventListener(a,b);v=e;return()=>{s.removeEventListener(a,b);v=null}},createHref(e){return t(s,e)},createURL:w,encodeLocation(e){// Encode a Location the same way window.location would
let t=w(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:_,replace:y,go(e){return l.go(e)}};return A}//#endregion
var g;(function(e){e["data"]="data";e["deferred"]="deferred";e["redirect"]="redirect";e["error"]="error"})(g||(g={}));const b=new Set(["lazy","caseSensitive","path","id","index","children"]);function _(e){return e.index===true}// Walk the route tree generating unique IDs where necessary, so we are working
// solely with AgnosticDataRouteObject's within the Router
function y(e,t,r,i){if(r===void 0){r=[]}if(i===void 0){i={}}return e.map((e,a)=>{let o=[...r,String(a)];let s=typeof e.id==="string"?e.id:o.join("-");c(e.index!==true||!e.children,"Cannot specify children on an index route");c(!i[s],'Found a route id collision on id "'+s+'".  Route '+"id's must be globally unique within Data Router usages");if(_(e)){let r=n({},e,t(e),{id:s});i[s]=r;return r}else{let r=n({},e,t(e),{id:s,children:undefined});i[s]=r;if(e.children){r.children=y(e.children,t,o,i)}return r}})}/**
 * Matches the given routes to a location and returns the match data.
 *
 * @see https://reactrouter.com/v6/utils/match-routes
 */function w(e,t,r){if(r===void 0){r="/"}return A(e,t,r,false)}function A(e,t,r,n){let i=typeof t==="string"?v(t):t;let a=U(i.pathname||"/",r);if(a==null){return null}let o=E(e);S(o);let s=null;for(let e=0;s==null&&e<o.length;++e){// Incoming pathnames are generally encoded from either window.location
// or from router.navigate, but we want to match against the unencoded
// paths in the route definitions.  Memory router locations won't be
// encoded here but there also shouldn't be anything to decode so this
// should be a safe operation.  This avoids needing matchRoutes to be
// history-aware.
let t=j(a);s=Y(o[e],t,n)}return s}function x(e,t){let{route:r,pathname:n,params:i}=e;return{id:r.id,pathname:n,params:i,data:t[r.id],handle:r.handle}}function E(e,t,r,n){if(t===void 0){t=[]}if(r===void 0){r=[]}if(n===void 0){n=""}let i=(e,i,a)=>{let o={relativePath:a===undefined?e.path||"":a,caseSensitive:e.caseSensitive===true,childrenIndex:i,route:e};if(o.relativePath.startsWith("/")){c(o.relativePath.startsWith(n),'Absolute route path "'+o.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes.");o.relativePath=o.relativePath.slice(n.length)}let s=X([n,o.relativePath]);let u=r.concat(o);// Add the children before adding this route to the array, so we traverse the
// route tree depth-first and child routes appear before their parents in
// the "flattened" version.
if(e.children&&e.children.length>0){c(// Our types know better, but runtime JS may not!
// @ts-expect-error
e.index!==true,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+s+'".'));E(e.children,t,u,s)}// Routes without a path shouldn't ever match by themselves unless they are
// index routes, so don't add them to the list of possible branches.
if(e.path==null&&!e.index){return}t.push({path:s,score:M(s,e.index),routesMeta:u})};e.forEach((e,t)=>{var r;// coarse-grain check for optional params
if(e.path===""||!((r=e.path)!=null&&r.includes("?"))){i(e,t)}else{for(let r of O(e.path)){i(e,t,r)}}});return t}/**
 * Computes all combinations of optional path segments for a given path,
 * excluding combinations that are ambiguous and of lower priority.
 *
 * For example, `/one/:two?/three/:four?/:five?` explodes to:
 * - `/one/three`
 * - `/one/:two/three`
 * - `/one/three/:four`
 * - `/one/three/:five`
 * - `/one/:two/three/:four`
 * - `/one/:two/three/:five`
 * - `/one/three/:four/:five`
 * - `/one/:two/three/:four/:five`
 */function O(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t;// Optional path segments are denoted by a trailing `?`
let i=r.endsWith("?");// Compute the corresponding required segment: `foo?` -> `foo`
let a=r.replace(/\?$/,"");if(n.length===0){// Intepret empty string as omitting an optional segment
// `["one", "", "three"]` corresponds to omitting `:two` from `/one/:two?/three` -> `/one/three`
return i?[a,""]:[a]}let o=O(n.join("/"));let s=[];// All child paths with the prefix.  Do this for all children before the
// optional version for all children, so we get consistent ordering where the
// parent optional aspect is preferred as required.  Otherwise, we can get
// child sections interspersed where deeper optional segments are higher than
// parent optional segments, where for example, /:two would explode _earlier_
// then /:one.  By always including the parent as required _for all children_
// first, we avoid this issue
s.push(...o.map(e=>e===""?a:[a,e].join("/")));// Then, if this is an optional value, add all child versions without
if(i){s.push(...o)}// for absolute paths, ensure `/` instead of empty segment
return s.map(t=>e.startsWith("/")&&t===""?"/":t)}function S(e){e.sort((e,t)=>e.score!==t.score?t.score-e.score// Higher score first
    :F(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)))}const T=/^:[\w-]+$/;const k=3;const C=2;const I=1;const R=10;const D=-2;const P=e=>e==="*";function M(e,t){let r=e.split("/");let n=r.length;if(r.some(P)){n+=D}if(t){n+=C}return r.filter(e=>!P(e)).reduce((e,t)=>e+(T.test(t)?k:t===""?I:R),n)}function F(e,t){let r=e.length===t.length&&e.slice(0,-1).every((e,r)=>e===t[r]);return r?// If two routes are siblings, we should try to match the earlier sibling
// first. This allows people to have fine-grained control over the matching
// behavior by simply putting routes with identical paths in the order they
// want them tried.
e[e.length-1]-t[t.length-1]:// Otherwise, it doesn't really make sense to rank non-siblings by index,
// so they sort equally.
0}function Y(e,t,r){if(r===void 0){r=false}let{routesMeta:n}=e;let i={};let a="/";let o=[];for(let e=0;e<n.length;++e){let s=n[e];let u=e===n.length-1;let c=a==="/"?t:t.slice(a.length)||"/";let l=N({path:s.relativePath,caseSensitive:s.caseSensitive,end:u},c);let d=s.route;if(!l&&u&&r&&!n[n.length-1].route.index){l=N({path:s.relativePath,caseSensitive:s.caseSensitive,end:false},c)}if(!l){return null}Object.assign(i,l.params);o.push({// TODO: Can this as be avoided?
params:i,pathname:X([a,l.pathname]),pathnameBase:J(X([a,l.pathnameBase])),route:d});if(l.pathnameBase!=="/"){a=X([a,l.pathnameBase])}}return o}/**
 * Returns a path with params interpolated.
 *
 * @see https://reactrouter.com/v6/utils/generate-path
 */function L(e,t){if(t===void 0){t={}}let r=e;if(r.endsWith("*")&&r!=="*"&&!r.endsWith("/*")){l(false,'Route path "'+r+'" will be treated as if it were '+('"'+r.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+r.replace(/\*$/,"/*")+'".'));r=r.replace(/\*$/,"/*")}// ensure `/` is added at the beginning if the path is absolute
const n=r.startsWith("/")?"/":"";const i=e=>e==null?"":typeof e==="string"?e:String(e);const a=r.split(/\/+/).map((e,r,n)=>{const a=r===n.length-1;// only apply the splat if it's the last segment
if(a&&e==="*"){const e="*";// Apply the splat
return i(t[e])}const o=e.match(/^:([\w-]+)(\??)$/);if(o){const[,e,r]=o;let n=t[e];c(r==="?"||n!=null,'Missing ":'+e+'" param');return i(n)}// Remove any optional markers from optional static segments
return e.replace(/\?$/g,"")})// Remove empty segments
.filter(e=>!!e);return n+a.join("/")}/**
 * Performs pattern matching on a URL pathname and returns information about
 * the match.
 *
 * @see https://reactrouter.com/v6/utils/match-path
 */function N(e,t){if(typeof e==="string"){e={path:e,caseSensitive:false,end:true}}let[r,n]=H(e.path,e.caseSensitive,e.end);let i=t.match(r);if(!i)return null;let a=i[0];let o=a.replace(/(.)\/+$/,"$1");let s=i.slice(1);let u=n.reduce((e,t,r)=>{let{paramName:n,isOptional:i}=t;// We need to compute the pathnameBase here using the raw splat value
// instead of using params["*"] later because it will be decoded then
if(n==="*"){let e=s[r]||"";o=a.slice(0,a.length-e.length).replace(/(.)\/+$/,"$1")}const u=s[r];if(i&&!u){e[n]=undefined}else{e[n]=(u||"").replace(/%2F/g,"/")}return e},{});return{params:u,pathname:a,pathnameBase:o,pattern:e}}function H(e,t,r){if(t===void 0){t=false}if(r===void 0){r=true}l(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let n=[];let i="^"+e.replace(/\/*\*?$/,"")// Ignore trailing / and /*, we'll handle it below
.replace(/^\/*/,"/")// Make sure it has a leading /
.replace(/[\\.*+^${}|()[\]]/g,"\\$&")// Escape special regex chars
.replace(/\/:([\w-]+)(\?)?/g,(e,t,r)=>{n.push({paramName:t,isOptional:r!=null});return r?"/?([^\\/]+)?":"/([^\\/]+)"});if(e.endsWith("*")){n.push({paramName:"*"});i+=e==="*"||e==="/*"?"(.*)$"// Already matched the initial /, just match the rest
:"(?:\\/(.+)|\\/*)$";// Don't include the / in params["*"]
}else if(r){// When matching to the end, ignore trailing slashes
i+="\\/*$"}else if(e!==""&&e!=="/"){// If our path is non-empty and contains anything beyond an initial slash,
// then we have _some_ form of path in our regex, so we should expect to
// match only if we find the end of this path segment.  Look for an optional
// non-captured trailing slash (to match a portion of the URL) or the end
// of the path (if we've matched to the end).  We used to do this with a
// word boundary but that gives false positives on routes like
// /user-preferences since `-` counts as a word boundary.
i+="(?:(?=\\/|$))"}else;let a=new RegExp(i,t?undefined:"i");return[a,n]}function j(e){try{return e.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(t){l(false,'The URL path "'+e+'" could not be decoded because it is is a '+"malformed URL segment. This is probably due to a bad percent "+("encoding ("+t+")."));return e}}/**
 * @private
 */function U(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase())){return null}// We want to leave trailing slash behavior in the user's control, so if they
// specify a basename with a trailing slash, we should support it
let r=t.endsWith("/")?t.length-1:t.length;let n=e.charAt(r);if(n&&n!=="/"){// pathname does not start with basename/
return null}return e.slice(r)||"/"}const B=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;const K=e=>B.test(e);/**
 * Returns a resolved path object relative to the given pathname.
 *
 * @see https://reactrouter.com/v6/utils/resolve-path
 */function z(e,t){if(t===void 0){t="/"}let{pathname:r,search:n="",hash:i=""}=typeof e==="string"?v(e):e;let a;if(r){if(K(r)){a=r}else{if(r.includes("//")){let e=r;r=r.replace(/\/\/+/g,"/");l(false,"Pathnames cannot have embedded double slashes - normalizing "+(e+" -> "+r))}if(r.startsWith("/")){a=q(r.substring(1),"/")}else{a=q(r,t)}}}else{a=t}return{pathname:a,search:Z(n),hash:ee(i)}}function q(e,t){let r=t.replace(/\/+$/,"").split("/");let n=e.split("/");n.forEach(e=>{if(e===".."){// Keep the root "" segment so the pathname starts at /
if(r.length>1)r.pop()}else if(e!=="."){r.push(e)}});return r.length>1?r.join("/"):"/"}function V(e,t,r,n){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(n)+"].  Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}/**
 * @private
 *
 * When processing relative navigation we want to ignore ancestor routes that
 * do not contribute to the path, such that index/pathless layout routes don't
 * interfere.
 *
 * For example, when moving a route element into an index route and/or a
 * pathless layout route, relative link behavior contained within should stay
 * the same.  Both of the following examples should link back to the root:
 *
 *   <Route path="/">
 *     <Route path="accounts" element={<Link to=".."}>
 *   </Route>
 *
 *   <Route path="/">
 *     <Route path="accounts">
 *       <Route element={<AccountsLayout />}>       // <-- Does not contribute
 *         <Route index element={<Link to=".."} />  // <-- Does not contribute
 *       </Route
 *     </Route>
 *   </Route>
 */function W(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}// Return the array of pathnames for the current route matches - used to
// generate the routePathnames input for resolveTo()
function G(e,t){let r=W(e);// When v7_relativeSplatPath is enabled, use the full pathname for the leaf
// match so we include splat values for "." links.  See:
// https://github.com/remix-run/react-router/issues/11052#issuecomment-1836589329
if(t){return r.map((e,t)=>t===r.length-1?e.pathname:e.pathnameBase)}return r.map(e=>e.pathnameBase)}/**
 * @private
 */function $(e,t,r,i){if(i===void 0){i=false}let a;if(typeof e==="string"){a=v(e)}else{a=n({},e);c(!a.pathname||!a.pathname.includes("?"),V("?","pathname","search",a));c(!a.pathname||!a.pathname.includes("#"),V("#","pathname","hash",a));c(!a.search||!a.search.includes("#"),V("#","search","hash",a))}let o=e===""||a.pathname==="";let s=o?"/":a.pathname;let u;// Routing is relative to the current pathname if explicitly requested.
//
// If a pathname is explicitly provided in `to`, it should be relative to the
// route context. This is explained in `Note on `<Link to>` values` in our
// migration guide from v5 as a means of disambiguation between `to` values
// that begin with `/` and those that do not. However, this is problematic for
// `to` values that do not provide a pathname. `to` can simply be a search or
// hash string, in which case we should assume that the navigation is relative
// to the current location's pathname and *not* the route pathname.
if(s==null){u=r}else{let e=t.length-1;// With relative="route" (the default), each leading .. segment means
// "go up one route" instead of "go up one URL segment".  This is a key
// difference from how <a href> works and a major reason we call this a
// "to" value instead of a "href".
if(!i&&s.startsWith("..")){let t=s.split("/");while(t[0]===".."){t.shift();e-=1}a.pathname=t.join("/")}u=e>=0?t[e]:"/"}let l=z(a,u);// Ensure the pathname has a trailing slash if the original "to" had one
let d=s&&s!=="/"&&s.endsWith("/");// Or if this was a link to the current path which has a trailing slash
let f=(o||s===".")&&r.endsWith("/");if(!l.pathname.endsWith("/")&&(d||f)){l.pathname+="/"}return l}/**
 * @private
 */function Q(e){// Empty strings should be treated the same as / paths
return e===""||e.pathname===""?"/":typeof e==="string"?v(e).pathname:e.pathname}/**
 * @private
 */const X=e=>e.join("/").replace(/\/\/+/g,"/");/**
 * @private
 */const J=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/");/**
 * @private
 */const Z=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e;/**
 * @private
 */const ee=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;/**
 * This is a shortcut for creating `application/json` responses. Converts `data`
 * to JSON and sets the `Content-Type` header.
 *
 * @deprecated The `json` method is deprecated in favor of returning raw objects.
 * This method will be removed in v7.
 */const et=function e(e,t){if(t===void 0){t={}}let r=typeof t==="number"?{status:t}:t;let i=new Headers(r.headers);if(!i.has("Content-Type")){i.set("Content-Type","application/json; charset=utf-8")}return new Response(JSON.stringify(e),n({},r,{headers:i}))};class er{constructor(e,t){this.type="DataWithResponseInit";this.data=e;this.init=t||null}}/**
 * Create "responses" that contain `status`/`headers` without forcing
 * serialization into an actual `Response` - used by Remix single fetch
 */function en(e,t){return new er(e,typeof t==="number"?{status:t}:t)}class ei extends Error{}class ea{constructor(e,t){this.pendingKeysSet=new Set;this.subscribers=new Set;this.deferredKeys=[];c(e&&typeof e==="object"&&!Array.isArray(e),"defer() only accepts plain objects");// Set up an AbortController + Promise we can race against to exit early
// cancellation
let r;this.abortPromise=new Promise((e,t)=>r=t);this.controller=new AbortController;let n=()=>r(new ei("Deferred data aborted"));this.unlistenAbortSignal=()=>this.controller.signal.removeEventListener("abort",n);this.controller.signal.addEventListener("abort",n);this.data=Object.entries(e).reduce((e,t)=>{let[r,n]=t;return Object.assign(e,{[r]:this.trackPromise(r,n)})},{});if(this.done){// All incoming values were resolved
this.unlistenAbortSignal()}this.init=t}trackPromise(e,t){if(!(t instanceof Promise)){return t}this.deferredKeys.push(e);this.pendingKeysSet.add(e);// We store a little wrapper promise that will be extended with
// _data/_error props upon resolve/reject
let r=Promise.race([t,this.abortPromise]).then(t=>this.onSettle(r,e,undefined,t),t=>this.onSettle(r,e,t));// Register rejection listeners to avoid uncaught promise rejections on
// errors or aborted deferred values
r.catch(()=>{});Object.defineProperty(r,"_tracked",{get:()=>true});return r}onSettle(e,t,r,n){if(this.controller.signal.aborted&&r instanceof ei){this.unlistenAbortSignal();Object.defineProperty(e,"_error",{get:()=>r});return Promise.reject(r)}this.pendingKeysSet.delete(t);if(this.done){// Nothing left to abort!
this.unlistenAbortSignal()}// If the promise was resolved/rejected with undefined, we'll throw an error as you
// should always resolve with a value or null
if(r===undefined&&n===undefined){let r=new Error('Deferred data for key "'+t+'" resolved/rejected with `undefined`, '+"you must resolve/reject with a value or `null`.");Object.defineProperty(e,"_error",{get:()=>r});this.emit(false,t);return Promise.reject(r)}if(n===undefined){Object.defineProperty(e,"_error",{get:()=>r});this.emit(false,t);return Promise.reject(r)}Object.defineProperty(e,"_data",{get:()=>n});this.emit(false,t);return n}emit(e,t){this.subscribers.forEach(r=>r(e,t))}subscribe(e){this.subscribers.add(e);return()=>this.subscribers.delete(e)}cancel(){this.controller.abort();this.pendingKeysSet.forEach((e,t)=>this.pendingKeysSet.delete(t));this.emit(true)}async resolveData(e){let t=false;if(!this.done){let r=()=>this.cancel();e.addEventListener("abort",r);t=await new Promise(t=>{this.subscribe(n=>{e.removeEventListener("abort",r);if(n||this.done){t(n)}})})}return t}get done(){return this.pendingKeysSet.size===0}get unwrappedData(){c(this.data!==null&&this.done,"Can only unwrap data on initialized and settled deferreds");return Object.entries(this.data).reduce((e,t)=>{let[r,n]=t;return Object.assign(e,{[r]:es(n)})},{})}get pendingKeys(){return Array.from(this.pendingKeysSet)}}function eo(e){return e instanceof Promise&&e._tracked===true}function es(e){if(!eo(e)){return e}if(e._error){throw e._error}return e._data}/**
 * @deprecated The `defer` method is deprecated in favor of returning raw
 * objects. This method will be removed in v7.
 */const eu=function e(e,t){if(t===void 0){t={}}let r=typeof t==="number"?{status:t}:t;return new ea(e,r)};/**
 * A redirect response. Sets the status code and the `Location` header.
 * Defaults to "302 Found".
 */const ec=function e(e,t){if(t===void 0){t=302}let r=t;if(typeof r==="number"){r={status:r}}else if(typeof r.status==="undefined"){r.status=302}let i=new Headers(r.headers);i.set("Location",e);return new Response(null,n({},r,{headers:i}))};/**
 * A redirect response that will force a document reload to the new location.
 * Sets the status code and the `Location` header.
 * Defaults to "302 Found".
 */const el=(e,t)=>{let r=ec(e,t);r.headers.set("X-Remix-Reload-Document","true");return r};/**
 * A redirect response that will perform a `history.replaceState` instead of a
 * `history.pushState` for client-side navigation redirects.
 * Sets the status code and the `Location` header.
 * Defaults to "302 Found".
 */const ed=(e,t)=>{let r=ec(e,t);r.headers.set("X-Remix-Replace","true");return r};/**
 * @private
 * Utility class we use to hold auto-unwrapped 4xx/5xx Response bodies
 *
 * We don't export the class for public use since it's an implementation
 * detail, but we export the interface above so folks can build their own
 * abstractions around instances via isRouteErrorResponse()
 */class ef{constructor(e,t,r,n){if(n===void 0){n=false}this.status=e;this.statusText=t||"";this.internal=n;if(r instanceof Error){this.data=r.toString();this.error=r}else{this.data=r}}}/**
 * Check if the given error is an ErrorResponse generated from a 4xx/5xx
 * Response thrown from an action/loader
 */function ep(e){return e!=null&&typeof e.status==="number"&&typeof e.statusText==="string"&&typeof e.internal==="boolean"&&"data"in e}const eh=["post","put","patch","delete"];const ev=new Set(eh);const em=["get",...eh];const eg=new Set(em);const eb=new Set([301,302,303,307,308]);const e_=new Set([307,308]);const ey=/* unused pure expression or super */null&&{state:"idle",location:undefined,formMethod:undefined,formAction:undefined,formEncType:undefined,formData:undefined,json:undefined,text:undefined};const ew=/* unused pure expression or super */null&&{state:"idle",data:undefined,formMethod:undefined,formAction:undefined,formEncType:undefined,formData:undefined,json:undefined,text:undefined};const eA=/* unused pure expression or super */null&&{state:"unblocked",proceed:undefined,reset:undefined,location:undefined};const ex=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;const eE=e=>({hasErrorBoundary:Boolean(e.hasErrorBoundary)});const eO="remix-router-transitions";//#endregion
////////////////////////////////////////////////////////////////////////////////
//#region createRouter
////////////////////////////////////////////////////////////////////////////////
/**
 * Create a router and listen to history POP navigations
 */function eS(e){const t=e.window?e.window:typeof window!=="undefined"?window:undefined;const r=typeof t!=="undefined"&&typeof t.document!=="undefined"&&typeof t.document.createElement!=="undefined";const a=!r;c(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let o;if(e.mapRouteProperties){o=e.mapRouteProperties}else if(e.detectErrorBoundary){// If they are still using the deprecated version, wrap it with the new API
let t=e.detectErrorBoundary;o=e=>({hasErrorBoundary:t(e)})}else{o=eE}// Routes keyed by ID
let s={};// Routes in tree format for matching
let u=y(e.routes,o,undefined,s);let d;let f=e.basename||"/";let h=e.dataStrategy||eK;let v=e.patchRoutesOnNavigation;// Config driven behavior flags
let m=n({v7_fetcherPersist:false,v7_normalizeFormMethod:false,v7_partialHydration:false,v7_prependBasename:false,v7_relativeSplatPath:false,v7_skipActionErrorRevalidation:false},e.future);// Cleanup function for history
let b=null;// Externally-provided functions to call on all state changes
let _=new Set;// Externally-provided object to hold scroll restoration locations during routing
let E=null;// Externally-provided function to get scroll restoration keys
let O=null;// Externally-provided function to get current scroll position
let S=null;// One-time flag to control the initial hydration scroll restoration.  Because
// we don't get the saved positions from <ScrollRestoration /> until _after_
// the initial render, we need to manually trigger a separate updateState to
// send along the restoreScrollPosition
// Set to true if we have `hydrationData` since we assume we were SSR'd and that
// SSR did the initial scroll restoration.
let T=e.hydrationData!=null;let k=w(u,e.history.location,f);let C=false;let I=null;if(k==null&&!v){// If we do not match a user-provided-route, fall back to the root
// to allow the error boundary to take over
let t=e4(404,{pathname:e.history.location.pathname});let{matches:r,route:n}=e6(u);k=r;I={[n.id]:t}}// In SPA apps, if the user provided a patchRoutesOnNavigation implementation and
// our initial match is a splat route, clear them out so we run through lazy
// discovery on hydration in case there's a more accurate lazy route match.
// In SSR apps (with `hydrationData`), we expect that the server will send
// up the proper matched routes so we don't want to run lazy discovery on
// initial hydration and want to hydrate into the splat route.
if(k&&!e.hydrationData){let t=to(k,u,e.history.location.pathname);if(t.active){k=null}}let R;if(!k){R=false;k=[];// If partial hydration and fog of war is enabled, we will be running
// `patchRoutesOnNavigation` during hydration so include any partial matches as
// the initial matches so we can properly render `HydrateFallback`'s
if(m.v7_partialHydration){let t=to(null,u,e.history.location.pathname);if(t.active&&t.matches){C=true;k=t.matches}}}else if(k.some(e=>e.route.lazy)){// All initialMatches need to be loaded before we're ready.  If we have lazy
// functions around still then we'll need to run them in initialize()
R=false}else if(!k.some(e=>e.route.loader)){// If we've got no loaders to run, then we're good to go
R=true}else if(m.v7_partialHydration){// If partial hydration is enabled, we're initialized so long as we were
// provided with hydrationData for every route with a loader, and no loaders
// were marked for explicit hydration
let t=e.hydrationData?e.hydrationData.loaderData:null;let r=e.hydrationData?e.hydrationData.errors:null;// If errors exist, don't consider routes below the boundary
if(r){let e=k.findIndex(e=>r[e.route.id]!==undefined);R=k.slice(0,e+1).every(e=>!eY(e.route,t,r))}else{R=k.every(e=>!eY(e.route,t,r))}}else{// Without partial hydration - we're initialized if we were provided any
// hydrationData - which is expected to be complete
R=e.hydrationData!=null}let D;let P={historyAction:e.history.action,location:e.history.location,matches:k,initialized:R,navigation:ey,// Don't restore on initial updateState() if we were SSR'd
restoreScrollPosition:e.hydrationData!=null?false:null,preventScrollReset:false,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||I,fetchers:new Map,blockers:new Map};// -- Stateful internal variables to manage navigations --
// Current navigation in progress (to be committed in completeNavigation)
let M=i.Pop;// Should the current navigation prevent the scroll reset if scroll cannot
// be restored?
let F=false;// AbortController for the active navigation
let Y;// Should the current navigation enable document.startViewTransition?
let L=false;// Store applied view transitions so we can apply them on POP
let N=new Map;// Cleanup function for persisting applied transitions to sessionStorage
let H=null;// We use this to avoid touching history in completeNavigation if a
// revalidation is entirely uninterrupted
let j=false;// Use this internal flag to force revalidation of all loaders:
//  - submissions (completed or interrupted)
//  - useRevalidator()
//  - X-Remix-Revalidate (from redirect)
let B=false;// Use this internal array to capture routes that require revalidation due
// to a cancelled deferred on action submission
let K=[];// Use this internal array to capture fetcher loads that were cancelled by an
// action navigation and require revalidation
let z=new Set;// AbortControllers for any in-flight fetchers
let q=new Map;// Track loads based on the order in which they started
let V=0;// Track the outstanding pending navigation data load to be compared against
// the globally incrementing load when a fetcher load lands after a completed
// navigation
let W=-1;// Fetchers that triggered data reloads as a result of their actions
let G=new Map;// Fetchers that triggered redirect navigations
let $=new Set;// Most recent href/match for fetcher.load calls for fetchers
let Q=new Map;// Ref-count mounted fetchers so we know when it's ok to clean them up
let X=new Map;// Fetchers that have requested a delete when using v7_fetcherPersist,
// they'll be officially removed after they return to idle
let J=new Set;// Store DeferredData instances for active route matches.  When a
// route loader returns defer() we stick one in here.  Then, when a nested
// promise resolves we update loaderData.  If a new navigation starts we
// cancel active deferreds for eliminated routes.
let Z=new Map;// Store blocker functions in a separate Map outside of router state since
// we don't need to update UI state if they change
let ee=new Map;// Flag to ignore the next history update, so we can revert the URL change on
// a POP navigation that was blocked by the user without touching router state
let et=undefined;// Initialize the router, all side effects should be kicked off from here.
// Implemented as a Fluent API for ease of:
//   let router = createRouter(init).initialize();
function er(){// If history informs us of a POP navigation, start the navigation but do not update
// state.  We'll update our own state once the navigation completes
b=e.history.listen(t=>{let{action:r,location:n,delta:i}=t;// Ignore this event if it was just us resetting the URL from a
// blocked POP navigation
if(et){et();et=undefined;return}l(ee.size===0||i!=null,"You are trying to use a blocker on a POP navigation to a location "+"that was not created by @remix-run/router. This will fail silently in "+"production. This can happen if you are navigating outside the router "+"via `window.history.pushState`/`window.location.hash` instead of using "+"router navigation APIs.  This can also happen if you are using "+"createHashRouter and the user manually changes the URL.");let a=eX({currentLocation:P.location,nextLocation:n,historyAction:r});if(a&&i!=null){// Restore the URL to match the current UI, but don't update router state
let t=new Promise(e=>{et=e});e.history.go(i*-1);// Put the blocker into a blocked state
eQ(a,{state:"blocked",location:n,proceed(){eQ(a,{state:"proceeding",proceed:undefined,reset:undefined,location:n});// Re-do the same POP navigation we just blocked, after the url
// restoration is also complete.  See:
// https://github.com/remix-run/react-router/issues/11613
t.then(()=>e.history.go(i))},reset(){let e=new Map(P.blockers);e.set(a,eA);ea({blockers:e})}});return}return ec(r,n)});if(r){// FIXME: This feels gross.  How can we cleanup the lines between
// scrollRestoration/appliedTransitions persistance?
ty(t,N);let e=()=>tw(t,N);t.addEventListener("pagehide",e);H=()=>t.removeEventListener("pagehide",e)}// Kick off initial data load if needed.  Use Pop to avoid modifying history
// Note we don't do any handling of lazy here.  For SPA's it'll get handled
// in the normal navigation flow.  For SSR it's expected that lazy modules are
// resolved prior to router creation since we can't go into a fallbackElement
// UI for SSR'd apps
if(!P.initialized){ec(i.Pop,P.location,{initialHydration:true})}return D}// Clean up a router and it's side effects
function en(){if(b){b()}if(H){H()}_.clear();Y&&Y.abort();P.fetchers.forEach((e,t)=>eR(t));P.blockers.forEach((e,t)=>eq(t))}// Subscribe to state updates for the router
function ei(e){_.add(e);return()=>_.delete(e)}// Update our state and notify the calling context of the change
function ea(e,t){if(t===void 0){t={}}P=n({},P,e);// Prep fetcher cleanup so we can tell the UI which fetcher data entries
// can be removed
let r=[];let i=[];if(m.v7_fetcherPersist){P.fetchers.forEach((e,t)=>{if(e.state==="idle"){if(J.has(t)){// Unmounted from the UI and can be totally removed
i.push(t)}else{// Returned to idle but still mounted in the UI, so semi-remains for
// revalidations and such
r.push(t)}}})}// Remove any lingering deleted fetchers that have already been removed
// from state.fetchers
J.forEach(e=>{if(!P.fetchers.has(e)&&!q.has(e)){i.push(e)}});// Iterate over a local copy so that if flushSync is used and we end up
// removing and adding a new subscriber due to the useCallback dependencies,
// we don't get ourselves into a loop calling the new subscriber immediately
[..._].forEach(e=>e(P,{deletedFetchers:i,viewTransitionOpts:t.viewTransitionOpts,flushSync:t.flushSync===true}));// Remove idle fetchers from state since we only care about in-flight fetchers.
if(m.v7_fetcherPersist){r.forEach(e=>P.fetchers.delete(e));i.forEach(e=>eR(e))}else{// We already called deleteFetcher() on these, can remove them from this
// Set now that we've handed the keys off to the data layer
i.forEach(e=>J.delete(e))}}// Complete a navigation returning the state.navigation back to the IDLE_NAVIGATION
// and setting state.[historyAction/location/matches] to the new route.
// - Location is a required param
// - Navigation will always be set to IDLE_NAVIGATION
// - Can pass any other state in newState
function eo(t,r,a){var o,s;let{flushSync:c}=a===void 0?{}:a;// Deduce if we're in a loading/actionReload state:
// - We have committed actionData in the store
// - The current navigation was a mutation submission
// - We're past the submitting state and into the loading state
// - The location being loaded is not the result of a redirect
let l=P.actionData!=null&&P.navigation.formMethod!=null&&tu(P.navigation.formMethod)&&P.navigation.state==="loading"&&((o=t.state)==null?void 0:o._isRedirect)!==true;let f;if(r.actionData){if(Object.keys(r.actionData).length>0){f=r.actionData}else{// Empty actionData -> clear prior actionData due to an action error
f=null}}else if(l){// Keep the current data if we're wrapping up the action reload
f=P.actionData}else{// Clear actionData on any other completed navigations
f=null}// Always preserve any existing loaderData from re-used routes
let p=r.loaderData?e0(P.loaderData,r.loaderData,r.matches||[],r.errors):P.loaderData;// On a successful navigation we can assume we got through all blockers
// so we can start fresh
let h=P.blockers;if(h.size>0){h=new Map(h);h.forEach((e,t)=>h.set(t,eA))}// Always respect the user flag.  Otherwise don't reset on mutation
// submission navigations unless they redirect
let v=F===true||P.navigation.formMethod!=null&&tu(P.navigation.formMethod)&&((s=t.state)==null?void 0:s._isRedirect)!==true;// Commit any in-flight routes at the end of the HMR revalidation "navigation"
if(d){u=d;d=undefined}if(j);else if(M===i.Pop);else if(M===i.Push){e.history.push(t,t.state)}else if(M===i.Replace){e.history.replace(t,t.state)}let m;// On POP, enable transitions if they were enabled on the original navigation
if(M===i.Pop){// Forward takes precedence so they behave like the original navigation
let e=N.get(P.location.pathname);if(e&&e.has(t.pathname)){m={currentLocation:P.location,nextLocation:t}}else if(N.has(t.pathname)){// If we don't have a previous forward nav, assume we're popping back to
// the new location and enable if that location previously enabled
m={currentLocation:t,nextLocation:P.location}}}else if(L){// Store the applied transition on PUSH/REPLACE
let e=N.get(P.location.pathname);if(e){e.add(t.pathname)}else{e=new Set([t.pathname]);N.set(P.location.pathname,e)}m={currentLocation:P.location,nextLocation:t}}ea(n({},r,{actionData:f,loaderData:p,historyAction:M,location:t,initialized:true,navigation:ey,revalidation:"idle",restoreScrollPosition:ta(t,r.matches||P.matches),preventScrollReset:v,blockers:h}),{viewTransitionOpts:m,flushSync:c===true});// Reset stateful navigation vars
M=i.Pop;F=false;L=false;j=false;B=false;K=[]}// Trigger a navigation event, which can either be a numerical POP or a PUSH
// replace with an optional submission
async function es(t,r){if(typeof t==="number"){e.history.go(t);return}let a=eD(P.location,P.matches,f,m.v7_prependBasename,t,m.v7_relativeSplatPath,r==null?void 0:r.fromRouteId,r==null?void 0:r.relative);let{path:o,submission:s,error:u}=eP(m.v7_normalizeFormMethod,false,a,r);let c=P.location;let l=p(P.location,o,r&&r.state);// When using navigate as a PUSH/REPLACE we aren't reading an already-encoded
// URL from window.location, so we need to encode it here so the behavior
// remains the same as POP and non-data-router usages.  new URL() does all
// the same encoding we'd get from a history.pushState/window.location read
// without having to touch history
l=n({},l,e.history.encodeLocation(l));let d=r&&r.replace!=null?r.replace:undefined;let h=i.Push;if(d===true){h=i.Replace}else if(d===false);else if(s!=null&&tu(s.formMethod)&&s.formAction===P.location.pathname+P.location.search){// By default on submissions to the current location we REPLACE so that
// users don't have to double-click the back button to get to the prior
// location.  If the user redirects to a different location from the
// action/loader this will be ignored and the redirect will be a PUSH
h=i.Replace}let v=r&&"preventScrollReset"in r?r.preventScrollReset===true:undefined;let g=(r&&r.flushSync)===true;let b=eX({currentLocation:c,nextLocation:l,historyAction:h});if(b){// Put the blocker into a blocked state
eQ(b,{state:"blocked",location:l,proceed(){eQ(b,{state:"proceeding",proceed:undefined,reset:undefined,location:l});// Send the same navigation through
es(t,r)},reset(){let e=new Map(P.blockers);e.set(b,eA);ea({blockers:e})}});return}return await ec(h,l,{submission:s,// Send through the formData serialization error if we have one so we can
// render at the right error boundary after we match routes
pendingError:u,preventScrollReset:v,replace:r&&r.replace,enableViewTransition:r&&r.viewTransition,flushSync:g})}// Revalidate all current loaders.  If a navigation is in progress or if this
// is interrupted by a navigation, allow this to "succeed" by calling all
// loaders during the next loader round
function eu(){eT();ea({revalidation:"loading"});// If we're currently submitting an action, we don't need to start a new
// navigation, we'll just let the follow up loader execution call all loaders
if(P.navigation.state==="submitting"){return}// If we're currently in an idle state, start a new navigation for the current
// action/location and mark it as uninterrupted, which will skip the history
// update in completeNavigation
if(P.navigation.state==="idle"){ec(P.historyAction,P.location,{startUninterruptedRevalidation:true});return}// Otherwise, if we're currently in a loading state, just start a new
// navigation to the navigation.location but do not trigger an uninterrupted
// revalidation so that history correctly updates once the navigation completes
ec(M||P.historyAction,P.navigation.location,{overrideNavigation:P.navigation,// Proxy through any rending view transition
enableViewTransition:L===true})}// Start a navigation to the given action/location.  Can optionally provide a
// overrideNavigation which will override the normalLoad in the case of a redirect
// navigation
async function ec(t,r,i){// Abort any in-progress navigations and start a new one. Unset any ongoing
// uninterrupted revalidations unless told otherwise, since we want this
// new navigation to update history normally
Y&&Y.abort();Y=null;M=t;j=(i&&i.startUninterruptedRevalidation)===true;// Save the current scroll position every time we start a new navigation,
// and track whether we should reset scroll on completion
ti(P.location,P.matches);F=(i&&i.preventScrollReset)===true;L=(i&&i.enableViewTransition)===true;let a=d||u;let o=i&&i.overrideNavigation;let s=i!=null&&i.initialHydration&&P.matches&&P.matches.length>0&&!C?// `matchRoutes()` has already been called if we're in here via `router.initialize()`
P.matches:w(a,r,f);let c=(i&&i.flushSync)===true;// Short circuit if it's only a hash change and not a revalidation or
// mutation submission.
//
// Ignore on initial page loads because since the initial hydration will always
// be "same hash".  For example, on /page#hash and submit a <Form method="post">
// which will default to a navigation to /page
if(s&&P.initialized&&!B&&e9(P.location,r)&&!(i&&i.submission&&tu(i.submission.formMethod))){eo(r,{matches:s},{flushSync:c});return}let l=to(s,a,r.pathname);if(l.active&&l.matches){s=l.matches}// Short circuit with a 404 on the root error boundary if we match nothing
if(!s){let{error:e,notFoundMatches:t,route:n}=eJ(r.pathname);eo(r,{matches:t,loaderData:{},errors:{[n.id]:e}},{flushSync:c});return}// Create a controller/Request for this navigation
Y=new AbortController;let p=e$(e.history,r,Y.signal,i&&i.submission);let h;if(i&&i.pendingError){// If we have a pendingError, it means the user attempted a GET submission
// with binary FormData so assign here and skip to handleLoaders.  That
// way we handle calling loaders above the boundary etc.  It's not really
// different from an actionError in that sense.
h=[e2(s).route.id,{type:g.error,error:i.pendingError}]}else if(i&&i.submission&&tu(i.submission.formMethod)){// Call action if we received an action submission
let t=await el(p,r,i.submission,s,l.active,{replace:i.replace,flushSync:c});if(t.shortCircuited){return}// If we received a 404 from handleAction, it's because we couldn't lazily
// discover the destination route so we don't want to call loaders
if(t.pendingActionResult){let[e,n]=t.pendingActionResult;if(tt(n)&&ep(n.error)&&n.error.status===404){Y=null;eo(r,{matches:t.matches,loaderData:{},errors:{[e]:n.error}});return}}s=t.matches||s;h=t.pendingActionResult;o=tv(r,i.submission);c=false;// No need to do fog of war matching again on loader execution
l.active=false;// Create a GET request for the loaders
p=e$(e.history,p.url,p.signal)}// Call loaders
let{shortCircuited:v,matches:m,loaderData:b,errors:_}=await ed(p,r,s,l.active,o,i&&i.submission,i&&i.fetcherSubmission,i&&i.replace,i&&i.initialHydration===true,c,h);if(v){return}// Clean up now that the action/loaders have completed.  Don't clean up if
// we short circuited because pendingNavigationController will have already
// been assigned to a new controller for the next navigation
Y=null;eo(r,n({matches:m||s},e1(h),{loaderData:b,errors:_}))}// Call the action matched by the leaf route for this navigation and handle
// redirects/errors
async function el(e,t,r,n,a,o){if(o===void 0){o={}}eT();// Put us in a submitting state
let s=tm(t,r);ea({navigation:s},{flushSync:o.flushSync===true});if(a){let r=await ts(n,t.pathname,e.signal);if(r.type==="aborted"){return{shortCircuited:true}}else if(r.type==="error"){let e=e2(r.partialMatches).route.id;return{matches:r.partialMatches,pendingActionResult:[e,{type:g.error,error:r.error}]}}else if(!r.matches){let{notFoundMatches:e,error:r,route:n}=eJ(t.pathname);return{matches:e,pendingActionResult:[n.id,{type:g.error,error:r}]}}else{n=r.matches}}// Call our action and get the result
let u;let c=tp(n,t);if(!c.route.action&&!c.route.lazy){u={type:g.error,error:e4(405,{method:e.method,pathname:t.pathname,routeId:c.route.id})}}else{let t=await eO("action",P,e,[c],n,null);u=t[c.route.id];if(e.signal.aborted){return{shortCircuited:true}}}if(tr(u)){let t;if(o&&o.replace!=null){t=o.replace}else{// If the user didn't explicity indicate replace behavior, replace if
// we redirected to the exact same location we're currently at to avoid
// double back-buttons
let r=eG(u.response.headers.get("Location"),new URL(e.url),f);t=r===P.location.pathname+P.location.search}await eb(e,u,true,{submission:r,replace:t});return{shortCircuited:true}}if(te(u)){throw e4(400,{type:"defer-action"})}if(tt(u)){// Store off the pending error - we use it to determine which loaders
// to call and will commit it when we complete the navigation
let e=e2(n,c.route.id);// By default, all submissions to the current location are REPLACE
// navigations, but if the action threw an error that'll be rendered in
// an errorElement, we fall back to PUSH so that the user can use the
// back button to get back to the pre-submission form location to try
// again
if((o&&o.replace)!==true){M=i.Push}return{matches:n,pendingActionResult:[e.route.id,u]}}return{matches:n,pendingActionResult:[c.route.id,u]}}// Call all applicable loaders for the given matches, handling redirects,
// errors, etc.
async function ed(t,r,i,a,o,s,c,l,p,h,v){// Figure out the right navigation we want to use for data loading
let g=o||tv(r,s);// If this was a redirect from an action we don't have a "submission" but
// we have it on the loading navigation so use that if available
let b=s||c||th(g);// If this is an uninterrupted revalidation, we remain in our current idle
// state.  If not, we need to switch to our loading state and load data,
// preserving any new action data or existing action data (in the case of
// a revalidation interrupting an actionReload)
// If we have partialHydration enabled, then don't update the state for the
// initial data load since it's not a "navigation"
let _=!j&&(!m.v7_partialHydration||!p);// When fog of war is enabled, we enter our `loading` state earlier so we
// can discover new routes during the `loading` state.  We skip this if
// we've already run actions since we would have done our matching already.
// If the children() function threw then, we want to proceed with the
// partial matches it discovered.
if(a){if(_){let e=ef(v);ea(n({navigation:g},e!==undefined?{actionData:e}:{}),{flushSync:h})}let e=await ts(i,r.pathname,t.signal);if(e.type==="aborted"){return{shortCircuited:true}}else if(e.type==="error"){let t=e2(e.partialMatches).route.id;return{matches:e.partialMatches,loaderData:{},errors:{[t]:e.error}}}else if(!e.matches){let{error:e,notFoundMatches:t,route:n}=eJ(r.pathname);return{matches:t,loaderData:{},errors:{[n.id]:e}}}else{i=e.matches}}let y=d||u;let[w,A]=eF(e.history,P,i,b,r,m.v7_partialHydration&&p===true,m.v7_skipActionErrorRevalidation,B,K,z,J,Q,$,y,f,v);// Cancel pending deferreds for no-longer-matched routes or routes we're
// about to reload.  Note that if this is an action reload we would have
// already cancelled all pending deferreds so this would be a no-op
e3(e=>!(i&&i.some(t=>t.route.id===e))||w&&w.some(t=>t.route.id===e));W=++V;// Short circuit if we have no loaders to run
if(w.length===0&&A.length===0){let e=eH();eo(r,n({matches:i,loaderData:{},// Commit pending error if we're short circuiting
errors:v&&tt(v[1])?{[v[0]]:v[1].error}:null},e1(v),e?{fetchers:new Map(P.fetchers)}:{}),{flushSync:h});return{shortCircuited:true}}if(_){let e={};if(!a){// Only update navigation/actionNData if we didn't already do it above
e.navigation=g;let t=ef(v);if(t!==undefined){e.actionData=t}}if(A.length>0){e.fetchers=eh(A)}ea(e,{flushSync:h})}A.forEach(e=>{eL(e.key);if(e.controller){// Fetchers use an independent AbortController so that aborting a fetcher
// (via deleteFetcher) does not abort the triggering navigation that
// triggered the revalidation
q.set(e.key,e.controller)}});// Proxy navigation abort through to revalidation fetchers
let x=()=>A.forEach(e=>eL(e.key));if(Y){Y.signal.addEventListener("abort",x)}let{loaderResults:E,fetcherResults:O}=await eS(P,i,w,A,t);if(t.signal.aborted){return{shortCircuited:true}}// Clean up _after_ loaders have completed.  Don't clean up if we short
// circuited because fetchControllers would have been aborted and
// reassigned to new controllers for the next navigation
if(Y){Y.signal.removeEventListener("abort",x)}A.forEach(e=>q.delete(e.key));// If any loaders returned a redirect Response, start a new REPLACE navigation
let S=e5(E);if(S){await eb(t,S.result,true,{replace:l});return{shortCircuited:true}}S=e5(O);if(S){// If this redirect came from a fetcher make sure we mark it in
// fetchRedirectIds so it doesn't get revalidated on the next set of
// loader executions
$.add(S.key);await eb(t,S.result,true,{replace:l});return{shortCircuited:true}}// Process and commit output from loaders
let{loaderData:T,errors:k}=eZ(P,i,E,v,A,O,Z);// Wire up subscribers to update loaderData as promises settle
Z.forEach((e,t)=>{e.subscribe(r=>{// Note: No need to updateState here since the TrackedPromise on
// loaderData is stable across resolve/reject
// Remove this instance if we were aborted or if promises have settled
if(r||e.done){Z.delete(t)}})});// Preserve SSR errors during partial hydration
if(m.v7_partialHydration&&p&&P.errors){k=n({},P.errors,k)}let C=eH();let I=eU(W);let R=C||I||A.length>0;return n({matches:i,loaderData:T,errors:k},R?{fetchers:new Map(P.fetchers)}:{})}function ef(e){if(e&&!tt(e[1])){// This is cast to `any` currently because `RouteData`uses any and it
// would be a breaking change to use any.
// TODO: v7 - change `RouteData` to use `unknown` instead of `any`
return{[e[0]]:e[1].data}}else if(P.actionData){if(Object.keys(P.actionData).length===0){return null}else{return P.actionData}}}function eh(e){e.forEach(e=>{let t=P.fetchers.get(e.key);let r=tg(undefined,t?t.data:undefined);P.fetchers.set(e.key,r)});return new Map(P.fetchers)}// Trigger a fetcher load/submit for the given fetcher key
function ev(e,t,r,n){if(a){throw new Error("router.fetch() was called during the server render, but it shouldn't be. "+"You are likely calling a useFetcher() method in the body of your component. "+"Try moving it to a useEffect or a callback.")}eL(e);let i=(n&&n.flushSync)===true;let o=d||u;let s=eD(P.location,P.matches,f,m.v7_prependBasename,r,m.v7_relativeSplatPath,t,n==null?void 0:n.relative);let c=w(o,s,f);let l=to(c,o,s);if(l.active&&l.matches){c=l.matches}if(!c){eC(e,t,e4(404,{pathname:s}),{flushSync:i});return}let{path:p,submission:h,error:v}=eP(m.v7_normalizeFormMethod,true,s,n);if(v){eC(e,t,v,{flushSync:i});return}let g=tp(c,p);let b=(n&&n.preventScrollReset)===true;if(h&&tu(h.formMethod)){em(e,t,p,g,c,l.active,i,b,h);return}// Store off the match so we can call it's shouldRevalidate on subsequent
// revalidations
Q.set(e,{routeId:t,path:p});eg(e,t,p,g,c,l.active,i,b,h)}// Call the action for the matched fetcher.submit(), and then handle redirects,
// errors, and revalidation
async function em(t,r,n,i,a,o,s,l,p){eT();Q.delete(t);function h(e){if(!e.route.action&&!e.route.lazy){let e=e4(405,{method:p.formMethod,pathname:n,routeId:r});eC(t,r,e,{flushSync:s});return true}return false}if(!o&&h(i)){return}// Put this fetcher into it's submitting state
let v=P.fetchers.get(t);ek(t,tb(p,v),{flushSync:s});let g=new AbortController;let b=e$(e.history,n,g.signal,p);if(o){let e=await ts(a,new URL(b.url).pathname,b.signal,t);if(e.type==="aborted"){return}else if(e.type==="error"){eC(t,r,e.error,{flushSync:s});return}else if(!e.matches){eC(t,r,e4(404,{pathname:n}),{flushSync:s});return}else{a=e.matches;i=tp(a,n);if(h(i)){return}}}// Call the action for the fetcher
q.set(t,g);let _=V;let y=await eO("action",P,b,[i],a,t);let A=y[i.route.id];if(b.signal.aborted){// We can delete this so long as we weren't aborted by our own fetcher
// re-submit which would have put _new_ controller is in fetchControllers
if(q.get(t)===g){q.delete(t)}return}// When using v7_fetcherPersist, we don't want errors bubbling up to the UI
// or redirects processed for unmounted fetchers so we just revert them to
// idle
if(m.v7_fetcherPersist&&J.has(t)){if(tr(A)||tt(A)){ek(t,t_(undefined));return}// Let SuccessResult's fall through for revalidation
}else{if(tr(A)){q.delete(t);if(W>_){// A new navigation was kicked off after our action started, so that
// should take precedence over this redirect navigation.  We already
// set isRevalidationRequired so all loaders for the new route should
// fire unless opted out via shouldRevalidate
ek(t,t_(undefined));return}else{$.add(t);ek(t,tg(p));return eb(b,A,false,{fetcherSubmission:p,preventScrollReset:l})}}// Process any non-redirect errors thrown
if(tt(A)){eC(t,r,A.error);return}}if(te(A)){throw e4(400,{type:"defer-action"})}// Start the data load for current matches, or the next location if we're
// in the middle of a navigation
let x=P.navigation.location||P.location;let E=e$(e.history,x,g.signal);let O=d||u;let S=P.navigation.state!=="idle"?w(O,P.navigation.location,f):P.matches;c(S,"Didn't find any matches after fetcher action");let T=++V;G.set(t,T);let k=tg(p,A.data);P.fetchers.set(t,k);let[C,I]=eF(e.history,P,S,p,x,false,m.v7_skipActionErrorRevalidation,B,K,z,J,Q,$,O,f,[i.route.id,A]);// Put all revalidating fetchers into the loading state, except for the
// current fetcher which we want to keep in it's current loading state which
// contains it's action submission info + action data
I.filter(e=>e.key!==t).forEach(e=>{let t=e.key;let r=P.fetchers.get(t);let n=tg(undefined,r?r.data:undefined);P.fetchers.set(t,n);eL(t);if(e.controller){q.set(t,e.controller)}});ea({fetchers:new Map(P.fetchers)});let R=()=>I.forEach(e=>eL(e.key));g.signal.addEventListener("abort",R);let{loaderResults:D,fetcherResults:F}=await eS(P,S,C,I,E);if(g.signal.aborted){return}g.signal.removeEventListener("abort",R);G.delete(t);q.delete(t);I.forEach(e=>q.delete(e.key));let L=e5(D);if(L){return eb(E,L.result,false,{preventScrollReset:l})}L=e5(F);if(L){// If this redirect came from a fetcher make sure we mark it in
// fetchRedirectIds so it doesn't get revalidated on the next set of
// loader executions
$.add(L.key);return eb(E,L.result,false,{preventScrollReset:l})}// Process and commit output from loaders
let{loaderData:N,errors:H}=eZ(P,S,D,undefined,I,F,Z);// Since we let revalidations complete even if the submitting fetcher was
// deleted, only put it back to idle if it hasn't been deleted
if(P.fetchers.has(t)){let e=t_(A.data);P.fetchers.set(t,e)}eU(T);// If we are currently in a navigation loading state and this fetcher is
// more recent than the navigation, we want the newer data so abort the
// navigation and complete it with the fetcher data
if(P.navigation.state==="loading"&&T>W){c(M,"Expected pending action");Y&&Y.abort();eo(P.navigation.location,{matches:S,loaderData:N,errors:H,fetchers:new Map(P.fetchers)})}else{// otherwise just update with the fetcher data, preserving any existing
// loaderData for loaders that did not need to reload.  We have to
// manually merge here since we aren't going through completeNavigation
ea({errors:H,loaderData:e0(P.loaderData,N,S,H),fetchers:new Map(P.fetchers)});B=false}}// Call the matched loader for fetcher.load(), handling redirects, errors, etc.
async function eg(t,r,n,i,a,o,s,u,l){let d=P.fetchers.get(t);ek(t,tg(l,d?d.data:undefined),{flushSync:s});let f=new AbortController;let p=e$(e.history,n,f.signal);if(o){let e=await ts(a,new URL(p.url).pathname,p.signal,t);if(e.type==="aborted"){return}else if(e.type==="error"){eC(t,r,e.error,{flushSync:s});return}else if(!e.matches){eC(t,r,e4(404,{pathname:n}),{flushSync:s});return}else{a=e.matches;i=tp(a,n)}}// Call the loader for this fetcher route match
q.set(t,f);let h=V;let v=await eO("loader",P,p,[i],a,t);let m=v[i.route.id];// Deferred isn't supported for fetcher loads, await everything and treat it
// as a normal load.  resolveDeferredData will return undefined if this
// fetcher gets aborted, so we just leave result untouched and short circuit
// below if that happens
if(te(m)){m=await td(m,p.signal,true)||m}// We can delete this so long as we weren't aborted by our our own fetcher
// re-load which would have put _new_ controller is in fetchControllers
if(q.get(t)===f){q.delete(t)}if(p.signal.aborted){return}// We don't want errors bubbling up or redirects followed for unmounted
// fetchers, so short circuit here if it was removed from the UI
if(J.has(t)){ek(t,t_(undefined));return}// If the loader threw a redirect Response, start a new REPLACE navigation
if(tr(m)){if(W>h){// A new navigation was kicked off after our loader started, so that
// should take precedence over this redirect navigation
ek(t,t_(undefined));return}else{$.add(t);await eb(p,m,false,{preventScrollReset:u});return}}// Process any non-redirect errors thrown
if(tt(m)){eC(t,r,m.error);return}c(!te(m),"Unhandled fetcher deferred data");// Put the fetcher back into an idle state
ek(t,t_(m.data))}/**
   * Utility function to handle redirects returned from an action or loader.
   * Normally, a redirect "replaces" the navigation that triggered it.  So, for
   * example:
   *
   *  - user is on /a
   *  - user clicks a link to /b
   *  - loader for /b redirects to /c
   *
   * In a non-JS app the browser would track the in-flight navigation to /b and
   * then replace it with /c when it encountered the redirect response.  In
   * the end it would only ever update the URL bar with /c.
   *
   * In client-side routing using pushState/replaceState, we aim to emulate
   * this behavior and we also do not update history until the end of the
   * navigation (including processed redirects).  This means that we never
   * actually touch history until we've processed redirects, so we just use
   * the history action from the original navigation (PUSH or REPLACE).
   */async function eb(a,o,s,u){let{submission:l,fetcherSubmission:d,preventScrollReset:h,replace:v}=u===void 0?{}:u;if(o.response.headers.has("X-Remix-Revalidate")){B=true}let m=o.response.headers.get("Location");c(m,"Expected a Location header on the redirect Response");m=eG(m,new URL(a.url),f);let g=p(P.location,m,{_isRedirect:true});if(r){let r=false;if(o.response.headers.has("X-Remix-Reload-Document")){// Hard reload if the response contained X-Remix-Reload-Document
r=true}else if(ex.test(m)){const n=e.history.createURL(m);r=// Hard reload if it's an absolute URL to a new origin
n.origin!==t.location.origin||// Hard reload if it's an absolute URL that does not match our basename
U(n.pathname,f)==null}if(r){if(v){t.location.replace(m)}else{t.location.assign(m)}return}}// There's no need to abort on redirects, since we don't detect the
// redirect until the action/loaders have settled
Y=null;let b=v===true||o.response.headers.has("X-Remix-Replace")?i.Replace:i.Push;// Use the incoming submission if provided, fallback on the active one in
// state.navigation
let{formMethod:_,formAction:y,formEncType:w}=P.navigation;if(!l&&!d&&_&&y&&w){l=th(P.navigation)}// If this was a 307/308 submission we want to preserve the HTTP method and
// re-submit the GET/POST/PUT/PATCH/DELETE as a submission navigation to the
// redirected location
let A=l||d;if(e_.has(o.response.status)&&A&&tu(A.formMethod)){await ec(b,g,{submission:n({},A,{formAction:m}),// Preserve these flags across redirects
preventScrollReset:h||F,enableViewTransition:s?L:undefined})}else{// If we have a navigation submission, we will preserve it through the
// redirect navigation
let e=tv(g,l);await ec(b,g,{overrideNavigation:e,// Send fetcher submissions through for shouldRevalidate
fetcherSubmission:d,// Preserve these flags across redirects
preventScrollReset:h||F,enableViewTransition:s?L:undefined})}}// Utility wrapper for calling dataStrategy client-side without having to
// pass around the manifest, mapRouteProperties, etc.
async function eO(e,t,r,n,i,a){let u;let c={};try{u=await ez(h,e,t,r,n,i,a,s,o)}catch(e){// If the outer dataStrategy method throws, just return the error for all
// matches - and it'll naturally bubble to the root
n.forEach(t=>{c[t.route.id]={type:g.error,error:e}});return c}for(let[e,t]of Object.entries(u)){if(e7(t)){let n=t.result;c[e]={type:g.redirect,response:eW(n,r,e,i,f,m.v7_relativeSplatPath)}}else{c[e]=await eV(t)}}return c}async function eS(t,r,n,i,a){let o=t.matches;// Kick off loaders and fetchers in parallel
let s=eO("loader",t,a,n,r,null);let u=Promise.all(i.map(async r=>{if(r.matches&&r.match&&r.controller){let n=await eO("loader",t,e$(e.history,r.path,r.controller.signal),[r.match],r.matches,r.key);let i=n[r.match.route.id];// Fetcher results are keyed by fetcher key from here on out, not routeId
return{[r.key]:i}}else{return Promise.resolve({[r.key]:{type:g.error,error:e4(404,{pathname:r.path})}})}}));let c=await s;let l=(await u).reduce((e,t)=>Object.assign(e,t),{});await Promise.all([tc(r,c,a.signal,o,t.loaderData),tl(r,l,i)]);return{loaderResults:c,fetcherResults:l}}function eT(){// Every interruption triggers a revalidation
B=true;// Cancel pending route-level deferreds and mark cancelled routes for
// revalidation
K.push(...e3());// Abort in-flight fetcher loads
Q.forEach((e,t)=>{if(q.has(t)){z.add(t)}eL(t)})}function ek(e,t,r){if(r===void 0){r={}}P.fetchers.set(e,t);ea({fetchers:new Map(P.fetchers)},{flushSync:(r&&r.flushSync)===true})}function eC(e,t,r,n){if(n===void 0){n={}}let i=e2(P.matches,t);eR(e);ea({errors:{[i.route.id]:r},fetchers:new Map(P.fetchers)},{flushSync:(n&&n.flushSync)===true})}function eI(e){X.set(e,(X.get(e)||0)+1);// If this fetcher was previously marked for deletion, unmark it since we
// have a new instance
if(J.has(e)){J.delete(e)}return P.fetchers.get(e)||ew}function eR(e){let t=P.fetchers.get(e);// Don't abort the controller if this is a deletion of a fetcher.submit()
// in it's loading phase since - we don't want to abort the corresponding
// revalidation and want them to complete and land
if(q.has(e)&&!(t&&t.state==="loading"&&G.has(e))){eL(e)}Q.delete(e);G.delete(e);$.delete(e);// If we opted into the flag we can clear this now since we're calling
// deleteFetcher() at the end of updateState() and we've already handed the
// deleted fetcher keys off to the data layer.
// If not, we're eagerly calling deleteFetcher() and we need to keep this
// Set populated until the next updateState call, and we'll clear
// `deletedFetchers` then
if(m.v7_fetcherPersist){J.delete(e)}z.delete(e);P.fetchers.delete(e)}function eM(e){let t=(X.get(e)||0)-1;if(t<=0){X.delete(e);J.add(e);if(!m.v7_fetcherPersist){eR(e)}}else{X.set(e,t)}ea({fetchers:new Map(P.fetchers)})}function eL(e){let t=q.get(e);if(t){t.abort();q.delete(e)}}function eN(e){for(let t of e){let e=eI(t);let r=t_(e.data);P.fetchers.set(t,r)}}function eH(){let e=[];let t=false;for(let r of $){let n=P.fetchers.get(r);c(n,"Expected fetcher: "+r);if(n.state==="loading"){$.delete(r);e.push(r);t=true}}eN(e);return t}function eU(e){let t=[];for(let[r,n]of G){if(n<e){let e=P.fetchers.get(r);c(e,"Expected fetcher: "+r);if(e.state==="loading"){eL(r);G.delete(r);t.push(r)}}}eN(t);return t.length>0}function eB(e,t){let r=P.blockers.get(e)||eA;if(ee.get(e)!==t){ee.set(e,t)}return r}function eq(e){P.blockers.delete(e);ee.delete(e)}// Utility function to update blockers, ensuring valid state transitions
function eQ(e,t){let r=P.blockers.get(e)||eA;// Poor mans state machine :)
// https://mermaid.live/edit#pako:eNqVkc9OwzAMxl8l8nnjAYrEtDIOHEBIgwvKJTReGy3_lDpIqO27k6awMG0XcrLlnz87nwdonESogKXXBuE79rq75XZO3-yHds0RJVuv70YrPlUrCEe2HfrORS3rubqZfuhtpg5C9wk5tZ4VKcRUq88q9Z8RS0-48cE1iHJkL0ugbHuFLus9L6spZy8nX9MP2CNdomVaposqu3fGayT8T8-jJQwhepo_UtpgBQaDEUom04dZhAN1aJBDlUKJBxE1ceB2Smj0Mln-IBW5AFU2dwUiktt_2Qaq2dBfaKdEup85UV7Yd-dKjlnkabl2Pvr0DTkTreM
c(r.state==="unblocked"&&t.state==="blocked"||r.state==="blocked"&&t.state==="blocked"||r.state==="blocked"&&t.state==="proceeding"||r.state==="blocked"&&t.state==="unblocked"||r.state==="proceeding"&&t.state==="unblocked","Invalid blocker state transition: "+r.state+" -> "+t.state);let n=new Map(P.blockers);n.set(e,t);ea({blockers:n})}function eX(e){let{currentLocation:t,nextLocation:r,historyAction:n}=e;if(ee.size===0){return}// We ony support a single active blocker at the moment since we don't have
// any compelling use cases for multi-blocker yet
if(ee.size>1){l(false,"A router only supports one blocker at a time")}let i=Array.from(ee.entries());let[a,o]=i[i.length-1];let s=P.blockers.get(a);if(s&&s.state==="proceeding"){// If the blocker is currently proceeding, we don't need to re-check
// it and can let this navigation continue
return}// At this point, we know we're unblocked/blocked so we need to check the
// user-provided blocker function
if(o({currentLocation:t,nextLocation:r,historyAction:n})){return a}}function eJ(e){let t=e4(404,{pathname:e});let r=d||u;let{matches:n,route:i}=e6(r);// Cancel all pending deferred on 404s since we don't keep any routes
e3();return{notFoundMatches:n,route:i,error:t}}function e3(e){let t=[];Z.forEach((r,n)=>{if(!e||e(n)){// Cancel the deferred - but do not remove from activeDeferreds here -
// we rely on the subscribers to do that so our tests can assert proper
// cleanup via _internalActiveDeferreds
r.cancel();t.push(n);Z.delete(n)}});return t}// Opt in to capturing and reporting scroll positions during navigations,
// used by the <ScrollRestoration> component
function e8(e,t,r){E=e;S=t;O=r||null;// Perform initial hydration scroll restoration, since we miss the boat on
// the initial updateState() because we've not yet rendered <ScrollRestoration/>
// and therefore have no savedScrollPositions available
if(!T&&P.navigation===ey){T=true;let e=ta(P.location,P.matches);if(e!=null){ea({restoreScrollPosition:e})}}return()=>{E=null;S=null;O=null}}function tn(e,t){if(O){let r=O(e,t.map(e=>x(e,P.loaderData)));return r||e.key}return e.key}function ti(e,t){if(E&&S){let r=tn(e,t);E[r]=S()}}function ta(e,t){if(E){let r=tn(e,t);let n=E[r];if(typeof n==="number"){return n}}return null}function to(e,t,r){if(v){if(!e){let e=A(t,r,f,true);return{active:true,matches:e||[]}}else{if(Object.keys(e[0].params).length>0){// If we matched a dynamic param or a splat, it might only be because
// we haven't yet discovered other routes that would match with a
// higher score.  Call patchRoutesOnNavigation just to be sure
let e=A(t,r,f,true);return{active:true,matches:e}}}}return{active:false,matches:null}}async function ts(e,t,r,n){if(!v){return{type:"success",matches:e}}let i=e;while(true){let e=d==null;let a=d||u;let c=s;try{await v({signal:r,path:t,matches:i,fetcherKey:n,patch:(e,t)=>{if(r.aborted)return;ej(e,t,a,c,o)}})}catch(e){return{type:"error",error:e,partialMatches:i}}finally{// If we are not in the middle of an HMR revalidation and we changed the
// routes, provide a new identity so when we `updateState` at the end of
// this navigation/fetch `router.routes` will be a new identity and
// trigger a re-run of memoized `router.routes` dependencies.
// HMR will already update the identity and reflow when it lands
// `inFlightDataRoutes` in `completeNavigation`
if(e&&!r.aborted){u=[...u]}}if(r.aborted){return{type:"aborted"}}let l=w(a,t,f);if(l){return{type:"success",matches:l}}let p=A(a,t,f,true);// Avoid loops if the second pass results in the same partial matches
if(!p||i.length===p.length&&i.every((e,t)=>e.route.id===p[t].route.id)){return{type:"success",matches:null}}i=p}}function tf(e){s={};d=y(e,o,undefined,s)}function tA(e,t){let r=d==null;let n=d||u;ej(e,t,n,s,o);// If we are not in the middle of an HMR revalidation and we changed the
// routes, provide a new identity and trigger a reflow via `updateState`
// to re-run memoized `router.routes` dependencies.
// HMR will already update the identity and reflow when it lands
// `inFlightDataRoutes` in `completeNavigation`
if(r){u=[...u];ea({})}}D={get basename(){return f},get future(){return m},get state(){return P},get routes(){return u},get window(){return t},initialize:er,subscribe:ei,enableScrollRestoration:e8,navigate:es,fetch:ev,revalidate:eu,// Passthrough to history-aware createHref used by useHref so we get proper
// hash-aware URLs in DOM paths
createHref:t=>e.history.createHref(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:eI,deleteFetcher:eM,dispose:en,getBlocker:eB,deleteBlocker:eq,patchRoutes:tA,_internalFetchControllers:q,_internalActiveDeferreds:Z,// TODO: Remove setRoutes, it's temporary to avoid dealing with
// updating the tree while validating the update algorithm.
_internalSetRoutes:tf};return D}//#endregion
////////////////////////////////////////////////////////////////////////////////
//#region createStaticHandler
////////////////////////////////////////////////////////////////////////////////
const eT=Symbol("deferred");function ek(e,t){c(e.length>0,"You must provide a non-empty routes array to createStaticHandler");let r={};let i=(t?t.basename:null)||"/";let a;if(t!=null&&t.mapRouteProperties){a=t.mapRouteProperties}else if(t!=null&&t.detectErrorBoundary){// If they are still using the deprecated version, wrap it with the new API
let e=t.detectErrorBoundary;a=t=>({hasErrorBoundary:e(t)})}else{a=eE}// Config driven behavior flags
let o=n({v7_relativeSplatPath:false,v7_throwAbortReason:false},t?t.future:null);let s=y(e,a,undefined,r);/**
   * The query() method is intended for document requests, in which we want to
   * call an optional action and potentially multiple loaders for all nested
   * routes.  It returns a StaticHandlerContext object, which is very similar
   * to the router state (location, loaderData, actionData, errors, etc.) and
   * also adds SSR-specific information such as the statusCode and headers
   * from action/loaders Responses.
   *
   * It _should_ never throw and should report all errors through the
   * returned context.errors object, properly associating errors to their error
   * boundary.  Additionally, it tracks _deepestRenderedBoundaryId which can be
   * used to emulate React error boundaries during SSr by performing a second
   * pass only down to the boundaryId.
   *
   * The one exception where we do not return a StaticHandlerContext is when a
   * redirect response is returned or thrown from any action/loader.  We
   * propagate that out and return the raw Response so the HTTP server can
   * return it directly.
   *
   * - `opts.requestContext` is an optional server context that will be passed
   *   to actions/loaders in the `context` parameter
   * - `opts.skipLoaderErrorBubbling` is an optional parameter that will prevent
   *   the bubbling of errors which allows single-fetch-type implementations
   *   where the client will handle the bubbling and we may need to return data
   *   for the handling route
   */async function u(e,t){let{requestContext:r,skipLoaderErrorBubbling:a,dataStrategy:o}=t===void 0?{}:t;let u=new URL(e.url);let c=e.method;let l=p("",h(u),null,"default");let f=w(s,l,i);// SSR supports HEAD requests while SPA doesn't
if(!ts(c)&&c!=="HEAD"){let e=e4(405,{method:c});let{matches:t,route:r}=e6(s);return{basename:i,location:l,matches:t,loaderData:{},actionData:null,errors:{[r.id]:e},statusCode:e.status,loaderHeaders:{},actionHeaders:{},activeDeferreds:null}}else if(!f){let e=e4(404,{pathname:l.pathname});let{matches:t,route:r}=e6(s);return{basename:i,location:l,matches:t,loaderData:{},actionData:null,errors:{[r.id]:e},statusCode:e.status,loaderHeaders:{},actionHeaders:{},activeDeferreds:null}}let v=await d(e,l,f,r,o||null,a===true,null);if(ta(v)){return v}// When returning StaticHandlerContext, we patch back in the location here
// since we need it for React Context.  But this helps keep our submit and
// loadRouteData operating on a Request instead of a Location
return n({location:l,basename:i},v)}/**
   * The queryRoute() method is intended for targeted route requests, either
   * for fetch ?_data requests or resource route requests.  In this case, we
   * are only ever calling a single action or loader, and we are returning the
   * returned value directly.  In most cases, this will be a Response returned
   * from the action/loader, but it may be a primitive or other value as well -
   * and in such cases the calling context should handle that accordingly.
   *
   * We do respect the throw/return differentiation, so if an action/loader
   * throws, then this method will throw the value.  This is important so we
   * can do proper boundary identification in Remix where a thrown Response
   * must go to the Catch Boundary but a returned Response is happy-path.
   *
   * One thing to note is that any Router-initiated Errors that make sense
   * to associate with a status code will be thrown as an ErrorResponse
   * instance which include the raw Error, such that the calling context can
   * serialize the error as they see fit while including the proper response
   * code.  Examples here are 404 and 405 errors that occur prior to reaching
   * any user-defined loaders.
   *
   * - `opts.routeId` allows you to specify the specific route handler to call.
   *   If not provided the handler will determine the proper route by matching
   *   against `request.url`
   * - `opts.requestContext` is an optional server context that will be passed
   *    to actions/loaders in the `context` parameter
   */async function l(e,t){let{routeId:r,requestContext:n,dataStrategy:a}=t===void 0?{}:t;let o=new URL(e.url);let u=e.method;let c=p("",h(o),null,"default");let l=w(s,c,i);// SSR supports HEAD requests while SPA doesn't
if(!ts(u)&&u!=="HEAD"&&u!=="OPTIONS"){throw e4(405,{method:u})}else if(!l){throw e4(404,{pathname:c.pathname})}let f=r?l.find(e=>e.route.id===r):tp(l,c);if(r&&!f){throw e4(403,{pathname:c.pathname,routeId:r})}else if(!f){// This should never hit I don't think?
throw e4(404,{pathname:c.pathname})}let v=await d(e,c,l,n,a||null,false,f);if(ta(v)){return v}let m=v.errors?Object.values(v.errors)[0]:undefined;if(m!==undefined){// If we got back result.errors, that means the loader/action threw
// _something_ that wasn't a Response, but it's not guaranteed/required
// to be an `instanceof Error` either, so we have to use throw here to
// preserve the "error" state outside of queryImpl.
throw m}// Pick off the right state value to return
if(v.actionData){return Object.values(v.actionData)[0]}if(v.loaderData){var g;let e=Object.values(v.loaderData)[0];if((g=v.activeDeferreds)!=null&&g[f.route.id]){e[eT]=v.activeDeferreds[f.route.id]}return e}return undefined}async function d(e,t,r,i,a,o,s){c(e.signal,"query()/queryRoute() requests must contain an AbortController signal");try{if(tu(e.method.toLowerCase())){let n=await f(e,r,s||tp(r,t),i,a,o,s!=null);return n}let u=await v(e,r,i,a,o,s);return ta(u)?u:n({},u,{actionData:null,actionHeaders:{}})}catch(e){// If the user threw/returned a Response in callLoaderOrAction for a
// `queryRoute` call, we throw the `DataStrategyResult` to bail out early
// and then return or throw the raw Response here accordingly
if(e8(e)&&ta(e.result)){if(e.type===g.error){throw e.result}return e.result}// Redirects are always returned since they don't propagate to catch
// boundaries
if(to(e)){return e}throw e}}async function f(e,t,r,i,a,s,u){let c;if(!r.route.action&&!r.route.lazy){let t=e4(405,{method:e.method,pathname:new URL(e.url).pathname,routeId:r.route.id});if(u){throw t}c={type:g.error,error:t}}else{let n=await m("action",e,[r],t,u,i,a);c=n[r.route.id];if(e.signal.aborted){eI(e,u,o)}}if(tr(c)){// Uhhhh - this should never happen, we should always throw these from
// callLoaderOrAction, but the type narrowing here keeps TS happy and we
// can get back on the "throw all redirect responses" train here should
// this ever happen :/
throw new Response(null,{status:c.response.status,headers:{Location:c.response.headers.get("Location")}})}if(te(c)){let e=e4(400,{type:"defer-action"});if(u){throw e}c={type:g.error,error:e}}if(u){// Note: This should only be non-Response values if we get here, since
// isRouteRequest should throw any Response received in callLoaderOrAction
if(tt(c)){throw c.error}return{matches:[r],loaderData:{},actionData:{[r.route.id]:c.data},errors:null,// Note: statusCode + headers are unused here since queryRoute will
// return the raw Response or value
statusCode:200,loaderHeaders:{},actionHeaders:{},activeDeferreds:null}}// Create a GET request for the loaders
let l=new Request(e.url,{headers:e.headers,redirect:e.redirect,signal:e.signal});if(tt(c)){// Store off the pending error - we use it to determine which loaders
// to call and will commit it when we complete the navigation
let e=s?r:e2(t,r.route.id);let o=await v(l,t,i,a,s,null,[e.route.id,c]);// action status codes take precedence over loader status codes
return n({},o,{statusCode:ep(c.error)?c.error.status:c.statusCode!=null?c.statusCode:500,actionData:null,actionHeaders:n({},c.headers?{[r.route.id]:c.headers}:{})})}let d=await v(l,t,i,a,s,null);return n({},d,{actionData:{[r.route.id]:c.data}},c.statusCode?{statusCode:c.statusCode}:{},{actionHeaders:c.headers?{[r.route.id]:c.headers}:{}})}async function v(e,t,r,i,a,s,u){let c=s!=null;// Short circuit if we have no loaders to run (queryRoute())
if(c&&!(s!=null&&s.route.loader)&&!(s!=null&&s.route.lazy)){throw e4(400,{method:e.method,pathname:new URL(e.url).pathname,routeId:s==null?void 0:s.route.id})}let l=s?[s]:u&&tt(u[1])?eM(t,u[0]):t;let d=l.filter(e=>e.route.loader||e.route.lazy);// Short circuit if we have no loaders to run (query())
if(d.length===0){return{matches:t,// Add a null for all matched routes for proper revalidation on the client
loaderData:t.reduce((e,t)=>Object.assign(e,{[t.route.id]:null}),{}),errors:u&&tt(u[1])?{[u[0]]:u[1].error}:null,statusCode:200,loaderHeaders:{},activeDeferreds:null}}let f=await m("loader",e,d,t,c,r,i);if(e.signal.aborted){eI(e,c,o)}// Process and commit output from loaders
let p=new Map;let h=eJ(t,f,u,p,a);// Add a null for any non-loader matches for proper revalidation on the client
let v=new Set(d.map(e=>e.route.id));t.forEach(e=>{if(!v.has(e.route.id)){h.loaderData[e.route.id]=null}});return n({},h,{matches:t,activeDeferreds:p.size>0?Object.fromEntries(p.entries()):null})}// Utility wrapper for calling dataStrategy server-side without having to
// pass around the manifest, mapRouteProperties, etc.
async function m(e,t,n,s,u,c,l){let d=await ez(l||eK,e,null,t,n,s,null,r,a,c);let f={};await Promise.all(s.map(async e=>{if(!(e.route.id in d)){return}let r=d[e.route.id];if(e7(r)){let n=r.result;// Throw redirects and let the server handle them with an HTTP redirect
throw eW(n,t,e.route.id,s,i,o.v7_relativeSplatPath)}if(ta(r.result)&&u){// For SSR single-route requests, we want to hand Responses back
// directly without unwrapping
throw r}f[e.route.id]=await eV(r)}));return f}return{dataRoutes:s,query:u,queryRoute:l}}//#endregion
////////////////////////////////////////////////////////////////////////////////
//#region Helpers
////////////////////////////////////////////////////////////////////////////////
/**
 * Given an existing StaticHandlerContext and an error thrown at render time,
 * provide an updated StaticHandlerContext suitable for a second SSR render
 */function eC(e,t,r){let i=n({},t,{statusCode:ep(r)?r.status:500,errors:{[t._deepestRenderedBoundaryId||e[0].id]:r}});return i}function eI(e,t,r){if(r.v7_throwAbortReason&&e.signal.reason!==undefined){throw e.signal.reason}let n=t?"queryRoute":"query";throw new Error(n+"() call aborted: "+e.method+" "+e.url)}function eR(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==undefined)}function eD(e,t,r,n,i,a,o,s){let u;let c;if(o){// Grab matches up to the calling route so our route-relative logic is
// relative to the correct source route
u=[];for(let e of t){u.push(e);if(e.route.id===o){c=e;break}}}else{u=t;c=t[t.length-1]}// Resolve the relative path
let l=$(i?i:".",G(u,a),U(e.pathname,r)||e.pathname,s==="path");// When `to` is not specified we inherit search/hash from the current
// location, unlike when to="." and we just inherit the path.
// See https://github.com/remix-run/remix/issues/927
if(i==null){l.search=e.search;l.hash=e.hash}// Account for `?index` params when routing to the current location
if((i==null||i===""||i===".")&&c){let e=tf(l.search);if(c.route.index&&!e){// Add one when we're targeting an index route
l.search=l.search?l.search.replace(/^\?/,"?index&"):"?index"}else if(!c.route.index&&e){// Remove existing ones when we're not
let e=new URLSearchParams(l.search);let t=e.getAll("index");e.delete("index");t.filter(e=>e).forEach(t=>e.append("index",t));let r=e.toString();l.search=r?"?"+r:""}}// If we're operating within a basename, prepend it to the pathname.  If
// this is a root navigation, then just use the raw basename which allows
// the basename to have full control over the presence of a trailing slash
// on root actions
if(n&&r!=="/"){l.pathname=l.pathname==="/"?r:X([r,l.pathname])}return h(l)}// Normalize navigation options by converting formMethod=GET formData objects to
// URLSearchParams so they behave identically to links with query params
function eP(e,t,r,n){// Return location verbatim on non-submission navigations
if(!n||!eR(n)){return{path:r}}if(n.formMethod&&!ts(n.formMethod)){return{path:r,error:e4(405,{method:n.formMethod})}}let i=()=>({path:r,error:e4(400,{type:"invalid-body"})});// Create a Submission on non-GET navigations
let a=n.formMethod||"get";let o=e?a.toUpperCase():a.toLowerCase();let s=e3(r);if(n.body!==undefined){if(n.formEncType==="text/plain"){// text only support POST/PUT/PATCH/DELETE submissions
if(!tu(o)){return i()}let e=typeof n.body==="string"?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?// https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#plain-text-form-data
Array.from(n.body.entries()).reduce((e,t)=>{let[r,n]=t;return""+e+r+"="+n+"\n"},""):String(n.body);return{path:r,submission:{formMethod:o,formAction:s,formEncType:n.formEncType,formData:undefined,json:undefined,text:e}}}else if(n.formEncType==="application/json"){// json only supports POST/PUT/PATCH/DELETE submissions
if(!tu(o)){return i()}try{let e=typeof n.body==="string"?JSON.parse(n.body):n.body;return{path:r,submission:{formMethod:o,formAction:s,formEncType:n.formEncType,formData:undefined,json:e,text:undefined}}}catch(e){return i()}}}c(typeof FormData==="function","FormData is not available in this environment");let u;let l;if(n.formData){u=eQ(n.formData);l=n.formData}else if(n.body instanceof FormData){u=eQ(n.body);l=n.body}else if(n.body instanceof URLSearchParams){u=n.body;l=eX(u)}else if(n.body==null){u=new URLSearchParams;l=new FormData}else{try{u=new URLSearchParams(n.body);l=eX(u)}catch(e){return i()}}let d={formMethod:o,formAction:s,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:l,json:undefined,text:undefined};if(tu(d.formMethod)){return{path:r,submission:d}}// Flatten submission onto URLSearchParams for GET submissions
let f=v(r);// On GET navigation submissions we can drop the ?index param from the
// resulting location since all loaders will run.  But fetcher GET submissions
// only run a single loader so we need to preserve any incoming ?index params
if(t&&f.search&&tf(f.search)){u.append("index","")}f.search="?"+u;return{path:h(f),submission:d}}// Filter out all routes at/below any caught error as they aren't going to
// render so we don't need to load them
function eM(e,t,r){if(r===void 0){r=false}let n=e.findIndex(e=>e.route.id===t);if(n>=0){return e.slice(0,r?n+1:n)}return e}function eF(e,t,r,i,a,o,s,u,c,l,d,f,p,h,v,m){let g=m?tt(m[1])?m[1].error:m[1].data:undefined;let b=e.createURL(t.location);let _=e.createURL(a);// Pick navigation matches that are net-new or qualify for revalidation
let y=r;if(o&&t.errors){// On initial hydration, only consider matches up to _and including_ the boundary.
// This is inclusive to handle cases where a server loader ran successfully,
// a child server loader bubbled up to this route, but this route has
// `clientLoader.hydrate` so we want to still run the `clientLoader` so that
// we have a complete version of `loaderData`
y=eM(r,Object.keys(t.errors)[0],true)}else if(m&&tt(m[1])){// If an action threw an error, we call loaders up to, but not including the
// boundary
y=eM(r,m[0])}// Don't revalidate loaders by default after action 4xx/5xx responses
// when the flag is enabled.  They can still opt-into revalidation via
// `shouldRevalidate` via `actionResult`
let A=m?m[1].statusCode:undefined;let x=s&&A&&A>=400;let E=y.filter((e,r)=>{let{route:a}=e;if(a.lazy){// We haven't loaded this route yet so we don't know if it's got a loader!
return true}if(a.loader==null){return false}if(o){return eY(a,t.loaderData,t.errors)}// Always call the loader on new route instances and pending defer cancellations
if(eL(t.loaderData,t.matches[r],e)||c.some(t=>t===e.route.id)){return true}// This is the default implementation for when we revalidate.  If the route
// provides it's own implementation, then we give them full control but
// provide this value so they can leverage it if needed after they check
// their own specific use cases
let s=t.matches[r];let l=e;return eH(e,n({currentUrl:b,currentParams:s.params,nextUrl:_,nextParams:l.params},i,{actionResult:g,actionStatus:A,defaultShouldRevalidate:x?false:// Forced revalidation due to submission, useRevalidator, or X-Remix-Revalidate
u||b.pathname+b.search===_.pathname+_.search||// Search params affect all loaders
b.search!==_.search||eN(s,l)}))});// Pick fetcher.loads that need to be revalidated
let O=[];f.forEach((e,a)=>{// Don't revalidate:
//  - on initial hydration (shouldn't be any fetchers then anyway)
//  - if fetcher won't be present in the subsequent render
//    - no longer matches the URL (v7_fetcherPersist=false)
//    - was unmounted but persisted due to v7_fetcherPersist=true
if(o||!r.some(t=>t.route.id===e.routeId)||d.has(a)){return}let s=w(h,e.path,v);// If the fetcher path no longer matches, push it in with null matches so
// we can trigger a 404 in callLoadersAndMaybeResolveData.  Note this is
// currently only a use-case for Remix HMR where the route tree can change
// at runtime and remove a route previously loaded via a fetcher
if(!s){O.push({key:a,routeId:e.routeId,path:e.path,matches:null,match:null,controller:null});return}// Revalidating fetchers are decoupled from the route matches since they
// load from a static href.  They revalidate based on explicit revalidation
// (submission, useRevalidator, or X-Remix-Revalidate)
let c=t.fetchers.get(a);let f=tp(s,e.path);let m=false;if(p.has(a)){// Never trigger a revalidation of an actively redirecting fetcher
m=false}else if(l.has(a)){// Always mark for revalidation if the fetcher was cancelled
l.delete(a);m=true}else if(c&&c.state!=="idle"&&c.data===undefined){// If the fetcher hasn't ever completed loading yet, then this isn't a
// revalidation, it would just be a brand new load if an explicit
// revalidation is required
m=u}else{// Otherwise fall back on any user-defined shouldRevalidate, defaulting
// to explicit revalidations only
m=eH(f,n({currentUrl:b,currentParams:t.matches[t.matches.length-1].params,nextUrl:_,nextParams:r[r.length-1].params},i,{actionResult:g,actionStatus:A,defaultShouldRevalidate:x?false:u}))}if(m){O.push({key:a,routeId:e.routeId,path:e.path,matches:s,match:f,controller:new AbortController})}});return[E,O]}function eY(e,t,r){// We dunno if we have a loader - gotta find out!
if(e.lazy){return true}// No loader, nothing to initialize
if(!e.loader){return false}let n=t!=null&&t[e.id]!==undefined;let i=r!=null&&r[e.id]!==undefined;// Don't run if we error'd during SSR
if(!n&&i){return false}// Explicitly opting-in to running on hydration
if(typeof e.loader==="function"&&e.loader.hydrate===true){return true}// Otherwise, run if we're not yet initialized with anything
return!n&&!i}function eL(e,t,r){let n=// [a] -> [a, b]
!t||// [a, b] -> [a, c]
r.route.id!==t.route.id;// Handle the case that we don't have data for a re-used route, potentially
// from a prior error or from a cancelled pending deferred
let i=e[r.route.id]===undefined;// Always load if this is a net-new route or we don't yet have data
return n||i}function eN(e,t){let r=e.route.path;return(// param change for this match, /users/123 -> /users/456
e.pathname!==t.pathname||// splat param changed, which is not present in match.path
// e.g. /files/images/avatar.jpg -> files/finances.xls
r!=null&&r.endsWith("*")&&e.params["*"]!==t.params["*"])}function eH(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if(typeof r==="boolean"){return r}}return t.defaultShouldRevalidate}function ej(e,t,r,n,i){var a;let o;if(e){let t=n[e];c(t,"No route found to patch children into: routeId = "+e);if(!t.children){t.children=[]}o=t.children}else{o=r}// Don't patch in routes we already know about so that `patch` is idempotent
// to simplify user-land code. This is useful because we re-call the
// `patchRoutesOnNavigation` function for matched routes with params.
let s=t.filter(e=>!o.some(t=>eU(e,t)));let u=y(s,i,[e||"_","patch",String(((a=o)==null?void 0:a.length)||"0")],n);o.push(...u)}function eU(e,t){// Most optimal check is by id
if("id"in e&&"id"in t&&e.id===t.id){return true}// Second is by pathing differences
if(!(e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive)){return false}// Pathless layout routes are trickier since we need to check children.
// If they have no children then they're the same as far as we can tell
if((!e.children||e.children.length===0)&&(!t.children||t.children.length===0)){return true}// Otherwise, we look to see if every child in the new route is already
// represented in the existing route's children
return e.children.every((e,r)=>{var n;return(n=t.children)==null?void 0:n.some(t=>eU(e,t))})}/**
 * Execute route.lazy() methods to lazily load route modules (loader, action,
 * shouldRevalidate) and update the routeManifest in place which shares objects
 * with dataRoutes so those get updated as well.
 */async function eB(e,t,r){if(!e.lazy){return}let i=await e.lazy();// If the lazy route function was executed and removed by another parallel
// call then we can return - first lazy() to finish wins because the return
// value of lazy is expected to be static
if(!e.lazy){return}let a=r[e.id];c(a,"No route found in manifest");// Update the route in place.  This should be safe because there's no way
// we could yet be sitting on this route as we can't get there without
// resolving lazy() first.
//
// This is different than the HMR "update" use-case where we may actively be
// on the route being updated.  The main concern boils down to "does this
// mutation affect any ongoing navigations or any current state.matches
// values?".  If not, it should be safe to update in place.
let o={};for(let e in i){let t=a[e];let r=t!==undefined&&// This property isn't static since it should always be updated based
// on the route updates
e!=="hasErrorBoundary";l(!r,'Route "'+a.id+'" has a static property "'+e+'" '+"defined but its lazy function is also returning a value for this property. "+('The lazy route property "'+e+'" will be ignored.'));if(!r&&!b.has(e)){o[e]=i[e]}}// Mutate the route with the provided updates.  Do this first so we pass
// the updated version to mapRouteProperties
Object.assign(a,o);// Mutate the `hasErrorBoundary` property on the route based on the route
// updates and remove the `lazy` function so we don't resolve the lazy
// route again.
Object.assign(a,n({},t(a),{lazy:undefined}))}// Default implementation of `dataStrategy` which fetches all loaders in parallel
async function eK(e){let{matches:t}=e;let r=t.filter(e=>e.shouldLoad);let n=await Promise.all(r.map(e=>e.resolve()));return n.reduce((e,t,n)=>Object.assign(e,{[r[n].route.id]:t}),{})}async function ez(e,t,r,i,a,o,s,u,c,l){let d=o.map(e=>e.route.lazy?eB(e.route,c,u):undefined);let f=o.map((e,r)=>{let o=d[r];let s=a.some(t=>t.route.id===e.route.id);// `resolve` encapsulates route.lazy(), executing the loader/action,
// and mapping return values/thrown errors to a `DataStrategyResult`.  Users
// can pass a callback to take fine-grained control over the execution
// of the loader/action
let u=async r=>{if(r&&i.method==="GET"&&(e.route.lazy||e.route.loader)){s=true}return s?eq(t,i,e,o,r,l):Promise.resolve({type:g.data,result:undefined})};return n({},e,{shouldLoad:s,resolve:u})});// Send all matches here to allow for a middleware-type implementation.
// handler will be a no-op for unneeded routes and we filter those results
// back out below.
let p=await e({matches:f,request:i,params:o[0].params,fetcherKey:s,context:l});// Wait for all routes to load here but 'swallow the error since we want
// it to bubble up from the `await loadRoutePromise` in `callLoaderOrAction` -
// called from `match.resolve()`
try{await Promise.all(d)}catch(e){// No-op
}return p}// Default logic for calling a loader/action is the user has no specified a dataStrategy
async function eq(e,t,r,n,i,a){let o;let s;let u=n=>{// Setup a promise we can race against so that abort signals short circuit
let o;// This will never resolve so safe to type it as Promise<DataStrategyResult> to
// satisfy the function return value
let u=new Promise((e,t)=>o=t);s=()=>o();t.signal.addEventListener("abort",s);let c=i=>{if(typeof n!=="function"){return Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+e+'" [routeId: '+r.route.id+"]")))}return n({request:t,params:r.params,context:a},...i!==undefined?[i]:[])};let l=(async()=>{try{let e=await (i?i(e=>c(e)):c());return{type:"data",result:e}}catch(e){return{type:"error",result:e}}})();return Promise.race([l,u])};try{let i=r.route[e];// If we have a route.lazy promise, await that first
if(n){if(i){// Run statically defined handler in parallel with lazy()
let e;let[t]=await Promise.all([// If the handler throws, don't let it immediately bubble out,
// since we need to let the lazy() execution finish so we know if this
// route has a boundary that can handle the error
u(i).catch(t=>{e=t}),n]);if(e!==undefined){throw e}o=t}else{// Load lazy route module, then run any returned handler
await n;i=r.route[e];if(i){// Handler still runs even if we got interrupted to maintain consistency
// with un-abortable behavior of handler execution on non-lazy or
// previously-lazy-loaded routes
o=await u(i)}else if(e==="action"){let e=new URL(t.url);let n=e.pathname+e.search;throw e4(405,{method:t.method,pathname:n,routeId:r.route.id})}else{// lazy() route has no loader to run.  Short circuit here so we don't
// hit the invariant below that errors on returning undefined.
return{type:g.data,result:undefined}}}}else if(!i){let e=new URL(t.url);let r=e.pathname+e.search;throw e4(404,{pathname:r})}else{o=await u(i)}c(o.result!==undefined,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+r.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(e){// We should already be catching and converting normal handler executions to
// DataStrategyResults and returning them, so anything that throws here is an
// unexpected error we still need to wrap
return{type:g.error,result:e}}finally{if(s){t.signal.removeEventListener("abort",s)}}return o}async function eV(e){let{result:t,type:r}=e;if(ta(t)){let e;try{let r=t.headers.get("Content-Type");// Check between word boundaries instead of startsWith() due to the last
// paragraph of https://httpwg.org/specs/rfc9110.html#field.content-type
if(r&&/\bapplication\/json\b/.test(r)){if(t.body==null){e=null}else{e=await t.json()}}else{e=await t.text()}}catch(e){return{type:g.error,error:e}}if(r===g.error){return{type:g.error,error:new ef(t.status,t.statusText,e),statusCode:t.status,headers:t.headers}}return{type:g.data,data:e,statusCode:t.status,headers:t.headers}}if(r===g.error){if(tn(t)){var n,i;if(t.data instanceof Error){var a,o;return{type:g.error,error:t.data,statusCode:(a=t.init)==null?void 0:a.status,headers:(o=t.init)!=null&&o.headers?new Headers(t.init.headers):undefined}}// Convert thrown data() to ErrorResponse instances
return{type:g.error,error:new ef(((n=t.init)==null?void 0:n.status)||500,undefined,t.data),statusCode:ep(t)?t.status:undefined,headers:(i=t.init)!=null&&i.headers?new Headers(t.init.headers):undefined}}return{type:g.error,error:t,statusCode:ep(t)?t.status:undefined}}if(ti(t)){var s,u;return{type:g.deferred,deferredData:t,statusCode:(s=t.init)==null?void 0:s.status,headers:((u=t.init)==null?void 0:u.headers)&&new Headers(t.init.headers)}}if(tn(t)){var c,l;return{type:g.data,data:t.data,statusCode:(c=t.init)==null?void 0:c.status,headers:(l=t.init)!=null&&l.headers?new Headers(t.init.headers):undefined}}return{type:g.data,data:t}}// Support relative routing in internal redirects
function eW(e,t,r,n,i,a){let o=e.headers.get("Location");c(o,"Redirects returned/thrown from loaders/actions must have a Location header");if(!ex.test(o)){let s=n.slice(0,n.findIndex(e=>e.route.id===r)+1);o=eD(new URL(t.url),s,i,true,o,a);e.headers.set("Location",o)}return e}function eG(e,t,r){if(ex.test(e)){// Strip off the protocol+origin for same-origin + same-basename absolute redirects
let n=e;let i=n.startsWith("//")?new URL(t.protocol+n):new URL(n);let a=U(i.pathname,r)!=null;if(i.origin===t.origin&&a){return i.pathname+i.search+i.hash}}return e}// Utility method for creating the Request instances for loaders/actions during
// client-side navigations and fetches.  During SSR we will always have a
// Request instance from the static handler (query/queryRoute)
function e$(e,t,r,n){let i=e.createURL(e3(t)).toString();let a={signal:r};if(n&&tu(n.formMethod)){let{formMethod:e,formEncType:t}=n;// Didn't think we needed this but it turns out unlike other methods, patch
// won't be properly normalized to uppercase and results in a 405 error.
// See: https://fetch.spec.whatwg.org/#concept-method
a.method=e.toUpperCase();if(t==="application/json"){a.headers=new Headers({"Content-Type":t});a.body=JSON.stringify(n.json)}else if(t==="text/plain"){// Content-Type is inferred (https://fetch.spec.whatwg.org/#dom-request)
a.body=n.text}else if(t==="application/x-www-form-urlencoded"&&n.formData){// Content-Type is inferred (https://fetch.spec.whatwg.org/#dom-request)
a.body=eQ(n.formData)}else{// Content-Type is inferred (https://fetch.spec.whatwg.org/#dom-request)
a.body=n.formData}}return new Request(i,a)}function eQ(e){let t=new URLSearchParams;for(let[r,n]of e.entries()){// https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#converting-an-entry-list-to-a-list-of-name-value-pairs
t.append(r,typeof n==="string"?n:n.name)}return t}function eX(e){let t=new FormData;for(let[r,n]of e.entries()){t.append(r,n)}return t}function eJ(e,t,r,n,i){// Fill in loaderData/errors from our loaders
let a={};let o=null;let s;let u=false;let l={};let d=r&&tt(r[1])?r[1].error:undefined;// Process loader results into state.loaderData/state.errors
e.forEach(r=>{if(!(r.route.id in t)){return}let f=r.route.id;let p=t[f];c(!tr(p),"Cannot handle redirect results in processLoaderData");if(tt(p)){let t=p.error;// If we have a pending action error, we report it at the highest-route
// that throws a loader error, and then clear it out to indicate that
// it was consumed
if(d!==undefined){t=d;d=undefined}o=o||{};if(i){o[f]=t}else{// Look upwards from the matched route for the closest ancestor error
// boundary, defaulting to the root match.  Prefer higher error values
// if lower errors bubble to the same boundary
let r=e2(e,f);if(o[r.route.id]==null){o[r.route.id]=t}}// Clear our any prior loaderData for the throwing route
a[f]=undefined;// Once we find our first (highest) error, we set the status code and
// prevent deeper status codes from overriding
if(!u){u=true;s=ep(p.error)?p.error.status:500}if(p.headers){l[f]=p.headers}}else{if(te(p)){n.set(f,p.deferredData);a[f]=p.deferredData.data;// Error status codes always override success status codes, but if all
// loaders are successful we take the deepest status code.
if(p.statusCode!=null&&p.statusCode!==200&&!u){s=p.statusCode}if(p.headers){l[f]=p.headers}}else{a[f]=p.data;// Error status codes always override success status codes, but if all
// loaders are successful we take the deepest status code.
if(p.statusCode&&p.statusCode!==200&&!u){s=p.statusCode}if(p.headers){l[f]=p.headers}}}});// If we didn't consume the pending action error (i.e., all loaders
// resolved), then consume it here.  Also clear out any loaderData for the
// throwing route
if(d!==undefined&&r){o={[r[0]]:d};a[r[0]]=undefined}return{loaderData:a,errors:o,statusCode:s||200,loaderHeaders:l}}function eZ(e,t,r,i,a,o,s){let{loaderData:u,errors:l}=eJ(t,r,i,s,false// This method is only called client side so we always want to bubble
);// Process results from our revalidating fetchers
a.forEach(t=>{let{key:r,match:i,controller:a}=t;let s=o[r];c(s,"Did not find corresponding fetcher result");// Process fetcher non-redirect errors
if(a&&a.signal.aborted){// Nothing to do for aborted fetchers
return}else if(tt(s)){let t=e2(e.matches,i==null?void 0:i.route.id);if(!(l&&l[t.route.id])){l=n({},l,{[t.route.id]:s.error})}e.fetchers.delete(r)}else if(tr(s)){// Should never get here, redirects should get processed above, but we
// keep this to type narrow to a success result in the else
c(false,"Unhandled fetcher revalidation redirect")}else if(te(s)){// Should never get here, deferred data should be awaited for fetchers
// in resolveDeferredResults
c(false,"Unhandled fetcher deferred data")}else{let t=t_(s.data);e.fetchers.set(r,t)}});return{loaderData:u,errors:l}}function e0(e,t,r,i){let a=n({},t);for(let n of r){let r=n.route.id;if(t.hasOwnProperty(r)){if(t[r]!==undefined){a[r]=t[r]}}else if(e[r]!==undefined&&n.route.loader){// Preserve existing keys not included in newLoaderData and where a loader
// wasn't removed by HMR
a[r]=e[r]}if(i&&i.hasOwnProperty(r)){break}}return a}function e1(e){if(!e){return{}}return tt(e[1])?{// Clear out prior actionData on errors
actionData:{}}:{actionData:{[e[0]]:e[1].data}}}// Find the nearest error boundary, looking upwards from the leaf route (or the
// route specified by routeId) for the closest ancestor error boundary,
// defaulting to the root match
function e2(e,t){let r=t?e.slice(0,e.findIndex(e=>e.route.id===t)+1):[...e];return r.reverse().find(e=>e.route.hasErrorBoundary===true)||e[0]}function e6(e){// Prefer a root layout route if present, otherwise shim in a route object
let t=e.length===1?e[0]:e.find(e=>e.index||!e.path||e.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function e4(e,t){let{pathname:r,routeId:n,method:i,type:a,message:o}=t===void 0?{}:t;let s="Unknown Server Error";let u="Unknown @remix-run/router error";if(e===400){s="Bad Request";if(i&&r&&n){u="You made a "+i+' request to "'+r+'" but '+('did not provide a `loader` for route "'+n+'", ')+"so there is no way to handle the request."}else if(a==="defer-action"){u="defer() is not supported in actions"}else if(a==="invalid-body"){u="Unable to encode submission body"}}else if(e===403){s="Forbidden";u='Route "'+n+'" does not match URL "'+r+'"'}else if(e===404){s="Not Found";u='No route matches URL "'+r+'"'}else if(e===405){s="Method Not Allowed";if(i&&r&&n){u="You made a "+i.toUpperCase()+' request to "'+r+'" but '+('did not provide an `action` for route "'+n+'", ')+"so there is no way to handle the request."}else if(i){u='Invalid request method "'+i.toUpperCase()+'"'}}return new ef(e||500,s,new Error(u),true)}// Find any returned redirect errors, starting from the lowest match
function e5(e){let t=Object.entries(e);for(let e=t.length-1;e>=0;e--){let[r,n]=t[e];if(tr(n)){return{key:r,result:n}}}}function e3(e){let t=typeof e==="string"?v(e):e;return h(n({},t,{hash:""}))}function e9(e,t){if(e.pathname!==t.pathname||e.search!==t.search){return false}if(e.hash===""){// /page -> /page#hash
return t.hash!==""}else if(e.hash===t.hash){// /page#hash -> /page#hash
return true}else if(t.hash!==""){// /page#hash -> /page#other
return true}// If the hash is removed the browser will re-perform a request to the server
// /page#hash -> /page
return false}function e8(e){return e!=null&&typeof e==="object"&&"type"in e&&"result"in e&&(e.type===g.data||e.type===g.error)}function e7(e){return ta(e.result)&&eb.has(e.result.status)}function te(e){return e.type===g.deferred}function tt(e){return e.type===g.error}function tr(e){return(e&&e.type)===g.redirect}function tn(e){return typeof e==="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function ti(e){let t=e;return t&&typeof t==="object"&&typeof t.data==="object"&&typeof t.subscribe==="function"&&typeof t.cancel==="function"&&typeof t.resolveData==="function"}function ta(e){return e!=null&&typeof e.status==="number"&&typeof e.statusText==="string"&&typeof e.headers==="object"&&typeof e.body!=="undefined"}function to(e){if(!ta(e)){return false}let t=e.status;let r=e.headers.get("Location");return t>=300&&t<=399&&r!=null}function ts(e){return eg.has(e.toLowerCase())}function tu(e){return ev.has(e.toLowerCase())}async function tc(e,t,r,n,i){let a=Object.entries(t);for(let o=0;o<a.length;o++){let[s,u]=a[o];let c=e.find(e=>(e==null?void 0:e.route.id)===s);// If we don't have a match, then we can have a deferred result to do
// anything with.  This is for revalidating fetchers where the route was
// removed during HMR
if(!c){continue}let l=n.find(e=>e.route.id===c.route.id);let d=l!=null&&!eN(l,c)&&(i&&i[c.route.id])!==undefined;if(te(u)&&d){// Note: we do not have to touch activeDeferreds here since we race them
// against the signal in resolveDeferredData and they'll get aborted
// there if needed
await td(u,r,false).then(e=>{if(e){t[s]=e}})}}}async function tl(e,t,r){for(let n=0;n<r.length;n++){let{key:i,routeId:a,controller:o}=r[n];let s=t[i];let u=e.find(e=>(e==null?void 0:e.route.id)===a);// If we don't have a match, then we can have a deferred result to do
// anything with.  This is for revalidating fetchers where the route was
// removed during HMR
if(!u){continue}if(te(s)){// Note: we do not have to touch activeDeferreds here since we race them
// against the signal in resolveDeferredData and they'll get aborted
// there if needed
c(o,"Expected an AbortController for revalidating fetcher deferred result");await td(s,o.signal,true).then(e=>{if(e){t[i]=e}})}}}async function td(e,t,r){if(r===void 0){r=false}let n=await e.deferredData.resolveData(t);if(n){return}if(r){try{return{type:g.data,data:e.deferredData.unwrappedData}}catch(e){// Handle any TrackedPromise._error values encountered while unwrapping
return{type:g.error,error:e}}}return{type:g.data,data:e.deferredData.data}}function tf(e){return new URLSearchParams(e).getAll("index").some(e=>e==="")}function tp(e,t){let r=typeof t==="string"?v(t).search:t.search;if(e[e.length-1].route.index&&tf(r||"")){// Return the leaf index route when index is present
return e[e.length-1]}// Otherwise grab the deepest "path contributing" match (ignoring index and
// pathless layout routes)
let n=W(e);return n[n.length-1]}function th(e){let{formMethod:t,formAction:r,formEncType:n,text:i,formData:a,json:o}=e;if(!t||!r||!n){return}if(i!=null){return{formMethod:t,formAction:r,formEncType:n,formData:undefined,json:undefined,text:i}}else if(a!=null){return{formMethod:t,formAction:r,formEncType:n,formData:a,json:undefined,text:undefined}}else if(o!==undefined){return{formMethod:t,formAction:r,formEncType:n,formData:undefined,json:o,text:undefined}}}function tv(e,t){if(t){let r={state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text};return r}else{let t={state:"loading",location:e,formMethod:undefined,formAction:undefined,formEncType:undefined,formData:undefined,json:undefined,text:undefined};return t}}function tm(e,t){let r={state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text};return r}function tg(e,t){if(e){let r={state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t};return r}else{let e={state:"loading",formMethod:undefined,formAction:undefined,formEncType:undefined,formData:undefined,json:undefined,text:undefined,data:t};return e}}function tb(e,t){let r={state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:undefined};return r}function t_(e){let t={state:"idle",formMethod:undefined,formAction:undefined,formEncType:undefined,formData:undefined,json:undefined,text:undefined,data:e};return t}function ty(e,t){try{let r=e.sessionStorage.getItem(eO);if(r){let e=JSON.parse(r);for(let[r,n]of Object.entries(e||{})){if(n&&Array.isArray(n)){t.set(r,new Set(n||[]))}}}}catch(e){// no-op, use default empty object
}}function tw(e,t){if(t.size>0){let r={};for(let[e,n]of t){r[e]=[...n]}try{e.sessionStorage.setItem(eO,JSON.stringify(r))}catch(e){l(false,"Failed to save applied view transitions in sessionStorage ("+e+").")}}}//#endregion
//# sourceMappingURL=router.js.map
},1276:function(e,t,r){"use strict";r.d(t,{A:()=>O});/* import */var n=r(75057);/* import */var i=r(41594);/* import */var a=/*#__PURE__*/r.n(i);/* import */var o=r(75206);/* import */var s=/*#__PURE__*/r.n(o);function u(e,t){if(e==null)return{};var r={};var n=Object.keys(e);var i,a;for(a=0;a<n.length;a++){i=n[a];if(t.indexOf(i)>=0)continue;r[i]=e[i]}return r}var c=typeof window!=="undefined"&&typeof document!=="undefined";function l(e,t){if(e){if(typeof e==="function"){e(t)}if(({}).hasOwnProperty.call(e,"current")){e.current=t}}}function d(){return c&&document.createElement("div")}function f(e){var t={"data-placement":e.placement};if(e.referenceHidden){t["data-reference-hidden"]=""}if(e.escaped){t["data-escaped"]=""}return t}function p(e,t){if(e===t){return true}else if(typeof e==="object"&&e!=null&&typeof t==="object"&&t!=null){if(Object.keys(e).length!==Object.keys(t).length){return false}for(var r in e){if(t.hasOwnProperty(r)){if(!p(e[r],t[r])){return false}}else{return false}}return true}else{return false}}function h(e){var t=[];e.forEach(function(e){if(!t.find(function(t){return p(e,t)})){t.push(e)}});return t}function v(e,t){var r,n;return Object.assign({},t,{popperOptions:Object.assign({},e.popperOptions,t.popperOptions,{modifiers:h([].concat(((r=e.popperOptions)==null?void 0:r.modifiers)||[],((n=t.popperOptions)==null?void 0:n.modifiers)||[]))})})}var m=c?i.useLayoutEffect:i.useEffect;function g(e){// Using refs instead of state as it's recommended to not store imperative
// values in state due to memory problems in React(?)
var t=(0,i.useRef)();if(!t.current){t.current=typeof e==="function"?e():e}return t.current}function b(e,t,r){r.split(/\s+/).forEach(function(r){if(r){e.classList[t](r)}})}var _={name:"className",defaultValue:"",fn:function e(e){var t=e.popper.firstElementChild;var r=function t(){var t;return!!((t=e.props.render)==null?void 0:t.$$tippy)};function n(){if(e.props.className&&!r()){if(false){}return}b(t,"add",e.props.className)}function i(){if(r()){b(t,"remove",e.props.className)}}return{onCreate:n,onBeforeUpdate:i,onAfterUpdate:n}}};function y(e){function t(t){var r=t.children,n=t.content,s=t.visible,c=t.singleton,p=t.render,h=t.reference,b=t.disabled,y=b===void 0?false:b,w=t.ignoreAttributes,A=w===void 0?true:w,x=t.__source,E=t.__self,O=u(t,["children","content","visible","singleton","render","reference","disabled","ignoreAttributes","__source","__self"]);var S=s!==undefined;var T=c!==undefined;var k=(0,i.useState)(false),C=k[0],I=k[1];var R=(0,i.useState)({}),D=R[0],P=R[1];var M=(0,i.useState)(),F=M[0],Y=M[1];var L=g(function(){return{container:d(),renders:1}});var N=Object.assign({ignoreAttributes:A},O,{content:L.container});if(S){if(false){}N.trigger="manual";N.hideOnClick=false}if(T){y=true}var H=N;var j=N.plugins||[];if(p){H=Object.assign({},N,{plugins:T&&c.data!=null?[].concat(j,[{fn:function e(){return{onTrigger:function e(e,t){var r=c.data.children.find(function(e){var r=e.instance;return r.reference===t.currentTarget});e.state.$$activeSingletonInstance=r.instance;Y(r.content)}}}}]):j,render:function e(){return{popper:L.container}}})}var U=[h].concat(r?[r.type]:[]);// CREATE
m(function(){var t=h;if(h&&h.hasOwnProperty("current")){t=h.current}var r=e(t||L.ref||d(),Object.assign({},H,{plugins:[_].concat(N.plugins||[])}));L.instance=r;if(y){r.disable()}if(s){r.show()}if(T){c.hook({instance:r,content:n,props:H,setSingletonContent:Y})}I(true);return function(){r.destroy();c==null?void 0:c.cleanup(r)}},U);// UPDATE
m(function(){var e;// Prevent this effect from running on 1st render
if(L.renders===1){L.renders++;return}var t=L.instance;t.setProps(v(t.props,H));// Fixes #264
(e=t.popperInstance)==null?void 0:e.forceUpdate();if(y){t.disable()}else{t.enable()}if(S){if(s){t.show()}else{t.hide()}}if(T){c.hook({instance:t,content:n,props:H,setSingletonContent:Y})}});m(function(){var e;if(!p){return}var t=L.instance;t.setProps({popperOptions:Object.assign({},t.props.popperOptions,{modifiers:[].concat((((e=t.props.popperOptions)==null?void 0:e.modifiers)||[]).filter(function(e){var t=e.name;return t!=="$$tippyReact"}),[{name:"$$tippyReact",enabled:true,phase:"beforeWrite",requires:["computeStyles"],fn:function e(e){var t;var r=e.state;var n=(t=r.modifiersData)==null?void 0:t.hide;// WARNING: this is a high-risk path that can cause an infinite
// loop. This expression _must_ evaluate to false when required
if(D.placement!==r.placement||D.referenceHidden!==(n==null?void 0:n.isReferenceHidden)||D.escaped!==(n==null?void 0:n.hasPopperEscaped)){P({placement:r.placement,referenceHidden:n==null?void 0:n.isReferenceHidden,escaped:n==null?void 0:n.hasPopperEscaped})}r.attributes.popper={}}}])})})},[D.placement,D.referenceHidden,D.escaped].concat(U));return /*#__PURE__*/a().createElement(a().Fragment,null,r?/*#__PURE__*/(0,i.cloneElement)(r,{ref:function e(e){L.ref=e;l(r.ref,e)}}):null,C&&/*#__PURE__*/(0,o.createPortal)(p?p(f(D),F,L.instance):n,L.container))}return t}function w(e){return function t(t){var r=t===void 0?{}:t,n=r.disabled,i=n===void 0?false:n,a=r.overrides,o=a===void 0?[]:a;var s=useState(false),c=s[0],l=s[1];var d=g({children:[],renders:1});m(function(){if(!c){l(true);return}var t=d.children,r=d.sourceData;if(!r){if(false){}return}var n=e(t.map(function(e){return e.instance}),Object.assign({},r.props,{popperOptions:r.instance.props.popperOptions,overrides:o,plugins:[_].concat(r.props.plugins||[])}));d.instance=n;if(i){n.disable()}return function(){n.destroy();d.children=t.filter(function(e){var t=e.instance;return!t.state.isDestroyed})}},[c]);m(function(){if(!c){return}if(d.renders===1){d.renders++;return}var e=d.children,t=d.instance,r=d.sourceData;if(!(t&&r)){return}var n=r.props,a=n.content,s=u(n,["content"]);t.setProps(v(t.props,Object.assign({},s,{overrides:o})));t.setInstances(e.map(function(e){return e.instance}));if(i){t.disable()}else{t.enable()}});return useMemo(function(){var e={data:d,hook:function e(e){d.sourceData=e;d.setSingletonContent=e.setSingletonContent},cleanup:function e(){d.sourceData=null}};var t={hook:function e(e){var t,r;d.children=d.children.filter(function(t){var r=t.instance;return e.instance!==r});d.children.push(e);if(((t=d.instance)==null?void 0:t.state.isMounted)&&((r=d.instance)==null?void 0:r.state.$$activeSingletonInstance)===e.instance){d.setSingletonContent==null?void 0:d.setSingletonContent(e.content)}if(d.instance&&!d.instance.state.isDestroyed){d.instance.setInstances(d.children.map(function(e){return e.instance}))}},cleanup:function e(e){d.children=d.children.filter(function(t){return t.instance!==e});if(d.instance&&!d.instance.state.isDestroyed){d.instance.setInstances(d.children.map(function(e){return e.instance}))}}};return[e,t]},[])}}var A=function(e,t){return/*#__PURE__*/(0,i.forwardRef)(function r(r,n){var o=r.children,s=u(r,["children"]);return(/*#__PURE__*/// If I spread them separately here, Babel adds the _extends ponyfill for
// some reason
a().createElement(e,Object.assign({},t,s),o?/*#__PURE__*/(0,i.cloneElement)(o,{ref:function e(e){l(n,e);l(o.ref,e)}}):null))})};var x=/*#__PURE__*//* unused pure expression or super */null&&w(createSingleton);var E=/*#__PURE__*/A(/*#__PURE__*/y(n/* ["default"] */.Ay),{render:function e(){return""}});/* export default */const O=E;//# sourceMappingURL=tippy-react-headless.esm.js.map
},60967:function(e,t){/*!
 * CSSJanus. https://www.mediawiki.org/wiki/CSSJanus
 *
 * Copyright 2014 Trevor Parscal
 * Copyright 2010 Roan Kattouw
 * Copyright 2008 Google Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */var r;/**
 * Create a tokenizer object.
 *
 * This utility class is used by CSSJanus to protect strings by replacing them temporarily with
 * tokens and later transforming them back.
 *
 * @class
 * @constructor
 * @param {RegExp} regex Regular expression whose matches to replace by a token
 * @param {string} token Placeholder text
 */function n(e,t){var r=[],n=0;/**
	 * Add a match.
	 *
	 * @private
	 * @param {string} match Matched string
	 * @return {string} Token to leave in the matched string's place
	 */function i(e){r.push(e);return t}/**
	 * Get a match.
	 *
	 * @private
	 * @return {string} Original matched string to restore
	 */function a(){return r[n++]}return{/**
		 * Replace matching strings with tokens.
		 *
		 * @param {string} str String to tokenize
		 * @return {string} Tokenized string
		 */tokenize:function(t){return t.replace(e,i)},/**
		 * Restores tokens to their original values.
		 *
		 * @param {string} str String previously run through tokenize()
		 * @return {string} Original string
		 */detokenize:function(e){return e.replace(new RegExp("("+t+")","g"),a)}}}/**
 * Create a CSSJanus object.
 *
 * CSSJanus transforms CSS rules with horizontal relevance so that a left-to-right stylesheet can
 * become a right-to-left stylesheet automatically. Processing can be bypassed for an entire rule
 * or a single property by adding a / * @noflip * / comment above the rule or property.
 *
 * @class
 * @constructor
 */function i(){var // Tokens
e="`TMP`",t="`TMPLTR`",r="`TMPRTL`",i="`NOFLIP_SINGLE`",a="`NOFLIP_CLASS`",o="`COMMENT`",// Patterns
s="[^\\u0020-\\u007e]",u="(?:(?:\\\\[0-9a-f]{1,6})(?:\\r\\n|\\s)?)",c="(?:[0-9]*\\.[0-9]+|[0-9]+)",l="(?:em|ex|px|cm|mm|in|pt|pc|deg|rad|grad|ms|s|hz|khz|%)",d="direction\\s*:\\s*",f="[!#$%&*-~]",p="['\"]?\\s*",h="(^|[^a-zA-Z])",v="[^\\}]*?",m="\\/\\*\\!?\\s*@noflip\\s*\\*\\/",g="\\/\\*[^*]*\\*+([^\\/*][^*]*\\*+)*\\/",b="(?:"+u+"|\\\\[^\\r\\n\\f0-9a-f])",_="(?:[_a-z]|"+s+"|"+b+")",y="(?:[_a-z0-9-]|"+s+"|"+b+")",w="-?"+_+y+"*",A=c+"(?:\\s*"+l+"|"+w+")?",x="((?:-?"+A+")|(?:inherit|auto))",E="(?:-?"+c+"(?:\\s*"+l+")?)",O="(?:\\+|\\-|\\*|\\/)",S="(?:\\(|\\)|\\t| )",T="(?:"+S+"|"+E+"|"+O+"){3,}",k="(?:calc\\((?:"+T+")\\))",C="((?:-?"+A+")|(?:inherit|auto)|"+k+")",I="((?:margin|padding|border-width)\\s*:\\s*)",R="((?:-color|border-style)\\s*:\\s*)",D="(#?"+y+"+|(?:rgba?|hsla?)\\([ \\d.,%-]+\\))",// The use of a lazy match ("*?") may cause a backtrack limit to be exceeded before finding
// the intended match. This affects 'urlCharsPattern' and 'lookAheadNotOpenBracePattern'.
// We have not yet found this problem on Node.js, but we have on PHP 7, where it was
// mitigated by using a possessive quantifier ("*+"), which are not supported in JS.
// See <https://phabricator.wikimedia.org/T215746#4944830>.
P="(?:"+f+"|"+s+"|"+b+")*?",M="(?![a-zA-Z])",F="(?!("+y+"|\\r?\\n|\\s|#|\\:|\\.|\\,|\\+|>|~|\\(|\\)|\\[|\\]|=|\\*=|~=|\\^=|'[^']*'|\"[^\"]*\"|"+o+")*?{)",Y="(?!"+P+p+"\\))",L="(?="+P+p+"\\))",N="(\\s*(?:!important\\s*)?[;}])",// Regular expressions
H=/`TMP`/g,j=/`TMPLTR`/g,U=/`TMPRTL`/g,B=new RegExp(g,"gi"),K=new RegExp("("+m+F+"[^;}]+;?)","gi"),z=new RegExp("("+m+v+"})","gi"),q=new RegExp("("+d+")ltr","gi"),V=new RegExp("("+d+")rtl","gi"),W=new RegExp(h+"(left)"+M+Y+F,"gi"),G=new RegExp(h+"(right)"+M+Y+F,"gi"),$=new RegExp(h+"(left)"+L,"gi"),Q=new RegExp(h+"(right)"+L,"gi"),X=/(:dir\( *)ltr( *\))/g,J=/(:dir\( *)rtl( *\))/g,Z=new RegExp(h+"(ltr)"+L,"gi"),ee=new RegExp(h+"(rtl)"+L,"gi"),et=new RegExp(h+"([ns]?)e-resize","gi"),er=new RegExp(h+"([ns]?)w-resize","gi"),en=new RegExp(I+C+"(\\s+)"+C+"(\\s+)"+C+"(\\s+)"+C+N,"gi"),ei=new RegExp(R+D+"(\\s+)"+D+"(\\s+)"+D+"(\\s+)"+D+N,"gi"),ea=new RegExp("(background(?:-position)?\\s*:\\s*(?:[^:;}\\s]+\\s+)*?)("+A+")","gi"),eo=new RegExp("(background-position-x\\s*:\\s*)(-?"+c+"%)","gi"),// border-radius: <length or percentage>{1,4} [optional: / <length or percentage>{1,4} ]
es=new RegExp("(border-radius\\s*:\\s*)"+x+"(?:(?:\\s+"+x+")(?:\\s+"+x+")?(?:\\s+"+x+")?)?"+"(?:(?:(?:\\s*\\/\\s*)"+x+")(?:\\s+"+x+")?(?:\\s+"+x+")?(?:\\s+"+x+")?)?"+N,"gi"),eu=new RegExp("(box-shadow\\s*:\\s*(?:inset\\s*)?)"+x,"gi"),ec=new RegExp("(text-shadow\\s*:\\s*)"+x+"(\\s*)"+D,"gi"),el=new RegExp("(text-shadow\\s*:\\s*)"+D+"(\\s*)"+x,"gi"),ed=new RegExp("(text-shadow\\s*:\\s*)"+x,"gi"),ef=new RegExp("(transform\\s*:[^;}]*)(translateX\\s*\\(\\s*)"+x+"(\\s*\\))","gi"),ep=new RegExp("(transform\\s*:[^;}]*)(translate\\s*\\(\\s*)"+x+"((?:\\s*,\\s*"+x+"){0,2}\\s*\\))","gi");/**
	 * Invert the horizontal value of a background position property.
	 *
	 * @private
	 * @param {string} match Matched property
	 * @param {string} pre Text before value
	 * @param {string} value Horizontal value
	 * @return {string} Inverted property
	 */function eh(e,t,r){var n,i;if(r.slice(-1)==="%"){n=r.indexOf(".");if(n!==-1){// Two off, one for the "%" at the end, one for the dot itself
i=r.length-n-2;r=100-parseFloat(r);r=r.toFixed(i)+"%"}else{r=100-parseFloat(r)+"%"}}return t+r}/**
	 * Invert a set of border radius values.
	 *
	 * @private
	 * @param {Array} values Matched values
	 * @return {string} Inverted values
	 */function ev(e){switch(e.length){case 4:e=[e[1],e[0],e[3],e[2]];break;case 3:e=[e[1],e[0],e[1],e[2]];break;case 2:e=[e[1],e[0]];break;case 1:e=[e[0]];break}return e.join(" ")}/**
	 * Invert a set of border radius values.
	 *
	 * @private
	 * @param {string} match Matched property
	 * @param {string} pre Text before value
	 * @param {string} [firstGroup1]
	 * @param {string} [firstGroup2]
	 * @param {string} [firstGroup3]
	 * @param {string} [firstGroup4]
	 * @param {string} [secondGroup1]
	 * @param {string} [secondGroup2]
	 * @param {string} [secondGroup3]
	 * @param {string} [secondGroup4]
	 * @param {string} [post] Text after value
	 * @return {string} Inverted property
	 */function em(e,t){var r,n=[].slice.call(arguments),i=n.slice(2,6).filter(function(e){return e}),a=n.slice(6,10).filter(function(e){return e}),o=n[10]||"";if(a.length){r=ev(i)+" / "+ev(a)}else{r=ev(i)}return t+r+o}/**
	 * Flip the sign of a CSS value, possibly with a unit.
	 *
	 * We can't just negate the value with unary minus due to the units.
	 *
	 * @private
	 * @param {string} value
	 * @return {string}
	 */function eg(e){if(parseFloat(e)===0){// Don't mangle zeroes
return e}if(e[0]==="-"){return e.slice(1)}return"-"+e}/**
	 * @private
	 * @param {string} match
	 * @param {string} property
	 * @param {string} offset
	 * @return {string}
	 */function eb(e,t,r){return t+eg(r)}/**
	 * @private
	 * @param {string} match
	 * @param {string} property
	 * @param {string} prefix
	 * @param {string} offset
	 * @param {string} suffix
	 * @return {string}
	 */function e_(e,t,r,n,i){return t+r+eg(n)+i}/**
	 * @private
	 * @param {string} match
	 * @param {string} property
	 * @param {string} color
	 * @param {string} space
	 * @param {string} offset
	 * @return {string}
	 */function ey(e,t,r,n,i){return t+r+n+eg(i)}return{/**
		 * Transform a left-to-right stylesheet to right-to-left.
		 *
		 * @param {string} css Stylesheet to transform
		 * @param {Object} options Options
		 * @param {boolean} [options.transformDirInUrl=false] Transform directions in URLs
		 * (e.g. 'ltr', 'rtl')
		 * @param {boolean} [options.transformEdgeInUrl=false] Transform edges in URLs
		 * (e.g. 'left', 'right')
		 * @return {string} Transformed stylesheet
		 */"transform":function(s,u){// Use single quotes in this object literal key for closure compiler.
// Tokenizers
var c=new n(K,i),l=new n(z,a),d=new n(B,o);// Tokenize
s=d.tokenize(l.tokenize(c.tokenize(// We wrap tokens in ` , not ~ like the original implementation does.
// This was done because ` is not a legal character in CSS and can only
// occur in URLs, where we escape it to %60 before inserting our tokens.
s.replace("`","%60"))));// Transform URLs
if(u.transformDirInUrl){// Replace 'ltr' with 'rtl' and vice versa in background URLs
s=s.replace(X,"$1"+t+"$2").replace(J,"$1"+r+"$2").replace(Z,"$1"+e).replace(ee,"$1ltr").replace(H,"rtl").replace(j,"ltr").replace(U,"rtl")}if(u.transformEdgeInUrl){// Replace 'left' with 'right' and vice versa in background URLs
s=s.replace($,"$1"+e).replace(Q,"$1left").replace(H,"right")}// Transform rules
s=s// Replace direction: ltr; with direction: rtl; and vice versa.
.replace(q,"$1"+e).replace(V,"$1ltr").replace(H,"rtl")// Flip rules like left: , padding-right: , etc.
.replace(W,"$1"+e).replace(G,"$1left").replace(H,"right")// Flip East and West in rules like cursor: nw-resize;
.replace(et,"$1$2"+e).replace(er,"$1$2e-resize").replace(H,"w-resize")// Border radius
.replace(es,em)// Shadows
.replace(eu,eb).replace(ec,ey).replace(el,ey).replace(ed,eb)// Translate
.replace(ef,e_).replace(ep,e_)// Swap the second and fourth parts in four-part notation rules
// like padding: 1px 2px 3px 4px;
.replace(en,"$1$2$3$8$5$6$7$4$9").replace(ei,"$1$2$3$8$5$6$7$4$9")// Flip horizontal background percentages
.replace(ea,eh).replace(eo,eh);// Detokenize
s=c.detokenize(l.detokenize(d.detokenize(s)));return s}}}/* Initialization */r=new i;/* Exports */if(true&&e.exports){/**
	 * Transform a left-to-right stylesheet to right-to-left.
	 *
	 * This function is a static wrapper around the transform method of an instance of CSSJanus.
	 *
	 * @param {string} css Stylesheet to transform
	 * @param {Object|boolean} [options] Options object, or transformDirInUrl option (back-compat)
	 * @param {boolean} [options.transformDirInUrl=false] Transform directions in URLs
	 * (e.g. 'ltr', 'rtl')
	 * @param {boolean} [options.transformEdgeInUrl=false] Transform edges in URLs
	 * (e.g. 'left', 'right')
	 * @param {boolean} [transformEdgeInUrl] Back-compat parameter
	 * @return {string} Transformed stylesheet
	 */t.transform=function(e,t,n){var i;if(typeof t==="object"){i=t}else{i={};if(typeof t==="boolean"){i.transformDirInUrl=t}if(typeof n==="boolean"){i.transformEdgeInUrl=n}}return r.transform(e,i)}}else if(typeof window!=="undefined"){/* global window */// Allow cssjanus to be used in a browser.
// eslint-disable-next-line dot-notation
window["cssjanus"]=r}},31035:function(e,t,r){"use strict";var n=r(35959);/**
 * Copyright 2015, Yahoo! Inc.
 * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
 */var i={childContextTypes:true,contextType:true,contextTypes:true,defaultProps:true,displayName:true,getDefaultProps:true,getDerivedStateFromError:true,getDerivedStateFromProps:true,mixins:true,propTypes:true,type:true};var a={name:true,length:true,prototype:true,caller:true,callee:true,arguments:true,arity:true};var o={"$$typeof":true,render:true,defaultProps:true,displayName:true,propTypes:true};var s={"$$typeof":true,compare:true,defaultProps:true,displayName:true,propTypes:true,type:true};var u={};u[n.ForwardRef]=o;u[n.Memo]=s;function c(e){// React v16.11 and below
if(n.isMemo(e)){return s}// React v16.12 and above
return u[e["$$typeof"]]||i}var l=Object.defineProperty;var d=Object.getOwnPropertyNames;var f=Object.getOwnPropertySymbols;var p=Object.getOwnPropertyDescriptor;var h=Object.getPrototypeOf;var v=Object.prototype;function m(e,t,r){if(typeof t!=="string"){// don't hoist over string (html) components
if(v){var n=h(t);if(n&&n!==v){m(e,n,r)}}var i=d(t);if(f){i=i.concat(f(t))}var o=c(e);var s=c(t);for(var u=0;u<i.length;++u){var g=i[u];if(!a[g]&&!(r&&r[g])&&!(s&&s[g])&&!(o&&o[g])){var b=p(t,g);try{// Avoid failures from read-only properties
l(e,g,b)}catch(e){}}}}return e}e.exports=m},15820:function(e){"use strict";// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.
// If obj.hasOwnProperty has been overridden, then calling
// obj.hasOwnProperty(prop) will break.
// See: https://github.com/joyent/node/issues/1707
function t(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,r,n,i){r=r||"&";n=n||"=";var a={};if(typeof e!=="string"||e.length===0){return a}var o=/\+/g;e=e.split(r);var s=1e3;if(i&&typeof i.maxKeys==="number"){s=i.maxKeys}var u=e.length;// maxKeys <= 0 means that we should not limit keys count
if(s>0&&u>s){u=s}for(var c=0;c<u;++c){var l=e[c].replace(o,"%20"),d=l.indexOf(n),f,p,h,v;if(d>=0){f=l.substr(0,d);p=l.substr(d+1)}else{f=l;p=""}h=decodeURIComponent(f);v=decodeURIComponent(p);if(!t(a,h)){a[h]=v}else if(Array.isArray(a[h])){a[h].push(v)}else{a[h]=[a[h],v]}}return a}},80932:function(e){"use strict";// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.
var t=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,r,n,i){r=r||"&";n=n||"=";if(e===null){e=undefined}if(typeof e==="object"){return Object.keys(e).map(function(i){var a=encodeURIComponent(t(i))+n;if(Array.isArray(e[i])){return e[i].map(function(e){return a+encodeURIComponent(t(e))}).join(r)}else{return a+encodeURIComponent(t(e[i]))}}).filter(Boolean).join(r)}if(!i)return"";return encodeURIComponent(t(i))+n+encodeURIComponent(t(e))}},79848:function(e,t,r){"use strict";var n;n=/* unused reexport */r(15820);n=t.stringify=r(80932)},99576:function(e,t,r){"use strict";var n=r(75206);if(true){t.createRoot=n.createRoot;t.hydrateRoot=n.hydrateRoot}else{var i}},95843:function(e,t){"use strict";/** @license React v16.13.1
 * react-is.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var r="function"===typeof Symbol&&Symbol.for,n=r?Symbol.for("react.element"):60103,i=r?Symbol.for("react.portal"):60106,a=r?Symbol.for("react.fragment"):60107,o=r?Symbol.for("react.strict_mode"):60108,s=r?Symbol.for("react.profiler"):60114,u=r?Symbol.for("react.provider"):60109,c=r?Symbol.for("react.context"):60110,l=r?Symbol.for("react.async_mode"):60111,d=r?Symbol.for("react.concurrent_mode"):60111,f=r?Symbol.for("react.forward_ref"):60112,p=r?Symbol.for("react.suspense"):60113,h=r?Symbol.for("react.suspense_list"):60120,v=r?Symbol.for("react.memo"):60115,m=r?Symbol.for("react.lazy"):60116,g=r?Symbol.for("react.block"):60121,b=r?Symbol.for("react.fundamental"):60117,_=r?Symbol.for("react.responder"):60118,y=r?Symbol.for("react.scope"):60119;function w(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type,e){case l:case d:case a:case s:case o:case p:return e;default:switch(e=e&&e.$$typeof,e){case c:case f:case m:case v:case u:return e;default:return t}}case i:return t}}}function A(e){return w(e)===d}t.AsyncMode=l;t.ConcurrentMode=d;t.ContextConsumer=c;t.ContextProvider=u;t.Element=n;t.ForwardRef=f;t.Fragment=a;t.Lazy=m;t.Memo=v;t.Portal=i;t.Profiler=s;t.StrictMode=o;t.Suspense=p;t.isAsyncMode=function(e){return A(e)||w(e)===l};t.isConcurrentMode=A;t.isContextConsumer=function(e){return w(e)===c};t.isContextProvider=function(e){return w(e)===u};t.isElement=function(e){return"object"===typeof e&&null!==e&&e.$$typeof===n};t.isForwardRef=function(e){return w(e)===f};t.isFragment=function(e){return w(e)===a};t.isLazy=function(e){return w(e)===m};t.isMemo=function(e){return w(e)===v};t.isPortal=function(e){return w(e)===i};t.isProfiler=function(e){return w(e)===s};t.isStrictMode=function(e){return w(e)===o};t.isSuspense=function(e){return w(e)===p};t.isValidElementType=function(e){return"string"===typeof e||"function"===typeof e||e===a||e===d||e===s||e===o||e===p||e===h||"object"===typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===v||e.$$typeof===u||e.$$typeof===c||e.$$typeof===f||e.$$typeof===b||e.$$typeof===_||e.$$typeof===y||e.$$typeof===g)};t.typeOf=w},35959:function(e,t,r){"use strict";if(true){e.exports=r(95843)}else{}},75688:function(e,t,r){"use strict";r.d(t,{C5:()=>ef,Ix:()=>ev,V8:()=>eo,Ye:()=>k,Zp:()=>w,sv:()=>ep,zy:()=>m});/* import */var n=r(41594);/* import */var i=/*#__PURE__*/r.n(n);/* import */var a=r(98988);/**
 * React Router v6.30.2
 *
 * Copyright (c) Remix Software Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE.md file in the root directory of this source tree.
 *
 * @license MIT
 */function o(){o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r){if(Object.prototype.hasOwnProperty.call(r,n)){e[n]=r[n]}}}return e};return o.apply(this,arguments)}// Create react-specific types from the agnostic types in @remix-run/router to
// export from react-router
const s=/*#__PURE__*/n.createContext(null);if(false){}const u=/*#__PURE__*/n.createContext(null);if(false){}const c=/*#__PURE__*/n.createContext(null);if(false){}/**
 * A Navigator is a "location changer"; it's how you get to different locations.
 *
 * Every history instance conforms to the Navigator interface, but the
 * distinction is useful primarily when it comes to the low-level `<Router>` API
 * where both the location and a navigator must be provided separately in order
 * to avoid "tearing" that may occur in a suspense-enabled app if the action
 * and/or location were to be read directly from the history instance.
 */const l=/*#__PURE__*/n.createContext(null);if(false){}const d=/*#__PURE__*/n.createContext(null);if(false){}const f=/*#__PURE__*/n.createContext({outlet:null,matches:[],isDataRoute:false});if(false){}const p=/*#__PURE__*/n.createContext(null);if(false){}/**
 * Returns the full href for the given "to" value. This is useful for building
 * custom links that are also accessible and preserve right-click behavior.
 *
 * @see https://reactrouter.com/v6/hooks/use-href
 */function h(e,t){let{relative:r}=t===void 0?{}:t;!v()?false?0:UNSAFE_invariant(false):void 0;let{basename:n,navigator:i}=React.useContext(l);let{hash:a,pathname:o,search:s}=T(e,{relative:r});let u=o;// If we're operating within a basename, prepend it to the pathname prior
// to creating the href.  If this is a root navigation, then just use the raw
// basename which allows the basename to have full control over the presence
// of a trailing slash on root links
if(n!=="/"){u=o==="/"?n:joinPaths([n,o])}return i.createHref({pathname:u,search:s,hash:a})}/**
 * Returns true if this component is a descendant of a `<Router>`.
 *
 * @see https://reactrouter.com/v6/hooks/use-in-router-context
 */function v(){return n.useContext(d)!=null}/**
 * Returns the current location object, which represents the current URL in web
 * browsers.
 *
 * Note: If you're using this it may mean you're doing some of your own
 * "routing" in your app, and we'd like to know what your use case is. We may
 * be able to provide something higher-level to better suit your needs.
 *
 * @see https://reactrouter.com/v6/hooks/use-location
 */function m(){!v()?false?0:(0,a/* .UNSAFE_invariant */.Oi)(false):void 0;return n.useContext(d).location}/**
 * Returns the current navigation action which describes how the router came to
 * the current location, either by a pop, push, or replace on the history stack.
 *
 * @see https://reactrouter.com/v6/hooks/use-navigation-type
 */function g(){return React.useContext(d).navigationType}/**
 * Returns a PathMatch object if the given pattern matches the current URL.
 * This is useful for components that need to know "active" state, e.g.
 * `<NavLink>`.
 *
 * @see https://reactrouter.com/v6/hooks/use-match
 */function b(e){!v()?false?0:UNSAFE_invariant(false):void 0;let{pathname:t}=m();return React.useMemo(()=>matchPath(e,UNSAFE_decodePath(t)),[t,e])}/**
 * The interface for the navigate() function returned from useNavigate().
 */const _=/* unused pure expression or super */null&&"You should call navigate() in a React.useEffect(), not when "+"your component is first rendered.";// Mute warnings for calls to useNavigate in SSR environments
function y(e){let t=n.useContext(l).static;if(!t){// We should be able to get rid of this once react 18.3 is released
// See: https://github.com/facebook/react/pull/26395
// eslint-disable-next-line react-hooks/rules-of-hooks
n.useLayoutEffect(e)}}/**
 * Returns an imperative method for changing the location. Used by `<Link>`s, but
 * may also be used by other elements to change the location.
 *
 * @see https://reactrouter.com/v6/hooks/use-navigate
 */function w(){let{isDataRoute:e}=n.useContext(f);// Conditional usage is OK here because the usage of a data router is static
// eslint-disable-next-line react-hooks/rules-of-hooks
return e?ee():A()}function A(){!v()?false?0:(0,a/* .UNSAFE_invariant */.Oi)(false):void 0;let e=n.useContext(s);let{basename:t,future:r,navigator:i}=n.useContext(l);let{matches:o}=n.useContext(f);let{pathname:u}=m();let c=JSON.stringify((0,a/* .UNSAFE_getResolveToMatches */.yD)(o,r.v7_relativeSplatPath));let d=n.useRef(false);y(()=>{d.current=true});let p=n.useCallback(function(r,n){if(n===void 0){n={}}false?0:void 0;// Short circuit here since if this happens on first render the navigate
// is useless because we haven't wired up our history listener yet
if(!d.current)return;if(typeof r==="number"){i.go(r);return}let o=(0,a/* .resolveTo */.Gh)(r,JSON.parse(c),u,n.relative==="path");// If we're operating within a basename, prepend it to the pathname prior
// to handing off to history (but only if we're not in a data router,
// otherwise it'll prepend the basename inside of the router).
// If this is a root navigation, then we navigate to the raw basename
// which allows the basename to have full control over the presence of a
// trailing slash on root links
if(e==null&&t!=="/"){o.pathname=o.pathname==="/"?t:(0,a/* .joinPaths */.HS)([t,o.pathname])}(!!n.replace?i.replace:i.push)(o,n.state,n)},[t,i,c,u,e]);return p}const x=/*#__PURE__*/n.createContext(null);/**
 * Returns the context (if provided) for the child route at this level of the route
 * hierarchy.
 * @see https://reactrouter.com/v6/hooks/use-outlet-context
 */function E(){return React.useContext(x)}/**
 * Returns the element for the child route at this level of the route
 * hierarchy. Used internally by `<Outlet>` to render child routes.
 *
 * @see https://reactrouter.com/v6/hooks/use-outlet
 */function O(e){let t=n.useContext(f).outlet;if(t){return /*#__PURE__*/n.createElement(x.Provider,{value:e},t)}return t}/**
 * Returns an object of key/value pairs of the dynamic params from the current
 * URL that were matched by the route path.
 *
 * @see https://reactrouter.com/v6/hooks/use-params
 */function S(){let{matches:e}=React.useContext(f);let t=e[e.length-1];return t?t.params:{}}/**
 * Resolves the pathname of the given `to` value against the current location.
 *
 * @see https://reactrouter.com/v6/hooks/use-resolved-path
 */function T(e,t){let{relative:r}=t===void 0?{}:t;let{future:n}=React.useContext(l);let{matches:i}=React.useContext(f);let{pathname:a}=m();let o=JSON.stringify(UNSAFE_getResolveToMatches(i,n.v7_relativeSplatPath));return React.useMemo(()=>resolveTo(e,JSON.parse(o),a,r==="path"),[e,o,a,r])}/**
 * Returns the element of the route that matched the current location, prepared
 * with the correct context to render the remainder of the route tree. Route
 * elements in the tree must render an `<Outlet>` to render their child route's
 * element.
 *
 * @see https://reactrouter.com/v6/hooks/use-routes
 */function k(e,t){return C(e,t)}// Internal implementation with accept optional param for RouterProvider usage
function C(e,t,r,i){!v()?false?0:(0,a/* .UNSAFE_invariant */.Oi)(false):void 0;let{navigator:s}=n.useContext(l);let{matches:u}=n.useContext(f);let c=u[u.length-1];let p=c?c.params:{};let h=c?c.pathname:"/";let g=c?c.pathnameBase:"/";let b=c&&c.route;if(false){}let _=m();let y;if(t){var w;let e=typeof t==="string"?(0,a/* .parsePath */.Rr)(t):t;!(g==="/"||((w=e.pathname)==null?void 0:w.startsWith(g)))?false?0:(0,a/* .UNSAFE_invariant */.Oi)(false):void 0;y=e}else{y=_}let A=y.pathname||"/";let x=A;if(g!=="/"){// Determine the remaining pathname by removing the # of URL segments the
// parentPathnameBase has, instead of removing based on character count.
// This is because we can't guarantee that incoming/outgoing encodings/
// decodings will match exactly.
// We decode paths before matching on a per-segment basis with
// decodeURIComponent(), but we re-encode pathnames via `new URL()` so they
// match what `window.location.pathname` would reflect.  Those don't 100%
// align when it comes to encoded URI characters such as % and &.
//
// So we may end up with:
//   pathname:           "/descendant/a%25b/match"
//   parentPathnameBase: "/descendant/a%b"
//
// And the direct substring removal approach won't work :/
let e=g.replace(/^\//,"").split("/");let t=A.replace(/^\//,"").split("/");x="/"+t.slice(e.length).join("/")}let E=(0,a/* .matchRoutes */.ue)(e,{pathname:x});if(false){}let O=M(E&&E.map(e=>Object.assign({},e,{params:Object.assign({},p,e.params),pathname:(0,a/* .joinPaths */.HS)([g,// Re-encode pathnames that were decoded inside matchRoutes
    s.encodeLocation?s.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:e.pathnameBase==="/"?g:(0,a/* .joinPaths */.HS)([g,// Re-encode pathnames that were decoded inside matchRoutes
    s.encodeLocation?s.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])})),u,r,i);// When a user passes in a `locationArg`, the associated routes need to
// be wrapped in a new `LocationContext.Provider` in order for `useLocation`
// to use the scoped location instead of the global location.
if(t&&O){return /*#__PURE__*/n.createElement(d.Provider,{value:{location:o({pathname:"/",search:"",hash:"",state:null,key:"default"},y),navigationType:a/* .Action.Pop */.rc.Pop}},O)}return O}function I(){let e=$();let t=(0,a/* .isRouteErrorResponse */.pX)(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e);let r=e instanceof Error?e.stack:null;let i="rgba(200,200,200, 0.5)";let o={padding:"0.5rem",backgroundColor:i};let s={padding:"2px 4px",backgroundColor:i};let u=null;if(false){}return /*#__PURE__*/n.createElement(n.Fragment,null,/*#__PURE__*/n.createElement("h2",null,"Unexpected Application Error!"),/*#__PURE__*/n.createElement("h3",{style:{fontStyle:"italic"}},t),r?/*#__PURE__*/n.createElement("pre",{style:o},r):null,u)}const R=/*#__PURE__*/n.createElement(I,null);class D extends n.Component{constructor(e){super(e);this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){// When we get into an error state, the user will likely click "back" to the
// previous page that didn't have an error. Because this wraps the entire
// application, that will have no effect--the error page continues to display.
// This gives us a mechanism to recover from the error when the location changes.
//
// Whether we're in an error state or not, we update the location in state
// so that when we are in an error state, it gets reset when a new location
// comes in and the user recovers from the error.
if(t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"){return{error:e.error,location:e.location,revalidation:e.revalidation}}// If we're not changing locations, preserve the location but still surface
// any new errors that may come through. We retain the existing error, we do
// this because the error provided from the app state may be cleared without
// the location changing.
return{error:e.error!==undefined?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return this.state.error!==undefined?/*#__PURE__*/n.createElement(f.Provider,{value:this.props.routeContext},/*#__PURE__*/n.createElement(p.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function P(e){let{routeContext:t,match:r,children:i}=e;let a=n.useContext(s);// Track how deep we got in our render pass to emulate SSR componentDidCatch
// in a DataStaticRouter
if(a&&a.static&&a.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)){a.staticContext._deepestRenderedBoundaryId=r.route.id}return /*#__PURE__*/n.createElement(f.Provider,{value:t},i)}function M(e,t,r,i){var o;if(t===void 0){t=[]}if(r===void 0){r=null}if(i===void 0){i=null}if(e==null){var s;if(!r){return null}if(r.errors){// Don't bail if we have data router errors so we can render them in the
// boundary.  Use the pre-matched (or shimmed) matches
e=r.matches}else if((s=i)!=null&&s.v7_partialHydration&&t.length===0&&!r.initialized&&r.matches.length>0){// Don't bail if we're initializing with partial hydration and we have
// router matches.  That means we're actively running `patchRoutesOnNavigation`
// so we should render down the partial matches to the appropriate
// `HydrateFallback`.  We only do this if `parentMatches` is empty so it
// only impacts the root matches for `RouterProvider` and no descendant
// `<Routes>`
e=r.matches}else{return null}}let u=e;// If we have data errors, trim matches to the highest error boundary
let c=(o=r)==null?void 0:o.errors;if(c!=null){let e=u.findIndex(e=>e.route.id&&(c==null?void 0:c[e.route.id])!==undefined);!(e>=0)?false?0:(0,a/* .UNSAFE_invariant */.Oi)(false):void 0;u=u.slice(0,Math.min(u.length,e+1))}// If we're in a partial hydration mode, detect if we need to render down to
// a given HydrateFallback while we load the rest of the hydration data
let l=false;let d=-1;if(r&&i&&i.v7_partialHydration){for(let e=0;e<u.length;e++){let t=u[e];// Track the deepest fallback up until the first route without data
if(t.route.HydrateFallback||t.route.hydrateFallbackElement){d=e}if(t.route.id){let{loaderData:e,errors:n}=r;let i=t.route.loader&&e[t.route.id]===undefined&&(!n||n[t.route.id]===undefined);if(t.route.lazy||i){// We found the first route that's not ready to render (waiting on
// lazy, or has a loader that hasn't run yet).  Flag that we need to
// render a fallback and render up until the appropriate fallback
l=true;if(d>=0){u=u.slice(0,d+1)}else{u=[u[0]]}break}}}}return u.reduceRight((e,i,a)=>{// Only data routers handle errors/fallbacks
let o;let s=false;let f=null;let p=null;if(r){o=c&&i.route.id?c[i.route.id]:undefined;f=i.route.errorElement||R;if(l){if(d<0&&a===0){er("route-fallback",false,"No `HydrateFallback` element provided to render during initial hydration");s=true;p=null}else if(d===a){s=true;p=i.route.hydrateFallbackElement||null}}}let h=t.concat(u.slice(0,a+1));let v=()=>{let t;if(o){t=f}else if(s){t=p}else if(i.route.Component){// Note: This is a de-optimized path since React won't re-use the
// ReactElement since it's identity changes with each new
// React.createElement call.  We keep this so folks can use
// `<Route Component={...}>` in `<Routes>` but generally `Component`
// usage is only advised in `RouterProvider` when we can convert it to
// `element` ahead of time.
t=/*#__PURE__*/n.createElement(i.route.Component,null)}else if(i.route.element){t=i.route.element}else{t=e}return /*#__PURE__*/n.createElement(P,{match:i,routeContext:{outlet:e,matches:h,isDataRoute:r!=null},children:t})};// Only wrap in an error boundary within data router usages when we have an
// ErrorBoundary/errorElement on this route.  Otherwise let it bubble up to
// an ancestor ErrorBoundary/errorElement
return r&&(i.route.ErrorBoundary||i.route.errorElement||a===0)?/*#__PURE__*/n.createElement(D,{location:r.location,revalidation:r.revalidation,component:f,error:o,children:v(),routeContext:{outlet:null,matches:h,isDataRoute:true}}):v()},null)}var F=/*#__PURE__*/function(e){e["UseBlocker"]="useBlocker";e["UseRevalidator"]="useRevalidator";e["UseNavigateStable"]="useNavigate";return e}(F||{});var Y=/*#__PURE__*/function(e){e["UseBlocker"]="useBlocker";e["UseLoaderData"]="useLoaderData";e["UseActionData"]="useActionData";e["UseRouteError"]="useRouteError";e["UseNavigation"]="useNavigation";e["UseRouteLoaderData"]="useRouteLoaderData";e["UseMatches"]="useMatches";e["UseRevalidator"]="useRevalidator";e["UseNavigateStable"]="useNavigate";e["UseRouteId"]="useRouteId";return e}(Y||{});function L(e){return e+" must be used within a data router.  See https://reactrouter.com/v6/routers/picking-a-router."}function N(e){let t=n.useContext(s);!t?false?0:(0,a/* .UNSAFE_invariant */.Oi)(false):void 0;return t}function H(e){let t=n.useContext(u);!t?false?0:(0,a/* .UNSAFE_invariant */.Oi)(false):void 0;return t}function j(e){let t=n.useContext(f);!t?false?0:(0,a/* .UNSAFE_invariant */.Oi)(false):void 0;return t}// Internal version with hookName-aware debugging
function U(e){let t=j(e);let r=t.matches[t.matches.length-1];!r.route.id?false?0:(0,a/* .UNSAFE_invariant */.Oi)(false):void 0;return r.route.id}/**
 * Returns the ID for the nearest contextual route
 */function B(){return U(Y.UseRouteId)}/**
 * Returns the current navigation, defaulting to an "idle" navigation when
 * no navigation is in progress
 */function K(){let e=H(Y.UseNavigation);return e.navigation}/**
 * Returns a revalidate function for manually triggering revalidation, as well
 * as the current state of any manual revalidations
 */function z(){let e=N(F.UseRevalidator);let t=H(Y.UseRevalidator);return React.useMemo(()=>({revalidate:e.router.revalidate,state:t.revalidation}),[e.router.revalidate,t.revalidation])}/**
 * Returns the active route matches, useful for accessing loaderData for
 * parent/child routes or the route "handle" property
 */function q(){let{matches:e,loaderData:t}=H(Y.UseMatches);return React.useMemo(()=>e.map(e=>UNSAFE_convertRouteMatchToUiMatch(e,t)),[e,t])}/**
 * Returns the loader data for the nearest ancestor Route loader
 */function V(){let e=H(Y.UseLoaderData);let t=U(Y.UseLoaderData);if(e.errors&&e.errors[t]!=null){console.error("You cannot `useLoaderData` in an errorElement (routeId: "+t+")");return undefined}return e.loaderData[t]}/**
 * Returns the loaderData for the given routeId
 */function W(e){let t=H(Y.UseRouteLoaderData);return t.loaderData[e]}/**
 * Returns the action data for the nearest ancestor Route action
 */function G(){let e=H(Y.UseActionData);let t=U(Y.UseLoaderData);return e.actionData?e.actionData[t]:undefined}/**
 * Returns the nearest ancestor Route error, which could be a loader/action
 * error or a render error.  This is intended to be called from your
 * ErrorBoundary/errorElement to display a proper error message.
 */function $(){var e;let t=n.useContext(p);let r=H(Y.UseRouteError);let i=U(Y.UseRouteError);// If this was a render error, we put it in a RouteError context inside
// of RenderErrorBoundary
if(t!==undefined){return t}// Otherwise look for errors from our data router state
return(e=r.errors)==null?void 0:e[i]}/**
 * Returns the happy-path data from the nearest ancestor `<Await />` value
 */function Q(){let e=React.useContext(c);return e==null?void 0:e._data}/**
 * Returns the error from the nearest ancestor `<Await />` value
 */function X(){let e=React.useContext(c);return e==null?void 0:e._error}let J=0;/**
 * Allow the application to block navigations within the SPA and present the
 * user a confirmation dialog to confirm the navigation.  Mostly used to avoid
 * using half-filled form data.  This does not handle hard-reloads or
 * cross-origin navigations.
 */function Z(e){let{router:t,basename:r}=N(F.UseBlocker);let n=H(Y.UseBlocker);let[i,a]=React.useState("");let s=React.useCallback(t=>{if(typeof e!=="function"){return!!e}if(r==="/"){return e(t)}// If they provided us a function and we've got an active basename, strip
// it from the locations we expose to the user to match the behavior of
// useLocation
let{currentLocation:n,nextLocation:i,historyAction:a}=t;return e({currentLocation:o({},n,{pathname:stripBasename(n.pathname,r)||n.pathname}),nextLocation:o({},i,{pathname:stripBasename(i.pathname,r)||i.pathname}),historyAction:a})},[r,e]);// This effect is in charge of blocker key assignment and deletion (which is
// tightly coupled to the key)
React.useEffect(()=>{let e=String(++J);a(e);return()=>t.deleteBlocker(e)},[t]);// This effect handles assigning the blockerFunction.  This is to handle
// unstable blocker function identities, and happens only after the prior
// effect so we don't get an orphaned blockerFunction in the router with a
// key of "".  Until then we just have the IDLE_BLOCKER.
React.useEffect(()=>{if(i!==""){t.getBlocker(i,s)}},[t,i,s]);// Prefer the blocker from `state` not `router.state` since DataRouterContext
// is memoized so this ensures we update on blocker state updates
return i&&n.blockers.has(i)?n.blockers.get(i):IDLE_BLOCKER}/**
 * Stable version of useNavigate that is used when we are in the context of
 * a RouterProvider.
 */function ee(){let{router:e}=N(F.UseNavigateStable);let t=U(Y.UseNavigateStable);let r=n.useRef(false);y(()=>{r.current=true});let i=n.useCallback(function(n,i){if(i===void 0){i={}}false?0:void 0;// Short circuit here since if this happens on first render the navigate
// is useless because we haven't wired up our router subscriber yet
if(!r.current)return;if(typeof n==="number"){e.navigate(n)}else{e.navigate(n,o({fromRouteId:t},i))}},[e,t]);return i}const et={};function er(e,t,r){if(!t&&!et[e]){et[e]=true;false?0:void 0}}const en=/* unused pure expression or super */null&&{};function ei(e,t){if(false){}}const ea=(e,t,r)=>ei(e,"⚠️ React Router Future Flag Warning: "+t+". "+("You can use the `"+e+"` future flag to opt-in early. ")+("For more information, see "+r+"."));function eo(e,t){if((e==null?void 0:e.v7_startTransition)===undefined){ea("v7_startTransition","React Router will begin wrapping state updates in `React.startTransition` in v7","https://reactrouter.com/v6/upgrading/future#v7_starttransition")}if((e==null?void 0:e.v7_relativeSplatPath)===undefined&&(!t||t.v7_relativeSplatPath===undefined)){ea("v7_relativeSplatPath","Relative route resolution within Splat routes is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_relativesplatpath")}if(t){if(t.v7_fetcherPersist===undefined){ea("v7_fetcherPersist","The persistence behavior of fetchers is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_fetcherpersist")}if(t.v7_normalizeFormMethod===undefined){ea("v7_normalizeFormMethod","Casing of `formMethod` fields is being normalized to uppercase in v7","https://reactrouter.com/v6/upgrading/future#v7_normalizeformmethod")}if(t.v7_partialHydration===undefined){ea("v7_partialHydration","`RouterProvider` hydration behavior is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_partialhydration")}if(t.v7_skipActionErrorRevalidation===undefined){ea("v7_skipActionErrorRevalidation","The revalidation behavior after 4xx/5xx `action` responses is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_skipactionerrorrevalidation")}}}/**
  Webpack + React 17 fails to compile on any of the following because webpack
  complains that `startTransition` doesn't exist in `React`:
  * import { startTransition } from "react"
  * import * as React from from "react";
    "startTransition" in React ? React.startTransition(() => setState()) : setState()
  * import * as React from from "react";
    "startTransition" in React ? React["startTransition"](() => setState()) : setState()

  Moving it to a constant such as the following solves the Webpack/React 17 issue:
  * import * as React from from "react";
    const START_TRANSITION = "startTransition";
    START_TRANSITION in React ? React[START_TRANSITION](() => setState()) : setState()

  However, that introduces webpack/terser minification issues in production builds
  in React 18 where minification/obfuscation ends up removing the call of
  React.startTransition entirely from the first half of the ternary.  Grabbing
  this exported reference once up front resolves that issue.

  See https://github.com/remix-run/react-router/issues/10579
*/const es="startTransition";const eu=n[es];/**
 * Given a Remix Router instance, render the appropriate UI
 */function ec(e){let{fallbackElement:t,router:r,future:n}=e;let[i,a]=React.useState(r.state);let{v7_startTransition:o}=n||{};let c=React.useCallback(e=>{if(o&&eu){eu(()=>a(e))}else{a(e)}},[a,o]);// Need to use a layout effect here so we are subscribed early enough to
// pick up on any render-driven redirects/navigations (useEffect/<Navigate>)
React.useLayoutEffect(()=>r.subscribe(c),[r,c]);React.useEffect(()=>{false?0:void 0;// Only log this once on initial mount
// eslint-disable-next-line react-hooks/exhaustive-deps
},[]);let l=React.useMemo(()=>{return{createHref:r.createHref,encodeLocation:r.encodeLocation,go:e=>r.navigate(e),push:(e,t,n)=>r.navigate(e,{state:t,preventScrollReset:n==null?void 0:n.preventScrollReset}),replace:(e,t,n)=>r.navigate(e,{replace:true,state:t,preventScrollReset:n==null?void 0:n.preventScrollReset})}},[r]);let d=r.basename||"/";let f=React.useMemo(()=>({router:r,navigator:l,static:false,basename:d}),[r,l,d]);React.useEffect(()=>eo(n,r.future),[r,n]);// The fragment and {null} here are important!  We need them to keep React 18's
// useId happy when we are server-rendering since we may have a <script> here
// containing the hydrated server-side staticContext (from StaticRouterProvider).
// useId relies on the component tree structure to generate deterministic id's
// so we need to ensure it remains the same on the client even though
// we don't need the <script> tag
return /*#__PURE__*/React.createElement(React.Fragment,null,/*#__PURE__*/React.createElement(s.Provider,{value:f},/*#__PURE__*/React.createElement(u.Provider,{value:i},/*#__PURE__*/React.createElement(ev,{basename:d,location:i.location,navigationType:i.historyAction,navigator:l,future:{v7_relativeSplatPath:r.future.v7_relativeSplatPath}},i.initialized||r.future.v7_partialHydration?/*#__PURE__*/React.createElement(el,{routes:r.routes,future:r.future,state:i}):t))),null)}function el(e){let{routes:t,future:r,state:n}=e;return C(t,undefined,n,r)}/**
 * A `<Router>` that stores all entries in memory.
 *
 * @see https://reactrouter.com/v6/router-components/memory-router
 */function ed(e){let{basename:t,children:r,initialEntries:n,initialIndex:i,future:a}=e;let o=React.useRef();if(o.current==null){o.current=createMemoryHistory({initialEntries:n,initialIndex:i,v5Compat:true})}let s=o.current;let[u,c]=React.useState({action:s.action,location:s.location});let{v7_startTransition:l}=a||{};let d=React.useCallback(e=>{l&&eu?eu(()=>c(e)):c(e)},[c,l]);React.useLayoutEffect(()=>s.listen(d),[s,d]);React.useEffect(()=>eo(a),[a]);return /*#__PURE__*/React.createElement(ev,{basename:t,children:r,location:u.location,navigationType:u.action,navigator:s,future:a})}/**
 * Changes the current location.
 *
 * Note: This API is mostly useful in React.Component subclasses that are not
 * able to use hooks. In functional components, we recommend you use the
 * `useNavigate` hook instead.
 *
 * @see https://reactrouter.com/v6/components/navigate
 */function ef(e){let{to:t,replace:r,state:i,relative:o}=e;!v()?false?0:(0,a/* .UNSAFE_invariant */.Oi)(false):void 0;let{future:s,static:u}=n.useContext(l);false?0:void 0;let{matches:c}=n.useContext(f);let{pathname:d}=m();let p=w();// Resolve the path outside of the effect so that when effects run twice in
// StrictMode they navigate to the same place
let h=(0,a/* .resolveTo */.Gh)(t,(0,a/* .UNSAFE_getResolveToMatches */.yD)(c,s.v7_relativeSplatPath),d,o==="path");let g=JSON.stringify(h);n.useEffect(()=>p(JSON.parse(g),{replace:r,state:i,relative:o}),[p,g,o,r,i]);return null}/**
 * Renders the child route's element, if there is one.
 *
 * @see https://reactrouter.com/v6/components/outlet
 */function ep(e){return O(e.context)}/**
 * Declares an element that should be rendered at a certain URL path.
 *
 * @see https://reactrouter.com/v6/components/route
 */function eh(e){false?0:UNSAFE_invariant(false)}/**
 * Provides location context for the rest of the app.
 *
 * Note: You usually won't render a `<Router>` directly. Instead, you'll render a
 * router that is more specific to your environment such as a `<BrowserRouter>`
 * in web browsers or a `<StaticRouter>` for server rendering.
 *
 * @see https://reactrouter.com/v6/router-components/router
 */function ev(e){let{basename:t="/",children:r=null,location:i,navigationType:s=a/* .Action.Pop */.rc.Pop,navigator:u,static:c=false,future:f}=e;!!v()?false?0:(0,a/* .UNSAFE_invariant */.Oi)(false):void 0;// Preserve trailing slashes on basename, so we can let the user control
// the enforcement of trailing slashes throughout the app
let p=t.replace(/^\/*/,"/");let h=n.useMemo(()=>({basename:p,navigator:u,static:c,future:o({v7_relativeSplatPath:false},f)}),[p,f,u,c]);if(typeof i==="string"){i=(0,a/* .parsePath */.Rr)(i)}let{pathname:m="/",search:g="",hash:b="",state:_=null,key:y="default"}=i;let w=n.useMemo(()=>{let e=(0,a/* .stripBasename */.pb)(m,p);if(e==null){return null}return{location:{pathname:e,search:g,hash:b,state:_,key:y},navigationType:s}},[p,m,g,b,_,y,s]);false?0:void 0;if(w==null){return null}return /*#__PURE__*/n.createElement(l.Provider,{value:h},/*#__PURE__*/n.createElement(d.Provider,{children:r,value:w}))}/**
 * A container for a nested tree of `<Route>` elements that renders the branch
 * that best matches the current location.
 *
 * @see https://reactrouter.com/v6/components/routes
 */function em(e){let{children:t,location:r}=e;return k(eA(t),r)}/**
 * Component to use for rendering lazily loaded data from returning defer()
 * in a loader function
 */function eg(e){let{children:t,errorElement:r,resolve:n}=e;return /*#__PURE__*/React.createElement(ey,{resolve:n,errorElement:r},/*#__PURE__*/React.createElement(ew,null,t))}var eb=/*#__PURE__*/function(e){e[e["pending"]=0]="pending";e[e["success"]=1]="success";e[e["error"]=2]="error";return e}(eb||{});const e_=new Promise(()=>{});class ey extends n.Component{constructor(e){super(e);this.state={error:null}}static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,t){console.error("<Await> caught the following error during render",e,t)}render(){let{children:e,errorElement:t,resolve:r}=this.props;let i=null;let o=eb.pending;if(!(r instanceof Promise)){// Didn't get a promise - provide as a resolved promise
o=eb.success;i=Promise.resolve();Object.defineProperty(i,"_tracked",{get:()=>true});Object.defineProperty(i,"_data",{get:()=>r})}else if(this.state.error){// Caught a render error, provide it as a rejected promise
o=eb.error;let e=this.state.error;i=Promise.reject().catch(()=>{});// Avoid unhandled rejection warnings
Object.defineProperty(i,"_tracked",{get:()=>true});Object.defineProperty(i,"_error",{get:()=>e})}else if(r._tracked){// Already tracked promise - check contents
i=r;o="_error"in i?eb.error:"_data"in i?eb.success:eb.pending}else{// Raw (untracked) promise - track it
o=eb.pending;Object.defineProperty(r,"_tracked",{get:()=>true});i=r.then(e=>Object.defineProperty(r,"_data",{get:()=>e}),e=>Object.defineProperty(r,"_error",{get:()=>e}))}if(o===eb.error&&i._error instanceof a/* .AbortedDeferredError */.tH){// Freeze the UI by throwing a never resolved promise
throw e_}if(o===eb.error&&!t){// No errorElement, throw to the nearest route-level error boundary
throw i._error}if(o===eb.error){// Render via our errorElement
return /*#__PURE__*/n.createElement(c.Provider,{value:i,children:t})}if(o===eb.success){// Render children with resolved value
return /*#__PURE__*/n.createElement(c.Provider,{value:i,children:e})}// Throw to the suspense boundary
throw i}}/**
 * @private
 * Indirection to leverage useAsyncValue for a render-prop API on `<Await>`
 */function ew(e){let{children:t}=e;let r=Q();let n=typeof t==="function"?t(r):t;return /*#__PURE__*/React.createElement(React.Fragment,null,n)}///////////////////////////////////////////////////////////////////////////////
// UTILS
///////////////////////////////////////////////////////////////////////////////
/**
 * Creates a route config from a React "children" object, which is usually
 * either a `<Route>` element or an array of them. Used internally by
 * `<Routes>` to create a route config from its children.
 *
 * @see https://reactrouter.com/v6/utils/create-routes-from-children
 */function eA(e,t){if(t===void 0){t=[]}let r=[];React.Children.forEach(e,(e,n)=>{if(!/*#__PURE__*/React.isValidElement(e)){// Ignore non-elements. This allows people to more easily inline
// conditionals in their route config.
return}let i=[...t,n];if(e.type===React.Fragment){// Transparently support React.Fragment and its children.
r.push.apply(r,eA(e.props.children,i));return}!(e.type===eh)?false?0:UNSAFE_invariant(false):void 0;!(!e.props.index||!e.props.children)?false?0:UNSAFE_invariant(false):void 0;let a={id:e.props.id||i.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,loader:e.props.loader,action:e.props.action,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:e.props.ErrorBoundary!=null||e.props.errorElement!=null,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};if(e.props.children){a.children=eA(e.props.children,i)}r.push(a)});return r}/**
 * Renders the result of `matchRoutes()` into a React element.
 */function ex(e){return M(e)}function eE(e){let t={// Note: this check also occurs in createRoutesFromChildren so update
// there if you change this -- please and thank you!
hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};if(e.Component){if(false){}Object.assign(t,{element:/*#__PURE__*/React.createElement(e.Component),Component:undefined})}if(e.HydrateFallback){if(false){}Object.assign(t,{hydrateFallbackElement:/*#__PURE__*/React.createElement(e.HydrateFallback),HydrateFallback:undefined})}if(e.ErrorBoundary){if(false){}Object.assign(t,{errorElement:/*#__PURE__*/React.createElement(e.ErrorBoundary),ErrorBoundary:undefined})}return t}function eO(e,t){return createRouter({basename:t==null?void 0:t.basename,future:o({},t==null?void 0:t.future,{v7_prependBasename:true}),history:createMemoryHistory({initialEntries:t==null?void 0:t.initialEntries,initialIndex:t==null?void 0:t.initialIndex}),hydrationData:t==null?void 0:t.hydrationData,routes:e,mapRouteProperties:eE,dataStrategy:t==null?void 0:t.dataStrategy,patchRoutesOnNavigation:t==null?void 0:t.patchRoutesOnNavigation}).initialize()}//# sourceMappingURL=index.js.map
},77462:function(e,t,r){"use strict";/**
 * @license React
 * react-jsx-runtime.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var n=r(41594),i=Symbol.for("react.element"),a=Symbol.for("react.fragment"),o=Object.prototype.hasOwnProperty,s=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,u={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,r){var n,a={},c=null,l=null;void 0!==r&&(c=""+r);void 0!==t.key&&(c=""+t.key);void 0!==t.ref&&(l=t.ref);for(n in t)o.call(t,n)&&!u.hasOwnProperty(n)&&(a[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)void 0===a[n]&&(a[n]=t[n]);return{$$typeof:i,type:e,key:c,ref:l,props:a,_owner:s.current}}t.Fragment=a;t.jsx=c;t.jsxs=c},86070:function(e,t,r){"use strict";if(true){e.exports=r(77462)}else{}},75057:function(e,t,r){"use strict";r.d(t,{Ay:()=>eP});/* import */var n=r(3439);/* import */var i=r(78578);/**!
* tippy.js v6.3.7
* (c) 2017-2021 atomiks
* MIT License
*/var a='<svg width="16" height="6" xmlns="http://www.w3.org/2000/svg"><path d="M0 6s1.796-.013 4.67-3.615C5.851.9 6.93.006 8 0c1.07-.006 2.148.887 3.343 2.385C14.233 6.005 16 6 16 6H0z"></svg>';var o="tippy-content";var s="tippy-backdrop";var u="tippy-arrow";var c="tippy-svg-arrow";var l={passive:true,capture:true};var d=function e(){return document.body};function f(e,t){return({}).hasOwnProperty.call(e,t)}function p(e,t,r){if(Array.isArray(e)){var n=e[t];return n==null?Array.isArray(r)?r[t]:r:n}return e}function h(e,t){var r=({}).toString.call(e);return r.indexOf("[object")===0&&r.indexOf(t+"]")>-1}function v(e,t){return typeof e==="function"?e.apply(void 0,t):e}function m(e,t){// Avoid wrapping in `setTimeout` if ms is 0 anyway
if(t===0){return e}var r;return function(n){clearTimeout(r);r=setTimeout(function(){e(n)},t)}}function g(e,t){var r=Object.assign({},e);t.forEach(function(e){delete r[e]});return r}function b(e){return e.split(/\s+/).filter(Boolean)}function _(e){return[].concat(e)}function y(e,t){if(e.indexOf(t)===-1){e.push(t)}}function w(e){return e.filter(function(t,r){return e.indexOf(t)===r})}function A(e){return e.split("-")[0]}function x(e){return[].slice.call(e)}function E(e){return Object.keys(e).reduce(function(t,r){if(e[r]!==undefined){t[r]=e[r]}return t},{})}function O(){return document.createElement("div")}function S(e){return["Element","Fragment"].some(function(t){return h(e,t)})}function T(e){return h(e,"NodeList")}function k(e){return h(e,"MouseEvent")}function C(e){return!!(e&&e._tippy&&e._tippy.reference===e)}function I(e){if(S(e)){return[e]}if(T(e)){return x(e)}if(Array.isArray(e)){return e}return x(document.querySelectorAll(e))}function R(e,t){e.forEach(function(e){if(e){e.style.transitionDuration=t+"ms"}})}function D(e,t){e.forEach(function(e){if(e){e.setAttribute("data-state",t)}})}function P(e){var t;var r=_(e),n=r[0];// Elements created via a <template> have an ownerDocument with no reference to the body
return n!=null&&(t=n.ownerDocument)!=null&&t.body?n.ownerDocument:document}function M(e,t){var r=t.clientX,n=t.clientY;return e.every(function(e){var t=e.popperRect,i=e.popperState,a=e.props;var o=a.interactiveBorder;var s=A(i.placement);var u=i.modifiersData.offset;if(!u){return true}var c=s==="bottom"?u.top.y:0;var l=s==="top"?u.bottom.y:0;var d=s==="right"?u.left.x:0;var f=s==="left"?u.right.x:0;var p=t.top-n+c>o;var h=n-t.bottom-l>o;var v=t.left-r+d>o;var m=r-t.right-f>o;return p||h||v||m})}function F(e,t,r){var n=t+"EventListener";// some browsers apparently support `transition` (unprefixed) but only fire
// `webkitTransitionEnd`...
["transitionend","webkitTransitionEnd"].forEach(function(t){e[n](t,r)})}/**
 * Compared to xxx.contains, this function works for dom structures with shadow
 * dom
 */function Y(e,t){var r=t;while(r){var n;if(e.contains(r)){return true}r=r.getRootNode==null?void 0:(n=r.getRootNode())==null?void 0:n.host}return false}var L={isTouch:false};var N=0;/**
 * When a `touchstart` event is fired, it's assumed the user is using touch
 * input. We'll bind a `mousemove` event listener to listen for mouse input in
 * the future. This way, the `isTouch` property is fully dynamic and will handle
 * hybrid devices that use a mix of touch + mouse input.
 */function H(){if(L.isTouch){return}L.isTouch=true;if(window.performance){document.addEventListener("mousemove",j)}}/**
 * When two `mousemove` event are fired consecutively within 20ms, it's assumed
 * the user is using mouse input again. `mousemove` can fire on touch devices as
 * well, but very rarely that quickly.
 */function j(){var e=performance.now();if(e-N<20){L.isTouch=false;document.removeEventListener("mousemove",j)}N=e}/**
 * When an element is in focus and has a tippy, leaving the tab/window and
 * returning causes it to show again. For mouse users this is unexpected, but
 * for keyboard use it makes sense.
 * TODO: find a better technique to solve this problem
 */function U(){var e=document.activeElement;if(C(e)){var t=e._tippy;if(e.blur&&!t.state.isVisible){e.blur()}}}function B(){document.addEventListener("touchstart",H,l);window.addEventListener("blur",U)}var K=typeof window!=="undefined"&&typeof document!=="undefined";var z=K?!!window.msCrypto:false;function q(e){var t=e==="destroy"?"n already-":" ";return[e+"() was called on a"+t+"destroyed instance. This is a no-op but","indicates a potential memory leak."].join(" ")}function V(e){var t=/[ \t]{2,}/g;var r=/^[ \t]*/gm;return e.replace(t," ").replace(r,"").trim()}function W(e){return V("\n  %ctippy.js\n\n  %c"+V(e)+"\n\n  %c👷‍ This is a development-only message. It will be removed in production.\n  ")}function G(e){return[W(e),"color: #00C584; font-size: 1.3em; font-weight: bold;","line-height: 1.5","color: #a6a095;"]}// Assume warnings and errors never have the same message
var $;if(false){}function Q(){$=new Set}function X(e,t){if(e&&!$.has(t)){var r;$.add(t);(r=console).warn.apply(r,G(t))}}function J(e,t){if(e&&!$.has(t)){var r;$.add(t);(r=console).error.apply(r,G(t))}}function Z(e){var t=!e;var r=Object.prototype.toString.call(e)==="[object Object]"&&!e.addEventListener;J(t,["tippy() was passed","`"+String(e)+"`","as its targets (first) argument. Valid types are: String, Element,","Element[], or NodeList."].join(" "));J(r,["tippy() was passed a plain object which is not supported as an argument","for virtual positioning. Use props.getReferenceClientRect instead."].join(" "))}var ee={animateFill:false,followCursor:false,inlinePositioning:false,sticky:false};var et={allowHTML:false,animation:"fade",arrow:true,content:"",inertia:false,maxWidth:350,role:"tooltip",theme:"",zIndex:9999};var er=Object.assign({appendTo:d,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:true,ignoreAttributes:false,interactive:false,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function e(){},onBeforeUpdate:function e(){},onCreate:function e(){},onDestroy:function e(){},onHidden:function e(){},onHide:function e(){},onMount:function e(){},onShow:function e(){},onShown:function e(){},onTrigger:function e(){},onUntrigger:function e(){},onClickOutside:function e(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:false,touch:true,trigger:"mouseenter focus",triggerTarget:null},ee,et);var en=Object.keys(er);var ei=function e(e){/* istanbul ignore else */if(false){}var t=Object.keys(e);t.forEach(function(t){er[t]=e[t]})};function ea(e){var t=e.plugins||[];var r=t.reduce(function(t,r){var n=r.name,i=r.defaultValue;if(n){var a;t[n]=e[n]!==undefined?e[n]:(a=er[n])!=null?a:i}return t},{});return Object.assign({},e,r)}function eo(e,t){var r=t?Object.keys(ea(Object.assign({},er,{plugins:t}))):en;var n=r.reduce(function(t,r){var n=(e.getAttribute("data-tippy-"+r)||"").trim();if(!n){return t}if(r==="content"){t[r]=n}else{try{t[r]=JSON.parse(n)}catch(e){t[r]=n}}return t},{});return n}function es(e,t){var r=Object.assign({},t,{content:v(t.content,[e])},t.ignoreAttributes?{}:eo(e,t.plugins));r.aria=Object.assign({},er.aria,r.aria);r.aria={expanded:r.aria.expanded==="auto"?t.interactive:r.aria.expanded,content:r.aria.content==="auto"?t.interactive?null:"describedby":r.aria.content};return r}function eu(e,t){if(e===void 0){e={}}if(t===void 0){t=[]}var r=Object.keys(e);r.forEach(function(e){var r=g(er,Object.keys(ee));var n=!f(r,e);// Check if the prop exists in `plugins`
if(n){n=t.filter(function(t){return t.name===e}).length===0}X(n,["`"+e+"`","is not a valid prop. You may have spelled it incorrectly, or if it's","a plugin, forgot to pass it in an array as props.plugins.","\n\n","All props: https://atomiks.github.io/tippyjs/v6/all-props/\n","Plugins: https://atomiks.github.io/tippyjs/v6/plugins/"].join(" "))})}function ec(e){var t=e.firstElementChild;var r=x(t.children);return{box:t,content:r.find(function(e){return e.classList.contains(o)}),arrow:r.find(function(e){return e.classList.contains(u)||e.classList.contains(c)}),backdrop:r.find(function(e){return e.classList.contains(s)})}}var el=1;var ed=[];// Used by `hideAll()`
var ef=[];function ep(e,t){var r=es(e,Object.assign({},er,ea(E(t))));// ===========================================================================
// 🔒 Private members
// ===========================================================================
var i;var a;var o;var s=false;var u=false;var c=false;var f=false;var h;var g;var A;var S=[];var T=m(eO,r.interactiveDebounce);var C;// ===========================================================================
// 🔑 Public members
// ===========================================================================
var I=el++;var N=null;var H=w(r.plugins);var j={// Is the instance currently enabled?
isEnabled:true,// Is the tippy currently showing and not transitioning out?
isVisible:false,// Has the instance been destroyed?
isDestroyed:false,// Is the tippy currently mounted to the DOM?
isMounted:false,// Has the tippy finished transitioning in?
isShown:false};var U={// properties
id:I,reference:e,popper:O(),popperInstance:N,props:r,state:j,plugins:H,// methods
clearDelayTimeouts:eL,setProps:eN,setContent:eH,show:ej,hide:eU,hideWithInteractivity:eB,enable:eF,disable:eY,unmount:eK,destroy:ez};// TODO: Investigate why this early return causes a TDZ error in the tests —
// it doesn't seem to happen in the browser
/* istanbul ignore if */if(!r.render){if(false){}return U}// ===========================================================================
// Initial mutations
// ===========================================================================
var B=r.render(U),K=B.popper,q=B.onUpdate;K.setAttribute("data-tippy-root","");K.id="tippy-"+U.id;U.popper=K;e._tippy=U;K._tippy=U;var V=H.map(function(e){return e.fn(U)});var W=e.hasAttribute("aria-expanded");eA();eo();et();en("onCreate",[U]);if(r.showOnCreate){eP()}// Prevent a tippy with a delay from hiding if the cursor left then returned
// before it started hiding
K.addEventListener("mouseenter",function(){if(U.props.interactive&&U.state.isVisible){U.clearDelayTimeouts()}});K.addEventListener("mouseleave",function(){if(U.props.interactive&&U.props.trigger.indexOf("mouseenter")>=0){J().addEventListener("mousemove",T)}});return U;// ===========================================================================
// 🔒 Private methods
// ===========================================================================
function G(){var e=U.props.touch;return Array.isArray(e)?e:[e,0]}function $(){return G()[0]==="hold"}function Q(){var e;// @ts-ignore
return!!((e=U.props.render)!=null&&e.$$tippy)}function X(){return C||e}function J(){var e=X().parentNode;return e?P(e):document}function Z(){return ec(K)}function ee(e){// For touch or keyboard input, force `0` delay for UX reasons
// Also if the instance is mounted but not visible (transitioning out),
// ignore delay
if(U.state.isMounted&&!U.state.isVisible||L.isTouch||h&&h.type==="focus"){return 0}return p(U.props.delay,e?0:1,er.delay)}function et(e){if(e===void 0){e=false}K.style.pointerEvents=U.props.interactive&&!e?"":"none";K.style.zIndex=""+U.props.zIndex}function en(e,t,r){if(r===void 0){r=true}V.forEach(function(r){if(r[e]){r[e].apply(r,t)}});if(r){var n;(n=U.props)[e].apply(n,t)}}function ei(){var t=U.props.aria;if(!t.content){return}var r="aria-"+t.content;var n=K.id;var i=_(U.props.triggerTarget||e);i.forEach(function(e){var t=e.getAttribute(r);if(U.state.isVisible){e.setAttribute(r,t?t+" "+n:n)}else{var i=t&&t.replace(n,"").trim();if(i){e.setAttribute(r,i)}else{e.removeAttribute(r)}}})}function eo(){if(W||!U.props.aria.expanded){return}var t=_(U.props.triggerTarget||e);t.forEach(function(e){if(U.props.interactive){e.setAttribute("aria-expanded",U.state.isVisible&&e===X()?"true":"false")}else{e.removeAttribute("aria-expanded")}})}function eu(){J().removeEventListener("mousemove",T);ed=ed.filter(function(e){return e!==T})}function ep(t){// Moved finger to scroll instead of an intentional tap outside
if(L.isTouch){if(c||t.type==="mousedown"){return}}var r=t.composedPath&&t.composedPath()[0]||t.target;// Clicked on interactive popper
if(U.props.interactive&&Y(K,r)){return}// Clicked on the event listeners target
if(_(U.props.triggerTarget||e).some(function(e){return Y(e,r)})){if(L.isTouch){return}if(U.state.isVisible&&U.props.trigger.indexOf("click")>=0){return}}else{en("onClickOutside",[U,t])}if(U.props.hideOnClick===true){U.clearDelayTimeouts();U.hide();// `mousedown` event is fired right before `focus` if pressing the
// currentTarget. This lets a tippy with `focus` trigger know that it
// should not show
u=true;setTimeout(function(){u=false});// The listener gets added in `scheduleShow()`, but this may be hiding it
// before it shows, and hide()'s early bail-out behavior can prevent it
// from being cleaned up
if(!U.state.isMounted){eg()}}}function eh(){c=true}function ev(){c=false}function em(){var e=J();e.addEventListener("mousedown",ep,true);e.addEventListener("touchend",ep,l);e.addEventListener("touchstart",ev,l);e.addEventListener("touchmove",eh,l)}function eg(){var e=J();e.removeEventListener("mousedown",ep,true);e.removeEventListener("touchend",ep,l);e.removeEventListener("touchstart",ev,l);e.removeEventListener("touchmove",eh,l)}function eb(e,t){ey(e,function(){if(!U.state.isVisible&&K.parentNode&&K.parentNode.contains(K)){t()}})}function e_(e,t){ey(e,t)}function ey(e,t){var r=Z().box;function n(e){if(e.target===r){F(r,"remove",n);t()}}// Make callback synchronous if duration is 0
// `transitionend` won't fire otherwise
if(e===0){return t()}F(r,"remove",g);F(r,"add",n);g=n}function ew(t,r,n){if(n===void 0){n=false}var i=_(U.props.triggerTarget||e);i.forEach(function(e){e.addEventListener(t,r,n);S.push({node:e,eventType:t,handler:r,options:n})})}function eA(){if($()){ew("touchstart",eE,{passive:true});ew("touchend",eS,{passive:true})}b(U.props.trigger).forEach(function(e){if(e==="manual"){return}ew(e,eE);switch(e){case"mouseenter":ew("mouseleave",eS);break;case"focus":ew(z?"focusout":"blur",eT);break;case"focusin":ew("focusout",eT);break}})}function ex(){S.forEach(function(e){var t=e.node,r=e.eventType,n=e.handler,i=e.options;t.removeEventListener(r,n,i)});S=[]}function eE(e){var t;var r=false;if(!U.state.isEnabled||ek(e)||u){return}var n=((t=h)==null?void 0:t.type)==="focus";h=e;C=e.currentTarget;eo();if(!U.state.isVisible&&k(e)){// If scrolling, `mouseenter` events can be fired if the cursor lands
// over a new target, but `mousemove` events don't get fired. This
// causes interactive tooltips to get stuck open until the cursor is
// moved
ed.forEach(function(t){return t(e)})}// Toggle show/hide when clicking click-triggered tooltips
if(e.type==="click"&&(U.props.trigger.indexOf("mouseenter")<0||s)&&U.props.hideOnClick!==false&&U.state.isVisible){r=true}else{eP(e)}if(e.type==="click"){s=!r}if(r&&!n){eM(e)}}function eO(e){var t=e.target;var n=X().contains(t)||K.contains(t);if(e.type==="mousemove"&&n){return}var i=eD().concat(K).map(function(e){var t;var n=e._tippy;var i=(t=n.popperInstance)==null?void 0:t.state;if(i){return{popperRect:e.getBoundingClientRect(),popperState:i,props:r}}return null}).filter(Boolean);if(M(i,e)){eu();eM(e)}}function eS(e){var t=ek(e)||U.props.trigger.indexOf("click")>=0&&s;if(t){return}if(U.props.interactive){U.hideWithInteractivity(e);return}eM(e)}function eT(e){if(U.props.trigger.indexOf("focusin")<0&&e.target!==X()){return}// If focus was moved to within the popper
if(U.props.interactive&&e.relatedTarget&&K.contains(e.relatedTarget)){return}eM(e)}function ek(e){return L.isTouch?$()!==e.type.indexOf("touch")>=0:false}function eC(){eI();var t=U.props,r=t.popperOptions,i=t.placement,a=t.offset,o=t.getReferenceClientRect,s=t.moveTransition;var u=Q()?ec(K).arrow:null;var c=o?{getBoundingClientRect:o,contextElement:o.contextElement||X()}:e;var l={name:"$$tippy",enabled:true,phase:"beforeWrite",requires:["computeStyles"],fn:function e(e){var t=e.state;if(Q()){var r=Z(),n=r.box;["placement","reference-hidden","escaped"].forEach(function(e){if(e==="placement"){n.setAttribute("data-placement",t.placement)}else{if(t.attributes.popper["data-popper-"+e]){n.setAttribute("data-"+e,"")}else{n.removeAttribute("data-"+e)}}});t.attributes.popper={}}}};var d=[{name:"offset",options:{offset:a}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!s}},l];if(Q()&&u){d.push({name:"arrow",options:{element:u,padding:3}})}d.push.apply(d,(r==null?void 0:r.modifiers)||[]);U.popperInstance=(0,n/* .createPopper */.n)(c,K,Object.assign({},r,{placement:i,onFirstUpdate:A,modifiers:d}))}function eI(){if(U.popperInstance){U.popperInstance.destroy();U.popperInstance=null}}function eR(){var e=U.props.appendTo;var t;// By default, we'll append the popper to the triggerTargets's parentNode so
// it's directly after the reference element so the elements inside the
// tippy can be tabbed to
// If there are clipping issues, the user can specify a different appendTo
// and ensure focus management is handled correctly manually
var r=X();if(U.props.interactive&&e===d||e==="parent"){t=r.parentNode}else{t=v(e,[r])}// The popper element needs to exist on the DOM before its position can be
// updated as Popper needs to read its dimensions
if(!t.contains(K)){t.appendChild(K)}U.state.isMounted=true;eC();/* istanbul ignore else */if(false){}}function eD(){return x(K.querySelectorAll("[data-tippy-root]"))}function eP(e){U.clearDelayTimeouts();if(e){en("onTrigger",[U,e])}em();var t=ee(true);var r=G(),n=r[0],a=r[1];if(L.isTouch&&n==="hold"&&a){t=a}if(t){i=setTimeout(function(){U.show()},t)}else{U.show()}}function eM(e){U.clearDelayTimeouts();en("onUntrigger",[U,e]);if(!U.state.isVisible){eg();return}// For interactive tippies, scheduleHide is added to a document.body handler
// from onMouseLeave so must intercept scheduled hides from mousemove/leave
// events when trigger contains mouseenter and click, and the tip is
// currently shown as a result of a click.
if(U.props.trigger.indexOf("mouseenter")>=0&&U.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(e.type)>=0&&s){return}var t=ee(false);if(t){a=setTimeout(function(){if(U.state.isVisible){U.hide()}},t)}else{// Fixes a `transitionend` problem when it fires 1 frame too
// late sometimes, we don't want hide() to be called.
o=requestAnimationFrame(function(){U.hide()})}}// ===========================================================================
// 🔑 Public methods
// ===========================================================================
function eF(){U.state.isEnabled=true}function eY(){// Disabling the instance should also hide it
// https://github.com/atomiks/tippy.js-react/issues/106
U.hide();U.state.isEnabled=false}function eL(){clearTimeout(i);clearTimeout(a);cancelAnimationFrame(o)}function eN(t){/* istanbul ignore else */if(false){}if(U.state.isDestroyed){return}en("onBeforeUpdate",[U,t]);ex();var r=U.props;var n=es(e,Object.assign({},r,E(t),{ignoreAttributes:true}));U.props=n;eA();if(r.interactiveDebounce!==n.interactiveDebounce){eu();T=m(eO,n.interactiveDebounce)}// Ensure stale aria-expanded attributes are removed
if(r.triggerTarget&&!n.triggerTarget){_(r.triggerTarget).forEach(function(e){e.removeAttribute("aria-expanded")})}else if(n.triggerTarget){e.removeAttribute("aria-expanded")}eo();et();if(q){q(r,n)}if(U.popperInstance){eC();// Fixes an issue with nested tippies if they are all getting re-rendered,
// and the nested ones get re-rendered first.
// https://github.com/atomiks/tippyjs-react/issues/177
// TODO: find a cleaner / more efficient solution(!)
eD().forEach(function(e){// React (and other UI libs likely) requires a rAF wrapper as it flushes
// its work in one
requestAnimationFrame(e._tippy.popperInstance.forceUpdate)})}en("onAfterUpdate",[U,t])}function eH(e){U.setProps({content:e})}function ej(){/* istanbul ignore else */if(false){}// Early bail-out
var e=U.state.isVisible;var t=U.state.isDestroyed;var r=!U.state.isEnabled;var n=L.isTouch&&!U.props.touch;var i=p(U.props.duration,0,er.duration);if(e||t||r||n){return}// Normalize `disabled` behavior across browsers.
// Firefox allows events on disabled elements, but Chrome doesn't.
// Using a wrapper element (i.e. <span>) is recommended.
if(X().hasAttribute("disabled")){return}en("onShow",[U],false);if(U.props.onShow(U)===false){return}U.state.isVisible=true;if(Q()){K.style.visibility="visible"}et();em();if(!U.state.isMounted){K.style.transition="none"}// If flipping to the opposite side after hiding at least once, the
// animation will use the wrong placement without resetting the duration
if(Q()){var a=Z(),o=a.box,s=a.content;R([o,s],0)}A=function e(){var e;if(!U.state.isVisible||f){return}f=true;// reflow
void K.offsetHeight;K.style.transition=U.props.moveTransition;if(Q()&&U.props.animation){var t=Z(),r=t.box,n=t.content;R([r,n],i);D([r,n],"visible")}ei();eo();y(ef,U);// certain modifiers (e.g. `maxSize`) require a second update after the
// popper has been positioned for the first time
(e=U.popperInstance)==null?void 0:e.forceUpdate();en("onMount",[U]);if(U.props.animation&&Q()){e_(i,function(){U.state.isShown=true;en("onShown",[U])})}};eR()}function eU(){/* istanbul ignore else */if(false){}// Early bail-out
var e=!U.state.isVisible;var t=U.state.isDestroyed;var r=!U.state.isEnabled;var n=p(U.props.duration,1,er.duration);if(e||t||r){return}en("onHide",[U],false);if(U.props.onHide(U)===false){return}U.state.isVisible=false;U.state.isShown=false;f=false;s=false;if(Q()){K.style.visibility="hidden"}eu();eg();et(true);if(Q()){var i=Z(),a=i.box,o=i.content;if(U.props.animation){R([a,o],n);D([a,o],"hidden")}}ei();eo();if(U.props.animation){if(Q()){eb(n,U.unmount)}}else{U.unmount()}}function eB(e){/* istanbul ignore else */if(false){}J().addEventListener("mousemove",T);y(ed,T);T(e)}function eK(){/* istanbul ignore else */if(false){}if(U.state.isVisible){U.hide()}if(!U.state.isMounted){return}eI();// If a popper is not interactive, it will be appended outside the popper
// tree by default. This seems mainly for interactive tippies, but we should
// find a workaround if possible
eD().forEach(function(e){e._tippy.unmount()});if(K.parentNode){K.parentNode.removeChild(K)}ef=ef.filter(function(e){return e!==U});U.state.isMounted=false;en("onHidden",[U])}function ez(){/* istanbul ignore else */if(false){}if(U.state.isDestroyed){return}U.clearDelayTimeouts();U.unmount();ex();delete e._tippy;U.state.isDestroyed=true;en("onDestroy",[U])}}function eh(e,t){if(t===void 0){t={}}var r=er.plugins.concat(t.plugins||[]);/* istanbul ignore else */if(false){}B();var n=Object.assign({},t,{plugins:r});var i=I(e);/* istanbul ignore else */if(false){var a,o}var s=i.reduce(function(e,t){var r=t&&ep(t,n);if(r){e.push(r)}return e},[]);return S(e)?s[0]:s}eh.defaultProps=er;eh.setDefaultProps=ei;eh.currentInput=L;var ev=function e(e){var t=e===void 0?{}:e,r=t.exclude,n=t.duration;ef.forEach(function(e){var t=false;if(r){t=C(r)?e.reference===r:e.popper===r.popper}if(!t){var i=e.props.duration;e.setProps({duration:n});e.hide();if(!e.state.isDestroyed){e.setProps({duration:i})}}})};// every time the popper is destroyed (i.e. a new target), removing the styles
// and causing transitions to break for singletons when the console is open, but
// most notably for non-transform styles being used, `gpuAcceleration: false`.
var em=Object.assign({},i/* ["default"] */.A,{effect:function e(e){var t=e.state;var r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(t.elements.popper.style,r.popper);t.styles=r;if(t.elements.arrow){Object.assign(t.elements.arrow.style,r.arrow)}// intentionally return no cleanup function
// return () => { ... }
}});var eg=function e(e,t){var r;if(t===void 0){t={}}/* istanbul ignore else */if(false){}var n=e;var i=[];var a=[];var o;var s=t.overrides;var u=[];var c=false;function l(){a=n.map(function(e){return _(e.props.triggerTarget||e.reference)}).reduce(function(e,t){return e.concat(t)},[])}function d(){i=n.map(function(e){return e.reference})}function f(e){n.forEach(function(t){if(e){t.enable()}else{t.disable()}})}function p(e){return n.map(function(t){var r=t.setProps;t.setProps=function(n){r(n);if(t.reference===o){e.setProps(n)}};return function(){t.setProps=r}})}// have to pass singleton, as it maybe undefined on first call
function h(e,t){var r=a.indexOf(t);// bail-out
if(t===o){return}o=t;var u=(s||[]).concat("content").reduce(function(e,t){e[t]=n[r].props[t];return e},{});e.setProps(Object.assign({},u,{getReferenceClientRect:typeof u.getReferenceClientRect==="function"?u.getReferenceClientRect:function(){var e;return(e=i[r])==null?void 0:e.getBoundingClientRect()}}))}f(false);d();l();var v={fn:function e(){return{onDestroy:function e(){f(true)},onHidden:function e(){o=null},onClickOutside:function e(e){if(e.props.showOnCreate&&!c){c=true;o=null}},onShow:function e(e){if(e.props.showOnCreate&&!c){c=true;h(e,i[0])}},onTrigger:function e(e,t){h(e,t.currentTarget)}}}};var m=eh(O(),Object.assign({},g(t,["overrides"]),{plugins:[v].concat(t.plugins||[]),triggerTarget:a,popperOptions:Object.assign({},t.popperOptions,{modifiers:[].concat(((r=t.popperOptions)==null?void 0:r.modifiers)||[],[em])})}));var b=m.show;m.show=function(e){b();// first time, showOnCreate or programmatic call with no params
// default to showing first instance
if(!o&&e==null){return h(m,i[0])}// triggered from event (do nothing as prepareInstance already called by onTrigger)
// programmatic call with no params when already visible (do nothing again)
if(o&&e==null){return}// target is index of instance
if(typeof e==="number"){return i[e]&&h(m,i[e])}// target is a child tippy instance
if(n.indexOf(e)>=0){var t=e.reference;return h(m,t)}// target is a ReferenceElement
if(i.indexOf(e)>=0){return h(m,e)}};m.showNext=function(){var e=i[0];if(!o){return m.show(0)}var t=i.indexOf(o);m.show(i[t+1]||e)};m.showPrevious=function(){var e=i[i.length-1];if(!o){return m.show(e)}var t=i.indexOf(o);var r=i[t-1]||e;m.show(r)};var y=m.setProps;m.setProps=function(e){s=e.overrides||s;y(e)};m.setInstances=function(e){f(true);u.forEach(function(e){return e()});n=e;f(false);d();l();u=p(m);m.setProps({triggerTarget:a})};u=p(m);return m};var eb=/* unused pure expression or super */null&&{mouseover:"mouseenter",focusin:"focus",click:"click"};/**
 * Creates a delegate instance that controls the creation of tippy instances
 * for child elements (`target` CSS selector).
 */function e_(e,t){/* istanbul ignore else */if(false){}var r=[];var n=[];var i=false;var a=t.target;var o=g(t,["target"]);var s=Object.assign({},o,{trigger:"manual",touch:false});var u=Object.assign({touch:er.touch},o,{showOnCreate:true});var c=eh(e,s);var d=_(c);function f(e){if(!e.target||i){return}var r=e.target.closest(a);if(!r){return}// Get relevant trigger with fallbacks:
// 1. Check `data-tippy-trigger` attribute on target node
// 2. Fallback to `trigger` passed to `delegate()`
// 3. Fallback to `defaultProps.trigger`
var o=r.getAttribute("data-tippy-trigger")||t.trigger||er.trigger;// @ts-ignore
if(r._tippy){return}if(e.type==="touchstart"&&typeof u.touch==="boolean"){return}if(e.type!=="touchstart"&&o.indexOf(eb[e.type])<0){return}var s=eh(r,u);if(s){n=n.concat(s)}}function p(e,t,n,i){if(i===void 0){i=false}e.addEventListener(t,n,i);r.push({node:e,eventType:t,handler:n,options:i})}function h(e){var t=e.reference;p(t,"touchstart",f,l);p(t,"mouseover",f);p(t,"focusin",f);p(t,"click",f)}function v(){r.forEach(function(e){var t=e.node,r=e.eventType,n=e.handler,i=e.options;t.removeEventListener(r,n,i)});r=[]}function m(e){var t=e.destroy;var r=e.enable;var a=e.disable;e.destroy=function(e){if(e===void 0){e=true}if(e){n.forEach(function(e){e.destroy()})}n=[];v();t()};e.enable=function(){r();n.forEach(function(e){return e.enable()});i=false};e.disable=function(){a();n.forEach(function(e){return e.disable()});i=true};h(e)}d.forEach(m);return c}var ey=/* unused pure expression or super */null&&{name:"animateFill",defaultValue:false,fn:function e(e){var t;// @ts-ignore
if(!((t=e.props.render)!=null&&t.$$tippy)){if(false){}return{}}var r=ec(e.popper),n=r.box,i=r.content;var a=e.props.animateFill?ew():null;return{onCreate:function t(){if(a){n.insertBefore(a,n.firstElementChild);n.setAttribute("data-animatefill","");n.style.overflow="hidden";e.setProps({arrow:false,animation:"shift-away"})}},onMount:function e(){if(a){var e=n.style.transitionDuration;var t=Number(e.replace("ms",""));// The content should fade in after the backdrop has mostly filled the
// tooltip element. `clip-path` is the other alternative but is not
// well-supported and is buggy on some devices.
i.style.transitionDelay=Math.round(t/10)+"ms";a.style.transitionDuration=e;D([a],"visible")}},onShow:function e(){if(a){a.style.transitionDuration="0ms"}},onHide:function e(){if(a){D([a],"hidden")}}}}};function ew(){var e=O();e.className=s;D([e],"hidden");return e}var eA=/* unused pure expression or super */null&&{clientX:0,clientY:0};var ex=/* unused pure expression or super */null&&[];function eE(e){var t=e.clientX,r=e.clientY;eA={clientX:t,clientY:r}}function eO(e){e.addEventListener("mousemove",eE)}function eS(e){e.removeEventListener("mousemove",eE)}var eT=/* unused pure expression or super */null&&{name:"followCursor",defaultValue:false,fn:function e(e){var t=e.reference;var r=P(e.props.triggerTarget||t);var n=false;var i=false;var a=true;var o=e.props;function s(){return e.props.followCursor==="initial"&&e.state.isVisible}function u(){r.addEventListener("mousemove",d)}function c(){r.removeEventListener("mousemove",d)}function l(){n=true;e.setProps({getReferenceClientRect:null});n=false}function d(r){// If the instance is interactive, avoid updating the position unless it's
// over the reference element
var n=r.target?t.contains(r.target):true;var i=e.props.followCursor;var a=r.clientX,o=r.clientY;var s=t.getBoundingClientRect();var u=a-s.left;var c=o-s.top;if(n||!e.props.interactive){e.setProps({// @ts-ignore - unneeded DOMRect properties
getReferenceClientRect:function e(){var e=t.getBoundingClientRect();var r=a;var n=o;if(i==="initial"){r=e.left+u;n=e.top+c}var s=i==="horizontal"?e.top:n;var l=i==="vertical"?e.right:r;var d=i==="horizontal"?e.bottom:n;var f=i==="vertical"?e.left:r;return{width:l-f,height:d-s,top:s,right:l,bottom:d,left:f}}})}}function f(){if(e.props.followCursor){ex.push({instance:e,doc:r});eO(r)}}function p(){ex=ex.filter(function(t){return t.instance!==e});if(ex.filter(function(e){return e.doc===r}).length===0){eS(r)}}return{onCreate:f,onDestroy:p,onBeforeUpdate:function t(){o=e.props},onAfterUpdate:function t(t,r){var a=r.followCursor;if(n){return}if(a!==undefined&&o.followCursor!==a){p();if(a){f();if(e.state.isMounted&&!i&&!s()){u()}}else{c();l()}}},onMount:function t(){if(e.props.followCursor&&!i){if(a){d(eA);a=false}if(!s()){u()}}},onTrigger:function e(e,t){if(k(t)){eA={clientX:t.clientX,clientY:t.clientY}}i=t.type==="focus"},onHidden:function t(){if(e.props.followCursor){l();c();a=true}}}}};function ek(e,t){var r;return{popperOptions:Object.assign({},e.popperOptions,{modifiers:[].concat((((r=e.popperOptions)==null?void 0:r.modifiers)||[]).filter(function(e){var r=e.name;return r!==t.name}),[t])})}}var eC=/* unused pure expression or super */null&&{name:"inlinePositioning",defaultValue:false,fn:function e(e){var t=e.reference;function r(){return!!e.props.inlinePositioning}var n;var i=-1;var a=false;var o=[];var s={name:"tippyInlinePositioning",enabled:true,phase:"afterWrite",fn:function t(t){var i=t.state;if(r()){if(o.indexOf(i.placement)!==-1){o=[]}if(n!==i.placement&&o.indexOf(i.placement)===-1){o.push(i.placement);e.setProps({// @ts-ignore - unneeded DOMRect properties
getReferenceClientRect:function e(){return u(i.placement)}})}n=i.placement}}};function u(e){return eI(A(e),t.getBoundingClientRect(),x(t.getClientRects()),i)}function c(t){a=true;e.setProps(t);a=false}function l(){if(!a){c(ek(e.props,s))}}return{onCreate:l,onAfterUpdate:l,onTrigger:function t(t,r){if(k(r)){var n=x(e.reference.getClientRects());var a=n.find(function(e){return e.left-2<=r.clientX&&e.right+2>=r.clientX&&e.top-2<=r.clientY&&e.bottom+2>=r.clientY});var o=n.indexOf(a);i=o>-1?o:i}},onHidden:function e(){i=-1}}}};function eI(e,t,r,n){// Not an inline element, or placement is not yet known
if(r.length<2||e===null){return t}// There are two rects and they are disjoined
if(r.length===2&&n>=0&&r[0].left>r[1].right){return r[n]||t}switch(e){case"top":case"bottom":{var i=r[0];var a=r[r.length-1];var o=e==="top";var s=i.top;var u=a.bottom;var c=o?i.left:a.left;var l=o?i.right:a.right;var d=l-c;var f=u-s;return{top:s,bottom:u,left:c,right:l,width:d,height:f}}case"left":case"right":{var p=Math.min.apply(Math,r.map(function(e){return e.left}));var h=Math.max.apply(Math,r.map(function(e){return e.right}));var v=r.filter(function(t){return e==="left"?t.left===p:t.right===h});var m=v[0].top;var g=v[v.length-1].bottom;var b=p;var _=h;var y=_-b;var w=g-m;return{top:m,bottom:g,left:b,right:_,width:y,height:w}}default:{return t}}}var eR=/* unused pure expression or super */null&&{name:"sticky",defaultValue:false,fn:function e(e){var t=e.reference,r=e.popper;function n(){return e.popperInstance?e.popperInstance.state.elements.reference:t}function i(t){return e.props.sticky===true||e.props.sticky===t}var a=null;var o=null;function s(){var t=i("reference")?n().getBoundingClientRect():null;var u=i("popper")?r.getBoundingClientRect():null;if(t&&eD(a,t)||u&&eD(o,u)){if(e.popperInstance){e.popperInstance.update()}}a=t;o=u;if(e.state.isMounted){requestAnimationFrame(s)}}return{onMount:function t(){if(e.props.sticky){s()}}}}};function eD(e,t){if(e&&t){return e.top!==t.top||e.right!==t.right||e.bottom!==t.bottom||e.left!==t.left}return true}eh.setDefaultProps({animation:false});/* export default */const eP=eh;//# sourceMappingURL=tippy-headless.esm.js.map
},79138:function(e,t,r){"use strict";e.exports=r.p+"js/images/generate-course-2x-bece3b67.webp"},51693:function(e,t,r){"use strict";e.exports=r.p+"js/images/generate-course-c1a5f0d9.webp"},17064:function(e,t,r){"use strict";e.exports=r.p+"js/images/generate-text-2x-45983f4c.webp"},55051:function(e,t,r){"use strict";e.exports=r.p+"js/images/generate-text-269f7e17.webp"},94812:function(e,t,r){"use strict";r.d(t,{A:()=>i});var n={ADMIN_AJAX:"wp-admin/admin-ajax.php",TAGS:"course-tag",CATEGORIES:"course-category",USERS:"users",USERS_LIST:"tutor_user_list",ORDER_DETAILS:"tutor_order_details",ADMIN_COMMENT:"tutor_order_comment",ORDER_MARK_AS_PAID:"tutor_order_paid",ORDER_REFUND:"tutor_order_refund",ORDER_CANCEL:"tutor_order_cancel",ADD_ORDER_DISCOUNT:"tutor_order_discount",COURSE_LIST:"course_list",BUNDLE_LIST:"tutor_get_bundle_list",CATEGORY_LIST:"category_list",CREATED_COURSE:"tutor_create_course",TUTOR_INSTRUCTOR_SEARCH:"tutor_course_instructor_search",CREATE_DRAFT_COURSE:"tutor_create_new_draft_course",TUTOR_YOUTUBE_VIDEO_DURATION:"tutor_youtube_video_duration",TUTOR_UNLINK_PAGE_BUILDER:"tutor_unlink_page_builder",// AI CONTENT GENERATION
GENERATE_AI_IMAGE:"tutor_pro_generate_image",MAGIC_FILL_AI_IMAGE:"tutor_pro_magic_fill_image",MAGIC_TEXT_GENERATION:"tutor_pro_generate_text_content",MAGIC_AI_MODIFY_CONTENT:"tutor_pro_modify_text_content",USE_AI_GENERATED_IMAGE:"tutor_pro_use_magic_image",OPEN_AI_SAVE_SETTINGS:"tutor_pro_chatgpt_save_settings",GENERATE_COURSE_CONTENT:"tutor_pro_generate_course_content",GENERATE_COURSE_TOPIC_CONTENT:"tutor_pro_generate_course_topic_content",SAVE_AI_GENERATED_COURSE_CONTENT:"tutor_pro_ai_course_create",GENERATE_QUIZ_QUESTIONS:"tutor_pro_generate_quiz_questions",GENERATE_AI_QUIZ_QUESTIONS:"tutor_pro_ai_generate_questions",// SUBSCRIPTION
GET_SUBSCRIPTIONS_LIST:"tutor_subscription_plans",SAVE_SUBSCRIPTION:"tutor_subscription_plan_save",DELETE_SUBSCRIPTION:"tutor_subscription_plan_delete",DUPLICATE_SUBSCRIPTION:"tutor_subscription_plan_duplicate",SORT_SUBSCRIPTION:"tutor_subscription_plan_sort",UPDATE_SUBSCRIPTION_STATUS:"tutor_subscription_status_update",RESUME_SUBSCRIPTION:"tutor_subscription_resume",EARLY_RENEW_SUBSCRIPTION:"tutor_subscription_early_renew",// COURSE
GET_COURSE_DETAILS:"tutor_course_details",UPDATE_COURSE:"tutor_update_course",GET_COURSE_LIST:"tutor_course_list",RESET_COURSE_PROGRESS:"tutor_reset_course_progress",TUTOR_COMPLETE_COURSE:"tutor_complete_course",// WOO COMMERCE PRODUCTS
GET_WC_PRODUCTS:"tutor_get_wc_products",GET_WC_PRODUCT_DETAILS:"tutor_get_wc_product",// QUIZ
GET_QUIZ_DETAILS:"tutor_quiz_details",SAVE_QUIZ:"tutor_quiz_builder_save",QUIZ_IMPORT_DATA:"quiz_import_data",QUIZ_EXPORT_DATA:"quiz_export_data",DELETE_QUIZ:"tutor_quiz_delete",START_QUIZ:"tutor_start_quiz",QUIZ_ABANDON:"tutor_quiz_abandon",QUIZ_TIMEOUT:"tutor_quiz_timeout",QUIZ_ATTEMPT_SUBMIT:"tutor_answering_quiz_question",REVIEW_QUIZ_ANSWERS:"tutor_review_quiz_answers",INSTRUCTOR_FEEDBACK:"tutor_instructor_feedback",// ZOOM
GET_ZOOM_MEETING_DETAILS:"tutor_zoom_meeting_details",SAVE_ZOOM_MEETING:"tutor_zoom_save_meeting",DELETE_ZOOM_MEETING:"tutor_zoom_delete_meeting",ZOOM_SAVE_API:"tutor_save_zoom_api",ZOOM_SAVE_SETTINGS:"tutor_save_zoom_settings",// GOOGLE MEET
GET_GOOGLE_MEET_DETAILS:"tutor_google_meet_meeting_details",SAVE_GOOGLE_MEET:"tutor_google_meet_new_meeting",DELETE_GOOGLE_MEET:"tutor_google_meet_delete",UPLOAD_GOOGLE_MEET_CREDENTIALS:"tutor_pro_google_meet_credential_upload",RESET_GOOGLE_MEET_CREDENTIALS:"tutor_google_meet_reset_cred",UPDATE_GOOGLE_MEET_SETTINGS:"tutor_update_google_meet_settings",// TOPIC
GET_COURSE_CONTENTS:"tutor_course_contents",SAVE_TOPIC:"tutor_save_topic",DELETE_TOPIC:"tutor_delete_topic",DELETE_TOPIC_CONTENT:"tutor_delete_lesson",UPDATE_COURSE_CONTENT_ORDER:"tutor_update_course_content_order",DUPLICATE_CONTENT:"tutor_duplicate_content",ADD_CONTENT_BANK_CONTENT_TO_COURSE:"tutor_content_bank_add_content_to_course",DELETE_CONTENT_BANK_CONTENT_FROM_COURSE:"tutor_content_bank_remove_content_from_course",// LESSON
GET_LESSON_DETAILS:"tutor_lesson_details",SAVE_LESSON:"tutor_save_lesson",LOAD_LESSON_COMMENTS:"tutor_load_lesson_comments",CREATE_LESSON_COMMENT:"tutor_create_lesson_comment",UPDATE_LESSON_COMMENT:"tutor_update_lesson_comment",DELETE_LESSON_COMMENT:"tutor_delete_lesson_comment",REPLY_LESSON_COMMENT:"tutor_reply_lesson_comment",LOAD_COMMENT_REPLIES:"tutor_load_comment_replies",// Q&A
QNA_SINGLE_ACTION:"tutor_qna_single_action",DELETE_DASHBOARD_QNA:"tutor_delete_dashboard_question",CREATE_UPDATE_QNA:"tutor_qna_create_update",UPDATE_QNA:"tutor_qna_update",LOAD_QNA_REPLIES:"tutor_qna_load_replies",// ASSIGNMENT
GET_ASSIGNMENT_DETAILS:"tutor_assignment_details",SAVE_ASSIGNMENT:"tutor_assignment_save",ASSIGNMENT_SUBMIT:"tutor_assignment_submit",REMOVE_ATTACHMENT:"tutor_remove_assignment_attachment",REMOVE_ASSIGNMENT_ATTEMPT:"tutor_remove_assignment_attempt",// TAX SETTINGS
GET_TAX_SETTINGS:"tutor_get_tax_settings",GET_H5P_QUIZ_CONTENT:"tutor_h5p_list_quiz_contents",GET_H5P_LESSON_CONTENT:"tutor_h5p_list_lesson_contents",GET_H5P_QUIZ_CONTENT_BY_ID:"tutor_h5p_quiz_content_by_id",// PAYMENT SETTINGS
GET_PAYMENT_SETTINGS:"tutor_payment_settings",GET_PAYMENT_GATEWAYS:"tutor_payment_gateways",INSTALL_PAYMENT_GATEWAY:"tutor_install_payment_gateway",REMOVE_PAYMENT_GATEWAY:"tutor_remove_payment_gateway",// ADDON LIST
GET_ADDON_LIST:"tutor_get_all_addons",ADDON_ENABLE_DISABLE:"addon_enable_disable",// INSTALL PLUGIN
TUTOR_INSTALL_PLUGIN:"tutor_install_plugin",// COUPON
GET_COUPON_DETAILS:"tutor_coupon_details",CREATE_COUPON:"tutor_coupon_create",UPDATE_COUPON:"tutor_coupon_update",COUPON_APPLIES_TO:"tutor_coupon_applies_to_list",// ENROLLMENT
CREATE_ENROLLMENT:"tutor_enroll_bulk_student",GET_COURSE_BUNDLE_LIST:"tutor_course_bundle_list",GET_UNENROLLED_USERS:"tutor_unenrolled_users",// MEMBERSHIP
GET_MEMBERSHIP_PLANS:"tutor_membership_plans",SAVE_MEMBERSHIP_PLAN:"tutor_membership_plan_save",DUPLICATE_MEMBERSHIP_PLAN:"tutor_membership_plan_duplicate",DELETE_MEMBERSHIP_PLAN:"tutor_membership_plan_delete",// COURSE BUNDLE
GET_BUNDLE_DETAILS:"tutor_get_course_bundle_data",UPDATE_BUNDLE:"tutor_create_course_bundle",ADD_REMOVE_COURSE_TO_BUNDLE:"tutor_add_remove_course_to_bundle",// IMPORT EXPORT
GET_EXPORTABLE_CONTENT:"tutor_pro_exportable_contents",EXPORT_CONTENTS:"tutor_pro_export",EXPORT_SETTINGS_FREE:"tutor_export_settings",IMPORT_CONTENTS:"tutor_pro_import",IMPORT_SETTINGS_FREE:"tutor_import_settings",GET_IMPORT_EXPORT_HISTORY:"tutor_pro_export_import_history",DELETE_IMPORT_EXPORT_HISTORY:"tutor_pro_delete_export_import_history",// CONTENT BANK
GET_CONTENT_BANK_COLLECTIONS:"tutor_content_bank_collections",SAVE_CONTENT_BANK_COLLECTION:"tutor_content_bank_collection_save",DELETE_CONTENT_BANK_COLLECTION:"tutor_content_bank_collection_delete",GET_CONTENT_BANK_CONTENTS:"tutor_content_bank_contents",DELETE_CONTENT_BANK_CONTENTS:"tutor_content_bank_content_delete",GET_CONTENT_DETAILS:"tutor_pro_get_content_details",GET_CONTENT_BANK_LESSON_DETAILS:"tutor_content_bank_lesson_details",GET_CONTENT_BANK_ASSIGNMENT_DETAILS:"tutor_content_bank_assignment_details",SAVE_CONTENT_BANK_LESSON_CONTENT:"tutor_content_bank_lesson_save",SAVE_CONTENT_BANK_ASSIGNMENT_CONTENT:"tutor_content_bank_assignment_save",SAVE_QUESTION_CONTENT:"tutor_content_bank_question_save",GET_CONTENT_BANK_QUESTION_DETAILS:"tutor_content_bank_question_details",DUPLICATE_CONTENT_BANK_CONTENT:"tutor_content_bank_content_duplicate",MOVE_CONTENT_BANK_CONTENT:"tutor_content_bank_content_move",DUPLICATE_CONTENT_BANK_COLLECTION:"tutor_content_bank_collection_duplicate",IMPORT_FROM_COURSES:"tutor_content_bank_content_synchronize",// Calendar
GET_CALENDAR_EVENTS:"get_calendar_materials",// Announcement
CREATE_ANNOUNCEMENT:"tutor_announcement_create",DELETE_ANNOUNCEMENT:"tutor_announcement_delete",// Notifications
PUSH_NOTIFICATION_SAVE_SUBSCRIPTION:"tutor_pn_save_subscription",GET_ALL_NOTIFICATIONS:"tutor_get_all_notifications",MARK_ALL_NOTIFICATIONS_AS_READ:"toggle_all_notifications_status_as_read",MARK_SINGLE_NOTIFICATION_AS_READ:"toggle_single_notification_status_as_read",MARK_ALL_NOTIFICATIONS_AS_UNREAD:"tutor_mark_all_notifications_as_unread",//Reviews
PLACE_RATING:"tutor_place_rating",DELETE_REVIEW:"delete_tutor_review",CLEAR_REVIEW_POPUP_DATA:"tutor_clear_review_popup_data",// Settings
FETCH_COUNTRIES:"/assets/json/countries.json",UPLOAD_PROFILE_PHOTO:"tutor_user_photo_upload",REMOVE_PROFILE_PHOTO:"tutor_user_photo_remove",UPDATE_PROFILE:"tutor_update_profile",SAVE_SOCIAL_PROFILE:"tutor_social_profile",SAVE_BILLING_INFO:"tutor_save_billing_info",SAVE_WITHDRAW_METHOD:"tutor_save_withdraw_account",RESET_PASSWORD:"tutor_profile_password_reset",UPDATE_PROFILE_NOTIFICATION:"tutor_save_notification_preference",UPDATE_USER_PREFERENCES:"tutor_save_user_preferences",RESET_USER_PREFERENCES:"tutor_reset_user_preferences",REMOVE_DEVICE_MANUALLY:"tutor_remove_device_manually",REMOVE_ALL_ACTIVE_LOGINS:"tutor_remove_all_active_logins",// Withdrawals
MAKE_AN_WITHDRAW:"tutor_make_an_withdraw",// Certificate
VERIFY_CERTIFICATE:"tutor_verify_certificate",// Instructor Dashboard
SAVE_INSTRUCTOR_HOME_SECTIONS_ORDER:"tutor_save_instructor_home_sections_order",SAVE_INSTRUCTOR_HOME_SECTIONS_VISIBILITY:"tutor_save_instructor_home_sections_visibility",// Tour
COMPLETE_TOUR:"tutor_complete_tour"};/* export default */const i=n},76168:function(e,t,r){"use strict";// EXPORTS
r.d(t,{P:()=>/* binding */a});// CONCATENATED MODULE: ./assets/src/js/v3/shared/config/route-configs.ts
var n=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Object.keys(t).reduce((e,r)=>e.replace(":".concat(r),String(t[r])),e)};var i=e=>{return{template:e,buildLink:t=>n(e,t)}};// CONCATENATED MODULE: ./assets/src/js/v3/entries/course-builder/config/route-configs.ts
var a={Home:i("/"),CourseBasics:i("/basics"),CourseCurriculum:i("/curriculum"),CourseAdditional:i("/additional"),CourseCertificate:i("/certificate"),IconList:i("/icons")}},36068:function(e,t,r){"use strict";// EXPORTS
r.d(t,{A:()=>/* binding */rs});// EXTERNAL MODULE: ./node_modules/.pnpm/@emotion+react@11.14.0_@types+react@18.3.1_react@18.3.1/node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.browser.esm.js
var n=r(52639);// EXTERNAL MODULE: external "React"
var i=r(41594);var a=/*#__PURE__*/r.n(i);// EXTERNAL MODULE: ./node_modules/.pnpm/react-router@6.30.2_react@18.3.1/node_modules/react-router/dist/index.js
var o=r(75688);// EXTERNAL MODULE: external "wp.i18n"
var s=r(12470);// EXTERNAL MODULE: ./assets/src/js/v3/shared/atoms/LoadingSpinner.tsx
var u=r(56705);// EXTERNAL MODULE: ./assets/src/js/v3/shared/components/ErrorBoundary.tsx
var c=r(27246);// CONCATENATED MODULE: ./assets/src/js/v3/shared/components/RouteSuspense.tsx
var l=e=>{var{component:t}=e;var{pathname:r}=(0,o/* .useLocation */.zy)();return/*#__PURE__*/(0,n/* .jsx */.Y)(c/* ["default"] */.A,{children:/*#__PURE__*/(0,n/* .jsx */.Y)(i.Suspense,{fallback:/*#__PURE__*/(0,n/* .jsx */.Y)(u/* .LoadingOverlay */.p8,{}),children:t})},r)};/* export default */const d=l;// EXTERNAL MODULE: ./assets/src/js/v3/shared/config/config.ts
var f=r(74412);// EXTERNAL MODULE: ./node_modules/.pnpm/@swc+helpers@0.5.17/node_modules/@swc/helpers/esm/_object_spread.js
var p=r(41147);// EXTERNAL MODULE: ./node_modules/.pnpm/@swc+helpers@0.5.17/node_modules/@swc/helpers/esm/_object_spread_props.js
var h=r(14206);// EXTERNAL MODULE: ./node_modules/.pnpm/react-hook-form@7.67.0_react@18.3.1/node_modules/react-hook-form/dist/index.esm.mjs
var v=r(78346);// EXTERNAL MODULE: ./node_modules/.pnpm/@emotion+react@11.14.0_@types+react@18.3.1_react@18.3.1/node_modules/@emotion/react/dist/emotion-react.browser.esm.js
var m=r(42771);// EXTERNAL MODULE: ./assets/src/js/v3/shared/config/styles.ts
var g=r(13448);// EXTERNAL MODULE: ./assets/src/js/v3/shared/hooks/useFormWithGlobalError.ts
var b=r(34092);// EXTERNAL MODULE: ./assets/src/js/v3/shared/utils/util.ts + 4 modules
var _=r(33231);// EXTERNAL MODULE: ./node_modules/.pnpm/@tanstack+react-query@5.62.15_react@18.3.1/node_modules/@tanstack/react-query/build/modern/QueryClientProvider.js
var y=r(92965);// EXTERNAL MODULE: ./assets/src/js/v3/shared/atoms/Button.tsx
var w=r(25074);// EXTERNAL MODULE: ./assets/src/js/v3/shared/atoms/MagicButton.tsx
var A=r(78353);// EXTERNAL MODULE: ./assets/src/js/v3/shared/atoms/SVGIcon.tsx
var x=r(46225);// EXTERNAL MODULE: ./assets/src/js/v3/shared/atoms/Tooltip.tsx
var E=r(90453);// EXTERNAL MODULE: ./assets/src/js/v3/shared/controls/Show.tsx
var O=r(59189);// EXTERNAL MODULE: ./assets/src/js/v3/shared/utils/style-utils.ts
var S=r(52874);// CONCATENATED MODULE: ./assets/src/js/v3/public/images/logo.svg
var T,k,C;function I(){return I=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},I.apply(null,arguments)}var R=function e(e){return /*#__PURE__*/i.createElement("svg",I({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 108 24"},e),T||(T=/*#__PURE__*/i.createElement("path",{fill:"#000",fillRule:"evenodd",d:"M79.285 19.01h5.639v1.163H78.05V7.838h1.234V19.01ZM97.436 7.838v12.336h-1.234V9.706l-4.318 7.225h-.176l-4.317-7.225v10.468h-1.234V7.838h1.513l4.126 6.905 4.126-6.905zm5.991 12.548q-1.691 0-2.898-.802a4.18 4.18 0 0 1-1.683-2.212l1.057-.616q.335 1.146 1.234 1.788.898.644 2.308.643 1.374 0 2.141-.607.767-.608.767-1.613 0-.968-.705-1.463-.705-.493-2.326-1.021-1.92-.635-2.538-1.023-1.41-.845-1.41-2.45 0-1.567 1.093-2.476 1.092-.907 2.696-.907 1.445 0 2.503.749a4.55 4.55 0 0 1 1.568 1.912l-1.04.582q-.846-2.045-3.031-2.045-1.145 0-1.85.564-.705.565-.705 1.569 0 .916.635 1.374.634.459 2.096.934l.961.327q.291.097.846.316.555.221.82.388t.643.459q.379.29.546.581.168.292.299.705.133.414.132.89 0 1.57-1.145 2.51-1.145.944-3.014.944m-37.14-.202V8.099h2.337v1.207h.038c1.052-1.5 2.766-1.538 3.389-1.558v2.571a4.6 4.6 0 0 0-1.811.487c-.798.428-1.46 1.44-1.46 3.35v6.047l-2.493-.02Zm-3.635-6.034c0 2.055-1.659 3.727-3.698 3.727-2.04 0-3.698-1.672-3.698-3.728s1.659-3.727 3.698-3.727c2.04 0 3.698 1.672 3.698 3.727Zm.64-4.275a6.12 6.12 0 0 0-4.338-1.79 6.12 6.12 0 0 0-4.338 1.79 6 6 0 0 0-1.777 4.274 6 6 0 0 0 1.777 4.274 6.13 6.13 0 0 0 4.338 1.79 6.13 6.13 0 0 0 4.338-1.79 6 6 0 0 0 1.777-4.274c0-1.613-.63-3.13-1.777-4.274M50.087 20.174h-2.493V10.36h-1.81V8.082h1.81V2.906h2.493v5.176h2.18v2.278h-2.18zM34.8 8.082v5.666c0 3.292 1.46 4.168 3.31 4.168 2.065 0 3.486-1.325 3.486-4.245V8.082h2.493v12.093H41.81v-1.773h-.058c-.681 1.15-2.24 1.773-3.914 1.773-1.52 0-2.843-.487-3.797-1.325-1.11-.954-1.753-2.453-1.753-5.121V8.082zm-6.387 12.126H25.92v-9.856h-1.81V8.074h1.81V2.906h2.493v5.168h2.18v2.278h-2.18z",clipRule:"evenodd"})),k||(k=/*#__PURE__*/i.createElement("path",{fill:"#0049F8",fillRule:"evenodd",d:"M5.054 14.882a1.13 1.13 0 0 1-1.075-1.075V11.36c0-.592.482-1.075 1.075-1.075.592 0 1.075.483 1.075 1.075v2.447c0 .592-.445 1.075-1.002 1.075zm7.71 0c-.593 0-1.075-.444-1.075-1.037V11.36c0-.592.482-1.075 1.075-1.075.592 0 1.075.483 1.075 1.075v2.447a1.08 1.08 0 0 1-1.075 1.076Z",clipRule:"evenodd"})),C||(C=/*#__PURE__*/i.createElement("path",{fill:"#0049F8",fillRule:"evenodd",d:"M2.546 9.52c.48-1 1.44-1.64 2.56-1.68 1.598.04 2.88 1.398 2.841 3v5.404c.08.6.64 1 1.24.918.48-.08.88-.439.918-.918v-5.4c-.041-1.6 1.24-2.96 2.842-3.001 1.081 0 2.04.6 2.48 1.561 1.799 3.56.4 7.88-3.16 9.683a7.18 7.18 0 0 1-9.68-3.164c-1-2-1.038-4.4-.041-6.402ZM7.067 2.4h4.04v1.561A9 9 0 0 0 9.03 3.72c-.681 0-1.36.08-2 .2zm11.002 11.08c0-.24.04-.438.04-.721 0-3.28-1.76-6.281-4.64-7.881V2.4h1.761a1.18 1.18 0 0 0 1.202-1.202C16.432.518 15.91 0 15.23 0H2.946c-.68.041-1.198.559-1.198 1.24s.521 1.201 1.202 1.201h1.76v2.442c-4.363 2.396-6.003 7.88-3.603 12.239.12.2.2.359.321.558 3.4 5.722 12.521 6.281 15.602 6.32.28 0 .521-.12.76-.28.2-.2.28-.48.28-.76-.002.004-.002-9.48-.002-9.48Z",clipRule:"evenodd"})))};/* export default */const D=R;// CONCATENATED MODULE: ./assets/src/js/v3/shared/components/Logo.tsx
var P=e=>{var{wrapperCss:t}=e;var r;var i=!!f/* .tutorConfig.tutor_pro_url */.P.tutor_pro_url;return/*#__PURE__*/(0,n/* .jsx */.Y)("button",{tabIndex:-1,type:"button",css:[S/* .styleUtils.resetButton */.x.resetButton,M.logo,t],children:/*#__PURE__*/(0,n/* .jsx */.Y)(O/* ["default"] */.A,{when:i&&((r=f/* .tutorConfig.settings */.P.settings)===null||r===void 0?void 0:r.course_builder_logo_url),fallback:/*#__PURE__*/(0,n/* .jsx */.Y)(D,{width:108,height:24}),children:e=>/*#__PURE__*/(0,n/* .jsx */.Y)("img",{src:e,alt:"Tutor LMS"})})})};var M={logo:/*#__PURE__*/(0,m/* .css */.AH)("padding-left:",g/* .spacing["32"] */.YK["32"],";cursor:default;&:focus,&:active,&:hover{background:none;}img{max-height:24px;width:auto;object-fit:contain;object-position:center;}",g/* .Breakpoint.smallTablet */.EA.smallTablet,"{padding-left:",g/* .spacing["24"] */.YK["24"],";}",g/* .Breakpoint.smallMobile */.EA.smallMobile,"{grid-area:logo;padding-left:",g/* .spacing["16"] */.YK["16"],";}")};/* export default */const F=P;// EXTERNAL MODULE: ./assets/src/js/v3/shared/components/modals/ConfirmationModal.tsx
var Y=r(56949);// EXTERNAL MODULE: ./assets/src/js/v3/shared/components/modals/Modal.tsx
var L=r(17944);// EXTERNAL MODULE: ./assets/src/js/v3/shared/components/modals/ProIdentifierModal.tsx
var N=r(19448);// EXTERNAL MODULE: ./assets/src/js/v3/shared/components/modals/SetupOpenAiModal.tsx
var H=r(3311);// EXTERNAL MODULE: ./assets/src/js/v3/shared/config/constants.ts
var j=r(19393);// EXTERNAL MODULE: ./assets/src/js/v3/shared/config/typography.ts
var U=r(81547);// EXTERNAL MODULE: ./node_modules/.pnpm/@swc+helpers@0.5.17/node_modules/@swc/helpers/esm/_async_to_generator.js
var B=r(93640);// EXTERNAL MODULE: ./node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/isBefore.js
var K=r(61736);// EXTERNAL MODULE: ./node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/format.js
var z=r(1896);// EXTERNAL MODULE: ./assets/src/js/v3/shared/components/modals/BasicModalWrapper.tsx
var q=r(4429);// CONCATENATED MODULE: ./assets/src/js/v3/shared/components/modals/SuccessModal.tsx
var V=e=>{var{title:t,description:r,image:i,image2x:a,imageAlt:o,closeModal:u,actions:c,wrapperCss:l,bodyCss:d}=e;return/*#__PURE__*/(0,n/* .jsx */.Y)(q/* ["default"] */.A,{onClose:()=>u({action:"CLOSE"}),entireHeader:/*#__PURE__*/(0,n/* .jsx */.Y)(n/* .Fragment */.FK,{children:" "}),maxWidth:408,children:/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:[G.wrapper,l],children:[/*#__PURE__*/(0,n/* .jsx */.Y)(O/* ["default"] */.A,{when:i,children:/*#__PURE__*/(0,n/* .jsx */.Y)("img",{src:i,srcSet:a?"".concat(i," 1x, ").concat(a," 2x"):undefined,alt:o,css:G.image})}),/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:[G.body,d],children:[/*#__PURE__*/(0,n/* .jsx */.Y)("h5",{css:U/* .typography.heading5 */.I.heading5("medium"),children:t}),/*#__PURE__*/(0,n/* .jsx */.Y)("p",{css:G.message,children:r})]}),/*#__PURE__*/(0,n/* .jsx */.Y)("div",{css:G.footer,children:/*#__PURE__*/(0,n/* .jsx */.Y)(O/* ["default"] */.A,{when:c,fallback:/*#__PURE__*/(0,n/* .jsx */.Y)(w/* ["default"] */.A,{onClick:()=>u({action:"CLOSE"}),size:"small",children:(0,s.__)("Ok","tutor")}),children:c})})]})})};/* export default */const W=V;var G={wrapper:/*#__PURE__*/(0,m/* .css */.AH)(S/* .styleUtils.display.flex */.x.display.flex("column"),";padding:",g/* .spacing["24"] */.YK["24"],";gap:",g/* .spacing["24"] */.YK["24"],";"),image:/*#__PURE__*/(0,m/* .css */.AH)("width:100%;height:auto;object-position:center;object-fit:contain;"),body:/*#__PURE__*/(0,m/* .css */.AH)(S/* .styleUtils.display.flex */.x.display.flex("column"),";gap:",g/* .spacing["8"] */.YK["8"],";"),message:/*#__PURE__*/(0,m/* .css */.AH)(U/* .typography.caption */.I.caption(),";color:",g/* .colorTokens.text.subdued */.I6.text.subdued,";"),footer:/*#__PURE__*/(0,m/* .css */.AH)(S/* .styleUtils.display.flex */.x.display.flex(),";justify-content:flex-end;gap:",g/* .spacing["16"] */.YK["16"],";padding-top:",g/* .spacing["8"] */.YK["8"],";")};// EXTERNAL MODULE: ./node_modules/.pnpm/@swc+helpers@0.5.17/node_modules/@swc/helpers/esm/_object_without_properties.js + 1 modules
var $=r(17900);// EXTERNAL MODULE: ./node_modules/.pnpm/@swc+helpers@0.5.17/node_modules/@swc/helpers/esm/_tagged_template_literal.js
var Q=r(60599);// EXTERNAL MODULE: ./assets/src/js/v3/shared/hooks/useAnimation.tsx
var X=r(31569);// EXTERNAL MODULE: ./assets/src/js/v3/shared/hooks/usePortalPopover.tsx
var J=r(84206);// EXTERNAL MODULE: ./assets/src/js/v3/shared/molecules/Popover.tsx
var Z=r(21678);// CONCATENATED MODULE: ./assets/src/js/v3/shared/molecules/DropdownButton.tsx
function ee(){var e=(0,Q._)(["\n      padding: "," ",";\n    "]);ee=function t(){return e};return e}function et(){var e=(0,Q._)(["\n      font-size: ",";\n      line-height: ",";\n      padding: "," ",";\n    "]);et=function t(){return e};return e}function er(){var e=(0,Q._)(["\n        background-color: ",";\n        color: ",";\n\n        &:hover,\n        &:focus,\n        &:active {\n          background-color: ",";\n          color: ",";\n        }\n      "]);er=function t(){return e};return e}function en(){var e=(0,Q._)(["\n      background-color: ",";\n      color: ",";\n\n      &:not(:disabled) {\n        &:hover,\n        &:focus {\n          background-color: ",";\n          color: ",";\n        }\n\n        &:active {\n          background-color: ",";\n          color: ",";\n        }\n      }\n\n      ","\n    "]);en=function t(){return e};return e}function ei(){var e=(0,Q._)(["\n        background-color: ",";\n        color: ",";\n      "]);ei=function t(){return e};return e}function ea(){var e=(0,Q._)(["\n      background-color: ",";\n      color: ",";\n\n      &:hover:not(:disabled) {\n        background-color: ",";\n      }\n\n      &:active:not(:disabled) {\n        background-color: ",";\n      }\n\n      ","\n    "]);ea=function t(){return e};return e}function eo(){var e=(0,Q._)(["\n        color: ",";\n        box-shadow: 0 0 0 1px ",";\n      "]);eo=function t(){return e};return e}function es(){var e=(0,Q._)(["\n      background-color: ",";\n      color: ",";\n      box-shadow: 0 0 0 1px ",";\n\n      &:hover:not(:disabled) {\n        background-color: ",";\n      }\n\n      &:active:not(:disabled) {\n        background-color: ",";\n      }\n\n      ","\n    "]);es=function t(){return e};return e}function eu(){var e=(0,Q._)(["\n        color: ",";\n        box-shadow: 0 0 0 1px ",";\n      "]);eu=function t(){return e};return e}function ec(){var e=(0,Q._)(["\n      background-color: ",";\n      color: ",";\n      box-shadow: 0 0 0 1px ",";\n\n      &:hover:not(:disabled) {\n        background-color: ",";\n        box-shadow: 0 0 0 1px ",";\n        z-index: ",";\n      }\n\n      &:active:not(:disabled) {\n        background-color: ",";\n        box-shadow: 0 0 0 1px ",";\n      }\n\n      ","\n    "]);ec=function t(){return e};return e}function el(){var e=(0,Q._)(["\n        background-color: ",";\n        color: ",";\n      "]);el=function t(){return e};return e}function ed(){var e=(0,Q._)(["\n      background-color: ",";\n      color: ",";\n\n      &:hover:not(:disabled) {\n        background-color: ",";\n      }\n\n      &:active:not(:disabled) {\n        background-color: ",";\n      }\n\n      ","\n    "]);ed=function t(){return e};return e}function ef(){var e=(0,Q._)(["\n        color: ",";\n\n        svg {\n          color: ",";\n        }\n      "]);ef=function t(){return e};return e}function ep(){var e=(0,Q._)(["\n      background-color: transparent;\n      color: ",";\n      padding: "," ",";\n\n      svg {\n        color: ",";\n      }\n\n      &:hover:not(:disabled) {\n        text-decoration: underline;\n        color: ",";\n\n        svg {\n          color: ",";\n        }\n      }\n\n      &:active:not(:disabled) {\n        color: ",";\n      }\n\n      &:focus:not(:disabled) {\n        color: ",";\n        svg {\n          color: ",";\n        }\n      }\n\n      ","\n    "]);ep=function t(){return e};return e}function eh(){var e=(0,Q._)(["\n      color: transparent;\n    "]);eh=function t(){return e};return e}function ev(){var e=(0,Q._)(["\n      margin-right: 0;\n      margin-left: ",";\n    "]);ev=function t(){return e};return e}function em(){var e=(0,Q._)(["\n      border-color: ",";\n    "]);em=function t(){return e};return e}function eg(){var e=(0,Q._)(["\n      border-color: ",";\n    "]);eg=function t(){return e};return e}function eb(){var e=(0,Q._)(["\n      border-color: ",";\n    "]);eb=function t(){return e};return e}function e_(){var e=(0,Q._)(["\n      padding-inline: ",";\n\n      svg {\n        width: 30px;\n        height: 30px;\n      }\n    "]);e_=function t(){return e};return e}function ey(){var e=(0,Q._)(["\n      padding-inline: ",";\n\n      svg {\n        width: 20px;\n        height: 20px;\n      }\n    "]);ey=function t(){return e};return e}function ew(){var e=(0,Q._)(["\n      color: ",";\n    "]);ew=function t(){return e};return e}function eA(){var e=(0,Q._)(["\n      pointer-events: none;\n      color: ",";\n    "]);eA=function t(){return e};return e}var ex=e=>{var{text:t,type:r="button",disabled:i=false,onClick:a,buttonContentCss:o,isDanger:s=false,icon:u}=e,c=(0,$._)(e,["text","type","disabled","onClick","buttonContentCss","isDanger","icon"]);return/*#__PURE__*/(0,n/* .jsxs */.FD)("button",(0,h._)((0,p._)({type:r,css:eT.dropdownOption({disabled:i,isDanger:s}),disabled:i,onClick:a},c),{children:[u&&/*#__PURE__*/(0,n/* .jsx */.Y)(n/* .Fragment */.FK,{children:u}),/*#__PURE__*/(0,n/* .jsx */.Y)("span",{css:[eT.dropdownOptionContent,o],children:t})]}))};var eE=e=>{var{type:t="button",text:r,children:o,variant:s="primary",placement:u=J/* .POPOVER_PLACEMENTS.BOTTOM_RIGHT */.zA.BOTTOM_RIGHT,animationType:c=X/* .AnimationType.slideUp */.J6.slideUp,size:l="regular",icon:d,iconPosition:f="left",loading:v=false,disabled:m=false,tabIndex:g=-1,onClick:b,buttonCss:_,buttonContentCss:y,dropdownMaxWidth:w="140px",disabledDropdown:A=false}=e,E=(0,$._)(e,["type","text","children","variant","placement","animationType","size","icon","iconPosition","loading","disabled","tabIndex","onClick","buttonCss","buttonContentCss","dropdownMaxWidth","disabledDropdown"]);var O=(0,i.useRef)(null);var[S,T]=(0,i.useState)(false);return/*#__PURE__*/(0,n/* .jsxs */.FD)(n/* .Fragment */.FK,{children:[/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:eT.wrapper,children:[/*#__PURE__*/(0,n/* .jsxs */.FD)("button",(0,h._)((0,p._)({type:t,css:[eT.button({variant:s,size:l,loading:v,disabled:m}),_],onClick:b,tabIndex:g,disabled:m||v},E),{children:[v&&!m&&/*#__PURE__*/(0,n/* .jsx */.Y)("span",{css:eT.spinner,children:/*#__PURE__*/(0,n/* .jsx */.Y)(x/* ["default"] */.A,{name:"spinner",width:18,height:18})}),/*#__PURE__*/(0,n/* .jsxs */.FD)("span",{css:[eT.buttonContent({loading:v,disabled:m}),y],children:[d&&f==="left"&&/*#__PURE__*/(0,n/* .jsx */.Y)("span",{css:eT.buttonIcon({iconPosition:f}),children:d}),r,d&&f==="right"&&/*#__PURE__*/(0,n/* .jsx */.Y)("span",{css:eT.buttonIcon({iconPosition:f}),children:d})]})]})),/*#__PURE__*/(0,n/* .jsx */.Y)("button",{"data-cy":"dropdown-trigger",ref:O,type:"button",disabled:m||A,css:[eT.button({variant:s,size:l,loading:false,disabled:m||A}),eT.dropdownButton({variant:s,size:l,disabled:m||A})],onClick:()=>T(!S),children:/*#__PURE__*/(0,n/* .jsx */.Y)(x/* ["default"] */.A,{name:"chevronDown",width:24,height:24})})]}),/*#__PURE__*/(0,n/* .jsx */.Y)(Z/* ["default"] */.A,{gap:4,maxWidth:w,placement:u,triggerRef:O,isOpen:S,closePopover:()=>T(false),animationType:c,children:/*#__PURE__*/(0,n/* .jsx */.Y)("div",{css:eT.dropdownWrapper,children:a().Children.map(o,e=>{if(/*#__PURE__*/a().isValidElement(e)){var t=(0,h._)((0,p._)({},e.props),{onClick:t=>{var r;T(false);(r=e.props)===null||r===void 0?void 0:r.onClick(t)}});return /*#__PURE__*/a().cloneElement(e,t)}return e})})})]})};eE.Item=ex;/* export default */const eO=eE;var eS=/*#__PURE__*/(0,m/* .keyframes */.i7)("0%{transform:rotate(0);}100%{transform:rotate(360deg);}");var eT={wrapper:/*#__PURE__*/(0,m/* .css */.AH)(S/* .styleUtils.display.inlineFlex */.x.display.inlineFlex(),";align-items:center;border-radius:",g/* .borderRadius["6"] */.Vq["6"],";:focus-within{box-shadow:",g/* .shadow.focus */.r7.focus,";}"),button:e=>{var{variant:t,size:r,loading:n,disabled:i}=e;return/*#__PURE__*/(0,m/* .css */.AH)(S/* .styleUtils.resetButton */.x.resetButton,";",U/* .typography.caption */.I.caption("medium"),"    display:inline-block;text-align:center;text-decoration:none;vertical-align:middle;cursor:pointer;user-select:none;background-color:transparent;color:",g/* .colorTokens.text.primary */.I6.text.primary,";border:0;padding:",g/* .spacing["8"] */.YK["8"]," ",g/* .spacing["16"] */.YK["16"],";border-radius:",g/* .borderRadius["6"] */.Vq["6"]," 0 0 ",g/* .borderRadius["6"] */.Vq["6"],";z-index:",g/* .zIndex.level */.fE.level,";transition-property:box-shadow,background-color,opacity;transition-duration:150ms;transition-timing-function:ease-in-out;position:relative;",r==="large"&&(0,m/* .css */.AH)(ee(),g/* .spacing["12"] */.YK["12"],g/* .spacing["32"] */.YK["32"])," ",r==="small"&&(0,m/* .css */.AH)(et(),g/* .fontSize["13"] */.J["13"],g/* .lineHeight["20"] */.K_["20"],g/* .spacing["6"] */.YK["6"],g/* .spacing["16"] */.YK["16"]),"    \n    ",t==="primary"&&(0,m/* .css */.AH)(en(),g/* .colorTokens.action.primary["default"] */.I6.action.primary["default"],g/* .colorTokens.text.white */.I6.text.white,g/* .colorTokens.action.primary.hover */.I6.action.primary.hover,g/* .colorTokens.text.white */.I6.text.white,g/* .colorTokens.action.primary.active */.I6.action.primary.active,g/* .colorTokens.text.white */.I6.text.white,(i||n)&&(0,m/* .css */.AH)(er(),g/* .colorTokens.action.primary.disable */.I6.action.primary.disable,g/* .colorTokens.text.disable */.I6.text.disable,g/* .colorTokens.action.primary.disable */.I6.action.primary.disable,g/* .colorTokens.text.disable */.I6.text.disable))," ",t==="secondary"&&(0,m/* .css */.AH)(ea(),g/* .colorTokens.action.secondary["default"] */.I6.action.secondary["default"],g/* .colorTokens.text.brand */.I6.text.brand,g/* .colorTokens.action.secondary.hover */.I6.action.secondary.hover,g/* .colorTokens.action.secondary.active */.I6.action.secondary.active,(i||n)&&(0,m/* .css */.AH)(ei(),g/* .colorTokens.action.primary.disable */.I6.action.primary.disable,g/* .colorTokens.text.disable */.I6.text.disable))," ",t==="secondary"&&(0,m/* .css */.AH)(es(),g/* .colorTokens.action.outline["default"] */.I6.action.outline["default"],g/* .colorTokens.text.brand */.I6.text.brand,g/* .colorTokens.stroke.brand */.I6.stroke.brand,g/* .colorTokens.action.outline.hover */.I6.action.outline.hover,g/* .colorTokens.action.outline.active */.I6.action.outline.active,(i||n)&&(0,m/* .css */.AH)(eo(),g/* .colorTokens.text.disable */.I6.text.disable,g/* .colorTokens.action.outline.disable */.I6.action.outline.disable))," ",t==="tertiary"&&(0,m/* .css */.AH)(ec(),g/* .colorTokens.background.white */.I6.background.white,g/* .colorTokens.text.subdued */.I6.text.subdued,g/* .colorTokens.stroke["default"] */.I6.stroke["default"],g/* .colorTokens.background.hover */.I6.background.hover,g/* .colorTokens.stroke.hover */.I6.stroke.hover,g/* .zIndex.positive */.fE.positive,g/* .colorTokens.background.active */.I6.background.active,g/* .colorTokens.stroke.hover */.I6.stroke.hover,(i||n)&&(0,m/* .css */.AH)(eu(),g/* .colorTokens.text.disable */.I6.text.disable,g/* .colorTokens.action.outline.disable */.I6.action.outline.disable))," ",t==="danger"&&(0,m/* .css */.AH)(ed(),g/* .colorTokens.background.status.errorFail */.I6.background.status.errorFail,g/* .colorTokens.text.error */.I6.text.error,g/* .colorTokens.background.status.errorFail */.I6.background.status.errorFail,g/* .colorTokens.background.status.errorFail */.I6.background.status.errorFail,(i||n)&&(0,m/* .css */.AH)(el(),g/* .colorTokens.action.primary.disable */.I6.action.primary.disable,g/* .colorTokens.text.disable */.I6.text.disable))," ",t==="text"&&(0,m/* .css */.AH)(ep(),g/* .colorTokens.text.subdued */.I6.text.subdued,g/* .spacing["4"] */.YK["4"],g/* .spacing["8"] */.YK["8"],g/* .colorTokens.icon["default"] */.I6.icon["default"],g/* .colorTokens.text.primary */.I6.text.primary,g/* .colorTokens.icon.brand */.I6.icon.brand,g/* .colorTokens.text.title */.I6.text.title,g/* .colorTokens.text.title */.I6.text.title,g/* .colorTokens.icon.brand */.I6.icon.brand,(i||n)&&(0,m/* .css */.AH)(ef(),g/* .colorTokens.text.disable */.I6.text.disable,g/* .colorTokens.icon.disable */.I6.icon.disable)),":disabled{cursor:not-allowed;}")},buttonContent:e=>{var{loading:t,disabled:r}=e;return/*#__PURE__*/(0,m/* .css */.AH)("display:flex;align-items:center;",t&&!r&&(0,m/* .css */.AH)(eh()))},buttonIcon:e=>{var{iconPosition:t}=e;return/*#__PURE__*/(0,m/* .css */.AH)("display:grid;place-items:center;margin-right:",g/* .spacing["6"] */.YK["6"],";",t==="right"&&(0,m/* .css */.AH)(ev(),g/* .spacing["6"] */.YK["6"]))},spinner:/*#__PURE__*/(0,m/* .css */.AH)("position:absolute;visibility:visible;display:flex;top:50%;left:50%;transform:translateX(-50%) translateY(-50%);& svg{animation:",eS," 1.5s linear infinite;}"),dropdownButton:e=>{var{variant:t,size:r,disabled:n}=e;return/*#__PURE__*/(0,m/* .css */.AH)(S/* .styleUtils.flexCenter */.x.flexCenter(),"    padding-inline:",g/* .spacing["8"] */.YK["8"],";border-left:1px solid transparent;border-radius:0 ",g/* .borderRadius["6"] */.Vq["6"]," ",g/* .borderRadius["6"] */.Vq["6"]," 0;svg{width:24px;height:24px;}",t==="primary"&&(0,m/* .css */.AH)(em(),g/* .colorTokens.stroke.brand */.I6.stroke.brand)," ",t==="danger"&&(0,m/* .css */.AH)(eg(),g/* .colorTokens.stroke.danger */.I6.stroke.danger)," ",n&&(0,m/* .css */.AH)(eb(),g/* .colorTokens.stroke.disable */.I6.stroke.disable)," ",r==="large"&&(0,m/* .css */.AH)(e_(),g/* .spacing["12"] */.YK["12"])," ",r==="small"&&(0,m/* .css */.AH)(ey(),g/* .spacing["6"] */.YK["6"]))},dropdownWrapper:/*#__PURE__*/(0,m/* .css */.AH)("display:flex;flex-direction:column;padding-block:",g/* .spacing["6"] */.YK["6"],";"),dropdownOption:e=>{var{disabled:t,isDanger:r}=e;return/*#__PURE__*/(0,m/* .css */.AH)(S/* .styleUtils.resetButton */.x.resetButton,";",U/* .typography.body */.I.body(),";color:",g/* .colorTokens.text.primary */.I6.text.primary,";width:100%;padding:",g/* .spacing["6"] */.YK["6"]," ",g/* .spacing["16"] */.YK["16"]," ",g/* .spacing["6"] */.YK["6"]," ",g/* .spacing["20"] */.YK["20"],";transition:background-color 0.3s ease-in-out;cursor:pointer;display:flex;align-items:center;gap:",g/* .spacing["8"] */.YK["8"],";outline:2px solid transparent;outline-offset:-2px;",r&&(0,m/* .css */.AH)(ew(),g/* .colorTokens.text.error */.I6.text.error),":hover{background-color:",g/* .colorTokens.background.hover */.I6.background.hover,";color:",r?g/* .colorTokens.text.error */.I6.text.error:g/* .colorTokens.text.title */.I6.text.title,";}:focus,:active{outline-color:",g/* .colorTokens.stroke.brand */.I6.stroke.brand,";}",t&&(0,m/* .css */.AH)(eA(),g/* .colorTokens.text.disable */.I6.text.disable),"    svg:first-of-type{color:",g/* .colorTokens.icon["default"] */.I6.icon["default"],";}")},dropdownOptionContent:/*#__PURE__*/(0,m/* .css */.AH)("display:flex;align-items:center;svg{flex-shrink:0;}")};// EXTERNAL MODULE: ./assets/src/js/v3/shared/utils/types.ts
var ek=r(49842);// EXTERNAL MODULE: ./assets/src/js/v3/entries/course-builder/config/route-configs.ts + 1 modules
var eC=r(76168);// EXTERNAL MODULE: ./assets/src/js/v3/entries/course-builder/contexts/CourseBuilderSlotContext.tsx
var eI=r(79100);// EXTERNAL MODULE: ./assets/src/js/v3/entries/course-builder/services/course.ts
var eR=r(23334);// EXTERNAL MODULE: ./assets/src/js/v3/entries/course-builder/utils/utils.ts
var eD=r(60297);// CONCATENATED MODULE: ./assets/src/js/v3/public/images/review-submitted.webp
const eP=r.p+"js/images/review-submitted-edf6b690.webp";// CONCATENATED MODULE: ./assets/src/js/v3/public/images/review-submitted-2x.webp
const eM=r.p+"js/images/review-submitted-2x-e2f2f56c.webp";// CONCATENATED MODULE: ./assets/src/js/v3/entries/course-builder/components/layouts/header/HeaderActions.tsx
var eF=(0,eD/* .getCourseId */.p)();var eY=()=>{var e,t,r,a,u;var{fields:c}=(0,eI/* .useCourseBuilderSlot */._)();var l=(0,v/* .useFormContext */.xW)();var d=(0,o/* .useNavigate */.Zp)();var{showModal:b}=(0,L/* .useModal */.h)();var A=(0,v/* .useWatch */.FH)({name:"post_status"});var E=(0,v/* .useWatch */.FH)({name:"visibility"});var T=(0,v/* .useWatch */.FH)({name:"preview_link"});var k=(0,v/* .useWatch */.FH)({name:"isScheduleEnabled"});var C=(0,v/* .useWatch */.FH)({name:"schedule_date"});var I=(0,v/* .useWatch */.FH)({name:"schedule_time"});var[R,D]=(0,i.useState)(A);var P=(0,y/* .useQueryClient */.jE)();var M=(0,eR/* .useCreateCourseMutation */.AA)();var F=(0,eR/* .useUpdateCourseMutation */.VD)();var Y=P.getQueryData(["CourseDetails",eF]);var N=l.formState.dirtyFields.schedule_date||l.formState.dirtyFields.schedule_time;var H=!!f/* .tutorConfig.tutor_pro_url */.P.tutor_pro_url;var U=(e=f/* .tutorConfig.current_user.roles */.P.current_user.roles)===null||e===void 0?void 0:e.includes(j/* .TutorRoles.ADMINISTRATOR */.gt.ADMINISTRATOR);var q=(t=f/* .tutorConfig.current_user.roles */.P.current_user.roles)===null||t===void 0?void 0:t.includes(j/* .TutorRoles.TUTOR_INSTRUCTOR */.gt.TUTOR_INSTRUCTOR);var V=((r=f/* .tutorConfig.settings */.P.settings)===null||r===void 0?void 0:r.instructor_can_delete_course)==="on"||U;var G=((a=f/* .tutorConfig.settings */.P.settings)===null||a===void 0?void 0:a.hide_admin_bar_for_users)==="off";var $=((u=f/* .tutorConfig.settings */.P.settings)===null||u===void 0?void 0:u.instructor_can_publish_course)==="on";var Q=(e,t)=>(0,B._)(function*(){var r=e=>{Promise.resolve().then(()=>{l.trigger(e,{shouldFocus:true})})};var i=()=>{d(eC/* .CourseBuilderRouteConfigs.CourseBasics.buildLink */.P.CourseBasics.buildLink(),{state:{isError:true}})};if(e.isScheduleEnabled&&(!e.schedule_date||!e.schedule_time||!(0,K/* .isBefore */.Y)(new Date,new Date("".concat(e.schedule_date," ").concat(e.schedule_time))))){i();l.setValue("showScheduleForm",true,{shouldDirty:true});if(!e.schedule_date){r("schedule_date");return}if(!e.schedule_time){r("schedule_time");return}}if(e.course_price_type==="paid"){var a,o,u;if(!e.course_product_id&&((a=f/* .tutorConfig.settings */.P.settings)===null||a===void 0?void 0:a.monetize_by)==="edd"){i();r("course_product_id");return}if(H&&((o=f/* .tutorConfig.settings */.P.settings)===null||o===void 0?void 0:o.monetize_by)==="wc"&&e.course_product_id!=="-1"||((u=f/* .tutorConfig.settings */.P.settings)===null||u===void 0?void 0:u.monetize_by)==="tutor"&&!["membership","subscription"].includes(e.course_selling_option)){if(e.course_price===""||Number(e.course_price)<=0){i();r("course_price");return}if(e.course_sale_price&&Number(e.course_sale_price)>=Number(e.course_price)){i();r("course_sale_price");return}}}var v=(0,eR/* .convertCourseDataToPayload */.Qw)(e,(0,_/* .findSlotFields */.DE)({fields:c.Basic},{fields:c.Additional}));D(t);if(eF){var g;var y=(0,_/* .determinePostStatus */.q9)(t,E);var A=yield F.mutateAsync((0,p._)((0,h._)((0,p._)({course_id:Number(eF)},v),{post_status:y}),!e.isScheduleEnabled?{post_date:(0,z/* .format */.GP)(new Date,j/* .DateFormats.yearMonthDayHourMinuteSecond24H */.UA.yearMonthDayHourMinuteSecond24H),post_date_gmt:(0,_/* .convertToGMT */.dn)(new Date)}:{},e.isScheduleEnabled&&{edit_date:true},["subscription","membership"].includes(e.course_selling_option)&&(!(0,ek/* .isDefined */.O9)(Y.course_pricing.price)||Number(Y.course_pricing.price)===0)&&{course_price:1}));if(!A.data){return}if(t==="pending"){b({component:W,props:{title:(0,s.__)("Course submitted for review","tutor"),description:(0,s.__)("Thank you for submitting your course. It will be reviewed by our team shortly.","tutor"),image:eP,image2x:eM,imageAlt:(0,s.__)("Course submitted for review","tutor"),wrapperCss:/*#__PURE__*/(0,m/* .css */.AH)("align-items:center;text-align:center;"),actions:/*#__PURE__*/(0,n/* .jsx */.Y)("div",{css:S/* .styleUtils.flexCenter */.x.flexCenter(),children:/*#__PURE__*/(0,n/* .jsx */.Y)(w/* ["default"] */.A,{as:"a",href:window.location.href.includes("wp-admin")?f/* .tutorConfig.backend_course_list_url */.P.backend_course_list_url:f/* .tutorConfig.frontend_course_list_url */.P.frontend_course_list_url,size:"small",children:(0,s.__)("Back to Courses","tutor")})})}})}if(q&&((g=f/* .tutorConfig.settings */.P.settings)===null||g===void 0?void 0:g.enable_redirect_on_course_publish_from_frontend)==="on"&&["publish","future"].includes(y)){window.location.href=f/* ["default"].TUTOR_MY_COURSES_PAGE_URL */.A.TUTOR_MY_COURSES_PAGE_URL}return}var x=yield M.mutateAsync((0,p._)({},v));if(x.data){window.location.href="".concat(f/* ["default"].TUTOR_SITE_URL */.A.TUTOR_SITE_URL,"/wp-admin/admin.php?page=create-course&course_id=").concat(x.data)}})();var X=()=>{if(!$&&!U&&q){return{text:(0,s.__)("Submit","tutor"),action:"pending"}}var e=(0,K/* .isBefore */.Y)(new Date,new Date("".concat(C," ").concat(I)));var t=!eF||["pending","draft"].includes(A);if(t){var r=N&&k&&e;return{text:r?(0,s.__)("Schedule","tutor"):(0,s.__)("Publish","tutor"),action:r?"future":"publish"}}if(k){var n=N&&e;return{text:n?(0,s.__)("Schedule","tutor"):(0,s.__)("Update","tutor"),action:"future"}}return{text:(0,s.__)("Update","tutor"),action:"publish"}};var J=()=>{var e={text:/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:[S/* .styleUtils.display.flex */.x.display.flex(),{alignItems:"center"}],children:[(0,s.__)("Preview","tutor"),/*#__PURE__*/(0,n/* .jsx */.Y)(x/* ["default"] */.A,{name:"linkExternal",width:24,height:24})]}),onClick:!eF||A==="draft"&&eF?()=>window.open(T,"_blank","noopener"):_/* .noop */.lQ,isDanger:false,dataCy:"preview-course"};var t={text:/*#__PURE__*/(0,n/* .jsx */.Y)(n/* .Fragment */.FK,{children:(0,s.__)("Move to Trash","tutor")}),onClick:()=>(0,B._)(function*(){if(V){try{yield l.handleSubmit(e=>Q(e,"trash"))()}finally{window.location.href=window.location.href.includes("wp-admin")?f/* .tutorConfig.backend_course_list_url */.P.backend_course_list_url:f/* .tutorConfig.frontend_course_list_url */.P.frontend_course_list_url}}})(),isDanger:true,dataCy:"move-to-trash"};var r={text:/*#__PURE__*/(0,n/* .jsx */.Y)(n/* .Fragment */.FK,{children:(0,s.__)("Switch to Draft","tutor")}),onClick:l.handleSubmit(e=>Q(e,"draft")),isDanger:false,dataCy:"switch-to-draft"};var i={text:/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:[S/* .styleUtils.display.flex */.x.display.flex(),{alignItems:"center"}],children:[(0,s.__)("Legacy Mode","tutor"),/*#__PURE__*/(0,n/* .jsx */.Y)(x/* ["default"] */.A,{name:"linkExternal",width:24,height:24})]}),onClick:()=>{var e=eF?"".concat(f/* ["default"].TUTOR_SITE_URL */.A.TUTOR_SITE_URL,"/wp-admin/post.php?post=").concat(eF,"&action=edit"):"".concat(f/* ["default"].TUTOR_SITE_URL */.A.TUTOR_SITE_URL,"/wp-admin/post-new.php?post_type=courses");window.open(e,"_blank","noopener")},isDanger:false,dataCy:"back-to-legacy"};var a={text:/*#__PURE__*/(0,n/* .jsx */.Y)(n/* .Fragment */.FK,{children:(0,s.__)("Publish Immediately","tutor")}),onClick:l.handleSubmit(e=>Q((0,h._)((0,p._)({},e),{isScheduleEnabled:false}),"publish")),isDanger:false,dataCy:"publish-immediately"};var o=[e];if((U||$)&&k&&(0,K/* .isBefore */.Y)(new Date,new Date("".concat(C," ").concat(I)))){o.unshift(a)}if(eF&&A!=="draft"){o.pop();if(U||$){o.push(r)}}if(U||V){o.push(t)}if(U||G){o.push(i)}return o};(0,i.useEffect)(()=>{if(F.isSuccess){l.reset(l.getValues())}// eslint-disable-next-line react-hooks/exhaustive-deps
},[F.isSuccess]);return/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:eL.headerRight,children:[/*#__PURE__*/(0,n/* .jsx */.Y)(O/* ["default"] */.A,{when:A==="draft"&&E!=="private",fallback:/*#__PURE__*/(0,n/* .jsx */.Y)(w/* ["default"] */.A,{as:"a",href:T,target:"_blank",variant:"text",icon:/*#__PURE__*/(0,n/* .jsx */.Y)(x/* ["default"] */.A,{name:"linkExternal",width:24,height:24}),iconPosition:"right",disabled:!T,size:j/* .CURRENT_VIEWPORT.isAboveDesktop */.vN.isAboveDesktop?"regular":"small",children:/*#__PURE__*/(0,n/* .jsx */.Y)(O/* ["default"] */.A,{when:j/* .CURRENT_VIEWPORT.isAboveDesktop */.vN.isAboveDesktop,children:(0,s.__)("Preview","tutor")})}),children:/*#__PURE__*/(0,n/* .jsx */.Y)(w/* ["default"] */.A,{variant:"secondary",icon:/*#__PURE__*/(0,n/* .jsx */.Y)(x/* ["default"] */.A,{name:"upload",width:24,height:24}),loading:R==="draft"&&F.isPending,iconPosition:"left",buttonCss:/*#__PURE__*/(0,m/* .css */.AH)("padding-inline:",g/* .spacing["16"] */.YK["16"],";"),onClick:l.handleSubmit(e=>Q(e,"draft")),size:j/* .CURRENT_VIEWPORT.isAboveDesktop */.vN.isAboveDesktop?"regular":"small",children:/*#__PURE__*/(0,n/* .jsx */.Y)(O/* ["default"] */.A,{when:j/* .CURRENT_VIEWPORT.isAboveDesktop */.vN.isAboveDesktop,children:(0,s.__)("Save as Draft","tutor")})})}),/*#__PURE__*/(0,n/* .jsx */.Y)(O/* ["default"] */.A,{when:J().length>0,fallback:/*#__PURE__*/(0,n/* .jsx */.Y)(w/* ["default"] */.A,{"data-cy":"course-builder-submit-button",size:j/* .CURRENT_VIEWPORT.isAboveDesktop */.vN.isAboveDesktop?"regular":"small",loading:M.isPending||["publish","future","pending"].includes(R)&&F.isPending,onClick:l.handleSubmit(e=>Q(e,X().action)),children:X().text}),children:/*#__PURE__*/(0,n/* .jsx */.Y)(eO,{"data-cy":"course-builder-submit-button",text:X().text,size:j/* .CURRENT_VIEWPORT.isAboveDesktop */.vN.isAboveDesktop?"regular":"small",variant:"primary",loading:M.isPending||["publish","future","pending"].includes(R)&&F.isPending,onClick:l.handleSubmit(e=>Q(e,X().action)),dropdownMaxWidth:k&&(0,K/* .isBefore */.Y)(new Date,new Date("".concat(C," ").concat(I)))?"190px":"164px",disabledDropdown:J().length===0,children:J().map((e,t)=>/*#__PURE__*/(0,n/* .jsx */.Y)(eO.Item,{text:e.text,onClick:e.onClick,isDanger:e.isDanger,"data-cy":e.dataCy},t))})})]})};var eL={headerRight:/*#__PURE__*/(0,m/* .css */.AH)("display:flex;align-items:center;gap:",g/* .spacing["12"] */.YK["12"],";")};/* export default */const eN=eY;// EXTERNAL MODULE: ./assets/src/js/v3/shared/controls/For.tsx
var eH=r(3013);// EXTERNAL MODULE: ./assets/src/js/v3/entries/course-builder/contexts/CourseNavigatorContext.tsx
var ej=r(43414);// CONCATENATED MODULE: ./assets/src/js/v3/entries/course-builder/components/layouts/Tracker.tsx
function eU(){var e=(0,Q._)(["\n      color: ",";\n    "]);eU=function t(){return e};return e}function eB(){var e=(0,Q._)(["\n      color: ",";\n      cursor: not-allowed;\n    "]);eB=function t(){return e};return e}function eK(){var e=(0,Q._)(["\n        border-color: ",";\n        border-color: ",";\n        background-color: ",";\n        color: ",";\n      "]);eK=function t(){return e};return e}var ez=()=>{var{steps:e}=(0,ej/* .useCourseNavigator */._)();var t=(0,o/* .useNavigate */.Zp)();var r=(0,v/* .useFormContext */.xW)();var i=r.watch("post_title");var a=e=>(0,B._)(function*(){t(e.path)})();return/*#__PURE__*/(0,n/* .jsx */.Y)("div",{"data-cy":"tutor-tracker",css:eV.wrapper,children:/*#__PURE__*/(0,n/* .jsx */.Y)(eH/* ["default"] */.A,{each:e,children:e=>/*#__PURE__*/(0,n/* .jsxs */.FD)("button",{type:"button",css:eV.element({isActive:e.isActive,isDisabled:e.id!=="basic"&&!i}),onClick:()=>a(e),disabled:e.id!=="basic"&&!i,children:[/*#__PURE__*/(0,n/* .jsx */.Y)("span",{"data-element-id":true,children:e.indicator}),/*#__PURE__*/(0,n/* .jsx */.Y)("span",{"data-element-name":true,"data-isActive":e.isActive,children:e.label}),/*#__PURE__*/(0,n/* .jsx */.Y)(O/* ["default"] */.A,{when:e.indicator<3,children:/*#__PURE__*/(0,n/* .jsx */.Y)("span",{"data-element-indicator":true})})]},e.id)})})};/* export default */const eq=ez;var eV={wrapper:/*#__PURE__*/(0,m/* .css */.AH)("display:flex;align-items:center;"),element:e=>{var{isActive:t=false,isDisabled:r=false}=e;return/*#__PURE__*/(0,m/* .css */.AH)(S/* .styleUtils.resetButton */.x.resetButton,";",S/* .styleUtils.display.flex */.x.display.flex(),";",U/* .typography.small */.I.small(),";padding:",g/* .spacing["4"] */.YK["4"]," ",g/* .spacing["0"] */.YK["0"]," ",g/* .spacing["4"] */.YK["4"]," ",g/* .spacing["8"] */.YK["8"],";gap:",g/* .spacing["8"] */.YK["8"],";align-items:center;&:hover,&:focus{background:none;box-shadow:none;color:",g/* .colorTokens.text.primary */.I6.text.primary,";}&:focus-visible{outline:2px solid ",g/* .colorTokens.stroke.brand */.I6.stroke.brand,";outline-offset:1px;border-radius:",g/* .borderRadius["4"] */.Vq["4"],";}&:is(:first-of-type){padding-left:0;}",t&&(0,m/* .css */.AH)(eU(),g/* .colorTokens.text.primary */.I6.text.primary)," ",r&&(0,m/* .css */.AH)(eB(),g/* .colorTokens.text.hints */.I6.text.hints),"    [data-element-id]{",S/* .styleUtils.display.flex */.x.display.flex(),";",U/* .typography.small */.I.small("bold"),";line-height:",g/* .lineHeight["20"] */.K_["20"],";width:24px;height:24px;border-radius:",g/* .borderRadius.circle */.Vq.circle,";justify-content:center;align-items:center;border:1px solid ",g/* .colorTokens.color.black["10"] */.I6.color.black["10"],";color:",g/* .colorTokens.text.hints */.I6.text.hints,";",t&&(0,m/* .css */.AH)(eK(),g/* .colorTokens.stroke.brand */.I6.stroke.brand,g/* .colorTokens.stroke.brand */.I6.stroke.brand,g/* .colorTokens.design.brand */.I6.design.brand,g/* .colorTokens.text.white */.I6.text.white),"}[data-element-indicator]{width:16px;height:2px;border-radius:",g/* .spacing["6"] */.YK["6"],";background-color:",g/* .colorTokens.stroke["default"] */.I6.stroke["default"],";margin-inline:4px;}",g/* .Breakpoint.smallTablet */.EA.smallTablet,"{[data-element-name]:not([data-isActive='true']){display:none;}}")}};// EXTERNAL MODULE: ./assets/src/js/v3/shared/components/FocusTrap.tsx
var eW=r(75823);// EXTERNAL MODULE: ./assets/src/js/v3/shared/components/fields/FormTextareaInput.tsx
var eG=r(74054);// EXTERNAL MODULE: ./assets/src/js/v3/shared/services/magic-ai.ts
var e$=r(97200);// CONCATENATED MODULE: ./assets/src/js/v3/entries/course-builder/components/ai-course-modal/ContentGenerationContext.tsx
var eQ={prompt:"",title:"",featured_image:"",description:"",topics:[],time:0};var eX={title:false,description:false,topic:false,content:false,quiz:false};var eJ={title:"",description:"",topic:"",content:"",quiz:""};var eZ=/*#__PURE__*/a().createContext({abortControllerRef:{current:null},abortStatus:[],currentStep:"prompt",setCurrentStep:_/* .noop */.lQ,contents:[eQ],updateContents:_/* .noop */.lQ,pointer:0,setPointer:_/* .noop */.lQ,appendContent:_/* .noop */.lQ,removeContent:_/* .noop */.lQ,appendLoading:_/* .noop */.lQ,removeLoading:_/* .noop */.lQ,appendErrors:_/* .noop */.lQ,removeErrors:_/* .noop */.lQ,currentContent:{},currentErrors:{},currentAbortStatus:false,loading:[{title:false,description:false,content:false,topic:false,quiz:false}],errors:[{title:"",description:"",topic:"",content:"",quiz:""}],updateErrors:_/* .noop */.lQ,currentLoading:{},updateLoading:_/* .noop */.lQ,updateAbortStatus:_/* .noop */.lQ});var e0=()=>(0,i.useContext)(eZ);var e1=e=>{var{children:t}=e;var r=(0,i.useRef)(null);var[a,o]=(0,i.useState)("prompt");var[s,u]=(0,i.useState)([eQ]);var[c,l]=(0,i.useState)(0);var[d,f]=(0,i.useState)([{title:false,description:false,content:false,topic:false,quiz:false}]);var[v,m]=(0,i.useState)([{title:"",description:"",topic:"",content:"",quiz:""}]);var[g,b]=(0,i.useState)([]);var _=(0,i.useMemo)(()=>{return s[c]},[c,s]);var y=(0,i.useMemo)(()=>{return d[c]},[c,d]);var w=(0,i.useMemo)(()=>{return v[c]},[c,v]);var A=(0,i.useMemo)(()=>{return g[c]},[c,g]);var x=(0,i.useCallback)((e,t)=>{var r,n,i,a;var o;var s=(o=(r=e.topics)===null||r===void 0?void 0:r.length)!==null&&o!==void 0?o:0;var l;var d=(l=(n=e.topics)===null||n===void 0?void 0:n.reduce((e,t)=>{return e+t.contents.filter(e=>e.type==="lesson").length},0))!==null&&l!==void 0?l:0;var f;var v=(f=(i=e.topics)===null||i===void 0?void 0:i.reduce((e,t)=>{return e+t.contents.filter(e=>e.type==="quiz").length},0))!==null&&f!==void 0?f:0;var m;var g=(m=(a=e.topics)===null||a===void 0?void 0:a.reduce((e,t)=>{return e+t.contents.filter(e=>e.type==="assignment").length},0))!==null&&m!==void 0?m:0;var b=(0,ek/* .isDefined */.O9)(t)?t:c;u(t=>{var r,n;var i=[...t];(r=i)[n=b]||(r[n]=eQ);i[b]=(0,h._)((0,p._)({},i[b],e),{counts:{topics:s,lessons:d,quizzes:v,assignments:g}});return i})},[c]);var E=(0,i.useCallback)((e,t)=>{var r=(0,ek/* .isDefined */.O9)(t)?t:c;f(t=>{var n,i;var a=[...t];(n=a)[i=r]||(n[i]=eX);a[r]=(0,p._)({},a[r],e);return a})},[c]);var O=(0,i.useCallback)((e,t)=>{var r=(0,ek/* .isDefined */.O9)(t)?t:c;m(t=>{var n=[...t];n[r]=(0,p._)({},n[r],e);return n})},[c]);var S=(0,i.useCallback)((e,t)=>{var r=(0,ek/* .isDefined */.O9)(t)?t:c;b(t=>{var n=[...t];n[r]=e;return n})},[c]);var T=(0,i.useCallback)(()=>{u(e=>[...e,eQ])},[]);var k=(0,i.useCallback)(()=>{u(e=>[...e].slice(0,-1))},[]);var C=(0,i.useCallback)(()=>{f(e=>[...e,eX])},[]);var I=(0,i.useCallback)(()=>{f(e=>[...e].slice(0,-1))},[]);var R=(0,i.useCallback)(()=>{m(e=>[...e,eJ])},[]);var D=(0,i.useCallback)(()=>{m(e=>[...e].slice(0,-1))},[]);var P={abortControllerRef:r,abortStatus:g,currentStep:a,setCurrentStep:o,contents:s,loading:d,errors:v,pointer:c,setPointer:l,updateContents:x,updateLoading:E,updateErrors:O,updateAbortStatus:S,currentContent:_,currentLoading:y,currentErrors:w,currentAbortStatus:A,appendContent:T,removeContent:k,appendLoading:C,removeLoading:I,appendErrors:R,removeErrors:D};return/*#__PURE__*/(0,n/* .jsx */.Y)(eZ.Provider,{value:P,children:t})};/* export default */const e2=e1;// CONCATENATED MODULE: ./assets/src/js/v3/public/images/course-generation-placeholders/course-generation-placeholder-blue.webp
const e6=r.p+"js/images/course-generation-placeholder-blue-19c28853.webp";// CONCATENATED MODULE: ./assets/src/js/v3/public/images/course-generation-placeholders/course-generation-placeholder-green.webp
const e4=r.p+"js/images/course-generation-placeholder-green-a82f3c5b.webp";// CONCATENATED MODULE: ./assets/src/js/v3/public/images/course-generation-placeholders/course-generation-placeholder-purple.webp
const e5=r.p+"js/images/course-generation-placeholder-purple-859bd9be.webp";// CONCATENATED MODULE: ./assets/src/js/v3/public/images/course-generation-placeholders/course-generation-placeholder-red.webp
const e3=r.p+"js/images/course-generation-placeholder-red-2ee8f879.webp";// CONCATENATED MODULE: ./assets/src/js/v3/public/images/course-generation-placeholders/course-generation-placeholder-rust.webp
const e9=r.p+"js/images/course-generation-placeholder-rust-e879972a.webp";// CONCATENATED MODULE: ./assets/src/js/v3/entries/course-builder/hooks/useGenerateCourseContent.ts
var e8=[e6,e3,e9,e4,e5];var e7=()=>{var{abortControllerRef:e,updateContents:t,updateLoading:r,updateErrors:n,updateAbortStatus:i}=e0();var a=(0,e$/* .useGenerateCourseContentMutation */.At)("title");var o=(0,e$/* .useGenerateCourseContentMutation */.At)("description");var s=(0,e$/* .useGenerateCourseTopicNamesMutation */.MZ)();var u=(0,e$/* .useGenerateCourseTopicContentMutation */.lM)();var c=(0,e$/* .useGenerateQuizQuestionsMutation */._8)();var l=(i,l)=>(0,B._)(function*(){var d=Date.now();if(!e.current){e.current=new AbortController}if(i.length){t({prompt:i},l)}try{r({title:true,description:true,content:true,topic:true,quiz:true},l);var f=yield a.mutateAsync({type:"title",prompt:i,signal:e.current.signal});r({title:false},l);if(!f.data){return}var v=f.data;t({title:v,prompt:i},l);var m=yield(0,_/* .fetchImageUrlAsBase64 */._r)(e8[Math.floor(Math.random()*e8.length)]);t({featured_image:m},l);try{var g=yield o.mutateAsync({type:"description",title:v,signal:e.current.signal});r({description:false},l);t({description:g.data},l)}catch(e){r({description:false},l);n({description:e},l)}try{var b=function(t){var r=function(r){var a=i.contents[r];if(a.type==="quiz"){var o;var s=c.mutateAsync({title:v,topic_name:i.title,quiz_title:a.title,signal:(o=e.current)===null||o===void 0?void 0:o.signal}).then(e=>{var n;(n=w[t].contents[r]).questions||(n.questions=[]);w[t].contents[r].questions=e.data}).catch(e=>{n({quiz:e},l)});x.push(s)}};var i=w[t];for(var a=0;a<i.contents.length;a++)r(a)};var y=yield s.mutateAsync({type:"topic_names",title:v,signal:e.current.signal});r({topic:false},l);var w=y.data.map(e=>(0,h._)((0,p._)({},e),{contents:[],is_active:true}));t({topics:w},l);var A=w.map((r,i)=>{var a;return u.mutateAsync({title:v,topic_name:r.title,index:i,signal:(a=e.current)===null||a===void 0?void 0:a.signal}).then(e=>{var r;var{index:n,topic_contents:i}=e.data;(r=w[n]).contents||(r.contents=[]);w[n].contents.push(...i);t({topics:w},l)}).catch(e=>{n({topic:e},l)})});yield Promise.allSettled(A);r({content:false},l);/** Generate quiz contents  */var x=[];for(var E=0;E<w.length;E++)b(E);yield Promise.allSettled(x);r({quiz:false},l);var O=Date.now();t({topics:w,time:O-d},l)}catch(e){r({topic:false,content:false,quiz:false},l);n({topic:e},l)}}catch(e){r({title:false,content:false,description:false,quiz:false,topic:false},l);n({title:e,content:e,description:e,quiz:e,topic:e},l)}})();var d=()=>{if(e.current){e.current.abort();e.current=null;r({title:false,content:false,description:false,quiz:false,topic:false});i(true)}};return{startGeneration:l,cancelGeneration:d}};// CONCATENATED MODULE: ./assets/src/js/v3/entries/course-builder/components/ai-course-modal/BasicPrompt.tsx
var te=e=>{var{onClose:t}=e;var r=(0,b/* .useFormWithGlobalError */.p)({defaultValues:{prompt:""}});var{setCurrentStep:a}=e0();var{startGeneration:o}=e7();(0,i.useEffect)(()=>{r.setFocus("prompt");// eslint-disable-next-line react-hooks/exhaustive-deps
},[]);return/*#__PURE__*/(0,n/* .jsxs */.FD)("form",{css:tr.container,onSubmit:r.handleSubmit(e=>(0,B._)(function*(){a("generation");o(e.prompt)})()),children:[/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:tr.header,children:[/*#__PURE__*/(0,n/* .jsx */.Y)("div",{css:tr.headerContent,children:/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:tr.iconWithTitle,children:[/*#__PURE__*/(0,n/* .jsx */.Y)(x/* ["default"] */.A,{name:"magicAiColorize",width:24,height:24}),/*#__PURE__*/(0,n/* .jsx */.Y)("p",{css:tr.title,children:(0,s.__)("AI Studio","tutor")})]})}),/*#__PURE__*/(0,n/* .jsx */.Y)("div",{css:tr.actionsWrapper,children:/*#__PURE__*/(0,n/* .jsx */.Y)("button",{type:"button",css:tr.closeButton,onClick:t,children:/*#__PURE__*/(0,n/* .jsx */.Y)(x/* ["default"] */.A,{name:"timesThin",width:24,height:24})})})]}),/*#__PURE__*/(0,n/* .jsx */.Y)("div",{css:tr.content,children:/*#__PURE__*/(0,n/* .jsx */.Y)(v/* .Controller */.xI,{control:r.control,name:"prompt",render:e=>/*#__PURE__*/(0,n/* .jsx */.Y)(eG/* ["default"] */.A,(0,h._)((0,p._)({},e),{placeholder:(0,s.__)("Enter a brief overview of your course topics and structure","tutor"),isMagicAi:true}))})}),/*#__PURE__*/(0,n/* .jsx */.Y)("div",{css:tr.footer,children:/*#__PURE__*/(0,n/* .jsxs */.FD)(A/* ["default"] */.A,{type:"submit",disabled:r.watch("prompt")==="",children:[/*#__PURE__*/(0,n/* .jsx */.Y)(x/* ["default"] */.A,{name:"magicAi",width:24,height:24}),(0,s.__)("Generate Now","tutor")]})})]})};/* export default */const tt=te;var tr={container:/*#__PURE__*/(0,m/* .css */.AH)("position:absolute;background:",g/* .colorTokens.background.white */.I6.background.white,";box-shadow:",g/* .shadow.modal */.r7.modal,";border-radius:",g/* .borderRadius["10"] */.Vq["10"],";overflow:hidden;top:50%;left:50%;translate:-50% -50%;max-width:560px;width:100%;:dir(rtl){translate:50% -50%;}",g/* .Breakpoint.smallTablet */.EA.smallTablet,"{width:90%;}"),header:/*#__PURE__*/(0,m/* .css */.AH)("display:flex;align-items:center;justify-content:space-between;width:100%;height:",j/* .modal.BASIC_MODAL_HEADER_HEIGHT */.yl.BASIC_MODAL_HEADER_HEIGHT,"px;background:",g/* .colorTokens.background.white */.I6.background.white,";border-bottom:1px solid ",g/* .colorTokens.stroke.divider */.I6.stroke.divider,";padding-inline:",g/* .spacing["16"] */.YK["16"],";"),headerContent:/*#__PURE__*/(0,m/* .css */.AH)("place-self:center start;display:inline-flex;align-items:center;gap:",g/* .spacing["12"] */.YK["12"],";"),iconWithTitle:/*#__PURE__*/(0,m/* .css */.AH)("display:inline-flex;align-items:center;gap:",g/* .spacing["4"] */.YK["4"],";color:",g/* .colorTokens.icon["default"] */.I6.icon["default"],";"),title:/*#__PURE__*/(0,m/* .css */.AH)(U/* .typography.body */.I.body("medium"),";color:",g/* .colorTokens.text.title */.I6.text.title,";text-transform:capitalize;"),subtitle:/*#__PURE__*/(0,m/* .css */.AH)(S/* .styleUtils.text.ellipsis */.x.text.ellipsis(1)," ",U/* .typography.caption */.I.caption(),";color:",g/* .colorTokens.text.hints */.I6.text.hints,";"),actionsWrapper:/*#__PURE__*/(0,m/* .css */.AH)("place-self:center end;display:inline-flex;gap:",g/* .spacing["16"] */.YK["16"],";"),closeButton:/*#__PURE__*/(0,m/* .css */.AH)(S/* .styleUtils.resetButton */.x.resetButton,";display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:",g/* .borderRadius.circle */.Vq.circle,";background:",g/* .colorTokens.background.white */.I6.background.white,";svg{color:",g/* .colorTokens.icon["default"] */.I6.icon["default"],";transition:color 0.3s ease-in-out;}:hover{svg{color:",g/* .colorTokens.icon.hover */.I6.icon.hover,";}}:focus{box-shadow:",g/* .shadow.focus */.r7.focus,";}"),content:/*#__PURE__*/(0,m/* .css */.AH)("background-color:",g/* .colorTokens.background.white */.I6.background.white,";overflow-y:auto;width:100%;padding:",g/* .spacing["12"] */.YK["12"]," ",g/* .spacing["20"] */.YK["20"]," ",g/* .spacing["4"] */.YK["4"]," ",g/* .spacing["20"] */.YK["20"],";"),footer:/*#__PURE__*/(0,m/* .css */.AH)("padding:",g/* .spacing["8"] */.YK["8"]," ",g/* .spacing["20"] */.YK["20"]," ",g/* .spacing["12"] */.YK["12"]," ",g/* .spacing["20"] */.YK["20"],";")};// EXTERNAL MODULE: ./assets/src/js/v3/shared/atoms/Alert.tsx
var tn=r(47918);// EXTERNAL MODULE: ./assets/src/js/v3/shared/atoms/Toast.tsx
var ti=r(40925);// CONCATENATED MODULE: ./assets/src/js/v3/public/images/ai-studio-error.webp
const ta=r.p+"js/images/ai-studio-error-7b87f088.webp";// CONCATENATED MODULE: ./assets/src/js/v3/public/images/ai-studio-error-2x.webp
const to=r.p+"js/images/ai-studio-error-2x-4767a6a1.webp";// EXTERNAL MODULE: ./node_modules/.pnpm/@react-spring+web@9.7.5_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@react-spring/web/dist/react-spring_web.modern.mjs
var ts=r(76035);// EXTERNAL MODULE: ./assets/src/js/v3/shared/atoms/Skeleton.tsx
var tu=r(1883);// CONCATENATED MODULE: ./assets/src/js/v3/entries/course-builder/components/ai-course-modal/loaders/TopicContentSkeleton.tsx
var tc=()=>{return/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:td.spacer,children:[/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:td.group,children:[/*#__PURE__*/(0,n/* .jsx */.Y)(tu/* ["default"] */.A,{isMagicAi:true,animation:true,width:"16px",height:"16px",isRound:true}),/*#__PURE__*/(0,n/* .jsx */.Y)(tu/* ["default"] */.A,{isMagicAi:true,animation:true,width:"50%",height:"16px"})]}),/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:td.group,children:[/*#__PURE__*/(0,n/* .jsx */.Y)(tu/* ["default"] */.A,{isMagicAi:true,animation:true,width:"16px",height:"16px",isRound:true}),/*#__PURE__*/(0,n/* .jsx */.Y)(tu/* ["default"] */.A,{isMagicAi:true,animation:true,width:"40%",height:"16px"})]}),/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:td.group,children:[/*#__PURE__*/(0,n/* .jsx */.Y)(tu/* ["default"] */.A,{isMagicAi:true,animation:true,width:"16px",height:"16px",isRound:true}),/*#__PURE__*/(0,n/* .jsx */.Y)(tu/* ["default"] */.A,{isMagicAi:true,animation:true,width:"80%",height:"16px"})]})]})};/* export default */const tl=tc;var td={group:/*#__PURE__*/(0,m/* .css */.AH)("display:flex;gap:",g/* .spacing["16"] */.YK["16"],";align-items:center;"),spacer:/*#__PURE__*/(0,m/* .css */.AH)("margin-left:",g/* .spacing["16"] */.YK["16"],";display:flex;flex-direction:column;gap:",g/* .spacing["16"] */.YK["16"],";")};// CONCATENATED MODULE: ./assets/src/js/v3/entries/course-builder/components/ai-course-modal/ContentAccordion.tsx
function tf(){var e=(0,Q._)(["\n      margin-top: ",";\n    "]);tf=function t(){return e};return e}function tp(){var e=(0,Q._)(["\n      svg {\n        transform: rotate(180deg);\n      }\n    "]);tp=function t(){return e};return e}var th={lesson:/*#__PURE__*/(0,n/* .jsx */.Y)(x/* ["default"] */.A,{name:"lesson",width:24,height:24,"data-lesson-icon":true}),assignment:/*#__PURE__*/(0,n/* .jsx */.Y)(x/* ["default"] */.A,{name:"assignment",width:24,height:24,"data-assignment-icon":true}),quiz:/*#__PURE__*/(0,n/* .jsx */.Y)(x/* ["default"] */.A,{name:"quiz",width:24,height:24,"data-quiz-icon":true})};var tv=e=>{var{data:t,setIsActive:r}=e;var{currentLoading:i}=e0();var a=i.content&&t.contents.length===0;var o=(0,ts/* .useSpring */.zh)({maxHeight:t.is_active?300:0,opacity:t.is_active?1:0,config:{duration:300,easing:e=>e*(2-e)}});return/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{onClick:t.contents.length?r:_/* .noop */.lQ,onKeyDown:_/* .noop */.lQ,css:/*#__PURE__*/(0,m/* .css */.AH)("cursor:",t.contents.length?"pointer":"default",";"),children:[/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:tb.title,children:[/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:tb.titleAndIcon({isActive:t.is_active}),children:[/*#__PURE__*/(0,n/* .jsx */.Y)(x/* ["default"] */.A,{name:"chevronDown",width:24,height:24}),/*#__PURE__*/(0,n/* .jsx */.Y)("p",{children:t.title})]}),/*#__PURE__*/(0,n/* .jsxs */.FD)("p",{children:[t.contents.length," ",(0,s.__)("Contents","tutor")]})]}),/*#__PURE__*/(0,n/* .jsx */.Y)(O/* ["default"] */.A,{when:t.contents.length>0&&!a,fallback:/*#__PURE__*/(0,n/* .jsx */.Y)(O/* ["default"] */.A,{when:a,children:/*#__PURE__*/(0,n/* .jsx */.Y)("div",{css:/*#__PURE__*/(0,m/* .css */.AH)("margin-top:",g/* .spacing["16"] */.YK["16"],";"),children:/*#__PURE__*/(0,n/* .jsx */.Y)(tl,{})})}),children:/*#__PURE__*/(0,n/* .jsx */.Y)(ts/* .animated.div */.CS.div,{style:o,children:/*#__PURE__*/(0,n/* .jsx */.Y)("div",{css:tb.content(t.is_active),children:/*#__PURE__*/(0,n/* .jsx */.Y)(O/* ["default"] */.A,{when:!a,children:/*#__PURE__*/(0,n/* .jsx */.Y)(eH/* ["default"] */.A,{each:t.contents,children:(e,t)=>{return/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:tb.contentItem,children:[e.type==="quiz"&&!i.content&&i.quiz&&!(e===null||e===void 0?void 0:e.questions)?/*#__PURE__*/(0,n/* .jsx */.Y)(u/* .GradientLoadingSpinner */.em,{}):th[e.type],/*#__PURE__*/(0,n/* .jsx */.Y)("span",{children:e.title})]},t)}})})})})})]})};var tm=()=>{var{currentContent:e}=e0();var[t,r]=(0,i.useState)([]);(0,i.useEffect)(()=>{if(e.topics){r(e.topics.map(e=>(0,h._)((0,p._)({},e),{is_active:true})))}},[e.topics]);return/*#__PURE__*/(0,n/* .jsx */.Y)("div",{css:tb.wrapper,children:/*#__PURE__*/(0,n/* .jsx */.Y)(eH/* ["default"] */.A,{each:t,children:(e,t)=>{return/*#__PURE__*/(0,n/* .jsx */.Y)(tv,{data:e,isActive:t===0,setIsActive:()=>{r(e=>{return e.map((e,r)=>{if(r===t){return(0,h._)((0,p._)({},e),{is_active:!e.is_active})}return(0,p._)({},e)})})}},t)}})})};/* export default */const tg=tm;var tb={wrapper:/*#__PURE__*/(0,m/* .css */.AH)("display:flex;flex-direction:column;gap:",g/* .spacing["24"] */.YK["24"],";"),content:e=>/*#__PURE__*/(0,m/* .css */.AH)("margin-left:",g/* .spacing["32"] */.YK["32"],";display:flex;flex-direction:column;gap:",g/* .spacing["8"] */.YK["8"],";",e&&(0,m/* .css */.AH)(tf(),g/* .spacing["16"] */.YK["16"]),";"),contentItem:/*#__PURE__*/(0,m/* .css */.AH)("display:flex;align-items:center;gap:",g/* .spacing["8"] */.YK["8"],";[data-lesson-icon]{color:",g/* .colorTokens.icon.subdued */.I6.icon.subdued,";}[data-assignment-icon]{color:",g/* .colorTokens.icon.processing */.I6.icon.processing,";}[data-quiz-icon]{color:",g/* .colorTokens.design.warning */.I6.design.warning,";}"),titleAndIcon:e=>{var{isActive:t}=e;return/*#__PURE__*/(0,m/* .css */.AH)("display:flex;align-items:center;gap:",g/* .spacing["8"] */.YK["8"],";svg{transition:transform 0.3s ease-in-out;}",t&&(0,m/* .css */.AH)(tp()),";")},title:/*#__PURE__*/(0,m/* .css */.AH)("display:flex;align-items:center;justify-content:space-between;p{",U/* .typography.body */.I.body("medium"),";color:",g/* .colorTokens.text.subdued */.I6.text.subdued,";}& > p{",U/* .typography.caption */.I.caption(),";}")};// CONCATENATED MODULE: ./assets/src/js/v3/entries/course-builder/components/ai-course-modal/loaders/ContentSkeleton.tsx
var t_=()=>{return/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:tw.wrapper,children:[/*#__PURE__*/(0,n/* .jsx */.Y)(tu/* ["default"] */.A,{isMagicAi:true,animation:true,width:"20%",height:"16px"}),/*#__PURE__*/(0,n/* .jsx */.Y)(tu/* ["default"] */.A,{isMagicAi:true,animation:true,width:"100%",height:"2px"}),/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:tw.group,children:[/*#__PURE__*/(0,n/* .jsx */.Y)(tu/* ["default"] */.A,{isMagicAi:true,animation:true,width:"16px",height:"16px",isRound:true}),/*#__PURE__*/(0,n/* .jsx */.Y)(tu/* ["default"] */.A,{isMagicAi:true,animation:true,width:"80%",height:"16px"}),/*#__PURE__*/(0,n/* .jsx */.Y)(tu/* ["default"] */.A,{isMagicAi:true,animation:true,width:"20%",height:"16px"})]}),/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:tw.group,children:[/*#__PURE__*/(0,n/* .jsx */.Y)(tu/* ["default"] */.A,{isMagicAi:true,animation:true,width:"16px",height:"16px",isRound:true}),/*#__PURE__*/(0,n/* .jsx */.Y)(tu/* ["default"] */.A,{isMagicAi:true,animation:true,width:"85%",height:"16px"}),/*#__PURE__*/(0,n/* .jsx */.Y)(tu/* ["default"] */.A,{isMagicAi:true,animation:true,width:"20%",height:"16px"})]}),/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:tw.group,children:[/*#__PURE__*/(0,n/* .jsx */.Y)(tu/* ["default"] */.A,{isMagicAi:true,animation:true,width:"16px",height:"16px",isRound:true}),/*#__PURE__*/(0,n/* .jsx */.Y)(tu/* ["default"] */.A,{isMagicAi:true,animation:true,width:"90%",height:"16px"}),/*#__PURE__*/(0,n/* .jsx */.Y)(tu/* ["default"] */.A,{isMagicAi:true,animation:true,width:"20%",height:"16px"})]}),/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:tw.group,children:[/*#__PURE__*/(0,n/* .jsx */.Y)(tu/* ["default"] */.A,{isMagicAi:true,animation:true,width:"16px",height:"16px",isRound:true}),/*#__PURE__*/(0,n/* .jsx */.Y)(tu/* ["default"] */.A,{isMagicAi:true,animation:true,width:"60%",height:"16px"}),/*#__PURE__*/(0,n/* .jsx */.Y)(tu/* ["default"] */.A,{isMagicAi:true,animation:true,width:"20%",height:"16px"})]}),/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:tw.group,children:[/*#__PURE__*/(0,n/* .jsx */.Y)(tu/* ["default"] */.A,{isMagicAi:true,animation:true,width:"16px",height:"16px",isRound:true}),/*#__PURE__*/(0,n/* .jsx */.Y)(tu/* ["default"] */.A,{isMagicAi:true,animation:true,width:"70%",height:"16px"}),/*#__PURE__*/(0,n/* .jsx */.Y)(tu/* ["default"] */.A,{isMagicAi:true,animation:true,width:"20%",height:"16px"})]})]})};/* export default */const ty=t_;var tw={wrapper:/*#__PURE__*/(0,m/* .css */.AH)("display:flex;flex-direction:column;gap:",g/* .spacing["16"] */.YK["16"],";width:100%;margin-top:",g/* .spacing["16"] */.YK["16"],";"),group:/*#__PURE__*/(0,m/* .css */.AH)("display:flex;gap:",g/* .spacing["16"] */.YK["16"],";align-items:center;")};// CONCATENATED MODULE: ./assets/src/js/v3/entries/course-builder/components/ai-course-modal/loaders/DescriptionSkeleton.tsx
var tA=()=>{return/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:tE.wrapper,children:[/*#__PURE__*/(0,n/* .jsx */.Y)(tu/* ["default"] */.A,{isMagicAi:true,animation:true,width:"20%",height:"16px"}),/*#__PURE__*/(0,n/* .jsx */.Y)(tu/* ["default"] */.A,{isMagicAi:true,animation:true,width:"100%",height:"2px"}),/*#__PURE__*/(0,n/* .jsx */.Y)(tu/* ["default"] */.A,{isMagicAi:true,animation:true,width:"100%",height:"16px"}),/*#__PURE__*/(0,n/* .jsx */.Y)(tu/* ["default"] */.A,{isMagicAi:true,animation:true,width:"80%",height:"16px"}),/*#__PURE__*/(0,n/* .jsx */.Y)(tu/* ["default"] */.A,{isMagicAi:true,animation:true,width:"70%",height:"16px"}),/*#__PURE__*/(0,n/* .jsx */.Y)(tu/* ["default"] */.A,{isMagicAi:true,animation:true,width:"30%",height:"16px"}),/*#__PURE__*/(0,n/* .jsx */.Y)(tu/* ["default"] */.A,{isMagicAi:true,animation:true,width:"100%",height:"16px"}),/*#__PURE__*/(0,n/* .jsx */.Y)(tu/* ["default"] */.A,{isMagicAi:true,animation:true,width:"100%",height:"16px"}),/*#__PURE__*/(0,n/* .jsx */.Y)(tu/* ["default"] */.A,{isMagicAi:true,animation:true,width:"90%",height:"16px"}),/*#__PURE__*/(0,n/* .jsx */.Y)(tu/* ["default"] */.A,{isMagicAi:true,animation:true,width:"95%",height:"16px"}),/*#__PURE__*/(0,n/* .jsx */.Y)(tu/* ["default"] */.A,{isMagicAi:true,animation:true,width:"35%",height:"16px"}),/*#__PURE__*/(0,n/* .jsx */.Y)(tu/* ["default"] */.A,{isMagicAi:true,animation:true,width:"100%",height:"16px"}),/*#__PURE__*/(0,n/* .jsx */.Y)(tu/* ["default"] */.A,{isMagicAi:true,animation:true,width:"100%",height:"16px"}),/*#__PURE__*/(0,n/* .jsx */.Y)(tu/* ["default"] */.A,{isMagicAi:true,animation:true,width:"65%",height:"16px"}),/*#__PURE__*/(0,n/* .jsx */.Y)(tu/* ["default"] */.A,{isMagicAi:true,animation:true,width:"80%",height:"16px"})]})};/* export default */const tx=tA;var tE={wrapper:/*#__PURE__*/(0,m/* .css */.AH)("display:flex;flex-direction:column;gap:",g/* .spacing["16"] */.YK["16"],";width:100%;margin-top:",g/* .spacing["16"] */.YK["16"],";")};// CONCATENATED MODULE: ./assets/src/js/v3/entries/course-builder/components/ai-course-modal/loaders/ImageSkeleton.tsx
var tO=()=>{return/*#__PURE__*/(0,n/* .jsx */.Y)("div",{css:tT.wrapper,children:/*#__PURE__*/(0,n/* .jsx */.Y)(tu/* ["default"] */.A,{isMagicAi:true,animation:true,width:"100%",height:"390px"})})};/* export default */const tS=tO;var tT={wrapper:/*#__PURE__*/(0,m/* .css */.AH)("display:flex;align-items:center;gap:",g/* .spacing["16"] */.YK["16"],";width:100%;")};// CONCATENATED MODULE: ./assets/src/js/v3/entries/course-builder/components/ai-course-modal/loaders/TitleSkeleton.tsx
var tk=()=>{return/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:tI.wrapper,children:[/*#__PURE__*/(0,n/* .jsx */.Y)(tu/* ["default"] */.A,{isMagicAi:true,animation:true,width:"24px",height:"24px",isRound:true}),/*#__PURE__*/(0,n/* .jsx */.Y)(tu/* ["default"] */.A,{isMagicAi:true,animation:true,width:"100%",height:"24px"})]})};/* export default */const tC=tk;var tI={wrapper:/*#__PURE__*/(0,m/* .css */.AH)("display:flex;align-items:center;gap:",g/* .spacing["16"] */.YK["16"],";width:100%;")};// CONCATENATED MODULE: ./assets/src/js/v3/entries/course-builder/components/ai-course-modal/ContentGeneration.tsx
function tR(){var e=(0,Q._)(["\n      [data-check-icon] {\n        color: "," !important;\n      }\n    "]);tR=function t(){return e};return e}function tD(){var e=(0,Q._)(["\n      border-color: ",";\n    "]);tD=function t(){return e};return e}function tP(){var e=(0,Q._)(["\n      border-color: ",";\n    "]);tP=function t(){return e};return e}function tM(){var e=(0,Q._)(["\n      cursor: default;\n    "]);tM=function t(){return e};return e}var tF={title:{loading_label:(0,s.__)("Now generating course title...","tutor"),completed_label:(0,s.__)("Course title generated.","tutor"),error_label:(0,s.__)("Error generating course title.","tutor"),completed:false,hasError:false},description:{loading_label:(0,s.__)("Now generating course description...","tutor"),completed_label:(0,s.__)("Course description generated.","tutor"),error_label:(0,s.__)("Error generating course description.","tutor"),completed:false,hasError:false},topic:{loading_label:(0,s.__)("Now generating topic names...","tutor"),completed_label:(0,s.__)("Course topics generated.","tutor"),error_label:(0,s.__)("Error generating topics.","tutor"),completed:false,hasError:false},content:{loading_label:(0,s.__)("Now generating course contents...","tutor"),completed_label:(0,s.__)("Course contents generated.","tutor"),error_label:(0,s.__)("Error generating course contents.","tutor"),completed:false,hasError:false},quiz:{loading_label:(0,s.__)("Now generating quiz questions...","tutor"),completed_label:(0,s.__)("Quiz questions generated.","tutor"),error_label:(0,s.__)("Error generating quiz questions.","tutor"),completed:false,hasError:false}};var tY=(0,eD/* .getCourseId */.p)();var tL=e=>{var{onClose:t}=e;var r,a,o;var[c,l]=(0,i.useState)(tF);var[d,f]=(0,i.useState)(false);var{contents:m,loading:g,pointer:y,abortStatus:E,currentContent:S,currentLoading:T,currentErrors:k,currentAbortStatus:C,setPointer:I,appendContent:R,appendLoading:D,appendErrors:P,errors:M}=e0();var{startGeneration:F,cancelGeneration:Y}=e7();var L=(0,e$/* .useSaveAIGeneratedCourseContentMutation */.rR)();var N=(0,i.useRef)(null);var H=(0,i.useRef)(null);var U=(0,b/* .useFormWithGlobalError */.p)({defaultValues:{prompt:""}});var B=U.watch("prompt");var{showToast:K}=(0,ti/* .useToast */.d)();(0,i.useEffect)(()=>{var e;l(e=>{var t=(0,p._)({},e);var r=(0,_/* .getObjectKeys */.Co)(t);for(var n of r){var i=t[n];var a=!T[n];var o=!!k[n];t[n]=(0,h._)((0,p._)({},i),{completed:a,hasError:o})}return t});(e=H.current)===null||e===void 0?void 0:e.scrollIntoView({behavior:"smooth",block:"center"})},[T,k]);(0,i.useEffect)(()=>{if(d){var e;(e=N.current)===null||e===void 0?void 0:e.scrollIntoView({behavior:"smooth",block:"center"});U.setFocus("prompt")}// eslint-disable-next-line react-hooks/exhaustive-deps
},[d]);var z=(0,_/* .getObjectValues */.Ui)(T).some(e=>e);var q=z||d||!S.title||!((r=S.topics)===null||r===void 0?void 0:r.length)||!((a=S.topics)===null||a===void 0?void 0:a.every(e=>{var t;return(t=e.contents)===null||t===void 0?void 0:t.length}));return/*#__PURE__*/(0,n/* .jsx */.Y)("div",{css:tH.container,children:/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:tH.wrapper,children:[/*#__PURE__*/(0,n/* .jsx */.Y)("div",{css:tH.left,children:/*#__PURE__*/(0,n/* .jsxs */.FD)(O/* ["default"] */.A,{when:Object.values(c).every(e=>!e.hasError)||S.title,fallback:/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:tH.errorWrapper,children:[/*#__PURE__*/(0,n/* .jsx */.Y)("img",{css:tH.errorImage,src:ta,srcSet:"".concat(ta," 1x, ").concat(to," 2x"),alt:(0,s.__)("Ai Studio Error","tutor")}),/*#__PURE__*/(0,n/* .jsx */.Y)("h5",{css:tH.errorMessage,children:(0,s.__)("An error occurred while generating course content. Please try again.","tutor")})]}),children:[/*#__PURE__*/(0,n/* .jsx */.Y)("div",{css:tH.title,children:/*#__PURE__*/(0,n/* .jsxs */.FD)(O/* ["default"] */.A,{when:!T.title,fallback:/*#__PURE__*/(0,n/* .jsx */.Y)(tC,{}),children:[/*#__PURE__*/(0,n/* .jsx */.Y)(x/* ["default"] */.A,{name:"book",width:32,height:32}),/*#__PURE__*/(0,n/* .jsx */.Y)("h5",{title:S.title,children:S.title})]})}),/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:tH.leftContentWrapper,children:[/*#__PURE__*/(0,n/* .jsx */.Y)(O/* ["default"] */.A,{when:!T.title,fallback:/*#__PURE__*/(0,n/* .jsx */.Y)(tS,{}),children:/*#__PURE__*/(0,n/* .jsx */.Y)("div",{css:tH.imageWrapper,children:/*#__PURE__*/(0,n/* .jsx */.Y)("img",{src:S.featured_image,alt:S.title})})}),/*#__PURE__*/(0,n/* .jsx */.Y)(O/* ["default"] */.A,{when:!T.description,fallback:/*#__PURE__*/(0,n/* .jsx */.Y)(tx,{}),children:/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:tH.section,children:[/*#__PURE__*/(0,n/* .jsx */.Y)("h5",{children:(0,s.__)("Course Info","tutor")}),/*#__PURE__*/(0,n/* .jsx */.Y)("div",{css:tH.content,children:/*#__PURE__*/(0,n/* .jsx */.Y)("div",{dangerouslySetInnerHTML:{__html:S.description}})})]})}),/*#__PURE__*/(0,n/* .jsx */.Y)(O/* ["default"] */.A,{when:!T.topic,fallback:/*#__PURE__*/(0,n/* .jsx */.Y)(ty,{}),children:/*#__PURE__*/(0,n/* .jsx */.Y)(O/* ["default"] */.A,{when:(o=S.topics)===null||o===void 0?void 0:o.length,children:/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:tH.section,children:[/*#__PURE__*/(0,n/* .jsx */.Y)("h5",{children:(0,s.__)("Course Content","tutor")}),/*#__PURE__*/(0,n/* .jsx */.Y)("div",{css:tH.content,children:/*#__PURE__*/(0,n/* .jsx */.Y)(tg,{})})]})})})]})]})}),/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:tH.right,children:[/*#__PURE__*/(0,n/* .jsx */.Y)(O/* ["default"] */.A,{when:m.length>1,children:/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:tH.navigator,children:[/*#__PURE__*/(0,n/* .jsx */.Y)(w/* ["default"] */.A,{variant:"text",disabled:y===0||z,onClick:()=>I(e=>Math.max(0,e-1)),children:/*#__PURE__*/(0,n/* .jsx */.Y)(x/* ["default"] */.A,{name:!j/* .isRTL */.V8?"chevronLeft":"chevronRight",width:20,height:20})}),/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:tH.navigatorContent,children:[/*#__PURE__*/(0,n/* .jsx */.Y)("span",{children:y+1}),/*#__PURE__*/(0,n/* .jsx */.Y)("span",{children:"/"}),/*#__PURE__*/(0,n/* .jsx */.Y)("span",{children:m.length})]}),/*#__PURE__*/(0,n/* .jsx */.Y)(w/* ["default"] */.A,{variant:"text",disabled:y>=m.length-1||z,onClick:()=>I(e=>Math.min(m.length-1,e+1)),children:/*#__PURE__*/(0,n/* .jsx */.Y)(x/* ["default"] */.A,{name:!j/* .isRTL */.V8?"chevronRight":"chevronLeft",width:20,height:20})})]})}),/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:tH.rightContents,children:[/*#__PURE__*/(0,n/* .jsx */.Y)(eH/* ["default"] */.A,{each:g,children:(e,t)=>{var r,i,a,o,l,p,h,v;var b=y!==t;var w=y===t&&!d;var S=m[t];var T=(0,_/* .getObjectValues */.Ui)(g[t]).some(e=>e);var k=(0,_/* .getObjectValues */.Ui)(M[t]).every(e=>e);var C=M[t];var Y=E[t];var L=S.counts&&(0,_/* .getObjectValues */.Ui)(S.counts).some(e=>e>0)||false;return/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{ref:t===y&&!d?H:undefined,css:tH.box({deactivated:b,hasError:(0,_/* .getObjectValues */.Ui)(M[t]).some(e=>e)||Y||L,isActive:y===t&&!d}),children:[/*#__PURE__*/(0,n/* .jsx */.Y)(x/* ["default"] */.A,{name:"magicAiColorize",width:24,height:24}),/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:tH.boxContent,children:[/*#__PURE__*/(0,n/* .jsx */.Y)("h6",{children:T&&(0,s.__)("Generating course content","tutor")||Y&&(0,s.__)("Generation aborted","tutor")||k&&(0,s.__)("Error generating course content","tutor")||(0,s.__)("Generated course content","tutor")}),/*#__PURE__*/(0,n/* .jsx */.Y)(O/* ["default"] */.A,{when:m[t].prompt,children:e=>/*#__PURE__*/(0,n/* .jsxs */.FD)("p",{css:tH.subtitle,children:['"',e,'"']})}),/*#__PURE__*/(0,n/* .jsx */.Y)("div",{css:tH.items,children:/*#__PURE__*/(0,n/* .jsx */.Y)(O/* ["default"] */.A,{when:T,fallback:/*#__PURE__*/(0,n/* .jsxs */.FD)(O/* ["default"] */.A,{when:!k,fallback:/*#__PURE__*/(0,n/* .jsx */.Y)(O/* ["default"] */.A,{when:!Y,children:/*#__PURE__*/(0,n/* .jsx */.Y)(eH/* ["default"] */.A,{each:(0,_/* .getObjectKeys */.Co)(C),children:(e,t)=>/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:tH.item,children:[/*#__PURE__*/(0,n/* .jsx */.Y)(x/* ["default"] */.A,{name:"crossCircle",width:24,height:24,"data-check-icon":true,"data-error":true}),c[e].error_label]},t)})}),children:[/*#__PURE__*/(0,n/* .jsx */.Y)("div",{css:tH.item,children:(S===null||S===void 0?void 0:(r=S.counts)===null||r===void 0?void 0:r.topics)?/*#__PURE__*/(0,n/* .jsxs */.FD)(n/* .Fragment */.FK,{children:[/*#__PURE__*/(0,n/* .jsx */.Y)(x/* ["default"] */.A,{name:"checkFilledWhite",width:24,height:24,"data-check-icon":true}),/* translators: %d is the total number of topics */(0,s.sprintf)((0,s.__)("%d Topics in total","tutor"),(i=S.counts)===null||i===void 0?void 0:i.topics)]}):!Y&&/*#__PURE__*/(0,n/* .jsxs */.FD)(n/* .Fragment */.FK,{children:[/*#__PURE__*/(0,n/* .jsx */.Y)(x/* ["default"] */.A,{name:"crossCircle",width:24,height:24,"data-check-icon":true,"data-error":true}),c.topic.error_label]})||""}),/*#__PURE__*/(0,n/* .jsx */.Y)("div",{css:tH.item,children:(S===null||S===void 0?void 0:(a=S.counts)===null||a===void 0?void 0:a.lessons)?/*#__PURE__*/(0,n/* .jsxs */.FD)(n/* .Fragment */.FK,{children:[/*#__PURE__*/(0,n/* .jsx */.Y)(x/* ["default"] */.A,{name:"checkFilledWhite",width:24,height:24,"data-check-icon":true}),/* translators: %d is the number of lessons */(0,s.sprintf)((0,s.__)("%d Lessons","tutor"),(o=S.counts)===null||o===void 0?void 0:o.lessons)]}):!Y&&/*#__PURE__*/(0,n/* .jsxs */.FD)(n/* .Fragment */.FK,{children:[/*#__PURE__*/(0,n/* .jsx */.Y)(x/* ["default"] */.A,{name:"crossCircle",width:24,height:24,"data-check-icon":true,"data-error":true}),(0,s.__)("Error generating lessons.","tutor")]})||""}),/*#__PURE__*/(0,n/* .jsx */.Y)("div",{css:tH.item,children:(S===null||S===void 0?void 0:(l=S.counts)===null||l===void 0?void 0:l.quizzes)?/*#__PURE__*/(0,n/* .jsxs */.FD)(n/* .Fragment */.FK,{children:[/*#__PURE__*/(0,n/* .jsx */.Y)(x/* ["default"] */.A,{name:"checkFilledWhite",width:24,height:24,"data-check-icon":true}),/* translators: %d is the number of quizzes */(0,s.sprintf)((0,s.__)("%d Quizzes","tutor"),(p=S.counts)===null||p===void 0?void 0:p.quizzes)]}):!Y&&/*#__PURE__*/(0,n/* .jsxs */.FD)(n/* .Fragment */.FK,{children:[/*#__PURE__*/(0,n/* .jsx */.Y)(x/* ["default"] */.A,{name:"crossCircle",width:24,height:24,"data-check-icon":true,"data-error":true}),(0,s.__)("Error generating quizzes.","tutor")]})||""}),/*#__PURE__*/(0,n/* .jsx */.Y)(O/* ["default"] */.A,{when:(0,_/* .isAddonEnabled */.GR)(j/* .Addons.TUTOR_ASSIGNMENTS */.oW.TUTOR_ASSIGNMENTS),children:/*#__PURE__*/(0,n/* .jsx */.Y)("div",{css:tH.item,children:(S===null||S===void 0?void 0:(h=S.counts)===null||h===void 0?void 0:h.assignments)?/*#__PURE__*/(0,n/* .jsxs */.FD)(n/* .Fragment */.FK,{children:[/*#__PURE__*/(0,n/* .jsx */.Y)(x/* ["default"] */.A,{name:"checkFilledWhite",width:24,height:24,"data-check-icon":true}),/* translators: %d is the number of assignments */(0,s.sprintf)((0,s.__)("%d Assignments","tutor"),(v=S.counts)===null||v===void 0?void 0:v.assignments)]}):!Y&&/*#__PURE__*/(0,n/* .jsxs */.FD)(n/* .Fragment */.FK,{children:[/*#__PURE__*/(0,n/* .jsx */.Y)(x/* ["default"] */.A,{name:"crossCircle",width:24,height:24,"data-check-icon":true,"data-error":true}),(0,s.__)("Error generating assignments.","tutor")]})||""})})]}),children:/*#__PURE__*/(0,n/* .jsx */.Y)(eH/* ["default"] */.A,{each:(0,_/* .getObjectKeys */.Co)(c),children:(e,t)=>{var r=c[e];return/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:tH.item,children:[/*#__PURE__*/(0,n/* .jsxs */.FD)(O/* ["default"] */.A,{when:b,children:[/*#__PURE__*/(0,n/* .jsx */.Y)(x/* ["default"] */.A,{name:r.hasError?"crossCircle":"checkFilledWhite",width:24,height:24,"data-check-icon":true}),r.completed_label]}),/*#__PURE__*/(0,n/* .jsx */.Y)(O/* ["default"] */.A,{when:!b,children:/*#__PURE__*/(0,n/* .jsxs */.FD)(O/* ["default"] */.A,{when:r.completed,fallback:/*#__PURE__*/(0,n/* .jsxs */.FD)(n/* .Fragment */.FK,{children:[/*#__PURE__*/(0,n/* .jsx */.Y)(u/* .GradientLoadingSpinner */.em,{}),r.loading_label]}),children:[/*#__PURE__*/(0,n/* .jsx */.Y)(x/* ["default"] */.A,{name:r.hasError?"crossCircle":"checkFilledWhite",width:24,height:24,"data-check-icon":true}),r.completed_label]})})]},t)}})})}),/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:tH.boxFooter,children:[/*#__PURE__*/(0,n/* .jsx */.Y)(O/* ["default"] */.A,{when:w,children:/*#__PURE__*/(0,n/* .jsxs */.FD)(A/* ["default"] */.A,{variant:"primary_outline",disabled:z,onClick:()=>{f(true)},children:[/*#__PURE__*/(0,n/* .jsx */.Y)(x/* ["default"] */.A,{name:"magicWand",width:24,height:24}),(0,s.__)("Generate a New Course","tutor")]})}),/*#__PURE__*/(0,n/* .jsxs */.FD)(A/* ["default"] */.A,{variant:"outline",disabled:z,onClick:()=>{I(g.length);D();R();P();F(m[t].prompt,g.length)},children:[/*#__PURE__*/(0,n/* .jsx */.Y)(x/* ["default"] */.A,{name:"tryAgain",width:24,height:24}),(0,s.__)("Regenerate Course","tutor")]})]})]}),/*#__PURE__*/(0,n/* .jsx */.Y)("button",{type:"button",css:tH.overlayButton({hasAnyContent:L}),onClick:()=>{if(L){I(t)}},disabled:z||y===t})]},t)}}),/*#__PURE__*/(0,n/* .jsx */.Y)(O/* ["default"] */.A,{when:!z&&!d&&!((S===null||S===void 0?void 0:S.topics.every(e=>e.contents.length))&&S.topics.length)&&!C,children:/*#__PURE__*/(0,n/* .jsx */.Y)(tn/* ["default"] */.A,{icon:"warning",type:"danger",children:(0,s.__)("Failed to generate course content. Try again.","tutor")})}),/*#__PURE__*/(0,n/* .jsx */.Y)(O/* ["default"] */.A,{when:d,children:/*#__PURE__*/(0,n/* .jsx */.Y)("div",{css:tH.box({deactivated:true,hasError:false,isActive:true}),children:/*#__PURE__*/(0,n/* .jsxs */.FD)("form",{ref:N,css:tH.regenerateForm,onSubmit:U.handleSubmit(e=>{f(false);I(g.length);D();R();P();F(e.prompt,g.length);U.reset()}),children:[/*#__PURE__*/(0,n/* .jsx */.Y)(v/* .Controller */.xI,{control:U.control,name:"prompt",render:e=>/*#__PURE__*/(0,n/* .jsx */.Y)(eG/* ["default"] */.A,(0,h._)((0,p._)({},e),{isMagicAi:true,placeholder:(0,s.__)("Type your desired course topic. e.g. Learning piano, Cooking 101..","tutor"),rows:4}))}),/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:tH.formButtons,children:[/*#__PURE__*/(0,n/* .jsx */.Y)(A/* ["default"] */.A,{variant:"primary_outline",disabled:z,onClick:()=>{f(false);U.reset()},children:(0,s.__)("Cancel","tutor")}),/*#__PURE__*/(0,n/* .jsxs */.FD)(A/* ["default"] */.A,{type:"submit",disabled:z||!B,children:[/*#__PURE__*/(0,n/* .jsx */.Y)(x/* ["default"] */.A,{name:"magicWand",width:24,height:24}),(0,s.__)("Generate Now","tutor")]})]})]})})})]}),/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:tH.rightFooter,children:[/*#__PURE__*/(0,n/* .jsx */.Y)(A/* ["default"] */.A,{variant:"primary_outline",onClick:()=>{if(z){Y()}else{t()}},children:z?(0,s.__)("Stop Generation","tutor"):(0,s.__)("Cancel","tutor")}),/*#__PURE__*/(0,n/* .jsx */.Y)(A/* ["default"] */.A,{variant:"primary",disabled:q,onClick:()=>{L.mutate({course_id:tY,payload:JSON.stringify(S)});t();K({type:"success",message:(0,s.__)("Course content stored into a local file.","tutor")})},children:(0,s.__)("Append the Course","tutor")})]})]})]})})};/* export default */const tN=tL;var tH={container:/*#__PURE__*/(0,m/* .css */.AH)("position:absolute;left:0;top:0;width:100%;height:100%;display:flex;justify-content:center;align-items:end;"),navigator:/*#__PURE__*/(0,m/* .css */.AH)("display:flex;align-items:center;margin-left:-",g/* .spacing["16"] */.YK["16"],";margin-bottom:",g/* .spacing["16"] */.YK["16"],";"),navigatorContent:/*#__PURE__*/(0,m/* .css */.AH)("display:flex;align-items:center;gap:",g/* .spacing["4"] */.YK["4"],";span{",U/* .typography.caption */.I.caption(),";}span:first-of-type{color:",g/* .colorTokens.text.primary */.I6.text.primary,";}"),wrapper:/*#__PURE__*/(0,m/* .css */.AH)("display:flex;gap:",g/* .spacing["28"] */.YK["28"],";height:calc(100vh - ",g/* .spacing["56"] */.YK["56"],");width:1300px;",g/* .Breakpoint.smallTablet */.EA.smallTablet,"{width:90%;gap:",g/* .spacing["16"] */.YK["16"],";flex-wrap:wrap-reverse;",S/* .styleUtils.overflowYAuto */.x.overflowYAuto,";}"),regenerateForm:/*#__PURE__*/(0,m/* .css */.AH)("display:flex;flex-direction:column;gap:",g/* .spacing["16"] */.YK["16"],";width:100%;button{width:auto;}"),formButtons:/*#__PURE__*/(0,m/* .css */.AH)("display:flex;width:100%;justify-content:end;align-items:center;gap:",g/* .spacing["16"] */.YK["16"],";"),leftContentWrapper:/*#__PURE__*/(0,m/* .css */.AH)("display:flex;flex-direction:column;gap:",g/* .spacing["16"] */.YK["16"],";padding-inline:",g/* .spacing["40"] */.YK["40"],";margin-top:",g/* .spacing["8"] */.YK["8"],";"),box:e=>{var{deactivated:t,hasError:r,isActive:n}=e;return/*#__PURE__*/(0,m/* .css */.AH)("width:100%;border-radius:",g/* .borderRadius["8"] */.Vq["8"],";border:1px solid ",r?g/* .colorTokens.stroke.danger */.I6.stroke.danger:g/* .colorTokens.bg.brand */.I6.bg.brand,";padding:",g/* .spacing["16"] */.YK["16"]," ",g/* .spacing["12"] */.YK["12"],";display:flex;gap:",g/* .spacing["12"] */.YK["12"],";transition:border 0.3s ease;position:relative;svg{flex-shrink:0;}",t&&(0,m/* .css */.AH)(tR(),g/* .colorTokens.icon.disable.muted */.I6.icon.disable.muted)," ",!t&&(0,m/* .css */.AH)(tD(),r?g/* .colorTokens.stroke.danger */.I6.stroke.danger:g/* .colorTokens.bg.brand */.I6.bg.brand)," ",n&&(0,m/* .css */.AH)(tP(),g/* .colorTokens.stroke.brand */.I6.stroke.brand),":hover{border-color:",r?g/* .colorTokens.stroke.danger */.I6.stroke.danger:g/* .colorTokens.stroke.brand */.I6.stroke.brand,";background-color:",!n&&g/* .colorTokens.background.hover */.I6.background.hover,";}")},boxFooter:/*#__PURE__*/(0,m/* .css */.AH)("display:flex;align-items:center;gap:",g/* .spacing["16"] */.YK["16"],";justify-content:end;button{width:auto;}"),rightContents:/*#__PURE__*/(0,m/* .css */.AH)("display:flex;flex-direction:column;gap:",g/* .spacing["16"] */.YK["16"],";overflow-y:auto;height:100%;padding-right:",g/* .spacing["20"] */.YK["20"],";",S/* .styleUtils.overflowYAuto */.x.overflowYAuto,";"),rightFooter:/*#__PURE__*/(0,m/* .css */.AH)("margin-top:auto;padding-top:",g/* .spacing["16"] */.YK["16"],";padding-right:",g/* .spacing["20"] */.YK["20"],";display:flex;align-items:center;justify-content:center;gap:",g/* .spacing["12"] */.YK["12"],";"),subtitle:/*#__PURE__*/(0,m/* .css */.AH)(U/* .typography.caption */.I.caption(),";color:",g/* .colorTokens.text.title */.I6.text.title,";"),boxContent:/*#__PURE__*/(0,m/* .css */.AH)("display:flex;flex-direction:column;gap:",g/* .spacing["12"] */.YK["12"],";width:100%;h6{",U/* .typography.body */.I.body("medium"),";color:",g/* .colorTokens.color.black.main */.I6.color.black.main,";}p{",U/* .typography.caption */.I.caption("medium"),";color:",g/* .colorTokens.text.title */.I6.text.title,";}"),items:/*#__PURE__*/(0,m/* .css */.AH)("display:flex;flex-direction:column;gap:",g/* .spacing["4"] */.YK["4"],";position:relative;[data-error='true']{color:",g/* .colorTokens.icon.error */.I6.icon.error,";}"),item:/*#__PURE__*/(0,m/* .css */.AH)("display:flex;align-items:center;gap:",g/* .spacing["8"] */.YK["8"],";",U/* .typography.caption */.I.caption(),";color:",g/* .colorTokens.text.title */.I6.text.title,";",S/* .styleUtils.textEllipsis */.x.textEllipsis,";svg{color:",g/* .colorTokens.stroke.success.fill70 */.I6.stroke.success.fill70,";[data-error='true']{color:",g/* .colorTokens.icon.error */.I6.icon.error,";}}"),section:/*#__PURE__*/(0,m/* .css */.AH)("display:flex;flex-direction:column;gap:",g/* .spacing["16"] */.YK["16"],";& > h5{",U/* .typography.heading6 */.I.heading6("medium"),";color:",g/* .colorTokens.text.primary */.I6.text.primary,";height:42px;border-bottom:1px solid ",g/* .colorTokens.stroke.border */.I6.stroke.border,";}"),content:/*#__PURE__*/(0,m/* .css */.AH)(U/* .typography.caption */.I.caption(),";color:",g/* .colorTokens.text.hints */.I6.text.hints,";display:flex;flex-direction:column;gap:",g/* .spacing["16"] */.YK["16"],";h6{",U/* .typography.caption */.I.caption(),";color:",g/* .colorTokens.text.primary */.I6.text.primary,";}"),left:/*#__PURE__*/(0,m/* .css */.AH)("width:792px;background-color:",g/* .colorTokens.background.white */.I6.background.white,";border-radius:",g/* .borderRadius["12"] */.Vq["12"]," ",g/* .borderRadius["12"] */.Vq["12"]," 0 0;display:flex;flex-direction:column;gap:",g/* .spacing["16"] */.YK["16"],";overflow-y:auto;padding-bottom:",g/* .spacing["32"] */.YK["32"],";",g/* .Breakpoint.smallTablet */.EA.smallTablet,"{width:100%;}"),right:/*#__PURE__*/(0,m/* .css */.AH)("width:480px;height:100%;background-color:",g/* .colorTokens.background.white */.I6.background.white,";border-radius:",g/* .borderRadius["12"] */.Vq["12"]," ",g/* .borderRadius["12"] */.Vq["12"]," 0 0;padding:",g/* .spacing["24"] */.YK["24"]," ",g/* .spacing["0"] */.YK["0"]," ",g/* .spacing["24"] */.YK["24"]," ",g/* .spacing["20"] */.YK["20"],";display:flex;flex-direction:column;justify-content:space-between;",g/* .Breakpoint.smallTablet */.EA.smallTablet,"{width:100%;border-radius:",g/* .borderRadius["12"] */.Vq["12"],";}"),title:/*#__PURE__*/(0,m/* .css */.AH)("display:flex;align-items:center;gap:",g/* .spacing["8"] */.YK["8"],";color:",g/* .colorTokens.icon["default"] */.I6.icon["default"],";z-index:",g/* .zIndex.header */.fE.header,";min-height:40px;padding:",g/* .spacing["40"] */.YK["40"]," ",g/* .spacing["40"] */.YK["40"]," ",g/* .spacing["16"] */.YK["16"]," ",g/* .spacing["40"] */.YK["40"],";background-color:",g/* .colorTokens.background.white */.I6.background.white,";svg{flex-shrink:0;color:",g/* .colorTokens.text.ai.purple */.I6.text.ai.purple,";}& > h5{",U/* .typography.heading5 */.I.heading5("medium"),";",S/* .styleUtils.textEllipsis */.x.textEllipsis,";color:",g/* .colorTokens.text.ai.purple */.I6.text.ai.purple,";}"),imageWrapper:/*#__PURE__*/(0,m/* .css */.AH)("width:100%;height:390px;border-radius:",g/* .borderRadius["10"] */.Vq["10"],";overflow:hidden;position:relative;flex-shrink:0;img{position:absolute;top:0;left:0;width:100%;height:100%;object-fit:cover;}"),errorWrapper:/*#__PURE__*/(0,m/* .css */.AH)(S/* .styleUtils.flexCenter */.x.flexCenter("column"),";height:100%;color:",g/* .colorTokens.icon.error */.I6.icon.error,";text-align:center;gap:",g/* .spacing["16"] */.YK["16"],";"),errorImage:/*#__PURE__*/(0,m/* .css */.AH)("height:300px;width:100%;object-fit:cover;object-position:center;"),errorMessage:/*#__PURE__*/(0,m/* .css */.AH)(U/* .typography.heading5 */.I.heading5("medium"),";color:",g/* .colorTokens.text.error */.I6.text.error,";margin-inline:",g/* .spacing["96"] */.YK["96"],";"),overlayButton:e=>{var{hasAnyContent:t}=e;return/*#__PURE__*/(0,m/* .css */.AH)(S/* .styleUtils.resetButton */.x.resetButton,";position:absolute;top:0;left:0;width:100%;height:100%;",!t&&(0,m/* .css */.AH)(tM()),":disabled{cursor:default;}")}};// CONCATENATED MODULE: ./assets/src/js/v3/entries/course-builder/components/modals/AICourseBuilderModal.tsx
var tj=e=>{var{closeModal:t}=e;var{currentStep:r}=e0();if(r==="prompt"){return/*#__PURE__*/(0,n/* .jsx */.Y)(tt,{onClose:t})}return/*#__PURE__*/(0,n/* .jsx */.Y)(tN,{onClose:t})};var tU=e=>{var{closeModal:t}=e;return/*#__PURE__*/(0,n/* .jsx */.Y)(e2,{children:/*#__PURE__*/(0,n/* .jsx */.Y)(eW/* ["default"] */.A,{children:/*#__PURE__*/(0,n/* .jsx */.Y)("div",{css:tK.wrapper,children:/*#__PURE__*/(0,n/* .jsx */.Y)(tj,{closeModal:t})})})})};/* export default */const tB=tU;var tK={wrapper:/*#__PURE__*/(0,m/* .css */.AH)("width:100vw;height:100vh;position:relative;")};// EXTERNAL MODULE: ./assets/src/js/v3/public/images/pro-placeholders/generate-course.webp
var tz=r(51693);// EXTERNAL MODULE: ./assets/src/js/v3/public/images/pro-placeholders/generate-course-2x.webp
var tq=r(79138);// CONCATENATED MODULE: ./assets/src/js/v3/entries/course-builder/components/layouts/header/Header.tsx
var tV=(0,eD/* .getCourseId */.p)();var tW=()=>{var e,t,r,i,a;var o=(0,v/* .useFormContext */.xW)();var u=(0,y/* .useQueryClient */.jE)();var{currentIndex:c}=(0,ej/* .useCourseNavigator */._)();var{showModal:l}=(0,L/* .useModal */.h)();var d=(e=u.getQueryData(["CourseDetails",tV]))===null||e===void 0?void 0:e.total_enrolled_student;var p=o.formState.dirtyFields&&Object.keys(o.formState.dirtyFields).length>0;var h=!!f/* .tutorConfig.tutor_pro_url */.P.tutor_pro_url;var m=((t=f/* .tutorConfig.settings */.P.settings)===null||t===void 0?void 0:t.chatgpt_enable)==="on";var g=(r=f/* .tutorConfig.settings */.P.settings)===null||r===void 0?void 0:r.chatgpt_key_exist;var b=(i=f/* .tutorConfig.current_user.roles */.P.current_user.roles)===null||i===void 0?void 0:i.includes(j/* .TutorRoles.ADMINISTRATOR */.gt.ADMINISTRATOR);var _=((a=f/* .tutorConfig.settings */.P.settings)===null||a===void 0?void 0:a.hide_admin_bar_for_users)==="off";var T=()=>{if(!h){l({component:N/* ["default"] */.A,props:{image:tz,image2x:tq}})}else if(!g){l({component:H/* ["default"] */.A,props:{image:tz,image2x:tq}})}else{l({component:tB,isMagicAi:true,props:{title:(0,s.__)("Create with AI","tutor"),icon:/*#__PURE__*/(0,n/* .jsx */.Y)(x/* ["default"] */.A,{name:"magicAiColorize",width:24,height:24})}})}};var k=()=>{if(p){l({component:Y/* ["default"] */.A,props:{title:(0,s.__)("Do you want to exit without saving?","tutor"),description:(0,s.__)("You’re about to leave the course creation process without saving your changes.","tutor"),confirmButtonText:(0,s.__)("Yes, exit without saving","tutor"),confirmButtonVariant:"danger",cancelButtonText:(0,s.__)("Continue editing","tutor"),maxWidth:445}}).then(e=>{if(e.action==="CONFIRM"){var t=window.location.href.includes("wp-admin");window.location.href=t?f/* .tutorConfig.backend_course_list_url */.P.backend_course_list_url:f/* .tutorConfig.frontend_course_list_url */.P.frontend_course_list_url}})}else{var e=window.location.href.includes("wp-admin");window.location.href=e?f/* .tutorConfig.backend_course_list_url */.P.backend_course_list_url:f/* .tutorConfig.frontend_course_list_url */.P.frontend_course_list_url}};return/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:t$.wrapper(b||_),children:[/*#__PURE__*/(0,n/* .jsx */.Y)(F,{}),/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:t$.container,children:[/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:t$.titleAndTackerWrapper,children:[/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:t$.titleAndTacker,children:[/*#__PURE__*/(0,n/* .jsx */.Y)("h6",{css:t$.title,children:(0,s.__)("Course Builder","tutor")}),/*#__PURE__*/(0,n/* .jsx */.Y)("span",{css:t$.divider,"data-title-divider":true}),/*#__PURE__*/(0,n/* .jsx */.Y)(eq,{})]}),/*#__PURE__*/(0,n/* .jsxs */.FD)(O/* ["default"] */.A,{when:c===0&&d===0&&(m||!h),children:[/*#__PURE__*/(0,n/* .jsx */.Y)("span",{css:t$.divider}),/*#__PURE__*/(0,n/* .jsx */.Y)("div",{css:S/* .styleUtils.flexCenter */.x.flexCenter(),children:/*#__PURE__*/(0,n/* .jsxs */.FD)(A/* ["default"] */.A,{variant:"plain",css:t$.magicButton,onClick:T,children:[/*#__PURE__*/(0,n/* .jsx */.Y)(x/* ["default"] */.A,{name:"magicAiColorize",width:24,height:24}),/*#__PURE__*/(0,n/* .jsx */.Y)(O/* ["default"] */.A,{when:j/* .CURRENT_VIEWPORT.isAboveTablet */.vN.isAboveTablet,children:(0,s.__)("Generate with AI","tutor")})]})})]})]}),/*#__PURE__*/(0,n/* .jsx */.Y)(O/* ["default"] */.A,{when:j/* .CURRENT_VIEWPORT.isAboveDesktop */.vN.isAboveDesktop,children:/*#__PURE__*/(0,n/* .jsx */.Y)(eN,{})})]}),/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:t$.closeButtonWrapper,children:[/*#__PURE__*/(0,n/* .jsx */.Y)(O/* ["default"] */.A,{when:!j/* .CURRENT_VIEWPORT.isAboveDesktop */.vN.isAboveDesktop,children:/*#__PURE__*/(0,n/* .jsx */.Y)(eN,{})}),/*#__PURE__*/(0,n/* .jsx */.Y)(E/* ["default"] */.A,{delay:200,content:(0,s.__)("Exit","tutor"),placement:"left",children:/*#__PURE__*/(0,n/* .jsx */.Y)(w/* ["default"] */.A,{isIconOnly:true,size:"small",variant:"danger",buttonCss:t$.closeButton,"aria-label":(0,s.__)("Exit","tutor"),onClick:k,icon:/*#__PURE__*/(0,n/* .jsx */.Y)(x/* ["default"] */.A,{name:"cross",width:32,height:32})})})]})]})};/* export default */const tG=tW;var t$={wrapper:e=>/*#__PURE__*/(0,m/* .css */.AH)("height:",g/* .headerHeight */.$A,"px;width:100%;background-color:",g/* .colorTokens.surface.navbar */.I6.surface.navbar,";border-bottom:1px solid ",g/* .colorTokens.stroke.divider */.I6.stroke.divider,";display:grid;grid-template-columns:1fr ",g/* .containerMaxWidth */.iL,"px 1fr;align-items:center;position:sticky;top:",e?j/* .WP_ADMIN_BAR_HEIGHT */.I4:"0px",";z-index:",g/* .zIndex.header */.fE.header,";",g/* .Breakpoint.tablet */.EA.tablet,"{grid-template-columns:auto 1fr auto;}",g/* .Breakpoint.smallMobile */.EA.smallMobile,"{height:auto;padding-block:",g/* .spacing["8"] */.YK["8"],";grid-template-areas:'logo closeButton'\n        'container container';row-gap:",g/* .spacing["8"] */.YK["8"],";}"),container:/*#__PURE__*/(0,m/* .css */.AH)("max-width:",g/* .containerMaxWidth */.iL,"px;width:100%;height:",g/* .headerHeight */.$A,"px;",S/* .styleUtils.display.flex */.x.display.flex(),";justify-content:space-between;align-items:center;",g/* .Breakpoint.tablet */.EA.tablet,"{[data-title-divider]{margin-left:",g/* .spacing["12"] */.YK["12"],";}}",g/* .Breakpoint.smallMobile */.EA.smallMobile,"{height:auto;grid-area:container;order:2;justify-content:center;[data-title-divider]{display:none;}}"),titleAndTackerWrapper:/*#__PURE__*/(0,m/* .css */.AH)(S/* .styleUtils.display.flex */.x.display.flex(),";align-items:center;"),titleAndTacker:/*#__PURE__*/(0,m/* .css */.AH)(S/* .styleUtils.display.flex */.x.display.flex(),";gap:",g/* .spacing["12"] */.YK["12"],";align-items:center;margin-right:",g/* .spacing["16"] */.YK["16"],";"),divider:/*#__PURE__*/(0,m/* .css */.AH)("width:2px;height:16px;background-color:",g/* .colorTokens.stroke.divider */.I6.stroke.divider,";border-radius:",g/* .borderRadius["20"] */.Vq["20"],";"),title:/*#__PURE__*/(0,m/* .css */.AH)(U/* .typography.body */.I.body("medium"),";color:",g/* .colorTokens.text.subdued */.I6.text.subdued,";",g/* .Breakpoint.tablet */.EA.tablet,"{display:none;[data-title-divider]{display:none;}}"),closeButtonWrapper:/*#__PURE__*/(0,m/* .css */.AH)("display:flex;align-items:center;justify-content:flex-end;margin-right:",g/* .spacing["16"] */.YK["16"],";",g/* .Breakpoint.smallMobile */.EA.smallMobile,"{grid-area:closeButton;order:1;margin-right:",g/* .spacing["8"] */.YK["8"],";}"),closeButton:/*#__PURE__*/(0,m/* .css */.AH)("background-color:transparent;svg{color:",g/* .colorTokens.icon["default"] */.I6.icon["default"],";}&:hover,&:focus{background-color:",g/* .colorTokens.background.status.errorFail */.I6.background.status.errorFail,";svg{color:",g/* .colorTokens.icon.error */.I6.icon.error,";}}"),previewButton:/*#__PURE__*/(0,m/* .css */.AH)("color:",g/* .colorTokens.text.title */.I6.text.title,";svg{color:",g/* .colorTokens.icon["default"] */.I6.icon["default"],";}"),magicButton:/*#__PURE__*/(0,m/* .css */.AH)("display:inline-flex;align-items:center;gap:",g/* .spacing["4"] */.YK["4"],";padding-inline:",g/* .spacing["4"] */.YK["4"],";margin-left:",g/* .spacing["4"] */.YK["4"],";")};// CONCATENATED MODULE: ./assets/src/js/v3/shared/hooks/useResize.ts
var tQ=e=>{var{resizeDivRef:t,options:r}=e;var[n,a]=(0,i.useState)(false);var[o,s]=(0,i.useState)(null);var[u,c]=(0,i.useState)({x:0,y:0});var[l,d]=(0,i.useState)({width:0,height:0});var f=(e,n)=>{var i;e.preventDefault();e.stopPropagation();a(true);if(!(0,ek/* .isDefined */.O9)(t===null||t===void 0?void 0:t.current)){return}var o=(i=t.current)===null||i===void 0?void 0:i.getBoundingClientRect();var u={width:(r===null||r===void 0?void 0:r.maxWidth)||window.innerWidth,height:(r===null||r===void 0?void 0:r.maxHeight)||window.innerHeight};var l={width:(r===null||r===void 0?void 0:r.minWidth)||0,height:(r===null||r===void 0?void 0:r.minHeight)||0};var f=(e,t)=>{var r=Math.min(Math.max(e,l.width),u.width);var n=Math.min(Math.max(t,l.height),u.height);return{width:r,height:n}};var p,h;var v={x:(p=o.x)!==null&&p!==void 0?p:0,y:(h=o.y)!==null&&h!==void 0?h:0};var m,g;var b={width:(m=o.width)!==null&&m!==void 0?m:0,height:(g=o.height)!==null&&g!==void 0?g:0};var y={x:e.pageX,y:e.pageY};var w=(0,_/* .throttle */.nF)(e=>{var t=e.pageX-y.x;var r=e.pageY-y.y;s(n);switch(n){case"top":if(l.height>b.height-r){c(e=>({x:e.x,y:o.bottom-l.height}));d(f(b.width,l.height));return}if(e.pageY<o.top-u.height){c(e=>({x:e.x,y:o.bottom-u.height}))}c({x:v.x,y:v.y+r});d(f(b.width,b.height-r));return;case"bottom":if(l.height>b.height+r){d(f(b.width,l.height))}d(f(b.width,b.height+r));return;case"left":if(e.pageX>o.right-l.width){c(e=>({x:o.right-l.width,y:e.y}));d(f(l.width,b.height));return}if(l.width>b.width-t){return}c({x:v.x+t,y:v.y});d(f(b.width-t,b.height));return;case"right":d(f(b.width+t,b.height));return;case"top-left":if(e.pageX>o.right-l.width){c(e=>({x:o.right-l.width,y:e.y}));d(e=>f(l.width,e.height))}else{c({x:v.x+t,y:v.y+r});d(f(b.width-t,b.height-r))}if(l.height>b.height-r){c(e=>({x:e.x,y:o.bottom-l.height}));d(e=>f(e.width,l.height))}else{c({x:Math.min(v.x+t,o.right-l.width),y:v.y+r});d(f(b.width-t,b.height-r))}return;case"top-right":if(l.height>b.height-r){c(e=>({x:e.x,y:o.bottom-l.height}));d(f(b.width+t,l.height))}else{c({x:v.x,y:v.y+r});d(f(b.width+t,b.height-r))}if(e.pageY<o.top-u.height){c(e=>({x:e.x,y:o.bottom-u.height}))}return;case"bottom-left":if(l.height>b.height+r){d(f(b.width,l.height))}if(e.pageX>o.right-l.width){c(e=>({x:o.right-l.width,y:e.y}));d(f(l.width,b.height+r));return}if(l.width>b.width-t){return}c({x:v.x+t,y:v.y});d(f(b.width-t,b.height+r));return;case"bottom-right":d(f(b.width+t,b.height+r));return}},10);var A=()=>{a(false);document.body.removeEventListener("mousemove",w);document.body.removeEventListener("mouseup",A);s(null)};document.body.addEventListener("mousemove",w);document.body.addEventListener("mouseup",A)};(0,i.useEffect)(()=>{if((0,ek/* .isDefined */.O9)(t===null||t===void 0?void 0:t.current)&&n){t.current.style.left="".concat(u.x,"px");t.current.style.top="".concat(u.y,"px")}// eslint-disable-next-line react-hooks/exhaustive-deps
},[u]);(0,i.useEffect)(()=>{if((0,ek/* .isDefined */.O9)(t===null||t===void 0?void 0:t.current)&&n){t.current.style.width="".concat(l.width,"px");t.current.style.height="".concat(l.height,"px")}// eslint-disable-next-line react-hooks/exhaustive-deps
},[l]);(0,i.useEffect)(()=>{if((0,ek/* .isDefined */.O9)(t===null||t===void 0?void 0:t.current)){d({width:t.current.offsetWidth,height:t.current.offsetHeight});c({x:t.current.offsetLeft,y:t.current.offsetTop})}},[t]);return{isResizing:n,resizeType:o,handleResize:f,size:l,position:u}};// CONCATENATED MODULE: ./assets/src/js/v3/shared/utils/localStorage.ts
var tX=(e,t)=>{localStorage.setItem(e,t)};var tJ=e=>{localStorage.removeItem(e)};var tZ=e=>{if(typeof window!=="undefined"){return localStorage.getItem(e)||null}return null};// CONCATENATED MODULE: ./assets/src/js/v3/entries/course-builder/components/layouts/Notebook.tsx
function t0(){var e=(0,Q._)(["\n      border-top-left-radius: ",";\n      background-color: ",";\n      box-shadow: ",";\n    "]);t0=function t(){return e};return e}function t1(){var e=(0,Q._)(["\n      bottom: auto;\n      border-radius: ",";\n    "]);t1=function t(){return e};return e}function t2(){var e=(0,Q._)(["\n      cursor: grab;\n      color: ",";\n    "]);t2=function t(){return e};return e}function t6(){var e=(0,Q._)(["\n      border-bottom: 1px solid ",";\n      padding: "," ",";\n      color: ",";\n    "]);t6=function t(){return e};return e}function t4(){var e=(0,Q._)(["\n      transform: rotate(180deg);\n    "]);t4=function t(){return e};return e}function t5(){var e=(0,Q._)(["\n      display: none;\n    "]);t5=function t(){return e};return e}var t3=()=>{var[e,t]=(0,i.useState)(true);var[r,a]=(0,i.useState)(false);var[o,u]=(0,i.useState)(false);var[c,l]=(0,i.useState)({x:0,y:0});var[d,f]=(0,i.useState)("");var v=(0,i.useRef)(null);var m=(0,i.useRef)(null);var g=(0,ts/* .useSpring */.zh)({width:!e?j/* .notebook.MIN_NOTEBOOK_WIDTH */.Gy.MIN_NOTEBOOK_WIDTH:0,height:!e?j/* .notebook.MIN_NOTEBOOK_HEIGHT */.Gy.MIN_NOTEBOOK_HEIGHT:0,config:{duration:300,easing:e=>e*(2-e)}});var{handleResize:b}=tQ({resizeDivRef:v,options:{minHeight:j/* .notebook.MIN_NOTEBOOK_HEIGHT */.Gy.MIN_NOTEBOOK_HEIGHT,minWidth:j/* .notebook.MIN_NOTEBOOK_WIDTH */.Gy.MIN_NOTEBOOK_WIDTH}});var y=e=>{e.currentTarget.contentEditable="false";var t;var r=(0,_/* .jsonParse */.Gl)((t=tZ(j/* .LocalStorageKeys.notebook */.Hh.notebook))!==null&&t!==void 0?t:"{}");tX(j/* .LocalStorageKeys.notebook */.Hh.notebook,JSON.stringify((0,h._)((0,p._)({},r),{content:e.currentTarget.innerHTML})))};var A=e=>{var t;e.preventDefault();var r=document.createElement("div");var n;r.innerHTML=(n=(t=e.clipboardData)===null||t===void 0?void 0:t.getData("text/plain"))!==null&&n!==void 0?n:"";var i;var a=(i=r.innerText)!==null&&i!==void 0?i:"";var o=window.getSelection();var s=o===null||o===void 0?void 0:o.getRangeAt(0);s===null||s===void 0?void 0:s.deleteContents();var u=document.createTextNode(a);s===null||s===void 0?void 0:s.insertNode(u);if(u&&o){var c=document.createRange();c.setStartAfter(u);c.collapse(true);o.removeAllRanges();o.addRange(c)}};var E=t=>{t.preventDefault();t.stopPropagation();if(e||!o){return}if((0,ek/* .isDefined */.O9)(m.current)){m.current.blur()}a(true);var{clientX:r,clientY:n}=t;var i=v.current;if(i){var s=i.getBoundingClientRect();l({x:r-s.left,y:n-s.top})}};var T=()=>{if((0,ek/* .isDefined */.O9)(v.current)){var e=v.current;var{left:t,top:r,height:n,width:i}=e.style;var a=(0,_/* .jsonParse */.Gl)(tZ(j/* .LocalStorageKeys.notebook */.Hh.notebook)||"{}");tX(j/* .LocalStorageKeys.notebook */.Hh.notebook,JSON.stringify((0,h._)((0,p._)({},a),{position:{left:t,top:r,height:n,width:i}})))}};(0,i.useEffect)(()=>{var e=(0,_/* .throttle */.nF)(e=>{if(!r||!(0,ek/* .isDefined */.O9)(v.current)){return}u(true);var t=v.current;var{offsetWidth:n,offsetHeight:i}=t;var{innerWidth:a,innerHeight:o}=window;var s=Math.min(Math.max(e.clientX-c.x,0),a-n);var l=Math.min(Math.max(e.clientY-c.y,0),o-i);t.style.left="".concat(s,"px");t.style.top="".concat(l,"px")},10);var t=()=>{a(false);if(!(0,ek/* .isDefined */.O9)(v.current)){return}var e=v.current;var{left:t,top:r,height:n,width:i}=e.style;var o=(0,_/* .jsonParse */.Gl)(tZ(j/* .LocalStorageKeys.notebook */.Hh.notebook)||"{}");if(t==="auto"||r==="auto"){return}tX(j/* .LocalStorageKeys.notebook */.Hh.notebook,JSON.stringify((0,h._)((0,p._)({},o),{position:{left:t,top:r,height:n,width:i}})))};document.addEventListener("mousemove",e);document.addEventListener("mouseup",t);return()=>{document.removeEventListener("mousemove",e);document.removeEventListener("mouseup",t)}},[r,c]);(0,i.useEffect)(()=>{if(!(0,ek/* .isDefined */.O9)(v.current)){return}var t=v.current;if(!o){t.style.left="auto";t.style.top="auto";t.style.height=j/* .CURRENT_VIEWPORT.isAboveDesktop */.vN.isAboveDesktop?"".concat(j/* .notebook.MIN_NOTEBOOK_HEIGHT */.Gy.MIN_NOTEBOOK_HEIGHT,"px"):"".concat(j/* .notebook.NOTEBOOK_HEADER */.Gy.NOTEBOOK_HEADER,"px");return}if(!e&&o){var r;var n=(0,_/* .jsonParse */.Gl)((r=tZ(j/* .LocalStorageKeys.notebook */.Hh.notebook))!==null&&r!==void 0?r:"{}");var{left:i="auto",top:a="auto",height:s,width:u}=n.position||{};var c=(e,t,r)=>{if(e==="auto"){var n=t/2-r;return"".concat(Math.max(n,0),"px")}return e};var l=(e,t,r,n)=>{if((0,ek/* .isDefined */.O9)(e)){var i=Number(e.split("px")[0]);var a=Number(c(n,t,r).split("px")[0]);return t<i+a?"".concat(t-20,"px"):e}return"".concat(Math.min(t-10,2*r),"px")};t.style.left=c(i,window.innerWidth,j/* .notebook.MIN_NOTEBOOK_WIDTH */.Gy.MIN_NOTEBOOK_WIDTH);t.style.top=c(a,window.innerHeight,j/* .notebook.MIN_NOTEBOOK_HEIGHT */.Gy.MIN_NOTEBOOK_HEIGHT);t.style.width=l(u,window.innerWidth,j/* .notebook.MIN_NOTEBOOK_WIDTH */.Gy.MIN_NOTEBOOK_WIDTH,i);t.style.height=l(s,window.innerHeight,j/* .notebook.MIN_NOTEBOOK_HEIGHT */.Gy.MIN_NOTEBOOK_HEIGHT,a);return}},[e,o]);(0,i.useEffect)(()=>{var e=(0,_/* .jsonParse */.Gl)(tZ(j/* .LocalStorageKeys.notebook */.Hh.notebook)||"{}");if(e.content){f(e.content)}},[]);return/*#__PURE__*/(0,n/* .jsxs */.FD)(ts/* .animated.div */.CS.div,{ref:v,css:t8.wrapper({isCollapsed:e,isFloating:o}),style:!o?(0,p._)({},g):{},children:[/*#__PURE__*/(0,n/* .jsx */.Y)(O/* ["default"] */.A,{when:!e,fallback:/*#__PURE__*/(0,n/* .jsx */.Y)("button",{type:"button",css:t8.collapsedTrigger,onClick:()=>t(false),"aria-label":(0,s.__)("Open Notebook","tutor"),children:/*#__PURE__*/(0,n/* .jsx */.Y)(x/* ["default"] */.A,{name:"notes",height:20,width:20})}),children:/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:t8.header({isCollapsed:e,isFloating:o}),onMouseDown:E,children:[/*#__PURE__*/(0,n/* .jsx */.Y)("span",{css:S/* .styleUtils.text.ellipsis */.x.text.ellipsis(1),children:(0,s.__)("Notebook","tutor")}),/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:t8.actions,children:[/*#__PURE__*/(0,n/* .jsx */.Y)(O/* ["default"] */.A,{when:!o,children:/*#__PURE__*/(0,n/* .jsx */.Y)(w/* ["default"] */.A,{variant:"text",size:"small",onClick:()=>{t(e=>!e);u(false)},buttonCss:t8.collapseButton({isCollapsed:e}),children:/*#__PURE__*/(0,n/* .jsx */.Y)(x/* ["default"] */.A,{name:"plusMinus",height:24,width:24})})}),/*#__PURE__*/(0,n/* .jsx */.Y)(w/* ["default"] */.A,{variant:"text",size:"small",onClick:()=>u(e=>!e),children:/*#__PURE__*/(0,n/* .jsx */.Y)(x/* ["default"] */.A,{name:o?"arrowsIn":"arrowsOut",height:24,width:24})}),/*#__PURE__*/(0,n/* .jsx */.Y)(O/* ["default"] */.A,{when:o,children:/*#__PURE__*/(0,n/* .jsx */.Y)(w/* ["default"] */.A,{variant:"text",size:"small",onClick:()=>{u(false);t(true)},children:/*#__PURE__*/(0,n/* .jsx */.Y)(x/* ["default"] */.A,{name:"cross",height:24,width:24})})})]})]})}),/*#__PURE__*/(0,n/* .jsx */.Y)("div",{css:t8.notebookWrapper,children:/*#__PURE__*/(0,n/* .jsx */.Y)("div",{ref:m,css:t8.notebook({isCollapsed:e}),onBlur:e=>y(e),onPaste:e=>A(e),onClick:e=>{e.stopPropagation();e.currentTarget.contentEditable="true";e.currentTarget.focus()},onKeyDown:e=>{e.stopPropagation();if(e.key==="Escape"){e.preventDefault();e.currentTarget.blur()}},dangerouslySetInnerHTML:{__html:d}})}),/*#__PURE__*/(0,n/* .jsx */.Y)(O/* ["default"] */.A,{when:o&&!e,children:/*#__PURE__*/(0,n/* .jsx */.Y)("button",{type:"button",css:t8.textFieldExpand,onMouseDown:e=>b(e,"bottom-right"),onMouseUp:T,children:/*#__PURE__*/(0,n/* .jsx */.Y)(x/* ["default"] */.A,{name:"textFieldExpand",height:16,width:16})})})]})};/* export default */const t9=t3;var t8={wrapper:e=>{var{isCollapsed:t,isFloating:r}=e;return/*#__PURE__*/(0,m/* .css */.AH)("position:fixed;background-color:",g/* .colorTokens.background.active */.I6.background.active,";bottom:0;right:0;height:",j/* .notebook.MIN_NOTEBOOK_HEIGHT */.Gy.MIN_NOTEBOOK_HEIGHT,"px;border-radius:",g/* .borderRadius.card */.Vq.card," 0 0 0;transition:box-shadow background-color 0.3s ease-in-out;box-shadow:",g/* .shadow.notebook */.r7.notebook,";z-index:",g/* .zIndex.notebook */.fE.notebook,";overflow:hidden;&:focus-within{outline:2px solid ",g/* .colorTokens.stroke.brand */.I6.stroke.brand,";outline-offset:1px;}",!t&&(0,m/* .css */.AH)(t0(),g/* .borderRadius.card */.Vq.card,g/* .colorTokens.background.white */.I6.background.white,g/* .shadow.dropList */.r7.dropList)," ",r&&(0,m/* .css */.AH)(t1(),g/* .borderRadius.card */.Vq.card))},collapsedTrigger:/*#__PURE__*/(0,m/* .css */.AH)(S/* .styleUtils.resetButton */.x.resetButton,";position:fixed;bottom:",g/* .spacing["16"] */.YK["16"],";right:",g/* .spacing["16"] */.YK["16"],";width:32px;height:32px;border-radius:",g/* .borderRadius["6"] */.Vq["6"],";background-color:",g/* .colorTokens.background.active */.I6.background.active,";box-shadow:",g/* .shadow.notebook */.r7.notebook,";display:flex;align-items:center;justify-content:center;color:",g/* .colorTokens.icon["default"] */.I6.icon["default"],";z-index:",g/* .zIndex.notebook */.fE.notebook,";transition:background-color 0.2s ease-in-out;&:hover{background-color:",g/* .colorTokens.background.hover */.I6.background.hover,";}&:focus-visible{outline:2px solid ",g/* .colorTokens.stroke.brand */.I6.stroke.brand,";outline-offset:2px;}"),header:e=>{var{isCollapsed:t,isFloating:r}=e;return/*#__PURE__*/(0,m/* .css */.AH)("display:flex;justify-content:space-between;align-items:center;padding:",g/* .spacing["12"] */.YK["12"]," ",g/* .spacing["16"] */.YK["16"],";",U/* .typography.body */.I.body("medium"),";color:transparent;",r&&(0,m/* .css */.AH)(t2(),g/* .colorTokens.text.title */.I6.text.title)," ",!t&&(0,m/* .css */.AH)(t6(),g/* .colorTokens.stroke.divider */.I6.stroke.divider,g/* .spacing["8"] */.YK["8"],g/* .spacing["12"] */.YK["12"],g/* .colorTokens.text.title */.I6.text.title))},actions:/*#__PURE__*/(0,m/* .css */.AH)("display:flex;"),collapseButton:e=>{var{isCollapsed:t}=e;return/*#__PURE__*/(0,m/* .css */.AH)("transition:all 0.3s ease-in-out;",!t&&(0,m/* .css */.AH)(t4()))},notebookWrapper:/*#__PURE__*/(0,m/* .css */.AH)("padding-block:",g/* .spacing["16"] */.YK["16"],";width:100%;height:calc(100% - ",j/* .notebook.NOTEBOOK_HEADER */.Gy.NOTEBOOK_HEADER,'px);background:url(\'data:image/svg+xml,<svg width="9" height="9" viewBox="0 0 9 9" fill="none" xmlns="http://www.w3.org/2000/svg"><rect width="1" height="1" fill="%23D9D9D9"/></svg>\')\n      repeat;transition:all 0.3s ease-in-out;'),notebook:e=>{var{isCollapsed:t}=e;return/*#__PURE__*/(0,m/* .css */.AH)(S/* .styleUtils.overflowYAuto */.x.overflowYAuto,";padding-inline:",g/* .spacing["16"] */.YK["16"],";outline:none;word-wrap:break-word;height:100%;white-space:pre-wrap;",t&&(0,m/* .css */.AH)(t5()))},textFieldExpand:/*#__PURE__*/(0,m/* .css */.AH)(S/* .styleUtils.resetButton */.x.resetButton,";position:absolute;bottom:",g/* .spacing["4"] */.YK["4"],";right:",g/* .spacing["4"] */.YK["4"],";user-select:none;color:",g/* .colorTokens.icon.hints */.I6.icon.hints,";cursor:nwse-resize;")};// CONCATENATED MODULE: ./assets/src/js/v3/entries/course-builder/components/layouts/Layout.tsx
var t7=()=>{var{fields:e}=(0,eI/* .useCourseBuilderSlot */._)();var t=(0,eD/* .getCourseId */.p)();var r=(0,b/* .useFormWithGlobalError */.p)({defaultValues:eR/* .courseDefaultData */.dQ,shouldFocusError:true,mode:"onChange"});var a=(0,eR/* .useCourseDetailsQuery */.p1)(Number(t));(0,i.useEffect)(()=>{if(a.data){var t=Object.keys(r.formState.dirtyFields);var n=(0,eR/* .convertCourseDataToFormData */.KV)(a.data,(0,_/* .findSlotFields */.DE)({fields:e.Basic},{fields:e.Additional}));var i=r.getValues();var o=Object.entries(n).reduce((e,r)=>{var[n,a]=r;var o=n;e[o]=t.includes(n)?i[o]:a;return e},{});r.reset(o,{keepDirtyValues:true,keepDirty:true})}// eslint-disable-next-line react-hooks/exhaustive-deps
},[a.data,r.reset]);return/*#__PURE__*/(0,n/* .jsx */.Y)(v/* .FormProvider */.Op,(0,h._)((0,p._)({},r),{children:/*#__PURE__*/(0,n/* .jsx */.Y)(ej/* .CourseNavigatorProvider */.A,{children:/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:rt.wrapper,children:[/*#__PURE__*/(0,n/* .jsx */.Y)(tG,{}),/*#__PURE__*/(0,n/* .jsx */.Y)("div",{css:rt.contentWrapper,children:/*#__PURE__*/(0,n/* .jsx */.Y)(o/* .Outlet */.sv,{})}),/*#__PURE__*/(0,n/* .jsx */.Y)(t9,{})]})})}))};/* export default */const re=t7;var rt={wrapper:/*#__PURE__*/(0,m/* .css */.AH)("background-color:",g/* .colorTokens.surface.courseBuilder */.I6.surface.courseBuilder,";"),contentWrapper:/*#__PURE__*/(0,m/* .css */.AH)("display:flex;max-width:",g/* .containerMaxWidth */.iL,"px;width:100%;min-height:calc(100vh - ",g/* .headerHeight */.$A,"px);margin:0 auto;",g/* .Breakpoint.smallTablet */.EA.smallTablet,"{padding-inline:",g/* .spacing["12"] */.YK["12"],";padding-bottom:",g/* .spacing["56"] */.YK["56"],";}")};// CONCATENATED MODULE: ./assets/src/js/v3/entries/course-builder/config/routes.tsx
var rr,rn,ri,ra;if(false){}else{rr=/*#__PURE__*/a().lazy(()=>{(0,s.setLocaleData)(f/* .tutorConfig.course_builder_basic_locales */.P.course_builder_basic_locales,"tutor");return r.e(/* import() | tutor-course-builder-basic */"639").then(r.bind(r,57770))});rn=/*#__PURE__*/a().lazy(()=>{(0,s.setLocaleData)(f/* .tutorConfig.course_builder_curriculum_locales */.P.course_builder_curriculum_locales,"tutor");return r.e(/* import() | tutor-course-builder-curriculum */"410").then(r.bind(r,14169))});ri=/*#__PURE__*/a().lazy(()=>{(0,s.setLocaleData)(f/* .tutorConfig.course_builder_additional_locales */.P.course_builder_additional_locales,"tutor");return r.e(/* import() | tutor-course-builder-additional */"132").then(r.bind(r,79779))});ra=/*#__PURE__*/a().lazy(()=>r.e(/* import() | tutor-course-builder-icon */"456").then(r.bind(r,33827)))}var ro=[{path:eC/* .CourseBuilderRouteConfigs.Home.template */.P.Home.template,element:/*#__PURE__*/(0,n/* .jsx */.Y)(re,{}),children:[{index:true,element:/*#__PURE__*/(0,n/* .jsx */.Y)(o/* .Navigate */.C5,{to:eC/* .CourseBuilderRouteConfigs.CourseBasics.template */.P.CourseBasics.template,replace:true})},{path:eC/* .CourseBuilderRouteConfigs.CourseBasics.template */.P.CourseBasics.template,element:/*#__PURE__*/(0,n/* .jsx */.Y)(d,{component:/*#__PURE__*/(0,n/* .jsx */.Y)(rr,{})})},{path:eC/* .CourseBuilderRouteConfigs.CourseCurriculum.template */.P.CourseCurriculum.template,element:/*#__PURE__*/(0,n/* .jsx */.Y)(d,{component:/*#__PURE__*/(0,n/* .jsx */.Y)(rn,{})})},{path:eC/* .CourseBuilderRouteConfigs.CourseAdditional.template */.P.CourseAdditional.template,element:/*#__PURE__*/(0,n/* .jsx */.Y)(d,{component:/*#__PURE__*/(0,n/* .jsx */.Y)(ri,{})})},...false?0:[]]},{path:"*",element:/*#__PURE__*/(0,n/* .jsx */.Y)(o/* .Navigate */.C5,{to:eC/* .CourseBuilderRouteConfigs.Home.template */.P.Home.template,replace:true})}];/* export default */const rs=ro},79100:function(e,t,r){"use strict";r.d(t,{E:()=>f,_:()=>p});/* import */var n=r(52639);/* import */var i=r(41594);/* import */var a=/*#__PURE__*/r.n(i);/* import */var o=r(78595);var s={fields:{Basic:{after_description:[],after_settings:[]},Curriculum:{Lesson:{after_description:[],bottom_of_sidebar:[]},Quiz:{after_question_description:[],bottom_of_question_sidebar:[],bottom_of_settings:[]},Assignment:{after_description:[],bottom_of_sidebar:[]}},Additional:{after_certificates:[],bottom_of_sidebar:[]}},contents:{Basic:{after_description:[],after_settings:[]},Curriculum:{Lesson:{after_description:[],bottom_of_sidebar:[]},Quiz:{after_question_description:[],bottom_of_question_sidebar:[],bottom_of_settings:[]},Assignment:{after_description:[],bottom_of_sidebar:[]}},Additional:{after_certificates:[],bottom_of_sidebar:[]}}};var u=(e,t,r)=>{return(0,o/* .produce */.jM)(e,e=>{var n=t.split(".");var[i,a,o]=n.length>2?n:[n[0],undefined,n[n.length-1]];var s=a?e[i][a]:e[i];// @ts-ignore
if(o&&s[o]){// @ts-ignore
s[o]=[...s[o],...r].sort((e,t)=>{var r,n;return((r=e.priority)!==null&&r!==void 0?r:10)-((n=t.priority)!==null&&n!==void 0?n:10)})}})};var c=(e,t,r)=>{var n=Array.isArray(r)?r:[r];return u(e,t,n)};var l=(e,t,r)=>{return u(e,t,[r])};var d=/*#__PURE__*/(0,i.createContext)({fields:s.fields,contents:s.contents,registerField:()=>{},registerContent:()=>{}});var f=e=>{var{children:t}=e;var[r,a]=(0,i.useState)(s.fields);var[o,u]=(0,i.useState)(s.contents);var f=(0,i.useCallback)((e,t)=>{a(r=>c(r,e,t))},[]);var p=(0,i.useCallback)((e,t)=>{u(r=>l(r,e,t))},[]);(0,i.useEffect)(()=>{var e=e=>({registerField:(t,r)=>f("Curriculum.".concat(e,".").concat(t),r),registerContent:(t,r)=>p("Curriculum.".concat(e,".").concat(t),r)});window.Tutor={CourseBuilder:{Basic:{registerField:(e,t)=>f("Basic.".concat(e),t),registerContent:(e,t)=>p("Basic.".concat(e),t)},Curriculum:{Lesson:e("Lesson"),Quiz:e("Quiz"),Assignment:e("Assignment")},Additional:{registerField:(e,t)=>f("Additional.".concat(e),t),registerContent:(e,t)=>p("Additional.".concat(e),t)}}}},[f,p]);var h=(0,i.useMemo)(()=>({fields:r,contents:o,registerField:f,registerContent:p}),[r,o,f,p]);return/*#__PURE__*/(0,n/* .jsx */.Y)(d.Provider,{value:h,children:t})};var p=()=>{var e=(0,i.useContext)(d);if(!e){throw new Error("useCourseBuilderSlot must be used within CourseBuilderSlotProvider")}return e}},43414:function(e,t,r){"use strict";r.d(t,{A:()=>y,_:()=>_});/* import */var n=r(41147);/* import */var i=r(14206);/* import */var a=r(52639);/* import */var o=r(41594);/* import */var s=/*#__PURE__*/r.n(o);/* import */var u=r(12470);/* import */var c=/*#__PURE__*/r.n(u);/* import */var l=r(73755);/* import */var d=r(49842);/* import */var f=r(33231);/* import */var p=r(76168);/* import */var h=r(36068);/* import */var v=r(23334);/* import */var m=r(60297);var g=[{indicator:1,id:"basic",label:(0,u.__)("Basics","tutor"),path:p/* .CourseBuilderRouteConfigs.CourseBasics.buildLink */.P.CourseBasics.buildLink(),isDisabled:false,isActive:true},{indicator:2,id:"curriculum",label:(0,u.__)("Curriculum","tutor"),path:p/* .CourseBuilderRouteConfigs.CourseCurriculum.buildLink */.P.CourseCurriculum.buildLink(),isDisabled:true,isActive:false},{indicator:3,id:"additional",label:(0,u.__)("Additional","tutor"),path:p/* .CourseBuilderRouteConfigs.CourseAdditional.buildLink */.P.CourseAdditional.buildLink(),isDisabled:true,isActive:false}];var b=/*#__PURE__*/s().createContext({steps:g,setSteps:f/* .noop */.lQ,updateStepByIndex:f/* .noop */.lQ,currentIndex:0,courseContent:null});var _=()=>(0,o.useContext)(b);var y=e=>{var{children:t}=e;var[r,s]=(0,o.useState)(g);var u=(0,l/* .useCurrentPath */.G)(h/* ["default"] */.A);var c=(0,m/* .getCourseId */.p)();var f=(0,v/* .useCourseDetailsQuery */.p1)(Number(c));var p=(0,o.useMemo)(()=>{if(!f.data){return null}return f.data},[f.data]);var _=(0,o.useCallback)((e,t)=>{s(r=>{return r.map((r,i)=>{if(i===e){return(0,n._)({},r,t)}return r})})},[]);var y=(0,o.useMemo)(()=>{return r.findIndex(e=>e.path===u)},[r,u]);(0,o.useEffect)(()=>{s(e=>e.map((e,t)=>{return(0,i._)((0,n._)({},e),{isActive:t===y})}))},[y]);(0,o.useEffect)(()=>{if(!(0,d/* .isDefined */.O9)(p)){return}s(e=>e.map(e=>{return(0,i._)((0,n._)({},e),{isDisabled:false})}))},[p]);return/*#__PURE__*/(0,a/* .jsx */.Y)(b.Provider,{value:{steps:r,setSteps:s,updateStepByIndex:_,currentIndex:y,courseContent:p},children:t})}},23334:function(e,t,r){"use strict";r.d(t,{AA:()=>S,Cz:()=>j,KV:()=>E,Qw:()=>x,VD:()=>k,Wn:()=>D,aN:()=>N,b8:()=>M,dQ:()=>A,p1:()=>I,s1:()=>Y,sx:()=>B});/* import */var n=r(41147);/* import */var i=r(14206);/* import */var a=r(32047);/* import */var o=r(92965);/* import */var s=r(37586);/* import */var u=r(12470);/* import */var c=/*#__PURE__*/r.n(u);/* import */var l=r(1896);/* import */var d=r(61736);/* import */var f=r(76845);/* import */var p=r(66219);/* import */var h=r(40925);/* import */var v=r(74412);/* import */var m=r(19393);/* import */var g=r(77239);/* import */var b=r(94812);/* import */var _=r(49842);/* import */var y=r(33231);var w=v/* .tutorConfig.current_user.data */.P.current_user.data;var A={post_date:"",post_name:"",post_title:"",post_content:"",post_status:"publish",visibility:"publish",post_password:"",post_author:{id:Number(w.id),name:w.display_name,email:w.user_email,avatar_url:""},thumbnail:null,video:{source:"",source_video_id:"",poster:"",poster_url:"",source_html5:"",source_external_url:"",source_shortcode:"",source_youtube:"",source_vimeo:"",source_embedded:""},course_price_type:"free",course_price:"",course_sale_price:"",course_selling_option:"one_time",course_categories:[],course_tags:[],course_instructors:[],enable_qna:false,is_public_course:false,course_level:"beginner",maximum_students:null,enrollment_expiry:0,course_benefits:"",course_requirements:"",course_target_audience:"",course_material_includes:"",course_duration_hours:0,course_duration_minutes:0,course_attachments:null,isContentDripEnabled:false,contentDripType:"",course_product_id:"",course_product_name:"",preview_link:"",course_prerequisites:[],tutor_course_certificate_template:"",enable_tutor_bp:false,bp_attached_group_ids:[],editor_used:{name:"classic",label:(0,u.__)("Classic Editor","tutor"),link:""},isScheduleEnabled:false,showScheduleForm:false,schedule_date:"",schedule_time:"",enable_coming_soon:false,coming_soon_thumbnail:null,enable_curriculum_preview:false,course_enrollment_period:false,enrollment_starts_date:"",enrollment_starts_time:"",enrollment_ends_date:"",enrollment_ends_time:"",pause_enrollment:false,tax_on_single:true,tax_on_subscription:true};var x=(e,t)=>{var r,a,o,s,u,c;var p,h,g,b,_,w,A,x,E,O,S,T,k,C,I;return(0,n._)((0,i._)((0,n._)((0,i._)((0,n._)((0,i._)((0,n._)((0,i._)((0,n._)((0,i._)((0,n._)((0,i._)((0,n._)({},e.isScheduleEnabled&&{post_date:(0,l/* .format */.GP)(new Date("".concat(e.schedule_date," ").concat(e.schedule_time)),m/* .DateFormats.yearMonthDayHourMinuteSecond24H */.UA.yearMonthDayHourMinuteSecond24H),post_date_gmt:(0,y/* .convertToGMT */.dn)(new Date("".concat(e.schedule_date," ").concat(e.schedule_time)))}),{post_title:e.post_title,post_name:e.post_name}),e.editor_used.name==="classic"&&{post_content:e.post_content}),{post_status:e.post_status,post_password:e.visibility==="password_protected"?e.post_password:"",post_author:(p=(r=e.post_author)===null||r===void 0?void 0:r.id)!==null&&p!==void 0?p:null,"pricing[type]":e.course_price_type}),e.course_product_id||e.course_price_type==="free"?{"pricing[product_id]":e.course_price_type==="free"?"-1":e.course_product_id}:{}),{course_price:Number(e.course_price)||0,course_sale_price:Number(e.course_sale_price)||0,course_selling_option:e.course_selling_option,course_categories:(h=e.course_categories)!==null&&h!==void 0?h:[],course_tags:(g=e.course_tags.map(e=>e.id))!==null&&g!==void 0?g:[],thumbnail_id:(b=(a=e.thumbnail)===null||a===void 0?void 0:a.id)!==null&&b!==void 0?b:null,enable_qna:e.enable_qna?"yes":"no",is_public_course:e.is_public_course?"yes":"no",course_level:e.course_level,"course_settings[maximum_students]":(_=e.maximum_students)!==null&&_!==void 0?_:0,"course_settings[enrollment_expiry]":(w=e.enrollment_expiry)!==null&&w!==void 0?w:"","course_settings[enable_content_drip]":e.contentDripType?1:0,"course_settings[content_drip_type]":e.contentDripType,"course_settings[enable_tutor_bp]":e.enable_tutor_bp?1:0,"additional_content[course_benefits]":(A=e.course_benefits)!==null&&A!==void 0?A:"","additional_content[course_target_audience]":(x=e.course_target_audience)!==null&&x!==void 0?x:"","additional_content[course_duration][hours]":(E=e.course_duration_hours)!==null&&E!==void 0?E:0,"additional_content[course_duration][minutes]":(O=e.course_duration_minutes)!==null&&O!==void 0?O:0,"additional_content[course_material_includes]":(S=e.course_material_includes)!==null&&S!==void 0?S:"","additional_content[course_requirements]":(T=e.course_requirements)!==null&&T!==void 0?T:"",preview_link:e.preview_link}),(0,y/* .isAddonEnabled */.GR)(m/* .Addons.TUTOR_MULTI_INSTRUCTORS */.oW.TUTOR_MULTI_INSTRUCTORS)&&{course_instructor_ids:[...e.course_instructors.map(e=>e.id),Number((o=e.post_author)===null||o===void 0?void 0:o.id)]},(0,y/* .isAddonEnabled */.GR)(m/* .Addons.TUTOR_PREREQUISITES */.oW.TUTOR_PREREQUISITES)&&{_tutor_prerequisites_main_edit:true,_tutor_course_prerequisites_ids:(k=(s=e.course_prerequisites)===null||s===void 0?void 0:s.map(e=>e.id))!==null&&k!==void 0?k:[]}),{tutor_course_certificate_template:e.tutor_course_certificate_template,_tutor_course_additional_data_edit:true,_tutor_attachments_main_edit:true}),e.video.source?Object.fromEntries(Object.entries(e.video).map(t=>{var[r,n]=t;return["video[".concat(r,"]"),r==="poster_url"&&!e.video.poster?"":n]})):{}),{tutor_attachments:(C=(e.course_attachments||[]).map(e=>e.id))!==null&&C!==void 0?C:[],bp_attached_group_ids:e.bp_attached_group_ids}),(0,d/* .isBefore */.Y)(new Date,new Date("".concat(e.schedule_date," ").concat(e.schedule_time)))&&{enable_coming_soon:e.enable_coming_soon?"1":"0",coming_soon_thumbnail_id:(I=(u=e.coming_soon_thumbnail)===null||u===void 0?void 0:u.id)!==null&&I!==void 0?I:0,enable_curriculum_preview:e.enable_curriculum_preview?"1":"0"}),{"course_settings[course_enrollment_period]":e.course_enrollment_period?"yes":"no","course_settings[enrollment_starts_at]":(0,f/* .isValid */.f)(new Date("".concat(e.enrollment_starts_date," ").concat(e.enrollment_starts_time)))?(0,y/* .convertToGMT */.dn)(new Date("".concat(e.enrollment_starts_date," ").concat(e.enrollment_starts_time)),m/* .DateFormats.yearMonthDayHourMinuteSecond24H */.UA.yearMonthDayHourMinuteSecond24H):"","course_settings[enrollment_ends_at]":(0,f/* .isValid */.f)(new Date("".concat(e.enrollment_ends_date," ").concat(e.enrollment_ends_time)))?(0,y/* .convertToGMT */.dn)(new Date("".concat(e.enrollment_ends_date," ").concat(e.enrollment_ends_time)),m/* .DateFormats.yearMonthDayHourMinuteSecond24H */.UA.yearMonthDayHourMinuteSecond24H):"","course_settings[pause_enrollment]":e.pause_enrollment?"yes":"no"}),Object.fromEntries(t.map(t=>{return[t,e[t]]})),!!((c=v/* .tutorConfig.settings */.P.settings)===null||c===void 0?void 0:c.enable_individual_tax_control)&&{tax_on_single:e.tax_on_single?"1":"0",tax_on_subscription:e.tax_on_subscription?"1":"0"})};var E=(e,t)=>{var r,a,o;var s,u,c,h,g,b;return(0,i._)((0,n._)({post_date:e.post_date,post_title:e.post_title,post_name:e.post_name,post_content:e.post_content,post_status:e.post_status,visibility:(()=>{if(e.post_password.length){return"password_protected"}if(e.post_status==="private"){return"private"}return"publish"})(),post_password:e.post_password,post_author:{id:Number(e.post_author.ID),name:e.post_author.display_name,email:e.post_author.user_email,avatar_url:e.post_author.tutor_profile_photo_url},thumbnail:{id:e.thumbnail_id?Number(e.thumbnail_id):0,title:"",url:e.thumbnail},video:(0,i._)((0,n._)({},e.video),{source:Object.values(v/* .tutorConfig.supported_video_sources */.P.supported_video_sources).find(t=>t.value===e.video.source)?e.video.source:""}),course_product_name:e.course_pricing.product_name,course_price_type:!e.course_pricing.type?"free":e.course_pricing.type,course_price:e.course_pricing.price,course_sale_price:e.course_pricing.sale_price,course_selling_option:e.course_selling_option||"one_time",course_categories:e.course_categories.map(e=>e.term_id),course_tags:e.course_tags.map(e=>{return{id:e.term_id,name:e.name}}),enable_qna:e.enable_qna==="yes",is_public_course:e.is_public_course==="yes",course_level:e.course_level||"intermediate",maximum_students:e.course_settings.maximum_students,enrollment_expiry:e.course_settings.enrollment_expiry,course_benefits:e.course_benefits,course_duration_hours:e.course_duration.hours,course_duration_minutes:e.course_duration.minutes,course_material_includes:e.course_material_includes,course_requirements:e.course_requirements,course_target_audience:e.course_target_audience,isContentDripEnabled:e.course_settings.enable_content_drip===1,contentDripType:(0,y/* .isAddonEnabled */.GR)(m/* .Addons.CONTENT_DRIP */.oW.CONTENT_DRIP)?["unlock_by_date","specific_days","unlock_sequentially","after_finishing_prerequisites"].includes(e.course_settings.content_drip_type)?e.course_settings.content_drip_type:"":"",course_product_id:String(e.course_pricing.product_id)==="0"?"":String(e.course_pricing.product_id),course_instructors:(s=(r=e.course_instructors)===null||r===void 0?void 0:r.reduce((t,r)=>{if(String(r.id)!==String(e.post_author.ID)){t.push({id:r.id,name:r.display_name,email:r.user_email,avatar_url:r.avatar_url,isRemoveAble:false})}return t},[]))!==null&&s!==void 0?s:[],preview_link:(u=e.preview_link)!==null&&u!==void 0?u:"",course_prerequisites:((c=e.course_prerequisites)!==null&&c!==void 0?c:[]).map(e=>({id:e.id,title:e.post_title,image:e.featured_image,is_purchasable:false,regular_price:"",sale_price:""})),tutor_course_certificate_template:(h=e.course_certificate_template)!==null&&h!==void 0?h:"",course_attachments:(g=e.course_attachments)!==null&&g!==void 0?g:[],enable_tutor_bp:!!((0,y/* .isAddonEnabled */.GR)(m/* .Addons.BUDDYPRESS */.oW.BUDDYPRESS)&&e.course_settings.enable_tutor_bp===1),bp_attached_group_ids:(b=e.bp_attached_groups)!==null&&b!==void 0?b:[],editor_used:e.editor_used,isScheduleEnabled:(0,d/* .isBefore */.Y)(new Date,new Date(e.post_date)),showScheduleForm:!(0,d/* .isBefore */.Y)(new Date,new Date(e.post_date)),schedule_date:!(0,d/* .isBefore */.Y)((0,p/* .parseISO */.H)(e.post_date),new Date)?(0,l/* .format */.GP)((0,p/* .parseISO */.H)(e.post_date),m/* .DateFormats.yearMonthDay */.UA.yearMonthDay):"",schedule_time:!(0,d/* .isBefore */.Y)((0,p/* .parseISO */.H)(e.post_date),new Date)?(0,l/* .format */.GP)((0,p/* .parseISO */.H)(e.post_date),m/* .DateFormats.hoursMinutes */.UA.hoursMinutes):"",enable_coming_soon:e.enable_coming_soon==="1",coming_soon_thumbnail:{id:Number(e.coming_soon_thumbnail_id),title:"",url:e.coming_soon_thumbnail},enable_curriculum_preview:e.enable_curriculum_preview==="1",course_enrollment_period:e.course_settings.course_enrollment_period==="yes",enrollment_starts_date:(0,f/* .isValid */.f)(new Date(e.course_settings.enrollment_starts_at))?(0,l/* .format */.GP)((0,y/* .convertGMTtoLocalDate */.g1)(e.course_settings.enrollment_starts_at),m/* .DateFormats.yearMonthDay */.UA.yearMonthDay):"",enrollment_starts_time:(0,f/* .isValid */.f)(new Date(e.course_settings.enrollment_starts_at))?(0,l/* .format */.GP)((0,y/* .convertGMTtoLocalDate */.g1)(e.course_settings.enrollment_starts_at),m/* .DateFormats.hoursMinutes */.UA.hoursMinutes):"",enrollment_ends_date:(0,f/* .isValid */.f)(new Date(e.course_settings.enrollment_ends_at))?(0,l/* .format */.GP)((0,y/* .convertGMTtoLocalDate */.g1)(e.course_settings.enrollment_ends_at),m/* .DateFormats.yearMonthDay */.UA.yearMonthDay):"",enrollment_ends_time:(0,f/* .isValid */.f)(new Date(e.course_settings.enrollment_ends_at))?(0,l/* .format */.GP)((0,y/* .convertGMTtoLocalDate */.g1)(e.course_settings.enrollment_ends_at),m/* .DateFormats.hoursMinutes */.UA.hoursMinutes):"",pause_enrollment:e.course_settings.pause_enrollment==="yes"},Object.fromEntries(t.map(t=>{return[t,e[t]]}))),{tax_on_single:(0,_/* .isDefined */.O9)(e===null||e===void 0?void 0:(a=e.tax_collection)===null||a===void 0?void 0:a.tax_on_single)?e.tax_collection.tax_on_single==="1":true,tax_on_subscription:(0,_/* .isDefined */.O9)(e===null||e===void 0?void 0:(o=e.tax_collection)===null||o===void 0?void 0:o.tax_on_subscription)?e.tax_collection.tax_on_subscription==="1":true})};var O=e=>{return g/* .wpAjaxInstance.post */.b.post(b/* ["default"].CREATED_COURSE */.A.CREATED_COURSE,e)};var S=()=>{var{showToast:e}=(0,h/* .useToast */.d)();return(0,a/* .useMutation */.n)({mutationFn:O,onSuccess:t=>{e({type:"success",message:t.message})},onError:t=>{e({type:"danger",message:(0,y/* .convertToErrorMessage */.EL)(t)})}})};var T=e=>{return g/* .wpAjaxInstance.post */.b.post(b/* ["default"].UPDATE_COURSE */.A.UPDATE_COURSE,e)};var k=()=>{var{showToast:e}=(0,h/* .useToast */.d)();var t=(0,o/* .useQueryClient */.jE)();return(0,a/* .useMutation */.n)({mutationFn:T,onSuccess:r=>{if(r.data){e({type:"success",message:(0,u.__)(r.message,"tutor")});t.invalidateQueries({queryKey:["CourseDetails",r.data]});t.invalidateQueries({queryKey:["InstructorList",String(r.data)]});t.invalidateQueries({queryKey:["WcProducts"]})}},onError:t=>{e({type:"danger",message:(0,y/* .convertToErrorMessage */.EL)(t)})}})};var C=e=>{return g/* .wpAjaxInstance.get */.b.get(b/* ["default"].GET_COURSE_DETAILS */.A.GET_COURSE_DETAILS,{params:{course_id:e}})};var I=e=>{return(0,s/* .useQuery */.I)({queryKey:["CourseDetails",e],queryFn:()=>C(e).then(e=>{return e.data}),enabled:!!e})};var R=e=>{return g/* .wpAjaxInstance.get */.b.get(b/* ["default"].GET_WC_PRODUCTS */.A.GET_WC_PRODUCTS,{params:(0,n._)({exclude_linked_products:true},e&&{course_id:e})})};var D=(e,t)=>{return(0,s/* .useQuery */.I)({queryKey:["WcProducts"],queryFn:()=>R(t).then(e=>e.data),enabled:e==="wc"})};var P=(e,t)=>{return g/* .wpAjaxInstance.get */.b.get(b/* ["default"].GET_WC_PRODUCT_DETAILS */.A.GET_WC_PRODUCT_DETAILS,{params:{product_id:e,course_id:t}})};var M=(e,t,r,n)=>{return(0,s/* .useQuery */.I)({queryKey:["WcProductDetails",e,t],queryFn:()=>P(e,t).then(e=>e.data),enabled:!!e&&r==="paid"&&n==="wc"})};var F=e=>{return g/* .wpAjaxInstance.post */.b.post(b/* ["default"].SAVE_ZOOM_MEETING */.A.SAVE_ZOOM_MEETING,e)};var Y=()=>{var{showToast:e}=(0,h/* .useToast */.d)();var t=(0,o/* .useQueryClient */.jE)();return(0,a/* .useMutation */.n)({mutationFn:F,onSuccess:(r,n)=>{if(r.data){e({type:"success",message:(0,u.__)(r.message,"tutor")});if(n.click_form==="course_builder"){t.invalidateQueries({queryKey:["Topic",n.course_id]})}if(n.click_form==="metabox"){t.invalidateQueries({queryKey:["CourseDetails",Number(n.course_id)]})}}},onError:t=>{e({type:"danger",message:(0,y/* .convertToErrorMessage */.EL)(t)})}})};var L=e=>{return g/* .wpAjaxInstance.post */.b.post(b/* ["default"].DELETE_ZOOM_MEETING */.A.DELETE_ZOOM_MEETING,{meeting_id:e})};var N=e=>{var{showToast:t}=(0,h/* .useToast */.d)();var r=(0,o/* .useQueryClient */.jE)();return(0,a/* .useMutation */.n)({mutationFn:L,onSuccess:n=>{if(n.status_code===200){t({type:"success",message:n.message});r.invalidateQueries({queryKey:["CourseDetails",Number(e)]});r.invalidateQueries({queryKey:["Topic",e]})}},onError:e=>{t({type:"danger",message:(0,y/* .convertToErrorMessage */.EL)(e)})}})};var H=e=>{var t=(0,i._)((0,n._)({},e["post-id"]&&e["event-id"]&&{"post-id":e["post-id"],"event-id":e["event-id"]}),{object_id:e.topic_id?e.topic_id:e.object_id,meeting_summary:e.meeting_summary,meeting_title:e.meeting_title,meeting_start_date:e.meeting_start_date,meeting_start_time:e.meeting_start_time,meeting_end_date:e.meeting_end_date,meeting_end_time:e.meeting_end_time,meeting_timezone:e.meeting_timezone,meeting_attendees_enroll_students:e.meeting_attendees_enroll_students,attendees:e.attendees});return g/* .wpAjaxInstance.post */.b.post(b/* ["default"].SAVE_GOOGLE_MEET */.A.SAVE_GOOGLE_MEET,t)};var j=()=>{var{showToast:e}=(0,h/* .useToast */.d)();var t=(0,o/* .useQueryClient */.jE)();return(0,a/* .useMutation */.n)({mutationFn:H,onSuccess:(r,n)=>{e({type:"success",message:(0,u.__)(r.message,"tutor")});if(n.topic_id){t.invalidateQueries({queryKey:["Topic",n.object_id]})}else{t.invalidateQueries({queryKey:["CourseDetails",n.object_id]})}},onError:t=>{e({type:"danger",message:(0,y/* .convertToErrorMessage */.EL)(t)})}})};var U=(e,t)=>{return g/* .wpAjaxInstance.post */.b.post(b/* ["default"].DELETE_GOOGLE_MEET */.A.DELETE_GOOGLE_MEET,{"post-id":e,"event-id":t})};var B=(e,t)=>{var{showToast:r}=(0,h/* .useToast */.d)();var n=(0,o/* .useQueryClient */.jE)();return(0,a/* .useMutation */.n)({mutationFn:()=>U(t["post-id"],t["event-id"]),onSuccess:t=>{r({type:"success",message:(0,u.__)(t.message,"tutor")});n.invalidateQueries({queryKey:["CourseDetails",Number(e)]});n.invalidateQueries({queryKey:["Topic",Number(e)]})},onError:e=>{r({type:"danger",message:(0,y/* .convertToErrorMessage */.EL)(e)})}})};var K=e=>{return wpAjaxInstance.post(endpoints.TUTOR_YOUTUBE_VIDEO_DURATION,{video_id:e})};var z=()=>{return useMutation({mutationFn:K})}},60297:function(e,t,r){"use strict";r.d(t,{E:()=>i,p:()=>n});var n=()=>{var e=new URLSearchParams(window.location.search);var t=e.get("course_id");return Number(t)};var i=(e,t)=>{return t.toString().replace(e,"")}},47918:function(e,t,r){"use strict";r.d(t,{A:()=>d});/* import */var n=r(52639);/* import */var i=r(42771);/* import */var a=r(13448);/* import */var o=r(81547);/* import */var s=r(59189);/* import */var u=r(46225);var c={text:{warning:"#D47E00",success:"#D47E00",danger:"#f44337",info:"#D47E00",primary:"#D47E00"},icon:{warning:"#FAB000",success:"#FAB000",danger:"#f55e53",info:"#FAB000",primary:"#FAB000"},background:{warning:"#FBFAE9",success:"#FBFAE9",danger:"#fdd9d7",info:"#FBFAE9",primary:"#FBFAE9"}};var l=e=>{var{children:t,type:r="warning",icon:i}=e;return/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:f.wrapper({type:r}),children:[/*#__PURE__*/(0,n/* .jsx */.Y)(s/* ["default"] */.A,{when:i,children:e=>/*#__PURE__*/(0,n/* .jsx */.Y)(u/* ["default"] */.A,{style:f.icon({type:r}),name:e,height:24,width:24})}),/*#__PURE__*/(0,n/* .jsx */.Y)("span",{children:t})]})};/* export default */const d=l;var f={wrapper:e=>{var{type:t}=e;return/*#__PURE__*/(0,i/* .css */.AH)(o/* .typography.caption */.I.caption(),";display:flex;align-items:start;padding:",a/* .spacing["8"] */.YK["8"]," ",a/* .spacing["12"] */.YK["12"],";width:100%;border-radius:",a/* .borderRadius.card */.Vq.card,";gap:",a/* .spacing["4"] */.YK["4"],";background-color:",c.background[t],";color:",c.text[t],";")},icon:e=>{var{type:t}=e;return/*#__PURE__*/(0,i/* .css */.AH)("color:",c.icon[t],";flex-shrink:0;")}}},25074:function(e,t,r){"use strict";r.d(t,{A:()=>w});/* import */var n=r(41147);/* import */var i=r(14206);/* import */var a=r(17900);/* import */var o=r(60599);/* import */var s=r(52639);/* import */var u=r(41594);/* import */var c=/*#__PURE__*/r.n(u);/* import */var l=r(42771);/* import */var d=r(46225);/* import */var f=r(13448);/* import */var p=r(81547);/* import */var h=r(78931);/* import */var v=r(52874);function m(){var e=(0,o._)(["\n      color: transparent;\n    "]);m=function t(){return e};return e}function g(){var e=(0,o._)(["\n      margin-right: 0;\n      margin-left: ",";\n    "]);g=function t(){return e};return e}function b(){var e=(0,o._)(["\n      opacity: 0;\n    "]);b=function t(){return e};return e}function _(){var e=(0,o._)(["\n      margin-inline: 0;\n    "]);_=function t(){return e};return e}var y=/*#__PURE__*/c().forwardRef((e,t)=>{var{variant:r="primary",isOutlined:o=false,size:u="regular",loading:c=false,children:l,disabled:f=false,icon:p,iconPosition:h="left",buttonCss:v,buttonContentCss:m,as:g="button",tabIndex:b,isIconOnly:_=false}=e,y=(0,a._)(e,["variant","isOutlined","size","loading","children","disabled","icon","iconPosition","buttonCss","buttonContentCss","as","tabIndex","isIconOnly"]);var w=[O({variant:r,outlined:o?r:"none",size:u,isLoading:c?"true":"false",iconOnly:_?"true":"false"}),v];var A=/*#__PURE__*/(0,s/* .jsxs */.FD)(s/* .Fragment */.FK,{children:[c&&!f&&/*#__PURE__*/(0,s/* .jsx */.Y)("span",{css:E.spinner,children:/*#__PURE__*/(0,s/* .jsx */.Y)(d/* ["default"] */.A,{name:"spinner",width:18,height:18})}),/*#__PURE__*/(0,s/* .jsxs */.FD)("span",{css:[E.buttonContent({loading:c,disabled:f}),m],children:[p&&h==="left"&&/*#__PURE__*/(0,s/* .jsx */.Y)("span",{css:E.buttonIcon({iconPosition:h,loading:c,hasChildren:!!l}),children:p}),l,p&&h==="right"&&/*#__PURE__*/(0,s/* .jsx */.Y)("span",{css:E.buttonIcon({iconPosition:h,loading:c,hasChildren:!!l}),children:p})]})]});if(g==="a"){var{href:x,target:S,rel:T,download:k,onClick:C}=y,I=(0,a._)(y,["href","target","rel","download","onClick"]);// Auto-add security attributes for external links
var R=typeof x==="string"&&(x.startsWith("http")||x.startsWith("//"));var D=S==="_blank"&&R?"".concat(T?"".concat(T," "):"","noopener noreferrer"):T;return/*#__PURE__*/(0,s/* .jsx */.Y)("a",(0,i._)((0,n._)({ref:t,css:w,href:f||c?undefined:x,target:f||c?undefined:S,rel:D,download:f||c?undefined:k,tabIndex:f||c?-1:b,"aria-disabled":f||c,onClick:f||c?e=>e.preventDefault():C,role:"button","data-size":u},I),{children:A}))}var{type:P="button",onClick:M,form:F,name:Y,value:L}=y,N=(0,a._)(y,["type","onClick","form","name","value"]);return/*#__PURE__*/(0,s/* .jsx */.Y)("button",(0,i._)((0,n._)({ref:t,type:P,css:w,disabled:f||c,tabIndex:b,onClick:M,form:F,name:Y,value:L,"data-size":u},N),{children:A}))});y.displayName="Button";/* export default */const w=y;var A=/*#__PURE__*/(0,l/* .keyframes */.i7)("0%{transform:rotate(0);}100%{transform:rotate(360deg);}");var x={notOutlined:/*#__PURE__*/(0,l/* .css */.AH)("&:disabled,&[aria-disabled='true']{background-color:",f/* .colorTokens.action.primary.disable */.I6.action.primary.disable,";color:",f/* .colorTokens.text.disable */.I6.text.disable,";svg{color:",f/* .colorTokens.icon.disable["default"] */.I6.icon.disable["default"],";}}"),outlined:/*#__PURE__*/(0,l/* .css */.AH)("&:disabled,&[aria-disabled='true']{background-color:transparent;border:none;box-shadow:inset 0px 0px 0px 1px ",f/* .colorTokens.action.outline.disable */.I6.action.outline.disable,";color:",f/* .colorTokens.text.disable */.I6.text.disable,";svg{color:",f/* .colorTokens.icon.disable["default"] */.I6.icon.disable["default"],";}}"),text:/*#__PURE__*/(0,l/* .css */.AH)("&:disabled,&[aria-disabled='true']{color:",f/* .colorTokens.text.disable */.I6.text.disable,";svg{color:",f/* .colorTokens.icon.disable["default"] */.I6.icon.disable["default"],";}}")};var E={base:/*#__PURE__*/(0,l/* .css */.AH)(v/* .styleUtils.resetButton */.x.resetButton,";",v/* .styleUtils.display.inlineFlex */.x.display.inlineFlex(),";justify-content:center;align-items:center;",p/* .typography.caption */.I.caption("medium"),";",v/* .styleUtils.text.align.center */.x.text.align.center,";color:",f/* .colorTokens.text.white */.I6.text.white,";text-decoration:none;vertical-align:middle;cursor:pointer;user-select:none;background-color:transparent;border:0;padding:",f/* .spacing["8"] */.YK["8"]," ",f/* .spacing["32"] */.YK["32"],";border-radius:",f/* .borderRadius["6"] */.Vq["6"],";z-index:",f/* .zIndex.level */.fE.level,";transition:all 150ms ease-in-out;position:relative;svg{color:",f/* .colorTokens.icon.white */.I6.icon.white,";}&:disabled,&[aria-disabled='true']{cursor:not-allowed;}&:not(:disabled):not([aria-disabled='true']){&:focus{box-shadow:",f/* .shadow.focus */.r7.focus,";}&:focus-visible{box-shadow:none;outline:2px solid ",f/* .colorTokens.stroke.brand */.I6.stroke.brand,";outline-offset:1px;}}"),variant:{primary:/*#__PURE__*/(0,l/* .css */.AH)("background-color:",f/* .colorTokens.action.primary["default"] */.I6.action.primary["default"],";",x.notOutlined,";&:not(:disabled):not([aria-disabled='true']){&:hover,&:focus{color:",f/* .colorTokens.text.white */.I6.text.white,";background-color:",f/* .colorTokens.action.primary.hover */.I6.action.primary.hover,";}&:active{background-color:",f/* .colorTokens.action.primary.active */.I6.action.primary.active,";color:",f/* .colorTokens.text.white */.I6.text.white,";svg{color:",f/* .colorTokens.icon.white */.I6.icon.white,";}}}"),secondary:/*#__PURE__*/(0,l/* .css */.AH)("background-color:",f/* .colorTokens.action.secondary["default"] */.I6.action.secondary["default"],";color:",f/* .colorTokens.text.brand */.I6.text.brand,";svg{color:",f/* .colorTokens.icon.brand */.I6.icon.brand,";}",x.notOutlined,";&:not(:disabled):not([aria-disabled='true']){&:hover,&:focus{background-color:",f/* .colorTokens.action.secondary.hover */.I6.action.secondary.hover,";color:",f/* .colorTokens.text.brand */.I6.text.brand,";}&:active{background-color:",f/* .colorTokens.action.secondary.active */.I6.action.secondary.active,";color:",f/* .colorTokens.text.brand */.I6.text.brand,";}}"),tertiary:/*#__PURE__*/(0,l/* .css */.AH)("box-shadow:inset 0px 0px 0px 1px ",f/* .colorTokens.stroke["default"] */.I6.stroke["default"],";color:",f/* .colorTokens.text.subdued */.I6.text.subdued,";svg{color:",f/* .colorTokens.icon.hints */.I6.icon.hints,";}",x.outlined,";&:not(:disabled):not([aria-disabled='true']){&:hover,&:focus{background-color:",f/* .colorTokens.background.hover */.I6.background.hover,";box-shadow:inset 0px 0px 0px 1px ",f/* .colorTokens.stroke.hover */.I6.stroke.hover,";color:",f/* .colorTokens.text.title */.I6.text.title,";svg{color:",f/* .colorTokens.icon.brand */.I6.icon.brand,";}}&:active{background-color:",f/* .colorTokens.background.active */.I6.background.active,";svg{color:",f/* .colorTokens.icon.hints */.I6.icon.hints,";}}}"),danger:/*#__PURE__*/(0,l/* .css */.AH)("background-color:",f/* .colorTokens.background.status.errorFail */.I6.background.status.errorFail,";color:",f/* .colorTokens.text.error */.I6.text.error,";svg{color:",f/* .colorTokens.icon.error */.I6.icon.error,";}",x.notOutlined,";&:not(:disabled):not([aria-disabled='true']){&:hover,&:focus,&:active{background-color:",f/* .colorTokens.background.status.errorFail */.I6.background.status.errorFail,";color:",f/* .colorTokens.text.error */.I6.text.error,";}}"),WP:/*#__PURE__*/(0,l/* .css */.AH)("background-color:",f/* .colorTokens.action.primary.wp */.I6.action.primary.wp,";",x.notOutlined,";&:not(:disabled):not([aria-disabled='true']){&:hover,&:focus{background-color:",f/* .colorTokens.action.primary.wp_hover */.I6.action.primary.wp_hover,";color:",f/* .colorTokens.text.white */.I6.text.white,";}&:active{background-color:",f/* .colorTokens.action.primary.wp */.I6.action.primary.wp,";}}"),text:/*#__PURE__*/(0,l/* .css */.AH)("background-color:transparent;color:",f/* .colorTokens.text.subdued */.I6.text.subdued,";padding:",f/* .spacing["8"] */.YK["8"],";svg{color:",f/* .colorTokens.icon.hints */.I6.icon.hints,";}",x.text,";&:not(:disabled):not([aria-disabled='true']){&:hover,&:focus{background-color:transparent;color:",f/* .colorTokens.text.brand */.I6.text.brand,";svg{color:",f/* .colorTokens.icon.brand */.I6.icon.brand,";}}&:active{background-color:transparent;color:",f/* .colorTokens.text.subdued */.I6.text.subdued,";}}")},outlined:{primary:/*#__PURE__*/(0,l/* .css */.AH)("background-color:transparent;box-shadow:inset 0px 0px 0px 1px ",f/* .colorTokens.stroke.brand */.I6.stroke.brand,";color:",f/* .colorTokens.text.brand */.I6.text.brand,";svg{color:",f/* .colorTokens.icon.brand */.I6.icon.brand,";}",x.outlined,";&:not(:disabled):not([aria-disabled='true']){&:hover,&:focus{color:",f/* .colorTokens.text.white */.I6.text.white,";svg{color:",f/* .colorTokens.icon.white */.I6.icon.white,";}}}"),secondary:/*#__PURE__*/(0,l/* .css */.AH)("background-color:transparent;box-shadow:inset 0px 0px 0px 1px ",f/* .colorTokens.stroke.brand */.I6.stroke.brand,";color:",f/* .colorTokens.text.brand */.I6.text.brand,";svg{color:",f/* .colorTokens.icon.brand */.I6.icon.brand,";}",x.outlined,";&:not(:disabled):not([aria-disabled='true']){&:hover,&:focus{background-color:",f/* .colorTokens.action.secondary.hover */.I6.action.secondary.hover,";}}"),tertiary:/*#__PURE__*/(0,l/* .css */.AH)("background-color:transparent;",x.outlined,";"),danger:/*#__PURE__*/(0,l/* .css */.AH)("background-color:transparent;border:1px solid ",f/* .colorTokens.stroke.danger */.I6.stroke.danger,";",x.outlined,";&:not(:disabled):not([aria-disabled='true']){&:hover,&:focus{background-color:",f/* .colorTokens.background.status.errorFail */.I6.background.status.errorFail,";}}"),WP:/*#__PURE__*/(0,l/* .css */.AH)("background-color:transparent;border:1px solid ",f/* .colorTokens.action.primary.wp */.I6.action.primary.wp,";color:",f/* .colorTokens.action.primary.wp */.I6.action.primary.wp,";svg{color:",f/* .colorTokens.icon.wp */.I6.icon.wp,";}",x.outlined,";&:not(:disabled):not([aria-disabled='true']){&:hover,&:focus{background-color:",f/* .colorTokens.action.primary.wp_hover */.I6.action.primary.wp_hover,";color:",f/* .colorTokens.text.white */.I6.text.white,";svg{color:",f/* .colorTokens.icon.white */.I6.icon.white,";}}}"),text:/*#__PURE__*/(0,l/* .css */.AH)("background-color:transparent;border:none;color:",f/* .colorTokens.text.primary */.I6.text.primary,";",x.text,";&:not(:disabled):not([aria-disabled='true']){&:hover,&:focus{color:",f/* .colorTokens.text.brand */.I6.text.brand,";}}"),none:/*#__PURE__*/(0,l/* .css */.AH)()},size:{regular:/*#__PURE__*/(0,l/* .css */.AH)("padding:",f/* .spacing["8"] */.YK["8"]," ",f/* .spacing["32"] */.YK["32"],";",p/* .typography.caption */.I.caption("medium"),";color:",f/* .colorTokens.text.white */.I6.text.white,";min-height:40px;"),large:/*#__PURE__*/(0,l/* .css */.AH)("padding:",f/* .spacing["12"] */.YK["12"]," ",f/* .spacing["40"] */.YK["40"],";",p/* .typography.body */.I.body("medium"),";color:",f/* .colorTokens.text.white */.I6.text.white,";min-height:48px;"),small:/*#__PURE__*/(0,l/* .css */.AH)("padding:",f/* .spacing["6"] */.YK["6"]," ",f/* .spacing["16"] */.YK["16"],";",p/* .typography.small */.I.small("medium"),";color:",f/* .colorTokens.text.white */.I6.text.white,";min-height:32px;")},isIconOnly:{true:/*#__PURE__*/(0,l/* .css */.AH)("aspect-ratio:1 / 1;&[data-size='regular']{padding:",f/* .spacing["8"] */.YK["8"],";width:40px;}&[data-size='large']{padding:",f/* .spacing["12"] */.YK["12"],";width:48px;}&[data-size='small']{padding:",f/* .spacing["6"] */.YK["6"],";width:32px;}"),false:/*#__PURE__*/(0,l/* .css */.AH)()},isLoading:{true:/*#__PURE__*/(0,l/* .css */.AH)("opacity:0.8;cursor:wait;"),false:/*#__PURE__*/(0,l/* .css */.AH)()},iconWrapper:{left:/*#__PURE__*/(0,l/* .css */.AH)("order:-1;"),right:/*#__PURE__*/(0,l/* .css */.AH)("order:1;")},buttonContent:e=>{var{loading:t,disabled:r,isIconOnly:n}=e;return/*#__PURE__*/(0,l/* .css */.AH)(v/* .styleUtils.display.flex */.x.display.flex(),";align-items:center;",n&&"justify-content: center;"," ",t&&!r&&(0,l/* .css */.AH)(m()))},buttonIcon:e=>{var{iconPosition:t,loading:r,hasChildren:n=true}=e;return/*#__PURE__*/(0,l/* .css */.AH)("display:grid;place-items:center;margin-right:",f/* .spacing["4"] */.YK["4"],";",t==="right"&&(0,l/* .css */.AH)(g(),f/* .spacing["4"] */.YK["4"])," ",r&&(0,l/* .css */.AH)(b())," ",!n&&(0,l/* .css */.AH)(_()))},spinner:/*#__PURE__*/(0,l/* .css */.AH)("position:absolute;visibility:visible;display:flex;top:50%;left:50%;transform:translateX(-50%) translateY(-50%);& svg{animation:",A," 1s linear infinite;}")};var O=(0,h/* .createVariation */.s)({variants:{size:{regular:E.size.regular,large:E.size.large,small:E.size.small},isLoading:{true:E.isLoading.true,false:E.isLoading.false},iconOnly:{true:E.isIconOnly.true,false:E.isIconOnly.false},variant:{primary:E.variant.primary,secondary:E.variant.secondary,tertiary:E.variant.tertiary,danger:E.variant.danger,WP:E.variant.WP,text:E.variant.text},outlined:{primary:E.outlined.primary,secondary:E.outlined.secondary,tertiary:E.outlined.tertiary,danger:E.outlined.danger,WP:E.outlined.WP,text:E.outlined.text,none:E.outlined.none}},defaultVariants:{variant:"primary",outlined:"none",size:"regular",isLoading:"false",iconOnly:"false"}},E.base)},56705:function(e,t,r){"use strict";r.d(t,{Ay:()=>v,YE:()=>f,em:()=>h,p8:()=>d});/* import */var n=r(52639);/* import */var i=r(42771);/* import */var a=r(13448);var o=/*#__PURE__*/(0,i/* .keyframes */.i7)("0%{transform:rotate(0deg);}100%{transform:rotate(360deg);}");var s=/*#__PURE__*/(0,i/* .keyframes */.i7)("0%{stroke-dashoffset:180;transform:rotate(0deg);}50%{stroke-dashoffset:",180/4,";transform:rotate(135deg);}100%{stroke-dashoffset:180;transform:rotate(360deg);}");var u=/*#__PURE__*/(0,i/* .keyframes */.i7)("	0%{transform:rotate(0deg);}100%{transform:rotate(360deg);}");var c={fullscreen:/*#__PURE__*/(0,i/* .css */.AH)("display:flex;align-items:center;justify-content:center;height:100vh;width:100vw;"),loadingOverlay:/*#__PURE__*/(0,i/* .css */.AH)("position:absolute;top:0;bottom:0;right:0;left:0;display:flex;align-items:center;justify-content:center;"),loadingSection:/*#__PURE__*/(0,i/* .css */.AH)("width:100%;height:100px;display:flex;justify-content:center;align-items:center;"),svg:/*#__PURE__*/(0,i/* .css */.AH)("animation:",o," 1.4s linear infinite;"),spinnerPath:/*#__PURE__*/(0,i/* .css */.AH)("stroke-dasharray:180;stroke-dashoffset:0;transform-origin:center;animation:",s," 1.4s linear infinite;"),spinGradient:/*#__PURE__*/(0,i/* .css */.AH)("transition:transform;transform-origin:center;animation:",u," 1s infinite linear;")};var l=e=>{var{size:t=30,color:r=a/* .colorTokens.icon.disable["default"] */.I6.icon.disable["default"]}=e;return/*#__PURE__*/(0,n/* .jsx */.Y)("svg",{width:t,height:t,css:c.svg,viewBox:"0 0 86 86",xmlns:"http://www.w3.org/2000/svg",children:/*#__PURE__*/(0,n/* .jsx */.Y)("circle",{css:c.spinnerPath,fill:"none",stroke:r,strokeWidth:"6",strokeLinecap:"round",cx:"43",cy:"43",r:"30"})})};var d=()=>{return/*#__PURE__*/(0,n/* .jsx */.Y)("div",{css:c.loadingOverlay,children:/*#__PURE__*/(0,n/* .jsx */.Y)(l,{})})};var f=()=>{return/*#__PURE__*/(0,n/* .jsx */.Y)("div",{css:c.loadingSection,children:/*#__PURE__*/(0,n/* .jsx */.Y)(l,{})})};var p=()=>{return /*#__PURE__*/_jsx("div",{css:c.fullscreen,children:/*#__PURE__*/_jsx(l,{})})};var h=e=>{var{size:t=24}=e;return/*#__PURE__*/(0,n/* .jsxs */.FD)("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[/*#__PURE__*/(0,n/* .jsx */.Y)("path",{d:"M12 3C10.22 3 8.47991 3.52784 6.99987 4.51677C5.51983 5.50571 4.36628 6.91131 3.68509 8.55585C3.0039 10.2004 2.82567 12.01 3.17294 13.7558C3.5202 15.5016 4.37737 17.1053 5.63604 18.364C6.89472 19.6226 8.49836 20.4798 10.2442 20.8271C11.99 21.1743 13.7996 20.9961 15.4442 20.3149C17.0887 19.6337 18.4943 18.4802 19.4832 17.0001C20.4722 15.5201 21 13.78 21 12",stroke:"url(#paint0_linear_2402_3559)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",css:c.spinGradient}),/*#__PURE__*/(0,n/* .jsx */.Y)("defs",{children:/*#__PURE__*/(0,n/* .jsxs */.FD)("linearGradient",{id:"paint0_linear_2402_3559",x1:"4.50105",y1:"12",x2:"21.6571",y2:"6.7847",gradientUnits:"userSpaceOnUse",children:[/*#__PURE__*/(0,n/* .jsx */.Y)("stop",{stopColor:"#FF9645"}),/*#__PURE__*/(0,n/* .jsx */.Y)("stop",{offset:"0.152804",stopColor:"#FF6471"}),/*#__PURE__*/(0,n/* .jsx */.Y)("stop",{offset:"0.467993",stopColor:"#CF6EBD"}),/*#__PURE__*/(0,n/* .jsx */.Y)("stop",{offset:"0.671362",stopColor:"#A477D1"}),/*#__PURE__*/(0,n/* .jsx */.Y)("stop",{offset:"1",stopColor:"#3E64DE"})]})})]})};/* export default */const v=l},78353:function(e,t,r){"use strict";r.d(t,{A:()=>g});/* import */var n=r(41147);/* import */var i=r(14206);/* import */var a=r(17900);/* import */var o=r(52639);/* import */var s=r(41594);/* import */var u=/*#__PURE__*/r.n(s);/* import */var c=r(42771);/* import */var l=r(19393);/* import */var d=r(13448);/* import */var f=r(81547);/* import */var p=r(78931);/* import */var h=r(52874);/* import */var v=r(56705);var m=/*#__PURE__*/u().forwardRef((e,t)=>{var{className:r,variant:s,size:u,children:c,type:l="button",disabled:d=false,roundedFull:f=true,loading:p}=e,h=(0,a._)(e,["className","variant","size","children","type","disabled","roundedFull","loading"]);return/*#__PURE__*/(0,o/* .jsx */.Y)("button",(0,i._)((0,n._)({type:l,ref:t,css:_({variant:s,size:u,rounded:f?"true":"false"}),className:r,disabled:d},h),{children:/*#__PURE__*/(0,o/* .jsx */.Y)("span",{css:b.buttonSpan,children:p?/*#__PURE__*/(0,o/* .jsx */.Y)(v/* ["default"] */.Ay,{size:24}):c})}))});/* export default */const g=m;var b={buttonSpan:/*#__PURE__*/(0,c/* .css */.AH)(h/* .styleUtils.flexCenter */.x.flexCenter(),";z-index:",d/* .zIndex.positive */.fE.positive,";"),base:/*#__PURE__*/(0,c/* .css */.AH)(h/* .styleUtils.resetButton */.x.resetButton,";",f/* .typography.small */.I.small("medium"),";display:flex;gap:",d/* .spacing["4"] */.YK["4"],";width:100%;justify-content:center;align-items:center;white-space:nowrap;position:relative;overflow:hidden;transition:box-shadow 0.5s ease;&:focus-visible{outline:2px solid ",d/* .colorTokens.stroke.brand */.I6.stroke.brand,";outline-offset:1px;}&:disabled{cursor:not-allowed;background:",d/* .colorTokens.action.primary.disable */.I6.action.primary.disable,";pointer-events:none;color:",d/* .colorTokens.text.disable */.I6.text.disable,";border-color:",d/* .colorTokens.stroke.disable */.I6.stroke.disable,";}"),default:e=>/*#__PURE__*/(0,c/* .css */.AH)("background:",!e?d/* .colorTokens.ai.gradient_1 */.I6.ai.gradient_1:d/* .colorTokens.ai.gradient_1_rtl */.I6.ai.gradient_1_rtl,";color:",d/* .colorTokens.text.white */.I6.text.white,";&::before{content:'';position:absolute;inset:0;background:",!e?d/* .colorTokens.ai.gradient_2 */.I6.ai.gradient_2:d/* .colorTokens.ai.gradient_2_rtl */.I6.ai.gradient_2_rtl,";opacity:0;transition:opacity 0.5s ease;}&:hover::before{opacity:1;}"),secondary:/*#__PURE__*/(0,c/* .css */.AH)("background-color:",d/* .colorTokens.action.secondary["default"] */.I6.action.secondary["default"],";color:",d/* .colorTokens.text.brand */.I6.text.brand,";border-radius:",d/* .borderRadius["6"] */.Vq["6"],";&:hover{background-color:",d/* .colorTokens.action.secondary.hover */.I6.action.secondary.hover,";}"),outline:/*#__PURE__*/(0,c/* .css */.AH)("position:relative;&::before{content:'';position:absolute;inset:0;background:",d/* .colorTokens.ai.gradient_1 */.I6.ai.gradient_1,";color:",d/* .colorTokens.text.primary */.I6.text.primary,";border:1px solid transparent;-webkit-mask:linear-gradient(#fff 0 0) padding-box,linear-gradient(#fff 0 0);mask:linear-gradient(#fff 0 0) padding-box,linear-gradient(#fff 0 0);-webkit-mask-composite:xor;mask-composite:exclude;}&:hover{&::before{background:",d/* .colorTokens.ai.gradient_2 */.I6.ai.gradient_2,";}}"),primaryOutline:/*#__PURE__*/(0,c/* .css */.AH)("border:1px solid ",d/* .colorTokens.brand.blue */.I6.brand.blue,";color:",d/* .colorTokens.brand.blue */.I6.brand.blue,";&:hover{background-color:",d/* .colorTokens.brand.blue */.I6.brand.blue,";color:",d/* .colorTokens.text.white */.I6.text.white,";}"),primary:/*#__PURE__*/(0,c/* .css */.AH)("background-color:",d/* .colorTokens.brand.blue */.I6.brand.blue,";color:",d/* .colorTokens.text.white */.I6.text.white,";"),ghost:/*#__PURE__*/(0,c/* .css */.AH)("background-color:transparent;color:",d/* .colorTokens.text.subdued */.I6.text.subdued,";border-radius:",d/* .borderRadius["4"] */.Vq["4"],";&:hover{color:",d/* .colorTokens.text.primary */.I6.text.primary,";}"),plain:/*#__PURE__*/(0,c/* .css */.AH)("span{background:",!l/* .isRTL */.V8?d/* .colorTokens.text.ai.gradient */.I6.text.ai.gradient:d/* .colorTokens.ai.gradient_1_rtl */.I6.ai.gradient_1_rtl,";background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent;&:hover{background:",!l/* .isRTL */.V8?d/* .colorTokens.ai.gradient_2 */.I6.ai.gradient_2:d/* .colorTokens.ai.gradient_2_rtl */.I6.ai.gradient_2_rtl,";background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent;}}"),size:{default:/*#__PURE__*/(0,c/* .css */.AH)("height:32px;padding-inline:",d/* .spacing["12"] */.YK["12"],";padding-block:",d/* .spacing["4"] */.YK["4"],";"),sm:/*#__PURE__*/(0,c/* .css */.AH)("height:24px;padding-inline:",d/* .spacing["10"] */.YK["10"],";"),icon:/*#__PURE__*/(0,c/* .css */.AH)("width:32px;height:32px;")},rounded:{true:/*#__PURE__*/(0,c/* .css */.AH)("border-radius:",d/* .borderRadius["54"] */.Vq["54"],";&::before{border-radius:",d/* .borderRadius["54"] */.Vq["54"],";}"),false:/*#__PURE__*/(0,c/* .css */.AH)("border-radius:",d/* .borderRadius["4"] */.Vq["4"],";&::before{border-radius:",d/* .borderRadius["4"] */.Vq["4"],";}")}};var _=(0,p/* .createVariation */.s)({variants:{variant:{default:b.default(l/* .isRTL */.V8),primary:b.primary,secondary:b.secondary,outline:b.outline,primary_outline:b.primaryOutline,ghost:b.ghost,plain:b.plain},size:{default:b.size.default,sm:b.size.sm,icon:b.size.icon},rounded:{true:b.rounded.true,false:b.rounded.false}},defaultVariants:{variant:"default",size:"default",rounded:"true"}},b.base)},46225:function(e,t,r){"use strict";r.d(t,{A:()=>g});/* import */var n=r(41147);/* import */var i=r(14206);/* import */var a=r(17900);/* import */var o=r(60599);/* import */var s=r(52639);/* import */var u=r(41594);/* import */var c=/*#__PURE__*/r.n(u);/* import */var l=r(42771);/* import */var d=r(74412);/* import */var f=r(82720);function p(){var e=(0,o._)(["\n      filter: grayscale(100%);\n    "]);p=function t(){return e};return e}var h={};var v=e=>{var{name:t,width:r=16,height:o=16,style:c,isColorIcon:l=false,ignoreKids:d}=e,p=(0,a._)(e,["name","width","height","style","isColorIcon","ignoreKids"]);var v,g;var{supportKidsIcon:_}=(0,f/* .useSVGIconConfig */.J)();var y=d!==null&&d!==void 0?d:!_;var w=y?"".concat(t,"-ignoreKids"):t;var[A,x]=(0,u.useState)(((v=h[w])===null||v===void 0?void 0:v.icon)||null);var[E,O]=(0,u.useState)(!((g=h[w])===null||g===void 0?void 0:g.icon));(0,u.useEffect)(()=>{var e;if((e=h[w])===null||e===void 0?void 0:e.icon){x(h[w].icon);O(false);return}O(true);m(t,w,r,o,y).then(e=>{x(e)}).catch(()=>{x(null)}).finally(()=>{O(false)})},[t,r,o,y,w]);var S=(0,n._)({},l&&{"data-colorize":true},p);var T=A?A.viewBox:"0 0 ".concat(r," ").concat(o);var k=A?A.fill:"none";if(!A&&!E){return/*#__PURE__*/(0,s/* .jsx */.Y)("svg",{viewBox:T,children:/*#__PURE__*/(0,s/* .jsx */.Y)("rect",{width:r,height:o,fill:"transparent"})})}return/*#__PURE__*/(0,s/* .jsx */.Y)("svg",(0,i._)((0,n._)({css:[c,{width:r,height:o},b.svg({isColorIcon:l})],xmlns:"http://www.w3.org/2000/svg",viewBox:T,fill:k},S),{role:"presentation","aria-hidden":true,dangerouslySetInnerHTML:{__html:A?A.icon:""}}))};function m(e,t,r,n,i){var a,o,s;if((a=h[t])===null||a===void 0?void 0:a.icon){// Icon already loaded
return Promise.resolve(h[t].icon)}if((o=h[t])===null||o===void 0?void 0:o.promise){// Fetch already in progress, return existing promise
return h[t].promise}var u=e.trim().replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/([a-zA-Z])(\d+)/g,"$1-$2").toLowerCase();var c=!i&&d/* .tutorConfig.is_kids_mode */.P.is_kids_mode&&((s=d/* .tutorConfig.kids_icons_registry */.P.kids_icons_registry)===null||s===void 0?void 0:s.includes(u));var l=c?"assets/icons/kids/":"assets/icons/";var f="".concat(d/* .tutorConfig.tutor_url */.P.tutor_url).concat(l).concat(u,".svg");var p=fetch(f).then(t=>{if(!t.ok){throw new Error("Failed to load icon: ".concat(e))}return t.text()}).then(e=>{var i=new DOMParser;var a=i.parseFromString(e,"image/svg+xml");var o=a.querySelector("svg");var s=(o===null||o===void 0?void 0:o.getAttribute("viewBox"))||"0 0 ".concat(r," ").concat(n);var u=(o===null||o===void 0?void 0:o.getAttribute("fill"))||"none";var c=(o===null||o===void 0?void 0:o.innerHTML)||"";var l={viewBox:s,fill:u,icon:c};h[t]={icon:l};return l}).catch(e=>{h[t]={error:e};throw e});h[t]={loading:true,promise:p};return p}v.displayName="SVGIcon";/* export default */const g=/*#__PURE__*/(0,u.memo)(v,(e,t)=>{var r,n;return e.name===t.name&&e.height===t.height&&e.width===t.width&&e.isColorIcon===t.isColorIcon&&e.ignoreKids===t.ignoreKids&&((r=e.style)===null||r===void 0?void 0:r.name)===((n=t.style)===null||n===void 0?void 0:n.name)});var b={svg:e=>{var{isColorIcon:t=false}=e;return/*#__PURE__*/(0,l/* .css */.AH)("transition:filter 0.3s ease-in-out;",t&&(0,l/* .css */.AH)(p()),";")}}},1883:function(e,t,r){"use strict";r.d(t,{A:()=>h});/* import */var n=r(60599);/* import */var i=r(52639);/* import */var a=r(41594);/* import */var o=/*#__PURE__*/r.n(a);/* import */var s=r(42771);/* import */var u=r(13448);/* import */var c=r(49842);function l(){var e=(0,n._)(["\n      border-radius: ",";\n    "]);l=function t(){return e};return e}function d(){var e=(0,n._)(["\n          background: linear-gradient(89.17deg, #fef4ff 0.2%, #f9d3ff 50.09%, #fef4ff 96.31%);\n        "]);d=function t(){return e};return e}function f(){var e=(0,n._)(["\n      :after {\n        content: '';\n        background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.05), transparent);\n        position: absolute;\n        transform: translateX(-100%);\n        inset: 0;\n        ","\n\n        animation: ","s linear 0.5s infinite normal none running ",";\n      }\n    "]);f=function t(){return e};return e}var p=/*#__PURE__*/(0,a.forwardRef)((e,t)=>{var{width:r="100%",height:n=16,animation:a=false,isMagicAi:o=false,isRound:s=false,animationDuration:u=1.6,className:c}=e;return/*#__PURE__*/(0,i/* .jsx */.Y)("span",{ref:t,css:m.skeleton(r,n,a,o,s,u),className:c})});/* export default */const h=p;var v={wave:/*#__PURE__*/(0,s/* .keyframes */.i7)("0%{transform:translateX(-100%);}50%{transform:translateX(0%);}100%{transform:translateX(100%);}")};var m={skeleton:(e,t,r,n,i,a)=>/*#__PURE__*/(0,s/* .css */.AH)("display:block;width:",(0,c/* .isNumber */.Et)(e)?"".concat(e,"px"):e,";height:",(0,c/* .isNumber */.Et)(t)?"".concat(t,"px"):t,";border-radius:",u/* .borderRadius["6"] */.Vq["6"],";background-color:",!n?"rgba(0, 0, 0, 0.11)":u/* .colorTokens.background.magicAi.skeleton */.I6.background.magicAi.skeleton,";position:relative;-webkit-mask-image:-webkit-radial-gradient(center,white,black);overflow:hidden;",i&&(0,s/* .css */.AH)(l(),u/* .borderRadius.circle */.Vq.circle)," ",r&&(0,s/* .css */.AH)(f(),n&&(0,s/* .css */.AH)(d()),a,v.wave))}},80546:function(e,t,r){"use strict";r.d(t,{A:()=>y});/* import */var n=r(60599);/* import */var i=r(52639);/* import */var a=r(41594);/* import */var o=/*#__PURE__*/r.n(a);/* import */var s=r(42771);/* import */var u=r(13448);/* import */var c=r(81547);/* import */var l=r(59189);/* import */var d=r(33231);/* import */var f=r(56705);function p(){var e=(0,n._)(["\n        width: 26px;\n        height: 16px;\n      "]);p=function t(){return e};return e}function h(){var e=(0,n._)(["\n          top: 2px;\n          left: 3px;\n          width: 12px;\n          height: 12px;\n        "]);h=function t(){return e};return e}function v(){var e=(0,n._)(["\n            left: 11px;\n          "]);v=function t(){return e};return e}function m(){var e=(0,n._)(["\n      right: 3px;\n    "]);m=function t(){return e};return e}function g(){var e=(0,n._)(["\n      left: 3px;\n    "]);g=function t(){return e};return e}var b={switchStyles:e=>/*#__PURE__*/(0,s/* .css */.AH)("&[data-input]{all:unset;appearance:none;border:0;width:40px;height:24px;background:",u/* .colorTokens.color.black["10"] */.I6.color.black["10"],";border-radius:12px;position:relative;display:inline-block;vertical-align:middle;cursor:pointer;transition:background-color 0.25s cubic-bezier(0.785,0.135,0.15,0.86);",e==="small"&&(0,s/* .css */.AH)(p()),"      &::before{display:none !important;}&:focus{border:none;outline:none;box-shadow:none;}&:focus-visible{outline:2px solid ",u/* .colorTokens.stroke.brand */.I6.stroke.brand,";outline-offset:1px;}&:after{content:'';position:absolute;top:3px;left:",u/* .spacing["4"] */.YK["4"],";width:18px;height:18px;background:",u/* .colorTokens.background.white */.I6.background.white,";border-radius:",u/* .borderRadius.circle */.Vq.circle,";box-shadow:",u/* .shadow["switch"] */.r7["switch"],";transition:left 0.25s cubic-bezier(0.785,0.135,0.15,0.86);",e==="small"&&(0,s/* .css */.AH)(h()),"}&:checked{background:",u/* .colorTokens.primary.main */.I6.primary.main,";&:after{left:18px;",e==="small"&&(0,s/* .css */.AH)(v()),"}}&:disabled{pointer-events:none;filter:none;opacity:0.5;}}"),labelStyles:e=>/*#__PURE__*/(0,s/* .css */.AH)(c/* .typography.caption */.I.caption(),";color:",e?u/* .colorTokens.text.title */.I6.text.title:u/* .colorTokens.text.subdued */.I6.text.subdued,";"),wrapperStyle:e=>/*#__PURE__*/(0,s/* .css */.AH)("display:flex;align-items:center;justify-content:space-between;width:fit-content;flex-direction:",e==="left"?"row":"row-reverse",";column-gap:",u/* .spacing["12"] */.YK["12"],";position:relative;"),spinner:e=>/*#__PURE__*/(0,s/* .css */.AH)("display:flex;position:absolute;top:50%;transform:translateY(-50%);",e&&(0,s/* .css */.AH)(m())," ",!e&&(0,s/* .css */.AH)(g()))};var _=/*#__PURE__*/o().forwardRef((e,t)=>{var{id:r=(0,d/* .nanoid */.Ak)(),name:n,label:a,value:o,checked:s,disabled:u,loading:c,onChange:p,labelPosition:h="left",labelCss:v,size:m="regular"}=e;var g=e=>{p===null||p===void 0?void 0:p(e.target.checked,e)};return/*#__PURE__*/(0,i/* .jsxs */.FD)("div",{css:b.wrapperStyle(h),children:[a&&/*#__PURE__*/(0,i/* .jsx */.Y)("label",{css:[b.labelStyles(s||false),v],htmlFor:r,children:a}),/*#__PURE__*/(0,i/* .jsx */.Y)("input",{ref:t,value:o?String(o):undefined,type:"checkbox",name:n,id:r,checked:!!s,disabled:u,css:b.switchStyles(m),onChange:g,"data-input":true}),/*#__PURE__*/(0,i/* .jsx */.Y)(l/* ["default"] */.A,{when:c,children:/*#__PURE__*/(0,i/* .jsx */.Y)("span",{css:b.spinner(!!s),children:/*#__PURE__*/(0,i/* .jsx */.Y)(f/* ["default"] */.Ay,{size:m==="small"?12:20})})})]})});/* export default */const y=_},40925:function(e,t,r){"use strict";r.d(t,{A:()=>D,d:()=>I});/* import */var n=r(41147);/* import */var i=r(14206);/* import */var a=r(60599);/* import */var o=r(52639);/* import */var s=r(41594);/* import */var u=/*#__PURE__*/r.n(s);/* import */var c=r(42771);/* import */var l=r(76035);/* import */var d=r(13448);/* import */var f=r(81547);/* import */var p=r(31569);/* import */var h=r(49842);/* import */var v=r(33231);/* import */var m=r(25074);/* import */var g=r(46225);function b(){var e=(0,a._)(["\n      left: ",";\n      top: calc("," + 60px);\n    "]);b=function t(){return e};return e}function _(){var e=(0,a._)(["\n      right: ",";\n      top: calc("," + 60px);\n    "]);_=function t(){return e};return e}function y(){var e=(0,a._)(["\n      left: 50%;\n      top: calc("," + 60px);\n      transform: translateX(-50%);\n    "]);y=function t(){return e};return e}function w(){var e=(0,a._)(["\n      left: ",";\n      bottom: ",";\n    "]);w=function t(){return e};return e}function A(){var e=(0,a._)(["\n      right: ",";\n      bottom: ",";\n    "]);A=function t(){return e};return e}function x(){var e=(0,a._)(["\n      left: 50%;\n      bottom: ",";\n      transform: translateX(-50%);\n    "]);x=function t(){return e};return e}function E(){var e=(0,a._)(["\n      background: ",";\n    "]);E=function t(){return e};return e}function O(){var e=(0,a._)(["\n      background: ",";\n    "]);O=function t(){return e};return e}function S(){var e=(0,a._)(["\n      background: ",";\n    "]);S=function t(){return e};return e}function T(){var e=(0,a._)(["\n      background: ",";\n\n      h5 {\n        color: ",";\n      }\n\n      svg > path {\n        color: ",";\n      }\n    "]);T=function t(){return e};return e}var k={type:"dark",message:"",autoCloseDelay:3e3,position:"bottom-right"};var C=/*#__PURE__*/u().createContext({showToast:()=>{}});var I=()=>(0,s.useContext)(C);var R=e=>{var{children:t,position:r="bottom-right"}=e;var[a,u]=(0,s.useState)([]);var c=(0,l/* .useTransition */.pn)(a,{from:{opacity:0,y:-40},enter:{opacity:1,y:0},leave:{opacity:.5,y:100},config:{duration:300}});var d=(0,s.useCallback)(e=>{var t=(0,i._)((0,n._)({},k,e),{id:(0,v/* .nanoid */.Ak)()});u(e=>[t,...e]);var r;if(!(0,h/* .isBoolean */.Lm)(t.autoCloseDelay)&&t.autoCloseDelay){r=setTimeout(()=>{u(e=>e.slice(0,-1))},t.autoCloseDelay)}return()=>{clearTimeout(r)}},[]);return/*#__PURE__*/(0,o/* .jsxs */.FD)(C.Provider,{value:{showToast:d},children:[t,/*#__PURE__*/(0,o/* .jsx */.Y)("div",{css:P.toastWrapper(r),children:c((e,t)=>{return/*#__PURE__*/(0,o/* .jsxs */.FD)(p/* .AnimatedDiv */.LK,{"data-cy":"tutor-toast",style:e,css:P.toastItem(t.type),children:[/*#__PURE__*/(0,o/* .jsx */.Y)("h5",{css:P.message,children:t.message}),/*#__PURE__*/(0,o/* .jsx */.Y)(m/* ["default"] */.A,{variant:"text",onClick:()=>{u(e=>e.filter(e=>e.id!==t.id))},children:/*#__PURE__*/(0,o/* .jsx */.Y)(g/* ["default"] */.A,{name:"timesAlt",width:16,height:16})})]},t.id)})})]})};/* export default */const D=R;var P={toastWrapper:e=>/*#__PURE__*/(0,c/* .css */.AH)("display:flex;flex-direction:column;gap:",d/* .spacing["16"] */.YK["16"],";max-width:400px;position:fixed;z-index:",d/* .zIndex.toast */.fE.toast,";",e==="top-left"&&(0,c/* .css */.AH)(b(),d/* .spacing["20"] */.YK["20"],d/* .spacing["20"] */.YK["20"])," ",e==="top-right"&&(0,c/* .css */.AH)(_(),d/* .spacing["20"] */.YK["20"],d/* .spacing["20"] */.YK["20"])," ",e==="top-center"&&(0,c/* .css */.AH)(y(),d/* .spacing["20"] */.YK["20"])," ",e==="bottom-left"&&(0,c/* .css */.AH)(w(),d/* .spacing["20"] */.YK["20"],d/* .spacing["20"] */.YK["20"])," ",e==="bottom-right"&&(0,c/* .css */.AH)(A(),d/* .spacing["20"] */.YK["20"],d/* .spacing["20"] */.YK["20"])," ",e==="bottom-center"&&(0,c/* .css */.AH)(x(),d/* .spacing["20"] */.YK["20"])),toastItem:e=>/*#__PURE__*/(0,c/* .css */.AH)("width:100%;min-height:60px;display:flex;align-items:center;justify-content:space-between;gap:",d/* .spacing["16"] */.YK["16"],";border-radius:",d/* .borderRadius["6"] */.Vq["6"],";padding:",d/* .spacing["16"] */.YK["16"],";svg > path{color:",d/* .colorTokens.icon.white */.I6.icon.white,";}",e==="dark"&&(0,c/* .css */.AH)(E(),d/* .colorTokens.color.black.main */.I6.color.black.main)," ",e==="danger"&&(0,c/* .css */.AH)(O(),d/* .colorTokens.design.error */.I6.design.error)," ",e==="success"&&(0,c/* .css */.AH)(S(),d/* .colorTokens.design.success */.I6.design.success)," ",e==="warning"&&(0,c/* .css */.AH)(T(),d/* .colorTokens.color.warning["70"] */.I6.color.warning["70"],d/* .colorTokens.text.primary */.I6.text.primary,d/* .colorTokens.text.primary */.I6.text.primary)),message:/*#__PURE__*/(0,c/* .css */.AH)(f/* .typography.body */.I.body(),";color:",d/* .colorTokens.text.white */.I6.text.white,";"),timesIcon:/*#__PURE__*/(0,c/* .css */.AH)("path{color:",d/* .colorTokens.icon.white */.I6.icon.white,";}")}},90453:function(e,t,r){"use strict";r.d(t,{A:()=>b});/* import */var n=r(41147);/* import */var i=r(14206);/* import */var a=r(60599);/* import */var o=r(52639);/* import */var s=r(42771);/* import */var u=r(76035);/* import */var c=r(1276);/* import */var l=r(13448);/* import */var d=r(31569);function f(){var e=(0,a._)(["\n        bottom: auto;\n        left: -4px;\n        top: 50%;\n        transform: translateY(-50%) rotate(45deg);\n      "]);f=function t(){return e};return e}function p(){var e=(0,a._)(["\n        bottom: auto;\n        top: -4px;\n        left: 50%;\n        transform: translateX(-50%) rotate(45deg);\n      "]);p=function t(){return e};return e}function h(){var e=(0,a._)(["\n        bottom: auto;\n        top: 50%;\n        left: auto;\n        right: -4px;\n        transform: translateY(-50%) rotate(45deg);\n      "]);h=function t(){return e};return e}var v={opacity:0,transform:"scale(0.8)"};var m={tension:300,friction:15};var g=e=>{var{children:t,content:r,allowHTML:a,placement:s="top",hideOnClick:f,delay:p=0,disabled:h=false,visible:g,wrapperCss:b}=e;var[y,w]=(0,u/* .useSpring */.zh)(()=>v);if(h)return t;var A=()=>{w.start({opacity:1,transform:"scale(1)",config:m})};var x=e=>{var{unmount:t}=e;w.start((0,i._)((0,n._)({},v),{onRest:t,config:(0,i._)((0,n._)({},m),{clamp:true})}))};return/*#__PURE__*/(0,o/* .jsx */.Y)(c/* ["default"] */.A,{render:e=>{return/*#__PURE__*/(0,o/* .jsx */.Y)(d/* .AnimatedDiv */.LK,(0,i._)((0,n._)({style:y,hideOnOverflow:false},e),{css:_.contentBox(s),children:r}))},animation:true,onMount:A,onHide:x,allowHTML:a,delay:[p,100],hideOnClick:f,placement:s,visible:g,zIndex:l/* .zIndex.highest */.fE.highest,children:/*#__PURE__*/(0,o/* .jsx */.Y)("div",{css:b,children:t})})};/* export default */const b=g;var _={contentBox:e=>/*#__PURE__*/(0,s/* .css */.AH)("max-width:250px;width:100%;background-color:",l/* .colorTokens.color.black.main */.I6.color.black.main,";color:",l/* .colorTokens.text.white */.I6.text.white,";border-radius:",l/* .borderRadius["6"] */.Vq["6"],";padding:",l/* .spacing["4"] */.YK["4"]," ",l/* .spacing["8"] */.YK["8"],";font-size:",l/* .fontSize["15"] */.J["15"],";line-height:",l/* .lineHeight["20"] */.K_["20"],";position:relative;&::before{content:'';height:8px;width:8px;background-color:",l/* .colorTokens.color.black.main */.I6.color.black.main,";position:absolute;bottom:-4px;left:50%;transform:translateX(-50%) rotate(45deg);",e==="right"&&(0,s/* .css */.AH)(f())," ",e==="bottom"&&(0,s/* .css */.AH)(p())," ",e==="left"&&(0,s/* .css */.AH)(h()),"}")}},27246:function(e,t,r){"use strict";r.d(t,{A:()=>o});/* import */var n=r(52639);var i;if(false){}else{// eslint-disable-next-line @typescript-eslint/no-require-imports
i=r(16878)/* ["default"] */.A}var a=e=>{var{children:t}=e;return/*#__PURE__*/(0,n/* .jsx */.Y)(i,{children:t})};/* export default */const o=a},16878:function(e,t,r){"use strict";// EXPORTS
r.d(t,{A:()=>/* binding */g});// EXTERNAL MODULE: ./node_modules/.pnpm/@emotion+react@11.14.0_@types+react@18.3.1_react@18.3.1/node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.browser.esm.js
var n=r(52639);// EXTERNAL MODULE: external "React"
var i=r(41594);// EXTERNAL MODULE: ./node_modules/.pnpm/@emotion+react@11.14.0_@types+react@18.3.1_react@18.3.1/node_modules/@emotion/react/dist/emotion-react.browser.esm.js
var a=r(42771);// EXTERNAL MODULE: external "wp.i18n"
var o=r(12470);// EXTERNAL MODULE: ./assets/src/js/v3/shared/atoms/Button.tsx
var s=r(25074);// EXTERNAL MODULE: ./assets/src/js/v3/shared/atoms/SVGIcon.tsx
var u=r(46225);// EXTERNAL MODULE: ./assets/src/js/v3/shared/config/config.ts
var c=r(74412);// EXTERNAL MODULE: ./assets/src/js/v3/shared/config/styles.ts
var l=r(13448);// EXTERNAL MODULE: ./assets/src/js/v3/shared/config/typography.ts
var d=r(81547);// EXTERNAL MODULE: ./assets/src/js/v3/shared/controls/Show.tsx
var f=r(59189);// EXTERNAL MODULE: ./assets/src/js/v3/shared/utils/style-utils.ts
var p=r(52874);// CONCATENATED MODULE: ./assets/src/js/v3/public/images/production-error.webp
const h=r.p+"js/images/production-error-24158233.webp";// CONCATENATED MODULE: ./assets/src/js/v3/public/images/production-error-2x.webp
const v=r.p+"js/images/production-error-2x-dc6519df.webp";// CONCATENATED MODULE: ./assets/src/js/v3/shared/components/ErrorBoundaryProd.tsx
class m extends i.Component{static getDerivedStateFromError(){return{hasError:true}}componentDidCatch(e,t){// eslint-disable-next-line no-console
console.error(e,t)}render(){if(this.state.hasError){return/*#__PURE__*/(0,n/* .jsx */.Y)("div",{css:b.container,children:/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:b.productionErrorWrapper,children:[/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:b.productionErrorHeader,children:[/*#__PURE__*/(0,n/* .jsx */.Y)("img",{src:h,srcSet:"".concat(v," 2x"),alt:(0,o.__)("Error","tutor")}),/*#__PURE__*/(0,n/* .jsx */.Y)("h5",{css:d/* .typography.heading5 */.I.heading5("medium"),children:(0,o.__)("Oops! Something went wrong","tutor")}),/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:b.instructions,children:[/*#__PURE__*/(0,n/* .jsx */.Y)("p",{children:(0,o.__)("Try the following steps to resolve the issue:","tutor")}),/*#__PURE__*/(0,n/* .jsxs */.FD)("ul",{children:[/*#__PURE__*/(0,n/* .jsx */.Y)("li",{children:(0,o.__)("Refresh the page.","tutor")}),/*#__PURE__*/(0,n/* .jsx */.Y)("li",{children:(0,o.__)("Clear your browser cache.","tutor")}),/*#__PURE__*/(0,n/* .jsx */.Y)(f/* ["default"] */.A,{when:c/* .tutorConfig.tutor_pro_url */.P.tutor_pro_url,children:/*#__PURE__*/(0,n/* .jsx */.Y)("li",{children:(0,o.__)("Ensure the Free and Pro plugins are on the same version.","tutor")})})]})]})]}),/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:b.productionFooter,children:[/*#__PURE__*/(0,n/* .jsx */.Y)("div",{children:/*#__PURE__*/(0,n/* .jsx */.Y)(s/* ["default"] */.A,{variant:"secondary",icon:/*#__PURE__*/(0,n/* .jsx */.Y)(u/* ["default"] */.A,{name:"refresh",height:24,width:24}),onClick:()=>window.location.reload(),children:(0,o.__)("Reload","tutor")})}),/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:b.support,children:[/*#__PURE__*/(0,n/* .jsx */.Y)("span",{children:(0,o.__)("Still having trouble?","tutor")}),/*#__PURE__*/(0,n/* .jsx */.Y)("span",{children:(0,o.__)("Contact","tutor")}),/*#__PURE__*/(0,n/* .jsx */.Y)("a",{href:c/* ["default"].TUTOR_SUPPORT_PAGE_URL */.A.TUTOR_SUPPORT_PAGE_URL,children:(0,o.__)("Support","tutor")}),/*#__PURE__*/(0,n/* .jsx */.Y)("span",{children:(0,o.__)("for assistance.","tutor")})]})]})]})})}return this.props.children}constructor(e){super(e);this.state={hasError:false}}}/* export default */const g=m;var b={container:/*#__PURE__*/(0,a/* .css */.AH)("width:100%;height:auto;display:flex;justify-content:center;align-items:center;"),productionErrorWrapper:/*#__PURE__*/(0,a/* .css */.AH)(p/* .styleUtils.display.flex */.x.display.flex("column"),";gap:",l/* .spacing["20"] */.YK["20"],";max-width:500px;width:100%;"),productionErrorHeader:/*#__PURE__*/(0,a/* .css */.AH)(p/* .styleUtils.display.flex */.x.display.flex("column"),";align-items:center;padding:",l/* .spacing["32"] */.YK["32"],";background:",l/* .colorTokens.background.white */.I6.background.white,";border-radius:",l/* .borderRadius["12"] */.Vq["12"],";box-shadow:0px -4px 0px 0px #ff0000;gap:",l/* .spacing["16"] */.YK["16"],";h5{text-align:center;}img{height:104px;width:101px;object-position:center;object-fit:contain;}"),instructions:/*#__PURE__*/(0,a/* .css */.AH)("width:100%;max-width:333px;p{width:100%;",d/* .typography.caption */.I.caption(),";margin-bottom:",l/* .spacing["4"] */.YK["4"],";}ul{padding-left:",l/* .spacing["16"] */.YK["16"],";li{",d/* .typography.caption */.I.caption(),";color:",l/* .colorTokens.text.title */.I6.text.title,";list-style:unset;margin-bottom:",l/* .spacing["2"] */.YK["2"],";&::marker{color:",l/* .colorTokens.icon["default"] */.I6.icon["default"],";}}}"),productionFooter:/*#__PURE__*/(0,a/* .css */.AH)(p/* .styleUtils.display.flex */.x.display.flex("column"),";align-items:center;gap:",l/* .spacing["12"] */.YK["12"],";"),support:/*#__PURE__*/(0,a/* .css */.AH)(p/* .styleUtils.flexCenter */.x.flexCenter("row"),";text-align:center;flex-wrap:wrap;gap:",l/* .spacing["4"] */.YK["4"],";",d/* .typography.caption */.I.caption(),";color:",l/* .colorTokens.text.title */.I6.text.title,";a{color:",l/* .colorTokens.text.brand */.I6.text.brand,";text-decoration:none;}")}},75823:function(e,t,r){"use strict";r.d(t,{A:()=>o});/* import */var n=r(41594);/* import */var i=/*#__PURE__*/r.n(n);var a=e=>{var{children:t,blurPrevious:r=false}=e;var i=(0,n.useRef)(null);var a=(0,n.useRef)(null);(0,n.useEffect)(()=>{var e=i.current;if(!e){return}a.current=document.activeElement;if(r&&a.current&&a.current!==document.body){a.current.blur()}var t=e=>{if(!e||!e.isConnected){return false}var t=getComputedStyle(e);return t.display!=="none"&&t.visibility!=="hidden"&&!e.hidden&&e.offsetParent!==null};var n=()=>{var r='a[href], button, textarea, input, select, [tabindex]:not([tabindex="-1"])';return Array.from(e.querySelectorAll(r)).filter(e=>{return!e.hasAttribute("disabled")&&t(e)})};var o=()=>{var t=document.querySelectorAll('[data-focus-trap="true"]');return t.length>0&&t[t.length-1]===e};var s=t=>{if(!o()||t.key!=="Tab"){return}var r=n();if(r.length===0){return}var i=r[0];var a=r[r.length-1];var s=document.activeElement;if(!e.contains(s)&&document.body!==s){t.preventDefault();i.focus();return}if(t.shiftKey&&s===i){t.preventDefault();a.focus();return}if(!t.shiftKey&&s===a){t.preventDefault();i.focus();return}};document.addEventListener("keydown",s,true);return()=>{document.removeEventListener("keydown",s,true);if(a.current&&t(a.current)){a.current.focus()}};// eslint-disable-next-line react-hooks/exhaustive-deps
},[]);return/*#__PURE__*/(0,n.cloneElement)(n.Children.only(t),{ref:i,"data-focus-trap":"true",tabIndex:-1})};/* export default */const o=a},42263:function(e,t,r){"use strict";r.d(t,{A:()=>D});/* import */var n=r(60599);/* import */var i=r(52639);/* import */var a=r(42771);/* import */var o=r(12470);/* import */var s=/*#__PURE__*/r.n(o);/* import */var u=r(56705);/* import */var c=r(46225);/* import */var l=r(90453);/* import */var d=r(13448);/* import */var f=r(81547);/* import */var p=r(59189);/* import */var h=r(52874);/* import */var v=r(49842);/* import */var m=r(33231);function g(){var e=(0,n._)(["\n      opacity: 0.5;\n    "]);g=function t(){return e};return e}function b(){var e=(0,n._)(["\n      display: none;\n    "]);b=function t(){return e};return e}function _(){var e=(0,n._)(["\n      flex-direction: row;\n      align-items: center;\n      justify-content: space-between;\n      gap: ",";\n    "]);_=function t(){return e};return e}function y(){var e=(0,n._)(["\n        padding: 0 "," 0 ",";\n      "]);y=function t(){return e};return e}function w(){var e=(0,n._)(["\n        border-radius: 0;\n        border: none;\n        box-shadow: none;\n      "]);w=function t(){return e};return e}function A(){var e=(0,n._)(["\n        border-color: transparent;\n      "]);A=function t(){return e};return e}function x(){var e=(0,n._)(["\n          outline-color: ",";\n          background-color: ",";\n        "]);x=function t(){return e};return e}function E(){var e=(0,n._)(["\n          border-color: ",";\n        "]);E=function t(){return e};return e}function O(){var e=(0,n._)(["\n          color: ",";\n        "]);O=function t(){return e};return e}function S(){var e=(0,n._)(["\n        border-color: ",";\n        background-color: ",";\n      "]);S=function t(){return e};return e}function T(){var e=(0,n._)(["\n        border-color: ",";\n        background-color: ",";\n      "]);T=function t(){return e};return e}function k(){var e=(0,n._)(["\n      justify-content: end;\n    "]);k=function t(){return e};return e}function C(){var e=(0,n._)(["\n      color: ",";\n    "]);C=function t(){return e};return e}function I(){var e=(0,n._)(["\n      ",";\n    "]);I=function t(){return e};return e}var R=e=>{var{field:t,fieldState:r,children:n,disabled:a=false,readOnly:s=false,label:f,isInlineLabel:h=false,variant:g,loading:b,placeholder:_,helpText:y,isHidden:w=false,removeBorder:A=false,characterCount:x,isSecondary:E=false,inputStyle:O,wrapperCss:S,inputContainerCss:T,onClickAiButton:k,isMagicAi:C=false,generateWithAi:I=false,replaceEntireLabel:R=false}=e;var D;var M=(0,m/* .nanoid */.Ak)();var F=[P.input({variant:g,hasFieldError:!!r.error,removeBorder:A,readOnly:s,hasHelpText:!!y,isSecondary:E,isMagicAi:C})];if((0,v/* .isDefined */.O9)(O)){F.push(O)}var Y=/*#__PURE__*/(0,i/* .jsxs */.FD)("div",{css:P.inputWrapper,children:[n({id:M,name:t.name,css:F,"aria-invalid":r.error?"true":"false",disabled:a,readOnly:s,placeholder:_,className:"tutor-input-field"}),b&&/*#__PURE__*/(0,i/* .jsx */.Y)("div",{css:P.loader,children:/*#__PURE__*/(0,i/* .jsx */.Y)(u/* ["default"] */.Ay,{size:20,color:d/* .colorTokens.icon["default"] */.I6.icon["default"]})})]});return/*#__PURE__*/(0,i/* .jsxs */.FD)("div",{css:[P.container({disabled:a,isHidden:w}),S],"data-cy":"form-field-wrapper",children:[/*#__PURE__*/(0,i/* .jsxs */.FD)("div",{css:[P.inputContainer(h),T],children:[(f||y)&&/*#__PURE__*/(0,i/* .jsxs */.FD)("div",{css:P.labelContainer,children:[f&&/*#__PURE__*/(0,i/* .jsxs */.FD)("label",{htmlFor:M,css:P.label(h,R),children:[f,/*#__PURE__*/(0,i/* .jsx */.Y)(p/* ["default"] */.A,{when:I,children:/*#__PURE__*/(0,i/* .jsx */.Y)("button",{type:"button",onClick:()=>{k===null||k===void 0?void 0:k()},css:P.aiButton,children:/*#__PURE__*/(0,i/* .jsx */.Y)(c/* ["default"] */.A,{name:"magicAiColorize",width:32,height:32})})})]}),y&&!R&&/*#__PURE__*/(0,i/* .jsx */.Y)(l/* ["default"] */.A,{content:y,placement:"top",allowHTML:true,children:/*#__PURE__*/(0,i/* .jsx */.Y)(c/* ["default"] */.A,{name:"info",width:20,height:20})})]}),x?/*#__PURE__*/(0,i/* .jsx */.Y)(l/* ["default"] */.A,{placement:"right",hideOnClick:false,content:x.maxLimit-x.inputCharacter>=0?x.maxLimit-x.inputCharacter:(0,o.__)("Limit exceeded","tutor"),children:Y}):Y]}),((D=r.error)===null||D===void 0?void 0:D.message)&&/*#__PURE__*/(0,i/* .jsxs */.FD)("p",{css:P.errorLabel(!!r.error,h),children:[/*#__PURE__*/(0,i/* .jsx */.Y)(c/* ["default"] */.A,{style:P.alertIcon,name:"info",width:20,height:20})," ",r.error.message]})]})};/* export default */const D=R;var P={container:e=>{var{disabled:t,isHidden:r}=e;return/*#__PURE__*/(0,a/* .css */.AH)("display:flex;flex-direction:column;position:relative;background:inherit;width:100%;",t&&(0,a/* .css */.AH)(g())," ",r&&(0,a/* .css */.AH)(b()))},inputContainer:e=>/*#__PURE__*/(0,a/* .css */.AH)("display:flex;flex-direction:column;gap:",d/* .spacing["4"] */.YK["4"],";width:100%;",e&&(0,a/* .css */.AH)(_(),d/* .spacing["12"] */.YK["12"])),input:e=>/*#__PURE__*/(0,a/* .css */.AH)("&.tutor-input-field{",f/* .typography.body */.I.body("regular"),";width:100%;border-radius:",d/* .borderRadius["6"] */.Vq["6"],";border:1px solid ",d/* .colorTokens.stroke["default"] */.I6.stroke["default"],";padding:",d/* .spacing["8"] */.YK["8"]," ",d/* .spacing["16"] */.YK["16"],";color:",d/* .colorTokens.text.title */.I6.text.title,";appearance:textfield;&:not(textarea){height:40px;}",e.hasHelpText&&(0,a/* .css */.AH)(y(),d/* .spacing["32"] */.YK["32"],d/* .spacing["12"] */.YK["12"])," ",e.removeBorder&&(0,a/* .css */.AH)(w())," ",e.isSecondary&&(0,a/* .css */.AH)(A()),":focus{",h/* .styleUtils.inputFocus */.x.inputFocus,";",e.isMagicAi&&(0,a/* .css */.AH)(x(),d/* .colorTokens.stroke.magicAi */.I6.stroke.magicAi,d/* .colorTokens.background.magicAi["8"] */.I6.background.magicAi["8"])," ",e.hasFieldError&&(0,a/* .css */.AH)(E(),d/* .colorTokens.stroke.danger */.I6.stroke.danger),"}::-webkit-outer-spin-button,::-webkit-inner-spin-button{-webkit-appearance:none;margin:0;}::placeholder{",f/* .typography.caption */.I.caption("regular"),";color:",d/* .colorTokens.text.hints */.I6.text.hints,";",e.isSecondary&&(0,a/* .css */.AH)(O(),d/* .colorTokens.text.hints */.I6.text.hints),"}",e.hasFieldError&&(0,a/* .css */.AH)(S(),d/* .colorTokens.stroke.danger */.I6.stroke.danger,d/* .colorTokens.background.status.errorFail */.I6.background.status.errorFail)," ",e.readOnly&&(0,a/* .css */.AH)(T(),d/* .colorTokens.background.disable */.I6.background.disable,d/* .colorTokens.background.disable */.I6.background.disable),"}"),errorLabel:(e,t)=>/*#__PURE__*/(0,a/* .css */.AH)(f/* .typography.small */.I.small(),";line-height:",d/* .lineHeight["20"] */.K_["20"],";display:flex;align-items:start;margin-top:",d/* .spacing["4"] */.YK["4"],";",t&&(0,a/* .css */.AH)(k())," ",e&&(0,a/* .css */.AH)(C(),d/* .colorTokens.text.status.onHold */.I6.text.status.onHold),"    & svg{margin-right:",d/* .spacing["2"] */.YK["2"],";transform:rotate(180deg);}"),labelContainer:/*#__PURE__*/(0,a/* .css */.AH)("display:flex;align-items:center;gap:",d/* .spacing["4"] */.YK["4"],";> div{display:flex;color:",d/* .colorTokens.color.black["30"] */.I6.color.black["30"],";}"),label:(e,t)=>/*#__PURE__*/(0,a/* .css */.AH)(f/* .typography.caption */.I.caption(),";margin:0px;width:",t?"100%":"auto",";color:",d/* .colorTokens.text.title */.I6.text.title,";display:flex;align-items:center;gap:",d/* .spacing["4"] */.YK["4"],";",e&&(0,a/* .css */.AH)(I(),f/* .typography.caption */.I.caption())),aiButton:/*#__PURE__*/(0,a/* .css */.AH)(h/* .styleUtils.resetButton */.x.resetButton,";width:32px;height:32px;border-radius:",d/* .borderRadius["4"] */.Vq["4"],";display:flex;align-items:center;justify-content:center;:disabled{cursor:not-allowed;}&:focus,&:active,&:hover{background:none;}&:focus-visible{outline:2px solid ",d/* .colorTokens.stroke.brand */.I6.stroke.brand,";}"),inputWrapper:/*#__PURE__*/(0,a/* .css */.AH)("position:relative;"),loader:/*#__PURE__*/(0,a/* .css */.AH)("position:absolute;top:50%;right:",d/* .spacing["12"] */.YK["12"],";transform:translateY(-50%);display:flex;"),alertIcon:/*#__PURE__*/(0,a/* .css */.AH)("flex-shrink:0;")}},91224:function(e,t,r){"use strict";r.d(t,{A:()=>M});/* import */var n=r(41147);/* import */var i=r(14206);/* import */var a=r(60599);/* import */var o=r(52639);/* import */var s=r(41594);/* import */var u=/*#__PURE__*/r.n(s);/* import */var c=r(42771);/* import */var l=r(12470);/* import */var d=/*#__PURE__*/r.n(l);/* import */var f=r(25074);/* import */var p=r(46225);/* import */var h=r(42263);/* import */var v=r(88325);/* import */var m=r(17944);/* import */var g=r(19448);/* import */var b=r(3311);/* import */var _=r(74412);/* import */var y=r(13448);/* import */var w=r(59189);/* import */var A=r(57587);/* import */var x=r(52874);/* import */var E=r(49842);/* import */var O=r(33231);/* import */var S=r(55051);/* import */var T=r(17064);function k(){var e=(0,a._)(["\n        height: 32px;\n        padding: "," ",";\n      "]);k=function t(){return e};return e}function C(){var e=(0,a._)(["\n      svg {\n        color: ",";\n      }\n    "]);C=function t(){return e};return e}var I;var R=!!_/* .tutorConfig.tutor_pro_url */.P.tutor_pro_url;var D=(I=_/* .tutorConfig.settings */.P.settings)===null||I===void 0?void 0:I.chatgpt_key_exist;var P=e=>{var{size:t="regular",label:r,type:a="text",maxLimit:u,field:c,fieldState:d,disabled:_,readOnly:y,loading:A,placeholder:k,helpText:C,onChange:I,onKeyDown:P,isHidden:M,isClearable:Y=false,isSecondary:L=false,removeBorder:N,dataAttribute:H,isInlineLabel:j=false,isPassword:U=false,style:B,formFieldWrapperCss:K,inputContainerCss:z,selectOnFocus:q=false,autoFocus:V=false,generateWithAi:W=false,isMagicAi:G=false,allowNegative:$=false,onClickAiButton:Q}=e;var[X,J]=(0,s.useState)(a);var{showModal:Z}=(0,m/* .useModal */.h)();var ee=(0,s.useRef)(null);var et;var er=(et=c.value)!==null&&et!==void 0?et:"";var en=undefined;if(X==="number"){er=(0,O/* .parseNumberOnly */.TW)("".concat(er),$).replace(/(\..*)\./g,"$1")}if(u){en={maxLimit:u,inputCharacter:er.toString().length}}var ei=(0,n._)({},(0,E/* .isDefined */.O9)(H)&&{[H]:true});var ea=()=>{if(!R){Z({component:g/* ["default"] */.A,props:{image:S,image2x:T}})}else if(!D){Z({component:b/* ["default"] */.A,props:{image:S,image2x:T}})}else{Z({component:v/* ["default"] */.A,isMagicAi:true,props:{title:(0,l.__)("AI Studio","tutor"),icon:/*#__PURE__*/(0,o/* .jsx */.Y)(p/* ["default"] */.A,{name:"magicAiColorize",width:24,height:24}),characters:120,field:c,fieldState:d,format:"title",is_html:false,fieldLabel:(0,l.__)("Create a Compelling Title","tutor"),fieldPlaceholder:(0,l.__)("Describe the main focus of your course in a few words","tutor")}});Q===null||Q===void 0?void 0:Q()}};return/*#__PURE__*/(0,o/* .jsx */.Y)(h/* ["default"] */.A,{label:r,field:c,fieldState:d,disabled:_,readOnly:y,loading:A,placeholder:k,helpText:C,isHidden:M,characterCount:en,isSecondary:L,removeBorder:N,isInlineLabel:j,inputStyle:B,wrapperCss:K,inputContainerCss:z,generateWithAi:W,onClickAiButton:ea,isMagicAi:G,children:e=>{return/*#__PURE__*/(0,o/* .jsx */.Y)(o/* .Fragment */.FK,{children:/*#__PURE__*/(0,o/* .jsxs */.FD)("div",{css:F.container(Y||U),children:[/*#__PURE__*/(0,o/* .jsx */.Y)("input",(0,i._)((0,n._)({},c,e,ei),{css:[e.css,F.input(t)],type:X==="number"?"text":X,value:er,autoFocus:V,onChange:e=>{var{value:t}=e.target;var r=X==="number"?(0,O/* .parseNumberOnly */.TW)(t):t;c.onChange(r);if(I){I(r)}},onClick:e=>{e.stopPropagation()},onKeyDown:e=>{e.stopPropagation();P===null||P===void 0?void 0:P(e.key)},autoComplete:"off",ref:e=>{c.ref(e);// @ts-ignore
ee.current=e;// this is not ideal but it is the only way to set ref to the input element
},onFocus:()=>{if(!q||!ee.current){return}ee.current.select()}})),/*#__PURE__*/(0,o/* .jsx */.Y)(w/* ["default"] */.A,{when:U,children:/*#__PURE__*/(0,o/* .jsx */.Y)(f/* ["default"] */.A,{isIconOnly:true,variant:"text",size:"small",onClick:()=>J(e=>e==="password"?"text":"password"),icon:/*#__PURE__*/(0,o/* .jsx */.Y)(p/* ["default"] */.A,{name:"eye",width:24,height:24}),"aria-label":(0,l.__)("Show/Hide Password","tutor"),buttonCss:F.eyeButton({type:X})})}),/*#__PURE__*/(0,o/* .jsx */.Y)(w/* ["default"] */.A,{when:Y&&!!c.value&&X!=="password",children:/*#__PURE__*/(0,o/* .jsx */.Y)(f/* ["default"] */.A,{isIconOnly:true,variant:"text",size:"small",onClick:()=>c.onChange(""),buttonCss:x/* .styleUtils.inputClearButton */.x.inputClearButton,icon:/*#__PURE__*/(0,o/* .jsx */.Y)(p/* ["default"] */.A,{name:"cross",width:24,height:24}),"aria-label":(0,l.__)("Clear","tutor")})})]})})}})};/* export default */const M=(0,A/* .withVisibilityControl */.M)(P);var F={input:e=>/*#__PURE__*/(0,c/* .css */.AH)("&.tutor-input-field:not(textarea){min-height:auto;",e==="small"&&(0,c/* .css */.AH)(k(),y/* .spacing["6"] */.YK["6"],y/* .spacing["12"] */.YK["12"]),"}"),container:e=>/*#__PURE__*/(0,c/* .css */.AH)("position:relative;display:flex;input{&.tutor-input-field{",e&&"padding-right: ".concat(y/* .spacing["36"] */.YK["36"],";"),";}}"),eyeButton:e=>{var{type:t}=e;return/*#__PURE__*/(0,c/* .css */.AH)(x/* .styleUtils.inputClearButton */.x.inputClearButton,";",t!=="password"&&(0,c/* .css */.AH)(C(),y/* .colorTokens.icon.brand */.I6.icon.brand))}}},99864:function(e,t,r){"use strict";r.d(t,{A:()=>B});/* import */var n=r(41147);/* import */var i=r(14206);/* import */var a=r(17900);/* import */var o=r(60599);/* import */var s=r(52639);/* import */var u=r(41594);/* import */var c=/*#__PURE__*/r.n(u);/* import */var l=r(42771);/* import */var d=r(12470);/* import */var f=/*#__PURE__*/r.n(d);/* import */var p=r(25074);/* import */var h=r(46225);/* import */var v=r(13448);/* import */var m=r(81547);/* import */var g=r(59189);/* import */var b=r(31569);/* import */var _=r(27630);/* import */var y=r(21678);/* import */var w=r(52874);/* import */var A=r(49842);/* import */var x=r(33231);/* import */var E=r(42263);function O(){var e=(0,o._)(["\n      &::before {\n        content: '';\n        position: absolute;\n        inset: 0;\n        background: ",";\n        color: ",";\n        border: 1px solid transparent;\n        -webkit-mask:\n          linear-gradient(#fff 0 0) padding-box,\n          linear-gradient(#fff 0 0);\n        -webkit-mask-composite: xor;\n        mask-composite: exclude;\n        border-radius: 6px;\n      }\n    "]);O=function t(){return e};return e}function S(){var e=(0,o._)(["\n        height: 32px;\n        padding-top: ",";\n        padding-bottom: ",";\n      "]);S=function t(){return e};return e}function T(){var e=(0,o._)(["\n        padding-left: ",";\n      "]);T=function t(){return e};return e}function k(){var e=(0,o._)(["\n          height: 48px;\n          padding-bottom: ",";\n        "]);k=function t(){return e};return e}function C(){var e=(0,o._)(["\n        height: 56px;\n        padding-bottom: ",";\n\n        ","\n      "]);C=function t(){return e};return e}function I(){var e=(0,o._)(["\n        background-color: ",";\n      "]);I=function t(){return e};return e}function R(){var e=(0,o._)(["\n        position: relative;\n        border: none;\n        background: transparent;\n      "]);R=function t(){return e};return e}function D(){var e=(0,o._)(["\n          outline-color: ",";\n          background-color: ",";\n        "]);D=function t(){return e};return e}function P(){var e=(0,o._)(["\n          border-color: ",";\n          background-color: ",";\n        "]);P=function t(){return e};return e}function M(){var e=(0,o._)(["\n      bottom: ",";\n    "]);M=function t(){return e};return e}function F(){var e=(0,o._)(["\n      padding-left: calc("," + 1px);\n    "]);F=function t(){return e};return e}function Y(){var e=(0,o._)(["\n        color: ",";\n\n        &:hover {\n          text-decoration: underline;\n        }\n      "]);Y=function t(){return e};return e}function L(){var e=(0,o._)(["\n      min-width: 200px;\n    "]);L=function t(){return e};return e}function N(){var e=(0,o._)(["\n      background-color: ",";\n    "]);N=function t(){return e};return e}function H(){var e=(0,o._)(["\n      background-color: ",";\n      position: relative;\n\n      &::before {\n        content: '';\n        position: absolute;\n        top: 0;\n        left: 0;\n        width: 3px;\n        height: 100%;\n        background-color: ",";\n        border-radius: 0 "," "," 0;\n      }\n    "]);H=function t(){return e};return e}function j(){var e=(0,o._)(["\n      transform: rotate(180deg);\n    "]);j=function t(){return e};return e}var U=e=>{var{size:t="regular",leftIconPadding:r=48,wrapperCss:o,options:c,field:l,fieldState:f,onChange:v=x/* .noop */.lQ,label:m,placeholder:w="",disabled:O,readOnly:S,loading:T,isSearchable:k=false,isInlineLabel:C,hideCaret:I,listLabel:R,isClearable:D=false,helpText:P,removeOptionsMinWidth:M=false,leftIcon:F,iconSize:Y,removeBorder:L,dataAttribute:N,isSecondary:H=false,isMagicAi:j=false,isAiOutline:U=false,selectOnFocus:B,optionItemCss:z}=e;var q;var V=Y!==null&&Y!==void 0?Y:t==="small"?20:32;var W=(0,u.useCallback)(()=>c.find(e=>e.value===l.value)||{label:"",value:"",description:""},[l.value,c]);var G=(0,u.useMemo)(()=>c.some(e=>(0,A/* .isDefined */.O9)(e.description)),[c]);var[$,Q]=(0,u.useState)((q=W())===null||q===void 0?void 0:q.label);var[X,J]=(0,u.useState)(false);var[Z,ee]=(0,u.useState)("");var[et,er]=(0,u.useState)(false);var en=(0,u.useRef)(null);var ei=(0,u.useRef)(null);var ea=(0,u.useRef)(null);var eo=(0,u.useRef)(null);var es=(0,u.useMemo)(()=>{if(k){return c.filter(e=>{var{label:t}=e;return t.toLowerCase().includes(Z.toLowerCase())})}return c},[Z,k,c]);var eu=(0,u.useMemo)(()=>{return c.find(e=>e.value===l.value)},[l.value,c]);var ec=(0,n._)({},(0,A/* .isDefined */.O9)(N)&&{[N]:true});(0,u.useEffect)(()=>{var e;Q((e=W())===null||e===void 0?void 0:e.label)},[l.value,W]);(0,u.useEffect)(()=>{if(et){var e;Q((e=W())===null||e===void 0?void 0:e.label)}},[W,et]);var el=(e,t)=>{t===null||t===void 0?void 0:t.stopPropagation();if(!e.disabled){er(false);J(false);ee("");l.onChange(e.value);v(e)}};var{activeIndex:ed,setActiveIndex:ef}=(0,_/* .useSelectKeyboardNavigation */.v)({options:es,isOpen:et,selectedValue:l.value,onSelect:el,onClose:()=>{er(false);J(false);ee("")}});(0,u.useEffect)(()=>{if(et&&ed>=0&&eo.current){eo.current.scrollIntoView({block:"nearest",behavior:"smooth"})}},[et,ed]);return/*#__PURE__*/(0,s/* .jsx */.Y)(E/* ["default"] */.A,{fieldState:f,field:l,label:m,disabled:O||c.length===0,readOnly:S,loading:T,isInlineLabel:C,helpText:P,removeBorder:L,isSecondary:H,isMagicAi:j,children:e=>{var u,v;var{css:m}=e,_=(0,a._)(e,["css"]);return/*#__PURE__*/(0,s/* .jsxs */.FD)("div",{css:K.mainWrapper,children:[/*#__PURE__*/(0,s/* .jsxs */.FD)("div",{css:K.inputWrapper(U),ref:ei,children:[/*#__PURE__*/(0,s/* .jsxs */.FD)("div",{css:K.leftIcon,children:[/*#__PURE__*/(0,s/* .jsx */.Y)(g/* ["default"] */.A,{when:F,children:F}),/*#__PURE__*/(0,s/* .jsx */.Y)(g/* ["default"] */.A,{when:eu===null||eu===void 0?void 0:eu.icon,children:e=>/*#__PURE__*/(0,s/* .jsx */.Y)(h/* ["default"] */.A,{name:e,width:V,height:V})})]}),/*#__PURE__*/(0,s/* .jsxs */.FD)("div",{css:{width:"100%"},children:[/*#__PURE__*/(0,s/* .jsx */.Y)("input",(0,i._)((0,n._)({},_,ec),{ref:e=>{l.ref(e);// @ts-ignore
en.current=e;// this is not ideal but it is the only way to set ref to the input element
},className:"tutor-input-field",css:[m,o,K.input({hasLeftIcon:!!F||!!(eu===null||eu===void 0?void 0:eu.icon),leftIconPadding:r,hasDescription:G,hasError:!!f.error,isMagicAi:j,isAiOutline:U,size:t})],autoComplete:"off",readOnly:S||!k,placeholder:w,value:X?Z:$,title:$,onClick:e=>{var t;e.stopPropagation();er(e=>!e);(t=en.current)===null||t===void 0?void 0:t.focus()},onKeyDown:e=>{if(e.key==="Enter"){var t;e.preventDefault();er(e=>!e);(t=en.current)===null||t===void 0?void 0:t.focus()}if(e.key==="Tab"){er(false)}},onFocus:B&&k?e=>{e.target.select()}:undefined,onChange:e=>{Q(e.target.value);if(k){J(true);ee(e.target.value)}},"data-select":true})),/*#__PURE__*/(0,s/* .jsx */.Y)(g/* ["default"] */.A,{when:G,children:/*#__PURE__*/(0,s/* .jsx */.Y)("span",{css:K.description({hasLeftIcon:!!F,leftIconPadding:r,size:t}),title:(u=W())===null||u===void 0?void 0:u.description,children:(v=W())===null||v===void 0?void 0:v.description})})]}),!I&&!T&&/*#__PURE__*/(0,s/* .jsx */.Y)("button",{tabIndex:-1,type:"button",css:K.caretButton({isOpen:et}),onClick:()=>{var e;er(e=>!e);(e=en.current)===null||e===void 0?void 0:e.focus()},disabled:O||S||c.length===0,children:/*#__PURE__*/(0,s/* .jsx */.Y)(h/* ["default"] */.A,{name:"chevronDown",width:t==="small"?16:20,height:t==="small"?16:20})})]}),/*#__PURE__*/(0,s/* .jsx */.Y)(y/* ["default"] */.A,{triggerRef:ei,isOpen:et,dependencies:[es.length],animationType:b/* .AnimationType.slideDown */.J6.slideDown,closePopover:()=>{er(false);J(false);ee("")},children:/*#__PURE__*/(0,s/* .jsxs */.FD)("ul",{css:[K.options(M)],children:[!!R&&/*#__PURE__*/(0,s/* .jsx */.Y)("li",{css:K.listLabel,children:R}),/*#__PURE__*/(0,s/* .jsx */.Y)(g/* ["default"] */.A,{when:es.length>0,fallback:/*#__PURE__*/(0,s/* .jsx */.Y)("li",{css:K.emptyState,children:(0,d.__)("No options available","tutor")}),children:es.map((e,t)=>/*#__PURE__*/(0,s/* .jsx */.Y)("li",{ref:e.value===l.value?ea:ed===t?eo:null,css:[K.optionItem({isSelected:e.value===l.value,isActive:t===ed,isDisabled:!!e.disabled}),z],children:/*#__PURE__*/(0,s/* .jsxs */.FD)("button",{type:"button",css:K.label,onClick:t=>{if(!e.disabled){el(e,t)}},disabled:e.disabled,title:e.label,onMouseOver:()=>ef(t),onMouseLeave:()=>t!==ed&&ef(-1),onFocus:()=>ef(t),"aria-selected":ed===t,children:[/*#__PURE__*/(0,s/* .jsx */.Y)(g/* ["default"] */.A,{when:e.icon,children:/*#__PURE__*/(0,s/* .jsx */.Y)(h/* ["default"] */.A,{name:e.icon,width:V,height:V})}),/*#__PURE__*/(0,s/* .jsx */.Y)("span",{children:e.label})]})},String(e.value)))}),D&&/*#__PURE__*/(0,s/* .jsx */.Y)("div",{css:K.clearButton({isDisabled:$===""}),children:/*#__PURE__*/(0,s/* .jsx */.Y)(p/* ["default"] */.A,{variant:"text",disabled:$==="",icon:/*#__PURE__*/(0,s/* .jsx */.Y)(h/* ["default"] */.A,{name:"delete"}),onClick:()=>{l.onChange(null);Q("");ee("");er(false)},children:(0,d.__)("Clear","tutor")})})]})})]})}})};/* export default */const B=U;var K={mainWrapper:/*#__PURE__*/(0,l/* .css */.AH)("width:100%;"),inputWrapper:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:false;return/*#__PURE__*/(0,l/* .css */.AH)("width:100%;display:flex;justify-content:space-between;align-items:center;position:relative;",e&&(0,l/* .css */.AH)(O(),v/* .colorTokens.ai.gradient_1 */.I6.ai.gradient_1,v/* .colorTokens.text.primary */.I6.text.primary))},leftIcon:/*#__PURE__*/(0,l/* .css */.AH)("position:absolute;left:",v/* .spacing["8"] */.YK["8"],";",w/* .styleUtils.display.flex */.x.display.flex(),";align-items:center;height:100%;color:",v/* .colorTokens.icon["default"] */.I6.icon["default"],";z-index:",v/* .zIndex.positive */.fE.positive,";"),input:e=>{var{hasLeftIcon:t,leftIconPadding:r,hasDescription:n,hasError:i=false,isMagicAi:a=false,isAiOutline:o=false,size:s}=e;return/*#__PURE__*/(0,l/* .css */.AH)("&.tutor-input-field:not(textarea){",m/* .typography.body */.I.body(),";width:100%;cursor:pointer;padding-right:",v/* .spacing["32"] */.YK["32"],";",w/* .styleUtils.textEllipsis */.x.textEllipsis,";background-color:transparent;background-color:",v/* .colorTokens.background.white */.I6.background.white,";",s==="small"&&(0,l/* .css */.AH)(S(),v/* .spacing["6"] */.YK["6"],v/* .spacing["6"] */.YK["6"])," ",t&&(0,l/* .css */.AH)(T(),v/* .spacing */.YK[r])," ",n&&(0,l/* .css */.AH)(C(),v/* .spacing["24"] */.YK["24"],s==="small"&&(0,l/* .css */.AH)(k(),v/* .spacing["20"] */.YK["20"]))," ",i&&(0,l/* .css */.AH)(I(),v/* .colorTokens.background.status.errorFail */.I6.background.status.errorFail)," ",o&&(0,l/* .css */.AH)(R()),":focus{",w/* .styleUtils.inputFocus */.x.inputFocus,";",a&&(0,l/* .css */.AH)(D(),v/* .colorTokens.stroke.magicAi */.I6.stroke.magicAi,v/* .colorTokens.background.magicAi["8"] */.I6.background.magicAi["8"])," ",i&&(0,l/* .css */.AH)(P(),v/* .colorTokens.stroke.danger */.I6.stroke.danger,v/* .colorTokens.background.status.errorFail */.I6.background.status.errorFail),"}}")},description:e=>{var{hasLeftIcon:t,leftIconPadding:r,size:n}=e;return/*#__PURE__*/(0,l/* .css */.AH)(m/* .typography.small */.I.small(),";",w/* .styleUtils.text.ellipsis */.x.text.ellipsis(1),"    color:",v/* .colorTokens.text.hints */.I6.text.hints,";position:absolute;bottom:",v/* .spacing["8"] */.YK["8"],";padding-inline:calc(",v/* .spacing["16"] */.YK["16"]," + 1px) ",v/* .spacing["32"] */.YK["32"],";",n==="small"&&(0,l/* .css */.AH)(M(),v/* .spacing["4"] */.YK["4"])," ",t&&(0,l/* .css */.AH)(F(),v/* .spacing */.YK[r]))},listLabel:/*#__PURE__*/(0,l/* .css */.AH)(m/* .typography.body */.I.body(),";color:",v/* .colorTokens.text.subdued */.I6.text.subdued,";min-height:40px;display:flex;align-items:center;padding-left:",v/* .spacing["16"] */.YK["16"],";"),clearButton:e=>{var{isDisabled:t=false}=e;return/*#__PURE__*/(0,l/* .css */.AH)("padding:",v/* .spacing["4"] */.YK["4"]," ",v/* .spacing["8"] */.YK["8"],";border-top:1px solid ",v/* .colorTokens.stroke["default"] */.I6.stroke["default"],";& > button{padding:0;width:100%;font-size:",v/* .fontSize["12"] */.J["12"],";> span{justify-content:center;}",!t&&(0,l/* .css */.AH)(Y(),v/* .colorTokens.text.title */.I6.text.title),"}")},options:e=>/*#__PURE__*/(0,l/* .css */.AH)("z-index:",v/* .zIndex.dropdown */.fE.dropdown,";background-color:",v/* .colorTokens.background.white */.I6.background.white,";list-style-type:none;box-shadow:",v/* .shadow.popover */.r7.popover,";padding:",v/* .spacing["4"] */.YK["4"]," 0;margin:0;max-height:500px;border-radius:",v/* .borderRadius["6"] */.Vq["6"],";",w/* .styleUtils.overflowYAuto */.x.overflowYAuto,";scrollbar-gutter:auto;",!e&&(0,l/* .css */.AH)(L())),optionItem:e=>{var{isSelected:t=false,isActive:r=false,isDisabled:n=false}=e;return/*#__PURE__*/(0,l/* .css */.AH)(m/* .typography.body */.I.body(),";min-height:36px;height:100%;width:100%;display:flex;align-items:center;transition:background-color 0.3s ease-in-out;cursor:",n?"not-allowed":"pointer",";opacity:",n?.5:1,";",r&&(0,l/* .css */.AH)(N(),v/* .colorTokens.background.hover */.I6.background.hover),"    &:hover{background-color:",!n&&v/* .colorTokens.background.hover */.I6.background.hover,";}",!n&&t&&(0,l/* .css */.AH)(H(),v/* .colorTokens.background.active */.I6.background.active,v/* .colorTokens.action.primary["default"] */.I6.action.primary["default"],v/* .borderRadius["6"] */.Vq["6"],v/* .borderRadius["6"] */.Vq["6"]))},label:/*#__PURE__*/(0,l/* .css */.AH)(w/* .styleUtils.resetButton */.x.resetButton,";",w/* .styleUtils.text.ellipsis */.x.text.ellipsis(1),";color:",v/* .colorTokens.text.title */.I6.text.title,";width:100%;height:100%;display:flex;align-items:center;gap:",v/* .spacing["8"] */.YK["8"],";margin:0 ",v/* .spacing["12"] */.YK["12"],";padding:",v/* .spacing["6"] */.YK["6"]," 0;text-align:left;line-height:",v/* .lineHeight["24"] */.K_["24"],";word-break:break-all;cursor:pointer;&:hover,&:focus,&:active{background-color:transparent;color:",v/* .colorTokens.text.title */.I6.text.title,";}span{flex-shrink:0;",w/* .styleUtils.text.ellipsis */.x.text.ellipsis(1),"      width:100%;}svg{flex-shrink:0;}"),arrowUpDown:/*#__PURE__*/(0,l/* .css */.AH)("color:",v/* .colorTokens.icon["default"] */.I6.icon["default"],";display:flex;justify-content:center;align-items:center;margin-top:",v/* .spacing["2"] */.YK["2"],";"),optionsContainer:/*#__PURE__*/(0,l/* .css */.AH)("position:absolute;overflow:hidden auto;min-width:16px;max-width:calc(100% - 32px);"),caretButton:e=>{var{isOpen:t=false}=e;return/*#__PURE__*/(0,l/* .css */.AH)(w/* .styleUtils.resetButton */.x.resetButton,";position:absolute;right:",v/* .spacing["4"] */.YK["4"],";display:flex;align-items:center;transition:transform 0.3s ease-in-out;color:",v/* .colorTokens.icon["default"] */.I6.icon["default"],";border-radius:",v/* .borderRadius["4"] */.Vq["4"],";padding:",v/* .spacing["6"] */.YK["6"],";height:100%;&:focus,&:active,&:hover{background:none;color:",v/* .colorTokens.icon["default"] */.I6.icon["default"],";}&:focus-visible{outline:2px solid ",v/* .colorTokens.stroke.brand */.I6.stroke.brand,";}",t&&(0,l/* .css */.AH)(j()))},emptyState:/*#__PURE__*/(0,l/* .css */.AH)(w/* .styleUtils.flexCenter */.x.flexCenter(),";padding:",v/* .spacing["8"] */.YK["8"],";")}},9694:function(e,t,r){"use strict";r.d(t,{A:()=>f});/* import */var n=r(41147);/* import */var i=r(14206);/* import */var a=r(52639);/* import */var o=r(42771);/* import */var s=r(80546);/* import */var u=r(13448);/* import */var c=r(57587);/* import */var l=r(42263);var d=e=>{var{field:t,fieldState:r,label:o,disabled:u,loading:c,labelPosition:d="left",helpText:f,isHidden:h,labelCss:v,onChange:m}=e;return/*#__PURE__*/(0,a/* .jsx */.Y)(l/* ["default"] */.A,{label:o,field:t,fieldState:r,loading:c,helpText:f,isHidden:h,isInlineLabel:true,children:e=>{return/*#__PURE__*/(0,a/* .jsx */.Y)("div",{css:p.wrapper,children:/*#__PURE__*/(0,a/* .jsx */.Y)(s/* ["default"] */.A,(0,i._)((0,n._)({},t,e),{disabled:u,checked:t.value,labelCss:v,labelPosition:d,onChange:()=>{t.onChange(!t.value);m===null||m===void 0?void 0:m(!t.value)}}))})}})};/* export default */const f=(0,c/* .withVisibilityControl */.M)(d);var p={wrapper:/*#__PURE__*/(0,o/* .css */.AH)("display:flex;align-items:center;justify-content:space-between;gap:",u/* .spacing["40"] */.YK["40"],";")}},74054:function(e,t,r){"use strict";r.d(t,{A:()=>b});/* import */var n=r(41147);/* import */var i=r(14206);/* import */var a=r(60599);/* import */var o=r(52639);/* import */var s=r(41594);/* import */var u=/*#__PURE__*/r.n(s);/* import */var c=r(42771);/* import */var l=r(13448);/* import */var d=r(81547);/* import */var f=r(57587);/* import */var p=r(52874);/* import */var h=r(42263);function v(){var e=(0,a._)(["\n        resize: vertical;\n      "]);v=function t(){return e};return e}var m=6;var g=e=>{var{label:t,rows:r=m,columns:a,maxLimit:u,field:c,fieldState:l,disabled:d,readOnly:f,loading:p,placeholder:v,helpText:g,onChange:b,onKeyDown:y,isHidden:w,enableResize:A=true,isSecondary:x=false,isMagicAi:E=false,inputCss:O,maxHeight:S,autoResize:T=false}=e;var k;var C=(k=c.value)!==null&&k!==void 0?k:"";var I=(0,s.useRef)(null);var R=undefined;if(u){R={maxLimit:u,inputCharacter:C.toString().length}}var D=()=>{if(I.current){if(S){I.current.style.maxHeight="".concat(S,"px")}I.current.style.height="auto";I.current.style.height="".concat(I.current.scrollHeight,"px")}};(0,s.useLayoutEffect)(()=>{if(T){D()}// eslint-disable-next-line react-hooks/exhaustive-deps
},[]);return/*#__PURE__*/(0,o/* .jsx */.Y)(h/* ["default"] */.A,{label:t,field:c,fieldState:l,disabled:d,readOnly:f,loading:p,placeholder:v,helpText:g,isHidden:w,characterCount:R,isSecondary:x,isMagicAi:E,children:e=>{return/*#__PURE__*/(0,o/* .jsx */.Y)(o/* .Fragment */.FK,{children:/*#__PURE__*/(0,o/* .jsx */.Y)("div",{css:_.container(A,O),children:/*#__PURE__*/(0,o/* .jsx */.Y)("textarea",(0,i._)((0,n._)({},c,e),{ref:e=>{c.ref(e);// @ts-ignore
I.current=e;// this is not ideal but it is the only way to set ref to the input element
},style:{maxHeight:S?"".concat(S,"px"):"none"},className:"tutor-input-field",value:C,onChange:e=>{var{value:t}=e.target;if(u&&t.trim().length>u){return}c.onChange(t);if(b){b(t)}if(T){D()}},onKeyDown:e=>{y===null||y===void 0?void 0:y(e.key)},autoComplete:"off",rows:r,cols:a}))})})}})};/* export default */const b=(0,f/* .withVisibilityControl */.M)(g);var _={container:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:false,t=arguments.length>1?arguments[1]:void 0;return/*#__PURE__*/(0,c/* .css */.AH)("position:relative;display:flex;textarea{",d/* .typography.body */.I.body(),";height:auto;padding:",l/* .spacing["8"] */.YK["8"]," ",l/* .spacing["12"] */.YK["12"],";resize:none;",p/* .styleUtils.overflowYAuto */.x.overflowYAuto,";&.tutor-input-field{",t,";}",e&&(0,c/* .css */.AH)(v()),"}")}}},31542:function(e,t,r){"use strict";r.d(t,{m:()=>c});/* import */var n=r(52639);/* import */var i=r(42771);/* import */var a=r(13448);/* import */var o=r(81547);/* import */var s=r(3013);/* import */var u=r(52874);var c=e=>{var{options:t,onChange:r}=e;return/*#__PURE__*/(0,n/* .jsx */.Y)("div",{css:l.wrapper,children:/*#__PURE__*/(0,n/* .jsx */.Y)(s/* ["default"] */.A,{each:t,children:(e,t)=>{return/*#__PURE__*/(0,n/* .jsx */.Y)("button",{type:"button",onClick:()=>r(e.value),css:l.item,children:e.label},t)}})})};var l={wrapper:/*#__PURE__*/(0,i/* .css */.AH)("display:flex;flex-direction:column;padding-block:",a/* .spacing["8"] */.YK["8"],";max-height:400px;overflow-y:auto;"),item:/*#__PURE__*/(0,i/* .css */.AH)(u/* .styleUtils.resetButton */.x.resetButton,";",o/* .typography.caption */.I.caption(),";width:100%;padding:",a/* .spacing["4"] */.YK["4"]," ",a/* .spacing["16"] */.YK["16"],";color:",a/* .colorTokens.text.subdued */.I6.text.subdued,";display:flex;align-items:center;&:hover{background-color:",a/* .colorTokens.background.hover */.I6.background.hover,";color:",a/* .colorTokens.text.title */.I6.text.title,";}")}},69541:function(e,t,r){"use strict";r.d(t,{p:()=>h});/* import */var n=r(41147);/* import */var i=r(14206);/* import */var a=r(52639);/* import */var o=r(78346);/* import */var s=r(42771);/* import */var u=r(12470);/* import */var c=/*#__PURE__*/r.n(u);/* import */var l=r(91224);/* import */var d=r(99864);/* import */var f=r(11918);/* import */var p=r(13448);var h=e=>{var{form:t}=e;return/*#__PURE__*/(0,a/* .jsxs */.FD)("div",{css:v.wrapper,children:[/*#__PURE__*/(0,a/* .jsx */.Y)(o/* .Controller */.xI,{control:t.control,name:"characters",render:e=>/*#__PURE__*/(0,a/* .jsx */.Y)(l/* ["default"] */.A,(0,i._)((0,n._)({},e),{isMagicAi:true,label:(0,u.__)("Character Limit","tutor"),type:"number"}))}),/*#__PURE__*/(0,a/* .jsx */.Y)(o/* .Controller */.xI,{control:t.control,name:"language",render:e=>/*#__PURE__*/(0,a/* .jsx */.Y)(d/* ["default"] */.A,(0,i._)((0,n._)({},e),{isMagicAi:true,label:(0,u.__)("Language","tutor"),options:f/* .languageOptions */.Po}))}),/*#__PURE__*/(0,a/* .jsx */.Y)(o/* .Controller */.xI,{control:t.control,name:"tone",render:e=>/*#__PURE__*/(0,a/* .jsx */.Y)(d/* ["default"] */.A,(0,i._)((0,n._)({},e),{isMagicAi:true,options:f/* .toneOptions */.HF,label:(0,u.__)("Tone","tutor")}))}),/*#__PURE__*/(0,a/* .jsx */.Y)(o/* .Controller */.xI,{control:t.control,name:"format",render:e=>/*#__PURE__*/(0,a/* .jsx */.Y)(d/* ["default"] */.A,(0,i._)((0,n._)({},e),{isMagicAi:true,label:(0,u.__)("Format","tutor"),options:f/* .formatOptions */.or}))})]})};var v={wrapper:/*#__PURE__*/(0,s/* .css */.AH)("display:grid;grid-template-columns:repeat(2,1fr);gap:",p/* .spacing["16"] */.YK["16"],";")}},90137:function(e,t,r){"use strict";r.d(t,{A:()=>u});/* import */var n=r(52639);/* import */var i=r(42771);/* import */var a=r(1883);/* import */var o=r(13448);var s=()=>{return/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:c.container,children:[/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:c.wrapper,children:[/*#__PURE__*/(0,n/* .jsx */.Y)(a/* ["default"] */.A,{animation:true,isMagicAi:true,width:"20%",height:"12px"}),/*#__PURE__*/(0,n/* .jsx */.Y)(a/* ["default"] */.A,{animation:true,isMagicAi:true,width:"100%",height:"12px"}),/*#__PURE__*/(0,n/* .jsx */.Y)(a/* ["default"] */.A,{animation:true,isMagicAi:true,width:"100%",height:"12px"}),/*#__PURE__*/(0,n/* .jsx */.Y)(a/* ["default"] */.A,{animation:true,isMagicAi:true,width:"40%",height:"12px"})]}),/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:c.wrapper,children:[/*#__PURE__*/(0,n/* .jsx */.Y)(a/* ["default"] */.A,{animation:true,isMagicAi:true,width:"80%",height:"12px"}),/*#__PURE__*/(0,n/* .jsx */.Y)(a/* ["default"] */.A,{animation:true,isMagicAi:true,width:"100%",height:"12px"}),/*#__PURE__*/(0,n/* .jsx */.Y)(a/* ["default"] */.A,{animation:true,isMagicAi:true,width:"80%",height:"12px"})]})]})};/* export default */const u=s;var c={wrapper:/*#__PURE__*/(0,i/* .css */.AH)("display:flex;flex-direction:column;gap:",o/* .spacing["8"] */.YK["8"],";"),container:/*#__PURE__*/(0,i/* .css */.AH)("display:flex;flex-direction:column;gap:",o/* .spacing["32"] */.YK["32"],";")}},88325:function(e,t,r){"use strict";r.d(t,{A:()=>M});/* import */var n=r(93640);/* import */var i=r(41147);/* import */var a=r(14206);/* import */var o=r(52639);/* import */var s=r(41594);/* import */var u=/*#__PURE__*/r.n(s);/* import */var c=r(78346);/* import */var l=r(42771);/* import */var d=r(12470);/* import */var f=/*#__PURE__*/r.n(d);/* import */var p=r(25074);/* import */var h=r(78353);/* import */var v=r(46225);/* import */var m=r(74054);/* import */var g=r(31542);/* import */var b=r(69541);/* import */var _=r(90137);/* import */var y=r(19393);/* import */var w=r(11918);/* import */var A=r(13448);/* import */var x=r(81547);/* import */var E=r(59189);/* import */var O=r(31569);/* import */var S=r(34092);/* import */var T=r(21678);/* import */var k=r(97200);/* import */var C=r(52874);/* import */var I=r(33231);/* import */var R=r(4429);var D=[(0,d.__)("Mastering Digital Marketing: A Complete Guide","tutor"),(0,d.__)("The Ultimate Photoshop Course for Beginners","tutor"),(0,d.__)("Python Programming: From Zero to Hero","tutor"),(0,d.__)("Creative Writing Essentials: Unlock Your Storytelling Potential","tutor"),(0,d.__)("The Complete Guide to Web Development with React","tutor"),(0,d.__)("Master Public Speaking: Deliver Powerful Presentations","tutor"),(0,d.__)("Excel for Business: From Basics to Advanced Analytics","tutor"),(0,d.__)("Fitness Fundamentals: Build Strength and Confidence","tutor"),(0,d.__)("Photography Made Simple: Capture Stunning Shots","tutor"),(0,d.__)("Financial Freedom: Learn the Basics of Investing","tutor")];var P=e=>{var{title:t,icon:r,closeModal:u,field:f,format:x="essay",characters:C=250,is_html:P=false,fieldLabel:M="",fieldPlaceholder:Y=""}=e;var L=(0,S/* .useFormWithGlobalError */.p)({defaultValues:{prompt:"",characters:C,language:"english",tone:"formal",format:x}});var N=(0,k/* .useMagicTextGenerationMutation */.TF)();var H=(0,k/* .useModifyContentMutation */.cj)();var[j,U]=(0,s.useState)([]);var[B,K]=(0,s.useState)(0);var[z,q]=(0,s.useState)(false);var[V,W]=(0,s.useState)(null);var G=(0,s.useRef)(null);var $=(0,s.useRef)(null);var Q=(0,s.useMemo)(()=>{return j[B]},[j,B]);var X=L.watch("prompt");function J(e){U(t=>[e,...t]);K(0)}function Z(e,t){return(0,n._)(function*(){if(j.length===0){return}var r=j[B];if(e==="translation"&&!!t){var n=yield H.mutateAsync({type:"translation",content:r,language:t,is_html:P});if(n.data){J(n.data)}return}if(e==="change_tone"&&!!t){var i=yield H.mutateAsync({type:"change_tone",content:r,tone:t,is_html:P});if(i.data){J(i.data)}return}var a=yield H.mutateAsync({type:e,content:r,is_html:P});if(a.data){J(a.data)}})()}(0,s.useEffect)(()=>{L.setFocus("prompt");// eslint-disable-next-line react-hooks/exhaustive-deps
},[]);return/*#__PURE__*/(0,o/* .jsx */.Y)(R/* ["default"] */.A,{onClose:u,title:t,icon:r,maxWidth:524,children:/*#__PURE__*/(0,o/* .jsxs */.FD)("form",{onSubmit:L.handleSubmit(e=>(0,n._)(function*(){var t=yield N.mutateAsync((0,a._)((0,i._)({},e),{is_html:P}));if(t.data){J(t.data)}})()),children:[/*#__PURE__*/(0,o/* .jsxs */.FD)("div",{css:F.container,children:[/*#__PURE__*/(0,o/* .jsxs */.FD)("div",{css:F.fieldsWrapper,children:[/*#__PURE__*/(0,o/* .jsx */.Y)(c/* .Controller */.xI,{control:L.control,name:"prompt",render:e=>/*#__PURE__*/(0,o/* .jsx */.Y)(m/* ["default"] */.A,(0,a._)((0,i._)({},e),{label:M||(0,d.__)("Craft Your Course Description","tutor"),placeholder:Y||(0,d.__)("Provide a brief overview of your course topic, target audience, and key takeaways","tutor"),rows:4,isMagicAi:true}))}),/*#__PURE__*/(0,o/* .jsxs */.FD)("button",{type:"button",css:F.inspireButton,onClick:()=>{var e=D.length;var t=Math.floor(Math.random()*e);L.reset((0,a._)((0,i._)({},L.getValues()),{prompt:D[t]}))},children:[/*#__PURE__*/(0,o/* .jsx */.Y)(v/* ["default"] */.A,{name:"bulbLine"}),(0,d.__)("Inspire Me","tutor")]})]}),/*#__PURE__*/(0,o/* .jsx */.Y)(E/* ["default"] */.A,{when:!N.isPending&&!H.isPending,fallback:/*#__PURE__*/(0,o/* .jsx */.Y)(_/* ["default"] */.A,{}),children:/*#__PURE__*/(0,o/* .jsxs */.FD)(E/* ["default"] */.A,{when:j.length>0,fallback:/*#__PURE__*/(0,o/* .jsx */.Y)(b/* .PromptControls */.p,{form:L}),children:[/*#__PURE__*/(0,o/* .jsxs */.FD)("div",{children:[/*#__PURE__*/(0,o/* .jsxs */.FD)("div",{css:F.actionBar,children:[/*#__PURE__*/(0,o/* .jsx */.Y)("div",{css:F.navigation,children:/*#__PURE__*/(0,o/* .jsxs */.FD)(E/* ["default"] */.A,{when:j.length>1,children:[/*#__PURE__*/(0,o/* .jsx */.Y)(p/* ["default"] */.A,{variant:"text",onClick:()=>K(e=>Math.max(0,e-1)),disabled:B===0,children:/*#__PURE__*/(0,o/* .jsx */.Y)(v/* ["default"] */.A,{name:!y/* .isRTL */.V8?"chevronLeft":"chevronRight",width:20,height:20})}),/*#__PURE__*/(0,o/* .jsxs */.FD)("div",{css:F.pageInfo,children:[/*#__PURE__*/(0,o/* .jsx */.Y)("span",{children:B+1})," / ",j.length]}),/*#__PURE__*/(0,o/* .jsx */.Y)(p/* ["default"] */.A,{variant:"text",onClick:()=>K(e=>Math.min(j.length-1,e+1)),disabled:B===j.length-1,children:/*#__PURE__*/(0,o/* .jsx */.Y)(v/* ["default"] */.A,{name:!y/* .isRTL */.V8?"chevronRight":"chevronLeft",width:20,height:20})})]})}),/*#__PURE__*/(0,o/* .jsx */.Y)(p/* ["default"] */.A,{variant:"text",onClick:()=>(0,n._)(function*(){if(j.length===0){return}var e=j[B];yield(0,I/* .copyToClipboard */.lW)(e);q(true);setTimeout(()=>{q(false)},1500)})(),children:/*#__PURE__*/(0,o/* .jsx */.Y)(E/* ["default"] */.A,{when:z,fallback:/*#__PURE__*/(0,o/* .jsx */.Y)(v/* ["default"] */.A,{name:"copy",width:20,height:20}),children:/*#__PURE__*/(0,o/* .jsx */.Y)(v/* ["default"] */.A,{name:"checkFilled",width:20,height:20,style:/*#__PURE__*/(0,l/* .css */.AH)("color:",A/* .colorTokens.text.success */.I6.text.success," !important;")})})})]}),/*#__PURE__*/(0,o/* .jsx */.Y)("div",{css:F.content,dangerouslySetInnerHTML:{__html:Q}})]}),/*#__PURE__*/(0,o/* .jsxs */.FD)("div",{css:F.otherActions,children:[/*#__PURE__*/(0,o/* .jsx */.Y)(h/* ["default"] */.A,{variant:"outline",roundedFull:false,onClick:()=>Z("rephrase"),children:(0,d.__)("Rephrase","tutor")}),/*#__PURE__*/(0,o/* .jsx */.Y)(h/* ["default"] */.A,{variant:"outline",roundedFull:false,onClick:()=>Z("make_shorter"),children:(0,d.__)("Make Shorter","tutor")}),/*#__PURE__*/(0,o/* .jsxs */.FD)(h/* ["default"] */.A,{variant:"outline",roundedFull:false,ref:G,onClick:()=>W("tone"),children:[(0,d.__)("Change Tone","tutor"),/*#__PURE__*/(0,o/* .jsx */.Y)(v/* ["default"] */.A,{name:"chevronDown",width:16,height:16})]}),/*#__PURE__*/(0,o/* .jsxs */.FD)(h/* ["default"] */.A,{variant:"outline",roundedFull:false,ref:$,onClick:()=>W("translate"),children:[(0,d.__)("Translate to","tutor"),/*#__PURE__*/(0,o/* .jsx */.Y)(v/* ["default"] */.A,{name:"chevronDown",width:16,height:16})]}),/*#__PURE__*/(0,o/* .jsx */.Y)(h/* ["default"] */.A,{variant:"outline",roundedFull:false,onClick:()=>Z("write_as_bullets"),children:(0,d.__)("Write as Bullets","tutor")}),/*#__PURE__*/(0,o/* .jsx */.Y)(h/* ["default"] */.A,{variant:"outline",roundedFull:false,onClick:()=>Z("make_longer"),children:(0,d.__)("Make Longer","tutor")}),/*#__PURE__*/(0,o/* .jsx */.Y)(h/* ["default"] */.A,{variant:"outline",roundedFull:false,onClick:()=>Z("simplify_language"),children:(0,d.__)("Simplify Language","tutor")})]})]})})]}),/*#__PURE__*/(0,o/* .jsx */.Y)(T/* ["default"] */.A,{isOpen:V==="tone",triggerRef:G,arrow:true,closePopover:()=>W(null),maxWidth:"160px",animationType:O/* .AnimationType.slideDown */.J6.slideDown,children:/*#__PURE__*/(0,o/* .jsx */.Y)(g/* .OptionList */.m,{options:w/* .toneOptions */.HF,onChange:e=>(0,n._)(function*(){W(null);yield Z("change_tone",e)})()})}),/*#__PURE__*/(0,o/* .jsx */.Y)(T/* ["default"] */.A,{isOpen:V==="translate",triggerRef:$,closePopover:()=>W(null),maxWidth:"160px",animationType:O/* .AnimationType.slideDown */.J6.slideDown,children:/*#__PURE__*/(0,o/* .jsx */.Y)(g/* .OptionList */.m,{options:w/* .languageOptions */.Po,onChange:e=>(0,n._)(function*(){W(null);yield Z("translation",e)})()})}),/*#__PURE__*/(0,o/* .jsx */.Y)("div",{css:F.footer,children:/*#__PURE__*/(0,o/* .jsxs */.FD)(E/* ["default"] */.A,{when:j.length>0,fallback:/*#__PURE__*/(0,o/* .jsxs */.FD)(h/* ["default"] */.A,{type:"submit",disabled:N.isPending||!X||H.isPending,children:[/*#__PURE__*/(0,o/* .jsx */.Y)(v/* ["default"] */.A,{name:"magicWand",width:24,height:24}),(0,d.__)("Generate Now","tutor")]}),children:[/*#__PURE__*/(0,o/* .jsx */.Y)(h/* ["default"] */.A,{variant:"outline",type:"submit",disabled:N.isPending||!X||H.isPending,children:(0,d.__)("Generate Again","tutor")}),/*#__PURE__*/(0,o/* .jsx */.Y)(h/* ["default"] */.A,{variant:"primary",disabled:N.isPending||j.length===0||H.isPending,onClick:()=>{f.onChange(j[B]);u()},children:(0,d.__)("Use This","tutor")})]})})]})})};/* export default */const M=P;var F={container:/*#__PURE__*/(0,l/* .css */.AH)("padding:",A/* .spacing["20"] */.YK["20"],";display:flex;flex-direction:column;gap:",A/* .spacing["16"] */.YK["16"],";"),fieldsWrapper:/*#__PURE__*/(0,l/* .css */.AH)("position:relative;textarea{padding-bottom:",A/* .spacing["40"] */.YK["40"]," !important;}"),footer:/*#__PURE__*/(0,l/* .css */.AH)("padding:",A/* .spacing["12"] */.YK["12"]," ",A/* .spacing["16"] */.YK["16"],";display:flex;align-items:center;justify-content:end;gap:",A/* .spacing["10"] */.YK["10"],";box-shadow:0px 1px 0px 0px #e4e5e7 inset;button{width:fit-content;}"),pageInfo:/*#__PURE__*/(0,l/* .css */.AH)(x/* .typography.caption */.I.caption(),";color:",A/* .colorTokens.text.hints */.I6.text.hints,";& > span{font-weight:",A/* .fontWeight.medium */.Wy.medium,";color:",A/* .colorTokens.text.primary */.I6.text.primary,";}"),inspireButton:/*#__PURE__*/(0,l/* .css */.AH)(C/* .styleUtils.resetButton */.x.resetButton,";",x/* .typography.small */.I.small(),";position:absolute;height:28px;bottom:",A/* .spacing["12"] */.YK["12"],";left:",A/* .spacing["12"] */.YK["12"],";border:1px solid ",A/* .colorTokens.stroke.brand */.I6.stroke.brand,";border-radius:",A/* .borderRadius["4"] */.Vq["4"],";display:flex;align-items:center;gap:",A/* .spacing["4"] */.YK["4"],";color:",A/* .colorTokens.text.brand */.I6.text.brand,";padding-inline:",A/* .spacing["12"] */.YK["12"],";background-color:",A/* .colorTokens.background.white */.I6.background.white,";&:hover{background-color:",A/* .colorTokens.background.brand */.I6.background.brand,";color:",A/* .colorTokens.text.white */.I6.text.white,";}&:focus-visible{outline:2px solid ",A/* .colorTokens.stroke.brand */.I6.stroke.brand,";outline-offset:1px;}&:disabled{background-color:",A/* .colorTokens.background.disable */.I6.background.disable,";color:",A/* .colorTokens.text.disable */.I6.text.disable,";}"),navigation:/*#__PURE__*/(0,l/* .css */.AH)("margin-left:-",A/* .spacing["8"] */.YK["8"],";display:flex;align-items:center;"),content:/*#__PURE__*/(0,l/* .css */.AH)(x/* .typography.caption */.I.caption(),";height:180px;overflow-y:auto;background-color:",A/* .colorTokens.background.magicAi["default"] */.I6.background.magicAi["default"],";border-radius:",A/* .borderRadius["6"] */.Vq["6"],";padding:",A/* .spacing["6"] */.YK["6"]," ",A/* .spacing["12"] */.YK["12"],";color:",A/* .colorTokens.text.magicAi */.I6.text.magicAi,";"),actionBar:/*#__PURE__*/(0,l/* .css */.AH)("display:flex;align-items:center;justify-content:space-between;"),otherActions:/*#__PURE__*/(0,l/* .css */.AH)("display:flex;gap:",A/* .spacing["10"] */.YK["10"],";flex-wrap:wrap;& > button{width:fit-content;}")}},4429:function(e,t,r){"use strict";r.d(t,{A:()=>_});/* import */var n=r(60599);/* import */var i=r(52639);/* import */var a=r(42771);/* import */var o=r(46225);/* import */var s=r(27246);/* import */var u=r(75823);/* import */var c=r(19393);/* import */var l=r(13448);/* import */var d=r(81547);/* import */var f=r(59189);/* import */var p=r(5387);/* import */var h=r(52874);function v(){var e=(0,n._)(["\n      max-width: 100vw;\n      width: 100vw;\n      height: 95vh;\n    "]);v=function t(){return e};return e}function m(){var e=(0,n._)(["\n      position: absolute;\n      right: ",";\n      top: ",";\n    "]);m=function t(){return e};return e}function g(){var e=(0,n._)(["\n      height: calc(100% - ","px);\n    "]);g=function t(){return e};return e}var b=e=>{var{children:t,onClose:r,title:n,subtitle:a,icon:l,entireHeader:d,actions:h,fullScreen:v,modalStyle:m,maxWidth:g=c/* .modal.BASIC_MODAL_MAX_WIDTH */.yl.BASIC_MODAL_MAX_WIDTH,isCloseAble:b=true,blurTriggerElement:_=true}=e;(0,p/* .useScrollLock */.K$)();return/*#__PURE__*/(0,i/* .jsx */.Y)(u/* ["default"] */.A,{blurPrevious:_,children:/*#__PURE__*/(0,i/* .jsxs */.FD)("div",{css:[y.container({isFullScreen:v}),m],style:{maxWidth:"".concat(g,"px")},children:[/*#__PURE__*/(0,i/* .jsxs */.FD)("div",{css:y.header({hasEntireHeader:!!d}),children:[/*#__PURE__*/(0,i/* .jsx */.Y)(f/* ["default"] */.A,{when:!d,fallback:d,children:/*#__PURE__*/(0,i/* .jsxs */.FD)("div",{css:y.headerContent,children:[/*#__PURE__*/(0,i/* .jsxs */.FD)("div",{css:y.iconWithTitle,children:[/*#__PURE__*/(0,i/* .jsx */.Y)(f/* ["default"] */.A,{when:l,children:l}),/*#__PURE__*/(0,i/* .jsx */.Y)(f/* ["default"] */.A,{when:n,children:/*#__PURE__*/(0,i/* .jsx */.Y)("p",{css:y.title,children:n})})]}),/*#__PURE__*/(0,i/* .jsx */.Y)(f/* ["default"] */.A,{when:a,children:/*#__PURE__*/(0,i/* .jsx */.Y)("span",{css:y.subtitle,children:a})})]})}),/*#__PURE__*/(0,i/* .jsx */.Y)("div",{css:y.actionsWrapper({hasEntireHeader:!!d}),children:/*#__PURE__*/(0,i/* .jsx */.Y)(f/* ["default"] */.A,{when:h,fallback:/*#__PURE__*/(0,i/* .jsx */.Y)(f/* ["default"] */.A,{when:b,children:/*#__PURE__*/(0,i/* .jsx */.Y)("button",{"data-cy":"close-modal",type:"button",css:y.closeButton,onClick:r,children:/*#__PURE__*/(0,i/* .jsx */.Y)(o/* ["default"] */.A,{name:"timesThin",width:24,height:24})})}),children:h})})]}),/*#__PURE__*/(0,i/* .jsx */.Y)("div",{css:y.content({isFullScreen:v}),children:/*#__PURE__*/(0,i/* .jsx */.Y)(s/* ["default"] */.A,{children:t})})]})})};/* export default */const _=b;var y={container:e=>{var{isFullScreen:t}=e;return/*#__PURE__*/(0,a/* .css */.AH)("position:relative;background:",l/* .colorTokens.background.white */.I6.background.white,";box-shadow:",l/* .shadow.modal */.r7.modal,";border-radius:",l/* .borderRadius["10"] */.Vq["10"],";overflow:hidden;top:50%;left:50%;transform:translate(-50%,-50%);",t&&(0,a/* .css */.AH)(v())," ",l/* .Breakpoint.smallTablet */.EA.smallTablet,"{width:90%;}")},header:e=>{var{hasEntireHeader:t}=e;return/*#__PURE__*/(0,a/* .css */.AH)("display:flex;align-items:center;justify-content:space-between;width:100%;height:",!t?"".concat(c/* .modal.BASIC_MODAL_HEADER_HEIGHT */.yl.BASIC_MODAL_HEADER_HEIGHT,"px"):"auto",";background:",l/* .colorTokens.background.white */.I6.background.white,";border-bottom:",!t?"1px solid ".concat(l/* .colorTokens.stroke.divider */.I6.stroke.divider):"none",";padding-inline:",l/* .spacing["16"] */.YK["16"],";")},headerContent:/*#__PURE__*/(0,a/* .css */.AH)("place-self:center start;display:inline-flex;align-items:center;gap:",l/* .spacing["12"] */.YK["12"],";"),iconWithTitle:/*#__PURE__*/(0,a/* .css */.AH)("display:inline-flex;align-items:center;gap:",l/* .spacing["4"] */.YK["4"],";color:",l/* .colorTokens.icon["default"] */.I6.icon["default"],";"),title:/*#__PURE__*/(0,a/* .css */.AH)(d/* .typography.body */.I.body("medium"),";color:",l/* .colorTokens.text.title */.I6.text.title,";"),subtitle:/*#__PURE__*/(0,a/* .css */.AH)(h/* .styleUtils.text.ellipsis */.x.text.ellipsis(1)," ",d/* .typography.caption */.I.caption(),";color:",l/* .colorTokens.text.hints */.I6.text.hints,";"),actionsWrapper:e=>{var{hasEntireHeader:t}=e;return/*#__PURE__*/(0,a/* .css */.AH)("place-self:center end;display:inline-flex;gap:",l/* .spacing["16"] */.YK["16"],";",t&&(0,a/* .css */.AH)(m(),l/* .spacing["16"] */.YK["16"],l/* .spacing["16"] */.YK["16"]))},closeButton:/*#__PURE__*/(0,a/* .css */.AH)(h/* .styleUtils.resetButton */.x.resetButton,";display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:",l/* .borderRadius.circle */.Vq.circle,";background:",l/* .colorTokens.background.white */.I6.background.white,";&:focus,&:active,&:hover{background:",l/* .colorTokens.background.white */.I6.background.white,";}svg{color:",l/* .colorTokens.icon["default"] */.I6.icon["default"],";transition:color 0.3s ease-in-out;}:hover{svg{color:",l/* .colorTokens.icon.hover */.I6.icon.hover,";}}:focus{box-shadow:",l/* .shadow.focus */.r7.focus,";}"),content:e=>{var{isFullScreen:t}=e;return/*#__PURE__*/(0,a/* .css */.AH)("background-color:",l/* .colorTokens.background.white */.I6.background.white,";overflow-y:auto;max-height:90vh;",t&&(0,a/* .css */.AH)(g(),c/* .modal.BASIC_MODAL_HEADER_HEIGHT */.yl.BASIC_MODAL_HEADER_HEIGHT))}}},56949:function(e,t,r){"use strict";r.d(t,{A:()=>d});/* import */var n=r(52639);/* import */var i=r(42771);/* import */var a=r(12470);/* import */var o=/*#__PURE__*/r.n(a);/* import */var s=r(25074);/* import */var u=r(4429);/* import */var c=r(13448);var l=e=>{var{title:t,description:r,confirmButtonText:i,cancelButtonText:o,confirmButtonVariant:c,closeModal:l,onConfirm:d,isLoading:p=false,icon:h,maxWidth:v=460}=e;return/*#__PURE__*/(0,n/* .jsxs */.FD)(u/* ["default"] */.A,{icon:h,onClose:()=>l({action:"CLOSE"}),title:t,maxWidth:v,children:[/*#__PURE__*/(0,n/* .jsx */.Y)("div",{css:f.content,children:r!==null&&r!==void 0?r:(0,a.__)("Once you perform this action this can’t be undone.","tutor")}),/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:f.footerWrapper,children:[/*#__PURE__*/(0,n/* .jsx */.Y)(s/* ["default"] */.A,{variant:"text",onClick:()=>l({action:"CLOSE"}),size:"small",children:o!==null&&o!==void 0?o:(0,a.__)("Cancel","tutor")}),/*#__PURE__*/(0,n/* .jsx */.Y)(s/* ["default"] */.A,{variant:c!==null&&c!==void 0?c:"danger",size:"small",loading:p,onClick:()=>{if(d){d()}else{l({action:"CONFIRM"})}},children:i!==null&&i!==void 0?i:(0,a.__)("Delete","tutor")})]})]})};/* export default */const d=l;var f={content:/*#__PURE__*/(0,i/* .css */.AH)("font-size:",c/* .fontSize["14"] */.J["14"],";line-height:",c/* .lineHeight["20"] */.K_["20"],";color:",c/* .colorTokens.text.subdued */.I6.text.subdued,";padding:",c/* .spacing["20"] */.YK["20"],";"),footerWrapper:/*#__PURE__*/(0,i/* .css */.AH)("display:flex;justify-content:end;gap:",c/* .spacing["8"] */.YK["8"],";padding:",c/* .spacing["12"] */.YK["12"]," ",c/* .spacing["16"] */.YK["16"],";box-shadow:",c/* .shadow.dividerTop */.r7.dividerTop,";")}},17944:function(e,t,r){"use strict";r.d(t,{Z:()=>g,h:()=>m});/* import */var n=r(41147);/* import */var i=r(14206);/* import */var a=r(60599);/* import */var o=r(52639);/* import */var s=r(41594);/* import */var u=/*#__PURE__*/r.n(s);/* import */var c=r(42771);/* import */var l=r(13448);/* import */var d=r(31569);/* import */var f=r(33231);function p(){var e=(0,a._)(["\n      background: linear-gradient(\n        73.09deg,\n        rgba(255, 150, 69, 0.4) 18.05%,\n        rgba(255, 100, 113, 0.4) 30.25%,\n        rgba(207, 110, 189, 0.4) 55.42%,\n        rgba(164, 119, 209, 0.4) 71.66%,\n        rgba(62, 100, 222, 0.4) 97.9%\n      );\n      opacity: 1;\n      backdrop-filter: blur(10px);\n    "]);p=function t(){return e};return e}var h={backdrop:e=>{var{magicAi:t=false}=e;return/*#__PURE__*/(0,c/* .css */.AH)("position:fixed;background-color:",l/* .colorTokens.background.modal */.I6.background.modal,";opacity:0.7;inset:0;z-index:",l/* .zIndex.negative */.fE.negative,";",t&&(0,c/* .css */.AH)(p()))},container:/*#__PURE__*/(0,c/* .css */.AH)("z-index:",l/* .zIndex.highest */.fE.highest,";position:fixed;display:flex;justify-content:center;top:0;left:0;width:100%;height:100%;")};var v=/*#__PURE__*/u().createContext({showModal:()=>Promise.resolve({action:"CLOSE"}),closeModal:f/* .noop */.lQ,updateModal:f/* .noop */.lQ,hasModalOnStack:false});var m=()=>(0,s.useContext)(v);var g=e=>{var{children:t}=e;var[r,a]=(0,s.useState)({modals:[]});var c=(0,s.useCallback)(e=>{var{component:t,props:r,closeOnOutsideClick:o=false,closeOnEscape:s=true,isMagicAi:u=false,depthIndex:c=l/* .zIndex.modal */.fE.modal,id:d}=e;return new Promise(e=>{a(a=>(0,i._)((0,n._)({},a),{modals:[...a.modals,{component:t,props:r,resolve:e,closeOnOutsideClick:o,closeOnEscape:s,id:d||(0,f/* .nanoid */.Ak)(),depthIndex:c,isMagicAi:u}]}))})},[]);var p=(0,s.useCallback)(function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{action:"CLOSE"};a(t=>{var r=t.modals[t.modals.length-1];r===null||r===void 0?void 0:r.resolve(e);return(0,i._)((0,n._)({},t),{modals:t.modals.slice(0,t.modals.length-1)})})},[]);var m=(0,s.useCallback)((e,t)=>{a(r=>{var a=r.modals.findIndex(t=>t.id===e);if(a===-1)return r;var o=[...r.modals];var s=o[a];o[a]=(0,i._)((0,n._)({},s),{props:(0,n._)({},s.props,t)});return(0,i._)((0,n._)({},r),{modals:o})})},[]);var{transitions:g}=(0,d/* .useAnimation */.sM)({keys:e=>e.id,data:r.modals,animationType:d/* .AnimationType.slideUp */.J6.slideUp,animationDuration:250});var b=(0,s.useMemo)(()=>{return r.modals.length>0},[r.modals]);(0,s.useEffect)(()=>{var e=e=>{var t;var n=document.querySelectorAll(".tutor-portal-popover");var i=!!document.body.classList.contains("modal-open");if(e.key==="Escape"&&((t=r.modals[r.modals.length-1])===null||t===void 0?void 0:t.closeOnEscape)&&!n.length&&!i){p({action:"CLOSE"})}};if(r.modals.length>0){document.addEventListener("keydown",e,true)}return()=>{document.removeEventListener("keydown",e,true)};// eslint-disable-next-line react-hooks/exhaustive-deps
},[r.modals.length,p]);return/*#__PURE__*/(0,o/* .jsxs */.FD)(v.Provider,{value:{showModal:c,closeModal:p,updateModal:m,hasModalOnStack:b},children:[t,g((e,t,r,a)=>{return/*#__PURE__*/(0,o/* .jsxs */.FD)("div",{"data-cy":"tutor-modal",css:[h.container,{zIndex:t.depthIndex||l/* .zIndex.modal */.fE.modal+a}],children:[/*#__PURE__*/(0,o/* .jsx */.Y)(d/* .AnimatedDiv */.LK,{style:(0,i._)((0,n._)({},e),{width:"100%"}),hideOnOverflow:false,children:/*#__PURE__*/u().createElement(t.component,(0,i._)((0,n._)({},t.props),{closeModal:p}))}),/*#__PURE__*/(0,o/* .jsx */.Y)("div",{css:h.backdrop({magicAi:t.isMagicAi}),onKeyUp:f/* .noop */.lQ,tabIndex:-1,// This is not ideal to attach a click event on a non-interactive element like div,
// but in this case we have to do it.
onClick:()=>{if(t.closeOnOutsideClick){p({action:"CLOSE"})}}})]},t.id)})]})}},19448:function(e,t,r){"use strict";r.d(t,{A:()=>b});/* import */var n=r(52639);/* import */var i=r(42771);/* import */var a=r(12470);/* import */var o=/*#__PURE__*/r.n(a);/* import */var s=r(25074);/* import */var u=r(46225);/* import */var c=r(4429);/* import */var l=r(74412);/* import */var d=r(13448);/* import */var f=r(81547);/* import */var p=r(3013);/* import */var h=r(59189);/* import */var v=r(52874);var m={title:/*#__PURE__*/(0,n/* .jsxs */.FD)(n/* .Fragment */.FK,{children:[(0,a.__)("Upgrade to Tutor LMS Pro today and experience the power of ","tutor"),/*#__PURE__*/(0,n/* .jsx */.Y)("span",{css:v/* .styleUtils.aiGradientText */.x.aiGradientText,children:(0,a.__)("AI Studio","tutor")})]}),message:(0,a.__)("Upgrade your plan to access the AI feature","tutor"),featuresTitle:(0,a.__)("Don’t miss out on this game-changing feature!","tutor"),features:[(0,a.__)("Generate a complete course outline in seconds!","tutor"),(0,a.__)("Let the AI Studio create Quizzes on your behalf and give your brain a well-deserved break.","tutor"),(0,a.__)("Generate images, customize backgrounds, and even remove unwanted objects with ease.","tutor"),(0,a.__)("Say goodbye to typos and grammar errors with AI-powered copy editing.","tutor")],footer:/*#__PURE__*/(0,n/* .jsx */.Y)(s/* ["default"] */.A,{onClick:()=>window.open(l/* ["default"].TUTOR_PRICING_PAGE */.A.TUTOR_PRICING_PAGE,"_blank","noopener"),icon:/*#__PURE__*/(0,n/* .jsx */.Y)(u/* ["default"] */.A,{name:"crown",width:24,height:24}),children:(0,a.__)("Get Tutor LMS Pro","tutor")})};var g=e=>{var{title:t=m.title,message:r=m.message,featuresTitle:i=m.featuresTitle,features:o=m.features,closeModal:s,image:l,image2x:d,footer:f=m.footer}=e;return/*#__PURE__*/(0,n/* .jsx */.Y)(c/* ["default"] */.A,{onClose:s,entireHeader:/*#__PURE__*/(0,n/* .jsx */.Y)("span",{css:_.message,children:r}),maxWidth:496,children:/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:_.wrapper,children:[/*#__PURE__*/(0,n/* .jsx */.Y)(h/* ["default"] */.A,{when:t,children:/*#__PURE__*/(0,n/* .jsx */.Y)("h4",{css:_.title,children:t})}),/*#__PURE__*/(0,n/* .jsx */.Y)(h/* ["default"] */.A,{when:l,children:/*#__PURE__*/(0,n/* .jsx */.Y)("img",{css:_.image,src:l,alt:typeof t==="string"?t:(0,a.__)("Illustration","tutor"),srcSet:d?"".concat(l," ").concat(d," 2x"):undefined})}),/*#__PURE__*/(0,n/* .jsx */.Y)(h/* ["default"] */.A,{when:i,children:/*#__PURE__*/(0,n/* .jsx */.Y)("h6",{css:_.featuresTiTle,children:i})}),/*#__PURE__*/(0,n/* .jsx */.Y)(h/* ["default"] */.A,{when:o.length,children:/*#__PURE__*/(0,n/* .jsx */.Y)("div",{css:_.features,children:/*#__PURE__*/(0,n/* .jsx */.Y)(p/* ["default"] */.A,{each:o,children:(e,t)=>/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:_.feature,children:[/*#__PURE__*/(0,n/* .jsx */.Y)(u/* ["default"] */.A,{name:"materialCheck",width:20,height:20,style:_.checkIcon}),/*#__PURE__*/(0,n/* .jsx */.Y)("span",{children:e})]},t)})})}),/*#__PURE__*/(0,n/* .jsx */.Y)(h/* ["default"] */.A,{when:f,children:f})]})})};/* export default */const b=g;var _={wrapper:/*#__PURE__*/(0,i/* .css */.AH)("padding:0 ",d/* .spacing["24"] */.YK["24"]," ",d/* .spacing["32"] */.YK["32"]," ",d/* .spacing["24"] */.YK["24"],";",v/* .styleUtils.display.flex */.x.display.flex("column"),";gap:",d/* .spacing["16"] */.YK["16"],";"),message:/*#__PURE__*/(0,i/* .css */.AH)(f/* .typography.small */.I.small(),";color:",d/* .colorTokens.text.subdued */.I6.text.subdued,";padding-left:",d/* .spacing["8"] */.YK["8"],";padding-top:",d/* .spacing["24"] */.YK["24"],";padding-bottom:",d/* .spacing["4"] */.YK["4"],";"),title:/*#__PURE__*/(0,i/* .css */.AH)(f/* .typography.heading6 */.I.heading6("medium"),";color:",d/* .colorTokens.text.primary */.I6.text.primary,";text-wrap:pretty;"),image:/*#__PURE__*/(0,i/* .css */.AH)("height:270px;width:100%;object-fit:cover;object-position:center;border-radius:",d/* .borderRadius["8"] */.Vq["8"],";"),featuresTiTle:/*#__PURE__*/(0,i/* .css */.AH)(f/* .typography.body */.I.body("medium"),";color:",d/* .colorTokens.text.primary */.I6.text.primary,";text-wrap:pretty;"),features:/*#__PURE__*/(0,i/* .css */.AH)(v/* .styleUtils.display.flex */.x.display.flex("column"),";gap:",d/* .spacing["4"] */.YK["4"],";padding-right:",d/* .spacing["48"] */.YK["48"],";"),feature:/*#__PURE__*/(0,i/* .css */.AH)(v/* .styleUtils.display.flex */.x.display.flex(),";gap:",d/* .spacing["12"] */.YK["12"],";",f/* .typography.small */.I.small(),";color:",d/* .colorTokens.text.title */.I6.text.title,";span{text-wrap:pretty;}"),checkIcon:/*#__PURE__*/(0,i/* .css */.AH)("flex-shrink:0;color:",d/* .colorTokens.text.success */.I6.text.success,";")}},3311:function(e,t,r){"use strict";r.d(t,{A:()=>M});/* import */var n=r(93640);/* import */var i=r(41147);/* import */var a=r(14206);/* import */var o=r(60599);/* import */var s=r(52639);/* import */var u=r(41594);/* import */var c=/*#__PURE__*/r.n(u);/* import */var l=r(78346);/* import */var d=r(42771);/* import */var f=r(12470);/* import */var p=/*#__PURE__*/r.n(f);/* import */var h=r(47918);/* import */var v=r(25074);/* import */var m=r(91224);/* import */var g=r(9694);/* import */var b=r(4429);/* import */var _=r(74412);/* import */var y=r(19393);/* import */var w=r(13448);/* import */var A=r(81547);/* import */var x=r(59189);/* import */var E=r(34092);/* import */var O=r(97200);/* import */var S=r(52874);/* import */var T=r(18528);function k(){var e=(0,o._)(["\n      padding: ",";\n      padding-top: ",";\n    "]);k=function t(){return e};return e}var C,I;var R=((C=_/* .tutorConfig.settings */.P.settings)===null||C===void 0?void 0:C.chatgpt_enable)==="on";var D=(I=_/* .tutorConfig.current_user.roles */.P.current_user.roles)===null||I===void 0?void 0:I.includes(y/* .TutorRoles.ADMINISTRATOR */.gt.ADMINISTRATOR);var P=e=>{var{closeModal:t,image:r,image2x:o}=e;var c=(0,E/* .useFormWithGlobalError */.p)({defaultValues:{openAIApiKey:"",enable_open_ai:R},shouldFocusError:true});var d=(0,O/* .useSaveOpenAiSettingsMutation */.dK)();var p=e=>(0,n._)(function*(){var r=yield d.mutateAsync({chatgpt_api_key:e.openAIApiKey,chatgpt_enable:e.enable_open_ai?1:0});if(r.status_code===200){t({action:"CONFIRM"});window.location.reload()}})();(0,u.useEffect)(()=>{c.setFocus("openAIApiKey");// eslint-disable-next-line react-hooks/exhaustive-deps
},[]);return/*#__PURE__*/(0,s/* .jsx */.Y)(b/* ["default"] */.A,{onClose:()=>t({action:"CLOSE"}),title:D?(0,f.__)("Set OpenAI API key","tutor"):undefined,entireHeader:D?undefined:/*#__PURE__*/(0,s/* .jsx */.Y)(s/* .Fragment */.FK,{children:" "}),maxWidth:560,children:/*#__PURE__*/(0,s/* .jsx */.Y)("div",{css:F.wrapper({isCurrentUserAdmin:D}),children:/*#__PURE__*/(0,s/* .jsx */.Y)(x/* ["default"] */.A,{when:D,fallback:/*#__PURE__*/(0,s/* .jsxs */.FD)(s/* .Fragment */.FK,{children:[/*#__PURE__*/(0,s/* .jsx */.Y)("img",{css:F.image,src:r,srcSet:o?"".concat(r," 1x, ").concat(o," 2x"):"".concat(r," 1x"),alt:(0,f.__)("Connect API KEY","tutor")}),/*#__PURE__*/(0,s/* .jsxs */.FD)("div",{children:[/*#__PURE__*/(0,s/* .jsx */.Y)("div",{css:F.message,children:(0,f.__)("API is not connected","tutor")}),/*#__PURE__*/(0,s/* .jsx */.Y)("div",{css:F.title,children:(0,f.__)("Please, ask your Admin to connect the API with Tutor LMS Pro.","tutor")})]})]}),children:/*#__PURE__*/(0,s/* .jsxs */.FD)(s/* .Fragment */.FK,{children:[/*#__PURE__*/(0,s/* .jsxs */.FD)("form",{css:F.formWrapper,onSubmit:c.handleSubmit(p),children:[/*#__PURE__*/(0,s/* .jsxs */.FD)("div",{css:F.infoText,children:[/*#__PURE__*/(0,s/* .jsx */.Y)("div",{dangerouslySetInnerHTML:{/* translators: %1$s and %2$s are opening and closing anchor tags for the "OpenAI User settings" link */__html:(0,f.sprintf)((0,f.__)("Find your Secret API key in your %1$sOpenAI User settings%2$s and paste it here to connect OpenAI with your Tutor LMS website.","tutor"),'<a href="'.concat(_/* ["default"].CHATGPT_PLATFORM_URL */.A.CHATGPT_PLATFORM_URL,'" target="_blank" rel="noopener noreferrer">'),"</a>")}}),/*#__PURE__*/(0,s/* .jsx */.Y)(h/* ["default"] */.A,{type:"info",icon:"warning",children:(0,f.__)("The page will reload after submission. Make sure to save the course information.","tutor")})]}),/*#__PURE__*/(0,s/* .jsx */.Y)(l/* .Controller */.xI,{name:"openAIApiKey",control:c.control,rules:(0,T/* .requiredRule */.WN)(),render:e=>/*#__PURE__*/(0,s/* .jsx */.Y)(m/* ["default"] */.A,(0,a._)((0,i._)({},e),{type:"password",isPassword:true,label:(0,f.__)("OpenAI API key","tutor"),placeholder:(0,f.__)("Enter your OpenAI API key","tutor")}))}),/*#__PURE__*/(0,s/* .jsx */.Y)(l/* .Controller */.xI,{name:"enable_open_ai",control:c.control,render:e=>/*#__PURE__*/(0,s/* .jsx */.Y)(g/* ["default"] */.A,(0,a._)((0,i._)({},e),{label:(0,f.__)("Enable OpenAI","tutor")}))})]}),/*#__PURE__*/(0,s/* .jsxs */.FD)("div",{css:F.formFooter,children:[/*#__PURE__*/(0,s/* .jsx */.Y)(v/* ["default"] */.A,{onClick:()=>t({action:"CLOSE"}),variant:"text",size:"small",children:(0,f.__)("Cancel","tutor")}),/*#__PURE__*/(0,s/* .jsx */.Y)(v/* ["default"] */.A,{size:"small",onClick:c.handleSubmit(p),loading:d.isPending,children:(0,f.__)("Save","tutor")})]})]})})})})};/* export default */const M=P;var F={wrapper:e=>{var{isCurrentUserAdmin:t}=e;return/*#__PURE__*/(0,d/* .css */.AH)(S/* .styleUtils.display.flex */.x.display.flex("column"),";gap:",w/* .spacing["20"] */.YK["20"],";",!t&&(0,d/* .css */.AH)(k(),w/* .spacing["24"] */.YK["24"],w/* .spacing["6"] */.YK["6"]))},formWrapper:/*#__PURE__*/(0,d/* .css */.AH)(S/* .styleUtils.display.flex */.x.display.flex("column"),";gap:",w/* .spacing["20"] */.YK["20"],";padding:",w/* .spacing["16"] */.YK["16"]," ",w/* .spacing["16"] */.YK["16"]," 0 ",w/* .spacing["16"] */.YK["16"],";"),infoText:/*#__PURE__*/(0,d/* .css */.AH)(A/* .typography.small */.I.small(),";",S/* .styleUtils.display.flex */.x.display.flex("column"),";gap:",w/* .spacing["8"] */.YK["8"],";color:",w/* .colorTokens.text.subdued */.I6.text.subdued,";a{",S/* .styleUtils.resetButton */.x.resetButton,"      color:",w/* .colorTokens.text.brand */.I6.text.brand,";}"),formFooter:/*#__PURE__*/(0,d/* .css */.AH)(S/* .styleUtils.display.flex */.x.display.flex(),";justify-content:flex-end;gap:",w/* .spacing["16"] */.YK["16"],";border-top:1px solid ",w/* .colorTokens.stroke.divider */.I6.stroke.divider,";padding:",w/* .spacing["16"] */.YK["16"],";"),image:/*#__PURE__*/(0,d/* .css */.AH)("height:310px;width:100%;object-fit:cover;object-position:center;border-radius:",w/* .borderRadius["8"] */.Vq["8"],";"),message:/*#__PURE__*/(0,d/* .css */.AH)(A/* .typography.small */.I.small(),";color:",w/* .colorTokens.text.subdued */.I6.text.subdued,";"),title:/*#__PURE__*/(0,d/* .css */.AH)(A/* .typography.heading4 */.I.heading4("medium"),";color:",w/* .colorTokens.text.primary */.I6.text.primary,";margin-top:",w/* .spacing["4"] */.YK["4"],";text-wrap:pretty;")}},74412:function(e,t,r){"use strict";r.d(t,{A:()=>u,P:()=>o});/* eslint-disable @typescript-eslint/no-explicit-any */var n,i;var a={ID:0,ajaxurl:"",site_url:"",home_url:"",site_title:"",base_path:"",tutor_url:"",tutor_pro_url:"",dashboard_url:"",nonce_key:"",_tutor_nonce:"",loading_icon_url:"",placeholder_img_src:"",enable_lesson_classic_editor:"",tutor_frontend_dashboard_url:"",backend_course_list_url:"",backend_bundle_list_url:"",frontend_course_list_url:"",frontend_bundle_list_url:"",wp_date_format:"",wp_rest_nonce:"",is_admin:"",is_admin_bar_showing:"",max_upload_size:"",content_change_event:"",is_tutor_course_edit:"",assignment_max_file_allowed:"",current_page:"",quiz_answer_display_time:"",is_ssl:"",course_list_page_url:"",course_post_type:"",local:"",tutor_pn_vapid_key:"",tutor_pn_client_id:"",tutor_pn_subscription_saved:"",difficulty_levels:[],supported_video_sources:[],edd_products:[],bp_groups:[],timezones:{},addons_data:[],kids_icons_registry:[],is_kids_mode:false,user_preferences:{auto_play_next:false,contrast:"",font_scale:1,learning_mood:"modern",motion_effects:"auto",theme:"light",vision:"normal"},is_legacy_learning_mode:false,current_user:{data:{id:"",user_login:"",user_pass:"",user_nicename:"",user_email:"",user_url:"",user_registered:"",user_activation_key:"",user_status:"",display_name:""},caps:{},cap_key:"",roles:[],allcaps:{},filter:null},settings:{learning_mode:"",monetize_by:"tutor",enable_course_marketplace:"off",course_permalink_base:"",supported_video_sources:"",enrollment_expiry_enabled:"off",enable_q_and_a_on_course:"off",instructor_can_delete_course:"off",instructor_can_change_course_author:"off",instructor_can_manage_co_instructors:"off",chatgpt_enable:"off",course_builder_logo_url:"",chatgpt_key_exist:false,hide_admin_bar_for_users:"off",enable_redirect_on_course_publish_from_frontend:"off",instructor_can_publish_course:"off",youtube_api_key_exist:false,membership_only_mode:false,enable_tax:false,enable_individual_tax_control:false,is_tax_included_in_price:false,pagination_per_page:10,has_active_membership_plans:false},tutor_currency:{symbol:"",currency:"",position:"",thousand_separator:"",decimal_separator:"",no_of_decimal:""},visibility_control:{course_builder:{}}};var o=window._tutorobject||a;window.ajaxurl=o.ajaxurl;var s={TUTOR_SITE_URL:o.site_url,WP_AJAX_BASE_URL:o.ajaxurl,WP_API_BASE_URL:"".concat(((n=window.wpApiSettings)===null||n===void 0?void 0:n.root)||"").concat(((i=window.wpApiSettings)===null||i===void 0?void 0:i.versionString)||""),VIDEO_SOURCES_SETTINGS_URL:"".concat(o.site_url,"/wp-admin/admin.php?page=tutor_settings&tab_page=course#field_supported_video_sources"),MONETIZATION_SETTINGS_URL:"".concat(o.site_url,"/wp-admin/admin.php?page=tutor_settings&tab_page=monetization"),TUTOR_PRICING_PAGE:"https://tutorlms.com/pricing/",TUTOR_ADDONS_PAGE:"".concat(o.site_url,"/wp-admin/admin.php?page=tutor-addons"),CHATGPT_PLATFORM_URL:"https://platform.openai.com/account/api-keys",TUTOR_MY_COURSES_PAGE_URL:"".concat(o.tutor_frontend_dashboard_url,"/my-courses"),TUTOR_SUPPORT_PAGE_URL:"https://tutorlms.com/support",TUTOR_SUBSCRIPTIONS_PAGE:"".concat(o.site_url,"/wp-admin/admin.php?page=tutor-subscriptions"),TUTOR_ENROLLMENTS_PAGE:"".concat(o.site_url,"/wp-admin/admin.php?page=enrollments"),TUTOR_COUPONS_PAGE:"".concat(o.site_url,"/wp-admin/admin.php?page=tutor_coupons"),TUTOR_IMPORT_EXPORT_PAGE:"".concat(o.site_url,"/wp-admin/admin.php?page=tutor-tools&sub_page=import_export")};/* export default */const u=s},19393:function(e,t,r){"use strict";r.d(t,{Gy:()=>A,Hh:()=>E,I4:()=>g,I8:()=>u,UA:()=>O,V8:()=>m,gt:()=>x,j8:()=>T,oW:()=>S,qP:()=>C,re:()=>c,vN:()=>y,w3:()=>o,yl:()=>w});/* import */var n=r(12470);/* import */var i=/*#__PURE__*/r.n(n);/* import */var a=r(13448);var o=5*1024*1024;var s=/* unused pure expression or super */null&&["image/jpeg","image/png","image/gif"];var u=10;var c=10;var l=48;var d=7;var f=3;var p="/product";var h="/category";var v="/tag";var m=document.dir==="rtl";var g="32px";var b="46px";var _=window.innerWidth;var y={isAboveDesktop:_>=a/* .DesktopBreakpoint */.cH,isAboveTablet:_>=a/* .TabletBreakpoint */.uh,isAboveMobile:_>=a/* .MobileBreakpoint */.G2,isAboveSmallMobile:_>=a/* .SmallMobileBreakpoint */.PB};var w={HEADER_HEIGHT:56,MARGIN_TOP:88,BASIC_MODAL_HEADER_HEIGHT:50,BASIC_MODAL_MAX_WIDTH:1218};var A={MIN_NOTEBOOK_HEIGHT:430,MIN_NOTEBOOK_WIDTH:360,NOTEBOOK_HEADER:50};var x={ADMINISTRATOR:"administrator",TUTOR_INSTRUCTOR:"tutor_instructor",SUBSCRIBER:"subscriber"};var E=/*#__PURE__*/function(e){e["notebook"]="tutor_course_builder_notebook";return e}({});var O=/*#__PURE__*/function(e){e["day"]="dd";e["month"]="MMM";e["year"]="yyyy";e["yearMonthDay"]="yyyy-LL-dd";e["monthDayYear"]="MMM dd, yyyy";e["hoursMinutes"]="hh:mm a";e["yearMonthDayHourMinuteSecond"]="yyyy-MM-dd hh:mm:ss";e["yearMonthDayHourMinuteSecond24H"]="yyyy-MM-dd HH:mm:ss";e["monthDayYearHoursMinutes"]="MMM dd, yyyy, hh:mm a";e["localMonthDayYearHoursMinutes"]="PPp";e["activityDate"]="MMM dd, yyyy hh:mm aa";e["validityDate"]="dd MMMM yyyy";e["dayMonthYear"]="do MMMM, yyyy";return e}({});var S=/*#__PURE__*/function(e){e["COURSE_BUNDLE"]="course-bundle";e["SUBSCRIPTION"]="subscription";e["SOCIAL_LOGIN"]="social-login";e["CONTENT_DRIP"]="content-drip";e["TUTOR_MULTI_INSTRUCTORS"]="tutor-multi-instructors";e["TUTOR_ASSIGNMENTS"]="tutor-assignments";e["TUTOR_COURSE_PREVIEW"]="tutor-course-preview";e["TUTOR_COURSE_ATTACHMENTS"]="tutor-course-attachments";e["TUTOR_GOOGLE_MEET_INTEGRATION"]="google-meet";e["TUTOR_REPORT"]="tutor-report";e["EMAIL"]="tutor-email";e["CALENDAR"]="calendar";e["NOTIFICATIONS"]="tutor-notifications";e["GOOGLE_CLASSROOM_INTEGRATION"]="google-classroom";e["TUTOR_ZOOM_INTEGRATION"]="tutor-zoom";e["QUIZ_EXPORT_IMPORT"]="quiz-import-export";e["ENROLLMENT"]="enrollments";e["TUTOR_CERTIFICATE"]="tutor-certificate";e["GRADEBOOK"]="gradebook";e["TUTOR_PREREQUISITES"]="tutor-prerequisites";e["BUDDYPRESS"]="buddypress";e["WOOCOMMERCE_SUBSCRIPTIONS"]="wc-subscriptions";e["PAID_MEMBERSHIPS_PRO"]="pmpro";e["RESTRICT_CONTENT_PRO"]="restrict-content-pro";e["WEGLOT"]="tutor-weglot";e["WPML_MULTILINGUAL_CMS"]="tutor-wpml";e["H5P_INTEGRATION"]="h5p";e["CONTENT_BANK"]="content-bank";return e}({});var T={YOUTUBE:/^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#&?]*).*/,VIMEO:/^.*(vimeo\.com\/)((channels\/[A-z]+\/)|(groups\/[A-z]+\/videos\/))?([0-9]+)/,// eslint-disable-next-line no-useless-escape
EXTERNAL_URL:/(http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/,SHORTCODE:/^\[.*\]$/};var k=[{label:(0,n.__)("Public","tutor"),value:"publish"},{label:(0,n.__)("Password Protected","tutor"),value:"password_protected"},{label:(0,n.__)("Private","tutor"),value:"private"}];var C={COURSE_BUILDER:{BASICS:{FEATURED_IMAGE:"course_builder.basics_featured_image",INTRO_VIDEO:"course_builder.basics_intro_video",SCHEDULING_OPTIONS:"course_builder.basics_scheduling_options",PRICING_OPTIONS:"course_builder.basics_pricing_options",CATEGORIES:"course_builder.basics_categories",TAGS:"course_builder.basics_tags",AUTHOR:"course_builder.basics_author",INSTRUCTORS:"course_builder.basics_instructors",OPTIONS:{GENERAL:"course_builder.basics_options_general",CONTENT_DRIP:"course_builder.basics_options_content_drip",ENROLLMENT:"course_builder.basics_options_enrollment"}},CURRICULUM:{LESSON:{FEATURED_IMAGE:"course_builder.curriculum_lesson_featured_image",VIDEO:"course_builder.curriculum_lesson_video",VIDEO_PLAYBACK_TIME:"course_builder.curriculum_lesson_video_playback_time",EXERCISE_FILES:"course_builder.curriculum_lesson_exercise_files",LESSON_PREVIEW:"course_builder.curriculum_lesson_lesson_preview"}},ADDITIONAL:{COURSE_BENEFITS:"course_builder.additional_course_benefits",COURSE_TARGET_AUDIENCE:"course_builder.additional_course_target_audience",TOTAL_COURSE_DURATION:"course_builder.additional_total_course_duration",COURSE_MATERIALS_INCLUDES:"course_builder.additional_course_material_includes",COURSE_REQUIREMENTS:"course_builder.additional_course_requirements",CERTIFICATES:"course_builder.additional_certificate",ATTACHMENTS:"course_builder.additional_attachments",SCHEDULE_LIVE_CLASS:"course_builder.additional_schedule_live_class"}}};var I=/* unused pure expression or super */null&&{NEW:"new",UPDATE:"update",NO_CHANGE:"no_change"};var R=/* unused pure expression or super */null&&{name:"checkbox",// eslint-disable-next-line @typescript-eslint/no-explicit-any
value:"",onChange:()=>{},onBlur:()=>{},ref:()=>{}};var D=/* unused pure expression or super */null&&{invalid:false,isTouched:false,isDirty:false,isValidating:false,error:undefined}},11918:function(e,t,r){"use strict";r.d(t,{HF:()=>o,Po:()=>a,or:()=>s});/* import */var n=r(12470);/* import */var i=/*#__PURE__*/r.n(n);var a=[{label:"English",value:"english"},{label:"简体中文",value:"simplified-chinese"},{label:"繁體中文",value:"traditional-chinese"},{label:"Español",value:"spanish"},{label:"Français",value:"french"},{label:"日本語",value:"japanese"},{label:"Deutsch",value:"german"},{label:"Português",value:"portuguese"},{label:"العربية",value:"arabic"},{label:"Русский",value:"russian"},{label:"Italiano",value:"italian"},{label:"한국어",value:"korean"},{label:"हिन्दी",value:"hindi"},{label:"Nederlands",value:"dutch"},{label:"Polski",value:"polish"},{label:"አማርኛ",value:"amharic"},{label:"Български",value:"bulgarian"},{label:"বাংলা",value:"bengali"},{label:"Čeština",value:"czech"},{label:"Dansk",value:"danish"},{label:"Ελληνικά",value:"greek"},{label:"Eesti",value:"estonian"},{label:"فارسی",value:"persian"},{label:"Filipino",value:"filipino"},{label:"Hrvatski",value:"croatian"},{label:"Magyar",value:"hungarian"},{label:"Bahasa Indonesia",value:"indonesian"},{label:"Lietuvių",value:"lithuanian"},{label:"Latviešu",value:"latvian"},{label:"Melayu",value:"malay"},{label:"Norsk",value:"norwegian"},{label:"Română",value:"romanian"},{label:"Slovenčina",value:"slovak"},{label:"Slovenščina",value:"slovenian"},{label:"Српски",value:"serbian"},{label:"Svenska",value:"swedish"},{label:"ภาษาไทย",value:"thai"},{label:"Türkçe",value:"turkish"},{label:"Українська",value:"ukrainian"},{label:"اردو",value:"urdu"},{label:"Tiếng Việt",value:"vietnamese"}];var o=[{label:(0,n.__)("Formal","tutor"),value:"formal"},{label:(0,n.__)("Casual","tutor"),value:"casual"},{label:(0,n.__)("Professional","tutor"),value:"professional"},{label:(0,n.__)("Enthusiastic","tutor"),value:"enthusiastic"},{label:(0,n.__)("Informational","tutor"),value:"informational"},{label:(0,n.__)("Funny","tutor"),value:"funny"}];var s=[{label:(0,n.__)("Title","tutor"),value:"title"},{label:(0,n.__)("Essay","tutor"),value:"essay"},{label:(0,n.__)("Paragraph","tutor"),value:"paragraph"},{label:(0,n.__)("Outline","tutor"),value:"outline"}]},13448:function(e,t,r){"use strict";r.d(t,{$A:()=>n,EA:()=>y,G2:()=>g,I6:()=>s,J:()=>c,K_:()=>d,P3:()=>a,PB:()=>m,Vq:()=>h,Wy:()=>l,YK:()=>u,cH:()=>_,fE:()=>v,iL:()=>w,mw:()=>o,oU:()=>f,r7:()=>p,uh:()=>b});var n=64;var i=355;var a=56;var o={inter:"'Inter', sans-serif;",roboto:"'Roboto', sans-serif;",sfProDisplay:"'SF Pro Display', sans-serif;"};var s={brand:{blue:"#0049f8",black:"#092844"},ai:{gradient_1:"linear-gradient(73.09deg, #FF9645 18.05%, #FF6471 30.25%, #CF6EBD 55.42%, #A477D1 71.66%, #3E64DE 97.9%)",gradient_1_rtl:"linear-gradient(73.09deg, #3E64DE 97.9%, #A477D1 28.34%, #CF6EBD 44.58%, #FF6471 69.75%, #FF9645 81.95%)",gradient_2:"linear-gradient(71.97deg, #FF9645 18.57%, #FF6471 63.71%, #CF6EBD 87.71%, #9B62D4 107.71%, #3E64DE 132.85%)",gradient_2_rtl:"linear-gradient(71.97deg, #3E64DE -67.15%, #9B62D4 -92.29%, #CF6EBD 87.71%, #FF6471 36.29%, #FF9645 81.43%)"},text:{primary:"#212327",title:"#41454f",subdued:"#5b616f",hints:"#767c8e",disable:"#a4a8b2",white:"#ffffff",brand:"#3a62e0",success:"#239c46",warning:"#bd7e00",error:"#f44337",status:{processing:"#007a66",pending:"#a8710d",failed:"#cc1213",completed:"#097336",onHold:"#ac0640",cancelled:"#6f7073",primary:"#3e64de"},wp:"#2271b1",magicAi:"#484F66",ai:{purple:"#9D50FF",gradient:"linear-gradient(73.09deg, #FF9645 18.05%, #FF6471 30.25%, #CF6EBD 55.42%, #A477D1 71.66%, #3E64DE 97.9%)"}},surface:{tutor:"#ffffff",wordpress:"#f1f1f1",navbar:"#F5F5F5",courseBuilder:"#F8F8F8"},background:{brand:"#3e64de",white:"#ffffff",black:"#000000",default:"#f4f6f9",hover:"#f5f6fa",active:"#f0f1f5",disable:"#ebecf0",modal:"#161616",dark10:"#212327",dark20:"#31343b",dark30:"#41454f",null:"#ffffff",success:{fill30:"#F5FBF7",fill40:"#E5F5EB"},warning:{fill40:"#FDF4E3"},status:{success:"#e5f5eb",warning:"#fdf4e3",drip:"#e9edfb",onHold:"#fae8ef",processing:"#e5f9f6",errorFail:"#ffebeb",cancelled:"#eceef2",refunded:"#e5f5f5"},magicAi:{default:"#FBF6FF",skeleton:"#FEF4FF",8:"rgba(201, 132, 254, 0.08)"}},icon:{default:"#9197a8",hover:"#4b505c",subdued:"#7e838f",hints:"#b6b9c2",disable:{default:"#b8bdcc",background:"#cbced6",muted:"#dedede"},white:"#ffffff",brand:"#446ef5",wp:"#007cba",error:"#f55e53",warning:"#ffb505",success:"#22a848",drop:"#4761b8",processing:"#00a388"},stroke:{default:"#c3c5cb",hover:"#9095a3",bold:"#41454f",disable:"#dcdfe5",divider:"#e0e2ea",border:"#cdcfd5",white:"#ffffff",brand:"#577fff",neutral:"#7391f0",success:{default:"#4eba6d",fill70:"#6AC088"},warning:"#f5ba63",danger:"#ff9f99",status:{success:"#c8e5d2",warning:"#fae5c5",processing:"#c3e5e0",onHold:"#f1c1d2",cancelled:"#e1e1e8",refunded:"#ccebea",fail:"#fdd9d7"},magicAi:"#C984FE"},border:{neutral:"#C8C8C8",tertiary:"#F5F5F5"},action:{primary:{default:"#3e64de",hover:"#3a5ccc",focus:"#00cceb",active:"#3453b8",disable:"#e3e6eb",wp:"#2271b1",wp_hover:"#135e96"},secondary:{default:"#e9edfb",hover:"#d6dffa",active:"#d0d9f2",gray:"#f0f1f1"},outline:{default:"#ffffff",hover:"#e9edfb",active:"#e1e7fa",disable:"#cacfe0"}},wordpress:{primary:"#2271b1",primaryLight:"#007cba",hoverShape:"#7faee6",sidebarChildText:"#4ea2e6",childBg:"#2d3337",mainBg:"#1e2327",text:"#b5bcc2"},design:{dark:"#1a1b1e",grey:"#41454f",white:"#ffffff",brand:"#3e64de",success:"#24a148",warning:"#ed9700",error:"#f44337"},primary:{main:"#3e64de",100:"#28408e",90:"#395bca",80:"#6180e4",70:"#95aaed",60:"#bdcaf1",50:"#d2dbf5",40:"#e9edfb",30:"#f6f8fd"},color:{black:{main:"#212327",100:"#0b0c0e",90:"#1a1b1e",80:"#31343b",70:"#41454f",60:"#5b616f",50:"#727889",40:"#9ca0ac",30:"#b4b7c0",20:"#c0c3cb",10:"#cdcfd5",8:"#e3e6eb",5:"#eff1f6",3:"#f4f6f9",2:"#fcfcfd",0:"#ffffff"},danger:{main:"#f44337",100:"#c62828",90:"#e53935",80:"#ef5350",70:"#e57373",60:"#fbb4af",50:"#fdd9d7",40:"#feeceb",30:"#fff7f7"},success:{main:"#24a148",100:"#075a2a",90:"#007a38",80:"#3aaa5a",70:"#6ac088",60:"#99d4ae",50:"#cbe9d5",40:"#e5f5eb",30:"#f5fbf7"},warning:{main:"#ed9700",100:"#895800",90:"#e08e00",80:"#f3a33c",70:"#f5ba63",60:"#f9d093",50:"#fce7c7",40:"#fdf4e3",30:"#fefbf4"}},bg:{gray20:"#e3e5eb",white:"#ffffff",error:"#f46363",success:"#24a148",light:"#f9fafc",brand:"#E6ECFF"},ribbon:{red:"linear-gradient(to bottom, #ee0014 0%,#c10010 12.23%,#ee0014 100%)",orange:"linear-gradient(to bottom, #ff7c02 0%,#df6c00 12.23%,#f78010 100%)",green:"linear-gradient(to bottom, #02ff49 0%,#00bb35 12.23%,#04ca3c 100%)",blue:"linear-gradient(to bottom, #0267ff 3.28%,#004bbb 12.23%,#0453ca 100%)"},additionals:{lightMint:"#ebfffb",lightPurple:"#f4e8f8",lightRed:"#ffebeb",lightYellow:"#fffaeb",lightCoffee:"#fcf4ee",lightPurple2:"#f7ebfe",lightBlue:"#edf1fd"}};var u={0:"0",2:"2px",4:"4px",6:"6px",8:"8px",10:"10px",12:"12px",16:"16px",20:"20px",24:"24px",28:"28px",32:"32px",36:"36px",40:"40px",48:"48px",56:"56px",64:"64px",72:"72px",96:"96px",128:"128px",256:"256px",512:"512px"};var c={10:"0.625rem",11:"0.688rem",12:"0.75rem",13:"0.813rem",14:"0.875rem",15:"0.938rem",16:"1rem",18:"1.125rem",20:"1.25rem",24:"1.5rem",28:"1.75rem",30:"1.875rem",32:"2rem",36:"2.25rem",40:"2.5rem",48:"3rem",56:"3.5rem",60:"3.75rem",64:"4rem",80:"5rem"};var l={thin:100,extraLight:200,light:300,regular:400,medium:500,semiBold:600,bold:700,extraBold:800,black:900};var d={12:"0.5rem",14:"0.75rem",15:"0.90rem",16:"1rem",18:"1.125rem",20:"1.25rem",21:"1.313rem",22:"1.375rem",24:"1.5rem",26:"1.625rem",28:"1.75rem",32:"2rem",30:"1.875rem",34:"2.125rem",36:"2.25rem",40:"2.5rem",44:"2.75rem",48:"3rem",56:"3.5rem",58:"3.625rem",64:"4rem",70:"4.375rem",81:"5.063rem"};var f={tight:"-0.05em",normal:"0",wide:"0.05em",extraWide:"0.1em"};var p={focus:"0px 0px 0px 0px rgba(255, 255, 255, 1), 0px 0px 0px 3px rgba(0, 73, 248, 0.9)",button:"0px 1px 0.25px rgba(17, 18, 19, 0.08), inset 0px -1px 0.25px rgba(17, 18, 19, 0.24)",combinedButton:"0px 1px 0px rgba(0, 0, 0, 0.05), inset 0px -1px 0px #bcbfc3, inset 1px 0px 0px #bbbfc3, inset 0px 1px 0px #bbbfc3",combinedButtonExtend:"0px 1px 0px rgba(0, 0, 0, 0.05), inset 0px -1px 0px #bcbfc3, inset 1px 0px 0px #bbbfc3, inset 0px 1px 0px #bbbfc3, inset -1px 0px 0px #bbbfc3",insetButtonPressed:"inset 0px 2px 0px rgba(17, 18, 19, 0.08)",card:"0px 2px 1px rgba(17, 18, 19, 0.05), 0px 0px 1px rgba(17, 18, 19, 0.25)",popover:"0px 6px 22px rgba(17, 18, 19, 0.08), 0px 4px 10px rgba(17, 18, 19, 0.1)",modal:"0px 0px 2px rgba(17, 18, 19, 0.2), 0px 30px 72px rgba(17, 18, 19, 0.2)",base:"0px 1px 3px rgba(17, 18, 19, 0.15)",input:"0px 1px 0px rgba(17, 18, 19, 0.05)",switch:"0px 2px 4px 0px #0000002A",tabs:"inset 0px -1px 0px #dbdcdf",dividerTop:"inset 0px 1px 0px #E4E5E7",underline:"0px 1px 0px #C9CBCF",drag:"3px 7px 8px 0px #00000014",dropList:"0px 6px 20px 0px rgba(28, 49, 104, 0.1)",notebook:"0 0 4px 0 rgba(0, 30, 43, 0.16)",scrollable:"0px -2px 2px 0px #00000014",footer:"0px 1px 0px 0px #E4E5E7 inset"};var h={2:"2px",4:"4px",5:"5px",6:"6px",8:"8px",10:"10px",12:"12px",14:"14px",20:"20px",24:"24px",30:"30px",40:"40px",50:"50px",54:"54px",circle:"50%",card:"8px",min:"4px",input:"6px"};var v={negative:-1,positive:1,dropdown:2,level:0,sidebar:9,header:10,footer:10,modal:25,notebook:1e5,highest:99999,toast:100001};var m=480;var g=782;var b=992;var _=1280;var y={smallMobile:"@media(max-width: ".concat(m,"px)"),mobile:"@media(max-width: ".concat(g,"px)"),smallTablet:"@media(max-width: ".concat(b-1,"px)"),tablet:"@media(max-width: ".concat(_-1,"px)"),desktop:"@media(min-width: ".concat(_,"px)")};var w=1006},81547:function(e,t,r){"use strict";r.d(t,{I:()=>a});/* import */var n=r(42771);/* import */var i=r(13448);var a={heading1:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"regular";return/*#__PURE__*/(0,n/* .css */.AH)("font-size:",i/* .fontSize["80"] */.J["80"],";line-height:",i/* .lineHeight["81"] */.K_["81"],";color:",i/* .colorTokens.text.primary */.I6.text.primary,";font-weight:",i/* .fontWeight */.Wy[e],";font-family:",i/* .fontFamily.inter */.mw.inter,";")},heading2:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"regular";return/*#__PURE__*/(0,n/* .css */.AH)("font-size:",i/* .fontSize["60"] */.J["60"],";line-height:",i/* .lineHeight["70"] */.K_["70"],";color:",i/* .colorTokens.text.primary */.I6.text.primary,";font-weight:",i/* .fontWeight */.Wy[e],";font-family:",i/* .fontFamily.inter */.mw.inter,";")},heading3:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"regular";return/*#__PURE__*/(0,n/* .css */.AH)("font-size:",i/* .fontSize["40"] */.J["40"],";line-height:",i/* .lineHeight["48"] */.K_["48"],";color:",i/* .colorTokens.text.primary */.I6.text.primary,";font-weight:",i/* .fontWeight */.Wy[e],";font-family:",i/* .fontFamily.inter */.mw.inter,";")},heading4:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"regular";return/*#__PURE__*/(0,n/* .css */.AH)("font-size:",i/* .fontSize["30"] */.J["30"],";line-height:",i/* .lineHeight["40"] */.K_["40"],";color:",i/* .colorTokens.text.primary */.I6.text.primary,";font-weight:",i/* .fontWeight */.Wy[e],";font-family:",i/* .fontFamily.inter */.mw.inter,";")},heading5:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"regular";return/*#__PURE__*/(0,n/* .css */.AH)("font-size:",i/* .fontSize["24"] */.J["24"],";line-height:",i/* .lineHeight["34"] */.K_["34"],";color:",i/* .colorTokens.text.primary */.I6.text.primary,";font-weight:",i/* .fontWeight */.Wy[e],";font-family:",i/* .fontFamily.inter */.mw.inter,";")},heading6:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"regular";return/*#__PURE__*/(0,n/* .css */.AH)("font-size:",i/* .fontSize["20"] */.J["20"],";line-height:",i/* .lineHeight["30"] */.K_["30"],";color:",i/* .colorTokens.text.primary */.I6.text.primary,";font-weight:",i/* .fontWeight */.Wy[e],";font-family:",i/* .fontFamily.inter */.mw.inter,";")},body:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"regular";return/*#__PURE__*/(0,n/* .css */.AH)("font-size:",i/* .fontSize["16"] */.J["16"],";line-height:",i/* .lineHeight["26"] */.K_["26"],";color:",i/* .colorTokens.text.primary */.I6.text.primary,";font-weight:",i/* .fontWeight */.Wy[e],";font-family:",i/* .fontFamily.inter */.mw.inter,";")},caption:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"regular";return/*#__PURE__*/(0,n/* .css */.AH)("font-size:",i/* .fontSize["15"] */.J["15"],";line-height:",i/* .lineHeight["24"] */.K_["24"],";color:",i/* .colorTokens.text.primary */.I6.text.primary,";font-weight:",i/* .fontWeight */.Wy[e],";font-family:",i/* .fontFamily.inter */.mw.inter,";")},small:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"regular";return/*#__PURE__*/(0,n/* .css */.AH)("font-size:",i/* .fontSize["13"] */.J["13"],";line-height:",i/* .lineHeight["18"] */.K_["18"],";color:",i/* .colorTokens.text.primary */.I6.text.primary,";font-weight:",i/* .fontWeight */.Wy[e],";font-family:",i/* .fontFamily.inter */.mw.inter,";")},tiny:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"regular";return/*#__PURE__*/(0,n/* .css */.AH)("font-size:",i/* .fontSize["11"] */.J["11"],";line-height:",i/* .lineHeight["16"] */.K_["16"],";color:",i/* .colorTokens.text.primary */.I6.text.primary,";font-weight:",i/* .fontWeight */.Wy[e],";font-family:",i/* .fontFamily.inter */.mw.inter,";")}}},82720:function(e,t,r){"use strict";r.d(t,{J:()=>u,j:()=>c});/* import */var n=r(52639);/* import */var i=r(41594);/* import */var a=/*#__PURE__*/r.n(i);var o={supportKidsIcon:false};var s=/*#__PURE__*/a().createContext(o);var u=()=>(0,i.useContext)(s);var c=e=>{var{children:t,supportKidsIcon:r=false}=e;return/*#__PURE__*/(0,n/* .jsx */.Y)(s.Provider,{value:{supportKidsIcon:r},children:t})}},3013:function(e,t,r){"use strict";r.d(t,{A:()=>i});var n=e=>{var{each:t,children:r,fallback:n=null}=e;if(t.length===0){return n}return t.map((e,t)=>{return r(e,t)})};/* export default */const i=n},59189:function(e,t,r){"use strict";r.d(t,{A:()=>o});/* import */var n=r(49842);var i=e=>{return(0,n/* .isDefined */.O9)(e)&&!!e};var a=e=>{var{when:t,children:r,fallback:n=null}=e;var a=i(t);if(a){return typeof r==="function"?r(t):r}return n};/* export default */const o=a},57587:function(e,t,r){"use strict";r.d(t,{M:()=>s});/* import */var n=r(41147);/* import */var i=r(17900);/* import */var a=r(52639);/* import */var o=r(78988);var s=e=>{return t=>{var{visibilityKey:r}=t,s=(0,i._)(t,["visibilityKey"]);var u=(0,o/* ["default"] */.A)(r);if(!u){return null}// @ts-ignore
return/*#__PURE__*/(0,a/* .jsx */.Y)(e,(0,n._)({},s))}}},31569:function(e,t,r){"use strict";r.d(t,{J6:()=>c,LK:()=>f,sM:()=>d});/* import */var n=r(41147);/* import */var i=r(14206);/* import */var a=r(17900);/* import */var o=r(52639);/* import */var s=r(59754);/* import */var u=r(76035);var c=/*#__PURE__*/function(e){e[e["slideDown"]=0]="slideDown";e[e["slideUp"]=1]="slideUp";e[e["slideLeft"]=2]="slideLeft";e[e["slideRight"]=3]="slideRight";e[e["collapseExpand"]=4]="collapseExpand";e[e["zoomIn"]=5]="zoomIn";e[e["zoomOut"]=6]="zoomOut";e[e["fadeIn"]=7]="fadeIn";e[e["sidebar"]=8]="sidebar";return e}({});var l=100;var d=e=>{var{data:t,animationType:r=4,slideThreshold:i=20,animationDuration:a=150,minOpacity:o=0,maxOpacity:c=1,easing:d=u/* .easings.easeInOutQuad */.le.easeInOutQuad,debounceMeasure:f=false,keys:p}=e;var h=Array.isArray(t)?t.length>0:!!t;var[v,m]=(0,s/* ["default"] */.A)({debounce:f?a+l:0});var g=(0,u/* .useSpring */.zh)({from:{height:0,opacity:o,y:0},to:{height:h?m.height:0,opacity:h?c:o,y:h?0:i*-1},config:{duration:a,easing:d}});var b=(0,u/* .useSpring */.zh)({from:{x:0},to:{x:h?0:i*-1},config:{duration:a,easing:d}});var _={x:0,y:0};switch(r){case 0:_.y=i*-1;_.x=0;break;case 1:_.y=i;_.x=0;break;case 2:_.x=i;_.y=0;break;case 3:_.x=i*-1;_.y=0;break}var y=(0,u/* .useTransition */.pn)(t,{keys:p||(e=>{return e}),from:(0,n._)({opacity:o},_,r===5&&{transform:"scale(0.8)"},r===6&&{transform:"scale(1.2)"},r===7&&{opacity:0}),enter:(0,n._)({opacity:c,x:0,y:0},r===5&&{transform:"scale(1)"},r===6&&{transform:"scale(1)"},r===7&&{opacity:1}),leave:(0,n._)({opacity:o},_,r===5&&{transform:"scale(0.8)"},r===6&&{transform:"scale(1.2)"},r===7&&{opacity:0}),config:{duration:a,easing:d}});return{animationStyle:r===8?b:g,ref:v,transitions:y}};var f=e=>{var{children:t,style:r,hideOnOverflow:s=true}=e,c=(0,a._)(e,["children","style","hideOnOverflow"]);return/*#__PURE__*/(0,o/* .jsx */.Y)(u/* .animated.div */.CS.div,(0,i._)((0,n._)({},c),{style:(0,i._)((0,n._)({},r),{overflow:s?"hidden":"initial"}),children:t}))}},73755:function(e,t,r){"use strict";r.d(t,{G:()=>o});/* import */var n=r(75688);/* import */var i=r(98988);/* import */var a=r(49842);var o=e=>{var t=(0,n/* .useLocation */.zy)();var r=(0,i/* .matchRoutes */.ue)(e,t);if(!(0,a/* .isDefined */.O9)(r)){return t.pathname}var o=r.find(e=>e.pathname===t.pathname);return(o===null||o===void 0?void 0:o.route.path)||""}},34092:function(e,t,r){"use strict";r.d(t,{p:()=>u});/* import */var n=r(41147);/* import */var i=r(14206);/* import */var a=r(41594);/* import */var o=/*#__PURE__*/r.n(a);/* import */var s=r(78346);var u=e=>{var[t,r]=(0,a.useState)();var o=(0,s/* .useForm */.mN)(e);return(0,i._)((0,n._)({},o),{submitError:t,setSubmitError:r})}},84206:function(e,t,r){"use strict";r.d(t,{ZL:()=>R,tP:()=>I,ym:()=>A,zA:()=>w});/* import */var n=r(41147);/* import */var i=r(14206);/* import */var a=r(52639);/* import */var o=r(41594);/* import */var s=/*#__PURE__*/r.n(o);/* import */var u=r(75206);/* import */var c=/*#__PURE__*/r.n(u);/* import */var l=r(42771);/* import */var d=r(75823);/* import */var f=r(17944);/* import */var p=r(19393);/* import */var h=r(13448);/* import */var v=r(31569);/* import */var m=r(5387);/* import */var g=r(52874);/* import */var b=r(33231);var _={SAFE_MARGIN:12,MAX_OFFSET_VERTICAL:6,MAX_OFFSET_HORIZONTAL:12,CENTER_OFFSET:8};var y=4;var w={TOP:"top",TOP_LEFT:"topLeft",TOP_RIGHT:"topRight",RIGHT:"right",RIGHT_TOP:"rightTop",RIGHT_BOTTOM:"rightBottom",BOTTOM:"bottom",BOTTOM_LEFT:"bottomLeft",BOTTOM_RIGHT:"bottomRight",LEFT:"left",LEFT_TOP:"leftTop",LEFT_BOTTOM:"leftBottom",MIDDLE:"middle",ABSOLUTE_CENTER:"absoluteCenter"};var A=e=>{var t={[w.TOP]:w.TOP,[w.TOP_LEFT]:w.TOP_RIGHT,[w.TOP_RIGHT]:w.TOP_LEFT,[w.RIGHT]:w.LEFT,[w.RIGHT_TOP]:w.LEFT_TOP,[w.RIGHT_BOTTOM]:w.LEFT_BOTTOM,[w.BOTTOM]:w.BOTTOM,[w.BOTTOM_LEFT]:w.BOTTOM_RIGHT,[w.BOTTOM_RIGHT]:w.BOTTOM_LEFT,[w.LEFT]:w.RIGHT,[w.LEFT_TOP]:w.RIGHT_TOP,[w.LEFT_BOTTOM]:w.RIGHT_BOTTOM,[w.MIDDLE]:w.MIDDLE,[w.ABSOLUTE_CENTER]:w.ABSOLUTE_CENTER};return t[e]||e};var x=e=>{return{top:e.top,left:-e.left}};var E=(e,t)=>{var{width:r,height:n}=t;return{top:e.top<0,bottom:e.top+n>window.innerHeight,left:e.left<0,right:e.left+r>window.innerWidth}};var O=(e,t)=>{return e.startsWith("top")&&t.top||e.startsWith("bottom")&&t.bottom||e.startsWith("left")&&t.left||e.startsWith("right")&&t.right};var S=(e,t,r,n,i)=>{var{width:a,height:o}=r;var{top:s,left:u}=i;var c=t.left+t.width/2-a/2;var l=t.top+t.height/2-o/2;var d={[w.TOP]:{top:t.top-o-n,left:c},[w.TOP_LEFT]:{top:t.top-o-n,left:t.left},[w.TOP_RIGHT]:{top:t.top-o-n,left:t.right-a},[w.BOTTOM]:{top:t.bottom+n,left:c},[w.BOTTOM_LEFT]:{top:t.bottom+n,left:t.left},[w.BOTTOM_RIGHT]:{top:t.bottom+n,left:t.right-a},[w.LEFT]:{top:l,left:t.left-a-n},[w.LEFT_TOP]:{top:t.top,left:t.left-a-n},[w.LEFT_BOTTOM]:{top:t.bottom-o,left:t.left-a-n},[w.RIGHT]:{top:l,left:t.right+n},[w.RIGHT_TOP]:{top:t.top,left:t.right+n},[w.RIGHT_BOTTOM]:{top:t.bottom-o,left:t.right+n},[w.MIDDLE]:{top:l,left:c},[w.ABSOLUTE_CENTER]:{top:window.innerHeight/2-o/2,left:window.innerWidth/2-a/2}};var f=d[e]||d[w.BOTTOM];return{top:f.top+s,left:f.left+u}};var T=(e,t,r,n,i,a)=>{var o={[w.TOP]:w.BOTTOM,[w.TOP_LEFT]:w.BOTTOM_LEFT,[w.TOP_RIGHT]:w.BOTTOM_RIGHT,[w.BOTTOM]:w.TOP,[w.BOTTOM_LEFT]:w.TOP_LEFT,[w.BOTTOM_RIGHT]:w.TOP_RIGHT,[w.LEFT]:w.RIGHT,[w.LEFT_TOP]:w.RIGHT_TOP,[w.LEFT_BOTTOM]:w.RIGHT_BOTTOM,[w.RIGHT]:w.LEFT,[w.RIGHT_TOP]:w.LEFT_TOP,[w.RIGHT_BOTTOM]:w.LEFT_BOTTOM,[w.MIDDLE]:w.MIDDLE,[w.ABSOLUTE_CENTER]:w.ABSOLUTE_CENTER};var s=E(e,r);var u=O(t,s);if(!u){return{position:e,placement:t}}// Try opposite placement
var c=o[t];var l=S(c,n,r,i,a);var d=E(l,r);var f=O(c,d);if(!f){return{position:l,placement:c}}return{position:e,placement:t}};var k=(e,t,r,n)=>{var{width:i,height:a}=n;// Skip arrow for covered triggers or special placements
var o=[w.MIDDLE,w.ABSOLUTE_CENTER].includes(e);var s=r.left<t.left+_.SAFE_MARGIN&&r.left+i>t.right-_.SAFE_MARGIN&&r.top<t.top+_.SAFE_MARGIN&&r.top+a>t.bottom-_.SAFE_MARGIN;if(o||s)return{};var u=e.startsWith("top")||e.startsWith("bottom");var c=e.startsWith("left")||e.startsWith("right");if(u){var l=t.left+t.width/2;var d=Math.max(_.SAFE_MARGIN,Math.min(i-_.MAX_OFFSET_VERTICAL,l-r.left))-_.CENTER_OFFSET;if(p/* .isRTL */.V8){d=i-d-_.CENTER_OFFSET*2}return{arrowLeft:d}}if(c){var f=t.top+t.height/2;var h=Math.max(_.SAFE_MARGIN,Math.min(a-_.MAX_OFFSET_HORIZONTAL,f-r.top))-_.CENTER_OFFSET;return{arrowTop:h}}return{}};var C=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:y;var{width:n,height:i}=t;return{left:Math.max(r,Math.min(window.innerWidth-n-r,e.left)),top:Math.max(r,Math.min(window.innerHeight-i-r,e.top))}};var I=e=>{var{isOpen:t,triggerRef:r,placement:a=w.BOTTOM,arrow:s=false,gap:u=10,autoAdjustOverflow:c=true,positionModifier:l={top:0,left:0},dependencies:d=[]}=e;var f=(0,o.useMemo)(()=>r||{current:null},[r]);var h=(0,o.useRef)(null);var[v,m]=(0,o.useState)(0);var[g,b]=(0,o.useState)({left:0,top:0,placement:w.BOTTOM});var _=(0,o.useMemo)(()=>{return p/* .isRTL */.V8?A(a):a},[a]);var y=(0,o.useMemo)(()=>{return p/* .isRTL */.V8?x(l):l},[l]);(0,o.useEffect)(()=>{if(!f.current)return;m(f.current.getBoundingClientRect().width)},[f]);(0,o.useEffect)(()=>{if(!t||!f.current||!h.current)return;var e=f.current.getBoundingClientRect();var r=h.current.getBoundingClientRect();var a={width:r.width||e.width,height:r.height};var o=S(_,e,a,u,y);var l=_;if(c){var d=T(o,_,a,e,u,y);o=d.position;l=d.placement}o=C(o,a);var p=s?k(l,e,o,a):{};b((0,n._)((0,i._)((0,n._)({},o),{placement:l}),p))},[f,h,t,_,y,u,s,c,// eslint-disable-next-line react-hooks/exhaustive-deps
...d]);return{position:g,triggerWidth:v,triggerRef:f,popoverRef:h}};var R=e=>{var{isOpen:t,children:r,onClickOutside:n,onEscape:i,animationType:s=v/* .AnimationType.slideDown */.J6.slideDown}=e;var{hasModalOnStack:c}=(0,f/* .useModal */.h)();(0,m/* .useScrollLock */.K$)(t);(0,o.useEffect)(()=>{var e=e=>{if(e.key==="Escape"){i===null||i===void 0?void 0:i()}};if(!t)return;document.addEventListener("keydown",e,true);return()=>{document.removeEventListener("keydown",e,true)}},[t,c,i]);var{transitions:l}=(0,v/* .useAnimation */.sM)({data:t,animationType:s});return l((e,t)=>{if(!t){return null}return/*#__PURE__*/(0,u.createPortal)(/*#__PURE__*/(0,a/* .jsx */.Y)(v/* .AnimatedDiv */.LK,{css:D.wrapper,style:e,children:/*#__PURE__*/(0,a/* .jsx */.Y)(d/* ["default"] */.A,{children:/*#__PURE__*/(0,a/* .jsxs */.FD)("div",{className:"tutor-portal-popover",role:"presentation",children:[/*#__PURE__*/(0,a/* .jsx */.Y)("div",{css:D.backdrop,onKeyUp:b/* .noop */.lQ,onClick:e=>{e.stopPropagation();n===null||n===void 0?void 0:n()}}),r]})})}),document.body)})};var D={wrapper:/*#__PURE__*/(0,l/* .css */.AH)("position:fixed;z-index:",h/* .zIndex.highest */.fE.highest,";inset:0;"),backdrop:/*#__PURE__*/(0,l/* .css */.AH)(g/* .styleUtils.centeredFlex */.x.centeredFlex,";position:fixed;inset:0;z-index:",h/* .zIndex.negative */.fE.negative,";")}},5387:function(e,t,r){"use strict";r.d(t,{K$:()=>h});/* import */var n=r(41594);/* import */var i=/*#__PURE__*/r.n(n);var a=null;var o=[];var s=null;var u=()=>{if(a!==null)return a;var e=document.createElement("div");e.style.visibility="hidden";e.style.overflow="scroll";e.style.width="100px";document.body.appendChild(e);var t=document.createElement("div");t.style.width="100%";e.appendChild(t);a=e.offsetWidth-t.offsetWidth;document.body.removeChild(e);return a};var c=()=>{if(s){return}var e=u();var t=window.innerWidth>document.documentElement.clientWidth;s={overflow:document.body.style.overflow,paddingRight:document.body.style.paddingRight};document.body.style.overflow="hidden";if(t&&e>0){var r=parseInt(window.getComputedStyle(document.body).paddingRight||"0",10);document.body.style.paddingRight="".concat(r+e,"px")}};var l=()=>{if(!s){return}document.body.style.overflow=s.overflow;document.body.style.paddingRight=s.paddingRight;s=null};var d=()=>{var e=Symbol("scroll-lock");o.push(e);if(o.length===1){c()}return e};var f=new Set;var p=e=>{var t=o.indexOf(e);if(t===-1){return}o.splice(t,1);f.delete(e);if(o.length===0&&f.size===0){l()}};var h=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:true;var t=(0,n.useRef)(null);(0,n.useEffect)(()=>{if(!e){if(t.current){p(t.current);t.current=null}return}t.current=d();return()=>{if(t.current){var e=t.current;t.current=null;f.add(e);requestAnimationFrame(()=>{p(e)})}}},[e])}},27630:function(e,t,r){"use strict";r.d(t,{v:()=>a});/* import */var n=r(41594);/* import */var i=/*#__PURE__*/r.n(n);var a=e=>{var{options:t,isOpen:r,onSelect:i,onClose:a,selectedValue:o}=e;var[s,u]=(0,n.useState)(-1);var c=(0,n.useCallback)(e=>{if(!r)return;var n=(e,r)=>{var n;var i=e;var a=r==="down"?1:-1;do{i+=a;if(i<0)i=t.length-1;if(i>=t.length)i=0}while(i>=0&&i<t.length&&t[i].disabled)if((n=t[i])===null||n===void 0?void 0:n.disabled){return e}return i};switch(e.key){case"ArrowDown":e.preventDefault();u(e=>{var t=n(e===-1?0:e,"down");return t});break;case"ArrowUp":e.preventDefault();u(e=>{var t=n(e===-1?0:e,"up");return t});break;case"Enter":e.preventDefault();e.stopPropagation();if(s>=0&&s<t.length){var o=t[s];if(!o.disabled){a();i(o)}}break;case"Escape":e.preventDefault();e.stopPropagation();a();break;default:break}},[r,t,s,i,a]);(0,n.useEffect)(()=>{if(r){if(s===-1){var e=t.findIndex(e=>e.value===o);var n=e>=0?e:t.findIndex(e=>!e.disabled);u(n)}document.addEventListener("keydown",c,true);return()=>document.removeEventListener("keydown",c,true)}},[r,c,t,o,s]);(0,n.useEffect)(()=>{if(!r){u(-1)}},[r]);var l=(0,n.useCallback)(e=>{var r;if(!((r=t[e])===null||r===void 0?void 0:r.disabled)){u(e)}},[t]);return{activeIndex:s,setActiveIndex:l}}},78988:function(e,t,r){"use strict";r.d(t,{A:()=>u});/* import */var n=r(41594);/* import */var i=/*#__PURE__*/r.n(n);/* import */var a=r(74412);/* import */var o=r(49842);/**
 * Custom hook to control the visibility of fields based on the provided visibility key and context.
 *
 * @param {string} visibilityKey - The key used to determine the visibility of the field.
 * @returns {boolean} - Returns true if the field should be visible, false otherwise.
 */var s=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return(0,n.useMemo)(()=>{var t;// If no visibility key provided, always show the field
if(!(0,o/* .isDefined */.O9)(e)){return true}var[r,n]=(e===null||e===void 0?void 0:e.split("."))||[];if(!(0,o/* .isDefined */.O9)(r)||!(0,o/* .isDefined */.O9)(n)){return true}var i=a/* .tutorConfig */.P===null||a/* .tutorConfig */.P===void 0?void 0:(t=a/* .tutorConfig.visibility_control */.P.visibility_control)===null||t===void 0?void 0:t[r];if(!i){return true}var s=a/* .tutorConfig.current_user.roles */.P.current_user.roles;var u=s.includes("administrator")?"admin":"instructor";var c="".concat(n,"_").concat(u);if(!Object.keys(i).includes(c)){return true}return i[c]==="on"},[e])};/* export default */const u=s},21678:function(e,t,r){"use strict";r.d(t,{A:()=>g});/* import */var n=r(60599);/* import */var i=r(52639);/* import */var a=r(42771);/* import */var o=r(19393);/* import */var s=r(13448);/* import */var u=r(31569);/* import */var c=r(84206);function l(){var e=(0,n._)(["\n              border-left: 8px solid transparent;\n              border-right: 8px solid transparent;\n              border-top: 8px solid ",";\n              border-bottom: none;\n              left: ",";\n              bottom: -8px;\n              transform: ",";\n            "]);l=function t(){return e};return e}function d(){var e=(0,n._)(["\n              border-left: 8px solid transparent;\n              border-right: 8px solid transparent;\n              border-bottom: 8px solid ",";\n              border-top: none;\n              left: ",";\n              top: -8px;\n              transform: ",";\n            "]);d=function t(){return e};return e}function f(){var e=(0,n._)(["\n              border-top: 8px solid transparent;\n              border-bottom: 8px solid transparent;\n              border-left: 8px solid ",";\n              border-right: none;\n              right: -8px;\n              top: ",";\n              transform: ",";\n            "]);f=function t(){return e};return e}function p(){var e=(0,n._)(["\n              border-top: 8px solid transparent;\n              border-bottom: 8px solid transparent;\n              border-right: 8px solid ",";\n              border-left: none;\n              left: -8px;\n              top: ",";\n              transform: ",";\n            "]);p=function t(){return e};return e}function h(){var e=(0,n._)(["\n            content: '';\n            position: absolute;\n            width: 0;\n            height: 0;\n            border-color: transparent;\n            border-style: solid;\n            ","\n            ","\n            ","\n            ","\n          "]);h=function t(){return e};return e}var v=e=>{var{children:t,placement:r=c/* .POPOVER_PLACEMENTS.BOTTOM */.zA.BOTTOM,triggerRef:n,isOpen:a,gap:s,maxWidth:l,closePopover:d,closeOnEscape:f=true,animationType:p=u/* .AnimationType.slideLeft */.J6.slideLeft,arrow:h=false,border:v=false,autoAdjustOverflow:g=true,positionModifier:b={top:0,left:0},dependencies:_=[]}=e;var{position:y,triggerWidth:w,popoverRef:A}=(0,c/* .usePortalPopover */.tP)({triggerRef:n,isOpen:a,autoAdjustOverflow:g,placement:r,arrow:h,gap:s,positionModifier:b,dependencies:_});return/*#__PURE__*/(0,i/* .jsx */.Y)(c/* .Portal */.ZL,{isOpen:a,onClickOutside:d,animationType:p,onEscape:f?d:undefined,children:/*#__PURE__*/(0,i/* .jsx */.Y)("div",{css:m.wrapper({placement:o/* .isRTL */.V8?(0,c/* .getMirroredPlacement */.ym)(y.placement):y.placement,hideArrow:!h||y.arrowLeft===undefined&&y.arrowTop===undefined,arrowLeft:y.arrowLeft,arrowTop:y.arrowTop}),style:{left:y.left,top:y.top,maxWidth:l!==null&&l!==void 0?l:w},ref:A,children:/*#__PURE__*/(0,i/* .jsx */.Y)("div",{css:m.content({border:v}),children:t})})})};var m={wrapper:e=>{var{placement:t,hideArrow:r,arrowLeft:n,arrowTop:i}=e;return/*#__PURE__*/(0,a/* .css */.AH)("position:absolute;width:100%;z-index:",s/* .zIndex.dropdown */.fE.dropdown,";&::before{",t&&!r?(0,a/* .css */.AH)(h(),t.startsWith("top")&&(0,a/* .css */.AH)(l(),s/* .colorTokens.stroke.white */.I6.stroke.white,n!==undefined?"".concat(n,"px"):"50%",n===undefined?"translateX(-50%)":"none"),t.startsWith("bottom")&&(0,a/* .css */.AH)(d(),s/* .colorTokens.stroke.white */.I6.stroke.white,n!==undefined?"".concat(n,"px"):"50%",n===undefined?"translateX(-50%)":"none"),t.startsWith("left")&&(0,a/* .css */.AH)(f(),s/* .colorTokens.stroke.white */.I6.stroke.white,i!==undefined?"".concat(i,"px"):"50%",i===undefined?"translateY(-50%)":"none"),t.startsWith("right")&&(0,a/* .css */.AH)(p(),s/* .colorTokens.stroke.white */.I6.stroke.white,i!==undefined?"".concat(i,"px"):"50%",i===undefined?"translateY(-50%)":"none")):"","}")},content:e=>{var{border:t=false}=e;return/*#__PURE__*/(0,a/* .css */.AH)("background-color:",s/* .colorTokens.background.white */.I6.background.white,";box-shadow:",s/* .shadow.popover */.r7.popover,";border-radius:",s/* .borderRadius["6"] */.Vq["6"],";border:",t?"1px solid ".concat(s/* .colorTokens.stroke.divider */.I6.stroke.divider):"none",";::-webkit-scrollbar{background-color:",s/* .colorTokens.background.white */.I6.background.white,";width:10px;}::-webkit-scrollbar-thumb{background-color:",s/* .colorTokens.action.secondary["default"] */.I6.action.secondary["default"],";border-radius:",s/* .borderRadius["6"] */.Vq["6"],";}")}};/* export default */const g=v},97200:function(e,t,r){"use strict";r.d(t,{At:()=>w,MZ:()=>x,R8:()=>d,TF:()=>v,_8:()=>C,ah:()=>_,cj:()=>g,dK:()=>P,gA:()=>R,lM:()=>O,rR:()=>T,wt:()=>p});/* import */var n=r(41147);/* import */var i=r(32047);/* import */var a=r(92965);/* import */var o=r(40925);/* import */var s=r(77239);/* import */var u=r(94812);/* import */var c=r(33231);var l=e=>{return s/* .wpAjaxInstance.post */.b.post(u/* ["default"].GENERATE_AI_IMAGE */.A.GENERATE_AI_IMAGE,e)};var d=()=>{return(0,i/* .useMutation */.n)({mutationFn:l})};var f=e=>{return s/* .wpAjaxInstance.post */.b.post(u/* ["default"].MAGIC_FILL_AI_IMAGE */.A.MAGIC_FILL_AI_IMAGE,e).then(e=>e.data.data[0].b64_json)};var p=()=>{var{showToast:e}=(0,o/* .useToast */.d)();return(0,i/* .useMutation */.n)({mutationFn:f,onError:t=>{e({type:"danger",message:(0,c/* .convertToErrorMessage */.EL)(t)})}})};var h=e=>{return s/* .wpAjaxInstance.post */.b.post(u/* ["default"].MAGIC_TEXT_GENERATION */.A.MAGIC_TEXT_GENERATION,e)};var v=()=>{var{showToast:e}=(0,o/* .useToast */.d)();return(0,i/* .useMutation */.n)({mutationFn:h,onError:t=>{e({type:"danger",message:(0,c/* .convertToErrorMessage */.EL)(t)})}})};var m=e=>{return s/* .wpAjaxInstance.post */.b.post(u/* ["default"].MAGIC_AI_MODIFY_CONTENT */.A.MAGIC_AI_MODIFY_CONTENT,e)};var g=()=>{var{showToast:e}=(0,o/* .useToast */.d)();return(0,i/* .useMutation */.n)({mutationFn:m,onError:t=>{e({type:"danger",message:(0,c/* .convertToErrorMessage */.EL)(t)})}})};var b=e=>{return s/* .wpAjaxInstance.post */.b.post(u/* ["default"].USE_AI_GENERATED_IMAGE */.A.USE_AI_GENERATED_IMAGE,e)};var _=()=>{var{showToast:e}=(0,o/* .useToast */.d)();return(0,i/* .useMutation */.n)({mutationFn:b,onError:t=>{e({type:"danger",message:(0,c/* .convertToErrorMessage */.EL)(t)})}})};var y=e=>{return s/* .wpAjaxInstance.post */.b.post(u/* ["default"].GENERATE_COURSE_CONTENT */.A.GENERATE_COURSE_CONTENT,e,{signal:e.signal})};var w=e=>{var{showToast:t}=(0,o/* .useToast */.d)();return(0,i/* .useMutation */.n)({mutationKey:["GenerateCourseContent",e],mutationFn:y,onError:e=>{t({type:"danger",message:(0,c/* .convertToErrorMessage */.EL)(e)})}})};var A=e=>{return s/* .wpAjaxInstance.post */.b.post(u/* ["default"].GENERATE_COURSE_CONTENT */.A.GENERATE_COURSE_CONTENT,e,{signal:e.signal})};var x=()=>{var{showToast:e}=(0,o/* .useToast */.d)();return(0,i/* .useMutation */.n)({mutationFn:A,onError:t=>{e({type:"danger",message:(0,c/* .convertToErrorMessage */.EL)(t)})}})};var E=e=>{return s/* .wpAjaxInstance.post */.b.post(u/* ["default"].GENERATE_COURSE_TOPIC_CONTENT */.A.GENERATE_COURSE_TOPIC_CONTENT,e,{signal:e.signal})};var O=()=>{var{showToast:e}=(0,o/* .useToast */.d)();return(0,i/* .useMutation */.n)({mutationFn:E,onError:t=>{e({type:"danger",message:(0,c/* .convertToErrorMessage */.EL)(t)})}})};var S=e=>{return s/* .wpAjaxInstance.post */.b.post(u/* ["default"].SAVE_AI_GENERATED_COURSE_CONTENT */.A.SAVE_AI_GENERATED_COURSE_CONTENT,e)};var T=()=>{var{showToast:e}=(0,o/* .useToast */.d)();var t=(0,a/* .useQueryClient */.jE)();return(0,i/* .useMutation */.n)({mutationFn:S,onSuccess(){t.invalidateQueries({queryKey:["CourseDetails"]})},onError:t=>{e({type:"danger",message:(0,c/* .convertToErrorMessage */.EL)(t)})}})};var k=e=>{return s/* .wpAjaxInstance.post */.b.post(u/* ["default"].GENERATE_QUIZ_QUESTIONS */.A.GENERATE_QUIZ_QUESTIONS,e,{signal:e.signal})};var C=()=>{var{showToast:e}=(0,o/* .useToast */.d)();return(0,i/* .useMutation */.n)({mutationFn:k,onError:t=>{e({type:"danger",message:(0,c/* .convertToErrorMessage */.EL)(t)})}})};var I=e=>{return s/* .wpAjaxInstance.post */.b.post(u/* ["default"].GENERATE_AI_QUIZ_QUESTIONS */.A.GENERATE_AI_QUIZ_QUESTIONS,e,{signal:e.signal})};var R=()=>{var{showToast:e}=(0,o/* .useToast */.d)();return(0,i/* .useMutation */.n)({mutationFn:I,onError:t=>{e({type:"danger",message:(0,c/* .convertToErrorMessage */.EL)(t)})}})};var D=e=>{return s/* .wpAjaxInstance.post */.b.post(u/* ["default"].OPEN_AI_SAVE_SETTINGS */.A.OPEN_AI_SAVE_SETTINGS,(0,n._)({},e))};var P=()=>{var{showToast:e}=(0,o/* .useToast */.d)();return(0,i/* .useMutation */.n)({mutationFn:D,onSuccess:t=>{e({type:"success",message:t.message})},onError:t=>{e({type:"danger",message:(0,c/* .convertToErrorMessage */.EL)(t)})}})}},77239:function(e,t,r){"use strict";r.d(t,{b:()=>l,v:()=>c});/* import */var n=r(41147);/* import */var i=r(14206);/* import */var a=r(80071);/* import */var o=r(79848);/* import */var s=r(74412);/* import */var u=r(461);a/* ["default"].defaults.paramsSerializer */.A.defaults.paramsSerializer=e=>{return o.stringify(e)};var c=a/* ["default"].create */.A.create({baseURL:s/* ["default"].WP_API_BASE_URL */.A.WP_API_BASE_URL});c.interceptors.request.use(e=>{var t;(t=e).headers||(t.headers={});e.headers["X-WP-Nonce"]=s/* .tutorConfig.wp_rest_nonce */.P.wp_rest_nonce;if(e.method&&["post","put","patch"].includes(e.method.toLocaleLowerCase())){if(e.data){e.data=(0,u/* .convertToFormData */.jW)(e.data,e.method)}if(["put","patch"].includes(e.method.toLowerCase())){e.method="POST"}}if(e.params){e.params=(0,u/* .serializeParams */.hD)(e.params)}if(e.method&&["get","delete"].includes(e.method.toLowerCase())){e.params=(0,i._)((0,n._)({},e.params),{_method:e.method})}return e},e=>{return Promise.reject(e)});c.interceptors.response.use(e=>{return Promise.resolve(e).then(e=>e)});var l=a/* ["default"].create */.A.create({baseURL:s/* ["default"].WP_AJAX_BASE_URL */.A.WP_AJAX_BASE_URL});l.interceptors.request.use(e=>{var t,r;(t=e).headers||(t.headers={});// config.headers['X-WP-Nonce'] = tutorConfig._tutor_nonce;
// We will use REST methods while using but wp ajax only sent via post method.
e.method="POST";if(e.params){e.params=(0,u/* .serializeParams */.hD)(e.params)}(r=e).data||(r.data={});var a=s/* .tutorConfig.nonce_key */.P.nonce_key;var o=s/* .tutorConfig._tutor_nonce */.P._tutor_nonce;e.data=(0,i._)((0,n._)({},e.data,e.params),{action:e.url,[a]:o});e.data=(0,u/* .convertToFormData */.jW)(e.data,e.method);e.params={};e.url=undefined;return e},e=>Promise.reject(e));l.interceptors.response.use(e=>Promise.resolve(e).then(e=>e.data))},78931:function(e,t,r){"use strict";r.d(t,{s:()=>a});/* import */var n=r(49842);/* import */var i=r(33231);var a=(e,t)=>{return r=>{var{variants:a,defaultVariants:o}=e;var s=[];if((0,n/* .isDefined */.O9)(t)){s.push(t)}var u=(0,i/* .getObjectKeys */.Co)(a).map(e=>{var t=r[e];var n=o[e];if(t===null){return null}var i=t||n;return a[e][i]});s.push(...u.filter(n/* .isDefined */.O9));return s}}},461:function(e,t,r){"use strict";r.d(t,{hD:()=>c,jW:()=>u});/* import */var n=r(49842);var i=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return Object.keys(e).reduce((r,n)=>{var a=e[n];if(typeof a==="object"&&!isPrimitivesArray(a)&&!isFileOrBlob(a)){return _object_spread({},r,i(_object_spread({},a),"".concat(t).concat(n,".")))}return _object_spread_props(_object_spread({},r),{["".concat(t).concat(n)]:a})},{})};var a=(e,t)=>{var r=e;if(r.status===404||r.status===403||r.status===500){return{nonFieldErrors:["Unexpected error!"]}}var n=i(t);var a=i(r.data);var{non_field_errors:o}=a,s=_object_without_properties(a,["non_field_errors"]);var u=isStringArray(o)?o:[];for(var c of Object.keys(s)){if(!(c in n)){var l=a[c];if(isStringArray(l)){u.push(...l)}}}return{nonFieldErrors:u.map(translateBeErrorMessage),fieldErrors:Object.keys(a).filter(e=>e in n).reduce((e,t)=>{var r=a[t];if(isStringArray(r)){return _object_spread_props(_object_spread({},e),{[t]:r.map(translateBeErrorMessage)})}return e},{})}};var o=(e,t,r)=>{if(!isAxiosError(e)||!e.response){throw e}var{fieldErrors:n,nonFieldErrors:i}=a(e.response,r);if(i===null||i===void 0?void 0:i.length){t.setSubmitError(i[0])}if(n){for(var o of Object.keys(n)){var s=n[o];if(s.length>0){t.setError(o,{message:s[0]})}}}};var s=(e,t)=>{return r=>_async_to_generator(function*(){e.setSubmitError(undefined);try{yield t(r)}catch(t){o(t,e,r)}})()};var u=(e,t)=>{var r=function(t){var r=e[t];if(Array.isArray(r)){r.forEach((e,r)=>{if((0,n/* .isFileOrBlob */.$X)(e)||(0,n/* .isString */.Kg)(e)){i.append("".concat(t,"[").concat(r,"]"),e)}else if((0,n/* .isBoolean */.Lm)(e)||(0,n/* .isNumber */.Et)(e)){i.append("".concat(t,"[").concat(r,"]"),e.toString())}else if(typeof e==="object"&&e!==null){i.append("".concat(t,"[").concat(r,"]"),JSON.stringify(e))}else{i.append("".concat(t,"[").concat(r,"]"),e)}})}else{if((0,n/* .isFileOrBlob */.$X)(r)||(0,n/* .isString */.Kg)(r)){i.append(t,r)}else if((0,n/* .isBoolean */.Lm)(r)){i.append(t,r.toString())}else if((0,n/* .isNumber */.Et)(r)){i.append(t,"".concat(r))}else if(typeof r==="object"&&r!==null){i.append(t,JSON.stringify(r))}else{i.append(t,r)}}};var i=new FormData;for(var a of Object.keys(e))r(a);i.append("_method",t.toUpperCase());return i};var c=e=>{var t={};for(var r in e){var i=e[r];if(!(0,n/* .isDefined */.O9)(i)){t[r]="null"}else if((0,n/* .isBoolean */.Lm)(i)){t[r]=i===true?"true":"false"}else{t[r]=i}}return t}},52874:function(e,t,r){"use strict";r.d(t,{v:()=>l,x:()=>d});/* import */var n=r(60599);/* import */var i=r(42771);/* import */var a=r(13448);/* import */var o=r(81547);function s(){var e=(0,n._)(["\n      flex-direction: column;\n    "]);s=function t(){return e};return e}function u(){var e=(0,n._)(["\n      background-color: ",";\n    "]);u=function t(){return e};return e}function c(){var e=(0,n._)(["\n      cursor: grabbing;\n    "]);c=function t(){return e};return e}var l=()=>/*#__PURE__*/(0,i/* .css */.AH)("body.tutor-backend-tutor-content-bank{@media screen and (max-width:600px){#wpadminbar{position:fixed;}}}*,::after,::before{box-sizing:border-box;}html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0;font-family:",a/* .fontFamily.inter */.mw.inter,";height:100%;}main{display:block;}h1{font-size:2em;margin:0.67em 0;}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace,monospace;font-size:1em;}a{background-color:transparent;&:hover{color:inherit;}}li{list-style:none;margin:0;}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted;}b,strong{font-weight:bolder;}code,kbd,samp{font-family:monospace,monospace;font-size:1em;}small{font-size:80%;}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline;}sub{bottom:-0.25em;}sup{top:-0.5em;}img{border-style:none;}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible;}button,select{text-transform:none;}button,[type='button'],[type='reset'],[type='submit']{-webkit-appearance:button;}button::-moz-focus-inner,[type='button']::-moz-focus-inner,[type='reset']::-moz-focus-inner,[type='submit']::-moz-focus-inner{border-style:none;padding:0;}button:-moz-focusring,[type='button']:-moz-focusring,[type='reset']:-moz-focusring,[type='submit']:-moz-focusring{outline:1px dotted ButtonText;}fieldset{padding:0.35em 0.75em 0.625em;}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline;}textarea{overflow:auto;height:auto;}[type='checkbox'],[type='radio']{box-sizing:border-box;padding:0;}[type='number']::-webkit-inner-spin-button,[type='number']::-webkit-outer-spin-button{height:auto;}[type='search']{-webkit-appearance:textfield;outline-offset:-2px;}[type='search']::-webkit-search-decoration{-webkit-appearance:none;}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block;}summary{display:list-item;}template{display:none;}[hidden]{display:none;}:is(h1,h2,h3,h4,h5,h6,p){padding:0;margin:0;text-transform:unset;}table{th{text-align:-webkit-match-parent;}}");var d={centeredFlex:/*#__PURE__*/(0,i/* .css */.AH)("display:flex;justify-content:center;align-items:center;width:100%;height:100%;"),flexCenter:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"row";return/*#__PURE__*/(0,i/* .css */.AH)("display:flex;justify-content:center;align-items:center;flex-direction:row;",e==="column"&&(0,i/* .css */.AH)(s()))},boxReset:/*#__PURE__*/(0,i/* .css */.AH)("padding:0;"),ulReset:/*#__PURE__*/(0,i/* .css */.AH)("list-style:none;padding:0;margin:0;"),resetButton:/*#__PURE__*/(0,i/* .css */.AH)("background:none;border:none;outline:none;box-shadow:none;padding:0;margin:0;text-align:inherit;font-family:",a/* .fontFamily.inter */.mw.inter,";cursor:pointer;"),cardInnerSection:/*#__PURE__*/(0,i/* .css */.AH)("padding:",a/* .spacing["20"] */.YK["20"]," ",a/* .spacing["20"] */.YK["20"]," ",a/* .spacing["24"] */.YK["24"]," ",a/* .spacing["20"] */.YK["20"],";display:flex;flex-direction:column;gap:",a/* .spacing["24"] */.YK["24"],";"),fieldGroups:e=>/*#__PURE__*/(0,i/* .css */.AH)("display:flex;flex-direction:column;gap:",a/* .spacing */.YK[e],";"),titleAliasWrapper:/*#__PURE__*/(0,i/* .css */.AH)("display:flex;flex-direction:column;gap:",a/* .spacing["12"] */.YK["12"],";"),inlineSwitch:/*#__PURE__*/(0,i/* .css */.AH)("display:flex;justify-content:space-between;align-items:center;"),overflowYAuto:/*#__PURE__*/(0,i/* .css */.AH)("overflow-y:auto;scrollbar-gutter:stable;::-webkit-scrollbar{background-color:",a/* .colorTokens.primary["40"] */.I6.primary["40"],";width:3px;}::-webkit-scrollbar-thumb{background-color:",a/* .colorTokens.design.brand */.I6.design.brand,";border-radius:",a/* .borderRadius["30"] */.Vq["30"],";}"),overflowXAuto:/*#__PURE__*/(0,i/* .css */.AH)("overflow-x:auto;scrollbar-gutter:stable;::-webkit-scrollbar{background-color:",a/* .colorTokens.primary["40"] */.I6.primary["40"],";height:3px;}::-webkit-scrollbar-thumb{background-color:",a/* .colorTokens.design.brand */.I6.design.brand,";border-radius:",a/* .borderRadius["30"] */.Vq["30"],";}"),textEllipsis:/*#__PURE__*/(0,i/* .css */.AH)("text-overflow:ellipsis;overflow:hidden;white-space:nowrap;"),container:/*#__PURE__*/(0,i/* .css */.AH)("width:",a/* .containerMaxWidth */.iL,"px;margin:0 auto;"),display:{flex:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"row";return/*#__PURE__*/(0,i/* .css */.AH)("display:flex;flex-direction:",e,";")},inlineFlex:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"row";return/*#__PURE__*/(0,i/* .css */.AH)("display:inline-flex;flex-direction:",e,";")},none:/*#__PURE__*/(0,i/* .css */.AH)("display:none;"),block:/*#__PURE__*/(0,i/* .css */.AH)("display:block;"),inlineBlock:/*#__PURE__*/(0,i/* .css */.AH)("display:inline-block;")},text:{ellipsis:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1;return/*#__PURE__*/(0,i/* .css */.AH)("white-space:normal;display:-webkit-box;-webkit-line-clamp:",e,";-webkit-box-orient:vertical;overflow:hidden;-webkit-box-pack:end;")},align:{center:/*#__PURE__*/(0,i/* .css */.AH)("text-align:center;"),left:/*#__PURE__*/(0,i/* .css */.AH)("text-align:left;"),right:/*#__PURE__*/(0,i/* .css */.AH)("text-align:right;"),justify:/*#__PURE__*/(0,i/* .css */.AH)("text-align:justify;")}},inputFocus:/*#__PURE__*/(0,i/* .css */.AH)("box-shadow:none;border-color:",a/* .colorTokens.stroke["default"] */.I6.stroke["default"],";outline:2px solid ",a/* .colorTokens.stroke.brand */.I6.stroke.brand,";outline-offset:1px;"),dateAndTimeWrapper:/*#__PURE__*/(0,i/* .css */.AH)("display:grid;grid-template-columns:5.5fr 4.5fr;border-radius:",a/* .borderRadius["6"] */.Vq["6"],";position:relative;&::before{content:'';position:absolute;top:0;left:0;right:0;height:40px;outline:2px solid transparent;outline-offset:1px;border-radius:",a/* .borderRadius["6"] */.Vq["6"],";pointer-events:none;z-index:1;transition:outline-color 0.2s ease-in-out;}&:focus-within::before{outline-color:",a/* .colorTokens.stroke.brand */.I6.stroke.brand,";}> div{&:first-of-type{input{border-top-right-radius:0;border-bottom-right-radius:0;&:focus{box-shadow:none;outline:none;}}}&:last-of-type{input{border-top-left-radius:0;border-bottom-left-radius:0;border-left:none;&:focus{box-shadow:none;outline:none;}}}}"),inputCurrencyStyle:/*#__PURE__*/(0,i/* .css */.AH)("font-size:",a/* .fontSize["18"] */.J["18"],";color:",a/* .colorTokens.icon.subdued */.I6.icon.subdued,";"),crossButton:/*#__PURE__*/(0,i/* .css */.AH)("border:none;outline:none;padding:0;margin:0;text-align:inherit;cursor:pointer;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:",a/* .borderRadius.circle */.Vq.circle,";background:",a/* .colorTokens.background.white */.I6.background.white,";transition:opacity 0.3s ease-in-out;svg{color:",a/* .colorTokens.icon["default"] */.I6.icon["default"],";transition:color 0.3s ease-in-out;}:hover{svg{color:",a/* .colorTokens.icon.hover */.I6.icon.hover,";}}:focus{box-shadow:",a/* .shadow.focus */.r7.focus,";}"),aiGradientText:/*#__PURE__*/(0,i/* .css */.AH)("background:",a/* .colorTokens.text.ai.gradient */.I6.text.ai.gradient,";background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent;"),actionButton:/*#__PURE__*/(0,i/* .css */.AH)("background:none;border:none;outline:none;padding:0;margin:0;text-align:inherit;color:",a/* .colorTokens.icon["default"] */.I6.icon["default"],";display:flex;cursor:pointer;transition:color 0.3s ease-in-out;:hover:not(:disabled),:focus:not(:disabled),:active:not(:disabled){background:none;color:",a/* .colorTokens.icon.brand */.I6.icon.brand,";}:disabled{color:",a/* .colorTokens.icon.disable.background */.I6.icon.disable.background,";cursor:not-allowed;}:focus-visible{outline:2px solid ",a/* .colorTokens.stroke.brand */.I6.stroke.brand,";outline-offset:1px;border-radius:",a/* .borderRadius["2"] */.Vq["2"],";}"),backButton:/*#__PURE__*/(0,i/* .css */.AH)("background-color:transparent;width:32px;height:32px;padding:0;margin:0;flex-shrink:0;display:flex;align-items:center;justify-content:center;border:1px solid ",a/* .colorTokens.border.neutral */.I6.border.neutral,";border-radius:",a/* .borderRadius["4"] */.Vq["4"],";outline:none;color:",a/* .colorTokens.icon["default"] */.I6.icon["default"],";transition:color 0.3s ease-in-out;cursor:pointer;:hover{color:",a/* .colorTokens.icon.hover */.I6.icon.hover,";}&:focus-visible{outline:2px solid ",a/* .colorTokens.stroke.brand */.I6.stroke.brand,";outline-offset:1px;}"),optionCheckButton:/*#__PURE__*/(0,i/* .css */.AH)("background:none;border:none;outline:none;padding:0;margin:0;text-align:inherit;font-family:",a/* .fontFamily.inter */.mw.inter,";cursor:pointer;height:32px;width:32px;border-radius:",a/* .borderRadius.circle */.Vq.circle,";opacity:0;:focus-visible{outline:2px solid ",a/* .colorTokens.stroke.brand */.I6.stroke.brand,";}"),optionCounter:e=>{var{isEditing:t,isSelected:r=false}=e;return/*#__PURE__*/(0,i/* .css */.AH)("height:",a/* .spacing["24"] */.YK["24"],";width:",a/* .spacing["24"] */.YK["24"],";border-radius:",a/* .borderRadius.min */.Vq.min,";",o/* .typography.caption */.I.caption("medium"),";color:",a/* .colorTokens.text.subdued */.I6.text.subdued,";background-color:",a/* .colorTokens.background["default"] */.I6.background["default"],";text-align:center;",r&&!t&&(0,i/* .css */.AH)(u(),a/* .colorTokens.bg.white */.I6.bg.white))},optionDragButton:e=>{var{isOverlay:t}=e;return/*#__PURE__*/(0,i/* .css */.AH)("background:none;border:none;outline:none;padding:0;margin:0;text-align:inherit;font-family:",a/* .fontFamily.inter */.mw.inter,";cursor:grab;display:flex;align-items:center;justify-content:center;transform:rotate(90deg);color:",a/* .colorTokens.icon["default"] */.I6.icon["default"],";cursor:grab;place-self:center center;border-radius:",a/* .borderRadius["2"] */.Vq["2"],";&:focus,&:active,&:hover{background:none;color:",a/* .colorTokens.icon["default"] */.I6.icon["default"],";}:focus-visible{outline:2px solid ",a/* .colorTokens.stroke.brand */.I6.stroke.brand,";outline-offset:1px;}",t&&(0,i/* .css */.AH)(c()))},optionInputWrapper:/*#__PURE__*/(0,i/* .css */.AH)("display:flex;flex-direction:column;width:100%;gap:",a/* .spacing["12"] */.YK["12"],";input,textarea{background:none;border:none;outline:none;padding:0;margin:0;text-align:inherit;font-family:",a/* .fontFamily.inter */.mw.inter,";",o/* .typography.caption */.I.caption(),";flex:1;color:",a/* .colorTokens.text.subdued */.I6.text.subdued,";padding:",a/* .spacing["4"] */.YK["4"]," ",a/* .spacing["10"] */.YK["10"],";border:1px solid ",a/* .colorTokens.stroke["default"] */.I6.stroke["default"],";border-radius:",a/* .borderRadius["6"] */.Vq["6"],";resize:vertical;cursor:text;&:focus{box-shadow:none;border-color:",a/* .colorTokens.stroke["default"] */.I6.stroke["default"],";outline:2px solid ",a/* .colorTokens.stroke.brand */.I6.stroke.brand,";outline-offset:1px;}}"),objectFit:function(){var{fit:e,position:t}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{fit:"cover",position:"center"};return/*#__PURE__*/(0,i/* .css */.AH)("object-fit:",e,";object-position:",t,";")},inputClearButton:/*#__PURE__*/(0,i/* .css */.AH)("position:absolute;top:50%;right:",a/* .spacing["4"] */.YK["4"],";transform:translateY(-50%);background-color:",a/* .colorTokens.background.white */.I6.background.white,";border-radius:",a/* .borderRadius["2"] */.Vq["2"],";&:not(:disabled):not([aria-disabled='true']):hover,&:not(:disabled):not([aria-disabled='true']):focus{background-color:",a/* .colorTokens.background.hover */.I6.background.hover,";}")}},49842:function(e,t,r){"use strict";r.d(t,{$X:()=>f,Et:()=>c,Gv:()=>d,Kg:()=>o,Lm:()=>l,O9:()=>a,cW:()=>p});var n=(e,t)=>{return t in e};var i=e=>{return e.isAxiosError};var a=e=>{return e!==undefined&&e!==null};function o(e){return typeof e==="string"||e instanceof String}function s(e){return!!e&&Array.isArray(e)&&(!e.length||typeof e[0]!=="object")}function u(e){return s(e)&&(!e.length||typeof e[0]==="string"||e[0]instanceof String)}function c(e){return typeof e==="number"||e instanceof Number}function l(e){return typeof e==="boolean"||e instanceof Boolean}function d(e){return typeof e==="object"&&e!==null&&!Array.isArray(e)}var f=e=>{return e instanceof Blob||e instanceof File};var p={NEW:"new",UPDATE:"update",NO_CHANGE:"no_change"}},33231:function(e,t,r){"use strict";// EXPORTS
r.d(t,{jT:()=>/* binding */ec,Co:()=>/* binding */$,dn:()=>/* binding */Z,Ui:()=>/* binding */Q,Ak:()=>/* binding */C,lQ:()=>/* binding */E,qz:()=>/* binding */es,g1:()=>/* binding */ee,EW:()=>/* binding */et,uu:()=>/* binding */ef,q9:()=>/* binding */ea,TW:()=>/* binding */q,y1:()=>/* binding */O,ww:()=>/* binding */F,EL:()=>/* binding */en,dS:()=>/* binding */P,Gl:()=>/* binding */W,DE:()=>/* binding */eu,tw:()=>/* binding */D,G0:()=>/* binding */N,nF:()=>/* binding */V,GR:()=>/* binding */eo,oj:()=>/* binding */Y,lW:()=>/* binding */er,_r:()=>/* binding */ei,z3:()=>/* binding */K});// UNUSED EXPORTS: formatSeconds, wait, getObjectEntries, assertIsDefined, makeFirstCharacterUpperCase, arrayIntersect, getValueInArray, extractIdOnly, mapInBetween, generateCouponCode, isFileOrBlob, formatSubscriptionRepeatUnit, transformParams, objectToQueryParams, formatReadAbleBytesToBytes, hasDuplicateEntries, arrayRange
// EXTERNAL MODULE: ./node_modules/.pnpm/@swc+helpers@0.5.17/node_modules/@swc/helpers/esm/_async_to_generator.js
var n=r(93640);// EXTERNAL MODULE: ./node_modules/.pnpm/@swc+helpers@0.5.17/node_modules/@swc/helpers/esm/_object_spread.js
var i=r(41147);// EXTERNAL MODULE: ./node_modules/.pnpm/@swc+helpers@0.5.17/node_modules/@swc/helpers/esm/_object_spread_props.js
var a=r(14206);// EXTERNAL MODULE: external "wp.i18n"
var o=r(12470);// EXTERNAL MODULE: ./node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/addMinutes.js
var s=r(52575);// EXTERNAL MODULE: ./node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/format.js
var u=r(1896);// CONCATENATED MODULE: ./node_modules/.pnpm/uuid@9.0.1/node_modules/uuid/dist/esm-browser/native.js
const c=typeof crypto!=="undefined"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);/* export default */const l={randomUUID:c};// CONCATENATED MODULE: ./node_modules/.pnpm/uuid@9.0.1/node_modules/uuid/dist/esm-browser/rng.js
// Unique ID creation requires a high quality random # generator. In the browser we therefore
// require the crypto API and do not support built-in fallback to lower quality random number
// generators (like Math.random()).
let d;const f=new Uint8Array(16);function p(){// lazy load so that environments that need to polyfill have a chance to do so
if(!d){// getRandomValues needs to be invoked in a context where "this" is a Crypto implementation.
d=typeof crypto!=="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto);if(!d){throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported")}}return d(f)};// CONCATENATED MODULE: ./node_modules/.pnpm/uuid@9.0.1/node_modules/uuid/dist/esm-browser/stringify.js
/**
 * Convert array of 16 byte values to UUID string format of the form:
 * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
 */const h=[];for(let e=0;e<256;++e){h.push((e+256).toString(16).slice(1))}function v(e,t=0){// Note: Be careful editing this code!  It's been tuned for performance
// and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
return h[e[t+0]]+h[e[t+1]]+h[e[t+2]]+h[e[t+3]]+"-"+h[e[t+4]]+h[e[t+5]]+"-"+h[e[t+6]]+h[e[t+7]]+"-"+h[e[t+8]]+h[e[t+9]]+"-"+h[e[t+10]]+h[e[t+11]]+h[e[t+12]]+h[e[t+13]]+h[e[t+14]]+h[e[t+15]]}function m(e,t=0){const r=v(e,t);// Consistency check for valid UUID.  If this throws, it's likely due to one
// of the following:
// - One or more input array values don't map to a hex octet (leading to
// "undefined" in the uuid)
// - Invalid input values for the RFC `version` or `variant` fields
if(!validate(r)){throw TypeError("Stringified UUID is invalid")}return r}/* export default */const g=/* unused pure expression or super */null&&m;// CONCATENATED MODULE: ./node_modules/.pnpm/uuid@9.0.1/node_modules/uuid/dist/esm-browser/v4.js
function b(e,t,r){if(l.randomUUID&&!t&&!e){return l.randomUUID()}e=e||{};const n=e.random||(e.rng||p)();// Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
n[6]=n[6]&15|64;n[8]=n[8]&63|128;// Copy bytes to buffer, if provided
if(t){r=r||0;for(let e=0;e<16;++e){t[r+e]=n[e]}return t}return v(n)}/* export default */const _=b;// EXTERNAL MODULE: ./assets/src/js/v3/shared/config/config.ts
var y=r(74412);// EXTERNAL MODULE: ./assets/src/js/v3/shared/config/constants.ts
var w=r(19393);// EXTERNAL MODULE: ./assets/src/js/v3/shared/utils/types.ts
var A=r(49842);// CONCATENATED MODULE: ./assets/src/js/v3/shared/utils/util.ts
function x(e,t){if(e===undefined||e===null){throw new Error(t)}}var E=()=>{};var O=e=>Array.from(Array(e).keys());var S=(e,t)=>Array.from({length:t-e},(t,r)=>r+e);var T=e=>{return e instanceof Blob||e instanceof File};var k=e=>{return Array.isArray(e)?e:e?[e]:[]};// Generate unique id
var C=()=>_();// Generate coupon code
var I=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:8;var t=e;var r="MSOP0123456789ABCDEFGHNRVUKYTJLZXIW";var n="";while(t--){n+=r[Math.random()*35|0]}return n};// Useful for mock api call
var R=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return new Promise(t=>setTimeout(t,e))};/**
 * Move one array item from one index to another index
 * (don't change the original array) instead return a new one.
 *
 * @param arr Array
 * @param fromIndex Number
 * @param toIndex Number
 * @returns new Array
 */var D=(e,t,r)=>{var n=[...e];var i=t;var a=r;if(t<0){i=e.length+t}if(t>=0&&t<e.length){if(r<0){a=e.length+r}var[o]=n.splice(i,1);if(o){n.splice(a,0,o)}}return n};var P=e=>{var t=e.split(".");var r=t.pop();return r?".".concat(r):""};var M=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:true;var n={};for(var i of e){var a,o;var s=t(i);s=r?s:s.toString().toLowerCase();(a=n)[o=s]||(a[o]=0);n[s]++;var u=n[s];if(u&&u>1){return true}}return false};var F=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:new Set;var n=new Set(e.map(e=>e.id));var o=e.filter(e=>{if(r.has(e.id)){return false}if(t===0){return e.parent===0||!n.has(e.parent)}return e.parent===t});return o.reduce((t,n)=>{r.add(n.id);var o=F(e,n.id,r);return[...t,(0,a._)((0,i._)({},n),{children:o})]},[])};var Y=(e,t)=>{var r="0";if(!e){r="100%"}else if(e&&t>0){if(t>1){r="".concat(23+32*(t-1),"px")}else{r="23px"}}return r};var L=e=>{var t,r;var n=((t=e.sort)===null||t===void 0?void 0:t.direction)==="desc"?"-":"";return _object_spread({limit:e.limit,offset:e.offset,sort:((r=e.sort)===null||r===void 0?void 0:r.property)&&"".concat(n).concat(e.sort.property)},e.filter)};var N=(e,t)=>Math.floor(Math.random()*(t-e))+e;var H=(e,t,r,n,i)=>{return(e-t)*(i-n)/(r-t)+n};var j=e=>{return e.map(e=>e.id)};var U=(e,t)=>{var r=new Set(e);var n=new Set(t);var i=[];for(var a of r){if(n.has(a)){i.push(a)}}return i};var B=e=>{if(!e)return e;var t=e.charAt(0).toUpperCase();var r=e.slice(1);return"".concat(t).concat(r)};var K=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;if(!e||e<=1){return(0,o.__)("0 Bytes","tutor")}var r=1024;var n=Math.max(0,t);var i=[(0,o.__)("Bytes","tutor"),(0,o.__)("KB","tutor"),(0,o.__)("MB","tutor"),(0,o.__)("GB","tutor"),(0,o.__)("TB","tutor"),(0,o.__)("PB","tutor"),(0,o.__)("EB","tutor"),(0,o.__)("ZB","tutor"),(0,o.__)("YB","tutor")];var a=Math.floor(Math.log(e)/Math.log(r));return"".concat(Number.parseFloat((e/r**a).toFixed(n))," ").concat(i[a])};var z=e=>{if(!e||typeof e!=="string"){return 0}var[t,r]=e.split(" ");var n=parseFloat(t);var i=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"];var a=i.indexOf(r);if(a===-1){return 0}return n*1024**a};var q=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:false,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:false;return e.replace(r?t?/[^0-9-]/g:/[^0-9]/g:t?/[^0-9.-]/g:/[^0-9.]/g,"").replace(/(?!^)-/g,"").replace(r?/\./g:/(\..*)\./g,"$1")};var V=(e,t)=>{var r=false;return function n(){for(var n=arguments.length,i=new Array(n),a=0;a<n;a++){i[a]=arguments[a]}if(!r){e.apply(this,i);r=true;setTimeout(()=>{r=false},t)}}};var W=e=>{return JSON.parse(e)};var G=e=>{var t=Math.floor(e/3600).toString().padStart(2,"0");var r=Math.floor(e%3600/60).toString().padStart(2,"0");var n=Math.floor(e%60);if(t==="00"){return"".concat(r,":").concat(n," mins")}return"".concat(t,":").concat(r,":").concat(n," hrs")};var $=e=>{if(!(0,A/* .isDefined */.O9)(e)||!(0,A/* .isObject */.Gv)(e)){return[]}return Object.keys(e)};var Q=e=>{return Object.values(e)};var X=e=>{return Object.entries(e)};function J(e){var t=new URLSearchParams;for(var r in e){if(r in e){t.append(r,e[r])}}return t.toString()}var Z=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:w/* .DateFormats.yearMonthDayHourMinuteSecond24H */.UA.yearMonthDayHourMinuteSecond24H;var r=e.getTimezoneOffset();var n=(0,s/* .addMinutes */.z)(e,r);return(0,u/* .format */.GP)(n,t)};var ee=e=>{var t=new Date(e);var r=t.getTimezoneOffset();return(0,s/* .addMinutes */.z)(t,-r)};var et=e=>{return(e||"").replace(/\r\n/g,"\n")};var er=e=>{return new Promise((t,r)=>{if(navigator.clipboard&&window.isSecureContext){navigator.clipboard.writeText(e).then(()=>t()).catch(e=>r(e))}else{var n=document.createElement("textarea");n.value=e;document.body.appendChild(n);n.select();try{// if navigator.clipboard is not available, use document.execCommand('copy')
document.execCommand("copy");t()}catch(e){r(e)}finally{document.body.removeChild(n);// Clean up
}}})};var en=e=>{if(!e||!e.response||!e.response.data){return(0,o.__)("Something went wrong","tutor")}var t=e.response.data.message;if(e.response.data.status_code===422&&e.response.data.data){t=e.response.data.data[Object.keys(e.response.data.data)[0]]}return t||(0,o.__)("Something went wrong","tutor")};var ei=e=>(0,n._)(function*(){try{var t=yield fetch(e);var r=yield t.blob();var n=new FileReader;return new Promise((e,t)=>{n.readAsDataURL(r);n.onload=()=>e(n.result);n.onerror=e=>t(e)})}catch(e){throw new Error("Failed to fetch and convert image: ".concat(e))}})();var ea=(e,t)=>{if(e==="trash"){return"trash"}if(t==="private"){return"private"}if(e==="future"){return"future"}if(t==="password_protected"&&e!=="draft"){return"publish"}return e};var eo=e=>{var t;return!!((t=y/* .tutorConfig.addons_data.find */.P.addons_data.find(t=>t.base_name===e))===null||t===void 0?void 0:t.is_enabled)};var es=e=>{if(!e||typeof e!=="string"){return""}return e.normalize("NFKD")// Normalize accented characters into base forms + diacritics
.replace(/[\u0300-\u036f]/g,"")// Remove combining diacritical marks
.toLowerCase()// Remove special characters !~@#$%^&*(){}[]|\;:"',./?
// Remove characters that are NOT:
// - Basic Latin letters and numbers (a-z, 0-9)
// - Spaces and hyphens
// - Latin Extended (À-ž, etc.)
// - Greek and Coptic (Α-ω)
// - Cyrillic (А-я)
// - Hebrew (א-ת)
// - Arabic (ا-ي)
// - Devanagari (Hindi)
// - Thai
// - Tamil
// - Georgian
// - Hangul Jamo (Korean building blocks)
// - Hiragana (Japanese)
// - Katakana (Japanese)
// - CJK Unified Ideographs (Chinese/Japanese/Korean characters)
// - Hangul Syllables (Korean)
// - Hangul Compatibility Jamo
// - Hangul Jamo Extended-A
// - Hangul Jamo Extended-B
.replace(/[^a-z0-9\s\-\u00C0-\u024F\u0370-\u03FF\u0400-\u04FF\u0590-\u05FF\u0600-\u06FF\u0900-\u097F\u0E00-\u0E7F\u0B80-\u0BFF\u10A0-\u10FF\u1100-\u11FF\u3130-\u318F\u3040-\u309F\u30A0-\u30FF\u4E00-\u9FFF\uA960-\uA97F\uAC00-\uD7AF\uD7B0-\uD7FF]/g,"").replace(/\s+/g,"-")// Replace multiple spaces with single dash
.replace(/-+/g,"-")// Replace multiple dashes with single dash
.replace(/^-+|-+$/g,"")// Remove leading and trailing dashes
};var eu=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++){t[r]=arguments[r]}var n=[];t.forEach(e=>{if(e.slotKey){e.fields[e.slotKey].forEach(e=>{n.push(e.name)})}else{Object.keys(e.fields).forEach(t=>{e.fields[t].forEach(e=>{n.push(e.name)})})}});return n};var ec=e=>{var t=new DOMParser;var r=t.parseFromString(e,"text/html");return r.body.textContent||""};var el=e=>{var{unit:t="hour",value:r,useLySuffix:n=false,capitalize:i=true,showSingular:a=false}=e;if(t==="until_cancellation"){var o=__("Until Cancellation","tutor");return i?ed(o):o}var s={hour:{// translators: %d: number of hours
plural:__("%d hours","tutor"),// translators: %d: number of hours
singular:__("%d hour","tutor"),suffix:__("hourly","tutor"),base:__("hour","tutor")},day:{// translators: %d: number of days
plural:__("%d days","tutor"),// translators: %d: number of days
singular:__("%d day","tutor"),suffix:__("daily","tutor"),base:__("day","tutor")},week:{// translators: %d is the number of weeks
plural:__("%d weeks","tutor"),// translators: %d is the number of weeks
singular:__("%d week","tutor"),suffix:__("weekly","tutor"),base:__("week","tutor")},month:{// translators: %d is the number of months
plural:__("%d months","tutor"),// translators: %d is the number of months
singular:__("%d month","tutor"),suffix:__("monthly","tutor"),base:__("month","tutor")},year:{// translators: %d is the number of years
plural:__("%d years","tutor"),// translators: %d is the number of years
singular:__("%d year","tutor"),suffix:__("yearly","tutor"),base:__("year","tutor")}};if(!s[t]){return""}var u="";if(r>1){u=sprintf(s[t].plural,r)}else if(a){u=sprintf(s[t].singular,r)}else if(n){u=s[t].suffix}else{u=s[t].base}return i?ed(u):u};var ed=e=>{return e.split(" ").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")};var ef=e=>{var t=Math.floor(e/3600);var r=Math.floor(e%3600/60);var n=e%60;return{hours:t,minutes:r,seconds:n}}},18528:function(e,t,r){"use strict";r.d(t,{Kh:()=>c,WN:()=>o,XA:()=>d,wA:()=>l});/* import */var n=r(12470);/* import */var i=/*#__PURE__*/r.n(n);/* import */var a=r(76845);var o=()=>({required:{value:true,message:(0,n.__)("This field is required","tutor")}});var s=e=>{var{maxValue:t,message:r}=e;return{maxLength:{value:t,message:r||__("Max. value should be ".concat(t),"tutor")}}};var u=()=>({validate:e=>{if((e===null||e===void 0?void 0:e.amount)===undefined){return __("The field is required","tutor")}return undefined}});var c=e=>{if(!(0,a/* .isValid */.f)(new Date(e||""))){return(0,n.__)("Invalid date entered!","tutor")}return undefined};var l=e=>({validate:t=>{if(t&&e<t.length){return(0,n.__)("Maximum ".concat(e," character supported"),"tutor")}return undefined}});var d=e=>{if(!e){return undefined}var t=(0,n.__)("Invalid time entered!","tutor");var[r,i]=e.split(":");if(!r||!i){return t}var[a,o]=i.split(" ");if(!a||!o){return t}if(r.length!==2||a.length!==2){return t}if(Number(r)<1||Number(r)>12){return t}if(Number(a)<0||Number(a)>59){return t}if(!["am","pm"].includes(o.toLowerCase())){return t}return undefined}},41594:function(e){"use strict";e.exports=React},75206:function(e){"use strict";e.exports=ReactDOM},12470:function(e){"use strict";e.exports=wp.i18n},42500:function(e,t,r){"use strict";r.d(t,{$s:()=>h,Ao:()=>s,De:()=>x,SJ:()=>g,nm:()=>c,pS:()=>f,rf:()=>d,uX:()=>u});/* import */var n=r(42264);/* import */var i=r(41594);// src/Animated.ts
var a=Symbol.for("Animated:node");var o=e=>!!e&&e[a]===e;var s=e=>e&&e[a];var u=(e,t)=>(0,n/* .defineHidden */.OX)(e,a,t);var c=e=>e&&e[a]&&e[a].getPayload();var l=class{constructor(){u(this,this)}/** Get every `AnimatedValue` used by this node. */getPayload(){return this.payload||[]}};// src/AnimatedValue.ts
var d=class extends l{constructor(e){super();this._value=e;this.done=true;this.durationProgress=0;if(n.is.num(this._value)){this.lastPosition=this._value}}/** @internal */static create(e){return new d(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){if(n.is.num(e)){this.lastPosition=e;if(t){e=Math.round(e/t)*t;if(this.done){this.lastPosition=e}}}if(this._value===e){return false}this._value=e;return true}reset(){const{done:e}=this;this.done=false;if(n.is.num(this._value)){this.elapsedTime=0;this.durationProgress=0;this.lastPosition=this._value;if(e)this.lastVelocity=null;this.v0=null}}};// src/AnimatedString.ts
var f=class extends d{constructor(e){super(0);this._string=null;this._toString=(0,n/* .createInterpolator */.kx)({output:[e,e]})}/** @internal */static create(e){return new f(e)}getValue(){const e=this._string;return e==null?this._string=this._toString(this._value):e}setValue(e){if(n.is.str(e)){if(e==this._string){return false}this._string=e;this._value=1}else if(super.setValue(e)){this._string=null}else{return false}return true}reset(e){if(e){this._toString=(0,n/* .createInterpolator */.kx)({output:[this.getValue(),e]})}this._value=0;super.reset()}};// src/AnimatedArray.ts
// src/AnimatedObject.ts
// src/context.ts
var p={dependencies:null};// src/AnimatedObject.ts
var h=class extends l{constructor(e){super();this.source=e;this.setValue(e)}getValue(e){const t={};(0,n/* .eachProp */.FI)(this.source,(r,i)=>{if(o(r)){t[i]=r.getValue(e)}else if((0,n/* .hasFluidValue */.at)(r)){t[i]=(0,n/* .getFluidValue */.oq)(r)}else if(!e){t[i]=r}});return t}/** Replace the raw object data */setValue(e){this.source=e;this.payload=this._makePayload(e)}reset(){if(this.payload){(0,n/* .each */.__)(this.payload,e=>e.reset())}}/** Create a payload set. */_makePayload(e){if(e){const t=/* @__PURE__ */new Set;(0,n/* .eachProp */.FI)(e,this._addToPayload,t);return Array.from(t)}}/** Add to a payload set. */_addToPayload(e){if(p.dependencies&&(0,n/* .hasFluidValue */.at)(e)){p.dependencies.add(e)}const t=c(e);if(t){(0,n/* .each */.__)(t,e=>this.add(e))}}};// src/AnimatedArray.ts
var v=class extends h{constructor(e){super(e)}/** @internal */static create(e){return new v(e)}getValue(){return this.source.map(e=>e.getValue())}setValue(e){const t=this.getPayload();if(e.length==t.length){return t.map((t,r)=>t.setValue(e[r])).some(Boolean)}super.setValue(e.map(m));return true}};function m(e){const t=(0,n/* .isAnimatedString */.$7)(e)?f:d;return t.create(e)}// src/getAnimatedType.ts
function g(e){const t=s(e);return t?t.constructor:n.is.arr(e)?v:(0,n/* .isAnimatedString */.$7)(e)?f:d}// src/createHost.ts
// src/withAnimated.tsx
var b=(e,t)=>{const r=// Function components must use "forwardRef" to avoid being
// re-rendered on every animation frame.
!n.is.fun(e)||e.prototype&&e.prototype.isReactComponent;return(0,i.forwardRef)((a,o)=>{const s=(0,i.useRef)(null);const u=r&&// eslint-disable-next-line react-hooks/rules-of-hooks
(0,i.useCallback)(e=>{s.current=w(o,e)},[o]);const[c,l]=y(a,t);const d=(0,n/* .useForceUpdate */.CH)();const f=()=>{const e=s.current;if(r&&!e){return}const n=e?t.applyAnimatedValues(e,c.getValue(true)):false;if(n===false){d()}};const p=new _(f,l);const h=(0,i.useRef)();(0,n/* .useIsomorphicLayoutEffect */.Es)(()=>{h.current=p;(0,n/* .each */.__)(l,e=>(0,n/* .addFluidObserver */.Ec)(e,p));return()=>{if(h.current){(0,n/* .each */.__)(h.current.deps,e=>(0,n/* .removeFluidObserver */.DV)(e,h.current));n/* .raf.cancel */.er.cancel(h.current.update)}}});(0,i.useEffect)(f,[]);(0,n/* .useOnce */.H5)(()=>()=>{const e=h.current;(0,n/* .each */.__)(e.deps,t=>(0,n/* .removeFluidObserver */.DV)(t,e))});const v=t.getComponentProps(c.getValue());return /* @__PURE__ */i.createElement(e,{...v,ref:u})})};var _=class{constructor(e,t){this.update=e;this.deps=t}eventObserved(e){if(e.type=="change"){n/* .raf.write */.er.write(this.update)}}};function y(e,t){const r=/* @__PURE__ */new Set;p.dependencies=r;if(e.style)e={...e,style:t.createAnimatedStyle(e.style)};e=new h(e);p.dependencies=null;return[e,r]}function w(e,t){if(e){if(n.is.fun(e))e(t);else e.current=t}return t}// src/createHost.ts
var A=Symbol.for("AnimatedComponent");var x=(e,{applyAnimatedValues:t=()=>false,createAnimatedStyle:r=e=>new h(e),getComponentProps:i=e=>e}={})=>{const a={applyAnimatedValues:t,createAnimatedStyle:r,getComponentProps:i};const o=e=>{const t=E(e)||"Anonymous";if(n.is.str(e)){e=o[e]||(o[e]=b(e,a))}else{e=e[A]||(e[A]=b(e,a))}e.displayName=`Animated(${t})`;return e};(0,n/* .eachProp */.FI)(e,(t,r)=>{if(n.is.arr(e)){r=E(t)}o[r]=o(t)});return{animated:o}};var E=e=>n.is.str(e)?e:e&&n.is.str(e.displayName)?e.displayName:n.is.fun(e)&&e.name||null;//# sourceMappingURL=react-spring_animated.modern.mjs.map
},72690:function(e,t,r){"use strict";r.d(t,{RV:()=>/* reexport safe */n.RV,le:()=>/* reexport safe */n.le,pn:()=>eO,zh:()=>ey});/* import */var n=r(42264);/* import */var i=r(41594);/* import */var a=r(42500);// src/hooks/useChain.ts
// src/helpers.ts
function o(e,...t){return n.is.fun(e)?e(...t):e}var s=(e,t)=>e===true||!!(t&&e&&(n.is.fun(e)?e(t):(0,n/* .toArray */.$r)(e).includes(t)));var u=(e,t)=>n.is.obj(e)?t&&e[t]:e;var c=(e,t)=>e.default===true?e[t]:e.default?e.default[t]:void 0;var l=e=>e;var d=(e,t=l)=>{let r=f;if(e.default&&e.default!==true){e=e.default;r=Object.keys(e)}const i={};for(const a of r){const r=t(e[a],a);if(!n.is.und(r)){i[a]=r}}return i};var f=["config","onProps","onStart","onChange","onPause","onResume","onRest"];var p={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,// Transition props
items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,// Internal props
keys:1,callId:1,parentId:1};function h(e){const t={};let r=0;(0,n/* .eachProp */.FI)(e,(e,n)=>{if(!p[n]){t[n]=e;r++}});if(r){return t}}function v(e){const t=h(e);if(t){const r={to:t};(0,n/* .eachProp */.FI)(e,(e,n)=>n in t||(r[n]=e));return r}return{...e}}function m(e){e=(0,n/* .getFluidValue */.oq)(e);return n.is.arr(e)?e.map(m):(0,n/* .isAnimatedString */.$7)(e)?n/* .Globals.createStringInterpolator */.RV.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function g(e){for(const t in e)return true;return false}function b(e){return n.is.fun(e)||n.is.arr(e)&&n.is.obj(e[0])}function _(e,t){e.ref?.delete(e);t?.delete(e)}function y(e,t){if(t&&e.ref!==t){e.ref?.delete(e);t.add(e);e.ref=t}}// src/hooks/useChain.ts
function w(e,t,r=1e3){useIsomorphicLayoutEffect(()=>{if(t){let n=0;each(e,(e,i)=>{const a=e.current;if(a.length){let s=r*t[i];if(isNaN(s))s=n;else n=s;each(a,e=>{each(e.queue,e=>{const t=e.delay;e.delay=e=>s+o(t||0,e)})});e.start()}})}else{let t=Promise.resolve();each(e,e=>{const r=e.current;if(r.length){const n=r.map(e=>{const t=e.queue;e.queue=[];return t});t=t.then(()=>{each(r,(e,t)=>each(n[t]||[],t=>e.queue.push(t)));return Promise.all(e.start())})}})}})}// src/hooks/useSpring.ts
// src/hooks/useSprings.ts
// src/SpringValue.ts
// src/AnimationConfig.ts
// src/constants.ts
var A={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}};// src/AnimationConfig.ts
var x={...A.default,mass:1,damping:1,easing:n/* .easings.linear */.le.linear,clamp:false};var E=class{constructor(){/**
     * The initial velocity of one or more values.
     *
     * @default 0
     */this.velocity=0;Object.assign(this,x)}};function O(e,t,r){if(r){r={...r};S(r,t);t={...r,...t}}S(e,t);Object.assign(e,t);for(const t in x){if(e[t]==null){e[t]=x[t]}}let{frequency:i,damping:a}=e;const{mass:o}=e;if(!n.is.und(i)){if(i<.01)i=.01;if(a<0)a=0;e.tension=Math.pow(2*Math.PI/i,2)*o;e.friction=4*Math.PI*a*o/i}return e}function S(e,t){if(!n.is.und(t.decay)){e.duration=void 0}else{const r=!n.is.und(t.tension)||!n.is.und(t.friction);if(r||!n.is.und(t.frequency)||!n.is.und(t.damping)||!n.is.und(t.mass)){e.duration=void 0;e.decay=void 0}if(r){e.frequency=void 0}}}// src/Animation.ts
var T=[];var k=class{constructor(){this.changed=false;this.values=T;this.toValues=null;this.fromValues=T;this.config=new E;this.immediate=false}};// src/scheduleProps.ts
function C(e,{key:t,props:r,defaultProps:i,state:a,actions:u}){return new Promise((c,l)=>{let d;let f;let p=s(r.cancel??i?.cancel,t);if(p){m()}else{if(!n.is.und(r.pause)){a.paused=s(r.pause,t)}let e=i?.pause;if(e!==true){e=a.paused||s(e,t)}d=o(r.delay||0,t);if(e){a.resumeQueue.add(v);u.pause()}else{u.resume();v()}}function h(){a.resumeQueue.add(v);a.timeouts.delete(f);f.cancel();d=f.time-n/* .raf.now */.er.now()}function v(){if(d>0&&!n/* .Globals.skipAnimation */.RV.skipAnimation){a.delayed=true;f=n/* .raf.setTimeout */.er.setTimeout(m,d);a.pauseQueue.add(h);a.timeouts.add(f)}else{m()}}function m(){if(a.delayed){a.delayed=false}a.pauseQueue.delete(h);a.timeouts.delete(f);if(e<=(a.cancelId||0)){p=true}try{u.start({...r,callId:e,cancel:p},c)}catch(e){l(e)}}})}// src/runAsync.ts
// src/AnimationResult.ts
var I=(e,t)=>t.length==1?t[0]:t.some(e=>e.cancelled)?P(e.get()):t.every(e=>e.noop)?R(e.get()):D(e.get(),t.every(e=>e.finished));var R=e=>({value:e,noop:true,finished:true,cancelled:false});var D=(e,t,r=false)=>({value:e,finished:t,cancelled:r});var P=e=>({value:e,cancelled:true,finished:false});// src/runAsync.ts
function M(e,t,r,i){const{callId:a,parentId:o,onRest:s}=t;const{asyncTo:u,promise:c}=r;if(!o&&e===u&&!t.reset){return c}return r.promise=(async()=>{r.asyncId=a;r.asyncTo=e;const l=d(t,(e,t)=>// The `onRest` prop is only called when the `runAsync` promise is resolved.
    t==="onRest"?void 0:e);let f;let p;const h=new Promise((e,t)=>(f=e,p=t));const v=e=>{const t=// The `cancel` prop or `stop` method was used.
a<=(r.cancelId||0)&&P(i)||// The async `to` prop was replaced.
a!==r.asyncId&&D(i,false);if(t){e.result=t;p(e);throw e}};const m=(e,t)=>{const o=new Y;const s=new L;return(async()=>{if(n/* .Globals.skipAnimation */.RV.skipAnimation){F(r);s.result=D(i,false);p(s);throw s}v(o);const u=n.is.obj(e)?{...e}:{...t,to:e};u.parentId=a;(0,n/* .eachProp */.FI)(l,(e,t)=>{if(n.is.und(u[t])){u[t]=e}});const c=await i.start(u);v(o);if(r.paused){await new Promise(e=>{r.resumeQueue.add(e)})}return c})()};let g;if(n/* .Globals.skipAnimation */.RV.skipAnimation){F(r);return D(i,false)}try{let t;if(n.is.arr(e)){t=(async e=>{for(const t of e){await m(t)}})(e)}else{t=Promise.resolve(e(m,i.stop.bind(i)))}await Promise.all([t.then(f),h]);g=D(i.get(),true,false)}catch(e){if(e instanceof Y){g=e.result}else if(e instanceof L){g=e.result}else{throw e}}finally{if(a==r.asyncId){r.asyncId=o;r.asyncTo=o?u:void 0;r.promise=o?c:void 0}}if(n.is.fun(s)){n/* .raf.batchedUpdates */.er.batchedUpdates(()=>{s(g,i,i.item)})}return g})()}function F(e,t){(0,n/* .flush */.bX)(e.timeouts,e=>e.cancel());e.pauseQueue.clear();e.resumeQueue.clear();e.asyncId=e.asyncTo=e.promise=void 0;if(t)e.cancelId=t}var Y=class extends Error{constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise.")}};var L=class extends Error{constructor(){super("SkipAnimationSignal")}};// src/FrameValue.ts
var N=e=>e instanceof j;var H=1;var j=class extends n/* .FluidValue */.aq{constructor(){super(...arguments);this.id=H++;this._priority=0}get priority(){return this._priority}set priority(e){if(this._priority!=e){this._priority=e;this._onPriorityChange(e)}}/** Get the current value */get(){const e=(0,a/* .getAnimated */.Ao)(this);return e&&e.getValue()}/** Create a spring that maps our value to another value */to(...e){return n/* .Globals.to */.RV.to(this,e)}/** @deprecated Use the `to` method instead. */interpolate(...e){(0,n/* .deprecateInterpolate */.ZJ)();return n/* .Globals.to */.RV.to(this,e)}toJSON(){return this.get()}observerAdded(e){if(e==1)this._attach()}observerRemoved(e){if(e==0)this._detach()}/** Called when the first child is added. */_attach(){}/** Called when the last child is removed. */_detach(){}/** Tell our children about our new value */_onChange(e,t=false){(0,n/* .callFluidObservers */.MI)(this,{type:"change",parent:this,value:e,idle:t})}/** Tell our children about our new priority */_onPriorityChange(e){if(!this.idle){n/* .frameLoop.sort */.WU.sort(this)}(0,n/* .callFluidObservers */.MI)(this,{type:"priority",parent:this,priority:e})}};// src/SpringPhase.ts
var U=Symbol.for("SpringPhase");var B=1;var K=2;var z=4;var q=e=>(e[U]&B)>0;var V=e=>(e[U]&K)>0;var W=e=>(e[U]&z)>0;var G=(e,t)=>t?e[U]|=K|B:e[U]&=~K;var $=(e,t)=>t?e[U]|=z:e[U]&=~z;// src/SpringValue.ts
var Q=class extends j{constructor(e,t){super();/** The animation state */this.animation=new k;/** Some props have customizable default values */this.defaultProps={};/** The state for `runAsync` calls */this._state={paused:false,delayed:false,pauseQueue:/* @__PURE__ */new Set,resumeQueue:/* @__PURE__ */new Set,timeouts:/* @__PURE__ */new Set};/** The promise resolvers of pending `start` calls */this._pendingCalls=/* @__PURE__ */new Set;/** The counter for tracking `scheduleProps` calls */this._lastCallId=0;/** The last `scheduleProps` call that changed the `to` prop */this._lastToId=0;this._memoizedDuration=0;if(!n.is.und(e)||!n.is.und(t)){const r=n.is.obj(e)?{...e}:{...t,from:e};if(n.is.und(r.default)){r.default=true}this.start(r)}}/** Equals true when not advancing on each frame. */get idle(){return!(V(this)||this._state.asyncTo)||W(this)}get goal(){return(0,n/* .getFluidValue */.oq)(this.animation.to)}get velocity(){const e=(0,a/* .getAnimated */.Ao)(this);return e instanceof a/* .AnimatedValue */.rf?e.lastVelocity||0:e.getPayload().map(e=>e.lastVelocity||0)}/**
   * When true, this value has been animated at least once.
   */get hasAnimated(){return q(this)}/**
   * When true, this value has an unfinished animation,
   * which is either active or paused.
   */get isAnimating(){return V(this)}/**
   * When true, all current and future animations are paused.
   */get isPaused(){return W(this)}/**
   *
   *
   */get isDelayed(){return this._state.delayed}/** Advance the current animation by a number of milliseconds */advance(e){let t=true;let r=false;const i=this.animation;let{toValues:o}=i;const{config:s}=i;const u=(0,a/* .getPayload */.nm)(i.to);if(!u&&(0,n/* .hasFluidValue */.at)(i.to)){o=(0,n/* .toArray */.$r)((0,n/* .getFluidValue */.oq)(i.to))}i.values.forEach((c,l)=>{if(c.done)return;const d=// Animated strings always go from 0 to 1.
c.constructor==a/* .AnimatedString */.pS?1:u?u[l].lastPosition:o[l];let f=i.immediate;let p=d;if(!f){p=c.lastPosition;if(s.tension<=0){c.done=true;return}let t=c.elapsedTime+=e;const r=i.fromValues[l];const a=c.v0!=null?c.v0:c.v0=n.is.arr(s.velocity)?s.velocity[l]:s.velocity;let o;const u=s.precision||(r==d?.005:Math.min(1,Math.abs(d-r)*.001));if(!n.is.und(s.duration)){let n=1;if(s.duration>0){if(this._memoizedDuration!==s.duration){this._memoizedDuration=s.duration;if(c.durationProgress>0){c.elapsedTime=s.duration*c.durationProgress;t=c.elapsedTime+=e}}n=(s.progress||0)+t/this._memoizedDuration;n=n>1?1:n<0?0:n;c.durationProgress=n}p=r+s.easing(n)*(d-r);o=(p-c.lastPosition)/e;f=n==1}else if(s.decay){const e=s.decay===true?.998:s.decay;const n=Math.exp(-(1-e)*t);p=r+a/(1-e)*(1-n);f=Math.abs(c.lastPosition-p)<=u;o=a*n}else{o=c.lastVelocity==null?a:c.lastVelocity;const t=s.restVelocity||u/10;const i=s.clamp?0:s.bounce;const l=!n.is.und(i);const h=r==d?c.v0>0:r<d;let v;let m=false;const g=1;const b=Math.ceil(e/g);for(let e=0;e<b;++e){v=Math.abs(o)>t;if(!v){f=Math.abs(d-p)<=u;if(f){break}}if(l){m=p==d||p>d==h;if(m){o=-o*i;p=d}}const e=-s.tension*1e-6*(p-d);const r=-s.friction*.001*o;const n=(e+r)/s.mass;o=o+n*g;p=p+o*g}}c.lastVelocity=o;if(Number.isNaN(p)){console.warn(`Got NaN while animating:`,this);f=true}}if(u&&!u[l].done){f=false}if(f){c.done=true}else{t=false}if(c.setValue(p,s.round)){r=true}});const c=(0,a/* .getAnimated */.Ao)(this);const l=c.getValue();if(t){const e=(0,n/* .getFluidValue */.oq)(i.to);if((l!==e||r)&&!s.decay){c.setValue(e);this._onChange(e)}else if(r&&s.decay){this._onChange(l)}this._stop()}else if(r){this._onChange(l)}}/** Set the current value, while stopping the current animation */set(e){n/* .raf.batchedUpdates */.er.batchedUpdates(()=>{this._stop();this._focus(e);this._set(e)});return this}/**
   * Freeze the active animation in time, as well as any updates merged
   * before `resume` is called.
   */pause(){this._update({pause:true})}/** Resume the animation if paused. */resume(){this._update({pause:false})}/** Skip to the end of the current animation. */finish(){if(V(this)){const{to:e,config:t}=this.animation;n/* .raf.batchedUpdates */.er.batchedUpdates(()=>{this._onStart();if(!t.decay){this._set(e,false)}this._stop()})}return this}/** Push props into the pending queue. */update(e){const t=this.queue||(this.queue=[]);t.push(e);return this}start(e,t){let r;if(!n.is.und(e)){r=[n.is.obj(e)?e:{...t,to:e}]}else{r=this.queue||[];this.queue=[]}return Promise.all(r.map(e=>{const t=this._update(e);return t})).then(e=>I(this,e))}/**
   * Stop the current animation, and cancel any delayed updates.
   *
   * Pass `true` to call `onRest` with `cancelled: true`.
   */stop(e){const{to:t}=this.animation;this._focus(this.get());F(this._state,e&&this._lastCallId);n/* .raf.batchedUpdates */.er.batchedUpdates(()=>this._stop(t,e));return this}/** Restart the animation. */reset(){this._update({reset:true})}/** @internal */eventObserved(e){if(e.type=="change"){this._start()}else if(e.type=="priority"){this.priority=e.priority+1}}/**
   * Parse the `to` and `from` range from the given `props` object.
   *
   * This also ensures the initial value is available to animated components
   * during the render phase.
   */_prepareNode(e){const t=this.key||"";let{to:r,from:i}=e;r=n.is.obj(r)?r[t]:r;if(r==null||b(r)){r=void 0}i=n.is.obj(i)?i[t]:i;if(i==null){i=void 0}const o={to:r,from:i};if(!q(this)){if(e.reverse)[r,i]=[i,r];i=(0,n/* .getFluidValue */.oq)(i);if(!n.is.und(i)){this._set(i)}else if(!(0,a/* .getAnimated */.Ao)(this)){this._set(r)}}return o}/** Every update is processed by this method before merging. */_update({...e},t){const{key:r,defaultProps:i}=this;if(e.default)Object.assign(i,d(e,(e,t)=>/^on/.test(t)?u(e,r):e));en(this,e,"onProps");ei(this,"onProps",e,this);const a=this._prepareNode(e);if(Object.isFrozen(this)){throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?")}const o=this._state;return C(++this._lastCallId,{key:r,props:e,defaultProps:i,state:o,actions:{pause:()=>{if(!W(this)){$(this,true);(0,n/* .flushCalls */.Wd)(o.pauseQueue);ei(this,"onPause",D(this,X(this,this.animation.to)),this)}},resume:()=>{if(W(this)){$(this,false);if(V(this)){this._resume()}(0,n/* .flushCalls */.Wd)(o.resumeQueue);ei(this,"onResume",D(this,X(this,this.animation.to)),this)}},start:this._merge.bind(this,a)}}).then(r=>{if(e.loop&&r.finished&&!(t&&r.noop)){const t=J(e);if(t){return this._update(t,true)}}return r})}/** Merge props into the current animation */_merge(e,t,r){if(t.cancel){this.stop(true);return r(P(this))}const i=!n.is.und(e.to);const u=!n.is.und(e.from);if(i||u){if(t.callId>this._lastToId){this._lastToId=t.callId}else{return r(P(this))}}const{key:c,defaultProps:l,animation:d}=this;const{to:f,from:p}=d;let{to:h=f,from:v=p}=e;if(u&&!i&&(!t.default||n.is.und(h))){h=v}if(t.reverse)[h,v]=[v,h];const g=!(0,n/* .isEqual */.n4)(v,p);if(g){d.from=v}v=(0,n/* .getFluidValue */.oq)(v);const _=!(0,n/* .isEqual */.n4)(h,f);if(_){this._focus(h)}const y=b(t.to);const{config:w}=d;const{decay:A,velocity:x}=w;if(i||u){w.velocity=0}if(t.config&&!y){O(w,o(t.config,c),// Avoid calling the same "config" prop twice.
t.config!==l.config?o(l.config,c):void 0)}let E=(0,a/* .getAnimated */.Ao)(this);if(!E||n.is.und(h)){return r(D(this,true))}const S=// When `reset` is undefined, the `from` prop implies `reset: true`,
// except for declarative updates. When `reset` is defined, there
// must exist a value to animate from.
n.is.und(t.reset)?u&&!t.default:!n.is.und(v)&&s(t.reset,c);const T=S?v:this.get();const k=m(h);const C=n.is.num(k)||n.is.arr(k)||(0,n/* .isAnimatedString */.$7)(k);const I=!y&&(!C||s(l.immediate||t.immediate,c));if(_){const e=(0,a/* .getAnimatedType */.SJ)(h);if(e!==E.constructor){if(I){E=this._set(k)}else throw Error(`Cannot animate between ${E.constructor.name} and ${e.name}, as the "to" prop suggests`)}}const F=E.constructor;let Y=(0,n/* .hasFluidValue */.at)(h);let L=false;if(!Y){const e=S||!q(this)&&g;if(_||e){L=(0,n/* .isEqual */.n4)(m(T),k);Y=!L}if(!(0,n/* .isEqual */.n4)(d.immediate,I)&&!I||!(0,n/* .isEqual */.n4)(w.decay,A)||!(0,n/* .isEqual */.n4)(w.velocity,x)){Y=true}}if(L&&V(this)){if(d.changed&&!S){Y=true}else if(!Y){this._stop(f)}}if(!y){if(Y||(0,n/* .hasFluidValue */.at)(f)){d.values=E.getPayload();d.toValues=(0,n/* .hasFluidValue */.at)(h)?null:F==a/* .AnimatedString */.pS?[1]:(0,n/* .toArray */.$r)(k)}if(d.immediate!=I){d.immediate=I;if(!I&&!S){this._set(f)}}if(Y){const{onRest:e}=d;(0,n/* .each */.__)(er,e=>en(this,t,e));const i=D(this,X(this,f));(0,n/* .flushCalls */.Wd)(this._pendingCalls,i);this._pendingCalls.add(r);if(d.changed)n/* .raf.batchedUpdates */.er.batchedUpdates(()=>{d.changed=!S;e?.(i,this);if(S){o(l.onRest,i)}else{d.onStart?.(i,this)}})}}if(S){this._set(T)}if(y){r(M(t.to,t,this._state,this))}else if(Y){this._start()}else if(V(this)&&!_){this._pendingCalls.add(r)}else{r(R(T))}}/** Update the `animation.to` value, which might be a `FluidValue` */_focus(e){const t=this.animation;if(e!==t.to){if((0,n/* .getFluidObservers */.Wg)(this)){this._detach()}t.to=e;if((0,n/* .getFluidObservers */.Wg)(this)){this._attach()}}}_attach(){let e=0;const{to:t}=this.animation;if((0,n/* .hasFluidValue */.at)(t)){(0,n/* .addFluidObserver */.Ec)(t,this);if(N(t)){e=t.priority+1}}this.priority=e}_detach(){const{to:e}=this.animation;if((0,n/* .hasFluidValue */.at)(e)){(0,n/* .removeFluidObserver */.DV)(e,this)}}/**
   * Update the current value from outside the frameloop,
   * and return the `Animated` node.
   */_set(e,t=true){const r=(0,n/* .getFluidValue */.oq)(e);if(!n.is.und(r)){const e=(0,a/* .getAnimated */.Ao)(this);if(!e||!(0,n/* .isEqual */.n4)(r,e.getValue())){const i=(0,a/* .getAnimatedType */.SJ)(r);if(!e||e.constructor!=i){(0,a/* .setAnimated */.uX)(this,i.create(r))}else{e.setValue(r)}if(e){n/* .raf.batchedUpdates */.er.batchedUpdates(()=>{this._onChange(r,t)})}}}return(0,a/* .getAnimated */.Ao)(this)}_onStart(){const e=this.animation;if(!e.changed){e.changed=true;ei(this,"onStart",D(this,X(this,e.to)),this)}}_onChange(e,t){if(!t){this._onStart();o(this.animation.onChange,e,this)}o(this.defaultProps.onChange,e,this);super._onChange(e,t)}// This method resets the animation state (even if already animating) to
// ensure the latest from/to range is used, and it also ensures this spring
// is added to the frameloop.
_start(){const e=this.animation;(0,a/* .getAnimated */.Ao)(this).reset((0,n/* .getFluidValue */.oq)(e.to));if(!e.immediate){e.fromValues=e.values.map(e=>e.lastPosition)}if(!V(this)){G(this,true);if(!W(this)){this._resume()}}}_resume(){if(n/* .Globals.skipAnimation */.RV.skipAnimation){this.finish()}else{n/* .frameLoop.start */.WU.start(this)}}/**
   * Exit the frameloop and notify `onRest` listeners.
   *
   * Always wrap `_stop` calls with `batchedUpdates`.
   */_stop(e,t){if(V(this)){G(this,false);const r=this.animation;(0,n/* .each */.__)(r.values,e=>{e.done=true});if(r.toValues){r.onChange=r.onPause=r.onResume=void 0}(0,n/* .callFluidObservers */.MI)(this,{type:"idle",parent:this});const i=t?P(this.get()):D(this.get(),X(this,e??r.to));(0,n/* .flushCalls */.Wd)(this._pendingCalls,i);if(r.changed){r.changed=false;ei(this,"onRest",i,this)}}}};function X(e,t){const r=m(t);const i=m(e.get());return(0,n/* .isEqual */.n4)(i,r)}function J(e,t=e.loop,r=e.to){const n=o(t);if(n){const i=n!==true&&v(n);const a=(i||e).reverse;const o=!i||i.reset;return Z({...e,loop:t,// Avoid updating default props when looping.
default:false,// Never loop the `pause` prop.
pause:void 0,// For the "reverse" prop to loop as expected, the "to" prop
// must be undefined. The "reverse" prop is ignored when the
// "to" prop is an array or function.
to:!a||b(r)?r:void 0,// Ignore the "from" prop except on reset.
from:o?e.from:void 0,reset:o,// The "loop" prop can return a "useSpring" props object to
// override any of the original props.
...i})}}function Z(e){const{to:t,from:r}=e=v(e);const i=/* @__PURE__ */new Set;if(n.is.obj(t))et(t,i);if(n.is.obj(r))et(r,i);e.keys=i.size?Array.from(i):null;return e}function ee(e){const t=Z(e);if(n.is.und(t.default)){t.default=d(t)}return t}function et(e,t){(0,n/* .eachProp */.FI)(e,(e,r)=>e!=null&&t.add(r))}var er=["onStart","onRest","onChange","onPause","onResume"];function en(e,t,r){e.animation[r]=t[r]!==c(t,r)?u(t[r],e.key):void 0}function ei(e,t,...r){e.animation[t]?.(...r);e.defaultProps[t]?.(...r)}// src/Controller.ts
var ea=["onStart","onChange","onRest"];var eo=1;var es=class{constructor(e,t){this.id=eo++;/** The animated values */this.springs={};/** The queue of props passed to the `update` method. */this.queue=[];/** The counter for tracking `scheduleProps` calls */this._lastAsyncId=0;/** The values currently being animated */this._active=/* @__PURE__ */new Set;/** The values that changed recently */this._changed=/* @__PURE__ */new Set;/** Equals false when `onStart` listeners can be called */this._started=false;/** State used by the `runAsync` function */this._state={paused:false,pauseQueue:/* @__PURE__ */new Set,resumeQueue:/* @__PURE__ */new Set,timeouts:/* @__PURE__ */new Set};/** The event queues that are flushed once per frame maximum */this._events={onStart:/* @__PURE__ */new Map,onChange:/* @__PURE__ */new Map,onRest:/* @__PURE__ */new Map};this._onFrame=this._onFrame.bind(this);if(t){this._flush=t}if(e){this.start({default:true,...e})}}/**
   * Equals `true` when no spring values are in the frameloop, and
   * no async animation is currently active.
   */get idle(){return!this._state.asyncTo&&Object.values(this.springs).every(e=>{return e.idle&&!e.isDelayed&&!e.isPaused})}get item(){return this._item}set item(e){this._item=e}/** Get the current values of our springs */get(){const e={};this.each((t,r)=>e[r]=t.get());return e}/** Set the current values without animating. */set(e){for(const t in e){const r=e[t];if(!n.is.und(r)){this.springs[t].set(r)}}}/** Push an update onto the queue of each value. */update(e){if(e){this.queue.push(Z(e))}return this}/**
   * Start the queued animations for every spring, and resolve the returned
   * promise once all queued animations have finished or been cancelled.
   *
   * When you pass a queue (instead of nothing), that queue is used instead of
   * the queued animations added with the `update` method, which are left alone.
   */start(e){let{queue:t}=this;if(e){t=(0,n/* .toArray */.$r)(e).map(Z)}else{this.queue=[]}if(this._flush){return this._flush(this,t)}eh(this,t);return eu(this,t)}/** @internal */stop(e,t){if(e!==!!e){t=e}if(t){const r=this.springs;(0,n/* .each */.__)((0,n/* .toArray */.$r)(t),t=>r[t].stop(!!e))}else{F(this._state,this._lastAsyncId);this.each(t=>t.stop(!!e))}return this}/** Freeze the active animation in time */pause(e){if(n.is.und(e)){this.start({pause:true})}else{const t=this.springs;(0,n/* .each */.__)((0,n/* .toArray */.$r)(e),e=>t[e].pause())}return this}/** Resume the animation if paused. */resume(e){if(n.is.und(e)){this.start({pause:false})}else{const t=this.springs;(0,n/* .each */.__)((0,n/* .toArray */.$r)(e),e=>t[e].resume())}return this}/** Call a function once per spring value */each(e){(0,n/* .eachProp */.FI)(this.springs,e)}/** @internal Called at the end of every animation frame */_onFrame(){const{onStart:e,onChange:t,onRest:r}=this._events;const i=this._active.size>0;const a=this._changed.size>0;if(i&&!this._started||a&&!this._started){this._started=true;(0,n/* .flush */.bX)(e,([e,t])=>{t.value=this.get();e(t,this,this._item)})}const o=!i&&this._started;const s=a||o&&r.size?this.get():null;if(a&&t.size){(0,n/* .flush */.bX)(t,([e,t])=>{t.value=s;e(t,this,this._item)})}if(o){this._started=false;(0,n/* .flush */.bX)(r,([e,t])=>{t.value=s;e(t,this,this._item)})}}/** @internal */eventObserved(e){if(e.type=="change"){this._changed.add(e.parent);if(!e.idle){this._active.add(e.parent)}}else if(e.type=="idle"){this._active.delete(e.parent)}else return;n/* .raf.onFrame */.er.onFrame(this._onFrame)}};function eu(e,t){return Promise.all(t.map(t=>ec(e,t))).then(t=>I(e,t))}async function ec(e,t,r){const{keys:i,to:a,from:o,loop:s,onRest:u,onResolve:l}=t;const d=n.is.obj(t.default)&&t.default;if(s){t.loop=false}if(a===false)t.to=null;if(o===false)t.from=null;const f=n.is.arr(a)||n.is.fun(a)?a:void 0;if(f){t.to=void 0;t.onRest=void 0;if(d){d.onRest=void 0}}else{(0,n/* .each */.__)(ea,r=>{const i=t[r];if(n.is.fun(i)){const n=e["_events"][r];t[r]=({finished:e,cancelled:t})=>{const r=n.get(i);if(r){if(!e)r.finished=false;if(t)r.cancelled=true}else{n.set(i,{value:null,finished:e||false,cancelled:t||false})}};if(d){d[r]=t[r]}}})}const p=e["_state"];if(t.pause===!p.paused){p.paused=t.pause;(0,n/* .flushCalls */.Wd)(t.pause?p.pauseQueue:p.resumeQueue)}else if(p.paused){t.pause=true}const h=(i||Object.keys(e.springs)).map(r=>e.springs[r].start(t));const v=t.cancel===true||c(t,"cancel")===true;if(f||v&&p.asyncId){h.push(C(++e["_lastAsyncId"],{props:t,state:p,actions:{pause:n/* .noop */.lQ,resume:n/* .noop */.lQ,start(t,r){if(v){F(p,e["_lastAsyncId"]);r(P(e))}else{t.onRest=u;r(M(f,t,p,e))}}}}))}if(p.paused){await new Promise(e=>{p.resumeQueue.add(e)})}const m=I(e,await Promise.all(h));if(s&&m.finished&&!(r&&m.noop)){const r=J(t,s,a);if(r){eh(e,[r]);return ec(e,r,true)}}if(l){n/* .raf.batchedUpdates */.er.batchedUpdates(()=>l(m,e,e.item))}return m}function el(e,t){const r={...e.springs};if(t){(0,n/* .each */.__)((0,n/* .toArray */.$r)(t),e=>{if(n.is.und(e.keys)){e=Z(e)}if(!n.is.obj(e.to)){e={...e,to:void 0}}ep(r,e,e=>{return ef(e)})})}ed(e,r);return r}function ed(e,t){(0,n/* .eachProp */.FI)(t,(t,r)=>{if(!e.springs[r]){e.springs[r]=t;(0,n/* .addFluidObserver */.Ec)(t,e)}})}function ef(e,t){const r=new Q;r.key=e;if(t){(0,n/* .addFluidObserver */.Ec)(r,t)}return r}function ep(e,t,r){if(t.keys){(0,n/* .each */.__)(t.keys,n=>{const i=e[n]||(e[n]=r(n));i["_prepareNode"](t)})}}function eh(e,t){(0,n/* .each */.__)(t,t=>{ep(e.springs,t,t=>{return ef(t,e)})})}// src/SpringContext.tsx
var ev=({children:e,...t})=>{const r=(0,i.useContext)(em);const a=t.pause||!!r.pause,o=t.immediate||!!r.immediate;t=(0,n/* .useMemoOne */.MA)(()=>({pause:a,immediate:o}),[a,o]);const{Provider:s}=em;return /* @__PURE__ */i.createElement(s,{value:t},e)};var em=eg(ev,{});ev.Provider=em.Provider;ev.Consumer=em.Consumer;function eg(e,t){Object.assign(e,i.createContext(t));e.Provider._context=e;e.Consumer._context=e;return e}// src/SpringRef.ts
var eb=()=>{const e=[];const t=function(t){(0,n/* .deprecateDirectCall */.HX)();const i=[];(0,n/* .each */.__)(e,(e,a)=>{if(n.is.und(t)){i.push(e.start())}else{const n=r(t,e,a);if(n){i.push(e.start(n))}}});return i};t.current=e;t.add=function(t){if(!e.includes(t)){e.push(t)}};t.delete=function(t){const r=e.indexOf(t);if(~r)e.splice(r,1)};t.pause=function(){(0,n/* .each */.__)(e,e=>e.pause(...arguments));return this};t.resume=function(){(0,n/* .each */.__)(e,e=>e.resume(...arguments));return this};t.set=function(t){(0,n/* .each */.__)(e,(e,r)=>{const i=n.is.fun(t)?t(r,e):t;if(i){e.set(i)}})};t.start=function(t){const r=[];(0,n/* .each */.__)(e,(e,i)=>{if(n.is.und(t)){r.push(e.start())}else{const n=this._getProps(t,e,i);if(n){r.push(e.start(n))}}});return r};t.stop=function(){(0,n/* .each */.__)(e,e=>e.stop(...arguments));return this};t.update=function(t){(0,n/* .each */.__)(e,(e,r)=>e.update(this._getProps(t,e,r)));return this};const r=function(e,t,r){return n.is.fun(e)?e(r,t):e};t._getProps=r;return t};// src/hooks/useSprings.ts
function e_(e,t,r){const a=n.is.fun(t)&&t;if(a&&!r)r=[];const o=(0,i.useMemo)(()=>a||arguments.length==3?eb():void 0,[]);const s=(0,i.useRef)(0);const u=(0,n/* .useForceUpdate */.CH)();const c=(0,i.useMemo)(()=>({ctrls:[],queue:[],flush(e,t){const r=el(e,t);const n=s.current>0&&!c.queue.length&&!Object.keys(r).some(t=>!e.springs[t]);return n?eu(e,t):new Promise(n=>{ed(e,r);c.queue.push(()=>{n(eu(e,t))});u()})}}),[]);const l=(0,i.useRef)([...c.ctrls]);const d=[];const f=(0,n/* .usePrev */.NQ)(e)||0;(0,i.useMemo)(()=>{(0,n/* .each */.__)(l.current.slice(e,f),e=>{_(e,o);e.stop(true)});l.current.length=e;p(f,e)},[e]);(0,i.useMemo)(()=>{p(0,Math.min(f,e))},r);function p(e,r){for(let n=e;n<r;n++){const e=l.current[n]||(l.current[n]=new es(null,c.flush));const r=a?a(n,e):t[n];if(r){d[n]=ee(r)}}}const h=l.current.map((e,t)=>el(e,d[t]));const v=(0,i.useContext)(ev);const m=(0,n/* .usePrev */.NQ)(v);const b=v!==m&&g(v);(0,n/* .useIsomorphicLayoutEffect */.Es)(()=>{s.current++;c.ctrls=l.current;const{queue:e}=c;if(e.length){c.queue=[];(0,n/* .each */.__)(e,e=>e())}(0,n/* .each */.__)(l.current,(e,t)=>{o?.add(e);if(b){e.start({default:v})}const r=d[t];if(r){y(e,r.ref);if(e.ref){e.queue.push(r)}else{e.start(r)}}})});(0,n/* .useOnce */.H5)(()=>()=>{(0,n/* .each */.__)(c.ctrls,e=>e.stop(true))});const w=h.map(e=>({...e}));return o?[w,o]:w}// src/hooks/useSpring.ts
function ey(e,t){const r=n.is.fun(e);const[[i],a]=e_(1,r?e:[e],r?t||[]:t);return r||arguments.length==2?[i,a]:i}// src/hooks/useSpringRef.ts
var ew=()=>eb();var eA=()=>useState(ew)[0];// src/hooks/useSpringValue.ts
var ex=(e,t)=>{const r=useConstant(()=>new Q(e,t));useOnce2(()=>()=>{r.stop()});return r};// src/hooks/useTrail.ts
function eE(e,t,r){const n=is10.fun(t)&&t;if(n&&!r)r=[];let i=true;let a=void 0;const o=e_(e,(e,r)=>{const o=n?n(e,r):t;a=o.ref;i=i&&o.reverse;return o},// Ensure the props function is called when no deps exist.
// This works around the 3 argument rule.
r||[{}]);useIsomorphicLayoutEffect3(()=>{each6(o[1].current,(e,t)=>{const r=o[1].current[t+(i?1:-1)];y(e,a);if(e.ref){if(r){e.update({to:r.springs})}return}if(r){e.start({to:r.springs})}else{e.start()}})},r);if(n||arguments.length==3){const e=a??o[1];e["_getProps"]=(t,r,n)=>{const i=is10.fun(t)?t(n,r):t;if(i){const t=e.current[n+(i.reverse?1:-1)];if(t)i.to=t.springs;return i}};return o}return o[0]}// src/hooks/useTransition.tsx
function eO(e,t,r){const a=n.is.fun(t)&&t;const{reset:s,sort:u,trail:c=0,expires:l=true,exitBeforeEnter:f=false,onDestroyed:p,ref:h,config:m}=a?a():t;const b=(0,i.useMemo)(()=>a||arguments.length==3?eb():void 0,[]);const w=(0,n/* .toArray */.$r)(e);const A=[];const x=(0,i.useRef)(null);const E=s?null:x.current;(0,n/* .useIsomorphicLayoutEffect */.Es)(()=>{x.current=A});(0,n/* .useOnce */.H5)(()=>{(0,n/* .each */.__)(A,e=>{b?.add(e.ctrl);e.ctrl.ref=b});return()=>{(0,n/* .each */.__)(x.current,e=>{if(e.expired){clearTimeout(e.expirationId)}_(e.ctrl,b);e.ctrl.stop(true)})}});const O=eT(w,a?a():t,E);const S=s&&x.current||[];(0,n/* .useIsomorphicLayoutEffect */.Es)(()=>(0,n/* .each */.__)(S,({ctrl:e,item:t,key:r})=>{_(e,b);o(p,t,r)}));const T=[];if(E)(0,n/* .each */.__)(E,(e,t)=>{if(e.expired){clearTimeout(e.expirationId);S.push(e)}else{t=T[t]=O.indexOf(e.key);if(~t)A[t]=e}});(0,n/* .each */.__)(w,(e,t)=>{if(!A[t]){A[t]={key:O[t],item:e,phase:"mount"/* MOUNT */,ctrl:new es};A[t].ctrl.item=e}});if(T.length){let e=-1;const{leave:r}=a?a():t;(0,n/* .each */.__)(T,(t,n)=>{const i=E[n];if(~t){e=A.indexOf(i);A[e]={...i,item:w[t]}}else if(r){A.splice(++e,0,i)}})}if(n.is.fun(u)){A.sort((e,t)=>u(e.item,t.item))}let k=-c;const C=(0,n/* .useForceUpdate */.CH)();const I=d(t);const R=/* @__PURE__ */new Map;const D=(0,i.useRef)(/* @__PURE__ */new Map);const P=(0,i.useRef)(false);(0,n/* .each */.__)(A,(e,r)=>{const i=e.key;const s=e.phase;const u=a?a():t;let d;let p;const g=o(u.delay||0,i);if(s=="mount"/* MOUNT */){d=u.enter;p="enter"/* ENTER */}else{const e=O.indexOf(i)<0;if(s!="leave"/* LEAVE */){if(e){d=u.leave;p="leave"/* LEAVE */}else if(d=u.update){p="update"/* UPDATE */}else return}else if(!e){d=u.enter;p="enter"/* ENTER */}else return}d=o(d,e.item,r);d=n.is.obj(d)?v(d):{to:d};if(!d.config){const t=m||I.config;d.config=o(t,e.item,r,p)}k+=c;const b={...I,// we need to add our props.delay value you here.
delay:g+k,ref:h,immediate:u.immediate,// This prevents implied resets.
reset:false,// Merge any phase-specific props.
...d};if(p=="enter"/* ENTER */&&n.is.und(b.from)){const i=a?a():t;const s=n.is.und(i.initial)||E?i.from:i.initial;b.from=o(s,e.item,r)}const{onResolve:_}=b;b.onResolve=e=>{o(_,e);const t=x.current;const r=t.find(e=>e.key===i);if(!r)return;if(e.cancelled&&r.phase!="update"/* UPDATE */){return}if(r.ctrl.idle){const e=t.every(e=>e.ctrl.idle);if(r.phase=="leave"/* LEAVE */){const t=o(l,r.item);if(t!==false){const n=t===true?0:t;r.expired=true;if(!e&&n>0){if(n<=0x7fffffff)r.expirationId=setTimeout(C,n);return}}}if(e&&t.some(e=>e.expired)){D.current.delete(r);if(f){P.current=true}C()}}};const y=el(e.ctrl,b);if(p==="leave"/* LEAVE */&&f){D.current.set(e,{phase:p,springs:y,payload:b})}else{R.set(e,{phase:p,springs:y,payload:b})}});const M=(0,i.useContext)(ev);const F=(0,n/* .usePrev */.NQ)(M);const Y=M!==F&&g(M);(0,n/* .useIsomorphicLayoutEffect */.Es)(()=>{if(Y){(0,n/* .each */.__)(A,e=>{e.ctrl.start({default:M})})}},[M]);(0,n/* .each */.__)(R,(e,t)=>{if(D.current.size){const e=A.findIndex(e=>e.key===t.key);A.splice(e,1)}});(0,n/* .useIsomorphicLayoutEffect */.Es)(()=>{(0,n/* .each */.__)(D.current.size?D.current:R,({phase:e,payload:t},r)=>{const{ctrl:n}=r;r.phase=e;b?.add(n);if(Y&&e=="enter"/* ENTER */){n.start({default:M})}if(t){y(n,t.ref);if((n.ref||b)&&!P.current){n.update(t)}else{n.start(t);if(P.current){P.current=false}}}})},s?void 0:r);const L=e=>/* @__PURE__ */i.createElement(i.Fragment,null,A.map((t,r)=>{const{springs:a}=R.get(t)||t.ctrl;const o=e({...a},t.item,t,r);return o&&o.type?/* @__PURE__ */i.createElement(o.type,{...o.props,key:n.is.str(t.key)||n.is.num(t.key)?t.key:t.ctrl.id,ref:o.ref}):o}));return b?[L,b]:L}var eS=1;function eT(e,{key:t,keys:r=t},i){if(r===null){const t=/* @__PURE__ */new Set;return e.map(e=>{const r=i&&i.find(r=>r.item===e&&r.phase!=="leave"/* LEAVE */&&!t.has(r));if(r){t.add(r);return r.key}return eS++})}return n.is.und(r)?e:n.is.fun(r)?e.map(r):(0,n/* .toArray */.$r)(r)}// src/hooks/useScroll.ts
var ek=({container:e,...t}={})=>{const[r,n]=ey(()=>({scrollX:0,scrollY:0,scrollXProgress:0,scrollYProgress:0,...t}),[]);useIsomorphicLayoutEffect5(()=>{const t=onScroll(({x:e,y:t})=>{n.start({scrollX:e.current,scrollXProgress:e.progress,scrollY:t.current,scrollYProgress:t.progress})},{container:e?.current||void 0});return()=>{each8(Object.values(r),e=>e.stop());t()}},[]);return r};// src/hooks/useResize.ts
var eC=({container:e,...t})=>{const[r,n]=ey(()=>({width:0,height:0,...t}),[]);useIsomorphicLayoutEffect6(()=>{const t=onResize(({width:e,height:t})=>{n.start({width:e,height:t,immediate:r.width.get()===0||r.height.get()===0})},{container:e?.current||void 0});return()=>{each9(Object.values(r),e=>e.stop());t()}},[]);return r};// src/hooks/useInView.ts
var eI=/* unused pure expression or super */null&&{any:0,all:1};function eR(e,t){const[r,n]=useState2(false);const i=useRef3();const a=is12.fun(e)&&e;const o=a?a():{};const{to:s={},from:u={},...c}=o;const l=a?t:e;const[d,f]=ey(()=>({from:u,...c}),[]);useIsomorphicLayoutEffect7(()=>{const e=i.current;const{root:t,once:a,amount:o="any",...c}=l??{};if(!e||a&&r||typeof IntersectionObserver==="undefined")return;const d=/* @__PURE__ */new WeakMap;const p=()=>{if(s){f.start(s)}n(true);const e=()=>{if(u){f.start(u)}n(false)};return a?void 0:e};const h=e=>{e.forEach(e=>{const t=d.get(e.target);if(e.isIntersecting===Boolean(t)){return}if(e.isIntersecting){const t=p();if(is12.fun(t)){d.set(e.target,t)}else{v.unobserve(e.target)}}else if(t){t();d.delete(e.target)}})};const v=new IntersectionObserver(h,{root:t&&t.current||void 0,threshold:typeof o==="number"||Array.isArray(o)?o:eI[o],...c});v.observe(e);return()=>v.unobserve(e)},[l]);if(a){return[i,d]}return[i,r]}// src/components/Spring.tsx
function eD({children:e,...t}){return e(ey(t))}// src/components/Trail.tsx
function eP({items:e,children:t,...r}){const n=eE(e.length,r);return e.map((e,r)=>{const i=t(e,r);return is13.fun(i)?i(n[r]):i})}// src/components/Transition.tsx
function eM({items:e,children:t,...r}){return eO(e,r)(t)}// src/interpolate.ts
// src/Interpolation.ts
var eF=class extends j{constructor(e,t){super();this.source=e;/** Equals false when in the frameloop */this.idle=true;/** The inputs which are currently animating */this._active=/* @__PURE__ */new Set;this.calc=(0,n/* .createInterpolator */.kx)(...t);const r=this._get();const i=(0,a/* .getAnimatedType */.SJ)(r);(0,a/* .setAnimated */.uX)(this,i.create(r))}advance(e){const t=this._get();const r=this.get();if(!(0,n/* .isEqual */.n4)(t,r)){(0,a/* .getAnimated */.Ao)(this).setValue(t);this._onChange(t,this.idle)}if(!this.idle&&eL(this._active)){eN(this)}}_get(){const e=n.is.arr(this.source)?this.source.map(n/* .getFluidValue */.oq):(0,n/* .toArray */.$r)((0,n/* .getFluidValue */.oq)(this.source));return this.calc(...e)}_start(){if(this.idle&&!eL(this._active)){this.idle=false;(0,n/* .each */.__)((0,a/* .getPayload */.nm)(this),e=>{e.done=false});if(n/* .Globals.skipAnimation */.RV.skipAnimation){n/* .raf.batchedUpdates */.er.batchedUpdates(()=>this.advance());eN(this)}else{n/* .frameLoop.start */.WU.start(this)}}}// Observe our sources only when we're observed.
_attach(){let e=1;(0,n/* .each */.__)((0,n/* .toArray */.$r)(this.source),t=>{if((0,n/* .hasFluidValue */.at)(t)){(0,n/* .addFluidObserver */.Ec)(t,this)}if(N(t)){if(!t.idle){this._active.add(t)}e=Math.max(e,t.priority+1)}});this.priority=e;this._start()}// Stop observing our sources once we have no observers.
_detach(){(0,n/* .each */.__)((0,n/* .toArray */.$r)(this.source),e=>{if((0,n/* .hasFluidValue */.at)(e)){(0,n/* .removeFluidObserver */.DV)(e,this)}});this._active.clear();eN(this)}/** @internal */eventObserved(e){if(e.type=="change"){if(e.idle){this.advance()}else{this._active.add(e.parent);this._start()}}else if(e.type=="idle"){this._active.delete(e.parent)}else if(e.type=="priority"){this.priority=(0,n/* .toArray */.$r)(this.source).reduce((e,t)=>Math.max(e,(N(t)?t.priority:0)+1),0)}}};function eY(e){return e.idle!==false}function eL(e){return!e.size||Array.from(e).every(eY)}function eN(e){if(!e.idle){e.idle=true;(0,n/* .each */.__)((0,a/* .getPayload */.nm)(e),e=>{e.done=true});(0,n/* .callFluidObservers */.MI)(e,{type:"idle",parent:e})}}// src/interpolate.ts
var eH=(e,...t)=>new eF(e,t);var ej=(e,...t)=>(deprecateInterpolate2(),new eF(e,t));// src/globals.ts
n/* .Globals.assign */.RV.assign({createStringInterpolator:n/* .createStringInterpolator */.Rs,to:(e,t)=>new eF(e,t)});var eU=n/* .frameLoop.advance */.WU.advance;// src/index.ts
//# sourceMappingURL=react-spring_core.modern.mjs.map
},84885:function(e,t,r){"use strict";r.d(t,{e:()=>i});// src/index.ts
var n=y();var i=e=>v(e,n);var a=y();i.write=e=>v(e,a);var o=y();i.onStart=e=>v(e,o);var s=y();i.onFrame=e=>v(e,s);var u=y();i.onFinish=e=>v(e,u);var c=[];i.setTimeout=(e,t)=>{const r=i.now()+t;const n=()=>{const e=c.findIndex(e=>e.cancel==n);if(~e)c.splice(e,1);p-=~e?1:0};const a={time:r,handler:e,cancel:n};c.splice(l(r),0,a);p+=1;m();return a};var l=e=>~(~c.findIndex(t=>t.time>e)||~c.length);i.cancel=e=>{o.delete(e);s.delete(e);u.delete(e);n.delete(e);a.delete(e)};i.sync=e=>{h=true;i.batchedUpdates(e);h=false};i.throttle=e=>{let t;function r(){try{e(...t)}finally{t=null}}function n(...e){t=e;i.onStart(r)}n.handler=e;n.cancel=()=>{o.delete(r);t=null};return n};var d=typeof window!="undefined"?window.requestAnimationFrame:// eslint-disable-next-line @typescript-eslint/no-empty-function
()=>{};i.use=e=>d=e;i.now=typeof performance!="undefined"?()=>performance.now():Date.now;i.batchedUpdates=e=>e();i.catch=console.error;i.frameLoop="always";i.advance=()=>{if(i.frameLoop!=="demand"){console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand")}else{_()}};var f=-1;var p=0;var h=false;function v(e,t){if(h){t.delete(e);e(0)}else{t.add(e);m()}}function m(){if(f<0){f=0;if(i.frameLoop!=="demand"){d(b)}}}function g(){f=-1}function b(){if(~f){d(b);i.batchedUpdates(_)}}function _(){const e=f;f=i.now();const t=l(f);if(t){w(c.splice(0,t),e=>e.handler());p-=t}if(!p){g();return}o.flush();n.flush(e?Math.min(64,f-e):16.667);s.flush();a.flush();u.flush()}function y(){let e=/* @__PURE__ */new Set;let t=e;return{add(r){p+=t==e&&!e.has(r)?1:0;e.add(r)},delete(r){p-=t==e&&e.has(r)?1:0;return e.delete(r)},flush(r){if(t.size){e=/* @__PURE__ */new Set;p-=t.size;w(t,t=>t(r)&&e.add(t));p+=e.size;t=e}}}}function w(e,t){e.forEach(e=>{try{t(e)}catch(e){i.catch(e)}})}var A=/* unused pure expression or super */null&&{/** The number of pending tasks */count(){return p},/** Whether there's a raf update loop running */isRunning(){return f>=0},/** Clear internal state. Never call from update loop! */clear(){f=-1;c=[];o=y();n=y();s=y();a=y();u=y();p=0}};//# sourceMappingURL=react-spring_rafz.modern.mjs.map
},42264:function(e,t,r){"use strict";r.d(t,{$7:()=>ej,$r:()=>h,CH:()=>e9,DV:()=>eA,Ec:()=>ew,Es:()=>e5,FI:()=>p,H5:()=>te,HX:()=>eH,MA:()=>e8,MI:()=>eb,NQ:()=>tr,OX:()=>c,RV:()=>s,Rs:()=>eP,Tj:()=>F,WU:()=>k,Wd:()=>m,Wg:()=>em,ZJ:()=>eL,__:()=>f,aq:()=>e_,at:()=>eh,bX:()=>v,er:()=>/* reexport safe */n.e,is:()=>l,kx:()=>et,lQ:()=>u,le:()=>ed,n4:()=>d,oq:()=>ev});/* import */var n=r(84885);/* import */var i=r(41594);var a=Object.defineProperty;var o=(e,t)=>{for(var r in t)a(e,r,{get:t[r],enumerable:true})};// src/globals.ts
var s={};o(s,{assign:()=>x,colors:()=>y,createStringInterpolator:()=>b,skipAnimation:()=>w,to:()=>_,willAdvance:()=>A});// src/helpers.ts
function u(){}var c=(e,t,r)=>Object.defineProperty(e,t,{value:r,writable:true,configurable:true});var l={arr:Array.isArray,obj:e=>!!e&&e.constructor.name==="Object",fun:e=>typeof e==="function",str:e=>typeof e==="string",num:e=>typeof e==="number",und:e=>e===void 0};function d(e,t){if(l.arr(e)){if(!l.arr(t)||e.length!==t.length)return false;for(let r=0;r<e.length;r++){if(e[r]!==t[r])return false}return true}return e===t}var f=(e,t)=>e.forEach(t);function p(e,t,r){if(l.arr(e)){for(let n=0;n<e.length;n++){t.call(r,e[n],`${n}`)}return}for(const n in e){if(e.hasOwnProperty(n)){t.call(r,e[n],n)}}}var h=e=>l.und(e)?[]:l.arr(e)?e:[e];function v(e,t){if(e.size){const r=Array.from(e);e.clear();f(r,t)}}var m=(e,...t)=>v(e,e=>e(...t));var g=()=>typeof window==="undefined"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent);// src/globals.ts
var b;var _;var y=null;var w=false;var A=u;var x=e=>{if(e.to)_=e.to;if(e.now)n/* .raf.now */.e.now=e.now;if(e.colors!==void 0)y=e.colors;if(e.skipAnimation!=null)w=e.skipAnimation;if(e.createStringInterpolator)b=e.createStringInterpolator;if(e.requestAnimationFrame)n/* .raf.use */.e.use(e.requestAnimationFrame);if(e.batchedUpdates)n/* .raf.batchedUpdates */.e.batchedUpdates=e.batchedUpdates;if(e.willAdvance)A=e.willAdvance;if(e.frameLoop)n/* .raf.frameLoop */.e.frameLoop=e.frameLoop};// src/FrameLoop.ts
var E=/* @__PURE__ */new Set;var O=[];var S=[];var T=0;var k={get idle(){return!E.size&&!O.length},/** Advance the given animation on every frame until idle. */start(e){if(T>e.priority){E.add(e);n/* .raf.onStart */.e.onStart(C)}else{I(e);(0,n/* .raf */.e)(D)}},/** Advance all animations by the given time. */advance:D,/** Call this when an animation's priority changes. */sort(e){if(T){n/* .raf.onFrame */.e.onFrame(()=>k.sort(e))}else{const t=O.indexOf(e);if(~t){O.splice(t,1);R(e)}}},/**
   * Clear all animations. For testing purposes.
   *
   * ☠️ Never call this from within the frameloop.
   */clear(){O=[];E.clear()}};function C(){E.forEach(I);E.clear();(0,n/* .raf */.e)(D)}function I(e){if(!O.includes(e))R(e)}function R(e){O.splice(P(O,t=>t.priority>e.priority),0,e)}function D(e){const t=S;for(let r=0;r<O.length;r++){const n=O[r];T=n.priority;if(!n.idle){A(n);n.advance(e);if(!n.idle){t.push(n)}}}T=0;S=O;S.length=0;O=t;return O.length>0}function P(e,t){const r=e.findIndex(t);return r<0?e.length:r}// src/clamp.ts
var M=(e,t,r)=>Math.min(Math.max(r,e),t);// src/colors.ts
var F={transparent:0,aliceblue:0xf0f8ffff,antiquewhite:0xfaebd7ff,aqua:0xffffff,aquamarine:0x7fffd4ff,azure:0xf0ffffff,beige:0xf5f5dcff,bisque:0xffe4c4ff,black:255,blanchedalmond:0xffebcdff,blue:65535,blueviolet:0x8a2be2ff,brown:0xa52a2aff,burlywood:0xdeb887ff,burntsienna:0xea7e5dff,cadetblue:0x5f9ea0ff,chartreuse:0x7fff00ff,chocolate:0xd2691eff,coral:0xff7f50ff,cornflowerblue:0x6495edff,cornsilk:0xfff8dcff,crimson:0xdc143cff,cyan:0xffffff,darkblue:35839,darkcyan:9145343,darkgoldenrod:0xb8860bff,darkgray:0xa9a9a9ff,darkgreen:6553855,darkgrey:0xa9a9a9ff,darkkhaki:0xbdb76bff,darkmagenta:0x8b008bff,darkolivegreen:0x556b2fff,darkorange:0xff8c00ff,darkorchid:0x9932ccff,darkred:0x8b0000ff,darksalmon:0xe9967aff,darkseagreen:0x8fbc8fff,darkslateblue:0x483d8bff,darkslategray:0x2f4f4fff,darkslategrey:0x2f4f4fff,darkturquoise:0xced1ff,darkviolet:0x9400d3ff,deeppink:0xff1493ff,deepskyblue:0xbfffff,dimgray:0x696969ff,dimgrey:0x696969ff,dodgerblue:0x1e90ffff,firebrick:0xb22222ff,floralwhite:0xfffaf0ff,forestgreen:0x228b22ff,fuchsia:0xff00ffff,gainsboro:0xdcdcdcff,ghostwhite:0xf8f8ffff,gold:0xffd700ff,goldenrod:0xdaa520ff,gray:0x808080ff,green:8388863,greenyellow:0xadff2fff,grey:0x808080ff,honeydew:0xf0fff0ff,hotpink:0xff69b4ff,indianred:0xcd5c5cff,indigo:0x4b0082ff,ivory:0xfffff0ff,khaki:0xf0e68cff,lavender:0xe6e6faff,lavenderblush:0xfff0f5ff,lawngreen:0x7cfc00ff,lemonchiffon:0xfffacdff,lightblue:0xadd8e6ff,lightcoral:0xf08080ff,lightcyan:0xe0ffffff,lightgoldenrodyellow:0xfafad2ff,lightgray:0xd3d3d3ff,lightgreen:0x90ee90ff,lightgrey:0xd3d3d3ff,lightpink:0xffb6c1ff,lightsalmon:0xffa07aff,lightseagreen:0x20b2aaff,lightskyblue:0x87cefaff,lightslategray:0x778899ff,lightslategrey:0x778899ff,lightsteelblue:0xb0c4deff,lightyellow:0xffffe0ff,lime:0xff00ff,limegreen:0x32cd32ff,linen:0xfaf0e6ff,magenta:0xff00ffff,maroon:0x800000ff,mediumaquamarine:0x66cdaaff,mediumblue:52735,mediumorchid:0xba55d3ff,mediumpurple:0x9370dbff,mediumseagreen:0x3cb371ff,mediumslateblue:0x7b68eeff,mediumspringgreen:0xfa9aff,mediumturquoise:0x48d1ccff,mediumvioletred:0xc71585ff,midnightblue:0x191970ff,mintcream:0xf5fffaff,mistyrose:0xffe4e1ff,moccasin:0xffe4b5ff,navajowhite:0xffdeadff,navy:33023,oldlace:0xfdf5e6ff,olive:0x808000ff,olivedrab:0x6b8e23ff,orange:0xffa500ff,orangered:0xff4500ff,orchid:0xda70d6ff,palegoldenrod:0xeee8aaff,palegreen:0x98fb98ff,paleturquoise:0xafeeeeff,palevioletred:0xdb7093ff,papayawhip:0xffefd5ff,peachpuff:0xffdab9ff,peru:0xcd853fff,pink:0xffc0cbff,plum:0xdda0ddff,powderblue:0xb0e0e6ff,purple:0x800080ff,rebeccapurple:0x663399ff,red:0xff0000ff,rosybrown:0xbc8f8fff,royalblue:0x4169e1ff,saddlebrown:0x8b4513ff,salmon:0xfa8072ff,sandybrown:0xf4a460ff,seagreen:0x2e8b57ff,seashell:0xfff5eeff,sienna:0xa0522dff,silver:0xc0c0c0ff,skyblue:0x87ceebff,slateblue:0x6a5acdff,slategray:0x708090ff,slategrey:0x708090ff,snow:0xfffafaff,springgreen:0xff7fff,steelblue:0x4682b4ff,tan:0xd2b48cff,teal:8421631,thistle:0xd8bfd8ff,tomato:0xff6347ff,turquoise:0x40e0d0ff,violet:0xee82eeff,wheat:0xf5deb3ff,white:0xffffffff,whitesmoke:0xf5f5f5ff,yellow:0xffff00ff,yellowgreen:0x9acd32ff};// src/colorMatchers.ts
var Y="[-+]?\\d*\\.?\\d+";var L=Y+"%";function N(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var H=new RegExp("rgb"+N(Y,Y,Y));var j=new RegExp("rgba"+N(Y,Y,Y,Y));var U=new RegExp("hsl"+N(Y,L,L));var B=new RegExp("hsla"+N(Y,L,L,Y));var K=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/;var z=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/;var q=/^#([0-9a-fA-F]{6})$/;var V=/^#([0-9a-fA-F]{8})$/;// src/normalizeColor.ts
function W(e){let t;if(typeof e==="number"){return e>>>0===e&&e>=0&&e<=0xffffffff?e:null}if(t=q.exec(e))return parseInt(t[1]+"ff",16)>>>0;if(y&&y[e]!==void 0){return y[e]}if(t=H.exec(e)){return(Q(t[1])<<24|// r
Q(t[2])<<16|// g
Q(t[3])<<8|// b
255)>>>// a
0}if(t=j.exec(e)){return(Q(t[1])<<24|// r
Q(t[2])<<16|// g
Q(t[3])<<8|// b
J(t[4]))>>>// a
0}if(t=K.exec(e)){return parseInt(t[1]+t[1]+// r
t[2]+t[2]+// g
t[3]+t[3]+// b
"ff",// a
16)>>>0}if(t=V.exec(e))return parseInt(t[1],16)>>>0;if(t=z.exec(e)){return parseInt(t[1]+t[1]+// r
t[2]+t[2]+// g
t[3]+t[3]+// b
t[4]+t[4],// a
16)>>>0}if(t=U.exec(e)){return($(X(t[1]),// h
Z(t[2]),// s
Z(t[3]))|255)>>>// a
0}if(t=B.exec(e)){return($(X(t[1]),// h
Z(t[2]),// s
Z(t[3]))|J(t[4]))>>>// a
0}return null}function G(e,t,r){if(r<0)r+=1;if(r>1)r-=1;if(r<1/6)return e+(t-e)*6*r;if(r<1/2)return t;if(r<2/3)return e+(t-e)*(2/3-r)*6;return e}function $(e,t,r){const n=r<.5?r*(1+t):r+t-r*t;const i=2*r-n;const a=G(i,n,e+1/3);const o=G(i,n,e);const s=G(i,n,e-1/3);return Math.round(a*255)<<24|Math.round(o*255)<<16|Math.round(s*255)<<8}function Q(e){const t=parseInt(e,10);if(t<0)return 0;if(t>255)return 255;return t}function X(e){const t=parseFloat(e);return(t%360+360)%360/360}function J(e){const t=parseFloat(e);if(t<0)return 0;if(t>1)return 255;return Math.round(t*255)}function Z(e){const t=parseFloat(e);if(t<0)return 0;if(t>100)return 1;return t/100}// src/colorToRgba.ts
function ee(e){let t=W(e);if(t===null)return e;t=t||0;const r=(t&0xff000000)>>>24;const n=(t&0xff0000)>>>16;const i=(t&65280)>>>8;const a=(t&255)/255;return`rgba(${r}, ${n}, ${i}, ${a})`}// src/createInterpolator.ts
var et=(e,t,r)=>{if(l.fun(e)){return e}if(l.arr(e)){return et({range:e,output:t,extrapolate:r})}if(l.str(e.output[0])){return b(e)}const n=e;const i=n.output;const a=n.range||[0,1];const o=n.extrapolateLeft||n.extrapolate||"extend";const s=n.extrapolateRight||n.extrapolate||"extend";const u=n.easing||(e=>e);return e=>{const t=en(e,a);return er(e,a[t],a[t+1],i[t],i[t+1],u,o,s,n.map)}};function er(e,t,r,n,i,a,o,s,u){let c=u?u(e):e;if(c<t){if(o==="identity")return c;else if(o==="clamp")c=t}if(c>r){if(s==="identity")return c;else if(s==="clamp")c=r}if(n===i)return n;if(t===r)return e<=t?n:i;if(t===-Infinity)c=-c;else if(r===Infinity)c=c-t;else c=(c-t)/(r-t);c=a(c);if(n===-Infinity)c=-c;else if(i===Infinity)c=c+n;else c=c*(i-n)+n;return c}function en(e,t){for(var r=1;r<t.length-1;++r)if(t[r]>=e)break;return r-1}// src/easings.ts
var ei=(e,t="end")=>r=>{r=t==="end"?Math.min(r,.999):Math.max(r,.001);const n=r*e;const i=t==="end"?Math.floor(n):Math.ceil(n);return M(0,1,i/e)};var ea=1.70158;var eo=ea*1.525;var es=ea+1;var eu=2*Math.PI/3;var ec=2*Math.PI/4.5;var el=e=>{const t=7.5625;const r=2.75;if(e<1/r){return t*e*e}else if(e<2/r){return t*(e-=1.5/r)*e+.75}else if(e<2.5/r){return t*(e-=2.25/r)*e+.9375}else{return t*(e-=2.625/r)*e+.984375}};var ed={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>1-(1-e)*(1-e),easeInOutQuad:e=>e<.5?2*e*e:1-Math.pow(-2*e+2,2)/2,easeInCubic:e=>e*e*e,easeOutCubic:e=>1-Math.pow(1-e,3),easeInOutCubic:e=>e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2,easeInQuart:e=>e*e*e*e,easeOutQuart:e=>1-Math.pow(1-e,4),easeInOutQuart:e=>e<.5?8*e*e*e*e:1-Math.pow(-2*e+2,4)/2,easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>1-Math.pow(1-e,5),easeInOutQuint:e=>e<.5?16*e*e*e*e*e:1-Math.pow(-2*e+2,5)/2,easeInSine:e=>1-Math.cos(e*Math.PI/2),easeOutSine:e=>Math.sin(e*Math.PI/2),easeInOutSine:e=>-(Math.cos(Math.PI*e)-1)/2,easeInExpo:e=>e===0?0:Math.pow(2,10*e-10),easeOutExpo:e=>e===1?1:1-Math.pow(2,-10*e),easeInOutExpo:e=>e===0?0:e===1?1:e<.5?Math.pow(2,20*e-10)/2:(2-Math.pow(2,-20*e+10))/2,easeInCirc:e=>1-Math.sqrt(1-Math.pow(e,2)),easeOutCirc:e=>Math.sqrt(1-Math.pow(e-1,2)),easeInOutCirc:e=>e<.5?(1-Math.sqrt(1-Math.pow(2*e,2)))/2:(Math.sqrt(1-Math.pow(-2*e+2,2))+1)/2,easeInBack:e=>es*e*e*e-ea*e*e,easeOutBack:e=>1+es*Math.pow(e-1,3)+ea*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*((eo+1)*2*e-eo)/2:(Math.pow(2*e-2,2)*((eo+1)*(e*2-2)+eo)+2)/2,easeInElastic:e=>e===0?0:e===1?1:-Math.pow(2,10*e-10)*Math.sin((e*10-10.75)*eu),easeOutElastic:e=>e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e*10-.75)*eu)+1,easeInOutElastic:e=>e===0?0:e===1?1:e<.5?-(Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*ec))/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*ec)/2+1,easeInBounce:e=>1-el(1-e),easeOutBounce:el,easeInOutBounce:e=>e<.5?(1-el(1-2*e))/2:(1+el(2*e-1))/2,steps:ei};// src/fluids.ts
var ef=Symbol.for("FluidValue.get");var ep=Symbol.for("FluidValue.observers");var eh=e=>Boolean(e&&e[ef]);var ev=e=>e&&e[ef]?e[ef]():e;var em=e=>e[ep]||null;function eg(e,t){if(e.eventObserved){e.eventObserved(t)}else{e(t)}}function eb(e,t){const r=e[ep];if(r){r.forEach(e=>{eg(e,t)})}}var e_=class{constructor(e){if(!e&&!(e=this.get)){throw Error("Unknown getter")}ey(this,e)}};ef,ep;var ey=(e,t)=>ex(e,ef,t);function ew(e,t){if(e[ef]){let r=e[ep];if(!r){ex(e,ep,r=/* @__PURE__ */new Set)}if(!r.has(t)){r.add(t);if(e.observerAdded){e.observerAdded(r.size,t)}}}return t}function eA(e,t){const r=e[ep];if(r&&r.has(t)){const n=r.size-1;if(n){r.delete(t)}else{e[ep]=null}if(e.observerRemoved){e.observerRemoved(n,t)}}}var ex=(e,t,r)=>Object.defineProperty(e,t,{value:r,writable:true,configurable:true});// src/regexs.ts
var eE=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g;var eO=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi;var eS=new RegExp(`(${eE.source})(%|[a-z]+)`,"i");var eT=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi;var ek=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;// src/variableToRgba.ts
var eC=e=>{const[t,r]=eI(e);if(!t||g()){return e}const n=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(n){return n.trim()}else if(r&&r.startsWith("--")){const t=window.getComputedStyle(document.documentElement).getPropertyValue(r);if(t){return t}else{return e}}else if(r&&ek.test(r)){return eC(r)}else if(r){return r}return e};var eI=e=>{const t=ek.exec(e);if(!t)return[,];const[,r,n]=t;return[r,n]};// src/stringInterpolation.ts
var eR;var eD=(e,t,r,n,i)=>`rgba(${Math.round(t)}, ${Math.round(r)}, ${Math.round(n)}, ${i})`;var eP=e=>{if(!eR)eR=y?// match color names, ignore partial matches
new RegExp(`(${Object.keys(y).join("|")})(?!\\w)`,"g"):// never match
/^\b$/;const t=e.output.map(e=>{return ev(e).replace(ek,eC).replace(eO,ee).replace(eR,ee)});const r=t.map(e=>e.match(eE).map(Number));const n=r[0].map((e,t)=>r.map(e=>{if(!(t in e)){throw Error('The arity of each "output" value must be equal')}return e[t]}));const i=n.map(t=>et({...e,output:t}));return e=>{const r=!eS.test(t[0])&&t.find(e=>eS.test(e))?.replace(eE,"");let n=0;return t[0].replace(eE,()=>`${i[n++](e)}${r||""}`).replace(eT,eD)}};// src/deprecations.ts
var eM="react-spring: ";var eF=e=>{const t=e;let r=false;if(typeof t!="function"){throw new TypeError(`${eM}once requires a function parameter`)}return(...e)=>{if(!r){t(...e);r=true}}};var eY=eF(console.warn);function eL(){eY(`${eM}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var eN=eF(console.warn);function eH(){eN(`${eM}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`)}// src/isAnimatedString.ts
function ej(e){return l.str(e)&&(e[0]=="#"||/\d/.test(e)||// Do not identify a CSS variable as an AnimatedString if its SSR
!g()&&ek.test(e)||e in(y||{}))}// src/dom-events/scroll/index.ts
// src/dom-events/resize/resizeElement.ts
var eU;var eB=/* @__PURE__ */new WeakMap;var eK=e=>e.forEach(({target:e,contentRect:t})=>{return eB.get(e)?.forEach(e=>e(t))});function ez(e,t){if(!eU){if(typeof ResizeObserver!=="undefined"){eU=new ResizeObserver(eK)}}let r=eB.get(t);if(!r){r=/* @__PURE__ */new Set;eB.set(t,r)}r.add(e);if(eU){eU.observe(t)}return()=>{const r=eB.get(t);if(!r)return;r.delete(e);if(!r.size&&eU){eU.unobserve(t)}}}// src/dom-events/resize/resizeWindow.ts
var eq=/* @__PURE__ */new Set;var eV;var eW=()=>{const e=()=>{eq.forEach(e=>e({width:window.innerWidth,height:window.innerHeight}))};window.addEventListener("resize",e);return()=>{window.removeEventListener("resize",e)}};var eG=e=>{eq.add(e);if(!eV){eV=eW()}return()=>{eq.delete(e);if(!eq.size&&eV){eV();eV=void 0}}};// src/dom-events/resize/index.ts
var e$=(e,{container:t=document.documentElement}={})=>{if(t===document.documentElement){return eG(e)}else{return ez(e,t)}};// src/progress.ts
var eQ=(e,t,r)=>t-e===0?1:(r-e)/(t-e);// src/dom-events/scroll/ScrollHandler.ts
var eX=/* unused pure expression or super */null&&{x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};var eJ=class{constructor(e,t){this.createAxis=()=>({current:0,progress:0,scrollLength:0});this.updateAxis=e=>{const t=this.info[e];const{length:r,position:n}=eX[e];t.current=this.container[`scroll${n}`];t.scrollLength=this.container[`scroll${r}`]-this.container[`client${r}`];t.progress=eQ(0,t.scrollLength,t.current)};this.update=()=>{this.updateAxis("x");this.updateAxis("y")};this.sendEvent=()=>{this.callback(this.info)};this.advance=()=>{this.update();this.sendEvent()};this.callback=e;this.container=t;this.info={time:0,x:this.createAxis(),y:this.createAxis()}}};// src/dom-events/scroll/index.ts
var eZ=/* @__PURE__ */new WeakMap;var e0=/* @__PURE__ */new WeakMap;var e1=/* @__PURE__ */new WeakMap;var e2=e=>e===document.documentElement?window:e;var e6=(e,{container:t=document.documentElement}={})=>{let r=e1.get(t);if(!r){r=/* @__PURE__ */new Set;e1.set(t,r)}const n=new eJ(e,t);r.add(n);if(!eZ.has(t)){const e=()=>{r?.forEach(e=>e.advance());return true};eZ.set(t,e);const n=e2(t);window.addEventListener("resize",e,{passive:true});if(t!==document.documentElement){e0.set(t,e$(e,{container:t}))}n.addEventListener("scroll",e,{passive:true})}const i=eZ.get(t);raf3(i);return()=>{raf3.cancel(i);const e=e1.get(t);if(!e)return;e.delete(n);if(e.size)return;const r=eZ.get(t);eZ.delete(t);if(r){e2(t).removeEventListener("scroll",r);window.removeEventListener("resize",r);e0.get(t)?.()}}};// src/hooks/useConstant.ts
function e4(e){const t=useRef(null);if(t.current===null){t.current=e()}return t.current}// src/hooks/useForceUpdate.ts
// src/hooks/useIsMounted.ts
// src/hooks/useIsomorphicLayoutEffect.ts
var e5=g()?i.useEffect:i.useLayoutEffect;// src/hooks/useIsMounted.ts
var e3=()=>{const e=(0,i.useRef)(false);e5(()=>{e.current=true;return()=>{e.current=false}},[]);return e};// src/hooks/useForceUpdate.ts
function e9(){const e=(0,i.useState)()[1];const t=e3();return()=>{if(t.current){e(Math.random())}}}// src/hooks/useMemoOne.ts
function e8(e,t){const[r]=(0,i.useState)(()=>({inputs:t,result:e()}));const n=(0,i.useRef)();const a=n.current;let o=a;if(o){const r=Boolean(t&&o.inputs&&e7(t,o.inputs));if(!r){o={inputs:t,result:e()}}}else{o=r}(0,i.useEffect)(()=>{n.current=o;if(a==r){r.inputs=r.result=void 0}},[o]);return o.result}function e7(e,t){if(e.length!==t.length){return false}for(let r=0;r<e.length;r++){if(e[r]!==t[r]){return false}}return true}// src/hooks/useOnce.ts
var te=e=>(0,i.useEffect)(e,tt);var tt=[];// src/hooks/usePrev.ts
function tr(e){const t=(0,i.useRef)();(0,i.useEffect)(()=>{t.current=e});return t.current}// src/hooks/useReducedMotion.ts
var tn=()=>{const[e,t]=useState3(null);e5(()=>{const e=window.matchMedia("(prefers-reduced-motion)");const r=e=>{t(e.matches);x({skipAnimation:e.matches})};r(e);if(e.addEventListener){e.addEventListener("change",r)}else{e.addListener(r)}return()=>{if(e.removeEventListener){e.removeEventListener("change",r)}else{e.removeListener(r)}}},[]);return e};// src/index.ts
//# sourceMappingURL=react-spring_shared.modern.mjs.map
},76035:function(e,t,r){"use strict";r.d(t,{CS:()=>x,le:()=>/* reexport safe */n.le,pn:()=>/* reexport safe */n.pn,zh:()=>/* reexport safe */n.zh});/* import */var n=r(72690);/* import */var i=r(75206);/* import */var a=r(42264);/* import */var o=r(42500);// src/index.ts
// src/applyAnimatedValues.ts
var s=/^--/;function u(e,t){if(t==null||typeof t==="boolean"||t==="")return"";if(typeof t==="number"&&t!==0&&!s.test(e)&&!(d.hasOwnProperty(e)&&d[e]))return t+"px";return(""+t).trim()}var c={};function l(e,t){if(!e.nodeType||!e.setAttribute){return false}const r=e.nodeName==="filter"||e.parentNode&&e.parentNode.nodeName==="filter";const{className:n,style:i,children:a,scrollTop:o,scrollLeft:l,viewBox:d,...f}=t;const p=Object.values(f);const h=Object.keys(f).map(t=>r||e.hasAttribute(t)?t:c[t]||(c[t]=t.replace(/([A-Z])/g,// Attributes are written in dash case
    e=>"-"+e.toLowerCase())));if(a!==void 0){e.textContent=a}for(const t in i){if(i.hasOwnProperty(t)){const r=u(t,i[t]);if(s.test(t)){e.style.setProperty(t,r)}else{e.style[t]=r}}}h.forEach((t,r)=>{e.setAttribute(t,p[r])});if(n!==void 0){e.className=n}if(o!==void 0){e.scrollTop=o}if(l!==void 0){e.scrollLeft=l}if(d!==void 0){e.setAttribute("viewBox",d)}}var d={animationIterationCount:true,borderImageOutset:true,borderImageSlice:true,borderImageWidth:true,boxFlex:true,boxFlexGroup:true,boxOrdinalGroup:true,columnCount:true,columns:true,flex:true,flexGrow:true,flexPositive:true,flexShrink:true,flexNegative:true,flexOrder:true,gridRow:true,gridRowEnd:true,gridRowSpan:true,gridRowStart:true,gridColumn:true,gridColumnEnd:true,gridColumnSpan:true,gridColumnStart:true,fontWeight:true,lineClamp:true,lineHeight:true,opacity:true,order:true,orphans:true,tabSize:true,widows:true,zIndex:true,zoom:true,// SVG-related properties
fillOpacity:true,floodOpacity:true,stopOpacity:true,strokeDasharray:true,strokeDashoffset:true,strokeMiterlimit:true,strokeOpacity:true,strokeWidth:true};var f=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1);var p=["Webkit","Ms","Moz","O"];d=Object.keys(d).reduce((e,t)=>{p.forEach(r=>e[f(r,t)]=e[t]);return e},d);// src/AnimatedStyle.ts
var h=/^(matrix|translate|scale|rotate|skew)/;var v=/^(translate)/;var m=/^(rotate|skew)/;var g=(e,t)=>a.is.num(e)&&e!==0?e+t:e;var b=(e,t)=>a.is.arr(e)?e.every(e=>b(e,t)):a.is.num(e)?e===t:parseFloat(e)===t;var _=class extends o/* .AnimatedObject */.$s{constructor({x:e,y:t,z:r,...n}){const i=[];const o=[];if(e||t||r){i.push([e||0,t||0,r||0]);o.push(e=>[`translate3d(${e.map(e=>g(e,"px")).join(",")})`,// prettier-ignore
    b(e,0)])}(0,a/* .eachProp */.FI)(n,(e,t)=>{if(t==="transform"){i.push([e||""]);o.push(e=>[e,e===""])}else if(h.test(t)){delete n[t];if(a.is.und(e))return;const r=v.test(t)?"px":m.test(t)?"deg":"";i.push((0,a/* .toArray */.$r)(e));o.push(t==="rotate3d"?([e,t,n,i])=>[`rotate3d(${e},${t},${n},${g(i,r)})`,b(i,0)]:e=>[`${t}(${e.map(e=>g(e,r)).join(",")})`,b(e,t.startsWith("scale")?1:0)])}});if(i.length){n.transform=new y(i,o)}super(n)}};var y=class extends a/* .FluidValue */.aq{constructor(e,t){super();this.inputs=e;this.transforms=t;this._value=null}get(){return this._value||(this._value=this._get())}_get(){let e="";let t=true;(0,a/* .each */.__)(this.inputs,(r,n)=>{const i=(0,a/* .getFluidValue */.oq)(r[0]);const[o,s]=this.transforms[n](a.is.arr(i)?i:r.map(a/* .getFluidValue */.oq));e+=" "+o;t=t&&s});return t?"none":e}// Start observing our inputs once we have an observer.
observerAdded(e){if(e==1)(0,a/* .each */.__)(this.inputs,e=>(0,a/* .each */.__)(e,e=>(0,a/* .hasFluidValue */.at)(e)&&(0,a/* .addFluidObserver */.Ec)(e,this)))}// Stop observing our inputs once we have no observers.
observerRemoved(e){if(e==0)(0,a/* .each */.__)(this.inputs,e=>(0,a/* .each */.__)(e,e=>(0,a/* .hasFluidValue */.at)(e)&&(0,a/* .removeFluidObserver */.DV)(e,this)))}eventObserved(e){if(e.type=="change"){this._value=null}(0,a/* .callFluidObservers */.MI)(this,e)}};// src/primitives.ts
var w=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr",// SVG
"circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"];// src/index.ts
n/* .Globals.assign */.RV.assign({batchedUpdates:i.unstable_batchedUpdates,createStringInterpolator:a/* .createStringInterpolator */.Rs,colors:a/* .colors */.Tj});var A=(0,o/* .createHost */.De)(w,{applyAnimatedValues:l,createAnimatedStyle:e=>new _(e),// eslint-disable-next-line @typescript-eslint/no-unused-vars
getComponentProps:({scrollTop:e,scrollLeft:t,...r})=>r});var x=A.animated;//# sourceMappingURL=react-spring_web.modern.mjs.map
},93640:function(e,t,r){"use strict";r.d(t,{_:()=>i});function n(e,t,r,n,i,a,o){try{var s=e[a](o);var u=s.value}catch(e){r(e);return}if(s.done)t(u);else Promise.resolve(u).then(n,i)}function i(e){return function(){var t=this,r=arguments;return new Promise(function(i,a){var o=e.apply(t,r);function s(e){n(o,i,a,s,u,"next",e)}function u(e){n(o,i,a,s,u,"throw",e)}s(undefined)})}}},38125:function(e,t,r){"use strict";r.d(t,{_:()=>n});function n(e,t,r){if(t in e){Object.defineProperty(e,t,{value:r,enumerable:true,configurable:true,writable:true})}else e[t]=r;return e}},41147:function(e,t,r){"use strict";r.d(t,{_:()=>i});/* import */var n=r(38125);function i(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};var i=Object.keys(r);if(typeof Object.getOwnPropertySymbols==="function"){i=i.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))}i.forEach(function(t){(0,n._)(e,t,r[t])})}return e}},14206:function(e,t,r){"use strict";r.d(t,{_:()=>i});function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);if(t){n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})}r.push.apply(r,n)}return r}function i(e,t){t=t!=null?t:{};if(Object.getOwnPropertyDescriptors)Object.defineProperties(e,Object.getOwnPropertyDescriptors(t));else{n(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})}return e}},17900:function(e,t,r){"use strict";// EXPORTS
r.d(t,{_:()=>/* binding */i});// CONCATENATED MODULE: ./node_modules/.pnpm/@swc+helpers@0.5.17/node_modules/@swc/helpers/esm/_object_without_properties_loose.js
function n(e,t){if(e==null)return{};var r={};var n=Object.keys(e);var i,a;for(a=0;a<n.length;a++){i=n[a];if(t.indexOf(i)>=0)continue;r[i]=e[i]}return r};// CONCATENATED MODULE: ./node_modules/.pnpm/@swc+helpers@0.5.17/node_modules/@swc/helpers/esm/_object_without_properties.js
function i(e,t){if(e==null)return{};var r=n(e,t);var i,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++){i=o[a];if(t.indexOf(i)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(e,i))continue;r[i]=e[i]}}return r}},60599:function(e,t,r){"use strict";r.d(t,{_:()=>n});function n(e,t){if(!t)t=e.slice(0);return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}},35465:function(e,t,r){"use strict";r.d(t,{m:()=>o});/* import */var n=r(66887);/* import */var i=r(19005);// src/focusManager.ts
var a=class extends n/* .Subscribable */.Q{#e;#t;#r;constructor(){super();this.#r=e=>{if(!i/* .isServer */.S$&&window.addEventListener){const t=()=>e();window.addEventListener("visibilitychange",t,false);return()=>{window.removeEventListener("visibilitychange",t)}}return}}onSubscribe(){if(!this.#t){this.setEventListener(this.#r)}}onUnsubscribe(){if(!this.hasListeners()){this.#t?.();this.#t=void 0}}setEventListener(e){this.#r=e;this.#t?.();this.#t=e(e=>{if(typeof e==="boolean"){this.setFocused(e)}else{this.onFocus()}})}setFocused(e){const t=this.#e!==e;if(t){this.#e=e;this.onFocus()}}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){if(typeof this.#e==="boolean"){return this.#e}return globalThis.document?.visibilityState!=="hidden"}};var o=new a;//# sourceMappingURL=focusManager.js.map
},39609:function(e,t,r){"use strict";r.d(t,{$:()=>s,s:()=>o});/* import */var n=r(73276);/* import */var i=r(26957);/* import */var a=r(40649);// src/mutation.ts
var o=class extends i/* .Removable */.k{#n;#i;#a;constructor(e){super();this.mutationId=e.mutationId;this.#i=e.mutationCache;this.#n=[];this.state=e.state||s();this.setOptions(e.options);this.scheduleGc()}setOptions(e){this.options=e;this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){if(!this.#n.includes(e)){this.#n.push(e);this.clearGcTimeout();this.#i.notify({type:"observerAdded",mutation:this,observer:e})}}removeObserver(e){this.#n=this.#n.filter(t=>t!==e);this.scheduleGc();this.#i.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){if(!this.#n.length){if(this.state.status==="pending"){this.scheduleGc()}else{this.#i.remove(this)}}}continue(){return this.#a?.continue()??// continuing a mutation assumes that variables are set, mutation must have been dehydrated before
this.execute(this.state.variables)}async execute(e){this.#a=(0,a/* .createRetryer */.II)({fn:()=>{if(!this.options.mutationFn){return Promise.reject(new Error("No mutationFn found"))}return this.options.mutationFn(e)},onFail:(e,t)=>{this.#o({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#o({type:"pause"})},onContinue:()=>{this.#o({type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#i.canRun(this)});const t=this.state.status==="pending";const r=!this.#a.canStart();try{if(!t){this.#o({type:"pending",variables:e,isPaused:r});await this.#i.config.onMutate?.(e,this);const t=await this.options.onMutate?.(e);if(t!==this.state.context){this.#o({type:"pending",context:t,variables:e,isPaused:r})}}const n=await this.#a.start();await this.#i.config.onSuccess?.(n,e,this.state.context,this);await this.options.onSuccess?.(n,e,this.state.context);await this.#i.config.onSettled?.(n,null,this.state.variables,this.state.context,this);await this.options.onSettled?.(n,null,e,this.state.context);this.#o({type:"success",data:n});return n}catch(t){try{await this.#i.config.onError?.(t,e,this.state.context,this);await this.options.onError?.(t,e,this.state.context);await this.#i.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this);await this.options.onSettled?.(void 0,t,e,this.state.context);throw t}finally{this.#o({type:"error",error:t})}}finally{this.#i.runNext(this)}}#o(e){const t=t=>{switch(e.type){case"failed":return{...t,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...t,isPaused:true};case"continue":return{...t,isPaused:false};case"pending":return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:false};case"error":return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:false,status:"error"}}};this.state=t(this.state);n/* .notifyManager.batch */.j.batch(()=>{this.#n.forEach(t=>{t.onMutationUpdate(e)});this.#i.notify({mutation:this,type:"updated",action:e})})}};function s(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:false,status:"idle",variables:void 0,submittedAt:0}}//# sourceMappingURL=mutation.js.map
},56751:function(e,t,r){"use strict";r.d(t,{_:()=>s});/* import */var n=r(39609);/* import */var i=r(73276);/* import */var a=r(66887);/* import */var o=r(19005);// src/mutationObserver.ts
var s=class extends a/* .Subscribable */.Q{#s;#u=void 0;#c;#l;constructor(e,t){super();this.#s=e;this.setOptions(t);this.bindMethods();this.#d()}bindMethods(){this.mutate=this.mutate.bind(this);this.reset=this.reset.bind(this)}setOptions(e){const t=this.options;this.options=this.#s.defaultMutationOptions(e);if(!(0,o/* .shallowEqualObjects */.f8)(this.options,t)){this.#s.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#c,observer:this})}if(t?.mutationKey&&this.options.mutationKey&&(0,o/* .hashKey */.EN)(t.mutationKey)!==(0,o/* .hashKey */.EN)(this.options.mutationKey)){this.reset()}else if(this.#c?.state.status==="pending"){this.#c.setOptions(this.options)}}onUnsubscribe(){if(!this.hasListeners()){this.#c?.removeObserver(this)}}onMutationUpdate(e){this.#d();this.#f(e)}getCurrentResult(){return this.#u}reset(){this.#c?.removeObserver(this);this.#c=void 0;this.#d();this.#f()}mutate(e,t){this.#l=t;this.#c?.removeObserver(this);this.#c=this.#s.getMutationCache().build(this.#s,this.options);this.#c.addObserver(this);return this.#c.execute(e)}#d(){const e=this.#c?.state??(0,n/* .getDefaultState */.$)();this.#u={...e,isPending:e.status==="pending",isSuccess:e.status==="success",isError:e.status==="error",isIdle:e.status==="idle",mutate:this.mutate,reset:this.reset}}#f(e){i/* .notifyManager.batch */.j.batch(()=>{if(this.#l&&this.hasListeners()){const t=this.#u.variables;const r=this.#u.context;if(e?.type==="success"){this.#l.onSuccess?.(e.data,t,r);this.#l.onSettled?.(e.data,null,t,r)}else if(e?.type==="error"){this.#l.onError?.(e.error,t,r);this.#l.onSettled?.(void 0,e.error,t,r)}}this.listeners.forEach(e=>{e(this.#u)})})}};//# sourceMappingURL=mutationObserver.js.map
},73276:function(e,t,r){"use strict";r.d(t,{j:()=>i});// src/notifyManager.ts
function n(){let e=[];let t=0;let r=e=>{e()};let n=e=>{e()};let i=e=>setTimeout(e,0);const a=n=>{if(t){e.push(n)}else{i(()=>{r(n)})}};const o=()=>{const t=e;e=[];if(t.length){i(()=>{n(()=>{t.forEach(e=>{r(e)})})})}};return{batch:e=>{let r;t++;try{r=e()}finally{t--;if(!t){o()}}return r},/**
     * All calls to the wrapped function will be batched.
     */batchCalls:e=>{return(...t)=>{a(()=>{e(...t)})}},schedule:a,/**
     * Use this method to set a custom notify function.
     * This can be used to for example wrap notifications with `React.act` while running tests.
     */setNotifyFunction:e=>{r=e},/**
     * Use this method to set a custom function to batch notifications together into a single tick.
     * By default React Query will use the batch function provided by ReactDOM or React Native.
     */setBatchNotifyFunction:e=>{n=e},setScheduler:e=>{i=e}}}var i=n();//# sourceMappingURL=notifyManager.js.map
},44030:function(e,t,r){"use strict";r.d(t,{t:()=>o});/* import */var n=r(66887);/* import */var i=r(19005);// src/onlineManager.ts
var a=class extends n/* .Subscribable */.Q{#p=true;#t;#r;constructor(){super();this.#r=e=>{if(!i/* .isServer */.S$&&window.addEventListener){const t=()=>e(true);const r=()=>e(false);window.addEventListener("online",t,false);window.addEventListener("offline",r,false);return()=>{window.removeEventListener("online",t);window.removeEventListener("offline",r)}}return}}onSubscribe(){if(!this.#t){this.setEventListener(this.#r)}}onUnsubscribe(){if(!this.hasListeners()){this.#t?.();this.#t=void 0}}setEventListener(e){this.#r=e;this.#t?.();this.#t=e(this.setOnline.bind(this))}setOnline(e){const t=this.#p!==e;if(t){this.#p=e;this.listeners.forEach(t=>{t(e)})}}isOnline(){return this.#p}};var o=new a;//# sourceMappingURL=onlineManager.js.map
},10860:function(e,t,r){"use strict";r.d(t,{X:()=>s,k:()=>u});/* import */var n=r(19005);/* import */var i=r(73276);/* import */var a=r(40649);/* import */var o=r(26957);// src/query.ts
var s=class extends o/* .Removable */.k{#h;#v;#m;#a;#g;#b;constructor(e){super();this.#b=false;this.#g=e.defaultOptions;this.setOptions(e.options);this.observers=[];this.#m=e.cache;this.queryKey=e.queryKey;this.queryHash=e.queryHash;this.#h=c(this.options);this.state=e.state??this.#h;this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#a?.promise}setOptions(e){this.options={...this.#g,...e};this.updateGcTime(this.options.gcTime)}optionalRemove(){if(!this.observers.length&&this.state.fetchStatus==="idle"){this.#m.remove(this)}}setData(e,t){const r=(0,n/* .replaceData */.pl)(this.state.data,e,this.options);this.#o({data:r,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual});return r}setState(e,t){this.#o({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#a?.promise;this.#a?.cancel(e);return t?t.then(n/* .noop */.lQ).catch(n/* .noop */.lQ):Promise.resolve()}destroy(){super.destroy();this.cancel({silent:true})}reset(){this.destroy();this.setState(this.#h)}isActive(){return this.observers.some(e=>(0,n/* .resolveEnabled */.Eh)(e.options.enabled,this)!==false)}isDisabled(){if(this.getObserversCount()>0){return!this.isActive()}return this.options.queryFn===n/* .skipToken */.hT||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){if(this.state.isInvalidated){return true}if(this.getObserversCount()>0){return this.observers.some(e=>e.getCurrentResult().isStale)}return this.state.data===void 0}isStaleByTime(e=0){return this.state.isInvalidated||this.state.data===void 0||!(0,n/* .timeUntilStale */.j3)(this.state.dataUpdatedAt,e)}onFocus(){const e=this.observers.find(e=>e.shouldFetchOnWindowFocus());e?.refetch({cancelRefetch:false});this.#a?.continue()}onOnline(){const e=this.observers.find(e=>e.shouldFetchOnReconnect());e?.refetch({cancelRefetch:false});this.#a?.continue()}addObserver(e){if(!this.observers.includes(e)){this.observers.push(e);this.clearGcTimeout();this.#m.notify({type:"observerAdded",query:this,observer:e})}}removeObserver(e){if(this.observers.includes(e)){this.observers=this.observers.filter(t=>t!==e);if(!this.observers.length){if(this.#a){if(this.#b){this.#a.cancel({revert:true})}else{this.#a.cancelRetry()}}this.scheduleGc()}this.#m.notify({type:"observerRemoved",query:this,observer:e})}}getObserversCount(){return this.observers.length}invalidate(){if(!this.state.isInvalidated){this.#o({type:"invalidate"})}}fetch(e,t){if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&t?.cancelRefetch){this.cancel({silent:true})}else if(this.#a){this.#a.continueRetry();return this.#a.promise}}if(e){this.setOptions(e)}if(!this.options.queryFn){const e=this.observers.find(e=>e.options.queryFn);if(e){this.setOptions(e.options)}}if(false){}const r=new AbortController;const i=e=>{Object.defineProperty(e,"signal",{enumerable:true,get:()=>{this.#b=true;return r.signal}})};const o=()=>{const e=(0,n/* .ensureQueryFn */.ZM)(this.options,t);const r={queryKey:this.queryKey,meta:this.meta};i(r);this.#b=false;if(this.options.persister){return this.options.persister(e,r,this)}return e(r)};const s={fetchOptions:t,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:o};i(s);this.options.behavior?.onFetch(s,this);this.#v=this.state;if(this.state.fetchStatus==="idle"||this.state.fetchMeta!==s.fetchOptions?.meta){this.#o({type:"fetch",meta:s.fetchOptions?.meta})}const u=e=>{if(!((0,a/* .isCancelledError */.wm)(e)&&e.silent)){this.#o({type:"error",error:e})}if(!(0,a/* .isCancelledError */.wm)(e)){this.#m.config.onError?.(e,this);this.#m.config.onSettled?.(this.state.data,e,this)}this.scheduleGc()};this.#a=(0,a/* .createRetryer */.II)({initialPromise:t?.initialPromise,fn:s.fetchFn,abort:r.abort.bind(r),onSuccess:e=>{if(e===void 0){if(false){}u(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(e)}catch(e){u(e);return}this.#m.config.onSuccess?.(e,this);this.#m.config.onSettled?.(e,this.state.error,this);this.scheduleGc()},onError:u,onFail:(e,t)=>{this.#o({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#o({type:"pause"})},onContinue:()=>{this.#o({type:"continue"})},retry:s.options.retry,retryDelay:s.options.retryDelay,networkMode:s.options.networkMode,canRun:()=>true});return this.#a.start()}#o(e){const t=t=>{switch(e.type){case"failed":return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...t,fetchStatus:"paused"};case"continue":return{...t,fetchStatus:"fetching"};case"fetch":return{...t,...u(t.data,this.options),fetchMeta:e.meta??null};case"success":return{...t,data:e.data,dataUpdateCount:t.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:false,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const r=e.error;if((0,a/* .isCancelledError */.wm)(r)&&r.revert&&this.#v){return{...this.#v,fetchStatus:"idle"}}return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:"idle",status:"error"};case"invalidate":return{...t,isInvalidated:true};case"setState":return{...t,...e.state}}};this.state=t(this.state);i/* .notifyManager.batch */.j.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()});this.#m.notify({query:this,type:"updated",action:e})})}};function u(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:(0,a/* .canFetch */.v_)(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function c(e){const t=typeof e.initialData==="function"?e.initialData():e.initialData;const r=t!==void 0;const n=r?typeof e.initialDataUpdatedAt==="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:false,status:r?"success":"pending",fetchStatus:"idle"}}//# sourceMappingURL=query.js.map
},44138:function(e,t,r){"use strict";r.d(t,{$:()=>c});/* import */var n=r(35465);/* import */var i=r(73276);/* import */var a=r(10860);/* import */var o=r(66887);/* import */var s=r(96449);/* import */var u=r(19005);// src/queryObserver.ts
var c=class extends o/* .Subscribable */.Q{constructor(e,t){super();this.options=t;this.#s=e;this.#_=null;this.#y=(0,s/* .pendingThenable */.T)();if(!this.options.experimental_prefetchInRender){this.#y.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))}this.bindMethods();this.setOptions(t)}#s;#w=void 0;#A=void 0;#u=void 0;#x;#E;#y;#_;#O;#S;// This property keeps track of the last query with defined data.
// It will be used to pass the previous data and query to the placeholder function between renders.
#T;#k;#C;#I;#R=/* @__PURE__ */new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){if(this.listeners.size===1){this.#w.addObserver(this);if(d(this.#w,this.options)){this.#D()}else{this.updateResult()}this.#P()}}onUnsubscribe(){if(!this.hasListeners()){this.destroy()}}shouldFetchOnReconnect(){return f(this.#w,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return f(this.#w,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=/* @__PURE__ */new Set;this.#M();this.#F();this.#w.removeObserver(this)}setOptions(e,t){const r=this.options;const n=this.#w;this.options=this.#s.defaultQueryOptions(e);if(this.options.enabled!==void 0&&typeof this.options.enabled!=="boolean"&&typeof this.options.enabled!=="function"&&typeof(0,u/* .resolveEnabled */.Eh)(this.options.enabled,this.#w)!=="boolean"){throw new Error("Expected enabled to be a boolean or a callback that returns a boolean")}this.#Y();this.#w.setOptions(this.options);if(r._defaulted&&!(0,u/* .shallowEqualObjects */.f8)(this.options,r)){this.#s.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#w,observer:this})}const i=this.hasListeners();if(i&&p(this.#w,n,this.options,r)){this.#D()}this.updateResult(t);if(i&&(this.#w!==n||(0,u/* .resolveEnabled */.Eh)(this.options.enabled,this.#w)!==(0,u/* .resolveEnabled */.Eh)(r.enabled,this.#w)||(0,u/* .resolveStaleTime */.d2)(this.options.staleTime,this.#w)!==(0,u/* .resolveStaleTime */.d2)(r.staleTime,this.#w))){this.#L()}const a=this.#N();if(i&&(this.#w!==n||(0,u/* .resolveEnabled */.Eh)(this.options.enabled,this.#w)!==(0,u/* .resolveEnabled */.Eh)(r.enabled,this.#w)||a!==this.#I)){this.#H(a)}}getOptimisticResult(e){const t=this.#s.getQueryCache().build(this.#s,e);const r=this.createResult(t,e);if(v(this,r)){this.#u=r;this.#E=this.options;this.#x=this.#w.state}return r}getCurrentResult(){return this.#u}trackResult(e,t){const r={};Object.keys(e).forEach(n=>{Object.defineProperty(r,n,{configurable:false,enumerable:true,get:()=>{this.trackProp(n);t?.(n);return e[n]}})});return r}trackProp(e){this.#R.add(e)}getCurrentQuery(){return this.#w}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#s.defaultQueryOptions(e);const r=this.#s.getQueryCache().build(this.#s,t);return r.fetch().then(()=>this.createResult(r,t))}fetch(e){return this.#D({...e,cancelRefetch:e.cancelRefetch??true}).then(()=>{this.updateResult();return this.#u})}#D(e){this.#Y();let t=this.#w.fetch(this.options,e);if(!e?.throwOnError){t=t.catch(u/* .noop */.lQ)}return t}#L(){this.#M();const e=(0,u/* .resolveStaleTime */.d2)(this.options.staleTime,this.#w);if(u/* .isServer */.S$||this.#u.isStale||!(0,u/* .isValidTimeout */.gn)(e)){return}const t=(0,u/* .timeUntilStale */.j3)(this.#u.dataUpdatedAt,e);const r=t+1;this.#k=setTimeout(()=>{if(!this.#u.isStale){this.updateResult()}},r)}#N(){return(typeof this.options.refetchInterval==="function"?this.options.refetchInterval(this.#w):this.options.refetchInterval)??false}#H(e){this.#F();this.#I=e;if(u/* .isServer */.S$||(0,u/* .resolveEnabled */.Eh)(this.options.enabled,this.#w)===false||!(0,u/* .isValidTimeout */.gn)(this.#I)||this.#I===0){return}this.#C=setInterval(()=>{if(this.options.refetchIntervalInBackground||n/* .focusManager.isFocused */.m.isFocused()){this.#D()}},this.#I)}#P(){this.#L();this.#H(this.#N())}#M(){if(this.#k){clearTimeout(this.#k);this.#k=void 0}}#F(){if(this.#C){clearInterval(this.#C);this.#C=void 0}}createResult(e,t){const r=this.#w;const n=this.options;const i=this.#u;const o=this.#x;const c=this.#E;const l=e!==r;const f=l?e.state:this.#A;const{state:v}=e;let m={...v};let g=false;let b;if(t._optimisticResults){const i=this.hasListeners();const o=!i&&d(e,t);const s=i&&p(e,r,t,n);if(o||s){m={...m,...(0,a/* .fetchState */.k)(v.data,e.options)}}if(t._optimisticResults==="isRestoring"){m.fetchStatus="idle"}}let{error:_,errorUpdatedAt:y,status:w}=m;if(t.select&&m.data!==void 0){if(i&&m.data===o?.data&&t.select===this.#O){b=this.#S}else{try{this.#O=t.select;b=t.select(m.data);b=(0,u/* .replaceData */.pl)(i?.data,b,t);this.#S=b;this.#_=null}catch(e){this.#_=e}}}else{b=m.data}if(t.placeholderData!==void 0&&b===void 0&&w==="pending"){let e;if(i?.isPlaceholderData&&t.placeholderData===c?.placeholderData){e=i.data}else{e=typeof t.placeholderData==="function"?t.placeholderData(this.#T?.state.data,this.#T):t.placeholderData;if(t.select&&e!==void 0){try{e=t.select(e);this.#_=null}catch(e){this.#_=e}}}if(e!==void 0){w="success";b=(0,u/* .replaceData */.pl)(i?.data,e,t);g=true}}if(this.#_){_=this.#_;b=this.#S;y=Date.now();w="error"}const A=m.fetchStatus==="fetching";const x=w==="pending";const E=w==="error";const O=x&&A;const S=b!==void 0;const T={status:w,fetchStatus:m.fetchStatus,isPending:x,isSuccess:w==="success",isError:E,isInitialLoading:O,isLoading:O,data:b,dataUpdatedAt:m.dataUpdatedAt,error:_,errorUpdatedAt:y,failureCount:m.fetchFailureCount,failureReason:m.fetchFailureReason,errorUpdateCount:m.errorUpdateCount,isFetched:m.dataUpdateCount>0||m.errorUpdateCount>0,isFetchedAfterMount:m.dataUpdateCount>f.dataUpdateCount||m.errorUpdateCount>f.errorUpdateCount,isFetching:A,isRefetching:A&&!x,isLoadingError:E&&!S,isPaused:m.fetchStatus==="paused",isPlaceholderData:g,isRefetchError:E&&S,isStale:h(e,t),refetch:this.refetch,promise:this.#y};const k=T;if(this.options.experimental_prefetchInRender){const t=e=>{if(k.status==="error"){e.reject(k.error)}else if(k.data!==void 0){e.resolve(k.data)}};const n=()=>{const e=this.#y=k.promise=(0,s/* .pendingThenable */.T)();t(e)};const i=this.#y;switch(i.status){case"pending":if(e.queryHash===r.queryHash){t(i)}break;case"fulfilled":if(k.status==="error"||k.data!==i.value){n()}break;case"rejected":if(k.status!=="error"||k.error!==i.reason){n()}break}}return k}updateResult(e){const t=this.#u;const r=this.createResult(this.#w,this.options);this.#x=this.#w.state;this.#E=this.options;if(this.#x.data!==void 0){this.#T=this.#w}if((0,u/* .shallowEqualObjects */.f8)(r,t)){return}this.#u=r;const n={};const i=()=>{if(!t){return true}const{notifyOnChangeProps:e}=this.options;const r=typeof e==="function"?e():e;if(r==="all"||!r&&!this.#R.size){return true}const n=new Set(r??this.#R);if(this.options.throwOnError){n.add("error")}return Object.keys(this.#u).some(e=>{const r=e;const i=this.#u[r]!==t[r];return i&&n.has(r)})};if(e?.listeners!==false&&i()){n.listeners=true}this.#f({...n,...e})}#Y(){const e=this.#s.getQueryCache().build(this.#s,this.options);if(e===this.#w){return}const t=this.#w;this.#w=e;this.#A=e.state;if(this.hasListeners()){t?.removeObserver(this);e.addObserver(this)}}onQueryUpdate(){this.updateResult();if(this.hasListeners()){this.#P()}}#f(e){i/* .notifyManager.batch */.j.batch(()=>{if(e.listeners){this.listeners.forEach(e=>{e(this.#u)})}this.#s.getQueryCache().notify({query:this.#w,type:"observerResultsUpdated"})})}};function l(e,t){return(0,u/* .resolveEnabled */.Eh)(t.enabled,e)!==false&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===false)}function d(e,t){return l(e,t)||e.state.data!==void 0&&f(e,t,t.refetchOnMount)}function f(e,t,r){if((0,u/* .resolveEnabled */.Eh)(t.enabled,e)!==false){const n=typeof r==="function"?r(e):r;return n==="always"||n!==false&&h(e,t)}return false}function p(e,t,r,n){return(e!==t||(0,u/* .resolveEnabled */.Eh)(n.enabled,e)===false)&&(!r.suspense||e.state.status!=="error")&&h(e,r)}function h(e,t){return(0,u/* .resolveEnabled */.Eh)(t.enabled,e)!==false&&e.isStaleByTime((0,u/* .resolveStaleTime */.d2)(t.staleTime,e))}function v(e,t){if(!(0,u/* .shallowEqualObjects */.f8)(e.getCurrentResult(),t)){return true}return false}//# sourceMappingURL=queryObserver.js.map
},26957:function(e,t,r){"use strict";r.d(t,{k:()=>i});/* import */var n=r(19005);// src/removable.ts
var i=class{#j;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout();if((0,n/* .isValidTimeout */.gn)(this.gcTime)){this.#j=setTimeout(()=>{this.optionalRemove()},this.gcTime)}}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(n/* .isServer */.S$?Infinity:5*60*1e3))}clearGcTimeout(){if(this.#j){clearTimeout(this.#j);this.#j=void 0}}};//# sourceMappingURL=removable.js.map
},40649:function(e,t,r){"use strict";r.d(t,{II:()=>d,v_:()=>u,wm:()=>l});/* import */var n=r(35465);/* import */var i=r(44030);/* import */var a=r(96449);/* import */var o=r(19005);// src/retryer.ts
function s(e){return Math.min(1e3*2**e,3e4)}function u(e){return(e??"online")==="online"?i/* .onlineManager.isOnline */.t.isOnline():true}var c=class extends Error{constructor(e){super("CancelledError");this.revert=e?.revert;this.silent=e?.silent}};function l(e){return e instanceof c}function d(e){let t=false;let r=0;let l=false;let d;const f=(0,a/* .pendingThenable */.T)();const p=t=>{if(!l){_(new c(t));e.abort?.()}};const h=()=>{t=true};const v=()=>{t=false};const m=()=>n/* .focusManager.isFocused */.m.isFocused()&&(e.networkMode==="always"||i/* .onlineManager.isOnline */.t.isOnline())&&e.canRun();const g=()=>u(e.networkMode)&&e.canRun();const b=t=>{if(!l){l=true;e.onSuccess?.(t);d?.();f.resolve(t)}};const _=t=>{if(!l){l=true;e.onError?.(t);d?.();f.reject(t)}};const y=()=>{return new Promise(t=>{d=e=>{if(l||m()){t(e)}};e.onPause?.()}).then(()=>{d=void 0;if(!l){e.onContinue?.()}})};const w=()=>{if(l){return}let n;const i=r===0?e.initialPromise:void 0;try{n=i??e.fn()}catch(e){n=Promise.reject(e)}Promise.resolve(n).then(b).catch(n=>{if(l){return}const i=e.retry??(o/* .isServer */.S$?0:3);const a=e.retryDelay??s;const u=typeof a==="function"?a(r,n):a;const c=i===true||typeof i==="number"&&r<i||typeof i==="function"&&i(r,n);if(t||!c){_(n);return}r++;e.onFail?.(r,n);(0,o/* .sleep */.yy)(u).then(()=>{return m()?void 0:y()}).then(()=>{if(t){_(n)}else{w()}})})};return{promise:f,cancel:p,continue:()=>{d?.();return f},cancelRetry:h,continueRetry:v,canStart:g,start:()=>{if(g()){w()}else{y().then(w)}return f}}}//# sourceMappingURL=retryer.js.map
},66887:function(e,t,r){"use strict";r.d(t,{Q:()=>n});// src/subscribable.ts
var n=class{constructor(){this.listeners=/* @__PURE__ */new Set;this.subscribe=this.subscribe.bind(this)}subscribe(e){this.listeners.add(e);this.onSubscribe();return()=>{this.listeners.delete(e);this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}};//# sourceMappingURL=subscribable.js.map
},96449:function(e,t,r){"use strict";r.d(t,{T:()=>n});// src/thenable.ts
function n(){let e;let t;const r=new Promise((r,n)=>{e=r;t=n});r.status="pending";r.catch(()=>{});function n(e){Object.assign(r,e);delete r.resolve;delete r.reject}r.resolve=t=>{n({status:"fulfilled",value:t});e(t)};r.reject=e=>{n({status:"rejected",reason:e});t(e)};return r}//# sourceMappingURL=thenable.js.map
},19005:function(e,t,r){"use strict";r.d(t,{Cp:()=>h,EN:()=>p,Eh:()=>c,F$:()=>f,MK:()=>l,S$:()=>n,ZM:()=>S,ZZ:()=>E,Zw:()=>a,d2:()=>u,f8:()=>m,gn:()=>o,hT:()=>O,j3:()=>s,lQ:()=>i,nJ:()=>d,pl:()=>w,rX:()=>A,y9:()=>x,yy:()=>y});// src/utils.ts
var n=typeof window==="undefined"||"Deno"in globalThis;function i(){}function a(e,t){return typeof e==="function"?e(t):e}function o(e){return typeof e==="number"&&e>=0&&e!==Infinity}function s(e,t){return Math.max(e+(t||0)-Date.now(),0)}function u(e,t){return typeof e==="function"?e(t):e}function c(e,t){return typeof e==="function"?e(t):e}function l(e,t){const{type:r="all",exact:n,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(n){if(t.queryHash!==f(o,t.options)){return false}}else if(!h(t.queryKey,o)){return false}}if(r!=="all"){const e=t.isActive();if(r==="active"&&!e){return false}if(r==="inactive"&&e){return false}}if(typeof s==="boolean"&&t.isStale()!==s){return false}if(i&&i!==t.state.fetchStatus){return false}if(a&&!a(t)){return false}return true}function d(e,t){const{exact:r,status:n,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey){return false}if(r){if(p(t.options.mutationKey)!==p(a)){return false}}else if(!h(t.options.mutationKey,a)){return false}}if(n&&t.state.status!==n){return false}if(i&&!i(t)){return false}return true}function f(e,t){const r=t?.queryKeyHashFn||p;return r(e)}function p(e){return JSON.stringify(e,(e,t)=>b(t)?Object.keys(t).sort().reduce((e,r)=>{e[r]=t[r];return e},{}):t)}function h(e,t){if(e===t){return true}if(typeof e!==typeof t){return false}if(e&&t&&typeof e==="object"&&typeof t==="object"){return!Object.keys(t).some(r=>!h(e[r],t[r]))}return false}function v(e,t){if(e===t){return e}const r=g(e)&&g(t);if(r||b(e)&&b(t)){const n=r?e:Object.keys(e);const i=n.length;const a=r?t:Object.keys(t);const o=a.length;const s=r?[]:{};let u=0;for(let i=0;i<o;i++){const o=r?i:a[i];if((!r&&n.includes(o)||r)&&e[o]===void 0&&t[o]===void 0){s[o]=void 0;u++}else{s[o]=v(e[o],t[o]);if(s[o]===e[o]&&e[o]!==void 0){u++}}}return i===o&&u===i?e:s}return t}function m(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length){return false}for(const r in e){if(e[r]!==t[r]){return false}}return true}function g(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function b(e){if(!_(e)){return false}const t=e.constructor;if(t===void 0){return true}const r=t.prototype;if(!_(r)){return false}if(!r.hasOwnProperty("isPrototypeOf")){return false}if(Object.getPrototypeOf(e)!==Object.prototype){return false}return true}function _(e){return Object.prototype.toString.call(e)==="[object Object]"}function y(e){return new Promise(t=>{setTimeout(t,e)})}function w(e,t,r){if(typeof r.structuralSharing==="function"){return r.structuralSharing(e,t)}else if(r.structuralSharing!==false){if(false){}return v(e,t)}return t}function A(e){return e}function x(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function E(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var O=Symbol();function S(e,t){if(false){}if(!e.queryFn&&t?.initialPromise){return()=>t.initialPromise}if(!e.queryFn||e.queryFn===O){return()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`))}return e.queryFn}//# sourceMappingURL=utils.js.map
},92965:function(e,t,r){"use strict";r.d(t,{Ht:()=>s,jE:()=>o});/* import */var n=r(41594);/* import */var i=r(86070);"use client";// src/QueryClientProvider.tsx
var a=n.createContext(void 0);var o=e=>{const t=n.useContext(a);if(e){return e}if(!t){throw new Error("No QueryClient set, use QueryClientProvider to set one")}return t};var s=({client:e,children:t})=>{n.useEffect(()=>{e.mount();return()=>{e.unmount()}},[e]);return/* @__PURE__ */(0,i.jsx)(a.Provider,{value:e,children:t})};//# sourceMappingURL=QueryClientProvider.js.map
},20668:function(e,t,r){"use strict";r.d(t,{h:()=>s});/* import */var n=r(41594);/* import */var i=r(86070);"use client";// src/QueryErrorResetBoundary.tsx
function a(){let e=false;return{clearReset:()=>{e=false},reset:()=>{e=true},isReset:()=>{return e}}}var o=n.createContext(a());var s=()=>n.useContext(o);var u=({children:e})=>{const[t]=React.useState(()=>a());return /* @__PURE__ */jsx(o.Provider,{value:t,children:typeof e==="function"?e(t):e})};//# sourceMappingURL=QueryErrorResetBoundary.js.map
},9250:function(e,t,r){"use strict";r.d(t,{$1:()=>s,LJ:()=>a,wZ:()=>o});/* import */var n=r(41594);/* import */var i=r(93398);"use client";// src/errorBoundaryUtils.ts
var a=(e,t)=>{if(e.suspense||e.throwOnError||e.experimental_prefetchInRender){if(!t.isReset()){e.retryOnMount=false}}};var o=e=>{n.useEffect(()=>{e.clearReset()},[e])};var s=({result:e,errorResetBoundary:t,throwOnError:r,query:n})=>{return e.isError&&!t.isReset()&&!e.isFetching&&n&&(0,i/* .shouldThrowError */.G)(r,[e.error,n])};//# sourceMappingURL=errorBoundaryUtils.js.map
},45334:function(e,t,r){"use strict";r.d(t,{w:()=>a});/* import */var n=r(41594);"use client";// src/isRestoring.ts
var i=n.createContext(false);var a=()=>n.useContext(i);var o=i.Provider;//# sourceMappingURL=isRestoring.js.map
},28563:function(e,t,r){"use strict";r.d(t,{EU:()=>o,iL:()=>s,jv:()=>i,nE:()=>a});// src/suspense.ts
var n=(e,t)=>t.state.data===void 0;var i=e=>{const t=e.staleTime;if(e.suspense){e.staleTime=typeof t==="function"?(...e)=>Math.max(t(...e),1e3):Math.max(t??1e3,1e3);if(typeof e.gcTime==="number"){e.gcTime=Math.max(e.gcTime,1e3)}}};var a=(e,t)=>e.isLoading&&e.isFetching&&!t;var o=(e,t)=>e?.suspense&&t.isPending;var s=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});//# sourceMappingURL=suspense.js.map
},96421:function(e,t,r){"use strict";r.d(t,{t:()=>f});/* import */var n=r(41594);/* import */var i=r(73276);/* import */var a=r(19005);/* import */var o=r(92965);/* import */var s=r(20668);/* import */var u=r(9250);/* import */var c=r(45334);/* import */var l=r(28563);/* import */var d=r(93398);"use client";// src/useBaseQuery.ts
function f(e,t,r){if(false){}const f=(0,o/* .useQueryClient */.jE)(r);const p=(0,c/* .useIsRestoring */.w)();const h=(0,s/* .useQueryErrorResetBoundary */.h)();const v=f.defaultQueryOptions(e);f.getDefaultOptions().queries?._experimental_beforeQuery?.(v);v._optimisticResults=p?"isRestoring":"optimistic";(0,l/* .ensureSuspenseTimers */.jv)(v);(0,u/* .ensurePreventErrorBoundaryRetry */.LJ)(v,h);(0,u/* .useClearResetErrorBoundary */.wZ)(h);const m=!f.getQueryCache().get(v.queryHash);const[g]=n.useState(()=>new t(f,v));const b=g.getOptimisticResult(v);n.useSyncExternalStore(n.useCallback(e=>{const t=p?d/* .noop */.l:g.subscribe(i/* .notifyManager.batchCalls */.j.batchCalls(e));g.updateResult();return t},[g,p]),()=>g.getCurrentResult(),()=>g.getCurrentResult());n.useEffect(()=>{g.setOptions(v,{listeners:false})},[v,g]);if((0,l/* .shouldSuspend */.EU)(v,b)){throw(0,l/* .fetchOptimistic */.iL)(v,g,h)}if((0,u/* .getHasError */.$1)({result:b,errorResetBoundary:h,throwOnError:v.throwOnError,query:f.getQueryCache().get(v.queryHash)})){throw b.error};f.getDefaultOptions().queries?._experimental_afterQuery?.(v,b);if(v.experimental_prefetchInRender&&!a/* .isServer */.S$&&(0,l/* .willFetch */.nE)(b,p)){const e=m?// Fetch immediately on render in order to ensure `.promise` is resolved even if the component is unmounted
(0,l/* .fetchOptimistic */.iL)(v,g,h):// subscribe to the "cache promise" so that we can finalize the currentThenable once data comes in
f.getQueryCache().get(v.queryHash)?.promise;e?.catch(d/* .noop */.l).finally(()=>{g.updateResult()})}return!v.notifyOnChangeProps?g.trackResult(b):b}//# sourceMappingURL=useBaseQuery.js.map
},32047:function(e,t,r){"use strict";r.d(t,{n:()=>u});/* import */var n=r(41594);/* import */var i=r(56751);/* import */var a=r(73276);/* import */var o=r(92965);/* import */var s=r(93398);"use client";// src/useMutation.ts
function u(e,t){const r=(0,o/* .useQueryClient */.jE)(t);const[u]=n.useState(()=>new i/* .MutationObserver */._(r,e));n.useEffect(()=>{u.setOptions(e)},[u,e]);const c=n.useSyncExternalStore(n.useCallback(e=>u.subscribe(a/* .notifyManager.batchCalls */.j.batchCalls(e)),[u]),()=>u.getCurrentResult(),()=>u.getCurrentResult());const l=n.useCallback((e,t)=>{u.mutate(e,t).catch(s/* .noop */.l)},[u]);if(c.error&&(0,s/* .shouldThrowError */.G)(u.options.throwOnError,[c.error])){throw c.error}return{...c,mutate:l,mutateAsync:c.mutate}}//# sourceMappingURL=useMutation.js.map
},37586:function(e,t,r){"use strict";r.d(t,{I:()=>a});/* import */var n=r(44138);/* import */var i=r(96421);"use client";// src/useQuery.ts
function a(e,t){return(0,i/* .useBaseQuery */.t)(e,n/* .QueryObserver */.$,t)}//# sourceMappingURL=useQuery.js.map
},93398:function(e,t,r){"use strict";r.d(t,{G:()=>n,l:()=>i});// src/utils.ts
function n(e,t){if(typeof e==="function"){return e(...t)}return!!e}function i(){}//# sourceMappingURL=utils.js.map
},10976:function(e,t,r){"use strict";r.d(t,{A:()=>f});/* import */var n=r(93156);/* import */var i=r(41606);/* import */var a=r(57952);/* import */var o=r(47686);/* import */var s=r(13869);/**
 * Known adapters mapping.
 * Provides environment-specific adapters for Axios:
 * - `http` for Node.js
 * - `xhr` for browsers
 * - `fetch` for fetch API-based requests
 * 
 * @type {Object<string, Function|Object>}
 */const u={http:i/* ["default"] */.A,xhr:a/* ["default"] */.A,fetch:{get:o/* .getFetch */.J}};// Assign adapter names for easier debugging and identification
n/* ["default"].forEach */.A.forEach(u,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){// eslint-disable-next-line no-empty
}Object.defineProperty(e,"adapterName",{value:t})}});/**
 * Render a rejection reason string for unknown or unsupported adapters
 * 
 * @param {string} reason
 * @returns {string}
 */const c=e=>`- ${e}`;/**
 * Check if the adapter is resolved (function, null, or false)
 * 
 * @param {Function|null|false} adapter
 * @returns {boolean}
 */const l=e=>n/* ["default"].isFunction */.A.isFunction(e)||e===null||e===false;/**
 * Get the first suitable adapter from the provided list.
 * Tries each adapter in order until a supported one is found.
 * Throws an AxiosError if no adapter is suitable.
 * 
 * @param {Array<string|Function>|string|Function} adapters - Adapter(s) by name or function.
 * @param {Object} config - Axios request configuration
 * @throws {AxiosError} If no suitable adapter is available
 * @returns {Function} The resolved adapter function
 */function d(e,t){e=n/* ["default"].isArray */.A.isArray(e)?e:[e];const{length:r}=e;let i;let a;const o={};for(let c=0;c<r;c++){i=e[c];let r;a=i;if(!l(i)){a=u[(r=String(i)).toLowerCase()];if(a===undefined){throw new s/* ["default"] */.A(`Unknown adapter '${r}'`)}}if(a&&(n/* ["default"].isFunction */.A.isFunction(a)||(a=a.get(t)))){break}o[r||"#"+c]=a}if(!a){const e=Object.entries(o).map(([e,t])=>`adapter ${e} `+(t===false?"is not supported by the environment":"is not available in the build"));let t=r?e.length>1?"since :\n"+e.map(c).join("\n"):" "+c(e[0]):"as no adapter specified";throw new s/* ["default"] */.A(`There is no suitable adapter to dispatch the request `+t,"ERR_NOT_SUPPORT")}return a}/**
 * Exports Axios adapters and utility to resolve an adapter
 *//* export default */const f={/**
   * Resolve an adapter from a list of adapter names or functions.
   * @type {Function}
   */getAdapter:d,/**
   * Exposes all known adapters
   * @type {Object<string, Function|Object>}
   */adapters:u}},47686:function(e,t,r){"use strict";r.d(t,{J:()=>y});/* import */var n=r(36545);/* import */var i=r(93156);/* import */var a=r(13869);/* import */var o=r(42698);/* import */var s=r(96036);/* import */var u=r(78961);/* import */var c=r(20320);/* import */var l=r(60517);/* import */var d=r(26058);const f=64*1024;const{isFunction:p}=i/* ["default"] */.A;const h=(({Request:e,Response:t})=>({Request:e,Response:t}))(i/* ["default"].global */.A.global);const{ReadableStream:v,TextEncoder:m}=i/* ["default"].global */.A.global;const g=(e,...t)=>{try{return!!e(...t)}catch(e){return false}};const b=e=>{e=i/* ["default"].merge.call */.A.merge.call({skipUndefined:true},h,e);const{fetch:t,Request:r,Response:b}=e;const _=t?p(t):typeof fetch==="function";const y=p(r);const w=p(b);if(!_){return false}const A=_&&p(v);const x=_&&(typeof m==="function"?(e=>t=>e.encode(t))(new m):async e=>new Uint8Array(await new r(e).arrayBuffer()));const E=y&&A&&g(()=>{let e=false;const t=new r(n/* ["default"].origin */.A.origin,{body:new v,method:"POST",get duplex(){e=true;return"half"}}).headers.has("Content-Type");return e&&!t});const O=w&&A&&g(()=>i/* ["default"].isReadableStream */.A.isReadableStream(new b("").body));const S={stream:O&&(e=>e.body)};_&&(()=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!S[e]&&(S[e]=(t,r)=>{let n=t&&t[e];if(n){return n.call(t)}throw new a/* ["default"] */.A(`Response type '${e}' is not supported`,a/* ["default"].ERR_NOT_SUPPORT */.A.ERR_NOT_SUPPORT,r)})})})();const T=async e=>{if(e==null){return 0}if(i/* ["default"].isBlob */.A.isBlob(e)){return e.size}if(i/* ["default"].isSpecCompliantForm */.A.isSpecCompliantForm(e)){const t=new r(n/* ["default"].origin */.A.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}if(i/* ["default"].isArrayBufferView */.A.isArrayBufferView(e)||i/* ["default"].isArrayBuffer */.A.isArrayBuffer(e)){return e.byteLength}if(i/* ["default"].isURLSearchParams */.A.isURLSearchParams(e)){e=e+""}if(i/* ["default"].isString */.A.isString(e)){return(await x(e)).byteLength}};const k=async(e,t)=>{const r=i/* ["default"].toFiniteNumber */.A.toFiniteNumber(e.getContentLength());return r==null?T(t):r};return async e=>{let{url:n,method:p,data:h,signal:v,cancelToken:m,timeout:g,onDownloadProgress:_,onUploadProgress:w,responseType:A,headers:x,withCredentials:T="same-origin",fetchOptions:C}=(0,l/* ["default"] */.A)(e);let I=t||fetch;A=A?(A+"").toLowerCase():"text";let R=(0,o/* ["default"] */.A)([v,m&&m.toAbortSignal()],g);let D=null;const P=R&&R.unsubscribe&&(()=>{R.unsubscribe()});let M;try{if(w&&E&&p!=="get"&&p!=="head"&&(M=await k(x,h))!==0){let e=new r(n,{method:"POST",body:h,duplex:"half"});let t;if(i/* ["default"].isFormData */.A.isFormData(h)&&(t=e.headers.get("content-type"))){x.setContentType(t)}if(e.body){const[t,r]=(0,c/* .progressEventDecorator */.Vj)(M,(0,c/* .progressEventReducer */.C1)((0,c/* .asyncDecorator */.mM)(w)));h=(0,s/* .trackStream */.E9)(e.body,f,t,r)}}if(!i/* ["default"].isString */.A.isString(T)){T=T?"include":"omit"}// Cloudflare Workers throws when credentials are defined
// see https://github.com/cloudflare/workerd/issues/902
const t=y&&"credentials"in r.prototype;const a={...C,signal:R,method:p.toUpperCase(),headers:x.normalize().toJSON(),body:h,duplex:"half",credentials:t?T:undefined};D=y&&new r(n,a);let o=await (y?I(D,C):I(n,a));const l=O&&(A==="stream"||A==="response");if(O&&(_||l&&P)){const e={};["status","statusText","headers"].forEach(t=>{e[t]=o[t]});const t=i/* ["default"].toFiniteNumber */.A.toFiniteNumber(o.headers.get("content-length"));const[r,n]=_&&(0,c/* .progressEventDecorator */.Vj)(t,(0,c/* .progressEventReducer */.C1)((0,c/* .asyncDecorator */.mM)(_),true))||[];o=new b((0,s/* .trackStream */.E9)(o.body,f,r,()=>{n&&n();P&&P()}),e)}A=A||"text";let v=await S[i/* ["default"].findKey */.A.findKey(S,A)||"text"](o,e);!l&&P&&P();return await new Promise((t,r)=>{(0,d/* ["default"] */.A)(t,r,{data:v,headers:u/* ["default"].from */.A.from(o.headers),status:o.status,statusText:o.statusText,config:e,request:D})})}catch(t){P&&P();if(t&&t.name==="TypeError"&&/Load failed|fetch/i.test(t.message)){throw Object.assign(new a/* ["default"] */.A("Network Error",a/* ["default"].ERR_NETWORK */.A.ERR_NETWORK,e,D),{cause:t.cause||t})}throw a/* ["default"].from */.A.from(t,t&&t.code,e,D)}}};const _=new Map;const y=e=>{let t=e&&e.env||{};const{fetch:r,Request:n,Response:i}=t;const a=[n,i,r];let o=a.length,s=o,u,c,l=_;while(s--){u=a[s];c=l.get(u);c===undefined&&l.set(u,c=s?new Map:b(t));l=c}return c};const w=y();/* unused export default */var A=/* unused pure expression or super */null&&w},57952:function(e,t,r){"use strict";r.d(t,{A:()=>h});/* import */var n=r(93156);/* import */var i=r(26058);/* import */var a=r(79976);/* import */var o=r(13869);/* import */var s=r(87963);/* import */var u=r(30656);/* import */var c=r(36545);/* import */var l=r(78961);/* import */var d=r(20320);/* import */var f=r(60517);const p=typeof XMLHttpRequest!=="undefined";/* export default */const h=p&&function(e){return new Promise(function t(t,r){const p=(0,f/* ["default"] */.A)(e);let h=p.data;const v=l/* ["default"].from */.A.from(p.headers).normalize();let{responseType:m,onUploadProgress:g,onDownloadProgress:b}=p;let _;let y,w;let A,x;function E(){A&&A();// flush events
x&&x();// flush events
p.cancelToken&&p.cancelToken.unsubscribe(_);p.signal&&p.signal.removeEventListener("abort",_)}let O=new XMLHttpRequest;O.open(p.method.toUpperCase(),p.url,true);// Set the request timeout in MS
O.timeout=p.timeout;function S(){if(!O){return}// Prepare the response
const n=l/* ["default"].from */.A.from("getAllResponseHeaders"in O&&O.getAllResponseHeaders());const a=!m||m==="text"||m==="json"?O.responseText:O.response;const o={data:a,status:O.status,statusText:O.statusText,headers:n,config:e,request:O};(0,i/* ["default"] */.A)(function e(e){t(e);E()},function e(e){r(e);E()},o);// Clean up request
O=null}if("onloadend"in O){// Use onloadend if available
O.onloadend=S}else{// Listen for ready state to emulate onloadend
O.onreadystatechange=function e(){if(!O||O.readyState!==4){return}// The request errored out and we didn't get a response, this will be
// handled by onerror instead
// With one exception: request that using file: protocol, most browsers
// will return status as 0 even though it's a successful request
if(O.status===0&&!(O.responseURL&&O.responseURL.indexOf("file:")===0)){return}// readystate handler is calling before onerror or ontimeout handlers,
// so we should call onloadend on the next 'tick'
setTimeout(S)}}// Handle browser request cancellation (as opposed to a manual cancellation)
O.onabort=function t(){if(!O){return}r(new o/* ["default"] */.A("Request aborted",o/* ["default"].ECONNABORTED */.A.ECONNABORTED,e,O));// Clean up request
O=null};// Handle low level network errors
O.onerror=function t(t){// Browsers deliver a ProgressEvent in XHR onerror
// (message may be empty; when present, surface it)
// See https://developer.mozilla.org/docs/Web/API/XMLHttpRequest/error_event
const n=t&&t.message?t.message:"Network Error";const i=new o/* ["default"] */.A(n,o/* ["default"].ERR_NETWORK */.A.ERR_NETWORK,e,O);// attach the underlying event for consumers who want details
i.event=t||null;r(i);O=null};// Handle timeout
O.ontimeout=function t(){let t=p.timeout?"timeout of "+p.timeout+"ms exceeded":"timeout exceeded";const n=p.transitional||a/* ["default"] */.A;if(p.timeoutErrorMessage){t=p.timeoutErrorMessage}r(new o/* ["default"] */.A(t,n.clarifyTimeoutError?o/* ["default"].ETIMEDOUT */.A.ETIMEDOUT:o/* ["default"].ECONNABORTED */.A.ECONNABORTED,e,O));// Clean up request
O=null};// Remove Content-Type if data is undefined
h===undefined&&v.setContentType(null);// Add headers to the request
if("setRequestHeader"in O){n/* ["default"].forEach */.A.forEach(v.toJSON(),function e(e,t){O.setRequestHeader(t,e)})}// Add withCredentials to request if needed
if(!n/* ["default"].isUndefined */.A.isUndefined(p.withCredentials)){O.withCredentials=!!p.withCredentials}// Add responseType to request if needed
if(m&&m!=="json"){O.responseType=p.responseType}// Handle progress if needed
if(b){[w,x]=(0,d/* .progressEventReducer */.C1)(b,true);O.addEventListener("progress",w)}// Not all browsers support upload events
if(g&&O.upload){[y,A]=(0,d/* .progressEventReducer */.C1)(g);O.upload.addEventListener("progress",y);O.upload.addEventListener("loadend",A)}if(p.cancelToken||p.signal){// Handle cancellation
// eslint-disable-next-line func-names
_=t=>{if(!O){return}r(!t||t.type?new s/* ["default"] */.A(null,e,O):t);O.abort();O=null};p.cancelToken&&p.cancelToken.subscribe(_);if(p.signal){p.signal.aborted?_():p.signal.addEventListener("abort",_)}}const T=(0,u/* ["default"] */.A)(p.url);if(T&&c/* ["default"].protocols.indexOf */.A.protocols.indexOf(T)===-1){r(new o/* ["default"] */.A("Unsupported protocol "+T+":",o/* ["default"].ERR_BAD_REQUEST */.A.ERR_BAD_REQUEST,e));return}// Send the request
O.send(h||null)})}},80071:function(e,t,r){"use strict";r.d(t,{A:()=>A});/* import */var n=r(93156);/* import */var i=r(10668);/* import */var a=r(7275);/* import */var o=r(24295);/* import */var s=r(73468);/* import */var u=r(29426);/* import */var c=r(87963);/* import */var l=r(96767);/* import */var d=r(58368);/* import */var f=r(42193);/* import */var p=r(3536);/* import */var h=r(13869);/* import */var v=r(79988);/* import */var m=r(17155);/* import */var g=r(78961);/* import */var b=r(10976);/* import */var _=r(70228);/**
 * Create an instance of Axios
 *
 * @param {Object} defaultConfig The default config for the instance
 *
 * @returns {Axios} A new instance of Axios
 */function y(e){const t=new a/* ["default"] */.A(e);const r=(0,i/* ["default"] */.A)(a/* ["default"].prototype.request */.A.prototype.request,t);// Copy axios.prototype to instance
n/* ["default"].extend */.A.extend(r,a/* ["default"].prototype */.A.prototype,t,{allOwnKeys:true});// Copy context to instance
n/* ["default"].extend */.A.extend(r,t,null,{allOwnKeys:true});// Factory for creating new instances
r.create=function t(t){return y((0,o/* ["default"] */.A)(e,t))};return r}// Create the default instance to be exported
const w=y(s/* ["default"] */.A);// Expose Axios class to allow class inheritance
w.Axios=a/* ["default"] */.A;// Expose Cancel & CancelToken
w.CanceledError=c/* ["default"] */.A;w.CancelToken=l/* ["default"] */.A;w.isCancel=d/* ["default"] */.A;w.VERSION=f/* .VERSION */.x;w.toFormData=p/* ["default"] */.A;// Expose AxiosError class
w.AxiosError=h/* ["default"] */.A;// alias for CanceledError for backward compatibility
w.Cancel=w.CanceledError;// Expose all/spread
w.all=function e(e){return Promise.all(e)};w.spread=v/* ["default"] */.A;// Expose isAxiosError
w.isAxiosError=m/* ["default"] */.A;// Expose mergeConfig
w.mergeConfig=o/* ["default"] */.A;w.AxiosHeaders=g/* ["default"] */.A;w.formToJSON=e=>(0,u/* ["default"] */.A)(n/* ["default"].isHTMLForm */.A.isHTMLForm(e)?new FormData(e):e);w.getAdapter=b/* ["default"].getAdapter */.A.getAdapter;w.HttpStatusCode=_/* ["default"] */.A;w.default=w;// this module should only have a default export
/* export default */const A=w},96767:function(e,t,r){"use strict";r.d(t,{A:()=>a});/* import */var n=r(87963);/**
 * A `CancelToken` is an object that can be used to request cancellation of an operation.
 *
 * @param {Function} executor The executor function.
 *
 * @returns {CancelToken}
 */class i{constructor(e){if(typeof e!=="function"){throw new TypeError("executor must be a function.")}let t;this.promise=new Promise(function e(e){t=e});const r=this;// eslint-disable-next-line func-names
this.promise.then(e=>{if(!r._listeners)return;let t=r._listeners.length;while(t-- >0){r._listeners[t](e)}r._listeners=null});// eslint-disable-next-line func-names
this.promise.then=e=>{let t;// eslint-disable-next-line func-names
const n=new Promise(e=>{r.subscribe(e);t=e}).then(e);n.cancel=function e(){r.unsubscribe(t)};return n};e(function e(e,i,a){if(r.reason){// Cancellation has already been requested
return}r.reason=new n/* ["default"] */.A(e,i,a);t(r.reason)})}/**
   * Throws a `CanceledError` if cancellation has been requested.
   */throwIfRequested(){if(this.reason){throw this.reason}}/**
   * Subscribe to the cancel signal
   */subscribe(e){if(this.reason){e(this.reason);return}if(this._listeners){this._listeners.push(e)}else{this._listeners=[e]}}/**
   * Unsubscribe from the cancel signal
   */unsubscribe(e){if(!this._listeners){return}const t=this._listeners.indexOf(e);if(t!==-1){this._listeners.splice(t,1)}}toAbortSignal(){const e=new AbortController;const t=t=>{e.abort(t)};this.subscribe(t);e.signal.unsubscribe=()=>this.unsubscribe(t);return e.signal}/**
   * Returns an object that contains a new `CancelToken` and a function that, when called,
   * cancels the `CancelToken`.
   */static source(){let e;const t=new i(function t(t){e=t});return{token:t,cancel:e}}}/* export default */const a=i},87963:function(e,t,r){"use strict";r.d(t,{A:()=>o});/* import */var n=r(13869);/* import */var i=r(93156);/**
 * A `CanceledError` is an object that is thrown when an operation is canceled.
 *
 * @param {string=} message The message.
 * @param {Object=} config The config.
 * @param {Object=} request The request.
 *
 * @returns {CanceledError} The created error.
 */function a(e,t,r){// eslint-disable-next-line no-eq-null,eqeqeq
n/* ["default"].call */.A.call(this,e==null?"canceled":e,n/* ["default"].ERR_CANCELED */.A.ERR_CANCELED,t,r);this.name="CanceledError"}i/* ["default"].inherits */.A.inherits(a,n/* ["default"] */.A,{__CANCEL__:true});/* export default */const o=a},58368:function(e,t,r){"use strict";r.d(t,{A:()=>n});function n(e){return!!(e&&e.__CANCEL__)}},7275:function(e,t,r){"use strict";r.d(t,{A:()=>p});/* import */var n=r(93156);/* import */var i=r(49546);/* import */var a=r(26391);/* import */var o=r(71762);/* import */var s=r(24295);/* import */var u=r(76823);/* import */var c=r(51825);/* import */var l=r(78961);const d=c/* ["default"].validators */.A.validators;/**
 * Create a new instance of Axios
 *
 * @param {Object} instanceConfig The default config for the instance
 *
 * @return {Axios} A new instance of Axios
 */class f{constructor(e){this.defaults=e||{};this.interceptors={request:new a/* ["default"] */.A,response:new a/* ["default"] */.A}}/**
   * Dispatch a request
   *
   * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)
   * @param {?Object} config
   *
   * @returns {Promise} The Promise to be fulfilled
   */async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;// slice off the Error: ... line
const r=t.stack?t.stack.replace(/^.+\n/,""):"";try{if(!e.stack){e.stack=r;// match without the 2 top stack lines
}else if(r&&!String(e.stack).endsWith(r.replace(/^.+\n.+\n/,""))){e.stack+="\n"+r}}catch(e){// ignore the case where "stack" is an un-writable property
}}throw e}}_request(e,t){/*eslint no-param-reassign:0*/// Allow for axios('example/url'[, config]) a la fetch API
if(typeof e==="string"){t=t||{};t.url=e}else{t=e||{}}t=(0,s/* ["default"] */.A)(this.defaults,t);const{transitional:r,paramsSerializer:i,headers:a}=t;if(r!==undefined){c/* ["default"].assertOptions */.A.assertOptions(r,{silentJSONParsing:d.transitional(d.boolean),forcedJSONParsing:d.transitional(d.boolean),clarifyTimeoutError:d.transitional(d.boolean)},false)}if(i!=null){if(n/* ["default"].isFunction */.A.isFunction(i)){t.paramsSerializer={serialize:i}}else{c/* ["default"].assertOptions */.A.assertOptions(i,{encode:d.function,serialize:d.function},true)}}// Set config.allowAbsoluteUrls
if(t.allowAbsoluteUrls!==undefined){// do nothing
}else if(this.defaults.allowAbsoluteUrls!==undefined){t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls}else{t.allowAbsoluteUrls=true}c/* ["default"].assertOptions */.A.assertOptions(t,{baseUrl:d.spelling("baseURL"),withXsrfToken:d.spelling("withXSRFToken")},true);// Set config.method
t.method=(t.method||this.defaults.method||"get").toLowerCase();// Flatten headers
let u=a&&n/* ["default"].merge */.A.merge(a.common,a[t.method]);a&&n/* ["default"].forEach */.A.forEach(["delete","get","head","post","put","patch","common"],e=>{delete a[e]});t.headers=l/* ["default"].concat */.A.concat(u,a);// filter out skipped interceptors
const f=[];let p=true;this.interceptors.request.forEach(function e(e){if(typeof e.runWhen==="function"&&e.runWhen(t)===false){return}p=p&&e.synchronous;f.unshift(e.fulfilled,e.rejected)});const h=[];this.interceptors.response.forEach(function e(e){h.push(e.fulfilled,e.rejected)});let v;let m=0;let g;if(!p){const e=[o/* ["default"].bind */.A.bind(this),undefined];e.unshift(...f);e.push(...h);g=e.length;v=Promise.resolve(t);while(m<g){v=v.then(e[m++],e[m++])}return v}g=f.length;let b=t;while(m<g){const e=f[m++];const t=f[m++];try{b=e(b)}catch(e){t.call(this,e);break}}try{v=o/* ["default"].call */.A.call(this,b)}catch(e){return Promise.reject(e)}m=0;g=h.length;while(m<g){v=v.then(h[m++],h[m++])}return v}getUri(e){e=(0,s/* ["default"] */.A)(this.defaults,e);const t=(0,u/* ["default"] */.A)(e.baseURL,e.url,e.allowAbsoluteUrls);return(0,i/* ["default"] */.A)(t,e.params,e.paramsSerializer)}}// Provide aliases for supported request methods
n/* ["default"].forEach */.A.forEach(["delete","get","head","options"],function e(e){/*eslint func-names:0*/f.prototype[e]=function(t,r){return this.request((0,s/* ["default"] */.A)(r||{},{method:e,url:t,data:(r||{}).data}))}});n/* ["default"].forEach */.A.forEach(["post","put","patch"],function e(e){/*eslint func-names:0*/function t(t){return function r(r,n,i){return this.request((0,s/* ["default"] */.A)(i||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}f.prototype[e]=t();f.prototype[e+"Form"]=t(true)});/* export default */const p=f},13869:function(e,t,r){"use strict";r.d(t,{A:()=>s});/* import */var n=r(93156);/**
 * Create an Error with the specified message, config, error code, request and response.
 *
 * @param {string} message The error message.
 * @param {string} [code] The error code (for example, 'ECONNABORTED').
 * @param {Object} [config] The config.
 * @param {Object} [request] The request.
 * @param {Object} [response] The response.
 *
 * @returns {Error} The created error.
 */function i(e,t,r,n,i){Error.call(this);if(Error.captureStackTrace){Error.captureStackTrace(this,this.constructor)}else{this.stack=new Error().stack}this.message=e;this.name="AxiosError";t&&(this.code=t);r&&(this.config=r);n&&(this.request=n);if(i){this.response=i;this.status=i.status?i.status:null}}n/* ["default"].inherits */.A.inherits(i,Error,{toJSON:function e(){return{// Standard
message:this.message,name:this.name,// Microsoft
description:this.description,number:this.number,// Mozilla
fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,// Axios
config:n/* ["default"].toJSONObject */.A.toJSONObject(this.config),code:this.code,status:this.status}}});const a=i.prototype;const o={};["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=>{o[e]={value:e}});Object.defineProperties(i,o);Object.defineProperty(a,"isAxiosError",{value:true});// eslint-disable-next-line func-names
i.from=(e,t,r,o,s,u)=>{const c=Object.create(a);n/* ["default"].toFlatObject */.A.toFlatObject(e,c,function e(e){return e!==Error.prototype},e=>{return e!=="isAxiosError"});const l=e&&e.message?e.message:"Error";// Prefer explicit code; otherwise copy the low-level error's code (e.g. ECONNREFUSED)
const d=t==null&&e?e.code:t;i.call(c,l,d,r,o,s);// Chain the original error on the standard field; non-enumerable to avoid JSON noise
if(e&&c.cause==null){Object.defineProperty(c,"cause",{value:e,configurable:true})}c.name=e&&e.name||"Error";u&&Object.assign(c,u);return c};/* export default */const s=i},78961:function(e,t,r){"use strict";r.d(t,{A:()=>h});/* import */var n=r(93156);/* import */var i=r(82596);const a=Symbol("internals");function o(e){return e&&String(e).trim().toLowerCase()}function s(e){if(e===false||e==null){return e}return n/* ["default"].isArray */.A.isArray(e)?e.map(s):String(e)}function u(e){const t=Object.create(null);const r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;while(n=r.exec(e)){t[n[1]]=n[2]}return t}const c=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function l(e,t,r,i,a){if(n/* ["default"].isFunction */.A.isFunction(i)){return i.call(this,t,r)}if(a){t=r}if(!n/* ["default"].isString */.A.isString(t))return;if(n/* ["default"].isString */.A.isString(i)){return t.indexOf(i)!==-1}if(n/* ["default"].isRegExp */.A.isRegExp(i)){return i.test(t)}}function d(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,r)=>{return t.toUpperCase()+r})}function f(e,t){const r=n/* ["default"].toCamelCase */.A.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(e,r,i){return this[n].call(this,t,e,r,i)},configurable:true})})}class p{constructor(e){e&&this.set(e)}set(e,t,r){const a=this;function u(e,t,r){const i=o(t);if(!i){throw new Error("header name must be a non-empty string")}const u=n/* ["default"].findKey */.A.findKey(a,i);if(!u||a[u]===undefined||r===true||r===undefined&&a[u]!==false){a[u||t]=s(e)}}const l=(e,t)=>n/* ["default"].forEach */.A.forEach(e,(e,r)=>u(e,r,t));if(n/* ["default"].isPlainObject */.A.isPlainObject(e)||e instanceof this.constructor){l(e,t)}else if(n/* ["default"].isString */.A.isString(e)&&(e=e.trim())&&!c(e)){l((0,i/* ["default"] */.A)(e),t)}else if(n/* ["default"].isObject */.A.isObject(e)&&n/* ["default"].isIterable */.A.isIterable(e)){let r={},i,a;for(const t of e){if(!n/* ["default"].isArray */.A.isArray(t)){throw TypeError("Object iterator must return a key-value pair")}r[a=t[0]]=(i=r[a])?n/* ["default"].isArray */.A.isArray(i)?[...i,t[1]]:[i,t[1]]:t[1]}l(r,t)}else{e!=null&&u(t,e,r)}return this}get(e,t){e=o(e);if(e){const r=n/* ["default"].findKey */.A.findKey(this,e);if(r){const e=this[r];if(!t){return e}if(t===true){return u(e)}if(n/* ["default"].isFunction */.A.isFunction(t)){return t.call(this,e,r)}if(n/* ["default"].isRegExp */.A.isRegExp(t)){return t.exec(e)}throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){e=o(e);if(e){const r=n/* ["default"].findKey */.A.findKey(this,e);return!!(r&&this[r]!==undefined&&(!t||l(this,this[r],r,t)))}return false}delete(e,t){const r=this;let i=false;function a(e){e=o(e);if(e){const a=n/* ["default"].findKey */.A.findKey(r,e);if(a&&(!t||l(r,r[a],a,t))){delete r[a];i=true}}}if(n/* ["default"].isArray */.A.isArray(e)){e.forEach(a)}else{a(e)}return i}clear(e){const t=Object.keys(this);let r=t.length;let n=false;while(r--){const i=t[r];if(!e||l(this,this[i],i,e,true)){delete this[i];n=true}}return n}normalize(e){const t=this;const r={};n/* ["default"].forEach */.A.forEach(this,(i,a)=>{const o=n/* ["default"].findKey */.A.findKey(r,a);if(o){t[o]=s(i);delete t[a];return}const u=e?d(a):String(a).trim();if(u!==a){delete t[a]}t[u]=s(i);r[u]=true});return this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);n/* ["default"].forEach */.A.forEach(this,(r,i)=>{r!=null&&r!==false&&(t[i]=e&&n/* ["default"].isArray */.A.isArray(r)?r.join(", "):r)});return t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const r=new this(e);t.forEach(e=>r.set(e));return r}static accessor(e){const t=this[a]=this[a]={accessors:{}};const r=t.accessors;const i=this.prototype;function s(e){const t=o(e);if(!r[t]){f(i,e);r[t]=true}}n/* ["default"].isArray */.A.isArray(e)?e.forEach(s):s(e);return this}}p.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);// reserved names hotfix
n/* ["default"].reduceDescriptors */.A.reduceDescriptors(p.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);// map `set` => `Set`
return{get:()=>e,set(e){this[r]=e}}});n/* ["default"].freezeMethods */.A.freezeMethods(p);/* export default */const h=p},26391:function(e,t,r){"use strict";r.d(t,{A:()=>a});/* import */var n=r(93156);class i{constructor(){this.handlers=[]}/**
   * Add a new interceptor to the stack
   *
   * @param {Function} fulfilled The function to handle `then` for a `Promise`
   * @param {Function} rejected The function to handle `reject` for a `Promise`
   *
   * @return {Number} An ID used to remove interceptor later
   */use(e,t,r){this.handlers.push({fulfilled:e,rejected:t,synchronous:r?r.synchronous:false,runWhen:r?r.runWhen:null});return this.handlers.length-1}/**
   * Remove an interceptor from the stack
   *
   * @param {Number} id The ID that was returned by `use`
   *
   * @returns {void}
   */eject(e){if(this.handlers[e]){this.handlers[e]=null}}/**
   * Clear all interceptors from the stack
   *
   * @returns {void}
   */clear(){if(this.handlers){this.handlers=[]}}/**
   * Iterate over all the registered interceptors
   *
   * This method is particularly useful for skipping over any
   * interceptors that may have become `null` calling `eject`.
   *
   * @param {Function} fn The function to call for each interceptor
   *
   * @returns {void}
   */forEach(e){n/* ["default"].forEach */.A.forEach(this.handlers,function t(t){if(t!==null){e(t)}})}}/* export default */const a=i},76823:function(e,t,r){"use strict";r.d(t,{A:()=>a});/* import */var n=r(85753);/* import */var i=r(12288);/**
 * Creates a new URL by combining the baseURL with the requestedURL,
 * only when the requestedURL is not already an absolute URL.
 * If the requestURL is absolute, this function returns the requestedURL untouched.
 *
 * @param {string} baseURL The base URL
 * @param {string} requestedURL Absolute or relative URL to combine
 *
 * @returns {string} The combined full path
 */function a(e,t,r){let a=!(0,n/* ["default"] */.A)(t);if(e&&(a||r==false)){return(0,i/* ["default"] */.A)(e,t)}return t}},71762:function(e,t,r){"use strict";r.d(t,{A:()=>l});/* import */var n=r(31577);/* import */var i=r(58368);/* import */var a=r(73468);/* import */var o=r(87963);/* import */var s=r(78961);/* import */var u=r(10976);/**
 * Throws a `CanceledError` if cancellation has been requested.
 *
 * @param {Object} config The config that is to be used for the request
 *
 * @returns {void}
 */function c(e){if(e.cancelToken){e.cancelToken.throwIfRequested()}if(e.signal&&e.signal.aborted){throw new o/* ["default"] */.A(null,e)}}/**
 * Dispatch a request to the server using the configured adapter.
 *
 * @param {object} config The config that is to be used for the request
 *
 * @returns {Promise} The Promise to be fulfilled
 */function l(e){c(e);e.headers=s/* ["default"].from */.A.from(e.headers);// Transform request data
e.data=n/* ["default"].call */.A.call(e,e.transformRequest);if(["post","put","patch"].indexOf(e.method)!==-1){e.headers.setContentType("application/x-www-form-urlencoded",false)}const t=u/* ["default"].getAdapter */.A.getAdapter(e.adapter||a/* ["default"].adapter */.A.adapter,e);return t(e).then(function t(t){c(e);// Transform response data
t.data=n/* ["default"].call */.A.call(e,e.transformResponse,t);t.headers=s/* ["default"].from */.A.from(t.headers);return t},function t(t){if(!(0,i/* ["default"] */.A)(t)){c(e);// Transform response data
if(t&&t.response){t.response.data=n/* ["default"].call */.A.call(e,e.transformResponse,t.response);t.response.headers=s/* ["default"].from */.A.from(t.response.headers)}}return Promise.reject(t)})}},24295:function(e,t,r){"use strict";r.d(t,{A:()=>o});/* import */var n=r(93156);/* import */var i=r(78961);const a=e=>e instanceof i/* ["default"] */.A?{...e}:e;/**
 * Config-specific merge-function which creates a new config-object
 * by merging two configuration objects together.
 *
 * @param {Object} config1
 * @param {Object} config2
 *
 * @returns {Object} New object resulting from merging config2 to config1
 */function o(e,t){// eslint-disable-next-line no-param-reassign
t=t||{};const r={};function i(e,t,r,i){if(n/* ["default"].isPlainObject */.A.isPlainObject(e)&&n/* ["default"].isPlainObject */.A.isPlainObject(t)){return n/* ["default"].merge.call */.A.merge.call({caseless:i},e,t)}else if(n/* ["default"].isPlainObject */.A.isPlainObject(t)){return n/* ["default"].merge */.A.merge({},t)}else if(n/* ["default"].isArray */.A.isArray(t)){return t.slice()}return t}// eslint-disable-next-line consistent-return
function o(e,t,r,a){if(!n/* ["default"].isUndefined */.A.isUndefined(t)){return i(e,t,r,a)}else if(!n/* ["default"].isUndefined */.A.isUndefined(e)){return i(undefined,e,r,a)}}// eslint-disable-next-line consistent-return
function s(e,t){if(!n/* ["default"].isUndefined */.A.isUndefined(t)){return i(undefined,t)}}// eslint-disable-next-line consistent-return
function u(e,t){if(!n/* ["default"].isUndefined */.A.isUndefined(t)){return i(undefined,t)}else if(!n/* ["default"].isUndefined */.A.isUndefined(e)){return i(undefined,e)}}// eslint-disable-next-line consistent-return
function c(r,n,a){if(a in t){return i(r,n)}else if(a in e){return i(undefined,r)}}const l={url:s,method:s,data:s,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,withXSRFToken:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,beforeRedirect:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,responseEncoding:u,validateStatus:c,headers:(e,t,r)=>o(a(e),a(t),r,true)};n/* ["default"].forEach */.A.forEach(Object.keys({...e,...t}),function i(i){const a=l[i]||o;const s=a(e[i],t[i],i);n/* ["default"].isUndefined */.A.isUndefined(s)&&a!==c||(r[i]=s)});return r}},26058:function(e,t,r){"use strict";r.d(t,{A:()=>i});/* import */var n=r(13869);/**
 * Resolve or reject a Promise based on response status.
 *
 * @param {Function} resolve A function that resolves the promise.
 * @param {Function} reject A function that rejects the promise.
 * @param {object} response The response.
 *
 * @returns {object} The response.
 */function i(e,t,r){const i=r.config.validateStatus;if(!r.status||!i||i(r.status)){e(r)}else{t(new n/* ["default"] */.A("Request failed with status code "+r.status,[n/* ["default"].ERR_BAD_REQUEST */.A.ERR_BAD_REQUEST,n/* ["default"].ERR_BAD_RESPONSE */.A.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}}},31577:function(e,t,r){"use strict";r.d(t,{A:()=>o});/* import */var n=r(93156);/* import */var i=r(73468);/* import */var a=r(78961);/**
 * Transform the data for a request or a response
 *
 * @param {Array|Function} fns A single function or Array of functions
 * @param {?Object} response The response object
 *
 * @returns {*} The resulting transformed data
 */function o(e,t){const r=this||i/* ["default"] */.A;const o=t||r;const s=a/* ["default"].from */.A.from(o.headers);let u=o.data;n/* ["default"].forEach */.A.forEach(e,function e(e){u=e.call(r,u,s.normalize(),t?t.status:undefined)});s.normalize();return u}},73468:function(e,t,r){"use strict";r.d(t,{A:()=>f});/* import */var n=r(93156);/* import */var i=r(13869);/* import */var a=r(79976);/* import */var o=r(3536);/* import */var s=r(53165);/* import */var u=r(36545);/* import */var c=r(29426);/**
 * It takes a string, tries to parse it, and if it fails, it returns the stringified version
 * of the input
 *
 * @param {any} rawValue - The value to be stringified.
 * @param {Function} parser - A function that parses a string into a JavaScript object.
 * @param {Function} encoder - A function that takes a value and returns a string.
 *
 * @returns {string} A stringified version of the rawValue.
 */function l(e,t,r){if(n/* ["default"].isString */.A.isString(e)){try{(t||JSON.parse)(e);return n/* ["default"].trim */.A.trim(e)}catch(e){if(e.name!=="SyntaxError"){throw e}}}return(r||JSON.stringify)(e)}const d={transitional:a/* ["default"] */.A,adapter:["xhr","http","fetch"],transformRequest:[function e(e,t){const r=t.getContentType()||"";const i=r.indexOf("application/json")>-1;const a=n/* ["default"].isObject */.A.isObject(e);if(a&&n/* ["default"].isHTMLForm */.A.isHTMLForm(e)){e=new FormData(e)}const u=n/* ["default"].isFormData */.A.isFormData(e);if(u){return i?JSON.stringify((0,c/* ["default"] */.A)(e)):e}if(n/* ["default"].isArrayBuffer */.A.isArrayBuffer(e)||n/* ["default"].isBuffer */.A.isBuffer(e)||n/* ["default"].isStream */.A.isStream(e)||n/* ["default"].isFile */.A.isFile(e)||n/* ["default"].isBlob */.A.isBlob(e)||n/* ["default"].isReadableStream */.A.isReadableStream(e)){return e}if(n/* ["default"].isArrayBufferView */.A.isArrayBufferView(e)){return e.buffer}if(n/* ["default"].isURLSearchParams */.A.isURLSearchParams(e)){t.setContentType("application/x-www-form-urlencoded;charset=utf-8",false);return e.toString()}let d;if(a){if(r.indexOf("application/x-www-form-urlencoded")>-1){return(0,s/* ["default"] */.A)(e,this.formSerializer).toString()}if((d=n/* ["default"].isFileList */.A.isFileList(e))||r.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return(0,o/* ["default"] */.A)(d?{"files[]":e}:e,t&&new t,this.formSerializer)}}if(a||i){t.setContentType("application/json",false);return l(e)}return e}],transformResponse:[function e(e){const t=this.transitional||d.transitional;const r=t&&t.forcedJSONParsing;const a=this.responseType==="json";if(n/* ["default"].isResponse */.A.isResponse(e)||n/* ["default"].isReadableStream */.A.isReadableStream(e)){return e}if(e&&n/* ["default"].isString */.A.isString(e)&&(r&&!this.responseType||a)){const r=t&&t.silentJSONParsing;const n=!r&&a;try{return JSON.parse(e,this.parseReviver)}catch(e){if(n){if(e.name==="SyntaxError"){throw i/* ["default"].from */.A.from(e,i/* ["default"].ERR_BAD_RESPONSE */.A.ERR_BAD_RESPONSE,this,null,this.response)}throw e}}}return e}],/**
   * A timeout in milliseconds to abort a request. If set to 0 (default) a
   * timeout is not created.
   */timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:u/* ["default"].classes.FormData */.A.classes.FormData,Blob:u/* ["default"].classes.Blob */.A.classes.Blob},validateStatus:function e(e){return e>=200&&e<300},headers:{common:{"Accept":"application/json, text/plain, */*","Content-Type":undefined}}};n/* ["default"].forEach */.A.forEach(["delete","get","head","post","put","patch"],e=>{d.headers[e]={}});/* export default */const f=d},79976:function(e,t,r){"use strict";r.d(t,{A:()=>n});/* export default */const n={silentJSONParsing:true,forcedJSONParsing:true,clarifyTimeoutError:false}},42193:function(e,t,r){"use strict";r.d(t,{x:()=>n});const n="1.13.2"},61010:function(e,t,r){"use strict";r.d(t,{A:()=>s});/* import */var n=r(3536);/**
 * It encodes a string by replacing all characters that are not in the unreserved set with
 * their percent-encoded equivalents
 *
 * @param {string} str - The string to encode.
 *
 * @returns {string} The encoded string.
 */function i(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function e(e){return t[e]})}/**
 * It takes a params object and converts it to a FormData object
 *
 * @param {Object<string, any>} params - The parameters to be converted to a FormData object.
 * @param {Object<string, any>} options - The options object passed to the Axios constructor.
 *
 * @returns {void}
 */function a(e,t){this._pairs=[];e&&(0,n/* ["default"] */.A)(e,this,t)}const o=a.prototype;o.append=function e(e,t){this._pairs.push([e,t])};o.toString=function e(e){const t=e?function(t){return e.call(this,t,i)}:i;return this._pairs.map(function e(e){return t(e[0])+"="+t(e[1])},"").join("&")};/* export default */const s=a},70228:function(e,t,r){"use strict";r.d(t,{A:()=>i});const n={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,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(n).forEach(([e,t])=>{n[t]=e});/* export default */const i=n},10668:function(e,t,r){"use strict";r.d(t,{A:()=>n});/**
 * Create a bound version of a function with a specified `this` context
 *
 * @param {Function} fn - The function to bind
 * @param {*} thisArg - The value to be passed as the `this` parameter
 * @returns {Function} A new function that will call the original function with the specified `this` context
 */function n(e,t){return function r(){return e.apply(t,arguments)}}},49546:function(e,t,r){"use strict";r.d(t,{A:()=>o});/* import */var n=r(93156);/* import */var i=r(61010);/**
 * It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their
 * URI encoded counterparts
 *
 * @param {string} val The value to be encoded.
 *
 * @returns {string} The encoded value.
 */function a(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}/**
 * Build a URL by appending params to the end
 *
 * @param {string} url The base of the url (e.g., http://www.google.com)
 * @param {object} [params] The params to be appended
 * @param {?(object|Function)} options
 *
 * @returns {string} The formatted url
 */function o(e,t,r){/*eslint no-param-reassign:0*/if(!t){return e}const o=r&&r.encode||a;if(n/* ["default"].isFunction */.A.isFunction(r)){r={serialize:r}}const s=r&&r.serialize;let u;if(s){u=s(t,r)}else{u=n/* ["default"].isURLSearchParams */.A.isURLSearchParams(t)?t.toString():new i/* ["default"] */.A(t,r).toString(o)}if(u){const t=e.indexOf("#");if(t!==-1){e=e.slice(0,t)}e+=(e.indexOf("?")===-1?"?":"&")+u}return e}},12288:function(e,t,r){"use strict";r.d(t,{A:()=>n});/**
 * Creates a new URL by combining the specified URLs
 *
 * @param {string} baseURL The base URL
 * @param {string} relativeURL The relative URL
 *
 * @returns {string} The combined URL
 */function n(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}},42698:function(e,t,r){"use strict";r.d(t,{A:()=>s});/* import */var n=r(87963);/* import */var i=r(13869);/* import */var a=r(93156);const o=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let r=new AbortController;let o;const s=function(e){if(!o){o=true;c();const t=e instanceof Error?e:this.reason;r.abort(t instanceof i/* ["default"] */.A?t:new n/* ["default"] */.A(t instanceof Error?t.message:t))}};let u=t&&setTimeout(()=>{u=null;s(new i/* ["default"] */.A(`timeout ${t} of ms exceeded`,i/* ["default"].ETIMEDOUT */.A.ETIMEDOUT))},t);const c=()=>{if(e){u&&clearTimeout(u);u=null;e.forEach(e=>{e.unsubscribe?e.unsubscribe(s):e.removeEventListener("abort",s)});e=null}};e.forEach(e=>e.addEventListener("abort",s));const{signal:l}=r;l.unsubscribe=()=>a/* ["default"].asap */.A.asap(c);return l}};/* export default */const s=o},90596:function(e,t,r){"use strict";r.d(t,{A:()=>a});/* import */var n=r(93156);/* import */var i=r(36545);/* export default */const a=i/* ["default"].hasStandardBrowserEnv */.A.hasStandardBrowserEnv?// Standard browser envs support document.cookie
{write(e,t,r,i,a,o,s){if(typeof document==="undefined")return;const u=[`${e}=${encodeURIComponent(t)}`];if(n/* ["default"].isNumber */.A.isNumber(r)){u.push(`expires=${new Date(r).toUTCString()}`)}if(n/* ["default"].isString */.A.isString(i)){u.push(`path=${i}`)}if(n/* ["default"].isString */.A.isString(a)){u.push(`domain=${a}`)}if(o===true){u.push("secure")}if(n/* ["default"].isString */.A.isString(s)){u.push(`SameSite=${s}`)}document.cookie=u.join("; ")},read(e){if(typeof document==="undefined")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:// Non-standard browser env (web workers, react-native) lack needed support.
{write(){},read(){return null},remove(){}}},29426:function(e,t,r){"use strict";r.d(t,{A:()=>s});/* import */var n=r(93156);/**
 * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']
 *
 * @param {string} name - The name of the property to get.
 *
 * @returns An array of strings.
 */function i(e){// foo[x][y][z]
// foo.x.y.z
// foo-x-y-z
// foo x y z
return n/* ["default"].matchAll */.A.matchAll(/\w+|\[(\w*)]/g,e).map(e=>{return e[0]==="[]"?"":e[1]||e[0]})}/**
 * Convert an array to an object.
 *
 * @param {Array<any>} arr - The array to convert to an object.
 *
 * @returns An object with the same keys and values as the array.
 */function a(e){const t={};const r=Object.keys(e);let n;const i=r.length;let a;for(n=0;n<i;n++){a=r[n];t[a]=e[a]}return t}/**
 * It takes a FormData object and returns a JavaScript object
 *
 * @param {string} formData The FormData object to convert to JSON.
 *
 * @returns {Object<string, any> | null} The converted object.
 */function o(e){function t(e,r,i,o){let s=e[o++];if(s==="__proto__")return true;const u=Number.isFinite(+s);const c=o>=e.length;s=!s&&n/* ["default"].isArray */.A.isArray(i)?i.length:s;if(c){if(n/* ["default"].hasOwnProp */.A.hasOwnProp(i,s)){i[s]=[i[s],r]}else{i[s]=r}return!u}if(!i[s]||!n/* ["default"].isObject */.A.isObject(i[s])){i[s]=[]}const l=t(e,r,i[s],o);if(l&&n/* ["default"].isArray */.A.isArray(i[s])){i[s]=a(i[s])}return!u}if(n/* ["default"].isFormData */.A.isFormData(e)&&n/* ["default"].isFunction */.A.isFunction(e.entries)){const r={};n/* ["default"].forEachEntry */.A.forEachEntry(e,(e,n)=>{t(i(e),n,r,0)});return r}return null}/* export default */const s=o},85753:function(e,t,r){"use strict";r.d(t,{A:()=>n});/**
 * Determines whether the specified URL is absolute
 *
 * @param {string} url The URL to test
 *
 * @returns {boolean} True if the specified URL is absolute, otherwise false
 */function n(e){// A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL).
// RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
// by any combination of letters, digits, plus, period, or hyphen.
return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}},17155:function(e,t,r){"use strict";r.d(t,{A:()=>i});/* import */var n=r(93156);/**
 * Determines whether the payload is an error thrown by Axios
 *
 * @param {*} payload The value to test
 *
 * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false
 */function i(e){return n/* ["default"].isObject */.A.isObject(e)&&e.isAxiosError===true}},43298:function(e,t,r){"use strict";r.d(t,{A:()=>i});/* import */var n=r(36545);/* export default */const i=n/* ["default"].hasStandardBrowserEnv */.A.hasStandardBrowserEnv?((e,t)=>r=>{r=new URL(r,n/* ["default"].origin */.A.origin);return e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)})(new URL(n/* ["default"].origin */.A.origin),n/* ["default"].navigator */.A.navigator&&/(msie|trident)/i.test(n/* ["default"].navigator.userAgent */.A.navigator.userAgent)):()=>true},41606:function(e,t,r){"use strict";r.d(t,{A:()=>n});// eslint-disable-next-line strict
/* export default */const n=null},82596:function(e,t,r){"use strict";r.d(t,{A:()=>a});/* import */var n=r(93156);// RawAxiosHeaders whose duplicates are ignored by node
// c.f. https://nodejs.org/api/http.html#http_message_headers
const i=n/* ["default"].toObjectSet */.A.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"]);/**
 * Parse headers into an object
 *
 * ```
 * Date: Wed, 27 Aug 2014 08:58:49 GMT
 * Content-Type: application/json
 * Connection: keep-alive
 * Transfer-Encoding: chunked
 * ```
 *
 * @param {String} rawHeaders Headers needing to be parsed
 *
 * @returns {Object} Headers parsed into an object
 *//* export default */const a=e=>{const t={};let r;let n;let a;e&&e.split("\n").forEach(function e(e){a=e.indexOf(":");r=e.substring(0,a).trim().toLowerCase();n=e.substring(a+1).trim();if(!r||t[r]&&i[r]){return}if(r==="set-cookie"){if(t[r]){t[r].push(n)}else{t[r]=[n]}}else{t[r]=t[r]?t[r]+", "+n:n}});return t}},30656:function(e,t,r){"use strict";r.d(t,{A:()=>n});function n(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}},20320:function(e,t,r){"use strict";r.d(t,{C1:()=>o,Vj:()=>s,mM:()=>u});/* import */var n=r(6054);/* import */var i=r(48851);/* import */var a=r(93156);const o=(e,t,r=3)=>{let a=0;const o=(0,n/* ["default"] */.A)(50,250);return(0,i/* ["default"] */.A)(r=>{const n=r.loaded;const i=r.lengthComputable?r.total:undefined;const s=n-a;const u=o(s);const c=n<=i;a=n;const l={loaded:n,total:i,progress:i?n/i:undefined,bytes:s,rate:u?u:undefined,estimated:u&&i&&c?(i-n)/u:undefined,event:r,lengthComputable:i!=null,[t?"download":"upload"]:true};e(l)},r)};const s=(e,t)=>{const r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]};const u=e=>(...t)=>a/* ["default"].asap */.A.asap(()=>e(...t))},60517:function(e,t,r){"use strict";r.d(t,{A:()=>d});/* import */var n=r(36545);/* import */var i=r(93156);/* import */var a=r(43298);/* import */var o=r(90596);/* import */var s=r(76823);/* import */var u=r(24295);/* import */var c=r(78961);/* import */var l=r(49546);/* export default */const d=e=>{const t=(0,u/* ["default"] */.A)({},e);let{data:r,withXSRFToken:d,xsrfHeaderName:f,xsrfCookieName:p,headers:h,auth:v}=t;t.headers=h=c/* ["default"].from */.A.from(h);t.url=(0,l/* ["default"] */.A)((0,s/* ["default"] */.A)(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer);// HTTP basic authentication
if(v){h.set("Authorization","Basic "+btoa((v.username||"")+":"+(v.password?unescape(encodeURIComponent(v.password)):"")))}if(i/* ["default"].isFormData */.A.isFormData(r)){if(n/* ["default"].hasStandardBrowserEnv */.A.hasStandardBrowserEnv||n/* ["default"].hasStandardBrowserWebWorkerEnv */.A.hasStandardBrowserWebWorkerEnv){h.setContentType(undefined);// browser handles it
}else if(i/* ["default"].isFunction */.A.isFunction(r.getHeaders)){// Node.js FormData (like form-data package)
const e=r.getHeaders();// Only set safe headers to avoid overwriting security headers
const t=["content-type","content-length"];Object.entries(e).forEach(([e,r])=>{if(t.includes(e.toLowerCase())){h.set(e,r)}})}}// Add xsrf header
// This is only done if running in a standard browser environment.
// Specifically not if we're in a web worker, or react-native.
if(n/* ["default"].hasStandardBrowserEnv */.A.hasStandardBrowserEnv){d&&i/* ["default"].isFunction */.A.isFunction(d)&&(d=d(t));if(d||d!==false&&(0,a/* ["default"] */.A)(t.url)){// Add xsrf header
const e=f&&p&&o/* ["default"].read */.A.read(p);if(e){h.set(f,e)}}}return t}},6054:function(e,t,r){"use strict";r.d(t,{A:()=>i});/**
 * Calculate data maxRate
 * @param {Number} [samplesCount= 10]
 * @param {Number} [min= 1000]
 * @returns {Function}
 */function n(e,t){e=e||10;const r=new Array(e);const n=new Array(e);let i=0;let a=0;let o;t=t!==undefined?t:1e3;return function s(s){const u=Date.now();const c=n[a];if(!o){o=u}r[i]=s;n[i]=u;let l=a;let d=0;while(l!==i){d+=r[l++];l=l%e}i=(i+1)%e;if(i===a){a=(a+1)%e}if(u-o<t){return}const f=c&&u-c;return f?Math.round(d*1e3/f):undefined}}/* export default */const i=n},79988:function(e,t,r){"use strict";r.d(t,{A:()=>n});/**
 * Syntactic sugar for invoking a function and expanding an array for arguments.
 *
 * Common use case would be to use `Function.prototype.apply`.
 *
 *  ```js
 *  function f(x, y, z) {}
 *  var args = [1, 2, 3];
 *  f.apply(null, args);
 *  ```
 *
 * With `spread` this example can be re-written.
 *
 *  ```js
 *  spread(function(x, y, z) {})([1, 2, 3]);
 *  ```
 *
 * @param {Function} callback
 *
 * @returns {Function}
 */function n(e){return function t(t){return e.apply(null,t)}}},48851:function(e,t,r){"use strict";r.d(t,{A:()=>i});/**
 * Throttle decorator
 * @param {Function} fn
 * @param {Number} freq
 * @return {Function}
 */function n(e,t){let r=0;let n=1e3/t;let i;let a;const o=(t,n=Date.now())=>{r=n;i=null;if(a){clearTimeout(a);a=null}e(...t)};const s=(...e)=>{const t=Date.now();const s=t-r;if(s>=n){o(e,t)}else{i=e;if(!a){a=setTimeout(()=>{a=null;o(i)},n-s)}}};const u=()=>i&&o(i);return[s,u]}/* export default */const i=n},3536:function(e,t,r){"use strict";r.d(t,{A:()=>f});/* import */var n=r(93156);/* import */var i=r(13869);/* import */var a=r(41606);// temporary hotfix to avoid circular references until AxiosURLSearchParams is refactored
/**
 * Determines if the given thing is a array or js object.
 *
 * @param {string} thing - The object or array to be visited.
 *
 * @returns {boolean}
 */function o(e){return n/* ["default"].isPlainObject */.A.isPlainObject(e)||n/* ["default"].isArray */.A.isArray(e)}/**
 * It removes the brackets from the end of a string
 *
 * @param {string} key - The key of the parameter.
 *
 * @returns {string} the key without the brackets.
 */function s(e){return n/* ["default"].endsWith */.A.endsWith(e,"[]")?e.slice(0,-2):e}/**
 * It takes a path, a key, and a boolean, and returns a string
 *
 * @param {string} path - The path to the current key.
 * @param {string} key - The key of the current object being iterated over.
 * @param {string} dots - If true, the key will be rendered with dots instead of brackets.
 *
 * @returns {string} The path to the current key.
 */function u(e,t,r){if(!e)return t;return e.concat(t).map(function e(e,t){// eslint-disable-next-line no-param-reassign
e=s(e);return!r&&t?"["+e+"]":e}).join(r?".":"")}/**
 * If the array is an array and none of its elements are visitable, then it's a flat array.
 *
 * @param {Array<any>} arr - The array to check
 *
 * @returns {boolean}
 */function c(e){return n/* ["default"].isArray */.A.isArray(e)&&!e.some(o)}const l=n/* ["default"].toFlatObject */.A.toFlatObject(n/* ["default"] */.A,{},null,function e(e){return/^is[A-Z]/.test(e)});/**
 * Convert a data object to FormData
 *
 * @param {Object} obj
 * @param {?Object} [formData]
 * @param {?Object} [options]
 * @param {Function} [options.visitor]
 * @param {Boolean} [options.metaTokens = true]
 * @param {Boolean} [options.dots = false]
 * @param {?Boolean} [options.indexes = false]
 *
 * @returns {Object}
 **//**
 * It converts an object into a FormData object
 *
 * @param {Object<any, any>} obj - The object to convert to form data.
 * @param {string} formData - The FormData object to append to.
 * @param {Object<string, any>} options
 *
 * @returns
 */function d(e,t,r){if(!n/* ["default"].isObject */.A.isObject(e)){throw new TypeError("target must be an object")}// eslint-disable-next-line no-param-reassign
t=t||new(a/* ["default"] */.A||FormData);// eslint-disable-next-line no-param-reassign
r=n/* ["default"].toFlatObject */.A.toFlatObject(r,{metaTokens:true,dots:false,indexes:false},false,function e(e,t){// eslint-disable-next-line no-eq-null,eqeqeq
return!n/* ["default"].isUndefined */.A.isUndefined(t[e])});const d=r.metaTokens;// eslint-disable-next-line no-use-before-define
const f=r.visitor||b;const p=r.dots;const h=r.indexes;const v=r.Blob||typeof Blob!=="undefined"&&Blob;const m=v&&n/* ["default"].isSpecCompliantForm */.A.isSpecCompliantForm(t);if(!n/* ["default"].isFunction */.A.isFunction(f)){throw new TypeError("visitor must be a function")}function g(e){if(e===null)return"";if(n/* ["default"].isDate */.A.isDate(e)){return e.toISOString()}if(n/* ["default"].isBoolean */.A.isBoolean(e)){return e.toString()}if(!m&&n/* ["default"].isBlob */.A.isBlob(e)){throw new i/* ["default"] */.A("Blob is not supported. Use a Buffer instead.")}if(n/* ["default"].isArrayBuffer */.A.isArrayBuffer(e)||n/* ["default"].isTypedArray */.A.isTypedArray(e)){return m&&typeof Blob==="function"?new Blob([e]):Buffer.from(e)}return e}/**
   * Default visitor.
   *
   * @param {*} value
   * @param {String|Number} key
   * @param {Array<String|Number>} path
   * @this {FormData}
   *
   * @returns {boolean} return true to visit the each prop of the value recursively
   */function b(e,r,i){let a=e;if(e&&!i&&typeof e==="object"){if(n/* ["default"].endsWith */.A.endsWith(r,"{}")){// eslint-disable-next-line no-param-reassign
r=d?r:r.slice(0,-2);// eslint-disable-next-line no-param-reassign
e=JSON.stringify(e)}else if(n/* ["default"].isArray */.A.isArray(e)&&c(e)||(n/* ["default"].isFileList */.A.isFileList(e)||n/* ["default"].endsWith */.A.endsWith(r,"[]"))&&(a=n/* ["default"].toArray */.A.toArray(e))){// eslint-disable-next-line no-param-reassign
r=s(r);a.forEach(function e(e,i){!(n/* ["default"].isUndefined */.A.isUndefined(e)||e===null)&&t.append(// eslint-disable-next-line no-nested-ternary
h===true?u([r],i,p):h===null?r:r+"[]",g(e))});return false}}if(o(e)){return true}t.append(u(i,r,p),g(e));return false}const _=[];const y=Object.assign(l,{defaultVisitor:b,convertValue:g,isVisitable:o});function w(e,r){if(n/* ["default"].isUndefined */.A.isUndefined(e))return;if(_.indexOf(e)!==-1){throw Error("Circular reference detected in "+r.join("."))}_.push(e);n/* ["default"].forEach */.A.forEach(e,function e(e,i){const a=!(n/* ["default"].isUndefined */.A.isUndefined(e)||e===null)&&f.call(t,e,n/* ["default"].isString */.A.isString(i)?i.trim():i,r,y);if(a===true){w(e,r?r.concat(i):[i])}});_.pop()}if(!n/* ["default"].isObject */.A.isObject(e)){throw new TypeError("data must be an object")}w(e);return t}/* export default */const f=d},53165:function(e,t,r){"use strict";r.d(t,{A:()=>o});/* import */var n=r(93156);/* import */var i=r(3536);/* import */var a=r(36545);function o(e,t){return(0,i/* ["default"] */.A)(e,new a/* ["default"].classes.URLSearchParams */.A.classes.URLSearchParams,{visitor:function(e,t,r,i){if(a/* ["default"].isNode */.A.isNode&&n/* ["default"].isBuffer */.A.isBuffer(e)){this.append(t,e.toString("base64"));return false}return i.defaultVisitor.apply(this,arguments)},...t})}},96036:function(e,t,r){"use strict";r.d(t,{E9:()=>o});const n=function*(e,t){let r=e.byteLength;if(!t||r<t){yield e;return}let n=0;let i;while(n<r){i=n+t;yield e.slice(n,i);n=i}};const i=async function*(e,t){for await(const r of a(e)){yield*n(r,t)}};const a=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:e,value:r}=await t.read();if(e){break}yield r}}finally{await t.cancel()}};const o=(e,t,r,n)=>{const a=i(e,t);let o=0;let s;let u=e=>{if(!s){s=true;n&&n(e)}};return new ReadableStream({async pull(e){try{const{done:t,value:n}=await a.next();if(t){u();e.close();return}let i=n.byteLength;if(r){let e=o+=i;r(e)}e.enqueue(new Uint8Array(n))}catch(e){u(e);throw e}},cancel(e){u(e);return a.return()}},{highWaterMark:2})}},51825:function(e,t,r){"use strict";r.d(t,{A:()=>u});/* import */var n=r(42193);/* import */var i=r(13869);const a={};// eslint-disable-next-line func-names
["object","boolean","number","function","string","symbol"].forEach((e,t)=>{a[e]=function r(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const o={};/**
 * Transitional option validator
 *
 * @param {function|boolean?} validator - set to false if the transitional option has been removed
 * @param {string?} version - deprecated version / removed since version
 * @param {string?} message - some message with additional info
 *
 * @returns {function}
 */a.transitional=function e(e,t,r){function a(e,t){return"[Axios v"+n/* .VERSION */.x+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}// eslint-disable-next-line func-names
return(r,n,s)=>{if(e===false){throw new i/* ["default"] */.A(a(n," has been removed"+(t?" in "+t:"")),i/* ["default"].ERR_DEPRECATED */.A.ERR_DEPRECATED)}if(t&&!o[n]){o[n]=true;// eslint-disable-next-line no-console
console.warn(a(n," has been deprecated since v"+t+" and will be removed in the near future"))}return e?e(r,n,s):true}};a.spelling=function e(e){return(t,r)=>{// eslint-disable-next-line no-console
console.warn(`${r} is likely a misspelling of ${e}`);return true}};/**
 * Assert object's properties type
 *
 * @param {object} options
 * @param {object} schema
 * @param {boolean?} allowUnknown
 *
 * @returns {object}
 */function s(e,t,r){if(typeof e!=="object"){throw new i/* ["default"] */.A("options must be an object",i/* ["default"].ERR_BAD_OPTION_VALUE */.A.ERR_BAD_OPTION_VALUE)}const n=Object.keys(e);let a=n.length;while(a-- >0){const o=n[a];const s=t[o];if(s){const t=e[o];const r=t===undefined||s(t,o,e);if(r!==true){throw new i/* ["default"] */.A("option "+o+" must be "+r,i/* ["default"].ERR_BAD_OPTION_VALUE */.A.ERR_BAD_OPTION_VALUE)}continue}if(r!==true){throw new i/* ["default"] */.A("Unknown option "+o,i/* ["default"].ERR_BAD_OPTION */.A.ERR_BAD_OPTION)}}}/* export default */const u={assertOptions:s,validators:a}},43570:function(e,t,r){"use strict";r.d(t,{A:()=>n});/* export default */const n=typeof Blob!=="undefined"?Blob:null},50219:function(e,t,r){"use strict";r.d(t,{A:()=>n});/* export default */const n=typeof FormData!=="undefined"?FormData:null},44730:function(e,t,r){"use strict";r.d(t,{A:()=>i});/* import */var n=r(61010);/* export default */const i=typeof URLSearchParams!=="undefined"?URLSearchParams:n/* ["default"] */.A},99242:function(e,t,r){"use strict";r.d(t,{A:()=>o});/* import */var n=r(44730);/* import */var i=r(50219);/* import */var a=r(43570);/* export default */const o={isBrowser:true,classes:{URLSearchParams:n/* ["default"] */.A,FormData:i/* ["default"] */.A,Blob:a/* ["default"] */.A},protocols:["http","https","file","blob","url","data"]}},36586:function(e,t,r){"use strict";r.r(t);r.d(t,{hasBrowserEnv:()=>n,hasStandardBrowserEnv:()=>a,hasStandardBrowserWebWorkerEnv:()=>o,navigator:()=>i,origin:()=>s});const n=typeof window!=="undefined"&&typeof document!=="undefined";const i=typeof navigator==="object"&&navigator||undefined;/**
 * Determine if we're running in a standard browser environment
 *
 * This allows axios to run in a web worker, and react-native.
 * Both environments support XMLHttpRequest, but not fully standard globals.
 *
 * web workers:
 *  typeof window -> undefined
 *  typeof document -> undefined
 *
 * react-native:
 *  navigator.product -> 'ReactNative'
 * nativescript
 *  navigator.product -> 'NativeScript' or 'NS'
 *
 * @returns {boolean}
 */const a=n&&(!i||["ReactNative","NativeScript","NS"].indexOf(i.product)<0);/**
 * Determine if we're running in a standard browser webWorker environment
 *
 * Although the `isStandardBrowserEnv` method indicates that
 * `allows axios to run in a web worker`, the WebWorker will still be
 * filtered out due to its judgment standard
 * `typeof window !== 'undefined' && typeof document !== 'undefined'`.
 * This leads to a problem when axios post `FormData` in webWorker
 */const o=(()=>{return typeof WorkerGlobalScope!=="undefined"&&// eslint-disable-next-line no-undef
self instanceof WorkerGlobalScope&&typeof self.importScripts==="function"})();const s=n&&window.location.href||"http://localhost"},36545:function(e,t,r){"use strict";r.d(t,{A:()=>a});/* import */var n=r(99242);/* import */var i=r(36586);/* export default */const a={...i,...n/* ["default"] */.A}},93156:function(e,t,r){"use strict";r.d(t,{A:()=>ed});/* import */var n=r(10668);// utils is a library of generic helper functions non-specific to axios
const{toString:i}=Object.prototype;const{getPrototypeOf:a}=Object;const{iterator:o,toStringTag:s}=Symbol;const u=(e=>t=>{const r=i.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null));const c=e=>{e=e.toLowerCase();return t=>u(t)===e};const l=e=>t=>typeof t===e;/**
 * Determine if a value is an Array
 *
 * @param {Object} val The value to test
 *
 * @returns {boolean} True if value is an Array, otherwise false
 */const{isArray:d}=Array;/**
 * Determine if a value is undefined
 *
 * @param {*} val The value to test
 *
 * @returns {boolean} True if the value is undefined, otherwise false
 */const f=l("undefined");/**
 * Determine if a value is a Buffer
 *
 * @param {*} val The value to test
 *
 * @returns {boolean} True if value is a Buffer, otherwise false
 */function p(e){return e!==null&&!f(e)&&e.constructor!==null&&!f(e.constructor)&&g(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}/**
 * Determine if a value is an ArrayBuffer
 *
 * @param {*} val The value to test
 *
 * @returns {boolean} True if value is an ArrayBuffer, otherwise false
 */const h=c("ArrayBuffer");/**
 * Determine if a value is a view on an ArrayBuffer
 *
 * @param {*} val The value to test
 *
 * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false
 */function v(e){let t;if(typeof ArrayBuffer!=="undefined"&&ArrayBuffer.isView){t=ArrayBuffer.isView(e)}else{t=e&&e.buffer&&h(e.buffer)}return t}/**
 * Determine if a value is a String
 *
 * @param {*} val The value to test
 *
 * @returns {boolean} True if value is a String, otherwise false
 */const m=l("string");/**
 * Determine if a value is a Function
 *
 * @param {*} val The value to test
 * @returns {boolean} True if value is a Function, otherwise false
 */const g=l("function");/**
 * Determine if a value is a Number
 *
 * @param {*} val The value to test
 *
 * @returns {boolean} True if value is a Number, otherwise false
 */const b=l("number");/**
 * Determine if a value is an Object
 *
 * @param {*} thing The value to test
 *
 * @returns {boolean} True if value is an Object, otherwise false
 */const _=e=>e!==null&&typeof e==="object";/**
 * Determine if a value is a Boolean
 *
 * @param {*} thing The value to test
 * @returns {boolean} True if value is a Boolean, otherwise false
 */const y=e=>e===true||e===false;/**
 * Determine if a value is a plain Object
 *
 * @param {*} val The value to test
 *
 * @returns {boolean} True if value is a plain Object, otherwise false
 */const w=e=>{if(u(e)!=="object"){return false}const t=a(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(s in e)&&!(o in e)};/**
 * Determine if a value is an empty object (safely handles Buffers)
 *
 * @param {*} val The value to test
 *
 * @returns {boolean} True if value is an empty object, otherwise false
 */const A=e=>{// Early return for non-objects or Buffers to prevent RangeError
if(!_(e)||p(e)){return false}try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch(e){// Fallback for any other objects that might cause RangeError with Object.keys()
return false}};/**
 * Determine if a value is a Date
 *
 * @param {*} val The value to test
 *
 * @returns {boolean} True if value is a Date, otherwise false
 */const x=c("Date");/**
 * Determine if a value is a File
 *
 * @param {*} val The value to test
 *
 * @returns {boolean} True if value is a File, otherwise false
 */const E=c("File");/**
 * Determine if a value is a Blob
 *
 * @param {*} val The value to test
 *
 * @returns {boolean} True if value is a Blob, otherwise false
 */const O=c("Blob");/**
 * Determine if a value is a FileList
 *
 * @param {*} val The value to test
 *
 * @returns {boolean} True if value is a File, otherwise false
 */const S=c("FileList");/**
 * Determine if a value is a Stream
 *
 * @param {*} val The value to test
 *
 * @returns {boolean} True if value is a Stream, otherwise false
 */const T=e=>_(e)&&g(e.pipe);/**
 * Determine if a value is a FormData
 *
 * @param {*} thing The value to test
 *
 * @returns {boolean} True if value is an FormData, otherwise false
 */const k=e=>{let t;return e&&(typeof FormData==="function"&&e instanceof FormData||g(e.append)&&((t=u(e))==="formdata"||// detect form-data instance
t==="object"&&g(e.toString)&&e.toString()==="[object FormData]"))};/**
 * Determine if a value is a URLSearchParams object
 *
 * @param {*} val The value to test
 *
 * @returns {boolean} True if value is a URLSearchParams object, otherwise false
 */const C=c("URLSearchParams");const[I,R,D,P]=["ReadableStream","Request","Response","Headers"].map(c);/**
 * Trim excess whitespace off the beginning and end of a string
 *
 * @param {String} str The String to trim
 *
 * @returns {String} The String freed of excess whitespace
 */const M=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");/**
 * Iterate over an Array or an Object invoking a function for each item.
 *
 * If `obj` is an Array callback will be called passing
 * the value, index, and complete array for each item.
 *
 * If 'obj' is an Object callback will be called passing
 * the value, key, and complete object for each property.
 *
 * @param {Object|Array} obj The object to iterate
 * @param {Function} fn The callback to invoke for each item
 *
 * @param {Boolean} [allOwnKeys = false]
 * @returns {any}
 */function F(e,t,{allOwnKeys:r=false}={}){// Don't bother if no value provided
if(e===null||typeof e==="undefined"){return}let n;let i;// Force an array if not already something iterable
if(typeof e!=="object"){/*eslint no-param-reassign:0*/e=[e]}if(d(e)){// Iterate over array values
for(n=0,i=e.length;n<i;n++){t.call(null,e[n],n,e)}}else{// Buffer check
if(p(e)){return}// Iterate over object keys
const i=r?Object.getOwnPropertyNames(e):Object.keys(e);const a=i.length;let o;for(n=0;n<a;n++){o=i[n];t.call(null,e[o],o,e)}}}function Y(e,t){if(p(e)){return null}t=t.toLowerCase();const r=Object.keys(e);let n=r.length;let i;while(n-- >0){i=r[n];if(t===i.toLowerCase()){return i}}return null}const L=(()=>{/*eslint no-undef:0*/if(typeof globalThis!=="undefined")return globalThis;return typeof self!=="undefined"?self:typeof window!=="undefined"?window:global})();const N=e=>!f(e)&&e!==L;/**
 * Accepts varargs expecting each argument to be an object, then
 * immutably merges the properties of each object and returns result.
 *
 * When multiple objects contain the same key the later object in
 * the arguments list will take precedence.
 *
 * Example:
 *
 * ```js
 * var result = merge({foo: 123}, {foo: 456});
 * console.log(result.foo); // outputs 456
 * ```
 *
 * @param {Object} obj1 Object to merge
 *
 * @returns {Object} Result of all merge properties
 */function H(){const{caseless:e,skipUndefined:t}=N(this)&&this||{};const r={};const n=(n,i)=>{const a=e&&Y(r,i)||i;if(w(r[a])&&w(n)){r[a]=H(r[a],n)}else if(w(n)){r[a]=H({},n)}else if(d(n)){r[a]=n.slice()}else if(!t||!f(n)){r[a]=n}};for(let e=0,t=arguments.length;e<t;e++){arguments[e]&&F(arguments[e],n)}return r}/**
 * Extends object a by mutably adding to it the properties of object b.
 *
 * @param {Object} a The object to be extended
 * @param {Object} b The object to copy properties from
 * @param {Object} thisArg The object to bind function to
 *
 * @param {Boolean} [allOwnKeys]
 * @returns {Object} The resulting value of object a
 */const j=(e,t,r,{allOwnKeys:i}={})=>{F(t,(t,i)=>{if(r&&g(t)){e[i]=(0,n/* ["default"] */.A)(t,r)}else{e[i]=t}},{allOwnKeys:i});return e};/**
 * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)
 *
 * @param {string} content with BOM
 *
 * @returns {string} content value without BOM
 */const U=e=>{if(e.charCodeAt(0)===65279){e=e.slice(1)}return e};/**
 * Inherit the prototype methods from one constructor into another
 * @param {function} constructor
 * @param {function} superConstructor
 * @param {object} [props]
 * @param {object} [descriptors]
 *
 * @returns {void}
 */const B=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n);e.prototype.constructor=e;Object.defineProperty(e,"super",{value:t.prototype});r&&Object.assign(e.prototype,r)};/**
 * Resolve object with deep prototype chain to a flat object
 * @param {Object} sourceObj source object
 * @param {Object} [destObj]
 * @param {Function|Boolean} [filter]
 * @param {Function} [propFilter]
 *
 * @returns {Object}
 */const K=(e,t,r,n)=>{let i;let o;let s;const u={};t=t||{};// eslint-disable-next-line no-eq-null,eqeqeq
if(e==null)return t;do{i=Object.getOwnPropertyNames(e);o=i.length;while(o-- >0){s=i[o];if((!n||n(s,e,t))&&!u[s]){t[s]=e[s];u[s]=true}}e=r!==false&&a(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype)return t};/**
 * Determines whether a string ends with the characters of a specified string
 *
 * @param {String} str
 * @param {String} searchString
 * @param {Number} [position= 0]
 *
 * @returns {boolean}
 */const z=(e,t,r)=>{e=String(e);if(r===undefined||r>e.length){r=e.length}r-=t.length;const n=e.indexOf(t,r);return n!==-1&&n===r};/**
 * Returns new array from array like object or null if failed
 *
 * @param {*} [thing]
 *
 * @returns {?Array}
 */const q=e=>{if(!e)return null;if(d(e))return e;let t=e.length;if(!b(t))return null;const r=new Array(t);while(t-- >0){r[t]=e[t]}return r};/**
 * Checking if the Uint8Array exists and if it does, it returns a function that checks if the
 * thing passed in is an instance of Uint8Array
 *
 * @param {TypedArray}
 *
 * @returns {Array}
 */// eslint-disable-next-line func-names
const V=(e=>{// eslint-disable-next-line func-names
return t=>{return e&&t instanceof e}})(typeof Uint8Array!=="undefined"&&a(Uint8Array));/**
 * For each entry in the object, call the function with the key and value.
 *
 * @param {Object<any, any>} obj - The object to iterate over.
 * @param {Function} fn - The function to call for each entry.
 *
 * @returns {void}
 */const W=(e,t)=>{const r=e&&e[o];const n=r.call(e);let i;while((i=n.next())&&!i.done){const r=i.value;t.call(e,r[0],r[1])}};/**
 * It takes a regular expression and a string, and returns an array of all the matches
 *
 * @param {string} regExp - The regular expression to match against.
 * @param {string} str - The string to search.
 *
 * @returns {Array<boolean>}
 */const G=(e,t)=>{let r;const n=[];while((r=e.exec(t))!==null){n.push(r)}return n};/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */const $=c("HTMLFormElement");const Q=e=>{return e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function e(e,t,r){return t.toUpperCase()+r})};/* Creating a function that will check if an object has a property. */const X=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype);/**
 * Determine if a value is a RegExp object
 *
 * @param {*} val The value to test
 *
 * @returns {boolean} True if value is a RegExp object, otherwise false
 */const J=c("RegExp");const Z=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e);const n={};F(r,(r,i)=>{let a;if((a=t(r,i,e))!==false){n[i]=a||r}});Object.defineProperties(e,n)};/**
 * Makes all methods read-only
 * @param {Object} obj
 */const ee=e=>{Z(e,(t,r)=>{// skip restricted props in strict mode
if(g(e)&&["arguments","caller","callee"].indexOf(r)!==-1){return false}const n=e[r];if(!g(n))return;t.enumerable=false;if("writable"in t){t.writable=false;return}if(!t.set){t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")}}})};const et=(e,t)=>{const r={};const n=e=>{e.forEach(e=>{r[e]=true})};d(e)?n(e):n(String(e).split(t));return r};const er=()=>{};const en=(e,t)=>{return e!=null&&Number.isFinite(e=+e)?e:t};/**
 * If the thing is a FormData object, return true, otherwise return false.
 *
 * @param {unknown} thing - The thing to check.
 *
 * @returns {boolean}
 */function ei(e){return!!(e&&g(e.append)&&e[s]==="FormData"&&e[o])}const ea=e=>{const t=new Array(10);const r=(e,n)=>{if(_(e)){if(t.indexOf(e)>=0){return}//Buffer check
if(p(e)){return e}if(!("toJSON"in e)){t[n]=e;const i=d(e)?[]:{};F(e,(e,t)=>{const a=r(e,n+1);!f(a)&&(i[t]=a)});t[n]=undefined;return i}}return e};return r(e,0)};const eo=c("AsyncFunction");const es=e=>e&&(_(e)||g(e))&&g(e.then)&&g(e.catch);// original code
// https://github.com/DigitalBrainJS/AxiosPromise/blob/16deab13710ec09779922131f3fa5954320f83ab/lib/utils.js#L11-L34
const eu=((e,t)=>{if(e){return setImmediate}return t?((e,t)=>{L.addEventListener("message",({source:r,data:n})=>{if(r===L&&n===e){t.length&&t.shift()()}},false);return r=>{t.push(r);L.postMessage(e,"*")}})(`axios@${Math.random()}`,[]):e=>setTimeout(e)})(typeof setImmediate==="function",g(L.postMessage));const ec=typeof queueMicrotask!=="undefined"?queueMicrotask.bind(L):typeof process!=="undefined"&&process.nextTick||eu;// *********************
const el=e=>e!=null&&g(e[o]);/* export default */const ed={isArray:d,isArrayBuffer:h,isBuffer:p,isFormData:k,isArrayBufferView:v,isString:m,isNumber:b,isBoolean:y,isObject:_,isPlainObject:w,isEmptyObject:A,isReadableStream:I,isRequest:R,isResponse:D,isHeaders:P,isUndefined:f,isDate:x,isFile:E,isBlob:O,isRegExp:J,isFunction:g,isStream:T,isURLSearchParams:C,isTypedArray:V,isFileList:S,forEach:F,merge:H,extend:j,trim:M,stripBOM:U,inherits:B,toFlatObject:K,kindOf:u,kindOfTest:c,endsWith:z,toArray:q,forEachEntry:W,matchAll:G,isHTMLForm:$,hasOwnProperty:X,hasOwnProp:X,reduceDescriptors:Z,freezeMethods:ee,toObjectSet:et,toCamelCase:Q,noop:er,toFiniteNumber:en,findKey:Y,global:L,isContextDefined:N,isSpecCompliantForm:ei,toJSONObject:ea,isAsyncFn:eo,isThenable:es,setImmediate:eu,asap:ec,isIterable:el}},11346:function(e,t,r){"use strict";r.d(t,{F:()=>n});function n(e,t){const r=e<0?"-":"";const n=Math.abs(e).toString().padStart(t,"0");return r+n}},87411:function(e,t,r){"use strict";r.d(t,{q:()=>i});let n={};function i(){return n}function a(e){n=e}},76267:function(e,t,r){"use strict";r.d(t,{_:()=>d});/* import */var n=r(70621);/* import */var i=r(72642);/* import */var a=r(39199);/* import */var o=r(62311);/* import */var s=r(68178);/* import */var u=r(11346);/* import */var c=r(94365);const l={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"};/*
 * |     | Unit                           |     | Unit                           |
 * |-----|--------------------------------|-----|--------------------------------|
 * |  a  | AM, PM                         |  A* | Milliseconds in day            |
 * |  b  | AM, PM, noon, midnight         |  B  | Flexible day period            |
 * |  c  | Stand-alone local day of week  |  C* | Localized hour w/ day period   |
 * |  d  | Day of month                   |  D  | Day of year                    |
 * |  e  | Local day of week              |  E  | Day of week                    |
 * |  f  |                                |  F* | Day of week in month           |
 * |  g* | Modified Julian day            |  G  | Era                            |
 * |  h  | Hour [1-12]                    |  H  | Hour [0-23]                    |
 * |  i! | ISO day of week                |  I! | ISO week of year               |
 * |  j* | Localized hour w/ day period   |  J* | Localized hour w/o day period  |
 * |  k  | Hour [1-24]                    |  K  | Hour [0-11]                    |
 * |  l* | (deprecated)                   |  L  | Stand-alone month              |
 * |  m  | Minute                         |  M  | Month                          |
 * |  n  |                                |  N  |                                |
 * |  o! | Ordinal number modifier        |  O  | Timezone (GMT)                 |
 * |  p! | Long localized time            |  P! | Long localized date            |
 * |  q  | Stand-alone quarter            |  Q  | Quarter                        |
 * |  r* | Related Gregorian year         |  R! | ISO week-numbering year        |
 * |  s  | Second                         |  S  | Fraction of second             |
 * |  t! | Seconds timestamp              |  T! | Milliseconds timestamp         |
 * |  u  | Extended year                  |  U* | Cyclic year                    |
 * |  v* | Timezone (generic non-locat.)  |  V* | Timezone (location)            |
 * |  w  | Local week of year             |  W* | Week of month                  |
 * |  x  | Timezone (ISO-8601 w/o Z)      |  X  | Timezone (ISO-8601)            |
 * |  y  | Year (abs)                     |  Y  | Local week-numbering year      |
 * |  z  | Timezone (specific non-locat.) |  Z* | Timezone (aliases)             |
 *
 * Letters marked by * are not implemented but reserved by Unicode standard.
 *
 * Letters marked by ! are non-standard, but implemented by date-fns:
 * - `o` modifies the previous token to turn it into an ordinal (see `format` docs)
 * - `i` is ISO day of week. For `i` and `ii` is returns numeric ISO week days,
 *   i.e. 7 for Sunday, 1 for Monday, etc.
 * - `I` is ISO week of year, as opposed to `w` which is local week of year.
 * - `R` is ISO week-numbering year, as opposed to `Y` which is local week-numbering year.
 *   `R` is supposed to be used in conjunction with `I` and `i`
 *   for universal ISO week-numbering date, whereas
 *   `Y` is supposed to be used in conjunction with `w` and `e`
 *   for week-numbering date specific to the locale.
 * - `P` is long localized date format
 * - `p` is long localized time format
 */const d={// Era
G:function(e,t,r){const n=e.getFullYear()>0?1:0;switch(t){// AD, BC
case"G":case"GG":case"GGG":return r.era(n,{width:"abbreviated"});// A, B
case"GGGGG":return r.era(n,{width:"narrow"});// Anno Domini, Before Christ
case"GGGG":default:return r.era(n,{width:"wide"})}},// Year
y:function(e,t,r){// Ordinal number
if(t==="yo"){const t=e.getFullYear();// Returns 1 for 1 BC (which is year 0 in JavaScript)
const n=t>0?t:1-t;return r.ordinalNumber(n,{unit:"year"})}return c/* .lightFormatters.y */.C.y(e,t)},// Local week-numbering year
Y:function(e,t,r,n){const i=(0,s/* .getWeekYear */.h)(e,n);// Returns 1 for 1 BC (which is year 0 in JavaScript)
const a=i>0?i:1-i;// Two digit year
if(t==="YY"){const e=a%100;return(0,u/* .addLeadingZeros */.F)(e,2)}// Ordinal number
if(t==="Yo"){return r.ordinalNumber(a,{unit:"year"})}// Padding
return(0,u/* .addLeadingZeros */.F)(a,t.length)},// ISO week-numbering year
R:function(e,t){const r=(0,a/* .getISOWeekYear */.p)(e);// Padding
return(0,u/* .addLeadingZeros */.F)(r,t.length)},// Extended year. This is a single number designating the year of this calendar system.
// The main difference between `y` and `u` localizers are B.C. years:
// | Year | `y` | `u` |
// |------|-----|-----|
// | AC 1 |   1 |   1 |
// | BC 1 |   1 |   0 |
// | BC 2 |   2 |  -1 |
// Also `yy` always returns the last two digits of a year,
// while `uu` pads single digit years to 2 characters and returns other years unchanged.
u:function(e,t){const r=e.getFullYear();return(0,u/* .addLeadingZeros */.F)(r,t.length)},// Quarter
Q:function(e,t,r){const n=Math.ceil((e.getMonth()+1)/3);switch(t){// 1, 2, 3, 4
case"Q":return String(n);// 01, 02, 03, 04
case"QQ":return(0,u/* .addLeadingZeros */.F)(n,2);// 1st, 2nd, 3rd, 4th
case"Qo":return r.ordinalNumber(n,{unit:"quarter"});// Q1, Q2, Q3, Q4
case"QQQ":return r.quarter(n,{width:"abbreviated",context:"formatting"});// 1, 2, 3, 4 (narrow quarter; could be not numerical)
case"QQQQQ":return r.quarter(n,{width:"narrow",context:"formatting"});// 1st quarter, 2nd quarter, ...
case"QQQQ":default:return r.quarter(n,{width:"wide",context:"formatting"})}},// Stand-alone quarter
q:function(e,t,r){const n=Math.ceil((e.getMonth()+1)/3);switch(t){// 1, 2, 3, 4
case"q":return String(n);// 01, 02, 03, 04
case"qq":return(0,u/* .addLeadingZeros */.F)(n,2);// 1st, 2nd, 3rd, 4th
case"qo":return r.ordinalNumber(n,{unit:"quarter"});// Q1, Q2, Q3, Q4
case"qqq":return r.quarter(n,{width:"abbreviated",context:"standalone"});// 1, 2, 3, 4 (narrow quarter; could be not numerical)
case"qqqqq":return r.quarter(n,{width:"narrow",context:"standalone"});// 1st quarter, 2nd quarter, ...
case"qqqq":default:return r.quarter(n,{width:"wide",context:"standalone"})}},// Month
M:function(e,t,r){const n=e.getMonth();switch(t){case"M":case"MM":return c/* .lightFormatters.M */.C.M(e,t);// 1st, 2nd, ..., 12th
case"Mo":return r.ordinalNumber(n+1,{unit:"month"});// Jan, Feb, ..., Dec
case"MMM":return r.month(n,{width:"abbreviated",context:"formatting"});// J, F, ..., D
case"MMMMM":return r.month(n,{width:"narrow",context:"formatting"});// January, February, ..., December
case"MMMM":default:return r.month(n,{width:"wide",context:"formatting"})}},// Stand-alone month
L:function(e,t,r){const n=e.getMonth();switch(t){// 1, 2, ..., 12
case"L":return String(n+1);// 01, 02, ..., 12
case"LL":return(0,u/* .addLeadingZeros */.F)(n+1,2);// 1st, 2nd, ..., 12th
case"Lo":return r.ordinalNumber(n+1,{unit:"month"});// Jan, Feb, ..., Dec
case"LLL":return r.month(n,{width:"abbreviated",context:"standalone"});// J, F, ..., D
case"LLLLL":return r.month(n,{width:"narrow",context:"standalone"});// January, February, ..., December
case"LLLL":default:return r.month(n,{width:"wide",context:"standalone"})}},// Local week of year
w:function(e,t,r,n){const i=(0,o/* .getWeek */.N)(e,n);if(t==="wo"){return r.ordinalNumber(i,{unit:"week"})}return(0,u/* .addLeadingZeros */.F)(i,t.length)},// ISO week of year
I:function(e,t,r){const n=(0,i/* .getISOWeek */.s)(e);if(t==="Io"){return r.ordinalNumber(n,{unit:"week"})}return(0,u/* .addLeadingZeros */.F)(n,t.length)},// Day of the month
d:function(e,t,r){if(t==="do"){return r.ordinalNumber(e.getDate(),{unit:"date"})}return c/* .lightFormatters.d */.C.d(e,t)},// Day of year
D:function(e,t,r){const i=(0,n/* .getDayOfYear */.F)(e);if(t==="Do"){return r.ordinalNumber(i,{unit:"dayOfYear"})}return(0,u/* .addLeadingZeros */.F)(i,t.length)},// Day of week
E:function(e,t,r){const n=e.getDay();switch(t){// Tue
case"E":case"EE":case"EEE":return r.day(n,{width:"abbreviated",context:"formatting"});// T
case"EEEEE":return r.day(n,{width:"narrow",context:"formatting"});// Tu
case"EEEEEE":return r.day(n,{width:"short",context:"formatting"});// Tuesday
case"EEEE":default:return r.day(n,{width:"wide",context:"formatting"})}},// Local day of week
e:function(e,t,r,n){const i=e.getDay();const a=(i-n.weekStartsOn+8)%7||7;switch(t){// Numerical value (Nth day of week with current locale or weekStartsOn)
case"e":return String(a);// Padded numerical value
case"ee":return(0,u/* .addLeadingZeros */.F)(a,2);// 1st, 2nd, ..., 7th
case"eo":return r.ordinalNumber(a,{unit:"day"});case"eee":return r.day(i,{width:"abbreviated",context:"formatting"});// T
case"eeeee":return r.day(i,{width:"narrow",context:"formatting"});// Tu
case"eeeeee":return r.day(i,{width:"short",context:"formatting"});// Tuesday
case"eeee":default:return r.day(i,{width:"wide",context:"formatting"})}},// Stand-alone local day of week
c:function(e,t,r,n){const i=e.getDay();const a=(i-n.weekStartsOn+8)%7||7;switch(t){// Numerical value (same as in `e`)
case"c":return String(a);// Padded numerical value
case"cc":return(0,u/* .addLeadingZeros */.F)(a,t.length);// 1st, 2nd, ..., 7th
case"co":return r.ordinalNumber(a,{unit:"day"});case"ccc":return r.day(i,{width:"abbreviated",context:"standalone"});// T
case"ccccc":return r.day(i,{width:"narrow",context:"standalone"});// Tu
case"cccccc":return r.day(i,{width:"short",context:"standalone"});// Tuesday
case"cccc":default:return r.day(i,{width:"wide",context:"standalone"})}},// ISO day of week
i:function(e,t,r){const n=e.getDay();const i=n===0?7:n;switch(t){// 2
case"i":return String(i);// 02
case"ii":return(0,u/* .addLeadingZeros */.F)(i,t.length);// 2nd
case"io":return r.ordinalNumber(i,{unit:"day"});// Tue
case"iii":return r.day(n,{width:"abbreviated",context:"formatting"});// T
case"iiiii":return r.day(n,{width:"narrow",context:"formatting"});// Tu
case"iiiiii":return r.day(n,{width:"short",context:"formatting"});// Tuesday
case"iiii":default:return r.day(n,{width:"wide",context:"formatting"})}},// AM or PM
a:function(e,t,r){const n=e.getHours();const i=n/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},// AM, PM, midnight, noon
b:function(e,t,r){const n=e.getHours();let i;if(n===12){i=l.noon}else if(n===0){i=l.midnight}else{i=n/12>=1?"pm":"am"}switch(t){case"b":case"bb":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},// in the morning, in the afternoon, in the evening, at night
B:function(e,t,r){const n=e.getHours();let i;if(n>=17){i=l.evening}else if(n>=12){i=l.afternoon}else if(n>=4){i=l.morning}else{i=l.night}switch(t){case"B":case"BB":case"BBB":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},// Hour [1-12]
h:function(e,t,r){if(t==="ho"){let t=e.getHours()%12;if(t===0)t=12;return r.ordinalNumber(t,{unit:"hour"})}return c/* .lightFormatters.h */.C.h(e,t)},// Hour [0-23]
H:function(e,t,r){if(t==="Ho"){return r.ordinalNumber(e.getHours(),{unit:"hour"})}return c/* .lightFormatters.H */.C.H(e,t)},// Hour [0-11]
K:function(e,t,r){const n=e.getHours()%12;if(t==="Ko"){return r.ordinalNumber(n,{unit:"hour"})}return(0,u/* .addLeadingZeros */.F)(n,t.length)},// Hour [1-24]
k:function(e,t,r){let n=e.getHours();if(n===0)n=24;if(t==="ko"){return r.ordinalNumber(n,{unit:"hour"})}return(0,u/* .addLeadingZeros */.F)(n,t.length)},// Minute
m:function(e,t,r){if(t==="mo"){return r.ordinalNumber(e.getMinutes(),{unit:"minute"})}return c/* .lightFormatters.m */.C.m(e,t)},// Second
s:function(e,t,r){if(t==="so"){return r.ordinalNumber(e.getSeconds(),{unit:"second"})}return c/* .lightFormatters.s */.C.s(e,t)},// Fraction of second
S:function(e,t){return c/* .lightFormatters.S */.C.S(e,t)},// Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
X:function(e,t,r){const n=e.getTimezoneOffset();if(n===0){return"Z"}switch(t){// Hours and optional minutes
case"X":return p(n);// Hours, minutes and optional seconds without `:` delimiter
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
// so this token always has the same output as `XX`
case"XXXX":case"XX":return h(n);// Hours, minutes and optional seconds with `:` delimiter
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
// so this token always has the same output as `XXX`
case"XXXXX":case"XXX":default:return h(n,":")}},// Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
x:function(e,t,r){const n=e.getTimezoneOffset();switch(t){// Hours and optional minutes
case"x":return p(n);// Hours, minutes and optional seconds without `:` delimiter
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
// so this token always has the same output as `xx`
case"xxxx":case"xx":return h(n);// Hours, minutes and optional seconds with `:` delimiter
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
// so this token always has the same output as `xxx`
case"xxxxx":case"xxx":default:return h(n,":")}},// Timezone (GMT)
O:function(e,t,r){const n=e.getTimezoneOffset();switch(t){// Short
case"O":case"OO":case"OOO":return"GMT"+f(n,":");// Long
case"OOOO":default:return"GMT"+h(n,":")}},// Timezone (specific non-location)
z:function(e,t,r){const n=e.getTimezoneOffset();switch(t){// Short
case"z":case"zz":case"zzz":return"GMT"+f(n,":");// Long
case"zzzz":default:return"GMT"+h(n,":")}},// Seconds timestamp
t:function(e,t,r){const n=Math.trunc(+e/1e3);return(0,u/* .addLeadingZeros */.F)(n,t.length)},// Milliseconds timestamp
T:function(e,t,r){return(0,u/* .addLeadingZeros */.F)(+e,t.length)}};function f(e,t=""){const r=e>0?"-":"+";const n=Math.abs(e);const i=Math.trunc(n/60);const a=n%60;if(a===0){return r+String(i)}return r+String(i)+t+(0,u/* .addLeadingZeros */.F)(a,2)}function p(e,t){if(e%60===0){const t=e>0?"-":"+";return t+(0,u/* .addLeadingZeros */.F)(Math.abs(e)/60,2)}return h(e,t)}function h(e,t=""){const r=e>0?"-":"+";const n=Math.abs(e);const i=(0,u/* .addLeadingZeros */.F)(Math.trunc(n/60),2);const a=(0,u/* .addLeadingZeros */.F)(n%60,2);return r+i+t+a}},94365:function(e,t,r){"use strict";r.d(t,{C:()=>i});/* import */var n=r(11346);/*
 * |     | Unit                           |     | Unit                           |
 * |-----|--------------------------------|-----|--------------------------------|
 * |  a  | AM, PM                         |  A* |                                |
 * |  d  | Day of month                   |  D  |                                |
 * |  h  | Hour [1-12]                    |  H  | Hour [0-23]                    |
 * |  m  | Minute                         |  M  | Month                          |
 * |  s  | Second                         |  S  | Fraction of second             |
 * |  y  | Year (abs)                     |  Y  |                                |
 *
 * Letters marked by * are not implemented but reserved by Unicode standard.
 */const i={// Year
y(e,t){// From http://www.unicode.org/reports/tr35/tr35-31/tr35-dates.html#Date_Format_tokens
// | Year     |     y | yy |   yyy |  yyyy | yyyyy |
// |----------|-------|----|-------|-------|-------|
// | AD 1     |     1 | 01 |   001 |  0001 | 00001 |
// | AD 12    |    12 | 12 |   012 |  0012 | 00012 |
// | AD 123   |   123 | 23 |   123 |  0123 | 00123 |
// | AD 1234  |  1234 | 34 |  1234 |  1234 | 01234 |
// | AD 12345 | 12345 | 45 | 12345 | 12345 | 12345 |
const r=e.getFullYear();// Returns 1 for 1 BC (which is year 0 in JavaScript)
const i=r>0?r:1-r;return(0,n/* .addLeadingZeros */.F)(t==="yy"?i%100:i,t.length)},// Month
M(e,t){const r=e.getMonth();return t==="M"?String(r+1):(0,n/* .addLeadingZeros */.F)(r+1,2)},// Day of the month
d(e,t){return(0,n/* .addLeadingZeros */.F)(e.getDate(),t.length)},// AM or PM
a(e,t){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];case"aaaa":default:return r==="am"?"a.m.":"p.m."}},// Hour [1-12]
h(e,t){return(0,n/* .addLeadingZeros */.F)(e.getHours()%12||12,t.length)},// Hour [0-23]
H(e,t){return(0,n/* .addLeadingZeros */.F)(e.getHours(),t.length)},// Minute
m(e,t){return(0,n/* .addLeadingZeros */.F)(e.getMinutes(),t.length)},// Second
s(e,t){return(0,n/* .addLeadingZeros */.F)(e.getSeconds(),t.length)},// Fraction of second
S(e,t){const r=t.length;const i=e.getMilliseconds();const a=Math.trunc(i*Math.pow(10,r-3));return(0,n/* .addLeadingZeros */.F)(a,t.length)}}},14029:function(e,t,r){"use strict";r.d(t,{m:()=>o});const n=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}};const i=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}};const a=(e,t)=>{const r=e.match(/(P+)(p+)?/)||[];const a=r[1];const o=r[2];if(!o){return n(e,t)}let s;switch(a){case"P":s=t.dateTime({width:"short"});break;case"PP":s=t.dateTime({width:"medium"});break;case"PPP":s=t.dateTime({width:"long"});break;case"PPPP":default:s=t.dateTime({width:"full"});break}return s.replace("{{date}}",n(a,t)).replace("{{time}}",i(o,t))};const o={p:i,P:a}},12093:function(e,t,r){"use strict";r.d(t,{G:()=>i});/* import */var n=r(84350);/**
 * Google Chrome as of 67.0.3396.87 introduced timezones with offset that includes seconds.
 * They usually appear for dates that denote time before the timezones were introduced
 * (e.g. for 'Europe/Prague' timezone the offset is GMT+00:57:44 before 1 October 1891
 * and GMT+01:00:00 after that date)
 *
 * Date#getTimezoneOffset returns the offset in minutes and would return 57 for the example above,
 * which would lead to incorrect calculations.
 *
 * This function returns the timezone offset in milliseconds that takes seconds in account.
 */function i(e){const t=(0,n/* .toDate */.a)(e);const r=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));r.setUTCFullYear(t.getFullYear());return+e-+r}},75518:function(e,t,r){"use strict";r.d(t,{x:()=>i});/* import */var n=r(5054);function i(e,...t){const r=n/* .constructFrom.bind */.w.bind(null,e||t.find(e=>typeof e==="object"));return t.map(r)}},42084:function(e,t,r){"use strict";r.d(t,{Ss:()=>u,ef:()=>o,xM:()=>s});const n=/^D+$/;const i=/^Y+$/;const a=["D","DD","YY","YYYY"];function o(e){return n.test(e)}function s(e){return i.test(e)}function u(e,t,r){const n=c(e,t,r);console.warn(n);if(a.includes(e))throw new RangeError(n)}function c(e,t,r){const n=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${n} to the input \`${r}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}},52575:function(e,t,r){"use strict";r.d(t,{z:()=>a});/* import */var n=r(25830);/* import */var i=r(84350);/**
 * The {@link addMinutes} function options.
 *//**
 * @name addMinutes
 * @category Minute Helpers
 * @summary Add the specified number of minutes to the given date.
 *
 * @description
 * Add the specified number of minutes to the given date.
 *
 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
 * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
 *
 * @param date - The date to be changed
 * @param amount - The amount of minutes to be added.
 * @param options - An object with options
 *
 * @returns The new date with the minutes added
 *
 * @example
 * // Add 30 minutes to 10 July 2014 12:00:00:
 * const result = addMinutes(new Date(2014, 6, 10, 12, 0), 30)
 * //=> Thu Jul 10 2014 12:30:00
 */function a(e,t,r){const a=(0,i/* .toDate */.a)(e,r?.in);a.setTime(a.getTime()+t*n/* .millisecondsInMinute */.Cg);return a}// Fallback for modularized imports:
/* unused export default */var o=/* unused pure expression or super */null&&a},25830:function(e,t,r){"use strict";r.d(t,{Cg:()=>c,_P:()=>S,my:()=>s,s0:()=>l,w4:()=>u});/**
 * @module constants
 * @summary Useful constants
 * @description
 * Collection of useful date constants.
 *
 * The constants could be imported from `date-fns/constants`:
 *
 * ```ts
 * import { maxTime, minTime } from "./constants/date-fns/constants";
 *
 * function isAllowedTime(time) {
 *   return time <= maxTime && time >= minTime;
 * }
 * ```
 *//**
 * @constant
 * @name daysInWeek
 * @summary Days in 1 week.
 */const n=7;/**
 * @constant
 * @name daysInYear
 * @summary Days in 1 year.
 *
 * @description
 * How many days in a year.
 *
 * One years equals 365.2425 days according to the formula:
 *
 * > Leap year occurs every 4 years, except for years that are divisible by 100 and not divisible by 400.
 * > 1 mean year = (365+1/4-1/100+1/400) days = 365.2425 days
 */const i=365.2425;/**
 * @constant
 * @name maxTime
 * @summary Maximum allowed time.
 *
 * @example
 * import { maxTime } from "./constants/date-fns/constants";
 *
 * const isValid = 8640000000000001 <= maxTime;
 * //=> false
 *
 * new Date(8640000000000001);
 * //=> Invalid Date
 */const a=Math.pow(10,8)*24*60*60*1e3;/**
 * @constant
 * @name minTime
 * @summary Minimum allowed time.
 *
 * @example
 * import { minTime } from "./constants/date-fns/constants";
 *
 * const isValid = -8640000000000001 >= minTime;
 * //=> false
 *
 * new Date(-8640000000000001)
 * //=> Invalid Date
 */const o=/* unused pure expression or super */null&&-a;/**
 * @constant
 * @name millisecondsInWeek
 * @summary Milliseconds in 1 week.
 */const s=6048e5;/**
 * @constant
 * @name millisecondsInDay
 * @summary Milliseconds in 1 day.
 */const u=864e5;/**
 * @constant
 * @name millisecondsInMinute
 * @summary Milliseconds in 1 minute
 */const c=6e4;/**
 * @constant
 * @name millisecondsInHour
 * @summary Milliseconds in 1 hour
 */const l=36e5;/**
 * @constant
 * @name millisecondsInSecond
 * @summary Milliseconds in 1 second
 */const d=1e3;/**
 * @constant
 * @name minutesInYear
 * @summary Minutes in 1 year.
 */const f=525600;/**
 * @constant
 * @name minutesInMonth
 * @summary Minutes in 1 month.
 */const p=43200;/**
 * @constant
 * @name minutesInDay
 * @summary Minutes in 1 day.
 */const h=1440;/**
 * @constant
 * @name minutesInHour
 * @summary Minutes in 1 hour.
 */const v=60;/**
 * @constant
 * @name monthsInQuarter
 * @summary Months in 1 quarter.
 */const m=3;/**
 * @constant
 * @name monthsInYear
 * @summary Months in 1 year.
 */const g=12;/**
 * @constant
 * @name quartersInYear
 * @summary Quarters in 1 year
 */const b=4;/**
 * @constant
 * @name secondsInHour
 * @summary Seconds in 1 hour.
 */const _=3600;/**
 * @constant
 * @name secondsInMinute
 * @summary Seconds in 1 minute.
 */const y=60;/**
 * @constant
 * @name secondsInDay
 * @summary Seconds in 1 day.
 */const w=/* unused pure expression or super */null&&_*24;/**
 * @constant
 * @name secondsInWeek
 * @summary Seconds in 1 week.
 */const A=/* unused pure expression or super */null&&w*7;/**
 * @constant
 * @name secondsInYear
 * @summary Seconds in 1 year.
 */const x=/* unused pure expression or super */null&&w*i;/**
 * @constant
 * @name secondsInMonth
 * @summary Seconds in 1 month
 */const E=/* unused pure expression or super */null&&x/12;/**
 * @constant
 * @name secondsInQuarter
 * @summary Seconds in 1 quarter.
 */const O=/* unused pure expression or super */null&&E*3;/**
 * @constant
 * @name constructFromSymbol
 * @summary Symbol enabling Date extensions to inherit properties from the reference date.
 *
 * The symbol is used to enable the `constructFrom` function to construct a date
 * using a reference date and a value. It allows to transfer extra properties
 * from the reference date to the new date. It's useful for extensions like
 * [`TZDate`](https://github.com/date-fns/tz) that accept a time zone as
 * a constructor argument.
 */const S=Symbol.for("constructDateFrom")},5054:function(e,t,r){"use strict";r.d(t,{w:()=>i});/* import */var n=r(25830);/**
 * @name constructFrom
 * @category Generic Helpers
 * @summary Constructs a date using the reference date and the value
 *
 * @description
 * The function constructs a new date using the constructor from the reference
 * date and the given value. It helps to build generic functions that accept
 * date extensions.
 *
 * It defaults to `Date` if the passed reference date is a number or a string.
 *
 * Starting from v3.7.0, it allows to construct a date using `[Symbol.for("constructDateFrom")]`
 * enabling to transfer extra properties from the reference date to the new date.
 * It's useful for extensions like [`TZDate`](https://github.com/date-fns/tz)
 * that accept a time zone as a constructor argument.
 *
 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
 *
 * @param date - The reference date to take constructor from
 * @param value - The value to create the date
 *
 * @returns Date initialized using the given date and value
 *
 * @example
 * import { constructFrom } from "./constructFrom/date-fns";
 *
 * // A function that clones a date preserving the original type
 * function cloneDate<DateType extends Date>(date: DateType): DateType {
 *   return constructFrom(
 *     date, // Use constructor from the given date
 *     date.getTime() // Use the date value to create a new date
 *   );
 * }
 */function i(e,t){if(typeof e==="function")return e(t);if(e&&typeof e==="object"&&n/* .constructFromSymbol */._P in e)return e[n/* .constructFromSymbol */._P](t);if(e instanceof Date)return new e.constructor(t);return new Date(t)}// Fallback for modularized imports:
/* unused export default */var a=/* unused pure expression or super */null&&i},42878:function(e,t,r){"use strict";r.d(t,{m:()=>s});/* import */var n=r(12093);/* import */var i=r(75518);/* import */var a=r(25830);/* import */var o=r(5758);/**
 * The {@link differenceInCalendarDays} function options.
 *//**
 * @name differenceInCalendarDays
 * @category Day Helpers
 * @summary Get the number of calendar days between the given dates.
 *
 * @description
 * Get the number of calendar days between the given dates. This means that the times are removed
 * from the dates and then the difference in days is calculated.
 *
 * @param laterDate - The later date
 * @param earlierDate - The earlier date
 * @param options - The options object
 *
 * @returns The number of calendar days
 *
 * @example
 * // How many calendar days are between
 * // 2 July 2011 23:00:00 and 2 July 2012 00:00:00?
 * const result = differenceInCalendarDays(
 *   new Date(2012, 6, 2, 0, 0),
 *   new Date(2011, 6, 2, 23, 0)
 * )
 * //=> 366
 * // How many calendar days are between
 * // 2 July 2011 23:59:00 and 3 July 2011 00:01:00?
 * const result = differenceInCalendarDays(
 *   new Date(2011, 6, 3, 0, 1),
 *   new Date(2011, 6, 2, 23, 59)
 * )
 * //=> 1
 */function s(e,t,r){const[s,u]=(0,i/* .normalizeDates */.x)(r?.in,e,t);const c=(0,o/* .startOfDay */.o)(s);const l=(0,o/* .startOfDay */.o)(u);const d=+c-(0,n/* .getTimezoneOffsetInMilliseconds */.G)(c);const f=+l-(0,n/* .getTimezoneOffsetInMilliseconds */.G)(l);// Round the number of days to the nearest integer because the number of
// milliseconds in a day is not constant (e.g. it's different in the week of
// the daylight saving time clock shift).
return Math.round((d-f)/a/* .millisecondsInDay */.w4)}// Fallback for modularized imports:
/* unused export default */var u=/* unused pure expression or super */null&&s},1896:function(e,t,r){"use strict";r.d(t,{GP:()=>v});/* import */var n=r(14308);/* import */var i=r(87411);/* import */var a=r(76267);/* import */var o=r(14029);/* import */var s=r(42084);/* import */var u=r(76845);/* import */var c=r(84350);// Rexports of internal for libraries to use.
// See: https://github.com/date-fns/date-fns/issues/3638#issuecomment-1877082874
// This RegExp consists of three parts separated by `|`:
// - [yYQqMLwIdDecihHKkms]o matches any available ordinal number token
//   (one of the certain letters followed by `o`)
// - (\w)\1* matches any sequences of the same letter
// - '' matches two quote characters in a row
// - '(''|[^'])+('|$) matches anything surrounded by two quote characters ('),
//   except a single quote symbol, which ends the sequence.
//   Two quote characters do not end the sequence.
//   If there is no matching single quote
//   then the sequence will continue until the end of the string.
// - . matches any single character unmatched by previous parts of the RegExps
const l=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g;// This RegExp catches symbols escaped by quotes, and also
// sequences of symbols P, p, and the combinations like `PPPPPPPppppp`
const d=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;const f=/^'([^]*?)'?$/;const p=/''/g;const h=/[a-zA-Z]/;/**
 * The {@link format} function options.
 *//**
 * @name format
 * @alias formatDate
 * @category Common Helpers
 * @summary Format the date.
 *
 * @description
 * Return the formatted date string in the given format. The result may vary by locale.
 *
 * > ⚠️ Please note that the `format` tokens differ from Moment.js and other libraries.
 * > See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
 *
 * The characters wrapped between two single quotes characters (') are escaped.
 * Two single quotes in a row, whether inside or outside a quoted sequence, represent a 'real' single quote.
 * (see the last example)
 *
 * Format of the string is based on Unicode Technical Standard #35:
 * https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table
 * with a few additions (see note 7 below the table).
 *
 * Accepted patterns:
 * | Unit                            | Pattern | Result examples                   | Notes |
 * |---------------------------------|---------|-----------------------------------|-------|
 * | Era                             | G..GGG  | AD, BC                            |       |
 * |                                 | GGGG    | Anno Domini, Before Christ        | 2     |
 * |                                 | GGGGG   | A, B                              |       |
 * | Calendar year                   | y       | 44, 1, 1900, 2017                 | 5     |
 * |                                 | yo      | 44th, 1st, 0th, 17th              | 5,7   |
 * |                                 | yy      | 44, 01, 00, 17                    | 5     |
 * |                                 | yyy     | 044, 001, 1900, 2017              | 5     |
 * |                                 | yyyy    | 0044, 0001, 1900, 2017            | 5     |
 * |                                 | yyyyy   | ...                               | 3,5   |
 * | Local week-numbering year       | Y       | 44, 1, 1900, 2017                 | 5     |
 * |                                 | Yo      | 44th, 1st, 1900th, 2017th         | 5,7   |
 * |                                 | YY      | 44, 01, 00, 17                    | 5,8   |
 * |                                 | YYY     | 044, 001, 1900, 2017              | 5     |
 * |                                 | YYYY    | 0044, 0001, 1900, 2017            | 5,8   |
 * |                                 | YYYYY   | ...                               | 3,5   |
 * | ISO week-numbering year         | R       | -43, 0, 1, 1900, 2017             | 5,7   |
 * |                                 | RR      | -43, 00, 01, 1900, 2017           | 5,7   |
 * |                                 | RRR     | -043, 000, 001, 1900, 2017        | 5,7   |
 * |                                 | RRRR    | -0043, 0000, 0001, 1900, 2017     | 5,7   |
 * |                                 | RRRRR   | ...                               | 3,5,7 |
 * | Extended year                   | u       | -43, 0, 1, 1900, 2017             | 5     |
 * |                                 | uu      | -43, 01, 1900, 2017               | 5     |
 * |                                 | uuu     | -043, 001, 1900, 2017             | 5     |
 * |                                 | uuuu    | -0043, 0001, 1900, 2017           | 5     |
 * |                                 | uuuuu   | ...                               | 3,5   |
 * | Quarter (formatting)            | Q       | 1, 2, 3, 4                        |       |
 * |                                 | Qo      | 1st, 2nd, 3rd, 4th                | 7     |
 * |                                 | QQ      | 01, 02, 03, 04                    |       |
 * |                                 | QQQ     | Q1, Q2, Q3, Q4                    |       |
 * |                                 | QQQQ    | 1st quarter, 2nd quarter, ...     | 2     |
 * |                                 | QQQQQ   | 1, 2, 3, 4                        | 4     |
 * | Quarter (stand-alone)           | q       | 1, 2, 3, 4                        |       |
 * |                                 | qo      | 1st, 2nd, 3rd, 4th                | 7     |
 * |                                 | qq      | 01, 02, 03, 04                    |       |
 * |                                 | qqq     | Q1, Q2, Q3, Q4                    |       |
 * |                                 | qqqq    | 1st quarter, 2nd quarter, ...     | 2     |
 * |                                 | qqqqq   | 1, 2, 3, 4                        | 4     |
 * | Month (formatting)              | M       | 1, 2, ..., 12                     |       |
 * |                                 | Mo      | 1st, 2nd, ..., 12th               | 7     |
 * |                                 | MM      | 01, 02, ..., 12                   |       |
 * |                                 | MMM     | Jan, Feb, ..., Dec                |       |
 * |                                 | MMMM    | January, February, ..., December  | 2     |
 * |                                 | MMMMM   | J, F, ..., D                      |       |
 * | Month (stand-alone)             | L       | 1, 2, ..., 12                     |       |
 * |                                 | Lo      | 1st, 2nd, ..., 12th               | 7     |
 * |                                 | LL      | 01, 02, ..., 12                   |       |
 * |                                 | LLL     | Jan, Feb, ..., Dec                |       |
 * |                                 | LLLL    | January, February, ..., December  | 2     |
 * |                                 | LLLLL   | J, F, ..., D                      |       |
 * | Local week of year              | w       | 1, 2, ..., 53                     |       |
 * |                                 | wo      | 1st, 2nd, ..., 53th               | 7     |
 * |                                 | ww      | 01, 02, ..., 53                   |       |
 * | ISO week of year                | I       | 1, 2, ..., 53                     | 7     |
 * |                                 | Io      | 1st, 2nd, ..., 53th               | 7     |
 * |                                 | II      | 01, 02, ..., 53                   | 7     |
 * | Day of month                    | d       | 1, 2, ..., 31                     |       |
 * |                                 | do      | 1st, 2nd, ..., 31st               | 7     |
 * |                                 | dd      | 01, 02, ..., 31                   |       |
 * | Day of year                     | D       | 1, 2, ..., 365, 366               | 9     |
 * |                                 | Do      | 1st, 2nd, ..., 365th, 366th       | 7     |
 * |                                 | DD      | 01, 02, ..., 365, 366             | 9     |
 * |                                 | DDD     | 001, 002, ..., 365, 366           |       |
 * |                                 | DDDD    | ...                               | 3     |
 * | Day of week (formatting)        | E..EEE  | Mon, Tue, Wed, ..., Sun           |       |
 * |                                 | EEEE    | Monday, Tuesday, ..., Sunday      | 2     |
 * |                                 | EEEEE   | M, T, W, T, F, S, S               |       |
 * |                                 | EEEEEE  | Mo, Tu, We, Th, Fr, Sa, Su        |       |
 * | ISO day of week (formatting)    | i       | 1, 2, 3, ..., 7                   | 7     |
 * |                                 | io      | 1st, 2nd, ..., 7th                | 7     |
 * |                                 | ii      | 01, 02, ..., 07                   | 7     |
 * |                                 | iii     | Mon, Tue, Wed, ..., Sun           | 7     |
 * |                                 | iiii    | Monday, Tuesday, ..., Sunday      | 2,7   |
 * |                                 | iiiii   | M, T, W, T, F, S, S               | 7     |
 * |                                 | iiiiii  | Mo, Tu, We, Th, Fr, Sa, Su        | 7     |
 * | Local day of week (formatting)  | e       | 2, 3, 4, ..., 1                   |       |
 * |                                 | eo      | 2nd, 3rd, ..., 1st                | 7     |
 * |                                 | ee      | 02, 03, ..., 01                   |       |
 * |                                 | eee     | Mon, Tue, Wed, ..., Sun           |       |
 * |                                 | eeee    | Monday, Tuesday, ..., Sunday      | 2     |
 * |                                 | eeeee   | M, T, W, T, F, S, S               |       |
 * |                                 | eeeeee  | Mo, Tu, We, Th, Fr, Sa, Su        |       |
 * | Local day of week (stand-alone) | c       | 2, 3, 4, ..., 1                   |       |
 * |                                 | co      | 2nd, 3rd, ..., 1st                | 7     |
 * |                                 | cc      | 02, 03, ..., 01                   |       |
 * |                                 | ccc     | Mon, Tue, Wed, ..., Sun           |       |
 * |                                 | cccc    | Monday, Tuesday, ..., Sunday      | 2     |
 * |                                 | ccccc   | M, T, W, T, F, S, S               |       |
 * |                                 | cccccc  | Mo, Tu, We, Th, Fr, Sa, Su        |       |
 * | AM, PM                          | a..aa   | AM, PM                            |       |
 * |                                 | aaa     | am, pm                            |       |
 * |                                 | aaaa    | a.m., p.m.                        | 2     |
 * |                                 | aaaaa   | a, p                              |       |
 * | AM, PM, noon, midnight          | b..bb   | AM, PM, noon, midnight            |       |
 * |                                 | bbb     | am, pm, noon, midnight            |       |
 * |                                 | bbbb    | a.m., p.m., noon, midnight        | 2     |
 * |                                 | bbbbb   | a, p, n, mi                       |       |
 * | Flexible day period             | B..BBB  | at night, in the morning, ...     |       |
 * |                                 | BBBB    | at night, in the morning, ...     | 2     |
 * |                                 | BBBBB   | at night, in the morning, ...     |       |
 * | Hour [1-12]                     | h       | 1, 2, ..., 11, 12                 |       |
 * |                                 | ho      | 1st, 2nd, ..., 11th, 12th         | 7     |
 * |                                 | hh      | 01, 02, ..., 11, 12               |       |
 * | Hour [0-23]                     | H       | 0, 1, 2, ..., 23                  |       |
 * |                                 | Ho      | 0th, 1st, 2nd, ..., 23rd          | 7     |
 * |                                 | HH      | 00, 01, 02, ..., 23               |       |
 * | Hour [0-11]                     | K       | 1, 2, ..., 11, 0                  |       |
 * |                                 | Ko      | 1st, 2nd, ..., 11th, 0th          | 7     |
 * |                                 | KK      | 01, 02, ..., 11, 00               |       |
 * | Hour [1-24]                     | k       | 24, 1, 2, ..., 23                 |       |
 * |                                 | ko      | 24th, 1st, 2nd, ..., 23rd         | 7     |
 * |                                 | kk      | 24, 01, 02, ..., 23               |       |
 * | Minute                          | m       | 0, 1, ..., 59                     |       |
 * |                                 | mo      | 0th, 1st, ..., 59th               | 7     |
 * |                                 | mm      | 00, 01, ..., 59                   |       |
 * | Second                          | s       | 0, 1, ..., 59                     |       |
 * |                                 | so      | 0th, 1st, ..., 59th               | 7     |
 * |                                 | ss      | 00, 01, ..., 59                   |       |
 * | Fraction of second              | S       | 0, 1, ..., 9                      |       |
 * |                                 | SS      | 00, 01, ..., 99                   |       |
 * |                                 | SSS     | 000, 001, ..., 999                |       |
 * |                                 | SSSS    | ...                               | 3     |
 * | Timezone (ISO-8601 w/ Z)        | X       | -08, +0530, Z                     |       |
 * |                                 | XX      | -0800, +0530, Z                   |       |
 * |                                 | XXX     | -08:00, +05:30, Z                 |       |
 * |                                 | XXXX    | -0800, +0530, Z, +123456          | 2     |
 * |                                 | XXXXX   | -08:00, +05:30, Z, +12:34:56      |       |
 * | Timezone (ISO-8601 w/o Z)       | x       | -08, +0530, +00                   |       |
 * |                                 | xx      | -0800, +0530, +0000               |       |
 * |                                 | xxx     | -08:00, +05:30, +00:00            | 2     |
 * |                                 | xxxx    | -0800, +0530, +0000, +123456      |       |
 * |                                 | xxxxx   | -08:00, +05:30, +00:00, +12:34:56 |       |
 * | Timezone (GMT)                  | O...OOO | GMT-8, GMT+5:30, GMT+0            |       |
 * |                                 | OOOO    | GMT-08:00, GMT+05:30, GMT+00:00   | 2     |
 * | Timezone (specific non-locat.)  | z...zzz | GMT-8, GMT+5:30, GMT+0            | 6     |
 * |                                 | zzzz    | GMT-08:00, GMT+05:30, GMT+00:00   | 2,6   |
 * | Seconds timestamp               | t       | 512969520                         | 7     |
 * |                                 | tt      | ...                               | 3,7   |
 * | Milliseconds timestamp          | T       | 512969520900                      | 7     |
 * |                                 | TT      | ...                               | 3,7   |
 * | Long localized date             | P       | 04/29/1453                        | 7     |
 * |                                 | PP      | Apr 29, 1453                      | 7     |
 * |                                 | PPP     | April 29th, 1453                  | 7     |
 * |                                 | PPPP    | Friday, April 29th, 1453          | 2,7   |
 * | Long localized time             | p       | 12:00 AM                          | 7     |
 * |                                 | pp      | 12:00:00 AM                       | 7     |
 * |                                 | ppp     | 12:00:00 AM GMT+2                 | 7     |
 * |                                 | pppp    | 12:00:00 AM GMT+02:00             | 2,7   |
 * | Combination of date and time    | Pp      | 04/29/1453, 12:00 AM              | 7     |
 * |                                 | PPpp    | Apr 29, 1453, 12:00:00 AM         | 7     |
 * |                                 | PPPppp  | April 29th, 1453 at ...           | 7     |
 * |                                 | PPPPpppp| Friday, April 29th, 1453 at ...   | 2,7   |
 * Notes:
 * 1. "Formatting" units (e.g. formatting quarter) in the default en-US locale
 *    are the same as "stand-alone" units, but are different in some languages.
 *    "Formatting" units are declined according to the rules of the language
 *    in the context of a date. "Stand-alone" units are always nominative singular:
 *
 *    `format(new Date(2017, 10, 6), 'do LLLL', {locale: cs}) //=> '6. listopad'`
 *
 *    `format(new Date(2017, 10, 6), 'do MMMM', {locale: cs}) //=> '6. listopadu'`
 *
 * 2. Any sequence of the identical letters is a pattern, unless it is escaped by
 *    the single quote characters (see below).
 *    If the sequence is longer than listed in table (e.g. `EEEEEEEEEEE`)
 *    the output will be the same as default pattern for this unit, usually
 *    the longest one (in case of ISO weekdays, `EEEE`). Default patterns for units
 *    are marked with "2" in the last column of the table.
 *
 *    `format(new Date(2017, 10, 6), 'MMM') //=> 'Nov'`
 *
 *    `format(new Date(2017, 10, 6), 'MMMM') //=> 'November'`
 *
 *    `format(new Date(2017, 10, 6), 'MMMMM') //=> 'N'`
 *
 *    `format(new Date(2017, 10, 6), 'MMMMMM') //=> 'November'`
 *
 *    `format(new Date(2017, 10, 6), 'MMMMMMM') //=> 'November'`
 *
 * 3. Some patterns could be unlimited length (such as `yyyyyyyy`).
 *    The output will be padded with zeros to match the length of the pattern.
 *
 *    `format(new Date(2017, 10, 6), 'yyyyyyyy') //=> '00002017'`
 *
 * 4. `QQQQQ` and `qqqqq` could be not strictly numerical in some locales.
 *    These tokens represent the shortest form of the quarter.
 *
 * 5. The main difference between `y` and `u` patterns are B.C. years:
 *
 *    | Year | `y` | `u` |
 *    |------|-----|-----|
 *    | AC 1 |   1 |   1 |
 *    | BC 1 |   1 |   0 |
 *    | BC 2 |   2 |  -1 |
 *
 *    Also `yy` always returns the last two digits of a year,
 *    while `uu` pads single digit years to 2 characters and returns other years unchanged:
 *
 *    | Year | `yy` | `uu` |
 *    |------|------|------|
 *    | 1    |   01 |   01 |
 *    | 14   |   14 |   14 |
 *    | 376  |   76 |  376 |
 *    | 1453 |   53 | 1453 |
 *
 *    The same difference is true for local and ISO week-numbering years (`Y` and `R`),
 *    except local week-numbering years are dependent on `options.weekStartsOn`
 *    and `options.firstWeekContainsDate` (compare [getISOWeekYear](https://date-fns.org/docs/getISOWeekYear)
 *    and [getWeekYear](https://date-fns.org/docs/getWeekYear)).
 *
 * 6. Specific non-location timezones are currently unavailable in `date-fns`,
 *    so right now these tokens fall back to GMT timezones.
 *
 * 7. These patterns are not in the Unicode Technical Standard #35:
 *    - `i`: ISO day of week
 *    - `I`: ISO week of year
 *    - `R`: ISO week-numbering year
 *    - `t`: seconds timestamp
 *    - `T`: milliseconds timestamp
 *    - `o`: ordinal number modifier
 *    - `P`: long localized date
 *    - `p`: long localized time
 *
 * 8. `YY` and `YYYY` tokens represent week-numbering years but they are often confused with years.
 *    You should enable `options.useAdditionalWeekYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
 *
 * 9. `D` and `DD` tokens represent days of the year but they are often confused with days of the month.
 *    You should enable `options.useAdditionalDayOfYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
 *
 * @param date - The original date
 * @param format - The string of tokens
 * @param options - An object with options
 *
 * @returns The formatted date string
 *
 * @throws `date` must not be Invalid Date
 * @throws `options.locale` must contain `localize` property
 * @throws `options.locale` must contain `formatLong` property
 * @throws use `yyyy` instead of `YYYY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
 * @throws use `yy` instead of `YY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
 * @throws use `d` instead of `D` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
 * @throws use `dd` instead of `DD` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
 * @throws format string contains an unescaped latin alphabet character
 *
 * @example
 * // Represent 11 February 2014 in middle-endian format:
 * const result = format(new Date(2014, 1, 11), 'MM/dd/yyyy')
 * //=> '02/11/2014'
 *
 * @example
 * // Represent 2 July 2014 in Esperanto:
 * import { eoLocale } from 'date-fns/locale/eo'
 * const result = format(new Date(2014, 6, 2), "do 'de' MMMM yyyy", {
 *   locale: eoLocale
 * })
 * //=> '2-a de julio 2014'
 *
 * @example
 * // Escape string by single quote characters:
 * const result = format(new Date(2014, 6, 2, 15), "h 'o''clock'")
 * //=> "3 o'clock"
 */function v(e,t,r){const f=(0,i/* .getDefaultOptions */.q)();const p=r?.locale??f.locale??n/* .enUS */.c;const v=r?.firstWeekContainsDate??r?.locale?.options?.firstWeekContainsDate??f.firstWeekContainsDate??f.locale?.options?.firstWeekContainsDate??1;const g=r?.weekStartsOn??r?.locale?.options?.weekStartsOn??f.weekStartsOn??f.locale?.options?.weekStartsOn??0;const b=(0,c/* .toDate */.a)(e,r?.in);if(!(0,u/* .isValid */.f)(b)){throw new RangeError("Invalid time value")}let _=t.match(d).map(e=>{const t=e[0];if(t==="p"||t==="P"){const r=o/* .longFormatters */.m[t];return r(e,p.formatLong)}return e}).join("").match(l).map(e=>{// Replace two single quote characters with one single quote character
if(e==="''"){return{isToken:false,value:"'"}}const t=e[0];if(t==="'"){return{isToken:false,value:m(e)}}if(a/* .formatters */._[t]){return{isToken:true,value:e}}if(t.match(h)){throw new RangeError("Format string contains an unescaped latin alphabet character `"+t+"`")}return{isToken:false,value:e}});// invoke localize preprocessor (only for french locales at the moment)
if(p.localize.preprocessor){_=p.localize.preprocessor(b,_)}const y={firstWeekContainsDate:v,weekStartsOn:g,locale:p};return _.map(n=>{if(!n.isToken)return n.value;const i=n.value;if(!r?.useAdditionalWeekYearTokens&&(0,s/* .isProtectedWeekYearToken */.xM)(i)||!r?.useAdditionalDayOfYearTokens&&(0,s/* .isProtectedDayOfYearToken */.ef)(i)){(0,s/* .warnOrThrowProtectedError */.Ss)(i,t,String(e))}const o=a/* .formatters */._[i[0]];return o(b,i,p.localize,y)}).join("")}function m(e){const t=e.match(f);if(!t){return e}return t[1].replace(p,"'")}// Fallback for modularized imports:
/* unused export default */var g=/* unused pure expression or super */null&&v},70621:function(e,t,r){"use strict";r.d(t,{F:()=>o});/* import */var n=r(42878);/* import */var i=r(48011);/* import */var a=r(84350);/**
 * The {@link getDayOfYear} function options.
 *//**
 * @name getDayOfYear
 * @category Day Helpers
 * @summary Get the day of the year of the given date.
 *
 * @description
 * Get the day of the year of the given date.
 *
 * @param date - The given date
 * @param options - The options
 *
 * @returns The day of year
 *
 * @example
 * // Which day of the year is 2 July 2014?
 * const result = getDayOfYear(new Date(2014, 6, 2))
 * //=> 183
 */function o(e,t){const r=(0,a/* .toDate */.a)(e,t?.in);const o=(0,n/* .differenceInCalendarDays */.m)(r,(0,i/* .startOfYear */.D)(r));const s=o+1;return s}// Fallback for modularized imports:
/* unused export default */var s=/* unused pure expression or super */null&&o},72642:function(e,t,r){"use strict";r.d(t,{s:()=>s});/* import */var n=r(25830);/* import */var i=r(16925);/* import */var a=r(34412);/* import */var o=r(84350);/**
 * The {@link getISOWeek} function options.
 *//**
 * @name getISOWeek
 * @category ISO Week Helpers
 * @summary Get the ISO week of the given date.
 *
 * @description
 * Get the ISO week of the given date.
 *
 * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date
 *
 * @param date - The given date
 * @param options - The options
 *
 * @returns The ISO week
 *
 * @example
 * // Which week of the ISO-week numbering year is 2 January 2005?
 * const result = getISOWeek(new Date(2005, 0, 2))
 * //=> 53
 */function s(e,t){const r=(0,o/* .toDate */.a)(e,t?.in);const s=+(0,i/* .startOfISOWeek */.b)(r)-+(0,a/* .startOfISOWeekYear */.w)(r);// Round the number of weeks to the nearest integer because the number of
// milliseconds in a week is not constant (e.g. it's different in the week of
// the daylight saving time clock shift).
return Math.round(s/n/* .millisecondsInWeek */.my)+1}// Fallback for modularized imports:
/* unused export default */var u=/* unused pure expression or super */null&&s},39199:function(e,t,r){"use strict";r.d(t,{p:()=>o});/* import */var n=r(5054);/* import */var i=r(16925);/* import */var a=r(84350);/**
 * The {@link getISOWeekYear} function options.
 *//**
 * @name getISOWeekYear
 * @category ISO Week-Numbering Year Helpers
 * @summary Get the ISO week-numbering year of the given date.
 *
 * @description
 * Get the ISO week-numbering year of the given date,
 * which always starts 3 days before the year's first Thursday.
 *
 * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date
 *
 * @param date - The given date
 *
 * @returns The ISO week-numbering year
 *
 * @example
 * // Which ISO-week numbering year is 2 January 2005?
 * const result = getISOWeekYear(new Date(2005, 0, 2))
 * //=> 2004
 */function o(e,t){const r=(0,a/* .toDate */.a)(e,t?.in);const o=r.getFullYear();const s=(0,n/* .constructFrom */.w)(r,0);s.setFullYear(o+1,0,4);s.setHours(0,0,0,0);const u=(0,i/* .startOfISOWeek */.b)(s);const c=(0,n/* .constructFrom */.w)(r,0);c.setFullYear(o,0,4);c.setHours(0,0,0,0);const l=(0,i/* .startOfISOWeek */.b)(c);if(r.getTime()>=u.getTime()){return o+1}else if(r.getTime()>=l.getTime()){return o}else{return o-1}}// Fallback for modularized imports:
/* unused export default */var s=/* unused pure expression or super */null&&o},62311:function(e,t,r){"use strict";r.d(t,{N:()=>s});/* import */var n=r(25830);/* import */var i=r(36662);/* import */var a=r(10331);/* import */var o=r(84350);/**
 * The {@link getWeek} function options.
 *//**
 * @name getWeek
 * @category Week Helpers
 * @summary Get the local week index of the given date.
 *
 * @description
 * Get the local week index of the given date.
 * The exact calculation depends on the values of
 * `options.weekStartsOn` (which is the index of the first day of the week)
 * and `options.firstWeekContainsDate` (which is the day of January, which is always in
 * the first week of the week-numbering year)
 *
 * Week numbering: https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system
 *
 * @param date - The given date
 * @param options - An object with options
 *
 * @returns The week
 *
 * @example
 * // Which week of the local week numbering year is 2 January 2005 with default options?
 * const result = getWeek(new Date(2005, 0, 2))
 * //=> 2
 *
 * @example
 * // Which week of the local week numbering year is 2 January 2005,
 * // if Monday is the first day of the week,
 * // and the first week of the year always contains 4 January?
 * const result = getWeek(new Date(2005, 0, 2), {
 *   weekStartsOn: 1,
 *   firstWeekContainsDate: 4
 * })
 * //=> 53
 */function s(e,t){const r=(0,o/* .toDate */.a)(e,t?.in);const s=+(0,i/* .startOfWeek */.k)(r,t)-+(0,a/* .startOfWeekYear */.b)(r,t);// Round the number of weeks to the nearest integer because the number of
// milliseconds in a week is not constant (e.g. it's different in the week of
// the daylight saving time clock shift).
return Math.round(s/n/* .millisecondsInWeek */.my)+1}// Fallback for modularized imports:
/* unused export default */var u=/* unused pure expression or super */null&&s},68178:function(e,t,r){"use strict";r.d(t,{h:()=>s});/* import */var n=r(87411);/* import */var i=r(5054);/* import */var a=r(36662);/* import */var o=r(84350);/**
 * The {@link getWeekYear} function options.
 *//**
 * @name getWeekYear
 * @category Week-Numbering Year Helpers
 * @summary Get the local week-numbering year of the given date.
 *
 * @description
 * Get the local week-numbering year of the given date.
 * The exact calculation depends on the values of
 * `options.weekStartsOn` (which is the index of the first day of the week)
 * and `options.firstWeekContainsDate` (which is the day of January, which is always in
 * the first week of the week-numbering year)
 *
 * Week numbering: https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system
 *
 * @param date - The given date
 * @param options - An object with options.
 *
 * @returns The local week-numbering year
 *
 * @example
 * // Which week numbering year is 26 December 2004 with the default settings?
 * const result = getWeekYear(new Date(2004, 11, 26))
 * //=> 2005
 *
 * @example
 * // Which week numbering year is 26 December 2004 if week starts on Saturday?
 * const result = getWeekYear(new Date(2004, 11, 26), { weekStartsOn: 6 })
 * //=> 2004
 *
 * @example
 * // Which week numbering year is 26 December 2004 if the first week contains 4 January?
 * const result = getWeekYear(new Date(2004, 11, 26), { firstWeekContainsDate: 4 })
 * //=> 2004
 */function s(e,t){const r=(0,o/* .toDate */.a)(e,t?.in);const s=r.getFullYear();const u=(0,n/* .getDefaultOptions */.q)();const c=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??u.firstWeekContainsDate??u.locale?.options?.firstWeekContainsDate??1;const l=(0,i/* .constructFrom */.w)(t?.in||e,0);l.setFullYear(s+1,0,c);l.setHours(0,0,0,0);const d=(0,a/* .startOfWeek */.k)(l,t);const f=(0,i/* .constructFrom */.w)(t?.in||e,0);f.setFullYear(s,0,c);f.setHours(0,0,0,0);const p=(0,a/* .startOfWeek */.k)(f,t);if(+r>=+d){return s+1}else if(+r>=+p){return s}else{return s-1}}// Fallback for modularized imports:
/* unused export default */var u=/* unused pure expression or super */null&&s},61736:function(e,t,r){"use strict";r.d(t,{Y:()=>i});/* import */var n=r(84350);/**
 * @name isBefore
 * @category Common Helpers
 * @summary Is the first date before the second one?
 *
 * @description
 * Is the first date before the second one?
 *
 * @param date - The date that should be before the other one to return true
 * @param dateToCompare - The date to compare with
 *
 * @returns The first date is before the second date
 *
 * @example
 * // Is 10 July 1989 before 11 February 1987?
 * const result = isBefore(new Date(1989, 6, 10), new Date(1987, 1, 11))
 * //=> false
 */function i(e,t){return+(0,n/* .toDate */.a)(e)<+(0,n/* .toDate */.a)(t)}// Fallback for modularized imports:
/* unused export default */var a=/* unused pure expression or super */null&&i},20443:function(e,t,r){"use strict";r.d(t,{$:()=>n});/**
 * @name isDate
 * @category Common Helpers
 * @summary Is the given value a date?
 *
 * @description
 * Returns true if the given value is an instance of Date. The function works for dates transferred across iframes.
 *
 * @param value - The value to check
 *
 * @returns True if the given value is a date
 *
 * @example
 * // For a valid date:
 * const result = isDate(new Date())
 * //=> true
 *
 * @example
 * // For an invalid date:
 * const result = isDate(new Date(NaN))
 * //=> true
 *
 * @example
 * // For some value:
 * const result = isDate('2014-02-31')
 * //=> false
 *
 * @example
 * // For an object:
 * const result = isDate({})
 * //=> false
 */function n(e){return e instanceof Date||typeof e==="object"&&Object.prototype.toString.call(e)==="[object Date]"}// Fallback for modularized imports:
/* unused export default */var i=/* unused pure expression or super */null&&n},76845:function(e,t,r){"use strict";r.d(t,{f:()=>a});/* import */var n=r(20443);/* import */var i=r(84350);/**
 * @name isValid
 * @category Common Helpers
 * @summary Is the given date valid?
 *
 * @description
 * Returns false if argument is Invalid Date and true otherwise.
 * Argument is converted to Date using `toDate`. See [toDate](https://date-fns.org/docs/toDate)
 * Invalid Date is a Date, whose time value is NaN.
 *
 * Time value of Date: http://es5.github.io/#x15.9.1.1
 *
 * @param date - The date to check
 *
 * @returns The date is valid
 *
 * @example
 * // For the valid date:
 * const result = isValid(new Date(2014, 1, 31))
 * //=> true
 *
 * @example
 * // For the value, convertible into a date:
 * const result = isValid(1393804800000)
 * //=> true
 *
 * @example
 * // For the invalid date:
 * const result = isValid(new Date(''))
 * //=> false
 */function a(e){return!(!(0,n/* .isDate */.$)(e)&&typeof e!=="number"||isNaN(+(0,i/* .toDate */.a)(e)))}// Fallback for modularized imports:
/* unused export default */var o=/* unused pure expression or super */null&&a},9166:function(e,t,r){"use strict";r.d(t,{k:()=>n});function n(e){return (t={})=>{// TODO: Remove String()
const r=t.width?String(t.width):e.defaultWidth;const n=e.formats[r]||e.formats[e.defaultWidth];return n}}},72376:function(e,t,r){"use strict";r.d(t,{o:()=>n});/**
 * The localize function argument callback which allows to convert raw value to
 * the actual type.
 *
 * @param value - The value to convert
 *
 * @returns The converted value
 *//**
 * The map of localized values for each width.
 *//**
 * The index type of the locale unit value. It types conversion of units of
 * values that don't start at 0 (i.e. quarters).
 *//**
 * Converts the unit value to the tuple of values.
 *//**
 * The tuple of localized era values. The first element represents BC,
 * the second element represents AD.
 *//**
 * The tuple of localized quarter values. The first element represents Q1.
 *//**
 * The tuple of localized day values. The first element represents Sunday.
 *//**
 * The tuple of localized month values. The first element represents January.
 */function n(e){return(t,r)=>{const n=r?.context?String(r.context):"standalone";let i;if(n==="formatting"&&e.formattingValues){const t=e.defaultFormattingWidth||e.defaultWidth;const n=r?.width?String(r.width):t;i=e.formattingValues[n]||e.formattingValues[t]}else{const t=e.defaultWidth;const n=r?.width?String(r.width):e.defaultWidth;i=e.values[n]||e.values[t]}const a=e.argumentCallback?e.argumentCallback(t):t;// @ts-expect-error - For some reason TypeScript just don't want to match it, no matter how hard we try. I challenge you to try to remove it!
return i[a]}}},16690:function(e,t,r){"use strict";r.d(t,{A:()=>n});function n(e){return(t,r={})=>{const n=r.width;const o=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth];const s=t.match(o);if(!s){return null}const u=s[0];const c=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth];const l=Array.isArray(c)?a(c,e=>e.test(u)):i(c,e=>e.test(u));let d;d=e.valueCallback?e.valueCallback(l):l;d=r.valueCallback?r.valueCallback(d):d;const f=t.slice(u.length);return{value:d,rest:f}}}function i(e,t){for(const r in e){if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r])){return r}}return undefined}function a(e,t){for(let r=0;r<e.length;r++){if(t(e[r])){return r}}return undefined}},48734:function(e,t,r){"use strict";r.d(t,{K:()=>n});function n(e){return(t,r={})=>{const n=t.match(e.matchPattern);if(!n)return null;const i=n[0];const a=t.match(e.parsePattern);if(!a)return null;let o=e.valueCallback?e.valueCallback(a[0]):a[0];// [TODO] I challenge you to fix the type
o=r.valueCallback?r.valueCallback(o):o;const s=t.slice(i.length);return{value:o,rest:s}}}},14308:function(e,t,r){"use strict";r.d(t,{c:()=>u});/* import */var n=r(60254);/* import */var i=r(303);/* import */var a=r(15089);/* import */var o=r(31609);/* import */var s=r(40237);/**
 * @category Locales
 * @summary English locale (United States).
 * @language English
 * @iso-639-2 eng
 * @author Sasha Koss [@kossnocorp](https://github.com/kossnocorp)
 * @author Lesha Koss [@leshakoss](https://github.com/leshakoss)
 */const u={code:"en-US",formatDistance:n/* .formatDistance */.B,formatLong:i/* .formatLong */.s,formatRelative:a/* .formatRelative */.o,localize:o/* .localize */.k,match:s/* .match */.Y,options:{weekStartsOn:0/* Sunday */,firstWeekContainsDate:1}};// Fallback for modularized imports:
/* unused export default */var c=/* unused pure expression or super */null&&u},60254:function(e,t,r){"use strict";r.d(t,{B:()=>i});const n={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};const i=(e,t,r)=>{let i;const a=n[e];if(typeof a==="string"){i=a}else if(t===1){i=a.one}else{i=a.other.replace("{{count}}",t.toString())}if(r?.addSuffix){if(r.comparison&&r.comparison>0){return"in "+i}else{return i+" ago"}}return i}},303:function(e,t,r){"use strict";r.d(t,{s:()=>s});/* import */var n=r(9166);const i={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"};const a={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"};const o={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"};const s={date:(0,n/* .buildFormatLongFn */.k)({formats:i,defaultWidth:"full"}),time:(0,n/* .buildFormatLongFn */.k)({formats:a,defaultWidth:"full"}),dateTime:(0,n/* .buildFormatLongFn */.k)({formats:o,defaultWidth:"full"})}},15089:function(e,t,r){"use strict";r.d(t,{o:()=>i});const n={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};const i=(e,t,r,i)=>n[e]},31609:function(e,t,r){"use strict";r.d(t,{k:()=>d});/* import */var n=r(72376);const i={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]};const a={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]};// Note: in English, the names of days of the week and months are capitalized.
// If you are making a new locale based on this one, check if the same is true for the language you're working on.
// Generally, formatted dates should look like they are in the middle of a sentence,
// e.g. in Spanish language the weekdays and months should be in the lowercase.
const o={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]};const s={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]};const u={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}};const c={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}};const l=(e,t)=>{const r=Number(e);// If ordinal numbers depend on context, for example,
// if they are different for different grammatical genders,
// use `options.unit`.
//
// `unit` can be 'year', 'quarter', 'month', 'week', 'date', 'dayOfYear',
// 'day', 'hour', 'minute', 'second'.
const n=r%100;if(n>20||n<10){switch(n%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}}return r+"th"};const d={ordinalNumber:l,era:(0,n/* .buildLocalizeFn */.o)({values:i,defaultWidth:"wide"}),quarter:(0,n/* .buildLocalizeFn */.o)({values:a,defaultWidth:"wide",argumentCallback:e=>e-1}),month:(0,n/* .buildLocalizeFn */.o)({values:o,defaultWidth:"wide"}),day:(0,n/* .buildLocalizeFn */.o)({values:s,defaultWidth:"wide"}),dayPeriod:(0,n/* .buildLocalizeFn */.o)({values:u,defaultWidth:"wide",formattingValues:c,defaultFormattingWidth:"wide"})}},40237:function(e,t,r){"use strict";r.d(t,{Y:()=>g});/* import */var n=r(16690);/* import */var i=r(48734);const a=/^(\d+)(th|st|nd|rd)?/i;const o=/\d+/i;const s={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i};const u={any:[/^b/i,/^(a|c)/i]};const c={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i};const l={any:[/1/i,/2/i,/3/i,/4/i]};const d={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i};const f={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]};const p={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i};const h={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]};const v={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i};const m={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}};const g={ordinalNumber:(0,i/* .buildMatchPatternFn */.K)({matchPattern:a,parsePattern:o,valueCallback:e=>parseInt(e,10)}),era:(0,n/* .buildMatchFn */.A)({matchPatterns:s,defaultMatchWidth:"wide",parsePatterns:u,defaultParseWidth:"any"}),quarter:(0,n/* .buildMatchFn */.A)({matchPatterns:c,defaultMatchWidth:"wide",parsePatterns:l,defaultParseWidth:"any",valueCallback:e=>e+1}),month:(0,n/* .buildMatchFn */.A)({matchPatterns:d,defaultMatchWidth:"wide",parsePatterns:f,defaultParseWidth:"any"}),day:(0,n/* .buildMatchFn */.A)({matchPatterns:p,defaultMatchWidth:"wide",parsePatterns:h,defaultParseWidth:"any"}),dayPeriod:(0,n/* .buildMatchFn */.A)({matchPatterns:v,defaultMatchWidth:"any",parsePatterns:m,defaultParseWidth:"any"})}},66219:function(e,t,r){"use strict";r.d(t,{H:()=>o});/* import */var n=r(25830);/* import */var i=r(5054);/* import */var a=r(84350);/**
 * The {@link parseISO} function options.
 *//**
 * @name parseISO
 * @category Common Helpers
 * @summary Parse ISO string
 *
 * @description
 * Parse the given string in ISO 8601 format and return an instance of Date.
 *
 * Function accepts complete ISO 8601 formats as well as partial implementations.
 * ISO 8601: http://en.wikipedia.org/wiki/ISO_8601
 *
 * If the argument isn't a string, the function cannot parse the string or
 * the values are invalid, it returns Invalid Date.
 *
 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
 * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
 *
 * @param argument - The value to convert
 * @param options - An object with options
 *
 * @returns The parsed date in the local time zone
 *
 * @example
 * // Convert string '2014-02-11T11:30:30' to date:
 * const result = parseISO('2014-02-11T11:30:30')
 * //=> Tue Feb 11 2014 11:30:30
 *
 * @example
 * // Convert string '+02014101' to date,
 * // if the additional number of digits in the extended year format is 1:
 * const result = parseISO('+02014101', { additionalDigits: 1 })
 * //=> Fri Apr 11 2014 00:00:00
 */function o(e,t){const r=()=>(0,i/* .constructFrom */.w)(t?.in,NaN);const n=t?.additionalDigits??2;const o=d(e);let s;if(o.date){const e=f(o.date,n);s=p(e.restDateString,e.year)}if(!s||isNaN(+s))return r();const u=+s;let c=0;let l;if(o.time){c=v(o.time);if(isNaN(c))return r()}if(o.timezone){l=g(o.timezone);if(isNaN(l))return r()}else{const e=new Date(u+c);const r=(0,a/* .toDate */.a)(0,t?.in);r.setFullYear(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate());r.setHours(e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds());return r}return(0,a/* .toDate */.a)(u+c+l,t?.in)}const s={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/};const u=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/;const c=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/;const l=/^([+-])(\d{2})(?::?(\d{2}))?$/;function d(e){const t={};const r=e.split(s.dateTimeDelimiter);let n;// The regex match should only return at maximum two array elements.
// [date], [time], or [date, time].
if(r.length>2){return t}if(/:/.test(r[0])){n=r[0]}else{t.date=r[0];n=r[1];if(s.timeZoneDelimiter.test(t.date)){t.date=e.split(s.timeZoneDelimiter)[0];n=e.substr(t.date.length,e.length)}}if(n){const e=s.timezone.exec(n);if(e){t.time=n.replace(e[1],"");t.timezone=e[1]}else{t.time=n}}return t}function f(e,t){const r=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)");const n=e.match(r);// Invalid ISO-formatted year
if(!n)return{year:NaN,restDateString:""};const i=n[1]?parseInt(n[1]):null;const a=n[2]?parseInt(n[2]):null;// either year or century is null, not both
return{year:a===null?i:a*100,restDateString:e.slice((n[1]||n[2]).length)}}function p(e,t){// Invalid ISO-formatted year
if(t===null)return new Date(NaN);const r=e.match(u);// Invalid ISO-formatted string
if(!r)return new Date(NaN);const n=!!r[4];const i=h(r[1]);const a=h(r[2])-1;const o=h(r[3]);const s=h(r[4]);const c=h(r[5])-1;if(n){if(!x(t,s,c)){return new Date(NaN)}return b(t,s,c)}else{const e=new Date(0);if(!w(t,a,o)||!A(t,i)){return new Date(NaN)}e.setUTCFullYear(t,a,Math.max(i,o));return e}}function h(e){return e?parseInt(e):1}function v(e){const t=e.match(c);if(!t)return NaN;// Invalid ISO-formatted time
const r=m(t[1]);const i=m(t[2]);const a=m(t[3]);if(!E(r,i,a)){return NaN}return r*n/* .millisecondsInHour */.s0+i*n/* .millisecondsInMinute */.Cg+a*1e3}function m(e){return e&&parseFloat(e.replace(",","."))||0}function g(e){if(e==="Z")return 0;const t=e.match(l);if(!t)return 0;const r=t[1]==="+"?-1:1;const i=parseInt(t[2]);const a=t[3]&&parseInt(t[3])||0;if(!O(i,a)){return NaN}return r*(i*n/* .millisecondsInHour */.s0+a*n/* .millisecondsInMinute */.Cg)}function b(e,t,r){const n=new Date(0);n.setUTCFullYear(e,0,4);const i=n.getUTCDay()||7;const a=(t-1)*7+r+1-i;n.setUTCDate(n.getUTCDate()+a);return n}// Validation functions
// February is null to handle the leap year (using ||)
const _=[31,null,31,30,31,30,31,31,30,31,30,31];function y(e){return e%400===0||e%4===0&&e%100!==0}function w(e,t,r){return t>=0&&t<=11&&r>=1&&r<=(_[t]||(y(e)?29:28))}function A(e,t){return t>=1&&t<=(y(e)?366:365)}function x(e,t,r){return t>=1&&t<=53&&r>=0&&r<=6}function E(e,t,r){if(e===24){return t===0&&r===0}return r>=0&&r<60&&t>=0&&t<60&&e>=0&&e<25}function O(e,t){return t>=0&&t<=59}// Fallback for modularized imports:
/* unused export default */var S=/* unused pure expression or super */null&&o},5758:function(e,t,r){"use strict";r.d(t,{o:()=>i});/* import */var n=r(84350);/**
 * The {@link startOfDay} function options.
 *//**
 * @name startOfDay
 * @category Day Helpers
 * @summary Return the start of a day for the given date.
 *
 * @description
 * Return the start of a day for the given date.
 * The result will be in the local timezone.
 *
 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
 * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
 *
 * @param date - The original date
 * @param options - The options
 *
 * @returns The start of a day
 *
 * @example
 * // The start of a day for 2 September 2014 11:55:00:
 * const result = startOfDay(new Date(2014, 8, 2, 11, 55, 0))
 * //=> Tue Sep 02 2014 00:00:00
 */function i(e,t){const r=(0,n/* .toDate */.a)(e,t?.in);r.setHours(0,0,0,0);return r}// Fallback for modularized imports:
/* unused export default */var a=/* unused pure expression or super */null&&i},16925:function(e,t,r){"use strict";r.d(t,{b:()=>i});/* import */var n=r(36662);/**
 * The {@link startOfISOWeek} function options.
 *//**
 * @name startOfISOWeek
 * @category ISO Week Helpers
 * @summary Return the start of an ISO week for the given date.
 *
 * @description
 * Return the start of an ISO week for the given date.
 * The result will be in the local timezone.
 *
 * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date
 *
 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
 * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
 *
 * @param date - The original date
 * @param options - An object with options
 *
 * @returns The start of an ISO week
 *
 * @example
 * // The start of an ISO week for 2 September 2014 11:55:00:
 * const result = startOfISOWeek(new Date(2014, 8, 2, 11, 55, 0))
 * //=> Mon Sep 01 2014 00:00:00
 */function i(e,t){return(0,n/* .startOfWeek */.k)(e,{...t,weekStartsOn:1})}// Fallback for modularized imports:
/* unused export default */var a=/* unused pure expression or super */null&&i},34412:function(e,t,r){"use strict";r.d(t,{w:()=>o});/* import */var n=r(5054);/* import */var i=r(39199);/* import */var a=r(16925);/**
 * The {@link startOfISOWeekYear} function options.
 *//**
 * @name startOfISOWeekYear
 * @category ISO Week-Numbering Year Helpers
 * @summary Return the start of an ISO week-numbering year for the given date.
 *
 * @description
 * Return the start of an ISO week-numbering year,
 * which always starts 3 days before the year's first Thursday.
 * The result will be in the local timezone.
 *
 * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date
 *
 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
 * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
 *
 * @param date - The original date
 * @param options - An object with options
 *
 * @returns The start of an ISO week-numbering year
 *
 * @example
 * // The start of an ISO week-numbering year for 2 July 2005:
 * const result = startOfISOWeekYear(new Date(2005, 6, 2))
 * //=> Mon Jan 03 2005 00:00:00
 */function o(e,t){const r=(0,i/* .getISOWeekYear */.p)(e,t);const o=(0,n/* .constructFrom */.w)(t?.in||e,0);o.setFullYear(r,0,4);o.setHours(0,0,0,0);return(0,a/* .startOfISOWeek */.b)(o)}// Fallback for modularized imports:
/* unused export default */var s=/* unused pure expression or super */null&&o},36662:function(e,t,r){"use strict";r.d(t,{k:()=>a});/* import */var n=r(87411);/* import */var i=r(84350);/**
 * The {@link startOfWeek} function options.
 *//**
 * @name startOfWeek
 * @category Week Helpers
 * @summary Return the start of a week for the given date.
 *
 * @description
 * Return the start of a week for the given date.
 * The result will be in the local timezone.
 *
 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
 * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
 *
 * @param date - The original date
 * @param options - An object with options
 *
 * @returns The start of a week
 *
 * @example
 * // The start of a week for 2 September 2014 11:55:00:
 * const result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0))
 * //=> Sun Aug 31 2014 00:00:00
 *
 * @example
 * // If the week starts on Monday, the start of the week for 2 September 2014 11:55:00:
 * const result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0), { weekStartsOn: 1 })
 * //=> Mon Sep 01 2014 00:00:00
 */function a(e,t){const r=(0,n/* .getDefaultOptions */.q)();const a=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0;const o=(0,i/* .toDate */.a)(e,t?.in);const s=o.getDay();const u=(s<a?7:0)+s-a;o.setDate(o.getDate()-u);o.setHours(0,0,0,0);return o}// Fallback for modularized imports:
/* unused export default */var o=/* unused pure expression or super */null&&a},10331:function(e,t,r){"use strict";r.d(t,{b:()=>s});/* import */var n=r(87411);/* import */var i=r(5054);/* import */var a=r(68178);/* import */var o=r(36662);/**
 * The {@link startOfWeekYear} function options.
 *//**
 * @name startOfWeekYear
 * @category Week-Numbering Year Helpers
 * @summary Return the start of a local week-numbering year for the given date.
 *
 * @description
 * Return the start of a local week-numbering year.
 * The exact calculation depends on the values of
 * `options.weekStartsOn` (which is the index of the first day of the week)
 * and `options.firstWeekContainsDate` (which is the day of January, which is always in
 * the first week of the week-numbering year)
 *
 * Week numbering: https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system
 *
 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
 * @typeParam ResultDate - The result `Date` type.
 *
 * @param date - The original date
 * @param options - An object with options
 *
 * @returns The start of a week-numbering year
 *
 * @example
 * // The start of an a week-numbering year for 2 July 2005 with default settings:
 * const result = startOfWeekYear(new Date(2005, 6, 2))
 * //=> Sun Dec 26 2004 00:00:00
 *
 * @example
 * // The start of a week-numbering year for 2 July 2005
 * // if Monday is the first day of week
 * // and 4 January is always in the first week of the year:
 * const result = startOfWeekYear(new Date(2005, 6, 2), {
 *   weekStartsOn: 1,
 *   firstWeekContainsDate: 4
 * })
 * //=> Mon Jan 03 2005 00:00:00
 */function s(e,t){const r=(0,n/* .getDefaultOptions */.q)();const s=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1;const u=(0,a/* .getWeekYear */.h)(e,t);const c=(0,i/* .constructFrom */.w)(t?.in||e,0);c.setFullYear(u,0,s);c.setHours(0,0,0,0);const l=(0,o/* .startOfWeek */.k)(c,t);return l}// Fallback for modularized imports:
/* unused export default */var u=/* unused pure expression or super */null&&s},48011:function(e,t,r){"use strict";r.d(t,{D:()=>i});/* import */var n=r(84350);/**
 * The {@link startOfYear} function options.
 *//**
 * @name startOfYear
 * @category Year Helpers
 * @summary Return the start of a year for the given date.
 *
 * @description
 * Return the start of a year for the given date.
 * The result will be in the local timezone.
 *
 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
 * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
 *
 * @param date - The original date
 * @param options - The options
 *
 * @returns The start of a year
 *
 * @example
 * // The start of a year for 2 September 2014 11:55:00:
 * const result = startOfYear(new Date(2014, 8, 2, 11, 55, 00))
 * //=> Wed Jan 01 2014 00:00:00
 */function i(e,t){const r=(0,n/* .toDate */.a)(e,t?.in);r.setFullYear(r.getFullYear(),0,1);r.setHours(0,0,0,0);return r}// Fallback for modularized imports:
/* unused export default */var a=/* unused pure expression or super */null&&i},84350:function(e,t,r){"use strict";r.d(t,{a:()=>i});/* import */var n=r(5054);/**
 * @name toDate
 * @category Common Helpers
 * @summary Convert the given argument to an instance of Date.
 *
 * @description
 * Convert the given argument to an instance of Date.
 *
 * If the argument is an instance of Date, the function returns its clone.
 *
 * If the argument is a number, it is treated as a timestamp.
 *
 * If the argument is none of the above, the function returns Invalid Date.
 *
 * Starting from v3.7.0, it clones a date using `[Symbol.for("constructDateFrom")]`
 * enabling to transfer extra properties from the reference date to the new date.
 * It's useful for extensions like [`TZDate`](https://github.com/date-fns/tz)
 * that accept a time zone as a constructor argument.
 *
 * **Note**: *all* Date arguments passed to any *date-fns* function is processed by `toDate`.
 *
 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
 * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
 *
 * @param argument - The value to convert
 *
 * @returns The parsed date in the local time zone
 *
 * @example
 * // Clone the date:
 * const result = toDate(new Date(2014, 1, 11, 11, 30, 30))
 * //=> Tue Feb 11 2014 11:30:30
 *
 * @example
 * // Convert the timestamp to date:
 * const result = toDate(1392098430000)
 * //=> Tue Feb 11 2014 11:30:30
 */function i(e,t){// [TODO] Get rid of `toDate` or `constructFrom`?
return(0,n/* .constructFrom */.w)(t||e,e)}// Fallback for modularized imports:
/* unused export default */var a=/* unused pure expression or super */null&&i},78595:function(e,t,r){"use strict";r.d(t,{jM:()=>ea});// src/utils/env.ts
var n=Symbol.for("immer-nothing");var i=Symbol.for("immer-draftable");var a=Symbol.for("immer-state");// src/utils/errors.ts
var o=false?0:[];function s(e,...t){if(false){}throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}// src/utils/common.ts
var u=Object.getPrototypeOf;function c(e){return!!e&&!!e[a]}function l(e){if(!e)return false;return p(e)||Array.isArray(e)||!!e[i]||!!e.constructor?.[i]||w(e)||A(e)}var d=Object.prototype.constructor.toString();var f=/* @__PURE__ */new WeakMap;function p(e){if(!e||typeof e!=="object")return false;const t=Object.getPrototypeOf(e);if(t===null||t===Object.prototype)return true;const r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;if(r===Object)return true;if(typeof r!=="function")return false;let n=f.get(r);if(n===void 0){n=Function.toString.call(r);f.set(r,n)}return n===d}function h(e){if(!c(e))s(15,e);return e[a].base_}function v(e,t,r=true){if(m(e)===0/* Object */){const n=r?Reflect.ownKeys(e):Object.keys(e);n.forEach(r=>{t(r,e[r],e)})}else{e.forEach((r,n)=>t(n,r,e))}}function m(e){const t=e[a];return t?t.type_:Array.isArray(e)?1/* Array */:w(e)?2/* Map */:A(e)?3/* Set */:0/* Object */}function g(e,t){return m(e)===2/* Map */?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function b(e,t){return m(e)===2/* Map */?e.get(t):e[t]}function _(e,t,r){const n=m(e);if(n===2/* Map */)e.set(t,r);else if(n===3/* Set */){e.add(r)}else e[t]=r}function y(e,t){if(e===t){return e!==0||1/e===1/t}else{return e!==e&&t!==t}}function w(e){return e instanceof Map}function A(e){return e instanceof Set}function x(e){return e.copy_||e.base_}function E(e,t){if(w(e)){return new Map(e)}if(A(e)){return new Set(e)}if(Array.isArray(e))return Array.prototype.slice.call(e);const r=p(e);if(t===true||t==="class_only"&&!r){const t=Object.getOwnPropertyDescriptors(e);delete t[a];let r=Reflect.ownKeys(t);for(let n=0;n<r.length;n++){const i=r[n];const a=t[i];if(a.writable===false){a.writable=true;a.configurable=true}if(a.get||a.set)t[i]={configurable:true,writable:true,// could live with !!desc.set as well here...
enumerable:a.enumerable,value:e[i]}}return Object.create(u(e),t)}else{const t=u(e);if(t!==null&&r){return{...e}}const n=Object.create(t);return Object.assign(n,e)}}function O(e,t=false){if(k(e)||c(e)||!l(e))return e;if(m(e)>1){Object.defineProperties(e,{set:T,add:T,clear:T,delete:T})}Object.freeze(e);if(t)Object.values(e).forEach(e=>O(e,true));return e}function S(){s(2)}var T={value:S};function k(e){if(e===null||typeof e!=="object")return true;return Object.isFrozen(e)}// src/utils/plugins.ts
var C={};function I(e){const t=C[e];if(!t){s(0,e)}return t}function R(e,t){if(!C[e])C[e]=t}// src/core/scope.ts
var D;function P(){return D}function M(e,t){return{drafts_:[],parent_:e,immer_:t,// Whenever the modified draft contains a draft from another scope, we
// need to prevent auto-freezing so the unowned draft can be finalized.
canAutoFreeze_:true,unfinalizedDrafts_:0}}function F(e,t){if(t){I("Patches");e.patches_=[];e.inversePatches_=[];e.patchListener_=t}}function Y(e){L(e);e.drafts_.forEach(H);e.drafts_=null}function L(e){if(e===D){D=e.parent_}}function N(e){return D=M(D,e)}function H(e){const t=e[a];if(t.type_===0/* Object */||t.type_===1/* Array */)t.revoke_();else t.revoked_=true}// src/core/finalize.ts
function j(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];const i=e!==void 0&&e!==r;if(i){if(r[a].modified_){Y(t);s(4)}if(l(e)){e=U(t,e);if(!t.parent_)K(t,e)}if(t.patches_){I("Patches").generateReplacementPatches_(r[a].base_,e,t.patches_,t.inversePatches_)}}else{e=U(t,r,[])}Y(t);if(t.patches_){t.patchListener_(t.patches_,t.inversePatches_)}return e!==n?e:void 0}function U(e,t,r){if(k(t))return t;const n=e.immer_.shouldUseStrictIteration();const i=t[a];if(!i){v(t,(n,a)=>B(e,i,t,n,a,r),n);return t}if(i.scope_!==e)return t;if(!i.modified_){K(e,i.base_,true);return i.base_}if(!i.finalized_){i.finalized_=true;i.scope_.unfinalizedDrafts_--;const t=i.copy_;let a=t;let o=false;if(i.type_===3/* Set */){a=new Set(t);t.clear();o=true}v(a,(n,a)=>B(e,i,t,n,a,r,o),n);K(e,t,false);if(r&&e.patches_){I("Patches").generatePatches_(i,r,e.patches_,e.inversePatches_)}}return i.copy_}function B(e,t,r,n,i,a,o){if(i==null){return}if(typeof i!=="object"&&!o){return}const s=k(i);if(s&&!o){return}if(false){}if(c(i)){const o=a&&t&&t.type_!==3/* Set */&&// Set objects are atomic since they have no keys.
!g(t.assigned_,n)?a.concat(n):void 0;const s=U(e,i,o);_(r,n,s);if(c(s)){e.canAutoFreeze_=false}else return}else if(o){r.add(i)}if(l(i)&&!s){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1){return}if(t&&t.base_&&t.base_[n]===i&&s){return}U(e,i);if((!t||!t.scope_.parent_)&&typeof n!=="symbol"&&(w(r)?r.has(n):Object.prototype.propertyIsEnumerable.call(r,n)))K(e,i)}}function K(e,t,r=false){if(!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_){O(t,r)}}// src/core/proxy.ts
function z(e,t){const r=Array.isArray(e);const n={type_:r?1/* Array */:0/* Object */,// Track which produce call this is associated with.
scope_:t?t.scope_:P(),// True for both shallow and deep changes.
modified_:false,// Used during finalization.
finalized_:false,// Track which properties have been assigned (true) or deleted (false).
assigned_:{},// The parent draft state.
parent_:t,// The base state.
base_:e,// The base proxy.
draft_:null,// set below
// The base copy with any updated values.
copy_:null,// Called by the `produce` function.
revoke_:null,isManual_:false};let i=n;let a=q;if(r){i=[n];a=V}const{revoke:o,proxy:s}=Proxy.revocable(i,a);n.draft_=s;n.revoke_=o;return s}var q={get(e,t){if(t===a)return e;const r=x(e);if(!g(r,t)){return G(e,r,t)}const n=r[t];if(e.finalized_||!l(n)){return n}if(n===W(e.base_,t)){X(e);return e.copy_[t]=Z(n,e)}return n},has(e,t){return t in x(e)},ownKeys(e){return Reflect.ownKeys(x(e))},set(e,t,r){const n=$(x(e),t);if(n?.set){n.set.call(e.draft_,r);return true}if(!e.modified_){const n=W(x(e),t);const i=n?.[a];if(i&&i.base_===r){e.copy_[t]=r;e.assigned_[t]=false;return true}if(y(r,n)&&(r!==void 0||g(e.base_,t)))return true;X(e);Q(e)}if(e.copy_[t]===r&&// special case: handle new props with value 'undefined'
(r!==void 0||t in e.copy_)||// special case: NaN
Number.isNaN(r)&&Number.isNaN(e.copy_[t]))return true;e.copy_[t]=r;e.assigned_[t]=true;return true},deleteProperty(e,t){if(W(e.base_,t)!==void 0||t in e.base_){e.assigned_[t]=false;X(e);Q(e)}else{delete e.assigned_[t]}if(e.copy_){delete e.copy_[t]}return true},// Note: We never coerce `desc.value` into an Immer draft, because we can't make
// the same guarantee in ES5 mode.
getOwnPropertyDescriptor(e,t){const r=x(e);const n=Reflect.getOwnPropertyDescriptor(r,t);if(!n)return n;return{writable:true,configurable:e.type_!==1/* Array */||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty(){s(11)},getPrototypeOf(e){return u(e.base_)},setPrototypeOf(){s(12)}};var V={};v(q,(e,t)=>{V[e]=function(){arguments[0]=arguments[0][0];return t.apply(this,arguments)}});V.deleteProperty=function(e,t){if(false){}return V.set.call(this,e,t,void 0)};V.set=function(e,t,r){if(false){}return q.set.call(this,e[0],t,r,e[0])};function W(e,t){const r=e[a];const n=r?x(r):e;return n[t]}function G(e,t,r){const n=$(t,r);return n?`value`in n?n.value:// This is a very special case, if the prop is a getter defined by the
// prototype, we should invoke it with the draft as context!
n.get?.call(e.draft_):void 0}function $(e,t){if(!(t in e))return void 0;let r=u(e);while(r){const e=Object.getOwnPropertyDescriptor(r,t);if(e)return e;r=u(r)}return void 0}function Q(e){if(!e.modified_){e.modified_=true;if(e.parent_){Q(e.parent_)}}}function X(e){if(!e.copy_){e.copy_=E(e.base_,e.scope_.immer_.useStrictShallowCopy_)}}// src/core/immerClass.ts
var J=class{constructor(e){this.autoFreeze_=true;this.useStrictShallowCopy_=false;this.useStrictIteration_=true;/**
     * The `produce` function takes a value and a "recipe function" (whose
     * return value often depends on the base state). The recipe function is
     * free to mutate its first argument however it wants. All mutations are
     * only ever applied to a __copy__ of the base state.
     *
     * Pass only a function to create a "curried producer" which relieves you
     * from passing the recipe function every time.
     *
     * Only plain objects and arrays are made mutable. All other objects are
     * considered uncopyable.
     *
     * Note: This function is __bound__ to its `Immer` instance.
     *
     * @param {any} base - the initial state
     * @param {Function} recipe - function that receives a proxy of the base state as first argument and which can be freely modified
     * @param {Function} patchListener - optional function that will be called with all the patches produced here
     * @returns {any} a new state, or the initial state if nothing was modified
     */this.produce=(e,t,r)=>{if(typeof e==="function"&&typeof t!=="function"){const r=t;t=e;const n=this;return function e(i=r,...a){return n.produce(i,e=>t.call(this,e,...a))}}if(typeof t!=="function")s(6);if(r!==void 0&&typeof r!=="function")s(7);let i;if(l(e)){const n=N(this);const a=Z(e,void 0);let o=true;try{i=t(a);o=false}finally{if(o)Y(n);else L(n)}F(n,r);return j(i,n)}else if(!e||typeof e!=="object"){i=t(e);if(i===void 0)i=e;if(i===n)i=void 0;if(this.autoFreeze_)O(i,true);if(r){const t=[];const n=[];I("Patches").generateReplacementPatches_(e,i,t,n);r(t,n)}return i}else s(1,e)};this.produceWithPatches=(e,t)=>{if(typeof e==="function"){return(t,...r)=>this.produceWithPatches(t,t=>e(t,...r))}let r,n;const i=this.produce(e,t,(e,t)=>{r=e;n=t});return[i,r,n]};if(typeof e?.autoFreeze==="boolean")this.setAutoFreeze(e.autoFreeze);if(typeof e?.useStrictShallowCopy==="boolean")this.setUseStrictShallowCopy(e.useStrictShallowCopy);if(typeof e?.useStrictIteration==="boolean")this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){if(!l(e))s(8);if(c(e))e=ee(e);const t=N(this);const r=Z(e,void 0);r[a].isManual_=true;L(t);return r}finishDraft(e,t){const r=e&&e[a];if(!r||!r.isManual_)s(9);const{scope_:n}=r;F(n,t);return j(void 0,n)}/**
   * Pass true to automatically freeze all copies created by Immer.
   *
   * By default, auto-freezing is enabled.
   */setAutoFreeze(e){this.autoFreeze_=e}/**
   * Pass true to enable strict shallow copy.
   *
   * By default, immer does not copy the object descriptors such as getter, setter and non-enumrable properties.
   */setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}/**
   * Pass false to use faster iteration that skips non-enumerable properties
   * but still handles symbols for compatibility.
   *
   * By default, strict iteration is enabled (includes all own properties).
   */setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){const n=t[r];if(n.path.length===0&&n.op==="replace"){e=n.value;break}}if(r>-1){t=t.slice(r+1)}const n=I("Patches").applyPatches_;if(c(e)){return n(e,t)}return this.produce(e,e=>n(e,t))}};function Z(e,t){const r=w(e)?I("MapSet").proxyMap_(e,t):A(e)?I("MapSet").proxySet_(e,t):z(e,t);const n=t?t.scope_:P();n.drafts_.push(r);return r}// src/core/current.ts
function ee(e){if(!c(e))s(10,e);return et(e)}function et(e){if(!l(e)||k(e))return e;const t=e[a];let r;let n=true;if(t){if(!t.modified_)return t.base_;t.finalized_=true;r=E(e,t.scope_.immer_.useStrictShallowCopy_);n=t.scope_.immer_.shouldUseStrictIteration()}else{r=E(e,true)}v(r,(e,t)=>{_(r,e,et(t))},n);if(t){t.finalized_=false}return r}// src/plugins/patches.ts
function er(){const e=16;if(false){}const t="replace";const r="add";const a="remove";function o(e,t,r,n){switch(e.type_){case 0/* Object */:case 2/* Map */:return f(e,t,r,n);case 1/* Array */:return d(e,t,r,n);case 3/* Set */:return p(e,t,r,n)}}function d(e,n,i,o){let{base_:s,assigned_:u}=e;let c=e.copy_;if(c.length<s.length){;[s,c]=[c,s];[i,o]=[o,i]}for(let e=0;e<s.length;e++){if(u[e]&&c[e]!==s[e]){const r=n.concat([e]);i.push({op:t,path:r,// Need to maybe clone it, as it can in fact be the original value
// due to the base/copy inversion at the start of this function
value:x(c[e])});o.push({op:t,path:r,value:x(s[e])})}}for(let e=s.length;e<c.length;e++){const t=n.concat([e]);i.push({op:r,path:t,// Need to maybe clone it, as it can in fact be the original value
// due to the base/copy inversion at the start of this function
value:x(c[e])})}for(let e=c.length-1;s.length<=e;--e){const t=n.concat([e]);o.push({op:a,path:t})}}function f(e,n,i,o){const{base_:s,copy_:u}=e;v(e.assigned_,(e,c)=>{const l=b(s,e);const d=b(u,e);const f=!c?a:g(s,e)?t:r;if(l===d&&f===t)return;const p=n.concat(e);i.push(f===a?{op:f,path:p}:{op:f,path:p,value:d});o.push(f===r?{op:a,path:p}:f===a?{op:r,path:p,value:x(l)}:{op:t,path:p,value:x(l)})})}function p(e,t,n,i){let{base_:o,copy_:s}=e;let u=0;o.forEach(e=>{if(!s.has(e)){const o=t.concat([u]);n.push({op:a,path:o,value:e});i.unshift({op:r,path:o,value:e})}u++});u=0;s.forEach(e=>{if(!o.has(e)){const o=t.concat([u]);n.push({op:r,path:o,value:e});i.unshift({op:a,path:o,value:e})}u++})}function h(e,r,i,a){i.push({op:t,path:[],value:r===n?void 0:r});a.push({op:t,path:[],value:e})}function _(n,i){i.forEach(i=>{const{path:o,op:u}=i;let c=n;for(let t=0;t<o.length-1;t++){const r=m(c);let n=o[t];if(typeof n!=="string"&&typeof n!=="number"){n=""+n}if((r===0/* Object */||r===1/* Array */)&&(n==="__proto__"||n==="constructor"))s(e+3);if(typeof c==="function"&&n==="prototype")s(e+3);c=b(c,n);if(typeof c!=="object")s(e+2,o.join("/"))}const l=m(c);const d=y(i.value);const f=o[o.length-1];switch(u){case t:switch(l){case 2/* Map */:return c.set(f,d);case 3/* Set */:s(e);default:return c[f]=d}case r:switch(l){case 1/* Array */:return f==="-"?c.push(d):c.splice(f,0,d);case 2/* Map */:return c.set(f,d);case 3/* Set */:return c.add(d);default:return c[f]=d}case a:switch(l){case 1/* Array */:return c.splice(f,1);case 2/* Map */:return c.delete(f);case 3/* Set */:return c.delete(i.value);default:return delete c[f]}default:s(e+1,u)}});return n}function y(e){if(!l(e))return e;if(Array.isArray(e))return e.map(y);if(w(e))return new Map(Array.from(e.entries()).map(([e,t])=>[e,y(t)]));if(A(e))return new Set(Array.from(e).map(y));const t=Object.create(u(e));for(const r in e)t[r]=y(e[r]);if(g(e,i))t[i]=e[i];return t}function x(e){if(c(e)){return y(e)}else return e}R("Patches",{applyPatches_:_,generatePatches_:o,generateReplacementPatches_:h})}// src/plugins/mapset.ts
function en(){class e extends Map{constructor(e,t){super();this[a]={type_:2/* Map */,parent_:t,scope_:t?t.scope_:P(),modified_:false,finalized_:false,copy_:void 0,assigned_:void 0,base_:e,draft_:this,isManual_:false,revoked_:false}}get size(){return x(this[a]).size}has(e){return x(this[a]).has(e)}set(e,t){const n=this[a];u(n);if(!x(n).has(e)||x(n).get(e)!==t){r(n);Q(n);n.assigned_.set(e,true);n.copy_.set(e,t);n.assigned_.set(e,true)}return this}delete(e){if(!this.has(e)){return false}const t=this[a];u(t);r(t);Q(t);if(t.base_.has(e)){t.assigned_.set(e,false)}else{t.assigned_.delete(e)}t.copy_.delete(e);return true}clear(){const e=this[a];u(e);if(x(e).size){r(e);Q(e);e.assigned_=/* @__PURE__ */new Map;v(e.base_,t=>{e.assigned_.set(t,false)});e.copy_.clear()}}forEach(e,t){const r=this[a];x(r).forEach((r,n,i)=>{e.call(t,this.get(n),n,this)})}get(e){const t=this[a];u(t);const n=x(t).get(e);if(t.finalized_||!l(n)){return n}if(n!==t.base_.get(e)){return n}const i=Z(n,t);r(t);t.copy_.set(e,i);return i}keys(){return x(this[a]).keys()}values(){const e=this.keys();return{[Symbol.iterator]:()=>this.values(),next:()=>{const t=e.next();if(t.done)return t;const r=this.get(t.value);return{done:false,value:r}}}}entries(){const e=this.keys();return{[Symbol.iterator]:()=>this.entries(),next:()=>{const t=e.next();if(t.done)return t;const r=this.get(t.value);return{done:false,value:[t.value,r]}}}}[(a,Symbol.iterator)](){return this.entries()}}function t(t,r){return new e(t,r)}function r(e){if(!e.copy_){e.assigned_=/* @__PURE__ */new Map;e.copy_=new Map(e.base_)}}class n extends Set{constructor(e,t){super();this[a]={type_:3/* Set */,parent_:t,scope_:t?t.scope_:P(),modified_:false,finalized_:false,copy_:void 0,base_:e,draft_:this,drafts_:/* @__PURE__ */new Map,revoked_:false,isManual_:false}}get size(){return x(this[a]).size}has(e){const t=this[a];u(t);if(!t.copy_){return t.base_.has(e)}if(t.copy_.has(e))return true;if(t.drafts_.has(e)&&t.copy_.has(t.drafts_.get(e)))return true;return false}add(e){const t=this[a];u(t);if(!this.has(e)){o(t);Q(t);t.copy_.add(e)}return this}delete(e){if(!this.has(e)){return false}const t=this[a];u(t);o(t);Q(t);return t.copy_.delete(e)||(t.drafts_.has(e)?t.copy_.delete(t.drafts_.get(e)):/* istanbul ignore next */false)}clear(){const e=this[a];u(e);if(x(e).size){o(e);Q(e);e.copy_.clear()}}values(){const e=this[a];u(e);o(e);return e.copy_.values()}entries(){const e=this[a];u(e);o(e);return e.copy_.entries()}keys(){return this.values()}[(a,Symbol.iterator)](){return this.values()}forEach(e,t){const r=this.values();let n=r.next();while(!n.done){e.call(t,n.value,n.value,this);n=r.next()}}}function i(e,t){return new n(e,t)}function o(e){if(!e.copy_){e.copy_=/* @__PURE__ */new Set;e.base_.forEach(t=>{if(l(t)){const r=Z(t,e);e.drafts_.set(t,r);e.copy_.add(r)}else{e.copy_.add(t)}})}}function u(e){if(e.revoked_)s(3,JSON.stringify(x(e)))}R("MapSet",{proxyMap_:t,proxySet_:i})}// src/immer.ts
var ei=new J;var ea=ei.produce;var eo=/* @__PURE__ *//* unused pure expression or super */null&&ei.produceWithPatches.bind(ei);var es=/* @__PURE__ *//* unused pure expression or super */null&&ei.setAutoFreeze.bind(ei);var eu=/* @__PURE__ *//* unused pure expression or super */null&&ei.setUseStrictShallowCopy.bind(ei);var ec=/* @__PURE__ *//* unused pure expression or super */null&&ei.setUseStrictIteration.bind(ei);var el=/* @__PURE__ *//* unused pure expression or super */null&&ei.applyPatches.bind(ei);var ed=/* @__PURE__ *//* unused pure expression or super */null&&ei.createDraft.bind(ei);var ef=/* @__PURE__ *//* unused pure expression or super */null&&ei.finishDraft.bind(ei);function ep(e){return e}function eh(e){return e}//# sourceMappingURL=immer.mjs.map
},78346:function(e,t,r){"use strict";r.d(t,{FH:()=>F,Op:()=>T,as:()=>Y,jz:()=>ez,mN:()=>eq,xI:()=>L,xW:()=>S});/* import */var n=r(41594);var i=e=>e.type==="checkbox";var a=e=>e instanceof Date;var o=e=>e==null;const s=e=>typeof e==="object";var u=e=>!o(e)&&!Array.isArray(e)&&s(e)&&!a(e);var c=e=>u(e)&&e.target?i(e.target)?e.target.checked:e.target.value:e;var l=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e;var d=(e,t)=>e.has(l(t));var f=e=>{const t=e.constructor&&e.constructor.prototype;return u(t)&&t.hasOwnProperty("isPrototypeOf")};var p=typeof window!=="undefined"&&typeof window.HTMLElement!=="undefined"&&typeof document!=="undefined";function h(e){let t;const r=Array.isArray(e);const n=typeof FileList!=="undefined"?e instanceof FileList:false;if(e instanceof Date){t=new Date(e)}else if(!(p&&(e instanceof Blob||n))&&(r||u(e))){t=r?[]:Object.create(Object.getPrototypeOf(e));if(!r&&!f(e)){t=e}else{for(const r in e){if(e.hasOwnProperty(r)){t[r]=h(e[r])}}}}else{return e}return t}var v=e=>/^\w*$/.test(e);var m=e=>e===undefined;var g=e=>Array.isArray(e)?e.filter(Boolean):[];var b=e=>g(e.replace(/["|']|\]/g,"").split(/\.|\[/));var _=(e,t,r)=>{if(!t||!u(e)){return r}const n=(v(t)?[t]:b(t)).reduce((e,t)=>o(e)?e:e[t],e);return m(n)||n===e?m(e[t])?r:e[t]:n};var y=e=>typeof e==="boolean";var w=(e,t,r)=>{let n=-1;const i=v(t)?[t]:b(t);const a=i.length;const o=a-1;while(++n<a){const t=i[n];let a=r;if(n!==o){const r=e[t];a=u(r)||Array.isArray(r)?r:!isNaN(+i[n+1])?[]:{}}if(t==="__proto__"||t==="constructor"||t==="prototype"){return}e[t]=a;e=e[t]}};const A={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"};const x={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"};const E={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"};const O=n.createContext(null);O.displayName="HookFormContext";/**
 * This custom hook allows you to access the form context. useFormContext is intended to be used in deeply nested structures, where it would become inconvenient to pass the context as a prop. To be used with {@link FormProvider}.
 *
 * @remarks
 * [API](https://react-hook-form.com/docs/useformcontext) • [Demo](https://codesandbox.io/s/react-hook-form-v7-form-context-ytudi)
 *
 * @returns return all useForm methods
 *
 * @example
 * ```tsx
 * function App() {
 *   const methods = useForm();
 *   const onSubmit = data => console.log(data);
 *
 *   return (
 *     <FormProvider {...methods} >
 *       <form onSubmit={methods.handleSubmit(onSubmit)}>
 *         <NestedInput />
 *         <input type="submit" />
 *       </form>
 *     </FormProvider>
 *   );
 * }
 *
 *  function NestedInput() {
 *   const { register } = useFormContext(); // retrieve all hook methods
 *   return <input {...register("test")} />;
 * }
 * ```
 */const S=()=>n.useContext(O);/**
 * A provider component that propagates the `useForm` methods to all children components via [React Context](https://react.dev/reference/react/useContext) API. To be used with {@link useFormContext}.
 *
 * @remarks
 * [API](https://react-hook-form.com/docs/useformcontext) • [Demo](https://codesandbox.io/s/react-hook-form-v7-form-context-ytudi)
 *
 * @param props - all useForm methods
 *
 * @example
 * ```tsx
 * function App() {
 *   const methods = useForm();
 *   const onSubmit = data => console.log(data);
 *
 *   return (
 *     <FormProvider {...methods} >
 *       <form onSubmit={methods.handleSubmit(onSubmit)}>
 *         <NestedInput />
 *         <input type="submit" />
 *       </form>
 *     </FormProvider>
 *   );
 * }
 *
 *  function NestedInput() {
 *   const { register } = useFormContext(); // retrieve all hook methods
 *   return <input {...register("test")} />;
 * }
 * ```
 */const T=e=>{const{children:t,...r}=e;return n.createElement(O.Provider,{value:r},t)};var k=(e,t,r,n=true)=>{const i={defaultValues:t._defaultValues};for(const a in e){Object.defineProperty(i,a,{get:()=>{const i=a;if(t._proxyFormState[i]!==x.all){t._proxyFormState[i]=!n||x.all}r&&(r[i]=true);return e[i]}})}return i};const C=typeof window!=="undefined"?n.useLayoutEffect:n.useEffect;/**
 * This custom hook allows you to subscribe to each form state, and isolate the re-render at the custom hook level. It has its scope in terms of form state subscription, so it would not affect other useFormState and useForm. Using this hook can reduce the re-render impact on large and complex form application.
 *
 * @remarks
 * [API](https://react-hook-form.com/docs/useformstate) • [Demo](https://codesandbox.io/s/useformstate-75xly)
 *
 * @param props - include options on specify fields to subscribe. {@link UseFormStateReturn}
 *
 * @example
 * ```tsx
 * function App() {
 *   const { register, handleSubmit, control } = useForm({
 *     defaultValues: {
 *     firstName: "firstName"
 *   }});
 *   const { dirtyFields } = useFormState({
 *     control
 *   });
 *   const onSubmit = (data) => console.log(data);
 *
 *   return (
 *     <form onSubmit={handleSubmit(onSubmit)}>
 *       <input {...register("firstName")} placeholder="First Name" />
 *       {dirtyFields.firstName && <p>Field is dirty.</p>}
 *       <input type="submit" />
 *     </form>
 *   );
 * }
 * ```
 */function I(e){const t=S();const{control:r=t.control,disabled:i,name:a,exact:o}=e||{};const[s,u]=n.useState(r._formState);const c=n.useRef({isDirty:false,isLoading:false,dirtyFields:false,touchedFields:false,validatingFields:false,isValidating:false,isValid:false,errors:false});C(()=>r._subscribe({name:a,formState:c.current,exact:o,callback:e=>{!i&&u({...r._formState,...e})}}),[a,i,o]);n.useEffect(()=>{c.current.isValid&&r._setValid(true)},[r]);return n.useMemo(()=>k(s,r,c.current,false),[s,r])}var R=e=>typeof e==="string";var D=(e,t,r,n,i)=>{if(R(e)){n&&t.watch.add(e);return _(r,e,i)}if(Array.isArray(e)){return e.map(e=>(n&&t.watch.add(e),_(r,e)))}n&&(t.watchAll=true);return r};var P=e=>o(e)||!s(e);function M(e,t,r=new WeakSet){if(P(e)||P(t)){return Object.is(e,t)}if(a(e)&&a(t)){return e.getTime()===t.getTime()}const n=Object.keys(e);const i=Object.keys(t);if(n.length!==i.length){return false}if(r.has(e)||r.has(t)){return true}r.add(e);r.add(t);for(const o of n){const n=e[o];if(!i.includes(o)){return false}if(o!=="ref"){const e=t[o];if(a(n)&&a(e)||u(n)&&u(e)||Array.isArray(n)&&Array.isArray(e)?!M(n,e,r):!Object.is(n,e)){return false}}}return true}/**
 * Custom hook to subscribe to field change and isolate re-rendering at the component level.
 *
 * @remarks
 *
 * [API](https://react-hook-form.com/docs/usewatch) • [Demo](https://codesandbox.io/s/react-hook-form-v7-ts-usewatch-h9i5e)
 *
 * @example
 * ```tsx
 * const { control } = useForm();
 * const values = useWatch({
 *   name: "fieldName"
 *   control,
 * })
 * ```
 */function F(e){const t=S();const{control:r=t.control,name:i,defaultValue:a,disabled:o,exact:s,compute:u}=e||{};const c=n.useRef(a);const l=n.useRef(u);const d=n.useRef(undefined);const f=n.useRef(r);const p=n.useRef(i);l.current=u;const[h,v]=n.useState(()=>{const e=r._getWatch(i,c.current);return l.current?l.current(e):e});const m=n.useCallback(e=>{const t=D(i,r._names,e||r._formValues,false,c.current);return l.current?l.current(t):t},[r._formValues,r._names,i]);const g=n.useCallback(e=>{if(!o){const t=D(i,r._names,e||r._formValues,false,c.current);if(l.current){const e=l.current(t);if(!M(e,d.current)){v(e);d.current=e}}else{v(t)}}},[r._formValues,r._names,o,i]);C(()=>{if(f.current!==r||!M(p.current,i)){f.current=r;p.current=i;g()}return r._subscribe({name:i,formState:{values:true},exact:s,callback:e=>{g(e.values)}})},[r,s,i,g]);n.useEffect(()=>r._removeUnmounted());// If name or control changed for this render, synchronously reflect the
// latest value so callers (like useController) see the correct value
// immediately on the same render.
// Optimize: Check control reference first before expensive deepEqual
const b=f.current!==r;const _=p.current;// Cache the computed output to avoid duplicate calls within the same render
// We include shouldReturnImmediate in deps to ensure proper recomputation
const y=n.useMemo(()=>{if(o){return null}const e=!b&&!M(_,i);const t=b||e;return t?m():null},[o,b,i,_,m]);return y!==null?y:h}/**
 * Custom hook to work with controlled component, this function provide you with both form and field level state. Re-render is isolated at the hook level.
 *
 * @remarks
 * [API](https://react-hook-form.com/docs/usecontroller) • [Demo](https://codesandbox.io/s/usecontroller-0o8px)
 *
 * @param props - the path name to the form field value, and validation rules.
 *
 * @returns field properties, field and form state. {@link UseControllerReturn}
 *
 * @example
 * ```tsx
 * function Input(props) {
 *   const { field, fieldState, formState } = useController(props);
 *   return (
 *     <div>
 *       <input {...field} placeholder={props.name} />
 *       <p>{fieldState.isTouched && "Touched"}</p>
 *       <p>{formState.isSubmitted ? "submitted" : ""}</p>
 *     </div>
 *   );
 * }
 * ```
 */function Y(e){const t=S();const{name:r,disabled:i,control:a=t.control,shouldUnregister:o,defaultValue:s,exact:u=true}=e;const l=d(a._names.array,r);const f=n.useMemo(()=>_(a._formValues,r,_(a._defaultValues,r,s)),[a,r,s]);const p=F({control:a,name:r,defaultValue:f,exact:u});const v=I({control:a,name:r,exact:u});const g=n.useRef(e);const b=n.useRef(undefined);const x=n.useRef(a.register(r,{...e.rules,value:p,...y(e.disabled)?{disabled:e.disabled}:{}}));g.current=e;const E=n.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:true,get:()=>!!_(v.errors,r)},isDirty:{enumerable:true,get:()=>!!_(v.dirtyFields,r)},isTouched:{enumerable:true,get:()=>!!_(v.touchedFields,r)},isValidating:{enumerable:true,get:()=>!!_(v.validatingFields,r)},error:{enumerable:true,get:()=>_(v.errors,r)}}),[v,r]);const O=n.useCallback(e=>x.current.onChange({target:{value:c(e),name:r},type:A.CHANGE}),[r]);const T=n.useCallback(()=>x.current.onBlur({target:{value:_(a._formValues,r),name:r},type:A.BLUR}),[r,a._formValues]);const k=n.useCallback(e=>{const t=_(a._fields,r);if(t&&e){t._f.ref={focus:()=>e.focus&&e.focus(),select:()=>e.select&&e.select(),setCustomValidity:t=>e.setCustomValidity(t),reportValidity:()=>e.reportValidity()}}},[a._fields,r]);const C=n.useMemo(()=>({name:r,value:p,...y(i)||v.disabled?{disabled:v.disabled||i}:{},onChange:O,onBlur:T,ref:k}),[r,i,v.disabled,O,T,k,p]);n.useEffect(()=>{const e=a._options.shouldUnregister||o;const t=b.current;if(t&&t!==r&&!l){a.unregister(t)}a.register(r,{...g.current.rules,...y(g.current.disabled)?{disabled:g.current.disabled}:{}});const n=(e,t)=>{const r=_(a._fields,e);if(r&&r._f){r._f.mount=t}};n(r,true);if(e){const e=h(_(a._options.defaultValues,r,g.current.defaultValue));w(a._defaultValues,r,e);if(m(_(a._formValues,r))){w(a._formValues,r,e)}}!l&&a.register(r);b.current=r;return()=>{(l?e&&!a._state.action:e)?a.unregister(r):n(r,false)}},[r,a,l,o]);n.useEffect(()=>{a._setDisabledField({disabled:i,name:r})},[i,r,a]);return n.useMemo(()=>({field:C,formState:v,fieldState:E}),[C,v,E])}/**
 * Component based on `useController` hook to work with controlled component.
 *
 * @remarks
 * [API](https://react-hook-form.com/docs/usecontroller/controller) • [Demo](https://codesandbox.io/s/react-hook-form-v6-controller-ts-jwyzw) • [Video](https://www.youtube.com/watch?v=N2UNk_UCVyA)
 *
 * @param props - the path name to the form field value, and validation rules.
 *
 * @returns provide field handler functions, field and form state.
 *
 * @example
 * ```tsx
 * function App() {
 *   const { control } = useForm<FormValues>({
 *     defaultValues: {
 *       test: ""
 *     }
 *   });
 *
 *   return (
 *     <form>
 *       <Controller
 *         control={control}
 *         name="test"
 *         render={({ field: { onChange, onBlur, value, ref }, formState, fieldState }) => (
 *           <>
 *             <input
 *               onChange={onChange} // send value to hook form
 *               onBlur={onBlur} // notify when input is touched
 *               value={value} // return updated value
 *               ref={ref} // set ref for focus management
 *             />
 *             <p>{formState.isSubmitted ? "submitted" : ""}</p>
 *             <p>{fieldState.isTouched ? "touched" : ""}</p>
 *           </>
 *         )}
 *       />
 *     </form>
 *   );
 * }
 * ```
 */const L=e=>e.render(Y(e));const N=e=>{const t={};for(const r of Object.keys(e)){if(s(e[r])&&e[r]!==null){const n=N(e[r]);for(const e of Object.keys(n)){t[`${r}.${e}`]=n[e]}}else{t[r]=e[r]}}return t};const H="post";/**
 * Form component to manage submission.
 *
 * @param props - to setup submission detail. {@link FormProps}
 *
 * @returns form component or headless render prop.
 *
 * @example
 * ```tsx
 * function App() {
 *   const { control, formState: { errors } } = useForm();
 *
 *   return (
 *     <Form action="/api" control={control}>
 *       <input {...register("name")} />
 *       <p>{errors?.root?.server && 'Server error'}</p>
 *       <button>Submit</button>
 *     </Form>
 *   );
 * }
 * ```
 */function j(e){const t=S();const[r,n]=React.useState(false);const{control:i=t.control,onSubmit:a,children:o,action:s,method:u=H,headers:c,encType:l,onError:d,render:f,onSuccess:p,validateStatus:h,...v}=e;const m=async t=>{let r=false;let n="";await i.handleSubmit(async e=>{const o=new FormData;let f="";try{f=JSON.stringify(e)}catch(e){}const v=N(i._formValues);for(const e in v){o.append(e,v[e])}if(a){await a({data:e,event:t,method:u,formData:o,formDataJson:f})}if(s){try{const e=[c&&c["Content-Type"],l].some(e=>e&&e.includes("json"));const t=await fetch(String(s),{method:u,headers:{...c,...l&&l!=="multipart/form-data"?{"Content-Type":l}:{}},body:e?f:o});if(t&&(h?!h(t.status):t.status<200||t.status>=300)){r=true;d&&d({response:t});n=String(t.status)}else{p&&p({response:t})}}catch(e){r=true;d&&d({error:e})}}})(t);if(r&&e.control){e.control._subjects.state.next({isSubmitSuccessful:false});e.control.setError("root.server",{type:n})}};React.useEffect(()=>{n(true)},[]);return f?React.createElement(React.Fragment,null,f({submit:m})):React.createElement("form",{noValidate:r,action:s,method:u,encType:l,onSubmit:m,...v},o)}var U=(e,t,r,n,i)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:i||true}}:{};var B=e=>Array.isArray(e)?e:[e];var K=()=>{let e=[];const t=t=>{for(const r of e){r.next&&r.next(t)}};const r=t=>{e.push(t);return{unsubscribe:()=>{e=e.filter(e=>e!==t)}}};const n=()=>{e=[]};return{get observers(){return e},next:t,subscribe:r,unsubscribe:n}};function z(e,t){const r={};for(const n in e){if(e.hasOwnProperty(n)){const i=e[n];const a=t[n];if(i&&u(i)&&a){const e=z(i,a);if(u(e)){r[n]=e}}else if(e[n]){r[n]=a}}}return r}var q=e=>u(e)&&!Object.keys(e).length;var V=e=>e.type==="file";var W=e=>typeof e==="function";var G=e=>{if(!p){return false}const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)};var $=e=>e.type===`select-multiple`;var Q=e=>e.type==="radio";var X=e=>Q(e)||i(e);var J=e=>G(e)&&e.isConnected;function Z(e,t){const r=t.slice(0,-1).length;let n=0;while(n<r){e=m(e)?n++:e[t[n++]]}return e}function ee(e){for(const t in e){if(e.hasOwnProperty(t)&&!m(e[t])){return false}}return true}function et(e,t){const r=Array.isArray(t)?t:v(t)?[t]:b(t);const n=r.length===1?e:Z(e,r);const i=r.length-1;const a=r[i];if(n){delete n[a]}if(i!==0&&(u(n)&&q(n)||Array.isArray(n)&&ee(n))){et(e,r.slice(0,-1))}return e}var er=e=>{for(const t in e){if(W(e[t])){return true}}return false};function en(e){return Array.isArray(e)||u(e)&&!er(e)}function ei(e,t={}){for(const r in e){const n=e[r];if(en(n)){t[r]=Array.isArray(n)?[]:{};ei(n,t[r])}else if(!m(n)){t[r]=true}}return t}function ea(e,t,r){if(!r){r=ei(t)}for(const n in e){const i=e[n];if(en(i)){if(m(t)||P(r[n])){r[n]=ei(i,Array.isArray(i)?[]:{})}else{ea(i,o(t)?{}:t[n],r[n])}}else{const e=t[n];r[n]=!M(i,e)}}return r}const eo={value:false,isValid:false};const es={value:true,isValid:true};var eu=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(e=>e&&e.checked&&!e.disabled).map(e=>e.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!m(e[0].attributes.value)?m(e[0].value)||e[0].value===""?es:{value:e[0].value,isValid:true}:es:eo}return eo};var ec=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>m(e)?e:t?e===""?NaN:e?+e:e:r&&R(e)?new Date(e):n?n(e):e;const el={isValid:false,value:null};var ed=e=>Array.isArray(e)?e.reduce((e,t)=>t&&t.checked&&!t.disabled?{isValid:true,value:t.value}:e,el):el;function ef(e){const t=e.ref;if(V(t)){return t.files}if(Q(t)){return ed(e.refs).value}if($(t)){return[...t.selectedOptions].map(({value:e})=>e)}if(i(t)){return eu(e.refs).value}return ec(m(t.value)?e.ref.value:t.value,e)}var ep=(e,t,r,n)=>{const i={};for(const r of e){const e=_(t,r);e&&w(i,r,e._f)}return{criteriaMode:r,names:[...e],fields:i,shouldUseNativeValidation:n}};var eh=e=>e instanceof RegExp;var ev=e=>m(e)?e:eh(e)?e.source:u(e)?eh(e.value)?e.value.source:e.value:e;var em=e=>({isOnSubmit:!e||e===x.onSubmit,isOnBlur:e===x.onBlur,isOnChange:e===x.onChange,isOnAll:e===x.all,isOnTouch:e===x.onTouched});const eg="AsyncFunction";var eb=e=>!!e&&!!e.validate&&!!(W(e.validate)&&e.validate.constructor.name===eg||u(e.validate)&&Object.values(e.validate).find(e=>e.constructor.name===eg));var e_=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);var ey=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(t=>e.startsWith(t)&&/^\.\w+/.test(e.slice(t.length))));const ew=(e,t,r,n)=>{for(const i of r||Object.keys(e)){const r=_(e,i);if(r){const{_f:e,...a}=r;if(e){if(e.refs&&e.refs[0]&&t(e.refs[0],i)&&!n){return true}else if(e.ref&&t(e.ref,e.name)&&!n){return true}else{if(ew(a,t)){break}}}else if(u(a)){if(ew(a,t)){break}}}}return};function eA(e,t,r){const n=_(e,r);if(n||v(r)){return{error:n,name:r}}const i=r.split(".");while(i.length){const n=i.join(".");const a=_(t,n);const o=_(e,n);if(a&&!Array.isArray(a)&&r!==n){return{name:r}}if(o&&o.type){return{name:n,error:o}}if(o&&o.root&&o.root.type){return{name:`${n}.root`,error:o.root}}i.pop()}return{name:r}}var ex=(e,t,r,n)=>{r(e);const{name:i,...a}=e;return q(a)||Object.keys(a).length>=Object.keys(t).length||Object.keys(a).find(e=>t[e]===(!n||x.all))};var eE=(e,t,r)=>!e||!t||e===t||B(e).some(e=>e&&(r?e===t:e.startsWith(t)||t.startsWith(e)));var eO=(e,t,r,n,i)=>{if(i.isOnAll){return false}else if(!r&&i.isOnTouch){return!(t||e)}else if(r?n.isOnBlur:i.isOnBlur){return!e}else if(r?n.isOnChange:i.isOnChange){return e}return true};var eS=(e,t)=>!g(_(e,t)).length&&et(e,t);var eT=(e,t,r)=>{const n=B(_(e,r));w(n,"root",t[r]);w(e,r,n);return e};function ek(e,t,r="validate"){if(R(e)||Array.isArray(e)&&e.every(R)||y(e)&&!e){return{type:r,message:R(e)?e:"",ref:t}}}var eC=e=>u(e)&&!eh(e)?e:{value:e,message:""};var eI=async(e,t,r,n,a,s)=>{const{ref:c,refs:l,required:d,maxLength:f,minLength:p,min:h,max:v,pattern:g,validate:b,name:w,valueAsNumber:A,mount:x}=e._f;const O=_(r,w);if(!x||t.has(w)){return{}}const S=l?l[0]:c;const T=e=>{if(a&&S.reportValidity){S.setCustomValidity(y(e)?"":e||"");S.reportValidity()}};const k={};const C=Q(c);const I=i(c);const D=C||I;const P=(A||V(c))&&m(c.value)&&m(O)||G(c)&&c.value===""||O===""||Array.isArray(O)&&!O.length;const M=U.bind(null,w,n,k);const F=(e,t,r,n=E.maxLength,i=E.minLength)=>{const a=e?t:r;k[w]={type:e?n:i,message:a,ref:c,...M(e?n:i,a)}};if(s?!Array.isArray(O)||!O.length:d&&(!D&&(P||o(O))||y(O)&&!O||I&&!eu(l).isValid||C&&!ed(l).isValid)){const{value:e,message:t}=R(d)?{value:!!d,message:d}:eC(d);if(e){k[w]={type:E.required,message:t,ref:S,...M(E.required,t)};if(!n){T(t);return k}}}if(!P&&(!o(h)||!o(v))){let e;let t;const r=eC(v);const i=eC(h);if(!o(O)&&!isNaN(O)){const n=c.valueAsNumber||(O?+O:O);if(!o(r.value)){e=n>r.value}if(!o(i.value)){t=n<i.value}}else{const n=c.valueAsDate||new Date(O);const a=e=>new Date(new Date().toDateString()+" "+e);const o=c.type=="time";const s=c.type=="week";if(R(r.value)&&O){e=o?a(O)>a(r.value):s?O>r.value:n>new Date(r.value)}if(R(i.value)&&O){t=o?a(O)<a(i.value):s?O<i.value:n<new Date(i.value)}}if(e||t){F(!!e,r.message,i.message,E.max,E.min);if(!n){T(k[w].message);return k}}}if((f||p)&&!P&&(R(O)||s&&Array.isArray(O))){const e=eC(f);const t=eC(p);const r=!o(e.value)&&O.length>+e.value;const i=!o(t.value)&&O.length<+t.value;if(r||i){F(r,e.message,t.message);if(!n){T(k[w].message);return k}}}if(g&&!P&&R(O)){const{value:e,message:t}=eC(g);if(eh(e)&&!O.match(e)){k[w]={type:E.pattern,message:t,ref:c,...M(E.pattern,t)};if(!n){T(t);return k}}}if(b){if(W(b)){const e=await b(O,r);const t=ek(e,S);if(t){k[w]={...t,...M(E.validate,t.message)};if(!n){T(t.message);return k}}}else if(u(b)){let e={};for(const t in b){if(!q(e)&&!n){break}const i=ek(await b[t](O,r),S,t);if(i){e={...i,...M(t,i.message)};T(i.message);if(n){k[w]=e}}}if(!q(e)){k[w]={ref:S,...e};if(!n){return k}}}}T(true);return k};const eR={mode:x.onSubmit,reValidateMode:x.onChange,shouldFocusError:true};function eD(e={}){let t={...eR,...e};let r={submitCount:0,isDirty:false,isReady:false,isLoading:W(t.defaultValues),isValidating:false,isSubmitted:false,isSubmitting:false,isSubmitSuccessful:false,isValid:false,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||false};let n={};let s=u(t.defaultValues)||u(t.values)?h(t.defaultValues||t.values)||{}:{};let l=t.shouldUnregister?{}:h(s);let f={action:false,mount:false,watch:false};let v={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set};let b;let E=0;const O={isDirty:false,dirtyFields:false,validatingFields:false,touchedFields:false,isValidating:false,isValid:false,errors:false};let S={...O};const T={array:K(),state:K()};const k=t.criteriaMode===x.all;const C=e=>t=>{clearTimeout(E);E=setTimeout(e,t)};const I=async e=>{if(!t.disabled&&(O.isValid||S.isValid||e)){const e=t.resolver?q((await U()).errors):await Z(n,true);if(e!==r.isValid){T.state.next({isValid:e})}}};const P=(e,n)=>{if(!t.disabled&&(O.isValidating||O.validatingFields||S.isValidating||S.validatingFields)){(e||Array.from(v.mount)).forEach(e=>{if(e){n?w(r.validatingFields,e,n):et(r.validatingFields,e)}});T.state.next({validatingFields:r.validatingFields,isValidating:!q(r.validatingFields)})}};const F=(e,i=[],a,o,u=true,c=true)=>{if(o&&a&&!t.disabled){f.action=true;if(c&&Array.isArray(_(n,e))){const t=a(_(n,e),o.argA,o.argB);u&&w(n,e,t)}if(c&&Array.isArray(_(r.errors,e))){const t=a(_(r.errors,e),o.argA,o.argB);u&&w(r.errors,e,t);eS(r.errors,e)}if((O.touchedFields||S.touchedFields)&&c&&Array.isArray(_(r.touchedFields,e))){const t=a(_(r.touchedFields,e),o.argA,o.argB);u&&w(r.touchedFields,e,t)}if(O.dirtyFields||S.dirtyFields){r.dirtyFields=ea(s,l)}T.state.next({name:e,isDirty:er(e,i),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else{w(l,e,i)}};const Y=(e,t)=>{w(r.errors,e,t);T.state.next({errors:r.errors})};const L=e=>{r.errors=e;T.state.next({errors:r.errors,isValid:false})};const N=(e,t,r,i)=>{const a=_(n,e);if(a){const n=_(l,e,m(r)?_(s,e):r);m(n)||i&&i.defaultChecked||t?w(l,e,t?n:ef(a._f)):eo(e,n);f.mount&&!f.action&&I()}};const H=(e,n,i,a,o)=>{let u=false;let c=false;const l={name:e};if(!t.disabled){if(!i||a){if(O.isDirty||S.isDirty){c=r.isDirty;r.isDirty=l.isDirty=er();u=c!==l.isDirty}const t=M(_(s,e),n);c=!!_(r.dirtyFields,e);t?et(r.dirtyFields,e):w(r.dirtyFields,e,true);l.dirtyFields=r.dirtyFields;u=u||(O.dirtyFields||S.dirtyFields)&&c!==!t}if(i){const t=_(r.touchedFields,e);if(!t){w(r.touchedFields,e,i);l.touchedFields=r.touchedFields;u=u||(O.touchedFields||S.touchedFields)&&t!==i}}u&&o&&T.state.next(l)}return u?l:{}};const j=(e,n,i,a)=>{const o=_(r.errors,e);const s=(O.isValid||S.isValid)&&y(n)&&r.isValid!==n;if(t.delayError&&i){b=C(()=>Y(e,i));b(t.delayError)}else{clearTimeout(E);b=null;i?w(r.errors,e,i):et(r.errors,e)}if((i?!M(o,i):o)||!q(a)||s){const t={...a,...s&&y(n)?{isValid:n}:{},errors:r.errors,name:e};r={...r,...t};T.state.next(t)}};const U=async e=>{P(e,true);const r=await t.resolver(l,t.context,ep(e||v.mount,n,t.criteriaMode,t.shouldUseNativeValidation));P(e);return r};const Q=async e=>{const{errors:t}=await U(e);if(e){for(const n of e){const e=_(t,n);e?w(r.errors,n,e):et(r.errors,n)}}else{r.errors=t}return t};const Z=async(e,n,i={valid:true})=>{for(const a in e){const o=e[a];if(o){const{_f:e,...a}=o;if(e){const a=v.array.has(e.name);const s=o._f&&eb(o._f);if(s&&O.validatingFields){P([e.name],true)}const u=await eI(o,v.disabled,l,k,t.shouldUseNativeValidation&&!n,a);if(s&&O.validatingFields){P([e.name])}if(u[e.name]){i.valid=false;if(n){break}}!n&&(_(u,e.name)?a?eT(r.errors,u,e.name):w(r.errors,e.name,u[e.name]):et(r.errors,e.name))}!q(a)&&await Z(a,n,i)}}return i.valid};const ee=()=>{for(const e of v.unMount){const t=_(n,e);t&&(t._f.refs?t._f.refs.every(e=>!J(e)):!J(t._f.ref))&&eL(e)}v.unMount=new Set};const er=(e,r)=>!t.disabled&&(e&&r&&w(l,e,r),!M(eg(),s));const en=(e,t,r)=>D(e,v,{...f.mount?l:m(t)?s:R(e)?{[e]:t}:t},r,t);const ei=e=>g(_(f.mount?l:s,e,t.shouldUnregister?_(s,e,[]):[]));const eo=(e,t,r={})=>{const a=_(n,e);let s=t;if(a){const r=a._f;if(r){!r.disabled&&w(l,e,ec(t,r));s=G(r.ref)&&o(t)?"":t;if($(r.ref)){[...r.ref.options].forEach(e=>e.selected=s.includes(e.value))}else if(r.refs){if(i(r.ref)){r.refs.forEach(e=>{if(!e.defaultChecked||!e.disabled){if(Array.isArray(s)){e.checked=!!s.find(t=>t===e.value)}else{e.checked=s===e.value||!!s}}})}else{r.refs.forEach(e=>e.checked=e.value===s)}}else if(V(r.ref)){r.ref.value=""}else{r.ref.value=s;if(!r.ref.type){T.state.next({name:e,values:h(l)})}}}}(r.shouldDirty||r.shouldTouch)&&H(e,s,r.shouldTouch,r.shouldDirty,true);r.shouldValidate&&eh(e)};const es=(e,t,r)=>{for(const i in t){if(!t.hasOwnProperty(i)){return}const o=t[i];const s=e+"."+i;const c=_(n,s);(v.array.has(e)||u(o)||c&&!c._f)&&!a(o)?es(s,o,r):eo(s,o,r)}};const eu=(e,t,i={})=>{const a=_(n,e);const u=v.array.has(e);const c=h(t);w(l,e,c);if(u){T.array.next({name:e,values:h(l)});if((O.isDirty||O.dirtyFields||S.isDirty||S.dirtyFields)&&i.shouldDirty){T.state.next({name:e,dirtyFields:ea(s,l),isDirty:er(e,c)})}}else{a&&!a._f&&!o(c)?es(e,c,i):eo(e,c,i)}ey(e,v)&&T.state.next({...r,name:e});T.state.next({name:f.mount?e:undefined,values:h(l)})};const el=async e=>{f.mount=true;const i=e.target;let o=i.name;let s=true;const u=_(n,o);const d=e=>{s=Number.isNaN(e)||a(e)&&isNaN(e.getTime())||M(e,_(l,o,e))};const p=em(t.mode);const m=em(t.reValidateMode);if(u){let a;let f;const g=i.type?ef(u._f):c(e);const y=e.type===A.BLUR||e.type===A.FOCUS_OUT;const x=!e_(u._f)&&!t.resolver&&!_(r.errors,o)&&!u._f.deps||eO(y,_(r.touchedFields,o),r.isSubmitted,m,p);const E=ey(o,v,y);w(l,o,g);if(y){if(!i||!i.readOnly){u._f.onBlur&&u._f.onBlur(e);b&&b(0)}}else if(u._f.onChange){u._f.onChange(e)}const C=H(o,g,y);const R=!q(C)||E;!y&&T.state.next({name:o,type:e.type,values:h(l)});if(x){if(O.isValid||S.isValid){if(t.mode==="onBlur"){if(y){I()}}else if(!y){I()}}return R&&T.state.next({name:o,...E?{}:C})}!y&&E&&T.state.next({...r});if(t.resolver){const{errors:e}=await U([o]);d(g);if(s){const t=eA(r.errors,n,o);const i=eA(e,n,t.name||o);a=i.error;o=i.name;f=q(e)}}else{P([o],true);a=(await eI(u,v.disabled,l,k,t.shouldUseNativeValidation))[o];P([o]);d(g);if(s){if(a){f=false}else if(O.isValid||S.isValid){f=await Z(n,true)}}}if(s){u._f.deps&&(!Array.isArray(u._f.deps)||u._f.deps.length>0)&&eh(u._f.deps);j(o,f,a,C)}}};const ed=(e,t)=>{if(_(r.errors,t)&&e.focus){e.focus();return 1}return};const eh=async(e,i={})=>{let a;let o;const s=B(e);if(t.resolver){const t=await Q(m(e)?e:s);a=q(t);o=e?!s.some(e=>_(t,e)):a}else if(e){o=(await Promise.all(s.map(async e=>{const t=_(n,e);return await Z(t&&t._f?{[e]:t}:t)}))).every(Boolean);!(!o&&!r.isValid)&&I()}else{o=a=await Z(n)}T.state.next({...!R(e)||(O.isValid||S.isValid)&&a!==r.isValid?{}:{name:e},...t.resolver||!e?{isValid:a}:{},errors:r.errors});i.shouldFocus&&!o&&ew(n,ed,e?s:v.mount);return o};const eg=(e,t)=>{let n={...f.mount?l:s};if(t){n=z(t.dirtyFields?r.dirtyFields:r.touchedFields,n)}return m(e)?n:R(e)?_(n,e):e.map(e=>_(n,e))};const ek=(e,t)=>({invalid:!!_((t||r).errors,e),isDirty:!!_((t||r).dirtyFields,e),error:_((t||r).errors,e),isValidating:!!_(r.validatingFields,e),isTouched:!!_((t||r).touchedFields,e)});const eC=e=>{e&&B(e).forEach(e=>et(r.errors,e));T.state.next({errors:e?r.errors:{}})};const eP=(e,t,i)=>{const a=(_(n,e,{_f:{}})._f||{}).ref;const o=_(r.errors,e)||{};// Don't override existing error messages elsewhere in the object tree.
const{ref:s,message:u,type:c,...l}=o;w(r.errors,e,{...l,...t,ref:a});T.state.next({name:e,errors:r.errors,isValid:false});i&&i.shouldFocus&&a&&a.focus&&a.focus()};const eM=(e,t)=>W(e)?T.state.subscribe({next:r=>"values"in r&&e(en(undefined,t),r)}):en(e,t,true);const eF=e=>T.state.subscribe({next:t=>{if(eE(e.name,t.name,e.exact)&&ex(t,e.formState||O,eW,e.reRenderRoot)){e.callback({values:{...l},...r,...t,defaultValues:s})}}}).unsubscribe;const eY=e=>{f.mount=true;S={...S,...e.formState};return eF({...e,formState:S})};const eL=(e,i={})=>{for(const a of e?B(e):v.mount){v.mount.delete(a);v.array.delete(a);if(!i.keepValue){et(n,a);et(l,a)}!i.keepError&&et(r.errors,a);!i.keepDirty&&et(r.dirtyFields,a);!i.keepTouched&&et(r.touchedFields,a);!i.keepIsValidating&&et(r.validatingFields,a);!t.shouldUnregister&&!i.keepDefaultValue&&et(s,a)}T.state.next({values:h(l)});T.state.next({...r,...!i.keepDirty?{}:{isDirty:er()}});!i.keepIsValid&&I()};const eN=({disabled:e,name:t})=>{if(y(e)&&f.mount||!!e||v.disabled.has(t)){e?v.disabled.add(t):v.disabled.delete(t)}};const eH=(e,r={})=>{let i=_(n,e);const a=y(r.disabled)||y(t.disabled);w(n,e,{...i||{},_f:{...i&&i._f?i._f:{ref:{name:e}},name:e,mount:true,...r}});v.mount.add(e);if(i){eN({disabled:y(r.disabled)?r.disabled:t.disabled,name:e})}else{N(e,true,r.value)}return{...a?{disabled:r.disabled||t.disabled}:{},...t.progressive?{required:!!r.required,min:ev(r.min),max:ev(r.max),minLength:ev(r.minLength),maxLength:ev(r.maxLength),pattern:ev(r.pattern)}:{},name:e,onChange:el,onBlur:el,ref:a=>{if(a){eH(e,r);i=_(n,e);const t=m(a.value)?a.querySelectorAll?a.querySelectorAll("input,select,textarea")[0]||a:a:a;const o=X(t);const u=i._f.refs||[];if(o?u.find(e=>e===t):t===i._f.ref){return}w(n,e,{_f:{...i._f,...o?{refs:[...u.filter(J),t,...Array.isArray(_(s,e))?[{}]:[]],ref:{type:t.type,name:e}}:{ref:t}}});N(e,false,undefined,t)}else{i=_(n,e,{});if(i._f){i._f.mount=false}(t.shouldUnregister||r.shouldUnregister)&&!(d(v.array,e)&&f.action)&&v.unMount.add(e)}}}};const ej=()=>t.shouldFocusError&&ew(n,ed,v.mount);const eU=e=>{if(y(e)){T.state.next({disabled:e});ew(n,(t,r)=>{const i=_(n,r);if(i){t.disabled=i._f.disabled||e;if(Array.isArray(i._f.refs)){i._f.refs.forEach(t=>{t.disabled=i._f.disabled||e})}}},0,false)}};const eB=(e,i)=>async a=>{let o=undefined;if(a){a.preventDefault&&a.preventDefault();a.persist&&a.persist()}let s=h(l);T.state.next({isSubmitting:true});if(t.resolver){const{errors:e,values:t}=await U();r.errors=e;s=h(t)}else{await Z(n)}if(v.disabled.size){for(const e of v.disabled){et(s,e)}}et(r.errors,"root");if(q(r.errors)){T.state.next({errors:{}});try{await e(s,a)}catch(e){o=e}}else{if(i){await i({...r.errors},a)}ej();setTimeout(ej)}T.state.next({isSubmitted:true,isSubmitting:false,isSubmitSuccessful:q(r.errors)&&!o,submitCount:r.submitCount+1,errors:r.errors});if(o){throw o}};const eK=(e,t={})=>{if(_(n,e)){if(m(t.defaultValue)){eu(e,h(_(s,e)))}else{eu(e,t.defaultValue);w(s,e,h(t.defaultValue))}if(!t.keepTouched){et(r.touchedFields,e)}if(!t.keepDirty){et(r.dirtyFields,e);r.isDirty=t.defaultValue?er(e,h(_(s,e))):er()}if(!t.keepError){et(r.errors,e);O.isValid&&I()}T.state.next({...r})}};const ez=(e,i={})=>{const a=e?h(e):s;const o=h(a);const u=q(e);const c=u?s:o;if(!i.keepDefaultValues){s=a}if(!i.keepValues){if(i.keepDirtyValues){const e=new Set([...v.mount,...Object.keys(ea(s,l))]);for(const t of Array.from(e)){_(r.dirtyFields,t)?w(c,t,_(l,t)):eu(t,_(c,t))}}else{if(p&&m(e)){for(const e of v.mount){const t=_(n,e);if(t&&t._f){const e=Array.isArray(t._f.refs)?t._f.refs[0]:t._f.ref;if(G(e)){const t=e.closest("form");if(t){t.reset();break}}}}}if(i.keepFieldsRef){for(const e of v.mount){eu(e,_(c,e))}}else{n={}}}l=t.shouldUnregister?i.keepDefaultValues?h(s):{}:h(c);T.array.next({values:{...c}});T.state.next({values:{...c}})}v={mount:i.keepDirtyValues?v.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:false,focus:""};f.mount=!O.isValid||!!i.keepIsValid||!!i.keepDirtyValues||!t.shouldUnregister&&!q(c);f.watch=!!t.shouldUnregister;T.state.next({submitCount:i.keepSubmitCount?r.submitCount:0,isDirty:u?false:i.keepDirty?r.isDirty:!!(i.keepDefaultValues&&!M(e,s)),isSubmitted:i.keepIsSubmitted?r.isSubmitted:false,dirtyFields:u?{}:i.keepDirtyValues?i.keepDefaultValues&&l?ea(s,l):r.dirtyFields:i.keepDefaultValues&&e?ea(s,e):i.keepDirty?r.dirtyFields:{},touchedFields:i.keepTouched?r.touchedFields:{},errors:i.keepErrors?r.errors:{},isSubmitSuccessful:i.keepIsSubmitSuccessful?r.isSubmitSuccessful:false,isSubmitting:false,defaultValues:s})};const eq=(e,t)=>ez(W(e)?e(l):e,t);const eV=(e,t={})=>{const r=_(n,e);const i=r&&r._f;if(i){const e=i.refs?i.refs[0]:i.ref;if(e.focus){e.focus();t.shouldSelect&&W(e.select)&&e.select()}}};const eW=e=>{r={...r,...e}};const eG=()=>W(t.defaultValues)&&t.defaultValues().then(e=>{eq(e,t.resetOptions);T.state.next({isLoading:false})});const e$={control:{register:eH,unregister:eL,getFieldState:ek,handleSubmit:eB,setError:eP,_subscribe:eF,_runSchema:U,_focusError:ej,_getWatch:en,_getDirty:er,_setValid:I,_setFieldArray:F,_setDisabledField:eN,_setErrors:L,_getFieldArray:ei,_reset:ez,_resetDefaultValues:eG,_removeUnmounted:ee,_disableForm:eU,_subjects:T,_proxyFormState:O,get _fields(){return n},get _formValues(){return l},get _state(){return f},set _state(value){f=value},get _defaultValues(){return s},get _names(){return v},set _names(value){v=value},get _formState(){return r},get _options(){return t},set _options(value){t={...t,...value}}},subscribe:eY,trigger:eh,register:eH,handleSubmit:eB,watch:eM,setValue:eu,getValues:eg,reset:eq,resetField:eK,clearErrors:eC,unregister:eL,setError:eP,setFocus:eV,getFieldState:ek};return{...e$,formControl:e$}}var eP=()=>{if(typeof crypto!=="undefined"&&crypto.randomUUID){return crypto.randomUUID()}const e=typeof performance==="undefined"?Date.now():performance.now()*1e3;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const r=(Math.random()*16+e)%16|0;return(t=="x"?r:r&3|8).toString(16)})};var eM=(e,t,r={})=>r.shouldFocus||m(r.shouldFocus)?r.focusName||`${e}.${m(r.focusIndex)?t:r.focusIndex}.`:"";var eF=(e,t)=>[...e,...B(t)];var eY=e=>Array.isArray(e)?e.map(()=>undefined):undefined;function eL(e,t,r){return[...e.slice(0,t),...B(r),...e.slice(t)]}var eN=(e,t,r)=>{if(!Array.isArray(e)){return[]}if(m(e[r])){e[r]=undefined}e.splice(r,0,e.splice(t,1)[0]);return e};var eH=(e,t)=>[...B(t),...B(e)];function ej(e,t){let r=0;const n=[...e];for(const e of t){n.splice(e-r,1);r++}return g(n).length?n:[]}var eU=(e,t)=>m(t)?[]:ej(e,B(t).sort((e,t)=>e-t));var eB=(e,t,r)=>{[e[t],e[r]]=[e[r],e[t]]};var eK=(e,t,r)=>{e[t]=r;return e};/**
 * A custom hook that exposes convenient methods to perform operations with a list of dynamic inputs that need to be appended, updated, removed etc. • [Demo](https://codesandbox.io/s/react-hook-form-usefieldarray-ssugn) • [Video](https://youtu.be/4MrbfGSFY2A)
 *
 * @remarks
 * [API](https://react-hook-form.com/docs/usefieldarray) • [Demo](https://codesandbox.io/s/react-hook-form-usefieldarray-ssugn)
 *
 * @param props - useFieldArray props
 *
 * @returns methods - functions to manipulate with the Field Arrays (dynamic inputs) {@link UseFieldArrayReturn}
 *
 * @example
 * ```tsx
 * function App() {
 *   const { register, control, handleSubmit, reset, trigger, setError } = useForm({
 *     defaultValues: {
 *       test: []
 *     }
 *   });
 *   const { fields, append } = useFieldArray({
 *     control,
 *     name: "test"
 *   });
 *
 *   return (
 *     <form onSubmit={handleSubmit(data => console.log(data))}>
 *       {fields.map((item, index) => (
 *          <input key={item.id} {...register(`test.${index}.firstName`)}  />
 *       ))}
 *       <button type="button" onClick={() => append({ firstName: "bill" })}>
 *         append
 *       </button>
 *       <input type="submit" />
 *     </form>
 *   );
 * }
 * ```
 */function ez(e){const t=S();const{control:r=t.control,name:i,keyName:a="id",shouldUnregister:o,rules:s}=e;const[u,c]=n.useState(r._getFieldArray(i));const l=n.useRef(r._getFieldArray(i).map(eP));const d=n.useRef(false);r._names.array.add(i);n.useMemo(()=>s&&u.length>=0&&r.register(i,s),[r,i,u.length,s]);C(()=>r._subjects.array.subscribe({next:({values:e,name:t})=>{if(t===i||!t){const t=_(e,i);if(Array.isArray(t)){c(t);l.current=t.map(eP)}}}}).unsubscribe,[r,i]);const f=n.useCallback(e=>{d.current=true;r._setFieldArray(i,e)},[r,i]);const p=(e,t)=>{const n=B(h(e));const a=eF(r._getFieldArray(i),n);r._names.focus=eM(i,a.length-1,t);l.current=eF(l.current,n.map(eP));f(a);c(a);r._setFieldArray(i,a,eF,{argA:eY(e)})};const v=(e,t)=>{const n=B(h(e));const a=eH(r._getFieldArray(i),n);r._names.focus=eM(i,0,t);l.current=eH(l.current,n.map(eP));f(a);c(a);r._setFieldArray(i,a,eH,{argA:eY(e)})};const m=e=>{const t=eU(r._getFieldArray(i),e);l.current=eU(l.current,e);f(t);c(t);!Array.isArray(_(r._fields,i))&&w(r._fields,i,undefined);r._setFieldArray(i,t,eU,{argA:e})};const g=(e,t,n)=>{const a=B(h(t));const o=eL(r._getFieldArray(i),e,a);r._names.focus=eM(i,e,n);l.current=eL(l.current,e,a.map(eP));f(o);c(o);r._setFieldArray(i,o,eL,{argA:e,argB:eY(t)})};const b=(e,t)=>{const n=r._getFieldArray(i);eB(n,e,t);eB(l.current,e,t);f(n);c(n);r._setFieldArray(i,n,eB,{argA:e,argB:t},false)};const y=(e,t)=>{const n=r._getFieldArray(i);eN(n,e,t);eN(l.current,e,t);f(n);c(n);r._setFieldArray(i,n,eN,{argA:e,argB:t},false)};const A=(e,t)=>{const n=h(t);const a=eK(r._getFieldArray(i),e,n);l.current=[...a].map((t,r)=>!t||r===e?eP():l.current[r]);f(a);c([...a]);r._setFieldArray(i,a,eK,{argA:e,argB:n},true,false)};const E=e=>{const t=B(h(e));l.current=t.map(eP);f([...t]);c([...t]);r._setFieldArray(i,[...t],e=>e,{},true,false)};n.useEffect(()=>{r._state.action=false;ey(i,r._names)&&r._subjects.state.next({...r._formState});if(d.current&&(!em(r._options.mode).isOnSubmit||r._formState.isSubmitted)&&!em(r._options.reValidateMode).isOnSubmit){if(r._options.resolver){r._runSchema([i]).then(e=>{const t=_(e.errors,i);const n=_(r._formState.errors,i);if(n?!t&&n.type||t&&(n.type!==t.type||n.message!==t.message):t&&t.type){t?w(r._formState.errors,i,t):et(r._formState.errors,i);r._subjects.state.next({errors:r._formState.errors})}})}else{const e=_(r._fields,i);if(e&&e._f&&!(em(r._options.reValidateMode).isOnSubmit&&em(r._options.mode).isOnSubmit)){eI(e,r._names.disabled,r._formValues,r._options.criteriaMode===x.all,r._options.shouldUseNativeValidation,true).then(e=>!q(e)&&r._subjects.state.next({errors:eT(r._formState.errors,e,i)}))}}}r._subjects.state.next({name:i,values:h(r._formValues)});r._names.focus&&ew(r._fields,(e,t)=>{if(r._names.focus&&t.startsWith(r._names.focus)&&e.focus){e.focus();return 1}return});r._names.focus="";r._setValid();d.current=false},[u,i,r]);n.useEffect(()=>{!_(r._formValues,i)&&r._setFieldArray(i);return()=>{const e=(e,t)=>{const n=_(r._fields,e);if(n&&n._f){n._f.mount=t}};r._options.shouldUnregister||o?r.unregister(i):e(i,false)}},[i,r,a,o]);return{swap:n.useCallback(b,[f,i,r]),move:n.useCallback(y,[f,i,r]),prepend:n.useCallback(v,[f,i,r]),append:n.useCallback(p,[f,i,r]),remove:n.useCallback(m,[f,i,r]),insert:n.useCallback(g,[f,i,r]),update:n.useCallback(A,[f,i,r]),replace:n.useCallback(E,[f,i,r]),fields:n.useMemo(()=>u.map((e,t)=>({...e,[a]:l.current[t]||eP()})),[u,a])}}/**
 * Custom hook to manage the entire form.
 *
 * @remarks
 * [API](https://react-hook-form.com/docs/useform) • [Demo](https://codesandbox.io/s/react-hook-form-get-started-ts-5ksmm) • [Video](https://www.youtube.com/watch?v=RkXv4AXXC_4)
 *
 * @param props - form configuration and validation parameters.
 *
 * @returns methods - individual functions to manage the form state. {@link UseFormReturn}
 *
 * @example
 * ```tsx
 * function App() {
 *   const { register, handleSubmit, watch, formState: { errors } } = useForm();
 *   const onSubmit = data => console.log(data);
 *
 *   console.log(watch("example"));
 *
 *   return (
 *     <form onSubmit={handleSubmit(onSubmit)}>
 *       <input defaultValue="test" {...register("example")} />
 *       <input {...register("exampleRequired", { required: true })} />
 *       {errors.exampleRequired && <span>This field is required</span>}
 *       <button>Submit</button>
 *     </form>
 *   );
 * }
 * ```
 */function eq(e={}){const t=n.useRef(undefined);const r=n.useRef(undefined);const[i,a]=n.useState({isDirty:false,isValidating:false,isLoading:W(e.defaultValues),isSubmitted:false,isSubmitting:false,isSubmitSuccessful:false,isValid:false,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||false,isReady:false,defaultValues:W(e.defaultValues)?undefined:e.defaultValues});if(!t.current){if(e.formControl){t.current={...e.formControl,formState:i};if(e.defaultValues&&!W(e.defaultValues)){e.formControl.reset(e.defaultValues,e.resetOptions)}}else{const{formControl:r,...n}=eD(e);t.current={...n,formState:i}}}const o=t.current.control;o._options=e;C(()=>{const e=o._subscribe({formState:o._proxyFormState,callback:()=>a({...o._formState}),reRenderRoot:true});a(e=>({...e,isReady:true}));o._formState.isReady=true;return e},[o]);n.useEffect(()=>o._disableForm(e.disabled),[o,e.disabled]);n.useEffect(()=>{if(e.mode){o._options.mode=e.mode}if(e.reValidateMode){o._options.reValidateMode=e.reValidateMode}},[o,e.mode,e.reValidateMode]);n.useEffect(()=>{if(e.errors){o._setErrors(e.errors);o._focusError()}},[o,e.errors]);n.useEffect(()=>{e.shouldUnregister&&o._subjects.state.next({values:o._getWatch()})},[o,e.shouldUnregister]);n.useEffect(()=>{if(o._proxyFormState.isDirty){const e=o._getDirty();if(e!==i.isDirty){o._subjects.state.next({isDirty:e})}}},[o,i.isDirty]);n.useEffect(()=>{var t;if(e.values&&!M(e.values,r.current)){o._reset(e.values,{keepFieldsRef:true,...o._options.resetOptions});if(!((t=o._options.resetOptions)===null||t===void 0?void 0:t.keepIsValid)){o._setValid()}r.current=e.values;a(e=>({...e}))}else{o._resetDefaultValues()}},[o,e.values]);n.useEffect(()=>{if(!o._state.mount){o._setValid();o._state.mount=true}if(o._state.watch){o._state.watch=false;o._subjects.state.next({...o._formState})}o._removeUnmounted()});t.current.formState=k(i,o);return t.current}/**
 * Watch component that subscribes to form field changes and re-renders when watched fields update.
 *
 * @param control - The form control object from useForm
 * @param names - Array of field names to watch for changes
 * @param render - The function that receives watched values and returns ReactNode
 * @returns The result of calling render function with watched values
 *
 * @example
 * The `Watch` component only re-render when the values of `foo`, `bar`, and `baz.qux` change.
 * The types of `foo`, `bar`, and `baz.qux` are precisely inferred.
 *
 * ```tsx
 * const { control } = useForm();
 *
 * <Watch
 *   control={control}
 *   names={['foo', 'bar', 'baz.qux']}
 *   render={([foo, bar, baz_qux]) => <div>{foo}{bar}{baz_qux}</div>}
 * />
 * ```
 */const eV=({control:e,names:t,render:r})=>r(F({control:e,name:t}));//# sourceMappingURL=index.esm.mjs.map
},59754:function(e,t,r){"use strict";r.d(t,{A:()=>a});/* import */var n=r(41594);function i(e,t){let r;return(...n)=>{window.clearTimeout(r),r=window.setTimeout(()=>e(...n),t)}}function a({debounce:e,scroll:t,polyfill:r,offsetSize:c}={debounce:0,scroll:!1,offsetSize:!1}){const d=r||(typeof window=="undefined"?class{}:window.ResizeObserver);if(!d)throw new Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");const[f,p]=(0,n.useState)({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),h=(0,n.useRef)({element:null,scrollContainers:null,resizeObserver:null,lastBounds:f,orientationHandler:null}),v=e?typeof e=="number"?e:e.scroll:null,m=e?typeof e=="number"?e:e.resize:null,g=(0,n.useRef)(!1);(0,n.useEffect)(()=>(g.current=!0,()=>void(g.current=!1)));const[b,_,y]=(0,n.useMemo)(()=>{const e=()=>{if(!h.current.element)return;const{left:e,top:t,width:r,height:n,bottom:i,right:a,x:o,y:s}=h.current.element.getBoundingClientRect(),u={left:e,top:t,width:r,height:n,bottom:i,right:a,x:o,y:s};h.current.element instanceof HTMLElement&&c&&(u.height=h.current.element.offsetHeight,u.width=h.current.element.offsetWidth),Object.freeze(u),g.current&&!l(h.current.lastBounds,u)&&p(h.current.lastBounds=u)};return[e,m?i(e,m):e,v?i(e,v):e]},[p,c,v,m]);function w(){h.current.scrollContainers&&(h.current.scrollContainers.forEach(e=>e.removeEventListener("scroll",y,!0)),h.current.scrollContainers=null),h.current.resizeObserver&&(h.current.resizeObserver.disconnect(),h.current.resizeObserver=null),h.current.orientationHandler&&("orientation"in screen&&"removeEventListener"in screen.orientation?screen.orientation.removeEventListener("change",h.current.orientationHandler):"onorientationchange"in window&&window.removeEventListener("orientationchange",h.current.orientationHandler))}function A(){h.current.element&&(h.current.resizeObserver=new d(y),h.current.resizeObserver.observe(h.current.element),t&&h.current.scrollContainers&&h.current.scrollContainers.forEach(e=>e.addEventListener("scroll",y,{capture:!0,passive:!0})),h.current.orientationHandler=()=>{y()},"orientation"in screen&&"addEventListener"in screen.orientation?screen.orientation.addEventListener("change",h.current.orientationHandler):"onorientationchange"in window&&window.addEventListener("orientationchange",h.current.orientationHandler))}const x=e=>{!e||e===h.current.element||(w(),h.current.element=e,h.current.scrollContainers=u(e),A())};return s(y,!!t),o(_),(0,n.useEffect)(()=>{w(),A()},[t,y,_]),(0,n.useEffect)(()=>w,[]),[x,f,b]}function o(e){(0,n.useEffect)(()=>{const t=e;return window.addEventListener("resize",t),()=>void window.removeEventListener("resize",t)},[e])}function s(e,t){(0,n.useEffect)(()=>{if(t){const t=e;return window.addEventListener("scroll",t,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",t,!0)}},[e,t])}function u(e){const t=[];if(!e||e===document.body)return t;const{overflow:r,overflowX:n,overflowY:i}=window.getComputedStyle(e);return[r,n,i].some(e=>e==="auto"||e==="scroll")&&t.push(e),[...t,...u(e.parentElement)]}const c=["x","y","top","bottom","left","right","width","height"],l=(e,t)=>c.every(r=>e[r]===t[r]);//# sourceMappingURL=index.js.map
},37822:function(e,t,r){"use strict";r.d(t,{$1:()=>h,IO:()=>w,LU:()=>u,MS:()=>n,Rn:()=>l,Sv:()=>g,XZ:()=>s,YK:()=>o,j:()=>a,vd:()=>i,yE:()=>d});var n="-ms-";var i="-moz-";var a="-webkit-";var o="comm";var s="rule";var u="decl";var c="@page";var l="@media";var d="@import";var f="@charset";var p="@viewport";var h="@supports";var v="@document";var m="@namespace";var g="@keyframes";var b="@font-face";var _="@counter-style";var y="@font-feature-values";var w="@layer"},97943:function(e,t,r){"use strict";r.d(t,{MY:()=>a,r1:()=>i});/* import */var n=r(88975);/**
 * @param {function[]} collection
 * @return {function}
 */function i(e){var t=(0,n/* .sizeof */.FK)(e);return function(r,n,i,a){var o="";for(var s=0;s<t;s++)o+=e[s](r,n,i,a)||"";return o}}/**
 * @param {function} callback
 * @return {function}
 */function a(e){return function(t){if(!t.root){if(t=t.return)e(t)}}}/**
 * @param {object} element
 * @param {number} index
 * @param {object[]} children
 * @param {function} callback
 */function o(e,t,r,n){if(e.length>-1){if(!e.return)switch(e.type){case DECLARATION:e.return=prefix(e.value,e.length,r);return;case KEYFRAMES:return serialize([copy(e,{value:replace(e.value,"@","@"+WEBKIT)})],n);case RULESET:if(e.length)return combine(e.props,function(t){switch(match(t,/(::plac\w+|:read-\w+)/)){// :read-(only|write)
case":read-only":case":read-write":return serialize([copy(e,{props:[replace(t,/:(read-\w+)/,":"+MOZ+"$1")]})],n);// :placeholder
case"::placeholder":return serialize([copy(e,{props:[replace(t,/:(plac\w+)/,":"+WEBKIT+"input-$1")]}),copy(e,{props:[replace(t,/:(plac\w+)/,":"+MOZ+"$1")]}),copy(e,{props:[replace(t,/:(plac\w+)/,MS+"input-$1")]})],n)}return""})}}}/**
 * @param {object} element
 * @param {number} index
 * @param {object[]} children
 */function s(e){switch(e.type){case RULESET:e.props=e.props.map(function(t){return combine(tokenize(t),function(t,r,n){switch(charat(t,0)){// \f
case 12:return substr(t,1,strlen(t));// \0 ( + > ~
case 0:case 40:case 43:case 62:case 126:return t;// :
case 58:if(n[++r]==="global")n[r]="",n[++r]="\f"+substr(n[r],r=1,-1);// \s
case 32:return r===1?"":t;default:switch(r){case 0:e=t;return sizeof(n)>1?"":t;case r=sizeof(n)-1:case 2:return r===2?t+e+e:t+e;default:return t}}})})}}},49116:function(e,t,r){"use strict";r.d(t,{wE:()=>o});/* import */var n=r(37822);/* import */var i=r(88975);/* import */var a=r(63822);/**
 * @param {string} value
 * @return {object[]}
 */function o(e){return(0,a/* .dealloc */.VF)(s("",null,null,null,[""],e=(0,a/* .alloc */.c4)(e),0,[0],e))}/**
 * @param {string} value
 * @param {object} root
 * @param {object?} parent
 * @param {string[]} rule
 * @param {string[]} rules
 * @param {string[]} rulesets
 * @param {number[]} pseudo
 * @param {number[]} points
 * @param {string[]} declarations
 * @return {object}
 */function s(e,t,r,n,o,d,f,p,h){var v=0;var m=0;var g=f;var b=0;var _=0;var y=0;var w=1;var A=1;var x=1;var E=0;var O="";var S=o;var T=d;var k=n;var C=O;while(A)switch(y=E,E=(0,a/* .next */.K2)()){// (
case 40:if(y!=108&&(0,i/* .charat */.wN)(C,g-1)==58){if((0,i/* .indexof */.K5)(C+=(0,i/* .replace */.HC)((0,a/* .delimit */.Tb)(E),"&","&\f"),"&\f")!=-1)x=-1;break}// " ' [
case 34:case 39:case 91:C+=(0,a/* .delimit */.Tb)(E);break;// \t \n \r \s
case 9:case 10:case 13:case 32:C+=(0,a/* .whitespace */.mw)(y);break;// \
case 92:C+=(0,a/* .escaping */.Nc)((0,a/* .caret */.OW)()-1,7);continue;// /
case 47:switch((0,a/* .peek */.se)()){case 42:case 47:;(0,i/* .append */.BC)(c((0,a/* .commenter */.nf)((0,a/* .next */.K2)(),(0,a/* .caret */.OW)()),t,r),h);break;default:C+="/"}break;// {
case 123*w:p[v++]=(0,i/* .strlen */.b2)(C)*x;// } ; \0
case 125*w:case 59:case 0:switch(E){// \0 }
case 0:case 125:A=0;// ;
case 59+m:if(x==-1)C=(0,i/* .replace */.HC)(C,/\f/g,"");if(_>0&&(0,i/* .strlen */.b2)(C)-g)(0,i/* .append */.BC)(_>32?l(C+";",n,r,g-1):l((0,i/* .replace */.HC)(C," ","")+";",n,r,g-2),h);break;// @ ;
case 59:C+=";";// { rule/at-rule
default:;(0,i/* .append */.BC)(k=u(C,t,r,v,m,o,p,O,S=[],T=[],g),d);if(E===123)if(m===0)s(C,t,k,k,S,d,g,p,T);else switch(b===99&&(0,i/* .charat */.wN)(C,3)===110?100:b){// d l m s
case 100:case 108:case 109:case 115:s(e,k,k,n&&(0,i/* .append */.BC)(u(e,k,k,0,0,o,p,O,o,S=[],g),T),o,T,g,p,n?S:T);break;default:s(C,k,k,k,[""],T,0,p,T)}}v=m=_=0,w=x=1,O=C="",g=f;break;// :
case 58:g=1+(0,i/* .strlen */.b2)(C),_=y;default:if(w<1){if(E==123)--w;else if(E==125&&w++==0&&(0,a/* .prev */.YL)()==125)continue}switch(C+=(0,i/* .from */.HT)(E),E*w){// &
case 38:x=m>0?1:(C+="\f",-1);break;// ,
case 44:p[v++]=((0,i/* .strlen */.b2)(C)-1)*x,x=1;break;// @
case 64:// -
if((0,a/* .peek */.se)()===45)C+=(0,a/* .delimit */.Tb)((0,a/* .next */.K2)());b=(0,a/* .peek */.se)(),m=g=(0,i/* .strlen */.b2)(O=C+=(0,a/* .identifier */.Cv)((0,a/* .caret */.OW)())),E++;break;// -
case 45:if(y===45&&(0,i/* .strlen */.b2)(C)==2)w=0}}return d}/**
 * @param {string} value
 * @param {object} root
 * @param {object?} parent
 * @param {number} index
 * @param {number} offset
 * @param {string[]} rules
 * @param {number[]} points
 * @param {string} type
 * @param {string[]} props
 * @param {string[]} children
 * @param {number} length
 * @return {object}
 */function u(e,t,r,o,s,u,c,l,d,f,p){var h=s-1;var v=s===0?u:[""];var m=(0,i/* .sizeof */.FK)(v);for(var g=0,b=0,_=0;g<o;++g)for(var y=0,w=(0,i/* .substr */.c1)(e,h+1,h=(0,i/* .abs */.tn)(b=c[g])),A=e;y<m;++y)if(A=(0,i/* .trim */.Bq)(b>0?v[y]+" "+w:(0,i/* .replace */.HC)(w,/&\f/g,v[y])))d[_++]=A;return(0,a/* .node */.rH)(e,t,r,s===0?n/* .RULESET */.XZ:l,d,f,p)}/**
 * @param {number} value
 * @param {object} root
 * @param {object?} parent
 * @return {object}
 */function c(e,t,r){return(0,a/* .node */.rH)(e,t,r,n/* .COMMENT */.YK,(0,i/* .from */.HT)((0,a/* .char */.Tp)()),(0,i/* .substr */.c1)(e,2,-2),0)}/**
 * @param {string} value
 * @param {object} root
 * @param {object?} parent
 * @param {number} length
 * @return {object}
 */function l(e,t,r,o){return(0,a/* .node */.rH)(e,t,r,n/* .DECLARATION */.LU,(0,i/* .substr */.c1)(e,0,o),(0,i/* .substr */.c1)(e,o+1,-1),o)}},92027:function(e,t,r){"use strict";r.d(t,{A:()=>o,l:()=>a});/* import */var n=r(37822);/* import */var i=r(88975);/**
 * @param {object[]} children
 * @param {function} callback
 * @return {string}
 */function a(e,t){var r="";var n=(0,i/* .sizeof */.FK)(e);for(var a=0;a<n;a++)r+=t(e[a],a,e,t)||"";return r}/**
 * @param {object} element
 * @param {number} index
 * @param {object[]} children
 * @param {function} callback
 * @return {string}
 */function o(e,t,r,o){switch(e.type){case n/* .LAYER */.IO:if(e.children.length)break;case n/* .IMPORT */.yE:case n/* .DECLARATION */.LU:return e.return=e.return||e.value;case n/* .COMMENT */.YK:return"";case n/* .KEYFRAMES */.Sv:return e.return=e.value+"{"+a(e.children,o)+"}";case n/* .RULESET */.XZ:e.value=e.props.join(",")}return(0,i/* .strlen */.b2)(r=a(e.children,o))?e.return=e.value+"{"+r+"}":""}},63822:function(e,t,r){"use strict";r.d(t,{C:()=>d,Cv:()=>k,G1:()=>s,K2:()=>h,Nc:()=>O,OW:()=>m,Sh:()=>b,Tb:()=>w,Tp:()=>f,VF:()=>y,YL:()=>p,c4:()=>_,di:()=>g,mw:()=>x,nf:()=>T,rH:()=>l,se:()=>v});/* import */var n=r(88975);var i=1;var a=1;var o=0;var s=0;var u=0;var c="";/**
 * @param {string} value
 * @param {object | null} root
 * @param {object | null} parent
 * @param {string} type
 * @param {string[] | string} props
 * @param {object[] | string} children
 * @param {number} length
 */function l(e,t,r,n,o,s,u){return{value:e,root:t,parent:r,type:n,props:o,children:s,line:i,column:a,length:u,return:""}}/**
 * @param {object} root
 * @param {object} props
 * @return {object}
 */function d(e,t){return(0,n/* .assign */.kp)(l("",null,null,"",null,null,0),e,{length:-e.length},t)}/**
 * @return {number}
 */function f(){return u}/**
 * @return {number}
 */function p(){u=s>0?(0,n/* .charat */.wN)(c,--s):0;if(a--,u===10)a=1,i--;return u}/**
 * @return {number}
 */function h(){u=s<o?(0,n/* .charat */.wN)(c,s++):0;if(a++,u===10)a=1,i++;return u}/**
 * @return {number}
 */function v(){return(0,n/* .charat */.wN)(c,s)}/**
 * @return {number}
 */function m(){return s}/**
 * @param {number} begin
 * @param {number} end
 * @return {string}
 */function g(e,t){return(0,n/* .substr */.c1)(c,e,t)}/**
 * @param {number} type
 * @return {number}
 */function b(e){switch(e){// \0 \t \n \r \s whitespace token
case 0:case 9:case 10:case 13:case 32:return 5;// ! + , / > @ ~ isolate token
case 33:case 43:case 44:case 47:case 62:case 64:case 126:// ; { } breakpoint token
case 59:case 123:case 125:return 4;// : accompanied token
case 58:return 3;// " ' ( [ opening delimit token
case 34:case 39:case 40:case 91:return 2;// ) ] closing delimit token
case 41:case 93:return 1}return 0}/**
 * @param {string} value
 * @return {any[]}
 */function _(e){return i=a=1,o=(0,n/* .strlen */.b2)(c=e),s=0,[]}/**
 * @param {any} value
 * @return {any}
 */function y(e){return c="",e}/**
 * @param {number} type
 * @return {string}
 */function w(e){return(0,n/* .trim */.Bq)(g(s-1,S(e===91?e+2:e===40?e+1:e)))}/**
 * @param {string} value
 * @return {string[]}
 */function A(e){return y(E(_(e)))}/**
 * @param {number} type
 * @return {string}
 */function x(e){while(u=v())if(u<33)h();else break;return b(e)>2||b(u)>3?"":" "}/**
 * @param {string[]} children
 * @return {string[]}
 */function E(e){while(h())switch(b(u)){case 0:append(k(s-1),e);break;case 2:append(w(u),e);break;default:append(from(u),e)}return e}/**
 * @param {number} index
 * @param {number} count
 * @return {string}
 */function O(e,t){while(--t&&h())// not 0-9 A-F a-f
if(u<48||u>102||u>57&&u<65||u>70&&u<97)break;return g(e,m()+(t<6&&v()==32&&h()==32))}/**
 * @param {number} type
 * @return {number}
 */function S(e){while(h())switch(u){// ] ) " '
case e:return s;// " '
case 34:case 39:if(e!==34&&e!==39)S(u);break;// (
case 40:if(e===41)S(e);break;// \
case 92:h();break}return s}/**
 * @param {number} type
 * @param {number} index
 * @return {number}
 */function T(e,t){while(h())// //
if(e+u===47+10)break;else if(e+u===42+42&&v()===47)break;return"/*"+g(t,s-1)+"*"+(0,n/* .from */.HT)(e===47?e:h())}/**
 * @param {number} index
 * @return {string}
 */function k(e){while(!b(v()))h();return g(e,s)}},88975:function(e,t,r){"use strict";r.d(t,{BC:()=>v,Bq:()=>s,FK:()=>h,HC:()=>c,HT:()=>i,K5:()=>l,YW:()=>u,b2:()=>p,c1:()=>f,kg:()=>m,kp:()=>a,tW:()=>o,tn:()=>n,wN:()=>d});/**
 * @param {number}
 * @return {number}
 */var n=Math.abs;/**
 * @param {number}
 * @return {string}
 */var i=String.fromCharCode;/**
 * @param {object}
 * @return {object}
 */var a=Object.assign;/**
 * @param {string} value
 * @param {number} length
 * @return {number}
 */function o(e,t){return d(e,0)^45?(((t<<2^d(e,0))<<2^d(e,1))<<2^d(e,2))<<2^d(e,3):0}/**
 * @param {string} value
 * @return {string}
 */function s(e){return e.trim()}/**
 * @param {string} value
 * @param {RegExp} pattern
 * @return {string?}
 */function u(e,t){return(e=t.exec(e))?e[0]:e}/**
 * @param {string} value
 * @param {(string|RegExp)} pattern
 * @param {string} replacement
 * @return {string}
 */function c(e,t,r){return e.replace(t,r)}/**
 * @param {string} value
 * @param {string} search
 * @return {number}
 */function l(e,t){return e.indexOf(t)}/**
 * @param {string} value
 * @param {number} index
 * @return {number}
 */function d(e,t){return e.charCodeAt(t)|0}/**
 * @param {string} value
 * @param {number} begin
 * @param {number} end
 * @return {string}
 */function f(e,t,r){return e.slice(t,r)}/**
 * @param {string} value
 * @return {number}
 */function p(e){return e.length}/**
 * @param {any[]} value
 * @return {number}
 */function h(e){return e.length}/**
 * @param {any} value
 * @param {any[]} array
 * @return {any}
 */function v(e,t){return t.push(e),e}/**
 * @param {string[]} array
 * @param {function} callback
 * @return {string}
 */function m(e,t){return e.map(t).join("")}}};// The module cache
var t={};// The require function
function r(n){// Check if module is in cache
var i=t[n];if(i!==undefined){return i.exports}// Create a new module (and put it into the cache)
var a=t[n]={id:n,exports:{}};// Execute the module function
e[n](a,a.exports,r);// Return the exports of the module
return a.exports}// expose the modules object (__webpack_modules__)
r.m=e;// webpack/runtime/compat_get_default_export
(()=>{// getDefaultExport function for compatibility with non-ESM modules
r.n=e=>{var t=e&&e.__esModule?()=>e["default"]:()=>e;r.d(t,{a:t});return t}})();// webpack/runtime/define_property_getters
(()=>{r.d=(e,t)=>{for(var n in t){if(r.o(t,n)&&!r.o(e,n)){Object.defineProperty(e,n,{enumerable:true,get:t[n]})}}}})();// webpack/runtime/ensure_chunk
(()=>{r.f={};// This file contains only the entry chunk.
// The chunk loading function for additional chunks
r.e=e=>{return Promise.all(Object.keys(r.f).reduce((t,n)=>{r.f[n](e,t);return t},[]))}})();// webpack/runtime/get javascript chunk filename
(()=>{// This function allow to reference chunks
r.u=e=>{// return url for filenames not based on template
if(e==="639")return"js/lazy-chunks/tutor-course-builder-basic.js?ver=4.0.0";if(e==="410")return"js/lazy-chunks/tutor-course-builder-curriculum.js?ver=4.0.0";if(e==="132")return"js/lazy-chunks/tutor-course-builder-additional.js?ver=4.0.0";if(e==="456")return"js/lazy-chunks/tutor-course-builder-icon.js?ver=4.0.0";// return url for filenames based on template
return""+e+".javascript"}})();// webpack/runtime/get mini-css chunk filename
(()=>{// This function allow to reference chunks
r.miniCssF=e=>{// return url for filenames not based on template
// return url for filenames based on template
return""+e+".css"}})();// webpack/runtime/get_full_hash
(()=>{r.h=()=>"4627d878f4dec41b"})();// webpack/runtime/global
(()=>{r.g=(()=>{if(typeof globalThis==="object")return globalThis;try{return this||new Function("return this")()}catch(e){if(typeof window==="object")return window}})()})();// webpack/runtime/has_own_property
(()=>{r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})();// webpack/runtime/load_script
(()=>{var e={};var t="tutor:";// loadScript function to load a script via script tag
r.l=function(n,i,a,o){if(e[n]){e[n].push(i);return}var s,u;if(a!==undefined){var c=document.getElementsByTagName("script");for(var l=0;l<c.length;l++){var d=c[l];if(d.getAttribute("src")==n||d.getAttribute("data-webpack")==t+a){s=d;break}}}if(!s){u=true;s=document.createElement("script");s.timeout=120;if(r.nc){s.setAttribute("nonce",r.nc)}s.setAttribute("data-webpack",t+a);s.src=n}e[n]=[i];var f=function(t,r){s.onerror=s.onload=null;clearTimeout(p);var i=e[n];delete e[n];s.parentNode&&s.parentNode.removeChild(s);i&&i.forEach(function(e){return e(r)});if(t)return t(r)};var p=setTimeout(f.bind(null,undefined,{type:"timeout",target:s}),12e4);s.onerror=f.bind(null,s.onerror);s.onload=f.bind(null,s.onload);u&&document.head.appendChild(s)}})();// webpack/runtime/make_namespace_object
(()=>{// define __esModule on exports
r.r=e=>{if(typeof Symbol!=="undefined"&&Symbol.toStringTag){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}Object.defineProperty(e,"__esModule",{value:true})}})();// webpack/runtime/nonce
(()=>{r.nc=undefined})();// webpack/runtime/rspack_version
(()=>{r.rv=()=>"1.6.5"})();// webpack/runtime/auto_public_path
(()=>{var e;if(r.g.importScripts)e=r.g.location+"";var t=r.g.document;if(!e&&t){// Technically we could use `document.currentScript instanceof window.HTMLScriptElement`,
// but an attacker could try to inject `<script>HTMLScriptElement = HTMLImageElement</script>`
// and use `<img name="currentScript" src="https://attacker.controlled.server/"></img>`
if(t.currentScript&&t.currentScript.tagName.toUpperCase()==="SCRIPT")e=t.currentScript.src;if(!e){var n=t.getElementsByTagName("script");if(n.length){var i=n.length-1;while(i>-1&&(!e||!/^http(s?):/.test(e)))e=n[i--].src}}}// When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration",
// or pass an empty string ("") and set the __webpack_public_path__ variable from your code to use your own logic.',
if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/");r.p=e+"../"})();// webpack/runtime/jsonp_chunk_loading
(()=>{// object to store loaded and loading chunks
// undefined = chunk not loaded, null = chunk preloaded/prefetched
// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded
var e={"388":0};r.f.j=function(t,n){// JSONP chunk loading for javascript
var i=r.o(e,t)?e[t]:undefined;if(i!==0){// 0 means "already installed".
// a Promise means "currently loading".
if(i){n.push(i[2])}else{if(true){// setup Promise in chunk cache
var a=new Promise((r,n)=>i=e[t]=[r,n]);n.push(i[2]=a);// start chunk loading
var o=r.p+r.u(t);// create error before stack unwound to get useful stacktrace later
var s=new Error;var u=function(n){if(r.o(e,t)){i=e[t];if(i!==0)e[t]=undefined;if(i){var a=n&&(n.type==="load"?"missing":n.type);var o=n&&n.target&&n.target.src;s.message="Loading chunk "+t+" failed.\n("+a+": "+o+")";s.name="ChunkLoadError";s.type=a;s.request=o;i[1](s)}}};r.l(o,u,"chunk-"+t,t)}}}};// install a JSONP callback for chunk loading
var t=(t,n)=>{var[i,a,o]=n;// add "moreModules" to the modules object,
// then flag all "chunkIds" as loaded and fire callback
var s,u,c=0;if(i.some(t=>e[t]!==0)){for(s in a){if(r.o(a,s)){r.m[s]=a[s]}}if(o)var l=o(r)}if(t)t(n);for(;c<i.length;c++){u=i[c];if(r.o(e,u)&&e[u]){e[u][0]()}e[u]=0}};var n=self["webpackChunktutor"]=self["webpackChunktutor"]||[];n.forEach(t.bind(null,0));n.push=t.bind(null,n.push.bind(n))})();// webpack/runtime/rspack_unique_id
(()=>{r.ruid="bundler=rspack@1.6.5"})();var n={};// This entry needs to be wrapped in an IIFE because it needs to be in strict mode.
(()=>{"use strict";// EXTERNAL MODULE: ./node_modules/.pnpm/@emotion+react@11.14.0_@types+react@18.3.1_react@18.3.1/node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.browser.esm.js
var e=r(52639);// EXTERNAL MODULE: external "React"
var t=r(41594);var n=/*#__PURE__*/r.n(t);// EXTERNAL MODULE: ./node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/client.js
var i=r(99576);// EXTERNAL MODULE: external "ReactDOM"
var a=r(75206);// EXTERNAL MODULE: ./node_modules/.pnpm/react-router@6.30.2_react@18.3.1/node_modules/react-router/dist/index.js
var o=r(75688);// EXTERNAL MODULE: ./node_modules/.pnpm/@remix-run+router@1.23.1/node_modules/@remix-run/router/dist/router.js
var s=r(98988);// CONCATENATED MODULE: ./node_modules/.pnpm/react-router-dom@6.30.2_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-router-dom/dist/index.js
/**
 * React Router DOM v6.30.2
 *
 * Copyright (c) Remix Software Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE.md file in the root directory of this source tree.
 *
 * @license MIT
 */function u(){u=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r){if(Object.prototype.hasOwnProperty.call(r,n)){e[n]=r[n]}}}return e};return u.apply(this,arguments)}function c(e,t){if(e==null)return{};var r={};var n=Object.keys(e);var i,a;for(a=0;a<n.length;a++){i=n[a];if(t.indexOf(i)>=0)continue;r[i]=e[i]}return r}const l="get";const d="application/x-www-form-urlencoded";function f(e){return e!=null&&typeof e.tagName==="string"}function p(e){return f(e)&&e.tagName.toLowerCase()==="button"}function h(e){return f(e)&&e.tagName.toLowerCase()==="form"}function v(e){return f(e)&&e.tagName.toLowerCase()==="input"}function m(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function g(e,t){return e.button===0&&// Ignore everything but left clicks
(!t||t==="_self")&&// Let browser handle "target=_blank" etc.
!m(e)// Ignore clicks with modifier keys
}/**
 * Creates a URLSearchParams object using the given initializer.
 *
 * This is identical to `new URLSearchParams(init)` except it also
 * supports arrays as values in the object form of the initializer
 * instead of just strings. This is convenient when you need multiple
 * values for a given key, but don't want to use an array initializer.
 *
 * For example, instead of:
 *
 *   let searchParams = new URLSearchParams([
 *     ['sort', 'name'],
 *     ['sort', 'price']
 *   ]);
 *
 * you can do:
 *
 *   let searchParams = createSearchParams({
 *     sort: ['name', 'price']
 *   });
 */function b(e){if(e===void 0){e=""}return new URLSearchParams(typeof e==="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let n=e[r];return t.concat(Array.isArray(n)?n.map(e=>[r,e]):[[r,n]])},[]))}function _(e,t){let r=b(e);if(t){// Use `defaultSearchParams.forEach(...)` here instead of iterating of
// `defaultSearchParams.keys()` to work-around a bug in Firefox related to
// web extensions. Relevant Bugzilla tickets:
// https://bugzilla.mozilla.org/show_bug.cgi?id=1414602
// https://bugzilla.mozilla.org/show_bug.cgi?id=1023984
t.forEach((e,n)=>{if(!r.has(n)){t.getAll(n).forEach(e=>{r.append(n,e)})}})}return r}// One-time check for submitter support
let y=null;function w(){if(y===null){try{new FormData(document.createElement("form"),// @ts-expect-error if FormData supports the submitter parameter, this will throw
0);y=false}catch(e){y=true}}return y}const A=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function x(e){if(e!=null&&!A.has(e)){false?0:void 0;return null}return e}function E(e,t){let r;let n;let i;let a;let o;if(h(e)){// When grabbing the action from the element, it will have had the basename
// prefixed to ensure non-JS scenarios work, so strip it since we'll
// re-prefix in the router
let o=e.getAttribute("action");n=o?stripBasename(o,t):null;r=e.getAttribute("method")||l;i=x(e.getAttribute("enctype"))||d;a=new FormData(e)}else if(p(e)||v(e)&&(e.type==="submit"||e.type==="image")){let o=e.form;if(o==null){throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>')}// <button>/<input type="submit"> may override attributes of <form>
// When grabbing the action from the element, it will have had the basename
// prefixed to ensure non-JS scenarios work, so strip it since we'll
// re-prefix in the router
let s=e.getAttribute("formaction")||o.getAttribute("action");n=s?stripBasename(s,t):null;r=e.getAttribute("formmethod")||o.getAttribute("method")||l;i=x(e.getAttribute("formenctype"))||x(o.getAttribute("enctype"))||d;// Build a FormData object populated from a form and submitter
a=new FormData(o,e);// If this browser doesn't support the `FormData(el, submitter)` format,
// then tack on the submitter value at the end.  This is a lightweight
// solution that is not 100% spec compliant.  For complete support in older
// browsers, consider using the `formdata-submitter-polyfill` package
if(!w()){let{name:t,type:r,value:n}=e;if(r==="image"){let e=t?t+".":"";a.append(e+"x","0");a.append(e+"y","0")}else if(t){a.append(t,n)}}}else if(f(e)){throw new Error("Cannot submit element that is not <form>, <button>, or "+'<input type="submit|image">')}else{r=l;n=null;i=d;o=e}// Send body for <Form encType="text/plain" so we encode it into text
if(a&&i==="text/plain"){o=a;a=undefined}return{action:n,method:r.toLowerCase(),encType:i,formData:a,body:o}}const O=/* unused pure expression or super */null&&["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],S=/* unused pure expression or super */null&&["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],T=/* unused pure expression or super */null&&["fetcherKey","navigate","reloadDocument","replace","state","method","action","onSubmit","relative","preventScrollReset","viewTransition"];// HEY YOU! DON'T TOUCH THIS VARIABLE!
//
// It is replaced with the proper version at build time via a babel plugin in
// the rollup config.
//
// Export a global property onto the window for React Router detection by the
// Core Web Vitals Technology Report.  This way they can configure the `wappalyzer`
// to detect and properly classify live websites as being built with React Router:
// https://github.com/HTTPArchive/wappalyzer/blob/main/src/technologies/r.json
const k="6";try{window.__reactRouterVersion=k}catch(e){// no-op
}function C(e,t){return createRouter({basename:t==null?void 0:t.basename,future:u({},t==null?void 0:t.future,{v7_prependBasename:true}),history:createBrowserHistory({window:t==null?void 0:t.window}),hydrationData:(t==null?void 0:t.hydrationData)||R(),routes:e,mapRouteProperties:UNSAFE_mapRouteProperties,dataStrategy:t==null?void 0:t.dataStrategy,patchRoutesOnNavigation:t==null?void 0:t.patchRoutesOnNavigation,window:t==null?void 0:t.window}).initialize()}function I(e,t){return createRouter({basename:t==null?void 0:t.basename,future:u({},t==null?void 0:t.future,{v7_prependBasename:true}),history:createHashHistory({window:t==null?void 0:t.window}),hydrationData:(t==null?void 0:t.hydrationData)||R(),routes:e,mapRouteProperties:UNSAFE_mapRouteProperties,dataStrategy:t==null?void 0:t.dataStrategy,patchRoutesOnNavigation:t==null?void 0:t.patchRoutesOnNavigation,window:t==null?void 0:t.window}).initialize()}function R(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;if(t&&t.errors){t=u({},t,{errors:D(t.errors)})}return t}function D(e){if(!e)return null;let t=Object.entries(e);let r={};for(let[e,n]of t){// Hey you!  If you change this, please change the corresponding logic in
// serializeErrors in react-router-dom/server.tsx :)
if(n&&n.__type==="RouteErrorResponse"){r[e]=new UNSAFE_ErrorResponseImpl(n.status,n.statusText,n.data,n.internal===true)}else if(n&&n.__type==="Error"){// Attempt to reconstruct the right type of Error (i.e., ReferenceError)
if(n.__subType){let t=window[n.__subType];if(typeof t==="function"){try{// @ts-expect-error
let i=new t(n.message);// Wipe away the client-side stack trace.  Nothing to fill it in with
// because we don't serialize SSR stack traces for security reasons
i.stack="";r[e]=i}catch(e){// no-op - fall through and create a normal Error
}}}if(r[e]==null){let t=new Error(n.message);// Wipe away the client-side stack trace.  Nothing to fill it in with
// because we don't serialize SSR stack traces for security reasons
t.stack="";r[e]=t}}else{r[e]=n}}return r}const P=/*#__PURE__*//* unused pure expression or super */null&&React.createContext({isTransitioning:false});if(false){}const M=/*#__PURE__*/t.createContext(new Map);if(false){}//#endregion
////////////////////////////////////////////////////////////////////////////////
//#region Components
////////////////////////////////////////////////////////////////////////////////
/**
  Webpack + React 17 fails to compile on any of the following because webpack
  complains that `startTransition` doesn't exist in `React`:
  * import { startTransition } from "react"
  * import * as React from from "react";
    "startTransition" in React ? React.startTransition(() => setState()) : setState()
  * import * as React from from "react";
    "startTransition" in React ? React["startTransition"](() => setState()) : setState()

  Moving it to a constant such as the following solves the Webpack/React 17 issue:
  * import * as React from from "react";
    const START_TRANSITION = "startTransition";
    START_TRANSITION in React ? React[START_TRANSITION](() => setState()) : setState()

  However, that introduces webpack/terser minification issues in production builds
  in React 18 where minification/obfuscation ends up removing the call of
  React.startTransition entirely from the first half of the ternary.  Grabbing
  this exported reference once up front resolves that issue.

  See https://github.com/remix-run/react-router/issues/10579
*/const F="startTransition";const Y=t[F];const L="flushSync";const N=a[L];const H="useId";const j=t[H];function U(e){if(Y){Y(e)}else{e()}}function B(e){if(N){N(e)}else{e()}}class K{constructor(){this.status="pending";this.promise=new Promise((e,t)=>{this.resolve=t=>{if(this.status==="pending"){this.status="resolved";e(t)}};this.reject=e=>{if(this.status==="pending"){this.status="rejected";t(e)}}})}}/**
 * Given a Remix Router instance, render the appropriate UI
 */function z(e){let{fallbackElement:t,router:r,future:n}=e;let[i,a]=React.useState(r.state);let[o,s]=React.useState();let[u,c]=React.useState({isTransitioning:false});let[l,d]=React.useState();let[f,p]=React.useState();let[h,v]=React.useState();let m=React.useRef(new Map);let{v7_startTransition:g}=n||{};let b=React.useCallback(e=>{if(g){U(e)}else{e()}},[g]);let _=React.useCallback((e,t)=>{let{deletedFetchers:n,flushSync:i,viewTransitionOpts:o}=t;e.fetchers.forEach((e,t)=>{if(e.data!==undefined){m.current.set(t,e.data)}});n.forEach(e=>m.current.delete(e));let u=r.window==null||r.window.document==null||typeof r.window.document.startViewTransition!=="function";// If this isn't a view transition or it's not available in this browser,
// just update and be done with it
if(!o||u){if(i){B(()=>a(e))}else{b(()=>a(e))}return}// flushSync + startViewTransition
if(i){// Flush through the context to mark DOM elements as transition=ing
B(()=>{// Cancel any pending transitions
if(f){l&&l.resolve();f.skipTransition()}c({isTransitioning:true,flushSync:true,currentLocation:o.currentLocation,nextLocation:o.nextLocation})});// Update the DOM
let t=r.window.document.startViewTransition(()=>{B(()=>a(e))});// Clean up after the animation completes
t.finished.finally(()=>{B(()=>{d(undefined);p(undefined);s(undefined);c({isTransitioning:false})})});B(()=>p(t));return}// startTransition + startViewTransition
if(f){// Interrupting an in-progress transition, cancel and let everything flush
// out, and then kick off a new transition from the interruption state
l&&l.resolve();f.skipTransition();v({state:e,currentLocation:o.currentLocation,nextLocation:o.nextLocation})}else{// Completed navigation update with opted-in view transitions, let 'er rip
s(e);c({isTransitioning:true,flushSync:false,currentLocation:o.currentLocation,nextLocation:o.nextLocation})}},[r.window,f,l,m,b]);// Need to use a layout effect here so we are subscribed early enough to
// pick up on any render-driven redirects/navigations (useEffect/<Navigate>)
React.useLayoutEffect(()=>r.subscribe(_),[r,_]);// When we start a view transition, create a Deferred we can use for the
// eventual "completed" render
React.useEffect(()=>{if(u.isTransitioning&&!u.flushSync){d(new K)}},[u]);// Once the deferred is created, kick off startViewTransition() to update the
// DOM and then wait on the Deferred to resolve (indicating the DOM update has
// happened)
React.useEffect(()=>{if(l&&o&&r.window){let e=o;let t=l.promise;let n=r.window.document.startViewTransition(async()=>{b(()=>a(e));await t});n.finished.finally(()=>{d(undefined);p(undefined);s(undefined);c({isTransitioning:false})});p(n)}},[b,o,l,r.window]);// When the new location finally renders and is committed to the DOM, this
// effect will run to resolve the transition
React.useEffect(()=>{if(l&&o&&i.location.key===o.location.key){l.resolve()}},[l,f,i.location,o]);// If we get interrupted with a new navigation during a transition, we skip
// the active transition, let it cleanup, then kick it off again here
React.useEffect(()=>{if(!u.isTransitioning&&h){s(h.state);c({isTransitioning:true,flushSync:false,currentLocation:h.currentLocation,nextLocation:h.nextLocation});v(undefined)}},[u.isTransitioning,h]);React.useEffect(()=>{false?0:void 0;// Only log this once on initial mount
// eslint-disable-next-line react-hooks/exhaustive-deps
},[]);let y=React.useMemo(()=>{return{createHref:r.createHref,encodeLocation:r.encodeLocation,go:e=>r.navigate(e),push:(e,t,n)=>r.navigate(e,{state:t,preventScrollReset:n==null?void 0:n.preventScrollReset}),replace:(e,t,n)=>r.navigate(e,{replace:true,state:t,preventScrollReset:n==null?void 0:n.preventScrollReset})}},[r]);let w=r.basename||"/";let A=React.useMemo(()=>({router:r,navigator:y,static:false,basename:w}),[r,y,w]);let x=React.useMemo(()=>({v7_relativeSplatPath:r.future.v7_relativeSplatPath}),[r.future.v7_relativeSplatPath]);React.useEffect(()=>UNSAFE_logV6DeprecationWarnings(n,r.future),[n,r.future]);// The fragment and {null} here are important!  We need them to keep React 18's
// useId happy when we are server-rendering since we may have a <script> here
// containing the hydrated server-side staticContext (from StaticRouterProvider).
// useId relies on the component tree structure to generate deterministic id's
// so we need to ensure it remains the same on the client even though
// we don't need the <script> tag
return /*#__PURE__*/React.createElement(React.Fragment,null,/*#__PURE__*/React.createElement(UNSAFE_DataRouterContext.Provider,{value:A},/*#__PURE__*/React.createElement(UNSAFE_DataRouterStateContext.Provider,{value:i},/*#__PURE__*/React.createElement(M.Provider,{value:m.current},/*#__PURE__*/React.createElement(P.Provider,{value:u},/*#__PURE__*/React.createElement(Router,{basename:w,location:i.location,navigationType:i.historyAction,navigator:y,future:x},i.initialized||r.future.v7_partialHydration?/*#__PURE__*/React.createElement(q,{routes:r.routes,future:r.future,state:i}):t))))),null)}// Memoize to avoid re-renders when updating `ViewTransitionContext`
const q=/*#__PURE__*//* unused pure expression or super */null&&React.memo(V);function V(e){let{routes:t,future:r,state:n}=e;return UNSAFE_useRoutesImpl(t,undefined,n,r)}/**
 * A `<Router>` for use in web browsers. Provides the cleanest URLs.
 */function W(e){let{basename:t,children:r,future:n,window:i}=e;let a=React.useRef();if(a.current==null){a.current=createBrowserHistory({window:i,v5Compat:true})}let o=a.current;let[s,u]=React.useState({action:o.action,location:o.location});let{v7_startTransition:c}=n||{};let l=React.useCallback(e=>{c&&Y?Y(()=>u(e)):u(e)},[u,c]);React.useLayoutEffect(()=>o.listen(l),[o,l]);React.useEffect(()=>UNSAFE_logV6DeprecationWarnings(n),[n]);return /*#__PURE__*/React.createElement(Router,{basename:t,children:r,location:s.location,navigationType:s.action,navigator:o,future:n})}/**
 * A `<Router>` for use in web browsers. Stores the location in the hash
 * portion of the URL so it is not sent to the server.
 */function G(e){let{basename:r,children:n,future:i,window:a}=e;let u=t.useRef();if(u.current==null){u.current=(0,s/* .createHashHistory */.TM)({window:a,v5Compat:true})}let c=u.current;let[l,d]=t.useState({action:c.action,location:c.location});let{v7_startTransition:f}=i||{};let p=t.useCallback(e=>{f&&Y?Y(()=>d(e)):d(e)},[d,f]);t.useLayoutEffect(()=>c.listen(p),[c,p]);t.useEffect(()=>(0,o/* .UNSAFE_logV6DeprecationWarnings */.V8)(i),[i]);return /*#__PURE__*/t.createElement(o/* .Router */.Ix,{basename:r,children:n,location:l.location,navigationType:l.action,navigator:c,future:i})}/**
 * A `<Router>` that accepts a pre-instantiated history object. It's important
 * to note that using your own history object is highly discouraged and may add
 * two versions of the history library to your bundles unless you use the same
 * version of the history library that React Router uses internally.
 */function $(e){let{basename:t,children:r,future:n,history:i}=e;let[a,o]=React.useState({action:i.action,location:i.location});let{v7_startTransition:s}=n||{};let u=React.useCallback(e=>{s&&Y?Y(()=>o(e)):o(e)},[o,s]);React.useLayoutEffect(()=>i.listen(u),[i,u]);React.useEffect(()=>UNSAFE_logV6DeprecationWarnings(n),[n]);return /*#__PURE__*/React.createElement(Router,{basename:t,children:r,location:a.location,navigationType:a.action,navigator:i,future:n})}if(false){}const Q=typeof window!=="undefined"&&typeof window.document!=="undefined"&&typeof window.document.createElement!=="undefined";const X=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;/**
 * The public API for rendering a history-aware `<a>`.
 */const J=/*#__PURE__*//* unused pure expression or super */null&&React.forwardRef(function e(e,t){let{onClick:r,relative:n,reloadDocument:i,replace:a,state:o,target:s,to:l,preventScrollReset:d,viewTransition:f}=e,p=c(e,O);let{basename:h}=React.useContext(UNSAFE_NavigationContext);// Rendered into <a href> for absolute URLs
let v;let m=false;if(typeof l==="string"&&X.test(l)){// Render the absolute href server- and client-side
v=l;// Only check for external origins client-side
if(Q){try{let e=new URL(window.location.href);let t=l.startsWith("//")?new URL(e.protocol+l):new URL(l);let r=stripBasename(t.pathname,h);if(t.origin===e.origin&&r!=null){// Strip the protocol/origin/basename for same-origin absolute URLs
l=r+t.search+t.hash}else{m=true}}catch(e){// We can't do external URL detection without a valid URL
false?0:void 0}}}// Rendered into <a href> for relative URLs
let g=useHref(l,{relative:n});let b=es(l,{replace:a,state:o,target:s,preventScrollReset:d,relative:n,viewTransition:f});function _(e){if(r)r(e);if(!e.defaultPrevented){b(e)}}return(/*#__PURE__*/// eslint-disable-next-line jsx-a11y/anchor-has-content
React.createElement("a",u({},p,{href:v||g,onClick:m||i?r:_,ref:t,target:s})))});if(false){}/**
 * A `<Link>` wrapper that knows if it's "active" or not.
 */const Z=/*#__PURE__*//* unused pure expression or super */null&&React.forwardRef(function e(e,t){let{"aria-current":r="page",caseSensitive:n=false,className:i="",end:a=false,style:o,to:s,viewTransition:l,children:d}=e,f=c(e,S);let p=useResolvedPath(s,{relative:f.relative});let h=useLocation();let v=React.useContext(UNSAFE_DataRouterStateContext);let{navigator:m,basename:g}=React.useContext(UNSAFE_NavigationContext);let b=v!=null&&// Conditional usage is OK here because the usage of a data router is static
// eslint-disable-next-line react-hooks/rules-of-hooks
eA(p)&&l===true;let _=m.encodeLocation?m.encodeLocation(p).pathname:p.pathname;let y=h.pathname;let w=v&&v.navigation&&v.navigation.location?v.navigation.location.pathname:null;if(!n){y=y.toLowerCase();w=w?w.toLowerCase():null;_=_.toLowerCase()}if(w&&g){w=stripBasename(w,g)||w}// If the `to` has a trailing slash, look at that exact spot.  Otherwise,
// we're looking for a slash _after_ what's in `to`.  For example:
//
// <NavLink to="/users"> and <NavLink to="/users/">
// both want to look for a / at index 6 to match URL `/users/matt`
const A=_!=="/"&&_.endsWith("/")?_.length-1:_.length;let x=y===_||!a&&y.startsWith(_)&&y.charAt(A)==="/";let E=w!=null&&(w===_||!a&&w.startsWith(_)&&w.charAt(_.length)==="/");let O={isActive:x,isPending:E,isTransitioning:b};let T=x?r:undefined;let k;if(typeof i==="function"){k=i(O)}else{// If the className prop is not a function, we use a default `active`
// class for <NavLink />s that are active. In v5 `active` was the default
// value for `activeClassName`, but we are removing that API and can still
// use the old default behavior for a cleaner upgrade path and keep the
// simple styling rules working as they currently do.
k=[i,x?"active":null,E?"pending":null,b?"transitioning":null].filter(Boolean).join(" ")}let C=typeof o==="function"?o(O):o;return /*#__PURE__*/React.createElement(J,u({},f,{"aria-current":T,className:k,ref:t,style:C,to:s,viewTransition:l}),typeof d==="function"?d(O):d)});if(false){}/**
 * A `@remix-run/router`-aware `<form>`. It behaves like a normal form except
 * that the interaction with the server is with `fetch` instead of new document
 * requests, allowing components to add nicer UX to the page as the form is
 * submitted and returns with data.
 */const ee=/*#__PURE__*//* unused pure expression or super */null&&React.forwardRef((e,t)=>{let{fetcherKey:r,navigate:n,reloadDocument:i,replace:a,state:o,method:s=l,action:d,onSubmit:f,relative:p,preventScrollReset:h,viewTransition:v}=e,m=c(e,T);let g=ef();let b=ep(d,{relative:p});let _=s.toLowerCase()==="get"?"get":"post";let y=e=>{f&&f(e);if(e.defaultPrevented)return;e.preventDefault();let t=e.nativeEvent.submitter;let i=(t==null?void 0:t.getAttribute("formmethod"))||s;g(t||e.currentTarget,{fetcherKey:r,method:i,navigate:n,replace:a,state:o,relative:p,preventScrollReset:h,viewTransition:v})};return /*#__PURE__*/React.createElement("form",u({ref:t,method:_,action:b,onSubmit:i?f:y},m))});if(false){}/**
 * This component will emulate the browser's scroll restoration on location
 * changes.
 */function et(e){let{getKey:t,storageKey:r}=e;eb({getKey:t,storageKey:r});return null}if(false){}//#endregion
////////////////////////////////////////////////////////////////////////////////
//#region Hooks
////////////////////////////////////////////////////////////////////////////////
var er;(function(e){e["UseScrollRestoration"]="useScrollRestoration";e["UseSubmit"]="useSubmit";e["UseSubmitFetcher"]="useSubmitFetcher";e["UseFetcher"]="useFetcher";e["useViewTransitionState"]="useViewTransitionState"})(er||(er={}));var en;(function(e){e["UseFetcher"]="useFetcher";e["UseFetchers"]="useFetchers";e["UseScrollRestoration"]="useScrollRestoration"})(en||(en={}));// Internal hooks
function ei(e){return e+" must be used within a data router.  See https://reactrouter.com/v6/routers/picking-a-router."}function ea(e){let t=React.useContext(UNSAFE_DataRouterContext);!t?false?0:UNSAFE_invariant(false):void 0;return t}function eo(e){let t=React.useContext(UNSAFE_DataRouterStateContext);!t?false?0:UNSAFE_invariant(false):void 0;return t}// External hooks
/**
 * Handles the click behavior for router `<Link>` components. This is useful if
 * you need to create custom `<Link>` components with the same click behavior we
 * use in our exported `<Link>`.
 */function es(e,t){let{target:r,replace:n,state:i,preventScrollReset:a,relative:o,viewTransition:s}=t===void 0?{}:t;let u=useNavigate();let c=useLocation();let l=useResolvedPath(e,{relative:o});return React.useCallback(t=>{if(g(t,r)){t.preventDefault();// If the URL hasn't changed, a regular <a> will do a replace instead of
// a push, so do the same here unless the replace prop is explicitly set
let r=n!==undefined?n:createPath(c)===createPath(l);u(e,{replace:r,state:i,preventScrollReset:a,relative:o,viewTransition:s})}},[c,u,l,n,i,r,e,a,o,s])}/**
 * A convenient wrapper for reading and writing search parameters via the
 * URLSearchParams interface.
 */function eu(e){false?0:void 0;let t=React.useRef(b(e));let r=React.useRef(false);let n=useLocation();let i=React.useMemo(()=>// Only merge in the defaults if we haven't yet called setSearchParams.
    // Once we call that we want those to take precedence, otherwise you can't
    // remove a param with setSearchParams({}) if it has an initial value
    _(n.search,r.current?null:t.current),[n.search]);let a=useNavigate();let o=React.useCallback((e,t)=>{const n=b(typeof e==="function"?e(i):e);r.current=true;a("?"+n,t)},[a,i]);return[i,o]}function ec(){if(typeof document==="undefined"){throw new Error("You are calling submit during the server render. "+"Try calling submit within a `useEffect` or callback instead.")}}let el=0;let ed=()=>"__"+String(++el)+"__";/**
 * Returns a function that may be used to programmatically submit a form (or
 * some arbitrary data) to the server.
 */function ef(){let{router:e}=ea(er.UseSubmit);let{basename:t}=React.useContext(UNSAFE_NavigationContext);let r=UNSAFE_useRouteId();return React.useCallback(function(n,i){if(i===void 0){i={}}ec();let{action:a,method:o,encType:s,formData:u,body:c}=E(n,t);if(i.navigate===false){let t=i.fetcherKey||ed();e.fetch(t,r,i.action||a,{preventScrollReset:i.preventScrollReset,formData:u,body:c,formMethod:i.method||o,formEncType:i.encType||s,flushSync:i.flushSync})}else{e.navigate(i.action||a,{preventScrollReset:i.preventScrollReset,formData:u,body:c,formMethod:i.method||o,formEncType:i.encType||s,replace:i.replace,state:i.state,fromRouteId:r,flushSync:i.flushSync,viewTransition:i.viewTransition})}},[e,t,r])}// v7: Eventually we should deprecate this entirely in favor of using the
// router method directly?
function ep(e,t){let{relative:r}=t===void 0?{}:t;let{basename:n}=React.useContext(UNSAFE_NavigationContext);let i=React.useContext(UNSAFE_RouteContext);!i?false?0:UNSAFE_invariant(false):void 0;let[a]=i.matches.slice(-1);// Shallow clone path so we can modify it below, otherwise we modify the
// object referenced by useMemo inside useResolvedPath
let o=u({},useResolvedPath(e?e:".",{relative:r}));// If no action was specified, browsers will persist current search params
// when determining the path, so match that behavior
// https://github.com/remix-run/remix/issues/927
let s=useLocation();if(e==null){// Safe to write to this directly here since if action was undefined, we
// would have called useResolvedPath(".") which will never include a search
o.search=s.search;// When grabbing search params from the URL, remove any included ?index param
// since it might not apply to our contextual route.  We add it back based
// on match.route.index below
let e=new URLSearchParams(o.search);let t=e.getAll("index");let r=t.some(e=>e==="");if(r){e.delete("index");t.filter(e=>e).forEach(t=>e.append("index",t));let r=e.toString();o.search=r?"?"+r:""}}if((!e||e===".")&&a.route.index){o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"}// If we're operating within a basename, prepend it to the pathname prior
// to creating the form action.  If this is a root navigation, then just use
// the raw basename which allows the basename to have full control over the
// presence of a trailing slash on root actions
if(n!=="/"){o.pathname=o.pathname==="/"?n:joinPaths([n,o.pathname])}return createPath(o)}// TODO: (v7) Change the useFetcher generic default from `any` to `unknown`
/**
 * Interacts with route loaders and actions without causing a navigation. Great
 * for any interaction that stays on the same page.
 */function eh(e){var t;let{key:r}=e===void 0?{}:e;let{router:n}=ea(er.UseFetcher);let i=eo(en.UseFetcher);let a=React.useContext(M);let o=React.useContext(UNSAFE_RouteContext);let s=(t=o.matches[o.matches.length-1])==null?void 0:t.route.id;!a?false?0:UNSAFE_invariant(false):void 0;!o?false?0:UNSAFE_invariant(false):void 0;!(s!=null)?false?0:UNSAFE_invariant(false):void 0;// Fetcher key handling
// OK to call conditionally to feature detect `useId`
// eslint-disable-next-line react-hooks/rules-of-hooks
let c=j?j():"";let[l,d]=React.useState(r||c);if(r&&r!==l){d(r)}else if(!l){// We will only fall through here when `useId` is not available
d(ed())}// Registration/cleanup
React.useEffect(()=>{n.getFetcher(l);return()=>{// Tell the router we've unmounted - if v7_fetcherPersist is enabled this
// will not delete immediately but instead queue up a delete after the
// fetcher returns to an `idle` state
n.deleteFetcher(l)}},[n,l]);// Fetcher additions
let f=React.useCallback((e,t)=>{!s?false?0:UNSAFE_invariant(false):void 0;n.fetch(l,s,e,t)},[l,s,n]);let p=ef();let h=React.useCallback((e,t)=>{p(e,u({},t,{navigate:false,fetcherKey:l}))},[l,p]);let v=React.useMemo(()=>{let e=/*#__PURE__*/React.forwardRef((e,t)=>{return /*#__PURE__*/React.createElement(ee,u({},e,{navigate:false,fetcherKey:l,ref:t}))});if(false){}return e},[l]);// Exposed FetcherWithComponents
let m=i.fetchers.get(l)||IDLE_FETCHER;let g=a.get(l);let b=React.useMemo(()=>u({Form:v,submit:h,load:f},m,{data:g}),[v,h,f,m,g]);return b}/**
 * Provides all fetchers currently on the page. Useful for layouts and parent
 * routes that need to provide pending/optimistic UI regarding the fetch.
 */function ev(){let e=eo(en.UseFetchers);return Array.from(e.fetchers.entries()).map(e=>{let[t,r]=e;return u({},r,{key:t})})}const em="react-router-scroll-positions";let eg=/* unused pure expression or super */null&&{};/**
 * When rendered inside a RouterProvider, will restore scroll positions on navigations
 */function eb(e){let{getKey:t,storageKey:r}=e===void 0?{}:e;let{router:n}=ea(er.UseScrollRestoration);let{restoreScrollPosition:i,preventScrollReset:a}=eo(en.UseScrollRestoration);let{basename:o}=React.useContext(UNSAFE_NavigationContext);let s=useLocation();let c=useMatches();let l=useNavigation();// Trigger manual scroll restoration while we're active
React.useEffect(()=>{window.history.scrollRestoration="manual";return()=>{window.history.scrollRestoration="auto"}},[]);// Save positions on pagehide
ey(React.useCallback(()=>{if(l.state==="idle"){let e=(t?t(s,c):null)||s.key;eg[e]=window.scrollY}try{sessionStorage.setItem(r||em,JSON.stringify(eg))}catch(e){false?0:void 0}window.history.scrollRestoration="auto"},[r,t,l.state,s,c]));// Read in any saved scroll locations
if(typeof document!=="undefined"){// eslint-disable-next-line react-hooks/rules-of-hooks
React.useLayoutEffect(()=>{try{let e=sessionStorage.getItem(r||em);if(e){eg=JSON.parse(e)}}catch(e){// no-op, use default empty object
}},[r]);// Enable scroll restoration in the router
// eslint-disable-next-line react-hooks/rules-of-hooks
React.useLayoutEffect(()=>{let e=t&&o!=="/"?(e,r)=>t(u({},e,{pathname:stripBasename(e.pathname,o)||e.pathname}),r):t;let r=n==null?void 0:n.enableScrollRestoration(eg,()=>window.scrollY,e);return()=>r&&r()},[n,o,t]);// Restore scrolling when state.restoreScrollPosition changes
// eslint-disable-next-line react-hooks/rules-of-hooks
React.useLayoutEffect(()=>{// Explicit false means don't do anything (used for submissions)
if(i===false){return}// been here before, scroll to it
if(typeof i==="number"){window.scrollTo(0,i);return}// try to scroll to the hash
if(s.hash){let e=document.getElementById(decodeURIComponent(s.hash.slice(1)));if(e){e.scrollIntoView();return}}// Don't reset if this navigation opted out
if(a===true){return}// otherwise go to the top on new locations
window.scrollTo(0,0)},[s,i,a])}}/**
 * Setup a callback to be fired on the window's `beforeunload` event. This is
 * useful for saving some data to `window.localStorage` just before the page
 * refreshes.
 *
 * Note: The `callback` argument should be a function created with
 * `React.useCallback()`.
 */function e_(e,t){let{capture:r}=t||{};React.useEffect(()=>{let t=r!=null?{capture:r}:undefined;window.addEventListener("beforeunload",e,t);return()=>{window.removeEventListener("beforeunload",e,t)}},[e,r])}/**
 * Setup a callback to be fired on the window's `pagehide` event. This is
 * useful for saving some data to `window.localStorage` just before the page
 * refreshes.  This event is better supported than beforeunload across browsers.
 *
 * Note: The `callback` argument should be a function created with
 * `React.useCallback()`.
 */function ey(e,t){let{capture:r}=t||{};React.useEffect(()=>{let t=r!=null?{capture:r}:undefined;window.addEventListener("pagehide",e,t);return()=>{window.removeEventListener("pagehide",e,t)}},[e,r])}/**
 * Wrapper around useBlocker to show a window.confirm prompt to users instead
 * of building a custom UI with useBlocker.
 *
 * Warning: This has *a lot of rough edges* and behaves very differently (and
 * very incorrectly in some cases) across browsers if user click addition
 * back/forward navigations while the confirm is open.  Use at your own risk.
 */function ew(e){let{when:t,message:r}=e;let n=useBlocker(t);React.useEffect(()=>{if(n.state==="blocked"){let e=window.confirm(r);if(e){// This timeout is needed to avoid a weird "race" on POP navigations
// between the `window.history` revert navigation and the result of
// `window.confirm`
setTimeout(n.proceed,0)}else{n.reset()}}},[n,r]);React.useEffect(()=>{if(n.state==="blocked"&&!t){n.reset()}},[n,t])}/**
 * Return a boolean indicating if there is an active view transition to the
 * given href.  You can use this value to render CSS classes or viewTransitionName
 * styles onto your elements
 *
 * @param href The destination href
 * @param [opts.relative] Relative routing type ("route" | "path")
 */function eA(e,t){if(t===void 0){t={}}let r=React.useContext(P);!(r!=null)?false?0:UNSAFE_invariant(false):void 0;let{basename:n}=ea(er.useViewTransitionState);let i=useResolvedPath(e,{relative:t.relative});if(!r.isTransitioning){return false}let a=stripBasename(r.currentLocation.pathname,n)||r.currentLocation.pathname;let o=stripBasename(r.nextLocation.pathname,n)||r.nextLocation.pathname;// Transition is active if we're going to or coming from the indicated
// destination.  This ensures that other PUSH navigations that reverse
// an indicated transition apply.  I.e., on the list view you have:
//
//   <NavLink to="/details/1" viewTransition>
//
// If you click the breadcrumb back to the list view:
//
//   <NavLink to="/list" viewTransition>
//
// We should apply the transition because it's indicated as active going
// from /list -> /details/1 and therefore should be active on the reverse
// (even though this isn't strictly a POP reverse)
return matchPath(i.pathname,o)!=null||matchPath(i.pathname,a)!=null}//#endregion
//# sourceMappingURL=index.js.map
// EXTERNAL MODULE: ./assets/src/js/v3/shared/components/ErrorBoundary.tsx
var ex=r(27246);// EXTERNAL MODULE: ./node_modules/.pnpm/@emotion+react@11.14.0_@types+react@18.3.1_react@18.3.1/node_modules/@emotion/react/dist/emotion-react.browser.esm.js
var eE=r(42771);// EXTERNAL MODULE: ./node_modules/.pnpm/@tanstack+query-core@5.62.15/node_modules/@tanstack/query-core/build/modern/utils.js
var eO=r(19005);// EXTERNAL MODULE: ./node_modules/.pnpm/@tanstack+query-core@5.62.15/node_modules/@tanstack/query-core/build/modern/query.js
var eS=r(10860);// EXTERNAL MODULE: ./node_modules/.pnpm/@tanstack+query-core@5.62.15/node_modules/@tanstack/query-core/build/modern/notifyManager.js
var eT=r(73276);// EXTERNAL MODULE: ./node_modules/.pnpm/@tanstack+query-core@5.62.15/node_modules/@tanstack/query-core/build/modern/subscribable.js
var ek=r(66887);// CONCATENATED MODULE: ./node_modules/.pnpm/@tanstack+query-core@5.62.15/node_modules/@tanstack/query-core/build/modern/queryCache.js
// src/queryCache.ts
var eC=class extends ek/* .Subscribable */.Q{constructor(e={}){super();this.config=e;this.#U=/* @__PURE__ */new Map}#U;build(e,t,r){const n=t.queryKey;const i=t.queryHash??(0,eO/* .hashQueryKeyByOptions */.F$)(n,t);let a=this.get(i);if(!a){a=new eS/* .Query */.X({cache:this,queryKey:n,queryHash:i,options:e.defaultQueryOptions(t),state:r,defaultOptions:e.getQueryDefaults(n)});this.add(a)}return a}add(e){if(!this.#U.has(e.queryHash)){this.#U.set(e.queryHash,e);this.notify({type:"added",query:e})}}remove(e){const t=this.#U.get(e.queryHash);if(t){e.destroy();if(t===e){this.#U.delete(e.queryHash)}this.notify({type:"removed",query:e})}}clear(){eT/* .notifyManager.batch */.j.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#U.get(e)}getAll(){return[...this.#U.values()]}find(e){const t={exact:true,...e};return this.getAll().find(e=>(0,eO/* .matchQuery */.MK)(t,e))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(t=>(0,eO/* .matchQuery */.MK)(e,t)):t}notify(e){eT/* .notifyManager.batch */.j.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){eT/* .notifyManager.batch */.j.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){eT/* .notifyManager.batch */.j.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}};//# sourceMappingURL=queryCache.js.map
// EXTERNAL MODULE: ./node_modules/.pnpm/@tanstack+query-core@5.62.15/node_modules/@tanstack/query-core/build/modern/mutation.js
var eI=r(39609);// CONCATENATED MODULE: ./node_modules/.pnpm/@tanstack+query-core@5.62.15/node_modules/@tanstack/query-core/build/modern/mutationCache.js
// src/mutationCache.ts
var eR=class extends ek/* .Subscribable */.Q{constructor(e={}){super();this.config=e;this.#B=/* @__PURE__ */new Set;this.#K=/* @__PURE__ */new Map;this.#z=0}#B;#K;#z;build(e,t,r){const n=new eI/* .Mutation */.s({mutationCache:this,mutationId:++this.#z,options:e.defaultMutationOptions(t),state:r});this.add(n);return n}add(e){this.#B.add(e);const t=eD(e);if(typeof t==="string"){const r=this.#K.get(t);if(r){r.push(e)}else{this.#K.set(t,[e])}}this.notify({type:"added",mutation:e})}remove(e){if(this.#B.delete(e)){const t=eD(e);if(typeof t==="string"){const r=this.#K.get(t);if(r){if(r.length>1){const t=r.indexOf(e);if(t!==-1){r.splice(t,1)}}else if(r[0]===e){this.#K.delete(t)}}}}this.notify({type:"removed",mutation:e})}canRun(e){const t=eD(e);if(typeof t==="string"){const r=this.#K.get(t);const n=r?.find(e=>e.state.status==="pending");return!n||n===e}else{return true}}runNext(e){const t=eD(e);if(typeof t==="string"){const r=this.#K.get(t)?.find(t=>t!==e&&t.state.isPaused);return r?.continue()??Promise.resolve()}else{return Promise.resolve()}}clear(){eT/* .notifyManager.batch */.j.batch(()=>{this.#B.forEach(e=>{this.notify({type:"removed",mutation:e})});this.#B.clear();this.#K.clear()})}getAll(){return Array.from(this.#B)}find(e){const t={exact:true,...e};return this.getAll().find(e=>(0,eO/* .matchMutation */.nJ)(t,e))}findAll(e={}){return this.getAll().filter(t=>(0,eO/* .matchMutation */.nJ)(e,t))}notify(e){eT/* .notifyManager.batch */.j.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(e=>e.state.isPaused);return eT/* .notifyManager.batch */.j.batch(()=>Promise.all(e.map(e=>e.continue().catch(eO/* .noop */.lQ))))}};function eD(e){return e.options.scope?.id}//# sourceMappingURL=mutationCache.js.map
// EXTERNAL MODULE: ./node_modules/.pnpm/@tanstack+query-core@5.62.15/node_modules/@tanstack/query-core/build/modern/focusManager.js
var eP=r(35465);// EXTERNAL MODULE: ./node_modules/.pnpm/@tanstack+query-core@5.62.15/node_modules/@tanstack/query-core/build/modern/onlineManager.js
var eM=r(44030);// CONCATENATED MODULE: ./node_modules/.pnpm/@tanstack+query-core@5.62.15/node_modules/@tanstack/query-core/build/modern/infiniteQueryBehavior.js
// src/infiniteQueryBehavior.ts
function eF(e){return{onFetch:(t,r)=>{const n=t.options;const i=t.fetchOptions?.meta?.fetchMore?.direction;const a=t.state.data?.pages||[];const o=t.state.data?.pageParams||[];let s={pages:[],pageParams:[]};let u=0;const c=async()=>{let r=false;const c=e=>{Object.defineProperty(e,"signal",{enumerable:true,get:()=>{if(t.signal.aborted){r=true}else{t.signal.addEventListener("abort",()=>{r=true})}return t.signal}})};const l=(0,eO/* .ensureQueryFn */.ZM)(t.options,t.fetchOptions);const d=async(e,n,i)=>{if(r){return Promise.reject()}if(n==null&&e.pages.length){return Promise.resolve(e)}const a={queryKey:t.queryKey,pageParam:n,direction:i?"backward":"forward",meta:t.options.meta};c(a);const o=await l(a);const{maxPages:s}=t.options;const u=i?eO/* .addToStart */.ZZ:eO/* .addToEnd */.y9;return{pages:u(e.pages,o,s),pageParams:u(e.pageParams,n,s)}};if(i&&a.length){const e=i==="backward";const t=e?eL:eY;const r={pages:a,pageParams:o};const u=t(n,r);s=await d(r,u,e)}else{const t=e??a.length;do{const e=u===0?o[0]??n.initialPageParam:eY(n,s);if(u>0&&e==null){break}s=await d(s,e);u++}while(u<t)}return s};if(t.options.persister){t.fetchFn=()=>{return t.options.persister?.(c,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}}else{t.fetchFn=c}}}}function eY(e,{pages:t,pageParams:r}){const n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}function eL(e,{pages:t,pageParams:r}){return t.length>0?e.getPreviousPageParam?.(t[0],t,r[0],r):void 0}function eN(e,t){if(!t)return false;return eY(e,t)!=null}function eH(e,t){if(!t||!e.getPreviousPageParam)return false;return eL(e,t)!=null}//# sourceMappingURL=infiniteQueryBehavior.js.map
;// CONCATENATED MODULE: ./node_modules/.pnpm/@tanstack+query-core@5.62.15/node_modules/@tanstack/query-core/build/modern/queryClient.js
// src/queryClient.ts
var ej=class{#q;#i;#g;#V;#W;#G;#$;#Q;constructor(e={}){this.#q=e.queryCache||new eC;this.#i=e.mutationCache||new eR;this.#g=e.defaultOptions||{};this.#V=/* @__PURE__ */new Map;this.#W=/* @__PURE__ */new Map;this.#G=0}mount(){this.#G++;if(this.#G!==1)return;this.#$=eP/* .focusManager.subscribe */.m.subscribe(async e=>{if(e){await this.resumePausedMutations();this.#q.onFocus()}});this.#Q=eM/* .onlineManager.subscribe */.t.subscribe(async e=>{if(e){await this.resumePausedMutations();this.#q.onOnline()}})}unmount(){this.#G--;if(this.#G!==0)return;this.#$?.();this.#$=void 0;this.#Q?.();this.#Q=void 0}isFetching(e){return this.#q.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#i.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#q.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e);const r=this.#q.build(this,t);const n=r.state.data;if(n===void 0){return this.fetchQuery(e)}if(e.revalidateIfStale&&r.isStaleByTime((0,eO/* .resolveStaleTime */.d2)(t.staleTime,r))){void this.prefetchQuery(t)}return Promise.resolve(n)}getQueriesData(e){return this.#q.findAll(e).map(({queryKey:e,state:t})=>{const r=t.data;return[e,r]})}setQueryData(e,t,r){const n=this.defaultQueryOptions({queryKey:e});const i=this.#q.get(n.queryHash);const a=i?.state.data;const o=(0,eO/* .functionalUpdate */.Zw)(t,a);if(o===void 0){return void 0}return this.#q.build(this,n).setData(o,{...r,manual:true})}setQueriesData(e,t,r){return eT/* .notifyManager.batch */.j.batch(()=>this.#q.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,r)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#q.get(t.queryHash)?.state}removeQueries(e){const t=this.#q;eT/* .notifyManager.batch */.j.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){const r=this.#q;const n={type:"active",...e};return eT/* .notifyManager.batch */.j.batch(()=>{r.findAll(e).forEach(e=>{e.reset()});return this.refetchQueries(n,t)})}cancelQueries(e,t={}){const r={revert:true,...t};const n=eT/* .notifyManager.batch */.j.batch(()=>this.#q.findAll(e).map(e=>e.cancel(r)));return Promise.all(n).then(eO/* .noop */.lQ).catch(eO/* .noop */.lQ)}invalidateQueries(e,t={}){return eT/* .notifyManager.batch */.j.batch(()=>{this.#q.findAll(e).forEach(e=>{e.invalidate()});if(e?.refetchType==="none"){return Promise.resolve()}const r={...e,type:e?.refetchType??e?.type??"active"};return this.refetchQueries(r,t)})}refetchQueries(e,t={}){const r={...t,cancelRefetch:t.cancelRefetch??true};const n=eT/* .notifyManager.batch */.j.batch(()=>this.#q.findAll(e).filter(e=>!e.isDisabled()).map(e=>{let t=e.fetch(void 0,r);if(!r.throwOnError){t=t.catch(eO/* .noop */.lQ)}return e.state.fetchStatus==="paused"?Promise.resolve():t}));return Promise.all(n).then(eO/* .noop */.lQ)}fetchQuery(e){const t=this.defaultQueryOptions(e);if(t.retry===void 0){t.retry=false}const r=this.#q.build(this,t);return r.isStaleByTime((0,eO/* .resolveStaleTime */.d2)(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(eO/* .noop */.lQ).catch(eO/* .noop */.lQ)}fetchInfiniteQuery(e){e.behavior=eF(e.pages);return this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(eO/* .noop */.lQ).catch(eO/* .noop */.lQ)}ensureInfiniteQueryData(e){e.behavior=eF(e.pages);return this.ensureQueryData(e)}resumePausedMutations(){if(eM/* .onlineManager.isOnline */.t.isOnline()){return this.#i.resumePausedMutations()}return Promise.resolve()}getQueryCache(){return this.#q}getMutationCache(){return this.#i}getDefaultOptions(){return this.#g}setDefaultOptions(e){this.#g=e}setQueryDefaults(e,t){this.#V.set((0,eO/* .hashKey */.EN)(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#V.values()];const r={};t.forEach(t=>{if((0,eO/* .partialMatchKey */.Cp)(e,t.queryKey)){Object.assign(r,t.defaultOptions)}});return r}setMutationDefaults(e,t){this.#W.set((0,eO/* .hashKey */.EN)(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#W.values()];let r={};t.forEach(t=>{if((0,eO/* .partialMatchKey */.Cp)(e,t.mutationKey)){r={...r,...t.defaultOptions}}});return r}defaultQueryOptions(e){if(e._defaulted){return e}const t={...this.#g.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:true};if(!t.queryHash){t.queryHash=(0,eO/* .hashQueryKeyByOptions */.F$)(t.queryKey,t)}if(t.refetchOnReconnect===void 0){t.refetchOnReconnect=t.networkMode!=="always"}if(t.throwOnError===void 0){t.throwOnError=!!t.suspense}if(!t.networkMode&&t.persister){t.networkMode="offlineFirst"}if(t.queryFn===eO/* .skipToken */.hT){t.enabled=false}return t}defaultMutationOptions(e){if(e?._defaulted){return e}return{...this.#g.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:true}}clear(){this.#q.clear();this.#i.clear()}};//# sourceMappingURL=queryClient.js.map
// EXTERNAL MODULE: ./node_modules/.pnpm/@tanstack+react-query@5.62.15_react@18.3.1/node_modules/@tanstack/react-query/build/modern/QueryClientProvider.js
var eU=r(92965);// EXTERNAL MODULE: ./assets/src/js/v3/shared/atoms/Toast.tsx
var eB=r(40925);// EXTERNAL MODULE: ./assets/src/js/v3/shared/components/modals/Modal.tsx
var eK=r(17944);// EXTERNAL MODULE: ./node_modules/.pnpm/@emotion+cache@11.14.0/node_modules/@emotion/cache/dist/emotion-cache.browser.esm.js
var ez=r(54938);// EXTERNAL MODULE: ./node_modules/.pnpm/@emotion+react@11.14.0_@types+react@18.3.1_react@18.3.1/node_modules/@emotion/react/dist/emotion-element-f0de968e.browser.esm.js
var eq=r(48354);// EXTERNAL MODULE: ./node_modules/.pnpm/cssjanus@2.3.0/node_modules/cssjanus/src/cssjanus.js
var eV=r(60967);var eW=/*#__PURE__*/r.n(eV);// EXTERNAL MODULE: ./node_modules/.pnpm/stylis@4.2.0/node_modules/stylis/src/Enum.js
var eG=r(37822);// EXTERNAL MODULE: ./node_modules/.pnpm/stylis@4.2.0/node_modules/stylis/src/Serializer.js
var e$=r(92027);// EXTERNAL MODULE: ./node_modules/.pnpm/stylis@4.2.0/node_modules/stylis/src/Utility.js
var eQ=r(88975);// EXTERNAL MODULE: ./node_modules/.pnpm/stylis@4.2.0/node_modules/stylis/src/Parser.js
var eX=r(49116);// CONCATENATED MODULE: ./node_modules/.pnpm/stylis-plugin-rtl@2.1.1_stylis@4.2.0/node_modules/stylis-plugin-rtl/dist/stylis-rtl.js
function eJ(e,t,r){switch(e.type){case eG/* .IMPORT */.yE:case eG/* .DECLARATION */.LU:case eG/* .COMMENT */.YK:return e.return=e.return||e.value;case eG/* .RULESET */.XZ:{e.value=Array.isArray(e.props)?e.props.join(","):e.props;if(Array.isArray(e.children)){e.children.forEach(function(e){if(e.type===eG/* .COMMENT */.YK)e.children=e.value})}}}var n=(0,e$/* .serialize */.l)(Array.prototype.concat(e.children),eJ);return(0,eQ/* .strlen */.b2)(n)?e.return=e.value+"{"+n+"}":""}function eZ(e,t,r,n){if(e.type===eG/* .KEYFRAMES */.Sv||e.type===eG/* .SUPPORTS */.$1||e.type===eG/* .RULESET */.XZ&&(!e.parent||e.parent.type===eG/* .MEDIA */.Rn||e.parent.type===eG/* .RULESET */.XZ)){var i=eW().transform(eJ(e,t,r));e.children=i?(0,eX/* .compile */.wE)(i)[0].children:[];e.return=""}}// stable identifier that will not be dropped by minification unless the whole module
// is unused
Object.defineProperty(eZ,"name",{value:"stylisRTLPlugin"});/* export default */const e0=eZ;//# sourceMappingURL=stylis-rtl.js.map
// EXTERNAL MODULE: ./assets/src/js/v3/shared/config/constants.ts
var e1=r(19393);// CONCATENATED MODULE: ./assets/src/js/v3/shared/components/RTLProvider.tsx
var e2=(0,ez/* ["default"] */.A)({stylisPlugins:[e0],key:"rtl"});var e6=t=>{var{children:r}=t;if(e1/* .isRTL */.V8){return/*#__PURE__*/(0,e/* .jsx */.Y)(eq.C,{value:e2,children:r})}return/*#__PURE__*/(0,e/* .jsx */.Y)(e/* .Fragment */.FK,{children:r})};/* export default */const e4=e6;// EXTERNAL MODULE: ./assets/src/js/v3/shared/contexts/SVGIconConfigContext.tsx
var e5=r(82720);// EXTERNAL MODULE: ./assets/src/js/v3/shared/utils/style-utils.ts
var e3=r(52874);// EXTERNAL MODULE: ./assets/src/js/v3/entries/course-builder/config/routes.tsx + 32 modules
var e9=r(36068);// EXTERNAL MODULE: ./assets/src/js/v3/entries/course-builder/contexts/CourseBuilderSlotContext.tsx
var e8=r(79100);// CONCATENATED MODULE: ./assets/src/js/v3/entries/course-builder/components/App.tsx
var e7=()=>{var[r]=(0,t.useState)(()=>new ej({defaultOptions:{queries:{retry:false,refetchOnWindowFocus:false,networkMode:"always"},mutations:{retry:false,networkMode:"always"}}}));var n=(0,o/* .useRoutes */.Ye)(e9/* ["default"] */.A);return/*#__PURE__*/(0,e/* .jsx */.Y)(e4,{children:/*#__PURE__*/(0,e/* .jsx */.Y)(eU/* .QueryClientProvider */.Ht,{client:r,children:/*#__PURE__*/(0,e/* .jsx */.Y)(e5/* .SVGIconConfigProvider */.j,{children:/*#__PURE__*/(0,e/* .jsx */.Y)(eB/* ["default"] */.A,{position:"bottom-center",children:/*#__PURE__*/(0,e/* .jsx */.Y)(e8/* .CourseBuilderSlotProvider */.E,{children:/*#__PURE__*/(0,e/* .jsxs */.FD)(eK/* .ModalProvider */.Z,{children:[/*#__PURE__*/(0,e/* .jsx */.Y)(eE/* .Global */.mL,{styles:[(0,e3/* .createGlobalCss */.v)()]}),n]})})})})})})};/* export default */const te=e7;// CONCATENATED MODULE: ./assets/src/js/v3/entries/course-builder/index.tsx
var tt=i.createRoot(document.getElementById("tutor-course-builder"));tt.render(/*#__PURE__*/(0,e/* .jsx */.Y)(n().StrictMode,{children:/*#__PURE__*/(0,e/* .jsx */.Y)(G,{children:/*#__PURE__*/(0,e/* .jsx */.Y)(ex/* ["default"] */.A,{children:/*#__PURE__*/(0,e/* .jsx */.Y)(te,{})})})}))})()})();