@flarehr/superhero-account-registry 2.59.77 → 2.61.79

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,16 +1,16 @@
1
- (function(){"use strict";function un(e){return Array.isArray(e)||ArrayBuffer.isView(e)}function Qh(e){return e!=null&&typeof e.GetEnumerator=="function"}function em(e){return e!=null&&typeof e.CompareTo=="function"}function tm(e){return e!=null&&typeof e.Equals=="function"}function Cl(e){return e!=null&&typeof e.GetHashCode=="function"}function ho(e){return e!=null&&typeof e.Dispose=="function"}function xe(e){ho(e)&&e.Dispose()}function ge(){return null}function ei(e,t){var n,r;return((n=Object.getPrototypeOf(e))==null?void 0:n.constructor)===((r=Object.getPrototypeOf(t))==null?void 0:r.constructor)}class nm{constructor(t){this.iter=t,this.current=ge()}"System.Collections.Generic.IEnumerator`1.get_Current"(){return this.current}"System.Collections.IEnumerator.get_Current"(){return this.current}"System.Collections.IEnumerator.MoveNext"(){const t=this.iter.next();return this.current=t.value,!t.done}"System.Collections.IEnumerator.Reset"(){throw new Error("JS iterators cannot be reset")}Dispose(){}}function De(e){return Qh(e)?e.GetEnumerator():new nm(e[Symbol.iterator]())}function us(e){return{next(){const t=e["System.Collections.IEnumerator.MoveNext"](),n=t?e["System.Collections.Generic.IEnumerator`1.get_Current"]():void 0;return{done:!t,value:n}}}}class rm{constructor(t){this.factory=t,this.isValueCreated=!1}get Value(){return this.isValueCreated||(this.createdValue=this.factory(),this.isValueCreated=!0),this.createdValue}get IsValueCreated(){return this.isValueCreated}}function _e(e,t){return e.toString(10).padStart(t,"0")}function sm(e,t,n){return e.toString(10).padStart(t,"0").padEnd(n,"0")}function Sl(e){const t=e;return typeof t.offset=="number"?t.offset:e.kind===1?0:e.getTimezoneOffset()*-6e4}function im(e,t){return e=e,e.toString(t)}function Qn(e,t){return e=e,e.toString(t)}class yn{static id(t){return yn.idMap.has(t)||yn.idMap.set(t,++yn.count),yn.idMap.get(t)}}yn.idMap=new WeakMap,yn.count=0;function Ar(e){let t=0,n=5381;const r=e.length;for(;t<r;)n=n*33^e.charCodeAt(t++);return n}function Gt(e){return e*2654435761|0}function Al(e){return Ar(e.toString(32))}function ds(e){let t=0;const n=e.length;for(let r=0;r<n;r++){const s=e[r];t=(t<<5)+t^s}return t}function om(e){if(e==null)return 0;switch(typeof e){case"boolean":return e?1:0;case"number":return Gt(e);case"bigint":return Al(e);case"string":return Ar(e);default:return Gt(yn.id(e))}}function am(e){return Cl(e)?e.GetHashCode():om(e)}function lm(e){return e.getTime()}function cm(e){const t=e.length,n=new Array(t);for(let r=0;r<t;r++)n[r]=bn(e[r]);return ds(n)}function bn(e){var t;if(e==null)return 0;switch(typeof e){case"boolean":return e?1:0;case"number":return Gt(e);case"bigint":return Al(e);case"string":return Ar(e);default:{if(Cl(e))return e.GetHashCode();if(un(e))return cm(e);if(e instanceof Date)return lm(e);if(((t=Object.getPrototypeOf(e))==null?void 0:t.constructor)===Object){const n=Object.values(e).map(r=>bn(r));return ds(n)}else return Gt(yn.id(e))}}}function um(e){return am(e)}function mo(e,t,n){if(e==null)return t==null;if(t==null||e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(!n(e[r],t[r]))return!1;return!0}function kl(e,t){return mo(e,t,Ce)}function dm(e,t){const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;n.sort(),r.sort();for(let s=0;s<n.length;s++)if(n[s]!==r[s]||!Ce(e[n[s]],t[r[s]]))return!1;return!0}function Ce(e,t){var n;return e===t?!0:e==null?t==null:t==null?!1:tm(e)?e.Equals(t):un(e)?un(t)&&kl(e,t):typeof e!="object"?!1:e instanceof Date?t instanceof Date&&El(e,t)===0:((n=Object.getPrototypeOf(e))==null?void 0:n.constructor)===Object&&dm(e,t)}function El(e,t){let n,r;return"offset"in e&&"offset"in t?(n=e.getTime(),r=t.getTime()):(n=e.getTime()+Sl(e),r=t.getTime()+Sl(t)),n===r?0:n<r?-1:1}function fs(e,t){return e===t?0:e<t?-1:1}function fm(e,t,n){if(e==null)return t==null?0:1;if(t==null)return-1;if(e.length!==t.length)return e.length<t.length?-1:1;for(let r=0,s=0;r<e.length;r++)if(s=n(e[r],t[r]),s!==0)return s;return 0}function Il(e,t){return fm(e,t,Bt)}function hm(e,t){const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return n.length<r.length?-1:1;n.sort(),r.sort();for(let s=0,i=0;s<n.length;s++){const o=n[s];if(o!==r[s])return o<r[s]?-1:1;if(i=Bt(e[o],t[o]),i!==0)return i}return 0}function Bt(e,t){var n;return e===t?0:e==null?t==null?0:-1:t==null?1:em(e)?e.CompareTo(t):un(e)?un(t)?Il(e,t):-1:typeof e!="object"?e<t?-1:1:e instanceof Date?t instanceof Date?El(e,t):-1:((n=Object.getPrototypeOf(e))==null?void 0:n.constructor)===Object?hm(e,t):-1}function S(e){const t={};for(const n of e)t[n[0]]=n[1];return t}function mm(e){un(e)?e.splice(0):e.clear()}const ti=new WeakMap;function $e(e){if(e==null)return null;const t=(n,r)=>e(n)(r);return ti.set(t,e),t}function Fn(e){return ti.get(e)??(t=>n=>e(t,n))}function po(e){if(e==null)return null;const t=(n,r,s)=>e(n)(r)(s);return ti.set(t,e),t}function go(e){return ti.get(e)??(t=>n=>r=>e(t,n,r))}function pm(e){let t=0,n="[";for(const r of e){if(t===0)n+=Ze(r);else if(t===100){n+="; ...";break}else n+="; "+Ze(r);t++}return n+"]"}function Ze(e,t=0){var n;if(e!=null&&typeof e=="object"){if(typeof e.toString=="function")return e.toString();if(Symbol.iterator in e)return pm(e);{const r=(n=Object.getPrototypeOf(e))==null?void 0:n.constructor;return r===Object&&t<10?"{ "+Object.entries(e).map(([s,i])=>s+" = "+Ze(i,t+1)).join(`
2
- `)+" }":(r==null?void 0:r.name)??""}}return String(e)}function gm(e,t){if(t.length===0)return e;{let n,r=!0;return t.length===1?(n=Ze(t[0]),r=n.indexOf(" ")>=0):n=t.map(s=>Ze(s)).join(", "),e+(r?" (":" ")+n+(r?")":"")}}class j{get name(){return this.cases()[this.tag]}toJSON(){return this.fields.length===0?this.name:[this.name].concat(this.fields)}toString(){return gm(this.name,this.fields)}GetHashCode(){const t=this.fields.map(n=>bn(n));return t.splice(0,0,Gt(this.tag)),ds(t)}Equals(t){return this===t?!0:ei(this,t)&&this.tag===t.tag?kl(this.fields,t.fields):!1}CompareTo(t){return this===t?0:ei(this,t)?this.tag===t.tag?Il(this.fields,t.fields):this.tag<t.tag?-1:1:-1}}function $m(e){const t={},n=Object.keys(e);for(let r=0;r<n.length;r++)t[n[r]]=e[n[r]];return t}function wm(e){return"{ "+Object.entries(e).map(([t,n])=>t+" = "+Ze(n)).join(`
3
- `)+" }"}function ym(e){const t=Object.values(e).map(n=>bn(n));return ds(t)}function bm(e,t){if(e===t)return!0;if(ei(e,t)){const n=Object.keys(e);for(let r=0;r<n.length;r++)if(!Ce(e[n[r]],t[n[r]]))return!1;return!0}else return!1}function _m(e,t){if(e===t)return 0;if(ei(e,t)){const n=Object.keys(e);for(let r=0;r<n.length;r++){const s=Bt(e[n[r]],t[n[r]]);if(s!==0)return s}return 0}else return-1}class Q{toJSON(){return $m(this)}toString(){return wm(this)}GetHashCode(){return ym(this)}Equals(t){return bm(this,t)}CompareTo(t){return _m(this,t)}}class yt{get contents(){return this.getter()}set contents(t){this.setter(t)}constructor(t,n){typeof n=="function"?(this.getter=t,this.setter=n):(this.getter=()=>t,this.setter=r=>{t=r})}}class vm{constructor(t){this.message=t}}function xm(e){return e instanceof vm||e instanceof Error}function Cm(e){return e instanceof Promise}function ni(e){return xm(e)||Cm(e)?e:new Error(String(e))}const kr=Symbol("numeric");function Nl(e){return typeof e=="number"||typeof e=="bigint"||(e==null?void 0:e[kr])}function Sm(e,t){return typeof e=="number"||typeof e=="bigint"?e<t?-1:e>t?1:0:e.CompareTo(t)}function $o(e,t){return typeof e=="number"?e*t:typeof e=="bigint"?e*BigInt(t):e[kr]().multiply(t)}function ri(e,t){return typeof e=="number"?e.toFixed(t):typeof e=="bigint"?e:e[kr]().toFixed(t)}function si(e,t){return typeof e=="number"?e.toPrecision(t):typeof e=="bigint"?e:e[kr]().toPrecision(t)}function ii(e,t){return typeof e=="number"?e.toExponential(t):typeof e=="bigint"?e:e[kr]().toExponential(t)}function oi(e){return typeof e=="number"?(Number(e)>>>0).toString(16):typeof e=="bigint"?BigInt.asUintN(64,e).toString(16):e[kr]().toHex()}class Am{constructor(t,n,r,s){this.declaringType=t,this.tag=n,this.name=r,this.fields=s}}class Ut{constructor(t,n,r,s,i,o,a){this.fullname=t,this.generics=n,this.construct=r,this.parent=s,this.fields=i,this.cases=o,this.enumCases=a}toString(){return Oe(this)}GetHashCode(){return Tl(this)}Equals(t){return wo(this,t)}}function Et(e){return e.generics!=null?e.generics:[]}function Tl(e){const t=Ar(e.fullname),n=Et(e).map(Tl);return ds([t,...n])}function wo(e,t){return e.fullname===""?t.fullname===""&&mo(ms(e),ms(t),([n,r],[s,i])=>n===s&&wo(r,i)):e.fullname===t.fullname&&mo(Et(e),Et(t),wo)}function yo(e,t,n,r){return new Ut(e,t,n,r)}function at(e,t,n,r){return new Ut(e,t,n,void 0,r)}function bo(e,t,n,r){const s=new Ut(e,t,n,void 0,void 0,()=>{const i=n.prototype.cases();return r().map((o,a)=>new Am(s,a,i[a],o))});return s}function ye(e){return new Ut("Microsoft.FSharp.Core.FSharpOption`1",[e])}function _o(e){return new Ut("Microsoft.FSharp.Collections.FSharpList`1",[e])}function Rl(e){return new Ut("[]",[e])}const km=new Ut("System.Object"),H=new Ut("System.String");function Er(e){if(Array.isArray(e))return e[0];if(e instanceof Ut){const t=hs(e);if(t!=null)return Er(t)+"[]";{const n=e.fullname.lastIndexOf(".");return n===-1?e.fullname:e.fullname.substr(n+1)}}else return e.name}function Oe(e){const t=hs(e);return t!=null?Oe(t)+"[]":e.generics==null||e.generics.length===0?e.fullname:e.fullname+"["+e.generics.map(n=>Oe(n)).join(",")+"]"}function Ml(e){return hs(e)!=null}function hs(e){var t;return e.fullname==="[]"&&((t=e.generics)==null?void 0:t.length)===1?e.generics[0]:void 0}function Pl(e){return e.generics!=null&&e.generics.length>0}function vo(e){return e.enumCases!=null&&e.enumCases.length>0}function Ol(e){return e.generics==null?e:new Ut(e.fullname,e.generics.map(()=>km))}function Dl(e){var t;return(t=e.generics)==null?void 0:t[0]}function Ir(e){if(vo(e)&&e.enumCases!=null)return e.enumCases.map(t=>t[1]);throw new Error(`${e.fullname} is not an enum type`)}function Em(e,t){if(e.enumCases!=null)if(typeof t=="string"){for(const n of e.enumCases)if(n[0]===t)return n;throw new Error(`'${t}' was not found in ${e.fullname}`)}else{for(const n of e.enumCases)if(n[1]===t)return n;return["",t]}else throw new Error(`${e.fullname} is not an enum type`)}function Nr(e,t){const n=parseInt(t,10);return Em(e,isNaN(n)?t:n)[1]}function Fl(e){if(e.cases!=null)return e.cases();throw new Error(`${e.fullname} is not an F# union type`)}function ms(e){if(e.fields!=null)return e.fields();throw new Error(`${e.fullname} is not an F# record type`)}function Vl(e){if(xo(e)&&e.generics!=null)return e.generics;throw new Error(`${e.fullname} is not a tuple type`)}function Ll(e){return e instanceof Ut?e.cases!=null:e instanceof j}function Bl(e){return e instanceof Ut?e.fields!=null:e instanceof Q}function xo(e){return e.fullname.startsWith("System.Tuple")}function Im(e,t){const r=Fl(t)[e.tag];if(r==null)throw new Error(`Cannot find case ${e.name} in union type`);return[r,e.fields]}function Ul(e){return e.fields==null?[]:e.fields}function Nm(e,t){return e[t[0]]}function Mx(e){return e}function Tm(e,t){const n=(e.fields||[]).length;if(t.length!==n)throw new Error(`Expected an array of length ${n} but got ${t.length}`);const r=e.declaringType.construct;return r==null?{}:(e.declaringType.cases?e.declaringType.cases().length==1:!1)?new r(...t):new r(e.tag,t)}function Rm(e,t){const n=ms(e);if(n.length!==t.length)throw new Error(`Expected an array of length ${n.length} but got ${t.length}`);return e.construct!=null?new e.construct(...t):n.reduce((r,[s,i],o)=>(r[s]=t[o],r),{})}function Mm(e,t){return e}const Pm=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],Om=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],Dm=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Fm=["January","February","March","April","May","June","July","August","September","October","November","December"];function It(e,t,n){let r=0,s=t;for(;s<e.length&&e[s]===n;)s++,r++;return r}function jl(e,t){return t>=e.length-1?-1:e.charCodeAt(t+1)}function Vm(e,t){let n=t;const r=e[t];let s="",i=!1;for(;t<e.length;){t++;const o=e[t];if(o===r){i=!0;break}else if(o==="\\")if(t<e.length)t++,s+=e[t];else throw new Error("Invalid string format");else s+=o}if(!i)throw new Error(`Invalid string format could not find matching quote for ${r}`);return[s,t-n+1]}function Co(e,t,n){let r=0,s=0,i="";const o=n?ps(e.getTime(),1):e;for(;r<t.length;){const a=t[r];switch(a){case"d":switch(s=It(t,r,"d"),r+=s,s){case 1:i+=Wl(o);break;case 2:i+=_e(Wl(o),2);break;case 3:i+=Pm[Kl(o)];break;case 4:i+=Om[Kl(o)];break}break;case"f":if(s=It(t,r,"f"),r+=s,s<=3){const w=10**(3-s);i+=_e(Math.floor(ci(o)/w),s)}else s<=7&&(i+=(""+ci(o)).padEnd(s,"0"));break;case"F":if(s=It(t,r,"F"),r+=s,s<=3){const w=10**(3-s),C=Math.floor(ci(o)/w);C!=0&&(i+=_e(C,s))}else if(s<=7){const w=ci(o);w!=0&&(i+=_e(w,3))}break;case"g":s=It(t,r,"g"),r+=s,s<=2&&(i+="A.D.");break;case"h":switch(s=It(t,r,"h"),r+=s,s){case 1:i+=li(o)%12;break;case 2:i+=_e(li(o)%12,2);break}break;case"H":switch(s=It(t,r,"H"),r+=s,s){case 1:i+=li(o);break;case 2:i+=_e(li(o),2);break}break;case"K":switch(s=It(t,r,"K"),r+=s,s){case 1:switch(zl(o)){case 1:i+="Z";break;case 2:i+=Tr(o.getTimezoneOffset()*-6e4);break}break}break;case"m":switch(s=It(t,r,"m"),r+=s,s){case 1:i+=Gl(o);break;case 2:i+=_e(Gl(o),2);break}break;case"M":switch(s=It(t,r,"M"),r+=s,s){case 1:i+=ui(o);break;case 2:i+=_e(ui(o),2);break;case 3:i+=Dm[ui(o)-1];break;case 4:i+=Fm[ui(o)-1];break}break;case"s":switch(s=It(t,r,"s"),r+=s,s){case 1:i+=ql(o);break;case 2:i+=_e(ql(o),2);break}break;case"t":switch(s=It(t,r,"t"),r+=s,s){case 1:i+=o.getHours()<12?"A":"P";break;case 2:i+=o.getHours()<12?"AM":"PM";break}break;case"y":switch(s=It(t,r,"y"),r+=s,s){case 1:i+=o.getFullYear()%100;break;case 2:i+=_e(o.getFullYear()%100,2);break;case 3:i+=_e(o.getFullYear(),3);break;case 4:i+=_e(o.getFullYear(),4);break;case 5:i+=_e(o.getFullYear(),5);break}break;case"z":s=It(t,r,"z"),r+=s;let l="";switch(zl(o)){case 1:l="+00:00";break;case 2:l=Tr(o.getTimezoneOffset()*-6e4);break;case 0:l=Tr(qm(o).getTimezoneOffset()*-6e4);break}const c=l[0]==="-"?"-":"+",d=parseInt(l.substring(1,3),10),u=parseInt(l.substring(4,6),10);switch(s){case 1:i+=`${c}${d}`;break;case 2:i+=`${c}${_e(d,2)}`;break;default:i+=`${c}${_e(d,2)}:${_e(u,2)}`;break}break;case":":i+=":",r++;break;case"/":i+="/",r++;break;case"'":case'"':const[m,h]=Vm(t,r);i+=m,r+=h;break;case"%":const p=jl(t,r);if(p>=0&&p!==37)r+=2,i+=Co(o,String.fromCharCode(p),n);else throw new Error("Invalid format string");break;case"\\":const g=jl(t,r);if(g>=0)r+=2,i+=String.fromCharCode(g);else throw new Error("Invalid format string");break;default:r++,i+=a;break}}return i}function zl(e){return e.kind||0}function Tr(e){const t=e<0;e=Math.abs(e);const n=~~(e/36e5),r=e%36e5/6e4;return(t?"-":"+")+_e(n,2)+":"+_e(r,2)}function ai(e,t){const n=e.toISOString();return t==="first"?n.substring(0,n.indexOf("T")):n.substring(n.indexOf("T")+1,n.length-1)}function Lm(e,t){if(t)return e.toISOString();{const n=e.kind==null?!0:e.kind===2;return _e(e.getFullYear(),4)+"-"+_e(e.getMonth()+1,2)+"-"+_e(e.getDate(),2)+"T"+_e(e.getHours(),2)+":"+_e(e.getMinutes(),2)+":"+_e(e.getSeconds(),2)+"."+_e(e.getMilliseconds(),3)+(n?Tr(e.getTimezoneOffset()*-6e4):"")}}function Bm(e,t){const n=e.toISOString();return n.substring(0,n.length-1)+Tr(t)}function Um(e,t){const n=new Date(e.getTime()+(e.offset??0));if(typeof t!="string")return n.toISOString().replace(/\.\d+/,"").replace(/[A-Z]|\.\d+/g," ")+Tr(e.offset??0);if(t.length===1)switch(t){case"D":case"d":return ai(n,"first");case"T":case"t":return ai(n,"second");case"O":case"o":return Bm(n,e.offset??0);default:throw new Error("Unrecognized Date print format")}else return Co(n,t,!0)}function jm(e,t){const n=e.kind===1;if(typeof t!="string")return n?e.toUTCString():e.toLocaleString();if(t.length===1)switch(t){case"D":case"d":return n?ai(e,"first"):e.toLocaleDateString();case"T":case"t":return n?ai(e,"second"):e.toLocaleTimeString();case"O":case"o":return Lm(e,n);default:throw new Error("Unrecognized Date print format")}else return Co(e,t,n)}function Rr(e,t,n){return e.offset!=null?Um(e,t):jm(e,t)}function ps(e,t){const n=new Date(e);return n.kind=(t??0)|0,n}function zm(){return ps(-621355968e5,1)}function Hl(e){function t(){throw new Error(`The string is not a valid Date: ${e}`)}(e==null||e.trim()==="")&&t(),e.length===10&&e[4]==="-"&&e[7]==="-"&&(e+="T00:00:00");let n=new Date(e),r=null;if(isNaN(n.getTime())){const s=/^\s*(\d+[^\w\s:]\d+[^\w\s:]\d+)?\s*(\d+:\d+(?::\d+(?:\.\d+)?)?)?\s*([AaPp][Mm])?\s*(Z|[+-]([01]?\d):?([0-5]?\d)?)?\s*$/.exec(e);if(s!=null){let i,o=0;if(s[2]!=null){const a=s[2].split(":"),l=parseInt(a[0],10);o=l*3600+parseInt(a[1]||"0",10)*60+parseFloat(a[2]||"0"),s[3]!=null&&s[3].toUpperCase()==="PM"&&l<12&&(o+=720)}if(s[4]!=null){if(s[1]!=null)i=new Date(s[1]+" UTC");else{const a=new Date;i=new Date(a.getUTCFullYear()+"/"+(a.getUTCMonth()+1)+"/"+a.getUTCDate())}if(s[4]==="Z")r="Z";else{let a=parseInt(s[5],10)*60+parseInt(s[6]||"0",10);s[4][0]==="-"&&(a*=-1),r=a,o-=a*60}}else if(s[1]!=null)i=new Date(s[1]);else{const a=new Date;i=new Date(a.getFullYear()+"/"+(a.getMonth()+1)+"/"+a.getDate())}n=new Date(i.getTime()+o*1e3),n=new Date(n.getTime()+(n.getTimezoneOffset()-i.getTimezoneOffset())*6e4)}else t();isNaN(n.getTime())&&t()}return[n,r]}function Hm(e,t=!1){const[n,r]=Hl(e),s=r!=null?t&&r==="Z"?1:2:0;return ps(n.getTime(),s)}function Wm(e,t){try{return t.contents=Hm(e),!0}catch{return!1}}function Gm(e){return e.kind===1?e:ps(e.getTime(),1)}function qm(e){return e.kind===2?e:ps(e.getTime(),2)}function Wl(e){return e.kind===1?e.getUTCDate():e.getDate()}function li(e){return e.kind===1?e.getUTCHours():e.getHours()}function ci(e){return e.kind===1?e.getUTCMilliseconds():e.getMilliseconds()}function Gl(e){return e.kind===1?e.getUTCMinutes():e.getMinutes()}function ui(e){return(e.kind===1?e.getUTCMonth():e.getMonth())+1}function ql(e){return e.kind===1?e.getUTCSeconds():e.getSeconds()}function Kl(e){return e.kind===1?e.getUTCDay():e.getDay()}function Zl(e,t=0){if((t&-284)!==0)throw new Error("RegexOptions only supports: IgnoreCase, Multiline, Compiled, Singleline and ECMAScript");let n="gu";return n+=t&1?"i":"",n+=t&2?"m":"",n+=t&16?"s":"",new RegExp(e,n)}function So(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}function Km(e,t,n=0){return e.lastIndex=n,e.exec(t)}function Jl(e,t,n=0){if(t==null)throw new Error("Input cannot ve null");if(!e.global)throw new Error("Non-global RegExp");e.lastIndex=n;const r=[];let s,i=-1;for(;(s=e.exec(t))!=null;)s.index===i?e.lastIndex++:(i=s.index,r.push(s));return r}function Zm(e,t,n,r,s=0){function i(){let o=arguments[0];if(r){r--;const a=[],l=arguments.length,c=typeof arguments[l-1]!="string";let d=c?l-3:l-2;for(let u=0;u<d;u++)a.push(arguments[u]);a.index=arguments[d++],a.input=arguments[d++],c&&(a.groups=arguments[d]),o=n(a)}return o}if(typeof e=="string"){const o=e;e=Zl(t,r??0),t=o,r=void 0}if(typeof n=="function")return r=r??-1,t.substring(0,s)+t.substring(s).replace(e,i);if(n=n.replace(/\$0/g,o=>"$&").replace(/\${([^}]+)}/g,"$<$1>"),r!=null){let o;const a=t.substring(s),l=Jl(e,a),c=Jl.length>r?(o=l[r-1],a.substring(0,o.index+o[0].length)):a;return t.substring(0,s)+c.replace(e,n)+t.substring(s+c.length)}else return t.replace(e,n)}const gs=/(^|[^%])%([0+\- ]*)(\*|\d+)?(?:\.(\d+))?(\w)/g,$s=/(?:(^|[^%])%([0+\- ]*)(\d+)?(?:\.(\d+))?(\w))?%P\(\)/g,Jm=/\{(\d+)(,-?\d+)?(?:\:([a-zA-Z])(\d{0,2})|\:(.+?))?\}/g;function Yl(e,t){return Sm(e,t)<0}function jt(e){return{input:e,cont:Ym(e)}}function Xl(e,t){let n=0,r=0,s="";$s.lastIndex=0;let i=$s.exec(e);for(;i;){const o=i.index+(i[1]||"").length;s+=e.substring(r,o).replace(/%%/g,"%");const[,,a,l,c,d]=i;r=$s.lastIndex,s+=tc(t[n++],a,l,c,d),$s.lastIndex=r-1,i=$s.exec(e)}return s+=e.substring(r).replace(/%%/g,"%"),s}function Ao(e,t){return typeof t=="string"?e(t):t.cont(e)}function Ql(e){return Ao(t=>console.log(t),e)}function qt(e){return Ao(t=>t,e)}function ec(e){return Ao(t=>{throw new Error(t)},e)}function tc(e,t,n,r,s){let i="";if(t=t||"",s=s||"",Nl(e))switch(s.toLowerCase()!=="x"&&(Yl(e,0)?(e=$o(e,-1),i="-"):t.indexOf(" ")>=0?i=" ":t.indexOf("+")>=0&&(i="+")),r=r==null?null:parseInt(r,10),s){case"f":case"F":r=r??6,e=ri(e,r);break;case"g":case"G":e=r!=null?si(e,r):si(e);break;case"e":case"E":e=r!=null?ii(e,r):ii(e);break;case"x":e=oi(e);break;case"X":e=oi(e).toUpperCase();break;default:e=String(e);break}else e instanceof Date?e=Rr(e):e=Ze(e);if(n=typeof n=="number"?n:parseInt(n,10),isNaN(n))e=i+e;else{const o=t.indexOf("0")>=0,a=t.indexOf("-")>=0,l=a||!o?" ":"0";l==="0"?(e=ws(e,n-i.length,l,a),e=i+e):e=ws(i+e,n,l,a)}return e}function nc(e,t,n,r="",s=-1){return(...i)=>{let o=r;const a=t.slice(),l=n.slice();for(const c of i){const[,,d,u,m,h]=l[0];let p=u;if(s>=0)p=s,s=-1;else if(p==="*"){if(c<0)throw new Error("Non-negative number required");s=c;continue}o+=a[0],o+=tc(c,d,p,m,h),a.splice(0,1),l.splice(0,1)}return l.length===0?(o+=a[0],e(o)):nc(e,a,l,o,s)}}function Ym(e){return t=>{gs.lastIndex=0;const n=[],r=[];let s=0,i=gs.exec(e);for(;i;){const o=i.index+(i[1]||"").length;n.push(e.substring(s,o).replace(/%%/g,"%")),r.push(i),s=gs.lastIndex,gs.lastIndex-=1,i=gs.exec(e)}return n.length===0?t(e.replace(/%%/g,"%")):(n.push(e.substring(s).replace(/%%/g,"%")),nc(t,n,r))}}function rc(e,...t){let n;return typeof e=="object"?(n=String(t[0]),t.shift()):n=e,n.replace(Jm,(r,s,i,o,a,l)=>{if(s<0||s>=t.length)throw new Error("Index must be greater or equal to zero and less than the arguments' length.");let c=t[s];if(Nl(c))switch(a=a==null?null:parseInt(a,10),o){case"f":case"F":a=a??2,c=ri(c,a);break;case"g":case"G":c=a!=null?si(c,a):si(c);break;case"e":case"E":c=a!=null?ii(c,a):ii(c);break;case"p":case"P":a=a??2,c=ri($o(c,100),a)+" %";break;case"d":case"D":c=a!=null?ko(String(c),a,"0"):String(c);break;case"x":case"X":c=a!=null?ko(oi(c),a,"0"):oi(c),o==="X"&&(c=c.toUpperCase());break;default:if(l){let d="";c=l.replace(/([0#,]+)(\.[0#]+)?/,(u,m,h)=>{Yl(c,0)&&(c=$o(c,-1),d="-"),h=h==null?"":h.substring(1),c=ri(c,Math.max(h.length,0));let[p,g]=c.split(".");g||(g="");const w=m.replace(/,/g,"").replace(/^#+/,"").length;p=ko(p,w,"0");const C=h.replace(/#+$/,"").length;if(C>g.length?g=Qm(g,C,"0"):C<g.length&&(g=g.substring(0,C)+g.substring(C).replace(/0+$/,"")),m.indexOf(",")>0){const x=p.length%3,E=Math.floor(p.length/3);let D=x>0?p.substr(0,x)+(E>0?",":""):"";for(let L=0;L<E;L++)D+=p.substr(x+L*3,3)+(L<E-1?",":"");p=D}return g.length>0?p+"."+g:p}),c=d+c}}else c instanceof Date?c=Rr(c,l||o):c=Ze(c);return i=parseInt((i||" ").substring(1),10),isNaN(i)||(c=ws(String(c),Math.abs(i)," ",i<0)),c})}function Xm(e,t){const n=e.lastIndexOf(t);return n>=0&&n===e.length-t.length}function di(e){return typeof e!="string"||e.length===0}function sc(e){return typeof e!="string"||/^\s*$/.test(e)}function ne(e,t){return Array.isArray(t)?t.join(e):Array.from(t).join(e)}function ws(e,t,n,r){n=n||" ",t=t-e.length;for(let s=0;s<t;s++)e=r?e+n:n+e;return e}function ko(e,t,n){return ws(e,t,n)}function Qm(e,t,n){return ws(e,t,n,!0)}function Eo(e,t,n,r){if(n=typeof n=="number"?n:void 0,r=typeof r=="number"?r:0,n&&n<0)throw new Error("Count cannot be less than zero");if(n===0)return[];const s=(r&1)===1,i=(r&2)===2;t=t||[],t=t.filter(d=>d).map(So),t=t.length>0?t:["\\s"];const o=[],a=new RegExp(t.join("|"),"g");let l=!0,c=0;do{const d=a.exec(e);if(d===null){const u=i?e.substring(c).trim():e.substring(c);(!s||u.length>0)&&o.push(u),l=!1}else{const u=i?e.substring(c,d.index).trim():e.substring(c,d.index);(!s||u.length>0)&&(n!=null&&o.length+1===n?(o.push(i?e.substring(c).trim():e.substring(c)),l=!1):o.push(u)),c=a.lastIndex}}while(l);return o}function ep(e,...t){if(t.length===0)return e.trim();const n="["+So(t.join(""))+"]+";return e.replace(new RegExp("^"+n),"").replace(new RegExp(n+"$"),"")}function tp(e,...t){return t.length===0?e.trimEnd():e.replace(new RegExp("["+So(t.join(""))+"]+$"),"")}function ic(e,t,n){if(t+(n||0)>e.length)throw new Error("Invalid startIndex and/or length");return n!=null?e.substr(t,n):e.substr(t)}class er{constructor(t){this.value=t}toJSON(){return this.value}toString(){return String(this.value)}GetHashCode(){return bn(this.value)}Equals(t){return t==null?!1:Ce(this.value,t instanceof er?t.value:t)}CompareTo(t){return t==null?1:Bt(this.value,t instanceof er?t.value:t)}}function O(e){if(e==null)throw new Error("Option has no value");return e instanceof er?e.value:e}function Io(e){return e instanceof er?e.value:e}function lt(e){return e==null||e instanceof er?new er(e):e}function np(e){return e??void 0}function No(e){return e==null?[]:[O(e)]}function We(e,t){return e!=null?O(e):t}function oc(e,t){return e!=null?O(e):t()}function Ge(e,t){return t!=null?lt(e(O(t))):void 0}const ac="Collection was empty.";function To(e,t){return typeof e=="function"?new e(t):new Array(t)}function lc(e,t){return e>t?e:t}function fi(e,t,n,r){const s=t|0;return e.fill(r,s,s+n)}function Vn(e,t,n){const r=t.length|0,s=To(n,r);for(let i=0;i<=r-1;i++)Nt(s,i,e(we(i,t)));return s}function rp(e,t,n,r){if(t.length!==n.length)throw new Error("Arrays had different lengths");const s=To(r,t.length);for(let i=0;i<=t.length-1;i++)Nt(s,i,e(we(i,t),we(i,n)));return s}function sp(e,t){const n=To(t,1);return Nt(n,0,e),n}function ip(e){return e.slice().reverse()}function op(e,t){return t.find(e)}function ap(e,t,n){const r=[];for(let s=0;s<=t.length-1;s++){const i=e(we(s,t));if(i!=null){const o=O(i);r.push(o)}}return Ce(n,ge())?r:Vn(s=>s,r,n)}function hi(e,t,n){const r=e;return n.reduce(r,t)}function lp(e,t){if(e<1)throw new Error("The input must be positive.\\nParameter name: size");if(t.length===0)return[[]];{const n=[];for(let r=0;r<=~~Math.ceil(t.length/e)-1;r++){let s;const i=r*e|0;s=t.slice(i,i+e),n.push(s)}return n}}function Ro(e,t,n){return t==null}function we(e,t){if(e<0||e>=t.length)throw new Error("Index was outside the bounds of the array.\\nParameter name: index");return t[e]}function Nt(e,t,n){if(t<0||t>=e.length)throw new Error("Index was outside the bounds of the array.\\nParameter name: index");e[t]=n}function cc(e,t,n){return t.reduceRight((r,s)=>e(s,r),n)}function cp(e,t){let n=t.GetZero();for(let r=0;r<=e.length-1;r++)n=t.Add(n,we(r,e));return n}class bt extends Q{constructor(t,n){super(),this.head=t,this.tail=n}toString(){return"["+ne("; ",this)+"]"}Equals(t){const n=this;return n===t?!0:((s,i)=>{e:for(;;){const o=s,a=i,l=o.tail,c=a.tail;if(l!=null)if(c!=null){const d=O(l),u=O(c);if(Ce(o.head,a.head)){s=d,i=u;continue e}else return!1}else return!1;else return c==null}})(n,t)}GetHashCode(){return((r,s,i)=>{e:for(;;){const o=r,a=s,l=i,c=l.tail;if(c!=null){const d=O(c);if(o>18)return a|0;r=o+1,s=(a<<1)+bn(l.head)+631*o,i=d;continue e}else return a|0}})(0,0,this)|0}toJSON(){const t=this;return Array.from(t)}CompareTo(t){return((s,i)=>{e:for(;;){const o=s,a=i,l=o.tail,c=a.tail;if(l!=null)if(c!=null){const d=O(l),u=O(c),m=Bt(o.head,a.head)|0;if(m===0){s=d,i=u;continue e}else return m|0}else return 1;else return c!=null?-1:0}})(this,t)|0}GetEnumerator(){return dp(this)}[Symbol.iterator](){return us(De(this))}"System.Collections.IEnumerable.GetEnumerator"(){return De(this)}}class up{constructor(t){this.xs=t,this.it=this.xs,this.current=ge()}"System.Collections.Generic.IEnumerator`1.get_Current"(){return this.current}"System.Collections.IEnumerator.get_Current"(){return this.current}"System.Collections.IEnumerator.MoveNext"(){const t=this,n=t.it.tail;if(n!=null){const r=O(n);return t.current=t.it.head,t.it=r,!0}else return!1}"System.Collections.IEnumerator.Reset"(){const t=this;t.it=t.xs,t.current=ge()}Dispose(){}}function dp(e){return new up(e)}function qe(){return new bt(ge(),void 0)}function ys(e,t){return new bt(e,t)}function _n(e){return e.tail==null}function uc(e){return((n,r)=>{e:for(;;){const s=n,o=r.tail;if(o!=null){n=s+1,r=O(o);continue e}else return s|0}})(0,e)|0}function Ln(e){if(e.tail!=null)return e.head;throw new Error(ac+"\\nParameter name: list")}function ct(e){const t=e.tail;if(t!=null)return O(t);throw new Error(ac+"\\nParameter name: list")}function je(){return qe()}function Tt(e,t){return ys(e,t)}function ee(e){return ys(e,qe())}function K(e){return _n(e)}function Mr(e){return uc(e)}function V(e){return Ln(e)}function _(e){return ct(e)}function tr(e){const t=uc(e)|0,n=fi(new Array(t),0,t,null);return((s,i)=>{e:for(;;){const o=s,a=i;if(!_n(a)){Nt(n,o,Ln(a)),s=o+1,i=ct(a);continue e}break}})(0,e),n}function vn(e,t,n){let r=t,s=n;for(;!_n(s);)r=e(r,V(s)),s=ct(s);return r}function mi(e){return vn((t,n)=>ys(n,t),qe(),e)}function fp(e,t,n){return cc(e,tr(t),n)}function hp(e,t,n){return((s,i,o)=>{e:for(;;){const a=s,l=i,c=o;if(_n(c))return l;s=a+1,i=e(a,l,Ln(c)),o=ct(c);continue e}})(0,t,n)}function pi(e,t){vn((n,r)=>{e(r)},void 0,t)}function Fe(e,t){let n=t;for(let r=e.length-1;r>=0;r--)n=ys(we(r,e),n);return n}function y(e){return Fe(e,qe())}function mp(e){let t,n;if(un(e))return y(e);if(e instanceof bt)return e;{const r=qe();let s=r;const i=De(e);try{for(;i["System.Collections.IEnumerator.MoveNext"]();){const l=i["System.Collections.Generic.IEnumerator`1.get_Current"]();s=(t=s,n=new bt(l,void 0),t.tail=n,n)}}finally{xe(i)}const o=s,a=qe();return o.tail=a,ct(r)}}function rt(e,t){return vn((n,r)=>ys(r,n),t,mi(e))}function pp(e,t){let n,r;const s=qe();let i=s,o=t;for(;!_n(o);){let c=e(Ln(o));for(;!_n(c);)i=(n=i,r=new bt(Ln(c),void 0),n.tail=r,r),c=ct(c);o=ct(o)}const a=i,l=qe();return a.tail=l,ct(s)}function gp(e,t){const n=qe(),r=hp((i,o,a)=>{const l=new bt(e(i,a),void 0);return o.tail=l,l},n,t),s=qe();return r.tail=s,ct(n)}function nr(e,t){const n=qe(),r=vn((i,o)=>{const a=new bt(e(o),void 0);return i.tail=a,a},n,t),s=qe();return r.tail=s,ct(n)}function $p(e,t){return(r=>{e:for(;;){const s=r;if(_n(s))return;{const i=e(Ln(s));if(i==null){r=ct(s);continue e}else return i}}})(t)}function wp(e,t){return $p(n=>e(n)?lt(n):void 0,t)}function yp(e,t){return((r,s)=>{e:for(;;){const i=r,o=s;if(_n(o))return;if(e(Ln(o)))return i;r=i+1,s=ct(o);continue e}})(0,t)}function bp(e,t){return((r,s)=>{e:for(;;){const i=r,o=s;if(_n(o))return;if(i===e)return lt(Ln(o));r=i+1,s=ct(o);continue e}})(0,t)}function dc(e,t){const n=qe(),r=vn((i,o)=>{if(e(o)){const a=new bt(o,void 0);return i.tail=a,a}else return i},n,t),s=qe();return r.tail=s,ct(n)}function _p(e,t){const n=qe(),r=qe(),s=n,i=vn((l,c)=>{let d,u;const m=l[0],h=l[1];return e(c)?[(d=new bt(c,void 0),m.tail=d,d),h]:[m,(u=new bt(c,void 0),h.tail=u,u)]},[s,r],t),o=qe();i[0].tail=o;const a=qe();return i[1].tail=a,[ct(s),ct(r)]}function fc(e,t){const n=qe(),r=vn((i,o)=>{const a=e(o);if(a==null)return i;{const l=new bt(O(a),void 0);return i.tail=l,l}},n,t),s=qe();return r.tail=s,ct(n)}function hc(e,t,n){return yp(r=>n.Equals(e,r),t)!=null}function vp(e,t){const n=tr(t);return n.sort(e),y(n)}function xp(e,t,n){return vp((r,s)=>n.Compare(e(r),e(s)),t)}function Cp(e,t){return y(Vn(y,lp(e,tr(t))))}function Sp(e){return new $(0,[e])}function mc(e){return new $(1,[e])}class $ extends j{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Ok","Error"]}}function xn(e,t){return t.tag===0?Sp(e(t.fields[0])):mc(t.fields[0])}function Ap(e,t){return t.tag===0?e(t.fields[0]):mc(t.fields[0])}function mt(e){return e.tag===0}class kp extends j{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["Name"]}}function pc(e){return new kp(e)}function Mo(e){return e.fields[0]}class Ep extends j{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["Website"]}}class Ip extends j{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["FirstName"]}}class Np extends j{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["LastName"]}}class Tp extends j{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["Email"]}}class Rp extends j{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["MobilePhone"]}}let Mp=class extends Q{constructor(t,n,r,s){super(),this.FirstName=t,this.LastName=n,this.Email=r,this.MobilePhone=s}};class Pp extends j{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["Notes"]}}class Op extends j{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["PartnerId"]}}function Kt(e){return e.fields[0]}function Ve(e){return new Op(e)}function gi(e){return Kt(e)}class Dp extends j{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["AccountId"]}}function Zt(e){return e.fields[0]}function Rt(e){return new Dp(e)}function $i(e){return Zt(e)}class Fp extends j{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["BusinessName"]}}class Vp extends j{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["BusinessNumber"]}}class Lp extends j{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["Address1"]}}class Bp extends j{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["Address2"]}}class Up extends j{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["City"]}}class jp extends j{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["Postcode"]}}let zp=class extends j{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["State"]}};class Hp extends j{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["SalesforceParentRecordId"]}}class Wp extends j{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["ExternalApi","Admin"]}}new Wp(0,[]);function Gp(e){throw new Error(e)}const qp="Enumeration already finished.",Kp="Enumeration has not started. Call MoveNext.",gc="The input sequence has an insufficient number of elements.",Zp="Reset is not supported on this enumerator.";function Jp(){throw new Error(Zp)}function Po(){throw new Error(Kp)}function Oo(){throw new Error(qp)}class Yp{constructor(t){this.f=t}toString(){const t=this;let n=0,r="seq [";const s=De(t);try{for(;n<4&&s["System.Collections.IEnumerator.MoveNext"]();)n>0&&(r=r+"; "),r=r+Ze(s["System.Collections.Generic.IEnumerator`1.get_Current"]()),n=n+1|0;return n===4&&(r=r+"; ..."),r+"]"}finally{xe(s)}}GetEnumerator(){return this.f()}[Symbol.iterator](){return us(De(this))}"System.Collections.IEnumerable.GetEnumerator"(){return this.f()}}function Xp(e){return new Yp(e)}class Qp{constructor(t,n,r){this.current=t,this.next=n,this.dispose=r}"System.Collections.Generic.IEnumerator`1.get_Current"(){return this.current()}"System.Collections.IEnumerator.get_Current"(){return this.current()}"System.Collections.IEnumerator.MoveNext"(){return this.next()}"System.Collections.IEnumerator.Reset"(){Jp()}Dispose(){this.dispose()}}function wi(e,t,n){return new Qp(e,t,n)}function e0(e){let t,n,r=!1,s=!1,i;const o=()=>{if(s=!0,n!=null){const a=O(n);try{xe(a)}finally{n=void 0}}if(t!=null){const a=O(t);try{xe(a)}finally{t=void 0}}};return wi(()=>(r?s&&Oo():Po(),i!=null?O(i):Oo()),()=>{let a;if(r||(r=!0),s)return!1;{let l;for(;l==null;){const c=t,d=n;if(c!=null)if(d!=null){const u=O(d);if(u["System.Collections.IEnumerator.MoveNext"]())i=lt(u["System.Collections.Generic.IEnumerator`1.get_Current"]()),l=!0;else try{xe(u)}finally{n=void 0}}else{const u=O(c);u["System.Collections.IEnumerator.MoveNext"]()?n=(a=u["System.Collections.Generic.IEnumerator`1.get_Current"](),De(a)):(o(),l=!1)}else t=De(e)}return O(l)}},()=>{s||o()})}function t0(e,t){return wi(()=>t["System.Collections.Generic.IEnumerator`1.get_Current"](),()=>t["System.Collections.IEnumerator.MoveNext"](),()=>{try{xe(t)}finally{}})}function $c(e,t,n){let r=!1,s,i=lt(e());const o=()=>{if(i!=null){const l=O(i);try{n(l)}finally{i=void 0}}},a=()=>{try{o()}finally{s=void 0}};return wi(()=>(r||Po(),s!=null?O(s):Oo()),()=>{if(r||(r=!0),i!=null){const l=O(i);let c;try{c=t(l)}catch(d){throw a(),d}return c!=null?(s=c,!0):(a(),!1)}else return!1},o)}function n0(e,t){let n,r=t;return wi(()=>{if(n!=null){const s=O(n)[0];return O(n)[1],s}else return Po()},()=>(n=e(r),n!=null?(O(n)[0],r=O(n)[1],!0):!1),()=>{})}function r0(e,t){t==null&&Gp(e)}function Pr(e){return Xp(e)}function Cn(e){return r0("source",e),De(e)}function k(e){return Pr(()=>De(e()))}function Do(e){return Pr(()=>e0(e))}function s0(e,t){return Pr(()=>n0(e,t))}function Ke(){return k(()=>new Array(0))}function A(e){return k(()=>sp(e))}function Px(e){return e}function Fo(e){return e instanceof bt?tr(e):Array.from(e)}function ae(e){return un(e)?y(e):e instanceof bt?e:mp(e)}function wc(e,t,n){return Pr(()=>$c(e,t,n))}function yc(e,t,n){return Pr(()=>{let r=-1;return $c(e,s=>(r=r+1|0,t(r,s)),n)})}function R(e,t){return Do([e,t])}function bs(e,t){return wc(()=>Cn(t),n=>{let r;for(;r==null&&n["System.Collections.IEnumerator.MoveNext"]();)r=e(n["System.Collections.Generic.IEnumerator`1.get_Current"]());return r},n=>{xe(n)})}function i0(e,t,n){const r=Cn(t);try{const s=Cn(n);try{let i=0,o=r["System.Collections.IEnumerator.MoveNext"](),a=s["System.Collections.IEnumerator.MoveNext"]();for(;i===0&&o&&a;)i=e(r["System.Collections.Generic.IEnumerator`1.get_Current"](),s["System.Collections.Generic.IEnumerator`1.get_Current"]())|0,i===0&&(o=r["System.Collections.IEnumerator.MoveNext"](),a=s["System.Collections.IEnumerator.MoveNext"]());return(i!==0?i:o?1:a?-1:0)|0}finally{xe(s)}}finally{xe(r)}}function Or(e,t,n){const r=Cn(t);try{let s=!1;for(;!s&&r["System.Collections.IEnumerator.MoveNext"]();)s=n.Equals(e,r["System.Collections.Generic.IEnumerator`1.get_Current"]());return s}finally{xe(r)}}function _s(e,t,n){const r=Cn(n);try{let s=t;for(;r["System.Collections.IEnumerator.MoveNext"]();)s=e(s,r["System.Collections.Generic.IEnumerator`1.get_Current"]());return s}finally{xe(r)}}function Dr(e,t){_s((n,r)=>{e(r)},void 0,t)}function o0(e,t){_s((n,r)=>(e(n,r),n+1|0),0,t)}function Le(e,t){return wc(()=>Cn(t),n=>n["System.Collections.IEnumerator.MoveNext"]()?lt(e(n["System.Collections.Generic.IEnumerator`1.get_Current"]())):void 0,n=>{xe(n)})}function Vo(e,t){return yc(()=>Cn(t),(n,r)=>r["System.Collections.IEnumerator.MoveNext"]()?lt(e(n,r["System.Collections.Generic.IEnumerator`1.get_Current"]())):void 0,n=>{xe(n)})}function a0(e){return k(()=>ip(Fo(e)))}function l0(e,t){return Pr(()=>{const n=Cn(t);try{for(let r=1;r<=e;r++)if(!n["System.Collections.IEnumerator.MoveNext"]())throw new Error(gc+"\\nParameter name: source");return t0(()=>{},n)}catch(r){throw xe(n),r}})}function c0(e,t){return yc(()=>Cn(t),(n,r)=>{if(n<e){if(r["System.Collections.IEnumerator.MoveNext"]())return lt(r["System.Collections.Generic.IEnumerator`1.get_Current"]());throw new Error(gc+"\\nParameter name: source")}else return},n=>{xe(n)})}function u0(e,t){return k(()=>Do(Le(e,t)))}const rr={None:0,LowerFirst:1,SnakeCase:2,SnakeCaseAllCaps:3,KebabCase:4};function Lo(e,t){return e.replace(/[a-z]?[A-Z]/g,n=>n.length===1?n.toLowerCase():n.charAt(0)+t+n.charAt(1).toLowerCase())}function d0(e,t){switch(t){case rr.LowerFirst:return e.charAt(0).toLowerCase()+e.slice(1);case rr.SnakeCase:return Lo(e,"_");case rr.SnakeCaseAllCaps:return Lo(e,"_").toUpperCase();case rr.KebabCase:return Lo(e,"-");case rr.None:default:return e}}function Bn(e,t=rr.None){const n={},r=t;function s(o){throw new Error("Cannot infer key and value of "+String(o))}function i(o,a,l){o=d0(o,a),n[o]=l}for(let o of e){let a=rr.None;if(o==null&&s(o),o instanceof j){const l=o.cases()[o.tag];o=o.fields.length===0?l:[l].concat(o.fields),a=r}if(Array.isArray(o))switch(o.length){case 0:s(o);break;case 1:i(o[0],a,!0);break;case 2:const l=o[1];i(o[0],a,l);break;default:i(o[0],a,o.slice(1))}else typeof o=="string"?i(o,a,!0):s(o)}return n}function bc(e,t,n){return e.has(t)?(n.contents=e.get(t),!0):!1}function vs(e,t){if(e.has(t))return e.get(t);throw new Error(`The given key '${t}' was not present in the dictionary.`)}class f0{constructor(t,n){const r=new yt(ge());this.comparer=n,r.contents=this,this.hashMap=new Map([]),this["init@9"]=1;const s=De(t);try{for(;s["System.Collections.IEnumerator.MoveNext"]();){const i=s["System.Collections.Generic.IEnumerator`1.get_Current"]();Bo(r.contents,i[0],i[1])}}finally{xe(s)}}get[Symbol.toStringTag](){return"Dictionary"}toJSON(){const t=this;return Array.from(t)}"System.Collections.IEnumerable.GetEnumerator"(){return De(this)}GetEnumerator(){return De(Do(this.hashMap.values()))}[Symbol.iterator](){return us(De(this))}"System.Collections.Generic.ICollection`1.Add2B595"(t){Bo(this,t[0],t[1])}"System.Collections.Generic.ICollection`1.Clear"(){_c(this)}"System.Collections.Generic.ICollection`1.Contains2B595"(t){const r=yi(this,t[0]);let s;switch(r!=null&&Ce(O(r)[1],t[1])?(s=0,O(r)):s=1,s){case 0:return!0;default:return!1}}"System.Collections.Generic.ICollection`1.CopyToZ3B4C077E"(t,n){o0((s,i)=>{Nt(t,n+s,i)},this)}"System.Collections.Generic.ICollection`1.get_Count"(){return vc(this)|0}"System.Collections.Generic.ICollection`1.get_IsReadOnly"(){return!1}"System.Collections.Generic.ICollection`1.Remove2B595"(t){const n=this,r=yi(n,t[0]);return r!=null?(Ce(O(r)[1],t[1])&&Uo(n,t[0]),!0):!1}"System.Collections.Generic.IDictionary`2.Add5BDDA1"(t,n){Bo(this,t,n)}"System.Collections.Generic.IDictionary`2.ContainsKey2B595"(t){return Sc(this,t)}"System.Collections.Generic.IDictionary`2.get_Item2B595"(t){return xc(this,t)}"System.Collections.Generic.IDictionary`2.set_Item5BDDA1"(t,n){Cc(this,t,n)}"System.Collections.Generic.IDictionary`2.get_Keys"(){const t=this;return Fo(k(()=>Le(n=>n[0],t)))}"System.Collections.Generic.IDictionary`2.Remove2B595"(t){return Uo(this,t)}"System.Collections.Generic.IDictionary`2.TryGetValue6DC89625"(t,n){const s=yi(this,t);if(s!=null){const i=O(s);return n.contents=i[1],!0}else return!1}"System.Collections.Generic.IDictionary`2.get_Values"(){const t=this;return Fo(k(()=>Le(n=>n[1],t)))}get size(){return vc(this)|0}clear(){_c(this)}delete(t){return Uo(this,t)}entries(){return Le(n=>[n[0],n[1]],this)}get(t){return xc(this,t)}has(t){return Sc(this,t)}keys(){return Le(n=>n[0],this)}set(t,n){const r=this;return Cc(r,t,n),r}values(){return Le(n=>n[1],this)}forEach(t,n){const r=this;Dr(s=>{t(s[1],s[0],r)},r)}}function xs(e,t){const n=e.comparer.GetHashCode(t)|0;let r,s=ge();return r=[bc(e.hashMap,n,new yt(()=>s,i=>{s=i})),s],r[0]?[!0,n,r[1].findIndex(i=>e.comparer.Equals(t,i[0]))]:[!1,n,-1]}function yi(e,t){const n=xs(e,t);let r;switch(n[0]&&n[2]>-1?r=0:r=1,r){case 0:return vs(e.hashMap,n[1])[n[2]];default:return}}function _c(e){e.hashMap.clear()}function vc(e){let t=0,n=De(e.hashMap.values());try{for(;n["System.Collections.IEnumerator.MoveNext"]();){const r=n["System.Collections.Generic.IEnumerator`1.get_Current"]();t=t+r.length|0}}finally{xe(n)}return t|0}function xc(e,t){const n=yi(e,t);if(n!=null)return O(n)[1];throw new Error("The item was not found in collection")}function Cc(e,t,n){const r=xs(e,t);r[0]?r[2]>-1?vs(e.hashMap,r[1])[r[2]]=[t,n]:vs(e.hashMap,r[1]).push([t,n]):e.hashMap.set(r[1],[[t,n]])}function Bo(e,t,n){const r=xs(e,t);if(r[0]){if(r[2]>-1)throw new Error(rc("An item with the same key has already been added. Key: {0}",t));vs(e.hashMap,r[1]).push([t,n])}else e.hashMap.set(r[1],[[t,n]])}function Sc(e,t){const n=xs(e,t);let r;switch(n[0]&&n[2]>-1?r=0:r=1,r){case 0:return!0;default:return!1}}function Uo(e,t){const n=xs(e,t);let r;switch(n[0]&&n[2]>-1?r=0:r=1,r){case 0:return vs(e.hashMap,n[1]).splice(n[2],1),!0;default:return!1}}function h0(e){return new Ac(0,[e])}function m0(e){return new Ac(1,[e])}class Ac extends j{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Choice1Of2","Choice2Of2"]}}function p0(e){return h0(e)}function g0(e){return m0(e)}const $0=/^[\(\{]{0,2}[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}[\)\}]{0,2}$/,kc=/^([0-9a-f]{8})([0-9a-f]{4})([0-9a-f]{4})([0-9a-f]{4})([0-9a-f]{12})$/,w0=/^\{0x[0-9a-f]{8},(0x[0-9a-f]{4},){2}\{(0x[0-9a-f]{2},){7}0x[0-9a-f]{2}\}\}$/;function y0(e){function t(r){return r.replace(kc,"$1-$2-$3-$4-$5")}const n=e.trim().toLowerCase();if($0.test(n))return ep(n,"{","}","(",")");if(kc.test(n))return t(n);if(w0.test(n))return t(n.replace(/[\{\},]|0x/g,""));throw new Error("Guid should contain 32 digits with 4 dashes: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx")}function b0(e,t){try{return t.contents=y0(e),!0}catch{return!1}}class Ec extends j{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["StreamId"]}}function Fr(e){return e.fields[0]}var jo;(function(e){e[e.AllowHexSpecifier=512]="AllowHexSpecifier"})(jo||(jo={}));function _0(e,t){const[,n,r,s]=e;return{sign:n||"",prefix:r||"",digits:s,radix:t}}function Ic(e,t){switch(t){case 8:return e?[0,255]:[-128,127];case 16:return e?[0,65535]:[-32768,32767];case 32:return e?[0,4294967295]:[-2147483648,2147483647];default:throw new Error("Invalid bit size.")}}function v0(e){switch(e){case 2:return/[^0-1]/;case 8:return/[^0-7]/;case 10:return/[^0-9]/;case 16:return/[^0-9a-fA-F]/;default:throw new Error("Invalid Base.")}}function x0(e,t){if(t&jo.AllowHexSpecifier)return 16;switch(e){case"0b":case"0B":return 2;case"0o":case"0O":return 8;case"0x":case"0X":return 16;default:return 10}}function C0(e,t,n){const s=/^\s*([\+\-])?(0[xXoObB])?([0-9a-fA-F]+)\s*$/.exec(e.replace(/_/g,""));if(s!=null){const[,,i,o]=s;if(n=n||x0(i,t),!v0(n).test(o))return _0(s,n)}return null}function S0(e,t,n,r,s){const i=C0(e,t,s);if(i!=null){let o=Number.parseInt(i.sign+i.digits,i.radix);if(!Number.isNaN(o)){const[a,l]=Ic(!0,r);!n&&i.radix!==10&&o>=a&&o<=l&&(o=o<<32-r>>32-r);const[c,d]=Ic(n,r);if(o>=c&&o<=d)return o}}throw new Error(`The input string ${e} was not in a correct format.`)}function Vr(e,t,n,r,s){try{return s.contents=S0(e,t,n,r),!0}catch{return!1}}const A0="#C$&$&$$$$$$%-%&%=$$$$$$=$$$$D$$'$$$$$$$$$$$$%$$%$$$$&$:$*;$+$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%$$$$$$$$$$$$$$$%$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%$$$$&%$$$%$&%'$%$&&%$%$$$$$%$$%$$%$&$$$%%$$&'$$$$$$$$$$$$$$$$$$$$$$$$%$$$$$$$$$$$$$$$$$%$$$$$&$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$*%$%%$$'$$$$$$$$h$>5'/1(*$$$4“$$$$$$$$%$&$$'%$$&$$$%$4$,F$%&&$$$$$$$$$$$$$$$$$$$$$$$($$$$$%%VS$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$(%$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%$$$$$$$$$$$$%$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$I%$)L$$%%$$P$$$%$%$$+>''%.)&%$%%.$$$%C$-8-'%$†$$*$$)%%$'%-&%$1$$$$A>%|.$1-D,%$&$%$%9'$,$&$(%2$<&%$$.X8$5.2$C$Y$$$$&+'$%$*-%%-$$2$%$+%%%9$*$$&'%$$&'%%%%$$+$'%$&%%-%%)$$$$$%%$$)'%%9$*$%$%$%%$$&%'%%&&$*'$$*-%&$$-%$$,$&$9$*$%$(%$$&($%$$%$%$2%%%-$$*$)$$%$+%%%9$*$%$(%$$$$$'%%%%$*%$'%$&%%-$$)-$$$)&&$'&%$$$%&%&&&/'%$%&&$&$%$)$1-&)$$($&$+$&$:$3&$&'$&$'*%$&(%%%-*$*$$$%$+$&$:$-$(%$$$$($$%$%%*%*$$%%%-$%0%%,$&$L%$&'$&$&$$$'&$*&%%-,$)$$%$5&;$,$$%*&$'&&$$$+)-%%$/S$%*'$)$+$-%H%$$$($;$$$-$%,$%($$$)%-%'C$&2$$&%)--$$$$$$$$$$%+$G'1$($%(.$G$+$)$%('%HN%'$)$%%%$-))%%'&$&%*&'0$%%)$$$-&$%I$$($%N$$&Ŭ$'%*$$$'%L$'%D$'%*$$$'%2$\\$'%f%&,7&3-)y%)%$ʏ$$4$=$$&n&&+*0$'&.5&%,5%/0$&$%/W%$*+$%.&$&$$$%-)-))$'&$$-)F$X*(%E$$(i-B$&'%&'%$)&'$&%-A%(.O'=)-$&E:%%$%%X$$$*$$$$%+)-%$-)-)*$)%1$%b'$R$$($$($%*'-*-,,&%$A$'%%$&%-O$$%&$$&%+'G++%%&(-&&-A)%,*N%&++&$0$*'$)$%$%$(Ob0$EH]$($$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$,$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$,+)%)%++++)%)%+$$$$$$$$++1%++++++($%'$$$&&$%'$&'%%'$&+(&%&$%'$%$.()%$$$%$$$+$$($,$$'%&$$$.$$$-$($-$$%)&$$$-&$$$0&C30'$&/2%$'$%$&%&$$$%$()$$$$$$'$$'$'$%%%($'$$%$$3F$$'$%'((%'$%$%$*$B%%$$$Bį+$$$$7%*$$t$A<K)h<.8_q9Ú$,$Y+’$ě$$$$$$$$$$$$$$AO($$B$$$$$$$$$$3ģ¦$$$$$$$$$$$$$$$$$$$$$$b$$$$C$$ĥS8%)J%C$ŒR$R$$$&%$$$$$$'$$%$)%&$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%)$$$$&$$('$%I$$($%[*$$1$:,*$*$*$*$*$*$*$*$C%$$$$&$$$$$,$%$$$$%$$$$$$$$$$($-%'$$$0%$P=$|/ù=/'$&$$$$$$$$$$$$$$%$$$$$$$$$$%$,'%$(%&$$$%$y%%%%$$}$&$(N$$%'-CG/3B$-A+$2C-J2ţ᧣c删&8$Қ&Z,K)%į$&3-%7$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$&$-$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%%i-%)+:,%$$$$$$$$$$$$$&$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$+$$$$%$$$$$$$$$$%$$$$$$$$&$$$$$$$$$$$$$$$$$$$$($($$$$$$$$$$$%$$'$$$M$$$%$*$&$'$:%%$'$&)%$$)W'+%U3%+%-)5)&$$%$-?+%:.%.$@&&$R$%'%%&0$$-'%($$,-($L)%%%%,&$+$$%-%'3$)&$$$$U$$&%%(%$$$;%$%.$%%%$%$$-)%)%),*$*$N$',$%'sF%$%$%$$$%-)⯇/:'T'ࠣᤣƑ%I*/(($$-$0$($$$%$%$34Ǝ$$3c%YK/$$%3*$$$)3$%%$$$$$$$$$$$$$$$$%$$'&&$'$$$$$$$&$$&$$$%'($ª%$$&$&$$$$$$%-%&%=$$$$$$=$$$$$$$$$%-$P%B&)%)%)%&&%$$$%$$'%-&%%/$=$6$%$2%1Ež(&'P&,X'4%&$0&$RP$¥@&T2$>'C',7$+$(I((A$$G'+$(MKKq%-)G'G'K+W.$³Ś,9-+»)%$$O$%&$%:$$+:%*B+,S6$%((9)&$=($c['%%3%Q$&$%(''$&$@%&'$,*,*@%$@&C+$?%'(*,Y&*9%+6(+5*'/*slZV0V*)G'+-ʼnB$M$%$%%q@-$+9.'(y8*7:,$$$X2*'7-2&$P&'%%%$'.$%<*-)&G($+$-'$%$+F$%$,%$S&,%'''$$$-$$$&$7.5$<&&%$$%)$d*$$$'$2$-$)R$&+(-)%%$+%%%9$*$%$($%$%$'%%%&%$)$((%%*&(®X&+%&$$'(-%$$$&AS&)$$'%$%%$$+-ÉR&'%'%$%:'%ES&+%$$%&$.-)06N$$$%)$$$*-Y>%&%'$('-%&$ãO&,$%$‡CC-,/+%$%+$%$;)$%%%$$$$$$$&,-i+%J&'%%'$$$$$>$-K)$$'+$+$)%&Q0$%&$(@\\Ī,$H$*$)$$$(--6&%A%9$$*$%$%l*$%$I)&$$%$*$$+-))$%$C($%$%$$$$*-ř6%%%Ú$28+'40$ν‰’$(.ç૟ђ$,࿪ɪ⇜ɜ*B$-'%ƒA%($-S*(''$$--$*$8(6˓CC:'ˆn'$$Z*'0c%$$$.%1᠛+ӹM,⌚łT&4'+ƯधŽ(0&,*-%$%$'፿ę-J%_%&&)++%*A'^:e&$½7/z,<ª===*$5==$$%%$%%%'$+'$$$*$.==%$'%+$*$=%$'$($$&*$============?%<$<$)<$<$)<$<$)<$<$)<$<$)$$%UȣZ'U+$1$%(2($2ճ*$4%*$%$(øP&**%-'$$ƓO'-($ԣè%,*LEE*$'-'%̴^$&$'oP$2å'$>$%$$%$$-$'$$$$)$'$$$$$$&$%$$%$$$$$$$$$$%$$%'$*$'$'$$$-$4(&$($4W%ıO'‡/2%2$2$H-0Ä[@0O',*%1)½Ğ(˻+0&0&—/|*/7/'[+-)K+A%%qœ$u$ª/1%(&&(*,<**,&0*L¶$ZH-Щ꜁Eၘ.ā%ᚥ1ᵔూɁ؅፮򮳙$Aƒ£ē︳𐀡%𐀡",k0="1.;=;78;<;6;+;<;#7;8>5>$7<8<1.;=?;>?'9<2?>?<->$;>-':-;#<#$<$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$'#$'#%$#%$#%$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#%$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$'$&>&>&>&>&>(#$#$&>#$@&$;#@>#;#@#@#$#@#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$<#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$?(*#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$@#@&;$;6@?=@(6(;(;(;(@'@';@2<;=;?(;2@;'&'(+;'(';'(2?(&(?('+'?';@2'('(@'('@+'(&?;&@(='(&(&(&(@;@'(@;@'@'@'@(2()'()(')()()'('(;+;&'()@'@'@'@'@'@'@(')(@)@)('@)@'@'(@+'=-?=';(@()@'@'@'@'@'@'@'@(@)(@(@(@(@'@'@+('(;@()@'@'@'@'@'@'@(')(@()@)(@'@'(@+;=@'(@()@'@'@'@'@'@'@(')()(@)@)(@()@'@'(@+?'-@('@'@'@'@'@'@'@'@'@'@)()@)@)(@'@)@+-?=?@()('@'@'@'@'()@(@(@(@'@'(@+@;-?'();'@'@'@'@'@(')()@()@)(@)@'@'(@+@'@()'@'@'(')(@)@)('?@')-'(@+-?'@()@'@'@'@'@'@(@)(@(@)@+@);@'('(@='&(;+;@'@'@'@'@'@'('('@'@&@(@+@'@'?;?;?(?+-?(?(?(7878)'@'@()(;('(@(@?(?@?;?;@')()()()('+;')('(')')'('()()(')+)(?#@#@#@$;&$'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@(;-@'?@#@$@6'?;'.'78@';,'@'@'(@'(;@'(@'@'@(@'()()()(;&;='(@+@-@;6;(2@+@'&'@'('('@'@'@()()@)()(@?@;+'@'@'@'@+-@?'()(@;')()(@()()()(@(+@+@;&;@(*(@()'()()()()'@+;?(?@()')()()('+'()()()()@;')()(@;+@'+'&;$@#@#;@(;()('('(')('@$&$&$&(@(#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$@#@$#$#$@#@$@#@#@#@#$#$@$%$%$%$@$#%>$>$@$#%>$@$#@>$#>@$@$#%>@.26;9:79:79;/02.;9:;5;<78;<;5;.2@2-&@-<78&-<78@&@=@(*(*(@?#?#?$#$#$?#?<#?#?#?#?#?$#$'$?$#<#$?<?$?-,#$,-?@<?<?<?<?<?<?<?<?<?<?7878?<?78?<?<?<?@?@-?-?<?<?<?<?78787878787878-?<78<7878787878<?<7878787878787878787878<7878<78<?<?<?@?@?#@$@#$#$#$#$#$#$#$#$&#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$?#$#$(#$@;-;$@$@$@'@&;@('@'@'@'@'@'@'@'@'@(;9:9:;9:;9:;6;6;9:;9:78787878;&;6;6;7;?;@?@?@?@?@.;?&',7878787878?78787878678?,()6&?,&';?@'@(>&'6';&'@'@'@?-?'?@'?@-?-?-?-?-?'?'@'&'@?@'&;'&;'+'@#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$'(*;(;&#$#$#$#$#$#$#$#$#$#$#$#$#$#$&(',(;@>&>#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$&$#$#$#$#$#$#$#$&>#$#$'#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$@#$#$#$@#$'&$'('('(')()?(@-?=?@';@)')(@;+@(';';'(+'(;'()@;'@()'()()();@&+@;'(&'+'@'()()(@'('()@+@;'&'?')()'('('('('('@'&;')();'&)(@'@'@'@'@'@$>&$&>@$')()();)(@+@'@'@'@34'@'@$@$@'('<'@'@'@'@'@'>@'87@'@'@'=?@(;78;@(;657878787878787878;78;5;@;6787878;<6<@;=;@'@'@2@;=;78;<;6;+;<;#7;8>5>$7<8<78;78;'&'&'@'@'@'@'@=<>?=@?<?@2?@'@'@'@'@'@'@'@;@-@?,-?-?@?@?@?(@'@'@(-@'-@',',@'(@'@;'@';,@#$'@+@#@$@'@'@;@'@'@'@'@'@'@'@'@'@;-'?-'@-@'@'@-'-@;'@;@'@-'-@-'(@(@('@'@'@(@(-@;@'-;'-@'?'(@-;@'@;'@-'@-'@;@-@'@#@$@-'(@+@-@'@(6@'@'-'@'(-;@'-@'@)()'(;@-+@()')()(;2;@2@'@+@('()(@+;')'@'(;'@()')()';(;)(+';';@-@'@')()()(;(@'@'@'@'@';@'()(@+@()@'@'@'@'@'@'@(')()@)@)@'@)@')@(@(@')()()(';+;@;('@')()()()(';'@+@')(@)()(;'(@')()()(;'@+@;@'()()()('@+@'@()()(@+-;?@')()(;@#$+-@'@'@'@'@')@)@()(')')(;@+@'@')(@()(';')@'('()'(;(@'()('()(;';@'@'@')(@()(';@+-@;'@(@)()()(@'@'@'(@(@(@('(@+@'@'@')@(@)()('@+@'();@'@-?=?@;'@,@;@'@'@2@'@'@'@+@;@'@(;@'(;?&;?@+@-@'@'@#$-;@'@(')@(&@&;&(@)@'@'@'@'@'@'@'@'@'@'@'@?(;2@?@?@?)(?)2(?(?(?@?(?@-@?@-@#$#$@$#$#@#@#@#@#@#$@$@$@$#$#@#@#@#@$#@#@#@#@#@$#$#$#$#$#$#$@#<$<$#<$<$#<$<$#<$<$#<$<$#$@+?(?(?(?(?;@(@(@(@(@(@(@(@'@(&@+@'?@'(+@=@'@-(@#$(&@+@;@-?-=-@-?-@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@<@?@?@?@?@?@?@-?@?@?@?@?@?@?>?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@+@'@'@'@'@'@'@'@2@2@(@4@4@";function E0(){const t=[...A0].map(i=>(i.codePointAt(0)??0)-35),n=[...k0].map(i=>(i.codePointAt(0)??0)-35),r=new Uint32Array(t),s=new Uint8Array(n);for(let i=1;i<r.length;++i)r[i]+=r[i-1];return i=>{let o=r.length,a=0;for(;o-a>1;){const l=Math.floor((o+a)/2),c=r[l];if(i<c)o=l;else if(i===c){o=a=l;break}else c<i&&(a=l)}return s[a]}}const I0=256,N0=E0();function T0(e,t){if(t<e.length)return e.charCodeAt(t);throw new Error("Index out of range.")}const R0=e=>P0(e,0);function M0(e,t){const n=T0(e,t);return N0(n)}function P0(e,t){return(1<<M0(e,t)&I0)!==0}function O0(e,t){const n=Km(Zl(e),t);if(n!=null)return _(ae(k(()=>Le(r=>r||"",n))))}function D0(e){let t;const n=O0(".*?@(.*)",e);switch(n!=null?K(n)?t=1:K(_(n))?t=0:t=1:t=1,t){case 0:return e;default:return}}function Mt(e,t){return di(t)?new $(1,[qt(jt("%s cannot be null or empty"))(e)]):new $(0,[t])}function F0(e){const t=D0(e);if(t!=null){const n=t;return new $(0,[n])}else return new $(1,["Email is not in the correct format"])}function V0(e){return~~e.charCodeAt(0)-48}function L0(e){let t;const n=new $(1,["BusinessNumber is not valid"]),r=new Int32Array([10,1,3,5,7,9,11,13,15,17,19]),s=Vn(V0,(t=e.split(""),t.filter(R0)),Int32Array);return s.length===11?(Nt(s,0,we(0,s)-1|0),cp(rp((i,o)=>i*o,s,r,Int32Array),{GetZero:()=>0,Add:(i,o)=>i+o})%89===0?new $(0,[e]):n):n}function zo(e){const t=Mt("Name",e);return t.tag===1?new $(1,[t.fields[0]]):new $(0,[pc(t.fields[0])])}function bi(e){return Mo(e)}function Nc(e){const t=Mt("Website",e);return t.tag===1?new $(1,[t.fields[0]]):new $(0,[new Ep(t.fields[0])])}function Tc(e){return e.fields[0]}function Rc(e){const t=Mt("FirstName",e);return t.tag===1?new $(1,[t.fields[0]]):new $(0,[new Ip(t.fields[0])])}function Mc(e){return e.fields[0]}function Pc(e){const t=Mt("LastName",e);return t.tag===1?new $(1,[t.fields[0]]):new $(0,[new Np(t.fields[0])])}function Oc(e){return e.fields[0]}function Dc(e){let t;const n=Mt("Email",e);return t=n.tag===1?new $(1,[n.fields[0]]):F0(n.fields[0]),t.tag===1?new $(1,[t.fields[0]]):new $(0,[new Tp(t.fields[0])])}function Fc(e){const t=Mt("MobilePhone",e);return t.tag===1?new $(1,[t.fields[0]]):new $(0,[new Rp(t.fields[0])])}function Vc(e){return e.fields[0]}class Lc extends Q{constructor(t,n,r,s){super(),this.FirstName=t,this.LastName=n,this.Email=r,this.MobilePhone=s}}function Ho(){return at("AccountRegistry.Shared.Primitives.ContactDetails",[],Lc,()=>[["FirstName",H],["LastName",H],["Email",H],["MobilePhone",H]])}function B0(e){const t=Rc(e.FirstName);if(t.tag===1)return new $(1,[t.fields[0]]);{const n=Pc(e.LastName);if(n.tag===1)return new $(1,[n.fields[0]]);{const r=Dc(e.Email);if(r.tag===1)return new $(1,[r.fields[0]]);{const s=Fc(e.MobilePhone);return s.tag===1?new $(1,[s.fields[0]]):new $(0,[new Mp(t.fields[0],n.fields[0],r.fields[0],s.fields[0])])}}}}function U0(e){const t=e;if(t!=null)return new Pp(t)}function j0(e){if(e!=null)return e.fields[0]}function ut(e){return Kt(e)}function dn(e){return Zt(e)}function Bc(e){const t=Mt("BusinessName",e);return t.tag===1?new $(1,[t.fields[0]]):new $(0,[new Fp(t.fields[0])])}function Uc(e){let t;const n=Mt("BusinessNumber",e);return t=n.tag===1?new $(1,[n.fields[0]]):L0(n.fields[0]),t.tag===1?new $(1,[t.fields[0]]):new $(0,[new Vp(t.fields[0])])}function z0(e){const t=Mt("Address1",e);return t.tag===1?new $(1,[t.fields[0]]):new $(0,[new Lp(t.fields[0])])}function H0(e){const t=e;if(t!=null)return new Bp(t)}function W0(e){const t=Mt("City",e);return t.tag===1?new $(1,[t.fields[0]]):new $(0,[new Up(t.fields[0])])}function G0(e){const t=Mt("Postcode",e);return t.tag===1?new $(1,[t.fields[0]]):new $(0,[new jp(t.fields[0])])}function q0(e){const t=Mt("State",e);return t.tag===1?new $(1,[t.fields[0]]):new $(0,[new zp(t.fields[0])])}class jc extends Q{constructor(t,n,r,s,i,o,a,l,c){super(),this.BusinessName=t,this.BusinessNumber=n,this.Address1=r,this.Address2=s,this.City=i,this.Postcode=o,this.State=a,this.Phone=l,this.CountryCode=c}}function K0(){return at("AccountRegistry.Shared.Primitives.LegalEntity",[],jc,()=>[["BusinessName",H],["BusinessNumber",H],["Address1",H],["Address2",ye(H)],["City",H],["Postcode",H],["State",ye(H)],["Phone",H],["CountryCode",ye(H)]])}function Z0(e){const t=Mt("SalesforceParentRecordId",e);return t.tag===1?new $(1,[t.fields[0]]):new $(0,[new Hp(t.fields[0])])}class zc extends Q{constructor(t,n){super(),this.SalesforceParentRecordId=t,this.SalesforceRecordId=n}}function J0(){return at("AccountRegistry.Shared.Primitives.SalesforceInfo",[],zc,()=>[["SalesforceParentRecordId",H],["SalesforceRecordId",ye(H)]])}class Hc extends Q{constructor(t,n){super(),this.Code=t,this.Name=n}}function Y0(){return at("AccountRegistry.Shared.Primitives.AnzsicClassifier",[],Hc,()=>[["Code",H],["Name",H]])}class Wo extends j{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Api","Direct"]}}function _i(){return bo("AccountRegistry.Shared.Primitives.AccountProvisioningModeDto",[],Wo,()=>[[],[]])}let X0=class extends Q{constructor(t,n,r,s,i,o){super(),this.StreamId=t,this.Name=n,this.Website=r,this.ContactDetails=s,this.Notes=i,this.AccountProvisioningMode=o}};function Q0(){return at("AccountRegistry.Shared.AdminApi.Partner",[],X0,()=>[["StreamId",H],["Name",H],["Website",H],["ContactDetails",ye(Ho())],["Notes",ye(H)],["AccountProvisioningMode",_i()]])}class Wc extends Q{constructor(t,n,r,s,i,o,a,l,c,d){super(),this.StreamId=t,this.PartnerId=n,this.Name=r,this.Website=s,this.ContactDetails=i,this.Notes=o,this.LegalEntity=a,this.ExternalId=l,this.ChannelId=c,this.ProvisioningMode=d}}function eg(){return at("AccountRegistry.Shared.AdminApi.Account",[],Wc,()=>[["StreamId",H],["PartnerId",H],["Name",H],["Website",H],["ContactDetails",ye(Ho())],["Notes",ye(H)],["LegalEntity",ye(K0())],["ExternalId",ye(H)],["ChannelId",ye(H)],["ProvisioningMode",_i()]])}class tg extends Q{constructor(t,n,r,s,i,o,a,l,c,d){super(),this.AccountId=t,this.Name=n,this.Contact=r,this.ContactMobilePhone=s,this.Website=i,this.BusinessName=o,this.BusinessNumber=a,this.ExternalId=l,this.ChannelId=c,this.ProvisioningMode=d}}function ng(){return at("AccountRegistry.Shared.AdminApi.AccountLookupItem",[],tg,()=>[["AccountId",H],["Name",H],["Contact",ye(H)],["ContactMobilePhone",ye(H)],["Website",H],["BusinessName",ye(H)],["BusinessNumber",ye(H)],["ExternalId",ye(H)],["ChannelId",ye(H)],["ProvisioningMode",_i()]])}class Gc extends Q{constructor(t,n){super(),this.Accounts=t,this.Token=n}}function rg(){return at("AccountRegistry.Shared.AdminApi.AccountLookup",[],Gc,()=>[["Accounts",_o(ng())],["Token",ye(H)]])}class sg extends Q{constructor(t,n){super(),this.PartnerId=t,this.AccountId=n}}function ig(){return at("AccountRegistry.Shared.AdminApi.FindAccountResponse",[],sg,()=>[["PartnerId",H],["AccountId",H]])}class og extends Q{constructor(t,n){super(),this.ClassCode=t,this.ClassTitle=n}}function ag(){return at("AccountRegistry.Shared.AdminApi.AnzsicClass",[],og,()=>[["ClassCode",H],["ClassTitle",H]])}class lg extends Q{constructor(t,n,r){super(),this.GroupCode=t,this.GroupTitle=n,this.Classes=r}}function cg(){return at("AccountRegistry.Shared.AdminApi.AnzsicGroup",[],lg,()=>[["GroupCode",H],["GroupTitle",H],["Classes",Rl(ag())]])}class ug extends j{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Success","TooManyResults"]}}function dg(){return bo("AccountRegistry.Shared.AdminApi.AnzsicSearchResult",[],ug,()=>[[["Item",Rl(cg())]],[]])}class qc extends Q{constructor(t,n,r,s,i,o,a,l,c){super(),this.BusinessName=t,this.BusinessNumber=n,this.Address1=r,this.Address2=s,this.City=i,this.Postcode=o,this.State=a,this.Phone=l,this.CountryCode=c}}function fg(){return at("AccountRegistry.Shared.AdminApi.Write.LegalEntityV2",[],qc,()=>[["BusinessName",H],["BusinessNumber",H],["Address1",H],["Address2",ye(H)],["City",H],["Postcode",H],["State",ye(H)],["Phone",H],["CountryCode",H]])}class Kc extends Q{constructor(t,n,r,s,i,o,a,l,c){super(),this.Name=t,this.Website=n,this.ContactDetails=r,this.Notes=s,this.LegalEntity=i,this.ExternalId=o,this.ChannelId=a,this.SalesforceInfo=l,this.AnzsicClassifier=c}}function hg(){return at("AccountRegistry.Shared.AdminApi.Write.AccountPost",[],Kc,()=>[["Name",H],["Website",H],["ContactDetails",Ho()],["Notes",ye(H)],["LegalEntity",ye(fg())],["ExternalId",ye(H)],["ChannelId",ye(H)],["SalesforceInfo",ye(J0())],["AnzsicClassifier",ye(Y0())]])}class mg extends Q{constructor(t){super(),this.Id=t}}function pg(){return at("AccountRegistry.Shared.AdminApi.Write.AccountPostResponse",[],mg,()=>[["Id",H]])}class Zc extends Q{constructor(t,n,r){super(),this.Name=t,this.BusinessName=n,this.BusinessNumber=r}}function gg(){return at("AccountRegistry.Shared.AdminApi.Write.PatchAccountDto",[],Zc,()=>[["Name",ye(H)],["BusinessName",ye(H)],["BusinessNumber",ye(H)]])}class Jc extends Q{constructor(t){super(),this.ProvisioningMode=t}}function $g(){return at("AccountRegistry.Shared.AdminApi.Write.UpdateAccountProvisioningModeDto",[],Jc,()=>[["ProvisioningMode",_i()]])}var Cs,se,Yc,sr,Xc,Qc,Go,qo,Ko,Zo,eu,Ss={},tu=[],wg=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,vi=Array.isArray;function Sn(e,t){for(var n in t)e[n]=t[n];return e}function nu(e){var t=e.parentNode;t&&t.removeChild(e)}function f(e,t,n){var r,s,i,o={};for(i in t)i=="key"?r=t[i]:i=="ref"?s=t[i]:o[i]=t[i];if(arguments.length>2&&(o.children=arguments.length>3?Cs.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)o[i]===void 0&&(o[i]=e.defaultProps[i]);return As(e,o,r,s,null)}function As(e,t,n,r,s){var i={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:s??++Yc,__i:-1,__u:0};return s==null&&se.vnode!=null&&se.vnode(i),i}function Jo(){return{current:null}}function ve(e){return e.children}function Jt(e,t){this.props=e,this.context=t}function ir(e,t){if(t==null)return e.__?ir(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?ir(e):null}function ru(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return ru(e)}}function Yo(e){(!e.__d&&(e.__d=!0)&&sr.push(e)&&!xi.__r++||Xc!==se.debounceRendering)&&((Xc=se.debounceRendering)||Qc)(xi)}function xi(){var e,t,n,r,s,i,o,a;for(sr.sort(Go);e=sr.shift();)e.__d&&(t=sr.length,r=void 0,i=(s=(n=e).__v).__e,o=[],a=[],n.__P&&((r=Sn({},s)).__v=s.__v+1,se.vnode&&se.vnode(r),Xo(n.__P,r,s,n.__n,n.__P.namespaceURI,32&s.__u?[i]:null,o,i??ir(s),!!(32&s.__u),a),r.__v=s.__v,r.__.__k[r.__i]=r,lu(o,r,a),r.__e!=i&&ru(r)),sr.length>t&&sr.sort(Go));xi.__r=0}function su(e,t,n,r,s,i,o,a,l,c,d){var u,m,h,p,g,w=r&&r.__k||tu,C=t.length;for(n.__d=l,yg(n,t,w),l=n.__d,u=0;u<C;u++)(h=n.__k[u])!=null&&typeof h!="boolean"&&typeof h!="function"&&(m=h.__i===-1?Ss:w[h.__i]||Ss,h.__i=u,Xo(e,h,m,s,i,o,a,l,c,d),p=h.__e,h.ref&&m.ref!=h.ref&&(m.ref&&Qo(m.ref,null,h),d.push(h.ref,h.__c||p,h)),g==null&&p!=null&&(g=p),65536&h.__u||m.__k===h.__k?(l&&!l.isConnected&&(l=ir(m)),l=iu(h,l,e)):typeof h.type=="function"&&h.__d!==void 0?l=h.__d:p&&(l=p.nextSibling),h.__d=void 0,h.__u&=-196609);n.__d=l,n.__e=g}function yg(e,t,n){var r,s,i,o,a,l=t.length,c=n.length,d=c,u=0;for(e.__k=[],r=0;r<l;r++)o=r+u,(s=e.__k[r]=(s=t[r])==null||typeof s=="boolean"||typeof s=="function"?null:typeof s=="string"||typeof s=="number"||typeof s=="bigint"||s.constructor==String?As(null,s,null,null,null):vi(s)?As(ve,{children:s},null,null,null):s.constructor===void 0&&s.__b>0?As(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):s)!=null?(s.__=e,s.__b=e.__b+1,a=bg(s,n,o,d),s.__i=a,i=null,a!==-1&&(d--,(i=n[a])&&(i.__u|=131072)),i==null||i.__v===null?(a==-1&&u--,typeof s.type!="function"&&(s.__u|=65536)):a!==o&&(a===o+1?u++:a>o?d>l-o?u+=a-o:u--:a<o?a==o-1&&(u=a-o):u=0,a!==r+u&&(s.__u|=65536))):(i=n[o])&&i.key==null&&i.__e&&(131072&i.__u)==0&&(i.__e==e.__d&&(e.__d=ir(i)),ea(i,i,!1),n[o]=null,d--);if(d)for(r=0;r<c;r++)(i=n[r])!=null&&(131072&i.__u)==0&&(i.__e==e.__d&&(e.__d=ir(i)),ea(i,i))}function iu(e,t,n){var r,s;if(typeof e.type=="function"){for(r=e.__k,s=0;r&&s<r.length;s++)r[s]&&(r[s].__=e,t=iu(r[s],t,n));return t}e.__e!=t&&(n.insertBefore(e.__e,t||null),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType===8);return t}function An(e,t){return t=t||[],e==null||typeof e=="boolean"||(vi(e)?e.some(function(n){An(n,t)}):t.push(e)),t}function bg(e,t,n,r){var s=e.key,i=e.type,o=n-1,a=n+1,l=t[n];if(l===null||l&&s==l.key&&i===l.type&&(131072&l.__u)==0)return n;if(r>(l!=null&&(131072&l.__u)==0?1:0))for(;o>=0||a<t.length;){if(o>=0){if((l=t[o])&&(131072&l.__u)==0&&s==l.key&&i===l.type)return o;o--}if(a<t.length){if((l=t[a])&&(131072&l.__u)==0&&s==l.key&&i===l.type)return a;a++}}return-1}function ou(e,t,n){t[0]==="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||wg.test(t)?n:n+"px"}function Ci(e,t,n,r,s){var i;e:if(t==="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||ou(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||ou(e.style,t,n[t])}else if(t[0]==="o"&&t[1]==="n")i=t!==(t=t.replace(/(PointerCapture)$|Capture$/i,"$1")),t=t.toLowerCase()in e||t==="onFocusOut"||t==="onFocusIn"?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=n,n?r?n.u=r.u:(n.u=qo,e.addEventListener(t,i?Zo:Ko,i)):e.removeEventListener(t,i?Zo:Ko,i);else{if(s=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!=="-"?e.removeAttribute(t):e.setAttribute(t,n))}}function au(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t.t==null)t.t=qo++;else if(t.t<n.u)return;return n(se.event?se.event(t):t)}}}function Xo(e,t,n,r,s,i,o,a,l,c){var d,u,m,h,p,g,w,C,x,E,D,L,X,pe,Se,de=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(l=!!(32&n.__u),i=[a=t.__e=n.__e]),(d=se.__b)&&d(t);e:if(typeof de=="function")try{if(C=t.props,x=(d=de.contextType)&&r[d.__c],E=d?x?x.props.value:d.__:r,n.__c?w=(u=t.__c=n.__c).__=u.__E:("prototype"in de&&de.prototype.render?t.__c=u=new de(C,E):(t.__c=u=new Jt(C,E),u.constructor=de,u.render=vg),x&&x.sub(u),u.props=C,u.state||(u.state={}),u.context=E,u.__n=r,m=u.__d=!0,u.__h=[],u._sb=[]),u.__s==null&&(u.__s=u.state),de.getDerivedStateFromProps!=null&&(u.__s==u.state&&(u.__s=Sn({},u.__s)),Sn(u.__s,de.getDerivedStateFromProps(C,u.__s))),h=u.props,p=u.state,u.__v=t,m)de.getDerivedStateFromProps==null&&u.componentWillMount!=null&&u.componentWillMount(),u.componentDidMount!=null&&u.__h.push(u.componentDidMount);else{if(de.getDerivedStateFromProps==null&&C!==h&&u.componentWillReceiveProps!=null&&u.componentWillReceiveProps(C,E),!u.__e&&(u.shouldComponentUpdate!=null&&u.shouldComponentUpdate(C,u.__s,E)===!1||t.__v===n.__v)){for(t.__v!==n.__v&&(u.props=C,u.state=u.__s,u.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function(Y){Y&&(Y.__=t)}),D=0;D<u._sb.length;D++)u.__h.push(u._sb[D]);u._sb=[],u.__h.length&&o.push(u);break e}u.componentWillUpdate!=null&&u.componentWillUpdate(C,u.__s,E),u.componentDidUpdate!=null&&u.__h.push(function(){u.componentDidUpdate(h,p,g)})}if(u.context=E,u.props=C,u.__P=e,u.__e=!1,L=se.__r,X=0,"prototype"in de&&de.prototype.render){for(u.state=u.__s,u.__d=!1,L&&L(t),d=u.render(u.props,u.state,u.context),pe=0;pe<u._sb.length;pe++)u.__h.push(u._sb[pe]);u._sb=[]}else do u.__d=!1,L&&L(t),d=u.render(u.props,u.state,u.context),u.state=u.__s;while(u.__d&&++X<25);u.state=u.__s,u.getChildContext!=null&&(r=Sn(Sn({},r),u.getChildContext())),m||u.getSnapshotBeforeUpdate==null||(g=u.getSnapshotBeforeUpdate(h,p)),su(e,vi(Se=d!=null&&d.type===ve&&d.key==null?d.props.children:d)?Se:[Se],t,n,r,s,i,o,a,l,c),u.base=t.__e,t.__u&=-161,u.__h.length&&o.push(u),w&&(u.__E=u.__=null)}catch(Y){t.__v=null,l||i!=null?(t.__e=a,t.__u|=l?160:32,i[i.indexOf(a)]=null):(t.__e=n.__e,t.__k=n.__k),se.__e(Y,t,n)}else i==null&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=_g(n.__e,t,n,r,s,i,o,l,c);(d=se.diffed)&&d(t)}function lu(e,t,n){t.__d=void 0;for(var r=0;r<n.length;r++)Qo(n[r],n[++r],n[++r]);se.__c&&se.__c(t,e),e.some(function(s){try{e=s.__h,s.__h=[],e.some(function(i){i.call(s)})}catch(i){se.__e(i,s.__v)}})}function _g(e,t,n,r,s,i,o,a,l){var c,d,u,m,h,p,g,w=n.props,C=t.props,x=t.type;if(x==="svg"?s="http://www.w3.org/2000/svg":x==="math"?s="http://www.w3.org/1998/Math/MathML":s||(s="http://www.w3.org/1999/xhtml"),i!=null){for(c=0;c<i.length;c++)if((h=i[c])&&"setAttribute"in h==!!x&&(x?h.localName===x:h.nodeType===3)){e=h,i[c]=null;break}}if(e==null){if(x===null)return document.createTextNode(C);e=document.createElementNS(s,x,C.is&&C),i=null,a=!1}if(x===null)w===C||a&&e.data===C||(e.data=C);else{if(i=i&&Cs.call(e.childNodes),w=n.props||Ss,!a&&i!=null)for(w={},c=0;c<e.attributes.length;c++)w[(h=e.attributes[c]).name]=h.value;for(c in w)if(h=w[c],c!="children"){if(c=="dangerouslySetInnerHTML")u=h;else if(c!=="key"&&!(c in C)){if(c=="value"&&"defaultValue"in C||c=="checked"&&"defaultChecked"in C)continue;Ci(e,c,null,h,s)}}for(c in C)h=C[c],c=="children"?m=h:c=="dangerouslySetInnerHTML"?d=h:c=="value"?p=h:c=="checked"?g=h:c==="key"||a&&typeof h!="function"||w[c]===h||Ci(e,c,h,w[c],s);if(d)a||u&&(d.__html===u.__html||d.__html===e.innerHTML)||(e.innerHTML=d.__html),t.__k=[];else if(u&&(e.innerHTML=""),su(e,vi(m)?m:[m],t,n,r,x==="foreignObject"?"http://www.w3.org/1999/xhtml":s,i,o,i?i[0]:n.__k&&ir(n,0),a,l),i!=null)for(c=i.length;c--;)i[c]!=null&&nu(i[c]);a||(c="value",p!==void 0&&(p!==e[c]||x==="progress"&&!p||x==="option"&&p!==w[c])&&Ci(e,c,p,w[c],s),c="checked",g!==void 0&&g!==e[c]&&Ci(e,c,g,w[c],s))}return e}function Qo(e,t,n){try{typeof e=="function"?e(t):e.current=t}catch(r){se.__e(r,n)}}function ea(e,t,n){var r,s;if(se.unmount&&se.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||Qo(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(i){se.__e(i,t)}r.base=r.__P=null}if(r=e.__k)for(s=0;s<r.length;s++)r[s]&&ea(r[s],t,n||typeof e.type!="function");n||e.__e==null||nu(e.__e),e.__c=e.__=e.__e=e.__d=void 0}function vg(e,t,n){return this.constructor(e,n)}function Un(e,t,n){var r,s,i,o;se.__&&se.__(e,t),s=(r=typeof n=="function")?null:n&&n.__k||t.__k,i=[],o=[],Xo(t,e=(!r&&n||t).__k=f(ve,null,[e]),s||Ss,Ss,t.namespaceURI,!r&&n?[n]:s?null:t.firstChild?Cs.call(t.childNodes):null,i,!r&&n?n:s?s.__e:t.firstChild,r,o),lu(i,e,o)}function ta(e,t){Un(e,t,ta)}function na(e,t,n){var r,s,i,o,a=Sn({},e.props);for(i in e.type&&e.type.defaultProps&&(o=e.type.defaultProps),t)i=="key"?r=t[i]:i=="ref"?s=t[i]:a[i]=t[i]===void 0&&o!==void 0?o[i]:t[i];return arguments.length>2&&(a.children=arguments.length>3?Cs.call(arguments,2):n),As(e.type,a,r||e.key,s||e.ref,null)}function jn(e,t){var n={__c:t="__cC"+eu++,__:e,Consumer:function(r,s){return r.children(s)},Provider:function(r){var s,i;return this.getChildContext||(s=[],(i={})[t]=this,this.getChildContext=function(){return i},this.shouldComponentUpdate=function(o){this.props.value!==o.value&&s.some(function(a){a.__e=!0,Yo(a)})},this.sub=function(o){s.push(o);var a=o.componentWillUnmount;o.componentWillUnmount=function(){s.splice(s.indexOf(o),1),a&&a.call(o)}}),r.children}};return n.Provider.__=n.Consumer.contextType=n}Cs=tu.slice,se={__e:function(e,t,n,r){for(var s,i,o;t=t.__;)if((s=t.__c)&&!s.__)try{if((i=s.constructor)&&i.getDerivedStateFromError!=null&&(s.setState(i.getDerivedStateFromError(e)),o=s.__d),s.componentDidCatch!=null&&(s.componentDidCatch(e,r||{}),o=s.__d),o)return s.__E=s}catch(a){e=a}throw e}},Yc=0,Jt.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Sn({},this.state),typeof e=="function"&&(e=e(Sn({},n),this.props)),e&&Sn(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),Yo(this))},Jt.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Yo(this))},Jt.prototype.render=ve,sr=[],Qc=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Go=function(e,t){return e.__v.__b-t.__v.__b},xi.__r=0,qo=0,Ko=au(!1),Zo=au(!0),eu=0;var kn,ke,ra,cu,Lr=0,uu=[],Si=[],Be=se,du=Be.__b,fu=Be.__r,hu=Be.diffed,mu=Be.__c,pu=Be.unmount,gu=Be.__;function or(e,t){Be.__h&&Be.__h(ke,e,Lr||t),Lr=0;var n=ke.__H||(ke.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:Si}),n.__[e]}function Je(e){return Lr=1,Br(wu,e)}function Br(e,t,n){var r=or(kn++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):wu(void 0,t),function(a){var l=r.__N?r.__N[0]:r.__[0],c=r.t(l,a);l!==c&&(r.__N=[c,r.__[1]],r.__c.setState({}))}],r.__c=ke,!ke.u)){var s=function(a,l,c){if(!r.__c.__H)return!0;var d=r.__c.__H.__.filter(function(m){return!!m.__c});if(d.every(function(m){return!m.__N}))return!i||i.call(this,a,l,c);var u=!1;return d.forEach(function(m){if(m.__N){var h=m.__[0];m.__=m.__N,m.__N=void 0,h!==m.__[0]&&(u=!0)}}),!(!u&&r.__c.props===a)&&(!i||i.call(this,a,l,c))};ke.u=!0;var i=ke.shouldComponentUpdate,o=ke.componentWillUpdate;ke.componentWillUpdate=function(a,l,c){if(this.__e){var d=i;i=void 0,s(a,l,c),i=d}o&&o.call(this,a,l,c)},ke.shouldComponentUpdate=s}return r.__N||r.__}function Re(e,t){var n=or(kn++,3);!Be.__s&&la(n.__H,t)&&(n.__=e,n.i=t,ke.__H.__h.push(n))}function En(e,t){var n=or(kn++,4);!Be.__s&&la(n.__H,t)&&(n.__=e,n.i=t,ke.__h.push(n))}function he(e){return Lr=5,dt(function(){return{current:e}},[])}function sa(e,t,n){Lr=6,En(function(){return typeof e=="function"?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0},n==null?n:n.concat(e))}function dt(e,t){var n=or(kn++,7);return la(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function zn(e,t){return Lr=8,dt(function(){return e},t)}function fn(e){var t=ke.context[e.__c],n=or(kn++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(ke)),t.props.value):e.__}function ia(e,t){Be.useDebugValue&&Be.useDebugValue(t?t(e):e)}function xg(e){var t=or(kn++,10),n=Je();return t.__=e,ke.componentDidCatch||(ke.componentDidCatch=function(r,s){t.__&&t.__(r,s),n[1](r)}),[n[0],function(){n[1](void 0)}]}function oa(){var e=or(kn++,11);if(!e.__){for(var t=ke.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function Cg(){for(var e;e=uu.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Ai),e.__H.__h.forEach(aa),e.__H.__h=[]}catch(t){e.__H.__h=[],Be.__e(t,e.__v)}}Be.__b=function(e){ke=null,du&&du(e)},Be.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),gu&&gu(e,t)},Be.__r=function(e){fu&&fu(e),kn=0;var t=(ke=e.__c).__H;t&&(ra===ke?(t.__h=[],ke.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=Si,n.__N=n.i=void 0})):(t.__h.forEach(Ai),t.__h.forEach(aa),t.__h=[],kn=0)),ra=ke},Be.diffed=function(e){hu&&hu(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(uu.push(t)!==1&&cu===Be.requestAnimationFrame||((cu=Be.requestAnimationFrame)||Sg)(Cg)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==Si&&(n.__=n.__V),n.i=void 0,n.__V=Si})),ra=ke=null},Be.__c=function(e,t){t.some(function(n){try{n.__h.forEach(Ai),n.__h=n.__h.filter(function(r){return!r.__||aa(r)})}catch(r){t.some(function(s){s.__h&&(s.__h=[])}),t=[],Be.__e(r,n.__v)}}),mu&&mu(e,t)},Be.unmount=function(e){pu&&pu(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{Ai(r)}catch(s){t=s}}),n.__H=void 0,t&&Be.__e(t,n.__v))};var $u=typeof requestAnimationFrame=="function";function Sg(e){var t,n=function(){clearTimeout(r),$u&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);$u&&(t=requestAnimationFrame(n))}function Ai(e){var t=ke,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),ke=t}function aa(e){var t=ke;e.__c=e.__(),ke=t}function la(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function wu(e,t){return typeof t=="function"?t(e):t}function yu(e,t){for(var n in t)e[n]=t[n];return e}function ca(e,t){for(var n in e)if(n!=="__source"&&!(n in t))return!0;for(var r in t)if(r!=="__source"&&e[r]!==t[r])return!0;return!1}function ki(e,t){this.props=e,this.context=t}function bu(e,t){function n(s){var i=this.props.ref,o=i==s.ref;return!o&&i&&(i.call?i(null):i.current=null),t?!t(this.props,s)||!o:ca(this.props,s)}function r(s){return this.shouldComponentUpdate=n,f(e,s)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(ki.prototype=new Jt).isPureReactComponent=!0,ki.prototype.shouldComponentUpdate=function(e,t){return ca(this.props,e)||ca(this.state,t)};var _u=se.__b;se.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),_u&&_u(e)};var Ag=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function Hn(e){function t(n){var r=yu({},n);return delete r.ref,e(r,n.ref||null)}return t.$$typeof=Ag,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var vu=function(e,t){return e==null?null:An(An(e).map(t))},xu={map:vu,forEach:vu,count:function(e){return e?An(e).length:0},only:function(e){var t=An(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:An},kg=se.__e;se.__e=function(e,t,n,r){if(e.then){for(var s,i=t;i=i.__;)if((s=i.__c)&&s.__c)return t.__e==null&&(t.__e=n.__e,t.__k=n.__k),s.__c(e,t)}kg(e,t,n,r)};var Cu=se.unmount;function Su(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(r){typeof r.__c=="function"&&r.__c()}),e.__c.__H=null),(e=yu({},e)).__c!=null&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(r){return Su(r,t,n)})),e}function Au(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(r){return Au(r,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=n)),e}function ks(){this.__u=0,this.t=null,this.__b=null}function ku(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function Eu(e){var t,n,r;function s(i){if(t||(t=e()).then(function(o){n=o.default||o},function(o){r=o}),r)throw r;if(!n)throw t;return f(n,i)}return s.displayName="Lazy",s.__f=!0,s}function Ur(){this.u=null,this.o=null}se.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),Cu&&Cu(e)},(ks.prototype=new Jt).__c=function(e,t){var n=t.__c,r=this;r.t==null&&(r.t=[]),r.t.push(n);var s=ku(r.__v),i=!1,o=function(){i||(i=!0,n.__R=null,s?s(a):a())};n.__R=o;var a=function(){if(!--r.__u){if(r.state.__a){var l=r.state.__a;r.__v.__k[0]=Au(l,l.__c.__P,l.__c.__O)}var c;for(r.setState({__a:r.__b=null});c=r.t.pop();)c.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(o,o)},ks.prototype.componentWillUnmount=function(){this.t=[]},ks.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=Su(this.__b,n,r.__O=r.__P)}this.__b=null}var s=t.__a&&f(ve,null,e.fallback);return s&&(s.__u&=-33),[f(ve,null,t.__a?null:e.children),s]};var Iu=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.u=n=n[2]}};function Eg(e){return this.getChildContext=function(){return e.context},e.children}function Ig(e){var t=this,n=e.i;t.componentWillUnmount=function(){Un(null,t.l),t.l=null,t.i=null},t.i&&t.i!==n&&t.componentWillUnmount(),t.l||(t.i=n,t.l={nodeType:1,parentNode:n,childNodes:[],appendChild:function(r){this.childNodes.push(r),t.i.appendChild(r)},insertBefore:function(r,s){this.childNodes.push(r),t.i.appendChild(r)},removeChild:function(r){this.childNodes.splice(this.childNodes.indexOf(r)>>>1,1),t.i.removeChild(r)}}),Un(f(Eg,{context:t.context},e.__v),t.l)}function Nu(e,t){var n=f(Ig,{__v:e,i:t});return n.containerInfo=t,n}(Ur.prototype=new Jt).__a=function(e){var t=this,n=ku(t.__v),r=t.o.get(e);return r[0]++,function(s){var i=function(){t.props.revealOrder?(r.push(s),Iu(t,e,r)):s()};n?n(i):i()}},Ur.prototype.render=function(e){this.u=null,this.o=new Map;var t=An(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},Ur.prototype.componentDidUpdate=Ur.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,n){Iu(e,n,t)})};var Tu=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,Ng=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Tg=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Rg=/[A-Z0-9]/g,Mg=typeof document<"u",Pg=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function Ru(e,t,n){return t.__k==null&&(t.textContent=""),Un(e,t),typeof n=="function"&&n(),e?e.__c:null}function Mu(e,t,n){return ta(e,t),typeof n=="function"&&n(),e?e.__c:null}Jt.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(Jt.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var Pu=se.event;function Og(){}function Dg(){return this.cancelBubble}function Fg(){return this.defaultPrevented}se.event=function(e){return Pu&&(e=Pu(e)),e.persist=Og,e.isPropagationStopped=Dg,e.isDefaultPrevented=Fg,e.nativeEvent=e};var ua,Vg={enumerable:!1,configurable:!0,get:function(){return this.class}},Ou=se.vnode;se.vnode=function(e){typeof e.type=="string"&&function(t){var n=t.props,r=t.type,s={};for(var i in n){var o=n[i];if(!(i==="value"&&"defaultValue"in n&&o==null||Mg&&i==="children"&&r==="noscript"||i==="class"||i==="className")){var a=i.toLowerCase();i==="defaultValue"&&"value"in n&&n.value==null?i="value":i==="download"&&o===!0?o="":a==="translate"&&o==="no"?o=!1:a==="ondoubleclick"?i="ondblclick":a!=="onchange"||r!=="input"&&r!=="textarea"||Pg(n.type)?a==="onfocus"?i="onfocusin":a==="onblur"?i="onfocusout":Tg.test(i)?i=a:r.indexOf("-")===-1&&Ng.test(i)?i=i.replace(Rg,"-$&").toLowerCase():o===null&&(o=void 0):a=i="oninput",a==="oninput"&&s[i=a]&&(i="oninputCapture"),s[i]=o}}r=="select"&&s.multiple&&Array.isArray(s.value)&&(s.value=An(n.children).forEach(function(l){l.props.selected=s.value.indexOf(l.props.value)!=-1})),r=="select"&&s.defaultValue!=null&&(s.value=An(n.children).forEach(function(l){l.props.selected=s.multiple?s.defaultValue.indexOf(l.props.value)!=-1:s.defaultValue==l.props.value})),n.class&&!n.className?(s.class=n.class,Object.defineProperty(s,"className",Vg)):(n.className&&!n.class||n.class&&n.className)&&(s.class=s.className=n.className),t.props=s}(e),e.$$typeof=Tu,Ou&&Ou(e)};var Du=se.__r;se.__r=function(e){Du&&Du(e),ua=e.__c};var Fu=se.diffed;se.diffed=function(e){Fu&&Fu(e);var t=e.props,n=e.__e;n!=null&&e.type==="textarea"&&"value"in t&&t.value!==n.value&&(n.value=t.value==null?"":t.value),ua=null};var Vu={ReactCurrentDispatcher:{current:{readContext:function(e){return ua.__n[e.__c].props.value},useCallback:zn,useContext:fn,useDebugValue:ia,useDeferredValue:ma,useEffect:Re,useId:oa,useImperativeHandle:sa,useInsertionEffect:ga,useLayoutEffect:En,useMemo:dt,useReducer:Br,useRef:he,useState:Je,useSyncExternalStore:$a,useTransition:pa}}},Lg="17.0.2";function Lu(e){return f.bind(null,e)}function jr(e){return!!e&&e.$$typeof===Tu}function Bu(e){return jr(e)&&e.type===ve}function Uu(e){return!!e&&!!e.displayName&&(typeof e.displayName=="string"||e.displayName instanceof String)&&e.displayName.startsWith("Memo(")}function da(e){return jr(e)?na.apply(null,arguments):e}function ju(e){return!!e.__k&&(Un(null,e),!0)}function zu(e){return e&&(e.base||e.nodeType===1&&e)||null}var Hu=function(e,t){return e(t)},fa=function(e,t){return e(t)},Wu=ve;function ha(e){e()}function ma(e){return e}function pa(){return[!1,ha]}var ga=En,Gu=jr;function $a(e,t){var n=t(),r=Je({h:{__:n,v:t}}),s=r[0].h,i=r[1];return En(function(){s.__=n,s.v=t,wa(s)&&i({h:s})},[e,n,t]),Re(function(){return wa(s)&&i({h:s}),e(function(){wa(s)&&i({h:s})})},[e]),n}function wa(e){var t,n,r=e.v,s=e.__;try{var i=r();return!((t=s)===(n=i)&&(t!==0||1/t==1/n)||t!=t&&n!=n)}catch{return!0}}var Z={useState:Je,useId:oa,useReducer:Br,useEffect:Re,useLayoutEffect:En,useInsertionEffect:ga,useTransition:pa,useDeferredValue:ma,useSyncExternalStore:$a,startTransition:ha,useRef:he,useImperativeHandle:sa,useMemo:dt,useCallback:zn,useContext:fn,useDebugValue:ia,version:"17.0.2",Children:xu,render:Ru,hydrate:Mu,unmountComponentAtNode:ju,createPortal:Nu,createElement:f,createContext:jn,createFactory:Lu,cloneElement:da,createRef:Jo,Fragment:ve,isValidElement:jr,isElement:Gu,isFragment:Bu,isMemo:Uu,findDOMNode:zu,Component:Jt,PureComponent:ki,memo:bu,forwardRef:Hn,flushSync:fa,unstable_batchedUpdates:Hu,StrictMode:Wu,Suspense:ks,SuspenseList:Ur,lazy:Eu,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Vu};const ya=Object.freeze(Object.defineProperty({__proto__:null,Children:xu,Component:Jt,Fragment:ve,PureComponent:ki,StrictMode:Wu,Suspense:ks,SuspenseList:Ur,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Vu,cloneElement:da,createContext:jn,createElement:f,createFactory:Lu,createPortal:Nu,createRef:Jo,default:Z,findDOMNode:zu,flushSync:fa,forwardRef:Hn,hydrate:Mu,isElement:Gu,isFragment:Bu,isMemo:Uu,isValidElement:jr,lazy:Eu,memo:bu,render:Ru,startTransition:ha,unmountComponentAtNode:ju,unstable_batchedUpdates:Hu,useCallback:zn,useContext:fn,useDebugValue:ia,useDeferredValue:ma,useEffect:Re,useErrorBoundary:xg,useId:oa,useImperativeHandle:sa,useInsertionEffect:ga,useLayoutEffect:En,useMemo:dt,useReducer:Br,useRef:he,useState:Je,useSyncExternalStore:$a,useTransition:pa,version:Lg},Symbol.toStringTag,{value:"Module"})),Bg=e=>{Re(()=>{const t=e();return()=>{t.Dispose()}})},Ug=(e,t)=>{Re(()=>{const n=e();return()=>{n.Dispose()}},t)},jg=e=>{En(()=>{const t=e();return()=>{t.Dispose()}})},v=Z,zg=Bg,qu=Ug,Hg=jg;function Wg(e,t,n,r){const s=v.memo(e,$e(We(Ge(Fn,n),ge())));return Dr(i=>{e.displayName=i},No(t)),i=>{const o=Gg(r,i);return v.createElement(s,o)}}function Gg(e,t){if(e==null)return t;{const n=e;return t.key=n(t),t}}function Es(e){return{Dispose(){e()}}}function Ku(e,t){qu(e,t)}function qg(e){Hg(t=>(e(),Es(()=>{})))}function ba(e){const t=v.useRef(!1);Zg(()=>{t.current||(t.current=!0,e())},[])}function Zu(e){const t=v.useRef(void 0),n=v.useRef(!1),r=v.useRef(!1);n.current&&(r.current=!0),Ku(()=>{let s;return n.current?s=void 0:(n.current=!0,t.current=lt(e()),s=r.current?t.current:void 0),{Dispose(){Dr(i=>{xe(i)},No(s))}}},[])}function Kg(e){zg(t=>(e(),Es(()=>{})))}function Zg(e,t){qu(n=>(e(),Es(()=>{})),t)}function Jg(e,t){const n=We(t,[]);return v.useCallback(e,n)}function Ju(e){return v.useRef(e)}function Yg(e,t,n){return Wg(e,void 0,Io(n),Io(t))}function Xg(e,t){const n=v.createContext(We(t,void 0));return Dr(r=>{n.displayName=r},No(e)),n}function Qg(e,t,n){return v.createElement(e.Provider,{value:t},...n)}function Wn(e){return v.useContext(e)}function Yu(e){const t=Ju(e),n=Jg(r=>t.current(r),[]);return qg(()=>{t.current=e}),n}function Gn(e){return v.useState(e)}class Xu{constructor(t=!1){this._id=0,this._cancelled=t,this._listeners=new Map}get isCancelled(){return this._cancelled}cancel(){if(!this._cancelled){this._cancelled=!0;for(const[,t]of this._listeners)t()}}addListener(t){const n=this._id;return this._listeners.set(this._id++,t),n}removeListener(t){return this._listeners.delete(t)}register(t,n){const r=this,s=this.addListener(n==null?t:()=>t(n));return{Dispose(){r.removeListener(s)}}}Dispose(){}}class Ei extends Error{constructor(){super("The operation was canceled"),Object.setPrototypeOf(this,Ei.prototype)}}class _a{static get maxTrampolineCallCount(){return 2e3}constructor(){this.callCount=0}incrementAndCheck(){return this.callCount++>_a.maxTrampolineCallCount}hijack(t){this.callCount=0,setTimeout(t,0)}}function In(e){return t=>{if(t.cancelToken.isCancelled)t.onCancel(new Ei);else if(t.trampoline.incrementAndCheck())t.trampoline.hijack(()=>{try{e(t)}catch(n){t.onError(ni(n))}});else try{e(t)}catch(n){t.onError(ni(n))}}}function e$(e,t){return In(n=>{e({onSuccess:r=>{try{t(r)(n)}catch(s){n.onError(ni(s))}},onError:n.onError,onCancel:n.onCancel,cancelToken:n.cancelToken,trampoline:n.trampoline})})}function t$(e){return In(t=>t.onSuccess(e))}class n${Bind(t,n){return e$(t,n)}Combine(t,n){return this.Bind(t,()=>n)}Delay(t){return In(n=>t()(n))}For(t,n){const r=t[Symbol.iterator]();let s=r.next();return this.While(()=>!s.done,this.Delay(()=>{const i=n(s.value);return s=r.next(),i}))}Return(t){return t$(t)}ReturnFrom(t){return t}TryFinally(t,n){return In(r=>{t({onSuccess:s=>{n(),r.onSuccess(s)},onError:s=>{n(),r.onError(s)},onCancel:s=>{n(),r.onCancel(s)},cancelToken:r.cancelToken,trampoline:r.trampoline})})}TryWith(t,n){return In(r=>{t({onSuccess:r.onSuccess,onCancel:r.onCancel,cancelToken:r.cancelToken,trampoline:r.trampoline,onError:s=>{try{n(s)(r)}catch(i){r.onError(ni(i))}}})})}Using(t,n){return this.TryFinally(n(t),()=>t.Dispose())}While(t,n){return t()?this.Bind(n,()=>this.While(t,n)):this.Return(void 0)}Zero(){return In(t=>t.onSuccess(void 0))}}const N=new n$;function va(e){}function r$(e){return new Xu(!1)}function s$(e){e.cancel()}function i$(e){return e!=null&&e.isCancelled}const Qu=new Xu;function o$(e){return In(t=>{e({onSuccess:n=>t.onSuccess(p0(n)),onError:n=>t.onSuccess(g0(n)),onCancel:t.onCancel,cancelToken:t.cancelToken,trampoline:t.trampoline})})}function a$(e){return In(t=>e([t.onSuccess,t.onError,t.onCancel]))}function xa(e){return In(t=>{let n;const r=setTimeout(()=>{t.cancelToken.removeListener(n),t.onSuccess(void 0)},e);n=t.cancelToken.addListener(()=>{clearTimeout(r),t.onCancel(new Ei)})})}function l$(e,t){return ed(e,t)}function zr(e,t){return l$(e,t)}function ed(e,t,n,r,s){typeof t!="function"&&(s=t,t=void 0);const i=new _a;e({onSuccess:t||va,onError:n||va,onCancel:r||va,cancelToken:s||Qu,trampoline:i})}function c$(e,t){return new Promise((n,r)=>ed(e,n,r,r,Qu))}class td{constructor(t,n){this.k=t,this.v=n}}function Ii(e,t){return new td(e,t)}function _t(e){return e.k}function Pt(e){return e.v}class Ye extends td{constructor(t,n,r,s,i){super(t,n),this.left=r,this.right=s,this.h=i|0}}function Ni(e,t,n,r,s){return new Ye(e,t,n,r,s)}function vt(e){return e.left}function xt(e){return e.right}function ar(e){return e.h}function Ox(){}function nd(e,t){e:for(;;){const n=e,r=t;if(r!=null){const s=O(r);if(s instanceof Ye){const i=s;e=nd(n+1,vt(i)),t=xt(i);continue e}else return n+1|0}else return n|0}}function u$(e){return nd(0,e)}function Yt(e,t,n,r){let s,i,o;const a=e;if(a!=null){const u=O(a);o=u instanceof Ye?(s=u,ar(s)):1}else o=0;let l;const c=r;if(c!=null){const u=O(c);l=u instanceof Ye?(i=u,ar(i)):1}else l=0;const d=(o<l?l:o)|0;return d===0?Ii(t,n):Ni(t,n,e,r,d+1)}function rd(e,t,n,r){let s,i,o,a,l,c,d,u,m;const h=e;if(h!=null){const w=O(h);m=w instanceof Ye?(s=w,ar(s)):1}else m=0;let p;const g=r;if(g!=null){const w=O(g);p=w instanceof Ye?(i=w,ar(i)):1}else p=0;if(p>m+2){const w=O(r);if(w instanceof Ye){const C=w;if(o=vt(C),(o!=null?(a=O(o),a instanceof Ye?(l=a,ar(l)):1):0)>m+1){const x=O(vt(C));if(x instanceof Ye){const E=x;return Yt(Yt(e,t,n,vt(E)),_t(E),Pt(E),Yt(xt(E),_t(C),Pt(C),xt(C)))}else throw new Error("internal error: Map.rebalance")}else return Yt(Yt(e,t,n,vt(C)),_t(C),Pt(C),xt(C))}else throw new Error("internal error: Map.rebalance")}else if(m>p+2){const w=O(e);if(w instanceof Ye){const C=w;if(c=xt(C),(c!=null?(d=O(c),d instanceof Ye?(u=d,ar(u)):1):0)>p+1){const x=O(xt(C));if(x instanceof Ye){const E=x;return Yt(Yt(vt(C),_t(C),Pt(C),vt(E)),_t(E),Pt(E),Yt(xt(E),t,n,r))}else throw new Error("internal error: Map.rebalance")}else return Yt(vt(C),_t(C),Pt(C),Yt(xt(C),t,n,r))}else throw new Error("internal error: Map.rebalance")}else return Yt(e,t,n,r)}function Hr(e,t,n,r){if(r!=null){const s=O(r),i=e.Compare(t,_t(s))|0;if(s instanceof Ye){const o=s;return i<0?rd(Hr(e,t,n,vt(o)),_t(o),Pt(o),xt(o)):i===0?Ni(t,n,vt(o),xt(o),ar(o)):rd(vt(o),_t(o),Pt(o),Hr(e,t,n,xt(o)))}else return i<0?Ni(t,n,void 0,r,2):i===0?Ii(t,n):Ni(t,n,r,void 0,2)}else return Ii(t,n)}function sd(e,t,n){e:for(;;){const r=e,s=t,i=n;if(i!=null){const o=O(i),a=r.Compare(s,_t(o))|0;if(a===0)return lt(Pt(o));if(o instanceof Ye){const l=o;e=r,t=s,n=a<0?vt(l):xt(l);continue e}else return}else return}}function d$(e,t,n){const r=sd(e,t,n);if(r==null)throw new Error;return O(r)}function f$(e,t,n){e:for(;;){const r=e,s=t,i=n;if(i!=null){const o=O(i),a=r.Compare(s,_t(o))|0;if(o instanceof Ye){const l=o;if(a<0){e=r,t=s,n=vt(l);continue e}else{if(a===0)return!0;e=r,t=s,n=xt(l);continue e}}else return a===0}else return!1}}function id(e,t){e:for(;;){const n=e,r=t;if(r!=null){const s=O(r);if(s instanceof Ye){const i=s;id(n,vt(i)),n(_t(i),Pt(i)),e=n,t=xt(i);continue e}else n(_t(s),Pt(s))}break}}function h$(e,t){id(e,t)}function m$(e,t,n){let r=n;h$((s,i)=>{Nt(t,r,[s,i]),r=r+1|0},e)}function p$(e,t){return vn((n,r)=>Hr(e,r[0],r[1],n),void 0,t)}function g$(e,t,n){e:for(;;){const r=e,s=t,i=n;if(i["System.Collections.IEnumerator.MoveNext"]()){const o=i["System.Collections.Generic.IEnumerator`1.get_Current"]();e=r,t=Hr(r,o[0],o[1],s),n=i;continue e}else return s}}function $$(e,t){let n=void 0;for(let r=0;r<=t.length-1;r++){const s=we(r,t);n=Hr(e,s[0],s[1],n)}return n}function od(e,t){if(un(t))return $$(e,t);if(t instanceof bt)return p$(e,t);{const n=De(t);try{return g$(e,void 0,n)}finally{xe(n)}}}class w$ extends Q{constructor(t,n){super(),this.stack=t,this.started=n}}function ad(e){e:for(;;){const t=e;if(K(t))return je();{const n=_(t),r=V(t);if(r!=null){const s=O(r);if(s instanceof Ye){const i=s;e=Fe([vt(i),Ii(_t(i),Pt(i)),xt(i)],n);continue e}else return t}else{e=n;continue e}}}}function ld(e){return new w$(ad(ee(e)),!1)}function y$(){throw new Error("enumeration not started")}function b$(){throw new Error("enumeration already finished")}function cd(e){if(e.started){const t=e.stack;if(K(t))return b$();if(V(t)!=null){const n=O(V(t));if(n instanceof Ye)throw new Error("Please report error: Map iterator, unexpected stack for current");return[_t(n),Pt(n)]}else throw new Error("Please report error: Map iterator, unexpected stack for current")}else return y$()}function _$(e){if(e.started){const t=e.stack;if(K(t))return!1;if(V(t)!=null){if(O(V(t))instanceof Ye)throw new Error("Please report error: Map iterator, unexpected stack for moveNext");return e.stack=ad(_(t)),!K(e.stack)}else throw new Error("Please report error: Map iterator, unexpected stack for moveNext")}else return e.started=!0,!K(e.stack)}function ud(e){let t=ld(e);return{"System.Collections.Generic.IEnumerator`1.get_Current"(){return cd(t)},"System.Collections.IEnumerator.get_Current"(){return cd(t)},"System.Collections.IEnumerator.MoveNext"(){return _$(t)},"System.Collections.IEnumerator.Reset"(){t=ld(e)},Dispose(){}}}class Ti{constructor(t,n){this.comparer=t,this.tree=n}GetHashCode(){return S$(this)|0}Equals(t){const n=this;if(t instanceof Ti){const r=t,s=De(n);try{const i=De(r);try{const o=()=>{const a=s["System.Collections.IEnumerator.MoveNext"]();if(a===i["System.Collections.IEnumerator.MoveNext"]())if(a){const l=s["System.Collections.Generic.IEnumerator`1.get_Current"](),c=i["System.Collections.Generic.IEnumerator`1.get_Current"]();return Ce(l[0],c[0])&&Ce(l[1],c[1])?o():!1}else return!0;else return!1};return o()}finally{xe(i)}}finally{xe(s)}}else return!1}toString(){return"map ["+ne("; ",Le(n=>rc("({0}, {1})",n[0],n[1]),this))+"]"}get[Symbol.toStringTag](){return"FSharpMap"}toJSON(){const t=this;return Array.from(t)}GetEnumerator(){return ud(this.tree)}[Symbol.iterator](){return us(De(this))}"System.Collections.IEnumerable.GetEnumerator"(){return ud(this.tree)}CompareTo(t){const n=this;if(t instanceof Ti)return i0((s,i)=>{const o=n.comparer.Compare(s[0],i[0])|0;return(o!==0?o:Bt(s[1],i[1]))|0},n,t)|0;throw new Error("not comparable\\nParameter name: obj")}"System.Collections.Generic.ICollection`1.Add2B595"(t){throw new Error("Map cannot be mutated")}"System.Collections.Generic.ICollection`1.Clear"(){throw new Error("Map cannot be mutated")}"System.Collections.Generic.ICollection`1.Remove2B595"(t){throw new Error("Map cannot be mutated")}"System.Collections.Generic.ICollection`1.Contains2B595"(t){const n=this;return fd(n,t[0])&&Ce(dd(n,t[0]),t[1])}"System.Collections.Generic.ICollection`1.CopyToZ3B4C077E"(t,n){m$(this.tree,t,n)}"System.Collections.Generic.ICollection`1.get_IsReadOnly"(){return!0}"System.Collections.Generic.ICollection`1.get_Count"(){return Ca(this)|0}"System.Collections.Generic.IReadOnlyCollection`1.get_Count"(){return Ca(this)|0}get size(){return Ca(this)|0}clear(){throw new Error("Map cannot be mutated")}delete(t){throw new Error("Map cannot be mutated")}entries(){return Le(n=>[n[0],n[1]],this)}get(t){return dd(this,t)}has(t){return fd(this,t)}keys(){return Le(n=>n[0],this)}set(t,n){throw new Error("Map cannot be mutated")}values(){return Le(n=>n[1],this)}forEach(t,n){const r=this;Dr(s=>{t(s[1],s[0],r)},r)}}function Ri(e,t){return new Ti(e,t)}function v$(e){return Ri(e,void 0)}function x$(e,t,n){return Ri(e.comparer,Hr(e.comparer,t,n,e.tree))}function dd(e,t){return d$(e.comparer,t,e.tree)}function Ca(e){return u$(e.tree)}function fd(e,t){return f$(e.comparer,t,e.tree)}function C$(e,t){return sd(e.comparer,t,e.tree)}function S$(e){const t=(s,i)=>(s<<1)+i+631;let n=0;const r=De(e);try{for(;r["System.Collections.IEnumerator.MoveNext"]();){const s=r["System.Collections.Generic.IEnumerator`1.get_Current"]();n=t(n,bn(s[0]))|0,n=t(n,bn(s[1]))|0}}finally{xe(r)}return n|0}function hd(e,t,n){return x$(n,e,t)}function md(e,t){return C$(t,e)}function A$(e,t){return Ri(t,od(t,e))}function k$(e,t){return Ri(t,od(t,e))}function Sa(e){return v$(e)}class ie extends j{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["HasNotStartedYet","InProgress","Resolved","Failed"]}}function pd(e,t){const n=Ju(r$());return Zu(()=>Es(()=>{s$(n.current)})),Yu(r=>{i$(n.current)||zr(N.Delay(()=>N.TryWith(N.Delay(()=>(t(new ie(1,[])),N.Bind(e(r),s=>(t(new ie(2,[s])),N.Zero())))),s=>(t(new ie(3,[s])),N.Zero()))),n.current)})}class E${constructor(t,n,r){this.OnNext=t,this.OnError=n||(s=>{}),this.OnCompleted=r||(()=>{})}}function I$(e,t){t.Subscribe(new E$(e))}class N${constructor(){this.delegates=[]}_add(t){this.delegates.push(t)}_remove(t){const n=this.delegates.indexOf(t);n>-1&&this.delegates.splice(n,1)}get Publish(){return R$(t=>{this._add(t)},t=>{this._remove(t)})}Trigger(t,n){let r=null;const s=n===void 0?t:(r=t,n);this.delegates.forEach(i=>{i(r,s)})}}let T$=class extends N${};function R$(e,t){return{AddHandler(n){e(n)},RemoveHandler(n){t(n)},Subscribe(n){const r=(s,i)=>n.OnNext(i);return e(r),{Dispose(){t(r)}}}}}class M${constructor(t){this._enabled=!1,this._isDisposed=!1,this._intervalId=0,this._timeoutId=0,this.Interval=t&&t>0?t:100,this.AutoReset=!0,this._elapsed=new T$}Elapsed(){return this._elapsed.Publish}get Enabled(){return this._enabled}set Enabled(t){!this._isDisposed&&this._enabled!==t&&(this._enabled=t,this._enabled?this.AutoReset?this._intervalId=setInterval(()=>{this.AutoReset||(this.Enabled=!1),this._elapsed.Trigger(new Date)},this.Interval):this._timeoutId=setTimeout(()=>{this.Enabled=!1,this._timeoutId=0,this.AutoReset&&(this.Enabled=!0),this._elapsed.Trigger(new Date)},this.Interval):(this._timeoutId&&(clearTimeout(this._timeoutId),this._timeoutId=0),this._intervalId&&(clearInterval(this._intervalId),this._intervalId=0)))}Dispose(){this.Enabled=!1,this._isDisposed=!0}Close(){this.Dispose()}Start(){this.Enabled=!0}Stop(){this.Enabled=!1}}function P$(e,t){console.error(lt(e),t)}function O$(e,t){let n,r=new M$(e);r.AutoReset=!1,n=r,I$(t,n.Elapsed()),n.Enabled=!0,n.Start()}function gd(e,t,n){pi(r=>{try{r(t)}catch(s){e(s)}},n)}function le(){return je()}function Xe(e){return ee(e)}function Is(e,t,n,r){return ee(s=>{e(N.Delay(()=>N.Bind(o$(t(n)),i=>{const o=i;return o.tag===0&&s(r(o.fields[0])),N.Zero()})))})}function Ns(e){O$(1,t=>{zr(e)})}function Ts(e,t){if(t.indexOf(e)===0)return t}function $d(e,t){if(Xm(t,e))return t}function D$(e){return t=>{let n,r,s,i,o,a;return n=Ts("/",t),n!=null?(r=n,"#"+r):(s=Ts("#/",t),s!=null?(i=s,i):(o=Ts("#",t),o!=null?(a=o,"#/"+ic(a,1,a.length-1)):"#/"+t))}}function lr(e,t){return D$()(ne("/",nr(n=>n.indexOf("?")>=0||n.indexOf("#")===0||n.indexOf("/")===0?n:encodeURIComponent(n),e)))}function ft(e,t,n){history.pushState(void 0,"",lr(e));const r=document.createEvent("CustomEvent");r.initEvent("CUSTOM_NAVIGATION_EVENT",!0,!0),window.dispatchEvent(r)}function wd(e,t){return pp(n=>{if(sc(n))return je();{const r=tp(n,"#");if(r==="?")return je();if(Ts("?",r)!=null)return ee(r);{const s=r.split("?");if(!Ro((i,o)=>i===o,s)&&s.length===1){const i=we(0,s);return ee(decodeURIComponent(i))}else if(!Ro((i,o)=>i===o,s)&&s.length===2)if(we(1,s)===""){const i=we(0,s);return ee(decodeURIComponent(i))}else{const i=we(0,s),o=we(1,s);return y([decodeURIComponent(i),"?"+o])}else return je()}}},y(Eo(Ts("#",e)!=null?ic(e,1,e.length-1):t===1&&($d("#",e)!=null||$d("#/",e)!=null)?"":e,["/"],void 0,0)))}function F$(e,t,n){return t(wd(e===2?window.location.pathname+window.location.search:window.location.hash,e))}const V$=Yg(e=>{const t=Yu(r=>{const s=We(e.onUrlChanged,i=>{});F$(We(e.hashMode,1),s)});Zu(()=>(window.navigator.userAgent.indexOf("Trident")>=0||window.navigator.userAgent.indexOf("MSIE")>=0?window.addEventListener("hashchange",t):window.addEventListener("popstate",t),window.addEventListener("CUSTOM_NAVIGATION_EVENT",t),Es(()=>{window.navigator.userAgent.indexOf("Trident")>=0||window.navigator.userAgent.indexOf("MSIE")>=0?window.removeEventListener("hashchange",t):window.removeEventListener("popstate",t),window.removeEventListener("CUSTOM_NAVIGATION_EVENT",t)}))),ba(()=>{const r=document.createEvent("CustomEvent");r.initEvent("CUSTOM_NAVIGATION_EVENT",!0,!0),window.dispatchEvent(r)});const n=e.application;return n??ge()});class Nn extends j{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["AccountId","Name"]}}class cr extends j{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Asc","Desc"]}}function yd(e){return e.tag===0?new cr(1,[]):new cr(0,[])}class Rs extends j{constructor(t,n){super(),this.tag=0,this.fields=[t,n]}cases(){return["Sort"]}}const L$=new Rs(new Nn(1,[]),new cr(0,[]));function B$(e){return[e.fields[0],e.fields[1]]}function bd(e){return e.fields[0]}function _d(e){return e.fields[1]}function vd(e,t){const n=t.fields[0],r=t.fields[1];return e.tag===1?n.tag===1?new Rs(new Nn(1,[]),yd(r)):new Rs(new Nn(1,[]),new cr(0,[])):n.tag===0?new Rs(new Nn(0,[]),yd(r)):new Rs(new Nn(0,[]),new cr(0,[]))}class xd extends j{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["SearchText"]}}const U$=new xd("");function j$(e){return new xd(e)}function Cd(e){return e.fields[0]}class z$ extends j{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["PageSize"]}}function H$(e){return new z$(e)}function Sd(e){return e.fields[0]}class Aa extends Q{constructor(t,n,r){super(),this.SearchText=t,this.Sort=n,this.PageSize=r}}class W$ extends j{constructor(t,n){super(),this.tag=0,this.fields=[t,n]}cases(){return["AccountKey"]}}function Ad(e){return[e.fields[0],e.fields[1]]}function G$(e,t){return new W$(e,t)}function q$(e){const t=Ad(e);return[t[0],t[1]]}function K$(){return new f0([],{Equals:Ce,GetHashCode:um})}function kd(e,t){let n,r=ge();if(n=[bc(e,t,new yt(()=>r,s=>{r=s})),r],n[0])return n[1]}function ka(e,t,n){return e.set(t,n),e}class Z$ extends Q{constructor(t,n,r,s,i,o){super(),this.StreamId=t,this.Name=n,this.Website=r,this.ContactDetails=s,this.Notes=i,this.AccountProvisioningMode=o}}function J$(e){const t=zo(e.Name);if(t.tag===1)return new $(1,[t.fields[0]]);{const n=Nc(e.Website);if(n.tag===1)return new $(1,[n.fields[0]]);{let r;const s=e.ContactDetails;if(s!=null){const i=B0(s);r=i.tag===1?new $(1,[i.fields[0]]):new $(0,[i.fields[0]])}else r=new $(0,[void 0]);return r.tag===1?new $(1,[r.fields[0]]):new $(0,[new Z$(new Ec(e.StreamId),t.fields[0],n.fields[0],r.fields[0],U0(e.Notes),e.AccountProvisioningMode)])}}}function Ea(e,t){return wp(n=>Fr(n.StreamId)===gi(t),e)}class q extends j{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["PartnerList","Partner","PartnerProfilesDirectory","PartnerAccountList","PartnerSuperConfiguration","PartnerBenefitsOnboardingConfiguration","PartnerBankDetailsConfiguration","PartnerWorkspace","Account","AccountProfilesDirectory","AccountUsers","AccountSuperConfiguration","AccountBenefitsOnboardingConfiguration","AccountBankDetailsConfiguration","AccountSalaryPackagingConfiguration","AccountWorkspace","AccountHrisMigration","NotFound"]}}function Ed(e){let t,n,r,s,i,o,a,l,c,d,u,m,h,p,g,w,C,x,E,D,L,X,pe,Se,de,Y;if(K(e))t=17;else if(V(e)==="account-registry")if(K(_(e)))t=17;else if(V(_(e))==="partners")if(K(_(_(e))))t=0;else if(K(_(_(_(e)))))t=1,n=V(_(_(e)));else switch(V(_(_(_(e))))){case"accounts":{if(K(_(_(_(_(e))))))t=2,r=V(_(_(e)));else if(K(_(_(_(_(_(e)))))))t=8,c=V(_(_(_(_(e))))),d=V(_(_(e)));else switch(V(_(_(_(_(_(e))))))){case"directory":{K(_(_(_(_(_(_(e)))))))?(t=9,u=V(_(_(_(_(e))))),m=V(_(_(e)))):t=17;break}case"users":{K(_(_(_(_(_(_(e)))))))?(t=10,h=V(_(_(_(_(e))))),p=V(_(_(e)))):t=17;break}case"super-configuration":{K(_(_(_(_(_(_(e)))))))?(t=11,g=V(_(_(_(_(e))))),w=V(_(_(e)))):t=17;break}case"benefits-onboarding-configuration":{K(_(_(_(_(_(_(e)))))))?(t=12,C=V(_(_(_(_(e))))),x=V(_(_(e)))):t=17;break}case"bank-details-configuration":{K(_(_(_(_(_(_(e)))))))?(t=13,E=V(_(_(_(_(e))))),D=V(_(_(e)))):t=17;break}case"salary-packaging-configuration":{K(_(_(_(_(_(_(e)))))))?(t=14,L=V(_(_(_(_(e))))),X=V(_(_(e)))):t=17;break}case"workspace":{K(_(_(_(_(_(_(e)))))))?(t=15,pe=V(_(_(_(_(e))))),Se=V(_(_(e)))):t=17;break}case"hris-migration":{K(_(_(_(_(_(_(e)))))))?(t=16,de=V(_(_(_(_(e))))),Y=V(_(_(e)))):t=17;break}default:t=17}break}case"super-configuration":{K(_(_(_(_(e)))))?(t=3,s=V(_(_(e)))):t=17;break}case"benefits-onboarding-configuration":{K(_(_(_(_(e)))))?(t=4,i=V(_(_(e)))):t=17;break}case"directory":{K(_(_(_(_(e)))))?(t=5,o=V(_(_(e)))):t=17;break}case"bank-details-configuration":{K(_(_(_(_(e)))))?(t=6,a=V(_(_(e)))):t=17;break}case"workspace":{K(_(_(_(_(e)))))?(t=7,l=V(_(_(e)))):t=17;break}default:t=17}else t=17;else t=17;switch(t){case 0:return new q(0,[]);case 1:return new q(1,[Ve(n)]);case 2:return new q(3,[Ve(r)]);case 3:return new q(4,[Ve(s)]);case 4:return new q(5,[Ve(i)]);case 5:return new q(2,[Ve(o)]);case 6:return new q(6,[Ve(a)]);case 7:return new q(7,[Ve(l)]);case 8:return new q(8,[Ve(d),Rt(c)]);case 9:return new q(9,[Ve(m),Rt(u)]);case 10:return new q(10,[Ve(p),Rt(h)]);case 11:return new q(11,[Ve(w),Rt(g)]);case 12:return new q(12,[Ve(x),Rt(C)]);case 13:return new q(13,[Ve(D),Rt(E)]);case 14:return new q(14,[Ve(X),Rt(L)]);case 15:return new q(15,[Ve(Se),Rt(pe)]);case 16:return new q(16,[Ve(Y),Rt(de)]);default:return new q(17,[])}}function Ms(e){const t=(r,s)=>ae(k(()=>R(A("account-registry"),k(()=>R(A("partners"),k(()=>R(A(ut(r)),k(()=>s)))))))),n=(r,s,i)=>{const o=ae(k(()=>R(A("accounts"),k(()=>R(A(dn(s)),k(()=>i))))));return t(r,o)};switch(e.tag){case 3:return t(e.fields[0],["accounts"]);case 4:return t(e.fields[0],["super-configuration"]);case 5:return t(e.fields[0],["benefits-onboarding-configuration"]);case 6:return t(e.fields[0],["bank-details-configuration"]);case 2:return t(e.fields[0],["directory"]);case 7:return t(e.fields[0],["workspace"]);case 8:return n(e.fields[0],e.fields[1],[]);case 9:return n(e.fields[0],e.fields[1],["directory"]);case 10:return n(e.fields[0],e.fields[1],["users"]);case 11:return n(e.fields[0],e.fields[1],["super-configuration"]);case 12:return n(e.fields[0],e.fields[1],["benefits-onboarding-configuration"]);case 13:return n(e.fields[0],e.fields[1],["bank-details-configuration"]);case 14:return n(e.fields[0],e.fields[1],["salary-packaging-configuration"]);case 15:return n(e.fields[0],e.fields[1],["workspace"]);case 16:return n(e.fields[0],e.fields[1],["hris-migration"]);case 17:case 0:return y(["account-registry","partners"]);default:return t(e.fields[0],[])}}function Ia(e){switch(e.tag){case 3:{const t=["account-registry","partners",ut(e.fields[0]),"accounts"];return Xe(n=>{ft(y(t))})}case 4:{const t=["account-registry","partners",ut(e.fields[0]),"super-configuration"];return Xe(n=>{ft(y(t))})}case 5:{const t=["account-registry","partners",ut(e.fields[0]),"benefits-onboarding-configuration"];return Xe(n=>{ft(y(t))})}case 6:{const t=["account-registry","partners",ut(e.fields[0]),"bank-details-configuration"];return Xe(n=>{ft(y(t))})}case 2:{const t=["account-registry","partners",ut(e.fields[0]),"directory"];return Xe(n=>{ft(y(t))})}case 7:{const t=["account-registry","partners",ut(e.fields[0]),"workspace"];return Xe(n=>{ft(y(t))})}case 8:{const t=["account-registry","partners",ut(e.fields[0]),"accounts",dn(e.fields[1])];return Xe(n=>{ft(y(t))})}case 9:{const t=["account-registry","partners",ut(e.fields[0]),"accounts",dn(e.fields[1]),"directory"];return Xe(n=>{ft(y(t))})}case 10:{const t=["account-registry","partners",ut(e.fields[0]),"accounts",dn(e.fields[1]),"users"];return Xe(n=>{ft(y(t))})}case 11:{const t=["account-registry","partners",ut(e.fields[0]),"accounts",dn(e.fields[1]),"super-configuration"];return Xe(n=>{ft(y(t))})}case 12:{const t=["account-registry","partners",ut(e.fields[0]),"accounts",dn(e.fields[1]),"benefits-onboarding-configuration"];return Xe(n=>{ft(y(t))})}case 13:{const t=["account-registry","partners",ut(e.fields[0]),"accounts",dn(e.fields[1]),"bank-details-configuration"];return Xe(n=>{ft(y(t))})}case 14:{const t=["account-registry","partners",ut(e.fields[0]),"accounts",dn(e.fields[1]),"salary-packaging-configuration"];return Xe(n=>{ft(y(t))})}case 15:{const t=["account-registry","partners",ut(e.fields[0]),"accounts",dn(e.fields[1]),"workspace"];return Xe(n=>{ft(y(t))})}case 16:{const t=["account-registry","partners",ut(e.fields[0]),"accounts",dn(e.fields[1]),"hris-migration"];return Xe(n=>{ft(y(t))})}case 0:case 17:return le();default:{const t=["account-registry","partners",ut(e.fields[0])];return Xe(n=>{ft(y(t))})}}}function Y$(e,t){switch(t.tag){case 1:return new ie(1,[]);case 2:return t.fields[0].tag===1?new ie(2,[new $(1,[t.fields[0].fields[0]])]):new ie(2,[new $(0,[e(t.fields[0].fields[0])])]);case 3:return new ie(3,[t.fields[0]]);default:return new ie(0,[])}}class Id extends Q{constructor(t,n){super(),this.Name=t,this.LegalEntity=n}}class Nd extends Q{constructor(t,n){super(),this.BusinessName=t,this.BusinessNumber=n}}class Td extends Q{constructor(t,n){super(),this.ReadProtectedData=t,this.ProvisionAccounts=n}}function Rd(e){return new Td(hc("AccountRegistry.ReadProtectedData",e.Roles,{Equals:(t,n)=>t===n,GetHashCode:Ar}),hc("AccountRegistry.ProvisionAccounts",e.Roles,{Equals:(t,n)=>t===n,GetHashCode:Ar}))}const Md=new Td(!1,!1);class W extends j{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["BadPrimitive","BadPrimitiveExtra","BadType","BadField","BadPath","TooSmallArray","FailMessage","BadOneOf"]}}class pt extends j{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["PascalCase","CamelCase","SnakeCase"]}}function Pd(e){return e.slice(void 0,1).toLowerCase()+e.slice(1,e.length)}function Od(e,t){switch(e.tag){case 2:return Zm(Pd(t),"[A-Z]","_$0").toLowerCase();case 0:return t;default:return Pd(t)}}function Dd(e,t){X$(t);const n=new Date(e);return n.offset=t??new Date().getTimezoneOffset()*-6e4,n}function X$(e){if(e!=null&&e!==0){if(e%6e4!==0)throw new Error("Offset must be specified in whole minutes.");if(Math.abs(e/36e5)>14)throw new Error("Offset must be within plus or minus 14 hours.")}}function Q$(){return Dd(-621355968e5,0)}function e1(e){const[t,n]=Hl(e),r=n==null?t.getTimezoneOffset()*-6e4:n==="Z"?0:n*6e4;return Dd(t.getTime(),r)}function t1(e,t){try{return t.contents=e1(e),!0}catch{return!1}}function Ps(e){return e<0?Math.ceil(e):Math.floor(e)}function Fd(e=0,t=0,n=0,r=0,s=0){switch(arguments.length){case 1:return n1(arguments[0]);case 3:e=0,t=arguments[0],n=arguments[1],r=arguments[2],s=0;break}return e*864e5+t*36e5+n*6e4+r*1e3+s}function n1(e){return Number(BigInt(e)/10000n)}function r1(e){return Ps(e/864e5)}function s1(e){return Ps(e%864e5/36e5)}function i1(e){return Ps(e%36e5/6e4)}function o1(e){return Ps(e%6e4/1e3)}function a1(e){return Ps(e%1e3)}function l1(e,t="c",n){if(["c","g","G"].indexOf(t)===-1)throw new Error("Custom formats are not supported");const r=Math.abs(r1(e)),s=Math.abs(s1(e)),i=Math.abs(i1(e)),o=Math.abs(o1(e)),a=Math.abs(a1(e));return`${e<0?"-":""}${r===0&&(t==="c"||t==="g")?"":t==="c"?r+".":r+":"}${t==="g"?s:_e(s,2)}:${_e(i,2)}:${_e(o,2)}${a===0&&(t==="c"||t==="g")?"":t==="g"?"."+_e(a,3):"."+sm(a,3,7)}`}function c1(e){const t=e.search("\\."),n=e.search("\\:");if(t===-1&&n===-1){const r=parseInt(e,0);if(isNaN(r))throw new Error(`String '${e}' was not recognized as a valid TimeSpan.`);return Fd(r,0,0,0,0)}if(n>0){const r=/^(-?)((\d+)\.)?(?:0*)([0-9]|0[0-9]|1[0-9]|2[0-3]):(?:0*)([0-5][0-9]|[0-9])(:(?:0*)([0-5][0-9]|[0-9]))?\.?(\d+)?$/.exec(e);if(r!=null&&r[4]!=null&&r[5]!=null){let s=0,i=0,o=0;const a=r[1]!=null&&r[1]==="-"?-1:1,l=+r[4],c=+r[5];if(r[3]!=null&&(s=+r[3]),r[7]!=null&&(o=+r[7]),r[8]!=null)switch(r[8].length){case 1:i=+r[8]*100;break;case 2:i=+r[8]*10;break;case 3:i=+r[8];break;case 4:i=+r[8]/10;break;case 5:i=+r[8]/100;break;case 6:i=+r[8]/1e3;break;case 7:i=+r[8]/1e4;break;default:throw new Error(`String '${e}' was not recognized as a valid TimeSpan.`)}return a*Fd(s,l,c,o,i)}}throw new Error(`String '${e}' was not recognized as a valid TimeSpan.`)}function u1(e,t){try{return t.contents=c1(e),!0}catch{return!1}}class Vd{constructor(t){this.k=t}}function Ot(e){return new Vd(e)}function te(e){return e.k}class be extends Vd{constructor(t,n,r,s){super(t),this.left=n,this.right=r,this.h=s|0}}function Dt(e,t,n,r){return new be(e,t,n,r)}function Me(e){return e.left}function Ee(e){return e.right}function Wr(e){return e.h}function Dx(){}function Ld(e,t){e:for(;;){const n=e,r=t;if(n!=null){const s=O(n);if(s instanceof be){const i=s;e=Me(i),t=Ld(Ee(i),r+1);continue e}else return r+1|0}else return r|0}}function d1(e){return Ld(e,0)}function Xt(e,t,n){let r,s,i;const o=e;if(o!=null){const d=O(o);i=d instanceof be?(r=d,Wr(r)):1}else i=0;let a;const l=n;if(l!=null){const d=O(l);a=d instanceof be?(s=d,Wr(s)):1}else a=0;const c=(i<a?a:i)|0;return c===0?Ot(t):Dt(t,e,n,c+1)}function Bd(e,t,n){let r,s,i,o,a,l,c,d,u;const m=e;if(m!=null){const g=O(m);u=g instanceof be?(r=g,Wr(r)):1}else u=0;let h;const p=n;if(p!=null){const g=O(p);h=g instanceof be?(s=g,Wr(s)):1}else h=0;if(h>u+2){const g=O(n);if(g instanceof be){const w=g;if(i=Me(w),(i!=null?(o=O(i),o instanceof be?(a=o,Wr(a)):1):0)>u+1){const C=O(Me(w));if(C instanceof be){const x=C;return Xt(Xt(e,t,Me(x)),te(x),Xt(Ee(x),te(w),Ee(w)))}else throw new Error("internal error: Set.rebalance")}else return Xt(Xt(e,t,Me(w)),te(w),Ee(w))}else throw new Error("internal error: Set.rebalance")}else if(u>h+2){const g=O(e);if(g instanceof be){const w=g;if(l=Ee(w),(l!=null?(c=O(l),c instanceof be?(d=c,Wr(d)):1):0)>h+1){const C=O(Ee(w));if(C instanceof be){const x=C;return Xt(Xt(Me(w),te(w),Me(x)),te(x),Xt(Ee(x),t,n))}else throw new Error("internal error: Set.rebalance")}else return Xt(Me(w),te(w),Xt(Ee(w),t,n))}else throw new Error("internal error: Set.rebalance")}else return Xt(e,t,n)}function Gr(e,t,n){if(n!=null){const r=O(n),s=e.Compare(t,te(r))|0;if(r instanceof be){const i=r;return s<0?Bd(Gr(e,t,Me(i)),te(i),Ee(i)):s===0?n:Bd(Me(i),te(i),Gr(e,t,Ee(i)))}else{const i=e.Compare(t,te(r))|0;return i<0?Dt(t,void 0,n,2):i===0?n:Dt(t,n,void 0,2)}}else return Ot(t)}function Ud(e,t,n){e:for(;;){const r=e,s=t,i=n;if(i!=null){const o=O(i),a=r.Compare(s,te(o))|0;if(o instanceof be){const l=o;if(a<0){e=r,t=s,n=Me(l);continue e}else{if(a===0)return!0;e=r,t=s,n=Ee(l);continue e}}else return a===0}else return!1}}function jd(e,t){e:for(;;){const n=e,r=t;if(r!=null){const s=O(r);if(s instanceof be){const i=s;jd(n,Me(i)),n(te(i)),e=n,t=Ee(i);continue e}else n(te(s))}break}}class f1 extends Q{constructor(t,n){super(),this.stack=t,this.started=n}}function zd(e){e:for(;;){const t=e;if(K(t))return je();{const n=V(t),r=_(t);if(n!=null){const s=O(n);if(s instanceof be){const i=s;e=Fe([Me(i),Ot(te(i)),Ee(i)],r);continue e}else return t}else{e=r;continue e}}}}function Hd(e){return new f1(zd(ee(e)),!1)}function h1(){throw new Error("Enumeration not started")}function m1(){throw new Error("Enumeration already started")}function Wd(e){if(e.started){const t=e.stack;if(K(t))return m1();if(V(t)!=null){const n=O(V(t));return te(n)}else throw new Error("Please report error: Set iterator, unexpected stack for current")}else return h1()}function p1(e){if(e.started){const t=e.stack;if(K(t))return!1;if(V(t)!=null){if(O(V(t))instanceof be)throw new Error("Please report error: Set iterator, unexpected stack for moveNext");return e.stack=zd(_(t)),!K(e.stack)}else throw new Error("Please report error: Set iterator, unexpected stack for moveNext")}else return e.started=!0,!K(e.stack)}function Gd(e){let t=Hd(e);return{"System.Collections.Generic.IEnumerator`1.get_Current"(){return Wd(t)},"System.Collections.IEnumerator.get_Current"(){return Wd(t)},"System.Collections.IEnumerator.MoveNext"(){return p1(t)},"System.Collections.IEnumerator.Reset"(){t=Hd(e)},Dispose(){}}}function g1(e,t,n){e:for(;;){const r=e,s=t,i=n;if(K(s))return K(i)?0:-1;if(K(i))return 1;if(V(i)!=null)if(V(s)!=null){const o=O(V(s)),a=O(V(i));if(o instanceof be){const l=o;if(Me(l)==null)if(a instanceof be){const c=a;if(Me(c)==null){const d=r.Compare(te(l),te(c))|0;if(d!==0)return d|0;e=r,t=Tt(Ee(l),_(s)),n=Tt(Ee(c),_(i));continue e}else{let d,u,m,h,p;switch(K(s)?K(i)?d=2:V(i)!=null?(d=1,h=_(i),p=O(V(i))):d=2:V(s)!=null?(d=0,u=_(s),m=O(V(s))):K(i)?d=2:V(i)!=null?(d=1,h=_(i),p=O(V(i))):d=2,d){case 0:if(m instanceof be){const g=m;e=r,t=Fe([Me(g),Dt(te(g),void 0,Ee(g),0)],u),n=i;continue e}else{e=r,t=Fe([void 0,Ot(te(m))],u),n=i;continue e}case 1:if(p instanceof be){const g=p;e=r,t=s,n=Fe([Me(g),Dt(te(g),void 0,Ee(g),0)],h);continue e}else{e=r,t=s,n=Fe([void 0,Ot(te(p))],h);continue e}default:throw new Error("unexpected state in SetTree.compareStacks")}}}else{const c=r.Compare(te(l),te(a))|0;if(c!==0)return c|0;e=r,t=Tt(Ee(l),_(s)),n=Tt(void 0,_(i));continue e}else{let c,d,u,m,h;switch(K(s)?K(i)?c=2:V(i)!=null?(c=1,m=_(i),h=O(V(i))):c=2:V(s)!=null?(c=0,d=_(s),u=O(V(s))):K(i)?c=2:V(i)!=null?(c=1,m=_(i),h=O(V(i))):c=2,c){case 0:if(u instanceof be){const p=u;e=r,t=Fe([Me(p),Dt(te(p),void 0,Ee(p),0)],d),n=i;continue e}else{e=r,t=Fe([void 0,Ot(te(u))],d),n=i;continue e}case 1:if(h instanceof be){const p=h;e=r,t=s,n=Fe([Me(p),Dt(te(p),void 0,Ee(p),0)],m);continue e}else{e=r,t=s,n=Fe([void 0,Ot(te(h))],m);continue e}default:throw new Error("unexpected state in SetTree.compareStacks")}}}else if(a instanceof be){const l=a;if(Me(l)==null){const c=r.Compare(te(o),te(l))|0;if(c!==0)return c|0;e=r,t=Tt(void 0,_(s)),n=Tt(Ee(l),_(i));continue e}else{let c,d,u,m,h;switch(K(s)?K(i)?c=2:V(i)!=null?(c=1,m=_(i),h=O(V(i))):c=2:V(s)!=null?(c=0,d=_(s),u=O(V(s))):K(i)?c=2:V(i)!=null?(c=1,m=_(i),h=O(V(i))):c=2,c){case 0:if(u instanceof be){const p=u;e=r,t=Fe([Me(p),Dt(te(p),void 0,Ee(p),0)],d),n=i;continue e}else{e=r,t=Fe([void 0,Ot(te(u))],d),n=i;continue e}case 1:if(h instanceof be){const p=h;e=r,t=s,n=Fe([Me(p),Dt(te(p),void 0,Ee(p),0)],m);continue e}else{e=r,t=s,n=Fe([void 0,Ot(te(h))],m);continue e}default:throw new Error("unexpected state in SetTree.compareStacks")}}}else{const l=r.Compare(te(o),te(a))|0;if(l!==0)return l|0;e=r,t=_(s),n=_(i);continue e}}else{O(V(i));let o,a,l,c,d;switch(K(s)?K(i)?o=2:V(i)!=null?(o=1,c=_(i),d=O(V(i))):o=2:V(s)!=null?(o=0,a=_(s),l=O(V(s))):K(i)?o=2:V(i)!=null?(o=1,c=_(i),d=O(V(i))):o=2,o){case 0:if(l instanceof be){const u=l;e=r,t=Fe([Me(u),Dt(te(u),void 0,Ee(u),0)],a),n=i;continue e}else{e=r,t=Fe([void 0,Ot(te(l))],a),n=i;continue e}case 1:if(d instanceof be){const u=d;e=r,t=s,n=Fe([Me(u),Dt(te(u),void 0,Ee(u),0)],c);continue e}else{e=r,t=s,n=Fe([void 0,Ot(te(d))],c);continue e}default:throw new Error("unexpected state in SetTree.compareStacks")}}else if(V(s)!=null){O(V(s));let o,a,l,c,d;switch(K(s)?K(i)?o=2:V(i)!=null?(o=1,c=_(i),d=O(V(i))):o=2:V(s)!=null?(o=0,a=_(s),l=O(V(s))):K(i)?o=2:V(i)!=null?(o=1,c=_(i),d=O(V(i))):o=2,o){case 0:if(l instanceof be){const u=l;e=r,t=Fe([Me(u),Dt(te(u),void 0,Ee(u),0)],a),n=i;continue e}else{e=r,t=Fe([void 0,Ot(te(l))],a),n=i;continue e}case 1:if(d instanceof be){const u=d;e=r,t=s,n=Fe([Me(u),Dt(te(u),void 0,Ee(u),0)],c);continue e}else{e=r,t=s,n=Fe([void 0,Ot(te(d))],c);continue e}default:throw new Error("unexpected state in SetTree.compareStacks")}}else{e=r,t=_(s),n=_(i);continue e}}}function qd(e,t,n){return t==null?n==null?0:-1:n==null?1:g1(e,ee(t),ee(n))|0}function $1(e,t,n){let r=n;jd(s=>{Nt(t,r,s),r=r+1|0},e)}function w1(e,t,n){e:for(;;){const r=e,s=t,i=n;if(i["System.Collections.IEnumerator.MoveNext"]()){e=r,t=Gr(r,i["System.Collections.Generic.IEnumerator`1.get_Current"](),s),n=i;continue e}else return s}}function y1(e,t){return hi((n,r)=>Gr(e,r,n),void 0,t)}function b1(e,t){return vn((n,r)=>Gr(e,r,n),void 0,t)}function Kd(e,t){if(un(t))return y1(e,t);if(t instanceof bt)return b1(e,t);{const n=De(t);try{return w1(e,void 0,n)}finally{xe(n)}}}class Na{constructor(t,n){this.comparer=t,this.tree=n}GetHashCode(){return x1(this)|0}Equals(t){let n;const r=this;return t instanceof Na&&(n=t,qd(qr(r),Qt(r),Qt(n))===0)}toString(){return"set ["+ne("; ",Le(n=>Ze(n),this))+"]"}get[Symbol.toStringTag](){return"FSharpSet"}toJSON(){const t=this;return Array.from(t)}CompareTo(t){const n=this;return qd(qr(n),Qt(n),Qt(t))|0}"System.Collections.Generic.ICollection`1.Add2B595"(t){throw new Error("ReadOnlyCollection")}"System.Collections.Generic.ICollection`1.Clear"(){throw new Error("ReadOnlyCollection")}"System.Collections.Generic.ICollection`1.Remove2B595"(t){throw new Error("ReadOnlyCollection")}"System.Collections.Generic.ICollection`1.Contains2B595"(t){const n=this;return Ud(qr(n),t,Qt(n))}"System.Collections.Generic.ICollection`1.CopyToZ3B4C077E"(t,n){$1(Qt(this),t,n)}"System.Collections.Generic.ICollection`1.get_IsReadOnly"(){return!0}"System.Collections.Generic.ICollection`1.get_Count"(){return Ta(this)|0}"System.Collections.Generic.IReadOnlyCollection`1.get_Count"(){return Ta(this)|0}GetEnumerator(){return Gd(Qt(this))}[Symbol.iterator](){return us(De(this))}"System.Collections.IEnumerable.GetEnumerator"(){return Gd(Qt(this))}get size(){return Ta(this)|0}add(t){throw new Error("Set cannot be mutated")}clear(){throw new Error("Set cannot be mutated")}delete(t){throw new Error("Set cannot be mutated")}has(t){return Zd(this,t)}keys(){return Le(n=>n,this)}values(){return Le(n=>n,this)}entries(){return Le(n=>[n,n],this)}forEach(t,n){const r=this;Dr(s=>{t(s,s,r)},r)}}function Mi(e,t){return new Na(e,t)}function qr(e){return e.comparer}function Qt(e){return e.tree}function _1(e){return Mi(e,void 0)}function v1(e,t){return Mi(qr(e),Gr(qr(e),t,Qt(e)))}function Ta(e){return d1(Qt(e))}function Zd(e,t){return Ud(qr(e),t,Qt(e))}function x1(e){let t=0;const n=De(e);try{for(;n["System.Collections.IEnumerator.MoveNext"]();){const r=n["System.Collections.Generic.IEnumerator`1.get_Current"]();t=(t<<1)+bn(r)+631|0}}finally{xe(n)}return Math.abs(t)|0}function Ra(e,t){return Zd(t,e)}function C1(e,t){return v1(t,e)}function S1(e){return _1(e)}function A1(e,t){return Mi(t,Kd(t,e))}function k1(e,t){return Mi(t,Kd(t,e))}function Os(e,t,n){try{return"Expecting "+e+" but instead got:"+(n?`
1
+ (function(){"use strict";function un(e){return Array.isArray(e)||ArrayBuffer.isView(e)}function em(e){return e!=null&&typeof e.GetEnumerator=="function"}function tm(e){return e!=null&&typeof e.CompareTo=="function"}function nm(e){return e!=null&&typeof e.Equals=="function"}function Sl(e){return e!=null&&typeof e.GetHashCode=="function"}function mo(e){return e!=null&&typeof e.Dispose=="function"}function xe(e){mo(e)&&e.Dispose()}function ge(){return null}function ei(e,t){var n,r;return((n=Object.getPrototypeOf(e))==null?void 0:n.constructor)===((r=Object.getPrototypeOf(t))==null?void 0:r.constructor)}class rm{constructor(t){this.iter=t,this.current=ge()}"System.Collections.Generic.IEnumerator`1.get_Current"(){return this.current}"System.Collections.IEnumerator.get_Current"(){return this.current}"System.Collections.IEnumerator.MoveNext"(){const t=this.iter.next();return this.current=t.value,!t.done}"System.Collections.IEnumerator.Reset"(){throw new Error("JS iterators cannot be reset")}Dispose(){}}function Oe(e){return em(e)?e.GetEnumerator():new rm(e[Symbol.iterator]())}function us(e){return{next(){const t=e["System.Collections.IEnumerator.MoveNext"](),n=t?e["System.Collections.Generic.IEnumerator`1.get_Current"]():void 0;return{done:!t,value:n}}}}class sm{constructor(t){this.factory=t,this.isValueCreated=!1}get Value(){return this.isValueCreated||(this.createdValue=this.factory(),this.isValueCreated=!0),this.createdValue}get IsValueCreated(){return this.isValueCreated}}function _e(e,t){return e.toString(10).padStart(t,"0")}function im(e,t,n){return e.toString(10).padStart(t,"0").padEnd(n,"0")}function Al(e){const t=e;return typeof t.offset=="number"?t.offset:e.kind===1?0:e.getTimezoneOffset()*-6e4}function om(e,t){return e=e,e.toString(t)}function er(e,t){return e=e,e.toString(t)}class yn{static id(t){return yn.idMap.has(t)||yn.idMap.set(t,++yn.count),yn.idMap.get(t)}}yn.idMap=new WeakMap,yn.count=0;function kr(e){let t=0,n=5381;const r=e.length;for(;t<r;)n=n*33^e.charCodeAt(t++);return n}function Gt(e){return e*2654435761|0}function kl(e){return kr(e.toString(32))}function ds(e){let t=0;const n=e.length;for(let r=0;r<n;r++){const s=e[r];t=(t<<5)+t^s}return t}function am(e){if(e==null)return 0;switch(typeof e){case"boolean":return e?1:0;case"number":return Gt(e);case"bigint":return kl(e);case"string":return kr(e);default:return Gt(yn.id(e))}}function lm(e){return Sl(e)?e.GetHashCode():am(e)}function cm(e){return e.getTime()}function um(e){const t=e.length,n=new Array(t);for(let r=0;r<t;r++)n[r]=bn(e[r]);return ds(n)}function bn(e){var t;if(e==null)return 0;switch(typeof e){case"boolean":return e?1:0;case"number":return Gt(e);case"bigint":return kl(e);case"string":return kr(e);default:{if(Sl(e))return e.GetHashCode();if(un(e))return um(e);if(e instanceof Date)return cm(e);if(((t=Object.getPrototypeOf(e))==null?void 0:t.constructor)===Object){const n=Object.values(e).map(r=>bn(r));return ds(n)}else return Gt(yn.id(e))}}}function dm(e){return lm(e)}function po(e,t,n){if(e==null)return t==null;if(t==null||e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(!n(e[r],t[r]))return!1;return!0}function El(e,t){return po(e,t,Ce)}function fm(e,t){const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;n.sort(),r.sort();for(let s=0;s<n.length;s++)if(n[s]!==r[s]||!Ce(e[n[s]],t[r[s]]))return!1;return!0}function Ce(e,t){var n;return e===t?!0:e==null?t==null:t==null?!1:nm(e)?e.Equals(t):un(e)?un(t)&&El(e,t):typeof e!="object"?!1:e instanceof Date?t instanceof Date&&Il(e,t)===0:((n=Object.getPrototypeOf(e))==null?void 0:n.constructor)===Object&&fm(e,t)}function Il(e,t){let n,r;return"offset"in e&&"offset"in t?(n=e.getTime(),r=t.getTime()):(n=e.getTime()+Al(e),r=t.getTime()+Al(t)),n===r?0:n<r?-1:1}function fs(e,t){return e===t?0:e<t?-1:1}function hm(e,t,n){if(e==null)return t==null?0:1;if(t==null)return-1;if(e.length!==t.length)return e.length<t.length?-1:1;for(let r=0,s=0;r<e.length;r++)if(s=n(e[r],t[r]),s!==0)return s;return 0}function Nl(e,t){return hm(e,t,Bt)}function mm(e,t){const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return n.length<r.length?-1:1;n.sort(),r.sort();for(let s=0,i=0;s<n.length;s++){const o=n[s];if(o!==r[s])return o<r[s]?-1:1;if(i=Bt(e[o],t[o]),i!==0)return i}return 0}function Bt(e,t){var n;return e===t?0:e==null?t==null?0:-1:t==null?1:tm(e)?e.CompareTo(t):un(e)?un(t)?Nl(e,t):-1:typeof e!="object"?e<t?-1:1:e instanceof Date?t instanceof Date?Il(e,t):-1:((n=Object.getPrototypeOf(e))==null?void 0:n.constructor)===Object?mm(e,t):-1}function S(e){const t={};for(const n of e)t[n[0]]=n[1];return t}function pm(e){un(e)?e.splice(0):e.clear()}const ti=new WeakMap;function $e(e){if(e==null)return null;const t=(n,r)=>e(n)(r);return ti.set(t,e),t}function Fn(e){return ti.get(e)??(t=>n=>e(t,n))}function go(e){if(e==null)return null;const t=(n,r,s)=>e(n)(r)(s);return ti.set(t,e),t}function $o(e){return ti.get(e)??(t=>n=>r=>e(t,n,r))}function gm(e){let t=0,n="[";for(const r of e){if(t===0)n+=Ze(r);else if(t===100){n+="; ...";break}else n+="; "+Ze(r);t++}return n+"]"}function Ze(e,t=0){var n;if(e!=null&&typeof e=="object"){if(typeof e.toString=="function")return e.toString();if(Symbol.iterator in e)return gm(e);{const r=(n=Object.getPrototypeOf(e))==null?void 0:n.constructor;return r===Object&&t<10?"{ "+Object.entries(e).map(([s,i])=>s+" = "+Ze(i,t+1)).join(`
2
+ `)+" }":(r==null?void 0:r.name)??""}}return String(e)}function $m(e,t){if(t.length===0)return e;{let n,r=!0;return t.length===1?(n=Ze(t[0]),r=n.indexOf(" ")>=0):n=t.map(s=>Ze(s)).join(", "),e+(r?" (":" ")+n+(r?")":"")}}class j{get name(){return this.cases()[this.tag]}toJSON(){return this.fields.length===0?this.name:[this.name].concat(this.fields)}toString(){return $m(this.name,this.fields)}GetHashCode(){const t=this.fields.map(n=>bn(n));return t.splice(0,0,Gt(this.tag)),ds(t)}Equals(t){return this===t?!0:ei(this,t)&&this.tag===t.tag?El(this.fields,t.fields):!1}CompareTo(t){return this===t?0:ei(this,t)?this.tag===t.tag?Nl(this.fields,t.fields):this.tag<t.tag?-1:1:-1}}function wm(e){const t={},n=Object.keys(e);for(let r=0;r<n.length;r++)t[n[r]]=e[n[r]];return t}function ym(e){return"{ "+Object.entries(e).map(([t,n])=>t+" = "+Ze(n)).join(`
3
+ `)+" }"}function bm(e){const t=Object.values(e).map(n=>bn(n));return ds(t)}function _m(e,t){if(e===t)return!0;if(ei(e,t)){const n=Object.keys(e);for(let r=0;r<n.length;r++)if(!Ce(e[n[r]],t[n[r]]))return!1;return!0}else return!1}function vm(e,t){if(e===t)return 0;if(ei(e,t)){const n=Object.keys(e);for(let r=0;r<n.length;r++){const s=Bt(e[n[r]],t[n[r]]);if(s!==0)return s}return 0}else return-1}class Q{toJSON(){return wm(this)}toString(){return ym(this)}GetHashCode(){return bm(this)}Equals(t){return _m(this,t)}CompareTo(t){return vm(this,t)}}class yt{get contents(){return this.getter()}set contents(t){this.setter(t)}constructor(t,n){typeof n=="function"?(this.getter=t,this.setter=n):(this.getter=()=>t,this.setter=r=>{t=r})}}class xm{constructor(t){this.message=t}}function Cm(e){return e instanceof xm||e instanceof Error}function Sm(e){return e instanceof Promise}function ni(e){return Cm(e)||Sm(e)?e:new Error(String(e))}const Er=Symbol("numeric");function Tl(e){return typeof e=="number"||typeof e=="bigint"||(e==null?void 0:e[Er])}function Am(e,t){return typeof e=="number"||typeof e=="bigint"?e<t?-1:e>t?1:0:e.CompareTo(t)}function wo(e,t){return typeof e=="number"?e*t:typeof e=="bigint"?e*BigInt(t):e[Er]().multiply(t)}function ri(e,t){return typeof e=="number"?e.toFixed(t):typeof e=="bigint"?e:e[Er]().toFixed(t)}function si(e,t){return typeof e=="number"?e.toPrecision(t):typeof e=="bigint"?e:e[Er]().toPrecision(t)}function ii(e,t){return typeof e=="number"?e.toExponential(t):typeof e=="bigint"?e:e[Er]().toExponential(t)}function oi(e){return typeof e=="number"?(Number(e)>>>0).toString(16):typeof e=="bigint"?BigInt.asUintN(64,e).toString(16):e[Er]().toHex()}class km{constructor(t,n,r,s){this.declaringType=t,this.tag=n,this.name=r,this.fields=s}}class Ut{constructor(t,n,r,s,i,o,a){this.fullname=t,this.generics=n,this.construct=r,this.parent=s,this.fields=i,this.cases=o,this.enumCases=a}toString(){return De(this)}GetHashCode(){return Ml(this)}Equals(t){return yo(this,t)}}function It(e){return e.generics!=null?e.generics:[]}function Ml(e){const t=kr(e.fullname),n=It(e).map(Ml);return ds([t,...n])}function yo(e,t){return e.fullname===""?t.fullname===""&&po(ms(e),ms(t),([n,r],[s,i])=>n===s&&yo(r,i)):e.fullname===t.fullname&&po(It(e),It(t),yo)}function bo(e,t,n,r){return new Ut(e,t,n,r)}function at(e,t,n,r){return new Ut(e,t,n,void 0,r)}function _o(e,t,n,r){const s=new Ut(e,t,n,void 0,void 0,()=>{const i=n.prototype.cases();return r().map((o,a)=>new km(s,a,i[a],o))});return s}function ye(e){return new Ut("Microsoft.FSharp.Core.FSharpOption`1",[e])}function vo(e){return new Ut("Microsoft.FSharp.Collections.FSharpList`1",[e])}function Rl(e){return new Ut("[]",[e])}const Em=new Ut("System.Object"),H=new Ut("System.String");function Ir(e){if(Array.isArray(e))return e[0];if(e instanceof Ut){const t=hs(e);if(t!=null)return Ir(t)+"[]";{const n=e.fullname.lastIndexOf(".");return n===-1?e.fullname:e.fullname.substr(n+1)}}else return e.name}function De(e){const t=hs(e);return t!=null?De(t)+"[]":e.generics==null||e.generics.length===0?e.fullname:e.fullname+"["+e.generics.map(n=>De(n)).join(",")+"]"}function Pl(e){return hs(e)!=null}function hs(e){var t;return e.fullname==="[]"&&((t=e.generics)==null?void 0:t.length)===1?e.generics[0]:void 0}function Dl(e){return e.generics!=null&&e.generics.length>0}function xo(e){return e.enumCases!=null&&e.enumCases.length>0}function Ol(e){return e.generics==null?e:new Ut(e.fullname,e.generics.map(()=>Em))}function Fl(e){var t;return(t=e.generics)==null?void 0:t[0]}function Nr(e){if(xo(e)&&e.enumCases!=null)return e.enumCases.map(t=>t[1]);throw new Error(`${e.fullname} is not an enum type`)}function Im(e,t){if(e.enumCases!=null)if(typeof t=="string"){for(const n of e.enumCases)if(n[0]===t)return n;throw new Error(`'${t}' was not found in ${e.fullname}`)}else{for(const n of e.enumCases)if(n[1]===t)return n;return["",t]}else throw new Error(`${e.fullname} is not an enum type`)}function Tr(e,t){const n=parseInt(t,10);return Im(e,isNaN(n)?t:n)[1]}function Vl(e){if(e.cases!=null)return e.cases();throw new Error(`${e.fullname} is not an F# union type`)}function ms(e){if(e.fields!=null)return e.fields();throw new Error(`${e.fullname} is not an F# record type`)}function Ll(e){if(Co(e)&&e.generics!=null)return e.generics;throw new Error(`${e.fullname} is not a tuple type`)}function Bl(e){return e instanceof Ut?e.cases!=null:e instanceof j}function Ul(e){return e instanceof Ut?e.fields!=null:e instanceof Q}function Co(e){return e.fullname.startsWith("System.Tuple")}function Nm(e,t){const r=Vl(t)[e.tag];if(r==null)throw new Error(`Cannot find case ${e.name} in union type`);return[r,e.fields]}function jl(e){return e.fields==null?[]:e.fields}function Tm(e,t){return e[t[0]]}function Bx(e){return e}function Mm(e,t){const n=(e.fields||[]).length;if(t.length!==n)throw new Error(`Expected an array of length ${n} but got ${t.length}`);const r=e.declaringType.construct;return r==null?{}:(e.declaringType.cases?e.declaringType.cases().length==1:!1)?new r(...t):new r(e.tag,t)}function Rm(e,t){const n=ms(e);if(n.length!==t.length)throw new Error(`Expected an array of length ${n.length} but got ${t.length}`);return e.construct!=null?new e.construct(...t):n.reduce((r,[s,i],o)=>(r[s]=t[o],r),{})}function Pm(e,t){return e}const Dm=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],Om=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],Fm=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Vm=["January","February","March","April","May","June","July","August","September","October","November","December"];function Nt(e,t,n){let r=0,s=t;for(;s<e.length&&e[s]===n;)s++,r++;return r}function zl(e,t){return t>=e.length-1?-1:e.charCodeAt(t+1)}function Lm(e,t){let n=t;const r=e[t];let s="",i=!1;for(;t<e.length;){t++;const o=e[t];if(o===r){i=!0;break}else if(o==="\\")if(t<e.length)t++,s+=e[t];else throw new Error("Invalid string format");else s+=o}if(!i)throw new Error(`Invalid string format could not find matching quote for ${r}`);return[s,t-n+1]}function So(e,t,n){let r=0,s=0,i="";const o=n?ps(e.getTime(),1):e;for(;r<t.length;){const a=t[r];switch(a){case"d":switch(s=Nt(t,r,"d"),r+=s,s){case 1:i+=Gl(o);break;case 2:i+=_e(Gl(o),2);break;case 3:i+=Dm[Zl(o)];break;case 4:i+=Om[Zl(o)];break}break;case"f":if(s=Nt(t,r,"f"),r+=s,s<=3){const w=10**(3-s);i+=_e(Math.floor(ci(o)/w),s)}else s<=7&&(i+=(""+ci(o)).padEnd(s,"0"));break;case"F":if(s=Nt(t,r,"F"),r+=s,s<=3){const w=10**(3-s),C=Math.floor(ci(o)/w);C!=0&&(i+=_e(C,s))}else if(s<=7){const w=ci(o);w!=0&&(i+=_e(w,3))}break;case"g":s=Nt(t,r,"g"),r+=s,s<=2&&(i+="A.D.");break;case"h":switch(s=Nt(t,r,"h"),r+=s,s){case 1:i+=li(o)%12;break;case 2:i+=_e(li(o)%12,2);break}break;case"H":switch(s=Nt(t,r,"H"),r+=s,s){case 1:i+=li(o);break;case 2:i+=_e(li(o),2);break}break;case"K":switch(s=Nt(t,r,"K"),r+=s,s){case 1:switch(Hl(o)){case 1:i+="Z";break;case 2:i+=Mr(o.getTimezoneOffset()*-6e4);break}break}break;case"m":switch(s=Nt(t,r,"m"),r+=s,s){case 1:i+=ql(o);break;case 2:i+=_e(ql(o),2);break}break;case"M":switch(s=Nt(t,r,"M"),r+=s,s){case 1:i+=ui(o);break;case 2:i+=_e(ui(o),2);break;case 3:i+=Fm[ui(o)-1];break;case 4:i+=Vm[ui(o)-1];break}break;case"s":switch(s=Nt(t,r,"s"),r+=s,s){case 1:i+=Kl(o);break;case 2:i+=_e(Kl(o),2);break}break;case"t":switch(s=Nt(t,r,"t"),r+=s,s){case 1:i+=o.getHours()<12?"A":"P";break;case 2:i+=o.getHours()<12?"AM":"PM";break}break;case"y":switch(s=Nt(t,r,"y"),r+=s,s){case 1:i+=o.getFullYear()%100;break;case 2:i+=_e(o.getFullYear()%100,2);break;case 3:i+=_e(o.getFullYear(),3);break;case 4:i+=_e(o.getFullYear(),4);break;case 5:i+=_e(o.getFullYear(),5);break}break;case"z":s=Nt(t,r,"z"),r+=s;let l="";switch(Hl(o)){case 1:l="+00:00";break;case 2:l=Mr(o.getTimezoneOffset()*-6e4);break;case 0:l=Mr(Km(o).getTimezoneOffset()*-6e4);break}const c=l[0]==="-"?"-":"+",d=parseInt(l.substring(1,3),10),u=parseInt(l.substring(4,6),10);switch(s){case 1:i+=`${c}${d}`;break;case 2:i+=`${c}${_e(d,2)}`;break;default:i+=`${c}${_e(d,2)}:${_e(u,2)}`;break}break;case":":i+=":",r++;break;case"/":i+="/",r++;break;case"'":case'"':const[m,h]=Lm(t,r);i+=m,r+=h;break;case"%":const p=zl(t,r);if(p>=0&&p!==37)r+=2,i+=So(o,String.fromCharCode(p),n);else throw new Error("Invalid format string");break;case"\\":const $=zl(t,r);if($>=0)r+=2,i+=String.fromCharCode($);else throw new Error("Invalid format string");break;default:r++,i+=a;break}}return i}function Hl(e){return e.kind||0}function Mr(e){const t=e<0;e=Math.abs(e);const n=~~(e/36e5),r=e%36e5/6e4;return(t?"-":"+")+_e(n,2)+":"+_e(r,2)}function ai(e,t){const n=e.toISOString();return t==="first"?n.substring(0,n.indexOf("T")):n.substring(n.indexOf("T")+1,n.length-1)}function Bm(e,t){if(t)return e.toISOString();{const n=e.kind==null?!0:e.kind===2;return _e(e.getFullYear(),4)+"-"+_e(e.getMonth()+1,2)+"-"+_e(e.getDate(),2)+"T"+_e(e.getHours(),2)+":"+_e(e.getMinutes(),2)+":"+_e(e.getSeconds(),2)+"."+_e(e.getMilliseconds(),3)+(n?Mr(e.getTimezoneOffset()*-6e4):"")}}function Um(e,t){const n=e.toISOString();return n.substring(0,n.length-1)+Mr(t)}function jm(e,t){const n=new Date(e.getTime()+(e.offset??0));if(typeof t!="string")return n.toISOString().replace(/\.\d+/,"").replace(/[A-Z]|\.\d+/g," ")+Mr(e.offset??0);if(t.length===1)switch(t){case"D":case"d":return ai(n,"first");case"T":case"t":return ai(n,"second");case"O":case"o":return Um(n,e.offset??0);default:throw new Error("Unrecognized Date print format")}else return So(n,t,!0)}function zm(e,t){const n=e.kind===1;if(typeof t!="string")return n?e.toUTCString():e.toLocaleString();if(t.length===1)switch(t){case"D":case"d":return n?ai(e,"first"):e.toLocaleDateString();case"T":case"t":return n?ai(e,"second"):e.toLocaleTimeString();case"O":case"o":return Bm(e,n);default:throw new Error("Unrecognized Date print format")}else return So(e,t,n)}function Rr(e,t,n){return e.offset!=null?jm(e,t):zm(e,t)}function ps(e,t){const n=new Date(e);return n.kind=(t??0)|0,n}function Hm(){return ps(-621355968e5,1)}function Wl(e){function t(){throw new Error(`The string is not a valid Date: ${e}`)}(e==null||e.trim()==="")&&t(),e.length===10&&e[4]==="-"&&e[7]==="-"&&(e+="T00:00:00");let n=new Date(e),r=null;if(isNaN(n.getTime())){const s=/^\s*(\d+[^\w\s:]\d+[^\w\s:]\d+)?\s*(\d+:\d+(?::\d+(?:\.\d+)?)?)?\s*([AaPp][Mm])?\s*(Z|[+-]([01]?\d):?([0-5]?\d)?)?\s*$/.exec(e);if(s!=null){let i,o=0;if(s[2]!=null){const a=s[2].split(":"),l=parseInt(a[0],10);o=l*3600+parseInt(a[1]||"0",10)*60+parseFloat(a[2]||"0"),s[3]!=null&&s[3].toUpperCase()==="PM"&&l<12&&(o+=720)}if(s[4]!=null){if(s[1]!=null)i=new Date(s[1]+" UTC");else{const a=new Date;i=new Date(a.getUTCFullYear()+"/"+(a.getUTCMonth()+1)+"/"+a.getUTCDate())}if(s[4]==="Z")r="Z";else{let a=parseInt(s[5],10)*60+parseInt(s[6]||"0",10);s[4][0]==="-"&&(a*=-1),r=a,o-=a*60}}else if(s[1]!=null)i=new Date(s[1]);else{const a=new Date;i=new Date(a.getFullYear()+"/"+(a.getMonth()+1)+"/"+a.getDate())}n=new Date(i.getTime()+o*1e3),n=new Date(n.getTime()+(n.getTimezoneOffset()-i.getTimezoneOffset())*6e4)}else t();isNaN(n.getTime())&&t()}return[n,r]}function Wm(e,t=!1){const[n,r]=Wl(e),s=r!=null?t&&r==="Z"?1:2:0;return ps(n.getTime(),s)}function Gm(e,t){try{return t.contents=Wm(e),!0}catch{return!1}}function qm(e){return e.kind===1?e:ps(e.getTime(),1)}function Km(e){return e.kind===2?e:ps(e.getTime(),2)}function Gl(e){return e.kind===1?e.getUTCDate():e.getDate()}function li(e){return e.kind===1?e.getUTCHours():e.getHours()}function ci(e){return e.kind===1?e.getUTCMilliseconds():e.getMilliseconds()}function ql(e){return e.kind===1?e.getUTCMinutes():e.getMinutes()}function ui(e){return(e.kind===1?e.getUTCMonth():e.getMonth())+1}function Kl(e){return e.kind===1?e.getUTCSeconds():e.getSeconds()}function Zl(e){return e.kind===1?e.getUTCDay():e.getDay()}function Jl(e,t=0){if((t&-284)!==0)throw new Error("RegexOptions only supports: IgnoreCase, Multiline, Compiled, Singleline and ECMAScript");let n="gu";return n+=t&1?"i":"",n+=t&2?"m":"",n+=t&16?"s":"",new RegExp(e,n)}function Ao(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}function Zm(e,t,n=0){return e.lastIndex=n,e.exec(t)}function Yl(e,t,n=0){if(t==null)throw new Error("Input cannot ve null");if(!e.global)throw new Error("Non-global RegExp");e.lastIndex=n;const r=[];let s,i=-1;for(;(s=e.exec(t))!=null;)s.index===i?e.lastIndex++:(i=s.index,r.push(s));return r}function Jm(e,t,n,r,s=0){function i(){let o=arguments[0];if(r){r--;const a=[],l=arguments.length,c=typeof arguments[l-1]!="string";let d=c?l-3:l-2;for(let u=0;u<d;u++)a.push(arguments[u]);a.index=arguments[d++],a.input=arguments[d++],c&&(a.groups=arguments[d]),o=n(a)}return o}if(typeof e=="string"){const o=e;e=Jl(t,r??0),t=o,r=void 0}if(typeof n=="function")return r=r??-1,t.substring(0,s)+t.substring(s).replace(e,i);if(n=n.replace(/\$0/g,o=>"$&").replace(/\${([^}]+)}/g,"$<$1>"),r!=null){let o;const a=t.substring(s),l=Yl(e,a),c=Yl.length>r?(o=l[r-1],a.substring(0,o.index+o[0].length)):a;return t.substring(0,s)+c.replace(e,n)+t.substring(s+c.length)}else return t.replace(e,n)}const gs=/(^|[^%])%([0+\- ]*)(\*|\d+)?(?:\.(\d+))?(\w)/g,$s=/(?:(^|[^%])%([0+\- ]*)(\d+)?(?:\.(\d+))?(\w))?%P\(\)/g,Ym=/\{(\d+)(,-?\d+)?(?:\:([a-zA-Z])(\d{0,2})|\:(.+?))?\}/g;function Xl(e,t){return Am(e,t)<0}function jt(e){return{input:e,cont:Xm(e)}}function Ql(e,t){let n=0,r=0,s="";$s.lastIndex=0;let i=$s.exec(e);for(;i;){const o=i.index+(i[1]||"").length;s+=e.substring(r,o).replace(/%%/g,"%");const[,,a,l,c,d]=i;r=$s.lastIndex,s+=nc(t[n++],a,l,c,d),$s.lastIndex=r-1,i=$s.exec(e)}return s+=e.substring(r).replace(/%%/g,"%"),s}function ko(e,t){return typeof t=="string"?e(t):t.cont(e)}function ec(e){return ko(t=>console.log(t),e)}function qt(e){return ko(t=>t,e)}function tc(e){return ko(t=>{throw new Error(t)},e)}function nc(e,t,n,r,s){let i="";if(t=t||"",s=s||"",Tl(e))switch(s.toLowerCase()!=="x"&&(Xl(e,0)?(e=wo(e,-1),i="-"):t.indexOf(" ")>=0?i=" ":t.indexOf("+")>=0&&(i="+")),r=r==null?null:parseInt(r,10),s){case"f":case"F":r=r??6,e=ri(e,r);break;case"g":case"G":e=r!=null?si(e,r):si(e);break;case"e":case"E":e=r!=null?ii(e,r):ii(e);break;case"x":e=oi(e);break;case"X":e=oi(e).toUpperCase();break;default:e=String(e);break}else e instanceof Date?e=Rr(e):e=Ze(e);if(n=typeof n=="number"?n:parseInt(n,10),isNaN(n))e=i+e;else{const o=t.indexOf("0")>=0,a=t.indexOf("-")>=0,l=a||!o?" ":"0";l==="0"?(e=ws(e,n-i.length,l,a),e=i+e):e=ws(i+e,n,l,a)}return e}function rc(e,t,n,r="",s=-1){return(...i)=>{let o=r;const a=t.slice(),l=n.slice();for(const c of i){const[,,d,u,m,h]=l[0];let p=u;if(s>=0)p=s,s=-1;else if(p==="*"){if(c<0)throw new Error("Non-negative number required");s=c;continue}o+=a[0],o+=nc(c,d,p,m,h),a.splice(0,1),l.splice(0,1)}return l.length===0?(o+=a[0],e(o)):rc(e,a,l,o,s)}}function Xm(e){return t=>{gs.lastIndex=0;const n=[],r=[];let s=0,i=gs.exec(e);for(;i;){const o=i.index+(i[1]||"").length;n.push(e.substring(s,o).replace(/%%/g,"%")),r.push(i),s=gs.lastIndex,gs.lastIndex-=1,i=gs.exec(e)}return n.length===0?t(e.replace(/%%/g,"%")):(n.push(e.substring(s).replace(/%%/g,"%")),rc(t,n,r))}}function sc(e,...t){let n;return typeof e=="object"?(n=String(t[0]),t.shift()):n=e,n.replace(Ym,(r,s,i,o,a,l)=>{if(s<0||s>=t.length)throw new Error("Index must be greater or equal to zero and less than the arguments' length.");let c=t[s];if(Tl(c))switch(a=a==null?null:parseInt(a,10),o){case"f":case"F":a=a??2,c=ri(c,a);break;case"g":case"G":c=a!=null?si(c,a):si(c);break;case"e":case"E":c=a!=null?ii(c,a):ii(c);break;case"p":case"P":a=a??2,c=ri(wo(c,100),a)+" %";break;case"d":case"D":c=a!=null?Eo(String(c),a,"0"):String(c);break;case"x":case"X":c=a!=null?Eo(oi(c),a,"0"):oi(c),o==="X"&&(c=c.toUpperCase());break;default:if(l){let d="";c=l.replace(/([0#,]+)(\.[0#]+)?/,(u,m,h)=>{Xl(c,0)&&(c=wo(c,-1),d="-"),h=h==null?"":h.substring(1),c=ri(c,Math.max(h.length,0));let[p,$]=c.split(".");$||($="");const w=m.replace(/,/g,"").replace(/^#+/,"").length;p=Eo(p,w,"0");const C=h.replace(/#+$/,"").length;if(C>$.length?$=ep($,C,"0"):C<$.length&&($=$.substring(0,C)+$.substring(C).replace(/0+$/,"")),m.indexOf(",")>0){const x=p.length%3,E=Math.floor(p.length/3);let O=x>0?p.substr(0,x)+(E>0?",":""):"";for(let L=0;L<E;L++)O+=p.substr(x+L*3,3)+(L<E-1?",":"");p=O}return $.length>0?p+"."+$:p}),c=d+c}}else c instanceof Date?c=Rr(c,l||o):c=Ze(c);return i=parseInt((i||" ").substring(1),10),isNaN(i)||(c=ws(String(c),Math.abs(i)," ",i<0)),c})}function Qm(e,t){const n=e.lastIndexOf(t);return n>=0&&n===e.length-t.length}function di(e){return typeof e!="string"||e.length===0}function fi(e){return typeof e!="string"||/^\s*$/.test(e)}function ne(e,t){return Array.isArray(t)?t.join(e):Array.from(t).join(e)}function ws(e,t,n,r){n=n||" ",t=t-e.length;for(let s=0;s<t;s++)e=r?e+n:n+e;return e}function Eo(e,t,n){return ws(e,t,n)}function ep(e,t,n){return ws(e,t,n,!0)}function Io(e,t,n,r){if(n=typeof n=="number"?n:void 0,r=typeof r=="number"?r:0,n&&n<0)throw new Error("Count cannot be less than zero");if(n===0)return[];const s=(r&1)===1,i=(r&2)===2;t=t||[],t=t.filter(d=>d).map(Ao),t=t.length>0?t:["\\s"];const o=[],a=new RegExp(t.join("|"),"g");let l=!0,c=0;do{const d=a.exec(e);if(d===null){const u=i?e.substring(c).trim():e.substring(c);(!s||u.length>0)&&o.push(u),l=!1}else{const u=i?e.substring(c,d.index).trim():e.substring(c,d.index);(!s||u.length>0)&&(n!=null&&o.length+1===n?(o.push(i?e.substring(c).trim():e.substring(c)),l=!1):o.push(u)),c=a.lastIndex}}while(l);return o}function tp(e,...t){if(t.length===0)return e.trim();const n="["+Ao(t.join(""))+"]+";return e.replace(new RegExp("^"+n),"").replace(new RegExp(n+"$"),"")}function np(e,...t){return t.length===0?e.trimEnd():e.replace(new RegExp("["+Ao(t.join(""))+"]+$"),"")}function ic(e,t,n){if(t+(n||0)>e.length)throw new Error("Invalid startIndex and/or length");return n!=null?e.substr(t,n):e.substr(t)}class tr{constructor(t){this.value=t}toJSON(){return this.value}toString(){return String(this.value)}GetHashCode(){return bn(this.value)}Equals(t){return t==null?!1:Ce(this.value,t instanceof tr?t.value:t)}CompareTo(t){return t==null?1:Bt(this.value,t instanceof tr?t.value:t)}}function D(e){if(e==null)throw new Error("Option has no value");return e instanceof tr?e.value:e}function No(e){return e instanceof tr?e.value:e}function lt(e){return e==null||e instanceof tr?new tr(e):e}function rp(e){return e??void 0}function To(e){return e==null?[]:[D(e)]}function We(e,t){return e!=null?D(e):t}function oc(e,t){return e!=null?D(e):t()}function Ge(e,t){return t!=null?lt(e(D(t))):void 0}function sp(e,t){return t!=null?e(D(t)):void 0}const ac="Collection was empty.";function Mo(e,t){return typeof e=="function"?new e(t):new Array(t)}function lc(e,t){return e>t?e:t}function hi(e,t,n,r){const s=t|0;return e.fill(r,s,s+n)}function Vn(e,t,n){const r=t.length|0,s=Mo(n,r);for(let i=0;i<=r-1;i++)Tt(s,i,e(we(i,t)));return s}function ip(e,t,n,r){if(t.length!==n.length)throw new Error("Arrays had different lengths");const s=Mo(r,t.length);for(let i=0;i<=t.length-1;i++)Tt(s,i,e(we(i,t),we(i,n)));return s}function op(e,t){const n=Mo(t,1);return Tt(n,0,e),n}function ap(e){return e.slice().reverse()}function lp(e,t){return t.find(e)}function cp(e,t,n){const r=[];for(let s=0;s<=t.length-1;s++){const i=e(we(s,t));if(i!=null){const o=D(i);r.push(o)}}return Ce(n,ge())?r:Vn(s=>s,r,n)}function mi(e,t,n){const r=e;return n.reduce(r,t)}function up(e,t){if(e<1)throw new Error("The input must be positive.\\nParameter name: size");if(t.length===0)return[[]];{const n=[];for(let r=0;r<=~~Math.ceil(t.length/e)-1;r++){let s;const i=r*e|0;s=t.slice(i,i+e),n.push(s)}return n}}function Ro(e,t,n){return t==null}function we(e,t){if(e<0||e>=t.length)throw new Error("Index was outside the bounds of the array.\\nParameter name: index");return t[e]}function Tt(e,t,n){if(t<0||t>=e.length)throw new Error("Index was outside the bounds of the array.\\nParameter name: index");e[t]=n}function cc(e,t,n){return t.reduceRight((r,s)=>e(s,r),n)}function dp(e,t){let n=t.GetZero();for(let r=0;r<=e.length-1;r++)n=t.Add(n,we(r,e));return n}class bt extends Q{constructor(t,n){super(),this.head=t,this.tail=n}toString(){return"["+ne("; ",this)+"]"}Equals(t){const n=this;return n===t?!0:((s,i)=>{e:for(;;){const o=s,a=i,l=o.tail,c=a.tail;if(l!=null)if(c!=null){const d=D(l),u=D(c);if(Ce(o.head,a.head)){s=d,i=u;continue e}else return!1}else return!1;else return c==null}})(n,t)}GetHashCode(){return((r,s,i)=>{e:for(;;){const o=r,a=s,l=i,c=l.tail;if(c!=null){const d=D(c);if(o>18)return a|0;r=o+1,s=(a<<1)+bn(l.head)+631*o,i=d;continue e}else return a|0}})(0,0,this)|0}toJSON(){const t=this;return Array.from(t)}CompareTo(t){return((s,i)=>{e:for(;;){const o=s,a=i,l=o.tail,c=a.tail;if(l!=null)if(c!=null){const d=D(l),u=D(c),m=Bt(o.head,a.head)|0;if(m===0){s=d,i=u;continue e}else return m|0}else return 1;else return c!=null?-1:0}})(this,t)|0}GetEnumerator(){return hp(this)}[Symbol.iterator](){return us(Oe(this))}"System.Collections.IEnumerable.GetEnumerator"(){return Oe(this)}}class fp{constructor(t){this.xs=t,this.it=this.xs,this.current=ge()}"System.Collections.Generic.IEnumerator`1.get_Current"(){return this.current}"System.Collections.IEnumerator.get_Current"(){return this.current}"System.Collections.IEnumerator.MoveNext"(){const t=this,n=t.it.tail;if(n!=null){const r=D(n);return t.current=t.it.head,t.it=r,!0}else return!1}"System.Collections.IEnumerator.Reset"(){const t=this;t.it=t.xs,t.current=ge()}Dispose(){}}function hp(e){return new fp(e)}function qe(){return new bt(ge(),void 0)}function ys(e,t){return new bt(e,t)}function _n(e){return e.tail==null}function uc(e){return((n,r)=>{e:for(;;){const s=n,o=r.tail;if(o!=null){n=s+1,r=D(o);continue e}else return s|0}})(0,e)|0}function Ln(e){if(e.tail!=null)return e.head;throw new Error(ac+"\\nParameter name: list")}function ct(e){const t=e.tail;if(t!=null)return D(t);throw new Error(ac+"\\nParameter name: list")}function je(){return qe()}function Mt(e,t){return ys(e,t)}function ee(e){return ys(e,qe())}function K(e){return _n(e)}function Pr(e){return uc(e)}function V(e){return Ln(e)}function _(e){return ct(e)}function nr(e){const t=uc(e)|0,n=hi(new Array(t),0,t,null);return((s,i)=>{e:for(;;){const o=s,a=i;if(!_n(a)){Tt(n,o,Ln(a)),s=o+1,i=ct(a);continue e}break}})(0,e),n}function vn(e,t,n){let r=t,s=n;for(;!_n(s);)r=e(r,V(s)),s=ct(s);return r}function pi(e){return vn((t,n)=>ys(n,t),qe(),e)}function mp(e,t,n){return cc(e,nr(t),n)}function pp(e,t,n){return((s,i,o)=>{e:for(;;){const a=s,l=i,c=o;if(_n(c))return l;s=a+1,i=e(a,l,Ln(c)),o=ct(c);continue e}})(0,t,n)}function gi(e,t){vn((n,r)=>{e(r)},void 0,t)}function Fe(e,t){let n=t;for(let r=e.length-1;r>=0;r--)n=ys(we(r,e),n);return n}function y(e){return Fe(e,qe())}function gp(e){let t,n;if(un(e))return y(e);if(e instanceof bt)return e;{const r=qe();let s=r;const i=Oe(e);try{for(;i["System.Collections.IEnumerator.MoveNext"]();){const l=i["System.Collections.Generic.IEnumerator`1.get_Current"]();s=(t=s,n=new bt(l,void 0),t.tail=n,n)}}finally{xe(i)}const o=s,a=qe();return o.tail=a,ct(r)}}function st(e,t){return vn((n,r)=>ys(r,n),t,pi(e))}function $p(e,t){let n,r;const s=qe();let i=s,o=t;for(;!_n(o);){let c=e(Ln(o));for(;!_n(c);)i=(n=i,r=new bt(Ln(c),void 0),n.tail=r,r),c=ct(c);o=ct(o)}const a=i,l=qe();return a.tail=l,ct(s)}function wp(e,t){const n=qe(),r=pp((i,o,a)=>{const l=new bt(e(i,a),void 0);return o.tail=l,l},n,t),s=qe();return r.tail=s,ct(n)}function rr(e,t){const n=qe(),r=vn((i,o)=>{const a=new bt(e(o),void 0);return i.tail=a,a},n,t),s=qe();return r.tail=s,ct(n)}function yp(e,t){return(r=>{e:for(;;){const s=r;if(_n(s))return;{const i=e(Ln(s));if(i==null){r=ct(s);continue e}else return i}}})(t)}function bp(e,t){return yp(n=>e(n)?lt(n):void 0,t)}function _p(e,t){return((r,s)=>{e:for(;;){const i=r,o=s;if(_n(o))return;if(e(Ln(o)))return i;r=i+1,s=ct(o);continue e}})(0,t)}function vp(e,t){return((r,s)=>{e:for(;;){const i=r,o=s;if(_n(o))return;if(i===e)return lt(Ln(o));r=i+1,s=ct(o);continue e}})(0,t)}function dc(e,t){const n=qe(),r=vn((i,o)=>{if(e(o)){const a=new bt(o,void 0);return i.tail=a,a}else return i},n,t),s=qe();return r.tail=s,ct(n)}function xp(e,t){const n=qe(),r=qe(),s=n,i=vn((l,c)=>{let d,u;const m=l[0],h=l[1];return e(c)?[(d=new bt(c,void 0),m.tail=d,d),h]:[m,(u=new bt(c,void 0),h.tail=u,u)]},[s,r],t),o=qe();i[0].tail=o;const a=qe();return i[1].tail=a,[ct(s),ct(r)]}function fc(e,t){const n=qe(),r=vn((i,o)=>{const a=e(o);if(a==null)return i;{const l=new bt(D(a),void 0);return i.tail=l,l}},n,t),s=qe();return r.tail=s,ct(n)}function hc(e,t,n){return _p(r=>n.Equals(e,r),t)!=null}function Cp(e,t){const n=nr(t);return n.sort(e),y(n)}function Sp(e,t,n){return Cp((r,s)=>n.Compare(e(r),e(s)),t)}function Ap(e,t){return y(Vn(y,up(e,nr(t))))}function kp(e){return new g(0,[e])}function mc(e){return new g(1,[e])}class g extends j{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Ok","Error"]}}function xn(e,t){return t.tag===0?kp(e(t.fields[0])):mc(t.fields[0])}function Ep(e,t){return t.tag===0?e(t.fields[0]):mc(t.fields[0])}function ut(e){return e.tag===0}class Ip extends j{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["Name"]}}function pc(e){return new Ip(e)}function Po(e){return e.fields[0]}class Np extends j{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["Website"]}}class Tp extends j{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["FirstName"]}}class Mp extends j{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["LastName"]}}class Rp extends j{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["Email"]}}class Pp extends j{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["MobilePhone"]}}class Dp extends j{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["ExternalId"]}}let Op=class extends Q{constructor(t,n,r,s){super(),this.FirstName=t,this.LastName=n,this.Email=r,this.MobilePhone=s}};class Fp extends j{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["Notes"]}}class Vp extends j{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["PartnerId"]}}function Kt(e){return e.fields[0]}function Ve(e){return new Vp(e)}function $i(e){return Kt(e)}class Lp extends j{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["AccountId"]}}function Zt(e){return e.fields[0]}function Rt(e){return new Lp(e)}function wi(e){return Zt(e)}class Bp extends j{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["BusinessName"]}}class Up extends j{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["BusinessNumber"]}}class jp extends j{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["Address1"]}}class zp extends j{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["Address2"]}}class Hp extends j{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["City"]}}class Wp extends j{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["Postcode"]}}let Gp=class extends j{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["State"]}};class qp extends j{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["SalesforceParentRecordId"]}}class Kp extends j{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["ExternalApi","Admin"]}}new Kp(0,[]);function Zp(e){throw new Error(e)}const Jp="Enumeration already finished.",Yp="Enumeration has not started. Call MoveNext.",gc="The input sequence has an insufficient number of elements.",Xp="Reset is not supported on this enumerator.";function Qp(){throw new Error(Xp)}function Do(){throw new Error(Yp)}function Oo(){throw new Error(Jp)}class e0{constructor(t){this.f=t}toString(){const t=this;let n=0,r="seq [";const s=Oe(t);try{for(;n<4&&s["System.Collections.IEnumerator.MoveNext"]();)n>0&&(r=r+"; "),r=r+Ze(s["System.Collections.Generic.IEnumerator`1.get_Current"]()),n=n+1|0;return n===4&&(r=r+"; ..."),r+"]"}finally{xe(s)}}GetEnumerator(){return this.f()}[Symbol.iterator](){return us(Oe(this))}"System.Collections.IEnumerable.GetEnumerator"(){return this.f()}}function t0(e){return new e0(e)}class n0{constructor(t,n,r){this.current=t,this.next=n,this.dispose=r}"System.Collections.Generic.IEnumerator`1.get_Current"(){return this.current()}"System.Collections.IEnumerator.get_Current"(){return this.current()}"System.Collections.IEnumerator.MoveNext"(){return this.next()}"System.Collections.IEnumerator.Reset"(){Qp()}Dispose(){this.dispose()}}function yi(e,t,n){return new n0(e,t,n)}function r0(e){let t,n,r=!1,s=!1,i;const o=()=>{if(s=!0,n!=null){const a=D(n);try{xe(a)}finally{n=void 0}}if(t!=null){const a=D(t);try{xe(a)}finally{t=void 0}}};return yi(()=>(r?s&&Oo():Do(),i!=null?D(i):Oo()),()=>{let a;if(r||(r=!0),s)return!1;{let l;for(;l==null;){const c=t,d=n;if(c!=null)if(d!=null){const u=D(d);if(u["System.Collections.IEnumerator.MoveNext"]())i=lt(u["System.Collections.Generic.IEnumerator`1.get_Current"]()),l=!0;else try{xe(u)}finally{n=void 0}}else{const u=D(c);u["System.Collections.IEnumerator.MoveNext"]()?n=(a=u["System.Collections.Generic.IEnumerator`1.get_Current"](),Oe(a)):(o(),l=!1)}else t=Oe(e)}return D(l)}},()=>{s||o()})}function s0(e,t){return yi(()=>t["System.Collections.Generic.IEnumerator`1.get_Current"](),()=>t["System.Collections.IEnumerator.MoveNext"](),()=>{try{xe(t)}finally{}})}function $c(e,t,n){let r=!1,s,i=lt(e());const o=()=>{if(i!=null){const l=D(i);try{n(l)}finally{i=void 0}}},a=()=>{try{o()}finally{s=void 0}};return yi(()=>(r||Do(),s!=null?D(s):Oo()),()=>{if(r||(r=!0),i!=null){const l=D(i);let c;try{c=t(l)}catch(d){throw a(),d}return c!=null?(s=c,!0):(a(),!1)}else return!1},o)}function i0(e,t){let n,r=t;return yi(()=>{if(n!=null){const s=D(n)[0];return D(n)[1],s}else return Do()},()=>(n=e(r),n!=null?(D(n)[0],r=D(n)[1],!0):!1),()=>{})}function o0(e,t){t==null&&Zp(e)}function Dr(e){return t0(e)}function Cn(e){return o0("source",e),Oe(e)}function k(e){return Dr(()=>Oe(e()))}function Fo(e){return Dr(()=>r0(e))}function a0(e,t){return Dr(()=>i0(e,t))}function Ke(){return k(()=>new Array(0))}function A(e){return k(()=>op(e))}function Ux(e){return e}function Vo(e){return e instanceof bt?nr(e):Array.from(e)}function se(e){return un(e)?y(e):e instanceof bt?e:gp(e)}function wc(e,t,n){return Dr(()=>$c(e,t,n))}function yc(e,t,n){return Dr(()=>{let r=-1;return $c(e,s=>(r=r+1|0,t(r,s)),n)})}function M(e,t){return Fo([e,t])}function bs(e,t){return wc(()=>Cn(t),n=>{let r;for(;r==null&&n["System.Collections.IEnumerator.MoveNext"]();)r=e(n["System.Collections.Generic.IEnumerator`1.get_Current"]());return r},n=>{xe(n)})}function l0(e,t,n){const r=Cn(t);try{const s=Cn(n);try{let i=0,o=r["System.Collections.IEnumerator.MoveNext"](),a=s["System.Collections.IEnumerator.MoveNext"]();for(;i===0&&o&&a;)i=e(r["System.Collections.Generic.IEnumerator`1.get_Current"](),s["System.Collections.Generic.IEnumerator`1.get_Current"]())|0,i===0&&(o=r["System.Collections.IEnumerator.MoveNext"](),a=s["System.Collections.IEnumerator.MoveNext"]());return(i!==0?i:o?1:a?-1:0)|0}finally{xe(s)}}finally{xe(r)}}function Or(e,t,n){const r=Cn(t);try{let s=!1;for(;!s&&r["System.Collections.IEnumerator.MoveNext"]();)s=n.Equals(e,r["System.Collections.Generic.IEnumerator`1.get_Current"]());return s}finally{xe(r)}}function _s(e,t,n){const r=Cn(n);try{let s=t;for(;r["System.Collections.IEnumerator.MoveNext"]();)s=e(s,r["System.Collections.Generic.IEnumerator`1.get_Current"]());return s}finally{xe(r)}}function Fr(e,t){_s((n,r)=>{e(r)},void 0,t)}function c0(e,t){_s((n,r)=>(e(n,r),n+1|0),0,t)}function Le(e,t){return wc(()=>Cn(t),n=>n["System.Collections.IEnumerator.MoveNext"]()?lt(e(n["System.Collections.Generic.IEnumerator`1.get_Current"]())):void 0,n=>{xe(n)})}function Lo(e,t){return yc(()=>Cn(t),(n,r)=>r["System.Collections.IEnumerator.MoveNext"]()?lt(e(n,r["System.Collections.Generic.IEnumerator`1.get_Current"]())):void 0,n=>{xe(n)})}function u0(e){return k(()=>ap(Vo(e)))}function d0(e,t){return Dr(()=>{const n=Cn(t);try{for(let r=1;r<=e;r++)if(!n["System.Collections.IEnumerator.MoveNext"]())throw new Error(gc+"\\nParameter name: source");return s0(()=>{},n)}catch(r){throw xe(n),r}})}function f0(e,t){return yc(()=>Cn(t),(n,r)=>{if(n<e){if(r["System.Collections.IEnumerator.MoveNext"]())return lt(r["System.Collections.Generic.IEnumerator`1.get_Current"]());throw new Error(gc+"\\nParameter name: source")}else return},n=>{xe(n)})}function h0(e,t){return k(()=>Fo(Le(e,t)))}const sr={None:0,LowerFirst:1,SnakeCase:2,SnakeCaseAllCaps:3,KebabCase:4};function Bo(e,t){return e.replace(/[a-z]?[A-Z]/g,n=>n.length===1?n.toLowerCase():n.charAt(0)+t+n.charAt(1).toLowerCase())}function m0(e,t){switch(t){case sr.LowerFirst:return e.charAt(0).toLowerCase()+e.slice(1);case sr.SnakeCase:return Bo(e,"_");case sr.SnakeCaseAllCaps:return Bo(e,"_").toUpperCase();case sr.KebabCase:return Bo(e,"-");case sr.None:default:return e}}function Bn(e,t=sr.None){const n={},r=t;function s(o){throw new Error("Cannot infer key and value of "+String(o))}function i(o,a,l){o=m0(o,a),n[o]=l}for(let o of e){let a=sr.None;if(o==null&&s(o),o instanceof j){const l=o.cases()[o.tag];o=o.fields.length===0?l:[l].concat(o.fields),a=r}if(Array.isArray(o))switch(o.length){case 0:s(o);break;case 1:i(o[0],a,!0);break;case 2:const l=o[1];i(o[0],a,l);break;default:i(o[0],a,o.slice(1))}else typeof o=="string"?i(o,a,!0):s(o)}return n}function bc(e,t,n){return e.has(t)?(n.contents=e.get(t),!0):!1}function vs(e,t){if(e.has(t))return e.get(t);throw new Error(`The given key '${t}' was not present in the dictionary.`)}class p0{constructor(t,n){const r=new yt(ge());this.comparer=n,r.contents=this,this.hashMap=new Map([]),this["init@9"]=1;const s=Oe(t);try{for(;s["System.Collections.IEnumerator.MoveNext"]();){const i=s["System.Collections.Generic.IEnumerator`1.get_Current"]();Uo(r.contents,i[0],i[1])}}finally{xe(s)}}get[Symbol.toStringTag](){return"Dictionary"}toJSON(){const t=this;return Array.from(t)}"System.Collections.IEnumerable.GetEnumerator"(){return Oe(this)}GetEnumerator(){return Oe(Fo(this.hashMap.values()))}[Symbol.iterator](){return us(Oe(this))}"System.Collections.Generic.ICollection`1.Add2B595"(t){Uo(this,t[0],t[1])}"System.Collections.Generic.ICollection`1.Clear"(){_c(this)}"System.Collections.Generic.ICollection`1.Contains2B595"(t){const r=bi(this,t[0]);let s;switch(r!=null&&Ce(D(r)[1],t[1])?(s=0,D(r)):s=1,s){case 0:return!0;default:return!1}}"System.Collections.Generic.ICollection`1.CopyToZ3B4C077E"(t,n){c0((s,i)=>{Tt(t,n+s,i)},this)}"System.Collections.Generic.ICollection`1.get_Count"(){return vc(this)|0}"System.Collections.Generic.ICollection`1.get_IsReadOnly"(){return!1}"System.Collections.Generic.ICollection`1.Remove2B595"(t){const n=this,r=bi(n,t[0]);return r!=null?(Ce(D(r)[1],t[1])&&jo(n,t[0]),!0):!1}"System.Collections.Generic.IDictionary`2.Add5BDDA1"(t,n){Uo(this,t,n)}"System.Collections.Generic.IDictionary`2.ContainsKey2B595"(t){return Sc(this,t)}"System.Collections.Generic.IDictionary`2.get_Item2B595"(t){return xc(this,t)}"System.Collections.Generic.IDictionary`2.set_Item5BDDA1"(t,n){Cc(this,t,n)}"System.Collections.Generic.IDictionary`2.get_Keys"(){const t=this;return Vo(k(()=>Le(n=>n[0],t)))}"System.Collections.Generic.IDictionary`2.Remove2B595"(t){return jo(this,t)}"System.Collections.Generic.IDictionary`2.TryGetValue6DC89625"(t,n){const s=bi(this,t);if(s!=null){const i=D(s);return n.contents=i[1],!0}else return!1}"System.Collections.Generic.IDictionary`2.get_Values"(){const t=this;return Vo(k(()=>Le(n=>n[1],t)))}get size(){return vc(this)|0}clear(){_c(this)}delete(t){return jo(this,t)}entries(){return Le(n=>[n[0],n[1]],this)}get(t){return xc(this,t)}has(t){return Sc(this,t)}keys(){return Le(n=>n[0],this)}set(t,n){const r=this;return Cc(r,t,n),r}values(){return Le(n=>n[1],this)}forEach(t,n){const r=this;Fr(s=>{t(s[1],s[0],r)},r)}}function xs(e,t){const n=e.comparer.GetHashCode(t)|0;let r,s=ge();return r=[bc(e.hashMap,n,new yt(()=>s,i=>{s=i})),s],r[0]?[!0,n,r[1].findIndex(i=>e.comparer.Equals(t,i[0]))]:[!1,n,-1]}function bi(e,t){const n=xs(e,t);let r;switch(n[0]&&n[2]>-1?r=0:r=1,r){case 0:return vs(e.hashMap,n[1])[n[2]];default:return}}function _c(e){e.hashMap.clear()}function vc(e){let t=0,n=Oe(e.hashMap.values());try{for(;n["System.Collections.IEnumerator.MoveNext"]();){const r=n["System.Collections.Generic.IEnumerator`1.get_Current"]();t=t+r.length|0}}finally{xe(n)}return t|0}function xc(e,t){const n=bi(e,t);if(n!=null)return D(n)[1];throw new Error("The item was not found in collection")}function Cc(e,t,n){const r=xs(e,t);r[0]?r[2]>-1?vs(e.hashMap,r[1])[r[2]]=[t,n]:vs(e.hashMap,r[1]).push([t,n]):e.hashMap.set(r[1],[[t,n]])}function Uo(e,t,n){const r=xs(e,t);if(r[0]){if(r[2]>-1)throw new Error(sc("An item with the same key has already been added. Key: {0}",t));vs(e.hashMap,r[1]).push([t,n])}else e.hashMap.set(r[1],[[t,n]])}function Sc(e,t){const n=xs(e,t);let r;switch(n[0]&&n[2]>-1?r=0:r=1,r){case 0:return!0;default:return!1}}function jo(e,t){const n=xs(e,t);let r;switch(n[0]&&n[2]>-1?r=0:r=1,r){case 0:return vs(e.hashMap,n[1]).splice(n[2],1),!0;default:return!1}}function g0(e){return new Ac(0,[e])}function $0(e){return new Ac(1,[e])}class Ac extends j{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Choice1Of2","Choice2Of2"]}}function w0(e){return g0(e)}function y0(e){return $0(e)}const b0=/^[\(\{]{0,2}[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}[\)\}]{0,2}$/,kc=/^([0-9a-f]{8})([0-9a-f]{4})([0-9a-f]{4})([0-9a-f]{4})([0-9a-f]{12})$/,_0=/^\{0x[0-9a-f]{8},(0x[0-9a-f]{4},){2}\{(0x[0-9a-f]{2},){7}0x[0-9a-f]{2}\}\}$/;function v0(e){function t(r){return r.replace(kc,"$1-$2-$3-$4-$5")}const n=e.trim().toLowerCase();if(b0.test(n))return tp(n,"{","}","(",")");if(kc.test(n))return t(n);if(_0.test(n))return t(n.replace(/[\{\},]|0x/g,""));throw new Error("Guid should contain 32 digits with 4 dashes: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx")}function x0(e,t){try{return t.contents=v0(e),!0}catch{return!1}}class Ec extends j{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["StreamId"]}}function Vr(e){return e.fields[0]}var zo;(function(e){e[e.AllowHexSpecifier=512]="AllowHexSpecifier"})(zo||(zo={}));function C0(e,t){const[,n,r,s]=e;return{sign:n||"",prefix:r||"",digits:s,radix:t}}function Ic(e,t){switch(t){case 8:return e?[0,255]:[-128,127];case 16:return e?[0,65535]:[-32768,32767];case 32:return e?[0,4294967295]:[-2147483648,2147483647];default:throw new Error("Invalid bit size.")}}function S0(e){switch(e){case 2:return/[^0-1]/;case 8:return/[^0-7]/;case 10:return/[^0-9]/;case 16:return/[^0-9a-fA-F]/;default:throw new Error("Invalid Base.")}}function A0(e,t){if(t&zo.AllowHexSpecifier)return 16;switch(e){case"0b":case"0B":return 2;case"0o":case"0O":return 8;case"0x":case"0X":return 16;default:return 10}}function k0(e,t,n){const s=/^\s*([\+\-])?(0[xXoObB])?([0-9a-fA-F]+)\s*$/.exec(e.replace(/_/g,""));if(s!=null){const[,,i,o]=s;if(n=n||A0(i,t),!S0(n).test(o))return C0(s,n)}return null}function E0(e,t,n,r,s){const i=k0(e,t,s);if(i!=null){let o=Number.parseInt(i.sign+i.digits,i.radix);if(!Number.isNaN(o)){const[a,l]=Ic(!0,r);!n&&i.radix!==10&&o>=a&&o<=l&&(o=o<<32-r>>32-r);const[c,d]=Ic(n,r);if(o>=c&&o<=d)return o}}throw new Error(`The input string ${e} was not in a correct format.`)}function Lr(e,t,n,r,s){try{return s.contents=E0(e,t,n,r),!0}catch{return!1}}const I0="#C$&$&$$$$$$%-%&%=$$$$$$=$$$$D$$'$$$$$$$$$$$$%$$%$$$$&$:$*;$+$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%$$$$$$$$$$$$$$$%$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%$$$$&%$$$%$&%'$%$&&%$%$$$$$%$$%$$%$&$$$%%$$&'$$$$$$$$$$$$$$$$$$$$$$$$%$$$$$$$$$$$$$$$$$%$$$$$&$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$*%$%%$$'$$$$$$$$h$>5'/1(*$$$4“$$$$$$$$%$&$$'%$$&$$$%$4$,F$%&&$$$$$$$$$$$$$$$$$$$$$$$($$$$$%%VS$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$(%$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%$$$$$$$$$$$$%$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$I%$)L$$%%$$P$$$%$%$$+>''%.)&%$%%.$$$%C$-8-'%$†$$*$$)%%$'%-&%$1$$$$A>%|.$1-D,%$&$%$%9'$,$&$(%2$<&%$$.X8$5.2$C$Y$$$$&+'$%$*-%%-$$2$%$+%%%9$*$$&'%$$&'%%%%$$+$'%$&%%-%%)$$$$$%%$$)'%%9$*$%$%$%%$$&%'%%&&$*'$$*-%&$$-%$$,$&$9$*$%$(%$$&($%$$%$%$2%%%-$$*$)$$%$+%%%9$*$%$(%$$$$$'%%%%$*%$'%$&%%-$$)-$$$)&&$'&%$$$%&%&&&/'%$%&&$&$%$)$1-&)$$($&$+$&$:$3&$&'$&$'*%$&(%%%-*$*$$$%$+$&$:$-$(%$$$$($$%$%%*%*$$%%%-$%0%%,$&$L%$&'$&$&$$$'&$*&%%-,$)$$%$5&;$,$$%*&$'&&$$$+)-%%$/S$%*'$)$+$-%H%$$$($;$$$-$%,$%($$$)%-%'C$&2$$&%)--$$$$$$$$$$%+$G'1$($%(.$G$+$)$%('%HN%'$)$%%%$-))%%'&$&%*&'0$%%)$$$-&$%I$$($%N$$&Ŭ$'%*$$$'%L$'%D$'%*$$$'%2$\\$'%f%&,7&3-)y%)%$ʏ$$4$=$$&n&&+*0$'&.5&%,5%/0$&$%/W%$*+$%.&$&$$$%-)-))$'&$$-)F$X*(%E$$(i-B$&'%&'%$)&'$&%-A%(.O'=)-$&E:%%$%%X$$$*$$$$%+)-%$-)-)*$)%1$%b'$R$$($$($%*'-*-,,&%$A$'%%$&%-O$$%&$$&%+'G++%%&(-&&-A)%,*N%&++&$0$*'$)$%$%$(Ob0$EH]$($$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$,$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$,+)%)%++++)%)%+$$$$$$$$++1%++++++($%'$$$&&$%'$&'%%'$&+(&%&$%'$%$.()%$$$%$$$+$$($,$$'%&$$$.$$$-$($-$$%)&$$$-&$$$0&C30'$&/2%$'$%$&%&$$$%$()$$$$$$'$$'$'$%%%($'$$%$$3F$$'$%'((%'$%$%$*$B%%$$$Bį+$$$$7%*$$t$A<K)h<.8_q9Ú$,$Y+’$ě$$$$$$$$$$$$$$AO($$B$$$$$$$$$$3ģ¦$$$$$$$$$$$$$$$$$$$$$$b$$$$C$$ĥS8%)J%C$ŒR$R$$$&%$$$$$$'$$%$)%&$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%)$$$$&$$('$%I$$($%[*$$1$:,*$*$*$*$*$*$*$*$C%$$$$&$$$$$,$%$$$$%$$$$$$$$$$($-%'$$$0%$P=$|/ù=/'$&$$$$$$$$$$$$$$%$$$$$$$$$$%$,'%$(%&$$$%$y%%%%$$}$&$(N$$%'-CG/3B$-A+$2C-J2ţ᧣c删&8$Қ&Z,K)%į$&3-%7$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$&$-$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%%i-%)+:,%$$$$$$$$$$$$$&$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$+$$$$%$$$$$$$$$$%$$$$$$$$&$$$$$$$$$$$$$$$$$$$$($($$$$$$$$$$$%$$'$$$M$$$%$*$&$'$:%%$'$&)%$$)W'+%U3%+%-)5)&$$%$-?+%:.%.$@&&$R$%'%%&0$$-'%($$,-($L)%%%%,&$+$$%-%'3$)&$$$$U$$&%%(%$$$;%$%.$%%%$%$$-)%)%),*$*$N$',$%'sF%$%$%$$$%-)⯇/:'T'ࠣᤣƑ%I*/(($$-$0$($$$%$%$34Ǝ$$3c%YK/$$%3*$$$)3$%%$$$$$$$$$$$$$$$$%$$'&&$'$$$$$$$&$$&$$$%'($ª%$$&$&$$$$$$%-%&%=$$$$$$=$$$$$$$$$%-$P%B&)%)%)%&&%$$$%$$'%-&%%/$=$6$%$2%1Ež(&'P&,X'4%&$0&$RP$¥@&T2$>'C',7$+$(I((A$$G'+$(MKKq%-)G'G'K+W.$³Ś,9-+»)%$$O$%&$%:$$+:%*B+,S6$%((9)&$=($c['%%3%Q$&$%(''$&$@%&'$,*,*@%$@&C+$?%'(*,Y&*9%+6(+5*'/*slZV0V*)G'+-ʼnB$M$%$%%q@-$+9.'(y8*7:,$$$X2*'7-2&$P&'%%%$'.$%<*-)&G($+$-'$%$+F$%$,%$S&,%'''$$$-$$$&$7.5$<&&%$$%)$d*$$$'$2$-$)R$&+(-)%%$+%%%9$*$%$($%$%$'%%%&%$)$((%%*&(®X&+%&$$'(-%$$$&AS&)$$'%$%%$$+-ÉR&'%'%$%:'%ES&+%$$%&$.-)06N$$$%)$$$*-Y>%&%'$('-%&$ãO&,$%$‡CC-,/+%$%+$%$;)$%%%$$$$$$$&,-i+%J&'%%'$$$$$>$-K)$$'+$+$)%&Q0$%&$(@\\Ī,$H$*$)$$$(--6&%A%9$$*$%$%l*$%$I)&$$%$*$$+-))$%$C($%$%$$$$*-ř6%%%Ú$28+'40$ν‰’$(.ç૟ђ$,࿪ɪ⇜ɜ*B$-'%ƒA%($-S*(''$$--$*$8(6˓CC:'ˆn'$$Z*'0c%$$$.%1᠛+ӹM,⌚łT&4'+ƯधŽ(0&,*-%$%$'፿ę-J%_%&&)++%*A'^:e&$½7/z,<ª===*$5==$$%%$%%%'$+'$$$*$.==%$'%+$*$=%$'$($$&*$============?%<$<$)<$<$)<$<$)<$<$)<$<$)$$%UȣZ'U+$1$%(2($2ճ*$4%*$%$(øP&**%-'$$ƓO'-($ԣè%,*LEE*$'-'%̴^$&$'oP$2å'$>$%$$%$$-$'$$$$)$'$$$$$$&$%$$%$$$$$$$$$$%$$%'$*$'$'$$$-$4(&$($4W%ıO'‡/2%2$2$H-0Ä[@0O',*%1)½Ğ(˻+0&0&—/|*/7/'[+-)K+A%%qœ$u$ª/1%(&&(*,<**,&0*L¶$ZH-Щ꜁Eၘ.ā%ᚥ1ᵔూɁ؅፮򮳙$Aƒ£ē︳𐀡%𐀡",N0="1.;=;78;<;6;+;<;#7;8>5>$7<8<1.;=?;>?'9<2?>?<->$;>-':-;#<#$<$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$'#$'#%$#%$#%$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#%$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$'$&>&>&>&>&>(#$#$&>#$@&$;#@>#;#@#@#$#@#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$<#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$?(*#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$@#@&;$;6@?=@(6(;(;(;(@'@';@2<;=;?(;2@;'&'(+;'(';'(2?(&(?('+'?';@2'('(@'('@+'(&?;&@(='(&(&(&(@;@'(@;@'@'@'@(2()'()(')()()'('(;+;&'()@'@'@'@'@'@'@(')(@)@)('@)@'@'(@+'=-?=';(@()@'@'@'@'@'@'@'@(@)(@(@(@(@'@'@+('(;@()@'@'@'@'@'@'@(')(@()@)(@'@'(@+;=@'(@()@'@'@'@'@'@'@(')()(@)@)(@()@'@'(@+?'-@('@'@'@'@'@'@'@'@'@'@)()@)@)(@'@)@+-?=?@()('@'@'@'@'()@(@(@(@'@'(@+@;-?'();'@'@'@'@'@(')()@()@)(@)@'@'(@+@'@()'@'@'(')(@)@)('?@')-'(@+-?'@()@'@'@'@'@'@(@)(@(@)@+@);@'('(@='&(;+;@'@'@'@'@'@'('('@'@&@(@+@'@'?;?;?(?+-?(?(?(7878)'@'@()(;('(@(@?(?@?;?;@')()()()('+;')('(')')'('()()(')+)(?#@#@#@$;&$'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@(;-@'?@#@$@6'?;'.'78@';,'@'@'(@'(;@'(@'@'@(@'()()()(;&;='(@+@-@;6;(2@+@'&'@'('('@'@'@()()@)()(@?@;+'@'@'@'@+-@?'()(@;')()(@()()()(@(+@+@;&;@(*(@()'()()()()'@+;?(?@()')()()('+'()()()()@;')()(@;+@'+'&;$@#@#;@(;()('('(')('@$&$&$&(@(#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$@#@$#$#$@#@$@#@#@#@#$#$@$%$%$%$@$#%>$>$@$#%>$@$#@>$#>@$@$#%>@.26;9:79:79;/02.;9:;5;<78;<;5;.2@2-&@-<78&-<78@&@=@(*(*(@?#?#?$#$#$?#?<#?#?#?#?#?$#$'$?$#<#$?<?$?-,#$,-?@<?<?<?<?<?<?<?<?<?<?7878?<?78?<?<?<?@?@-?-?<?<?<?<?78787878787878-?<78<7878787878<?<7878787878787878787878<7878<78<?<?<?@?@?#@$@#$#$#$#$#$#$#$#$&#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$?#$#$(#$@;-;$@$@$@'@&;@('@'@'@'@'@'@'@'@'@(;9:9:;9:;9:;6;6;9:;9:78787878;&;6;6;7;?;@?@?@?@?@.;?&',7878787878?78787878678?,()6&?,&';?@'@(>&'6';&'@'@'@?-?'?@'?@-?-?-?-?-?'?'@'&'@?@'&;'&;'+'@#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$'(*;(;&#$#$#$#$#$#$#$#$#$#$#$#$#$#$&(',(;@>&>#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$&$#$#$#$#$#$#$#$&>#$#$'#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$@#$#$#$@#$'&$'('('(')()?(@-?=?@';@)')(@;+@(';';'(+'(;'()@;'@()'()()();@&+@;'(&'+'@'()()(@'('()@+@;'&'?')()'('('('('('@'&;')();'&)(@'@'@'@'@'@$>&$&>@$')()();)(@+@'@'@'@34'@'@$@$@'('<'@'@'@'@'@'>@'87@'@'@'=?@(;78;@(;657878787878787878;78;5;@;6787878;<6<@;=;@'@'@2@;=;78;<;6;+;<;#7;8>5>$7<8<78;78;'&'&'@'@'@'@'@=<>?=@?<?@2?@'@'@'@'@'@'@'@;@-@?,-?-?@?@?@?(@'@'@(-@'-@',',@'(@'@;'@';,@#$'@+@#@$@'@'@;@'@'@'@'@'@'@'@'@'@;-'?-'@-@'@'@-'-@;'@;@'@-'-@-'(@(@('@'@'@(@(-@;@'-;'-@'?'(@-;@'@;'@-'@-'@;@-@'@#@$@-'(@+@-@'@(6@'@'-'@'(-;@'-@'@)()'(;@-+@()')()(;2;@2@'@+@('()(@+;')'@'(;'@()')()';(;)(+';';@-@'@')()()(;(@'@'@'@'@';@'()(@+@()@'@'@'@'@'@'@(')()@)@)@'@)@')@(@(@')()()(';+;@;('@')()()()(';'@+@')(@)()(;'(@')()()(;'@+@;@'()()()('@+@'@()()(@+-;?@')()(;@#$+-@'@'@'@'@')@)@()(')')(;@+@'@')(@()(';')@'('()'(;(@'()('()(;';@'@'@')(@()(';@+-@;'@(@)()()(@'@'@'(@(@(@('(@+@'@'@')@(@)()('@+@'();@'@-?=?@;'@,@;@'@'@2@'@'@'@+@;@'@(;@'(;?&;?@+@-@'@'@#$-;@'@(')@(&@&;&(@)@'@'@'@'@'@'@'@'@'@'@'@?(;2@?@?@?)(?)2(?(?(?@?(?@-@?@-@#$#$@$#$#@#@#@#@#@#$@$@$@$#$#@#@#@#@$#@#@#@#@#@$#$#$#$#$#$#$@#<$<$#<$<$#<$<$#<$<$#<$<$#$@+?(?(?(?(?;@(@(@(@(@(@(@(@'@(&@+@'?@'(+@=@'@-(@#$(&@+@;@-?-=-@-?-@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@<@?@?@?@?@?@?@-?@?@?@?@?@?@?>?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@+@'@'@'@'@'@'@'@2@2@(@4@4@";function T0(){const t=[...I0].map(i=>(i.codePointAt(0)??0)-35),n=[...N0].map(i=>(i.codePointAt(0)??0)-35),r=new Uint32Array(t),s=new Uint8Array(n);for(let i=1;i<r.length;++i)r[i]+=r[i-1];return i=>{let o=r.length,a=0;for(;o-a>1;){const l=Math.floor((o+a)/2),c=r[l];if(i<c)o=l;else if(i===c){o=a=l;break}else c<i&&(a=l)}return s[a]}}const M0=256,R0=T0();function P0(e,t){if(t<e.length)return e.charCodeAt(t);throw new Error("Index out of range.")}const D0=e=>F0(e,0);function O0(e,t){const n=P0(e,t);return R0(n)}function F0(e,t){return(1<<O0(e,t)&M0)!==0}function V0(e,t){const n=Zm(Jl(e),t);if(n!=null)return _(se(k(()=>Le(r=>r||"",n))))}function L0(e){let t;const n=V0(".*?@(.*)",e);switch(n!=null?K(n)?t=1:K(_(n))?t=0:t=1:t=1,t){case 0:return e;default:return}}function B0(e,t){return t.length<=e?new g(0,[t]):new g(1,[`Value exceeds maximum length of ${e}`])}function St(e,t){return di(t)?new g(1,[qt(jt("%s cannot be null or empty"))(e)]):new g(0,[t])}function U0(e){const t=L0(e);if(t!=null){const n=t;return new g(0,[n])}else return new g(1,["Email is not in the correct format"])}function j0(e){return~~e.charCodeAt(0)-48}function z0(e){let t;const n=new g(1,["BusinessNumber is not valid"]),r=new Int32Array([10,1,3,5,7,9,11,13,15,17,19]),s=Vn(j0,(t=e.split(""),t.filter(D0)),Int32Array);return s.length===11?(Tt(s,0,we(0,s)-1|0),dp(ip((i,o)=>i*o,s,r,Int32Array),{GetZero:()=>0,Add:(i,o)=>i+o})%89===0?new g(0,[e]):n):n}function Ho(e){const t=St("Name",e);return t.tag===1?new g(1,[t.fields[0]]):new g(0,[pc(t.fields[0])])}function _i(e){return Po(e)}function Nc(e){const t=St("Website",e);return t.tag===1?new g(1,[t.fields[0]]):new g(0,[new Np(t.fields[0])])}function Tc(e){return e.fields[0]}function Mc(e){const t=St("FirstName",e);return t.tag===1?new g(1,[t.fields[0]]):new g(0,[new Tp(t.fields[0])])}function Rc(e){return e.fields[0]}function Pc(e){const t=St("LastName",e);return t.tag===1?new g(1,[t.fields[0]]):new g(0,[new Mp(t.fields[0])])}function Dc(e){return e.fields[0]}function Oc(e){let t;const n=St("Email",e);return t=n.tag===1?new g(1,[n.fields[0]]):U0(n.fields[0]),t.tag===1?new g(1,[t.fields[0]]):new g(0,[new Rp(t.fields[0])])}function Fc(e){const t=St("MobilePhone",e);return t.tag===1?new g(1,[t.fields[0]]):new g(0,[new Pp(t.fields[0])])}function Vc(e){return e.fields[0]}class Lc extends Q{constructor(t,n,r,s){super(),this.FirstName=t,this.LastName=n,this.Email=r,this.MobilePhone=s}}function Wo(){return at("AccountRegistry.Shared.Primitives.ContactDetails",[],Lc,()=>[["FirstName",H],["LastName",H],["Email",H],["MobilePhone",H]])}function H0(e){const t=Mc(e.FirstName);if(t.tag===1)return new g(1,[t.fields[0]]);{const n=Pc(e.LastName);if(n.tag===1)return new g(1,[n.fields[0]]);{const r=Oc(e.Email);if(r.tag===1)return new g(1,[r.fields[0]]);{const s=Fc(e.MobilePhone);return s.tag===1?new g(1,[s.fields[0]]):new g(0,[new Op(t.fields[0],n.fields[0],r.fields[0],s.fields[0])])}}}}function W0(e){const t=e;if(t!=null)return new Fp(t)}function G0(e){if(e!=null)return e.fields[0]}const q0=e=>{let t;const n=St("ExternalId",e);return t=n.tag===1?new g(1,[n.fields[0]]):B0(60,n.fields[0]),t.tag===1?new g(1,[t.fields[0]]):new g(0,[new Dp(t.fields[0])])};function dt(e){return Kt(e)}function dn(e){return Zt(e)}function Bc(e){const t=St("BusinessName",e);return t.tag===1?new g(1,[t.fields[0]]):new g(0,[new Bp(t.fields[0])])}function Uc(e){let t;const n=St("BusinessNumber",e);return t=n.tag===1?new g(1,[n.fields[0]]):z0(n.fields[0]),t.tag===1?new g(1,[t.fields[0]]):new g(0,[new Up(t.fields[0])])}function K0(e){const t=St("Address1",e);return t.tag===1?new g(1,[t.fields[0]]):new g(0,[new jp(t.fields[0])])}function Z0(e){const t=e;if(t!=null)return new zp(t)}function J0(e){const t=St("City",e);return t.tag===1?new g(1,[t.fields[0]]):new g(0,[new Hp(t.fields[0])])}function Y0(e){const t=St("Postcode",e);return t.tag===1?new g(1,[t.fields[0]]):new g(0,[new Wp(t.fields[0])])}function X0(e){const t=St("State",e);return t.tag===1?new g(1,[t.fields[0]]):new g(0,[new Gp(t.fields[0])])}class jc extends Q{constructor(t,n,r,s,i,o,a,l,c){super(),this.BusinessName=t,this.BusinessNumber=n,this.Address1=r,this.Address2=s,this.City=i,this.Postcode=o,this.State=a,this.Phone=l,this.CountryCode=c}}function Q0(){return at("AccountRegistry.Shared.Primitives.LegalEntity",[],jc,()=>[["BusinessName",H],["BusinessNumber",H],["Address1",H],["Address2",ye(H)],["City",H],["Postcode",H],["State",ye(H)],["Phone",H],["CountryCode",ye(H)]])}function eg(e){const t=St("SalesforceParentRecordId",e);return t.tag===1?new g(1,[t.fields[0]]):new g(0,[new qp(t.fields[0])])}class zc extends Q{constructor(t,n){super(),this.SalesforceParentRecordId=t,this.SalesforceRecordId=n}}function tg(){return at("AccountRegistry.Shared.Primitives.SalesforceInfo",[],zc,()=>[["SalesforceParentRecordId",H],["SalesforceRecordId",ye(H)]])}class Hc extends Q{constructor(t,n){super(),this.Code=t,this.Name=n}}function ng(){return at("AccountRegistry.Shared.Primitives.AnzsicClassifier",[],Hc,()=>[["Code",H],["Name",H]])}class Go extends j{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Api","Direct"]}}function vi(){return _o("AccountRegistry.Shared.Primitives.AccountProvisioningModeDto",[],Go,()=>[[],[]])}function Wc(e){return e.tag===1?"Direct":"API"}let rg=class extends Q{constructor(t,n,r,s,i,o){super(),this.StreamId=t,this.Name=n,this.Website=r,this.ContactDetails=s,this.Notes=i,this.AccountProvisioningMode=o}};function sg(){return at("AccountRegistry.Shared.AdminApi.Partner",[],rg,()=>[["StreamId",H],["Name",H],["Website",H],["ContactDetails",ye(Wo())],["Notes",ye(H)],["AccountProvisioningMode",vi()]])}class Gc extends Q{constructor(t,n,r,s,i,o,a,l,c,d){super(),this.StreamId=t,this.PartnerId=n,this.Name=r,this.Website=s,this.ContactDetails=i,this.Notes=o,this.LegalEntity=a,this.ExternalId=l,this.ChannelId=c,this.ProvisioningMode=d}}function ig(){return at("AccountRegistry.Shared.AdminApi.Account",[],Gc,()=>[["StreamId",H],["PartnerId",H],["Name",H],["Website",H],["ContactDetails",ye(Wo())],["Notes",ye(H)],["LegalEntity",ye(Q0())],["ExternalId",ye(H)],["ChannelId",ye(H)],["ProvisioningMode",vi()]])}class og extends Q{constructor(t,n,r,s,i,o,a,l,c,d){super(),this.AccountId=t,this.Name=n,this.Contact=r,this.ContactMobilePhone=s,this.Website=i,this.BusinessName=o,this.BusinessNumber=a,this.ExternalId=l,this.ChannelId=c,this.ProvisioningMode=d}}function ag(){return at("AccountRegistry.Shared.AdminApi.AccountLookupItem",[],og,()=>[["AccountId",H],["Name",H],["Contact",ye(H)],["ContactMobilePhone",ye(H)],["Website",H],["BusinessName",ye(H)],["BusinessNumber",ye(H)],["ExternalId",ye(H)],["ChannelId",ye(H)],["ProvisioningMode",vi()]])}class qc extends Q{constructor(t,n){super(),this.Accounts=t,this.Token=n}}function lg(){return at("AccountRegistry.Shared.AdminApi.AccountLookup",[],qc,()=>[["Accounts",vo(ag())],["Token",ye(H)]])}class cg extends Q{constructor(t,n){super(),this.PartnerId=t,this.AccountId=n}}function ug(){return at("AccountRegistry.Shared.AdminApi.FindAccountResponse",[],cg,()=>[["PartnerId",H],["AccountId",H]])}class dg extends Q{constructor(t,n){super(),this.ClassCode=t,this.ClassTitle=n}}function fg(){return at("AccountRegistry.Shared.AdminApi.AnzsicClass",[],dg,()=>[["ClassCode",H],["ClassTitle",H]])}class hg extends Q{constructor(t,n,r){super(),this.GroupCode=t,this.GroupTitle=n,this.Classes=r}}function mg(){return at("AccountRegistry.Shared.AdminApi.AnzsicGroup",[],hg,()=>[["GroupCode",H],["GroupTitle",H],["Classes",Rl(fg())]])}class pg extends j{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Success","TooManyResults"]}}function gg(){return _o("AccountRegistry.Shared.AdminApi.AnzsicSearchResult",[],pg,()=>[[["Item",Rl(mg())]],[]])}class Kc extends Q{constructor(t,n,r,s,i,o,a,l,c){super(),this.BusinessName=t,this.BusinessNumber=n,this.Address1=r,this.Address2=s,this.City=i,this.Postcode=o,this.State=a,this.Phone=l,this.CountryCode=c}}function $g(){return at("AccountRegistry.Shared.AdminApi.Write.LegalEntityV2",[],Kc,()=>[["BusinessName",H],["BusinessNumber",H],["Address1",H],["Address2",ye(H)],["City",H],["Postcode",H],["State",ye(H)],["Phone",H],["CountryCode",H]])}class Zc extends Q{constructor(t,n,r,s,i,o,a,l,c){super(),this.Name=t,this.Website=n,this.ContactDetails=r,this.Notes=s,this.LegalEntity=i,this.ExternalId=o,this.ChannelId=a,this.SalesforceInfo=l,this.AnzsicClassifier=c}}function wg(){return at("AccountRegistry.Shared.AdminApi.Write.AccountPost",[],Zc,()=>[["Name",H],["Website",H],["ContactDetails",Wo()],["Notes",ye(H)],["LegalEntity",ye($g())],["ExternalId",ye(H)],["ChannelId",ye(H)],["SalesforceInfo",ye(tg())],["AnzsicClassifier",ye(ng())]])}class yg extends Q{constructor(t){super(),this.Id=t}}function bg(){return at("AccountRegistry.Shared.AdminApi.Write.AccountPostResponse",[],yg,()=>[["Id",H]])}class Jc extends Q{constructor(t,n,r,s){super(),this.Name=t,this.ExternalId=n,this.BusinessName=r,this.BusinessNumber=s}}function _g(){return at("AccountRegistry.Shared.AdminApi.Write.PatchAccountDto",[],Jc,()=>[["Name",ye(H)],["ExternalId",ye(H)],["BusinessName",ye(H)],["BusinessNumber",ye(H)]])}class Yc extends Q{constructor(t){super(),this.ProvisioningMode=t}}function vg(){return at("AccountRegistry.Shared.AdminApi.Write.UpdateAccountProvisioningModeDto",[],Yc,()=>[["ProvisioningMode",vi()]])}var Cs,ie,Xc,ir,Qc,eu,qo,Ko,Zo,Jo,tu,Ss={},nu=[],xg=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,xi=Array.isArray;function Sn(e,t){for(var n in t)e[n]=t[n];return e}function ru(e){var t=e.parentNode;t&&t.removeChild(e)}function f(e,t,n){var r,s,i,o={};for(i in t)i=="key"?r=t[i]:i=="ref"?s=t[i]:o[i]=t[i];if(arguments.length>2&&(o.children=arguments.length>3?Cs.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)o[i]===void 0&&(o[i]=e.defaultProps[i]);return As(e,o,r,s,null)}function As(e,t,n,r,s){var i={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:s??++Xc,__i:-1,__u:0};return s==null&&ie.vnode!=null&&ie.vnode(i),i}function Yo(){return{current:null}}function ve(e){return e.children}function Jt(e,t){this.props=e,this.context=t}function or(e,t){if(t==null)return e.__?or(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?or(e):null}function su(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return su(e)}}function Xo(e){(!e.__d&&(e.__d=!0)&&ir.push(e)&&!Ci.__r++||Qc!==ie.debounceRendering)&&((Qc=ie.debounceRendering)||eu)(Ci)}function Ci(){var e,t,n,r,s,i,o,a;for(ir.sort(qo);e=ir.shift();)e.__d&&(t=ir.length,r=void 0,i=(s=(n=e).__v).__e,o=[],a=[],n.__P&&((r=Sn({},s)).__v=s.__v+1,ie.vnode&&ie.vnode(r),Qo(n.__P,r,s,n.__n,n.__P.namespaceURI,32&s.__u?[i]:null,o,i??or(s),!!(32&s.__u),a),r.__v=s.__v,r.__.__k[r.__i]=r,cu(o,r,a),r.__e!=i&&su(r)),ir.length>t&&ir.sort(qo));Ci.__r=0}function iu(e,t,n,r,s,i,o,a,l,c,d){var u,m,h,p,$,w=r&&r.__k||nu,C=t.length;for(n.__d=l,Cg(n,t,w),l=n.__d,u=0;u<C;u++)(h=n.__k[u])!=null&&typeof h!="boolean"&&typeof h!="function"&&(m=h.__i===-1?Ss:w[h.__i]||Ss,h.__i=u,Qo(e,h,m,s,i,o,a,l,c,d),p=h.__e,h.ref&&m.ref!=h.ref&&(m.ref&&ea(m.ref,null,h),d.push(h.ref,h.__c||p,h)),$==null&&p!=null&&($=p),65536&h.__u||m.__k===h.__k?(l&&!l.isConnected&&(l=or(m)),l=ou(h,l,e)):typeof h.type=="function"&&h.__d!==void 0?l=h.__d:p&&(l=p.nextSibling),h.__d=void 0,h.__u&=-196609);n.__d=l,n.__e=$}function Cg(e,t,n){var r,s,i,o,a,l=t.length,c=n.length,d=c,u=0;for(e.__k=[],r=0;r<l;r++)o=r+u,(s=e.__k[r]=(s=t[r])==null||typeof s=="boolean"||typeof s=="function"?null:typeof s=="string"||typeof s=="number"||typeof s=="bigint"||s.constructor==String?As(null,s,null,null,null):xi(s)?As(ve,{children:s},null,null,null):s.constructor===void 0&&s.__b>0?As(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):s)!=null?(s.__=e,s.__b=e.__b+1,a=Sg(s,n,o,d),s.__i=a,i=null,a!==-1&&(d--,(i=n[a])&&(i.__u|=131072)),i==null||i.__v===null?(a==-1&&u--,typeof s.type!="function"&&(s.__u|=65536)):a!==o&&(a===o+1?u++:a>o?d>l-o?u+=a-o:u--:a<o?a==o-1&&(u=a-o):u=0,a!==r+u&&(s.__u|=65536))):(i=n[o])&&i.key==null&&i.__e&&(131072&i.__u)==0&&(i.__e==e.__d&&(e.__d=or(i)),ta(i,i,!1),n[o]=null,d--);if(d)for(r=0;r<c;r++)(i=n[r])!=null&&(131072&i.__u)==0&&(i.__e==e.__d&&(e.__d=or(i)),ta(i,i))}function ou(e,t,n){var r,s;if(typeof e.type=="function"){for(r=e.__k,s=0;r&&s<r.length;s++)r[s]&&(r[s].__=e,t=ou(r[s],t,n));return t}e.__e!=t&&(n.insertBefore(e.__e,t||null),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType===8);return t}function An(e,t){return t=t||[],e==null||typeof e=="boolean"||(xi(e)?e.some(function(n){An(n,t)}):t.push(e)),t}function Sg(e,t,n,r){var s=e.key,i=e.type,o=n-1,a=n+1,l=t[n];if(l===null||l&&s==l.key&&i===l.type&&(131072&l.__u)==0)return n;if(r>(l!=null&&(131072&l.__u)==0?1:0))for(;o>=0||a<t.length;){if(o>=0){if((l=t[o])&&(131072&l.__u)==0&&s==l.key&&i===l.type)return o;o--}if(a<t.length){if((l=t[a])&&(131072&l.__u)==0&&s==l.key&&i===l.type)return a;a++}}return-1}function au(e,t,n){t[0]==="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||xg.test(t)?n:n+"px"}function Si(e,t,n,r,s){var i;e:if(t==="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||au(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||au(e.style,t,n[t])}else if(t[0]==="o"&&t[1]==="n")i=t!==(t=t.replace(/(PointerCapture)$|Capture$/i,"$1")),t=t.toLowerCase()in e||t==="onFocusOut"||t==="onFocusIn"?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=n,n?r?n.u=r.u:(n.u=Ko,e.addEventListener(t,i?Jo:Zo,i)):e.removeEventListener(t,i?Jo:Zo,i);else{if(s=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!=="-"?e.removeAttribute(t):e.setAttribute(t,n))}}function lu(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t.t==null)t.t=Ko++;else if(t.t<n.u)return;return n(ie.event?ie.event(t):t)}}}function Qo(e,t,n,r,s,i,o,a,l,c){var d,u,m,h,p,$,w,C,x,E,O,L,X,pe,Se,de=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(l=!!(32&n.__u),i=[a=t.__e=n.__e]),(d=ie.__b)&&d(t);e:if(typeof de=="function")try{if(C=t.props,x=(d=de.contextType)&&r[d.__c],E=d?x?x.props.value:d.__:r,n.__c?w=(u=t.__c=n.__c).__=u.__E:("prototype"in de&&de.prototype.render?t.__c=u=new de(C,E):(t.__c=u=new Jt(C,E),u.constructor=de,u.render=kg),x&&x.sub(u),u.props=C,u.state||(u.state={}),u.context=E,u.__n=r,m=u.__d=!0,u.__h=[],u._sb=[]),u.__s==null&&(u.__s=u.state),de.getDerivedStateFromProps!=null&&(u.__s==u.state&&(u.__s=Sn({},u.__s)),Sn(u.__s,de.getDerivedStateFromProps(C,u.__s))),h=u.props,p=u.state,u.__v=t,m)de.getDerivedStateFromProps==null&&u.componentWillMount!=null&&u.componentWillMount(),u.componentDidMount!=null&&u.__h.push(u.componentDidMount);else{if(de.getDerivedStateFromProps==null&&C!==h&&u.componentWillReceiveProps!=null&&u.componentWillReceiveProps(C,E),!u.__e&&(u.shouldComponentUpdate!=null&&u.shouldComponentUpdate(C,u.__s,E)===!1||t.__v===n.__v)){for(t.__v!==n.__v&&(u.props=C,u.state=u.__s,u.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function(Y){Y&&(Y.__=t)}),O=0;O<u._sb.length;O++)u.__h.push(u._sb[O]);u._sb=[],u.__h.length&&o.push(u);break e}u.componentWillUpdate!=null&&u.componentWillUpdate(C,u.__s,E),u.componentDidUpdate!=null&&u.__h.push(function(){u.componentDidUpdate(h,p,$)})}if(u.context=E,u.props=C,u.__P=e,u.__e=!1,L=ie.__r,X=0,"prototype"in de&&de.prototype.render){for(u.state=u.__s,u.__d=!1,L&&L(t),d=u.render(u.props,u.state,u.context),pe=0;pe<u._sb.length;pe++)u.__h.push(u._sb[pe]);u._sb=[]}else do u.__d=!1,L&&L(t),d=u.render(u.props,u.state,u.context),u.state=u.__s;while(u.__d&&++X<25);u.state=u.__s,u.getChildContext!=null&&(r=Sn(Sn({},r),u.getChildContext())),m||u.getSnapshotBeforeUpdate==null||($=u.getSnapshotBeforeUpdate(h,p)),iu(e,xi(Se=d!=null&&d.type===ve&&d.key==null?d.props.children:d)?Se:[Se],t,n,r,s,i,o,a,l,c),u.base=t.__e,t.__u&=-161,u.__h.length&&o.push(u),w&&(u.__E=u.__=null)}catch(Y){t.__v=null,l||i!=null?(t.__e=a,t.__u|=l?160:32,i[i.indexOf(a)]=null):(t.__e=n.__e,t.__k=n.__k),ie.__e(Y,t,n)}else i==null&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=Ag(n.__e,t,n,r,s,i,o,l,c);(d=ie.diffed)&&d(t)}function cu(e,t,n){t.__d=void 0;for(var r=0;r<n.length;r++)ea(n[r],n[++r],n[++r]);ie.__c&&ie.__c(t,e),e.some(function(s){try{e=s.__h,s.__h=[],e.some(function(i){i.call(s)})}catch(i){ie.__e(i,s.__v)}})}function Ag(e,t,n,r,s,i,o,a,l){var c,d,u,m,h,p,$,w=n.props,C=t.props,x=t.type;if(x==="svg"?s="http://www.w3.org/2000/svg":x==="math"?s="http://www.w3.org/1998/Math/MathML":s||(s="http://www.w3.org/1999/xhtml"),i!=null){for(c=0;c<i.length;c++)if((h=i[c])&&"setAttribute"in h==!!x&&(x?h.localName===x:h.nodeType===3)){e=h,i[c]=null;break}}if(e==null){if(x===null)return document.createTextNode(C);e=document.createElementNS(s,x,C.is&&C),i=null,a=!1}if(x===null)w===C||a&&e.data===C||(e.data=C);else{if(i=i&&Cs.call(e.childNodes),w=n.props||Ss,!a&&i!=null)for(w={},c=0;c<e.attributes.length;c++)w[(h=e.attributes[c]).name]=h.value;for(c in w)if(h=w[c],c!="children"){if(c=="dangerouslySetInnerHTML")u=h;else if(c!=="key"&&!(c in C)){if(c=="value"&&"defaultValue"in C||c=="checked"&&"defaultChecked"in C)continue;Si(e,c,null,h,s)}}for(c in C)h=C[c],c=="children"?m=h:c=="dangerouslySetInnerHTML"?d=h:c=="value"?p=h:c=="checked"?$=h:c==="key"||a&&typeof h!="function"||w[c]===h||Si(e,c,h,w[c],s);if(d)a||u&&(d.__html===u.__html||d.__html===e.innerHTML)||(e.innerHTML=d.__html),t.__k=[];else if(u&&(e.innerHTML=""),iu(e,xi(m)?m:[m],t,n,r,x==="foreignObject"?"http://www.w3.org/1999/xhtml":s,i,o,i?i[0]:n.__k&&or(n,0),a,l),i!=null)for(c=i.length;c--;)i[c]!=null&&ru(i[c]);a||(c="value",p!==void 0&&(p!==e[c]||x==="progress"&&!p||x==="option"&&p!==w[c])&&Si(e,c,p,w[c],s),c="checked",$!==void 0&&$!==e[c]&&Si(e,c,$,w[c],s))}return e}function ea(e,t,n){try{typeof e=="function"?e(t):e.current=t}catch(r){ie.__e(r,n)}}function ta(e,t,n){var r,s;if(ie.unmount&&ie.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||ea(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(i){ie.__e(i,t)}r.base=r.__P=null}if(r=e.__k)for(s=0;s<r.length;s++)r[s]&&ta(r[s],t,n||typeof e.type!="function");n||e.__e==null||ru(e.__e),e.__c=e.__=e.__e=e.__d=void 0}function kg(e,t,n){return this.constructor(e,n)}function Un(e,t,n){var r,s,i,o;ie.__&&ie.__(e,t),s=(r=typeof n=="function")?null:n&&n.__k||t.__k,i=[],o=[],Qo(t,e=(!r&&n||t).__k=f(ve,null,[e]),s||Ss,Ss,t.namespaceURI,!r&&n?[n]:s?null:t.firstChild?Cs.call(t.childNodes):null,i,!r&&n?n:s?s.__e:t.firstChild,r,o),cu(i,e,o)}function na(e,t){Un(e,t,na)}function ra(e,t,n){var r,s,i,o,a=Sn({},e.props);for(i in e.type&&e.type.defaultProps&&(o=e.type.defaultProps),t)i=="key"?r=t[i]:i=="ref"?s=t[i]:a[i]=t[i]===void 0&&o!==void 0?o[i]:t[i];return arguments.length>2&&(a.children=arguments.length>3?Cs.call(arguments,2):n),As(e.type,a,r||e.key,s||e.ref,null)}function jn(e,t){var n={__c:t="__cC"+tu++,__:e,Consumer:function(r,s){return r.children(s)},Provider:function(r){var s,i;return this.getChildContext||(s=[],(i={})[t]=this,this.getChildContext=function(){return i},this.shouldComponentUpdate=function(o){this.props.value!==o.value&&s.some(function(a){a.__e=!0,Xo(a)})},this.sub=function(o){s.push(o);var a=o.componentWillUnmount;o.componentWillUnmount=function(){s.splice(s.indexOf(o),1),a&&a.call(o)}}),r.children}};return n.Provider.__=n.Consumer.contextType=n}Cs=nu.slice,ie={__e:function(e,t,n,r){for(var s,i,o;t=t.__;)if((s=t.__c)&&!s.__)try{if((i=s.constructor)&&i.getDerivedStateFromError!=null&&(s.setState(i.getDerivedStateFromError(e)),o=s.__d),s.componentDidCatch!=null&&(s.componentDidCatch(e,r||{}),o=s.__d),o)return s.__E=s}catch(a){e=a}throw e}},Xc=0,Jt.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Sn({},this.state),typeof e=="function"&&(e=e(Sn({},n),this.props)),e&&Sn(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),Xo(this))},Jt.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Xo(this))},Jt.prototype.render=ve,ir=[],eu=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,qo=function(e,t){return e.__v.__b-t.__v.__b},Ci.__r=0,Ko=0,Zo=lu(!1),Jo=lu(!0),tu=0;var kn,ke,sa,uu,Br=0,du=[],Ai=[],Be=ie,fu=Be.__b,hu=Be.__r,mu=Be.diffed,pu=Be.__c,gu=Be.unmount,$u=Be.__;function ar(e,t){Be.__h&&Be.__h(ke,e,Br||t),Br=0;var n=ke.__H||(ke.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:Ai}),n.__[e]}function Je(e){return Br=1,Ur(yu,e)}function Ur(e,t,n){var r=ar(kn++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):yu(void 0,t),function(a){var l=r.__N?r.__N[0]:r.__[0],c=r.t(l,a);l!==c&&(r.__N=[c,r.__[1]],r.__c.setState({}))}],r.__c=ke,!ke.u)){var s=function(a,l,c){if(!r.__c.__H)return!0;var d=r.__c.__H.__.filter(function(m){return!!m.__c});if(d.every(function(m){return!m.__N}))return!i||i.call(this,a,l,c);var u=!1;return d.forEach(function(m){if(m.__N){var h=m.__[0];m.__=m.__N,m.__N=void 0,h!==m.__[0]&&(u=!0)}}),!(!u&&r.__c.props===a)&&(!i||i.call(this,a,l,c))};ke.u=!0;var i=ke.shouldComponentUpdate,o=ke.componentWillUpdate;ke.componentWillUpdate=function(a,l,c){if(this.__e){var d=i;i=void 0,s(a,l,c),i=d}o&&o.call(this,a,l,c)},ke.shouldComponentUpdate=s}return r.__N||r.__}function Me(e,t){var n=ar(kn++,3);!Be.__s&&ca(n.__H,t)&&(n.__=e,n.i=t,ke.__H.__h.push(n))}function En(e,t){var n=ar(kn++,4);!Be.__s&&ca(n.__H,t)&&(n.__=e,n.i=t,ke.__h.push(n))}function he(e){return Br=5,ft(function(){return{current:e}},[])}function ia(e,t,n){Br=6,En(function(){return typeof e=="function"?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0},n==null?n:n.concat(e))}function ft(e,t){var n=ar(kn++,7);return ca(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function zn(e,t){return Br=8,ft(function(){return e},t)}function fn(e){var t=ke.context[e.__c],n=ar(kn++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(ke)),t.props.value):e.__}function oa(e,t){Be.useDebugValue&&Be.useDebugValue(t?t(e):e)}function Eg(e){var t=ar(kn++,10),n=Je();return t.__=e,ke.componentDidCatch||(ke.componentDidCatch=function(r,s){t.__&&t.__(r,s),n[1](r)}),[n[0],function(){n[1](void 0)}]}function aa(){var e=ar(kn++,11);if(!e.__){for(var t=ke.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function Ig(){for(var e;e=du.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(ki),e.__H.__h.forEach(la),e.__H.__h=[]}catch(t){e.__H.__h=[],Be.__e(t,e.__v)}}Be.__b=function(e){ke=null,fu&&fu(e)},Be.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),$u&&$u(e,t)},Be.__r=function(e){hu&&hu(e),kn=0;var t=(ke=e.__c).__H;t&&(sa===ke?(t.__h=[],ke.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=Ai,n.__N=n.i=void 0})):(t.__h.forEach(ki),t.__h.forEach(la),t.__h=[],kn=0)),sa=ke},Be.diffed=function(e){mu&&mu(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(du.push(t)!==1&&uu===Be.requestAnimationFrame||((uu=Be.requestAnimationFrame)||Ng)(Ig)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==Ai&&(n.__=n.__V),n.i=void 0,n.__V=Ai})),sa=ke=null},Be.__c=function(e,t){t.some(function(n){try{n.__h.forEach(ki),n.__h=n.__h.filter(function(r){return!r.__||la(r)})}catch(r){t.some(function(s){s.__h&&(s.__h=[])}),t=[],Be.__e(r,n.__v)}}),pu&&pu(e,t)},Be.unmount=function(e){gu&&gu(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{ki(r)}catch(s){t=s}}),n.__H=void 0,t&&Be.__e(t,n.__v))};var wu=typeof requestAnimationFrame=="function";function Ng(e){var t,n=function(){clearTimeout(r),wu&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);wu&&(t=requestAnimationFrame(n))}function ki(e){var t=ke,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),ke=t}function la(e){var t=ke;e.__c=e.__(),ke=t}function ca(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function yu(e,t){return typeof t=="function"?t(e):t}function bu(e,t){for(var n in t)e[n]=t[n];return e}function ua(e,t){for(var n in e)if(n!=="__source"&&!(n in t))return!0;for(var r in t)if(r!=="__source"&&e[r]!==t[r])return!0;return!1}function Ei(e,t){this.props=e,this.context=t}function _u(e,t){function n(s){var i=this.props.ref,o=i==s.ref;return!o&&i&&(i.call?i(null):i.current=null),t?!t(this.props,s)||!o:ua(this.props,s)}function r(s){return this.shouldComponentUpdate=n,f(e,s)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(Ei.prototype=new Jt).isPureReactComponent=!0,Ei.prototype.shouldComponentUpdate=function(e,t){return ua(this.props,e)||ua(this.state,t)};var vu=ie.__b;ie.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),vu&&vu(e)};var Tg=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function Hn(e){function t(n){var r=bu({},n);return delete r.ref,e(r,n.ref||null)}return t.$$typeof=Tg,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var xu=function(e,t){return e==null?null:An(An(e).map(t))},Cu={map:xu,forEach:xu,count:function(e){return e?An(e).length:0},only:function(e){var t=An(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:An},Mg=ie.__e;ie.__e=function(e,t,n,r){if(e.then){for(var s,i=t;i=i.__;)if((s=i.__c)&&s.__c)return t.__e==null&&(t.__e=n.__e,t.__k=n.__k),s.__c(e,t)}Mg(e,t,n,r)};var Su=ie.unmount;function Au(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(r){typeof r.__c=="function"&&r.__c()}),e.__c.__H=null),(e=bu({},e)).__c!=null&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(r){return Au(r,t,n)})),e}function ku(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(r){return ku(r,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=n)),e}function ks(){this.__u=0,this.t=null,this.__b=null}function Eu(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function Iu(e){var t,n,r;function s(i){if(t||(t=e()).then(function(o){n=o.default||o},function(o){r=o}),r)throw r;if(!n)throw t;return f(n,i)}return s.displayName="Lazy",s.__f=!0,s}function jr(){this.u=null,this.o=null}ie.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),Su&&Su(e)},(ks.prototype=new Jt).__c=function(e,t){var n=t.__c,r=this;r.t==null&&(r.t=[]),r.t.push(n);var s=Eu(r.__v),i=!1,o=function(){i||(i=!0,n.__R=null,s?s(a):a())};n.__R=o;var a=function(){if(!--r.__u){if(r.state.__a){var l=r.state.__a;r.__v.__k[0]=ku(l,l.__c.__P,l.__c.__O)}var c;for(r.setState({__a:r.__b=null});c=r.t.pop();)c.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(o,o)},ks.prototype.componentWillUnmount=function(){this.t=[]},ks.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=Au(this.__b,n,r.__O=r.__P)}this.__b=null}var s=t.__a&&f(ve,null,e.fallback);return s&&(s.__u&=-33),[f(ve,null,t.__a?null:e.children),s]};var Nu=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.u=n=n[2]}};function Rg(e){return this.getChildContext=function(){return e.context},e.children}function Pg(e){var t=this,n=e.i;t.componentWillUnmount=function(){Un(null,t.l),t.l=null,t.i=null},t.i&&t.i!==n&&t.componentWillUnmount(),t.l||(t.i=n,t.l={nodeType:1,parentNode:n,childNodes:[],appendChild:function(r){this.childNodes.push(r),t.i.appendChild(r)},insertBefore:function(r,s){this.childNodes.push(r),t.i.appendChild(r)},removeChild:function(r){this.childNodes.splice(this.childNodes.indexOf(r)>>>1,1),t.i.removeChild(r)}}),Un(f(Rg,{context:t.context},e.__v),t.l)}function Tu(e,t){var n=f(Pg,{__v:e,i:t});return n.containerInfo=t,n}(jr.prototype=new Jt).__a=function(e){var t=this,n=Eu(t.__v),r=t.o.get(e);return r[0]++,function(s){var i=function(){t.props.revealOrder?(r.push(s),Nu(t,e,r)):s()};n?n(i):i()}},jr.prototype.render=function(e){this.u=null,this.o=new Map;var t=An(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},jr.prototype.componentDidUpdate=jr.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,n){Nu(e,n,t)})};var Mu=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,Dg=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Og=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Fg=/[A-Z0-9]/g,Vg=typeof document<"u",Lg=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function Ru(e,t,n){return t.__k==null&&(t.textContent=""),Un(e,t),typeof n=="function"&&n(),e?e.__c:null}function Pu(e,t,n){return na(e,t),typeof n=="function"&&n(),e?e.__c:null}Jt.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(Jt.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var Du=ie.event;function Bg(){}function Ug(){return this.cancelBubble}function jg(){return this.defaultPrevented}ie.event=function(e){return Du&&(e=Du(e)),e.persist=Bg,e.isPropagationStopped=Ug,e.isDefaultPrevented=jg,e.nativeEvent=e};var da,zg={enumerable:!1,configurable:!0,get:function(){return this.class}},Ou=ie.vnode;ie.vnode=function(e){typeof e.type=="string"&&function(t){var n=t.props,r=t.type,s={};for(var i in n){var o=n[i];if(!(i==="value"&&"defaultValue"in n&&o==null||Vg&&i==="children"&&r==="noscript"||i==="class"||i==="className")){var a=i.toLowerCase();i==="defaultValue"&&"value"in n&&n.value==null?i="value":i==="download"&&o===!0?o="":a==="translate"&&o==="no"?o=!1:a==="ondoubleclick"?i="ondblclick":a!=="onchange"||r!=="input"&&r!=="textarea"||Lg(n.type)?a==="onfocus"?i="onfocusin":a==="onblur"?i="onfocusout":Og.test(i)?i=a:r.indexOf("-")===-1&&Dg.test(i)?i=i.replace(Fg,"-$&").toLowerCase():o===null&&(o=void 0):a=i="oninput",a==="oninput"&&s[i=a]&&(i="oninputCapture"),s[i]=o}}r=="select"&&s.multiple&&Array.isArray(s.value)&&(s.value=An(n.children).forEach(function(l){l.props.selected=s.value.indexOf(l.props.value)!=-1})),r=="select"&&s.defaultValue!=null&&(s.value=An(n.children).forEach(function(l){l.props.selected=s.multiple?s.defaultValue.indexOf(l.props.value)!=-1:s.defaultValue==l.props.value})),n.class&&!n.className?(s.class=n.class,Object.defineProperty(s,"className",zg)):(n.className&&!n.class||n.class&&n.className)&&(s.class=s.className=n.className),t.props=s}(e),e.$$typeof=Mu,Ou&&Ou(e)};var Fu=ie.__r;ie.__r=function(e){Fu&&Fu(e),da=e.__c};var Vu=ie.diffed;ie.diffed=function(e){Vu&&Vu(e);var t=e.props,n=e.__e;n!=null&&e.type==="textarea"&&"value"in t&&t.value!==n.value&&(n.value=t.value==null?"":t.value),da=null};var Lu={ReactCurrentDispatcher:{current:{readContext:function(e){return da.__n[e.__c].props.value},useCallback:zn,useContext:fn,useDebugValue:oa,useDeferredValue:pa,useEffect:Me,useId:aa,useImperativeHandle:ia,useInsertionEffect:$a,useLayoutEffect:En,useMemo:ft,useReducer:Ur,useRef:he,useState:Je,useSyncExternalStore:wa,useTransition:ga}}},Hg="17.0.2";function Bu(e){return f.bind(null,e)}function zr(e){return!!e&&e.$$typeof===Mu}function Uu(e){return zr(e)&&e.type===ve}function ju(e){return!!e&&!!e.displayName&&(typeof e.displayName=="string"||e.displayName instanceof String)&&e.displayName.startsWith("Memo(")}function fa(e){return zr(e)?ra.apply(null,arguments):e}function zu(e){return!!e.__k&&(Un(null,e),!0)}function Hu(e){return e&&(e.base||e.nodeType===1&&e)||null}var Wu=function(e,t){return e(t)},ha=function(e,t){return e(t)},Gu=ve;function ma(e){e()}function pa(e){return e}function ga(){return[!1,ma]}var $a=En,qu=zr;function wa(e,t){var n=t(),r=Je({h:{__:n,v:t}}),s=r[0].h,i=r[1];return En(function(){s.__=n,s.v=t,ya(s)&&i({h:s})},[e,n,t]),Me(function(){return ya(s)&&i({h:s}),e(function(){ya(s)&&i({h:s})})},[e]),n}function ya(e){var t,n,r=e.v,s=e.__;try{var i=r();return!((t=s)===(n=i)&&(t!==0||1/t==1/n)||t!=t&&n!=n)}catch{return!0}}var Z={useState:Je,useId:aa,useReducer:Ur,useEffect:Me,useLayoutEffect:En,useInsertionEffect:$a,useTransition:ga,useDeferredValue:pa,useSyncExternalStore:wa,startTransition:ma,useRef:he,useImperativeHandle:ia,useMemo:ft,useCallback:zn,useContext:fn,useDebugValue:oa,version:"17.0.2",Children:Cu,render:Ru,hydrate:Pu,unmountComponentAtNode:zu,createPortal:Tu,createElement:f,createContext:jn,createFactory:Bu,cloneElement:fa,createRef:Yo,Fragment:ve,isValidElement:zr,isElement:qu,isFragment:Uu,isMemo:ju,findDOMNode:Hu,Component:Jt,PureComponent:Ei,memo:_u,forwardRef:Hn,flushSync:ha,unstable_batchedUpdates:Wu,StrictMode:Gu,Suspense:ks,SuspenseList:jr,lazy:Iu,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Lu};const ba=Object.freeze(Object.defineProperty({__proto__:null,Children:Cu,Component:Jt,Fragment:ve,PureComponent:Ei,StrictMode:Gu,Suspense:ks,SuspenseList:jr,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Lu,cloneElement:fa,createContext:jn,createElement:f,createFactory:Bu,createPortal:Tu,createRef:Yo,default:Z,findDOMNode:Hu,flushSync:ha,forwardRef:Hn,hydrate:Pu,isElement:qu,isFragment:Uu,isMemo:ju,isValidElement:zr,lazy:Iu,memo:_u,render:Ru,startTransition:ma,unmountComponentAtNode:zu,unstable_batchedUpdates:Wu,useCallback:zn,useContext:fn,useDebugValue:oa,useDeferredValue:pa,useEffect:Me,useErrorBoundary:Eg,useId:aa,useImperativeHandle:ia,useInsertionEffect:$a,useLayoutEffect:En,useMemo:ft,useReducer:Ur,useRef:he,useState:Je,useSyncExternalStore:wa,useTransition:ga,version:Hg},Symbol.toStringTag,{value:"Module"})),Wg=e=>{Me(()=>{const t=e();return()=>{t.Dispose()}})},Gg=(e,t)=>{Me(()=>{const n=e();return()=>{n.Dispose()}},t)},qg=e=>{En(()=>{const t=e();return()=>{t.Dispose()}})},v=Z,Kg=Wg,Ku=Gg,Zg=qg;function Jg(e,t,n,r){const s=v.memo(e,$e(We(Ge(Fn,n),ge())));return Fr(i=>{e.displayName=i},To(t)),i=>{const o=Yg(r,i);return v.createElement(s,o)}}function Yg(e,t){if(e==null)return t;{const n=e;return t.key=n(t),t}}function Es(e){return{Dispose(){e()}}}function Zu(e,t){Ku(e,t)}function Xg(e){Zg(t=>(e(),Es(()=>{})))}function _a(e){const t=v.useRef(!1);e$(()=>{t.current||(t.current=!0,e())},[])}function Ju(e){const t=v.useRef(void 0),n=v.useRef(!1),r=v.useRef(!1);n.current&&(r.current=!0),Zu(()=>{let s;return n.current?s=void 0:(n.current=!0,t.current=lt(e()),s=r.current?t.current:void 0),{Dispose(){Fr(i=>{xe(i)},To(s))}}},[])}function Qg(e){Kg(t=>(e(),Es(()=>{})))}function e$(e,t){Ku(n=>(e(),Es(()=>{})),t)}function t$(e,t){const n=We(t,[]);return v.useCallback(e,n)}function Yu(e){return v.useRef(e)}function n$(e,t,n){return Jg(e,void 0,No(n),No(t))}function r$(e,t){const n=v.createContext(We(t,void 0));return Fr(r=>{n.displayName=r},To(e)),n}function s$(e,t,n){return v.createElement(e.Provider,{value:t},...n)}function Wn(e){return v.useContext(e)}function Xu(e){const t=Yu(e),n=t$(r=>t.current(r),[]);return Xg(()=>{t.current=e}),n}function Gn(e){return v.useState(e)}class Qu{constructor(t=!1){this._id=0,this._cancelled=t,this._listeners=new Map}get isCancelled(){return this._cancelled}cancel(){if(!this._cancelled){this._cancelled=!0;for(const[,t]of this._listeners)t()}}addListener(t){const n=this._id;return this._listeners.set(this._id++,t),n}removeListener(t){return this._listeners.delete(t)}register(t,n){const r=this,s=this.addListener(n==null?t:()=>t(n));return{Dispose(){r.removeListener(s)}}}Dispose(){}}class Ii extends Error{constructor(){super("The operation was canceled"),Object.setPrototypeOf(this,Ii.prototype)}}class va{static get maxTrampolineCallCount(){return 2e3}constructor(){this.callCount=0}incrementAndCheck(){return this.callCount++>va.maxTrampolineCallCount}hijack(t){this.callCount=0,setTimeout(t,0)}}function In(e){return t=>{if(t.cancelToken.isCancelled)t.onCancel(new Ii);else if(t.trampoline.incrementAndCheck())t.trampoline.hijack(()=>{try{e(t)}catch(n){t.onError(ni(n))}});else try{e(t)}catch(n){t.onError(ni(n))}}}function i$(e,t){return In(n=>{e({onSuccess:r=>{try{t(r)(n)}catch(s){n.onError(ni(s))}},onError:n.onError,onCancel:n.onCancel,cancelToken:n.cancelToken,trampoline:n.trampoline})})}function o$(e){return In(t=>t.onSuccess(e))}class a${Bind(t,n){return i$(t,n)}Combine(t,n){return this.Bind(t,()=>n)}Delay(t){return In(n=>t()(n))}For(t,n){const r=t[Symbol.iterator]();let s=r.next();return this.While(()=>!s.done,this.Delay(()=>{const i=n(s.value);return s=r.next(),i}))}Return(t){return o$(t)}ReturnFrom(t){return t}TryFinally(t,n){return In(r=>{t({onSuccess:s=>{n(),r.onSuccess(s)},onError:s=>{n(),r.onError(s)},onCancel:s=>{n(),r.onCancel(s)},cancelToken:r.cancelToken,trampoline:r.trampoline})})}TryWith(t,n){return In(r=>{t({onSuccess:r.onSuccess,onCancel:r.onCancel,cancelToken:r.cancelToken,trampoline:r.trampoline,onError:s=>{try{n(s)(r)}catch(i){r.onError(ni(i))}}})})}Using(t,n){return this.TryFinally(n(t),()=>t.Dispose())}While(t,n){return t()?this.Bind(n,()=>this.While(t,n)):this.Return(void 0)}Zero(){return In(t=>t.onSuccess(void 0))}}const N=new a$;function xa(e){}function l$(e){return new Qu(!1)}function c$(e){e.cancel()}function u$(e){return e!=null&&e.isCancelled}const ed=new Qu;function d$(e){return In(t=>{e({onSuccess:n=>t.onSuccess(w0(n)),onError:n=>t.onSuccess(y0(n)),onCancel:t.onCancel,cancelToken:t.cancelToken,trampoline:t.trampoline})})}function f$(e){return In(t=>e([t.onSuccess,t.onError,t.onCancel]))}function Ca(e){return In(t=>{let n;const r=setTimeout(()=>{t.cancelToken.removeListener(n),t.onSuccess(void 0)},e);n=t.cancelToken.addListener(()=>{clearTimeout(r),t.onCancel(new Ii)})})}function h$(e,t){return td(e,t)}function Hr(e,t){return h$(e,t)}function td(e,t,n,r,s){typeof t!="function"&&(s=t,t=void 0);const i=new va;e({onSuccess:t||xa,onError:n||xa,onCancel:r||xa,cancelToken:s||ed,trampoline:i})}function m$(e,t){return new Promise((n,r)=>td(e,n,r,r,ed))}class nd{constructor(t,n){this.k=t,this.v=n}}function Ni(e,t){return new nd(e,t)}function _t(e){return e.k}function Pt(e){return e.v}class Ye extends nd{constructor(t,n,r,s,i){super(t,n),this.left=r,this.right=s,this.h=i|0}}function Ti(e,t,n,r,s){return new Ye(e,t,n,r,s)}function vt(e){return e.left}function xt(e){return e.right}function lr(e){return e.h}function jx(){}function rd(e,t){e:for(;;){const n=e,r=t;if(r!=null){const s=D(r);if(s instanceof Ye){const i=s;e=rd(n+1,vt(i)),t=xt(i);continue e}else return n+1|0}else return n|0}}function p$(e){return rd(0,e)}function Yt(e,t,n,r){let s,i,o;const a=e;if(a!=null){const u=D(a);o=u instanceof Ye?(s=u,lr(s)):1}else o=0;let l;const c=r;if(c!=null){const u=D(c);l=u instanceof Ye?(i=u,lr(i)):1}else l=0;const d=(o<l?l:o)|0;return d===0?Ni(t,n):Ti(t,n,e,r,d+1)}function sd(e,t,n,r){let s,i,o,a,l,c,d,u,m;const h=e;if(h!=null){const w=D(h);m=w instanceof Ye?(s=w,lr(s)):1}else m=0;let p;const $=r;if($!=null){const w=D($);p=w instanceof Ye?(i=w,lr(i)):1}else p=0;if(p>m+2){const w=D(r);if(w instanceof Ye){const C=w;if(o=vt(C),(o!=null?(a=D(o),a instanceof Ye?(l=a,lr(l)):1):0)>m+1){const x=D(vt(C));if(x instanceof Ye){const E=x;return Yt(Yt(e,t,n,vt(E)),_t(E),Pt(E),Yt(xt(E),_t(C),Pt(C),xt(C)))}else throw new Error("internal error: Map.rebalance")}else return Yt(Yt(e,t,n,vt(C)),_t(C),Pt(C),xt(C))}else throw new Error("internal error: Map.rebalance")}else if(m>p+2){const w=D(e);if(w instanceof Ye){const C=w;if(c=xt(C),(c!=null?(d=D(c),d instanceof Ye?(u=d,lr(u)):1):0)>p+1){const x=D(xt(C));if(x instanceof Ye){const E=x;return Yt(Yt(vt(C),_t(C),Pt(C),vt(E)),_t(E),Pt(E),Yt(xt(E),t,n,r))}else throw new Error("internal error: Map.rebalance")}else return Yt(vt(C),_t(C),Pt(C),Yt(xt(C),t,n,r))}else throw new Error("internal error: Map.rebalance")}else return Yt(e,t,n,r)}function Wr(e,t,n,r){if(r!=null){const s=D(r),i=e.Compare(t,_t(s))|0;if(s instanceof Ye){const o=s;return i<0?sd(Wr(e,t,n,vt(o)),_t(o),Pt(o),xt(o)):i===0?Ti(t,n,vt(o),xt(o),lr(o)):sd(vt(o),_t(o),Pt(o),Wr(e,t,n,xt(o)))}else return i<0?Ti(t,n,void 0,r,2):i===0?Ni(t,n):Ti(t,n,r,void 0,2)}else return Ni(t,n)}function id(e,t,n){e:for(;;){const r=e,s=t,i=n;if(i!=null){const o=D(i),a=r.Compare(s,_t(o))|0;if(a===0)return lt(Pt(o));if(o instanceof Ye){const l=o;e=r,t=s,n=a<0?vt(l):xt(l);continue e}else return}else return}}function g$(e,t,n){const r=id(e,t,n);if(r==null)throw new Error;return D(r)}function $$(e,t,n){e:for(;;){const r=e,s=t,i=n;if(i!=null){const o=D(i),a=r.Compare(s,_t(o))|0;if(o instanceof Ye){const l=o;if(a<0){e=r,t=s,n=vt(l);continue e}else{if(a===0)return!0;e=r,t=s,n=xt(l);continue e}}else return a===0}else return!1}}function od(e,t){e:for(;;){const n=e,r=t;if(r!=null){const s=D(r);if(s instanceof Ye){const i=s;od(n,vt(i)),n(_t(i),Pt(i)),e=n,t=xt(i);continue e}else n(_t(s),Pt(s))}break}}function w$(e,t){od(e,t)}function y$(e,t,n){let r=n;w$((s,i)=>{Tt(t,r,[s,i]),r=r+1|0},e)}function b$(e,t){return vn((n,r)=>Wr(e,r[0],r[1],n),void 0,t)}function _$(e,t,n){e:for(;;){const r=e,s=t,i=n;if(i["System.Collections.IEnumerator.MoveNext"]()){const o=i["System.Collections.Generic.IEnumerator`1.get_Current"]();e=r,t=Wr(r,o[0],o[1],s),n=i;continue e}else return s}}function v$(e,t){let n=void 0;for(let r=0;r<=t.length-1;r++){const s=we(r,t);n=Wr(e,s[0],s[1],n)}return n}function ad(e,t){if(un(t))return v$(e,t);if(t instanceof bt)return b$(e,t);{const n=Oe(t);try{return _$(e,void 0,n)}finally{xe(n)}}}class x$ extends Q{constructor(t,n){super(),this.stack=t,this.started=n}}function ld(e){e:for(;;){const t=e;if(K(t))return je();{const n=_(t),r=V(t);if(r!=null){const s=D(r);if(s instanceof Ye){const i=s;e=Fe([vt(i),Ni(_t(i),Pt(i)),xt(i)],n);continue e}else return t}else{e=n;continue e}}}}function cd(e){return new x$(ld(ee(e)),!1)}function C$(){throw new Error("enumeration not started")}function S$(){throw new Error("enumeration already finished")}function ud(e){if(e.started){const t=e.stack;if(K(t))return S$();if(V(t)!=null){const n=D(V(t));if(n instanceof Ye)throw new Error("Please report error: Map iterator, unexpected stack for current");return[_t(n),Pt(n)]}else throw new Error("Please report error: Map iterator, unexpected stack for current")}else return C$()}function A$(e){if(e.started){const t=e.stack;if(K(t))return!1;if(V(t)!=null){if(D(V(t))instanceof Ye)throw new Error("Please report error: Map iterator, unexpected stack for moveNext");return e.stack=ld(_(t)),!K(e.stack)}else throw new Error("Please report error: Map iterator, unexpected stack for moveNext")}else return e.started=!0,!K(e.stack)}function dd(e){let t=cd(e);return{"System.Collections.Generic.IEnumerator`1.get_Current"(){return ud(t)},"System.Collections.IEnumerator.get_Current"(){return ud(t)},"System.Collections.IEnumerator.MoveNext"(){return A$(t)},"System.Collections.IEnumerator.Reset"(){t=cd(e)},Dispose(){}}}class Mi{constructor(t,n){this.comparer=t,this.tree=n}GetHashCode(){return N$(this)|0}Equals(t){const n=this;if(t instanceof Mi){const r=t,s=Oe(n);try{const i=Oe(r);try{const o=()=>{const a=s["System.Collections.IEnumerator.MoveNext"]();if(a===i["System.Collections.IEnumerator.MoveNext"]())if(a){const l=s["System.Collections.Generic.IEnumerator`1.get_Current"](),c=i["System.Collections.Generic.IEnumerator`1.get_Current"]();return Ce(l[0],c[0])&&Ce(l[1],c[1])?o():!1}else return!0;else return!1};return o()}finally{xe(i)}}finally{xe(s)}}else return!1}toString(){return"map ["+ne("; ",Le(n=>sc("({0}, {1})",n[0],n[1]),this))+"]"}get[Symbol.toStringTag](){return"FSharpMap"}toJSON(){const t=this;return Array.from(t)}GetEnumerator(){return dd(this.tree)}[Symbol.iterator](){return us(Oe(this))}"System.Collections.IEnumerable.GetEnumerator"(){return dd(this.tree)}CompareTo(t){const n=this;if(t instanceof Mi)return l0((s,i)=>{const o=n.comparer.Compare(s[0],i[0])|0;return(o!==0?o:Bt(s[1],i[1]))|0},n,t)|0;throw new Error("not comparable\\nParameter name: obj")}"System.Collections.Generic.ICollection`1.Add2B595"(t){throw new Error("Map cannot be mutated")}"System.Collections.Generic.ICollection`1.Clear"(){throw new Error("Map cannot be mutated")}"System.Collections.Generic.ICollection`1.Remove2B595"(t){throw new Error("Map cannot be mutated")}"System.Collections.Generic.ICollection`1.Contains2B595"(t){const n=this;return hd(n,t[0])&&Ce(fd(n,t[0]),t[1])}"System.Collections.Generic.ICollection`1.CopyToZ3B4C077E"(t,n){y$(this.tree,t,n)}"System.Collections.Generic.ICollection`1.get_IsReadOnly"(){return!0}"System.Collections.Generic.ICollection`1.get_Count"(){return Sa(this)|0}"System.Collections.Generic.IReadOnlyCollection`1.get_Count"(){return Sa(this)|0}get size(){return Sa(this)|0}clear(){throw new Error("Map cannot be mutated")}delete(t){throw new Error("Map cannot be mutated")}entries(){return Le(n=>[n[0],n[1]],this)}get(t){return fd(this,t)}has(t){return hd(this,t)}keys(){return Le(n=>n[0],this)}set(t,n){throw new Error("Map cannot be mutated")}values(){return Le(n=>n[1],this)}forEach(t,n){const r=this;Fr(s=>{t(s[1],s[0],r)},r)}}function Ri(e,t){return new Mi(e,t)}function k$(e){return Ri(e,void 0)}function E$(e,t,n){return Ri(e.comparer,Wr(e.comparer,t,n,e.tree))}function fd(e,t){return g$(e.comparer,t,e.tree)}function Sa(e){return p$(e.tree)}function hd(e,t){return $$(e.comparer,t,e.tree)}function I$(e,t){return id(e.comparer,t,e.tree)}function N$(e){const t=(s,i)=>(s<<1)+i+631;let n=0;const r=Oe(e);try{for(;r["System.Collections.IEnumerator.MoveNext"]();){const s=r["System.Collections.Generic.IEnumerator`1.get_Current"]();n=t(n,bn(s[0]))|0,n=t(n,bn(s[1]))|0}}finally{xe(r)}return n|0}function md(e,t,n){return E$(n,e,t)}function pd(e,t){return I$(t,e)}function T$(e,t){return Ri(t,ad(t,e))}function M$(e,t){return Ri(t,ad(t,e))}function Aa(e){return k$(e)}class oe extends j{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["HasNotStartedYet","InProgress","Resolved","Failed"]}}function gd(e,t){const n=Yu(l$());return Ju(()=>Es(()=>{c$(n.current)})),Xu(r=>{u$(n.current)||Hr(N.Delay(()=>N.TryWith(N.Delay(()=>(t(new oe(1,[])),N.Bind(e(r),s=>(t(new oe(2,[s])),N.Zero())))),s=>(t(new oe(3,[s])),N.Zero()))),n.current)})}class R${constructor(t,n,r){this.OnNext=t,this.OnError=n||(s=>{}),this.OnCompleted=r||(()=>{})}}function P$(e,t){t.Subscribe(new R$(e))}class D${constructor(){this.delegates=[]}_add(t){this.delegates.push(t)}_remove(t){const n=this.delegates.indexOf(t);n>-1&&this.delegates.splice(n,1)}get Publish(){return F$(t=>{this._add(t)},t=>{this._remove(t)})}Trigger(t,n){let r=null;const s=n===void 0?t:(r=t,n);this.delegates.forEach(i=>{i(r,s)})}}let O$=class extends D${};function F$(e,t){return{AddHandler(n){e(n)},RemoveHandler(n){t(n)},Subscribe(n){const r=(s,i)=>n.OnNext(i);return e(r),{Dispose(){t(r)}}}}}class V${constructor(t){this._enabled=!1,this._isDisposed=!1,this._intervalId=0,this._timeoutId=0,this.Interval=t&&t>0?t:100,this.AutoReset=!0,this._elapsed=new O$}Elapsed(){return this._elapsed.Publish}get Enabled(){return this._enabled}set Enabled(t){!this._isDisposed&&this._enabled!==t&&(this._enabled=t,this._enabled?this.AutoReset?this._intervalId=setInterval(()=>{this.AutoReset||(this.Enabled=!1),this._elapsed.Trigger(new Date)},this.Interval):this._timeoutId=setTimeout(()=>{this.Enabled=!1,this._timeoutId=0,this.AutoReset&&(this.Enabled=!0),this._elapsed.Trigger(new Date)},this.Interval):(this._timeoutId&&(clearTimeout(this._timeoutId),this._timeoutId=0),this._intervalId&&(clearInterval(this._intervalId),this._intervalId=0)))}Dispose(){this.Enabled=!1,this._isDisposed=!0}Close(){this.Dispose()}Start(){this.Enabled=!0}Stop(){this.Enabled=!1}}function L$(e,t){console.error(lt(e),t)}function B$(e,t){let n,r=new V$(e);r.AutoReset=!1,n=r,P$(t,n.Elapsed()),n.Enabled=!0,n.Start()}function $d(e,t,n){gi(r=>{try{r(t)}catch(s){e(s)}},n)}function le(){return je()}function Xe(e){return ee(e)}function Is(e,t,n,r){return ee(s=>{e(N.Delay(()=>N.Bind(d$(t(n)),i=>{const o=i;return o.tag===0&&s(r(o.fields[0])),N.Zero()})))})}function Ns(e){B$(1,t=>{Hr(e)})}function Ts(e,t){if(t.indexOf(e)===0)return t}function wd(e,t){if(Qm(t,e))return t}function U$(e){return t=>{let n,r,s,i,o,a;return n=Ts("/",t),n!=null?(r=n,"#"+r):(s=Ts("#/",t),s!=null?(i=s,i):(o=Ts("#",t),o!=null?(a=o,"#/"+ic(a,1,a.length-1)):"#/"+t))}}function cr(e,t){return U$()(ne("/",rr(n=>n.indexOf("?")>=0||n.indexOf("#")===0||n.indexOf("/")===0?n:encodeURIComponent(n),e)))}function ht(e,t,n){history.pushState(void 0,"",cr(e));const r=document.createEvent("CustomEvent");r.initEvent("CUSTOM_NAVIGATION_EVENT",!0,!0),window.dispatchEvent(r)}function yd(e,t){return $p(n=>{if(fi(n))return je();{const r=np(n,"#");if(r==="?")return je();if(Ts("?",r)!=null)return ee(r);{const s=r.split("?");if(!Ro((i,o)=>i===o,s)&&s.length===1){const i=we(0,s);return ee(decodeURIComponent(i))}else if(!Ro((i,o)=>i===o,s)&&s.length===2)if(we(1,s)===""){const i=we(0,s);return ee(decodeURIComponent(i))}else{const i=we(0,s),o=we(1,s);return y([decodeURIComponent(i),"?"+o])}else return je()}}},y(Io(Ts("#",e)!=null?ic(e,1,e.length-1):t===1&&(wd("#",e)!=null||wd("#/",e)!=null)?"":e,["/"],void 0,0)))}function j$(e,t,n){return t(yd(e===2?window.location.pathname+window.location.search:window.location.hash,e))}const z$=n$(e=>{const t=Xu(r=>{const s=We(e.onUrlChanged,i=>{});j$(We(e.hashMode,1),s)});Ju(()=>(window.navigator.userAgent.indexOf("Trident")>=0||window.navigator.userAgent.indexOf("MSIE")>=0?window.addEventListener("hashchange",t):window.addEventListener("popstate",t),window.addEventListener("CUSTOM_NAVIGATION_EVENT",t),Es(()=>{window.navigator.userAgent.indexOf("Trident")>=0||window.navigator.userAgent.indexOf("MSIE")>=0?window.removeEventListener("hashchange",t):window.removeEventListener("popstate",t),window.removeEventListener("CUSTOM_NAVIGATION_EVENT",t)}))),_a(()=>{const r=document.createEvent("CustomEvent");r.initEvent("CUSTOM_NAVIGATION_EVENT",!0,!0),window.dispatchEvent(r)});const n=e.application;return n??ge()});class Nn extends j{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["AccountId","Name"]}}class ur extends j{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Asc","Desc"]}}function bd(e){return e.tag===0?new ur(1,[]):new ur(0,[])}class Ms extends j{constructor(t,n){super(),this.tag=0,this.fields=[t,n]}cases(){return["Sort"]}}const H$=new Ms(new Nn(1,[]),new ur(0,[]));function W$(e){return[e.fields[0],e.fields[1]]}function _d(e){return e.fields[0]}function vd(e){return e.fields[1]}function xd(e,t){const n=t.fields[0],r=t.fields[1];return e.tag===1?n.tag===1?new Ms(new Nn(1,[]),bd(r)):new Ms(new Nn(1,[]),new ur(0,[])):n.tag===0?new Ms(new Nn(0,[]),bd(r)):new Ms(new Nn(0,[]),new ur(0,[]))}class Cd extends j{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["SearchText"]}}const G$=new Cd("");function q$(e){return new Cd(e)}function Sd(e){return e.fields[0]}class K$ extends j{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["PageSize"]}}function Z$(e){return new K$(e)}function Ad(e){return e.fields[0]}class ka extends Q{constructor(t,n,r){super(),this.SearchText=t,this.Sort=n,this.PageSize=r}}class J$ extends j{constructor(t,n){super(),this.tag=0,this.fields=[t,n]}cases(){return["AccountKey"]}}function kd(e){return[e.fields[0],e.fields[1]]}function Y$(e,t){return new J$(e,t)}function X$(e){const t=kd(e);return[t[0],t[1]]}function Q$(){return new p0([],{Equals:Ce,GetHashCode:dm})}function Ed(e,t){let n,r=ge();if(n=[bc(e,t,new yt(()=>r,s=>{r=s})),r],n[0])return n[1]}function Ea(e,t,n){return e.set(t,n),e}class e1 extends Q{constructor(t,n,r,s,i,o){super(),this.StreamId=t,this.Name=n,this.Website=r,this.ContactDetails=s,this.Notes=i,this.AccountProvisioningMode=o}}function t1(e){const t=Ho(e.Name);if(t.tag===1)return new g(1,[t.fields[0]]);{const n=Nc(e.Website);if(n.tag===1)return new g(1,[n.fields[0]]);{let r;const s=e.ContactDetails;if(s!=null){const i=H0(s);r=i.tag===1?new g(1,[i.fields[0]]):new g(0,[i.fields[0]])}else r=new g(0,[void 0]);return r.tag===1?new g(1,[r.fields[0]]):new g(0,[new e1(new Ec(e.StreamId),t.fields[0],n.fields[0],r.fields[0],W0(e.Notes),e.AccountProvisioningMode)])}}}function Ia(e,t){return bp(n=>Vr(n.StreamId)===$i(t),e)}class q extends j{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["PartnerList","Partner","PartnerProfilesDirectory","PartnerAccountList","PartnerSuperConfiguration","PartnerBenefitsOnboardingConfiguration","PartnerBankDetailsConfiguration","PartnerWorkspace","Account","AccountProfilesDirectory","AccountUsers","AccountSuperConfiguration","AccountBenefitsOnboardingConfiguration","AccountBankDetailsConfiguration","AccountSalaryPackagingConfiguration","AccountWorkspace","AccountHrisMigration","NotFound"]}}function Id(e){let t,n,r,s,i,o,a,l,c,d,u,m,h,p,$,w,C,x,E,O,L,X,pe,Se,de,Y;if(K(e))t=17;else if(V(e)==="account-registry")if(K(_(e)))t=17;else if(V(_(e))==="partners")if(K(_(_(e))))t=0;else if(K(_(_(_(e)))))t=1,n=V(_(_(e)));else switch(V(_(_(_(e))))){case"accounts":{if(K(_(_(_(_(e))))))t=2,r=V(_(_(e)));else if(K(_(_(_(_(_(e)))))))t=8,c=V(_(_(_(_(e))))),d=V(_(_(e)));else switch(V(_(_(_(_(_(e))))))){case"directory":{K(_(_(_(_(_(_(e)))))))?(t=9,u=V(_(_(_(_(e))))),m=V(_(_(e)))):t=17;break}case"users":{K(_(_(_(_(_(_(e)))))))?(t=10,h=V(_(_(_(_(e))))),p=V(_(_(e)))):t=17;break}case"super-configuration":{K(_(_(_(_(_(_(e)))))))?(t=11,$=V(_(_(_(_(e))))),w=V(_(_(e)))):t=17;break}case"benefits-onboarding-configuration":{K(_(_(_(_(_(_(e)))))))?(t=12,C=V(_(_(_(_(e))))),x=V(_(_(e)))):t=17;break}case"bank-details-configuration":{K(_(_(_(_(_(_(e)))))))?(t=13,E=V(_(_(_(_(e))))),O=V(_(_(e)))):t=17;break}case"salary-packaging-configuration":{K(_(_(_(_(_(_(e)))))))?(t=14,L=V(_(_(_(_(e))))),X=V(_(_(e)))):t=17;break}case"workspace":{K(_(_(_(_(_(_(e)))))))?(t=15,pe=V(_(_(_(_(e))))),Se=V(_(_(e)))):t=17;break}case"hris-migration":{K(_(_(_(_(_(_(e)))))))?(t=16,de=V(_(_(_(_(e))))),Y=V(_(_(e)))):t=17;break}default:t=17}break}case"super-configuration":{K(_(_(_(_(e)))))?(t=3,s=V(_(_(e)))):t=17;break}case"benefits-onboarding-configuration":{K(_(_(_(_(e)))))?(t=4,i=V(_(_(e)))):t=17;break}case"directory":{K(_(_(_(_(e)))))?(t=5,o=V(_(_(e)))):t=17;break}case"bank-details-configuration":{K(_(_(_(_(e)))))?(t=6,a=V(_(_(e)))):t=17;break}case"workspace":{K(_(_(_(_(e)))))?(t=7,l=V(_(_(e)))):t=17;break}default:t=17}else t=17;else t=17;switch(t){case 0:return new q(0,[]);case 1:return new q(1,[Ve(n)]);case 2:return new q(3,[Ve(r)]);case 3:return new q(4,[Ve(s)]);case 4:return new q(5,[Ve(i)]);case 5:return new q(2,[Ve(o)]);case 6:return new q(6,[Ve(a)]);case 7:return new q(7,[Ve(l)]);case 8:return new q(8,[Ve(d),Rt(c)]);case 9:return new q(9,[Ve(m),Rt(u)]);case 10:return new q(10,[Ve(p),Rt(h)]);case 11:return new q(11,[Ve(w),Rt($)]);case 12:return new q(12,[Ve(x),Rt(C)]);case 13:return new q(13,[Ve(O),Rt(E)]);case 14:return new q(14,[Ve(X),Rt(L)]);case 15:return new q(15,[Ve(Se),Rt(pe)]);case 16:return new q(16,[Ve(Y),Rt(de)]);default:return new q(17,[])}}function Rs(e){const t=(r,s)=>se(k(()=>M(A("account-registry"),k(()=>M(A("partners"),k(()=>M(A(dt(r)),k(()=>s)))))))),n=(r,s,i)=>{const o=se(k(()=>M(A("accounts"),k(()=>M(A(dn(s)),k(()=>i))))));return t(r,o)};switch(e.tag){case 3:return t(e.fields[0],["accounts"]);case 4:return t(e.fields[0],["super-configuration"]);case 5:return t(e.fields[0],["benefits-onboarding-configuration"]);case 6:return t(e.fields[0],["bank-details-configuration"]);case 2:return t(e.fields[0],["directory"]);case 7:return t(e.fields[0],["workspace"]);case 8:return n(e.fields[0],e.fields[1],[]);case 9:return n(e.fields[0],e.fields[1],["directory"]);case 10:return n(e.fields[0],e.fields[1],["users"]);case 11:return n(e.fields[0],e.fields[1],["super-configuration"]);case 12:return n(e.fields[0],e.fields[1],["benefits-onboarding-configuration"]);case 13:return n(e.fields[0],e.fields[1],["bank-details-configuration"]);case 14:return n(e.fields[0],e.fields[1],["salary-packaging-configuration"]);case 15:return n(e.fields[0],e.fields[1],["workspace"]);case 16:return n(e.fields[0],e.fields[1],["hris-migration"]);case 17:case 0:return y(["account-registry","partners"]);default:return t(e.fields[0],[])}}function Na(e){switch(e.tag){case 3:{const t=["account-registry","partners",dt(e.fields[0]),"accounts"];return Xe(n=>{ht(y(t))})}case 4:{const t=["account-registry","partners",dt(e.fields[0]),"super-configuration"];return Xe(n=>{ht(y(t))})}case 5:{const t=["account-registry","partners",dt(e.fields[0]),"benefits-onboarding-configuration"];return Xe(n=>{ht(y(t))})}case 6:{const t=["account-registry","partners",dt(e.fields[0]),"bank-details-configuration"];return Xe(n=>{ht(y(t))})}case 2:{const t=["account-registry","partners",dt(e.fields[0]),"directory"];return Xe(n=>{ht(y(t))})}case 7:{const t=["account-registry","partners",dt(e.fields[0]),"workspace"];return Xe(n=>{ht(y(t))})}case 8:{const t=["account-registry","partners",dt(e.fields[0]),"accounts",dn(e.fields[1])];return Xe(n=>{ht(y(t))})}case 9:{const t=["account-registry","partners",dt(e.fields[0]),"accounts",dn(e.fields[1]),"directory"];return Xe(n=>{ht(y(t))})}case 10:{const t=["account-registry","partners",dt(e.fields[0]),"accounts",dn(e.fields[1]),"users"];return Xe(n=>{ht(y(t))})}case 11:{const t=["account-registry","partners",dt(e.fields[0]),"accounts",dn(e.fields[1]),"super-configuration"];return Xe(n=>{ht(y(t))})}case 12:{const t=["account-registry","partners",dt(e.fields[0]),"accounts",dn(e.fields[1]),"benefits-onboarding-configuration"];return Xe(n=>{ht(y(t))})}case 13:{const t=["account-registry","partners",dt(e.fields[0]),"accounts",dn(e.fields[1]),"bank-details-configuration"];return Xe(n=>{ht(y(t))})}case 14:{const t=["account-registry","partners",dt(e.fields[0]),"accounts",dn(e.fields[1]),"salary-packaging-configuration"];return Xe(n=>{ht(y(t))})}case 15:{const t=["account-registry","partners",dt(e.fields[0]),"accounts",dn(e.fields[1]),"workspace"];return Xe(n=>{ht(y(t))})}case 16:{const t=["account-registry","partners",dt(e.fields[0]),"accounts",dn(e.fields[1]),"hris-migration"];return Xe(n=>{ht(y(t))})}case 0:case 17:return le();default:{const t=["account-registry","partners",dt(e.fields[0])];return Xe(n=>{ht(y(t))})}}}function n1(e,t){switch(t.tag){case 1:return new oe(1,[]);case 2:return t.fields[0].tag===1?new oe(2,[new g(1,[t.fields[0].fields[0]])]):new oe(2,[new g(0,[e(t.fields[0].fields[0])])]);case 3:return new oe(3,[t.fields[0]]);default:return new oe(0,[])}}class Nd extends Q{constructor(t,n,r){super(),this.Name=t,this.ExternalId=n,this.LegalEntity=r}}class Td extends Q{constructor(t,n){super(),this.BusinessName=t,this.BusinessNumber=n}}class Md extends Q{constructor(t,n){super(),this.ReadProtectedData=t,this.ProvisionAccounts=n}}function Rd(e){return new Md(hc("AccountRegistry.ReadProtectedData",e.Roles,{Equals:(t,n)=>t===n,GetHashCode:kr}),hc("AccountRegistry.ProvisionAccounts",e.Roles,{Equals:(t,n)=>t===n,GetHashCode:kr}))}const Pd=new Md(!1,!1);class W extends j{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["BadPrimitive","BadPrimitiveExtra","BadType","BadField","BadPath","TooSmallArray","FailMessage","BadOneOf"]}}class gt extends j{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["PascalCase","CamelCase","SnakeCase"]}}function Dd(e){return e.slice(void 0,1).toLowerCase()+e.slice(1,e.length)}function Od(e,t){switch(e.tag){case 2:return Jm(Dd(t),"[A-Z]","_$0").toLowerCase();case 0:return t;default:return Dd(t)}}function Fd(e,t){r1(t);const n=new Date(e);return n.offset=t??new Date().getTimezoneOffset()*-6e4,n}function r1(e){if(e!=null&&e!==0){if(e%6e4!==0)throw new Error("Offset must be specified in whole minutes.");if(Math.abs(e/36e5)>14)throw new Error("Offset must be within plus or minus 14 hours.")}}function s1(){return Fd(-621355968e5,0)}function i1(e){const[t,n]=Wl(e),r=n==null?t.getTimezoneOffset()*-6e4:n==="Z"?0:n*6e4;return Fd(t.getTime(),r)}function o1(e,t){try{return t.contents=i1(e),!0}catch{return!1}}function Ps(e){return e<0?Math.ceil(e):Math.floor(e)}function Vd(e=0,t=0,n=0,r=0,s=0){switch(arguments.length){case 1:return a1(arguments[0]);case 3:e=0,t=arguments[0],n=arguments[1],r=arguments[2],s=0;break}return e*864e5+t*36e5+n*6e4+r*1e3+s}function a1(e){return Number(BigInt(e)/10000n)}function l1(e){return Ps(e/864e5)}function c1(e){return Ps(e%864e5/36e5)}function u1(e){return Ps(e%36e5/6e4)}function d1(e){return Ps(e%6e4/1e3)}function f1(e){return Ps(e%1e3)}function h1(e,t="c",n){if(["c","g","G"].indexOf(t)===-1)throw new Error("Custom formats are not supported");const r=Math.abs(l1(e)),s=Math.abs(c1(e)),i=Math.abs(u1(e)),o=Math.abs(d1(e)),a=Math.abs(f1(e));return`${e<0?"-":""}${r===0&&(t==="c"||t==="g")?"":t==="c"?r+".":r+":"}${t==="g"?s:_e(s,2)}:${_e(i,2)}:${_e(o,2)}${a===0&&(t==="c"||t==="g")?"":t==="g"?"."+_e(a,3):"."+im(a,3,7)}`}function m1(e){const t=e.search("\\."),n=e.search("\\:");if(t===-1&&n===-1){const r=parseInt(e,0);if(isNaN(r))throw new Error(`String '${e}' was not recognized as a valid TimeSpan.`);return Vd(r,0,0,0,0)}if(n>0){const r=/^(-?)((\d+)\.)?(?:0*)([0-9]|0[0-9]|1[0-9]|2[0-3]):(?:0*)([0-5][0-9]|[0-9])(:(?:0*)([0-5][0-9]|[0-9]))?\.?(\d+)?$/.exec(e);if(r!=null&&r[4]!=null&&r[5]!=null){let s=0,i=0,o=0;const a=r[1]!=null&&r[1]==="-"?-1:1,l=+r[4],c=+r[5];if(r[3]!=null&&(s=+r[3]),r[7]!=null&&(o=+r[7]),r[8]!=null)switch(r[8].length){case 1:i=+r[8]*100;break;case 2:i=+r[8]*10;break;case 3:i=+r[8];break;case 4:i=+r[8]/10;break;case 5:i=+r[8]/100;break;case 6:i=+r[8]/1e3;break;case 7:i=+r[8]/1e4;break;default:throw new Error(`String '${e}' was not recognized as a valid TimeSpan.`)}return a*Vd(s,l,c,o,i)}}throw new Error(`String '${e}' was not recognized as a valid TimeSpan.`)}function p1(e,t){try{return t.contents=m1(e),!0}catch{return!1}}class Ld{constructor(t){this.k=t}}function Dt(e){return new Ld(e)}function te(e){return e.k}class be extends Ld{constructor(t,n,r,s){super(t),this.left=n,this.right=r,this.h=s|0}}function Ot(e,t,n,r){return new be(e,t,n,r)}function Re(e){return e.left}function Ee(e){return e.right}function Gr(e){return e.h}function zx(){}function Bd(e,t){e:for(;;){const n=e,r=t;if(n!=null){const s=D(n);if(s instanceof be){const i=s;e=Re(i),t=Bd(Ee(i),r+1);continue e}else return r+1|0}else return r|0}}function g1(e){return Bd(e,0)}function Xt(e,t,n){let r,s,i;const o=e;if(o!=null){const d=D(o);i=d instanceof be?(r=d,Gr(r)):1}else i=0;let a;const l=n;if(l!=null){const d=D(l);a=d instanceof be?(s=d,Gr(s)):1}else a=0;const c=(i<a?a:i)|0;return c===0?Dt(t):Ot(t,e,n,c+1)}function Ud(e,t,n){let r,s,i,o,a,l,c,d,u;const m=e;if(m!=null){const $=D(m);u=$ instanceof be?(r=$,Gr(r)):1}else u=0;let h;const p=n;if(p!=null){const $=D(p);h=$ instanceof be?(s=$,Gr(s)):1}else h=0;if(h>u+2){const $=D(n);if($ instanceof be){const w=$;if(i=Re(w),(i!=null?(o=D(i),o instanceof be?(a=o,Gr(a)):1):0)>u+1){const C=D(Re(w));if(C instanceof be){const x=C;return Xt(Xt(e,t,Re(x)),te(x),Xt(Ee(x),te(w),Ee(w)))}else throw new Error("internal error: Set.rebalance")}else return Xt(Xt(e,t,Re(w)),te(w),Ee(w))}else throw new Error("internal error: Set.rebalance")}else if(u>h+2){const $=D(e);if($ instanceof be){const w=$;if(l=Ee(w),(l!=null?(c=D(l),c instanceof be?(d=c,Gr(d)):1):0)>h+1){const C=D(Ee(w));if(C instanceof be){const x=C;return Xt(Xt(Re(w),te(w),Re(x)),te(x),Xt(Ee(x),t,n))}else throw new Error("internal error: Set.rebalance")}else return Xt(Re(w),te(w),Xt(Ee(w),t,n))}else throw new Error("internal error: Set.rebalance")}else return Xt(e,t,n)}function qr(e,t,n){if(n!=null){const r=D(n),s=e.Compare(t,te(r))|0;if(r instanceof be){const i=r;return s<0?Ud(qr(e,t,Re(i)),te(i),Ee(i)):s===0?n:Ud(Re(i),te(i),qr(e,t,Ee(i)))}else{const i=e.Compare(t,te(r))|0;return i<0?Ot(t,void 0,n,2):i===0?n:Ot(t,n,void 0,2)}}else return Dt(t)}function jd(e,t,n){e:for(;;){const r=e,s=t,i=n;if(i!=null){const o=D(i),a=r.Compare(s,te(o))|0;if(o instanceof be){const l=o;if(a<0){e=r,t=s,n=Re(l);continue e}else{if(a===0)return!0;e=r,t=s,n=Ee(l);continue e}}else return a===0}else return!1}}function zd(e,t){e:for(;;){const n=e,r=t;if(r!=null){const s=D(r);if(s instanceof be){const i=s;zd(n,Re(i)),n(te(i)),e=n,t=Ee(i);continue e}else n(te(s))}break}}class $1 extends Q{constructor(t,n){super(),this.stack=t,this.started=n}}function Hd(e){e:for(;;){const t=e;if(K(t))return je();{const n=V(t),r=_(t);if(n!=null){const s=D(n);if(s instanceof be){const i=s;e=Fe([Re(i),Dt(te(i)),Ee(i)],r);continue e}else return t}else{e=r;continue e}}}}function Wd(e){return new $1(Hd(ee(e)),!1)}function w1(){throw new Error("Enumeration not started")}function y1(){throw new Error("Enumeration already started")}function Gd(e){if(e.started){const t=e.stack;if(K(t))return y1();if(V(t)!=null){const n=D(V(t));return te(n)}else throw new Error("Please report error: Set iterator, unexpected stack for current")}else return w1()}function b1(e){if(e.started){const t=e.stack;if(K(t))return!1;if(V(t)!=null){if(D(V(t))instanceof be)throw new Error("Please report error: Set iterator, unexpected stack for moveNext");return e.stack=Hd(_(t)),!K(e.stack)}else throw new Error("Please report error: Set iterator, unexpected stack for moveNext")}else return e.started=!0,!K(e.stack)}function qd(e){let t=Wd(e);return{"System.Collections.Generic.IEnumerator`1.get_Current"(){return Gd(t)},"System.Collections.IEnumerator.get_Current"(){return Gd(t)},"System.Collections.IEnumerator.MoveNext"(){return b1(t)},"System.Collections.IEnumerator.Reset"(){t=Wd(e)},Dispose(){}}}function _1(e,t,n){e:for(;;){const r=e,s=t,i=n;if(K(s))return K(i)?0:-1;if(K(i))return 1;if(V(i)!=null)if(V(s)!=null){const o=D(V(s)),a=D(V(i));if(o instanceof be){const l=o;if(Re(l)==null)if(a instanceof be){const c=a;if(Re(c)==null){const d=r.Compare(te(l),te(c))|0;if(d!==0)return d|0;e=r,t=Mt(Ee(l),_(s)),n=Mt(Ee(c),_(i));continue e}else{let d,u,m,h,p;switch(K(s)?K(i)?d=2:V(i)!=null?(d=1,h=_(i),p=D(V(i))):d=2:V(s)!=null?(d=0,u=_(s),m=D(V(s))):K(i)?d=2:V(i)!=null?(d=1,h=_(i),p=D(V(i))):d=2,d){case 0:if(m instanceof be){const $=m;e=r,t=Fe([Re($),Ot(te($),void 0,Ee($),0)],u),n=i;continue e}else{e=r,t=Fe([void 0,Dt(te(m))],u),n=i;continue e}case 1:if(p instanceof be){const $=p;e=r,t=s,n=Fe([Re($),Ot(te($),void 0,Ee($),0)],h);continue e}else{e=r,t=s,n=Fe([void 0,Dt(te(p))],h);continue e}default:throw new Error("unexpected state in SetTree.compareStacks")}}}else{const c=r.Compare(te(l),te(a))|0;if(c!==0)return c|0;e=r,t=Mt(Ee(l),_(s)),n=Mt(void 0,_(i));continue e}else{let c,d,u,m,h;switch(K(s)?K(i)?c=2:V(i)!=null?(c=1,m=_(i),h=D(V(i))):c=2:V(s)!=null?(c=0,d=_(s),u=D(V(s))):K(i)?c=2:V(i)!=null?(c=1,m=_(i),h=D(V(i))):c=2,c){case 0:if(u instanceof be){const p=u;e=r,t=Fe([Re(p),Ot(te(p),void 0,Ee(p),0)],d),n=i;continue e}else{e=r,t=Fe([void 0,Dt(te(u))],d),n=i;continue e}case 1:if(h instanceof be){const p=h;e=r,t=s,n=Fe([Re(p),Ot(te(p),void 0,Ee(p),0)],m);continue e}else{e=r,t=s,n=Fe([void 0,Dt(te(h))],m);continue e}default:throw new Error("unexpected state in SetTree.compareStacks")}}}else if(a instanceof be){const l=a;if(Re(l)==null){const c=r.Compare(te(o),te(l))|0;if(c!==0)return c|0;e=r,t=Mt(void 0,_(s)),n=Mt(Ee(l),_(i));continue e}else{let c,d,u,m,h;switch(K(s)?K(i)?c=2:V(i)!=null?(c=1,m=_(i),h=D(V(i))):c=2:V(s)!=null?(c=0,d=_(s),u=D(V(s))):K(i)?c=2:V(i)!=null?(c=1,m=_(i),h=D(V(i))):c=2,c){case 0:if(u instanceof be){const p=u;e=r,t=Fe([Re(p),Ot(te(p),void 0,Ee(p),0)],d),n=i;continue e}else{e=r,t=Fe([void 0,Dt(te(u))],d),n=i;continue e}case 1:if(h instanceof be){const p=h;e=r,t=s,n=Fe([Re(p),Ot(te(p),void 0,Ee(p),0)],m);continue e}else{e=r,t=s,n=Fe([void 0,Dt(te(h))],m);continue e}default:throw new Error("unexpected state in SetTree.compareStacks")}}}else{const l=r.Compare(te(o),te(a))|0;if(l!==0)return l|0;e=r,t=_(s),n=_(i);continue e}}else{D(V(i));let o,a,l,c,d;switch(K(s)?K(i)?o=2:V(i)!=null?(o=1,c=_(i),d=D(V(i))):o=2:V(s)!=null?(o=0,a=_(s),l=D(V(s))):K(i)?o=2:V(i)!=null?(o=1,c=_(i),d=D(V(i))):o=2,o){case 0:if(l instanceof be){const u=l;e=r,t=Fe([Re(u),Ot(te(u),void 0,Ee(u),0)],a),n=i;continue e}else{e=r,t=Fe([void 0,Dt(te(l))],a),n=i;continue e}case 1:if(d instanceof be){const u=d;e=r,t=s,n=Fe([Re(u),Ot(te(u),void 0,Ee(u),0)],c);continue e}else{e=r,t=s,n=Fe([void 0,Dt(te(d))],c);continue e}default:throw new Error("unexpected state in SetTree.compareStacks")}}else if(V(s)!=null){D(V(s));let o,a,l,c,d;switch(K(s)?K(i)?o=2:V(i)!=null?(o=1,c=_(i),d=D(V(i))):o=2:V(s)!=null?(o=0,a=_(s),l=D(V(s))):K(i)?o=2:V(i)!=null?(o=1,c=_(i),d=D(V(i))):o=2,o){case 0:if(l instanceof be){const u=l;e=r,t=Fe([Re(u),Ot(te(u),void 0,Ee(u),0)],a),n=i;continue e}else{e=r,t=Fe([void 0,Dt(te(l))],a),n=i;continue e}case 1:if(d instanceof be){const u=d;e=r,t=s,n=Fe([Re(u),Ot(te(u),void 0,Ee(u),0)],c);continue e}else{e=r,t=s,n=Fe([void 0,Dt(te(d))],c);continue e}default:throw new Error("unexpected state in SetTree.compareStacks")}}else{e=r,t=_(s),n=_(i);continue e}}}function Kd(e,t,n){return t==null?n==null?0:-1:n==null?1:_1(e,ee(t),ee(n))|0}function v1(e,t,n){let r=n;zd(s=>{Tt(t,r,s),r=r+1|0},e)}function x1(e,t,n){e:for(;;){const r=e,s=t,i=n;if(i["System.Collections.IEnumerator.MoveNext"]()){e=r,t=qr(r,i["System.Collections.Generic.IEnumerator`1.get_Current"](),s),n=i;continue e}else return s}}function C1(e,t){return mi((n,r)=>qr(e,r,n),void 0,t)}function S1(e,t){return vn((n,r)=>qr(e,r,n),void 0,t)}function Zd(e,t){if(un(t))return C1(e,t);if(t instanceof bt)return S1(e,t);{const n=Oe(t);try{return x1(e,void 0,n)}finally{xe(n)}}}class Ta{constructor(t,n){this.comparer=t,this.tree=n}GetHashCode(){return E1(this)|0}Equals(t){let n;const r=this;return t instanceof Ta&&(n=t,Kd(Kr(r),Qt(r),Qt(n))===0)}toString(){return"set ["+ne("; ",Le(n=>Ze(n),this))+"]"}get[Symbol.toStringTag](){return"FSharpSet"}toJSON(){const t=this;return Array.from(t)}CompareTo(t){const n=this;return Kd(Kr(n),Qt(n),Qt(t))|0}"System.Collections.Generic.ICollection`1.Add2B595"(t){throw new Error("ReadOnlyCollection")}"System.Collections.Generic.ICollection`1.Clear"(){throw new Error("ReadOnlyCollection")}"System.Collections.Generic.ICollection`1.Remove2B595"(t){throw new Error("ReadOnlyCollection")}"System.Collections.Generic.ICollection`1.Contains2B595"(t){const n=this;return jd(Kr(n),t,Qt(n))}"System.Collections.Generic.ICollection`1.CopyToZ3B4C077E"(t,n){v1(Qt(this),t,n)}"System.Collections.Generic.ICollection`1.get_IsReadOnly"(){return!0}"System.Collections.Generic.ICollection`1.get_Count"(){return Ma(this)|0}"System.Collections.Generic.IReadOnlyCollection`1.get_Count"(){return Ma(this)|0}GetEnumerator(){return qd(Qt(this))}[Symbol.iterator](){return us(Oe(this))}"System.Collections.IEnumerable.GetEnumerator"(){return qd(Qt(this))}get size(){return Ma(this)|0}add(t){throw new Error("Set cannot be mutated")}clear(){throw new Error("Set cannot be mutated")}delete(t){throw new Error("Set cannot be mutated")}has(t){return Jd(this,t)}keys(){return Le(n=>n,this)}values(){return Le(n=>n,this)}entries(){return Le(n=>[n,n],this)}forEach(t,n){const r=this;Fr(s=>{t(s,s,r)},r)}}function Pi(e,t){return new Ta(e,t)}function Kr(e){return e.comparer}function Qt(e){return e.tree}function A1(e){return Pi(e,void 0)}function k1(e,t){return Pi(Kr(e),qr(Kr(e),t,Qt(e)))}function Ma(e){return g1(Qt(e))}function Jd(e,t){return jd(Kr(e),t,Qt(e))}function E1(e){let t=0;const n=Oe(e);try{for(;n["System.Collections.IEnumerator.MoveNext"]();){const r=n["System.Collections.Generic.IEnumerator`1.get_Current"]();t=(t<<1)+bn(r)+631|0}}finally{xe(n)}return Math.abs(t)|0}function Ra(e,t){return Jd(t,e)}function I1(e,t){return k1(t,e)}function N1(e){return A1(e)}function T1(e,t){return Pi(t,Zd(t,e))}function M1(e,t){return Pi(t,Zd(t,e))}function Ds(e,t,n){try{return"Expecting "+e+" but instead got:"+(n?`
4
4
  `:" ")+(JSON.stringify(t,null,4)+"")}catch{return"Expecting "+e+" but decoder failed. Couldn't report given value due to circular structure."+(n?`
5
- `:" ")}}function E1(e,t){const n=t.tag===2?Os(t.fields[0],t.fields[1],!0):t.tag===1?Os(t.fields[0],t.fields[1],!1)+`
6
- Reason: `+t.fields[2]:t.tag===3?Os(t.fields[0],t.fields[1],!0):t.tag===4?Os(t.fields[0],t.fields[1],!0)+("\nNode `"+t.fields[2]+"` is unkown."):t.tag===5?"Expecting "+t.fields[0]+`.
5
+ `:" ")}}function R1(e,t){const n=t.tag===2?Ds(t.fields[0],t.fields[1],!0):t.tag===1?Ds(t.fields[0],t.fields[1],!1)+`
6
+ Reason: `+t.fields[2]:t.tag===3?Ds(t.fields[0],t.fields[1],!0):t.tag===4?Ds(t.fields[0],t.fields[1],!0)+("\nNode `"+t.fields[2]+"` is unkown."):t.tag===5?"Expecting "+t.fields[0]+`.
7
7
  `+(JSON.stringify(t.fields[1],null,4)+""):t.tag===7?`The following errors were found:
8
8
 
9
9
  `+ne(`
10
10
 
11
- `,t.fields[0]):t.tag===6?"The following `failure` occurred with the decoder: "+t.fields[0]:Os(t.fields[0],t.fields[1],!1);return t.tag===7?n:"Error at: `"+e+"`\n"+n}function Jd(e,t,n){const r=t(e,n);if(r.tag===1){const s=r.fields[0];return new $(1,[E1(s[0],s[1])])}else return new $(0,[r.fields[0]])}function en(e,t){try{return Jd("$",e,JSON.parse(t))}catch(n){if(n instanceof SyntaxError)return new $(1,["Given an invalid JSON: "+n.message]);throw n}}function Yd(e,t){return typeof t=="string"?new $(0,[t]):new $(1,[[e,new W(0,["a string",t])]])}function I1(e,t){if(typeof t=="string"){const n=t;return n.length===1?new $(0,[n[0]]):new $(1,[[e,new W(0,["a single character string",t])]])}else return new $(1,[[e,new W(0,["a char",t])]])}function N1(e,t){if(typeof t=="string"){let n,r="00000000-0000-0000-0000-000000000000";return n=[b0(t,new yt(()=>r,s=>{r=s})),r],n[0]?new $(0,[n[1]]):new $(1,[[e,new W(0,["a guid",t])]])}else return new $(1,[[e,new W(0,["a guid",t])]])}function T1(e,t){return t==null?new $(0,[void 0]):new $(1,[[e,new W(0,["null",t])]])}const Xd=e=>t=>{const n=e,r=t;if(typeof r=="number"){const s=r;return isFinite(s)&&Math.floor(s)===s?-128<=s&&s<=127?new $(0,[(s+128&255)-128]):new $(1,[[n,new W(1,["a sbyte",s,"Value was either too large or too small for a sbyte"])]]):new $(1,[[n,new W(1,["a sbyte",s,"Value is not an integral value"])]])}else if(typeof r=="string"){let s,i=0;return s=[Vr(r,511,!1,8,new yt(()=>i,o=>{i=o|0})),i],s[0]?new $(0,[s[1]]):new $(1,[[n,new W(0,["a sbyte",r])]])}else return new $(1,[[n,new W(0,["a sbyte",r])]])},Qd=e=>t=>{const n=e,r=t;if(typeof r=="number"){const s=r;return isFinite(s)&&Math.floor(s)===s?0<=s&&s<=255?new $(0,[s&255]):new $(1,[[n,new W(1,["a byte",s,"Value was either too large or too small for a byte"])]]):new $(1,[[n,new W(1,["a byte",s,"Value is not an integral value"])]])}else if(typeof r=="string"){let s,i=0;return s=[Vr(r,511,!0,8,new yt(()=>i,o=>{i=o})),i],s[0]?new $(0,[s[1]]):new $(1,[[n,new W(0,["a byte",r])]])}else return new $(1,[[n,new W(0,["a byte",r])]])},ef=e=>t=>{const n=e,r=t;if(typeof r=="number"){const s=r;return isFinite(s)&&Math.floor(s)===s?-32768<=s&&s<=32767?new $(0,[(s+32768&65535)-32768]):new $(1,[[n,new W(1,["an int16",s,"Value was either too large or too small for an int16"])]]):new $(1,[[n,new W(1,["an int16",s,"Value is not an integral value"])]])}else if(typeof r=="string"){let s,i=0;return s=[Vr(r,511,!1,16,new yt(()=>i,o=>{i=o|0})),i],s[0]?new $(0,[s[1]]):new $(1,[[n,new W(0,["an int16",r])]])}else return new $(1,[[n,new W(0,["an int16",r])]])},tf=e=>t=>{const n=e,r=t;if(typeof r=="number"){const s=r;return isFinite(s)&&Math.floor(s)===s?0<=s&&s<=65535?new $(0,[s&65535]):new $(1,[[n,new W(1,["an uint16",s,"Value was either too large or too small for an uint16"])]]):new $(1,[[n,new W(1,["an uint16",s,"Value is not an integral value"])]])}else if(typeof r=="string"){let s,i=0;return s=[Vr(r,511,!0,16,new yt(()=>i,o=>{i=o})),i],s[0]?new $(0,[s[1]]):new $(1,[[n,new W(0,["an uint16",r])]])}else return new $(1,[[n,new W(0,["an uint16",r])]])},nf=e=>t=>{const n=e,r=t;if(typeof r=="number"){const s=r;return isFinite(s)&&Math.floor(s)===s?-2147483648<=s&&s<=2147483647?new $(0,[~~s]):new $(1,[[n,new W(1,["an int",s,"Value was either too large or too small for an int"])]]):new $(1,[[n,new W(1,["an int",s,"Value is not an integral value"])]])}else if(typeof r=="string"){let s,i=0;return s=[Vr(r,511,!1,32,new yt(()=>i,o=>{i=o|0})),i],s[0]?new $(0,[s[1]]):new $(1,[[n,new W(0,["an int",r])]])}else return new $(1,[[n,new W(0,["an int",r])]])},rf=e=>t=>{const n=e,r=t;if(typeof r=="number"){const s=r;return isFinite(s)&&Math.floor(s)===s?0<=s&&s<=4294967295?new $(0,[s>>>0]):new $(1,[[n,new W(1,["an uint32",s,"Value was either too large or too small for an uint32"])]]):new $(1,[[n,new W(1,["an uint32",s,"Value is not an integral value"])]])}else if(typeof r=="string"){let s,i=0;return s=[Vr(r,511,!0,32,new yt(()=>i,o=>{i=o})),i],s[0]?new $(0,[s[1]]):new $(1,[[n,new W(0,["an uint32",r])]])}else return new $(1,[[n,new W(0,["an uint32",r])]])};function R1(e,t){return typeof t=="boolean"?new $(0,[t]):new $(1,[[e,new W(0,["a boolean",t])]])}function M1(e,t){return typeof t=="number"?new $(0,[t]):new $(1,[[e,new W(0,["a float",t])]])}function P1(e,t){return typeof t=="number"?new $(0,[t]):new $(1,[[e,new W(0,["a float32",t])]])}function O1(e,t){if(typeof t=="string"){let n,r=zm();return n=[Wm(t,new yt(()=>r,s=>{r=s})),r],n[0]?new $(0,[Gm(n[1])]):new $(1,[[e,new W(0,["a datetime",t])]])}else return new $(1,[[e,new W(0,["a datetime",t])]])}function D1(e,t){if(typeof t=="string"){let n,r=Q$();return n=[t1(t,new yt(()=>r,s=>{r=s})),r],n[0]?new $(0,[n[1]]):new $(1,[[e,new W(0,["a datetimeoffset",t])]])}else return new $(1,[[e,new W(0,["a datetime",t])]])}function F1(e,t){if(typeof t=="string"){let n,r=0;return n=[u1(t,new yt(()=>r,s=>{r=s})),r],n[0]?new $(0,[n[1]]):new $(1,[[e,new W(0,["a timespan",t])]])}else return new $(1,[[e,new W(0,["a timespan",t])]])}function sf(e,t,n,r){let s;const i=n+".["+Qn(e)+"]";if(Array.isArray(r)){const o=r;return e<o.length?t(i,we(e,o)):new $(1,[[i,new W(5,["a longer array. Need index `"+Qn(e)+"` but there are only `"+(s=o.length,Qn(s))+"` entries",r])]])}else return new $(1,[[i,new W(0,["an array",r])]])}function V1(e,t,n){return n==null?new $(0,[void 0]):xn(lt,e(t,n))}function of(e,t,n){if(Array.isArray(n)){let r=-1;return xn(mi,hi((s,i)=>{if(r=r+1|0,s.tag===0){const o=e(t+".["+Qn(r)+"]",i);return o.tag===0?new $(0,[Tt(o.fields[0],s.fields[0])]):new $(1,[o.fields[0]])}else return s},new $(0,[je()]),n))}else return new $(1,[[t,new W(0,["a list",n])]])}function L1(e,t,n){if(Array.isArray(n)){let r=-1;return xn(a0,hi((s,i)=>{if(r=r+1|0,s.tag===0){const o=e(t+".["+Qn(r)+"]",i);return o.tag===0?new $(0,[R([o.fields[0]],s.fields[0])]):new $(1,[o.fields[0]])}else return s},new $(0,[[]]),n))}else return new $(1,[[t,new W(0,["a seq",n])]])}function af(e,t,n){if(Array.isArray(n)){let r=-1;const s=n;return hi((i,o)=>{if(r=r+1|0,i.tag===0){const a=i.fields[0],l=e(t+".["+Qn(r)+"]",o);return l.tag===0?(Nt(a,r,l.fields[0]),new $(0,[a])):new $(1,[l.fields[0]])}else return i},new $(0,[fi(new Array(s.length),0,s.length,null)]),s)}else return new $(1,[[t,new W(0,["an array",n])]])}function B1(e,t,n){return((s,i)=>{e:for(;;){const o=s,a=i;if(K(o))return new $(1,[[t,new W(7,[a])]]);{const l=Jd(t,$e(V(o)),n);if(l.tag===1){s=_(o),i=rt(a,ee(l.fields[0]));continue e}else return new $(0,[l.fields[0]])}}})(e,je())}function U1(e,t,n){return new $(0,[e])}function lf(e,t,n,r){const s=t(n,r);return s.tag===0?e(s.fields[0],n,r):new $(1,[s.fields[0]])}function j1(e,t,n,r){const s=t(n,r);return s.tag===1?new $(1,[s.fields[0]]):new $(0,[e(s.fields[0])])}function z1(e,t){let n;const r=e;return n=s=>i=>sf(0,r,s,i),s=>i=>lf(po(o=>{let a;const l=t;return a=c=>d=>sf(1,l,c,d),c=>d=>lf((u,m,h)=>U1([o,u]),$e(a),c,d)}),$e(n),s,i)}function H1(e){return A$(e,{Compare:Bt})}function W1(e){return k1(e,{Compare:Bt})}function G1(e,t,n){return n!==null&&Object.getPrototypeOf(n||!1)===Object.prototype?cc((r,s)=>{const i=r[0];return s.tag===0?xn(o=>Tt(o,s.fields[0]),r[1](t+"."+i)(n[i])):s},e,new $(0,[je()])):new $(1,[[t,new W(0,["an object",n])]])}function q1(e,t,n,r){return r!==null&&Object.getPrototypeOf(r||!1)===Object.prototype?_s((s,i)=>{if(s.tag===0){const o=e(n,i);if(o.tag===0){const a=t(n+"."+i,r[i]);return a.tag===0?new $(0,[Tt([o.fields[0],a.fields[0]],s.fields[0])]):new $(1,[a.fields[0]])}else return new $(1,[o.fields[0]])}else return s},new $(0,[je()]),Object.keys(r)):new $(1,[[n,new W(0,["an object",r])]])}function cf(e,t,n,r){let s;const i=t.length+e|0;if(i!==r.length)return new $(1,[[n,new W(6,[(s=r.length|0,qt(jt("Expected array of length %i but got %i"))(i)(s))])]]);{let o=new $(0,[je()]);for(let a=e;a<=r.length-1;a++)if(o.tag===0){const l=o.fields[0],c=qt(jt("%s[%i]"))(n)(a),d=we(a-e,t),u=we(a,r);o=xn(m=>Tt(m,l),d(c)(u))}return xn(mi,o)}}function uf(e,t,n,r,s,i){const o=op(a=>Er(a)===r,Fl(n));if(o!=null){const a=o,l=Vn(c=>tn(e,t,!1,c[1]),Ul(a));return xn(c=>Tm(a,tr(c)),l.length===0&&i.length<=1?new $(0,[je()]):cf(1,l,s,i))}else return new $(1,[[s,new W(6,["Cannot find case "+r+" in "+Oe(n)])]])}function df(e,t,n,r){let s;const i=new yt(ge());let o;const a=Oe(r);o=a===""?e:hd(a,i,e);let l;if(Bl(r)){const c=Vn(d=>[Od(t,Er(d)),tn(o,t,!1,d[1])],ms(r));l=d=>u=>xn(m=>Rm(r,tr(m)),G1(c,d,u))}else if(Ll(r))l=c=>d=>{if(typeof d=="string")return uf(o,t,r,d,c,[]);if(Array.isArray(d)){const u=d;return Ap(m=>uf(o,t,r,m,c,u),Yd(c+"[0]",we(0,u)))}else return new $(1,[[c,new W(0,["a string or array",d])]])};else if(n)l=c=>d=>new $(1,[[c,new W(2,["an extra coder for "+Oe(r),d])]]);else throw new Error((s=Oe(r),qt(jt(`Cannot generate auto decoder for %s. Please pass an extra decoder.
11
+ `,t.fields[0]):t.tag===6?"The following `failure` occurred with the decoder: "+t.fields[0]:Ds(t.fields[0],t.fields[1],!1);return t.tag===7?n:"Error at: `"+e+"`\n"+n}function Yd(e,t,n){const r=t(e,n);if(r.tag===1){const s=r.fields[0];return new g(1,[R1(s[0],s[1])])}else return new g(0,[r.fields[0]])}function en(e,t){try{return Yd("$",e,JSON.parse(t))}catch(n){if(n instanceof SyntaxError)return new g(1,["Given an invalid JSON: "+n.message]);throw n}}function Xd(e,t){return typeof t=="string"?new g(0,[t]):new g(1,[[e,new W(0,["a string",t])]])}function P1(e,t){if(typeof t=="string"){const n=t;return n.length===1?new g(0,[n[0]]):new g(1,[[e,new W(0,["a single character string",t])]])}else return new g(1,[[e,new W(0,["a char",t])]])}function D1(e,t){if(typeof t=="string"){let n,r="00000000-0000-0000-0000-000000000000";return n=[x0(t,new yt(()=>r,s=>{r=s})),r],n[0]?new g(0,[n[1]]):new g(1,[[e,new W(0,["a guid",t])]])}else return new g(1,[[e,new W(0,["a guid",t])]])}function O1(e,t){return t==null?new g(0,[void 0]):new g(1,[[e,new W(0,["null",t])]])}const Qd=e=>t=>{const n=e,r=t;if(typeof r=="number"){const s=r;return isFinite(s)&&Math.floor(s)===s?-128<=s&&s<=127?new g(0,[(s+128&255)-128]):new g(1,[[n,new W(1,["a sbyte",s,"Value was either too large or too small for a sbyte"])]]):new g(1,[[n,new W(1,["a sbyte",s,"Value is not an integral value"])]])}else if(typeof r=="string"){let s,i=0;return s=[Lr(r,511,!1,8,new yt(()=>i,o=>{i=o|0})),i],s[0]?new g(0,[s[1]]):new g(1,[[n,new W(0,["a sbyte",r])]])}else return new g(1,[[n,new W(0,["a sbyte",r])]])},ef=e=>t=>{const n=e,r=t;if(typeof r=="number"){const s=r;return isFinite(s)&&Math.floor(s)===s?0<=s&&s<=255?new g(0,[s&255]):new g(1,[[n,new W(1,["a byte",s,"Value was either too large or too small for a byte"])]]):new g(1,[[n,new W(1,["a byte",s,"Value is not an integral value"])]])}else if(typeof r=="string"){let s,i=0;return s=[Lr(r,511,!0,8,new yt(()=>i,o=>{i=o})),i],s[0]?new g(0,[s[1]]):new g(1,[[n,new W(0,["a byte",r])]])}else return new g(1,[[n,new W(0,["a byte",r])]])},tf=e=>t=>{const n=e,r=t;if(typeof r=="number"){const s=r;return isFinite(s)&&Math.floor(s)===s?-32768<=s&&s<=32767?new g(0,[(s+32768&65535)-32768]):new g(1,[[n,new W(1,["an int16",s,"Value was either too large or too small for an int16"])]]):new g(1,[[n,new W(1,["an int16",s,"Value is not an integral value"])]])}else if(typeof r=="string"){let s,i=0;return s=[Lr(r,511,!1,16,new yt(()=>i,o=>{i=o|0})),i],s[0]?new g(0,[s[1]]):new g(1,[[n,new W(0,["an int16",r])]])}else return new g(1,[[n,new W(0,["an int16",r])]])},nf=e=>t=>{const n=e,r=t;if(typeof r=="number"){const s=r;return isFinite(s)&&Math.floor(s)===s?0<=s&&s<=65535?new g(0,[s&65535]):new g(1,[[n,new W(1,["an uint16",s,"Value was either too large or too small for an uint16"])]]):new g(1,[[n,new W(1,["an uint16",s,"Value is not an integral value"])]])}else if(typeof r=="string"){let s,i=0;return s=[Lr(r,511,!0,16,new yt(()=>i,o=>{i=o})),i],s[0]?new g(0,[s[1]]):new g(1,[[n,new W(0,["an uint16",r])]])}else return new g(1,[[n,new W(0,["an uint16",r])]])},rf=e=>t=>{const n=e,r=t;if(typeof r=="number"){const s=r;return isFinite(s)&&Math.floor(s)===s?-2147483648<=s&&s<=2147483647?new g(0,[~~s]):new g(1,[[n,new W(1,["an int",s,"Value was either too large or too small for an int"])]]):new g(1,[[n,new W(1,["an int",s,"Value is not an integral value"])]])}else if(typeof r=="string"){let s,i=0;return s=[Lr(r,511,!1,32,new yt(()=>i,o=>{i=o|0})),i],s[0]?new g(0,[s[1]]):new g(1,[[n,new W(0,["an int",r])]])}else return new g(1,[[n,new W(0,["an int",r])]])},sf=e=>t=>{const n=e,r=t;if(typeof r=="number"){const s=r;return isFinite(s)&&Math.floor(s)===s?0<=s&&s<=4294967295?new g(0,[s>>>0]):new g(1,[[n,new W(1,["an uint32",s,"Value was either too large or too small for an uint32"])]]):new g(1,[[n,new W(1,["an uint32",s,"Value is not an integral value"])]])}else if(typeof r=="string"){let s,i=0;return s=[Lr(r,511,!0,32,new yt(()=>i,o=>{i=o})),i],s[0]?new g(0,[s[1]]):new g(1,[[n,new W(0,["an uint32",r])]])}else return new g(1,[[n,new W(0,["an uint32",r])]])};function F1(e,t){return typeof t=="boolean"?new g(0,[t]):new g(1,[[e,new W(0,["a boolean",t])]])}function V1(e,t){return typeof t=="number"?new g(0,[t]):new g(1,[[e,new W(0,["a float",t])]])}function L1(e,t){return typeof t=="number"?new g(0,[t]):new g(1,[[e,new W(0,["a float32",t])]])}function B1(e,t){if(typeof t=="string"){let n,r=Hm();return n=[Gm(t,new yt(()=>r,s=>{r=s})),r],n[0]?new g(0,[qm(n[1])]):new g(1,[[e,new W(0,["a datetime",t])]])}else return new g(1,[[e,new W(0,["a datetime",t])]])}function U1(e,t){if(typeof t=="string"){let n,r=s1();return n=[o1(t,new yt(()=>r,s=>{r=s})),r],n[0]?new g(0,[n[1]]):new g(1,[[e,new W(0,["a datetimeoffset",t])]])}else return new g(1,[[e,new W(0,["a datetime",t])]])}function j1(e,t){if(typeof t=="string"){let n,r=0;return n=[p1(t,new yt(()=>r,s=>{r=s})),r],n[0]?new g(0,[n[1]]):new g(1,[[e,new W(0,["a timespan",t])]])}else return new g(1,[[e,new W(0,["a timespan",t])]])}function of(e,t,n,r){let s;const i=n+".["+er(e)+"]";if(Array.isArray(r)){const o=r;return e<o.length?t(i,we(e,o)):new g(1,[[i,new W(5,["a longer array. Need index `"+er(e)+"` but there are only `"+(s=o.length,er(s))+"` entries",r])]])}else return new g(1,[[i,new W(0,["an array",r])]])}function z1(e,t,n){return n==null?new g(0,[void 0]):xn(lt,e(t,n))}function af(e,t,n){if(Array.isArray(n)){let r=-1;return xn(pi,mi((s,i)=>{if(r=r+1|0,s.tag===0){const o=e(t+".["+er(r)+"]",i);return o.tag===0?new g(0,[Mt(o.fields[0],s.fields[0])]):new g(1,[o.fields[0]])}else return s},new g(0,[je()]),n))}else return new g(1,[[t,new W(0,["a list",n])]])}function H1(e,t,n){if(Array.isArray(n)){let r=-1;return xn(u0,mi((s,i)=>{if(r=r+1|0,s.tag===0){const o=e(t+".["+er(r)+"]",i);return o.tag===0?new g(0,[M([o.fields[0]],s.fields[0])]):new g(1,[o.fields[0]])}else return s},new g(0,[[]]),n))}else return new g(1,[[t,new W(0,["a seq",n])]])}function lf(e,t,n){if(Array.isArray(n)){let r=-1;const s=n;return mi((i,o)=>{if(r=r+1|0,i.tag===0){const a=i.fields[0],l=e(t+".["+er(r)+"]",o);return l.tag===0?(Tt(a,r,l.fields[0]),new g(0,[a])):new g(1,[l.fields[0]])}else return i},new g(0,[hi(new Array(s.length),0,s.length,null)]),s)}else return new g(1,[[t,new W(0,["an array",n])]])}function W1(e,t,n){return((s,i)=>{e:for(;;){const o=s,a=i;if(K(o))return new g(1,[[t,new W(7,[a])]]);{const l=Yd(t,$e(V(o)),n);if(l.tag===1){s=_(o),i=st(a,ee(l.fields[0]));continue e}else return new g(0,[l.fields[0]])}}})(e,je())}function G1(e,t,n){return new g(0,[e])}function cf(e,t,n,r){const s=t(n,r);return s.tag===0?e(s.fields[0],n,r):new g(1,[s.fields[0]])}function q1(e,t,n,r){const s=t(n,r);return s.tag===1?new g(1,[s.fields[0]]):new g(0,[e(s.fields[0])])}function K1(e,t){let n;const r=e;return n=s=>i=>of(0,r,s,i),s=>i=>cf(go(o=>{let a;const l=t;return a=c=>d=>of(1,l,c,d),c=>d=>cf((u,m,h)=>G1([o,u]),$e(a),c,d)}),$e(n),s,i)}function Z1(e){return T$(e,{Compare:Bt})}function J1(e){return M1(e,{Compare:Bt})}function Y1(e,t,n){return n!==null&&Object.getPrototypeOf(n||!1)===Object.prototype?cc((r,s)=>{const i=r[0];return s.tag===0?xn(o=>Mt(o,s.fields[0]),r[1](t+"."+i)(n[i])):s},e,new g(0,[je()])):new g(1,[[t,new W(0,["an object",n])]])}function X1(e,t,n,r){return r!==null&&Object.getPrototypeOf(r||!1)===Object.prototype?_s((s,i)=>{if(s.tag===0){const o=e(n,i);if(o.tag===0){const a=t(n+"."+i,r[i]);return a.tag===0?new g(0,[Mt([o.fields[0],a.fields[0]],s.fields[0])]):new g(1,[a.fields[0]])}else return new g(1,[o.fields[0]])}else return s},new g(0,[je()]),Object.keys(r)):new g(1,[[n,new W(0,["an object",r])]])}function uf(e,t,n,r){let s;const i=t.length+e|0;if(i!==r.length)return new g(1,[[n,new W(6,[(s=r.length|0,qt(jt("Expected array of length %i but got %i"))(i)(s))])]]);{let o=new g(0,[je()]);for(let a=e;a<=r.length-1;a++)if(o.tag===0){const l=o.fields[0],c=qt(jt("%s[%i]"))(n)(a),d=we(a-e,t),u=we(a,r);o=xn(m=>Mt(m,l),d(c)(u))}return xn(pi,o)}}function df(e,t,n,r,s,i){const o=lp(a=>Ir(a)===r,Vl(n));if(o!=null){const a=o,l=Vn(c=>tn(e,t,!1,c[1]),jl(a));return xn(c=>Mm(a,nr(c)),l.length===0&&i.length<=1?new g(0,[je()]):uf(1,l,s,i))}else return new g(1,[[s,new W(6,["Cannot find case "+r+" in "+De(n)])]])}function ff(e,t,n,r){let s;const i=new yt(ge());let o;const a=De(r);o=a===""?e:md(a,i,e);let l;if(Ul(r)){const c=Vn(d=>[Od(t,Ir(d)),tn(o,t,!1,d[1])],ms(r));l=d=>u=>xn(m=>Rm(r,nr(m)),Y1(c,d,u))}else if(Bl(r))l=c=>d=>{if(typeof d=="string")return df(o,t,r,d,c,[]);if(Array.isArray(d)){const u=d;return Ep(m=>df(o,t,r,m,c,u),Xd(c+"[0]",we(0,u)))}else return new g(1,[[c,new W(0,["a string or array",d])]])};else if(n)l=c=>d=>new g(1,[[c,new W(2,["an extra coder for "+De(r),d])]]);else throw new Error((s=De(r),qt(jt(`Cannot generate auto decoder for %s. Please pass an extra decoder.
12
12
 
13
- Documentation available at: https://thoth-org.github.io/Thoth.Json/documentation/auto/extra-coders.html#ready-to-use-extra-coders`))(s)));return i.contents=l,l}function tn(e,t,n,r){let s,i,o,a;const l=Oe(r),c=md(l,e);if(c==null)if(Ml(r)){const d=tn(e,t,!1,hs(r));return u=>m=>af($e(d),u,m)}else if(vo(r))switch(Oe(Dl(r))){case"System.SByte":return u=>m=>{const h=r,p=u,g=m,w=Xd(p)(g);if(w.tag===1)return new $(1,[w.fields[0]]);{const C=w.fields[0]|0;return Or(C,Ir(h),{Equals:(x,E)=>x===E,GetHashCode:Gt})?new $(0,[Nr(h,C.toString())]):new $(1,[[p,new W(1,[Oe(h),g,"Unkown value provided for the enum"])]])}};case"System.Byte":return u=>m=>{const h=r,p=u,g=m,w=Qd(p)(g);if(w.tag===1)return new $(1,[w.fields[0]]);{const C=w.fields[0];return Or(C,Ir(h),{Equals:(x,E)=>x===E,GetHashCode:Gt})?new $(0,[Nr(h,C.toString())]):new $(1,[[p,new W(1,[Oe(h),g,"Unkown value provided for the enum"])]])}};case"System.Int16":return u=>m=>{const h=r,p=u,g=m,w=ef(p)(g);if(w.tag===1)return new $(1,[w.fields[0]]);{const C=w.fields[0]|0;return Or(C,Ir(h),{Equals:(x,E)=>x===E,GetHashCode:Gt})?new $(0,[Nr(h,im(C))]):new $(1,[[p,new W(1,[Oe(h),g,"Unkown value provided for the enum"])]])}};case"System.UInt16":return u=>m=>{const h=r,p=u,g=m,w=tf(p)(g);if(w.tag===1)return new $(1,[w.fields[0]]);{const C=w.fields[0];return Or(C,Ir(h),{Equals:(x,E)=>x===E,GetHashCode:Gt})?new $(0,[Nr(h,C.toString())]):new $(1,[[p,new W(1,[Oe(h),g,"Unkown value provided for the enum"])]])}};case"System.Int32":return u=>m=>{const h=r,p=u,g=m,w=nf(p)(g);if(w.tag===1)return new $(1,[w.fields[0]]);{const C=w.fields[0]|0;return Or(C,Ir(h),{Equals:(x,E)=>x===E,GetHashCode:Gt})?new $(0,[Nr(h,Qn(C))]):new $(1,[[p,new W(1,[Oe(h),g,"Unkown value provided for the enum"])]])}};case"System.UInt32":return u=>m=>{const h=r,p=u,g=m,w=rf(p)(g);if(w.tag===1)return new $(1,[w.fields[0]]);{const C=w.fields[0];return Or(C,Ir(h),{Equals:(x,E)=>x===E,GetHashCode:Gt})?new $(0,[Nr(h,C.toString())]):new $(1,[[p,new W(1,[Oe(h),g,"Unkown value provided for the enum"])]])}};default:{const u=Oe(r),m=ec(jt(`Cannot generate auto decoder for %s.
13
+ Documentation available at: https://thoth-org.github.io/Thoth.Json/documentation/auto/extra-coders.html#ready-to-use-extra-coders`))(s)));return i.contents=l,l}function tn(e,t,n,r){let s,i,o,a;const l=De(r),c=pd(l,e);if(c==null)if(Pl(r)){const d=tn(e,t,!1,hs(r));return u=>m=>lf($e(d),u,m)}else if(xo(r))switch(De(Fl(r))){case"System.SByte":return u=>m=>{const h=r,p=u,$=m,w=Qd(p)($);if(w.tag===1)return new g(1,[w.fields[0]]);{const C=w.fields[0]|0;return Or(C,Nr(h),{Equals:(x,E)=>x===E,GetHashCode:Gt})?new g(0,[Tr(h,C.toString())]):new g(1,[[p,new W(1,[De(h),$,"Unkown value provided for the enum"])]])}};case"System.Byte":return u=>m=>{const h=r,p=u,$=m,w=ef(p)($);if(w.tag===1)return new g(1,[w.fields[0]]);{const C=w.fields[0];return Or(C,Nr(h),{Equals:(x,E)=>x===E,GetHashCode:Gt})?new g(0,[Tr(h,C.toString())]):new g(1,[[p,new W(1,[De(h),$,"Unkown value provided for the enum"])]])}};case"System.Int16":return u=>m=>{const h=r,p=u,$=m,w=tf(p)($);if(w.tag===1)return new g(1,[w.fields[0]]);{const C=w.fields[0]|0;return Or(C,Nr(h),{Equals:(x,E)=>x===E,GetHashCode:Gt})?new g(0,[Tr(h,om(C))]):new g(1,[[p,new W(1,[De(h),$,"Unkown value provided for the enum"])]])}};case"System.UInt16":return u=>m=>{const h=r,p=u,$=m,w=nf(p)($);if(w.tag===1)return new g(1,[w.fields[0]]);{const C=w.fields[0];return Or(C,Nr(h),{Equals:(x,E)=>x===E,GetHashCode:Gt})?new g(0,[Tr(h,C.toString())]):new g(1,[[p,new W(1,[De(h),$,"Unkown value provided for the enum"])]])}};case"System.Int32":return u=>m=>{const h=r,p=u,$=m,w=rf(p)($);if(w.tag===1)return new g(1,[w.fields[0]]);{const C=w.fields[0]|0;return Or(C,Nr(h),{Equals:(x,E)=>x===E,GetHashCode:Gt})?new g(0,[Tr(h,er(C))]):new g(1,[[p,new W(1,[De(h),$,"Unkown value provided for the enum"])]])}};case"System.UInt32":return u=>m=>{const h=r,p=u,$=m,w=sf(p)($);if(w.tag===1)return new g(1,[w.fields[0]]);{const C=w.fields[0];return Or(C,Nr(h),{Equals:(x,E)=>x===E,GetHashCode:Gt})?new g(0,[Tr(h,C.toString())]):new g(1,[[p,new W(1,[De(h),$,"Unkown value provided for the enum"])]])}};default:{const u=De(r),m=tc(jt(`Cannot generate auto decoder for %s.
14
14
  Thoth.Json.Net only support the following enum types:
15
15
  - sbyte
16
16
  - byte
@@ -19,7 +19,7 @@ Thoth.Json.Net only support the following enum types:
19
19
  - int
20
20
  - uint32
21
21
  If you can't use one of these types, please pass an extra decoder.
22
- `))(u);return h=>m(h)}}else if(Pl(r))if(xo(r)){const d=Vn(u=>tn(e,t,!1,u),Vl(r));return u=>m=>Array.isArray(m)?xn(h=>Mm(tr(h)),cf(0,d,u,m)):new $(1,[[u,new W(0,["an array",m])]])}else switch(Oe(Ol(r))){case"Microsoft.FSharp.Core.FSharpOption`1[System.Object]":return s=tn(e,t,!0,we(0,Et(r))),u=>m=>V1($e(s),u,m);case"Microsoft.FSharp.Collections.FSharpList`1[System.Object]":return i=tn(e,t,!1,we(0,Et(r))),u=>m=>of($e(i),u,m);case"System.Collections.Generic.IEnumerable`1[System.Object]":return o=tn(e,t,!1,we(0,Et(r))),u=>m=>L1($e(o),u,m);case"Microsoft.FSharp.Collections.FSharpMap`2[System.Object,System.Object]":{const u=tn(e,t,!1,we(0,Et(r))),m=tn(e,t,!1,we(1,Et(r)));let h;const p=y([g=>w=>q1($e(u),$e(m),g,w),(a=z1($e(u),$e(m)),g=>w=>of($e(a),g,w))]);return h=g=>w=>B1(p,g,w),g=>w=>j1(H1,$e(h),g,w)}case"Microsoft.FSharp.Collections.FSharpSet`1[System.Object]":{const u=tn(e,t,!1,we(0,Et(r)));return m=>h=>{const p=af($e(u),m,h);return p.tag===0?new $(0,[W1(p.fields[0])]):new $(1,[p.fields[0]])}}default:return df(e,t,n,r)}else switch(l){case"System.Boolean":return d=>u=>R1(d,u);case"Microsoft.FSharp.Core.Unit":return d=>u=>T1(d,u);case"System.String":return d=>u=>Yd(d,u);case"System.Char":return d=>u=>I1(d,u);case"System.SByte":return Xd;case"System.Byte":return Qd;case"System.Int16":return ef;case"System.UInt16":return tf;case"System.Int32":return nf;case"System.UInt32":return rf;case"System.Double":return d=>u=>M1(d,u);case"System.Single":return d=>u=>P1(d,u);case"System.DateTime":return d=>u=>O1(d,u);case"System.DateTimeOffset":return d=>u=>D1(d,u);case"System.TimeSpan":return d=>u=>F1(d,u);case"System.Guid":return d=>u=>N1(d,u);case"System.Object":return d=>u=>new $(0,[u]);default:return df(e,t,n,r)}else{const d=c;return u=>m=>d.contents(u)(m)}}function K1(e){return Sa({Compare:fs})}function nn(e,t,n){const r=We(t,new pt(0,[]));return tn(K1(),r,!1,e)}class Z1 extends Q{constructor(t){super(),this.Roles=t}}function J1(){return at("AccountRegistry.AdminUI.Jwt.JwtPayload",[],Z1,()=>[["Roles",_o(H)]])}function ff(e){const t=Eo(e??"",["."],void 0,0);if(!Ro((n,r)=>n===r,t)&&t.length===3){let n;const r=we(1,t);return n=atob(r),en($e(nn(J1(),new pt(1,[]))),n)}else return new $(1,["Failed to decode access token"])}function Kr(e,t,n,r){return Is(s=>{Ns(s)},e,t,s=>s.tag===1?r(s.fields[0]):n(s.fields[0]))}function Y1(){return je()}function Ma(e){return ne("/",e)}function X1(e,t){const n=new Error("Duplicate SubId");return e(["Duplicate SubId: "+Ma(t),n])}function hf(e,t,n){try{xe(n)}catch(r){e(["Error stopping subscription: "+Ma(t),r])}}function Q1(e,t,n,r){try{return[n,r(t)]}catch(s){e(["Error starting subscription: "+Ma(n),s]);return}}function ew(e,t){pi(n=>{hf(e,n[0],n[1])},t)}function mf(e,t,n,r,s,i){return pi(o=>{X1(e,o)},n),pi(o=>{hf(e,o[0],o[1])},r),rt(s,fc(o=>Q1(e,t,o[0],o[1]),i))}function tw(){return[je(),S1({Compare:Bt}),je()]}function nw(e,t,n,r,s){return Ra(e,r)?[Tt(e,n),r,s]:[n,C1(e,r),Tt([e,t],s)]}function rw(e){return fp((t,n)=>nw(t[0],t[1],n[0],n[1],n[2]),e,tw())}const sw=je();function pf(e,t){const n=A1(nr(o=>o[0],e),{Compare:Bt}),r=rw(t),s=r[1],i=r[0];if(n.Equals(s))return[i,je(),e,je()];{const o=_p(a=>Ra(a[0],s),e);return[i,o[1],o[0],dc(a=>!Ra(a[0],n),r[2])]}}function iw(e,t,n,r){const s=Bt(e,n)|0;if(s===0)throw new Error("The step of a range cannot be zero");const i=s>0;return o=>{const a=Bt(o,t)|0;return i&&a<=0||!i&&a>=0?[o,r(o,e)]:void 0}}function ow(e,t,n,r,s){const i=iw(t,n,r,s);return k(()=>s0(i,e))}function aw(e,t,n){return ow(e,t,n,0,(r,s)=>r+s)}class Zr extends j{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Writable","ReadWritable"]}}class lw{constructor(t){this.state=new Zr(0,[fi(new Array(lc(t,10)),0,lc(t,10),null),0])}}function cw(e){return new lw(e)}function gf(e){const t=e.state;if(t.tag===1){const n=t.fields[1]|0,r=t.fields[2]|0,s=t.fields[0],i=(r+1)%s.length|0;return i===n?e.state=new Zr(0,[s,n]):e.state=new Zr(1,[s,n,i]),lt(we(r,s))}else return}function uw(e,t){const n=e.state;if(n.tag===1){const r=n.fields[1]|0,s=n.fields[2]|0,i=n.fields[0];Nt(i,r,t);const o=(r+1)%i.length|0;o===s?e.state=new Zr(1,[dw(e,s,i),i.length,0]):e.state=new Zr(1,[i,o,s])}else{const r=n.fields[1]|0,s=n.fields[0];Nt(s,r,t);const i=(r+1)%s.length|0;e.state=new Zr(1,[s,i,r])}}function dw(e,t,n){return Array.from(k(()=>R(l0(t,n),k(()=>R(c0(t,n),k(()=>u0(r=>A(ge()),aw(0,1,n.length))))))))}class Pa extends Q{constructor(t,n,r,s,i,o,a){super(),this.init=t,this.update=n,this.subscribe=r,this.view=s,this.setState=i,this.onError=o,this.termination=a}}function ur(e,t,n){return new Pa(e,t,r=>Y1(),n,$e(r=>{const s=Fn(n)(r);return i=>{s(i)}}),r=>{P$(r[0],r[1])},[r=>!1,r=>{}])}function fw(e,t){return new Pa(t.init,t.update,t.subscribe,t.view,e,t.onError,t.termination)}function hw(e){return e.init}function mw(e,t,n,r,s,i,o){const a=Fn(e)(o.init),l=go(t)(Fn(o.update)),c=go(n)(Fn(o.view)),d=go(r)(Fn(o.setState));return new Pa(a,$e(l),Fn(s)(o.subscribe),$e(c),$e(d),o.onError,i(o.termination))}function pw(e,t,n){let r;const s=n.init(t),i=s[0],o=n.subscribe(i),a=n.termination,l=cw(10);let c=!1,d=i,u=sw,m=!1;const h=w=>{m||(uw(l,w),c||(c=!0,g(),c=!1))},p=Fn(e)(h),g=()=>{let w,C=gf(l);for(;!m&&C!=null;){const x=O(C);if(a[0](x))ew(n.onError,u),a[1](d),m=!0;else{const E=n.update(x,d),D=E[0],L=n.subscribe(D);n.setState(D,p),gd(X=>{n.onError([qt(jt("Error handling the message: %A"))(x),X])},p,E[1]),d=D,u=(w=pf(u,L),mf(n.onError,p,w[0],w[1],w[2],w[3])),C=gf(l)}}};c=!0,n.setState(i,p),gd(w=>{n.onError([qt(jt("Error intitializing:")),w])},p,s[1]),u=(r=pf(u,o),mf(n.onError,p,r[0],r[1],r[2],r[3])),g(),c=!1}function gw(e,t){pw($e(n=>n),e,t)}function $w(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var s=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,s.get?s:{enumerable:!0,get:function(){return e[r]}})}),n}var Oa={exports:{}},Da={};const ww=$w(ya);/**
22
+ `))(u);return h=>m(h)}}else if(Dl(r))if(Co(r)){const d=Vn(u=>tn(e,t,!1,u),Ll(r));return u=>m=>Array.isArray(m)?xn(h=>Pm(nr(h)),uf(0,d,u,m)):new g(1,[[u,new W(0,["an array",m])]])}else switch(De(Ol(r))){case"Microsoft.FSharp.Core.FSharpOption`1[System.Object]":return s=tn(e,t,!0,we(0,It(r))),u=>m=>z1($e(s),u,m);case"Microsoft.FSharp.Collections.FSharpList`1[System.Object]":return i=tn(e,t,!1,we(0,It(r))),u=>m=>af($e(i),u,m);case"System.Collections.Generic.IEnumerable`1[System.Object]":return o=tn(e,t,!1,we(0,It(r))),u=>m=>H1($e(o),u,m);case"Microsoft.FSharp.Collections.FSharpMap`2[System.Object,System.Object]":{const u=tn(e,t,!1,we(0,It(r))),m=tn(e,t,!1,we(1,It(r)));let h;const p=y([$=>w=>X1($e(u),$e(m),$,w),(a=K1($e(u),$e(m)),$=>w=>af($e(a),$,w))]);return h=$=>w=>W1(p,$,w),$=>w=>q1(Z1,$e(h),$,w)}case"Microsoft.FSharp.Collections.FSharpSet`1[System.Object]":{const u=tn(e,t,!1,we(0,It(r)));return m=>h=>{const p=lf($e(u),m,h);return p.tag===0?new g(0,[J1(p.fields[0])]):new g(1,[p.fields[0]])}}default:return ff(e,t,n,r)}else switch(l){case"System.Boolean":return d=>u=>F1(d,u);case"Microsoft.FSharp.Core.Unit":return d=>u=>O1(d,u);case"System.String":return d=>u=>Xd(d,u);case"System.Char":return d=>u=>P1(d,u);case"System.SByte":return Qd;case"System.Byte":return ef;case"System.Int16":return tf;case"System.UInt16":return nf;case"System.Int32":return rf;case"System.UInt32":return sf;case"System.Double":return d=>u=>V1(d,u);case"System.Single":return d=>u=>L1(d,u);case"System.DateTime":return d=>u=>B1(d,u);case"System.DateTimeOffset":return d=>u=>U1(d,u);case"System.TimeSpan":return d=>u=>j1(d,u);case"System.Guid":return d=>u=>D1(d,u);case"System.Object":return d=>u=>new g(0,[u]);default:return ff(e,t,n,r)}else{const d=c;return u=>m=>d.contents(u)(m)}}function Q1(e){return Aa({Compare:fs})}function nn(e,t,n){const r=We(t,new gt(0,[]));return tn(Q1(),r,!1,e)}class ew extends Q{constructor(t){super(),this.Roles=t}}function tw(){return at("AccountRegistry.AdminUI.Jwt.JwtPayload",[],ew,()=>[["Roles",vo(H)]])}function hf(e){const t=Io(e??"",["."],void 0,0);if(!Ro((n,r)=>n===r,t)&&t.length===3){let n;const r=we(1,t);return n=atob(r),en($e(nn(tw(),new gt(1,[]))),n)}else return new g(1,["Failed to decode access token"])}function Zr(e,t,n,r){return Is(s=>{Ns(s)},e,t,s=>s.tag===1?r(s.fields[0]):n(s.fields[0]))}function nw(){return je()}function Pa(e){return ne("/",e)}function rw(e,t){const n=new Error("Duplicate SubId");return e(["Duplicate SubId: "+Pa(t),n])}function mf(e,t,n){try{xe(n)}catch(r){e(["Error stopping subscription: "+Pa(t),r])}}function sw(e,t,n,r){try{return[n,r(t)]}catch(s){e(["Error starting subscription: "+Pa(n),s]);return}}function iw(e,t){gi(n=>{mf(e,n[0],n[1])},t)}function pf(e,t,n,r,s,i){return gi(o=>{rw(e,o)},n),gi(o=>{mf(e,o[0],o[1])},r),st(s,fc(o=>sw(e,t,o[0],o[1]),i))}function ow(){return[je(),N1({Compare:Bt}),je()]}function aw(e,t,n,r,s){return Ra(e,r)?[Mt(e,n),r,s]:[n,I1(e,r),Mt([e,t],s)]}function lw(e){return mp((t,n)=>aw(t[0],t[1],n[0],n[1],n[2]),e,ow())}const cw=je();function gf(e,t){const n=T1(rr(o=>o[0],e),{Compare:Bt}),r=lw(t),s=r[1],i=r[0];if(n.Equals(s))return[i,je(),e,je()];{const o=xp(a=>Ra(a[0],s),e);return[i,o[1],o[0],dc(a=>!Ra(a[0],n),r[2])]}}function uw(e,t,n,r){const s=Bt(e,n)|0;if(s===0)throw new Error("The step of a range cannot be zero");const i=s>0;return o=>{const a=Bt(o,t)|0;return i&&a<=0||!i&&a>=0?[o,r(o,e)]:void 0}}function dw(e,t,n,r,s){const i=uw(t,n,r,s);return k(()=>a0(i,e))}function fw(e,t,n){return dw(e,t,n,0,(r,s)=>r+s)}class Jr extends j{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Writable","ReadWritable"]}}class hw{constructor(t){this.state=new Jr(0,[hi(new Array(lc(t,10)),0,lc(t,10),null),0])}}function mw(e){return new hw(e)}function $f(e){const t=e.state;if(t.tag===1){const n=t.fields[1]|0,r=t.fields[2]|0,s=t.fields[0],i=(r+1)%s.length|0;return i===n?e.state=new Jr(0,[s,n]):e.state=new Jr(1,[s,n,i]),lt(we(r,s))}else return}function pw(e,t){const n=e.state;if(n.tag===1){const r=n.fields[1]|0,s=n.fields[2]|0,i=n.fields[0];Tt(i,r,t);const o=(r+1)%i.length|0;o===s?e.state=new Jr(1,[gw(e,s,i),i.length,0]):e.state=new Jr(1,[i,o,s])}else{const r=n.fields[1]|0,s=n.fields[0];Tt(s,r,t);const i=(r+1)%s.length|0;e.state=new Jr(1,[s,i,r])}}function gw(e,t,n){return Array.from(k(()=>M(d0(t,n),k(()=>M(f0(t,n),k(()=>h0(r=>A(ge()),fw(0,1,n.length))))))))}class Da extends Q{constructor(t,n,r,s,i,o,a){super(),this.init=t,this.update=n,this.subscribe=r,this.view=s,this.setState=i,this.onError=o,this.termination=a}}function dr(e,t,n){return new Da(e,t,r=>nw(),n,$e(r=>{const s=Fn(n)(r);return i=>{s(i)}}),r=>{L$(r[0],r[1])},[r=>!1,r=>{}])}function $w(e,t){return new Da(t.init,t.update,t.subscribe,t.view,e,t.onError,t.termination)}function ww(e){return e.init}function yw(e,t,n,r,s,i,o){const a=Fn(e)(o.init),l=$o(t)(Fn(o.update)),c=$o(n)(Fn(o.view)),d=$o(r)(Fn(o.setState));return new Da(a,$e(l),Fn(s)(o.subscribe),$e(c),$e(d),o.onError,i(o.termination))}function bw(e,t,n){let r;const s=n.init(t),i=s[0],o=n.subscribe(i),a=n.termination,l=mw(10);let c=!1,d=i,u=cw,m=!1;const h=w=>{m||(pw(l,w),c||(c=!0,$(),c=!1))},p=Fn(e)(h),$=()=>{let w,C=$f(l);for(;!m&&C!=null;){const x=D(C);if(a[0](x))iw(n.onError,u),a[1](d),m=!0;else{const E=n.update(x,d),O=E[0],L=n.subscribe(O);n.setState(O,p),$d(X=>{n.onError([qt(jt("Error handling the message: %A"))(x),X])},p,E[1]),d=O,u=(w=gf(u,L),pf(n.onError,p,w[0],w[1],w[2],w[3])),C=$f(l)}}};c=!0,n.setState(i,p),$d(w=>{n.onError([qt(jt("Error intitializing:")),w])},p,s[1]),u=(r=gf(u,o),pf(n.onError,p,r[0],r[1],r[2],r[3])),$(),c=!1}function _w(e,t){bw($e(n=>n),e,t)}function vw(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var s=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,s.get?s:{enumerable:!0,get:function(){return e[r]}})}),n}var Oa={exports:{}},Fa={};const xw=vw(ba);/**
23
23
  * @license React
24
24
  * use-sync-external-store-shim.production.min.js
25
25
  *
@@ -27,10 +27,10 @@ If you can't use one of these types, please pass an extra decoder.
27
27
  *
28
28
  * This source code is licensed under the MIT license found in the
29
29
  * LICENSE file in the root directory of this source tree.
30
- */var $f;function yw(){if($f)return Da;$f=1;var e=ww;function t(u,m){return u===m&&(u!==0||1/u===1/m)||u!==u&&m!==m}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,s=e.useEffect,i=e.useLayoutEffect,o=e.useDebugValue;function a(u,m){var h=m(),p=r({inst:{value:h,getSnapshot:m}}),g=p[0].inst,w=p[1];return i(function(){g.value=h,g.getSnapshot=m,l(g)&&w({inst:g})},[u,h,m]),s(function(){return l(g)&&w({inst:g}),u(function(){l(g)&&w({inst:g})})},[u]),o(h),h}function l(u){var m=u.getSnapshot;u=u.value;try{var h=m();return!n(u,h)}catch{return!0}}function c(u,m){return m()}var d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:a;return Da.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:d,Da}var wf;function bw(){return wf||(wf=1,Oa.exports=yw()),Oa.exports}var _w=bw();class vw{constructor(t,n,r){this.arg=n,this.dependencies=r;const s=t(),i=[];this.finalDispatch=void 0;let o;const a=hw(s)(this.arg);let l=a[0],c=a[1];o=[[l,d=>{const u=this.finalDispatch;u==null?i.push(d):u(d)},!1,i],c],this.state=o[0],this.cmd=o[1],this.subscribe=d=>{let u=!1;const m=ho(this.state[0]);return gw(this.arg,fw((h,p)=>{const g=this.state;this.finalDispatch=p,this.state=[h,g[1],!0,i],h!==g[0]&&d()},mw((h,p)=>{const g=this.cmd;return this.cmd=le(),[this.state[0],g]},(h,p,g)=>h(p)(this.state[0]),po(h=>h),po(h=>h),$e(h=>h),h=>[p=>h[0](p)?!0:m&&u,p=>{const g=p;ho(g)?xe(g):h[1](p)}],s))),()=>{u=!0}}}}function yf(e,t,n){return new vw(e,t,n)}function xw(e){return e.state}function Cw(e){return e.subscribe}function Sw(e,t,n){return Ce(e.arg,t)?!Ce(e.dependencies,n):!0}function dr(e,t,n){const r=Je(()=>yf(e,t,n)),s=r[0];Sw(s,t,n)&&r[1](yf(e,t,n));const i=_w.useSyncExternalStore(Cw(s),()=>xw(s)),o=i[2],a=i[3],l=i[1];return Re(()=>{if(o&&a.length>0){let c=De(a);try{for(;c["System.Collections.IEnumerator.MoveNext"]();){const d=c["System.Collections.Generic.IEnumerator`1.get_Current"]();setTimeout(()=>{l(d)})}}finally{xe(c)}mm(a)}},[o,a]),[i[0],l]}class zt extends j{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["GET","POST","PUT","PATCH","DELETE","HEAD","OPTIONS"]}}class bf extends j{constructor(t,n){super(),this.tag=0,this.fields=[t,n]}cases(){return["Header"]}}class Pi extends j{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Empty","Text","Binary","Form"]}}class Ds extends Q{constructor(t,n,r,s,i,o,a,l){super(),this.url=t,this.method=n,this.headers=r,this.withCredentials=s,this.overridenMimeType=i,this.overridenResponseType=o,this.timeout=a,this.content=l}}class Jr extends j{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Text","Blob","ArrayBuffer","Unknown"]}}class _f extends Q{constructor(t,n,r,s,i,o){super(),this.statusCode=t|0,this.responseText=n,this.responseType=r,this.responseUrl=s,this.responseHeaders=i,this.content=o}}function Fa(e){return new bf("Authorization",e)}const fr=new Ds("",new zt(0,[]),je(),!1,void 0,void 0,void 0,new Pi(0,[]));new _f(0,"","","",Sa({Compare:fs}),new Jr(0,[""]));function vf(e,t){return di(t)?new Array(0):Eo(t,[e],void 0,0)}function Aw(e){switch(e.tag){case 1:return"POST";case 3:return"PATCH";case 2:return"PUT";case 4:return"DELETE";case 6:return"OPTIONS";case 5:return"HEAD";default:return"GET"}}function Ht(e){return new Ds(e,fr.method,fr.headers,fr.withCredentials,fr.overridenMimeType,fr.overridenResponseType,fr.timeout,fr.content)}function rn(e,t){return new Ds(t.url,e,t.headers,t.withCredentials,t.overridenMimeType,t.overridenResponseType,t.timeout,t.content)}function Oi(e,t){return new Ds(t.url,t.method,rt(t.headers,ee(e)),t.withCredentials,t.overridenMimeType,t.overridenResponseType,t.timeout,t.content)}function Va(e,t){return new Ds(t.url,t.method,t.headers,t.withCredentials,t.overridenMimeType,t.overridenResponseType,t.timeout,e)}function La(e){return a$(t=>{const n=new XMLHttpRequest;n.open(Aw(e.method),e.url),n.onreadystatechange=()=>{let l,c,d,u,m,h,p;n.readyState===4&&t[0]((l=(c=n.responseType,c===""||c==="text"?n.responseText:""),d=n.status|0,u=n.responseType,m=(h=n.responseType,h===""?new Jr(0,[n.responseText]):h==="text"?new Jr(0,[n.responseText]):h==="arraybuffer"?new Jr(2,[n.response]):h==="blob"?new Jr(1,[n.response]):new Jr(3,[n.response])),p=k$(ap(g=>{const w=y(vf(":",g));if(!K(w))return[V(w).toLocaleLowerCase(),ne(":",_(w)).trim()]},vf(`\r
31
- `,n.getAllResponseHeaders())),{Compare:fs}),new _f(d,l,u,n.responseURL,p,m)))};const r=De(e.headers);try{for(;r["System.Collections.IEnumerator.MoveNext"]();){const l=r["System.Collections.Generic.IEnumerator`1.get_Current"]();n.setRequestHeader(l.fields[0],l.fields[1])}}finally{xe(r)}n.withCredentials=e.withCredentials;const s=e.overridenMimeType;if(s!=null){const l=s;n.overrideMimeType(l)}const i=e.overridenResponseType;if(i!=null)switch(i.tag){case 1:{n.responseType="blob";break}case 2:{n.responseType="arraybuffer";break}default:n.responseType="text"}const o=e.timeout;if(o!=null){const l=o|0;n.timeout=l|0}const a=e.content;switch(a.tag){case 1:{n.send(lt(a.fields[0]));break}case 3:{n.send(lt(a.fields[0]));break}case 2:{n.send(lt(a.fields[0]));break}default:n.send()}})}function kw(e,t,n){e:for(;;){const r=e,s=t,i=n;if(K(i)){const o=r;return o.tag===1?new $(1,[o.fields[0]]):new $(0,[mi(o.fields[0])])}else{let o;const a=s(V(i));if(a.tag===1)o=new $(1,[a.fields[0]]);else{const l=r;o=l.tag===1?new $(1,[l.fields[0]]):new $(0,[Tt(a.fields[0],l.fields[0])])}if(o.tag===1)return o;e=o,t=s,n=_(i);continue e}}}function Ew(e,t){return kw(new $(0,[je()]),e,t)}function Iw(e){return Ew(t=>t,e)}function Nw(e){return e}const xf=ge();function Di(e){return Array.from(e)}function Tw(e){return Rr(e,"O")}function Rw(e){return l1(e)}function Mw(){return ge()}function Pw(e){return Rr(e,"O")}function Ba(e,t){return JSON.stringify(t,void 0,lt(e))}function Ow(e){return t=>oc(Ge(e,t),()=>xf)}function Cf(e,t,n,r){let s;const i=new yt(ge());let o;const a=Oe(r);o=a===""?e:hd(a,i,e);let l;if(Bl(r)){const c=Vn(d=>{const u=Od(t,Er(d)),m=Tn(o,t,n,d[1]);return h=>p=>{const g=Nm(h,d);return(!n||n&&g!=null)&&(p[u]=m(g)),p}},ms(r));l=d=>_s((u,m)=>m(d)(u),{},c)}else if(Ll(r))l=c=>{const d=Im(c,r),u=d[0],m=d[1],h=m.length|0;if(h===0)return Er(u);{const p=h|0,g=Ul(u),w=fi(new Array(p+1),0,p+1,null);Nt(w,0,Er(u));for(let C=1;C<=p;C++){const x=Tn(o,t,n,we(C-1,g)[1]);Nt(w,C,x(we(C-1,m)))}return w}};else throw new Error((s=Oe(r),qt(jt(`Cannot generate auto encoder for %s. Please pass an extra encoder.
30
+ */var wf;function Cw(){if(wf)return Fa;wf=1;var e=xw;function t(u,m){return u===m&&(u!==0||1/u===1/m)||u!==u&&m!==m}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,s=e.useEffect,i=e.useLayoutEffect,o=e.useDebugValue;function a(u,m){var h=m(),p=r({inst:{value:h,getSnapshot:m}}),$=p[0].inst,w=p[1];return i(function(){$.value=h,$.getSnapshot=m,l($)&&w({inst:$})},[u,h,m]),s(function(){return l($)&&w({inst:$}),u(function(){l($)&&w({inst:$})})},[u]),o(h),h}function l(u){var m=u.getSnapshot;u=u.value;try{var h=m();return!n(u,h)}catch{return!0}}function c(u,m){return m()}var d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:a;return Fa.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:d,Fa}var yf;function Sw(){return yf||(yf=1,Oa.exports=Cw()),Oa.exports}var Aw=Sw();class kw{constructor(t,n,r){this.arg=n,this.dependencies=r;const s=t(),i=[];this.finalDispatch=void 0;let o;const a=ww(s)(this.arg);let l=a[0],c=a[1];o=[[l,d=>{const u=this.finalDispatch;u==null?i.push(d):u(d)},!1,i],c],this.state=o[0],this.cmd=o[1],this.subscribe=d=>{let u=!1;const m=mo(this.state[0]);return _w(this.arg,$w((h,p)=>{const $=this.state;this.finalDispatch=p,this.state=[h,$[1],!0,i],h!==$[0]&&d()},yw((h,p)=>{const $=this.cmd;return this.cmd=le(),[this.state[0],$]},(h,p,$)=>h(p)(this.state[0]),go(h=>h),go(h=>h),$e(h=>h),h=>[p=>h[0](p)?!0:m&&u,p=>{const $=p;mo($)?xe($):h[1](p)}],s))),()=>{u=!0}}}}function bf(e,t,n){return new kw(e,t,n)}function Ew(e){return e.state}function Iw(e){return e.subscribe}function Nw(e,t,n){return Ce(e.arg,t)?!Ce(e.dependencies,n):!0}function fr(e,t,n){const r=Je(()=>bf(e,t,n)),s=r[0];Nw(s,t,n)&&r[1](bf(e,t,n));const i=Aw.useSyncExternalStore(Iw(s),()=>Ew(s)),o=i[2],a=i[3],l=i[1];return Me(()=>{if(o&&a.length>0){let c=Oe(a);try{for(;c["System.Collections.IEnumerator.MoveNext"]();){const d=c["System.Collections.Generic.IEnumerator`1.get_Current"]();setTimeout(()=>{l(d)})}}finally{xe(c)}pm(a)}},[o,a]),[i[0],l]}class zt extends j{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["GET","POST","PUT","PATCH","DELETE","HEAD","OPTIONS"]}}class _f extends j{constructor(t,n){super(),this.tag=0,this.fields=[t,n]}cases(){return["Header"]}}class Di extends j{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Empty","Text","Binary","Form"]}}class Os extends Q{constructor(t,n,r,s,i,o,a,l){super(),this.url=t,this.method=n,this.headers=r,this.withCredentials=s,this.overridenMimeType=i,this.overridenResponseType=o,this.timeout=a,this.content=l}}class Yr extends j{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Text","Blob","ArrayBuffer","Unknown"]}}class vf extends Q{constructor(t,n,r,s,i,o){super(),this.statusCode=t|0,this.responseText=n,this.responseType=r,this.responseUrl=s,this.responseHeaders=i,this.content=o}}function Va(e){return new _f("Authorization",e)}const hr=new Os("",new zt(0,[]),je(),!1,void 0,void 0,void 0,new Di(0,[]));new vf(0,"","","",Aa({Compare:fs}),new Yr(0,[""]));function xf(e,t){return di(t)?new Array(0):Io(t,[e],void 0,0)}function Tw(e){switch(e.tag){case 1:return"POST";case 3:return"PATCH";case 2:return"PUT";case 4:return"DELETE";case 6:return"OPTIONS";case 5:return"HEAD";default:return"GET"}}function Ht(e){return new Os(e,hr.method,hr.headers,hr.withCredentials,hr.overridenMimeType,hr.overridenResponseType,hr.timeout,hr.content)}function rn(e,t){return new Os(t.url,e,t.headers,t.withCredentials,t.overridenMimeType,t.overridenResponseType,t.timeout,t.content)}function Oi(e,t){return new Os(t.url,t.method,st(t.headers,ee(e)),t.withCredentials,t.overridenMimeType,t.overridenResponseType,t.timeout,t.content)}function La(e,t){return new Os(t.url,t.method,t.headers,t.withCredentials,t.overridenMimeType,t.overridenResponseType,t.timeout,e)}function Ba(e){return f$(t=>{const n=new XMLHttpRequest;n.open(Tw(e.method),e.url),n.onreadystatechange=()=>{let l,c,d,u,m,h,p;n.readyState===4&&t[0]((l=(c=n.responseType,c===""||c==="text"?n.responseText:""),d=n.status|0,u=n.responseType,m=(h=n.responseType,h===""?new Yr(0,[n.responseText]):h==="text"?new Yr(0,[n.responseText]):h==="arraybuffer"?new Yr(2,[n.response]):h==="blob"?new Yr(1,[n.response]):new Yr(3,[n.response])),p=M$(cp($=>{const w=y(xf(":",$));if(!K(w))return[V(w).toLocaleLowerCase(),ne(":",_(w)).trim()]},xf(`\r
31
+ `,n.getAllResponseHeaders())),{Compare:fs}),new vf(d,l,u,n.responseURL,p,m)))};const r=Oe(e.headers);try{for(;r["System.Collections.IEnumerator.MoveNext"]();){const l=r["System.Collections.Generic.IEnumerator`1.get_Current"]();n.setRequestHeader(l.fields[0],l.fields[1])}}finally{xe(r)}n.withCredentials=e.withCredentials;const s=e.overridenMimeType;if(s!=null){const l=s;n.overrideMimeType(l)}const i=e.overridenResponseType;if(i!=null)switch(i.tag){case 1:{n.responseType="blob";break}case 2:{n.responseType="arraybuffer";break}default:n.responseType="text"}const o=e.timeout;if(o!=null){const l=o|0;n.timeout=l|0}const a=e.content;switch(a.tag){case 1:{n.send(lt(a.fields[0]));break}case 3:{n.send(lt(a.fields[0]));break}case 2:{n.send(lt(a.fields[0]));break}default:n.send()}})}function Mw(e,t,n){e:for(;;){const r=e,s=t,i=n;if(K(i)){const o=r;return o.tag===1?new g(1,[o.fields[0]]):new g(0,[pi(o.fields[0])])}else{let o;const a=s(V(i));if(a.tag===1)o=new g(1,[a.fields[0]]);else{const l=r;o=l.tag===1?new g(1,[l.fields[0]]):new g(0,[Mt(a.fields[0],l.fields[0])])}if(o.tag===1)return o;e=o,t=s,n=_(i);continue e}}}function Rw(e,t){return Mw(new g(0,[je()]),e,t)}function Pw(e){return Rw(t=>t,e)}function Dw(e){return e}const Cf=ge();function Fi(e){return Array.from(e)}function Ow(e){return Rr(e,"O")}function Fw(e){return h1(e)}function Vw(){return ge()}function Lw(e){return Rr(e,"O")}function Ua(e,t){return JSON.stringify(t,void 0,lt(e))}function Bw(e){return t=>oc(Ge(e,t),()=>Cf)}function Sf(e,t,n,r){let s;const i=new yt(ge());let o;const a=De(r);o=a===""?e:md(a,i,e);let l;if(Ul(r)){const c=Vn(d=>{const u=Od(t,Ir(d)),m=Tn(o,t,n,d[1]);return h=>p=>{const $=Tm(h,d);return(!n||n&&$!=null)&&(p[u]=m($)),p}},ms(r));l=d=>_s((u,m)=>m(d)(u),{},c)}else if(Bl(r))l=c=>{const d=Nm(c,r),u=d[0],m=d[1],h=m.length|0;if(h===0)return Ir(u);{const p=h|0,$=jl(u),w=hi(new Array(p+1),0,p+1,null);Tt(w,0,Ir(u));for(let C=1;C<=p;C++){const x=Tn(o,t,n,we(C-1,$)[1]);Tt(w,C,x(we(C-1,m)))}return w}};else throw new Error((s=De(r),qt(jt(`Cannot generate auto encoder for %s. Please pass an extra encoder.
32
32
 
33
- Documentation available at: https://thoth-org.github.io/Thoth.Json/documentation/auto/extra-coders.html#ready-to-use-extra-coders`))(s)));return i.contents=l,l}function Tn(e,t,n,r){const s=Oe(r),i=md(s,e);if(i==null)if(Ml(r)){const o=Tn(e,t,n,hs(r));return a=>Di(Le(o,a))}else if(vo(r))switch(Oe(Dl(r))){case"System.SByte":return a=>a;case"System.Byte":return a=>a;case"System.Int16":return a=>a;case"System.UInt16":return a=>a;case"System.Int32":return a=>a;case"System.UInt32":return a=>a;default:{const a=Oe(r);return ec(jt(`Cannot generate auto encoder for %s.
33
+ Documentation available at: https://thoth-org.github.io/Thoth.Json/documentation/auto/extra-coders.html#ready-to-use-extra-coders`))(s)));return i.contents=l,l}function Tn(e,t,n,r){const s=De(r),i=pd(s,e);if(i==null)if(Pl(r)){const o=Tn(e,t,n,hs(r));return a=>Fi(Le(o,a))}else if(xo(r))switch(De(Fl(r))){case"System.SByte":return a=>a;case"System.Byte":return a=>a;case"System.Int16":return a=>a;case"System.UInt16":return a=>a;case"System.Int32":return a=>a;case"System.UInt32":return a=>a;default:{const a=De(r);return tc(jt(`Cannot generate auto encoder for %s.
34
34
  Thoth.Json.Net only support the following enum types:
35
35
  - sbyte
36
36
  - byte
@@ -42,12 +42,12 @@ Thoth.Json.Net only support the following enum types:
42
42
  If you can't use one of these types, please pass an extra encoder.
43
43
 
44
44
  Documentation available at: https://thoth-org.github.io/Thoth.Json/documentation/auto/extra-coders.html#ready-to-use-extra-coders
45
- `))(a)}}else if(Pl(r))if(xo(r)){const o=Vn(a=>Tn(e,t,n,a),Vl(r));return a=>Di(Vo((l,c)=>we(l,o)(c),a))}else{const o=Oe(Ol(r));if(o==="Microsoft.FSharp.Core.FSharpOption`1[System.Object]"){const a=new rm(()=>Ow(Tn(e,t,n,we(0,Et(r)))));return l=>l==null?xf:a.Value(l)}else if(o==="Microsoft.FSharp.Collections.FSharpList`1[System.Object]"||o==="Microsoft.FSharp.Collections.FSharpSet`1[System.Object]"||o==="System.Collections.Generic.IEnumerable`1[System.Object]"){const a=Tn(e,t,n,we(0,Et(r)));return l=>Di(Le(a,l))}else if(o==="Microsoft.FSharp.Collections.FSharpMap`2[System.Object,System.Object]"){const a=we(0,Et(r)),l=Tn(e,t,n,we(1,Et(r)));if(Oe(a)==="System.String"||Oe(a)==="System.Guid")return c=>_s((d,u)=>{const m=u;return d[m[0]]=l(m[1]),d},{},c);{let c;return c=Tn(e,t,n,a),u=>Di(Le(m=>{const h=m;return[c(h[0]),l(h[1])]},u))}}else return Cf(e,t,n,r)}else switch(s){case"System.Boolean":return o=>o;case"Microsoft.FSharp.Core.Unit":return Mw;case"System.String":return o=>o;case"System.Char":return o=>o;case"System.SByte":return o=>o;case"System.Byte":return o=>o;case"System.Int16":return o=>o;case"System.UInt16":return o=>o;case"System.Int32":return o=>o;case"System.UInt32":return o=>o;case"System.Double":return o=>o;case"System.Single":return o=>o;case"System.DateTime":return Pw;case"System.DateTimeOffset":return Tw;case"System.TimeSpan":return Rw;case"System.Guid":return Nw;case"System.Object":return o=>o;default:return Cf(e,t,n,r)}else{const o=i;return a=>o.contents(a)}}function Dw(e){return Sa({Compare:fs})}function Ua(e,t,n,r){const s=We(t,new pt(0,[])),i=We(r,!0);return Tn(Dw(),s,i,e)}function ja(e){return new Ec(Kt(e))}function Yr(e){return`${e}/account-registry/admin`}const Fw=5,Vw=1e3;function Sf(e,t,n,r){return N.Delay(()=>{const s=Oi(Fa(qt(jt("Bearer %s"))(n)),r);return N.Bind(La(s),i=>{let o,a;const l=i,c=l.statusCode|0;return o=c|0,o>=200&&o<=299?N.Return(l):(a=c|0,(a===429?!0:a>=500)&&e>=1?N.Bind(xa(t),()=>N.ReturnFrom(Sf(e-1,t,n,r))):N.Return(l))})})}const Xr=e=>t=>Sf(Fw,Vw,e,t);function Lw(e,t){return N.Delay(()=>{let n;const r=Xr(t)(rn(new zt(0,[]),Ht(`${Yr(e)}/partners`)));return n=N.Bind(r,s=>N.Return(new $(0,[s]))),N.Bind(n,s=>{const i=s;if(i.tag===1)return N.Return(new $(1,[i.fields[0]]));{const o=i.fields[0];if(o.statusCode===200){let a;const l=en($e(nn(_o(Q0()),new pt(1,[]))),o.responseText);return a=l.tag===1?new $(1,[l.fields[0]]):Iw(nr(J$,l.fields[0])),N.Return(a)}else return N.Return(new $(1,["Unexpected response from backend"]))}})})}function Af(e,t,n,r){const s=Kt(n),i=Zt(r);return N.Delay(()=>{let o;const a=Xr(t)(rn(new zt(0,[]),Ht(`${Yr(e)}/partners/${s}/accounts/${i}`)));return o=N.Bind(a,l=>N.Return(new $(0,[l]))),N.Bind(o,l=>{const c=l;if(c.tag===1)return N.Return(new $(1,[c.fields[0]]));{const d=c.fields[0];if(d.statusCode===200){const u=en($e(nn(eg(),new pt(1,[]))),d.responseText);return N.Return(u)}else return N.Return(new $(1,["Unexpected response from backend"]))}})})}function Bw(e,t,n,r,s){const i=Kt(n),o=Zt(r);return N.Delay(()=>{const a=Ba(0,Ua(gg(),new pt(1,[]),void 0,void 0)(s));let l;const c=Xr(t)(Va(new Pi(1,[a]),rn(new zt(3,[]),Ht(`${Yr(e)}/partners/${i}/accounts/${o}`))));return l=N.Bind(c,d=>N.Return(new $(0,[d]))),N.Bind(l,d=>{const u=d;if(u.tag===1)return N.Return(new $(1,[u.fields[0]]));{let m;const h=u.fields[0].statusCode===204?new $(0,[void 0]):new $(1,["Unexpected response from backend"]);return m=N.Return(h),N.Bind(m,p=>{let g;const w=p;return g=w.tag===1?new $(1,[w.fields[0]]):new $(0,[void 0]),N.Return(g)})}})})}function za(e,t,n,r,s){return N.Delay(()=>{let i,o,a,l;const c="?"+ne("&",fc(m=>m,y([(i=Cd(r.SearchText),sc(i)?void 0:`search=${encodeURIComponent(i.trim())}`),(o=B$(r.Sort),o[0].tag===1?o[1].tag===1?"sort_by=name&sort_direction=desc":"sort_by=name&sort_direction=asc":o[1].tag===1?"sort_by=accountid&sort_direction=desc":"sort_by=accountid&sort_direction=asc"),(a=Sd(r.PageSize)|0,a<=100&&a>=10?`page_size=${a}`:void 0)])));let d;const u=Xr(t)((l=rn(new zt(0,[]),Ht(`${Yr(e)}/partners/${Fr(n)}/accounts${c}`)),s==null?l:Oi(new bf("token",s),l)));return d=N.Bind(u,m=>N.Return(new $(0,[m]))),N.Bind(d,m=>{const h=m;if(h.tag===1)return N.Return(new $(1,[h.fields[0]]));{const p=h.fields[0];if(p.statusCode===200){const g=en($e(nn(rg(),new pt(1,[]))),p.responseText);return N.Return(g)}else return N.Return(new $(1,["Unexpected response from backend"]))}})})}function Uw(e,t,n){const r=Zt(n);return N.Delay(()=>{let s;const i=Xr(t)(rn(new zt(0,[]),Ht(`${Yr(e)}/search-by-id/${r}`)));return s=N.Bind(i,o=>N.Return(new $(0,[o]))),N.Bind(s,o=>{const a=o;if(a.tag===1)return N.Return(new $(1,[a.fields[0]]));{const l=a.fields[0];if(l.statusCode===200){const c=en($e(nn(ig(),new pt(1,[]))),l.responseText);return N.Return(c)}else return N.Return(new $(1,["Unexpected response from backend"]))}})})}function jw(e,t,n,r,s){const i=Kt(n),o=Zt(r);return N.Delay(()=>{let a,l;const c=Xr(t)((a=rn(new zt(2,[]),Ht(`${Yr(e)}/partners/${i}/accounts/${o}/provisioning`)),Va(new Pi(1,[Ba(0,Ua($g(),new pt(1,[]),void 0,void 0)(s))]),a)));return l=N.Bind(c,d=>N.Return(new $(0,[d]))),N.Bind(l,d=>{const u=d;if(u.tag===1)return N.Return(new $(1,[u.fields[0]]));{let m;const h=u.fields[0].statusCode===200?new $(0,[void 0]):new $(1,["Unexpected response from backend"]);return m=N.Return(h),N.Bind(m,p=>{let g;const w=p;return g=w.tag===1?new $(1,[w.fields[0]]):new $(0,[void 0]),N.Return(g)})}})})}function zw(e,t){return f("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),f("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"}))}const Hw=Hn(zw);function Ww(e,t){return f("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),f("path",{fillRule:"evenodd",d:"M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z",clipRule:"evenodd"}))}const Gw=Hn(Ww);function qw(e,t){return f("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),f("path",{fillRule:"evenodd",d:"M11.49 3.17c-.38-1.56-2.6-1.56-2.98 0a1.532 1.532 0 01-2.286.948c-1.372-.836-2.942.734-2.106 2.106.54.886.061 2.042-.947 2.287-1.561.379-1.561 2.6 0 2.978a1.532 1.532 0 01.947 2.287c-.836 1.372.734 2.942 2.106 2.106a1.532 1.532 0 012.287.947c.379 1.561 2.6 1.561 2.978 0a1.533 1.533 0 012.287-.947c1.372.836 2.942-.734 2.106-2.106a1.533 1.533 0 01.947-2.287c1.561-.379 1.561-2.6 0-2.978a1.532 1.532 0 01-.947-2.287c.836-1.372-.734-2.942-2.106-2.106a1.532 1.532 0 01-2.287-.947zM10 13a3 3 0 100-6 3 3 0 000 6z",clipRule:"evenodd"}))}const Kw=Hn(qw);function Zw(e,t){return f("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),f("path",{fillRule:"evenodd",d:"M8 4a4 4 0 100 8 4 4 0 000-8zM2 8a6 6 0 1110.89 3.476l4.817 4.817a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 012 8z",clipRule:"evenodd"}))}const Jw=Hn(Zw);function Yw(e,t){return f("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),f("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",clipRule:"evenodd"}))}const Xw=Hn(Yw);class kf extends j{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["BreadCrumb"]}}function Qw(e,t,n){let r,s;return f("li",S(y([["key",e],["className","flex"],(r=[f("div",S(y([["className","flex items-center"],(s=ae(k(()=>{let i;return R(n?Ke():A((i={className:"flex-shrink-0 h-5 w-5 text-gray-400"},f(Gw,i))),k(()=>A(f("a",S(ae(k(()=>R(A(["children",e]),k(()=>R(t!=null?A(["href",lr(O(t))]):Ke(),k(()=>A(["className","ml-4 text-sm font-medium text-gray-500 hover:text-gray-700"]))))))))))))})),["children",v.Children.toArray(Array.from(s))])])))],["children",v.Children.toArray(Array.from(r))])])))}function ey(e){let t,n;return f("nav",S(y([["className","pt-2 mb-6"],["aria-label","Breadcrumb"],(t=[f("ol",S(y([["className","-ml-3 max-w-screen-xl w-full flex space-x-4"],(n=gp((r,s)=>Qw(s.fields[0][0],s.fields[0][1],r===0),e),["children",v.Children.toArray(Array.from(n))])])))],["children",v.Children.toArray(Array.from(t))])])))}function gt(e,t){return new kf([e,Ms(t)])}function Ef(){return gt("Partners",new q(0,[]))}function If(e,t){return gt(t,new q(1,[e]))}function ty(e){return gt("Super",new q(4,[e]))}function ny(e){return gt("Benefits",new q(5,[e]))}function ry(e){return gt("Bank Details",new q(6,[e]))}function sy(e){return gt("Directory",new q(2,[e]))}function iy(e){return gt("Workspace",new q(7,[e]))}function oy(e){return gt("Accounts",new q(3,[e]))}function ay(e){return new kf([e,void 0])}function ly(e,t){let n;return gt("Directory",(n=[e,t],new q(9,[n[0],n[1]])))}function cy(e,t){let n;return gt("Users",(n=[e,t],new q(10,[n[0],n[1]])))}function uy(e,t){let n;return gt("Super",(n=[e,t],new q(11,[n[0],n[1]])))}function dy(e,t){let n;return gt("Benefits",(n=[e,t],new q(12,[n[0],n[1]])))}function fy(e,t){let n;return gt("Bank Details",(n=[e,t],new q(13,[n[0],n[1]])))}function hy(e,t){let n;return gt("Salary Packaging",(n=[e,t],new q(14,[n[0],n[1]])))}function my(e,t){let n;return gt("Workspace",(n=[e,t],new q(15,[n[0],n[1]])))}function py(e,t){let n;return gt("HRIS Migration",(n=[e,t],new q(16,[n[0],n[1]])))}function Fs(e){let t,n;const r=e.partner;if(r==null)n="...";else{const m=r,h=m.Name;n=h.tag===2?h.fields[0].tag===1?gi(m.Id):Mo(h.fields[0].fields[0]):"..."}let s;const i=e.account;if(i==null)s="...";else{const m=i,h=m.Name;s=h.tag===2?h.fields[0].tag===1?$i(m.Id):Mo(h.fields[0].fields[0]):"..."}let o;const a=e.partner,l=e.account;let c,d,u;switch(a==null?(l==null,c=2):l==null?(c=1,u=a):(c=0,d=a),c){case 0:{o=y([Ef(),If(d.Id,n),oy(d.Id),ay(s)]);break}case 1:{o=y([Ef(),If(u.Id,n)]);break}default:o=je()}return ey((t=e.page,t.tag===17||t.tag===1||t.tag===3?o:t.tag===4?rt(o,ee(ty(t.fields[0]))):t.tag===5?rt(o,ee(ny(t.fields[0]))):t.tag===6?rt(o,ee(ry(t.fields[0]))):t.tag===2?rt(o,ee(sy(t.fields[0]))):t.tag===7?rt(o,ee(iy(t.fields[0]))):t.tag===8?o:t.tag===9?rt(o,ee(ly(t.fields[0],t.fields[1]))):t.tag===10?rt(o,ee(cy(t.fields[0],t.fields[1]))):t.tag===11?rt(o,ee(uy(t.fields[0],t.fields[1]))):t.tag===12?rt(o,ee(dy(t.fields[0],t.fields[1]))):t.tag===13?rt(o,ee(fy(t.fields[0],t.fields[1]))):t.tag===14?rt(o,ee(hy(t.fields[0],t.fields[1]))):t.tag===15?rt(o,ee(my(t.fields[0],t.fields[1]))):t.tag===16?rt(o,ee(py(t.fields[0],t.fields[1]))):o))}class gy extends j{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["Tab"]}}function $y(e){return new gy(e)}function wy(e){return e.fields[0]}function Nf(e,t,n){const r=(e===t?"border-indigo-500 text-indigo-600 bg-indigo-100":"border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300 hover:bg-gray-200")+" whitespace-nowrap p-3 border-r-2 font-medium text-sm";return $y(f("a",S(ae(k(()=>R(A(["key",t]),k(()=>R(A(["children",t]),k(()=>R(A(["className",r]),k(()=>e!==t?A(["href",lr(ee(n))]):Ke())))))))))))}function Tf(e){let t,n;const r=e.headers,s=Gn(100);return f("div",S(y([["ref",i=>{const o=np(i);if(o!=null){const a=o;s[1](~~a.offsetTop)}}],["className","relative"],(t=[f("div",{className:"w-40 mr-6"}),f("nav",S(y([["className","fixed bottom-14 flex flex-col w-40 border-r border-gray-300 mr-6"],["style",{top:s[0]}],(n=Le(wy,r),["children",v.Children.toArray(Array.from(n))])])))],["children",v.Children.toArray(Array.from(t))])])))}class yy extends Q{constructor(t,n,r){super(),this.Roles=t,this.BackendUrl=n,this.AccessToken=r}}const Rn=Xg();let hr=class extends j{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["UpdateSearchText","UpdateSort","LoadAccountLookup","UpdateAccountLookup","QueryAccountLookup"]}};class by{constructor(t){this.props=t}}function _y(e){return new by(e)}function Rf(e){return t=>n=>N.Delay(()=>{const r=ja(e.props.partnerId);return N.Bind(za(e.props.backendUrl,e.props.accessToken,r,t,void 0),s=>(n(new hr(2,[new ie(2,[s])])),N.Zero()))})}function vy(e){return t=>n=>r=>N.Delay(()=>{const s=ja(e.props.partnerId);return N.Bind(za(e.props.backendUrl,e.props.accessToken,s,t,n),i=>(r(new hr(3,[i])),N.Zero()))})}function xy(e,t,n){return za(e.props.backendUrl,e.props.accessToken,ja(e.props.partnerId),t,void 0)}let Qr=class extends Q{constructor(t,n,r,s){super(),this.Data=t,this.SearchText=n,this.Sort=r,this.PageSize=s}};function Cy(){return[new Qr(new ie(0,[]),U$,L$,H$(20)),le()]}function Sy(e,t,n){let r,s,i,o;switch(t.tag){case 1:{const a=t.fields[0];return[new Qr(new ie(1,[]),n.SearchText,a,n.PageSize),Xe(l=>{const c=new Aa(n.SearchText,a,n.PageSize);zr(Rf(e)(c)(l))})]}case 2:return[new Qr(t.fields[0],n.SearchText,n.Sort,n.PageSize),le()];case 3:{const a=t.fields[0];return[new Qr((r=n.Data,r.tag===2?r.fields[0].tag===0?(s=a,s.tag===1?new ie(2,[new $(1,[s.fields[0]])]):new ie(2,[new $(0,[new Gc(rt(r.fields[0].fields[0].Accounts,s.fields[0].Accounts),s.fields[0].Token)])])):(i=a,i.tag===1?new ie(2,[new $(1,[i.fields[0]])]):new ie(3,[new Error("Failed to retrieve the account data")])):(o=a,o.tag===1?new ie(2,[new $(1,[o.fields[0]])]):new ie(3,[new Error("Failed to retrieve the account data")]))),n.SearchText,n.Sort,n.PageSize),le()]}case 4:return[new Qr(new ie(1,[]),n.SearchText,n.Sort,n.PageSize),Xe(a=>{const l=new Aa(n.SearchText,n.Sort,n.PageSize);zr(Rf(e)(l)(a))})];default:return[new Qr(n.Data,j$(t.fields[0]),n.Sort,n.PageSize),le()]}}function Mf(e,t,n,r){let s,i;return f("div",S(y([["className",ne(" ",["flex-grow","max-w-md"])],(s=[f("label",{for:"search",children:"Search",className:ne(" ",["block","text-sm","font-medium","text-gray-700"])}),f("div",S(y([["className","mt-1"],(i=[f("input",{id:"search",name:"search",type:"text",className:ne(" ",["py-2","shadow-sm","focus:ring-indigo-500","focus:border-indigo-500","block","w-full","sm:text-sm","border-gray-300","rounded-md"]),placeholder:t,value:e,onKeyUp:o=>{o.key==="Enter"&&r()},onChange:o=>{n(o.target.value)}})],["children",v.Children.toArray(Array.from(i))])])))],["children",v.Children.toArray(Array.from(s))])])))}function Ay(e){let t,n;return f("div",S(y([["className","pt-6"],(t=[f("div",S(y([["className",ne(" ",["flex","justify-end"])],(n=[f("button",{type:"search",children:"Search",className:ne(" ",["ml-3","inline-flex","justify-center","py-2","px-4","border","border-transparent","shadow-sm","text-sm","font-medium","rounded-md","text-white","bg-indigo-600","hover:bg-indigo-700","focus:outline-none","focus:ring-2","focus:ring-offset-2","focus:ring-indigo-500"]),onClick:e})],["children",v.Children.toArray(Array.from(n))])])))],["children",v.Children.toArray(Array.from(t))])])))}function Pf(e){return["fillRule",e]}function Of(e){return["clipRule",e]}const ky=f("svg",S(y([["className","w-6 h-6"],["fill","none"],["stroke","currentColor"],["strokeWidth",1.5],["viewBox","0 0 24 24"],["xmlns","http://www.w3.org/2000/svg"],(()=>{let e;const t=ee(f("path",S(y([["strokeLinecap","round"],["strokeLinejoin","round"],(e="M16.862 4.487l1.687-1.688a1.875 1.875 0 112.652 2.652L6.832 19.82a4.5 4.5 0 01-1.897 1.13l-2.685.8.8-2.685a4.5 4.5 0 011.13-1.897L16.863 4.487zm0 0L19.5 7.125",["d",e])]))));return["children",v.Children.toArray(Array.from(t))]})()]))),Ey=f("svg",S(y([["className",ne(" ",["h-5","w-5"])],["fill","currentColor"],["viewBox","0 0 20 20"],["xmlns","http://www.w3.org/2000/svg"],(()=>{let e;const t=ee(f("path",S(y([(e="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z",["d",e]),Pf("evenodd"),Of("evenodd")]))));return["children",v.Children.toArray(Array.from(t))]})()]))),Iy=f("svg",S(y([["className",ne(" ",["h-5","w-5"])],["fill","currentColor"],["viewBox","0 0 20 20"],["xmlns","http://www.w3.org/2000/svg"],(()=>{let e;const t=ee(f("path",S(y([(e="M14.707 12.707a1 1 0 01-1.414 0L10 9.414l-3.293 3.293a1 1 0 01-1.414-1.414l4-4a1 1 0 011.414 0l4 4a1 1 0 010 1.414z",["d",e]),Pf("evenodd"),Of("evenodd")]))));return["children",v.Children.toArray(Array.from(t))]})()]))),Df=f("svg",S(y([["className","size-6"],["fill","none"],["stroke","currentColor"],["strokeWidth",1.5],["viewBox","0 0 24 24"],["xmlns","http://www.w3.org/2000/svg"],(()=>{const e=ee(f("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z"}));return["children",v.Children.toArray(Array.from(e))]})()]))),Ny=f("svg",S(y([["className",ne(" ",["h-5","w-5"])],["fill","none"],["stroke","currentColor"],["strokeWidth",1.5],["viewBox","0 0 20 20"],["xmlns","http://www.w3.org/2000/svg"],(()=>{const e=ee(f("path",{d:"M10 5V10M10 10V15M10 10H15M10 10L5 10",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}));return["children",v.Children.toArray(Array.from(e))]})()]))),Ty=f("svg",S(y([["className",ne(" ",["h-5","w-5"])],["fill","none"],["viewBox","0 0 18 18"],["xmlns","http://www.w3.org/2000/svg"],(()=>{let e,t;const n=y([f("path",S(y([(e="M15.25 2H10.5C10.086 2 9.75002 2.336 9.75002 2.75C9.75002 3.164 10.086 3.5 10.5 3.5H13.439L8.46902 8.47C8.17602 8.763 8.17602 9.238 8.46902 9.531C8.61502 9.677 8.80702 9.751 8.99902 9.751C9.19102 9.751 9.38302 9.678 9.52902 9.531L14.499 4.561V7.5C14.499 7.914 14.835 8.25 15.249 8.25C15.663 8.25 15.999 7.914 15.999 7.5V2.75C15.999 2.336 15.663 2 15.249 2H15.25Z",["d",e]),["fill","#1D4ED8"]]))),f("path",S(y([(t="M13.25 9.75C12.836 9.75 12.5 10.086 12.5 10.5V13.25C12.5 13.939 11.939 14.5 11.25 14.5H4.75C4.061 14.5 3.5 13.939 3.5 13.25V6.75C3.5 6.061 4.061 5.5 4.75 5.5H7.5C7.914 5.5 8.25 5.164 8.25 4.75C8.25 4.336 7.914 4 7.5 4H4.75C3.233 4 2 5.233 2 6.75V13.25C2 14.767 3.233 16 4.75 16H11.25C12.767 16 14 14.767 14 13.25V10.5C14 10.086 13.664 9.75 13.25 9.75Z",["d",t]),["fill","#1D4ED8"]])))]);return["children",v.Children.toArray(Array.from(n))]})()]))),Ha=f("svg",S(y([["className",ne(" ",["h-5","w-5"])],["fill","white"],["viewBox","0 0 24 24"],["xmlns","http://www.w3.org/2000/svg"],(()=>{let e,t;const n=y([f("path",S(y([(e="M1.24302 18.953L10.152 2.11098C10.33 1.77464 10.5963 1.49318 10.9222 1.29687C11.2482 1.10056 11.6215 0.996826 12.002 0.996826C12.3825 0.996826 12.7559 1.10056 13.0818 1.29687C13.4078 1.49318 13.6741 1.77464 13.852 2.11098L22.761 18.953C22.9282 19.2708 23.0103 19.6265 22.9991 19.9855C22.988 20.3445 22.8841 20.6944 22.6975 21.0013C22.5109 21.3081 22.2479 21.5614 21.9343 21.7364C21.6207 21.9114 21.2672 22.0022 20.908 22H3.09202C2.73323 22.0015 2.38014 21.9102 2.06709 21.7349C1.75404 21.5596 1.49169 21.3063 1.30555 20.9995C1.11942 20.6928 1.01583 20.3431 1.00488 19.9845C0.993918 19.6259 1.07596 19.2705 1.24302 18.953V18.953Z",["d",e]),["stroke","#111827"],["strokeWidth",2],["strokeLinecap","round"],["strokeLinejoin","round"]]))),f("path",{d:"M12 8V14",stroke:"#DC2626",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),f("path",S(y([(t="M12 19C12.8284 19 13.5 18.3284 13.5 17.5C13.5 16.6716 12.8284 16 12 16C11.1716 16 10.5 16.6716 10.5 17.5C10.5 18.3284 11.1716 19 12 19Z",["d",t]),["fill","#DC2626"]])))]);return["children",v.Children.toArray(Array.from(n))]})()]))),Wa=f("svg",S(y([["fill","none"],["height",20],["width",20],["viewBox","0 0 20 20"],["xmlns","http://www.w3.org/2000/svg"],(()=>{let e,t;const n=y([f("path",S(y([(e="M18 10C18 14.4183 14.4183 18 10 18C5.58172 18 2 14.4183 2 10C2 5.58172 5.58172 2 10 2C14.4183 2 18 5.58172 18 10ZM3.99743 10C3.99743 13.3151 6.68487 16.0026 10 16.0026C13.3151 16.0026 16.0026 13.3151 16.0026 10C16.0026 6.68487 13.3151 3.99743 10 3.99743C6.68487 3.99743 3.99743 6.68487 3.99743 10Z",["d",e]),["fill","#D6E2FC"]]))),f("path",S(y([(t="M10 3C10 2.44772 10.4494 1.99356 10.9974 2.06242C11.7053 2.15137 12.3996 2.3348 13.0615 2.60896C14.0321 3.011 14.914 3.60028 15.6569 4.34315C16.3997 5.08602 16.989 5.96793 17.391 6.93853C17.6652 7.60043 17.8486 8.29473 17.9376 9.0026C18.0064 9.55057 17.5523 10 17 10C16.4477 10 16.0085 9.54925 15.9169 9.00462C15.842 8.55939 15.7169 8.12298 15.5433 7.7039C15.2417 6.97595 14.7998 6.31451 14.2426 5.75736C13.6855 5.20021 13.0241 4.75825 12.2961 4.45672C11.877 4.28313 11.4406 4.15804 10.9954 4.08314C10.4508 3.99152 10 3.55228 10 3Z",["d",t]),["fill","#2E66F7"]])))]);return["children",v.Children.toArray(Array.from(n))]})()])));function es(e){const t=e.child,n=e.onClose;return Ku(()=>{const r=s=>{s.key==="Escape"&&n()};return window.addEventListener("keydown",r),{Dispose(){window.removeEventListener("keydown",r)}}},[]),t}class Ry{constructor(t,n){this.accessToken=n,this.adminUrl=`${t}/account-registry/admin`}QueryAnzsic(t){const n=this;return c$(N.Delay(()=>N.Bind(Ff(n,Ht(`${n.adminUrl}/anzsic?maxRecordCount=15&search=${t}`)),r=>{const s=en($e(nn(dg(),new pt(1,[]))),r.responseText);return N.Return(s.tag===1?new Array(0):s.fields[0].tag===0?s.fields[0].fields[0]:new Array(0))})))}CreateAccount(t,n,r,s){const i=this;return N.Delay(()=>{let o,a;const l=Ff(i,Va(new Pi(1,[(o=new Kc(n.AccountName,n.WebsiteUrl,new Lc(r.FirstName,r.LastName,r.Email,r.MobilePhone),void 0,new qc(n.LegalEntityName,n.Abn,s.Line1,di(s.Line2)?void 0:s.Line2,s.City,s.Postcode,s.State,r.MobilePhone,"AU"),void 0,void 0,new zc(n.SalesforceParentRecordId,void 0),new Hc(n.Industry.ClassCode,n.Industry.ClassTitle)),Ba(0,Ua(hg(),new pt(1,[]),void 0,void 0)(o)))]),rn(new zt(1,[]),Ht(`${i.adminUrl}/partners/${gi(t)}/accounts`))));return a=N.Bind(l,c=>N.Return(new $(0,[c]))),N.Bind(a,c=>{const d=c;if(d.tag===1)return N.Return(new $(1,[d.fields[0]]));{let u;const m=en($e(nn(pg(),new pt(1,[]))),d.fields[0].responseText);return u=m.tag===1?new $(1,[void 0]):new $(0,[m.fields[0].Id]),N.Return(u)}})})}}function My(e,t){return new Ry(e,t)}function Ff(e,t){return La(Oi(Fa(`Bearer ${e.accessToken}`),t))}let Py=class extends Q{constructor(t,n,r){super(),this.Name=t,this.BusinessName=n,this.BusinessNumber=r}};class mr extends j{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["AccountDetailsForm","PrimaryContactForm","BusinessAddressForm"]}}let sn=class extends j{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["NextForm","PreviousForm","SetAccountDetailsForm","SetPrimaryContactForm","SetBusinessAddressForm","StartAccountCreation","FinishAccountCreation"]}},qn=class extends Q{constructor(t,n,r,s,i){super(),this.AccountDetailsForm=t,this.PrimaryContactForm=n,this.BusinessAddressForm=r,this.CurrentView=s,this.AccountCreation=i}};function Oy(e){const t=e.AccountCreation;let n;switch(t.tag){case 2:{t.fields[0].tag===1?n=1:n=0;break}case 3:{n=1;break}default:n=0}switch(n){case 0:return!1;default:return!0}}function Dy(e){switch(e.AccountCreation.tag){case 0:case 2:case 3:return!1;default:return!0}}const Fy=[new qn({},{},{},new mr(0,[]),new ie(0,[])),le()];function Vy(e,t,n,r){let s,i;switch(n.tag){case 1:return[new qn(r.AccountDetailsForm,r.PrimaryContactForm,r.BusinessAddressForm,(s=r.CurrentView,s.tag===1?new mr(0,[]):s.tag===2?new mr(1,[]):new mr(0,[])),r.AccountCreation),le()];case 2:return[new qn(n.fields[0],r.PrimaryContactForm,r.BusinessAddressForm,r.CurrentView,r.AccountCreation),le()];case 3:return[new qn(r.AccountDetailsForm,n.fields[0],r.BusinessAddressForm,r.CurrentView,r.AccountCreation),le()];case 4:return[new qn(r.AccountDetailsForm,r.PrimaryContactForm,n.fields[0],r.CurrentView,r.AccountCreation),le()];case 5:{const o=r.AccountCreation;let a;switch(o.tag){case 0:case 3:{a=1;break}case 2:{o.fields[0].tag===1?a=1:a=0;break}default:a=0}switch(a){case 0:return[r,le()];default:return[new qn(r.AccountDetailsForm,r.PrimaryContactForm,r.BusinessAddressForm,r.CurrentView,new ie(1,[])),Is(l=>{Ns(l)},l=>t.CreateAccount(l[0],l[1],l[2],l[3]),[e,r.AccountDetailsForm,r.PrimaryContactForm,r.BusinessAddressForm],l=>new sn(6,[l]))]}}case 6:{const o=n.fields[0];return[new qn(r.AccountDetailsForm,r.PrimaryContactForm,r.BusinessAddressForm,r.CurrentView,new ie(2,[o])),o.tag===1?le():Ia(new q(15,[e,Rt(o.fields[0])]))]}default:return[new qn(r.AccountDetailsForm,r.PrimaryContactForm,r.BusinessAddressForm,(i=r.CurrentView,i.tag===1?new mr(2,[]):i.tag===2?new mr(2,[]):new mr(1,[])),r.AccountCreation),le()]}}var Ly=0;function M(e,t,n,r,s,i){t||(t={});var o,a,l=t;if("ref"in l)for(a in l={},t)a=="ref"?o=t[a]:l[a]=t[a];var c={type:e,props:l,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:--Ly,__i:-1,__u:0,__source:s,__self:i};if(typeof e=="function"&&(o=e.defaultProps))for(a in o)l[a]===void 0&&(l[a]=o[a]);return se.vnode&&se.vnode(c),c}var Vs=e=>e.type==="checkbox",pr=e=>e instanceof Date,Ct=e=>e==null;const Vf=e=>typeof e=="object";var ze=e=>!Ct(e)&&!Array.isArray(e)&&Vf(e)&&!pr(e),Lf=e=>ze(e)&&e.target?Vs(e.target)?e.target.checked:e.target.value:e,By=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,Bf=(e,t)=>e.has(By(t)),Uy=e=>{const t=e.constructor&&e.constructor.prototype;return ze(t)&&t.hasOwnProperty("isPrototypeOf")},Ga=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function St(e){let t;const n=Array.isArray(e),r=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(Ga&&(e instanceof Blob||r))&&(n||ze(e)))if(t=n?[]:{},!n&&!Uy(e))t=e;else for(const s in e)e.hasOwnProperty(s)&&(t[s]=St(e[s]));else return e;return t}var Fi=e=>Array.isArray(e)?e.filter(Boolean):[],He=e=>e===void 0,B=(e,t,n)=>{if(!t||!ze(e))return n;const r=Fi(t.split(/[,[\].]+?/)).reduce((s,i)=>Ct(s)?s:s[i],e);return He(r)||r===e?He(e[t])?n:e[t]:r},Wt=e=>typeof e=="boolean",qa=e=>/^\w*$/.test(e),Uf=e=>Fi(e.replace(/["|']|\]/g,"").split(/\.|\[/)),Ie=(e,t,n)=>{let r=-1;const s=qa(t)?[t]:Uf(t),i=s.length,o=i-1;for(;++r<i;){const a=s[r];let l=n;if(r!==o){const c=e[a];l=ze(c)||Array.isArray(c)?c:isNaN(+s[r+1])?{}:[]}if(a==="__proto__"||a==="constructor"||a==="prototype")return;e[a]=l,e=e[a]}return e};const Vi={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},on={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Mn={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},jy=Z.createContext(null),Ka=()=>Z.useContext(jy);var jf=(e,t,n,r=!0)=>{const s={defaultValues:t._defaultValues};for(const i in e)Object.defineProperty(s,i,{get:()=>{const o=i;return t._proxyFormState[o]!==on.all&&(t._proxyFormState[o]=!r||on.all),n&&(n[o]=!0),e[o]}});return s},At=e=>ze(e)&&!Object.keys(e).length,zf=(e,t,n,r)=>{n(e);const{name:s,...i}=e;return At(i)||Object.keys(i).length>=Object.keys(t).length||Object.keys(i).find(o=>t[o]===(!r||on.all))},Ls=e=>Array.isArray(e)?e:[e],Hf=(e,t,n)=>!e||!t||e===t||Ls(e).some(r=>r&&(n?r===t:r.startsWith(t)||t.startsWith(r)));function Za(e){const t=Z.useRef(e);t.current=e,Z.useEffect(()=>{const n=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{n&&n.unsubscribe()}},[e.disabled])}function zy(e){const t=Ka(),{control:n=t.control,disabled:r,name:s,exact:i}=e||{},[o,a]=Z.useState(n._formState),l=Z.useRef(!0),c=Z.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),d=Z.useRef(s);return d.current=s,Za({disabled:r,next:u=>l.current&&Hf(d.current,u.name,i)&&zf(u,c.current,n._updateFormState)&&a({...n._formState,...u}),subject:n._subjects.state}),Z.useEffect(()=>(l.current=!0,c.current.isValid&&n._updateValid(!0),()=>{l.current=!1}),[n]),Z.useMemo(()=>jf(o,n,c.current,!1),[o,n])}var hn=e=>typeof e=="string",Wf=(e,t,n,r,s)=>hn(e)?(r&&t.watch.add(e),B(n,e,s)):Array.isArray(e)?e.map(i=>(r&&t.watch.add(i),B(n,i))):(r&&(t.watchAll=!0),n);function Hy(e){const t=Ka(),{control:n=t.control,name:r,defaultValue:s,disabled:i,exact:o}=e||{},a=Z.useRef(r);a.current=r,Za({disabled:i,subject:n._subjects.values,next:d=>{Hf(a.current,d.name,o)&&c(St(Wf(a.current,n._names,d.values||n._formValues,!1,s)))}});const[l,c]=Z.useState(n._getWatch(r,s));return Z.useEffect(()=>n._removeUnmounted()),l}function Gf(e){const t=Ka(),{name:n,disabled:r,control:s=t.control,shouldUnregister:i}=e,o=Bf(s._names.array,n),a=Hy({control:s,name:n,defaultValue:B(s._formValues,n,B(s._defaultValues,n,e.defaultValue)),exact:!0}),l=zy({control:s,name:n,exact:!0}),c=Z.useRef(s.register(n,{...e.rules,value:a,...Wt(e.disabled)?{disabled:e.disabled}:{}})),d=Z.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!B(l.errors,n)},isDirty:{enumerable:!0,get:()=>!!B(l.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!B(l.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!B(l.validatingFields,n)},error:{enumerable:!0,get:()=>B(l.errors,n)}}),[l,n]),u=Z.useMemo(()=>({name:n,value:a,...Wt(r)||l.disabled?{disabled:l.disabled||r}:{},onChange:m=>c.current.onChange({target:{value:Lf(m),name:n},type:Vi.CHANGE}),onBlur:()=>c.current.onBlur({target:{value:B(s._formValues,n),name:n},type:Vi.BLUR}),ref:m=>{const h=B(s._fields,n);h&&m&&(h._f.ref={focus:()=>m.focus(),select:()=>m.select(),setCustomValidity:p=>m.setCustomValidity(p),reportValidity:()=>m.reportValidity()})}}),[n,s._formValues,r,l.disabled,a,s._fields]);return Z.useEffect(()=>{const m=s._options.shouldUnregister||i,h=(p,g)=>{const w=B(s._fields,p);w&&w._f&&(w._f.mount=g)};if(h(n,!0),m){const p=St(B(s._options.defaultValues,n));Ie(s._defaultValues,n,p),He(B(s._formValues,n))&&Ie(s._formValues,n,p)}return!o&&s.register(n),()=>{(o?m&&!s._state.action:m)?s.unregister(n):h(n,!1)}},[n,s,o,i]),Z.useEffect(()=>{s._updateDisabledField({disabled:r,fields:s._fields,name:n})},[r,n,s]),Z.useMemo(()=>({field:u,formState:l,fieldState:d}),[u,l,d])}var Wy=(e,t,n,r,s)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:s||!0}}:{},qf=e=>({isOnSubmit:!e||e===on.onSubmit,isOnBlur:e===on.onBlur,isOnChange:e===on.onChange,isOnAll:e===on.all,isOnTouch:e===on.onTouched}),Kf=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const Bs=(e,t,n,r)=>{for(const s of n||Object.keys(e)){const i=B(e,s);if(i){const{_f:o,...a}=i;if(o){if(o.refs&&o.refs[0]&&t(o.refs[0],s)&&!r)return!0;if(o.ref&&t(o.ref,o.name)&&!r)return!0;if(Bs(a,t))break}else if(ze(a)&&Bs(a,t))break}}};var Gy=(e,t,n)=>{const r=Ls(B(e,n));return Ie(r,"root",t[n]),Ie(e,n,r),e},Ja=e=>e.type==="file",mn=e=>typeof e=="function",Li=e=>{if(!Ga)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Bi=e=>hn(e),Ya=e=>e.type==="radio",Ui=e=>e instanceof RegExp;const Zf={value:!1,isValid:!1},Jf={value:!0,isValid:!0};var Yf=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!He(e[0].attributes.value)?He(e[0].value)||e[0].value===""?Jf:{value:e[0].value,isValid:!0}:Jf:Zf}return Zf};const Xf={isValid:!1,value:null};var Qf=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,Xf):Xf;function eh(e,t,n="validate"){if(Bi(e)||Array.isArray(e)&&e.every(Bi)||Wt(e)&&!e)return{type:n,message:Bi(e)?e:"",ref:t}}var ts=e=>ze(e)&&!Ui(e)?e:{value:e,message:""},th=async(e,t,n,r,s,i)=>{const{ref:o,refs:a,required:l,maxLength:c,minLength:d,min:u,max:m,pattern:h,validate:p,name:g,valueAsNumber:w,mount:C}=e._f,x=B(n,g);if(!C||t.has(g))return{};const E=a?a[0]:o,D=G=>{s&&E.reportValidity&&(E.setCustomValidity(Wt(G)?"":G||""),E.reportValidity())},L={},X=Ya(o),pe=Vs(o),Se=X||pe,de=(w||Ja(o))&&He(o.value)&&He(x)||Li(o)&&o.value===""||x===""||Array.isArray(x)&&!x.length,Y=Wy.bind(null,g,r,L),me=(G,re,Pe,P=Mn.maxLength,Ae=Mn.minLength)=>{const fe=G?re:Pe;L[g]={type:G?P:Ae,message:fe,ref:o,...Y(G?P:Ae,fe)}};if(i?!Array.isArray(x)||!x.length:l&&(!Se&&(de||Ct(x))||Wt(x)&&!x||pe&&!Yf(a).isValid||X&&!Qf(a).isValid)){const{value:G,message:re}=Bi(l)?{value:!!l,message:l}:ts(l);if(G&&(L[g]={type:Mn.required,message:re,ref:E,...Y(Mn.required,re)},!r))return D(re),L}if(!de&&(!Ct(u)||!Ct(m))){let G,re;const Pe=ts(m),P=ts(u);if(!Ct(x)&&!isNaN(x)){const Ae=o.valueAsNumber||x&&+x;Ct(Pe.value)||(G=Ae>Pe.value),Ct(P.value)||(re=Ae<P.value)}else{const Ae=o.valueAsDate||new Date(x),fe=Ue=>new Date(new Date().toDateString()+" "+Ue),nt=o.type=="time",Ne=o.type=="week";hn(Pe.value)&&x&&(G=nt?fe(x)>fe(Pe.value):Ne?x>Pe.value:Ae>new Date(Pe.value)),hn(P.value)&&x&&(re=nt?fe(x)<fe(P.value):Ne?x<P.value:Ae<new Date(P.value))}if((G||re)&&(me(!!G,Pe.message,P.message,Mn.max,Mn.min),!r))return D(L[g].message),L}if((c||d)&&!de&&(hn(x)||i&&Array.isArray(x))){const G=ts(c),re=ts(d),Pe=!Ct(G.value)&&x.length>+G.value,P=!Ct(re.value)&&x.length<+re.value;if((Pe||P)&&(me(Pe,G.message,re.message),!r))return D(L[g].message),L}if(h&&!de&&hn(x)){const{value:G,message:re}=ts(h);if(Ui(G)&&!x.match(G)&&(L[g]={type:Mn.pattern,message:re,ref:o,...Y(Mn.pattern,re)},!r))return D(re),L}if(p){if(mn(p)){const G=await p(x,n),re=eh(G,E);if(re&&(L[g]={...re,...Y(Mn.validate,re.message)},!r))return D(re.message),L}else if(ze(p)){let G={};for(const re in p){if(!At(G)&&!r)break;const Pe=eh(await p[re](x,n),E,re);Pe&&(G={...Pe,...Y(re,Pe.message)},D(Pe.message),r&&(L[g]=G))}if(!At(G)&&(L[g]={ref:E,...G},!r))return L}}return D(!0),L};function qy(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=He(e)?r++:e[t[r++]];return e}function Ky(e){for(const t in e)if(e.hasOwnProperty(t)&&!He(e[t]))return!1;return!0}function Qe(e,t){const n=Array.isArray(t)?t:qa(t)?[t]:Uf(t),r=n.length===1?e:qy(e,n),s=n.length-1,i=n[s];return r&&delete r[i],s!==0&&(ze(r)&&At(r)||Array.isArray(r)&&Ky(r))&&Qe(e,n.slice(0,-1)),e}var Xa=()=>{let e=[];return{get observers(){return e},next:s=>{for(const i of e)i.next&&i.next(s)},subscribe:s=>(e.push(s),{unsubscribe:()=>{e=e.filter(i=>i!==s)}}),unsubscribe:()=>{e=[]}}},Qa=e=>Ct(e)||!Vf(e);function Kn(e,t){if(Qa(e)||Qa(t))return e===t;if(pr(e)&&pr(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const s of n){const i=e[s];if(!r.includes(s))return!1;if(s!=="ref"){const o=t[s];if(pr(i)&&pr(o)||ze(i)&&ze(o)||Array.isArray(i)&&Array.isArray(o)?!Kn(i,o):i!==o)return!1}}return!0}var nh=e=>e.type==="select-multiple",Zy=e=>Ya(e)||Vs(e),el=e=>Li(e)&&e.isConnected,rh=e=>{for(const t in e)if(mn(e[t]))return!0;return!1};function ji(e,t={}){const n=Array.isArray(e);if(ze(e)||n)for(const r in e)Array.isArray(e[r])||ze(e[r])&&!rh(e[r])?(t[r]=Array.isArray(e[r])?[]:{},ji(e[r],t[r])):Ct(e[r])||(t[r]=!0);return t}function sh(e,t,n){const r=Array.isArray(e);if(ze(e)||r)for(const s in e)Array.isArray(e[s])||ze(e[s])&&!rh(e[s])?He(t)||Qa(n[s])?n[s]=Array.isArray(e[s])?ji(e[s],[]):{...ji(e[s])}:sh(e[s],Ct(t)?{}:t[s],n[s]):n[s]=!Kn(e[s],t[s]);return n}var Us=(e,t)=>sh(e,t,ji(t)),ih=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>He(e)?e:t?e===""?NaN:e&&+e:n&&hn(e)?new Date(e):r?r(e):e;function tl(e){const t=e.ref;return Ja(t)?t.files:Ya(t)?Qf(e.refs).value:nh(t)?[...t.selectedOptions].map(({value:n})=>n):Vs(t)?Yf(e.refs).value:ih(He(t.value)?e.ref.value:t.value,e)}var Jy=(e,t,n,r)=>{const s={};for(const i of e){const o=B(t,i);o&&Ie(s,i,o._f)}return{criteriaMode:n,names:[...e],fields:s,shouldUseNativeValidation:r}},js=e=>He(e)?e:Ui(e)?e.source:ze(e)?Ui(e.value)?e.value.source:e.value:e;const oh="AsyncFunction";var Yy=e=>!!e&&!!e.validate&&!!(mn(e.validate)&&e.validate.constructor.name===oh||ze(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===oh)),Xy=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function ah(e,t,n){const r=B(e,n);if(r||qa(n))return{error:r,name:n};const s=n.split(".");for(;s.length;){const i=s.join("."),o=B(t,i),a=B(e,i);if(o&&!Array.isArray(o)&&n!==i)return{name:n};if(a&&a.type)return{name:i,error:a};s.pop()}return{name:n}}var Qy=(e,t,n,r,s)=>s.isOnAll?!1:!n&&s.isOnTouch?!(t||e):(n?r.isOnBlur:s.isOnBlur)?!e:(n?r.isOnChange:s.isOnChange)?e:!0,eb=(e,t)=>!Fi(B(e,t)).length&&Qe(e,t);const tb={mode:on.onSubmit,reValidateMode:on.onChange,shouldFocusError:!0};function nb(e={}){let t={...tb,...e},n={submitCount:0,isDirty:!1,isLoading:mn(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},r={},s=ze(t.defaultValues)||ze(t.values)?St(t.defaultValues||t.values)||{}:{},i=t.shouldUnregister?{}:St(s),o={action:!1,mount:!1,watch:!1},a={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},l,c=0;const d={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},u={values:Xa(),array:Xa(),state:Xa()},m=qf(t.mode),h=qf(t.reValidateMode),p=t.criteriaMode===on.all,g=b=>I=>{clearTimeout(c),c=setTimeout(b,I)},w=async b=>{if(!t.disabled&&(d.isValid||b)){const I=t.resolver?At((await Se()).errors):await Y(r,!0);I!==n.isValid&&u.state.next({isValid:I})}},C=(b,I)=>{!t.disabled&&(d.isValidating||d.validatingFields)&&((b||Array.from(a.mount)).forEach(T=>{T&&(I?Ie(n.validatingFields,T,I):Qe(n.validatingFields,T))}),u.state.next({validatingFields:n.validatingFields,isValidating:!At(n.validatingFields)}))},x=(b,I=[],T,z,U=!0,F=!0)=>{if(z&&T&&!t.disabled){if(o.action=!0,F&&Array.isArray(B(r,b))){const J=T(B(r,b),z.argA,z.argB);U&&Ie(r,b,J)}if(F&&Array.isArray(B(n.errors,b))){const J=T(B(n.errors,b),z.argA,z.argB);U&&Ie(n.errors,b,J),eb(n.errors,b)}if(d.touchedFields&&F&&Array.isArray(B(n.touchedFields,b))){const J=T(B(n.touchedFields,b),z.argA,z.argB);U&&Ie(n.touchedFields,b,J)}d.dirtyFields&&(n.dirtyFields=Us(s,i)),u.state.next({name:b,isDirty:G(b,I),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else Ie(i,b,I)},E=(b,I)=>{Ie(n.errors,b,I),u.state.next({errors:n.errors})},D=b=>{n.errors=b,u.state.next({errors:n.errors,isValid:!1})},L=(b,I,T,z)=>{const U=B(r,b);if(U){const F=B(i,b,He(T)?B(s,b):T);He(F)||z&&z.defaultChecked||I?Ie(i,b,I?F:tl(U._f)):P(b,F),o.mount&&w()}},X=(b,I,T,z,U)=>{let F=!1,J=!1;const ue={name:b};if(!t.disabled){const it=!!(B(r,b)&&B(r,b)._f&&B(r,b)._f.disabled);if(!T||z){d.isDirty&&(J=n.isDirty,n.isDirty=ue.isDirty=G(),F=J!==ue.isDirty);const ot=it||Kn(B(s,b),I);J=!!(!it&&B(n.dirtyFields,b)),ot||it?Qe(n.dirtyFields,b):Ie(n.dirtyFields,b,!0),ue.dirtyFields=n.dirtyFields,F=F||d.dirtyFields&&J!==!ot}if(T){const ot=B(n.touchedFields,b);ot||(Ie(n.touchedFields,b,T),ue.touchedFields=n.touchedFields,F=F||d.touchedFields&&ot!==T)}F&&U&&u.state.next(ue)}return F?ue:{}},pe=(b,I,T,z)=>{const U=B(n.errors,b),F=d.isValid&&Wt(I)&&n.isValid!==I;if(t.delayError&&T?(l=g(()=>E(b,T)),l(t.delayError)):(clearTimeout(c),l=null,T?Ie(n.errors,b,T):Qe(n.errors,b)),(T?!Kn(U,T):U)||!At(z)||F){const J={...z,...F&&Wt(I)?{isValid:I}:{},errors:n.errors,name:b};n={...n,...J},u.state.next(J)}},Se=async b=>{C(b,!0);const I=await t.resolver(i,t.context,Jy(b||a.mount,r,t.criteriaMode,t.shouldUseNativeValidation));return C(b),I},de=async b=>{const{errors:I}=await Se(b);if(b)for(const T of b){const z=B(I,T);z?Ie(n.errors,T,z):Qe(n.errors,T)}else n.errors=I;return I},Y=async(b,I,T={valid:!0})=>{for(const z in b){const U=b[z];if(U){const{_f:F,...J}=U;if(F){const ue=a.array.has(F.name),it=U._f&&Yy(U._f);it&&d.validatingFields&&C([z],!0);const ot=await th(U,a.disabled,i,p,t.shouldUseNativeValidation&&!I,ue);if(it&&d.validatingFields&&C([z]),ot[F.name]&&(T.valid=!1,I))break;!I&&(B(ot,F.name)?ue?Gy(n.errors,ot,F.name):Ie(n.errors,F.name,ot[F.name]):Qe(n.errors,F.name))}!At(J)&&await Y(J,I,T)}}return T.valid},me=()=>{for(const b of a.unMount){const I=B(r,b);I&&(I._f.refs?I._f.refs.every(T=>!el(T)):!el(I._f.ref))&&Ys(b)}a.unMount=new Set},G=(b,I)=>!t.disabled&&(b&&I&&Ie(i,b,I),!Kn(kt(),s)),re=(b,I,T)=>Wf(b,a,{...o.mount?i:He(I)?s:hn(b)?{[b]:I}:I},T,I),Pe=b=>Fi(B(o.mount?i:s,b,t.shouldUnregister?B(s,b,[]):[])),P=(b,I,T={})=>{const z=B(r,b);let U=I;if(z){const F=z._f;F&&(!F.disabled&&Ie(i,b,ih(I,F)),U=Li(F.ref)&&Ct(I)?"":I,nh(F.ref)?[...F.ref.options].forEach(J=>J.selected=U.includes(J.value)):F.refs?Vs(F.ref)?F.refs.length>1?F.refs.forEach(J=>(!J.defaultChecked||!J.disabled)&&(J.checked=Array.isArray(U)?!!U.find(ue=>ue===J.value):U===J.value)):F.refs[0]&&(F.refs[0].checked=!!U):F.refs.forEach(J=>J.checked=J.value===U):Ja(F.ref)?F.ref.value="":(F.ref.value=U,F.ref.type||u.values.next({name:b,values:{...i}})))}(T.shouldDirty||T.shouldTouch)&&X(b,U,T.shouldTouch,T.shouldDirty,!0),T.shouldValidate&&Ue(b)},Ae=(b,I,T)=>{for(const z in I){const U=I[z],F=`${b}.${z}`,J=B(r,F);(a.array.has(b)||ze(U)||J&&!J._f)&&!pr(U)?Ae(F,U,T):P(F,U,T)}},fe=(b,I,T={})=>{const z=B(r,b),U=a.array.has(b),F=St(I);Ie(i,b,F),U?(u.array.next({name:b,values:{...i}}),(d.isDirty||d.dirtyFields)&&T.shouldDirty&&u.state.next({name:b,dirtyFields:Us(s,i),isDirty:G(b,F)})):z&&!z._f&&!Ct(F)?Ae(b,F,T):P(b,F,T),Kf(b,a)&&u.state.next({...n}),u.values.next({name:o.mount?b:void 0,values:{...i}})},nt=async b=>{o.mount=!0;const I=b.target;let T=I.name,z=!0;const U=B(r,T),F=()=>I.type?tl(U._f):Lf(b),J=ue=>{z=Number.isNaN(ue)||pr(ue)&&isNaN(ue.getTime())||Kn(ue,B(i,T,ue))};if(U){let ue,it;const ot=F(),Xn=b.type===Vi.BLUR||b.type===Vi.FOCUS_OUT,Nx=!Xy(U._f)&&!t.resolver&&!B(n.errors,T)&&!U._f.deps||Qy(Xn,B(n.touchedFields,T),n.isSubmitted,h,m),vl=Kf(T,a,Xn);Ie(i,T,ot),Xn?(U._f.onBlur&&U._f.onBlur(b),l&&l(0)):U._f.onChange&&U._f.onChange(b);const xl=X(T,ot,Xn,!1),Tx=!At(xl)||vl;if(!Xn&&u.values.next({name:T,type:b.type,values:{...i}}),Nx)return d.isValid&&(t.mode==="onBlur"&&Xn?w():Xn||w()),Tx&&u.state.next({name:T,...vl?{}:xl});if(!Xn&&vl&&u.state.next({...n}),t.resolver){const{errors:Yh}=await Se([T]);if(J(ot),z){const Rx=ah(n.errors,r,T),Xh=ah(Yh,r,Rx.name||T);ue=Xh.error,T=Xh.name,it=At(Yh)}}else C([T],!0),ue=(await th(U,a.disabled,i,p,t.shouldUseNativeValidation))[T],C([T]),J(ot),z&&(ue?it=!1:d.isValid&&(it=await Y(r,!0)));z&&(U._f.deps&&Ue(U._f.deps),pe(T,it,ue,xl))}},Ne=(b,I)=>{if(B(n.errors,I)&&b.focus)return b.focus(),1},Ue=async(b,I={})=>{let T,z;const U=Ls(b);if(t.resolver){const F=await de(He(b)?b:U);T=At(F),z=b?!U.some(J=>B(F,J)):T}else b?(z=(await Promise.all(U.map(async F=>{const J=B(r,F);return await Y(J&&J._f?{[F]:J}:J)}))).every(Boolean),!(!z&&!n.isValid)&&w()):z=T=await Y(r);return u.state.next({...!hn(b)||d.isValid&&T!==n.isValid?{}:{name:b},...t.resolver||!b?{isValid:T}:{},errors:n.errors}),I.shouldFocus&&!z&&Bs(r,Ne,b?U:a.mount),z},kt=b=>{const I={...o.mount?i:s};return He(b)?I:hn(b)?B(I,b):b.map(T=>B(I,T))},cn=(b,I)=>({invalid:!!B((I||n).errors,b),isDirty:!!B((I||n).dirtyFields,b),error:B((I||n).errors,b),isValidating:!!B(n.validatingFields,b),isTouched:!!B((I||n).touchedFields,b)}),Cr=b=>{b&&Ls(b).forEach(I=>Qe(n.errors,I)),u.state.next({errors:b?n.errors:{}})},Lt=(b,I,T)=>{const z=(B(r,b,{_f:{}})._f||{}).ref,U=B(n.errors,b)||{},{ref:F,message:J,type:ue,...it}=U;Ie(n.errors,b,{...it,...I,ref:z}),u.state.next({name:b,errors:n.errors,isValid:!1}),T&&T.shouldFocus&&z&&z.focus&&z.focus()},Js=(b,I)=>mn(b)?u.values.subscribe({next:T=>b(re(void 0,I),T)}):re(b,I,!0),Ys=(b,I={})=>{for(const T of b?Ls(b):a.mount)a.mount.delete(T),a.array.delete(T),I.keepValue||(Qe(r,T),Qe(i,T)),!I.keepError&&Qe(n.errors,T),!I.keepDirty&&Qe(n.dirtyFields,T),!I.keepTouched&&Qe(n.touchedFields,T),!I.keepIsValidating&&Qe(n.validatingFields,T),!t.shouldUnregister&&!I.keepDefaultValue&&Qe(s,T);u.values.next({values:{...i}}),u.state.next({...n,...I.keepDirty?{isDirty:G()}:{}}),!I.keepIsValid&&w()},Sr=({disabled:b,name:I,field:T,fields:z})=>{(Wt(b)&&o.mount||b||a.disabled.has(I))&&(b?a.disabled.add(I):a.disabled.delete(I),X(I,tl(T?T._f:B(z,I)._f),!1,!1,!0))},Xs=(b,I={})=>{let T=B(r,b);const z=Wt(I.disabled)||Wt(t.disabled);return Ie(r,b,{...T||{},_f:{...T&&T._f?T._f:{ref:{name:b}},name:b,mount:!0,...I}}),a.mount.add(b),T?Sr({field:T,disabled:Wt(I.disabled)?I.disabled:t.disabled,name:b}):L(b,!0,I.value),{...z?{disabled:I.disabled||t.disabled}:{},...t.progressive?{required:!!I.required,min:js(I.min),max:js(I.max),minLength:js(I.minLength),maxLength:js(I.maxLength),pattern:js(I.pattern)}:{},name:b,onChange:nt,onBlur:nt,ref:U=>{if(U){Xs(b,I),T=B(r,b);const F=He(U.value)&&U.querySelectorAll&&U.querySelectorAll("input,select,textarea")[0]||U,J=Zy(F),ue=T._f.refs||[];if(J?ue.find(it=>it===F):F===T._f.ref)return;Ie(r,b,{_f:{...T._f,...J?{refs:[...ue.filter(el),F,...Array.isArray(B(s,b))?[{}]:[]],ref:{type:F.type,name:b}}:{ref:F}}}),L(b,!1,void 0,F)}else T=B(r,b,{}),T._f&&(T._f.mount=!1),(t.shouldUnregister||I.shouldUnregister)&&!(Bf(a.array,b)&&o.action)&&a.unMount.add(b)}}},oe=()=>t.shouldFocusError&&Bs(r,Ne,a.mount),Te=b=>{Wt(b)&&(u.state.next({disabled:b}),Bs(r,(I,T)=>{const z=B(r,T);z&&(I.disabled=z._f.disabled||b,Array.isArray(z._f.refs)&&z._f.refs.forEach(U=>{U.disabled=z._f.disabled||b}))},0,!1))},wt=(b,I)=>async T=>{let z;T&&(T.preventDefault&&T.preventDefault(),T.persist&&T.persist());let U=St(i);if(a.disabled.size)for(const F of a.disabled)Ie(U,F,void 0);if(u.state.next({isSubmitting:!0}),t.resolver){const{errors:F,values:J}=await Se();n.errors=F,U=J}else await Y(r);if(Qe(n.errors,"root"),At(n.errors)){u.state.next({errors:{}});try{await b(U,T)}catch(F){z=F}}else I&&await I({...n.errors},T),oe(),setTimeout(oe);if(u.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:At(n.errors)&&!z,submitCount:n.submitCount+1,errors:n.errors}),z)throw z},cs=(b,I={})=>{B(r,b)&&(He(I.defaultValue)?fe(b,St(B(s,b))):(fe(b,I.defaultValue),Ie(s,b,St(I.defaultValue))),I.keepTouched||Qe(n.touchedFields,b),I.keepDirty||(Qe(n.dirtyFields,b),n.isDirty=I.defaultValue?G(b,St(B(s,b))):G()),I.keepError||(Qe(n.errors,b),d.isValid&&w()),u.state.next({...n}))},Qs=(b,I={})=>{const T=b?St(b):s,z=St(T),U=At(b),F=U?s:z;if(I.keepDefaultValues||(s=T),!I.keepValues){if(I.keepDirtyValues){const J=new Set([...a.mount,...Object.keys(Us(s,i))]);for(const ue of Array.from(J))B(n.dirtyFields,ue)?Ie(F,ue,B(i,ue)):fe(ue,B(F,ue))}else{if(Ga&&He(b))for(const J of a.mount){const ue=B(r,J);if(ue&&ue._f){const it=Array.isArray(ue._f.refs)?ue._f.refs[0]:ue._f.ref;if(Li(it)){const ot=it.closest("form");if(ot){ot.reset();break}}}}r={}}i=t.shouldUnregister?I.keepDefaultValues?St(s):{}:St(F),u.array.next({values:{...F}}),u.values.next({values:{...F}})}a={mount:I.keepDirtyValues?a.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},o.mount=!d.isValid||!!I.keepIsValid||!!I.keepDirtyValues,o.watch=!!t.shouldUnregister,u.state.next({submitCount:I.keepSubmitCount?n.submitCount:0,isDirty:U?!1:I.keepDirty?n.isDirty:!!(I.keepDefaultValues&&!Kn(b,s)),isSubmitted:I.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:U?{}:I.keepDirtyValues?I.keepDefaultValues&&i?Us(s,i):n.dirtyFields:I.keepDefaultValues&&b?Us(s,b):I.keepDirty?n.dirtyFields:{},touchedFields:I.keepTouched?n.touchedFields:{},errors:I.keepErrors?n.errors:{},isSubmitSuccessful:I.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1})},Jh=(b,I)=>Qs(mn(b)?b(i):b,I);return{control:{register:Xs,unregister:Ys,getFieldState:cn,handleSubmit:wt,setError:Lt,_executeSchema:Se,_getWatch:re,_getDirty:G,_updateValid:w,_removeUnmounted:me,_updateFieldArray:x,_updateDisabledField:Sr,_getFieldArray:Pe,_reset:Qs,_resetDefaultValues:()=>mn(t.defaultValues)&&t.defaultValues().then(b=>{Jh(b,t.resetOptions),u.state.next({isLoading:!1})}),_updateFormState:b=>{n={...n,...b}},_disableForm:Te,_subjects:u,_proxyFormState:d,_setErrors:D,get _fields(){return r},get _formValues(){return i},get _state(){return o},set _state(b){o=b},get _defaultValues(){return s},get _names(){return a},set _names(b){a=b},get _formState(){return n},set _formState(b){n=b},get _options(){return t},set _options(b){t={...t,...b}}},trigger:Ue,register:Xs,handleSubmit:wt,watch:Js,setValue:fe,getValues:kt,reset:Jh,resetField:cs,clearErrors:Cr,unregister:Ys,setError:Lt,setFocus:(b,I={})=>{const T=B(r,b),z=T&&T._f;if(z){const U=z.refs?z.refs[0]:z.ref;U.focus&&(U.focus(),I.shouldSelect&&mn(U.select)&&U.select())}},getFieldState:cn}}function zi(e={}){const t=Z.useRef(void 0),n=Z.useRef(void 0),[r,s]=Z.useState({isDirty:!1,isValidating:!1,isLoading:mn(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:mn(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...nb(e),formState:r});const i=t.current.control;return i._options=e,Za({subject:i._subjects.state,next:o=>{zf(o,i._proxyFormState,i._updateFormState,!0)&&s({...i._formState})}}),Z.useEffect(()=>i._disableForm(e.disabled),[i,e.disabled]),Z.useEffect(()=>{if(i._proxyFormState.isDirty){const o=i._getDirty();o!==r.isDirty&&i._subjects.state.next({isDirty:o})}},[i,r.isDirty]),Z.useEffect(()=>{e.values&&!Kn(e.values,n.current)?(i._reset(e.values,i._options.resetOptions),n.current=e.values,s(o=>({...o}))):i._resetDefaultValues()},[e.values,i]),Z.useEffect(()=>{e.errors&&i._setErrors(e.errors)},[e.errors,i]),Z.useEffect(()=>{i._state.mount||(i._updateValid(),i._state.mount=!0),i._state.watch&&(i._state.watch=!1,i._subjects.state.next({...i._formState})),i._removeUnmounted()}),Z.useEffect(()=>{e.shouldUnregister&&i._subjects.values.next({values:i._getWatch()})},[e.shouldUnregister,i]),t.current.formState=jf(r,i),t.current}function rb(e){const t=e==null?void 0:e.match(/\d+/g);return t?t.join(""):""}function $t({label:e,name:t,control:n,validate:r,placeholder:s,optional:i,isNumber:o}){const{field:a,fieldState:l}=Gf({name:t,control:n,rules:{validate:r}});return M("div",{children:[M("div",{className:"flex justify-between",children:[M("label",{className:"block text-sm font-medium",children:e}),i&&M("p",{className:"text-sm text-gray-500 font-normal",children:"Optional"})]}),M("div",{className:"mt-2",children:M("input",{...a,placeholder:s,className:"block w-full rounded-md bg-white px-2 py-[9px] text-sm border border-gray-300 focus:ring-2 focus:ring-indigo-600 focus:border-indigo-600",onChange:c=>o?a.onChange(rb(c.target.value)):a.onChange(c)})}),l.invalid&&M("p",{className:"mt-2 text-sm text-red-600",children:[e," is invalid"]})]})}function Hi({primaryLabel:e,secondaryLabel:t,secondaryOnClick:n,isBusy:r}){return M("div",{className:"flex flex-row-reverse pt-4 pb-6 gap-3 border-t -mx-6 px-6",children:[M("button",{type:"submit",className:"rounded-md bg-indigo-600 px-3.5 py-2.5 text-sm font-semibold text-white shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600",disabled:r,children:r?M("div",{className:"animate-spin size-5",children:M(Kw,{})}):e}),M("button",{type:"button",className:"rounded-md bg-white px-3.5 py-2.5 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50",onClick:n,disabled:r,children:t})]})}function sb({defaultValues:e,validateFirstName:t,validateLastName:n,validateEmail:r,validateMobilePhone:s,onSubmit:i,onBack:o}){const{handleSubmit:a,control:l,getValues:c}=zi({mode:"onChange",defaultValues:e});return M(ve,{children:[M("div",{className:"font-bold text-lg mb-4",children:"Primary contact"}),M("form",{className:"space-y-6",onSubmit:a(i),children:[M("div",{className:"grid grid-cols-2 gap-3",children:[M($t,{label:"Given name",name:"FirstName",control:l,placeholder:"e.g. Sam",validate:t}),M($t,{label:"Family name / surname",name:"LastName",control:l,placeholder:"e.g. Smith",validate:n})]}),M($t,{label:"Email",name:"Email",control:l,placeholder:"e.g. sam.smith@example.com",validate:r}),M("div",{className:"grid grid-cols-2 gap-3",children:M($t,{label:"Mobile phone number",name:"MobilePhone",control:l,placeholder:"e.g. +61400111222",validate:s})}),M(Hi,{primaryLabel:"Next",secondaryLabel:"Back",secondaryOnClick:()=>o(c())})]})]})}function ib(e,t){return f(sb,{defaultValues:e,validateFirstName:n=>mt(Rc(n)),validateLastName:n=>mt(Pc(n)),validateEmail:n=>mt(Dc(n)),validateMobilePhone:n=>mt(Fc(n)),onSubmit:n=>{t(new sn(3,[n])),t(new sn(0,[]))},onBack:n=>{t(new sn(3,[n])),t(new sn(1,[]))}})}function ob(){return M("div",{className:"rounded-md bg-red-50 p-4 mb-2",children:M("div",{className:"flex",children:[M("div",{className:"shrink-0",children:M(Xw,{"aria-hidden":"true",className:"size-5 text-red-400"})}),M("div",{className:"ml-3",children:[M("h3",{className:"text-sm font-medium text-red-800",children:"We're having trouble creating the account"}),M("div",{className:"mt-2 text-sm text-red-700",children:M("p",{children:"Please try again. If this keeps happening, please contact support."})})]})]})})}function ab({defaultValues:e,validateAddress1:t,validateAddress2:n,validateCity:r,validateState:s,validatePostcode:i,accountCreationInProgress:o,accountCreationFailed:a,onSubmit:l,onBack:c}){const{handleSubmit:d,control:u,register:m,getValues:h}=zi({mode:"onChange",defaultValues:e});return M(ve,{children:[a&&M(ob,{}),M("div",{className:"font-bold text-lg mb-4",children:"Business address"}),M("form",{className:"space-y-6",onSubmit:d(l),children:[M($t,{label:"Address (Line one)",name:"Line1",control:u,placeholder:"e.g. 100 Example Street",validate:t}),M($t,{label:"Address (Line two)",name:"Line2",control:u,placeholder:"Example: Floor, Unit, Building name, etc.",validate:n,optional:!0}),M("div",{className:"grid grid-cols-2 gap-3",children:[M($t,{label:"City / Suburb",name:"City",control:u,placeholder:"e.g. Sydney",validate:r}),M("div",{children:[M("label",{className:"block text-sm font-medium",children:"State"}),M("select",{className:"mt-2 w-full appearance-none rounded-md bg-white px-2 py-[9px] text-sm border border-gray-300 focus:ring-2 focus:ring-indigo-600 focus:border-indigo-600",...m("State",{validate:s}),children:[M("option",{children:"NSW"}),M("option",{children:"VIC"}),M("option",{children:"QLD"}),M("option",{children:"SA"}),M("option",{children:"WA"}),M("option",{children:"NT"}),M("option",{children:"TAS"}),M("option",{children:"ACT"})]})]})]}),M("div",{className:"grid grid-cols-2 gap-3",children:M($t,{label:"Postcode",name:"Postcode",control:u,placeholder:"e.g. 2000",validate:i,isNumber:!0})}),M(Hi,{primaryLabel:"Add account",secondaryLabel:"Back",secondaryOnClick:()=>c(h()),isBusy:o})]})]})}function lb(e,t,n,r){return f(ab,{defaultValues:e,validateAddress1:s=>mt(z0(s)),validateAddress2:s=>di(s)?!0:H0(s)!=null,validateCity:s=>mt(W0(s)),validateState:s=>mt(q0(s)),validatePostcode:s=>mt(G0(s)),accountCreationInProgress:t,accountCreationFailed:n,onSubmit:s=>{r(new sn(4,[s])),r(new sn(5,[]))},onBack:s=>{r(new sn(4,[s])),r(new sn(1,[]))}})}function zs(e,t,n){let r=n.initialDeps??[],s;return()=>{var i,o,a,l;let c;n.key&&((i=n.debug)!=null&&i.call(n))&&(c=Date.now());const d=e();if(!(d.length!==r.length||d.some((h,p)=>r[p]!==h)))return s;r=d;let m;if(n.key&&((o=n.debug)!=null&&o.call(n))&&(m=Date.now()),s=t(...d),n.key&&((a=n.debug)!=null&&a.call(n))){const h=Math.round((Date.now()-c)*100)/100,p=Math.round((Date.now()-m)*100)/100,g=p/16,w=(C,x)=>{for(C=String(C);C.length<x;)C=" "+C;return C};console.info(`%c⏱ ${w(p,5)} /${w(h,5)} ms`,`
45
+ `))(a)}}else if(Dl(r))if(Co(r)){const o=Vn(a=>Tn(e,t,n,a),Ll(r));return a=>Fi(Lo((l,c)=>we(l,o)(c),a))}else{const o=De(Ol(r));if(o==="Microsoft.FSharp.Core.FSharpOption`1[System.Object]"){const a=new sm(()=>Bw(Tn(e,t,n,we(0,It(r)))));return l=>l==null?Cf:a.Value(l)}else if(o==="Microsoft.FSharp.Collections.FSharpList`1[System.Object]"||o==="Microsoft.FSharp.Collections.FSharpSet`1[System.Object]"||o==="System.Collections.Generic.IEnumerable`1[System.Object]"){const a=Tn(e,t,n,we(0,It(r)));return l=>Fi(Le(a,l))}else if(o==="Microsoft.FSharp.Collections.FSharpMap`2[System.Object,System.Object]"){const a=we(0,It(r)),l=Tn(e,t,n,we(1,It(r)));if(De(a)==="System.String"||De(a)==="System.Guid")return c=>_s((d,u)=>{const m=u;return d[m[0]]=l(m[1]),d},{},c);{let c;return c=Tn(e,t,n,a),u=>Fi(Le(m=>{const h=m;return[c(h[0]),l(h[1])]},u))}}else return Sf(e,t,n,r)}else switch(s){case"System.Boolean":return o=>o;case"Microsoft.FSharp.Core.Unit":return Vw;case"System.String":return o=>o;case"System.Char":return o=>o;case"System.SByte":return o=>o;case"System.Byte":return o=>o;case"System.Int16":return o=>o;case"System.UInt16":return o=>o;case"System.Int32":return o=>o;case"System.UInt32":return o=>o;case"System.Double":return o=>o;case"System.Single":return o=>o;case"System.DateTime":return Lw;case"System.DateTimeOffset":return Ow;case"System.TimeSpan":return Fw;case"System.Guid":return Dw;case"System.Object":return o=>o;default:return Sf(e,t,n,r)}else{const o=i;return a=>o.contents(a)}}function Uw(e){return Aa({Compare:fs})}function ja(e,t,n,r){const s=We(t,new gt(0,[])),i=We(r,!0);return Tn(Uw(),s,i,e)}function za(e){return new Ec(Kt(e))}function Xr(e){return`${e}/account-registry/admin`}const jw=5,zw=1e3;function Af(e,t,n,r){return N.Delay(()=>{const s=Oi(Va(qt(jt("Bearer %s"))(n)),r);return N.Bind(Ba(s),i=>{let o,a;const l=i,c=l.statusCode|0;return o=c|0,o>=200&&o<=299?N.Return(l):(a=c|0,(a===429?!0:a>=500)&&e>=1?N.Bind(Ca(t),()=>N.ReturnFrom(Af(e-1,t,n,r))):N.Return(l))})})}const Qr=e=>t=>Af(jw,zw,e,t);function Hw(e,t){return N.Delay(()=>{let n;const r=Qr(t)(rn(new zt(0,[]),Ht(`${Xr(e)}/partners`)));return n=N.Bind(r,s=>N.Return(new g(0,[s]))),N.Bind(n,s=>{const i=s;if(i.tag===1)return N.Return(new g(1,[i.fields[0]]));{const o=i.fields[0];if(o.statusCode===200){let a;const l=en($e(nn(vo(sg()),new gt(1,[]))),o.responseText);return a=l.tag===1?new g(1,[l.fields[0]]):Pw(rr(t1,l.fields[0])),N.Return(a)}else return N.Return(new g(1,["Unexpected response from backend"]))}})})}function kf(e,t,n,r){const s=Kt(n),i=Zt(r);return N.Delay(()=>{let o;const a=Qr(t)(rn(new zt(0,[]),Ht(`${Xr(e)}/partners/${s}/accounts/${i}`)));return o=N.Bind(a,l=>N.Return(new g(0,[l]))),N.Bind(o,l=>{const c=l;if(c.tag===1)return N.Return(new g(1,[c.fields[0]]));{const d=c.fields[0];if(d.statusCode===200){const u=en($e(nn(ig(),new gt(1,[]))),d.responseText);return N.Return(u)}else return N.Return(new g(1,["Unexpected response from backend"]))}})})}function Ww(e,t,n,r,s){const i=Kt(n),o=Zt(r);return N.Delay(()=>{const a=Ua(0,ja(_g(),new gt(1,[]),void 0,void 0)(s));let l;const c=Qr(t)(La(new Di(1,[a]),rn(new zt(3,[]),Ht(`${Xr(e)}/partners/${i}/accounts/${o}`))));return l=N.Bind(c,d=>N.Return(new g(0,[d]))),N.Bind(l,d=>{const u=d;if(u.tag===1)return N.Return(new g(1,[u.fields[0]]));{let m;const h=u.fields[0].statusCode===204?new g(0,[void 0]):new g(1,["Unexpected response from backend"]);return m=N.Return(h),N.Bind(m,p=>{let $;const w=p;return $=w.tag===1?new g(1,[w.fields[0]]):new g(0,[void 0]),N.Return($)})}})})}function Ha(e,t,n,r,s){return N.Delay(()=>{let i,o,a,l;const c="?"+ne("&",fc(m=>m,y([(i=Sd(r.SearchText),fi(i)?void 0:`search=${encodeURIComponent(i.trim())}`),(o=W$(r.Sort),o[0].tag===1?o[1].tag===1?"sort_by=name&sort_direction=desc":"sort_by=name&sort_direction=asc":o[1].tag===1?"sort_by=accountid&sort_direction=desc":"sort_by=accountid&sort_direction=asc"),(a=Ad(r.PageSize)|0,a<=100&&a>=10?`page_size=${a}`:void 0)])));let d;const u=Qr(t)((l=rn(new zt(0,[]),Ht(`${Xr(e)}/partners/${Vr(n)}/accounts${c}`)),s==null?l:Oi(new _f("token",s),l)));return d=N.Bind(u,m=>N.Return(new g(0,[m]))),N.Bind(d,m=>{const h=m;if(h.tag===1)return N.Return(new g(1,[h.fields[0]]));{const p=h.fields[0];if(p.statusCode===200){const $=en($e(nn(lg(),new gt(1,[]))),p.responseText);return N.Return($)}else return N.Return(new g(1,["Unexpected response from backend"]))}})})}function Gw(e,t,n){const r=Zt(n);return N.Delay(()=>{let s;const i=Qr(t)(rn(new zt(0,[]),Ht(`${Xr(e)}/search-by-id/${r}`)));return s=N.Bind(i,o=>N.Return(new g(0,[o]))),N.Bind(s,o=>{const a=o;if(a.tag===1)return N.Return(new g(1,[a.fields[0]]));{const l=a.fields[0];if(l.statusCode===200){const c=en($e(nn(ug(),new gt(1,[]))),l.responseText);return N.Return(c)}else return N.Return(new g(1,["Unexpected response from backend"]))}})})}function qw(e,t,n,r,s){const i=Kt(n),o=Zt(r);return N.Delay(()=>{let a,l;const c=Qr(t)((a=rn(new zt(2,[]),Ht(`${Xr(e)}/partners/${i}/accounts/${o}/provisioning`)),La(new Di(1,[Ua(0,ja(vg(),new gt(1,[]),void 0,void 0)(s))]),a)));return l=N.Bind(c,d=>N.Return(new g(0,[d]))),N.Bind(l,d=>{const u=d;if(u.tag===1)return N.Return(new g(1,[u.fields[0]]));{let m;const h=u.fields[0].statusCode===200?new g(0,[void 0]):new g(1,["Unexpected response from backend"]);return m=N.Return(h),N.Bind(m,p=>{let $;const w=p;return $=w.tag===1?new g(1,[w.fields[0]]):new g(0,[void 0]),N.Return($)})}})})}function Kw(e,t){return f("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),f("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"}))}const Zw=Hn(Kw);function Jw(e,t){return f("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),f("path",{fillRule:"evenodd",d:"M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z",clipRule:"evenodd"}))}const Yw=Hn(Jw);function Xw(e,t){return f("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),f("path",{fillRule:"evenodd",d:"M11.49 3.17c-.38-1.56-2.6-1.56-2.98 0a1.532 1.532 0 01-2.286.948c-1.372-.836-2.942.734-2.106 2.106.54.886.061 2.042-.947 2.287-1.561.379-1.561 2.6 0 2.978a1.532 1.532 0 01.947 2.287c-.836 1.372.734 2.942 2.106 2.106a1.532 1.532 0 012.287.947c.379 1.561 2.6 1.561 2.978 0a1.533 1.533 0 012.287-.947c1.372.836 2.942-.734 2.106-2.106a1.533 1.533 0 01.947-2.287c1.561-.379 1.561-2.6 0-2.978a1.532 1.532 0 01-.947-2.287c.836-1.372-.734-2.942-2.106-2.106a1.532 1.532 0 01-2.287-.947zM10 13a3 3 0 100-6 3 3 0 000 6z",clipRule:"evenodd"}))}const Qw=Hn(Xw);function ey(e,t){return f("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),f("path",{fillRule:"evenodd",d:"M8 4a4 4 0 100 8 4 4 0 000-8zM2 8a6 6 0 1110.89 3.476l4.817 4.817a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 012 8z",clipRule:"evenodd"}))}const ty=Hn(ey);function ny(e,t){return f("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),f("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",clipRule:"evenodd"}))}const ry=Hn(ny);class Ef extends j{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["BreadCrumb"]}}function sy(e,t,n){let r,s;return f("li",S(y([["key",e],["className","flex"],(r=[f("div",S(y([["className","flex items-center"],(s=se(k(()=>{let i;return M(n?Ke():A((i={className:"flex-shrink-0 h-5 w-5 text-gray-400"},f(Yw,i))),k(()=>A(f("a",S(se(k(()=>M(A(["children",e]),k(()=>M(t!=null?A(["href",cr(D(t))]):Ke(),k(()=>A(["className","ml-4 text-sm font-medium text-gray-500 hover:text-gray-700"]))))))))))))})),["children",v.Children.toArray(Array.from(s))])])))],["children",v.Children.toArray(Array.from(r))])])))}function iy(e){let t,n;return f("nav",S(y([["className","pt-2 mb-6"],["aria-label","Breadcrumb"],(t=[f("ol",S(y([["className","-ml-3 max-w-screen-xl w-full flex space-x-4"],(n=wp((r,s)=>sy(s.fields[0][0],s.fields[0][1],r===0),e),["children",v.Children.toArray(Array.from(n))])])))],["children",v.Children.toArray(Array.from(t))])])))}function $t(e,t){return new Ef([e,Rs(t)])}function If(){return $t("Partners",new q(0,[]))}function Nf(e,t){return $t(t,new q(1,[e]))}function oy(e){return $t("Super",new q(4,[e]))}function ay(e){return $t("Benefits",new q(5,[e]))}function ly(e){return $t("Bank Details",new q(6,[e]))}function cy(e){return $t("Directory",new q(2,[e]))}function uy(e){return $t("Workspace",new q(7,[e]))}function dy(e){return $t("Accounts",new q(3,[e]))}function fy(e){return new Ef([e,void 0])}function hy(e,t){let n;return $t("Directory",(n=[e,t],new q(9,[n[0],n[1]])))}function my(e,t){let n;return $t("Users",(n=[e,t],new q(10,[n[0],n[1]])))}function py(e,t){let n;return $t("Super",(n=[e,t],new q(11,[n[0],n[1]])))}function gy(e,t){let n;return $t("Benefits",(n=[e,t],new q(12,[n[0],n[1]])))}function $y(e,t){let n;return $t("Bank Details",(n=[e,t],new q(13,[n[0],n[1]])))}function wy(e,t){let n;return $t("Salary Packaging",(n=[e,t],new q(14,[n[0],n[1]])))}function yy(e,t){let n;return $t("Workspace",(n=[e,t],new q(15,[n[0],n[1]])))}function by(e,t){let n;return $t("HRIS Migration",(n=[e,t],new q(16,[n[0],n[1]])))}function Fs(e){let t,n;const r=e.partner;if(r==null)n="...";else{const m=r,h=m.Name;n=h.tag===2?h.fields[0].tag===1?$i(m.Id):Po(h.fields[0].fields[0]):"..."}let s;const i=e.account;if(i==null)s="...";else{const m=i,h=m.Name;s=h.tag===2?h.fields[0].tag===1?wi(m.Id):Po(h.fields[0].fields[0]):"..."}let o;const a=e.partner,l=e.account;let c,d,u;switch(a==null?(l==null,c=2):l==null?(c=1,u=a):(c=0,d=a),c){case 0:{o=y([If(),Nf(d.Id,n),dy(d.Id),fy(s)]);break}case 1:{o=y([If(),Nf(u.Id,n)]);break}default:o=je()}return iy((t=e.page,t.tag===17||t.tag===1||t.tag===3?o:t.tag===4?st(o,ee(oy(t.fields[0]))):t.tag===5?st(o,ee(ay(t.fields[0]))):t.tag===6?st(o,ee(ly(t.fields[0]))):t.tag===2?st(o,ee(cy(t.fields[0]))):t.tag===7?st(o,ee(uy(t.fields[0]))):t.tag===8?o:t.tag===9?st(o,ee(hy(t.fields[0],t.fields[1]))):t.tag===10?st(o,ee(my(t.fields[0],t.fields[1]))):t.tag===11?st(o,ee(py(t.fields[0],t.fields[1]))):t.tag===12?st(o,ee(gy(t.fields[0],t.fields[1]))):t.tag===13?st(o,ee($y(t.fields[0],t.fields[1]))):t.tag===14?st(o,ee(wy(t.fields[0],t.fields[1]))):t.tag===15?st(o,ee(yy(t.fields[0],t.fields[1]))):t.tag===16?st(o,ee(by(t.fields[0],t.fields[1]))):o))}class _y extends j{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["Tab"]}}function vy(e){return new _y(e)}function xy(e){return e.fields[0]}function Tf(e,t,n){const r=(e===t?"border-indigo-500 text-indigo-600 bg-indigo-100":"border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300 hover:bg-gray-200")+" whitespace-nowrap p-3 border-r-2 font-medium text-sm";return vy(f("a",S(se(k(()=>M(A(["key",t]),k(()=>M(A(["children",t]),k(()=>M(A(["className",r]),k(()=>e!==t?A(["href",cr(ee(n))]):Ke())))))))))))}function Mf(e){let t,n;const r=e.headers,s=Gn(100);return f("div",S(y([["ref",i=>{const o=rp(i);if(o!=null){const a=o;s[1](~~a.offsetTop)}}],["className","relative"],(t=[f("div",{className:"w-40 mr-6"}),f("nav",S(y([["className","fixed bottom-14 flex flex-col w-40 border-r border-gray-300 mr-6"],["style",{top:s[0]}],(n=Le(xy,r),["children",v.Children.toArray(Array.from(n))])])))],["children",v.Children.toArray(Array.from(t))])])))}class Cy extends Q{constructor(t,n,r){super(),this.Roles=t,this.BackendUrl=n,this.AccessToken=r}}const Mn=r$();let mr=class extends j{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["UpdateSearchText","UpdateSort","LoadAccountLookup","UpdateAccountLookup","QueryAccountLookup"]}};class Sy{constructor(t){this.props=t}}function Ay(e){return new Sy(e)}function Rf(e){return t=>n=>N.Delay(()=>{const r=za(e.props.partnerId);return N.Bind(Ha(e.props.backendUrl,e.props.accessToken,r,t,void 0),s=>(n(new mr(2,[new oe(2,[s])])),N.Zero()))})}function ky(e){return t=>n=>r=>N.Delay(()=>{const s=za(e.props.partnerId);return N.Bind(Ha(e.props.backendUrl,e.props.accessToken,s,t,n),i=>(r(new mr(3,[i])),N.Zero()))})}function Ey(e,t,n){return Ha(e.props.backendUrl,e.props.accessToken,za(e.props.partnerId),t,void 0)}let es=class extends Q{constructor(t,n,r,s){super(),this.Data=t,this.SearchText=n,this.Sort=r,this.PageSize=s}};function Iy(){return[new es(new oe(0,[]),G$,H$,Z$(20)),le()]}function Ny(e,t,n){let r,s,i,o;switch(t.tag){case 1:{const a=t.fields[0];return[new es(new oe(1,[]),n.SearchText,a,n.PageSize),Xe(l=>{const c=new ka(n.SearchText,a,n.PageSize);Hr(Rf(e)(c)(l))})]}case 2:return[new es(t.fields[0],n.SearchText,n.Sort,n.PageSize),le()];case 3:{const a=t.fields[0];return[new es((r=n.Data,r.tag===2?r.fields[0].tag===0?(s=a,s.tag===1?new oe(2,[new g(1,[s.fields[0]])]):new oe(2,[new g(0,[new qc(st(r.fields[0].fields[0].Accounts,s.fields[0].Accounts),s.fields[0].Token)])])):(i=a,i.tag===1?new oe(2,[new g(1,[i.fields[0]])]):new oe(3,[new Error("Failed to retrieve the account data")])):(o=a,o.tag===1?new oe(2,[new g(1,[o.fields[0]])]):new oe(3,[new Error("Failed to retrieve the account data")]))),n.SearchText,n.Sort,n.PageSize),le()]}case 4:return[new es(new oe(1,[]),n.SearchText,n.Sort,n.PageSize),Xe(a=>{const l=new ka(n.SearchText,n.Sort,n.PageSize);Hr(Rf(e)(l)(a))})];default:return[new es(n.Data,q$(t.fields[0]),n.Sort,n.PageSize),le()]}}function Pf(e,t,n,r){let s,i;return f("div",S(y([["className",ne(" ",["flex-grow","max-w-md"])],(s=[f("label",{for:"search",children:"Search",className:ne(" ",["block","text-sm","font-medium","text-gray-700"])}),f("div",S(y([["className","mt-1"],(i=[f("input",{id:"search",name:"search",type:"text",className:ne(" ",["py-2","shadow-sm","focus:ring-indigo-500","focus:border-indigo-500","block","w-full","sm:text-sm","border-gray-300","rounded-md"]),placeholder:t,value:e,onKeyUp:o=>{o.key==="Enter"&&r()},onChange:o=>{n(o.target.value)}})],["children",v.Children.toArray(Array.from(i))])])))],["children",v.Children.toArray(Array.from(s))])])))}function Ty(e){let t,n;return f("div",S(y([["className","pt-6"],(t=[f("div",S(y([["className",ne(" ",["flex","justify-end"])],(n=[f("button",{type:"search",children:"Search",className:ne(" ",["ml-3","inline-flex","justify-center","py-2","px-4","border","border-transparent","shadow-sm","text-sm","font-medium","rounded-md","text-white","bg-indigo-600","hover:bg-indigo-700","focus:outline-none","focus:ring-2","focus:ring-offset-2","focus:ring-indigo-500"]),onClick:e})],["children",v.Children.toArray(Array.from(n))])])))],["children",v.Children.toArray(Array.from(t))])])))}function Df(e){return["fillRule",e]}function Of(e){return["clipRule",e]}const My=f("svg",S(y([["className","w-6 h-6"],["fill","none"],["stroke","currentColor"],["strokeWidth",1.5],["viewBox","0 0 24 24"],["xmlns","http://www.w3.org/2000/svg"],(()=>{let e;const t=ee(f("path",S(y([["strokeLinecap","round"],["strokeLinejoin","round"],(e="M16.862 4.487l1.687-1.688a1.875 1.875 0 112.652 2.652L6.832 19.82a4.5 4.5 0 01-1.897 1.13l-2.685.8.8-2.685a4.5 4.5 0 011.13-1.897L16.863 4.487zm0 0L19.5 7.125",["d",e])]))));return["children",v.Children.toArray(Array.from(t))]})()]))),Ry=f("svg",S(y([["className",ne(" ",["h-5","w-5"])],["fill","currentColor"],["viewBox","0 0 20 20"],["xmlns","http://www.w3.org/2000/svg"],(()=>{let e;const t=ee(f("path",S(y([(e="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z",["d",e]),Df("evenodd"),Of("evenodd")]))));return["children",v.Children.toArray(Array.from(t))]})()]))),Py=f("svg",S(y([["className",ne(" ",["h-5","w-5"])],["fill","currentColor"],["viewBox","0 0 20 20"],["xmlns","http://www.w3.org/2000/svg"],(()=>{let e;const t=ee(f("path",S(y([(e="M14.707 12.707a1 1 0 01-1.414 0L10 9.414l-3.293 3.293a1 1 0 01-1.414-1.414l4-4a1 1 0 011.414 0l4 4a1 1 0 010 1.414z",["d",e]),Df("evenodd"),Of("evenodd")]))));return["children",v.Children.toArray(Array.from(t))]})()]))),Ff=f("svg",S(y([["className","size-6"],["fill","none"],["stroke","currentColor"],["strokeWidth",1.5],["viewBox","0 0 24 24"],["xmlns","http://www.w3.org/2000/svg"],(()=>{const e=ee(f("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z"}));return["children",v.Children.toArray(Array.from(e))]})()]))),Dy=f("svg",S(y([["className",ne(" ",["h-5","w-5"])],["fill","none"],["stroke","currentColor"],["strokeWidth",1.5],["viewBox","0 0 20 20"],["xmlns","http://www.w3.org/2000/svg"],(()=>{const e=ee(f("path",{d:"M10 5V10M10 10V15M10 10H15M10 10L5 10",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}));return["children",v.Children.toArray(Array.from(e))]})()]))),Oy=f("svg",S(y([["className",ne(" ",["h-5","w-5"])],["fill","none"],["viewBox","0 0 18 18"],["xmlns","http://www.w3.org/2000/svg"],(()=>{let e,t;const n=y([f("path",S(y([(e="M15.25 2H10.5C10.086 2 9.75002 2.336 9.75002 2.75C9.75002 3.164 10.086 3.5 10.5 3.5H13.439L8.46902 8.47C8.17602 8.763 8.17602 9.238 8.46902 9.531C8.61502 9.677 8.80702 9.751 8.99902 9.751C9.19102 9.751 9.38302 9.678 9.52902 9.531L14.499 4.561V7.5C14.499 7.914 14.835 8.25 15.249 8.25C15.663 8.25 15.999 7.914 15.999 7.5V2.75C15.999 2.336 15.663 2 15.249 2H15.25Z",["d",e]),["fill","#1D4ED8"]]))),f("path",S(y([(t="M13.25 9.75C12.836 9.75 12.5 10.086 12.5 10.5V13.25C12.5 13.939 11.939 14.5 11.25 14.5H4.75C4.061 14.5 3.5 13.939 3.5 13.25V6.75C3.5 6.061 4.061 5.5 4.75 5.5H7.5C7.914 5.5 8.25 5.164 8.25 4.75C8.25 4.336 7.914 4 7.5 4H4.75C3.233 4 2 5.233 2 6.75V13.25C2 14.767 3.233 16 4.75 16H11.25C12.767 16 14 14.767 14 13.25V10.5C14 10.086 13.664 9.75 13.25 9.75Z",["d",t]),["fill","#1D4ED8"]])))]);return["children",v.Children.toArray(Array.from(n))]})()]))),Wa=f("svg",S(y([["className",ne(" ",["h-5","w-5"])],["fill","white"],["viewBox","0 0 24 24"],["xmlns","http://www.w3.org/2000/svg"],(()=>{let e,t;const n=y([f("path",S(y([(e="M1.24302 18.953L10.152 2.11098C10.33 1.77464 10.5963 1.49318 10.9222 1.29687C11.2482 1.10056 11.6215 0.996826 12.002 0.996826C12.3825 0.996826 12.7559 1.10056 13.0818 1.29687C13.4078 1.49318 13.6741 1.77464 13.852 2.11098L22.761 18.953C22.9282 19.2708 23.0103 19.6265 22.9991 19.9855C22.988 20.3445 22.8841 20.6944 22.6975 21.0013C22.5109 21.3081 22.2479 21.5614 21.9343 21.7364C21.6207 21.9114 21.2672 22.0022 20.908 22H3.09202C2.73323 22.0015 2.38014 21.9102 2.06709 21.7349C1.75404 21.5596 1.49169 21.3063 1.30555 20.9995C1.11942 20.6928 1.01583 20.3431 1.00488 19.9845C0.993918 19.6259 1.07596 19.2705 1.24302 18.953V18.953Z",["d",e]),["stroke","#111827"],["strokeWidth",2],["strokeLinecap","round"],["strokeLinejoin","round"]]))),f("path",{d:"M12 8V14",stroke:"#DC2626",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),f("path",S(y([(t="M12 19C12.8284 19 13.5 18.3284 13.5 17.5C13.5 16.6716 12.8284 16 12 16C11.1716 16 10.5 16.6716 10.5 17.5C10.5 18.3284 11.1716 19 12 19Z",["d",t]),["fill","#DC2626"]])))]);return["children",v.Children.toArray(Array.from(n))]})()]))),Ga=f("svg",S(y([["fill","none"],["height",20],["width",20],["viewBox","0 0 20 20"],["xmlns","http://www.w3.org/2000/svg"],(()=>{let e,t;const n=y([f("path",S(y([(e="M18 10C18 14.4183 14.4183 18 10 18C5.58172 18 2 14.4183 2 10C2 5.58172 5.58172 2 10 2C14.4183 2 18 5.58172 18 10ZM3.99743 10C3.99743 13.3151 6.68487 16.0026 10 16.0026C13.3151 16.0026 16.0026 13.3151 16.0026 10C16.0026 6.68487 13.3151 3.99743 10 3.99743C6.68487 3.99743 3.99743 6.68487 3.99743 10Z",["d",e]),["fill","#D6E2FC"]]))),f("path",S(y([(t="M10 3C10 2.44772 10.4494 1.99356 10.9974 2.06242C11.7053 2.15137 12.3996 2.3348 13.0615 2.60896C14.0321 3.011 14.914 3.60028 15.6569 4.34315C16.3997 5.08602 16.989 5.96793 17.391 6.93853C17.6652 7.60043 17.8486 8.29473 17.9376 9.0026C18.0064 9.55057 17.5523 10 17 10C16.4477 10 16.0085 9.54925 15.9169 9.00462C15.842 8.55939 15.7169 8.12298 15.5433 7.7039C15.2417 6.97595 14.7998 6.31451 14.2426 5.75736C13.6855 5.20021 13.0241 4.75825 12.2961 4.45672C11.877 4.28313 11.4406 4.15804 10.9954 4.08314C10.4508 3.99152 10 3.55228 10 3Z",["d",t]),["fill","#2E66F7"]])))]);return["children",v.Children.toArray(Array.from(n))]})()])));function ts(e){const t=e.child,n=e.onClose;return Zu(()=>{const r=s=>{s.key==="Escape"&&n()};return window.addEventListener("keydown",r),{Dispose(){window.removeEventListener("keydown",r)}}},[]),t}class Fy{constructor(t,n){this.accessToken=n,this.adminUrl=`${t}/account-registry/admin`}QueryAnzsic(t){const n=this;return m$(N.Delay(()=>N.Bind(Vf(n,Ht(`${n.adminUrl}/anzsic?maxRecordCount=15&search=${t}`)),r=>{const s=en($e(nn(gg(),new gt(1,[]))),r.responseText);return N.Return(s.tag===1?new Array(0):s.fields[0].tag===0?s.fields[0].fields[0]:new Array(0))})))}CreateAccount(t,n,r,s){const i=this;return N.Delay(()=>{let o,a;const l=Vf(i,La(new Di(1,[(o=new Zc(n.AccountName,n.WebsiteUrl,new Lc(r.FirstName,r.LastName,r.Email,r.MobilePhone),void 0,new Kc(n.LegalEntityName,n.Abn,s.Line1,di(s.Line2)?void 0:s.Line2,s.City,s.Postcode,s.State,r.MobilePhone,"AU"),void 0,void 0,new zc(n.SalesforceParentRecordId,void 0),new Hc(n.Industry.ClassCode,n.Industry.ClassTitle)),Ua(0,ja(wg(),new gt(1,[]),void 0,void 0)(o)))]),rn(new zt(1,[]),Ht(`${i.adminUrl}/partners/${$i(t)}/accounts`))));return a=N.Bind(l,c=>N.Return(new g(0,[c]))),N.Bind(a,c=>{const d=c;if(d.tag===1)return N.Return(new g(1,[d.fields[0]]));{let u;const m=en($e(nn(bg(),new gt(1,[]))),d.fields[0].responseText);return u=m.tag===1?new g(1,[void 0]):new g(0,[m.fields[0].Id]),N.Return(u)}})})}}function Vy(e,t){return new Fy(e,t)}function Vf(e,t){return Ba(Oi(Va(`Bearer ${e.accessToken}`),t))}let Ly=class extends Q{constructor(t,n,r,s){super(),this.Name=t,this.ExternalId=n,this.BusinessName=r,this.BusinessNumber=s}};class pr extends j{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["AccountDetailsForm","PrimaryContactForm","BusinessAddressForm"]}}let sn=class extends j{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["NextForm","PreviousForm","SetAccountDetailsForm","SetPrimaryContactForm","SetBusinessAddressForm","StartAccountCreation","FinishAccountCreation"]}},qn=class extends Q{constructor(t,n,r,s,i){super(),this.AccountDetailsForm=t,this.PrimaryContactForm=n,this.BusinessAddressForm=r,this.CurrentView=s,this.AccountCreation=i}};function By(e){const t=e.AccountCreation;let n;switch(t.tag){case 2:{t.fields[0].tag===1?n=1:n=0;break}case 3:{n=1;break}default:n=0}switch(n){case 0:return!1;default:return!0}}function Uy(e){switch(e.AccountCreation.tag){case 0:case 2:case 3:return!1;default:return!0}}const jy=[new qn({},{},{},new pr(0,[]),new oe(0,[])),le()];function zy(e,t,n,r){let s,i;switch(n.tag){case 1:return[new qn(r.AccountDetailsForm,r.PrimaryContactForm,r.BusinessAddressForm,(s=r.CurrentView,s.tag===1?new pr(0,[]):s.tag===2?new pr(1,[]):new pr(0,[])),r.AccountCreation),le()];case 2:return[new qn(n.fields[0],r.PrimaryContactForm,r.BusinessAddressForm,r.CurrentView,r.AccountCreation),le()];case 3:return[new qn(r.AccountDetailsForm,n.fields[0],r.BusinessAddressForm,r.CurrentView,r.AccountCreation),le()];case 4:return[new qn(r.AccountDetailsForm,r.PrimaryContactForm,n.fields[0],r.CurrentView,r.AccountCreation),le()];case 5:{const o=r.AccountCreation;let a;switch(o.tag){case 0:case 3:{a=1;break}case 2:{o.fields[0].tag===1?a=1:a=0;break}default:a=0}switch(a){case 0:return[r,le()];default:return[new qn(r.AccountDetailsForm,r.PrimaryContactForm,r.BusinessAddressForm,r.CurrentView,new oe(1,[])),Is(l=>{Ns(l)},l=>t.CreateAccount(l[0],l[1],l[2],l[3]),[e,r.AccountDetailsForm,r.PrimaryContactForm,r.BusinessAddressForm],l=>new sn(6,[l]))]}}case 6:{const o=n.fields[0];return[new qn(r.AccountDetailsForm,r.PrimaryContactForm,r.BusinessAddressForm,r.CurrentView,new oe(2,[o])),o.tag===1?le():Na(new q(15,[e,Rt(o.fields[0])]))]}default:return[new qn(r.AccountDetailsForm,r.PrimaryContactForm,r.BusinessAddressForm,(i=r.CurrentView,i.tag===1?new pr(2,[]):i.tag===2?new pr(2,[]):new pr(1,[])),r.AccountCreation),le()]}}var Hy=0;function R(e,t,n,r,s,i){t||(t={});var o,a,l=t;if("ref"in l)for(a in l={},t)a=="ref"?o=t[a]:l[a]=t[a];var c={type:e,props:l,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:--Hy,__i:-1,__u:0,__source:s,__self:i};if(typeof e=="function"&&(o=e.defaultProps))for(a in o)l[a]===void 0&&(l[a]=o[a]);return ie.vnode&&ie.vnode(c),c}var Vs=e=>e.type==="checkbox",gr=e=>e instanceof Date,Ct=e=>e==null;const Lf=e=>typeof e=="object";var ze=e=>!Ct(e)&&!Array.isArray(e)&&Lf(e)&&!gr(e),Bf=e=>ze(e)&&e.target?Vs(e.target)?e.target.checked:e.target.value:e,Wy=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,Uf=(e,t)=>e.has(Wy(t)),Gy=e=>{const t=e.constructor&&e.constructor.prototype;return ze(t)&&t.hasOwnProperty("isPrototypeOf")},qa=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function At(e){let t;const n=Array.isArray(e),r=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(qa&&(e instanceof Blob||r))&&(n||ze(e)))if(t=n?[]:{},!n&&!Gy(e))t=e;else for(const s in e)e.hasOwnProperty(s)&&(t[s]=At(e[s]));else return e;return t}var Vi=e=>Array.isArray(e)?e.filter(Boolean):[],He=e=>e===void 0,B=(e,t,n)=>{if(!t||!ze(e))return n;const r=Vi(t.split(/[,[\].]+?/)).reduce((s,i)=>Ct(s)?s:s[i],e);return He(r)||r===e?He(e[t])?n:e[t]:r},Wt=e=>typeof e=="boolean",Ka=e=>/^\w*$/.test(e),jf=e=>Vi(e.replace(/["|']|\]/g,"").split(/\.|\[/)),Ie=(e,t,n)=>{let r=-1;const s=Ka(t)?[t]:jf(t),i=s.length,o=i-1;for(;++r<i;){const a=s[r];let l=n;if(r!==o){const c=e[a];l=ze(c)||Array.isArray(c)?c:isNaN(+s[r+1])?{}:[]}if(a==="__proto__"||a==="constructor"||a==="prototype")return;e[a]=l,e=e[a]}return e};const Li={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},on={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Rn={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},qy=Z.createContext(null),Za=()=>Z.useContext(qy);var zf=(e,t,n,r=!0)=>{const s={defaultValues:t._defaultValues};for(const i in e)Object.defineProperty(s,i,{get:()=>{const o=i;return t._proxyFormState[o]!==on.all&&(t._proxyFormState[o]=!r||on.all),n&&(n[o]=!0),e[o]}});return s},kt=e=>ze(e)&&!Object.keys(e).length,Hf=(e,t,n,r)=>{n(e);const{name:s,...i}=e;return kt(i)||Object.keys(i).length>=Object.keys(t).length||Object.keys(i).find(o=>t[o]===(!r||on.all))},Ls=e=>Array.isArray(e)?e:[e],Wf=(e,t,n)=>!e||!t||e===t||Ls(e).some(r=>r&&(n?r===t:r.startsWith(t)||t.startsWith(r)));function Ja(e){const t=Z.useRef(e);t.current=e,Z.useEffect(()=>{const n=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{n&&n.unsubscribe()}},[e.disabled])}function Ky(e){const t=Za(),{control:n=t.control,disabled:r,name:s,exact:i}=e||{},[o,a]=Z.useState(n._formState),l=Z.useRef(!0),c=Z.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),d=Z.useRef(s);return d.current=s,Ja({disabled:r,next:u=>l.current&&Wf(d.current,u.name,i)&&Hf(u,c.current,n._updateFormState)&&a({...n._formState,...u}),subject:n._subjects.state}),Z.useEffect(()=>(l.current=!0,c.current.isValid&&n._updateValid(!0),()=>{l.current=!1}),[n]),Z.useMemo(()=>zf(o,n,c.current,!1),[o,n])}var hn=e=>typeof e=="string",Gf=(e,t,n,r,s)=>hn(e)?(r&&t.watch.add(e),B(n,e,s)):Array.isArray(e)?e.map(i=>(r&&t.watch.add(i),B(n,i))):(r&&(t.watchAll=!0),n);function Zy(e){const t=Za(),{control:n=t.control,name:r,defaultValue:s,disabled:i,exact:o}=e||{},a=Z.useRef(r);a.current=r,Ja({disabled:i,subject:n._subjects.values,next:d=>{Wf(a.current,d.name,o)&&c(At(Gf(a.current,n._names,d.values||n._formValues,!1,s)))}});const[l,c]=Z.useState(n._getWatch(r,s));return Z.useEffect(()=>n._removeUnmounted()),l}function qf(e){const t=Za(),{name:n,disabled:r,control:s=t.control,shouldUnregister:i}=e,o=Uf(s._names.array,n),a=Zy({control:s,name:n,defaultValue:B(s._formValues,n,B(s._defaultValues,n,e.defaultValue)),exact:!0}),l=Ky({control:s,name:n,exact:!0}),c=Z.useRef(s.register(n,{...e.rules,value:a,...Wt(e.disabled)?{disabled:e.disabled}:{}})),d=Z.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!B(l.errors,n)},isDirty:{enumerable:!0,get:()=>!!B(l.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!B(l.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!B(l.validatingFields,n)},error:{enumerable:!0,get:()=>B(l.errors,n)}}),[l,n]),u=Z.useMemo(()=>({name:n,value:a,...Wt(r)||l.disabled?{disabled:l.disabled||r}:{},onChange:m=>c.current.onChange({target:{value:Bf(m),name:n},type:Li.CHANGE}),onBlur:()=>c.current.onBlur({target:{value:B(s._formValues,n),name:n},type:Li.BLUR}),ref:m=>{const h=B(s._fields,n);h&&m&&(h._f.ref={focus:()=>m.focus(),select:()=>m.select(),setCustomValidity:p=>m.setCustomValidity(p),reportValidity:()=>m.reportValidity()})}}),[n,s._formValues,r,l.disabled,a,s._fields]);return Z.useEffect(()=>{const m=s._options.shouldUnregister||i,h=(p,$)=>{const w=B(s._fields,p);w&&w._f&&(w._f.mount=$)};if(h(n,!0),m){const p=At(B(s._options.defaultValues,n));Ie(s._defaultValues,n,p),He(B(s._formValues,n))&&Ie(s._formValues,n,p)}return!o&&s.register(n),()=>{(o?m&&!s._state.action:m)?s.unregister(n):h(n,!1)}},[n,s,o,i]),Z.useEffect(()=>{s._updateDisabledField({disabled:r,fields:s._fields,name:n})},[r,n,s]),Z.useMemo(()=>({field:u,formState:l,fieldState:d}),[u,l,d])}var Jy=(e,t,n,r,s)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:s||!0}}:{},Kf=e=>({isOnSubmit:!e||e===on.onSubmit,isOnBlur:e===on.onBlur,isOnChange:e===on.onChange,isOnAll:e===on.all,isOnTouch:e===on.onTouched}),Zf=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const Bs=(e,t,n,r)=>{for(const s of n||Object.keys(e)){const i=B(e,s);if(i){const{_f:o,...a}=i;if(o){if(o.refs&&o.refs[0]&&t(o.refs[0],s)&&!r)return!0;if(o.ref&&t(o.ref,o.name)&&!r)return!0;if(Bs(a,t))break}else if(ze(a)&&Bs(a,t))break}}};var Yy=(e,t,n)=>{const r=Ls(B(e,n));return Ie(r,"root",t[n]),Ie(e,n,r),e},Ya=e=>e.type==="file",mn=e=>typeof e=="function",Bi=e=>{if(!qa)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Ui=e=>hn(e),Xa=e=>e.type==="radio",ji=e=>e instanceof RegExp;const Jf={value:!1,isValid:!1},Yf={value:!0,isValid:!0};var Xf=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!He(e[0].attributes.value)?He(e[0].value)||e[0].value===""?Yf:{value:e[0].value,isValid:!0}:Yf:Jf}return Jf};const Qf={isValid:!1,value:null};var eh=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,Qf):Qf;function th(e,t,n="validate"){if(Ui(e)||Array.isArray(e)&&e.every(Ui)||Wt(e)&&!e)return{type:n,message:Ui(e)?e:"",ref:t}}var ns=e=>ze(e)&&!ji(e)?e:{value:e,message:""},nh=async(e,t,n,r,s,i)=>{const{ref:o,refs:a,required:l,maxLength:c,minLength:d,min:u,max:m,pattern:h,validate:p,name:$,valueAsNumber:w,mount:C}=e._f,x=B(n,$);if(!C||t.has($))return{};const E=a?a[0]:o,O=G=>{s&&E.reportValidity&&(E.setCustomValidity(Wt(G)?"":G||""),E.reportValidity())},L={},X=Xa(o),pe=Vs(o),Se=X||pe,de=(w||Ya(o))&&He(o.value)&&He(x)||Bi(o)&&o.value===""||x===""||Array.isArray(x)&&!x.length,Y=Jy.bind(null,$,r,L),me=(G,re,Pe,P=Rn.maxLength,Ae=Rn.minLength)=>{const fe=G?re:Pe;L[$]={type:G?P:Ae,message:fe,ref:o,...Y(G?P:Ae,fe)}};if(i?!Array.isArray(x)||!x.length:l&&(!Se&&(de||Ct(x))||Wt(x)&&!x||pe&&!Xf(a).isValid||X&&!eh(a).isValid)){const{value:G,message:re}=Ui(l)?{value:!!l,message:l}:ns(l);if(G&&(L[$]={type:Rn.required,message:re,ref:E,...Y(Rn.required,re)},!r))return O(re),L}if(!de&&(!Ct(u)||!Ct(m))){let G,re;const Pe=ns(m),P=ns(u);if(!Ct(x)&&!isNaN(x)){const Ae=o.valueAsNumber||x&&+x;Ct(Pe.value)||(G=Ae>Pe.value),Ct(P.value)||(re=Ae<P.value)}else{const Ae=o.valueAsDate||new Date(x),fe=Ue=>new Date(new Date().toDateString()+" "+Ue),rt=o.type=="time",Ne=o.type=="week";hn(Pe.value)&&x&&(G=rt?fe(x)>fe(Pe.value):Ne?x>Pe.value:Ae>new Date(Pe.value)),hn(P.value)&&x&&(re=rt?fe(x)<fe(P.value):Ne?x<P.value:Ae<new Date(P.value))}if((G||re)&&(me(!!G,Pe.message,P.message,Rn.max,Rn.min),!r))return O(L[$].message),L}if((c||d)&&!de&&(hn(x)||i&&Array.isArray(x))){const G=ns(c),re=ns(d),Pe=!Ct(G.value)&&x.length>+G.value,P=!Ct(re.value)&&x.length<+re.value;if((Pe||P)&&(me(Pe,G.message,re.message),!r))return O(L[$].message),L}if(h&&!de&&hn(x)){const{value:G,message:re}=ns(h);if(ji(G)&&!x.match(G)&&(L[$]={type:Rn.pattern,message:re,ref:o,...Y(Rn.pattern,re)},!r))return O(re),L}if(p){if(mn(p)){const G=await p(x,n),re=th(G,E);if(re&&(L[$]={...re,...Y(Rn.validate,re.message)},!r))return O(re.message),L}else if(ze(p)){let G={};for(const re in p){if(!kt(G)&&!r)break;const Pe=th(await p[re](x,n),E,re);Pe&&(G={...Pe,...Y(re,Pe.message)},O(Pe.message),r&&(L[$]=G))}if(!kt(G)&&(L[$]={ref:E,...G},!r))return L}}return O(!0),L};function Xy(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=He(e)?r++:e[t[r++]];return e}function Qy(e){for(const t in e)if(e.hasOwnProperty(t)&&!He(e[t]))return!1;return!0}function Qe(e,t){const n=Array.isArray(t)?t:Ka(t)?[t]:jf(t),r=n.length===1?e:Xy(e,n),s=n.length-1,i=n[s];return r&&delete r[i],s!==0&&(ze(r)&&kt(r)||Array.isArray(r)&&Qy(r))&&Qe(e,n.slice(0,-1)),e}var Qa=()=>{let e=[];return{get observers(){return e},next:s=>{for(const i of e)i.next&&i.next(s)},subscribe:s=>(e.push(s),{unsubscribe:()=>{e=e.filter(i=>i!==s)}}),unsubscribe:()=>{e=[]}}},el=e=>Ct(e)||!Lf(e);function Kn(e,t){if(el(e)||el(t))return e===t;if(gr(e)&&gr(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const s of n){const i=e[s];if(!r.includes(s))return!1;if(s!=="ref"){const o=t[s];if(gr(i)&&gr(o)||ze(i)&&ze(o)||Array.isArray(i)&&Array.isArray(o)?!Kn(i,o):i!==o)return!1}}return!0}var rh=e=>e.type==="select-multiple",eb=e=>Xa(e)||Vs(e),tl=e=>Bi(e)&&e.isConnected,sh=e=>{for(const t in e)if(mn(e[t]))return!0;return!1};function zi(e,t={}){const n=Array.isArray(e);if(ze(e)||n)for(const r in e)Array.isArray(e[r])||ze(e[r])&&!sh(e[r])?(t[r]=Array.isArray(e[r])?[]:{},zi(e[r],t[r])):Ct(e[r])||(t[r]=!0);return t}function ih(e,t,n){const r=Array.isArray(e);if(ze(e)||r)for(const s in e)Array.isArray(e[s])||ze(e[s])&&!sh(e[s])?He(t)||el(n[s])?n[s]=Array.isArray(e[s])?zi(e[s],[]):{...zi(e[s])}:ih(e[s],Ct(t)?{}:t[s],n[s]):n[s]=!Kn(e[s],t[s]);return n}var Us=(e,t)=>ih(e,t,zi(t)),oh=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>He(e)?e:t?e===""?NaN:e&&+e:n&&hn(e)?new Date(e):r?r(e):e;function nl(e){const t=e.ref;return Ya(t)?t.files:Xa(t)?eh(e.refs).value:rh(t)?[...t.selectedOptions].map(({value:n})=>n):Vs(t)?Xf(e.refs).value:oh(He(t.value)?e.ref.value:t.value,e)}var tb=(e,t,n,r)=>{const s={};for(const i of e){const o=B(t,i);o&&Ie(s,i,o._f)}return{criteriaMode:n,names:[...e],fields:s,shouldUseNativeValidation:r}},js=e=>He(e)?e:ji(e)?e.source:ze(e)?ji(e.value)?e.value.source:e.value:e;const ah="AsyncFunction";var nb=e=>!!e&&!!e.validate&&!!(mn(e.validate)&&e.validate.constructor.name===ah||ze(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===ah)),rb=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function lh(e,t,n){const r=B(e,n);if(r||Ka(n))return{error:r,name:n};const s=n.split(".");for(;s.length;){const i=s.join("."),o=B(t,i),a=B(e,i);if(o&&!Array.isArray(o)&&n!==i)return{name:n};if(a&&a.type)return{name:i,error:a};s.pop()}return{name:n}}var sb=(e,t,n,r,s)=>s.isOnAll?!1:!n&&s.isOnTouch?!(t||e):(n?r.isOnBlur:s.isOnBlur)?!e:(n?r.isOnChange:s.isOnChange)?e:!0,ib=(e,t)=>!Vi(B(e,t)).length&&Qe(e,t);const ob={mode:on.onSubmit,reValidateMode:on.onChange,shouldFocusError:!0};function ab(e={}){let t={...ob,...e},n={submitCount:0,isDirty:!1,isLoading:mn(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},r={},s=ze(t.defaultValues)||ze(t.values)?At(t.defaultValues||t.values)||{}:{},i=t.shouldUnregister?{}:At(s),o={action:!1,mount:!1,watch:!1},a={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},l,c=0;const d={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},u={values:Qa(),array:Qa(),state:Qa()},m=Kf(t.mode),h=Kf(t.reValidateMode),p=t.criteriaMode===on.all,$=b=>I=>{clearTimeout(c),c=setTimeout(b,I)},w=async b=>{if(!t.disabled&&(d.isValid||b)){const I=t.resolver?kt((await Se()).errors):await Y(r,!0);I!==n.isValid&&u.state.next({isValid:I})}},C=(b,I)=>{!t.disabled&&(d.isValidating||d.validatingFields)&&((b||Array.from(a.mount)).forEach(T=>{T&&(I?Ie(n.validatingFields,T,I):Qe(n.validatingFields,T))}),u.state.next({validatingFields:n.validatingFields,isValidating:!kt(n.validatingFields)}))},x=(b,I=[],T,z,U=!0,F=!0)=>{if(z&&T&&!t.disabled){if(o.action=!0,F&&Array.isArray(B(r,b))){const J=T(B(r,b),z.argA,z.argB);U&&Ie(r,b,J)}if(F&&Array.isArray(B(n.errors,b))){const J=T(B(n.errors,b),z.argA,z.argB);U&&Ie(n.errors,b,J),ib(n.errors,b)}if(d.touchedFields&&F&&Array.isArray(B(n.touchedFields,b))){const J=T(B(n.touchedFields,b),z.argA,z.argB);U&&Ie(n.touchedFields,b,J)}d.dirtyFields&&(n.dirtyFields=Us(s,i)),u.state.next({name:b,isDirty:G(b,I),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else Ie(i,b,I)},E=(b,I)=>{Ie(n.errors,b,I),u.state.next({errors:n.errors})},O=b=>{n.errors=b,u.state.next({errors:n.errors,isValid:!1})},L=(b,I,T,z)=>{const U=B(r,b);if(U){const F=B(i,b,He(T)?B(s,b):T);He(F)||z&&z.defaultChecked||I?Ie(i,b,I?F:nl(U._f)):P(b,F),o.mount&&w()}},X=(b,I,T,z,U)=>{let F=!1,J=!1;const ue={name:b};if(!t.disabled){const it=!!(B(r,b)&&B(r,b)._f&&B(r,b)._f.disabled);if(!T||z){d.isDirty&&(J=n.isDirty,n.isDirty=ue.isDirty=G(),F=J!==ue.isDirty);const ot=it||Kn(B(s,b),I);J=!!(!it&&B(n.dirtyFields,b)),ot||it?Qe(n.dirtyFields,b):Ie(n.dirtyFields,b,!0),ue.dirtyFields=n.dirtyFields,F=F||d.dirtyFields&&J!==!ot}if(T){const ot=B(n.touchedFields,b);ot||(Ie(n.touchedFields,b,T),ue.touchedFields=n.touchedFields,F=F||d.touchedFields&&ot!==T)}F&&U&&u.state.next(ue)}return F?ue:{}},pe=(b,I,T,z)=>{const U=B(n.errors,b),F=d.isValid&&Wt(I)&&n.isValid!==I;if(t.delayError&&T?(l=$(()=>E(b,T)),l(t.delayError)):(clearTimeout(c),l=null,T?Ie(n.errors,b,T):Qe(n.errors,b)),(T?!Kn(U,T):U)||!kt(z)||F){const J={...z,...F&&Wt(I)?{isValid:I}:{},errors:n.errors,name:b};n={...n,...J},u.state.next(J)}},Se=async b=>{C(b,!0);const I=await t.resolver(i,t.context,tb(b||a.mount,r,t.criteriaMode,t.shouldUseNativeValidation));return C(b),I},de=async b=>{const{errors:I}=await Se(b);if(b)for(const T of b){const z=B(I,T);z?Ie(n.errors,T,z):Qe(n.errors,T)}else n.errors=I;return I},Y=async(b,I,T={valid:!0})=>{for(const z in b){const U=b[z];if(U){const{_f:F,...J}=U;if(F){const ue=a.array.has(F.name),it=U._f&&nb(U._f);it&&d.validatingFields&&C([z],!0);const ot=await nh(U,a.disabled,i,p,t.shouldUseNativeValidation&&!I,ue);if(it&&d.validatingFields&&C([z]),ot[F.name]&&(T.valid=!1,I))break;!I&&(B(ot,F.name)?ue?Yy(n.errors,ot,F.name):Ie(n.errors,F.name,ot[F.name]):Qe(n.errors,F.name))}!kt(J)&&await Y(J,I,T)}}return T.valid},me=()=>{for(const b of a.unMount){const I=B(r,b);I&&(I._f.refs?I._f.refs.every(T=>!tl(T)):!tl(I._f.ref))&&Ys(b)}a.unMount=new Set},G=(b,I)=>!t.disabled&&(b&&I&&Ie(i,b,I),!Kn(Et(),s)),re=(b,I,T)=>Gf(b,a,{...o.mount?i:He(I)?s:hn(b)?{[b]:I}:I},T,I),Pe=b=>Vi(B(o.mount?i:s,b,t.shouldUnregister?B(s,b,[]):[])),P=(b,I,T={})=>{const z=B(r,b);let U=I;if(z){const F=z._f;F&&(!F.disabled&&Ie(i,b,oh(I,F)),U=Bi(F.ref)&&Ct(I)?"":I,rh(F.ref)?[...F.ref.options].forEach(J=>J.selected=U.includes(J.value)):F.refs?Vs(F.ref)?F.refs.length>1?F.refs.forEach(J=>(!J.defaultChecked||!J.disabled)&&(J.checked=Array.isArray(U)?!!U.find(ue=>ue===J.value):U===J.value)):F.refs[0]&&(F.refs[0].checked=!!U):F.refs.forEach(J=>J.checked=J.value===U):Ya(F.ref)?F.ref.value="":(F.ref.value=U,F.ref.type||u.values.next({name:b,values:{...i}})))}(T.shouldDirty||T.shouldTouch)&&X(b,U,T.shouldTouch,T.shouldDirty,!0),T.shouldValidate&&Ue(b)},Ae=(b,I,T)=>{for(const z in I){const U=I[z],F=`${b}.${z}`,J=B(r,F);(a.array.has(b)||ze(U)||J&&!J._f)&&!gr(U)?Ae(F,U,T):P(F,U,T)}},fe=(b,I,T={})=>{const z=B(r,b),U=a.array.has(b),F=At(I);Ie(i,b,F),U?(u.array.next({name:b,values:{...i}}),(d.isDirty||d.dirtyFields)&&T.shouldDirty&&u.state.next({name:b,dirtyFields:Us(s,i),isDirty:G(b,F)})):z&&!z._f&&!Ct(F)?Ae(b,F,T):P(b,F,T),Zf(b,a)&&u.state.next({...n}),u.values.next({name:o.mount?b:void 0,values:{...i}})},rt=async b=>{o.mount=!0;const I=b.target;let T=I.name,z=!0;const U=B(r,T),F=()=>I.type?nl(U._f):Bf(b),J=ue=>{z=Number.isNaN(ue)||gr(ue)&&isNaN(ue.getTime())||Kn(ue,B(i,T,ue))};if(U){let ue,it;const ot=F(),Qn=b.type===Li.BLUR||b.type===Li.FOCUS_OUT,Fx=!rb(U._f)&&!t.resolver&&!B(n.errors,T)&&!U._f.deps||sb(Qn,B(n.touchedFields,T),n.isSubmitted,h,m),xl=Zf(T,a,Qn);Ie(i,T,ot),Qn?(U._f.onBlur&&U._f.onBlur(b),l&&l(0)):U._f.onChange&&U._f.onChange(b);const Cl=X(T,ot,Qn,!1),Vx=!kt(Cl)||xl;if(!Qn&&u.values.next({name:T,type:b.type,values:{...i}}),Fx)return d.isValid&&(t.mode==="onBlur"&&Qn?w():Qn||w()),Vx&&u.state.next({name:T,...xl?{}:Cl});if(!Qn&&xl&&u.state.next({...n}),t.resolver){const{errors:Xh}=await Se([T]);if(J(ot),z){const Lx=lh(n.errors,r,T),Qh=lh(Xh,r,Lx.name||T);ue=Qh.error,T=Qh.name,it=kt(Xh)}}else C([T],!0),ue=(await nh(U,a.disabled,i,p,t.shouldUseNativeValidation))[T],C([T]),J(ot),z&&(ue?it=!1:d.isValid&&(it=await Y(r,!0)));z&&(U._f.deps&&Ue(U._f.deps),pe(T,it,ue,Cl))}},Ne=(b,I)=>{if(B(n.errors,I)&&b.focus)return b.focus(),1},Ue=async(b,I={})=>{let T,z;const U=Ls(b);if(t.resolver){const F=await de(He(b)?b:U);T=kt(F),z=b?!U.some(J=>B(F,J)):T}else b?(z=(await Promise.all(U.map(async F=>{const J=B(r,F);return await Y(J&&J._f?{[F]:J}:J)}))).every(Boolean),!(!z&&!n.isValid)&&w()):z=T=await Y(r);return u.state.next({...!hn(b)||d.isValid&&T!==n.isValid?{}:{name:b},...t.resolver||!b?{isValid:T}:{},errors:n.errors}),I.shouldFocus&&!z&&Bs(r,Ne,b?U:a.mount),z},Et=b=>{const I={...o.mount?i:s};return He(b)?I:hn(b)?B(I,b):b.map(T=>B(I,T))},cn=(b,I)=>({invalid:!!B((I||n).errors,b),isDirty:!!B((I||n).dirtyFields,b),error:B((I||n).errors,b),isValidating:!!B(n.validatingFields,b),isTouched:!!B((I||n).touchedFields,b)}),Sr=b=>{b&&Ls(b).forEach(I=>Qe(n.errors,I)),u.state.next({errors:b?n.errors:{}})},Lt=(b,I,T)=>{const z=(B(r,b,{_f:{}})._f||{}).ref,U=B(n.errors,b)||{},{ref:F,message:J,type:ue,...it}=U;Ie(n.errors,b,{...it,...I,ref:z}),u.state.next({name:b,errors:n.errors,isValid:!1}),T&&T.shouldFocus&&z&&z.focus&&z.focus()},Js=(b,I)=>mn(b)?u.values.subscribe({next:T=>b(re(void 0,I),T)}):re(b,I,!0),Ys=(b,I={})=>{for(const T of b?Ls(b):a.mount)a.mount.delete(T),a.array.delete(T),I.keepValue||(Qe(r,T),Qe(i,T)),!I.keepError&&Qe(n.errors,T),!I.keepDirty&&Qe(n.dirtyFields,T),!I.keepTouched&&Qe(n.touchedFields,T),!I.keepIsValidating&&Qe(n.validatingFields,T),!t.shouldUnregister&&!I.keepDefaultValue&&Qe(s,T);u.values.next({values:{...i}}),u.state.next({...n,...I.keepDirty?{isDirty:G()}:{}}),!I.keepIsValid&&w()},Ar=({disabled:b,name:I,field:T,fields:z})=>{(Wt(b)&&o.mount||b||a.disabled.has(I))&&(b?a.disabled.add(I):a.disabled.delete(I),X(I,nl(T?T._f:B(z,I)._f),!1,!1,!0))},Xs=(b,I={})=>{let T=B(r,b);const z=Wt(I.disabled)||Wt(t.disabled);return Ie(r,b,{...T||{},_f:{...T&&T._f?T._f:{ref:{name:b}},name:b,mount:!0,...I}}),a.mount.add(b),T?Ar({field:T,disabled:Wt(I.disabled)?I.disabled:t.disabled,name:b}):L(b,!0,I.value),{...z?{disabled:I.disabled||t.disabled}:{},...t.progressive?{required:!!I.required,min:js(I.min),max:js(I.max),minLength:js(I.minLength),maxLength:js(I.maxLength),pattern:js(I.pattern)}:{},name:b,onChange:rt,onBlur:rt,ref:U=>{if(U){Xs(b,I),T=B(r,b);const F=He(U.value)&&U.querySelectorAll&&U.querySelectorAll("input,select,textarea")[0]||U,J=eb(F),ue=T._f.refs||[];if(J?ue.find(it=>it===F):F===T._f.ref)return;Ie(r,b,{_f:{...T._f,...J?{refs:[...ue.filter(tl),F,...Array.isArray(B(s,b))?[{}]:[]],ref:{type:F.type,name:b}}:{ref:F}}}),L(b,!1,void 0,F)}else T=B(r,b,{}),T._f&&(T._f.mount=!1),(t.shouldUnregister||I.shouldUnregister)&&!(Uf(a.array,b)&&o.action)&&a.unMount.add(b)}}},ae=()=>t.shouldFocusError&&Bs(r,Ne,a.mount),Te=b=>{Wt(b)&&(u.state.next({disabled:b}),Bs(r,(I,T)=>{const z=B(r,T);z&&(I.disabled=z._f.disabled||b,Array.isArray(z._f.refs)&&z._f.refs.forEach(U=>{U.disabled=z._f.disabled||b}))},0,!1))},wt=(b,I)=>async T=>{let z;T&&(T.preventDefault&&T.preventDefault(),T.persist&&T.persist());let U=At(i);if(a.disabled.size)for(const F of a.disabled)Ie(U,F,void 0);if(u.state.next({isSubmitting:!0}),t.resolver){const{errors:F,values:J}=await Se();n.errors=F,U=J}else await Y(r);if(Qe(n.errors,"root"),kt(n.errors)){u.state.next({errors:{}});try{await b(U,T)}catch(F){z=F}}else I&&await I({...n.errors},T),ae(),setTimeout(ae);if(u.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:kt(n.errors)&&!z,submitCount:n.submitCount+1,errors:n.errors}),z)throw z},cs=(b,I={})=>{B(r,b)&&(He(I.defaultValue)?fe(b,At(B(s,b))):(fe(b,I.defaultValue),Ie(s,b,At(I.defaultValue))),I.keepTouched||Qe(n.touchedFields,b),I.keepDirty||(Qe(n.dirtyFields,b),n.isDirty=I.defaultValue?G(b,At(B(s,b))):G()),I.keepError||(Qe(n.errors,b),d.isValid&&w()),u.state.next({...n}))},Qs=(b,I={})=>{const T=b?At(b):s,z=At(T),U=kt(b),F=U?s:z;if(I.keepDefaultValues||(s=T),!I.keepValues){if(I.keepDirtyValues){const J=new Set([...a.mount,...Object.keys(Us(s,i))]);for(const ue of Array.from(J))B(n.dirtyFields,ue)?Ie(F,ue,B(i,ue)):fe(ue,B(F,ue))}else{if(qa&&He(b))for(const J of a.mount){const ue=B(r,J);if(ue&&ue._f){const it=Array.isArray(ue._f.refs)?ue._f.refs[0]:ue._f.ref;if(Bi(it)){const ot=it.closest("form");if(ot){ot.reset();break}}}}r={}}i=t.shouldUnregister?I.keepDefaultValues?At(s):{}:At(F),u.array.next({values:{...F}}),u.values.next({values:{...F}})}a={mount:I.keepDirtyValues?a.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},o.mount=!d.isValid||!!I.keepIsValid||!!I.keepDirtyValues,o.watch=!!t.shouldUnregister,u.state.next({submitCount:I.keepSubmitCount?n.submitCount:0,isDirty:U?!1:I.keepDirty?n.isDirty:!!(I.keepDefaultValues&&!Kn(b,s)),isSubmitted:I.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:U?{}:I.keepDirtyValues?I.keepDefaultValues&&i?Us(s,i):n.dirtyFields:I.keepDefaultValues&&b?Us(s,b):I.keepDirty?n.dirtyFields:{},touchedFields:I.keepTouched?n.touchedFields:{},errors:I.keepErrors?n.errors:{},isSubmitSuccessful:I.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1})},Yh=(b,I)=>Qs(mn(b)?b(i):b,I);return{control:{register:Xs,unregister:Ys,getFieldState:cn,handleSubmit:wt,setError:Lt,_executeSchema:Se,_getWatch:re,_getDirty:G,_updateValid:w,_removeUnmounted:me,_updateFieldArray:x,_updateDisabledField:Ar,_getFieldArray:Pe,_reset:Qs,_resetDefaultValues:()=>mn(t.defaultValues)&&t.defaultValues().then(b=>{Yh(b,t.resetOptions),u.state.next({isLoading:!1})}),_updateFormState:b=>{n={...n,...b}},_disableForm:Te,_subjects:u,_proxyFormState:d,_setErrors:O,get _fields(){return r},get _formValues(){return i},get _state(){return o},set _state(b){o=b},get _defaultValues(){return s},get _names(){return a},set _names(b){a=b},get _formState(){return n},set _formState(b){n=b},get _options(){return t},set _options(b){t={...t,...b}}},trigger:Ue,register:Xs,handleSubmit:wt,watch:Js,setValue:fe,getValues:Et,reset:Yh,resetField:cs,clearErrors:Sr,unregister:Ys,setError:Lt,setFocus:(b,I={})=>{const T=B(r,b),z=T&&T._f;if(z){const U=z.refs?z.refs[0]:z.ref;U.focus&&(U.focus(),I.shouldSelect&&mn(U.select)&&U.select())}},getFieldState:cn}}function Hi(e={}){const t=Z.useRef(void 0),n=Z.useRef(void 0),[r,s]=Z.useState({isDirty:!1,isValidating:!1,isLoading:mn(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:mn(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...ab(e),formState:r});const i=t.current.control;return i._options=e,Ja({subject:i._subjects.state,next:o=>{Hf(o,i._proxyFormState,i._updateFormState,!0)&&s({...i._formState})}}),Z.useEffect(()=>i._disableForm(e.disabled),[i,e.disabled]),Z.useEffect(()=>{if(i._proxyFormState.isDirty){const o=i._getDirty();o!==r.isDirty&&i._subjects.state.next({isDirty:o})}},[i,r.isDirty]),Z.useEffect(()=>{e.values&&!Kn(e.values,n.current)?(i._reset(e.values,i._options.resetOptions),n.current=e.values,s(o=>({...o}))):i._resetDefaultValues()},[e.values,i]),Z.useEffect(()=>{e.errors&&i._setErrors(e.errors)},[e.errors,i]),Z.useEffect(()=>{i._state.mount||(i._updateValid(),i._state.mount=!0),i._state.watch&&(i._state.watch=!1,i._subjects.state.next({...i._formState})),i._removeUnmounted()}),Z.useEffect(()=>{e.shouldUnregister&&i._subjects.values.next({values:i._getWatch()})},[e.shouldUnregister,i]),t.current.formState=zf(r,i),t.current}function lb(e){const t=e==null?void 0:e.match(/\d+/g);return t?t.join(""):""}function mt({label:e,name:t,control:n,validate:r,placeholder:s,optional:i,isNumber:o}){const{field:a,fieldState:l}=qf({name:t,control:n,rules:{validate:r}});return R("div",{children:[R("div",{className:"flex justify-between",children:[R("label",{className:"block text-sm font-medium",children:e}),i&&R("p",{className:"text-sm text-gray-500 font-normal",children:"Optional"})]}),R("div",{className:"mt-2",children:R("input",{...a,placeholder:s,className:"block w-full rounded-md bg-white px-2 py-[9px] text-sm border border-gray-300 focus:ring-2 focus:ring-indigo-600 focus:border-indigo-600",onChange:c=>o?a.onChange(lb(c.target.value)):a.onChange(c)})}),l.invalid&&R("p",{className:"mt-2 text-sm text-red-600",children:[e," is invalid"]})]})}function Wi({primaryLabel:e,secondaryLabel:t,secondaryOnClick:n,isBusy:r}){return R("div",{className:"flex flex-row-reverse pt-4 pb-6 gap-3 border-t -mx-6 px-6",children:[R("button",{type:"submit",className:"rounded-md bg-indigo-600 px-3.5 py-2.5 text-sm font-semibold text-white shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600",disabled:r,children:r?R("div",{className:"animate-spin size-5",children:R(Qw,{})}):e}),R("button",{type:"button",className:"rounded-md bg-white px-3.5 py-2.5 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50",onClick:n,disabled:r,children:t})]})}function cb({defaultValues:e,validateFirstName:t,validateLastName:n,validateEmail:r,validateMobilePhone:s,onSubmit:i,onBack:o}){const{handleSubmit:a,control:l,getValues:c}=Hi({mode:"onChange",defaultValues:e});return R(ve,{children:[R("div",{className:"font-bold text-lg mb-4",children:"Primary contact"}),R("form",{className:"space-y-6",onSubmit:a(i),children:[R("div",{className:"grid grid-cols-2 gap-3",children:[R(mt,{label:"Given name",name:"FirstName",control:l,placeholder:"e.g. Sam",validate:t}),R(mt,{label:"Family name / surname",name:"LastName",control:l,placeholder:"e.g. Smith",validate:n})]}),R(mt,{label:"Email",name:"Email",control:l,placeholder:"e.g. sam.smith@example.com",validate:r}),R("div",{className:"grid grid-cols-2 gap-3",children:R(mt,{label:"Mobile phone number",name:"MobilePhone",control:l,placeholder:"e.g. +61400111222",validate:s})}),R(Wi,{primaryLabel:"Next",secondaryLabel:"Back",secondaryOnClick:()=>o(c())})]})]})}function ub(e,t){return f(cb,{defaultValues:e,validateFirstName:n=>ut(Mc(n)),validateLastName:n=>ut(Pc(n)),validateEmail:n=>ut(Oc(n)),validateMobilePhone:n=>ut(Fc(n)),onSubmit:n=>{t(new sn(3,[n])),t(new sn(0,[]))},onBack:n=>{t(new sn(3,[n])),t(new sn(1,[]))}})}function db(){return R("div",{className:"rounded-md bg-red-50 p-4 mb-2",children:R("div",{className:"flex",children:[R("div",{className:"shrink-0",children:R(ry,{"aria-hidden":"true",className:"size-5 text-red-400"})}),R("div",{className:"ml-3",children:[R("h3",{className:"text-sm font-medium text-red-800",children:"We're having trouble creating the account"}),R("div",{className:"mt-2 text-sm text-red-700",children:R("p",{children:"Please try again. If this keeps happening, please contact support."})})]})]})})}function fb({defaultValues:e,validateAddress1:t,validateAddress2:n,validateCity:r,validateState:s,validatePostcode:i,accountCreationInProgress:o,accountCreationFailed:a,onSubmit:l,onBack:c}){const{handleSubmit:d,control:u,register:m,getValues:h}=Hi({mode:"onChange",defaultValues:e});return R(ve,{children:[a&&R(db,{}),R("div",{className:"font-bold text-lg mb-4",children:"Business address"}),R("form",{className:"space-y-6",onSubmit:d(l),children:[R(mt,{label:"Address (Line one)",name:"Line1",control:u,placeholder:"e.g. 100 Example Street",validate:t}),R(mt,{label:"Address (Line two)",name:"Line2",control:u,placeholder:"Example: Floor, Unit, Building name, etc.",validate:n,optional:!0}),R("div",{className:"grid grid-cols-2 gap-3",children:[R(mt,{label:"City / Suburb",name:"City",control:u,placeholder:"e.g. Sydney",validate:r}),R("div",{children:[R("label",{className:"block text-sm font-medium",children:"State"}),R("select",{className:"mt-2 w-full appearance-none rounded-md bg-white px-2 py-[9px] text-sm border border-gray-300 focus:ring-2 focus:ring-indigo-600 focus:border-indigo-600",...m("State",{validate:s}),children:[R("option",{children:"NSW"}),R("option",{children:"VIC"}),R("option",{children:"QLD"}),R("option",{children:"SA"}),R("option",{children:"WA"}),R("option",{children:"NT"}),R("option",{children:"TAS"}),R("option",{children:"ACT"})]})]})]}),R("div",{className:"grid grid-cols-2 gap-3",children:R(mt,{label:"Postcode",name:"Postcode",control:u,placeholder:"e.g. 2000",validate:i,isNumber:!0})}),R(Wi,{primaryLabel:"Add account",secondaryLabel:"Back",secondaryOnClick:()=>c(h()),isBusy:o})]})]})}function hb(e,t,n,r){return f(fb,{defaultValues:e,validateAddress1:s=>ut(K0(s)),validateAddress2:s=>di(s)?!0:Z0(s)!=null,validateCity:s=>ut(J0(s)),validateState:s=>ut(X0(s)),validatePostcode:s=>ut(Y0(s)),accountCreationInProgress:t,accountCreationFailed:n,onSubmit:s=>{r(new sn(4,[s])),r(new sn(5,[]))},onBack:s=>{r(new sn(4,[s])),r(new sn(1,[]))}})}function zs(e,t,n){let r=n.initialDeps??[],s;return()=>{var i,o,a,l;let c;n.key&&((i=n.debug)!=null&&i.call(n))&&(c=Date.now());const d=e();if(!(d.length!==r.length||d.some((h,p)=>r[p]!==h)))return s;r=d;let m;if(n.key&&((o=n.debug)!=null&&o.call(n))&&(m=Date.now()),s=t(...d),n.key&&((a=n.debug)!=null&&a.call(n))){const h=Math.round((Date.now()-c)*100)/100,p=Math.round((Date.now()-m)*100)/100,$=p/16,w=(C,x)=>{for(C=String(C);C.length<x;)C=" "+C;return C};console.info(`%c⏱ ${w(p,5)} /${w(h,5)} ms`,`
46
46
  font-size: .6rem;
47
47
  font-weight: bold;
48
- color: hsl(${Math.max(0,Math.min(120-120*g,120))}deg 100% 31%);`,n==null?void 0:n.key)}return(l=n==null?void 0:n.onChange)==null||l.call(n,s),s}}function nl(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const cb=(e,t)=>Math.abs(e-t)<1,ub=(e,t,n)=>{let r;return function(...s){e.clearTimeout(r),r=e.setTimeout(()=>t.apply(this,s),n)}},db=e=>e,fb=e=>{const t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1),r=[];for(let s=t;s<=n;s++)r.push(s);return r},hb=(e,t)=>{const n=e.scrollElement;if(!n)return;const r=e.targetWindow;if(!r)return;const s=o=>{const{width:a,height:l}=o;t({width:Math.round(a),height:Math.round(l)})};if(s(n.getBoundingClientRect()),!r.ResizeObserver)return()=>{};const i=new r.ResizeObserver(o=>{const a=o[0];if(a!=null&&a.borderBoxSize){const l=a.borderBoxSize[0];if(l){s({width:l.inlineSize,height:l.blockSize});return}}s(n.getBoundingClientRect())});return i.observe(n,{box:"border-box"}),()=>{i.unobserve(n)}},lh={passive:!0},mb=typeof window>"u"?!0:"onscrollend"in window,pb=(e,t)=>{const n=e.scrollElement;if(!n)return;const r=e.targetWindow;if(!r)return;let s=0;const i=mb?()=>{}:ub(r,()=>{t(s,!1)},e.options.isScrollingResetDelay),o=c=>()=>{s=n[e.options.horizontal?"scrollLeft":"scrollTop"],i(),t(s,c)},a=o(!0),l=o(!1);return l(),n.addEventListener("scroll",a,lh),n.addEventListener("scrollend",l,lh),()=>{n.removeEventListener("scroll",a),n.removeEventListener("scrollend",l)}},gb=(e,t,n)=>{if(t!=null&&t.borderBoxSize){const r=t.borderBoxSize[0];if(r)return Math.round(r[n.options.horizontal?"inlineSize":"blockSize"])}return Math.round(e.getBoundingClientRect()[n.options.horizontal?"width":"height"])},$b=(e,{adjustments:t=0,behavior:n},r)=>{var s,i;const o=e+t;(i=(s=r.scrollElement)==null?void 0:s.scrollTo)==null||i.call(s,{[r.options.horizontal?"left":"top"]:o,behavior:n})};class wb{constructor(t){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let n=null;const r=()=>n||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:n=new this.targetWindow.ResizeObserver(s=>{s.forEach(i=>{this._measureElement(i.target,i)})}));return{disconnect:()=>{var s;return(s=r())==null?void 0:s.disconnect()},observe:s=>{var i;return(i=r())==null?void 0:i.observe(s,{box:"border-box"})},unobserve:s=>{var i;return(i=r())==null?void 0:i.unobserve(s)}}})(),this.range=null,this.setOptions=n=>{Object.entries(n).forEach(([r,s])=>{typeof s>"u"&&delete n[r]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:db,rangeExtractor:fb,onChange:()=>{},measureElement:gb,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,...n}},this.notify=(n,r)=>{var s,i;const{startIndex:o,endIndex:a}=this.range??{startIndex:void 0,endIndex:void 0},l=this.calculateRange();(n||o!==(l==null?void 0:l.startIndex)||a!==(l==null?void 0:l.endIndex))&&((i=(s=this.options).onChange)==null||i.call(s,this,r))},this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(n=>n()),this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.observer.disconnect(),this.elementsCache.clear()},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var n;const r=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==r){if(this.cleanup(),!r){this.notify(!1,!1);return}this.scrollElement=r,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((n=this.scrollElement)==null?void 0:n.window)??null,this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,s=>{this.scrollRect=s,this.notify(!1,!1)})),this.unsubs.push(this.options.observeElementOffset(this,(s,i)=>{this.scrollAdjustments=0,this.scrollDirection=i?this.getScrollOffset()<s?"forward":"backward":null,this.scrollOffset=s;const o=this.isScrolling;this.isScrolling=i,this.notify(o!==i,i)}))}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(n,r)=>{const s=new Map,i=new Map;for(let o=r-1;o>=0;o--){const a=n[o];if(s.has(a.lane))continue;const l=i.get(a.lane);if(l==null||a.end>l.end?i.set(a.lane,a):a.end<l.end&&s.set(a.lane,!0),s.size===this.options.lanes)break}return i.size===this.options.lanes?Array.from(i.values()).sort((o,a)=>o.end===a.end?o.index-a.index:o.end-a.end)[0]:void 0},this.getMeasurementOptions=zs(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(n,r,s,i,o)=>(this.pendingMeasuredCacheIndexes=[],{count:n,paddingStart:r,scrollMargin:s,getItemKey:i,enabled:o}),{key:!1}),this.getMeasurements=zs(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:n,paddingStart:r,scrollMargin:s,getItemKey:i,enabled:o},a)=>{var l;if(!o)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(u=>{this.itemSizeCache.set(u.key,u.size)}));const c=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const d=this.measurementsCache.slice(0,c);for(let u=c;u<n;u++){let m=(l=this.measurementsCache[u])==null?void 0:l.measureElement;m||(m=D=>{const L=i(u),X=this.elementsCache.get(L);if(!D){X&&(this.observer.unobserve(X),this.elementsCache.delete(L));return}X!==D&&(X&&this.observer.unobserve(X),this.observer.observe(D),this.elementsCache.set(L,D)),D.isConnected&&this.resizeItem(u,this.options.measureElement(D,void 0,this))});const h=i(u),p=this.options.lanes===1?d[u-1]:this.getFurthestMeasurement(d,u),g=p?p.end+this.options.gap:r+s,w=a.get(h),C=typeof w=="number"?w:this.options.estimateSize(u),x=g+C,E=p?p.lane:u%this.options.lanes;d[u]={index:u,start:g,size:C,end:x,key:h,lane:E,measureElement:m}}return this.measurementsCache=d,d},{key:!1,debug:()=>this.options.debug}),this.calculateRange=zs(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset()],(n,r,s)=>this.range=n.length>0&&r>0?yb({measurements:n,outerSize:r,scrollOffset:s}):null,{key:!1,debug:()=>this.options.debug}),this.getIndexes=zs(()=>[this.options.rangeExtractor,this.calculateRange(),this.options.overscan,this.options.count],(n,r,s,i)=>r===null?[]:n({startIndex:r.startIndex,endIndex:r.endIndex,overscan:s,count:i}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=n=>{const r=this.options.indexAttribute,s=n.getAttribute(r);return s?parseInt(s,10):(console.warn(`Missing attribute name '${r}={index}' on measured element.`),-1)},this._measureElement=(n,r)=>{const s=this.indexFromElement(n),i=this.getMeasurements()[s];if(!i||!n.isConnected){this.elementsCache.forEach((a,l)=>{a===n&&(this.observer.unobserve(n),this.elementsCache.delete(l))});return}const o=this.elementsCache.get(i.key);o!==n&&(o&&this.observer.unobserve(o),this.observer.observe(n),this.elementsCache.set(i.key,n)),this.resizeItem(s,this.options.measureElement(n,r,this))},this.resizeItem=(n,r)=>{const s=this.getMeasurements()[n];if(!s)return;const i=this.itemSizeCache.get(s.key)??s.size,o=r-i;o!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(s,o,this):s.start<this.getScrollOffset()+this.scrollAdjustments)&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=o,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(s.index),this.itemSizeCache=new Map(this.itemSizeCache.set(s.key,r)),this.notify(!0,!1))},this.measureElement=n=>{n&&this._measureElement(n,void 0)},this.getVirtualItems=zs(()=>[this.getIndexes(),this.getMeasurements()],(n,r)=>{const s=[];for(let i=0,o=n.length;i<o;i++){const a=n[i],l=r[a];s.push(l)}return s},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=n=>{const r=this.getMeasurements();if(r.length!==0)return nl(r[ch(0,r.length-1,s=>nl(r[s]).start,n)])},this.getOffsetForAlignment=(n,r)=>{const s=this.getSize(),i=this.getScrollOffset();r==="auto"&&(n<=i?r="start":n>=i+s?r="end":r="start"),r==="start"?n=n:r==="end"?n=n-s:r==="center"&&(n=n-s/2);const o=this.options.horizontal?"scrollWidth":"scrollHeight",l=(this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[o]:this.scrollElement[o]:0)-s;return Math.max(Math.min(l,n),0)},this.getOffsetForIndex=(n,r="auto")=>{n=Math.max(0,Math.min(n,this.options.count-1));const s=this.getMeasurements()[n];if(!s)return;const i=this.getSize(),o=this.getScrollOffset();if(r==="auto")if(s.end>=o+i-this.options.scrollPaddingEnd)r="end";else if(s.start<=o+this.options.scrollPaddingStart)r="start";else return[o,r];const a=r==="end"?s.end+this.options.scrollPaddingEnd:s.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(a,r),r]},this.isDynamicMode=()=>this.elementsCache.size>0,this.cancelScrollToIndex=()=>{this.scrollToIndexTimeoutId!==null&&this.targetWindow&&(this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(n,{align:r="start",behavior:s}={})=>{this.cancelScrollToIndex(),s==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(n,r),{adjustments:void 0,behavior:s})},this.scrollToIndex=(n,{align:r="auto",behavior:s}={})=>{n=Math.max(0,Math.min(n,this.options.count-1)),this.cancelScrollToIndex(),s==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");const i=this.getOffsetForIndex(n,r);if(!i)return;const[o,a]=i;this._scrollToOffset(o,{adjustments:void 0,behavior:s}),s!=="smooth"&&this.isDynamicMode()&&this.targetWindow&&(this.scrollToIndexTimeoutId=this.targetWindow.setTimeout(()=>{if(this.scrollToIndexTimeoutId=null,this.elementsCache.has(this.options.getItemKey(n))){const[c]=nl(this.getOffsetForIndex(n,a));cb(c,this.getScrollOffset())||this.scrollToIndex(n,{align:a,behavior:s})}else this.scrollToIndex(n,{align:a,behavior:s})}))},this.scrollBy=(n,{behavior:r}={})=>{this.cancelScrollToIndex(),r==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+n,{adjustments:void 0,behavior:r})},this.getTotalSize=()=>{var n;const r=this.getMeasurements();let s;return r.length===0?s=this.options.paddingStart:s=this.options.lanes===1?((n=r[r.length-1])==null?void 0:n.end)??0:Math.max(...r.slice(-this.options.lanes).map(i=>i.end)),s-this.options.scrollMargin+this.options.paddingEnd},this._scrollToOffset=(n,{adjustments:r,behavior:s})=>{this.options.scrollToFn(n,{behavior:s,adjustments:r},this)},this.measure=()=>{var n,r;this.itemSizeCache=new Map,(r=(n=this.options).onChange)==null||r.call(n,this,!1)},this.setOptions(t)}}const ch=(e,t,n,r)=>{for(;e<=t;){const s=(e+t)/2|0,i=n(s);if(i<r)e=s+1;else if(i>r)t=s-1;else return s}return e>0?e-1:0};function yb({measurements:e,outerSize:t,scrollOffset:n}){const r=e.length-1,i=ch(0,r,a=>e[a].start,n);let o=i;for(;o<r&&e[o].end<n+t;)o++;return{startIndex:i,endIndex:o}}const bb=typeof document<"u"?En:Re;function _b(e){const t=Br(()=>({}),{})[1],n={...e,onChange:(s,i)=>{var o;i?fa(t):t(),(o=e.onChange)==null||o.call(e,s,i)}},[r]=Je(()=>new wb(n));return r.setOptions(n),Re(()=>r._didMount(),[]),bb(()=>r._willUpdate()),r}function vb(e){return _b({observeElementRect:hb,observeElementOffset:pb,scrollToFn:$b,...e})}var xb=Object.defineProperty,Cb=(e,t,n)=>t in e?xb(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,rl=(e,t,n)=>(Cb(e,typeof t!="symbol"?t+"":t,n),n);let Sb=class{constructor(){rl(this,"current",this.detect()),rl(this,"handoffState","pending"),rl(this,"currentId",0)}set(t){this.current!==t&&(this.handoffState="pending",this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},gr=new Sb,et=(e,t)=>{gr.isServer?Re(e,t):En(e,t)};function pn(e){let t=he(e);return et(()=>{t.current=e},[e]),t}function sl(e,t){let[n,r]=Je(e),s=pn(e);return et(()=>r(s.current),[s,r,...t]),n}let ce=function(e){let t=pn(e);return Z.useCallback((...n)=>t.current(...n),[t])};function Ab(e,t,n){let[r,s]=Je(n),i=e!==void 0,o=he(i),a=he(!1),l=he(!1);return i&&!o.current&&!a.current?(a.current=!0,o.current=i,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")):!i&&o.current&&!l.current&&(l.current=!0,o.current=i,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")),[i?e:r,ce(c=>(i||s(c),t==null?void 0:t(c)))]}function kb(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function $r(){let e=[],t={addEventListener(n,r,s,i){return n.addEventListener(r,s,i),t.add(()=>n.removeEventListener(r,s,i))},requestAnimationFrame(...n){let r=requestAnimationFrame(...n);return t.add(()=>cancelAnimationFrame(r))},nextFrame(...n){return t.requestAnimationFrame(()=>t.requestAnimationFrame(...n))},setTimeout(...n){let r=setTimeout(...n);return t.add(()=>clearTimeout(r))},microTask(...n){let r={current:!0};return kb(()=>{r.current&&n[0]()}),t.add(()=>{r.current=!1})},style(n,r,s){let i=n.style.getPropertyValue(r);return Object.assign(n.style,{[r]:s}),this.add(()=>{Object.assign(n.style,{[r]:i})})},group(n){let r=$r();return n(r),this.add(()=>r.dispose())},add(n){return e.push(n),()=>{let r=e.indexOf(n);if(r>=0)for(let s of e.splice(r,1))s()}},dispose(){for(let n of e.splice(0))n()}};return t}function Hs(){let[e]=Je($r);return Re(()=>()=>e.dispose(),[e]),e}function Eb(){let e=typeof document>"u";return"useSyncExternalStore"in ya?(t=>t.useSyncExternalStore)(ya)(()=>()=>{},()=>!1,()=>!e):!1}function il(){let e=Eb(),[t,n]=Je(gr.isHandoffComplete);return t&&gr.isHandoffComplete===!1&&n(!1),Re(()=>{t!==!0&&n(!0)},[t]),Re(()=>gr.handoff(),[]),e?!1:t}var uh;let Ws=(uh=Z.useId)!=null?uh:function(){let e=il(),[t,n]=Z.useState(e?()=>gr.nextId():null);return et(()=>{t===null&&n(gr.nextId())},[t]),t!=null?""+t:void 0};function ht(e,t,...n){if(e in t){let s=t[e];return typeof s=="function"?s(...n):s}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(s=>`"${s}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,ht),r}function ol(e){return gr.isServer?null:e instanceof Node?e.ownerDocument:e!=null&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}let dh=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var Ib=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e))(Ib||{}),Nb=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(Nb||{}),Tb=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(Tb||{}),fh=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(fh||{});function Rb(e,t=0){var n;return e===((n=ol(e))==null?void 0:n.body)?!1:ht(t,{0(){return e.matches(dh)},1(){let r=e;for(;r!==null;){if(r.matches(dh))return!0;r=r.parentElement}return!1}})}var Mb=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(Mb||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function Pb(e,t=n=>n){return e.slice().sort((n,r)=>{let s=t(n),i=t(r);if(s===null||i===null)return 0;let o=s.compareDocumentPosition(i);return o&Node.DOCUMENT_POSITION_FOLLOWING?-1:o&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function Ob(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function Db(){return/Android/gi.test(window.navigator.userAgent)}function hh(){return Ob()||Db()}function Wi(e,t,n){let r=pn(t);Re(()=>{function s(i){r.current(i)}return document.addEventListener(e,s,n),()=>document.removeEventListener(e,s,n)},[e,n])}function Fb(e,t,n){let r=pn(t);Re(()=>{function s(i){r.current(i)}return window.addEventListener(e,s,n),()=>window.removeEventListener(e,s,n)},[e,n])}function Vb(e,t,n=!0){let r=he(!1);Re(()=>{requestAnimationFrame(()=>{r.current=n})},[n]);function s(o,a){if(!r.current||o.defaultPrevented)return;let l=a(o);if(l===null||!l.getRootNode().contains(l)||!l.isConnected)return;let c=function d(u){return typeof u=="function"?d(u()):Array.isArray(u)||u instanceof Set?u:[u]}(e);for(let d of c){if(d===null)continue;let u=d instanceof HTMLElement?d:d.current;if(u!=null&&u.contains(l)||o.composed&&o.composedPath().includes(u))return}return!Rb(l,fh.Loose)&&l.tabIndex!==-1&&o.preventDefault(),t(o,l)}let i=he(null);Wi("pointerdown",o=>{var a,l;r.current&&(i.current=((l=(a=o.composedPath)==null?void 0:a.call(o))==null?void 0:l[0])||o.target)},!0),Wi("mousedown",o=>{var a,l;r.current&&(i.current=((l=(a=o.composedPath)==null?void 0:a.call(o))==null?void 0:l[0])||o.target)},!0),Wi("click",o=>{hh()||i.current&&(s(o,()=>i.current),i.current=null)},!0),Wi("touchend",o=>s(o,()=>o.target instanceof HTMLElement?o.target:null),!0),Fb("blur",o=>s(o,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function Lb(...e){return dt(()=>ol(...e),[...e])}function mh(e){var t;if(e.type)return e.type;let n=(t=e.as)!=null?t:"button";if(typeof n=="string"&&n.toLowerCase()==="button")return"button"}function Bb(e,t){let[n,r]=Je(()=>mh(e));return et(()=>{r(mh(e))},[e.type,e.as]),et(()=>{n||t.current&&t.current instanceof HTMLButtonElement&&!t.current.hasAttribute("type")&&r("button")},[n,t]),n}let Ub=Symbol();function wr(...e){let t=he(e);Re(()=>{t.current=e},[e]);let n=ce(r=>{for(let s of t.current)s!=null&&(typeof s=="function"?s(r):s.current=r)});return e.every(r=>r==null||(r==null?void 0:r[Ub]))?void 0:n}function ph(e){return[e.screenX,e.screenY]}function jb(){let e=he([-1,-1]);return{wasMoved(t){let n=ph(t);return e.current[0]===n[0]&&e.current[1]===n[1]?!1:(e.current=n,!0)},update(t){e.current=ph(t)}}}function zb({container:e,accept:t,walk:n,enabled:r=!0}){let s=he(t),i=he(n);Re(()=>{s.current=t,i.current=n},[t,n]),et(()=>{if(!e||!r)return;let o=ol(e);if(!o)return;let a=s.current,l=i.current,c=Object.assign(u=>a(u),{acceptNode:a}),d=o.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,c,!1);for(;d.nextNode();)l(d.currentNode)},[e,r,s,i])}function gh(e,t){let n=he([]),r=ce(e);Re(()=>{let s=[...n.current];for(let[i,o]of t.entries())if(n.current[i]!==o){let a=r(t,s);return n.current=t,a}},[r,...t])}function Gi(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}var qi=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(qi||{}),Zn=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(Zn||{});function Pn({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:s,visible:i=!0,name:o,mergeRefs:a}){a=a??Hb;let l=$h(t,e);if(i)return Ki(l,n,r,o,a);let c=s??0;if(c&2){let{static:d=!1,...u}=l;if(d)return Ki(u,n,r,o,a)}if(c&1){let{unmount:d=!0,...u}=l;return ht(d?0:1,{0(){return null},1(){return Ki({...u,hidden:!0,style:{display:"none"}},n,r,o,a)}})}return Ki(l,n,r,o,a)}function Ki(e,t={},n,r,s){let{as:i=n,children:o,refName:a="ref",...l}=ll(e,["unmount","static"]),c=e.ref!==void 0?{[a]:e.ref}:{},d=typeof o=="function"?o(t):o;"className"in l&&l.className&&typeof l.className=="function"&&(l.className=l.className(t));let u={};if(t){let m=!1,h=[];for(let[p,g]of Object.entries(t))typeof g=="boolean"&&(m=!0),g===!0&&h.push(p);m&&(u["data-headlessui-state"]=h.join(" "))}if(i===ve&&Object.keys(al(l)).length>0){if(!jr(d)||Array.isArray(d)&&d.length>1)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(l).map(g=>` - ${g}`).join(`
49
- `),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(g=>` - ${g}`).join(`
48
+ color: hsl(${Math.max(0,Math.min(120-120*$,120))}deg 100% 31%);`,n==null?void 0:n.key)}return(l=n==null?void 0:n.onChange)==null||l.call(n,s),s}}function rl(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const mb=(e,t)=>Math.abs(e-t)<1,pb=(e,t,n)=>{let r;return function(...s){e.clearTimeout(r),r=e.setTimeout(()=>t.apply(this,s),n)}},gb=e=>e,$b=e=>{const t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1),r=[];for(let s=t;s<=n;s++)r.push(s);return r},wb=(e,t)=>{const n=e.scrollElement;if(!n)return;const r=e.targetWindow;if(!r)return;const s=o=>{const{width:a,height:l}=o;t({width:Math.round(a),height:Math.round(l)})};if(s(n.getBoundingClientRect()),!r.ResizeObserver)return()=>{};const i=new r.ResizeObserver(o=>{const a=o[0];if(a!=null&&a.borderBoxSize){const l=a.borderBoxSize[0];if(l){s({width:l.inlineSize,height:l.blockSize});return}}s(n.getBoundingClientRect())});return i.observe(n,{box:"border-box"}),()=>{i.unobserve(n)}},ch={passive:!0},yb=typeof window>"u"?!0:"onscrollend"in window,bb=(e,t)=>{const n=e.scrollElement;if(!n)return;const r=e.targetWindow;if(!r)return;let s=0;const i=yb?()=>{}:pb(r,()=>{t(s,!1)},e.options.isScrollingResetDelay),o=c=>()=>{s=n[e.options.horizontal?"scrollLeft":"scrollTop"],i(),t(s,c)},a=o(!0),l=o(!1);return l(),n.addEventListener("scroll",a,ch),n.addEventListener("scrollend",l,ch),()=>{n.removeEventListener("scroll",a),n.removeEventListener("scrollend",l)}},_b=(e,t,n)=>{if(t!=null&&t.borderBoxSize){const r=t.borderBoxSize[0];if(r)return Math.round(r[n.options.horizontal?"inlineSize":"blockSize"])}return Math.round(e.getBoundingClientRect()[n.options.horizontal?"width":"height"])},vb=(e,{adjustments:t=0,behavior:n},r)=>{var s,i;const o=e+t;(i=(s=r.scrollElement)==null?void 0:s.scrollTo)==null||i.call(s,{[r.options.horizontal?"left":"top"]:o,behavior:n})};class xb{constructor(t){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let n=null;const r=()=>n||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:n=new this.targetWindow.ResizeObserver(s=>{s.forEach(i=>{this._measureElement(i.target,i)})}));return{disconnect:()=>{var s;return(s=r())==null?void 0:s.disconnect()},observe:s=>{var i;return(i=r())==null?void 0:i.observe(s,{box:"border-box"})},unobserve:s=>{var i;return(i=r())==null?void 0:i.unobserve(s)}}})(),this.range=null,this.setOptions=n=>{Object.entries(n).forEach(([r,s])=>{typeof s>"u"&&delete n[r]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:gb,rangeExtractor:$b,onChange:()=>{},measureElement:_b,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,...n}},this.notify=(n,r)=>{var s,i;const{startIndex:o,endIndex:a}=this.range??{startIndex:void 0,endIndex:void 0},l=this.calculateRange();(n||o!==(l==null?void 0:l.startIndex)||a!==(l==null?void 0:l.endIndex))&&((i=(s=this.options).onChange)==null||i.call(s,this,r))},this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(n=>n()),this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.observer.disconnect(),this.elementsCache.clear()},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var n;const r=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==r){if(this.cleanup(),!r){this.notify(!1,!1);return}this.scrollElement=r,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((n=this.scrollElement)==null?void 0:n.window)??null,this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,s=>{this.scrollRect=s,this.notify(!1,!1)})),this.unsubs.push(this.options.observeElementOffset(this,(s,i)=>{this.scrollAdjustments=0,this.scrollDirection=i?this.getScrollOffset()<s?"forward":"backward":null,this.scrollOffset=s;const o=this.isScrolling;this.isScrolling=i,this.notify(o!==i,i)}))}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(n,r)=>{const s=new Map,i=new Map;for(let o=r-1;o>=0;o--){const a=n[o];if(s.has(a.lane))continue;const l=i.get(a.lane);if(l==null||a.end>l.end?i.set(a.lane,a):a.end<l.end&&s.set(a.lane,!0),s.size===this.options.lanes)break}return i.size===this.options.lanes?Array.from(i.values()).sort((o,a)=>o.end===a.end?o.index-a.index:o.end-a.end)[0]:void 0},this.getMeasurementOptions=zs(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(n,r,s,i,o)=>(this.pendingMeasuredCacheIndexes=[],{count:n,paddingStart:r,scrollMargin:s,getItemKey:i,enabled:o}),{key:!1}),this.getMeasurements=zs(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:n,paddingStart:r,scrollMargin:s,getItemKey:i,enabled:o},a)=>{var l;if(!o)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(u=>{this.itemSizeCache.set(u.key,u.size)}));const c=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const d=this.measurementsCache.slice(0,c);for(let u=c;u<n;u++){let m=(l=this.measurementsCache[u])==null?void 0:l.measureElement;m||(m=O=>{const L=i(u),X=this.elementsCache.get(L);if(!O){X&&(this.observer.unobserve(X),this.elementsCache.delete(L));return}X!==O&&(X&&this.observer.unobserve(X),this.observer.observe(O),this.elementsCache.set(L,O)),O.isConnected&&this.resizeItem(u,this.options.measureElement(O,void 0,this))});const h=i(u),p=this.options.lanes===1?d[u-1]:this.getFurthestMeasurement(d,u),$=p?p.end+this.options.gap:r+s,w=a.get(h),C=typeof w=="number"?w:this.options.estimateSize(u),x=$+C,E=p?p.lane:u%this.options.lanes;d[u]={index:u,start:$,size:C,end:x,key:h,lane:E,measureElement:m}}return this.measurementsCache=d,d},{key:!1,debug:()=>this.options.debug}),this.calculateRange=zs(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset()],(n,r,s)=>this.range=n.length>0&&r>0?Cb({measurements:n,outerSize:r,scrollOffset:s}):null,{key:!1,debug:()=>this.options.debug}),this.getIndexes=zs(()=>[this.options.rangeExtractor,this.calculateRange(),this.options.overscan,this.options.count],(n,r,s,i)=>r===null?[]:n({startIndex:r.startIndex,endIndex:r.endIndex,overscan:s,count:i}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=n=>{const r=this.options.indexAttribute,s=n.getAttribute(r);return s?parseInt(s,10):(console.warn(`Missing attribute name '${r}={index}' on measured element.`),-1)},this._measureElement=(n,r)=>{const s=this.indexFromElement(n),i=this.getMeasurements()[s];if(!i||!n.isConnected){this.elementsCache.forEach((a,l)=>{a===n&&(this.observer.unobserve(n),this.elementsCache.delete(l))});return}const o=this.elementsCache.get(i.key);o!==n&&(o&&this.observer.unobserve(o),this.observer.observe(n),this.elementsCache.set(i.key,n)),this.resizeItem(s,this.options.measureElement(n,r,this))},this.resizeItem=(n,r)=>{const s=this.getMeasurements()[n];if(!s)return;const i=this.itemSizeCache.get(s.key)??s.size,o=r-i;o!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(s,o,this):s.start<this.getScrollOffset()+this.scrollAdjustments)&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=o,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(s.index),this.itemSizeCache=new Map(this.itemSizeCache.set(s.key,r)),this.notify(!0,!1))},this.measureElement=n=>{n&&this._measureElement(n,void 0)},this.getVirtualItems=zs(()=>[this.getIndexes(),this.getMeasurements()],(n,r)=>{const s=[];for(let i=0,o=n.length;i<o;i++){const a=n[i],l=r[a];s.push(l)}return s},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=n=>{const r=this.getMeasurements();if(r.length!==0)return rl(r[uh(0,r.length-1,s=>rl(r[s]).start,n)])},this.getOffsetForAlignment=(n,r)=>{const s=this.getSize(),i=this.getScrollOffset();r==="auto"&&(n<=i?r="start":n>=i+s?r="end":r="start"),r==="start"?n=n:r==="end"?n=n-s:r==="center"&&(n=n-s/2);const o=this.options.horizontal?"scrollWidth":"scrollHeight",l=(this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[o]:this.scrollElement[o]:0)-s;return Math.max(Math.min(l,n),0)},this.getOffsetForIndex=(n,r="auto")=>{n=Math.max(0,Math.min(n,this.options.count-1));const s=this.getMeasurements()[n];if(!s)return;const i=this.getSize(),o=this.getScrollOffset();if(r==="auto")if(s.end>=o+i-this.options.scrollPaddingEnd)r="end";else if(s.start<=o+this.options.scrollPaddingStart)r="start";else return[o,r];const a=r==="end"?s.end+this.options.scrollPaddingEnd:s.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(a,r),r]},this.isDynamicMode=()=>this.elementsCache.size>0,this.cancelScrollToIndex=()=>{this.scrollToIndexTimeoutId!==null&&this.targetWindow&&(this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(n,{align:r="start",behavior:s}={})=>{this.cancelScrollToIndex(),s==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(n,r),{adjustments:void 0,behavior:s})},this.scrollToIndex=(n,{align:r="auto",behavior:s}={})=>{n=Math.max(0,Math.min(n,this.options.count-1)),this.cancelScrollToIndex(),s==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");const i=this.getOffsetForIndex(n,r);if(!i)return;const[o,a]=i;this._scrollToOffset(o,{adjustments:void 0,behavior:s}),s!=="smooth"&&this.isDynamicMode()&&this.targetWindow&&(this.scrollToIndexTimeoutId=this.targetWindow.setTimeout(()=>{if(this.scrollToIndexTimeoutId=null,this.elementsCache.has(this.options.getItemKey(n))){const[c]=rl(this.getOffsetForIndex(n,a));mb(c,this.getScrollOffset())||this.scrollToIndex(n,{align:a,behavior:s})}else this.scrollToIndex(n,{align:a,behavior:s})}))},this.scrollBy=(n,{behavior:r}={})=>{this.cancelScrollToIndex(),r==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+n,{adjustments:void 0,behavior:r})},this.getTotalSize=()=>{var n;const r=this.getMeasurements();let s;return r.length===0?s=this.options.paddingStart:s=this.options.lanes===1?((n=r[r.length-1])==null?void 0:n.end)??0:Math.max(...r.slice(-this.options.lanes).map(i=>i.end)),s-this.options.scrollMargin+this.options.paddingEnd},this._scrollToOffset=(n,{adjustments:r,behavior:s})=>{this.options.scrollToFn(n,{behavior:s,adjustments:r},this)},this.measure=()=>{var n,r;this.itemSizeCache=new Map,(r=(n=this.options).onChange)==null||r.call(n,this,!1)},this.setOptions(t)}}const uh=(e,t,n,r)=>{for(;e<=t;){const s=(e+t)/2|0,i=n(s);if(i<r)e=s+1;else if(i>r)t=s-1;else return s}return e>0?e-1:0};function Cb({measurements:e,outerSize:t,scrollOffset:n}){const r=e.length-1,i=uh(0,r,a=>e[a].start,n);let o=i;for(;o<r&&e[o].end<n+t;)o++;return{startIndex:i,endIndex:o}}const Sb=typeof document<"u"?En:Me;function Ab(e){const t=Ur(()=>({}),{})[1],n={...e,onChange:(s,i)=>{var o;i?ha(t):t(),(o=e.onChange)==null||o.call(e,s,i)}},[r]=Je(()=>new xb(n));return r.setOptions(n),Me(()=>r._didMount(),[]),Sb(()=>r._willUpdate()),r}function kb(e){return Ab({observeElementRect:wb,observeElementOffset:bb,scrollToFn:vb,...e})}var Eb=Object.defineProperty,Ib=(e,t,n)=>t in e?Eb(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,sl=(e,t,n)=>(Ib(e,typeof t!="symbol"?t+"":t,n),n);let Nb=class{constructor(){sl(this,"current",this.detect()),sl(this,"handoffState","pending"),sl(this,"currentId",0)}set(t){this.current!==t&&(this.handoffState="pending",this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},$r=new Nb,et=(e,t)=>{$r.isServer?Me(e,t):En(e,t)};function pn(e){let t=he(e);return et(()=>{t.current=e},[e]),t}function il(e,t){let[n,r]=Je(e),s=pn(e);return et(()=>r(s.current),[s,r,...t]),n}let ce=function(e){let t=pn(e);return Z.useCallback((...n)=>t.current(...n),[t])};function Tb(e,t,n){let[r,s]=Je(n),i=e!==void 0,o=he(i),a=he(!1),l=he(!1);return i&&!o.current&&!a.current?(a.current=!0,o.current=i,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")):!i&&o.current&&!l.current&&(l.current=!0,o.current=i,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")),[i?e:r,ce(c=>(i||s(c),t==null?void 0:t(c)))]}function Mb(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function wr(){let e=[],t={addEventListener(n,r,s,i){return n.addEventListener(r,s,i),t.add(()=>n.removeEventListener(r,s,i))},requestAnimationFrame(...n){let r=requestAnimationFrame(...n);return t.add(()=>cancelAnimationFrame(r))},nextFrame(...n){return t.requestAnimationFrame(()=>t.requestAnimationFrame(...n))},setTimeout(...n){let r=setTimeout(...n);return t.add(()=>clearTimeout(r))},microTask(...n){let r={current:!0};return Mb(()=>{r.current&&n[0]()}),t.add(()=>{r.current=!1})},style(n,r,s){let i=n.style.getPropertyValue(r);return Object.assign(n.style,{[r]:s}),this.add(()=>{Object.assign(n.style,{[r]:i})})},group(n){let r=wr();return n(r),this.add(()=>r.dispose())},add(n){return e.push(n),()=>{let r=e.indexOf(n);if(r>=0)for(let s of e.splice(r,1))s()}},dispose(){for(let n of e.splice(0))n()}};return t}function Hs(){let[e]=Je(wr);return Me(()=>()=>e.dispose(),[e]),e}function Rb(){let e=typeof document>"u";return"useSyncExternalStore"in ba?(t=>t.useSyncExternalStore)(ba)(()=>()=>{},()=>!1,()=>!e):!1}function ol(){let e=Rb(),[t,n]=Je($r.isHandoffComplete);return t&&$r.isHandoffComplete===!1&&n(!1),Me(()=>{t!==!0&&n(!0)},[t]),Me(()=>$r.handoff(),[]),e?!1:t}var dh;let Ws=(dh=Z.useId)!=null?dh:function(){let e=ol(),[t,n]=Z.useState(e?()=>$r.nextId():null);return et(()=>{t===null&&n($r.nextId())},[t]),t!=null?""+t:void 0};function pt(e,t,...n){if(e in t){let s=t[e];return typeof s=="function"?s(...n):s}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(s=>`"${s}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,pt),r}function al(e){return $r.isServer?null:e instanceof Node?e.ownerDocument:e!=null&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}let fh=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var Pb=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e))(Pb||{}),Db=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(Db||{}),Ob=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(Ob||{}),hh=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(hh||{});function Fb(e,t=0){var n;return e===((n=al(e))==null?void 0:n.body)?!1:pt(t,{0(){return e.matches(fh)},1(){let r=e;for(;r!==null;){if(r.matches(fh))return!0;r=r.parentElement}return!1}})}var Vb=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(Vb||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function Lb(e,t=n=>n){return e.slice().sort((n,r)=>{let s=t(n),i=t(r);if(s===null||i===null)return 0;let o=s.compareDocumentPosition(i);return o&Node.DOCUMENT_POSITION_FOLLOWING?-1:o&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function Bb(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function Ub(){return/Android/gi.test(window.navigator.userAgent)}function mh(){return Bb()||Ub()}function Gi(e,t,n){let r=pn(t);Me(()=>{function s(i){r.current(i)}return document.addEventListener(e,s,n),()=>document.removeEventListener(e,s,n)},[e,n])}function jb(e,t,n){let r=pn(t);Me(()=>{function s(i){r.current(i)}return window.addEventListener(e,s,n),()=>window.removeEventListener(e,s,n)},[e,n])}function zb(e,t,n=!0){let r=he(!1);Me(()=>{requestAnimationFrame(()=>{r.current=n})},[n]);function s(o,a){if(!r.current||o.defaultPrevented)return;let l=a(o);if(l===null||!l.getRootNode().contains(l)||!l.isConnected)return;let c=function d(u){return typeof u=="function"?d(u()):Array.isArray(u)||u instanceof Set?u:[u]}(e);for(let d of c){if(d===null)continue;let u=d instanceof HTMLElement?d:d.current;if(u!=null&&u.contains(l)||o.composed&&o.composedPath().includes(u))return}return!Fb(l,hh.Loose)&&l.tabIndex!==-1&&o.preventDefault(),t(o,l)}let i=he(null);Gi("pointerdown",o=>{var a,l;r.current&&(i.current=((l=(a=o.composedPath)==null?void 0:a.call(o))==null?void 0:l[0])||o.target)},!0),Gi("mousedown",o=>{var a,l;r.current&&(i.current=((l=(a=o.composedPath)==null?void 0:a.call(o))==null?void 0:l[0])||o.target)},!0),Gi("click",o=>{mh()||i.current&&(s(o,()=>i.current),i.current=null)},!0),Gi("touchend",o=>s(o,()=>o.target instanceof HTMLElement?o.target:null),!0),jb("blur",o=>s(o,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function Hb(...e){return ft(()=>al(...e),[...e])}function ph(e){var t;if(e.type)return e.type;let n=(t=e.as)!=null?t:"button";if(typeof n=="string"&&n.toLowerCase()==="button")return"button"}function Wb(e,t){let[n,r]=Je(()=>ph(e));return et(()=>{r(ph(e))},[e.type,e.as]),et(()=>{n||t.current&&t.current instanceof HTMLButtonElement&&!t.current.hasAttribute("type")&&r("button")},[n,t]),n}let Gb=Symbol();function yr(...e){let t=he(e);Me(()=>{t.current=e},[e]);let n=ce(r=>{for(let s of t.current)s!=null&&(typeof s=="function"?s(r):s.current=r)});return e.every(r=>r==null||(r==null?void 0:r[Gb]))?void 0:n}function gh(e){return[e.screenX,e.screenY]}function qb(){let e=he([-1,-1]);return{wasMoved(t){let n=gh(t);return e.current[0]===n[0]&&e.current[1]===n[1]?!1:(e.current=n,!0)},update(t){e.current=gh(t)}}}function Kb({container:e,accept:t,walk:n,enabled:r=!0}){let s=he(t),i=he(n);Me(()=>{s.current=t,i.current=n},[t,n]),et(()=>{if(!e||!r)return;let o=al(e);if(!o)return;let a=s.current,l=i.current,c=Object.assign(u=>a(u),{acceptNode:a}),d=o.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,c,!1);for(;d.nextNode();)l(d.currentNode)},[e,r,s,i])}function $h(e,t){let n=he([]),r=ce(e);Me(()=>{let s=[...n.current];for(let[i,o]of t.entries())if(n.current[i]!==o){let a=r(t,s);return n.current=t,a}},[r,...t])}function qi(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}var Ki=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(Ki||{}),Zn=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(Zn||{});function Pn({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:s,visible:i=!0,name:o,mergeRefs:a}){a=a??Zb;let l=wh(t,e);if(i)return Zi(l,n,r,o,a);let c=s??0;if(c&2){let{static:d=!1,...u}=l;if(d)return Zi(u,n,r,o,a)}if(c&1){let{unmount:d=!0,...u}=l;return pt(d?0:1,{0(){return null},1(){return Zi({...u,hidden:!0,style:{display:"none"}},n,r,o,a)}})}return Zi(l,n,r,o,a)}function Zi(e,t={},n,r,s){let{as:i=n,children:o,refName:a="ref",...l}=cl(e,["unmount","static"]),c=e.ref!==void 0?{[a]:e.ref}:{},d=typeof o=="function"?o(t):o;"className"in l&&l.className&&typeof l.className=="function"&&(l.className=l.className(t));let u={};if(t){let m=!1,h=[];for(let[p,$]of Object.entries(t))typeof $=="boolean"&&(m=!0),$===!0&&h.push(p);m&&(u["data-headlessui-state"]=h.join(" "))}if(i===ve&&Object.keys(ll(l)).length>0){if(!zr(d)||Array.isArray(d)&&d.length>1)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(l).map($=>` - ${$}`).join(`
49
+ `),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map($=>` - ${$}`).join(`
50
50
  `)].join(`
51
- `));let m=d.props,h=typeof(m==null?void 0:m.className)=="function"?(...g)=>Gi(m==null?void 0:m.className(...g),l.className):Gi(m==null?void 0:m.className,l.className),p=h?{className:h}:{};return da(d,Object.assign({},$h(d.props,al(ll(l,["ref"]))),u,c,{ref:s(d.ref,c.ref)},p))}return f(i,Object.assign({},ll(l,["ref"]),i!==ve&&c,i!==ve&&u),d)}function Hb(...e){return e.every(t=>t==null)?void 0:t=>{for(let n of e)n!=null&&(typeof n=="function"?n(t):n.current=t)}}function $h(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let s in r)s.startsWith("on")&&typeof r[s]=="function"?(n[s]!=null||(n[s]=[]),n[s].push(r[s])):t[s]=r[s];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(n).map(r=>[r,void 0])));for(let r in n)Object.assign(t,{[r](s,...i){let o=n[r];for(let a of o){if((s instanceof Event||(s==null?void 0:s.nativeEvent)instanceof Event)&&s.defaultPrevented)return;a(s,...i)}}});return t}function gn(e){var t;return Object.assign(Hn(e),{displayName:(t=e.displayName)!=null?t:e.name})}function al(e){let t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}function ll(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}let Wb="div";var wh=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(wh||{});function Gb(e,t){var n;let{features:r=1,...s}=e,i={ref:t,"aria-hidden":(r&2)===2?!0:(n=s["aria-hidden"])!=null?n:void 0,hidden:(r&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(r&4)===4&&(r&2)!==2&&{display:"none"}}};return Pn({ourProps:i,theirProps:s,slot:{},defaultTag:Wb,name:"Hidden"})}let qb=gn(Gb),cl=jn(null);cl.displayName="OpenClosedContext";var Ft=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(Ft||{});function ul(){return fn(cl)}function yh({value:e,children:t}){return Z.createElement(cl.Provider,{value:e},t)}function Kb(e){function t(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",t))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",t),t())}let yr=[];Kb(()=>{function e(t){t.target instanceof HTMLElement&&t.target!==document.body&&yr[0]!==t.target&&(yr.unshift(t.target),yr=yr.filter(n=>n!=null&&n.isConnected),yr.splice(10))}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})});function Zb(e){let t=e.parentElement,n=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(n=t),t=t.parentElement;let r=(t==null?void 0:t.getAttribute("disabled"))==="";return r&&Jb(n)?!1:r}function Jb(e){if(!e)return!1;let t=e.previousElementSibling;for(;t!==null;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}function Yb(e){throw new Error("Unexpected object: "+e)}var tt=(e=>(e[e.First=0]="First",e[e.Previous=1]="Previous",e[e.Next=2]="Next",e[e.Last=3]="Last",e[e.Specific=4]="Specific",e[e.Nothing=5]="Nothing",e))(tt||{});function bh(e,t){let n=t.resolveItems();if(n.length<=0)return null;let r=t.resolveActiveIndex(),s=r??-1;switch(e.focus){case 0:{for(let i=0;i<n.length;++i)if(!t.resolveDisabled(n[i],i,n))return i;return r}case 1:{for(let i=s-1;i>=0;--i)if(!t.resolveDisabled(n[i],i,n))return i;return r}case 2:{for(let i=s+1;i<n.length;++i)if(!t.resolveDisabled(n[i],i,n))return i;return r}case 3:{for(let i=n.length-1;i>=0;--i)if(!t.resolveDisabled(n[i],i,n))return i;return r}case 4:{for(let i=0;i<n.length;++i)if(t.resolveId(n[i],i,n)===e.id)return i;return r}case 5:return null;default:Yb(e)}}function _h(e={},t=null,n=[]){for(let[r,s]of Object.entries(e))xh(n,vh(t,r),s);return n}function vh(e,t){return e?e+"["+t+"]":t}function xh(e,t,n){if(Array.isArray(n))for(let[r,s]of n.entries())xh(e,vh(t,r.toString()),s);else n instanceof Date?e.push([t,n.toISOString()]):typeof n=="boolean"?e.push([t,n?"1":"0"]):typeof n=="string"?e.push([t,n]):typeof n=="number"?e.push([t,`${n}`]):n==null?e.push([t,""]):_h(n,t,e)}var Vt=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(Vt||{}),Xb={},Qb=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Qb||{}),e_=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(e_||{}),t_=(e=>(e[e.Pointer=0]="Pointer",e[e.Focus=1]="Focus",e[e.Other=2]="Other",e))(t_||{}),n_=(e=>(e[e.OpenCombobox=0]="OpenCombobox",e[e.CloseCombobox=1]="CloseCombobox",e[e.GoToOption=2]="GoToOption",e[e.RegisterOption=3]="RegisterOption",e[e.UnregisterOption=4]="UnregisterOption",e[e.RegisterLabel=5]="RegisterLabel",e[e.SetActivationTrigger=6]="SetActivationTrigger",e[e.UpdateVirtualOptions=7]="UpdateVirtualOptions",e))(n_||{});function dl(e,t=n=>n){let n=e.activeOptionIndex!==null?e.options[e.activeOptionIndex]:null,r=t(e.options.slice()),s=r.length>0&&r[0].dataRef.current.order!==null?r.sort((o,a)=>o.dataRef.current.order-a.dataRef.current.order):Pb(r,o=>o.dataRef.current.domRef.current),i=n?s.indexOf(n):null;return i===-1&&(i=null),{options:s,activeOptionIndex:i}}let r_={1(e){var t;return(t=e.dataRef.current)!=null&&t.disabled||e.comboboxState===1?e:{...e,activeOptionIndex:null,comboboxState:1}},0(e){var t,n;if((t=e.dataRef.current)!=null&&t.disabled||e.comboboxState===0)return e;if((n=e.dataRef.current)!=null&&n.value){let r=e.dataRef.current.calculateIndex(e.dataRef.current.value);if(r!==-1)return{...e,activeOptionIndex:r,comboboxState:0}}return{...e,comboboxState:0}},2(e,t){var n,r,s,i,o;if((n=e.dataRef.current)!=null&&n.disabled||(r=e.dataRef.current)!=null&&r.optionsRef.current&&!((s=e.dataRef.current)!=null&&s.optionsPropsRef.current.static)&&e.comboboxState===1)return e;if(e.virtual){let d=t.focus===tt.Specific?t.idx:bh(t,{resolveItems:()=>e.virtual.options,resolveActiveIndex:()=>{var m,h;return(h=(m=e.activeOptionIndex)!=null?m:e.virtual.options.findIndex(p=>!e.virtual.disabled(p)))!=null?h:null},resolveDisabled:e.virtual.disabled,resolveId(){throw new Error("Function not implemented.")}}),u=(i=t.trigger)!=null?i:2;return e.activeOptionIndex===d&&e.activationTrigger===u?e:{...e,activeOptionIndex:d,activationTrigger:u}}let a=dl(e);if(a.activeOptionIndex===null){let d=a.options.findIndex(u=>!u.dataRef.current.disabled);d!==-1&&(a.activeOptionIndex=d)}let l=t.focus===tt.Specific?t.idx:bh(t,{resolveItems:()=>a.options,resolveActiveIndex:()=>a.activeOptionIndex,resolveId:d=>d.id,resolveDisabled:d=>d.dataRef.current.disabled}),c=(o=t.trigger)!=null?o:2;return e.activeOptionIndex===l&&e.activationTrigger===c?e:{...e,...a,activeOptionIndex:l,activationTrigger:c}},3:(e,t)=>{var n,r,s;if((n=e.dataRef.current)!=null&&n.virtual)return{...e,options:[...e.options,t.payload]};let i=t.payload,o=dl(e,l=>(l.push(i),l));e.activeOptionIndex===null&&(r=e.dataRef.current)!=null&&r.isSelected(t.payload.dataRef.current.value)&&(o.activeOptionIndex=o.options.indexOf(i));let a={...e,...o,activationTrigger:2};return(s=e.dataRef.current)!=null&&s.__demoMode&&e.dataRef.current.value===void 0&&(a.activeOptionIndex=0),a},4:(e,t)=>{var n;if((n=e.dataRef.current)!=null&&n.virtual)return{...e,options:e.options.filter(s=>s.id!==t.id)};let r=dl(e,s=>{let i=s.findIndex(o=>o.id===t.id);return i!==-1&&s.splice(i,1),s});return{...e,...r,activationTrigger:2}},5:(e,t)=>e.labelId===t.id?e:{...e,labelId:t.id},6:(e,t)=>e.activationTrigger===t.trigger?e:{...e,activationTrigger:t.trigger},7:(e,t)=>{var n;if(((n=e.virtual)==null?void 0:n.options)===t.options)return e;let r=e.activeOptionIndex;if(e.activeOptionIndex!==null){let s=t.options.indexOf(e.virtual.options[e.activeOptionIndex]);s!==-1?r=s:r=null}return{...e,activeOptionIndex:r,virtual:Object.assign({},e.virtual,{options:t.options})}}},fl=jn(null);fl.displayName="ComboboxActionsContext";function Gs(e){let t=fn(fl);if(t===null){let n=new Error(`<${e} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Gs),n}return t}let Ch=jn(null);function s_(e){var t;let n=br("VirtualProvider"),[r,s]=dt(()=>{let l=n.optionsRef.current;if(!l)return[0,0];let c=window.getComputedStyle(l);return[parseFloat(c.paddingBlockStart||c.paddingTop),parseFloat(c.paddingBlockEnd||c.paddingBottom)]},[n.optionsRef.current]),i=vb({scrollPaddingStart:r,scrollPaddingEnd:s,count:n.virtual.options.length,estimateSize(){return 40},getScrollElement(){var l;return(l=n.optionsRef.current)!=null?l:null},overscan:12}),[o,a]=Je(0);return et(()=>{a(l=>l+1)},[(t=n.virtual)==null?void 0:t.options]),Z.createElement(Ch.Provider,{value:i},Z.createElement("div",{style:{position:"relative",width:"100%",height:`${i.getTotalSize()}px`},ref:l=>{if(l){if(typeof process<"u"&&Xb.JEST_WORKER_ID!==void 0||n.activationTrigger===0)return;n.activeOptionIndex!==null&&n.virtual.options.length>n.activeOptionIndex&&i.scrollToIndex(n.activeOptionIndex)}}},i.getVirtualItems().map(l=>{var c;return Z.createElement(ve,{key:l.key},Z.cloneElement((c=e.children)==null?void 0:c.call(e,{option:n.virtual.options[l.index],open:n.comboboxState===0}),{key:`${o}-${l.key}`,"data-index":l.index,"aria-setsize":n.virtual.options.length,"aria-posinset":l.index+1,style:{position:"absolute",top:0,left:0,transform:`translateY(${l.start}px)`,overflowAnchor:"none"}}))})))}let hl=jn(null);hl.displayName="ComboboxDataContext";function br(e){let t=fn(hl);if(t===null){let n=new Error(`<${e} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,br),n}return t}function i_(e,t){return ht(t.type,r_,e,t)}let o_=ve;function a_(e,t){let{value:n,defaultValue:r,onChange:s,form:i,name:o,by:a=null,disabled:l=!1,__demoMode:c=!1,nullable:d=!1,multiple:u=!1,immediate:m=!1,virtual:h=null,...p}=e,g=!1,w=null,[C=u?[]:void 0,x]=Ab(n,s,r),[E,D]=Br(i_,{dataRef:Jo(),comboboxState:c?0:1,options:[],virtual:null,activeOptionIndex:null,activationTrigger:2,labelId:null}),L=he(!1),X=he({static:!1,hold:!1}),pe=he(null),Se=he(null),de=he(null),Y=he(null),me=ce(typeof a=="string"?(oe,Te)=>{let wt=a;return(oe==null?void 0:oe[wt])===(Te==null?void 0:Te[wt])}:a??((oe,Te)=>oe===Te)),G=ce(oe=>E.options.findIndex(Te=>me(Te.dataRef.current.value,oe))),re=zn(oe=>ht(P.mode,{1:()=>C.some(Te=>me(Te,oe)),0:()=>me(C,oe)}),[C]),Pe=ce(oe=>E.activeOptionIndex===G(oe)),P=dt(()=>({...E,immediate:g,optionsPropsRef:X,labelRef:pe,inputRef:Se,buttonRef:de,optionsRef:Y,value:C,defaultValue:r,disabled:l,mode:u?1:0,virtual:E.virtual,get activeOptionIndex(){if(L.current&&E.activeOptionIndex===null&&E.options.length>0){let oe=E.options.findIndex(Te=>!Te.dataRef.current.disabled);if(oe!==-1)return oe}return E.activeOptionIndex},calculateIndex:G,compare:me,isSelected:re,isActive:Pe,nullable:d,__demoMode:c}),[C,r,l,u,d,c,E,w]);et(()=>{},[w,void 0]),et(()=>{E.dataRef.current=P},[P]),Vb([P.buttonRef,P.inputRef,P.optionsRef],()=>Js.closeCombobox(),P.comboboxState===0);let Ae=dt(()=>{var oe,Te,wt;return{open:P.comboboxState===0,disabled:l,activeIndex:P.activeOptionIndex,activeOption:P.activeOptionIndex===null?null:P.virtual?P.virtual.options[(oe=P.activeOptionIndex)!=null?oe:0]:(wt=(Te=P.options[P.activeOptionIndex])==null?void 0:Te.dataRef.current.value)!=null?wt:null,value:C}},[P,l,C]),fe=ce(()=>{if(P.activeOptionIndex!==null){if(P.virtual)Cr(P.virtual.options[P.activeOptionIndex]);else{let{dataRef:oe}=P.options[P.activeOptionIndex];Cr(oe.current.value)}Js.goToOption(tt.Specific,P.activeOptionIndex)}}),nt=ce(()=>{D({type:0}),L.current=!0}),Ne=ce(()=>{D({type:1}),L.current=!1}),Ue=ce((oe,Te,wt)=>(L.current=!1,oe===tt.Specific?D({type:2,focus:tt.Specific,idx:Te,trigger:wt}):D({type:2,focus:oe,trigger:wt}))),kt=ce((oe,Te)=>(D({type:3,payload:{id:oe,dataRef:Te}}),()=>{P.isActive(Te.current.value)&&(L.current=!0),D({type:4,id:oe})})),cn=ce(oe=>(D({type:5,id:oe}),()=>D({type:5,id:null}))),Cr=ce(oe=>ht(P.mode,{0(){return x==null?void 0:x(oe)},1(){let Te=P.value.slice(),wt=Te.findIndex(cs=>me(cs,oe));return wt===-1?Te.push(oe):Te.splice(wt,1),x==null?void 0:x(Te)}})),Lt=ce(oe=>{D({type:6,trigger:oe})}),Js=dt(()=>({onChange:Cr,registerOption:kt,registerLabel:cn,goToOption:Ue,closeCombobox:Ne,openCombobox:nt,setActivationTrigger:Lt,selectActiveOption:fe}),[]),Ys=t===null?{}:{ref:t},Sr=he(null),Xs=Hs();return Re(()=>{Sr.current&&r!==void 0&&Xs.addEventListener(Sr.current,"reset",()=>{x==null||x(r)})},[Sr,x]),Z.createElement(fl.Provider,{value:Js},Z.createElement(hl.Provider,{value:P},Z.createElement(yh,{value:ht(P.comboboxState,{0:Ft.Open,1:Ft.Closed})},o!=null&&C!=null&&_h({[o]:C}).map(([oe,Te],wt)=>Z.createElement(qb,{features:wh.Hidden,ref:wt===0?cs=>{var Qs;Sr.current=(Qs=cs==null?void 0:cs.closest("form"))!=null?Qs:null}:void 0,...al({key:oe,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:i,disabled:l,name:oe,value:Te})})),Pn({ourProps:Ys,theirProps:p,slot:Ae,defaultTag:o_,name:"Combobox"}))))}let l_="input";function c_(e,t){var n,r,s,i,o;let a=Ws(),{id:l=`headlessui-combobox-input-${a}`,onChange:c,displayValue:d,type:u="text",...m}=e,h=br("Combobox.Input"),p=Gs("Combobox.Input"),g=wr(h.inputRef,t),w=Lb(h.inputRef),C=he(!1),x=Hs(),E=ce(()=>{p.onChange(null),h.optionsRef.current&&(h.optionsRef.current.scrollTop=0),p.goToOption(tt.Nothing)}),D=function(){var P;return typeof d=="function"&&h.value!==void 0?(P=d(h.value))!=null?P:"":typeof h.value=="string"?h.value:""}();gh(([P,Ae],[fe,nt])=>{if(C.current)return;let Ne=h.inputRef.current;Ne&&((nt===0&&Ae===1||P!==fe)&&(Ne.value=P),requestAnimationFrame(()=>{if(C.current||!Ne||(w==null?void 0:w.activeElement)!==Ne)return;let{selectionStart:Ue,selectionEnd:kt}=Ne;Math.abs((kt??0)-(Ue??0))===0&&Ue===0&&Ne.setSelectionRange(Ne.value.length,Ne.value.length)}))},[D,h.comboboxState,w]),gh(([P],[Ae])=>{if(P===0&&Ae===1){if(C.current)return;let fe=h.inputRef.current;if(!fe)return;let nt=fe.value,{selectionStart:Ne,selectionEnd:Ue,selectionDirection:kt}=fe;fe.value="",fe.value=nt,kt!==null?fe.setSelectionRange(Ne,Ue,kt):fe.setSelectionRange(Ne,Ue)}},[h.comboboxState]);let L=he(!1),X=ce(()=>{L.current=!0}),pe=ce(()=>{x.nextFrame(()=>{L.current=!1})}),Se=ce(P=>{switch(C.current=!0,P.key){case Vt.Enter:if(C.current=!1,h.comboboxState!==0||L.current)return;if(P.preventDefault(),P.stopPropagation(),h.activeOptionIndex===null){p.closeCombobox();return}p.selectActiveOption(),h.mode===0&&p.closeCombobox();break;case Vt.ArrowDown:return C.current=!1,P.preventDefault(),P.stopPropagation(),ht(h.comboboxState,{0:()=>p.goToOption(tt.Next),1:()=>p.openCombobox()});case Vt.ArrowUp:return C.current=!1,P.preventDefault(),P.stopPropagation(),ht(h.comboboxState,{0:()=>p.goToOption(tt.Previous),1:()=>{p.openCombobox(),x.nextFrame(()=>{h.value||p.goToOption(tt.Last)})}});case Vt.Home:if(P.shiftKey)break;return C.current=!1,P.preventDefault(),P.stopPropagation(),p.goToOption(tt.First);case Vt.PageUp:return C.current=!1,P.preventDefault(),P.stopPropagation(),p.goToOption(tt.First);case Vt.End:if(P.shiftKey)break;return C.current=!1,P.preventDefault(),P.stopPropagation(),p.goToOption(tt.Last);case Vt.PageDown:return C.current=!1,P.preventDefault(),P.stopPropagation(),p.goToOption(tt.Last);case Vt.Escape:return C.current=!1,h.comboboxState!==0?void 0:(P.preventDefault(),h.optionsRef.current&&!h.optionsPropsRef.current.static&&P.stopPropagation(),h.nullable&&h.mode===0&&h.value===null&&E(),p.closeCombobox());case Vt.Tab:if(C.current=!1,h.comboboxState!==0)return;h.mode===0&&h.activationTrigger!==1&&p.selectActiveOption(),p.closeCombobox();break}}),de=ce(P=>{c==null||c(P),h.nullable&&h.mode===0&&P.target.value===""&&E(),p.openCombobox()}),Y=ce(P=>{var Ae,fe,nt;let Ne=(Ae=P.relatedTarget)!=null?Ae:yr.find(Ue=>Ue!==P.currentTarget);if(C.current=!1,!((fe=h.optionsRef.current)!=null&&fe.contains(Ne))&&!((nt=h.buttonRef.current)!=null&&nt.contains(Ne))&&h.comboboxState===0)return P.preventDefault(),h.mode===0&&(h.nullable&&h.value===null?E():h.activationTrigger!==1&&p.selectActiveOption()),p.closeCombobox()}),me=ce(P=>{var Ae,fe,nt;let Ne=(Ae=P.relatedTarget)!=null?Ae:yr.find(Ue=>Ue!==P.currentTarget);(fe=h.buttonRef.current)!=null&&fe.contains(Ne)||(nt=h.optionsRef.current)!=null&&nt.contains(Ne)||h.disabled||h.immediate&&h.comboboxState!==0&&(p.openCombobox(),x.nextFrame(()=>{p.setActivationTrigger(1)}))}),G=sl(()=>{if(h.labelId)return[h.labelId].join(" ")},[h.labelId]),re=dt(()=>({open:h.comboboxState===0,disabled:h.disabled}),[h]),Pe={ref:g,id:l,role:"combobox",type:u,"aria-controls":(n=h.optionsRef.current)==null?void 0:n.id,"aria-expanded":h.comboboxState===0,"aria-activedescendant":h.activeOptionIndex===null?void 0:h.virtual?(r=h.options.find(P=>{var Ae;return!((Ae=h.virtual)!=null&&Ae.disabled(P.dataRef.current.value))&&h.compare(P.dataRef.current.value,h.virtual.options[h.activeOptionIndex])}))==null?void 0:r.id:(s=h.options[h.activeOptionIndex])==null?void 0:s.id,"aria-labelledby":G,"aria-autocomplete":"list",defaultValue:(o=(i=e.defaultValue)!=null?i:h.defaultValue!==void 0?d==null?void 0:d(h.defaultValue):null)!=null?o:h.defaultValue,disabled:h.disabled,onCompositionStart:X,onCompositionEnd:pe,onKeyDown:Se,onChange:de,onFocus:me,onBlur:Y};return Pn({ourProps:Pe,theirProps:m,slot:re,defaultTag:l_,name:"Combobox.Input"})}let u_="button";function d_(e,t){var n;let r=br("Combobox.Button"),s=Gs("Combobox.Button"),i=wr(r.buttonRef,t),o=Ws(),{id:a=`headlessui-combobox-button-${o}`,...l}=e,c=Hs(),d=ce(g=>{switch(g.key){case Vt.ArrowDown:return g.preventDefault(),g.stopPropagation(),r.comboboxState===1&&s.openCombobox(),c.nextFrame(()=>{var w;return(w=r.inputRef.current)==null?void 0:w.focus({preventScroll:!0})});case Vt.ArrowUp:return g.preventDefault(),g.stopPropagation(),r.comboboxState===1&&(s.openCombobox(),c.nextFrame(()=>{r.value||s.goToOption(tt.Last)})),c.nextFrame(()=>{var w;return(w=r.inputRef.current)==null?void 0:w.focus({preventScroll:!0})});case Vt.Escape:return r.comboboxState!==0?void 0:(g.preventDefault(),r.optionsRef.current&&!r.optionsPropsRef.current.static&&g.stopPropagation(),s.closeCombobox(),c.nextFrame(()=>{var w;return(w=r.inputRef.current)==null?void 0:w.focus({preventScroll:!0})}));default:return}}),u=ce(g=>{if(Zb(g.currentTarget))return g.preventDefault();r.comboboxState===0?s.closeCombobox():(g.preventDefault(),s.openCombobox()),c.nextFrame(()=>{var w;return(w=r.inputRef.current)==null?void 0:w.focus({preventScroll:!0})})}),m=sl(()=>{if(r.labelId)return[r.labelId,a].join(" ")},[r.labelId,a]),h=dt(()=>({open:r.comboboxState===0,disabled:r.disabled,value:r.value}),[r]),p={ref:i,id:a,type:Bb(e,r.buttonRef),tabIndex:-1,"aria-haspopup":"listbox","aria-controls":(n=r.optionsRef.current)==null?void 0:n.id,"aria-expanded":r.comboboxState===0,"aria-labelledby":m,disabled:r.disabled,onClick:u,onKeyDown:d};return Pn({ourProps:p,theirProps:l,slot:h,defaultTag:u_,name:"Combobox.Button"})}let f_="label";function h_(e,t){let n=Ws(),{id:r=`headlessui-combobox-label-${n}`,...s}=e,i=br("Combobox.Label"),o=Gs("Combobox.Label"),a=wr(i.labelRef,t);et(()=>o.registerLabel(r),[r]);let l=ce(()=>{var d;return(d=i.inputRef.current)==null?void 0:d.focus({preventScroll:!0})}),c=dt(()=>({open:i.comboboxState===0,disabled:i.disabled}),[i]);return Pn({ourProps:{ref:a,id:r,onClick:l},theirProps:s,slot:c,defaultTag:f_,name:"Combobox.Label"})}let m_="ul",p_=qi.RenderStrategy|qi.Static;function g_(e,t){let n=Ws(),{id:r=`headlessui-combobox-options-${n}`,hold:s=!1,...i}=e,o=br("Combobox.Options"),a=wr(o.optionsRef,t),l=ul(),c=l!==null?(l&Ft.Open)===Ft.Open:o.comboboxState===0;et(()=>{var h;o.optionsPropsRef.current.static=(h=e.static)!=null?h:!1},[o.optionsPropsRef,e.static]),et(()=>{o.optionsPropsRef.current.hold=s},[o.optionsPropsRef,s]),zb({container:o.optionsRef.current,enabled:o.comboboxState===0,accept(h){return h.getAttribute("role")==="option"?NodeFilter.FILTER_REJECT:h.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(h){h.setAttribute("role","none")}});let d=sl(()=>{var h,p;return(p=o.labelId)!=null?p:(h=o.buttonRef.current)==null?void 0:h.id},[o.labelId,o.buttonRef.current]),u=dt(()=>({open:o.comboboxState===0,option:void 0}),[o]),m={"aria-labelledby":d,role:"listbox","aria-multiselectable":o.mode===1?!0:void 0,id:r,ref:a};return o.virtual&&o.comboboxState===0&&Object.assign(i,{children:Z.createElement(s_,null,i.children)}),Pn({ourProps:m,theirProps:i,slot:u,defaultTag:m_,features:p_,visible:c,name:"Combobox.Options"})}let $_="li";function w_(e,t){var n;let r=Ws(),{id:s=`headlessui-combobox-option-${r}`,disabled:i=!1,value:o,order:a=null,...l}=e,c=br("Combobox.Option"),d=Gs("Combobox.Option"),u=c.virtual?c.activeOptionIndex===c.calculateIndex(o):c.activeOptionIndex===null?!1:((n=c.options[c.activeOptionIndex])==null?void 0:n.id)===s,m=c.isSelected(o),h=he(null),p=pn({disabled:i,value:o,domRef:h,order:a}),g=fn(Ch),w=wr(t,h,g?g.measureElement:null),C=ce(()=>d.onChange(o));et(()=>d.registerOption(s,p),[p,s]);let x=he(!(c.virtual||c.__demoMode));et(()=>{if(!c.virtual||!c.__demoMode)return;let Y=$r();return Y.requestAnimationFrame(()=>{x.current=!0}),Y.dispose},[c.virtual,c.__demoMode]),et(()=>{if(!x.current||c.comboboxState!==0||!u||c.activationTrigger===0)return;let Y=$r();return Y.requestAnimationFrame(()=>{var me,G;(G=(me=h.current)==null?void 0:me.scrollIntoView)==null||G.call(me,{block:"nearest"})}),Y.dispose},[h,u,c.comboboxState,c.activationTrigger,c.activeOptionIndex]);let E=ce(Y=>{var me;if(i||(me=c.virtual)!=null&&me.disabled(o))return Y.preventDefault();C(),hh()||requestAnimationFrame(()=>{var G;return(G=c.inputRef.current)==null?void 0:G.focus({preventScroll:!0})}),c.mode===0&&requestAnimationFrame(()=>d.closeCombobox())}),D=ce(()=>{var Y;if(i||(Y=c.virtual)!=null&&Y.disabled(o))return d.goToOption(tt.Nothing);let me=c.calculateIndex(o);d.goToOption(tt.Specific,me)}),L=jb(),X=ce(Y=>L.update(Y)),pe=ce(Y=>{var me;if(!L.wasMoved(Y)||i||(me=c.virtual)!=null&&me.disabled(o)||u)return;let G=c.calculateIndex(o);d.goToOption(tt.Specific,G,0)}),Se=ce(Y=>{var me;L.wasMoved(Y)&&(i||(me=c.virtual)!=null&&me.disabled(o)||u&&(c.optionsPropsRef.current.hold||d.goToOption(tt.Nothing)))}),de=dt(()=>({active:u,selected:m,disabled:i}),[u,m,i]);return Pn({ourProps:{id:s,ref:w,role:"option",tabIndex:i===!0?void 0:-1,"aria-disabled":i===!0?!0:void 0,"aria-selected":m,disabled:void 0,onClick:E,onFocus:D,onPointerEnter:X,onMouseEnter:X,onPointerMove:pe,onMouseMove:pe,onPointerLeave:Se,onMouseLeave:Se},theirProps:l,slot:de,defaultTag:$_,name:"Combobox.Option"})}let y_=gn(a_),b_=gn(d_),__=gn(c_),v_=gn(h_),x_=gn(g_),C_=gn(w_),qs=Object.assign(y_,{Input:__,Button:b_,Label:v_,Options:x_,Option:C_});function ml(){let e=he(!1);return et(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function S_(e=0){let[t,n]=Je(e),r=ml(),s=zn(l=>{r.current&&n(c=>c|l)},[t,r]),i=zn(l=>!!(t&l),[t]),o=zn(l=>{r.current&&n(c=>c&~l)},[n,r]),a=zn(l=>{r.current&&n(c=>c^l)},[n]);return{flags:t,addFlag:s,hasFlag:i,removeFlag:o,toggleFlag:a}}function A_(e){let t={called:!1};return(...n)=>{if(!t.called)return t.called=!0,e(...n)}}function pl(e,...t){e&&t.length>0&&e.classList.add(...t)}function gl(e,...t){e&&t.length>0&&e.classList.remove(...t)}function k_(e,t){let n=$r();if(!e)return n.dispose;let{transitionDuration:r,transitionDelay:s}=getComputedStyle(e),[i,o]=[r,s].map(l=>{let[c=0]=l.split(",").filter(Boolean).map(d=>d.includes("ms")?parseFloat(d):parseFloat(d)*1e3).sort((d,u)=>u-d);return c}),a=i+o;if(a!==0){n.group(c=>{c.setTimeout(()=>{t(),c.dispose()},a),c.addEventListener(e,"transitionrun",d=>{d.target===d.currentTarget&&c.dispose()})});let l=n.addEventListener(e,"transitionend",c=>{c.target===c.currentTarget&&(t(),l())})}else t();return n.add(()=>t()),n.dispose}function E_(e,t,n,r){let s=n?"enter":"leave",i=$r(),o=r!==void 0?A_(r):()=>{};s==="enter"&&(e.removeAttribute("hidden"),e.style.display="");let a=ht(s,{enter:()=>t.enter,leave:()=>t.leave}),l=ht(s,{enter:()=>t.enterTo,leave:()=>t.leaveTo}),c=ht(s,{enter:()=>t.enterFrom,leave:()=>t.leaveFrom});return gl(e,...t.base,...t.enter,...t.enterTo,...t.enterFrom,...t.leave,...t.leaveFrom,...t.leaveTo,...t.entered),pl(e,...t.base,...a,...c),i.nextFrame(()=>{gl(e,...t.base,...a,...c),pl(e,...t.base,...a,...l),k_(e,()=>(gl(e,...t.base,...a),pl(e,...t.base,...t.entered),o()))}),i.dispose}function I_({immediate:e,container:t,direction:n,classes:r,onStart:s,onStop:i}){let o=ml(),a=Hs(),l=pn(n);et(()=>{e&&(l.current="enter")},[e]),et(()=>{let c=$r();a.add(c.dispose);let d=t.current;if(d&&l.current!=="idle"&&o.current)return c.dispose(),s.current(l.current),c.add(E_(d,r.current,l.current==="enter",()=>{c.dispose(),i.current(l.current)})),c.dispose},[n])}function Jn(e=""){return e.split(/\s+/).filter(t=>t.length>1)}let Zi=jn(null);Zi.displayName="TransitionContext";var N_=(e=>(e.Visible="visible",e.Hidden="hidden",e))(N_||{});function T_(){let e=fn(Zi);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}function R_(){let e=fn(Ji);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}let Ji=jn(null);Ji.displayName="NestingContext";function Yi(e){return"children"in e?Yi(e.children):e.current.filter(({el:t})=>t.current!==null).filter(({state:t})=>t==="visible").length>0}function Sh(e,t){let n=pn(e),r=he([]),s=ml(),i=Hs(),o=ce((h,p=Zn.Hidden)=>{let g=r.current.findIndex(({el:w})=>w===h);g!==-1&&(ht(p,{[Zn.Unmount](){r.current.splice(g,1)},[Zn.Hidden](){r.current[g].state="hidden"}}),i.microTask(()=>{var w;!Yi(r)&&s.current&&((w=n.current)==null||w.call(n))}))}),a=ce(h=>{let p=r.current.find(({el:g})=>g===h);return p?p.state!=="visible"&&(p.state="visible"):r.current.push({el:h,state:"visible"}),()=>o(h,Zn.Unmount)}),l=he([]),c=he(Promise.resolve()),d=he({enter:[],leave:[],idle:[]}),u=ce((h,p,g)=>{l.current.splice(0),t&&(t.chains.current[p]=t.chains.current[p].filter(([w])=>w!==h)),t==null||t.chains.current[p].push([h,new Promise(w=>{l.current.push(w)})]),t==null||t.chains.current[p].push([h,new Promise(w=>{Promise.all(d.current[p].map(([C,x])=>x)).then(()=>w())})]),p==="enter"?c.current=c.current.then(()=>t==null?void 0:t.wait.current).then(()=>g(p)):g(p)}),m=ce((h,p,g)=>{Promise.all(d.current[p].splice(0).map(([w,C])=>C)).then(()=>{var w;(w=l.current.shift())==null||w()}).then(()=>g(p))});return dt(()=>({children:r,register:a,unregister:o,onStart:u,onStop:m,wait:c,chains:d}),[a,o,r,u,m,d,c])}function M_(){}let P_=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function Ah(e){var t;let n={};for(let r of P_)n[r]=(t=e[r])!=null?t:M_;return n}function O_(e){let t=he(Ah(e));return Re(()=>{t.current=Ah(e)},[e]),t}let D_="div",kh=qi.RenderStrategy;function F_(e,t){var n,r;let{beforeEnter:s,afterEnter:i,beforeLeave:o,afterLeave:a,enter:l,enterFrom:c,enterTo:d,entered:u,leave:m,leaveFrom:h,leaveTo:p,...g}=e,w=he(null),C=wr(w,t),x=(n=g.unmount)==null||n?Zn.Unmount:Zn.Hidden,{show:E,appear:D,initial:L}=T_(),[X,pe]=Je(E?"visible":"hidden"),Se=R_(),{register:de,unregister:Y}=Se;Re(()=>de(w),[de,w]),Re(()=>{if(x===Zn.Hidden&&w.current){if(E&&X!=="visible"){pe("visible");return}return ht(X,{hidden:()=>Y(w),visible:()=>de(w)})}},[X,w,de,Y,E,x]);let me=pn({base:Jn(g.className),enter:Jn(l),enterFrom:Jn(c),enterTo:Jn(d),entered:Jn(u),leave:Jn(m),leaveFrom:Jn(h),leaveTo:Jn(p)}),G=O_({beforeEnter:s,afterEnter:i,beforeLeave:o,afterLeave:a}),re=il();Re(()=>{if(re&&X==="visible"&&w.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[w,X,re]);let Pe=L&&!D,P=D&&E&&L,Ae=!re||Pe?"idle":E?"enter":"leave",fe=S_(0),nt=ce(Lt=>ht(Lt,{enter:()=>{fe.addFlag(Ft.Opening),G.current.beforeEnter()},leave:()=>{fe.addFlag(Ft.Closing),G.current.beforeLeave()},idle:()=>{}})),Ne=ce(Lt=>ht(Lt,{enter:()=>{fe.removeFlag(Ft.Opening),G.current.afterEnter()},leave:()=>{fe.removeFlag(Ft.Closing),G.current.afterLeave()},idle:()=>{}})),Ue=Sh(()=>{pe("hidden"),Y(w)},Se),kt=he(!1);I_({immediate:P,container:w,classes:me,direction:Ae,onStart:pn(Lt=>{kt.current=!0,Ue.onStart(w,Lt,nt)}),onStop:pn(Lt=>{kt.current=!1,Ue.onStop(w,Lt,Ne),Lt==="leave"&&!Yi(Ue)&&(pe("hidden"),Y(w))})});let cn=g,Cr={ref:C};return P?cn={...cn,className:Gi(g.className,...me.current.enter,...me.current.enterFrom)}:kt.current&&(cn.className=Gi(g.className,(r=w.current)==null?void 0:r.className),cn.className===""&&delete cn.className),Z.createElement(Ji.Provider,{value:Ue},Z.createElement(yh,{value:ht(X,{visible:Ft.Open,hidden:Ft.Closed})|fe.flags},Pn({ourProps:Cr,theirProps:cn,defaultTag:D_,features:kh,visible:X==="visible",name:"Transition.Child"})))}function V_(e,t){let{show:n,appear:r=!1,unmount:s=!0,...i}=e,o=he(null),a=wr(o,t);il();let l=ul();if(n===void 0&&l!==null&&(n=(l&Ft.Open)===Ft.Open),![!0,!1].includes(n))throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[c,d]=Je(n?"visible":"hidden"),u=Sh(()=>{d("hidden")}),[m,h]=Je(!0),p=he([n]);et(()=>{m!==!1&&p.current[p.current.length-1]!==n&&(p.current.push(n),h(!1))},[p,n]);let g=dt(()=>({show:n,appear:r,initial:m}),[n,r,m]);Re(()=>{if(n)d("visible");else if(!Yi(u))d("hidden");else{let E=o.current;if(!E)return;let D=E.getBoundingClientRect();D.x===0&&D.y===0&&D.width===0&&D.height===0&&d("hidden")}},[n,u]);let w={unmount:s},C=ce(()=>{var E;m&&h(!1),(E=e.beforeEnter)==null||E.call(e)}),x=ce(()=>{var E;m&&h(!1),(E=e.beforeLeave)==null||E.call(e)});return Z.createElement(Ji.Provider,{value:u},Z.createElement(Zi.Provider,{value:g},Pn({ourProps:{...w,as:ve,children:Z.createElement(Eh,{ref:a,...w,...i,beforeEnter:C,beforeLeave:x})},theirProps:{},defaultTag:ve,features:kh,visible:c==="visible",name:"Transition"})))}function L_(e,t){let n=fn(Zi)!==null,r=ul()!==null;return Z.createElement(Z.Fragment,null,!n&&r?Z.createElement($l,{ref:t,...e}):Z.createElement(Eh,{ref:t,...e}))}let $l=gn(V_),Eh=gn(F_),B_=gn(L_),U_=Object.assign($l,{Child:B_,Root:$l});function j_({name:e,control:t,queryAnzsic:n}){const[r,s]=Je(""),[i,o]=Je([]),a=async()=>{try{if(r.length>=2){const d=await n(r);o(d)}else o([])}catch(d){console.error("Error fetching data:",d),o([])}};Re(()=>{const d=setTimeout(()=>{a()},500);return()=>clearTimeout(d)},[r]);const{field:l,fieldState:c}=Gf({name:e,control:t,rules:{required:!0}});return M("div",{children:M(qs,{onChange:l.onChange,value:l.value??null,name:l.name,children:[M(qs.Label,{className:"block text-sm font-medium text-gray-900",children:"Industry"}),M("div",{className:"relative mt-2",children:[M("div",{className:"grid grid-cols-1",children:[M(qs.Input,{className:"col-start-1 row-start-1 block w-full rounded-md bg-white py-[9px] pl-9 pr-2 text-gray-900 placeholder:text-gray-400 text-sm border border-gray-300 focus:ring-2 focus:ring-indigo-600 focus:border-indigo-600",onChange:d=>s(d.target.value),onBlur:()=>s(""),placeholder:"Type to search industries",displayValue:d=>{const u=l.value;return u!=null&&u.ClassTitle?`${u.ClassCode} ${u.ClassTitle}`:""}}),M(Jw,{className:"pointer-events-none col-start-1 row-start-1 ml-3 self-center text-gray-400 size-4"})]}),i.length>0&&M(qs.Options,{className:"absolute z-10 mt-1 max-h-60 w-full overflow-auto rounded-md bg-white py-1 shadow-lg ring-1 ring-black/5 focus:outline-none",children:i.map(d=>M(ve,{children:[M("div",{className:"flex items-center text-xs text-gray-500 font-semibold mb-1 mx-3 mt-2 uppercase",children:[M("span",{className:"self-start",children:d.GroupCode}),M("span",{className:"ml-2",children:d.GroupTitle})]}),d.Classes.map(u=>{var m,h;return M(qs.Option,{value:u,className:({active:p})=>`group relative cursor-pointer select-none py-2 pl-3 pr-9 ${p?"bg-indigo-600 text-white outline-none":"text-gray-900"}`,children:[M("div",{className:`flex items-center text-sm ${((m=l.value)==null?void 0:m.ClassCode)===u.ClassCode?"font-semibold":"font-normal"}`,children:[M("span",{className:"self-start",children:u.ClassCode}),M("span",{className:"ml-2",children:u.ClassTitle})]}),M("span",{className:`absolute inset-y-0 right-0 items-center pr-4 text-indigo-600 group-hover:text-white ${((h=l.value)==null?void 0:h.ClassCode)===u.ClassCode?"flex":"hidden"}`,children:M(Hw,{className:"size-5"})})]},u.ClassCode)})]}))}),r.length>1&&i.length===0&&M("div",{className:"absolute z-10 mt-1 max-h-60 w-full overflow-auto rounded-md bg-white py-1 shadow-lg ring-1 ring-black/5 focus:outline-none",children:M("div",{className:"group relative cursor-default select-none py-2 pl-3 pr-9 text-gray-400 text-sm",children:"Keep typing to search industries"})})]}),c.invalid&&M("p",{className:"mt-2 text-sm text-red-600",children:"Industry is required"})]})})}function z_({defaultValues:e,validateAccountName:t,validateLegalEntityName:n,validateAbn:r,validateSalesforceParentRecordId:s,validateWebsiteUrl:i,queryAnzsic:o,onSubmit:a,closeModal:l}){const{handleSubmit:c,control:d}=zi({mode:"onChange",defaultValues:e});return M(ve,{children:[M("div",{className:"font-bold text-lg mb-4",children:"Account details"}),M("form",{className:"space-y-6",onSubmit:c(a),children:[M("div",{children:[M($t,{label:"Account name",name:"AccountName",control:d,placeholder:"e.g. Acme Co",validate:t}),M("p",{className:"mt-2 text-sm font-normal text-gray-500",children:"This will be used as a display name."})]}),M($t,{label:"Legal entity name",name:"LegalEntityName",control:d,placeholder:"e.g. ACME LTD PTY",validate:n}),M("div",{className:"grid grid-cols-2 gap-3",children:[M($t,{label:"ABN",name:"Abn",control:d,validate:r,isNumber:!0}),M($t,{label:"Salesforce parent RecordID",name:"SalesforceParentRecordId",control:d,validate:s})]}),M($t,{label:"Website URL",name:"WebsiteUrl",control:d,placeholder:"https://acme.com.au",validate:i}),M(j_,{name:"Industry",control:d,queryAnzsic:o}),M(Hi,{primaryLabel:"Next",secondaryLabel:"Cancel",secondaryOnClick:l})]})]})}function H_(e,t,n,r){return f(z_,{defaultValues:e,validateAccountName:s=>mt(zo(s)),validateLegalEntityName:s=>mt(Bc(s)),validateAbn:s=>mt(Uc(s)),validateSalesforceParentRecordId:s=>mt(Z0(s)),validateWebsiteUrl:s=>mt(Nc(s)),queryAnzsic:t,onSubmit:s=>{r(new sn(2,[s])),r(new sn(0,[]))},closeModal:n})}function Ih(e,t){let n,r,s;const i=f("div",{className:"pt-6 px-6 pb-4 border-b font-bold text-xl",children:"Add a new account"}),o=f("div",S(y([["className","pt-4 mx-6"],(n=ae(k(()=>t)),["children",v.Children.toArray(Array.from(n))])])));return f(es,{onClose:e,child:(r=[f("div",{className:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity","aria-hidden":!0}),f("div",S(y([["className","fixed inset-0 z-10 w-screen overflow-y-auto h-full flex items-center justify-center"],(s=[f("div",{className:"w-[480px] bg-white shadow-xl rounded-lg",children:v.Children.toArray([i,o])})],["children",v.Children.toArray(Array.from(s))])])))],f(ve,{},...r))})}function W_(e,t){let n;const r=f("div",S(y([["className","mb-4 text-sm font-normal text-gray-500"],(n=["All fields are required unless labelled as ",f("span",{className:"font-semibold",children:"optional"}),"."],["children",v.Children.toArray(Array.from(n))])])));return Ih(e,ae(k(()=>R(A(r),k(()=>t)))))}function G_(e){let t,n,r,s;return Ih(e,[f("div",S(y([["className","text-sm mb-4"],(t=[f("p",{children:["You do not have sufficient permissions."]}),(n=y(["For details, please see ",f("a",{className:"font-medium text-blue-600 hover:underline",href:"https://myobconfluence.atlassian.net/wiki/spaces/ENG/pages/9811993991/SuperHero+Module+Permissions",target:"_blank",children:"SuperHero Module Permissions"})]),f("p",{children:v.Children.toArray(Array.from(n))})),f("div",S(y([["className","flex justify-end"],(r=[f("button",S(y([(s="rounded-md bg-indigo-600 px-3.5 py-2.5 text-sm font-semibold text-white shadow-xs hover:bg-indigo-500 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600",["className",s]),["type","button"],["onClick",i=>{e()}],["children","Close"]])))],["children",v.Children.toArray(Array.from(r))])])))],["children",v.Children.toArray(Array.from(t))])])))])}function q_(e){const t=e.closeModal,n=e.partnerId,r=Wn(Rn),s=My(r.BackendUrl,r.AccessToken),i=dr(()=>ur(()=>Fy,(l,c)=>Vy(n,s,l,c),(l,c)=>{}),void 0,void 0),o=i[0],a=i[1];return r.Roles.ProvisionAccounts?W_(t,ae(k(()=>{const l=o.CurrentView;return l.tag===1?A(ib(o.PrimaryContactForm,a)):l.tag===2?A(lb(o.BusinessAddressForm,Dy(o),Oy(o),a)):A(H_(o.AccountDetailsForm,c=>s.QueryAnzsic(c),t,a))}))):G_(t)}function K_(e){const t=e.partnerId,n=Gn(!1),r=n[1],s=ae(k(()=>{let i;return R(A(f("button",S(y([["type","button"],(i="inline-flex items-center gap-x-2 rounded-md bg-indigo-600 px-3.5 py-[8.5px] text-sm font-semibold text-white shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600",["className",i]),["onClick",o=>{r(!0)}],["children",v.Children.toArray([Ny,"Add account"])]])))),k(()=>n[0]?A(f(q_,{partnerId:t,closeModal:()=>{r(!1)}})):Ke()))}));return f(ve,{},...s)}class Z_ extends j{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["ColumnHeader"]}}function Nh(e){return new Z_(e)}function Th(e){return e.fields[0]}class J_ extends j{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["RowCell"]}}function ns(e){return new J_(e)}function Rh(e){return e.fields[0]}function Y_(){return["scope","col"]}function _r(e){return Nh(f("th",S(y([["className","px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"],Y_(),["children",e]]))))}function X_(e,t){let n;return ns(f("td",S(y([["className","px-6 py-4 whitespace-nowrap text-sm"],(n=[f("a",{className:"text-indigo-600 hover:text-indigo-900",children:t,href:e})],["children",v.Children.toArray(Array.from(n))])]))))}function Xi(e,t){return ns(f("td",{className:ne(" ",R(e,["px-6","py-4","whitespace-nowrap","text-sm"])),children:t}))}function Q_(e,t){let n,r,s,i,o,a,l;return f("div",S(y([["className","flex flex-col mt-4"],(n=[f("div",S(y([["className","-my-2 overflow-x-auto sm:-mx-6 lg:-mx-8"],(r=[f("div",S(y([["className","py-2 align-middle inline-block min-w-full sm:px-6 lg:px-8"],(s=[f("div",S(y([["className","shadow overflow-hidden border-b border-gray-200 sm:rounded-lg"],(i=[f("table",S(y([["className","min-w-full divide-y divide-gray-200"],(o=[f("thead",{className:"bg-gray-50",children:(a=Le(Th,e),f("tr",{children:v.Children.toArray(Array.from(a))}))}),(l=Vo((c,d)=>(u=>{let m;return f("tr",S(y([["className",c%2===0?"bg-white":"bg-gray-50"],(m=Le(Rh,u),["children",v.Children.toArray(Array.from(m))])])))})(d),t),f("tbody",{children:v.Children.toArray(Array.from(l))}))],["children",v.Children.toArray(Array.from(o))])])))],["children",v.Children.toArray(Array.from(i))])])))],["children",v.Children.toArray(Array.from(s))])])))],["children",v.Children.toArray(Array.from(r))])])))],["children",v.Children.toArray(Array.from(n))])])))}function ev(e,t,n){return e?rt(n,t):n}function Mh(e,t,n,r){let s,i,o;return Nh(f("th",S(y([["className",ne(" ",["px-6","py-3","text-left","text-xs","font-medium","text-gray-500","sm:pl-6","uppercase","tracking-wider"])],["scope","col"],(s=[f("a",S(y([["className",ne(" ",["group","inline-flex","cursor-pointer"])],["onClick",n],(i=[r,f("span",S(y([["className",ne(" ",ev(!e,ee("invisible"),y(["ml-2","flex-none","rounded","text-gray-400","group-hover:visible","group-focus:visible"])))],(o=ae(k(()=>A(t?Ey:Iy))),["children",v.Children.toArray(Array.from(o))])])))],["children",v.Children.toArray(Array.from(i))])])))],["children",v.Children.toArray(Array.from(s))])]))))}function tv(e,t){return Mh(Ce(bd(e.Sort),new Nn(1,[])),Ce(_d(e.Sort),new cr(0,[])),n=>{t(new hr(1,[vd(new Nn(1,[]),e.Sort)]))},"Name")}function nv(e,t){return Mh(Ce(bd(e.Sort),new Nn(0,[])),Ce(_d(e.Sort),new cr(0,[])),n=>{t(new hr(1,[vd(new Nn(0,[]),e.Sort)]))},"Id")}function rv(e,t){let n;return ns(f("td",S(y([["className",ne(" ",["text-gray-500","px-6","py-2","whitespace-nowrap","text-sm","align-top"])],(n=[f("span",{children:[e]}),f("br",{}),f("span",{children:[t]})],["children",v.Children.toArray(Array.from(n))])]))))}function sv(e,t,n){let r;return ns(f("td",S(y([["className",ne(" ",["text-gray-500","px-6","py-2","whitespace-nowrap","text-sm","align-top"])],(r=ae(k(()=>{let s;return R(A(f("div",S(y([["className",ne(" ",["font-medium"])],(s=[f("span",{children:[e]})],["children",v.Children.toArray(Array.from(s))])])))),k(()=>{let i;return R((i=t,i==null?A(ge()):A(f("span",{children:["Legal Entity: "+i]}))),k(()=>{const o=n;if(o==null)return A(ge());{const a=o;return R(A(f("br",{})),k(()=>A(f("span",{children:["ABN: "+a]}))))}}))}))})),["children",v.Children.toArray(Array.from(r))])]))))}function iv(e){return ns(f("td",{className:ne(" ",["px-6","py-2","whitespace-nowrap","text-sm","text-gray-500","align-top"]),children:e}))}function ov(e,t,n,r){let s;return ns(f("td",S(y([["className","px-6 py-2 whitespace-nowrap text-sm align-top"],(s=ae(k(()=>R(A(f("a",{className:"text-indigo-600 hover:text-indigo-900",children:t,href:e})),k(()=>{let i,o;return R((i=r,i==null?A(ge()):(o=i,R(A(f("br",{})),k(()=>A(f("span",{children:[`Channel ID: ${o}`]})))))),k(()=>{const a=n;if(a==null)return A(ge());{const l=a;return R(A(f("br",{})),k(()=>A(f("span",{children:[`External ID: ${l}`]}))))}}))})))),["children",v.Children.toArray(Array.from(s))])]))))}function av(e,t,n){const r=Rt(n.AccountId);return ae(k(()=>{let s;return R(A(ov(lr(Ms((s=[e,r],new q(8,[s[0],s[1]])))),n.AccountId,n.ExternalId,n.ChannelId)),k(()=>R(A(sv(n.Name,n.BusinessName,n.BusinessNumber)),k(()=>R(t.ReadProtectedData?A(rv(We(n.Contact,""),We(n.ContactMobilePhone,""))):Ke(),k(()=>A(iv(n.Website))))))))}))}class lv extends Q{constructor(t,n){super(),this.Data=t,this.LoadNext=n}}class Ph extends j{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Resolved","InProgress"]}}class Oh extends j{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Known","Unknown"]}}function cv(e){let t;return f("thead",{className:"bg-gray-50",children:(t=Le(Th,e),f("tr",{children:v.Children.toArray(Array.from(t))}))})}function uv(e,t){let n;return f("tr",S(y([["className",e%2===0?"bg-white":"bg-gray-50"],(n=Le(Rh,t),["children",v.Children.toArray(Array.from(n))])])))}function dv(e,t,n,r,s,i){let o,a,l,c,d,u,m;const h=t!=null&&n!=null?(o=t|0,a=n|0,ae(k(()=>R(A("Showing "),k(()=>R(A(f("span",{className:"font-medium",children:`${o}`})),k(()=>R(A(" to "),k(()=>R(A(f("span",{className:"font-medium",children:`${a}`})),k(()=>R(A(" of "),k(()=>r.tag===1?ee(" many"):y([f("span",{className:"font-medium",children:Ze(r.fields[0])})," results"])))))))))))))):ee(ge()),p=ae(k(()=>{let g,w;return R((g=i,g==null?A(ge()):(w=g,A(f("a",{className:ne(" ",["relative","inline-flex","items-center","px-4","py-2","border","border-gray-300","text-sm","font-medium","rounded-md","text-gray-700","bg-white","hover:bg-gray-50","cursor-pointer"]),onClick:w,children:"Previous "})))),k(()=>{const C=s;if(C==null)return A(ge());{const x=C;return A(f("a",{className:ne(" ",["ml-3","relative","inline-flex","items-center","px-4","py-2","border","border-gray-300","text-sm","font-medium","rounded-md","text-gray-700","bg-white","hover:bg-gray-50","cursor-pointer"]),onClick:x,children:" Next"}))}}))}));return f("tfoot",S(y([["className",ne(" ",["w-full"])],(l=[f("tr",S(ee((c=[f("td",S(y([["colSpan",e],(d=[f("nav",S(y([["className",ne(" ",["bg-white","px-4","py-3","flex","items-center","justify-between","border-t-1","border-gray-200","sm:px-6"])],(u=[f("div",S(y([["className",ne(" ",["hidden","sm:block"])],(m=[f("p",{className:ne(" ",["text-sm","text-gray-700"]),children:v.Children.toArray(Array.from(h))})],["children",v.Children.toArray(Array.from(m))])]))),f("div",{className:ne(" ",["flex-1","flex","justify-between","sm:justify-end"]),children:v.Children.toArray(Array.from(p))})],["children",v.Children.toArray(Array.from(u))])])))],["children",v.Children.toArray(Array.from(d))])])))],["children",v.Children.toArray(Array.from(c))]))))],["children",v.Children.toArray(Array.from(l))])])))}function fv(e,t){const n=Gn(1),r=n[1],s=n[0]|0;return[s,i=>{if(s===e){if(t!=null){const o=t;Ql(jt("Calling Load")),o(),r(s+1)}}else r(s+1)},i=>{r(s-1)}]}function hv(e){let t,n,r,s,i;const o=e.data,a=e.pageSize,l=e.renderRowCells,c=e.columnHeaders,d=Cp(a,o.Data),u=fv(Mr(d),o.LoadNext),m=u[0]|0,h=u[1];let p;const g=bp(m-1,d);p=g==null?new Ph(1,[]):new Ph(0,[g]);const w=Mr(o.Data)|0,C=o.LoadNext==null?new Oh(0,[w]):new Oh(1,[]),x=p.tag===1?void 0:w>=1?(m-1)*a+1:void 0,E=p.tag===1?void 0:w>=1?(m-1)*a+Mr(p.fields[0]):void 0,D=m===1?void 0:u[2],L=m===Mr(d)?o.LoadNext!=null?h:void 0:m<Mr(d)?h:void 0;return f("div",S(y([["className","flex flex-col mt-4"],(t=[f("div",S(y([["className","-my-2 overflow-x-auto sm:-mx-6 lg:-mx-8"],(n=[f("div",S(y([["className","py-2 align-middle inline-block min-w-full sm:px-6 lg:px-8"],(r=[f("div",S(y([["className","shadow overflow-hidden border-b border-gray-200 sm:rounded-lg"],(s=[f("table",S(y([["className","min-w-full divide-y divide-gray-200"],(i=ae(k(()=>R(A(cv(c)),k(()=>{let X,pe;return R((X=p,X.tag===1?A(ge()):A((pe=Vo(uv,l(X.fields[0])),f("tbody",{children:v.Children.toArray(Array.from(pe))})))),k(()=>A(dv(Mr(c),x,E,C,L,D))))})))),["children",v.Children.toArray(Array.from(i))])])))],["children",v.Children.toArray(Array.from(s))])])))],["children",v.Children.toArray(Array.from(r))])])))],["children",v.Children.toArray(Array.from(n))])])))],["children",v.Children.toArray(Array.from(t))])])))}function an(e){const t=e.error,n=ee(f("span",{children:[t]}));return f("div",{children:v.Children.toArray(Array.from(n))})}function Ks(){const e=ee(f("span",{children:["Please wait..."]}));return f("div",{children:v.Children.toArray(Array.from(e))})}function mv(e){let t,n,r,s,i,o;const a=Wn(Rn),l=_y({accessToken:a.AccessToken,backendUrl:a.BackendUrl,partnerId:e.partnerId}),c=dr(()=>ur(Cy,(E,D)=>Sy(l,E,D),(E,D)=>{}),void 0,void 0),d=c[0],u=c[1],m=new Aa(d.SearchText,d.Sort,d.PageSize);ba((t=[()=>xy(l,m),E=>{u(new hr(2,[E]))}],pd(t[0],t[1])));const h=E=>{u(new hr(4,[]))},p=d.Data;let g,w,C,x;switch(p.tag){case 0:case 1:{g=2;break}case 3:{g=3,x=p.fields[0];break}default:p.fields[0].tag===1?(g=1,C=p.fields[0].fields[0]):(g=0,w=p.fields[0].fields[0])}switch(g){case 0:{const E=y([f("div",S(y([["className",ne(" ",["flex","justify-between","items-end","pt-2","sm:-mr-6","lg:mr-0"])],(n=ae(k(()=>{let D;return R(A(f("div",S(y([["className",ne(" ",["flex","flex-row","gap-4","sm:-mr-6","lg:mr-0","w-[560px]"])],(D=[Mf(Cd(d.SearchText),"Account ID, Name, Legal Entity, Channel ID or External ID",L=>{u(new hr(0,[L]))},h),Ay(h)],["children",v.Children.toArray(Array.from(D))])])))),k(()=>e.accountProvisioningMode.tag===0?A(ge()):A(f(K_,{partnerId:e.partnerId}))))})),["children",v.Children.toArray(Array.from(n))])]))),(r=w,s=ae(k(()=>R(A(nv(d,u)),k(()=>R(A(tv(d,u)),k(()=>R(a.Roles.ReadProtectedData?A(_r("Contact")):Ke(),k(()=>A(_r("Website")))))))))),i=new lv(r.Accounts,Ge(D=>()=>{zr(vy(l)(m)(D)(u))},r.Token)),o=Sd(d.PageSize)|0,f(hv,{columnHeaders:s,renderRowCells:D=>nr(L=>av(e.partnerId,a.Roles,L),D),pageSize:o,data:i}))]);return f("div",{children:v.Children.toArray(Array.from(E))})}case 1:return f(an,{error:C});case 2:return f(Ks,null);default:{const E=Ze(x);return f(an,{error:E})}}}let Qi=class extends j{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["backend-url","access-token","partner-id","account-id"]}};function Dh(e){const t=e.accessToken,n=e.backendUrl,r=e.accountId,s=e.partnerId,i=bs(o=>o,[new Qi(1,[t]),new Qi(0,[n]),new Qi(2,[Kt(s)]),Ge(o=>new Qi(3,[Zt(o)]),r)]);return f("superhero-super-configuration",Bn(i,1))}let eo=class extends j{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["backend-url","access-token","partner-id","account-id"]}};function Fh(e){const t=e.accessToken,n=e.backendUrl,r=e.accountId,s=e.partnerId,i=bs(o=>o,[new eo(1,[t]),new eo(0,[n]),new eo(2,[Kt(s)]),Ge(o=>new eo(3,[Zt(o)]),r)]);return f("superhero-benefits-onboarding-configuration",Bn(i,1))}let to=class extends j{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["backend-url","access-token","partner-id","account-id"]}};function Vh(e){const t=e.accessToken,n=e.backendUrl,r=e.accountId,s=e.partnerId,i=bs(o=>o,[new to(1,[t]),new to(0,[n]),new to(2,[Kt(s)]),Ge(o=>new to(3,[Zt(o)]),r)]);return f("superhero-bank-details",Bn(i,1))}let no=class extends j{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["backend-url","access-token","partner-id","account-id"]}};function Lh(e){const t=e.accessToken,n=e.backendUrl,r=e.accountId,s=e.partnerId,i=bs(o=>o,[new no(1,[t]),new no(0,[n]),new no(2,[Kt(s)]),Ge(o=>new no(3,[Zt(o)]),r)]);return f("superhero-profile-directory-app",Bn(i,1))}let ro=class extends j{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["backend-url","access-token","partner-id","account-id"]}};function Bh(e){const t=e.accountId,n=e.partnerId,r=e.accessToken,s=e.backendUrl,i=bs(o=>o,[new ro(1,[r]),new ro(0,[s]),new ro(2,[Kt(n)]),Ge(o=>new ro(3,[Zt(o)]),t)]);return f("workspace-account-registry-app",Bn(i,1))}let On=class extends j{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Key","Appear","Show","ClassName","Enter","EnterFrom","EnterTo","Leave","LeaveFrom","LeaveTo","Children"]}};function pv(e){const t=Bn(e,1);return f(U_,t)}function so(e,t){let n;return f("div",S(y([["className","px-4 py-4 sm:px-0"],(n=[f("h3",{className:"text-lg font-semibold leading-7 text-gray-900",children:e}),We(Ge(r=>f("p",{className:"mt-1 max-w-2xl text-sm leading-6 text-gray-500",children:r}),t),ge())],["children",v.Children.toArray(Array.from(n))])])))}function st(e,t){let n;return f("div",S(y([["className","px-4 py-4 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-0"],(n=[f("dt",{className:"text-sm font-medium leading-6 text-gray-700",children:e}),f("dd",{className:"px-1 mt-1 text-sm leading-6 text-gray-700 sm:col-span-2 sm:mt-0",children:t})],["children",v.Children.toArray(Array.from(n))])])))}function wl(e){let t,n;const r=e.value,s=e.label,i=Gn(!1),o=i[0],a=i[1];return Kg(()=>{zr(N.Delay(()=>o?N.Bind(xa(2e3),()=>(a(!1),N.Zero())):N.Zero()))}),f("div",S(y([["className","px-4 py-2 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-0"],(t=[f("dt",{className:"text-sm font-medium leading-6 text-gray-700",children:s}),f("dd",S(y([["className","flex mt-1 text-sm leading-6 text-primary-700 sm:col-span-2 sm:mt-0 relative"],(n=[pv(y([new On(3,["absolute bottom-8 flex flex-row bg-gray-900 items-start w-[69px] h-8 shadow-md px-3 py-2 rounded-md"]),new On(2,[o]),new On(4,["transition-opacity ease-in duration-100"]),new On(5,["opacity-0"]),new On(6,["opacity-90"]),new On(7,["transition-opacity ease-out duration-500"]),new On(8,["opacity-90"]),new On(9,["opacity-0"]),new On(10,[[f("div",{className:"w-[45px] h-4 not-italic font-medium text-xs leading-4 text-white flex-none order-none grow-0",children:"Copied"})]])])),f("div",{className:"px-1 cursor-pointer hover:text-primary-900 hover:bg-gray-300 rounded-md shrink",children:r})],["children",v.Children.toArray(Array.from(n))]),["onClick",l=>{navigator.clipboard.writeText(r),a(!0)}]])))],["children",v.Children.toArray(Array.from(t))])])))}function io(e,t){let n;const r=y([e,f("div",S(y([["className","mt-2 border-b border-gray-200"],(n=[f("dl",{className:"divide-y divide-gray-200 px-0 sm:px-4 max-w-2xl",children:v.Children.toArray(Array.from(t))})],["children",v.Children.toArray(Array.from(n))])])))]);return f("div",{children:v.Children.toArray(Array.from(r))})}function gv(e){const t=Wn(Rn);return io(so("Partner Information",void 0),ae(k(()=>{let n;return R(A((n=["ID",Fr(e.StreamId)],f(wl,{label:n[0],value:n[1]}))),k(()=>{let r;return R(A((r=["Name",bi(e.Name)],st(r[0],r[1]))),k(()=>{let s,i,o;return R(t.Roles.ReadProtectedData?(s=e.ContactDetails,s!=null?(i=s,R(A((o=["Contact",`${Mc(i.FirstName)} ${Oc(i.LastName)}`],st(o[0],o[1]))),k(()=>{let a;return A((a=["Phone",Vc(i.MobilePhone)],st(a[0],a[1])))}))):Ke()):Ke(),k(()=>{let a;return R(A((a=["Website",Tc(e.Website)],st(a[0],a[1]))),k(()=>{let l;return A((l=["Notes",We(j0(e.Notes),"")],st(l[0],l[1])))}))}))}))}))})))}let vr=class extends j{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Details","AccountList","SuperConfiguration","BenefitsOnboardingConfiguration","BankDetailsConfiguration","ProfileDirectory","Workspace"]}};class $v extends Q{constructor(t,n,r){super(),this.PartnerId=t,this.BackendUrl=n,this.AccessToken=r}}class wv extends Q{constructor(t,n,r){super(),this.PartnerId=t,this.BackendUrl=n,this.AccessToken=r}}class yv extends Q{constructor(t,n,r){super(),this.PartnerId=t,this.BackendUrl=n,this.AccessToken=r}}class bv extends Q{constructor(t,n,r){super(),this.PartnerId=t,this.BackendUrl=n,this.AccessToken=r}}class _v extends Q{constructor(t,n,r){super(),this.PartnerId=t,this.BackendUrl=n,this.AccessToken=r}}function vv(e){switch(e.tag){case 1:return"Accounts";case 2:return"Super";case 3:return"Benefits";case 4:return"Bank Details";case 5:return"Directory";case 6:return"Workspace";default:return"Details"}}function xv(e){switch(e.tag){case 1:return e.fields[0].partnerId;case 2:return e.fields[0].PartnerId;case 3:return e.fields[0].PartnerId;case 4:return e.fields[0].PartnerId;case 5:return e.fields[0].PartnerId;case 6:return e.fields[0].PartnerId;default:return Ve(Fr(e.fields[0].StreamId))}}function Cv(e){const t=nr(n=>Nf(vv(e),n[0],lr(Ms(n[1](xv(e))))),y([["Details",n=>new q(1,[n])],["Accounts",n=>new q(3,[n])],["Super",n=>new q(4,[n])],["Benefits",n=>new q(5,[n])],["Bank Details",n=>new q(6,[n])],["Directory",n=>new q(2,[n])]]));return f(Tf,{headers:t})}function Sv(e){switch(e.tag){case 1:return f(mv,e.fields[0]);case 2:return f(Dh,{partnerId:e.fields[0].PartnerId,backendUrl:e.fields[0].BackendUrl,accessToken:e.fields[0].AccessToken});case 3:return f(Fh,{partnerId:e.fields[0].PartnerId,backendUrl:e.fields[0].BackendUrl,accessToken:e.fields[0].AccessToken});case 4:return f(Vh,{partnerId:e.fields[0].PartnerId,backendUrl:e.fields[0].BackendUrl,accessToken:e.fields[0].AccessToken});case 5:return f(Lh,{partnerId:e.fields[0].PartnerId,backendUrl:e.fields[0].BackendUrl,accessToken:e.fields[0].AccessToken});case 6:return f(Bh,{backendUrl:e.fields[0].BackendUrl,accessToken:e.fields[0].AccessToken,partnerId:e.fields[0].PartnerId});default:return f(gv,e.fields[0])}}function Uh(e){let t,n;const r=e.mode;return f("div",S(y([["className","flex flex-row"],(t=[Cv(r),f("div",S(y([["className","w-full"],(n=[Sv(r)],["children",v.Children.toArray(Array.from(n))])])))],["children",v.Children.toArray(Array.from(t))])])))}let oo=class extends j{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["backend-url","access-token","partner-id","account-id"]}};function Av(e){const t=e.accessToken,n=e.backendUrl,r=e.accountId,s=e.partnerId,i=k(()=>R(A(new oo(1,[t])),k(()=>R(A(new oo(0,[n])),k(()=>R(A(new oo(2,[gi(s)])),k(()=>A(new oo(3,[$i(r)])))))))));return f("superhero-import-app",Bn(i,1))}class yl extends j{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["backend-url","access-token","account-id"]}}function kv(e){const t=e.accessToken,n=e.backendUrl,r=e.accountId,s=k(()=>R(A(new yl(1,[t])),k(()=>R(A(new yl(0,[n])),k(()=>A(new yl(2,[$i(r)])))))));return f("superhero-salpac-profile-admin",Bn(s,1))}class Ev extends j{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["RedirectionOff","RedirectionOn","Complete"]}}function ao(){return bo("AccountRegistry.AdminUI.FlareIdentityService.MigrationStateDto",[],Ev,()=>[[["lastUpdated",ye(yo("System.DateTime"))]],[["lastUpdated",yo("System.DateTime")]],[["lastUpdated",yo("System.DateTime")]]])}function lo(e){return`${e}/flare-identity/admin`}const Iv=5,Nv=1e3;function jh(e,t,n,r){return N.Delay(()=>{const s=Oi(Fa(qt(jt("Bearer %s"))(n)),r);return N.Bind(La(s),i=>{let o,a;const l=i,c=l.statusCode|0;return o=c|0,o>=200&&o<=299?N.Return(l):(a=c|0,(a===429?!0:a>=500)&&e>=1?N.Bind(xa(t),()=>N.ReturnFrom(jh(e-1,t,n,r))):N.Return(l))})})}const co=e=>t=>jh(Iv,Nv,e,t);function Tv(e,t,n,r){return N.Delay(()=>{let s;const i=co(t)(rn(new zt(0,[]),Ht(`${lo(e)}/accounts/${n}/migration`)));return s=N.Bind(i,o=>N.Return(new $(0,[o]))),N.Bind(s,o=>{const a=o;if(a.tag===1)return N.Return(new $(1,[a.fields[0]]));{const l=a.fields[0];if(l.statusCode===200){const c=en($e(nn(ao(),new pt(1,[]))),l.responseText);return N.Return(c)}else return N.Return(new $(1,["Unexpected response from flare identity backend"]))}})})}function Rv(e,t,n,r){return N.Delay(()=>{let s;const i=co(t)(rn(new zt(2,[]),Ht(`${lo(e)}/accounts/${n}/migration/start`)));return s=N.Bind(i,o=>N.Return(new $(0,[o]))),N.Bind(s,o=>{const a=o;if(a.tag===1)return N.Return(new $(1,[a.fields[0]]));{const l=a.fields[0];if(l.statusCode===200){let c;const d=en($e(nn(ao(),new pt(1,[]))),l.responseText);return c=N.Return(d),N.Bind(c,u=>{const m=u;if(m.tag===1)return N.Return(new $(1,[m.fields[0]]));{const h=m.fields[0];return h.tag===1?N.Return(new $(0,[h.fields[0]])):N.Return(new $(1,["Unexpected migration state after starting migration"]))}})}else return N.Return(new $(1,["Unexpected response from flare identity backend"]))}})})}function Mv(e,t,n,r){return N.Delay(()=>{let s;const i=co(t)(rn(new zt(2,[]),Ht(`${lo(e)}/accounts/${n}/migration/rollback`)));return s=N.Bind(i,o=>N.Return(new $(0,[o]))),N.Bind(s,o=>{const a=o;if(a.tag===1)return N.Return(new $(1,[a.fields[0]]));{const l=a.fields[0];if(l.statusCode===200){let c;const d=en($e(nn(ao(),new pt(1,[]))),l.responseText);return c=N.Return(d),N.Bind(c,u=>{const m=u;return m.tag===1?N.Return(new $(1,[m.fields[0]])):m.fields[0].tag===0?N.Return(new $(0,[void 0])):N.Return(new $(1,["Unexpected migration state after rolling back migration"]))})}else return N.Return(new $(1,["Unexpected response from flare identity backend"]))}})})}function Pv(e,t,n,r){return N.Delay(()=>{let s;const i=co(t)(rn(new zt(2,[]),Ht(`${lo(e)}/accounts/${n}/migration/stop`)));return s=N.Bind(i,o=>N.Return(new $(0,[o]))),N.Bind(s,o=>{const a=o;if(a.tag===1)return N.Return(new $(1,[a.fields[0]]));{const l=a.fields[0];if(l.statusCode===200){let c;const d=en($e(nn(ao(),new pt(1,[]))),l.responseText);return c=N.Return(d),N.Bind(c,u=>{const m=u;if(m.tag===1)return N.Return(new $(1,[m.fields[0]]));{const h=m.fields[0];return h.tag===2?N.Return(new $(0,[h.fields[0]])):N.Return(new $(1,["Unexpected migration state after stopping migration"]))}})}else return N.Return(new $(1,["Unexpected response from flare identity backend"]))}})})}class xr extends j{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["RedirectionOff","RedirectionOn","Complete","Failed"]}}class rs extends j{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["ConfirmStartRedirection","ConfirmRollbackRedirection","ConfirmStopMigration"]}}function bl(e){switch(e.tag){case 1:return new rs(1,[!0]);case 2:return new rs(2,[!0]);default:return new rs(0,[!0])}}class $n extends Q{constructor(t,n){super(),this.Status=t,this.CurrentModal=n}}let ln=class extends j{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["ShowModal","HideModal","RequestStartRedirection","RedirectionStarted","RequestRollbackRedirection","RedirectionRolledBack","RequestStopMigration","MigrationStopped","OperationFailed"]}};function Ov(e,t){return[new $n(e,void 0),le()]}function Dv(e,t,n,r,s){switch(r.tag){case 1:return[new $n(s.Status,void 0),le()];case 2:return[new $n(s.Status,Ge(bl,s.CurrentModal)),Kr(e,void 0,i=>new ln(3,[i]),i=>new ln(8,[i]))];case 3:return[new $n(new xr(1,[r.fields[0]]),void 0),le()];case 4:return[new $n(s.Status,Ge(bl,s.CurrentModal)),Kr(t,void 0,()=>new ln(5,[void 0]),i=>new ln(8,[i]))];case 5:return[new $n(new xr(0,[]),void 0),le()];case 6:return[new $n(s.Status,Ge(bl,s.CurrentModal)),Kr(n,void 0,i=>new ln(7,[i]),i=>new ln(8,[i]))];case 7:return[new $n(new xr(2,[r.fields[0]]),void 0),le()];case 8:return[new $n(new xr(3,[r.fields[0]]),void 0),le()];default:return[new $n(s.Status,r.fields[0]),le()]}}function Fv(e,t,n){let r,s,i,o,a,l,c,d,u,m,h,p,g,w;return f(es,{onClose:e,child:(r=[f("div",{className:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity","aria-hidden":!0}),f("div",S(y([["className","fixed inset-0 z-10 w-screen overflow-y-auto h-full flex items-center justify-center"],["onClick",C=>{e()}],(s=[f("div",S(y([(i="w-[512px] p-6 bg-white rounded-lg shadow-xl inline-flex justify-start items-start gap-4 overflow-hidden",["className",i]),["onClick",C=>{C.preventDefault(),C.stopPropagation()}],(o=[f("div",S(y([["className","w-10 h-10 relative bg-gradient-to-bl from-red-200 to-red-200/0 rounded"],(a=[f("div",{className:"w-6 h-6 left-[8px] top-[8px] absolute overflow-hidden",children:v.Children.toArray([Ha])})],["children",v.Children.toArray(Array.from(a))])]))),f("div",S(y([["className","flex-1 inline-flex flex-col justify-start items-start gap-4"],(l=[f("div",S(y([["className","self-stretch flex flex-col justify-start items-start gap-2"],(c=[f("div",{className:"self-stretch justify-start text-gray-900 text-lg font-semibold leading-6",children:"Turn off redirection?"}),f("div",S(y([["className","self-stretch justify-start"],(d=[f("div",{className:"text-gray-700 text-sm font-normal leading-5",children:v.Children.toArray(["Employees will be able to log into HRIS again."])})],["children",v.Children.toArray(Array.from(d))])])))],["children",v.Children.toArray(Array.from(c))])]))),f("div",S(y([["className","self-stretch inline-flex justify-end items-center gap-3"],(u=[f("button",S(y([(m="px-[17px] py-[9px] bg-white rounded-md outline outline-1 outline-offset-[-1px] outline-gray-300 flex justify-center items-center overflow-hidden",["className",m]),(h=[f("div",{className:"justify-start text-gray-700 text-sm font-medium leading-tight",children:"Cancel",onClick:C=>{e()}})],["children",v.Children.toArray(Array.from(h))])]))),f("div",S(y([["className","flex justify-start items-start gap-2"],(p=[f("button",S(y([(g="min-h-[34px] px-[13px] py-[9px] bg-[#2563EB] rounded-md flex justify-center items-center overflow-hidden",["className",g]),(w=ae(k(()=>R(A(f("div",{className:"justify-start text-white text-sm font-medium leading-none",children:"Turn off redirection",onClick:C=>{t()}})),k(()=>n?A(f("span",{className:"animate-spin",children:v.Children.toArray([Wa])})):Ke())))),["children",v.Children.toArray(Array.from(w))])])))],["children",v.Children.toArray(Array.from(p))])])))],["children",v.Children.toArray(Array.from(u))])])))],["children",v.Children.toArray(Array.from(l))])])))],["children",v.Children.toArray(Array.from(o))])])))],["children",v.Children.toArray(Array.from(s))])])))],f(ve,{},...r))})}function Vv(e,t,n){let r,s,i,o,a,l,c,d,u,m,h,p,g,w,C,x;return f(es,{onClose:e,child:(r=[f("div",{className:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity","aria-hidden":!0}),f("div",S(y([["className","fixed inset-0 z-10 w-screen overflow-y-auto h-full flex items-center justify-center"],["onClick",E=>{e()}],(s=[f("div",S(y([(i="w-[512px] p-6 bg-white rounded-lg shadow-xl inline-flex justify-start items-start gap-4 overflow-hidden",["className",i]),["onClick",E=>{E.preventDefault(),E.stopPropagation()}],(o=[f("div",S(y([["className","w-10 h-10 relative bg-gradient-to-bl from-red-200 to-red-200/0 rounded"],(a=[f("div",{className:"w-6 h-6 left-[8px] top-[8px] absolute overflow-hidden",children:v.Children.toArray([Ha])})],["children",v.Children.toArray(Array.from(a))])]))),f("div",S(y([["className","flex-1 inline-flex flex-col justify-start items-start gap-4"],(l=[f("div",S(y([["className","self-stretch flex flex-col justify-start items-start gap-2"],(c=[f("div",{className:"self-stretch justify-start text-gray-900 text-lg font-semibold leading-6",children:"Finalise redirection?"}),f("div",S(y([["className","self-stretch justify-start"],(d=[f("div",S(y([["className","text-gray-700 text-sm font-normal leading-5"],(u=[(m="This will make the new login the default: end users can only access their accounts through Workspace.",m)],["children",v.Children.toArray(Array.from(u))])]))),f("div",{className:"text-gray-700 text-sm font-bold leading-5 mt-2",children:"This action is not reversible."})],["children",v.Children.toArray(Array.from(d))])])))],["children",v.Children.toArray(Array.from(c))])]))),f("div",S(y([["className","self-stretch inline-flex justify-end items-center gap-3"],(h=[f("button",S(y([(p="px-[17px] py-[9px] bg-white rounded-md outline outline-1 outline-offset-[-1px] outline-gray-300 flex justify-center items-center overflow-hidden",["className",p]),(g=[f("div",{className:"justify-start text-gray-700 text-sm font-medium leading-tight",children:"Cancel",onClick:E=>{e()}})],["children",v.Children.toArray(Array.from(g))])]))),f("div",S(y([["className","flex justify-start items-start gap-2"],(w=[f("button",S(y([(C="min-h-[34px] px-[13px] py-[9px] bg-[#2563EB] rounded-md flex justify-center items-center overflow-hidden",["className",C]),(x=ae(k(()=>R(A(f("div",{className:"justify-start text-white text-sm font-medium leading-none",children:"Finalise redirection",onClick:E=>{t()}})),k(()=>n?A(f("span",{className:"animate-spin",children:v.Children.toArray([Wa])})):Ke())))),["children",v.Children.toArray(Array.from(x))])])))],["children",v.Children.toArray(Array.from(w))])])))],["children",v.Children.toArray(Array.from(h))])])))],["children",v.Children.toArray(Array.from(l))])])))],["children",v.Children.toArray(Array.from(o))])])))],["children",v.Children.toArray(Array.from(s))])])))],f(ve,{},...r))})}function Lv(e,t,n){let r,s,i,o,a,l,c,d,u,m,h,p,g,w,C,x;return f(es,{onClose:e,child:(r=[f("div",{className:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity","aria-hidden":!0}),f("div",S(y([["className","fixed inset-0 z-10 w-screen overflow-y-auto h-full flex items-center justify-center"],["onClick",E=>{e()}],(s=[f("div",S(y([(i="w-[512px] p-6 bg-white rounded-lg shadow-xl inline-flex justify-start items-start gap-4 overflow-hidden",["className",i]),["onClick",E=>{E.preventDefault(),E.stopPropagation()}],(o=[f("div",S(y([["className","w-10 h-10 relative bg-gradient-to-bl from-red-200 to-red-200/0 rounded"],(a=[f("div",{className:"w-6 h-6 left-[8px] top-[8px] absolute overflow-hidden",children:v.Children.toArray([Ha])})],["children",v.Children.toArray(Array.from(a))])]))),f("div",S(y([["className","flex-1 inline-flex flex-col justify-start items-start gap-4"],(l=[f("div",S(y([["className","self-stretch flex flex-col justify-start items-start gap-2"],(c=[f("div",{className:"self-stretch justify-start text-gray-900 text-lg font-semibold leading-6",children:"Turn on redirection?"}),f("div",S(y([["className","self-stretch justify-start"],(d=[f("div",S(y([["className","text-gray-700 text-sm font-normal leading-5"],(u=[(m="Employees will no longer be able to log into HRIS, they will see a message telling them to use the Flare App for benefits instead.",m)],["children",v.Children.toArray(Array.from(u))])]))),f("div",{className:"text-gray-700 text-sm font-bold leading-5 mt-2",children:"You can turn this off anytime."})],["children",v.Children.toArray(Array.from(d))])])))],["children",v.Children.toArray(Array.from(c))])]))),f("div",S(y([["className","self-stretch inline-flex justify-end items-center gap-3"],(h=[f("button",S(y([(p="px-[17px] py-[9px] bg-white rounded-md outline outline-1 outline-offset-[-1px] outline-gray-300 flex justify-center items-center overflow-hidden",["className",p]),(g=[f("div",{className:"justify-start text-gray-700 text-sm font-medium leading-tight",children:"Cancel",onClick:E=>{e()}})],["children",v.Children.toArray(Array.from(g))])]))),f("div",S(y([["className","flex justify-start items-start gap-2"],(w=[f("button",S(y([(C="min-h-[34px] px-[13px] py-[9px] bg-[#2563EB] rounded-md flex justify-center items-center overflow-hidden",["className",C]),(x=ae(k(()=>R(A(f("div",{className:"justify-start text-white text-sm font-medium leading-none",children:"Turn on redirection",onClick:E=>{t()}})),k(()=>n?A(f("span",{className:"animate-spin",children:v.Children.toArray([Wa])})):Ke())))),["children",v.Children.toArray(Array.from(x))])])))],["children",v.Children.toArray(Array.from(w))])])))],["children",v.Children.toArray(Array.from(h))])])))],["children",v.Children.toArray(Array.from(l))])])))],["children",v.Children.toArray(Array.from(o))])])))],["children",v.Children.toArray(Array.from(s))])])))],f(ve,{},...r))})}const Bv=f("h3",{className:"justify-start text-xl leading-6 font-semibold text-gray-900",children:"HRIS Migration - Redirection"}),Uv=f("div",S(y([["className","flex flex-col gap-2"],(()=>{let e,t,n,r;const s=[f("div",S(y([["className","self-stretch justify-start"],(e=[f("span",{className:"text-sm font-normal text-gray-700 leading-tight tracking-tight",children:"For accounts in the "}),f("span",{className:"text-sm font-semibold text-gray-700 leading-tight tracking-tight",children:"partial migration phase"}),f("span",S(y([["className","text-sm font-normal text-gray-700 leading-tight tracking-tight"],(t=[(n=", end users are redirected to the Flare App to access their benefits. The redirection remains active until turned off and/or the migration is complete. ",n)," ","The redirection setting is managed manually."],["children",v.Children.toArray(Array.from(t))])])))],["children",v.Children.toArray(Array.from(e))])]))),f("button",S(y([["className","inline-flex items-center justify-start gap-1"],(r=[f("div",{className:"justify-start text-[#1D4ED8] text-sm font-medium leading-tight",children:"Learn more about HRIS migration"}),Ty],["children",v.Children.toArray(Array.from(r))])])))];return["children",v.Children.toArray(Array.from(s))]})()])));function zh(e,t,n,r){return f("button",S(ae(k(()=>R(A(["type","button"]),k(()=>R(A(["className",ne(" ",ae(k(()=>R(A("flex min-h-9 items-center justify-center overflow-hidden rounded-md"),k(()=>R(A("px-4 py-2.5 text-sm font-medium leading-none"),k(()=>R(A("focus-visible:outline-2 focus-visible:outline-offset-2"),k(()=>R(A("disabled:bg-gray-300 disabled:text-gray-500 disabled:cursor-not-allowed disabled:border-gray-300"),k(()=>e)))))))))))]),k(()=>R(A(["children",n]),k(()=>R(A(["onClick",r]),k(()=>t.tag===0?je():y([["disabled",!0],["title",t.fields[0]]])))))))))))))}const jv=e=>t=>n=>zh(["bg-[#2563EB] text-white focus-visible:outline-[#2563EB]","disabled:bg-gray-300 disabled:text-gray-500 disabled:cursor-not-allowed disabled:border-gray-300"],e,t,n),Hh=e=>t=>n=>zh(["bg-white text-gray-700 outline outline-1 outline-offset-[-1px] outline-gray-300 focus-visible:outline-gray-500"],e,t,n);function zv(e,t){let n,r,s,i,o,a,l,c,d,u;return f("div",S(y([(n="w-full max-w-[480px] min-w-[280px] p-6 bg-white rounded-lg inline-flex flex-col justify-start items-start gap-4 overflow-hidden",["className",n]),(r=[f("div",S(y([["className","self-stretch flex flex-col justify-start items-start gap-2"],(s=[f("div",S(y([["className","self-stretch inline-flex justify-start items-center gap-3"],(i=[f("h4",{className:"justify-start text-base font-bold leading-5 text-gray-900",children:"Redirection"}),f("div",S(y([["className","flex justify-start items-start"],(o=[f("div",S(y([["className","px-2.5 py-0.5 bg-gray-100 rounded flex justify-center items-center"],(a=[f("div",{className:"text-center justify-start text-gray-800 text-xs font-medium leading-none",children:"Inactive"})],["children",v.Children.toArray(Array.from(a))])])))],["children",v.Children.toArray(Array.from(o))])])))],["children",v.Children.toArray(Array.from(i))])])))],["children",v.Children.toArray(Array.from(s))])]))),f("div",S(y([["className","self-stretch justify-start"],(l=[f("span",{className:"text-black text-sm font-semibold leading-tight tracking-tight",children:"When redirection is on, it will:"}),f("ul",S(y([["className","list-disc list-outside mt-2 mb-4 pl-6"],(c=[f("li",{className:"text-black text-sm font-normal",children:"Prevent end users from logging into HRIS."}),f("li",S(y([["className","text-black text-sm font-normal"],(d="Redirect end users to a temporary screen that prompts them to set up and access their benefits from the Flare App.",["children",d])])))],["children",v.Children.toArray(Array.from(c))])]))),f("div",{className:"text-black text-sm font-normal leading-tight tracking-tight",children:"You can turn this setting off at any time."})],["children",v.Children.toArray(Array.from(l))])]))),f("div",S(y([["className","inline-flex justify-start items-start gap-2"],(u=[jv(e)("Turn on redirection")(t)],["children",v.Children.toArray(Array.from(u))])])))],["children",v.Children.toArray(Array.from(r))])])))}function Hv(e,t,n,r){let s,i,o,a,l,c,d,u,m,h,p,g,w,C,x,E;const D=Rr(t,"dd/MM/yyyy");return f("div",S(y([(s="w-full max-w-[480px] min-w-[280px] p-6 bg-white rounded-lg inline-flex flex-col justify-start items-start gap-4 overflow-hidden",["className",s]),(i=[f("div",S(y([["className","self-stretch flex flex-col justify-start items-start gap-2"],(o=[f("div",S(y([["className","self-stretch inline-flex justify-start items-center gap-3"],(a=[f("div",{className:"justify-start text-base font-bold leading-tight text-gray-900",children:"Redirection"}),f("div",S(y([["className","flex justify-start items-start"],(l=[f("div",S(y([["className","pl-2 pr-2.5 py-0.5 bg-gray-100 rounded flex justify-center items-center gap-1.5"],(c=[f("div",S(y([["className","w-2 h-2 relative"],(d=[f("div",{className:"w-1.5 h-1.5 left-[1px] top-[1px] absolute bg-green-400 rounded-full"})],["children",v.Children.toArray(Array.from(d))])]))),f("div",{className:"text-center justify-start text-gray-800 text-xs font-medium leading-none",children:"Active"})],["children",v.Children.toArray(Array.from(c))])])))],["children",v.Children.toArray(Array.from(l))])])))],["children",v.Children.toArray(Array.from(a))])]))),f("div",S(y([["className","self-stretch inline-flex justify-start items-start gap-2"],(u=[f("div",{className:"justify-start text-sm font-normal text-[#686F7D] leading-tight tracking-tight",children:`Started ${D}`})],["children",v.Children.toArray(Array.from(u))])])))],["children",v.Children.toArray(Array.from(o))])]))),f("div",S(y([["className","self-stretch justify-start"],(m=[f("span",{className:"text-black text-sm font-semibold leading-tight tracking-tight",children:"Redirection is currently active, it will:"}),f("ul",S(y([["className","list-disc list-outside mt-2 mb-4 pl-6"],(h=[f("li",{className:"text-black text-sm font-normal",children:"Prevent end users from logging into HRIS."}),f("li",S(y([["className","text-black text-sm font-normal"],(p="Redirect end users to a temporary screen that prompts them to set up and access their benefits from the Flare App.",["children",p])])))],["children",v.Children.toArray(Array.from(h))])])))],["children",v.Children.toArray(Array.from(m))])]))),f("div",S(y([["className","inline-flex justify-start items-start gap-2"],(g=[Hh(e)("Turn off redirection")(n)],["children",v.Children.toArray(Array.from(g))])]))),f("div",S(y([["className","py-3 flex flex-col justify-start items-start gap-2.5"],(w=[f("div",{className:"w-[432px] h-0 outline outline-1 outline-offset-[-0.50px] outline-gray-100"})],["children",v.Children.toArray(Array.from(w))])]))),f("div",S(y([["className","self-stretch justify-start"],(C=[f("div",{className:"text-black text-sm font-semibold leading-tight tracking-tight",children:v.Children.toArray(["Has the migration finished?"])}),f("div",S(y([["className","mt-4 text-black text-sm font-normal leading-tight tracking-tight"],(x="If all other migration steps are complete, you can make the new login the default by clicking on “Finalise redirection”. From then on, end users will only access their accounts through Workspace.",["children",x])])))],["children",v.Children.toArray(Array.from(C))])]))),f("div",S(y([["className","inline-flex justify-start items-start gap-2"],(E=[Hh(e)("Finalise redirection")(r)],["children",v.Children.toArray(Array.from(E))])])))],["children",v.Children.toArray(Array.from(i))])])))}function Wv(e){let t,n,r,s,i,o,a;const l=Rr(e,"dd/MM/yyyy");return f("div",S(y([(t="w-full max-w-[480px] min-w-[280px] p-6 bg-white rounded-lg inline-flex flex-col justify-start items-start gap-4 overflow-hidden",["className",t]),(n=[f("div",S(y([["className","self-stretch flex flex-col justify-start items-start gap-2"],(r=[f("div",S(y([["className","self-stretch inline-flex justify-start items-center gap-3"],(s=[f("h4",{className:"justify-start text-gray-900 text-base font-bold leading-tight",children:"Redirection"}),f("div",S(y([["className","flex justify-start items-start"],(i=[f("div",S(y([["className","px-2.5 py-0.5 bg-green-100 rounded flex justify-center items-center"],(o=[f("div",{className:"text-center justify-start text-green-800 text-xs font-medium leading-none",children:"Completed"})],["children",v.Children.toArray(Array.from(o))])])))],["children",v.Children.toArray(Array.from(i))])])))],["children",v.Children.toArray(Array.from(s))])]))),f("div",S(y([["className","self-stretch inline-flex justify-start items-start gap-2"],(a=[f("div",{className:"justify-start text-sm font-normal text-[#686F7D] leading-tight tracking-tight",children:`Completed on ${l}`})],["children",v.Children.toArray(Array.from(a))])])))],["children",v.Children.toArray(Array.from(r))])]))),f("div",{className:"self-stretch justify-start text-black text-sm font-normal leading-tight tracking-tight",children:"Redirection for this account has been completed as part of migration. No further action is needed."})],["children",v.Children.toArray(Array.from(n))])])))}function Gv(e){let t,n;const r=e.stopMigration,s=e.rollbackRedirection,i=e.startRedirection,o=e.migrationStatus,a=e.roles,l=dr(()=>ur(()=>Ov(o),(p,g)=>Dv(i,s,r,p,g),(p,g)=>{}),void 0,void 0),c=l[0],d=l[1],u=p=>{d(new ln(0,[p]))},m=()=>{d(new ln(1,[]))},h=a.ProvisionAccounts?new $(0,[void 0]):new $(1,["You do not have permission to manage redirection for this account. (Requires AccountRegistry.ProvisionAccounts permission)"]);return f("div",S(y([["className","flex flex-col gap-4 bg-gray-100"],(t=[Bv,Uv,f("div",S(y([["className","flex mb-4 gap-6 flex-col"],(n=ae(k(()=>{let p;return R((p=c.Status,p.tag===1?A(Hv(h,p.fields[0],g=>{u(new rs(1,[!1]))},g=>{u(new rs(2,[!1]))})):p.tag===2?A(Wv(p.fields[0])):p.tag===3?A(f("div",{className:"text-red-600",children:`Operation failed: ${p.fields[0]}`})):A(zv(h,g=>{u(new rs(0,[!1]))}))),k(()=>{let g,w,C;const x=c.CurrentModal;return x==null?A(ge()):x.tag===1?(g=x.fields[0],A(Fv(m,()=>{d(new ln(4,[]))},g))):x.tag===2?(w=x.fields[0],A(Vv(m,()=>{d(new ln(6,[]))},w))):(C=x.fields[0],A(Lv(m,()=>{d(new ln(2,[]))},C)))}))})),["children",v.Children.toArray(Array.from(n))])])))],["children",v.Children.toArray(Array.from(t))])])))}let Wh=class extends j{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Initialise","LoadedMigrationStatus"]}},Zs=class extends j{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Loading","Loaded","Failed"]}};function qv(){return[new Zs(0,[]),ee(e=>{e(new Wh(0,[]))})]}function Kv(e,t,n){if(t.tag===1){if(t.fields[0].tag===1)return[new Zs(2,[]),le()];switch(t.fields[0].fields[0].tag){case 1:return[new Zs(1,[new xr(1,[t.fields[0].fields[0].fields[0]])]),le()];case 2:return[new Zs(1,[new xr(2,[t.fields[0].fields[0].fields[0]])]),le()];default:return[new Zs(1,[new xr(0,[])]),le()]}}else return[n,Is(r=>{Ns(r)},e,void 0,r=>new Wh(1,[r]))]}function Zv(e){const t=e.flareAccountId,n=Wn(Rn),r=dr(()=>ur(qv,(i,o)=>Kv(()=>Tv(n.BackendUrl,n.AccessToken,t),i,o),(i,o)=>{}),void 0,void 0)[0],s=ae(k(()=>r.tag===1?A(f(Gv,{roles:n.Roles,migrationStatus:r.fields[0],startRedirection:()=>Rv(n.BackendUrl,n.AccessToken,t),rollbackRedirection:()=>Mv(n.BackendUrl,n.AccessToken,t),stopMigration:()=>Pv(n.BackendUrl,n.AccessToken,t)})):r.tag===2?A(f("div",{children:"We are unable to load the HRIS Migration component at this time."})):A(f("div",{children:"Loading..."}))));return f("div",{children:v.Children.toArray(Array.from(s))})}function Jv({hasLegalEntity:e,defaultValues:t,validateName:n,validateBusinessName:r,validateBusinessNumber:s,onSubmit:i,closeModal:o}){const{handleSubmit:a,control:l}=zi({mode:"onChange",defaultValues:t});return M(ve,{children:[M("div",{className:"font-bold text-lg mb-4",children:"Account details"}),M("form",{className:"space-y-6",onSubmit:a(i),children:[M("div",{children:[M($t,{label:"Name",name:"Name",control:l,placeholder:"e.g. Acme Co",validate:n}),M("p",{className:"mt-2 text-sm font-normal text-gray-500",children:"This will be used as a display name."})]}),e&&M($t,{label:"Business Name",name:"BusinessName",control:l,placeholder:"e.g. ACME LTD PTY",validate:r}),e&&M($t,{label:"Business Number",name:"BusinessNumber",control:l,validate:s,isNumber:!0}),M(Hi,{primaryLabel:"Update",secondaryLabel:"Cancel",secondaryOnClick:o})]})]})}function Yv(e,t,n){return f(Jv,{hasLegalEntity:n.LegalEntity!=null,defaultValues:new Py(n.Name,We(Ge(r=>r.BusinessName,n.LegalEntity),""),We(Ge(r=>r.BusinessNumber,n.LegalEntity),"")),validateName:r=>mt(zo(r)),validateBusinessName:r=>mt(Bc(r)),validateBusinessNumber:r=>mt(Uc(r)),onSubmit:r=>{const s=new Id(r.Name,Ge(i=>new Nd(r.BusinessName,r.BusinessNumber),n.LegalEntity));Ce(s,n)?e():t(s)},closeModal:e})}function Xv(e){const t=e.account,n=e.updateAccount,r=Wn(Rn),s=Gn(!1),i=s[1],o=ae(k(()=>{let a;return R(A(io(f("div",S(y([["className","flex flex-row space-x-4 items-center"],(a=[so("Account Information",void 0),f("button",{className:ne(" ",ae(k(()=>R(r.Roles.ProvisionAccounts?Ke():A("hidden"),k(()=>A("inline-flex items-center rounded border border-transparent bg-indigo-600 px-2.5 py-1.5 mr-2 text-xs font-medium text-white shadow-sm hover:bg-indigo-700 focus:outline-none")))))),onClick:l=>{i(!0)},type:"button",children:v.Children.toArray([ky])})],["children",v.Children.toArray(Array.from(a))])]))),ae(k(()=>{let l;return R(A((l=["ID",t.StreamId],f(wl,{label:l[0],value:l[1]}))),k(()=>{let c;return R(A((c=["Name",t.Name],f(wl,{label:c[0],value:c[1]}))),k(()=>{let d;return R(A((d=["External ID",We(t.ExternalId,"")],st(d[0],d[1]))),k(()=>{let u;return R(A((u=["Channel ID",We(t.ChannelId,"")],st(u[0],u[1]))),k(()=>{let m;if(r.Roles.ReadProtectedData){const h=t.ContactDetails;if(h!=null){const p=h;return R(A((m=["Contact",`${p.FirstName} ${p.LastName}`],st(m[0],m[1]))),k(()=>{let g;return R(A((g=["Phone",p.MobilePhone],st(g[0],g[1]))),k(()=>{let w;return A((w=["Email",p.Email],st(w[0],w[1])))}))}))}else return Ke()}else return Ke()}))}))}))}))})))),k(()=>{let l,c,d,u,m,h,p;return s[0]?A((l=()=>{i(!1)},c=new Id(t.Name,Ge(g=>new Nd(g.BusinessName,g.BusinessNumber),t.LegalEntity)),f(es,{onClose:l,child:f("div",S(ee((d=[f("div",{className:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity","aria-hidden":!0}),f("div",S(y([["className","fixed inset-0 z-10 w-screen overflow-y-auto"],(u=[f("div",S(y([["className","fixed inset-0 z-10 w-screen overflow-y-auto h-full flex items-center justify-center"],(m=[f("div",S(y([["className","w-[480px] bg-white shadow-xl rounded-lg"],(h=[f("div",{className:"pt-6 px-6 pb-4 border-b font-bold text-xl",children:"Update account"}),f("div",S(y([["className","pt-4 mx-6"],(p=[f("div",{className:"mb-4 text-sm font-normal text-gray-500",children:v.Children.toArray(["All fields are required."])}),Yv(l,g=>{n(g),i(!1)},c)],["children",v.Children.toArray(Array.from(p))])])))],["children",v.Children.toArray(Array.from(h))])])))],["children",v.Children.toArray(Array.from(m))])])))],["children",v.Children.toArray(Array.from(u))])])))],["children",v.Children.toArray(Array.from(d))]))))}))):Ke()}))}));return f(ve,{},...o)}function Qv(e){let t,n,r,s,i,o,a;if(e==null)return ge();{const l=e;return io(so("Legal Entity",void 0),y([(t=["Business Name",l.BusinessName],st(t[0],t[1])),(n=["Business Number",l.BusinessNumber],st(n[0],n[1])),(r=["Address Line 1",l.Address1],st(r[0],r[1])),(s=["Address Line 2",We(l.Address2,"")],st(s[0],s[1])),(i=["City",l.City],st(i[0],i[1])),(o=["State",We(l.State,"")],st(o[0],o[1])),(a=["Postcode",l.Postcode],st(a[0],a[1]))]))}}function ex(e){let t;if(e==null)return ge();{const n=e;return io(so("Legal Entity",void 0),ee((t=["Notes",n],st(t[0],t[1]))))}}function tx(e){const t=e.account,n=e.updateAccount,r=y([f(Xv,{updateAccount:n,account:t}),Qv(t.LegalEntity),ex(t.Notes)]);return f("div",{children:v.Children.toArray(Array.from(r))})}class Dn extends j{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Details","ProfilesDirectory","Users","SuperConfiguration","BenefitsOnboardingConfiguration","BankDetailsConfiguration","SalaryPackagingConfiguration","Workspace","HrisMigration"]}}function nx(e){switch(e.tag){case 1:return"Directory";case 2:return"Users";case 3:return"Super";case 4:return"Benefits";case 5:return"Bank Details";case 6:return"Salary Packaging";case 7:return"Workspace";case 8:return"HRIS Migration";default:return"Details"}}function rx(e,t){const n=[e,t];return Ce(n[0],Ve("7cb0e66f-74b7-49f1-a3aa-be7970b48cb3"))||Ce(n[0],Ve("1c74bcf9-b795-42c6-88dc-d45c8f8827d4"))||Ce(n[0],Ve("89837631-c6b3-4635-a08d-fdd3383f4fbb"))?!0:Ce(n[0],Ve("e8269f8b-4f5e-482a-863e-4512cca40ec6"))}function sx(e,t,n){const r=[e,t],s=nr(i=>Nf(nx(n),i[0],lr(Ms(i[1](r)))),ae(k(()=>R(A(["Details",i=>new q(8,[i[0],i[1]])]),k(()=>R(A(["Workspace",i=>new q(15,[i[0],i[1]])]),k(()=>R(A(["Directory",i=>new q(9,[i[0],i[1]])]),k(()=>R(A(["Users",i=>new q(10,[i[0],i[1]])]),k(()=>R(A(["Super",i=>new q(11,[i[0],i[1]])]),k(()=>R(A(["Benefits",i=>new q(12,[i[0],i[1]])]),k(()=>R(A(["Bank Details",i=>new q(13,[i[0],i[1]])]),k(()=>R(A(["Salary Packaging",i=>new q(14,[i[0],i[1]])]),k(()=>rx(r[0],r[1])?A(["HRIS Migration",i=>new q(16,[i[0],i[1]])]):Ke())))))))))))))))))));return f(Tf,{headers:s})}function ix(e){const t=e.account,n=e.mode,r=e.props,s=e.updateAccount,i=Wn(Rn),o=r.accountDetails,a=o[0],l=o[1];switch(n.tag){case 1:return f(Lh,{partnerId:a,accountId:l,backendUrl:i.BackendUrl,accessToken:i.AccessToken});case 2:return f(Av,{partnerId:a,accountId:l,backendUrl:i.BackendUrl,accessToken:i.AccessToken});case 3:return f(Dh,{partnerId:a,accountId:l,backendUrl:i.BackendUrl,accessToken:i.AccessToken});case 4:return f(Fh,{partnerId:a,accountId:l,backendUrl:i.BackendUrl,accessToken:i.AccessToken});case 5:return f(Vh,{partnerId:a,accountId:l,backendUrl:i.BackendUrl,accessToken:i.AccessToken});case 6:return f(kv,{accountId:l,backendUrl:i.BackendUrl,accessToken:i.AccessToken});case 7:return f(Bh,{backendUrl:i.BackendUrl,accessToken:i.AccessToken,partnerId:a,accountId:l});case 8:{let c,d,u;switch(t.tag){case 0:case 1:{c=2;break}case 3:{c=3,u=t.fields[0];break}default:t.fields[0].tag===0?(c=0,d=t.fields[0].fields[0]):c=1}switch(c){case 0:{const m=d.ExternalId;return m==null?f(an,{error:"This account does not have externalId (Flare AccountId)"}):f(Zv,{flareAccountId:m})}case 1:return f(an,{error:"There was an error retrieving account"});case 2:return f(Ks,null);default:{const m=Ze(u);return f(an,{error:m})}}}default:{let c,d,u;switch(t.tag){case 0:case 1:{c=2;break}case 3:{c=3,u=t.fields[0];break}default:t.fields[0].tag===0?(c=0,d=t.fields[0].fields[0]):c=1}switch(c){case 0:return f(tx,{updateAccount:s,account:d});case 1:return f(an,{error:"There was an error retrieving account "});case 2:return f(Ks,null);default:{const m=Ze(u);return f(an,{error:m})}}}}}function ox(e){let t,n,r;const s=e.account,i=e.mode,o=e.props,a=e.updateAccount;return f("div",S(y([["className","flex flex-row"],(t=[(n=o.accountDetails,sx(n[0],n[1],i)),f("div",S(y([["className","w-full"],(r=[f(ix,{updateAccount:a,props:o,mode:i,account:s})],["children",v.Children.toArray(Array.from(r))])])))],["children",v.Children.toArray(Array.from(t))])])))}class ss extends j{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["NotStarted","Started","Finished","Failed"]}}let uo=class extends j{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["UpdateAccountId","Search","SearchSuccess","SearchFailure"]}},is=class extends Q{constructor(t,n){super(),this.AccountId=t,this.AccountDetails=n}};function ax(){return[new is(void 0,new ss(0,[])),le()]}function lx(e,t,n,r){let s,i;switch(n.tag){case 1:{const o=r.AccountId;if(o!=null){const a=o;return[new is(r.AccountId,new ss(1,[])),Kr(()=>Uw(e,t,a),void 0,l=>new uo(2,[l]),l=>new uo(3,[l]))]}else return[new is(r.AccountId,new ss(3,["Account Id is required"])),le()]}case 2:{const o=n.fields[0];return[new is(r.AccountId,new ss(2,[o])),(s=["account-registry","partners",`${o.PartnerId}`,"accounts",`${o.AccountId}`],i=[s[0],s[1],s[2],s[3],s[4]],Xe(a=>{ft(y(i))}))]}case 3:return[new is(r.AccountId,new ss(3,["Account not found"])),le()];default:return[new is(Rt(n.fields[0]),r.AccountDetails),le()]}}const cx=f("h3",{className:"text-base font-semibold text-gray-900",id:"modal-title",children:"Account Search"}),ux=f("div",S(y([["className","mt-2"],(()=>{let e;const t=[f("p",S(y([["className","text-sm text-gray-500 whitespace-pre-line"],(e=`Enter an Account Id below to search for an account.
51
+ `));let m=d.props,h=typeof(m==null?void 0:m.className)=="function"?(...$)=>qi(m==null?void 0:m.className(...$),l.className):qi(m==null?void 0:m.className,l.className),p=h?{className:h}:{};return fa(d,Object.assign({},wh(d.props,ll(cl(l,["ref"]))),u,c,{ref:s(d.ref,c.ref)},p))}return f(i,Object.assign({},cl(l,["ref"]),i!==ve&&c,i!==ve&&u),d)}function Zb(...e){return e.every(t=>t==null)?void 0:t=>{for(let n of e)n!=null&&(typeof n=="function"?n(t):n.current=t)}}function wh(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let s in r)s.startsWith("on")&&typeof r[s]=="function"?(n[s]!=null||(n[s]=[]),n[s].push(r[s])):t[s]=r[s];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(n).map(r=>[r,void 0])));for(let r in n)Object.assign(t,{[r](s,...i){let o=n[r];for(let a of o){if((s instanceof Event||(s==null?void 0:s.nativeEvent)instanceof Event)&&s.defaultPrevented)return;a(s,...i)}}});return t}function gn(e){var t;return Object.assign(Hn(e),{displayName:(t=e.displayName)!=null?t:e.name})}function ll(e){let t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}function cl(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}let Jb="div";var yh=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(yh||{});function Yb(e,t){var n;let{features:r=1,...s}=e,i={ref:t,"aria-hidden":(r&2)===2?!0:(n=s["aria-hidden"])!=null?n:void 0,hidden:(r&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(r&4)===4&&(r&2)!==2&&{display:"none"}}};return Pn({ourProps:i,theirProps:s,slot:{},defaultTag:Jb,name:"Hidden"})}let Xb=gn(Yb),ul=jn(null);ul.displayName="OpenClosedContext";var Ft=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(Ft||{});function dl(){return fn(ul)}function bh({value:e,children:t}){return Z.createElement(ul.Provider,{value:e},t)}function Qb(e){function t(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",t))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",t),t())}let br=[];Qb(()=>{function e(t){t.target instanceof HTMLElement&&t.target!==document.body&&br[0]!==t.target&&(br.unshift(t.target),br=br.filter(n=>n!=null&&n.isConnected),br.splice(10))}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})});function e_(e){let t=e.parentElement,n=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(n=t),t=t.parentElement;let r=(t==null?void 0:t.getAttribute("disabled"))==="";return r&&t_(n)?!1:r}function t_(e){if(!e)return!1;let t=e.previousElementSibling;for(;t!==null;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}function n_(e){throw new Error("Unexpected object: "+e)}var tt=(e=>(e[e.First=0]="First",e[e.Previous=1]="Previous",e[e.Next=2]="Next",e[e.Last=3]="Last",e[e.Specific=4]="Specific",e[e.Nothing=5]="Nothing",e))(tt||{});function _h(e,t){let n=t.resolveItems();if(n.length<=0)return null;let r=t.resolveActiveIndex(),s=r??-1;switch(e.focus){case 0:{for(let i=0;i<n.length;++i)if(!t.resolveDisabled(n[i],i,n))return i;return r}case 1:{for(let i=s-1;i>=0;--i)if(!t.resolveDisabled(n[i],i,n))return i;return r}case 2:{for(let i=s+1;i<n.length;++i)if(!t.resolveDisabled(n[i],i,n))return i;return r}case 3:{for(let i=n.length-1;i>=0;--i)if(!t.resolveDisabled(n[i],i,n))return i;return r}case 4:{for(let i=0;i<n.length;++i)if(t.resolveId(n[i],i,n)===e.id)return i;return r}case 5:return null;default:n_(e)}}function vh(e={},t=null,n=[]){for(let[r,s]of Object.entries(e))Ch(n,xh(t,r),s);return n}function xh(e,t){return e?e+"["+t+"]":t}function Ch(e,t,n){if(Array.isArray(n))for(let[r,s]of n.entries())Ch(e,xh(t,r.toString()),s);else n instanceof Date?e.push([t,n.toISOString()]):typeof n=="boolean"?e.push([t,n?"1":"0"]):typeof n=="string"?e.push([t,n]):typeof n=="number"?e.push([t,`${n}`]):n==null?e.push([t,""]):vh(n,t,e)}var Vt=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(Vt||{}),r_={},s_=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(s_||{}),i_=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(i_||{}),o_=(e=>(e[e.Pointer=0]="Pointer",e[e.Focus=1]="Focus",e[e.Other=2]="Other",e))(o_||{}),a_=(e=>(e[e.OpenCombobox=0]="OpenCombobox",e[e.CloseCombobox=1]="CloseCombobox",e[e.GoToOption=2]="GoToOption",e[e.RegisterOption=3]="RegisterOption",e[e.UnregisterOption=4]="UnregisterOption",e[e.RegisterLabel=5]="RegisterLabel",e[e.SetActivationTrigger=6]="SetActivationTrigger",e[e.UpdateVirtualOptions=7]="UpdateVirtualOptions",e))(a_||{});function fl(e,t=n=>n){let n=e.activeOptionIndex!==null?e.options[e.activeOptionIndex]:null,r=t(e.options.slice()),s=r.length>0&&r[0].dataRef.current.order!==null?r.sort((o,a)=>o.dataRef.current.order-a.dataRef.current.order):Lb(r,o=>o.dataRef.current.domRef.current),i=n?s.indexOf(n):null;return i===-1&&(i=null),{options:s,activeOptionIndex:i}}let l_={1(e){var t;return(t=e.dataRef.current)!=null&&t.disabled||e.comboboxState===1?e:{...e,activeOptionIndex:null,comboboxState:1}},0(e){var t,n;if((t=e.dataRef.current)!=null&&t.disabled||e.comboboxState===0)return e;if((n=e.dataRef.current)!=null&&n.value){let r=e.dataRef.current.calculateIndex(e.dataRef.current.value);if(r!==-1)return{...e,activeOptionIndex:r,comboboxState:0}}return{...e,comboboxState:0}},2(e,t){var n,r,s,i,o;if((n=e.dataRef.current)!=null&&n.disabled||(r=e.dataRef.current)!=null&&r.optionsRef.current&&!((s=e.dataRef.current)!=null&&s.optionsPropsRef.current.static)&&e.comboboxState===1)return e;if(e.virtual){let d=t.focus===tt.Specific?t.idx:_h(t,{resolveItems:()=>e.virtual.options,resolveActiveIndex:()=>{var m,h;return(h=(m=e.activeOptionIndex)!=null?m:e.virtual.options.findIndex(p=>!e.virtual.disabled(p)))!=null?h:null},resolveDisabled:e.virtual.disabled,resolveId(){throw new Error("Function not implemented.")}}),u=(i=t.trigger)!=null?i:2;return e.activeOptionIndex===d&&e.activationTrigger===u?e:{...e,activeOptionIndex:d,activationTrigger:u}}let a=fl(e);if(a.activeOptionIndex===null){let d=a.options.findIndex(u=>!u.dataRef.current.disabled);d!==-1&&(a.activeOptionIndex=d)}let l=t.focus===tt.Specific?t.idx:_h(t,{resolveItems:()=>a.options,resolveActiveIndex:()=>a.activeOptionIndex,resolveId:d=>d.id,resolveDisabled:d=>d.dataRef.current.disabled}),c=(o=t.trigger)!=null?o:2;return e.activeOptionIndex===l&&e.activationTrigger===c?e:{...e,...a,activeOptionIndex:l,activationTrigger:c}},3:(e,t)=>{var n,r,s;if((n=e.dataRef.current)!=null&&n.virtual)return{...e,options:[...e.options,t.payload]};let i=t.payload,o=fl(e,l=>(l.push(i),l));e.activeOptionIndex===null&&(r=e.dataRef.current)!=null&&r.isSelected(t.payload.dataRef.current.value)&&(o.activeOptionIndex=o.options.indexOf(i));let a={...e,...o,activationTrigger:2};return(s=e.dataRef.current)!=null&&s.__demoMode&&e.dataRef.current.value===void 0&&(a.activeOptionIndex=0),a},4:(e,t)=>{var n;if((n=e.dataRef.current)!=null&&n.virtual)return{...e,options:e.options.filter(s=>s.id!==t.id)};let r=fl(e,s=>{let i=s.findIndex(o=>o.id===t.id);return i!==-1&&s.splice(i,1),s});return{...e,...r,activationTrigger:2}},5:(e,t)=>e.labelId===t.id?e:{...e,labelId:t.id},6:(e,t)=>e.activationTrigger===t.trigger?e:{...e,activationTrigger:t.trigger},7:(e,t)=>{var n;if(((n=e.virtual)==null?void 0:n.options)===t.options)return e;let r=e.activeOptionIndex;if(e.activeOptionIndex!==null){let s=t.options.indexOf(e.virtual.options[e.activeOptionIndex]);s!==-1?r=s:r=null}return{...e,activeOptionIndex:r,virtual:Object.assign({},e.virtual,{options:t.options})}}},hl=jn(null);hl.displayName="ComboboxActionsContext";function Gs(e){let t=fn(hl);if(t===null){let n=new Error(`<${e} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Gs),n}return t}let Sh=jn(null);function c_(e){var t;let n=_r("VirtualProvider"),[r,s]=ft(()=>{let l=n.optionsRef.current;if(!l)return[0,0];let c=window.getComputedStyle(l);return[parseFloat(c.paddingBlockStart||c.paddingTop),parseFloat(c.paddingBlockEnd||c.paddingBottom)]},[n.optionsRef.current]),i=kb({scrollPaddingStart:r,scrollPaddingEnd:s,count:n.virtual.options.length,estimateSize(){return 40},getScrollElement(){var l;return(l=n.optionsRef.current)!=null?l:null},overscan:12}),[o,a]=Je(0);return et(()=>{a(l=>l+1)},[(t=n.virtual)==null?void 0:t.options]),Z.createElement(Sh.Provider,{value:i},Z.createElement("div",{style:{position:"relative",width:"100%",height:`${i.getTotalSize()}px`},ref:l=>{if(l){if(typeof process<"u"&&r_.JEST_WORKER_ID!==void 0||n.activationTrigger===0)return;n.activeOptionIndex!==null&&n.virtual.options.length>n.activeOptionIndex&&i.scrollToIndex(n.activeOptionIndex)}}},i.getVirtualItems().map(l=>{var c;return Z.createElement(ve,{key:l.key},Z.cloneElement((c=e.children)==null?void 0:c.call(e,{option:n.virtual.options[l.index],open:n.comboboxState===0}),{key:`${o}-${l.key}`,"data-index":l.index,"aria-setsize":n.virtual.options.length,"aria-posinset":l.index+1,style:{position:"absolute",top:0,left:0,transform:`translateY(${l.start}px)`,overflowAnchor:"none"}}))})))}let ml=jn(null);ml.displayName="ComboboxDataContext";function _r(e){let t=fn(ml);if(t===null){let n=new Error(`<${e} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,_r),n}return t}function u_(e,t){return pt(t.type,l_,e,t)}let d_=ve;function f_(e,t){let{value:n,defaultValue:r,onChange:s,form:i,name:o,by:a=null,disabled:l=!1,__demoMode:c=!1,nullable:d=!1,multiple:u=!1,immediate:m=!1,virtual:h=null,...p}=e,$=!1,w=null,[C=u?[]:void 0,x]=Tb(n,s,r),[E,O]=Ur(u_,{dataRef:Yo(),comboboxState:c?0:1,options:[],virtual:null,activeOptionIndex:null,activationTrigger:2,labelId:null}),L=he(!1),X=he({static:!1,hold:!1}),pe=he(null),Se=he(null),de=he(null),Y=he(null),me=ce(typeof a=="string"?(ae,Te)=>{let wt=a;return(ae==null?void 0:ae[wt])===(Te==null?void 0:Te[wt])}:a??((ae,Te)=>ae===Te)),G=ce(ae=>E.options.findIndex(Te=>me(Te.dataRef.current.value,ae))),re=zn(ae=>pt(P.mode,{1:()=>C.some(Te=>me(Te,ae)),0:()=>me(C,ae)}),[C]),Pe=ce(ae=>E.activeOptionIndex===G(ae)),P=ft(()=>({...E,immediate:$,optionsPropsRef:X,labelRef:pe,inputRef:Se,buttonRef:de,optionsRef:Y,value:C,defaultValue:r,disabled:l,mode:u?1:0,virtual:E.virtual,get activeOptionIndex(){if(L.current&&E.activeOptionIndex===null&&E.options.length>0){let ae=E.options.findIndex(Te=>!Te.dataRef.current.disabled);if(ae!==-1)return ae}return E.activeOptionIndex},calculateIndex:G,compare:me,isSelected:re,isActive:Pe,nullable:d,__demoMode:c}),[C,r,l,u,d,c,E,w]);et(()=>{},[w,void 0]),et(()=>{E.dataRef.current=P},[P]),zb([P.buttonRef,P.inputRef,P.optionsRef],()=>Js.closeCombobox(),P.comboboxState===0);let Ae=ft(()=>{var ae,Te,wt;return{open:P.comboboxState===0,disabled:l,activeIndex:P.activeOptionIndex,activeOption:P.activeOptionIndex===null?null:P.virtual?P.virtual.options[(ae=P.activeOptionIndex)!=null?ae:0]:(wt=(Te=P.options[P.activeOptionIndex])==null?void 0:Te.dataRef.current.value)!=null?wt:null,value:C}},[P,l,C]),fe=ce(()=>{if(P.activeOptionIndex!==null){if(P.virtual)Sr(P.virtual.options[P.activeOptionIndex]);else{let{dataRef:ae}=P.options[P.activeOptionIndex];Sr(ae.current.value)}Js.goToOption(tt.Specific,P.activeOptionIndex)}}),rt=ce(()=>{O({type:0}),L.current=!0}),Ne=ce(()=>{O({type:1}),L.current=!1}),Ue=ce((ae,Te,wt)=>(L.current=!1,ae===tt.Specific?O({type:2,focus:tt.Specific,idx:Te,trigger:wt}):O({type:2,focus:ae,trigger:wt}))),Et=ce((ae,Te)=>(O({type:3,payload:{id:ae,dataRef:Te}}),()=>{P.isActive(Te.current.value)&&(L.current=!0),O({type:4,id:ae})})),cn=ce(ae=>(O({type:5,id:ae}),()=>O({type:5,id:null}))),Sr=ce(ae=>pt(P.mode,{0(){return x==null?void 0:x(ae)},1(){let Te=P.value.slice(),wt=Te.findIndex(cs=>me(cs,ae));return wt===-1?Te.push(ae):Te.splice(wt,1),x==null?void 0:x(Te)}})),Lt=ce(ae=>{O({type:6,trigger:ae})}),Js=ft(()=>({onChange:Sr,registerOption:Et,registerLabel:cn,goToOption:Ue,closeCombobox:Ne,openCombobox:rt,setActivationTrigger:Lt,selectActiveOption:fe}),[]),Ys=t===null?{}:{ref:t},Ar=he(null),Xs=Hs();return Me(()=>{Ar.current&&r!==void 0&&Xs.addEventListener(Ar.current,"reset",()=>{x==null||x(r)})},[Ar,x]),Z.createElement(hl.Provider,{value:Js},Z.createElement(ml.Provider,{value:P},Z.createElement(bh,{value:pt(P.comboboxState,{0:Ft.Open,1:Ft.Closed})},o!=null&&C!=null&&vh({[o]:C}).map(([ae,Te],wt)=>Z.createElement(Xb,{features:yh.Hidden,ref:wt===0?cs=>{var Qs;Ar.current=(Qs=cs==null?void 0:cs.closest("form"))!=null?Qs:null}:void 0,...ll({key:ae,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:i,disabled:l,name:ae,value:Te})})),Pn({ourProps:Ys,theirProps:p,slot:Ae,defaultTag:d_,name:"Combobox"}))))}let h_="input";function m_(e,t){var n,r,s,i,o;let a=Ws(),{id:l=`headlessui-combobox-input-${a}`,onChange:c,displayValue:d,type:u="text",...m}=e,h=_r("Combobox.Input"),p=Gs("Combobox.Input"),$=yr(h.inputRef,t),w=Hb(h.inputRef),C=he(!1),x=Hs(),E=ce(()=>{p.onChange(null),h.optionsRef.current&&(h.optionsRef.current.scrollTop=0),p.goToOption(tt.Nothing)}),O=function(){var P;return typeof d=="function"&&h.value!==void 0?(P=d(h.value))!=null?P:"":typeof h.value=="string"?h.value:""}();$h(([P,Ae],[fe,rt])=>{if(C.current)return;let Ne=h.inputRef.current;Ne&&((rt===0&&Ae===1||P!==fe)&&(Ne.value=P),requestAnimationFrame(()=>{if(C.current||!Ne||(w==null?void 0:w.activeElement)!==Ne)return;let{selectionStart:Ue,selectionEnd:Et}=Ne;Math.abs((Et??0)-(Ue??0))===0&&Ue===0&&Ne.setSelectionRange(Ne.value.length,Ne.value.length)}))},[O,h.comboboxState,w]),$h(([P],[Ae])=>{if(P===0&&Ae===1){if(C.current)return;let fe=h.inputRef.current;if(!fe)return;let rt=fe.value,{selectionStart:Ne,selectionEnd:Ue,selectionDirection:Et}=fe;fe.value="",fe.value=rt,Et!==null?fe.setSelectionRange(Ne,Ue,Et):fe.setSelectionRange(Ne,Ue)}},[h.comboboxState]);let L=he(!1),X=ce(()=>{L.current=!0}),pe=ce(()=>{x.nextFrame(()=>{L.current=!1})}),Se=ce(P=>{switch(C.current=!0,P.key){case Vt.Enter:if(C.current=!1,h.comboboxState!==0||L.current)return;if(P.preventDefault(),P.stopPropagation(),h.activeOptionIndex===null){p.closeCombobox();return}p.selectActiveOption(),h.mode===0&&p.closeCombobox();break;case Vt.ArrowDown:return C.current=!1,P.preventDefault(),P.stopPropagation(),pt(h.comboboxState,{0:()=>p.goToOption(tt.Next),1:()=>p.openCombobox()});case Vt.ArrowUp:return C.current=!1,P.preventDefault(),P.stopPropagation(),pt(h.comboboxState,{0:()=>p.goToOption(tt.Previous),1:()=>{p.openCombobox(),x.nextFrame(()=>{h.value||p.goToOption(tt.Last)})}});case Vt.Home:if(P.shiftKey)break;return C.current=!1,P.preventDefault(),P.stopPropagation(),p.goToOption(tt.First);case Vt.PageUp:return C.current=!1,P.preventDefault(),P.stopPropagation(),p.goToOption(tt.First);case Vt.End:if(P.shiftKey)break;return C.current=!1,P.preventDefault(),P.stopPropagation(),p.goToOption(tt.Last);case Vt.PageDown:return C.current=!1,P.preventDefault(),P.stopPropagation(),p.goToOption(tt.Last);case Vt.Escape:return C.current=!1,h.comboboxState!==0?void 0:(P.preventDefault(),h.optionsRef.current&&!h.optionsPropsRef.current.static&&P.stopPropagation(),h.nullable&&h.mode===0&&h.value===null&&E(),p.closeCombobox());case Vt.Tab:if(C.current=!1,h.comboboxState!==0)return;h.mode===0&&h.activationTrigger!==1&&p.selectActiveOption(),p.closeCombobox();break}}),de=ce(P=>{c==null||c(P),h.nullable&&h.mode===0&&P.target.value===""&&E(),p.openCombobox()}),Y=ce(P=>{var Ae,fe,rt;let Ne=(Ae=P.relatedTarget)!=null?Ae:br.find(Ue=>Ue!==P.currentTarget);if(C.current=!1,!((fe=h.optionsRef.current)!=null&&fe.contains(Ne))&&!((rt=h.buttonRef.current)!=null&&rt.contains(Ne))&&h.comboboxState===0)return P.preventDefault(),h.mode===0&&(h.nullable&&h.value===null?E():h.activationTrigger!==1&&p.selectActiveOption()),p.closeCombobox()}),me=ce(P=>{var Ae,fe,rt;let Ne=(Ae=P.relatedTarget)!=null?Ae:br.find(Ue=>Ue!==P.currentTarget);(fe=h.buttonRef.current)!=null&&fe.contains(Ne)||(rt=h.optionsRef.current)!=null&&rt.contains(Ne)||h.disabled||h.immediate&&h.comboboxState!==0&&(p.openCombobox(),x.nextFrame(()=>{p.setActivationTrigger(1)}))}),G=il(()=>{if(h.labelId)return[h.labelId].join(" ")},[h.labelId]),re=ft(()=>({open:h.comboboxState===0,disabled:h.disabled}),[h]),Pe={ref:$,id:l,role:"combobox",type:u,"aria-controls":(n=h.optionsRef.current)==null?void 0:n.id,"aria-expanded":h.comboboxState===0,"aria-activedescendant":h.activeOptionIndex===null?void 0:h.virtual?(r=h.options.find(P=>{var Ae;return!((Ae=h.virtual)!=null&&Ae.disabled(P.dataRef.current.value))&&h.compare(P.dataRef.current.value,h.virtual.options[h.activeOptionIndex])}))==null?void 0:r.id:(s=h.options[h.activeOptionIndex])==null?void 0:s.id,"aria-labelledby":G,"aria-autocomplete":"list",defaultValue:(o=(i=e.defaultValue)!=null?i:h.defaultValue!==void 0?d==null?void 0:d(h.defaultValue):null)!=null?o:h.defaultValue,disabled:h.disabled,onCompositionStart:X,onCompositionEnd:pe,onKeyDown:Se,onChange:de,onFocus:me,onBlur:Y};return Pn({ourProps:Pe,theirProps:m,slot:re,defaultTag:h_,name:"Combobox.Input"})}let p_="button";function g_(e,t){var n;let r=_r("Combobox.Button"),s=Gs("Combobox.Button"),i=yr(r.buttonRef,t),o=Ws(),{id:a=`headlessui-combobox-button-${o}`,...l}=e,c=Hs(),d=ce($=>{switch($.key){case Vt.ArrowDown:return $.preventDefault(),$.stopPropagation(),r.comboboxState===1&&s.openCombobox(),c.nextFrame(()=>{var w;return(w=r.inputRef.current)==null?void 0:w.focus({preventScroll:!0})});case Vt.ArrowUp:return $.preventDefault(),$.stopPropagation(),r.comboboxState===1&&(s.openCombobox(),c.nextFrame(()=>{r.value||s.goToOption(tt.Last)})),c.nextFrame(()=>{var w;return(w=r.inputRef.current)==null?void 0:w.focus({preventScroll:!0})});case Vt.Escape:return r.comboboxState!==0?void 0:($.preventDefault(),r.optionsRef.current&&!r.optionsPropsRef.current.static&&$.stopPropagation(),s.closeCombobox(),c.nextFrame(()=>{var w;return(w=r.inputRef.current)==null?void 0:w.focus({preventScroll:!0})}));default:return}}),u=ce($=>{if(e_($.currentTarget))return $.preventDefault();r.comboboxState===0?s.closeCombobox():($.preventDefault(),s.openCombobox()),c.nextFrame(()=>{var w;return(w=r.inputRef.current)==null?void 0:w.focus({preventScroll:!0})})}),m=il(()=>{if(r.labelId)return[r.labelId,a].join(" ")},[r.labelId,a]),h=ft(()=>({open:r.comboboxState===0,disabled:r.disabled,value:r.value}),[r]),p={ref:i,id:a,type:Wb(e,r.buttonRef),tabIndex:-1,"aria-haspopup":"listbox","aria-controls":(n=r.optionsRef.current)==null?void 0:n.id,"aria-expanded":r.comboboxState===0,"aria-labelledby":m,disabled:r.disabled,onClick:u,onKeyDown:d};return Pn({ourProps:p,theirProps:l,slot:h,defaultTag:p_,name:"Combobox.Button"})}let $_="label";function w_(e,t){let n=Ws(),{id:r=`headlessui-combobox-label-${n}`,...s}=e,i=_r("Combobox.Label"),o=Gs("Combobox.Label"),a=yr(i.labelRef,t);et(()=>o.registerLabel(r),[r]);let l=ce(()=>{var d;return(d=i.inputRef.current)==null?void 0:d.focus({preventScroll:!0})}),c=ft(()=>({open:i.comboboxState===0,disabled:i.disabled}),[i]);return Pn({ourProps:{ref:a,id:r,onClick:l},theirProps:s,slot:c,defaultTag:$_,name:"Combobox.Label"})}let y_="ul",b_=Ki.RenderStrategy|Ki.Static;function __(e,t){let n=Ws(),{id:r=`headlessui-combobox-options-${n}`,hold:s=!1,...i}=e,o=_r("Combobox.Options"),a=yr(o.optionsRef,t),l=dl(),c=l!==null?(l&Ft.Open)===Ft.Open:o.comboboxState===0;et(()=>{var h;o.optionsPropsRef.current.static=(h=e.static)!=null?h:!1},[o.optionsPropsRef,e.static]),et(()=>{o.optionsPropsRef.current.hold=s},[o.optionsPropsRef,s]),Kb({container:o.optionsRef.current,enabled:o.comboboxState===0,accept(h){return h.getAttribute("role")==="option"?NodeFilter.FILTER_REJECT:h.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(h){h.setAttribute("role","none")}});let d=il(()=>{var h,p;return(p=o.labelId)!=null?p:(h=o.buttonRef.current)==null?void 0:h.id},[o.labelId,o.buttonRef.current]),u=ft(()=>({open:o.comboboxState===0,option:void 0}),[o]),m={"aria-labelledby":d,role:"listbox","aria-multiselectable":o.mode===1?!0:void 0,id:r,ref:a};return o.virtual&&o.comboboxState===0&&Object.assign(i,{children:Z.createElement(c_,null,i.children)}),Pn({ourProps:m,theirProps:i,slot:u,defaultTag:y_,features:b_,visible:c,name:"Combobox.Options"})}let v_="li";function x_(e,t){var n;let r=Ws(),{id:s=`headlessui-combobox-option-${r}`,disabled:i=!1,value:o,order:a=null,...l}=e,c=_r("Combobox.Option"),d=Gs("Combobox.Option"),u=c.virtual?c.activeOptionIndex===c.calculateIndex(o):c.activeOptionIndex===null?!1:((n=c.options[c.activeOptionIndex])==null?void 0:n.id)===s,m=c.isSelected(o),h=he(null),p=pn({disabled:i,value:o,domRef:h,order:a}),$=fn(Sh),w=yr(t,h,$?$.measureElement:null),C=ce(()=>d.onChange(o));et(()=>d.registerOption(s,p),[p,s]);let x=he(!(c.virtual||c.__demoMode));et(()=>{if(!c.virtual||!c.__demoMode)return;let Y=wr();return Y.requestAnimationFrame(()=>{x.current=!0}),Y.dispose},[c.virtual,c.__demoMode]),et(()=>{if(!x.current||c.comboboxState!==0||!u||c.activationTrigger===0)return;let Y=wr();return Y.requestAnimationFrame(()=>{var me,G;(G=(me=h.current)==null?void 0:me.scrollIntoView)==null||G.call(me,{block:"nearest"})}),Y.dispose},[h,u,c.comboboxState,c.activationTrigger,c.activeOptionIndex]);let E=ce(Y=>{var me;if(i||(me=c.virtual)!=null&&me.disabled(o))return Y.preventDefault();C(),mh()||requestAnimationFrame(()=>{var G;return(G=c.inputRef.current)==null?void 0:G.focus({preventScroll:!0})}),c.mode===0&&requestAnimationFrame(()=>d.closeCombobox())}),O=ce(()=>{var Y;if(i||(Y=c.virtual)!=null&&Y.disabled(o))return d.goToOption(tt.Nothing);let me=c.calculateIndex(o);d.goToOption(tt.Specific,me)}),L=qb(),X=ce(Y=>L.update(Y)),pe=ce(Y=>{var me;if(!L.wasMoved(Y)||i||(me=c.virtual)!=null&&me.disabled(o)||u)return;let G=c.calculateIndex(o);d.goToOption(tt.Specific,G,0)}),Se=ce(Y=>{var me;L.wasMoved(Y)&&(i||(me=c.virtual)!=null&&me.disabled(o)||u&&(c.optionsPropsRef.current.hold||d.goToOption(tt.Nothing)))}),de=ft(()=>({active:u,selected:m,disabled:i}),[u,m,i]);return Pn({ourProps:{id:s,ref:w,role:"option",tabIndex:i===!0?void 0:-1,"aria-disabled":i===!0?!0:void 0,"aria-selected":m,disabled:void 0,onClick:E,onFocus:O,onPointerEnter:X,onMouseEnter:X,onPointerMove:pe,onMouseMove:pe,onPointerLeave:Se,onMouseLeave:Se},theirProps:l,slot:de,defaultTag:v_,name:"Combobox.Option"})}let C_=gn(f_),S_=gn(g_),A_=gn(m_),k_=gn(w_),E_=gn(__),I_=gn(x_),qs=Object.assign(C_,{Input:A_,Button:S_,Label:k_,Options:E_,Option:I_});function pl(){let e=he(!1);return et(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function N_(e=0){let[t,n]=Je(e),r=pl(),s=zn(l=>{r.current&&n(c=>c|l)},[t,r]),i=zn(l=>!!(t&l),[t]),o=zn(l=>{r.current&&n(c=>c&~l)},[n,r]),a=zn(l=>{r.current&&n(c=>c^l)},[n]);return{flags:t,addFlag:s,hasFlag:i,removeFlag:o,toggleFlag:a}}function T_(e){let t={called:!1};return(...n)=>{if(!t.called)return t.called=!0,e(...n)}}function gl(e,...t){e&&t.length>0&&e.classList.add(...t)}function $l(e,...t){e&&t.length>0&&e.classList.remove(...t)}function M_(e,t){let n=wr();if(!e)return n.dispose;let{transitionDuration:r,transitionDelay:s}=getComputedStyle(e),[i,o]=[r,s].map(l=>{let[c=0]=l.split(",").filter(Boolean).map(d=>d.includes("ms")?parseFloat(d):parseFloat(d)*1e3).sort((d,u)=>u-d);return c}),a=i+o;if(a!==0){n.group(c=>{c.setTimeout(()=>{t(),c.dispose()},a),c.addEventListener(e,"transitionrun",d=>{d.target===d.currentTarget&&c.dispose()})});let l=n.addEventListener(e,"transitionend",c=>{c.target===c.currentTarget&&(t(),l())})}else t();return n.add(()=>t()),n.dispose}function R_(e,t,n,r){let s=n?"enter":"leave",i=wr(),o=r!==void 0?T_(r):()=>{};s==="enter"&&(e.removeAttribute("hidden"),e.style.display="");let a=pt(s,{enter:()=>t.enter,leave:()=>t.leave}),l=pt(s,{enter:()=>t.enterTo,leave:()=>t.leaveTo}),c=pt(s,{enter:()=>t.enterFrom,leave:()=>t.leaveFrom});return $l(e,...t.base,...t.enter,...t.enterTo,...t.enterFrom,...t.leave,...t.leaveFrom,...t.leaveTo,...t.entered),gl(e,...t.base,...a,...c),i.nextFrame(()=>{$l(e,...t.base,...a,...c),gl(e,...t.base,...a,...l),M_(e,()=>($l(e,...t.base,...a),gl(e,...t.base,...t.entered),o()))}),i.dispose}function P_({immediate:e,container:t,direction:n,classes:r,onStart:s,onStop:i}){let o=pl(),a=Hs(),l=pn(n);et(()=>{e&&(l.current="enter")},[e]),et(()=>{let c=wr();a.add(c.dispose);let d=t.current;if(d&&l.current!=="idle"&&o.current)return c.dispose(),s.current(l.current),c.add(R_(d,r.current,l.current==="enter",()=>{c.dispose(),i.current(l.current)})),c.dispose},[n])}function Jn(e=""){return e.split(/\s+/).filter(t=>t.length>1)}let Ji=jn(null);Ji.displayName="TransitionContext";var D_=(e=>(e.Visible="visible",e.Hidden="hidden",e))(D_||{});function O_(){let e=fn(Ji);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}function F_(){let e=fn(Yi);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}let Yi=jn(null);Yi.displayName="NestingContext";function Xi(e){return"children"in e?Xi(e.children):e.current.filter(({el:t})=>t.current!==null).filter(({state:t})=>t==="visible").length>0}function Ah(e,t){let n=pn(e),r=he([]),s=pl(),i=Hs(),o=ce((h,p=Zn.Hidden)=>{let $=r.current.findIndex(({el:w})=>w===h);$!==-1&&(pt(p,{[Zn.Unmount](){r.current.splice($,1)},[Zn.Hidden](){r.current[$].state="hidden"}}),i.microTask(()=>{var w;!Xi(r)&&s.current&&((w=n.current)==null||w.call(n))}))}),a=ce(h=>{let p=r.current.find(({el:$})=>$===h);return p?p.state!=="visible"&&(p.state="visible"):r.current.push({el:h,state:"visible"}),()=>o(h,Zn.Unmount)}),l=he([]),c=he(Promise.resolve()),d=he({enter:[],leave:[],idle:[]}),u=ce((h,p,$)=>{l.current.splice(0),t&&(t.chains.current[p]=t.chains.current[p].filter(([w])=>w!==h)),t==null||t.chains.current[p].push([h,new Promise(w=>{l.current.push(w)})]),t==null||t.chains.current[p].push([h,new Promise(w=>{Promise.all(d.current[p].map(([C,x])=>x)).then(()=>w())})]),p==="enter"?c.current=c.current.then(()=>t==null?void 0:t.wait.current).then(()=>$(p)):$(p)}),m=ce((h,p,$)=>{Promise.all(d.current[p].splice(0).map(([w,C])=>C)).then(()=>{var w;(w=l.current.shift())==null||w()}).then(()=>$(p))});return ft(()=>({children:r,register:a,unregister:o,onStart:u,onStop:m,wait:c,chains:d}),[a,o,r,u,m,d,c])}function V_(){}let L_=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function kh(e){var t;let n={};for(let r of L_)n[r]=(t=e[r])!=null?t:V_;return n}function B_(e){let t=he(kh(e));return Me(()=>{t.current=kh(e)},[e]),t}let U_="div",Eh=Ki.RenderStrategy;function j_(e,t){var n,r;let{beforeEnter:s,afterEnter:i,beforeLeave:o,afterLeave:a,enter:l,enterFrom:c,enterTo:d,entered:u,leave:m,leaveFrom:h,leaveTo:p,...$}=e,w=he(null),C=yr(w,t),x=(n=$.unmount)==null||n?Zn.Unmount:Zn.Hidden,{show:E,appear:O,initial:L}=O_(),[X,pe]=Je(E?"visible":"hidden"),Se=F_(),{register:de,unregister:Y}=Se;Me(()=>de(w),[de,w]),Me(()=>{if(x===Zn.Hidden&&w.current){if(E&&X!=="visible"){pe("visible");return}return pt(X,{hidden:()=>Y(w),visible:()=>de(w)})}},[X,w,de,Y,E,x]);let me=pn({base:Jn($.className),enter:Jn(l),enterFrom:Jn(c),enterTo:Jn(d),entered:Jn(u),leave:Jn(m),leaveFrom:Jn(h),leaveTo:Jn(p)}),G=B_({beforeEnter:s,afterEnter:i,beforeLeave:o,afterLeave:a}),re=ol();Me(()=>{if(re&&X==="visible"&&w.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[w,X,re]);let Pe=L&&!O,P=O&&E&&L,Ae=!re||Pe?"idle":E?"enter":"leave",fe=N_(0),rt=ce(Lt=>pt(Lt,{enter:()=>{fe.addFlag(Ft.Opening),G.current.beforeEnter()},leave:()=>{fe.addFlag(Ft.Closing),G.current.beforeLeave()},idle:()=>{}})),Ne=ce(Lt=>pt(Lt,{enter:()=>{fe.removeFlag(Ft.Opening),G.current.afterEnter()},leave:()=>{fe.removeFlag(Ft.Closing),G.current.afterLeave()},idle:()=>{}})),Ue=Ah(()=>{pe("hidden"),Y(w)},Se),Et=he(!1);P_({immediate:P,container:w,classes:me,direction:Ae,onStart:pn(Lt=>{Et.current=!0,Ue.onStart(w,Lt,rt)}),onStop:pn(Lt=>{Et.current=!1,Ue.onStop(w,Lt,Ne),Lt==="leave"&&!Xi(Ue)&&(pe("hidden"),Y(w))})});let cn=$,Sr={ref:C};return P?cn={...cn,className:qi($.className,...me.current.enter,...me.current.enterFrom)}:Et.current&&(cn.className=qi($.className,(r=w.current)==null?void 0:r.className),cn.className===""&&delete cn.className),Z.createElement(Yi.Provider,{value:Ue},Z.createElement(bh,{value:pt(X,{visible:Ft.Open,hidden:Ft.Closed})|fe.flags},Pn({ourProps:Sr,theirProps:cn,defaultTag:U_,features:Eh,visible:X==="visible",name:"Transition.Child"})))}function z_(e,t){let{show:n,appear:r=!1,unmount:s=!0,...i}=e,o=he(null),a=yr(o,t);ol();let l=dl();if(n===void 0&&l!==null&&(n=(l&Ft.Open)===Ft.Open),![!0,!1].includes(n))throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[c,d]=Je(n?"visible":"hidden"),u=Ah(()=>{d("hidden")}),[m,h]=Je(!0),p=he([n]);et(()=>{m!==!1&&p.current[p.current.length-1]!==n&&(p.current.push(n),h(!1))},[p,n]);let $=ft(()=>({show:n,appear:r,initial:m}),[n,r,m]);Me(()=>{if(n)d("visible");else if(!Xi(u))d("hidden");else{let E=o.current;if(!E)return;let O=E.getBoundingClientRect();O.x===0&&O.y===0&&O.width===0&&O.height===0&&d("hidden")}},[n,u]);let w={unmount:s},C=ce(()=>{var E;m&&h(!1),(E=e.beforeEnter)==null||E.call(e)}),x=ce(()=>{var E;m&&h(!1),(E=e.beforeLeave)==null||E.call(e)});return Z.createElement(Yi.Provider,{value:u},Z.createElement(Ji.Provider,{value:$},Pn({ourProps:{...w,as:ve,children:Z.createElement(Ih,{ref:a,...w,...i,beforeEnter:C,beforeLeave:x})},theirProps:{},defaultTag:ve,features:Eh,visible:c==="visible",name:"Transition"})))}function H_(e,t){let n=fn(Ji)!==null,r=dl()!==null;return Z.createElement(Z.Fragment,null,!n&&r?Z.createElement(wl,{ref:t,...e}):Z.createElement(Ih,{ref:t,...e}))}let wl=gn(z_),Ih=gn(j_),W_=gn(H_),G_=Object.assign(wl,{Child:W_,Root:wl});function q_({name:e,control:t,queryAnzsic:n}){const[r,s]=Je(""),[i,o]=Je([]),a=async()=>{try{if(r.length>=2){const d=await n(r);o(d)}else o([])}catch(d){console.error("Error fetching data:",d),o([])}};Me(()=>{const d=setTimeout(()=>{a()},500);return()=>clearTimeout(d)},[r]);const{field:l,fieldState:c}=qf({name:e,control:t,rules:{required:!0}});return R("div",{children:R(qs,{onChange:l.onChange,value:l.value??null,name:l.name,children:[R(qs.Label,{className:"block text-sm font-medium text-gray-900",children:"Industry"}),R("div",{className:"relative mt-2",children:[R("div",{className:"grid grid-cols-1",children:[R(qs.Input,{className:"col-start-1 row-start-1 block w-full rounded-md bg-white py-[9px] pl-9 pr-2 text-gray-900 placeholder:text-gray-400 text-sm border border-gray-300 focus:ring-2 focus:ring-indigo-600 focus:border-indigo-600",onChange:d=>s(d.target.value),onBlur:()=>s(""),placeholder:"Type to search industries",displayValue:d=>{const u=l.value;return u!=null&&u.ClassTitle?`${u.ClassCode} ${u.ClassTitle}`:""}}),R(ty,{className:"pointer-events-none col-start-1 row-start-1 ml-3 self-center text-gray-400 size-4"})]}),i.length>0&&R(qs.Options,{className:"absolute z-10 mt-1 max-h-60 w-full overflow-auto rounded-md bg-white py-1 shadow-lg ring-1 ring-black/5 focus:outline-none",children:i.map(d=>R(ve,{children:[R("div",{className:"flex items-center text-xs text-gray-500 font-semibold mb-1 mx-3 mt-2 uppercase",children:[R("span",{className:"self-start",children:d.GroupCode}),R("span",{className:"ml-2",children:d.GroupTitle})]}),d.Classes.map(u=>{var m,h;return R(qs.Option,{value:u,className:({active:p})=>`group relative cursor-pointer select-none py-2 pl-3 pr-9 ${p?"bg-indigo-600 text-white outline-none":"text-gray-900"}`,children:[R("div",{className:`flex items-center text-sm ${((m=l.value)==null?void 0:m.ClassCode)===u.ClassCode?"font-semibold":"font-normal"}`,children:[R("span",{className:"self-start",children:u.ClassCode}),R("span",{className:"ml-2",children:u.ClassTitle})]}),R("span",{className:`absolute inset-y-0 right-0 items-center pr-4 text-indigo-600 group-hover:text-white ${((h=l.value)==null?void 0:h.ClassCode)===u.ClassCode?"flex":"hidden"}`,children:R(Zw,{className:"size-5"})})]},u.ClassCode)})]}))}),r.length>1&&i.length===0&&R("div",{className:"absolute z-10 mt-1 max-h-60 w-full overflow-auto rounded-md bg-white py-1 shadow-lg ring-1 ring-black/5 focus:outline-none",children:R("div",{className:"group relative cursor-default select-none py-2 pl-3 pr-9 text-gray-400 text-sm",children:"Keep typing to search industries"})})]}),c.invalid&&R("p",{className:"mt-2 text-sm text-red-600",children:"Industry is required"})]})})}function K_({defaultValues:e,validateAccountName:t,validateLegalEntityName:n,validateAbn:r,validateSalesforceParentRecordId:s,validateWebsiteUrl:i,queryAnzsic:o,onSubmit:a,closeModal:l}){const{handleSubmit:c,control:d}=Hi({mode:"onChange",defaultValues:e});return R(ve,{children:[R("div",{className:"font-bold text-lg mb-4",children:"Account details"}),R("form",{className:"space-y-6",onSubmit:c(a),children:[R("div",{children:[R(mt,{label:"Account name",name:"AccountName",control:d,placeholder:"e.g. Acme Co",validate:t}),R("p",{className:"mt-2 text-sm font-normal text-gray-500",children:"This will be used as a display name."})]}),R(mt,{label:"Legal entity name",name:"LegalEntityName",control:d,placeholder:"e.g. ACME LTD PTY",validate:n}),R("div",{className:"grid grid-cols-2 gap-3",children:[R(mt,{label:"ABN",name:"Abn",control:d,validate:r,isNumber:!0}),R(mt,{label:"Salesforce parent RecordID",name:"SalesforceParentRecordId",control:d,validate:s})]}),R(mt,{label:"Website URL",name:"WebsiteUrl",control:d,placeholder:"https://acme.com.au",validate:i}),R(q_,{name:"Industry",control:d,queryAnzsic:o}),R(Wi,{primaryLabel:"Next",secondaryLabel:"Cancel",secondaryOnClick:l})]})]})}function Z_(e,t,n,r){return f(K_,{defaultValues:e,validateAccountName:s=>ut(Ho(s)),validateLegalEntityName:s=>ut(Bc(s)),validateAbn:s=>ut(Uc(s)),validateSalesforceParentRecordId:s=>ut(eg(s)),validateWebsiteUrl:s=>ut(Nc(s)),queryAnzsic:t,onSubmit:s=>{r(new sn(2,[s])),r(new sn(0,[]))},closeModal:n})}function Nh(e,t){let n,r,s;const i=f("div",{className:"pt-6 px-6 pb-4 border-b font-bold text-xl",children:"Add a new account"}),o=f("div",S(y([["className","pt-4 mx-6"],(n=se(k(()=>t)),["children",v.Children.toArray(Array.from(n))])])));return f(ts,{onClose:e,child:(r=[f("div",{className:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity","aria-hidden":!0}),f("div",S(y([["className","fixed inset-0 z-10 w-screen overflow-y-auto h-full flex items-center justify-center"],(s=[f("div",{className:"w-[480px] bg-white shadow-xl rounded-lg",children:v.Children.toArray([i,o])})],["children",v.Children.toArray(Array.from(s))])])))],f(ve,{},...r))})}function J_(e,t){let n;const r=f("div",S(y([["className","mb-4 text-sm font-normal text-gray-500"],(n=["All fields are required unless labelled as ",f("span",{className:"font-semibold",children:"optional"}),"."],["children",v.Children.toArray(Array.from(n))])])));return Nh(e,se(k(()=>M(A(r),k(()=>t)))))}function Y_(e){let t,n,r,s;return Nh(e,[f("div",S(y([["className","text-sm mb-4"],(t=[f("p",{children:["You do not have sufficient permissions."]}),(n=y(["For details, please see ",f("a",{className:"font-medium text-blue-600 hover:underline",href:"https://myobconfluence.atlassian.net/wiki/spaces/ENG/pages/9811993991/SuperHero+Module+Permissions",target:"_blank",children:"SuperHero Module Permissions"})]),f("p",{children:v.Children.toArray(Array.from(n))})),f("div",S(y([["className","flex justify-end"],(r=[f("button",S(y([(s="rounded-md bg-indigo-600 px-3.5 py-2.5 text-sm font-semibold text-white shadow-xs hover:bg-indigo-500 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600",["className",s]),["type","button"],["onClick",i=>{e()}],["children","Close"]])))],["children",v.Children.toArray(Array.from(r))])])))],["children",v.Children.toArray(Array.from(t))])])))])}function X_(e){const t=e.closeModal,n=e.partnerId,r=Wn(Mn),s=Vy(r.BackendUrl,r.AccessToken),i=fr(()=>dr(()=>jy,(l,c)=>zy(n,s,l,c),(l,c)=>{}),void 0,void 0),o=i[0],a=i[1];return r.Roles.ProvisionAccounts?J_(t,se(k(()=>{const l=o.CurrentView;return l.tag===1?A(ub(o.PrimaryContactForm,a)):l.tag===2?A(hb(o.BusinessAddressForm,Uy(o),By(o),a)):A(Z_(o.AccountDetailsForm,c=>s.QueryAnzsic(c),t,a))}))):Y_(t)}function Q_(e){const t=e.partnerId,n=Gn(!1),r=n[1],s=se(k(()=>{let i;return M(A(f("button",S(y([["type","button"],(i="inline-flex items-center gap-x-2 rounded-md bg-indigo-600 px-3.5 py-[8.5px] text-sm font-semibold text-white shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600",["className",i]),["onClick",o=>{r(!0)}],["children",v.Children.toArray([Dy,"Add account"])]])))),k(()=>n[0]?A(f(X_,{partnerId:t,closeModal:()=>{r(!1)}})):Ke()))}));return f(ve,{},...s)}class ev extends j{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["ColumnHeader"]}}function Th(e){return new ev(e)}function Mh(e){return e.fields[0]}class tv extends j{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["RowCell"]}}function vr(e){return new tv(e)}function Rh(e){return e.fields[0]}function nv(){return["scope","col"]}function Yn(e){return Th(f("th",S(y([["className","px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"],nv(),["children",e]]))))}function rv(e,t){let n;return vr(f("td",S(y([["className","px-6 py-4 whitespace-nowrap text-sm"],(n=[f("a",{className:"text-indigo-600 hover:text-indigo-900",children:t,href:e})],["children",v.Children.toArray(Array.from(n))])]))))}function Qi(e,t){return vr(f("td",{className:ne(" ",M(e,["px-6","py-4","whitespace-nowrap","text-sm"])),children:t}))}function sv(e,t){let n,r,s,i,o,a,l;return f("div",S(y([["className","flex flex-col mt-4"],(n=[f("div",S(y([["className","-my-2 overflow-x-auto sm:-mx-6 lg:-mx-8"],(r=[f("div",S(y([["className","py-2 align-middle inline-block min-w-full sm:px-6 lg:px-8"],(s=[f("div",S(y([["className","shadow overflow-hidden border-b border-gray-200 sm:rounded-lg"],(i=[f("table",S(y([["className","min-w-full divide-y divide-gray-200"],(o=[f("thead",{className:"bg-gray-50",children:(a=Le(Mh,e),f("tr",{children:v.Children.toArray(Array.from(a))}))}),(l=Lo((c,d)=>(u=>{let m;return f("tr",S(y([["className",c%2===0?"bg-white":"bg-gray-50"],(m=Le(Rh,u),["children",v.Children.toArray(Array.from(m))])])))})(d),t),f("tbody",{children:v.Children.toArray(Array.from(l))}))],["children",v.Children.toArray(Array.from(o))])])))],["children",v.Children.toArray(Array.from(i))])])))],["children",v.Children.toArray(Array.from(s))])])))],["children",v.Children.toArray(Array.from(r))])])))],["children",v.Children.toArray(Array.from(n))])])))}function iv(e,t,n){return e?st(n,t):n}function Ph(e,t,n,r){let s,i,o;return Th(f("th",S(y([["className",ne(" ",["px-6","py-3","text-left","text-xs","font-medium","text-gray-500","sm:pl-6","uppercase","tracking-wider"])],["scope","col"],(s=[f("a",S(y([["className",ne(" ",["group","inline-flex","cursor-pointer"])],["onClick",n],(i=[r,f("span",S(y([["className",ne(" ",iv(!e,ee("invisible"),y(["ml-2","flex-none","rounded","text-gray-400","group-hover:visible","group-focus:visible"])))],(o=se(k(()=>A(t?Ry:Py))),["children",v.Children.toArray(Array.from(o))])])))],["children",v.Children.toArray(Array.from(i))])])))],["children",v.Children.toArray(Array.from(s))])]))))}function ov(e,t){return Ph(Ce(_d(e.Sort),new Nn(1,[])),Ce(vd(e.Sort),new ur(0,[])),n=>{t(new mr(1,[xd(new Nn(1,[]),e.Sort)]))},"Name")}function av(e,t){return Ph(Ce(_d(e.Sort),new Nn(0,[])),Ce(vd(e.Sort),new ur(0,[])),n=>{t(new mr(1,[xd(new Nn(0,[]),e.Sort)]))},"Id")}function lv(e,t){let n;return vr(f("td",S(y([["className",ne(" ",["text-gray-500","px-6","py-2","whitespace-nowrap","text-sm","align-top"])],(n=[f("span",{children:[e]}),f("br",{}),f("span",{children:[t]})],["children",v.Children.toArray(Array.from(n))])]))))}function cv(e,t,n){let r;return vr(f("td",S(y([["className",ne(" ",["text-gray-500","px-6","py-2","whitespace-nowrap","text-sm","align-top"])],(r=se(k(()=>{let s;return M(A(f("div",S(y([["className",ne(" ",["font-medium"])],(s=[f("span",{children:[e]})],["children",v.Children.toArray(Array.from(s))])])))),k(()=>{let i;return M((i=t,i==null?A(ge()):A(f("span",{children:["Legal Entity: "+i]}))),k(()=>{const o=n;if(o==null)return A(ge());{const a=o;return M(A(f("br",{})),k(()=>A(f("span",{children:["ABN: "+a]}))))}}))}))})),["children",v.Children.toArray(Array.from(r))])]))))}function uv(e){return vr(f("td",{className:ne(" ",["px-6","py-2","whitespace-nowrap","text-sm","text-gray-500","align-top"]),children:e}))}function dv(e){let t;return vr(f("td",S(y([["className","px-6 py-2 text-sm align-top"],(t=[f("span",{className:ne(" ",se(k(()=>M(A("inline-flex items-center rounded-full px-2 py-1 font-medium inset-ring"),k(()=>e.tag===1?A("bg-purple-50 text-purple-700 inset-ring-purple-700/10 dark:bg-purple-400/10 dark:text-purple-400 dark:inset-ring-purple-400/30"):A("bg-blue-50 text-blue-700 inset-ring-blue-700/10 dark:bg-blue-400/10 dark:text-blue-400 dark:inset-ring-blue-400/30")))))),children:Wc(e)})],["children",v.Children.toArray(Array.from(t))])]))))}function fv(e,t,n,r){let s;return vr(f("td",S(y([["className","px-6 py-2 whitespace-nowrap text-sm align-top"],(s=se(k(()=>M(A(f("a",{className:"text-indigo-600 hover:text-indigo-900",children:t,href:e})),k(()=>{let i,o;return M((i=r,i==null?A(ge()):(o=i,M(A(f("br",{})),k(()=>A(f("span",{children:[`Channel ID: ${o}`]})))))),k(()=>{const a=n;if(a==null)return A(ge());{const l=a;return M(A(f("br",{})),k(()=>A(f("span",{children:[`External ID: ${l}`]}))))}}))})))),["children",v.Children.toArray(Array.from(s))])]))))}function hv(e,t,n){const r=Rt(n.AccountId);return se(k(()=>{let s;return M(A(fv(cr(Rs((s=[e,r],new q(8,[s[0],s[1]])))),n.AccountId,n.ExternalId,n.ChannelId)),k(()=>M(A(cv(n.Name,n.BusinessName,n.BusinessNumber)),k(()=>M(A(dv(n.ProvisioningMode)),k(()=>M(t.ReadProtectedData?A(lv(We(n.Contact,""),We(n.ContactMobilePhone,""))):Ke(),k(()=>A(uv(n.Website))))))))))}))}class mv extends Q{constructor(t,n){super(),this.Data=t,this.LoadNext=n}}class Dh extends j{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Resolved","InProgress"]}}class Oh extends j{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Known","Unknown"]}}function pv(e){let t;return f("thead",{className:"bg-gray-50",children:(t=Le(Mh,e),f("tr",{children:v.Children.toArray(Array.from(t))}))})}function gv(e,t){let n;return f("tr",S(y([["className",e%2===0?"bg-white":"bg-gray-50"],(n=Le(Rh,t),["children",v.Children.toArray(Array.from(n))])])))}function $v(e,t,n,r,s,i){let o,a,l,c,d,u,m;const h=t!=null&&n!=null?(o=t|0,a=n|0,se(k(()=>M(A("Showing "),k(()=>M(A(f("span",{className:"font-medium",children:`${o}`})),k(()=>M(A(" to "),k(()=>M(A(f("span",{className:"font-medium",children:`${a}`})),k(()=>M(A(" of "),k(()=>r.tag===1?ee(" many"):y([f("span",{className:"font-medium",children:Ze(r.fields[0])})," results"])))))))))))))):ee(ge()),p=se(k(()=>{let $,w;return M(($=i,$==null?A(ge()):(w=$,A(f("a",{className:ne(" ",["relative","inline-flex","items-center","px-4","py-2","border","border-gray-300","text-sm","font-medium","rounded-md","text-gray-700","bg-white","hover:bg-gray-50","cursor-pointer"]),onClick:w,children:"Previous "})))),k(()=>{const C=s;if(C==null)return A(ge());{const x=C;return A(f("a",{className:ne(" ",["ml-3","relative","inline-flex","items-center","px-4","py-2","border","border-gray-300","text-sm","font-medium","rounded-md","text-gray-700","bg-white","hover:bg-gray-50","cursor-pointer"]),onClick:x,children:" Next"}))}}))}));return f("tfoot",S(y([["className",ne(" ",["w-full"])],(l=[f("tr",S(ee((c=[f("td",S(y([["colSpan",e],(d=[f("nav",S(y([["className",ne(" ",["bg-white","px-4","py-3","flex","items-center","justify-between","border-t-1","border-gray-200","sm:px-6"])],(u=[f("div",S(y([["className",ne(" ",["hidden","sm:block"])],(m=[f("p",{className:ne(" ",["text-sm","text-gray-700"]),children:v.Children.toArray(Array.from(h))})],["children",v.Children.toArray(Array.from(m))])]))),f("div",{className:ne(" ",["flex-1","flex","justify-between","sm:justify-end"]),children:v.Children.toArray(Array.from(p))})],["children",v.Children.toArray(Array.from(u))])])))],["children",v.Children.toArray(Array.from(d))])])))],["children",v.Children.toArray(Array.from(c))]))))],["children",v.Children.toArray(Array.from(l))])])))}function wv(e,t){const n=Gn(1),r=n[1],s=n[0]|0;return[s,i=>{if(s===e){if(t!=null){const o=t;ec(jt("Calling Load")),o(),r(s+1)}}else r(s+1)},i=>{r(s-1)}]}function yv(e){let t,n,r,s,i;const o=e.data,a=e.pageSize,l=e.renderRowCells,c=e.columnHeaders,d=Ap(a,o.Data),u=wv(Pr(d),o.LoadNext),m=u[0]|0,h=u[1];let p;const $=vp(m-1,d);p=$==null?new Dh(1,[]):new Dh(0,[$]);const w=Pr(o.Data)|0,C=o.LoadNext==null?new Oh(0,[w]):new Oh(1,[]),x=p.tag===1?void 0:w>=1?(m-1)*a+1:void 0,E=p.tag===1?void 0:w>=1?(m-1)*a+Pr(p.fields[0]):void 0,O=m===1?void 0:u[2],L=m===Pr(d)?o.LoadNext!=null?h:void 0:m<Pr(d)?h:void 0;return f("div",S(y([["className","flex flex-col mt-4"],(t=[f("div",S(y([["className","-my-2 overflow-x-auto sm:-mx-6 lg:-mx-8"],(n=[f("div",S(y([["className","py-2 align-middle inline-block min-w-full sm:px-6 lg:px-8"],(r=[f("div",S(y([["className","shadow overflow-hidden border-b border-gray-200 sm:rounded-lg"],(s=[f("table",S(y([["className","min-w-full divide-y divide-gray-200"],(i=se(k(()=>M(A(pv(c)),k(()=>{let X,pe;return M((X=p,X.tag===1?A(ge()):A((pe=Lo(gv,l(X.fields[0])),f("tbody",{children:v.Children.toArray(Array.from(pe))})))),k(()=>A($v(Pr(c),x,E,C,L,O))))})))),["children",v.Children.toArray(Array.from(i))])])))],["children",v.Children.toArray(Array.from(s))])])))],["children",v.Children.toArray(Array.from(r))])])))],["children",v.Children.toArray(Array.from(n))])])))],["children",v.Children.toArray(Array.from(t))])])))}function an(e){const t=e.error,n=ee(f("span",{children:[t]}));return f("div",{children:v.Children.toArray(Array.from(n))})}function Ks(){const e=ee(f("span",{children:["Please wait..."]}));return f("div",{children:v.Children.toArray(Array.from(e))})}function bv(e){let t,n,r,s,i,o;const a=Wn(Mn),l=Ay({accessToken:a.AccessToken,backendUrl:a.BackendUrl,partnerId:e.partnerId}),c=fr(()=>dr(Iy,(E,O)=>Ny(l,E,O),(E,O)=>{}),void 0,void 0),d=c[0],u=c[1],m=new ka(d.SearchText,d.Sort,d.PageSize);_a((t=[()=>Ey(l,m),E=>{u(new mr(2,[E]))}],gd(t[0],t[1])));const h=E=>{u(new mr(4,[]))},p=d.Data;let $,w,C,x;switch(p.tag){case 0:case 1:{$=2;break}case 3:{$=3,x=p.fields[0];break}default:p.fields[0].tag===1?($=1,C=p.fields[0].fields[0]):($=0,w=p.fields[0].fields[0])}switch($){case 0:{const E=y([f("div",S(y([["className",ne(" ",["flex","justify-between","items-end","pt-2","sm:-mr-6","lg:mr-0"])],(n=se(k(()=>{let O;return M(A(f("div",S(y([["className",ne(" ",["flex","flex-row","gap-4","sm:-mr-6","lg:mr-0","w-[560px]"])],(O=[Pf(Sd(d.SearchText),"Account ID, Name, Legal Entity, Channel ID or External ID",L=>{u(new mr(0,[L]))},h),Ty(h)],["children",v.Children.toArray(Array.from(O))])])))),k(()=>e.accountProvisioningMode.tag===0?A(ge()):A(f(Q_,{partnerId:e.partnerId}))))})),["children",v.Children.toArray(Array.from(n))])]))),(r=w,s=se(k(()=>M(A(av(d,u)),k(()=>M(A(ov(d,u)),k(()=>M(A(Yn("Provisioning")),k(()=>M(a.Roles.ReadProtectedData?A(Yn("Contact")):Ke(),k(()=>A(Yn("Website")))))))))))),i=new mv(r.Accounts,Ge(O=>()=>{Hr(ky(l)(m)(O)(u))},r.Token)),o=Ad(d.PageSize)|0,f(yv,{columnHeaders:s,renderRowCells:O=>rr(L=>hv(e.partnerId,a.Roles,L),O),pageSize:o,data:i}))]);return f("div",{children:v.Children.toArray(Array.from(E))})}case 1:return f(an,{error:C});case 2:return f(Ks,null);default:{const E=Ze(x);return f(an,{error:E})}}}let eo=class extends j{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["backend-url","access-token","partner-id","account-id"]}};function Fh(e){const t=e.accessToken,n=e.backendUrl,r=e.accountId,s=e.partnerId,i=bs(o=>o,[new eo(1,[t]),new eo(0,[n]),new eo(2,[Kt(s)]),Ge(o=>new eo(3,[Zt(o)]),r)]);return f("superhero-super-configuration",Bn(i,1))}let to=class extends j{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["backend-url","access-token","partner-id","account-id"]}};function Vh(e){const t=e.accessToken,n=e.backendUrl,r=e.accountId,s=e.partnerId,i=bs(o=>o,[new to(1,[t]),new to(0,[n]),new to(2,[Kt(s)]),Ge(o=>new to(3,[Zt(o)]),r)]);return f("superhero-benefits-onboarding-configuration",Bn(i,1))}let no=class extends j{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["backend-url","access-token","partner-id","account-id"]}};function Lh(e){const t=e.accessToken,n=e.backendUrl,r=e.accountId,s=e.partnerId,i=bs(o=>o,[new no(1,[t]),new no(0,[n]),new no(2,[Kt(s)]),Ge(o=>new no(3,[Zt(o)]),r)]);return f("superhero-bank-details",Bn(i,1))}let ro=class extends j{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["backend-url","access-token","partner-id","account-id"]}};function Bh(e){const t=e.accessToken,n=e.backendUrl,r=e.accountId,s=e.partnerId,i=bs(o=>o,[new ro(1,[t]),new ro(0,[n]),new ro(2,[Kt(s)]),Ge(o=>new ro(3,[Zt(o)]),r)]);return f("superhero-profile-directory-app",Bn(i,1))}let so=class extends j{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["backend-url","access-token","partner-id","account-id"]}};function Uh(e){const t=e.accountId,n=e.partnerId,r=e.accessToken,s=e.backendUrl,i=bs(o=>o,[new so(1,[r]),new so(0,[s]),new so(2,[Kt(n)]),Ge(o=>new so(3,[Zt(o)]),t)]);return f("workspace-account-registry-app",Bn(i,1))}let Dn=class extends j{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Key","Appear","Show","ClassName","Enter","EnterFrom","EnterTo","Leave","LeaveFrom","LeaveTo","Children"]}};function _v(e){const t=Bn(e,1);return f(G_,t)}function io(e,t){let n;return f("div",S(y([["className","px-4 py-4 sm:px-0"],(n=[f("h3",{className:"text-lg font-semibold leading-7 text-gray-900",children:e}),We(Ge(r=>f("p",{className:"mt-1 max-w-2xl text-sm leading-6 text-gray-500",children:r}),t),ge())],["children",v.Children.toArray(Array.from(n))])])))}function nt(e,t){let n;return f("div",S(y([["className","px-4 py-4 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-0"],(n=[f("dt",{className:"text-sm font-medium leading-6 text-gray-700",children:e}),f("dd",{className:"px-1 mt-1 text-sm leading-6 text-gray-700 sm:col-span-2 sm:mt-0",children:t})],["children",v.Children.toArray(Array.from(n))])])))}function yl(e){let t,n;const r=e.value,s=e.label,i=Gn(!1),o=i[0],a=i[1];return Qg(()=>{Hr(N.Delay(()=>o?N.Bind(Ca(2e3),()=>(a(!1),N.Zero())):N.Zero()))}),f("div",S(y([["className","px-4 py-2 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-0"],(t=[f("dt",{className:"text-sm font-medium leading-6 text-gray-700",children:s}),f("dd",S(y([["className","flex mt-1 text-sm leading-6 text-primary-700 sm:col-span-2 sm:mt-0 relative"],(n=[_v(y([new Dn(3,["absolute bottom-8 flex flex-row bg-gray-900 items-start w-[69px] h-8 shadow-md px-3 py-2 rounded-md"]),new Dn(2,[o]),new Dn(4,["transition-opacity ease-in duration-100"]),new Dn(5,["opacity-0"]),new Dn(6,["opacity-90"]),new Dn(7,["transition-opacity ease-out duration-500"]),new Dn(8,["opacity-90"]),new Dn(9,["opacity-0"]),new Dn(10,[[f("div",{className:"w-[45px] h-4 not-italic font-medium text-xs leading-4 text-white flex-none order-none grow-0",children:"Copied"})]])])),f("div",{className:"px-1 cursor-pointer hover:text-primary-900 hover:bg-gray-300 rounded-md shrink",children:r})],["children",v.Children.toArray(Array.from(n))]),["onClick",l=>{navigator.clipboard.writeText(r),a(!0)}]])))],["children",v.Children.toArray(Array.from(t))])])))}function oo(e,t){let n;const r=y([e,f("div",S(y([["className","mt-2 border-b border-gray-200"],(n=[f("dl",{className:"divide-y divide-gray-200 px-0 sm:px-4 max-w-2xl",children:v.Children.toArray(Array.from(t))})],["children",v.Children.toArray(Array.from(n))])])))]);return f("div",{children:v.Children.toArray(Array.from(r))})}function vv(e){const t=Wn(Mn);return oo(io("Partner Information",void 0),se(k(()=>{let n;return M(A((n=["ID",Vr(e.StreamId)],f(yl,{label:n[0],value:n[1]}))),k(()=>{let r;return M(A((r=["Name",_i(e.Name)],nt(r[0],r[1]))),k(()=>{let s,i,o;return M(t.Roles.ReadProtectedData?(s=e.ContactDetails,s!=null?(i=s,M(A((o=["Contact",`${Rc(i.FirstName)} ${Dc(i.LastName)}`],nt(o[0],o[1]))),k(()=>{let a;return A((a=["Phone",Vc(i.MobilePhone)],nt(a[0],a[1])))}))):Ke()):Ke(),k(()=>{let a;return M(A((a=["Website",Tc(e.Website)],nt(a[0],a[1]))),k(()=>{let l;return A((l=["Notes",We(G0(e.Notes),"")],nt(l[0],l[1])))}))}))}))}))})))}let xr=class extends j{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Details","AccountList","SuperConfiguration","BenefitsOnboardingConfiguration","BankDetailsConfiguration","ProfileDirectory","Workspace"]}};class xv extends Q{constructor(t,n,r){super(),this.PartnerId=t,this.BackendUrl=n,this.AccessToken=r}}class Cv extends Q{constructor(t,n,r){super(),this.PartnerId=t,this.BackendUrl=n,this.AccessToken=r}}class Sv extends Q{constructor(t,n,r){super(),this.PartnerId=t,this.BackendUrl=n,this.AccessToken=r}}class Av extends Q{constructor(t,n,r){super(),this.PartnerId=t,this.BackendUrl=n,this.AccessToken=r}}class kv extends Q{constructor(t,n,r){super(),this.PartnerId=t,this.BackendUrl=n,this.AccessToken=r}}function Ev(e){switch(e.tag){case 1:return"Accounts";case 2:return"Super";case 3:return"Benefits";case 4:return"Bank Details";case 5:return"Directory";case 6:return"Workspace";default:return"Details"}}function Iv(e){switch(e.tag){case 1:return e.fields[0].partnerId;case 2:return e.fields[0].PartnerId;case 3:return e.fields[0].PartnerId;case 4:return e.fields[0].PartnerId;case 5:return e.fields[0].PartnerId;case 6:return e.fields[0].PartnerId;default:return Ve(Vr(e.fields[0].StreamId))}}function Nv(e){const t=rr(n=>Tf(Ev(e),n[0],cr(Rs(n[1](Iv(e))))),y([["Details",n=>new q(1,[n])],["Accounts",n=>new q(3,[n])],["Super",n=>new q(4,[n])],["Benefits",n=>new q(5,[n])],["Bank Details",n=>new q(6,[n])],["Directory",n=>new q(2,[n])]]));return f(Mf,{headers:t})}function Tv(e){switch(e.tag){case 1:return f(bv,e.fields[0]);case 2:return f(Fh,{partnerId:e.fields[0].PartnerId,backendUrl:e.fields[0].BackendUrl,accessToken:e.fields[0].AccessToken});case 3:return f(Vh,{partnerId:e.fields[0].PartnerId,backendUrl:e.fields[0].BackendUrl,accessToken:e.fields[0].AccessToken});case 4:return f(Lh,{partnerId:e.fields[0].PartnerId,backendUrl:e.fields[0].BackendUrl,accessToken:e.fields[0].AccessToken});case 5:return f(Bh,{partnerId:e.fields[0].PartnerId,backendUrl:e.fields[0].BackendUrl,accessToken:e.fields[0].AccessToken});case 6:return f(Uh,{backendUrl:e.fields[0].BackendUrl,accessToken:e.fields[0].AccessToken,partnerId:e.fields[0].PartnerId});default:return f(vv,e.fields[0])}}function jh(e){let t,n;const r=e.mode;return f("div",S(y([["className","flex flex-row"],(t=[Nv(r),f("div",S(y([["className","w-full"],(n=[Tv(r)],["children",v.Children.toArray(Array.from(n))])])))],["children",v.Children.toArray(Array.from(t))])])))}let ao=class extends j{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["backend-url","access-token","partner-id","account-id"]}};function Mv(e){const t=e.accessToken,n=e.backendUrl,r=e.accountId,s=e.partnerId,i=k(()=>M(A(new ao(1,[t])),k(()=>M(A(new ao(0,[n])),k(()=>M(A(new ao(2,[$i(s)])),k(()=>A(new ao(3,[wi(r)])))))))));return f("superhero-import-app",Bn(i,1))}class bl extends j{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["backend-url","access-token","account-id"]}}function Rv(e){const t=e.accessToken,n=e.backendUrl,r=e.accountId,s=k(()=>M(A(new bl(1,[t])),k(()=>M(A(new bl(0,[n])),k(()=>A(new bl(2,[wi(r)])))))));return f("superhero-salpac-profile-admin",Bn(s,1))}class Pv extends j{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["RedirectionOff","RedirectionOn","Complete"]}}function lo(){return _o("AccountRegistry.AdminUI.FlareIdentityService.MigrationStateDto",[],Pv,()=>[[["lastUpdated",ye(bo("System.DateTime"))]],[["lastUpdated",bo("System.DateTime")]],[["lastUpdated",bo("System.DateTime")]]])}function co(e){return`${e}/flare-identity/admin`}const Dv=5,Ov=1e3;function zh(e,t,n,r){return N.Delay(()=>{const s=Oi(Va(qt(jt("Bearer %s"))(n)),r);return N.Bind(Ba(s),i=>{let o,a;const l=i,c=l.statusCode|0;return o=c|0,o>=200&&o<=299?N.Return(l):(a=c|0,(a===429?!0:a>=500)&&e>=1?N.Bind(Ca(t),()=>N.ReturnFrom(zh(e-1,t,n,r))):N.Return(l))})})}const uo=e=>t=>zh(Dv,Ov,e,t);function Fv(e,t,n,r){return N.Delay(()=>{let s;const i=uo(t)(rn(new zt(0,[]),Ht(`${co(e)}/accounts/${n}/migration`)));return s=N.Bind(i,o=>N.Return(new g(0,[o]))),N.Bind(s,o=>{const a=o;if(a.tag===1)return N.Return(new g(1,[a.fields[0]]));{const l=a.fields[0];if(l.statusCode===200){const c=en($e(nn(lo(),new gt(1,[]))),l.responseText);return N.Return(c)}else return N.Return(new g(1,["Unexpected response from flare identity backend"]))}})})}function Vv(e,t,n,r){return N.Delay(()=>{let s;const i=uo(t)(rn(new zt(2,[]),Ht(`${co(e)}/accounts/${n}/migration/start`)));return s=N.Bind(i,o=>N.Return(new g(0,[o]))),N.Bind(s,o=>{const a=o;if(a.tag===1)return N.Return(new g(1,[a.fields[0]]));{const l=a.fields[0];if(l.statusCode===200){let c;const d=en($e(nn(lo(),new gt(1,[]))),l.responseText);return c=N.Return(d),N.Bind(c,u=>{const m=u;if(m.tag===1)return N.Return(new g(1,[m.fields[0]]));{const h=m.fields[0];return h.tag===1?N.Return(new g(0,[h.fields[0]])):N.Return(new g(1,["Unexpected migration state after starting migration"]))}})}else return N.Return(new g(1,["Unexpected response from flare identity backend"]))}})})}function Lv(e,t,n,r){return N.Delay(()=>{let s;const i=uo(t)(rn(new zt(2,[]),Ht(`${co(e)}/accounts/${n}/migration/rollback`)));return s=N.Bind(i,o=>N.Return(new g(0,[o]))),N.Bind(s,o=>{const a=o;if(a.tag===1)return N.Return(new g(1,[a.fields[0]]));{const l=a.fields[0];if(l.statusCode===200){let c;const d=en($e(nn(lo(),new gt(1,[]))),l.responseText);return c=N.Return(d),N.Bind(c,u=>{const m=u;return m.tag===1?N.Return(new g(1,[m.fields[0]])):m.fields[0].tag===0?N.Return(new g(0,[void 0])):N.Return(new g(1,["Unexpected migration state after rolling back migration"]))})}else return N.Return(new g(1,["Unexpected response from flare identity backend"]))}})})}function Bv(e,t,n,r){return N.Delay(()=>{let s;const i=uo(t)(rn(new zt(2,[]),Ht(`${co(e)}/accounts/${n}/migration/stop`)));return s=N.Bind(i,o=>N.Return(new g(0,[o]))),N.Bind(s,o=>{const a=o;if(a.tag===1)return N.Return(new g(1,[a.fields[0]]));{const l=a.fields[0];if(l.statusCode===200){let c;const d=en($e(nn(lo(),new gt(1,[]))),l.responseText);return c=N.Return(d),N.Bind(c,u=>{const m=u;if(m.tag===1)return N.Return(new g(1,[m.fields[0]]));{const h=m.fields[0];return h.tag===2?N.Return(new g(0,[h.fields[0]])):N.Return(new g(1,["Unexpected migration state after stopping migration"]))}})}else return N.Return(new g(1,["Unexpected response from flare identity backend"]))}})})}class Cr extends j{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["RedirectionOff","RedirectionOn","Complete","Failed"]}}class rs extends j{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["ConfirmStartRedirection","ConfirmRollbackRedirection","ConfirmStopMigration"]}}function _l(e){switch(e.tag){case 1:return new rs(1,[!0]);case 2:return new rs(2,[!0]);default:return new rs(0,[!0])}}class $n extends Q{constructor(t,n){super(),this.Status=t,this.CurrentModal=n}}let ln=class extends j{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["ShowModal","HideModal","RequestStartRedirection","RedirectionStarted","RequestRollbackRedirection","RedirectionRolledBack","RequestStopMigration","MigrationStopped","OperationFailed"]}};function Uv(e,t){return[new $n(e,void 0),le()]}function jv(e,t,n,r,s){switch(r.tag){case 1:return[new $n(s.Status,void 0),le()];case 2:return[new $n(s.Status,Ge(_l,s.CurrentModal)),Zr(e,void 0,i=>new ln(3,[i]),i=>new ln(8,[i]))];case 3:return[new $n(new Cr(1,[r.fields[0]]),void 0),le()];case 4:return[new $n(s.Status,Ge(_l,s.CurrentModal)),Zr(t,void 0,()=>new ln(5,[void 0]),i=>new ln(8,[i]))];case 5:return[new $n(new Cr(0,[]),void 0),le()];case 6:return[new $n(s.Status,Ge(_l,s.CurrentModal)),Zr(n,void 0,i=>new ln(7,[i]),i=>new ln(8,[i]))];case 7:return[new $n(new Cr(2,[r.fields[0]]),void 0),le()];case 8:return[new $n(new Cr(3,[r.fields[0]]),void 0),le()];default:return[new $n(s.Status,r.fields[0]),le()]}}function zv(e,t,n){let r,s,i,o,a,l,c,d,u,m,h,p,$,w;return f(ts,{onClose:e,child:(r=[f("div",{className:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity","aria-hidden":!0}),f("div",S(y([["className","fixed inset-0 z-10 w-screen overflow-y-auto h-full flex items-center justify-center"],["onClick",C=>{e()}],(s=[f("div",S(y([(i="w-[512px] p-6 bg-white rounded-lg shadow-xl inline-flex justify-start items-start gap-4 overflow-hidden",["className",i]),["onClick",C=>{C.preventDefault(),C.stopPropagation()}],(o=[f("div",S(y([["className","w-10 h-10 relative bg-gradient-to-bl from-red-200 to-red-200/0 rounded"],(a=[f("div",{className:"w-6 h-6 left-[8px] top-[8px] absolute overflow-hidden",children:v.Children.toArray([Wa])})],["children",v.Children.toArray(Array.from(a))])]))),f("div",S(y([["className","flex-1 inline-flex flex-col justify-start items-start gap-4"],(l=[f("div",S(y([["className","self-stretch flex flex-col justify-start items-start gap-2"],(c=[f("div",{className:"self-stretch justify-start text-gray-900 text-lg font-semibold leading-6",children:"Turn off redirection?"}),f("div",S(y([["className","self-stretch justify-start"],(d=[f("div",{className:"text-gray-700 text-sm font-normal leading-5",children:v.Children.toArray(["Employees will be able to log into HRIS again."])})],["children",v.Children.toArray(Array.from(d))])])))],["children",v.Children.toArray(Array.from(c))])]))),f("div",S(y([["className","self-stretch inline-flex justify-end items-center gap-3"],(u=[f("button",S(y([(m="px-[17px] py-[9px] bg-white rounded-md outline outline-1 outline-offset-[-1px] outline-gray-300 flex justify-center items-center overflow-hidden",["className",m]),(h=[f("div",{className:"justify-start text-gray-700 text-sm font-medium leading-tight",children:"Cancel",onClick:C=>{e()}})],["children",v.Children.toArray(Array.from(h))])]))),f("div",S(y([["className","flex justify-start items-start gap-2"],(p=[f("button",S(y([($="min-h-[34px] px-[13px] py-[9px] bg-[#2563EB] rounded-md flex justify-center items-center overflow-hidden",["className",$]),(w=se(k(()=>M(A(f("div",{className:"justify-start text-white text-sm font-medium leading-none",children:"Turn off redirection",onClick:C=>{t()}})),k(()=>n?A(f("span",{className:"animate-spin",children:v.Children.toArray([Ga])})):Ke())))),["children",v.Children.toArray(Array.from(w))])])))],["children",v.Children.toArray(Array.from(p))])])))],["children",v.Children.toArray(Array.from(u))])])))],["children",v.Children.toArray(Array.from(l))])])))],["children",v.Children.toArray(Array.from(o))])])))],["children",v.Children.toArray(Array.from(s))])])))],f(ve,{},...r))})}function Hv(e,t,n){let r,s,i,o,a,l,c,d,u,m,h,p,$,w,C,x;return f(ts,{onClose:e,child:(r=[f("div",{className:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity","aria-hidden":!0}),f("div",S(y([["className","fixed inset-0 z-10 w-screen overflow-y-auto h-full flex items-center justify-center"],["onClick",E=>{e()}],(s=[f("div",S(y([(i="w-[512px] p-6 bg-white rounded-lg shadow-xl inline-flex justify-start items-start gap-4 overflow-hidden",["className",i]),["onClick",E=>{E.preventDefault(),E.stopPropagation()}],(o=[f("div",S(y([["className","w-10 h-10 relative bg-gradient-to-bl from-red-200 to-red-200/0 rounded"],(a=[f("div",{className:"w-6 h-6 left-[8px] top-[8px] absolute overflow-hidden",children:v.Children.toArray([Wa])})],["children",v.Children.toArray(Array.from(a))])]))),f("div",S(y([["className","flex-1 inline-flex flex-col justify-start items-start gap-4"],(l=[f("div",S(y([["className","self-stretch flex flex-col justify-start items-start gap-2"],(c=[f("div",{className:"self-stretch justify-start text-gray-900 text-lg font-semibold leading-6",children:"Finalise redirection?"}),f("div",S(y([["className","self-stretch justify-start"],(d=[f("div",S(y([["className","text-gray-700 text-sm font-normal leading-5"],(u=[(m="This will make the new login the default: end users can only access their accounts through Workspace.",m)],["children",v.Children.toArray(Array.from(u))])]))),f("div",{className:"text-gray-700 text-sm font-bold leading-5 mt-2",children:"This action is not reversible."})],["children",v.Children.toArray(Array.from(d))])])))],["children",v.Children.toArray(Array.from(c))])]))),f("div",S(y([["className","self-stretch inline-flex justify-end items-center gap-3"],(h=[f("button",S(y([(p="px-[17px] py-[9px] bg-white rounded-md outline outline-1 outline-offset-[-1px] outline-gray-300 flex justify-center items-center overflow-hidden",["className",p]),($=[f("div",{className:"justify-start text-gray-700 text-sm font-medium leading-tight",children:"Cancel",onClick:E=>{e()}})],["children",v.Children.toArray(Array.from($))])]))),f("div",S(y([["className","flex justify-start items-start gap-2"],(w=[f("button",S(y([(C="min-h-[34px] px-[13px] py-[9px] bg-[#2563EB] rounded-md flex justify-center items-center overflow-hidden",["className",C]),(x=se(k(()=>M(A(f("div",{className:"justify-start text-white text-sm font-medium leading-none",children:"Finalise redirection",onClick:E=>{t()}})),k(()=>n?A(f("span",{className:"animate-spin",children:v.Children.toArray([Ga])})):Ke())))),["children",v.Children.toArray(Array.from(x))])])))],["children",v.Children.toArray(Array.from(w))])])))],["children",v.Children.toArray(Array.from(h))])])))],["children",v.Children.toArray(Array.from(l))])])))],["children",v.Children.toArray(Array.from(o))])])))],["children",v.Children.toArray(Array.from(s))])])))],f(ve,{},...r))})}function Wv(e,t,n){let r,s,i,o,a,l,c,d,u,m,h,p,$,w,C,x;return f(ts,{onClose:e,child:(r=[f("div",{className:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity","aria-hidden":!0}),f("div",S(y([["className","fixed inset-0 z-10 w-screen overflow-y-auto h-full flex items-center justify-center"],["onClick",E=>{e()}],(s=[f("div",S(y([(i="w-[512px] p-6 bg-white rounded-lg shadow-xl inline-flex justify-start items-start gap-4 overflow-hidden",["className",i]),["onClick",E=>{E.preventDefault(),E.stopPropagation()}],(o=[f("div",S(y([["className","w-10 h-10 relative bg-gradient-to-bl from-red-200 to-red-200/0 rounded"],(a=[f("div",{className:"w-6 h-6 left-[8px] top-[8px] absolute overflow-hidden",children:v.Children.toArray([Wa])})],["children",v.Children.toArray(Array.from(a))])]))),f("div",S(y([["className","flex-1 inline-flex flex-col justify-start items-start gap-4"],(l=[f("div",S(y([["className","self-stretch flex flex-col justify-start items-start gap-2"],(c=[f("div",{className:"self-stretch justify-start text-gray-900 text-lg font-semibold leading-6",children:"Turn on redirection?"}),f("div",S(y([["className","self-stretch justify-start"],(d=[f("div",S(y([["className","text-gray-700 text-sm font-normal leading-5"],(u=[(m="Employees will no longer be able to log into HRIS, they will see a message telling them to use the Flare App for benefits instead.",m)],["children",v.Children.toArray(Array.from(u))])]))),f("div",{className:"text-gray-700 text-sm font-bold leading-5 mt-2",children:"You can turn this off anytime."})],["children",v.Children.toArray(Array.from(d))])])))],["children",v.Children.toArray(Array.from(c))])]))),f("div",S(y([["className","self-stretch inline-flex justify-end items-center gap-3"],(h=[f("button",S(y([(p="px-[17px] py-[9px] bg-white rounded-md outline outline-1 outline-offset-[-1px] outline-gray-300 flex justify-center items-center overflow-hidden",["className",p]),($=[f("div",{className:"justify-start text-gray-700 text-sm font-medium leading-tight",children:"Cancel",onClick:E=>{e()}})],["children",v.Children.toArray(Array.from($))])]))),f("div",S(y([["className","flex justify-start items-start gap-2"],(w=[f("button",S(y([(C="min-h-[34px] px-[13px] py-[9px] bg-[#2563EB] rounded-md flex justify-center items-center overflow-hidden",["className",C]),(x=se(k(()=>M(A(f("div",{className:"justify-start text-white text-sm font-medium leading-none",children:"Turn on redirection",onClick:E=>{t()}})),k(()=>n?A(f("span",{className:"animate-spin",children:v.Children.toArray([Ga])})):Ke())))),["children",v.Children.toArray(Array.from(x))])])))],["children",v.Children.toArray(Array.from(w))])])))],["children",v.Children.toArray(Array.from(h))])])))],["children",v.Children.toArray(Array.from(l))])])))],["children",v.Children.toArray(Array.from(o))])])))],["children",v.Children.toArray(Array.from(s))])])))],f(ve,{},...r))})}const Gv=f("h3",{className:"justify-start text-xl leading-6 font-semibold text-gray-900",children:"HRIS Migration - Redirection"}),qv=f("div",S(y([["className","flex flex-col gap-2"],(()=>{let e,t,n,r;const s=[f("div",S(y([["className","self-stretch justify-start"],(e=[f("span",{className:"text-sm font-normal text-gray-700 leading-tight tracking-tight",children:"For accounts in the "}),f("span",{className:"text-sm font-semibold text-gray-700 leading-tight tracking-tight",children:"partial migration phase"}),f("span",S(y([["className","text-sm font-normal text-gray-700 leading-tight tracking-tight"],(t=[(n=", end users are redirected to the Flare App to access their benefits. The redirection remains active until turned off and/or the migration is complete. ",n)," ","The redirection setting is managed manually."],["children",v.Children.toArray(Array.from(t))])])))],["children",v.Children.toArray(Array.from(e))])]))),f("button",S(y([["className","inline-flex items-center justify-start gap-1"],(r=[f("div",{className:"justify-start text-[#1D4ED8] text-sm font-medium leading-tight",children:"Learn more about HRIS migration"}),Oy],["children",v.Children.toArray(Array.from(r))])])))];return["children",v.Children.toArray(Array.from(s))]})()])));function Hh(e,t,n,r){return f("button",S(se(k(()=>M(A(["type","button"]),k(()=>M(A(["className",ne(" ",se(k(()=>M(A("flex min-h-9 items-center justify-center overflow-hidden rounded-md"),k(()=>M(A("px-4 py-2.5 text-sm font-medium leading-none"),k(()=>M(A("focus-visible:outline-2 focus-visible:outline-offset-2"),k(()=>M(A("disabled:bg-gray-300 disabled:text-gray-500 disabled:cursor-not-allowed disabled:border-gray-300"),k(()=>e)))))))))))]),k(()=>M(A(["children",n]),k(()=>M(A(["onClick",r]),k(()=>t.tag===0?je():y([["disabled",!0],["title",t.fields[0]]])))))))))))))}const Kv=e=>t=>n=>Hh(["bg-[#2563EB] text-white focus-visible:outline-[#2563EB]","disabled:bg-gray-300 disabled:text-gray-500 disabled:cursor-not-allowed disabled:border-gray-300"],e,t,n),Wh=e=>t=>n=>Hh(["bg-white text-gray-700 outline outline-1 outline-offset-[-1px] outline-gray-300 focus-visible:outline-gray-500"],e,t,n);function Zv(e,t){let n,r,s,i,o,a,l,c,d,u;return f("div",S(y([(n="w-full max-w-[480px] min-w-[280px] p-6 bg-white rounded-lg inline-flex flex-col justify-start items-start gap-4 overflow-hidden",["className",n]),(r=[f("div",S(y([["className","self-stretch flex flex-col justify-start items-start gap-2"],(s=[f("div",S(y([["className","self-stretch inline-flex justify-start items-center gap-3"],(i=[f("h4",{className:"justify-start text-base font-bold leading-5 text-gray-900",children:"Redirection"}),f("div",S(y([["className","flex justify-start items-start"],(o=[f("div",S(y([["className","px-2.5 py-0.5 bg-gray-100 rounded flex justify-center items-center"],(a=[f("div",{className:"text-center justify-start text-gray-800 text-xs font-medium leading-none",children:"Inactive"})],["children",v.Children.toArray(Array.from(a))])])))],["children",v.Children.toArray(Array.from(o))])])))],["children",v.Children.toArray(Array.from(i))])])))],["children",v.Children.toArray(Array.from(s))])]))),f("div",S(y([["className","self-stretch justify-start"],(l=[f("span",{className:"text-black text-sm font-semibold leading-tight tracking-tight",children:"When redirection is on, it will:"}),f("ul",S(y([["className","list-disc list-outside mt-2 mb-4 pl-6"],(c=[f("li",{className:"text-black text-sm font-normal",children:"Prevent end users from logging into HRIS."}),f("li",S(y([["className","text-black text-sm font-normal"],(d="Redirect end users to a temporary screen that prompts them to set up and access their benefits from the Flare App.",["children",d])])))],["children",v.Children.toArray(Array.from(c))])]))),f("div",{className:"text-black text-sm font-normal leading-tight tracking-tight",children:"You can turn this setting off at any time."})],["children",v.Children.toArray(Array.from(l))])]))),f("div",S(y([["className","inline-flex justify-start items-start gap-2"],(u=[Kv(e)("Turn on redirection")(t)],["children",v.Children.toArray(Array.from(u))])])))],["children",v.Children.toArray(Array.from(r))])])))}function Jv(e,t,n,r){let s,i,o,a,l,c,d,u,m,h,p,$,w,C,x,E;const O=Rr(t,"dd/MM/yyyy");return f("div",S(y([(s="w-full max-w-[480px] min-w-[280px] p-6 bg-white rounded-lg inline-flex flex-col justify-start items-start gap-4 overflow-hidden",["className",s]),(i=[f("div",S(y([["className","self-stretch flex flex-col justify-start items-start gap-2"],(o=[f("div",S(y([["className","self-stretch inline-flex justify-start items-center gap-3"],(a=[f("div",{className:"justify-start text-base font-bold leading-tight text-gray-900",children:"Redirection"}),f("div",S(y([["className","flex justify-start items-start"],(l=[f("div",S(y([["className","pl-2 pr-2.5 py-0.5 bg-gray-100 rounded flex justify-center items-center gap-1.5"],(c=[f("div",S(y([["className","w-2 h-2 relative"],(d=[f("div",{className:"w-1.5 h-1.5 left-[1px] top-[1px] absolute bg-green-400 rounded-full"})],["children",v.Children.toArray(Array.from(d))])]))),f("div",{className:"text-center justify-start text-gray-800 text-xs font-medium leading-none",children:"Active"})],["children",v.Children.toArray(Array.from(c))])])))],["children",v.Children.toArray(Array.from(l))])])))],["children",v.Children.toArray(Array.from(a))])]))),f("div",S(y([["className","self-stretch inline-flex justify-start items-start gap-2"],(u=[f("div",{className:"justify-start text-sm font-normal text-[#686F7D] leading-tight tracking-tight",children:`Started ${O}`})],["children",v.Children.toArray(Array.from(u))])])))],["children",v.Children.toArray(Array.from(o))])]))),f("div",S(y([["className","self-stretch justify-start"],(m=[f("span",{className:"text-black text-sm font-semibold leading-tight tracking-tight",children:"Redirection is currently active, it will:"}),f("ul",S(y([["className","list-disc list-outside mt-2 mb-4 pl-6"],(h=[f("li",{className:"text-black text-sm font-normal",children:"Prevent end users from logging into HRIS."}),f("li",S(y([["className","text-black text-sm font-normal"],(p="Redirect end users to a temporary screen that prompts them to set up and access their benefits from the Flare App.",["children",p])])))],["children",v.Children.toArray(Array.from(h))])])))],["children",v.Children.toArray(Array.from(m))])]))),f("div",S(y([["className","inline-flex justify-start items-start gap-2"],($=[Wh(e)("Turn off redirection")(n)],["children",v.Children.toArray(Array.from($))])]))),f("div",S(y([["className","py-3 flex flex-col justify-start items-start gap-2.5"],(w=[f("div",{className:"w-[432px] h-0 outline outline-1 outline-offset-[-0.50px] outline-gray-100"})],["children",v.Children.toArray(Array.from(w))])]))),f("div",S(y([["className","self-stretch justify-start"],(C=[f("div",{className:"text-black text-sm font-semibold leading-tight tracking-tight",children:v.Children.toArray(["Has the migration finished?"])}),f("div",S(y([["className","mt-4 text-black text-sm font-normal leading-tight tracking-tight"],(x="If all other migration steps are complete, you can make the new login the default by clicking on “Finalise redirection”. From then on, end users will only access their accounts through Workspace.",["children",x])])))],["children",v.Children.toArray(Array.from(C))])]))),f("div",S(y([["className","inline-flex justify-start items-start gap-2"],(E=[Wh(e)("Finalise redirection")(r)],["children",v.Children.toArray(Array.from(E))])])))],["children",v.Children.toArray(Array.from(i))])])))}function Yv(e){let t,n,r,s,i,o,a;const l=Rr(e,"dd/MM/yyyy");return f("div",S(y([(t="w-full max-w-[480px] min-w-[280px] p-6 bg-white rounded-lg inline-flex flex-col justify-start items-start gap-4 overflow-hidden",["className",t]),(n=[f("div",S(y([["className","self-stretch flex flex-col justify-start items-start gap-2"],(r=[f("div",S(y([["className","self-stretch inline-flex justify-start items-center gap-3"],(s=[f("h4",{className:"justify-start text-gray-900 text-base font-bold leading-tight",children:"Redirection"}),f("div",S(y([["className","flex justify-start items-start"],(i=[f("div",S(y([["className","px-2.5 py-0.5 bg-green-100 rounded flex justify-center items-center"],(o=[f("div",{className:"text-center justify-start text-green-800 text-xs font-medium leading-none",children:"Completed"})],["children",v.Children.toArray(Array.from(o))])])))],["children",v.Children.toArray(Array.from(i))])])))],["children",v.Children.toArray(Array.from(s))])]))),f("div",S(y([["className","self-stretch inline-flex justify-start items-start gap-2"],(a=[f("div",{className:"justify-start text-sm font-normal text-[#686F7D] leading-tight tracking-tight",children:`Completed on ${l}`})],["children",v.Children.toArray(Array.from(a))])])))],["children",v.Children.toArray(Array.from(r))])]))),f("div",{className:"self-stretch justify-start text-black text-sm font-normal leading-tight tracking-tight",children:"Redirection for this account has been completed as part of migration. No further action is needed."})],["children",v.Children.toArray(Array.from(n))])])))}function Xv(e){let t,n;const r=e.stopMigration,s=e.rollbackRedirection,i=e.startRedirection,o=e.migrationStatus,a=e.roles,l=fr(()=>dr(()=>Uv(o),(p,$)=>jv(i,s,r,p,$),(p,$)=>{}),void 0,void 0),c=l[0],d=l[1],u=p=>{d(new ln(0,[p]))},m=()=>{d(new ln(1,[]))},h=a.ProvisionAccounts?new g(0,[void 0]):new g(1,["You do not have permission to manage redirection for this account. (Requires AccountRegistry.ProvisionAccounts permission)"]);return f("div",S(y([["className","flex flex-col gap-4 bg-gray-100"],(t=[Gv,qv,f("div",S(y([["className","flex mb-4 gap-6 flex-col"],(n=se(k(()=>{let p;return M((p=c.Status,p.tag===1?A(Jv(h,p.fields[0],$=>{u(new rs(1,[!1]))},$=>{u(new rs(2,[!1]))})):p.tag===2?A(Yv(p.fields[0])):p.tag===3?A(f("div",{className:"text-red-600",children:`Operation failed: ${p.fields[0]}`})):A(Zv(h,$=>{u(new rs(0,[!1]))}))),k(()=>{let $,w,C;const x=c.CurrentModal;return x==null?A(ge()):x.tag===1?($=x.fields[0],A(zv(m,()=>{d(new ln(4,[]))},$))):x.tag===2?(w=x.fields[0],A(Hv(m,()=>{d(new ln(6,[]))},w))):(C=x.fields[0],A(Wv(m,()=>{d(new ln(2,[]))},C)))}))})),["children",v.Children.toArray(Array.from(n))])])))],["children",v.Children.toArray(Array.from(t))])])))}let Gh=class extends j{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Initialise","LoadedMigrationStatus"]}},Zs=class extends j{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Loading","Loaded","Failed"]}};function Qv(){return[new Zs(0,[]),ee(e=>{e(new Gh(0,[]))})]}function ex(e,t,n){if(t.tag===1){if(t.fields[0].tag===1)return[new Zs(2,[]),le()];switch(t.fields[0].fields[0].tag){case 1:return[new Zs(1,[new Cr(1,[t.fields[0].fields[0].fields[0]])]),le()];case 2:return[new Zs(1,[new Cr(2,[t.fields[0].fields[0].fields[0]])]),le()];default:return[new Zs(1,[new Cr(0,[])]),le()]}}else return[n,Is(r=>{Ns(r)},e,void 0,r=>new Gh(1,[r]))]}function tx(e){const t=e.flareAccountId,n=Wn(Mn),r=fr(()=>dr(Qv,(i,o)=>ex(()=>Fv(n.BackendUrl,n.AccessToken,t),i,o),(i,o)=>{}),void 0,void 0)[0],s=se(k(()=>r.tag===1?A(f(Xv,{roles:n.Roles,migrationStatus:r.fields[0],startRedirection:()=>Vv(n.BackendUrl,n.AccessToken,t),rollbackRedirection:()=>Lv(n.BackendUrl,n.AccessToken,t),stopMigration:()=>Bv(n.BackendUrl,n.AccessToken,t)})):r.tag===2?A(f("div",{children:"We are unable to load the HRIS Migration component at this time."})):A(f("div",{children:"Loading..."}))));return f("div",{children:v.Children.toArray(Array.from(s))})}function nx({hasLegalEntity:e,defaultValues:t,validateName:n,validateBusinessName:r,validateBusinessNumber:s,validateExternalId:i,onSubmit:o,closeModal:a}){const{handleSubmit:l,control:c}=Hi({mode:"onChange",defaultValues:t});return R(ve,{children:[R("div",{className:"font-bold text-lg mb-4",children:"Account details"}),R("form",{className:"space-y-6",onSubmit:l(o),children:[R("div",{children:[R(mt,{label:"Name",name:"Name",control:c,placeholder:"e.g. Acme Co",validate:n}),R("p",{className:"mt-2 text-sm font-normal text-gray-500",children:"This will be used as a display name."})]}),R(mt,{label:"External ID",name:"ExternalId",control:c,placeholder:"e.g. 123456",validate:i,optional:!0}),e&&R(mt,{label:"Business Name",name:"BusinessName",control:c,placeholder:"e.g. ACME LTD PTY",validate:r}),e&&R(mt,{label:"Business Number",name:"BusinessNumber",control:c,validate:s,isNumber:!0}),R(Wi,{primaryLabel:"Update",secondaryLabel:"Cancel",secondaryOnClick:a})]})]})}function rx(e){let t,n;switch(e==null||fi(e)?t=1:(t=0,n=e),t){case 0:return ut(q0(n));default:return!0}}function sx(e,t,n){return f(nx,{hasLegalEntity:n.LegalEntity!=null,defaultValues:new Ly(n.Name,n.ExternalId,We(Ge(r=>r.BusinessName,n.LegalEntity),""),We(Ge(r=>r.BusinessNumber,n.LegalEntity),"")),validateName:r=>ut(Ho(r)),validateBusinessName:r=>ut(Bc(r)),validateBusinessNumber:r=>ut(Uc(r)),validateExternalId:rx,onSubmit:r=>{const s=new Nd(r.Name.trim(),sp(i=>{if(!fi(i))return i.trim()},r.ExternalId),Ge(i=>new Td(r.BusinessName.trim(),r.BusinessNumber.trim()),n.LegalEntity));Ce(s,n)?e():t(s)},closeModal:e})}function ix(e){const t=e.account,n=e.updateAccount,r=Wn(Mn),s=Gn(!1),i=s[1],o=se(k(()=>{let a;return M(A(oo(f("div",S(y([["className","flex flex-row space-x-4 items-center"],(a=[io("Account Information",void 0),f("button",{className:ne(" ",se(k(()=>M(r.Roles.ProvisionAccounts?Ke():A("hidden"),k(()=>A("inline-flex items-center rounded border border-transparent bg-indigo-600 px-2.5 py-1.5 mr-2 text-xs font-medium text-white shadow-sm hover:bg-indigo-700 focus:outline-none")))))),onClick:l=>{i(!0)},type:"button",children:v.Children.toArray([My])})],["children",v.Children.toArray(Array.from(a))])]))),se(k(()=>{let l;return M(A((l=["ID",t.StreamId],f(yl,{label:l[0],value:l[1]}))),k(()=>{let c;return M(A((c=["Provisioning Mode",Wc(t.ProvisioningMode)],nt(c[0],c[1]))),k(()=>{let d;return M(A((d=["Name",t.Name],f(yl,{label:d[0],value:d[1]}))),k(()=>{let u;return M(A((u=["External ID",We(t.ExternalId,"")],nt(u[0],u[1]))),k(()=>{let m;return M(A((m=["Channel ID",We(t.ChannelId,"")],nt(m[0],m[1]))),k(()=>{let h;if(r.Roles.ReadProtectedData){const p=t.ContactDetails;if(p!=null){const $=p;return M(A((h=["Contact",`${$.FirstName} ${$.LastName}`],nt(h[0],h[1]))),k(()=>{let w;return M(A((w=["Phone",$.MobilePhone],nt(w[0],w[1]))),k(()=>{let C;return A((C=["Email",$.Email],nt(C[0],C[1])))}))}))}else return Ke()}else return Ke()}))}))}))}))}))})))),k(()=>{let l,c,d,u,m,h,p;return s[0]?A((l=()=>{i(!1)},c=new Nd(t.Name,t.ExternalId,Ge($=>new Td($.BusinessName,$.BusinessNumber),t.LegalEntity)),f(ts,{onClose:l,child:f("div",S(ee((d=[f("div",{className:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity","aria-hidden":!0}),f("div",S(y([["className","fixed inset-0 z-10 w-screen overflow-y-auto"],(u=[f("div",S(y([["className","fixed inset-0 z-10 w-screen overflow-y-auto h-full flex items-center justify-center"],(m=[f("div",S(y([["className","w-[480px] bg-white shadow-xl rounded-lg"],(h=[f("div",{className:"pt-6 px-6 pb-4 border-b font-bold text-xl",children:"Update account"}),f("div",S(y([["className","pt-4 mx-6"],(p=[f("div",{className:"mb-4 text-sm font-normal text-gray-500",children:v.Children.toArray(["Fields are required unless marked as optional."])}),sx(l,$=>{n($),i(!1)},c)],["children",v.Children.toArray(Array.from(p))])])))],["children",v.Children.toArray(Array.from(h))])])))],["children",v.Children.toArray(Array.from(m))])])))],["children",v.Children.toArray(Array.from(u))])])))],["children",v.Children.toArray(Array.from(d))]))))}))):Ke()}))}));return f(ve,{},...o)}function ox(e){let t,n,r,s,i,o,a;if(e==null)return ge();{const l=e;return oo(io("Legal Entity",void 0),y([(t=["Business Name",l.BusinessName],nt(t[0],t[1])),(n=["Business Number",l.BusinessNumber],nt(n[0],n[1])),(r=["Address Line 1",l.Address1],nt(r[0],r[1])),(s=["Address Line 2",We(l.Address2,"")],nt(s[0],s[1])),(i=["City",l.City],nt(i[0],i[1])),(o=["State",We(l.State,"")],nt(o[0],o[1])),(a=["Postcode",l.Postcode],nt(a[0],a[1]))]))}}function ax(e){let t;if(e==null)return ge();{const n=e;return oo(io("Legal Entity",void 0),ee((t=["Notes",n],nt(t[0],t[1]))))}}function lx(e){const t=e.account,n=e.updateAccount,r=y([f(ix,{updateAccount:n,account:t}),ox(t.LegalEntity),ax(t.Notes)]);return f("div",{children:v.Children.toArray(Array.from(r))})}class On extends j{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Details","ProfilesDirectory","Users","SuperConfiguration","BenefitsOnboardingConfiguration","BankDetailsConfiguration","SalaryPackagingConfiguration","Workspace","HrisMigration"]}}function cx(e){switch(e.tag){case 1:return"Directory";case 2:return"Users";case 3:return"Super";case 4:return"Benefits";case 5:return"Bank Details";case 6:return"Salary Packaging";case 7:return"Workspace";case 8:return"HRIS Migration";default:return"Details"}}function ux(e,t){const n=[e,t];return Ce(n[0],Ve("7cb0e66f-74b7-49f1-a3aa-be7970b48cb3"))||Ce(n[0],Ve("1c74bcf9-b795-42c6-88dc-d45c8f8827d4"))||Ce(n[0],Ve("89837631-c6b3-4635-a08d-fdd3383f4fbb"))?!0:Ce(n[0],Ve("e8269f8b-4f5e-482a-863e-4512cca40ec6"))}function dx(e,t,n){const r=[e,t],s=rr(i=>Tf(cx(n),i[0],cr(Rs(i[1](r)))),se(k(()=>M(A(["Details",i=>new q(8,[i[0],i[1]])]),k(()=>M(A(["Workspace",i=>new q(15,[i[0],i[1]])]),k(()=>M(A(["Directory",i=>new q(9,[i[0],i[1]])]),k(()=>M(A(["Users",i=>new q(10,[i[0],i[1]])]),k(()=>M(A(["Super",i=>new q(11,[i[0],i[1]])]),k(()=>M(A(["Benefits",i=>new q(12,[i[0],i[1]])]),k(()=>M(A(["Bank Details",i=>new q(13,[i[0],i[1]])]),k(()=>M(A(["Salary Packaging",i=>new q(14,[i[0],i[1]])]),k(()=>ux(r[0],r[1])?A(["HRIS Migration",i=>new q(16,[i[0],i[1]])]):Ke())))))))))))))))))));return f(Mf,{headers:s})}function fx(e){const t=e.account,n=e.mode,r=e.props,s=e.updateAccount,i=Wn(Mn),o=r.accountDetails,a=o[0],l=o[1];switch(n.tag){case 1:return f(Bh,{partnerId:a,accountId:l,backendUrl:i.BackendUrl,accessToken:i.AccessToken});case 2:return f(Mv,{partnerId:a,accountId:l,backendUrl:i.BackendUrl,accessToken:i.AccessToken});case 3:return f(Fh,{partnerId:a,accountId:l,backendUrl:i.BackendUrl,accessToken:i.AccessToken});case 4:return f(Vh,{partnerId:a,accountId:l,backendUrl:i.BackendUrl,accessToken:i.AccessToken});case 5:return f(Lh,{partnerId:a,accountId:l,backendUrl:i.BackendUrl,accessToken:i.AccessToken});case 6:return f(Rv,{accountId:l,backendUrl:i.BackendUrl,accessToken:i.AccessToken});case 7:return f(Uh,{backendUrl:i.BackendUrl,accessToken:i.AccessToken,partnerId:a,accountId:l});case 8:{let c,d,u;switch(t.tag){case 0:case 1:{c=2;break}case 3:{c=3,u=t.fields[0];break}default:t.fields[0].tag===0?(c=0,d=t.fields[0].fields[0]):c=1}switch(c){case 0:{const m=d.ExternalId;return m==null?f(an,{error:"This account does not have externalId (Flare AccountId)"}):f(tx,{flareAccountId:m})}case 1:return f(an,{error:"There was an error retrieving account"});case 2:return f(Ks,null);default:{const m=Ze(u);return f(an,{error:m})}}}default:{let c,d,u;switch(t.tag){case 0:case 1:{c=2;break}case 3:{c=3,u=t.fields[0];break}default:t.fields[0].tag===0?(c=0,d=t.fields[0].fields[0]):c=1}switch(c){case 0:return f(lx,{updateAccount:s,account:d});case 1:return f(an,{error:"There was an error retrieving account "});case 2:return f(Ks,null);default:{const m=Ze(u);return f(an,{error:m})}}}}}function hx(e){let t,n,r;const s=e.account,i=e.mode,o=e.props,a=e.updateAccount;return f("div",S(y([["className","flex flex-row"],(t=[(n=o.accountDetails,dx(n[0],n[1],i)),f("div",S(y([["className","w-full"],(r=[f(fx,{updateAccount:a,props:o,mode:i,account:s})],["children",v.Children.toArray(Array.from(r))])])))],["children",v.Children.toArray(Array.from(t))])])))}class ss extends j{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["NotStarted","Started","Finished","Failed"]}}let fo=class extends j{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["UpdateAccountId","Search","SearchSuccess","SearchFailure"]}},is=class extends Q{constructor(t,n){super(),this.AccountId=t,this.AccountDetails=n}};function mx(){return[new is(void 0,new ss(0,[])),le()]}function px(e,t,n,r){let s,i;switch(n.tag){case 1:{const o=r.AccountId;if(o!=null){const a=o;return[new is(r.AccountId,new ss(1,[])),Zr(()=>Gw(e,t,a),void 0,l=>new fo(2,[l]),l=>new fo(3,[l]))]}else return[new is(r.AccountId,new ss(3,["Account Id is required"])),le()]}case 2:{const o=n.fields[0];return[new is(r.AccountId,new ss(2,[o])),(s=["account-registry","partners",`${o.PartnerId}`,"accounts",`${o.AccountId}`],i=[s[0],s[1],s[2],s[3],s[4]],Xe(a=>{ht(y(i))}))]}case 3:return[new is(r.AccountId,new ss(3,["Account not found"])),le()];default:return[new is(Rt(n.fields[0]),r.AccountDetails),le()]}}const gx=f("h3",{className:"text-base font-semibold text-gray-900",id:"modal-title",children:"Account Search"}),$x=f("div",S(y([["className","mt-2"],(()=>{let e;const t=[f("p",S(y([["className","text-sm text-gray-500 whitespace-pre-line"],(e=`Enter an Account Id below to search for an account.
52
52
 
53
- If the account is found you will be redirected to the account details page.`,["children",e])])))];return["children",v.Children.toArray(Array.from(t))]})()])));function dx(e){let t,n,r,s;return f("div",S(y([["className","absolute right-0 top-0 hidden pr-4 pt-4 sm:block"],(t=[f("button",S(y([(n="rounded-md bg-white text-gray-400 hover:text-gray-500 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2",["className",n]),["type","button"],["onClick",e],(r=[f("span",{className:"sr-only",children:"Close"}),f("svg",S(y([["className","h-6 w-6"],["fill","none"],["stroke","currentColor"],["strokeWidth",1.5],["viewBox","0 0 24 24"],(s=ee(f("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"})),["children",v.Children.toArray(Array.from(s))])])))],["children",v.Children.toArray(Array.from(r))])])))],["children",v.Children.toArray(Array.from(t))])])))}function fx(e,t,n,r){let s,i,o;return f("div",S(y([["className","mt-5 sm:flex sm:items-center"],(s=[f("div",S(y([["className","w-full sm:max-w-xs"],(i=[f("label",{className:"sr-only",for:"account-id",children:"Account Id"}),f("input",S(ae(k(()=>R(A(["id","account-id"]),k(()=>R(A(["autoComplete","off"]),k(()=>{let a;return R(A((a="block w-full rounded-md border-0 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm/6",["className",a])),k(()=>R(A(["placeholder","Account Id"]),k(()=>R(A(["disabled",!n]),k(()=>R(A(["onChange",l=>{e(l.target.value)}]),k(()=>{const l=r;return l==null?Ke():A(["value",$i(l)])}))))))))}))))))))],["children",v.Children.toArray(Array.from(i))])]))),f("button",S(y([["className",ne(" ",["mt-3 inline-flex w-full items-center justify-center rounded-md bg-indigo-600 px-3 py-2 text-sm font-semibold text-white shadow-sm","hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600","sm:ml-3 sm:mt-0 sm:w-auto","disabled:opacity-50"])],(o=ae(k(()=>A(n?f("span",{children:["Search"]}):f("span",{children:["Searching..."]})))),["children",v.Children.toArray(Array.from(o))]),["onClick",t],["disabled",!n]])))],["children",v.Children.toArray(Array.from(s))])])))}function hx(e){let t,n,r,s,i,o,a;const l=e.closeModal,c=Wn(Rn),d=dr(()=>ur(ax,(w,C)=>lx(c.BackendUrl,c.AccessToken,w,C),(w,C)=>{}),void 0,void 0),u=d[0],m=d[1],h=fx(w=>{m(new uo(0,[w]))},w=>{m(new uo(1,[]))},!Ce(u.AccountDetails,new ss(1,[])),u.AccountId);let p;const g=u.AccountDetails;return p=g.tag===3?f("div",{className:ne(" ",["mt-2 text-sm text-red-600"]),children:g.fields[0]}):ge(),f(es,{onClose:l,child:f("div",S(y([["className","relative z-10"],["role",ne(" ",["dialog"])],(t=[f("div",{className:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity","aria-hidden":!0}),f("div",S(y([["className","fixed inset-0 z-10 w-screen overflow-y-auto"],(n=[f("div",S(y([["className","flex min-h-full items-end justify-center p-4 text-center sm:items-center sm:p-0"],["onClick",w=>{l()}],(r=[f("div",S(y([(s="relative transform overflow-hidden rounded-lg bg-white px-4 pb-4 pt-5 text-left shadow-xl transition-all sm:my-8 sm:w-full sm:max-w-lg sm:p-6",["className",s]),["onClick",w=>{w.preventDefault(),w.stopPropagation()}],(i=[dx(w=>{l()}),f("div",S(y([["className","sm:flex sm:items-start"],(o=[f("div",S(y([(a="mx-auto flex h-12 w-12 flex-shrink-0 items-center justify-center rounded-full bg-indigo-100 sm:mx-0 sm:h-10 sm:w-10",["className",a]),["children",v.Children.toArray([Df])]]))),f("div",{className:"mt-3 text-center sm:ml-4 sm:mt-0 sm:text-left",children:v.Children.toArray([cx,ux,h,p])})],["children",v.Children.toArray(Array.from(o))])])))],["children",v.Children.toArray(Array.from(i))])])))],["children",v.Children.toArray(Array.from(r))])])))],["children",v.Children.toArray(Array.from(n))])])))],["children",v.Children.toArray(Array.from(t))])])))})}function mx(e,t){return dc(n=>{const r=e.toLocaleLowerCase();return Fr(n.StreamId).toLocaleLowerCase().indexOf(r)>=0?!0:bi(n.Name).toLocaleLowerCase().indexOf(r)>=0},t)}function px(e){const t=Wn(Rn),n=xp(c=>bi(c.Name).toLocaleLowerCase(),e.partnerList,{Compare:fs}),r=Gn(n),s=Gn(""),i=Gn(!1),o=i[1],a=ae(k(()=>R(A(_r("ID")),k(()=>R(A(_r("Name")),k(()=>R(t.Roles.ReadProtectedData?R(A(_r("Contact")),k(()=>A(_r("Phone")))):Ke(),k(()=>A(_r("Website")))))))))),l=ae(k(()=>R(i[0]?A(f(hx,{closeModal:()=>{o(!1)}})):A(ge()),k(()=>{let c;return R(A(f("div",S(y([["className","flex items-end place-content-between"],(c=[Mf(s[0],"Partner ID or Name",d=>{s[1](d),r[1](mx(d,n))},()=>{}),f("button",{className:ne(" ",["max-h-10 inline-flex items-center gap-x-2 rounded-md bg-indigo-600 px-3.5 py-2.5 text-sm font-semibold text-white shadow-sm","hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600"]),type:"button",onClick:d=>{o(!0)},children:v.Children.toArray(["Account Search ",Df])})],["children",v.Children.toArray(Array.from(c))])])))),k(()=>A(Q_(a,nr(d=>{const u=Fr(d.StreamId),m=Ve(u);return ae(k(()=>{let h;return R(A((h=[lr(Ms(new q(1,[m]))),u],X_(h[0],h[1]))),k(()=>R(A(Xi(["text-gray-500"],bi(d.Name))),k(()=>R(t.Roles.ReadProtectedData?R(A(Xi(["text-gray-500"],We(Ge(p=>`${Mc(p.FirstName)} ${Oc(p.LastName)}`,d.ContactDetails),""))),k(()=>A(Xi(["text-gray-500"],We(Ge(p=>Vc(p.MobilePhone),d.ContactDetails),""))))):Ke(),k(()=>A(Xi(["text-gray-500"],Tc(d.Website)))))))))}))},r[0])))))}))));return f("div",{children:v.Children.toArray(Array.from(l))})}const gx=`*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}[type=text],input:where(:not([type])),[type=email],[type=url],[type=password],[type=number],[type=date],[type=datetime-local],[type=month],[type=search],[type=tel],[type=time],[type=week],[multiple],textarea,select{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border-color:#6b7280;border-width:1px;border-radius:0;padding:.5rem .75rem;font-size:1rem;line-height:1.5rem;--tw-shadow: 0 0 #0000}[type=text]:focus,input:where(:not([type])):focus,[type=email]:focus,[type=url]:focus,[type=password]:focus,[type=number]:focus,[type=date]:focus,[type=datetime-local]:focus,[type=month]:focus,[type=search]:focus,[type=tel]:focus,[type=time]:focus,[type=week]:focus,[multiple]:focus,textarea:focus,select:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: #2563eb;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);border-color:#2563eb}input::-moz-placeholder,textarea::-moz-placeholder{color:#6b7280;opacity:1}input::placeholder,textarea::placeholder{color:#6b7280;opacity:1}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-date-and-time-value{min-height:1.5em;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit,::-webkit-datetime-edit-year-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-meridiem-field{padding-top:0;padding-bottom:0}select{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");background-position:right .5rem center;background-repeat:no-repeat;background-size:1.5em 1.5em;padding-right:2.5rem;-webkit-print-color-adjust:exact;print-color-adjust:exact}[multiple],[size]:where(select:not([size="1"])){background-image:initial;background-position:initial;background-repeat:unset;background-size:initial;padding-right:.75rem;-webkit-print-color-adjust:unset;print-color-adjust:unset}[type=checkbox],[type=radio]{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;-webkit-print-color-adjust:exact;print-color-adjust:exact;display:inline-block;vertical-align:middle;background-origin:border-box;-webkit-user-select:none;-moz-user-select:none;user-select:none;flex-shrink:0;height:1rem;width:1rem;color:#2563eb;background-color:#fff;border-color:#6b7280;border-width:1px;--tw-shadow: 0 0 #0000}[type=checkbox]{border-radius:0}[type=radio]{border-radius:100%}[type=checkbox]:focus,[type=radio]:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 2px;--tw-ring-offset-color: #fff;--tw-ring-color: #2563eb;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}[type=checkbox]:checked,[type=radio]:checked{border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:center;background-repeat:no-repeat}[type=checkbox]:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e")}@media (forced-colors: active){[type=checkbox]:checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=radio]:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e")}@media (forced-colors: active){[type=radio]:checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=checkbox]:checked:hover,[type=checkbox]:checked:focus,[type=radio]:checked:hover,[type=radio]:checked:focus{border-color:transparent;background-color:currentColor}[type=checkbox]:indeterminate{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3e%3c/svg%3e");border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:center;background-repeat:no-repeat}@media (forced-colors: active){[type=checkbox]:indeterminate{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=checkbox]:indeterminate:hover,[type=checkbox]:indeterminate:focus{border-color:transparent;background-color:currentColor}[type=file]{background:unset;border-color:inherit;border-width:0;border-radius:0;padding:0;font-size:unset;line-height:inherit}[type=file]:focus{outline:1px solid ButtonText;outline:1px auto -webkit-focus-ring-color}.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.\\!visible{visibility:visible!important}.visible{visibility:visible}.invisible{visibility:hidden}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.inset-y-0{top:0;bottom:0}.bottom-14{bottom:3.5rem}.bottom-8{bottom:2rem}.left-\\[1px\\]{left:1px}.left-\\[8px\\]{left:8px}.right-0{right:0}.top-0{top:0}.top-\\[1px\\]{top:1px}.top-\\[8px\\]{top:8px}.z-10{z-index:10}.order-none{order:0}.col-start-1{grid-column-start:1}.row-start-1{grid-row-start:1}.-mx-6{margin-left:-1.5rem;margin-right:-1.5rem}.-my-2{margin-top:-.5rem;margin-bottom:-.5rem}.mx-3{margin-left:.75rem;margin-right:.75rem}.mx-6{margin-left:1.5rem;margin-right:1.5rem}.mx-auto{margin-left:auto;margin-right:auto}.-ml-3{margin-left:-.75rem}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.ml-2{margin-left:.5rem}.ml-3{margin-left:.75rem}.ml-4{margin-left:1rem}.mr-2{margin-right:.5rem}.mr-6{margin-right:1.5rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.mt-8{margin-top:2rem}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.inline-table{display:inline-table}.table-caption{display:table-caption}.table-cell{display:table-cell}.table-column{display:table-column}.table-column-group{display:table-column-group}.table-footer-group{display:table-footer-group}.table-header-group{display:table-header-group}.table-row-group{display:table-row-group}.table-row{display:table-row}.flow-root{display:flow-root}.grid{display:grid}.inline-grid{display:inline-grid}.contents{display:contents}.list-item{display:list-item}.hidden{display:none}.size-4{width:1rem;height:1rem}.size-5{width:1.25rem;height:1.25rem}.size-6{width:1.5rem;height:1.5rem}.h-0{height:0px}.h-1\\.5{height:.375rem}.h-10{height:2.5rem}.h-12{height:3rem}.h-2{height:.5rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-8{height:2rem}.h-full{height:100%}.max-h-10{max-height:2.5rem}.max-h-60{max-height:15rem}.min-h-9{min-height:2.25rem}.min-h-\\[34px\\]{min-height:34px}.min-h-full{min-height:100%}.w-1\\.5{width:.375rem}.w-10{width:2.5rem}.w-12{width:3rem}.w-2{width:.5rem}.w-40{width:10rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-\\[432px\\]{width:432px}.w-\\[45px\\]{width:45px}.w-\\[480px\\]{width:480px}.w-\\[512px\\]{width:512px}.w-\\[560px\\]{width:560px}.w-\\[69px\\]{width:69px}.w-full{width:100%}.w-screen{width:100vw}.min-w-\\[280px\\]{min-width:280px}.min-w-full{min-width:100%}.max-w-2xl{max-width:42rem}.max-w-\\[480px\\]{max-width:480px}.max-w-md{max-width:28rem}.max-w-screen-xl{max-width:1280px}.flex-1{flex:1 1 0%}.flex-none{flex:none}.flex-shrink{flex-shrink:1}.flex-shrink-0{flex-shrink:0}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.flex-grow,.grow{flex-grow:1}.grow-0{flex-grow:0}.border-collapse{border-collapse:collapse}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize{resize:both}.list-outside{list-style-position:outside}.list-disc{list-style-type:disc}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-row{flex-direction:row}.flex-row-reverse{flex-direction:row-reverse}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.place-content-between{place-content:space-between}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-1\\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-2\\.5{gap:.625rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-gray-200>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(229 231 235 / var(--tw-divide-opacity))}.self-start{align-self:flex-start}.self-end{align-self:flex-end}.self-center{align-self:center}.self-stretch{align-self:stretch}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-line{white-space:pre-line}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.border{border-width:1px}.border-0{border-width:0px}.border-b{border-bottom-width:1px}.border-r{border-right-width:1px}.border-r-2{border-right-width:2px}.border-t{border-top-width:1px}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.border-indigo-500{--tw-border-opacity: 1;border-color:rgb(99 102 241 / var(--tw-border-opacity))}.border-transparent{border-color:transparent}.bg-\\[\\#2563EB\\]{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.bg-gray-500{--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity))}.bg-gray-900{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}.bg-green-100{--tw-bg-opacity: 1;background-color:rgb(220 252 231 / var(--tw-bg-opacity))}.bg-green-400{--tw-bg-opacity: 1;background-color:rgb(74 222 128 / var(--tw-bg-opacity))}.bg-indigo-100{--tw-bg-opacity: 1;background-color:rgb(224 231 255 / var(--tw-bg-opacity))}.bg-indigo-600{--tw-bg-opacity: 1;background-color:rgb(79 70 229 / var(--tw-bg-opacity))}.bg-red-50{--tw-bg-opacity: 1;background-color:rgb(254 242 242 / var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-opacity-75{--tw-bg-opacity: .75}.bg-gradient-to-bl{background-image:linear-gradient(to bottom left,var(--tw-gradient-stops))}.from-red-200{--tw-gradient-from: #fecaca var(--tw-gradient-from-position);--tw-gradient-to: rgb(254 202 202 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.to-red-200\\/0{--tw-gradient-to: rgb(254 202 202 / 0) var(--tw-gradient-to-position)}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.px-0{padding-left:0;padding-right:0}.px-1{padding-left:.25rem;padding-right:.25rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-3\\.5{padding-left:.875rem;padding-right:.875rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-\\[13px\\]{padding-left:13px;padding-right:13px}.px-\\[17px\\]{padding-left:17px;padding-right:17px}.py-0\\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-\\[8\\.5px\\]{padding-top:8.5px;padding-bottom:8.5px}.py-\\[9px\\]{padding-top:9px;padding-bottom:9px}.pb-4{padding-bottom:1rem}.pb-6{padding-bottom:1.5rem}.pl-2{padding-left:.5rem}.pl-3{padding-left:.75rem}.pl-6{padding-left:1.5rem}.pl-9{padding-left:2.25rem}.pr-2{padding-right:.5rem}.pr-2\\.5{padding-right:.625rem}.pr-4{padding-right:1rem}.pr-9{padding-right:2.25rem}.pt-2{padding-top:.5rem}.pt-4{padding-top:1rem}.pt-5{padding-top:1.25rem}.pt-6{padding-top:1.5rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.text-justify{text-align:justify}.align-top{vertical-align:top}.align-middle{vertical-align:middle}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}.capitalize{text-transform:capitalize}.italic{font-style:italic}.not-italic{font-style:normal}.leading-4{line-height:1rem}.leading-5{line-height:1.25rem}.leading-6{line-height:1.5rem}.leading-7{line-height:1.75rem}.leading-none{line-height:1}.leading-tight{line-height:1.25}.tracking-tight{letter-spacing:-.025em}.tracking-wider{letter-spacing:.05em}.text-\\[\\#1D4ED8\\]{--tw-text-opacity: 1;color:rgb(29 78 216 / var(--tw-text-opacity))}.text-\\[\\#686F7D\\]{--tw-text-opacity: 1;color:rgb(104 111 125 / var(--tw-text-opacity))}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.text-gray-800{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}.text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.text-green-800{--tw-text-opacity: 1;color:rgb(22 101 52 / var(--tw-text-opacity))}.text-indigo-600{--tw-text-opacity: 1;color:rgb(79 70 229 / var(--tw-text-opacity))}.text-red-400{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity))}.text-red-700{--tw-text-opacity: 1;color:rgb(185 28 28 / var(--tw-text-opacity))}.text-red-800{--tw-text-opacity: 1;color:rgb(153 27 27 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.underline{text-decoration-line:underline}.overline{text-decoration-line:overline}.line-through{text-decoration-line:line-through}.opacity-0{opacity:0}.opacity-90{opacity:.9}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.outline-1{outline-width:1px}.outline-offset-\\[-0\\.50px\\]{outline-offset:-.5px}.outline-offset-\\[-1px\\]{outline-offset:-1px}.outline-gray-100{outline-color:#f3f4f6}.outline-gray-300{outline-color:#d1d5db}.ring{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-inset{--tw-ring-inset: inset}.ring-black\\/5{--tw-ring-color: rgb(0 0 0 / .05)}.ring-gray-300{--tw-ring-opacity: 1;--tw-ring-color: rgb(209 213 219 / var(--tw-ring-opacity))}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.drop-shadow{--tw-drop-shadow: drop-shadow(0 1px 2px rgb(0 0 0 / .1)) drop-shadow(0 1px 1px rgb(0 0 0 / .06));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.grayscale{--tw-grayscale: grayscale(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.invert{--tw-invert: invert(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.sepia{--tw-sepia: sepia(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-100{transition-duration:.1s}.duration-500{transition-duration:.5s}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.placeholder\\:text-gray-400::-moz-placeholder{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.placeholder\\:text-gray-400::placeholder{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.hover\\:border-gray-300:hover{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.hover\\:bg-gray-200:hover{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.hover\\:bg-gray-300:hover{--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity))}.hover\\:bg-gray-50:hover{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.hover\\:bg-indigo-500:hover{--tw-bg-opacity: 1;background-color:rgb(99 102 241 / var(--tw-bg-opacity))}.hover\\:bg-indigo-700:hover{--tw-bg-opacity: 1;background-color:rgb(67 56 202 / var(--tw-bg-opacity))}.hover\\:text-gray-500:hover{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.hover\\:text-gray-700:hover{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.hover\\:text-indigo-900:hover{--tw-text-opacity: 1;color:rgb(49 46 129 / var(--tw-text-opacity))}.hover\\:underline:hover{text-decoration-line:underline}.focus\\:border-indigo-500:focus{--tw-border-opacity: 1;border-color:rgb(99 102 241 / var(--tw-border-opacity))}.focus\\:border-indigo-600:focus{--tw-border-opacity: 1;border-color:rgb(79 70 229 / var(--tw-border-opacity))}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\\:ring-inset:focus{--tw-ring-inset: inset}.focus\\:ring-indigo-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(99 102 241 / var(--tw-ring-opacity))}.focus\\:ring-indigo-600:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(79 70 229 / var(--tw-ring-opacity))}.focus\\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.focus-visible\\:outline:focus-visible{outline-style:solid}.focus-visible\\:outline-2:focus-visible{outline-width:2px}.focus-visible\\:outline-offset-2:focus-visible{outline-offset:2px}.focus-visible\\:outline-\\[\\#2563EB\\]:focus-visible{outline-color:#2563eb}.focus-visible\\:outline-gray-500:focus-visible{outline-color:#6b7280}.focus-visible\\:outline-indigo-600:focus-visible{outline-color:#4f46e5}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:border-gray-300:disabled{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.disabled\\:bg-gray-300:disabled{--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity))}.disabled\\:text-gray-500:disabled{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.disabled\\:opacity-50:disabled{opacity:.5}.group:hover .group-hover\\:visible{visibility:visible}.group:hover .group-hover\\:text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.group:focus .group-focus\\:visible{visibility:visible}@media (min-width: 640px){.sm\\:col-span-2{grid-column:span 2 / span 2}.sm\\:-mx-6{margin-left:-1.5rem;margin-right:-1.5rem}.sm\\:mx-0{margin-left:0;margin-right:0}.sm\\:my-8{margin-top:2rem;margin-bottom:2rem}.sm\\:-mr-6{margin-right:-1.5rem}.sm\\:ml-3{margin-left:.75rem}.sm\\:ml-4{margin-left:1rem}.sm\\:mt-0{margin-top:0}.sm\\:block{display:block}.sm\\:flex{display:flex}.sm\\:grid{display:grid}.sm\\:h-10{height:2.5rem}.sm\\:w-10{width:2.5rem}.sm\\:w-auto{width:auto}.sm\\:w-full{width:100%}.sm\\:max-w-lg{max-width:32rem}.sm\\:max-w-xs{max-width:20rem}.sm\\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\\:items-start{align-items:flex-start}.sm\\:items-center{align-items:center}.sm\\:justify-end{justify-content:flex-end}.sm\\:gap-4{gap:1rem}.sm\\:rounded-lg{border-radius:.5rem}.sm\\:p-0{padding:0}.sm\\:p-6{padding:1.5rem}.sm\\:px-0{padding-left:0;padding-right:0}.sm\\:px-4{padding-left:1rem;padding-right:1rem}.sm\\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\\:pl-6{padding-left:1.5rem}.sm\\:text-left{text-align:left}.sm\\:text-sm{font-size:.875rem;line-height:1.25rem}.sm\\:text-sm\\/6{font-size:.875rem;line-height:1.5rem}}@media (min-width: 1024px){.lg\\:-mx-8{margin-left:-2rem;margin-right:-2rem}.lg\\:mr-0{margin-right:0}.lg\\:px-8{padding-left:2rem;padding-right:2rem}}`,Gh=Ze(gx);function _l(){return(_l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var $x=["context","children"];function wx(e){this.getChildContext=function(){return e.context};var t=e.children,n=function(r,s){if(r==null)return{};var i,o,a={},l=Object.keys(r);for(o=0;o<l.length;o++)s.indexOf(i=l[o])>=0||(a[i]=r[i]);return a}(e,$x);return na(t,n)}function yx(){var e=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(e),this._vdom=f(wx,_l({},this._props,{context:e.detail.context}),function t(n,r){if(n.nodeType===3)return n.data;if(n.nodeType!==1)return null;var s=[],i={},o=0,a=n.attributes,l=n.childNodes;for(o=a.length;o--;)a[o].name!=="slot"&&(i[a[o].name]=a[o].value,i[qh(a[o].name)]=a[o].value);for(o=l.length;o--;){var c=t(l[o],null),d=l[o].slot;d?i[d]=f(Kh,{name:d},c):s[o]=c}var u=r?f(Kh,null,s):s;return f(r||n.nodeName.toLowerCase(),i,u)}(this,this._vdomComponent)),(this.hasAttribute("hydrate")?ta:Un)(this._vdom,this._root)}function qh(e){return e.replace(/-(\w)/g,function(t,n){return n?n.toUpperCase():""})}function bx(e,t,n){if(this._vdom){var r={};r[e]=n=n??void 0,r[qh(e)]=n,this._vdom=na(this._vdom,r),Un(this._vdom,this._root)}}function _x(){Un(this._vdom=null,this._root)}function Kh(e,t){var n=this;return f("slot",_l({},e,{ref:function(r){r?(n.ref=r,n._listener||(n._listener=function(s){s.stopPropagation(),s.detail.context=t},r.addEventListener("_preact",n._listener))):n.ref.removeEventListener("_preact",n._listener)}}))}function vx(e,t,n,r){function s(){var i=Reflect.construct(HTMLElement,[],s);return i._vdomComponent=e,i._root=r&&r.shadow?i.attachShadow({mode:r.mode||"open"}):i,i}return(s.prototype=Object.create(HTMLElement.prototype)).constructor=s,s.prototype.connectedCallback=yx,s.prototype.attributeChangedCallback=bx,s.prototype.disconnectedCallback=_x,n=n||e.observedAttributes||Object.keys(e.propTypes||{}),s.observedAttributes=n,n.forEach(function(i){Object.defineProperty(s.prototype,i,{get:function(){return this._vdom.props[i]},set:function(o){this._vdom?this.attributeChangedCallback(i,null,o):(this._props||(this._props={}),this._props[i]=o,this.connectedCallback());var a=typeof o;o!=null&&a!=="string"&&a!=="boolean"&&a!=="number"||this.setAttribute(i,o)}})}),customElements.define(t||e.tagName||e.displayName||e.name,s)}function Zh(e,t){vx(e,t,void 0,{shadow:!0})}class fo extends j{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Started","Finished"]}}class wn extends j{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["API","Direct"]}}class os extends j{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["GetCurrent","SetSelected","Save"]}}class as extends Q{constructor(t,n,r,s){super(),this.Current=t,this.Selected=n,this.Saving=r,this.UserCanEdit=s}}function xx(e){let t;return[new as(new ie(0,[]),new wn(0,[]),new ie(0,[]),(t=ff(e),t.tag===1?Md.ProvisionAccounts:Rd(t.fields[0]).ProvisionAccounts)),ee(n=>{n(new os(0,[new fo(0,[])]))})]}function Cx(e,t,n,r){let s;switch(n.tag){case 1:return[new as(r.Current,n.fields[0],r.Saving,r.UserCanEdit),le()];case 2:return n.fields[0].tag===1?[new as(n.fields[0].fields[0].tag===1?r.Current:new ie(2,[new $(0,[r.Selected])]),r.Selected,new ie(2,[n.fields[0].fields[0]]),r.UserCanEdit),le()]:[new as(r.Current,r.Selected,new ie(1,[]),r.UserCanEdit),Is(i=>{Ns(i)},t,new Jc(r.Selected.tag===1?new Wo(1,[]):new Wo(0,[])),i=>new os(2,[new fo(1,[i])]))];default:return n.fields[0].tag===1?[new as(new ie(2,[n.fields[0].fields[0]]),(s=n.fields[0].fields[0],s.tag===1?new wn(0,[]):s.fields[0]),r.Saving,r.UserCanEdit),le()]:[new as(new ie(1,[]),r.Selected,r.Saving,r.UserCanEdit),Is(i=>{Ns(i)},e,void 0,i=>new os(0,[new fo(1,[i])]))]}}function Sx(e){let t,n;const r=Ve(e.partnerId),s=Rt(e.accountId),i=xx(e.accessToken);n=dr(()=>ur(()=>i,(l,c)=>Cx(()=>{const d=Af(e.backendUrl,e.accessToken,r,s);return N.Bind(d,u=>{let m;const h=u;return m=h.tag===1?new $(1,[h.fields[0]]):new $(0,[h.fields[0].ProvisioningMode.tag===1?new wn(1,[]):new wn(0,[])]),N.Return(m)})},d=>jw(e.backendUrl,e.accessToken,r,s,d),l,c),(l,c)=>{}),void 0,void 0);const o=n[0],a=n[1];return f("div",S(ee((t=ae(k(()=>R(A(f("style",{children:[Gh]})),k(()=>R(A(f("h3",{className:"text-xl font-semibold text-gray-900",children:"Account provisioning mode settings"})),k(()=>R(A(f("p",{className:"mt-1 text-base font-normal text-gray-600",children:"Configure how accounts and profiles are provisioned."})),k(()=>{const l=o.Current;let c;switch(l.tag){case 3:{c=1;break}case 2:{l.fields[0].tag===0?c=2:c=1;break}default:c=0}switch(c){case 0:return A(f("div",{className:"mt-8",children:"Loading..."}));case 1:return A(f("div",{className:"mt-8 text-red-600",children:"Failed to load current settings."}));default:return R(A(f("label",{className:"mt-8 block text-sm font-medium text-gray-700",children:"Account provisioning mode"})),k(()=>{let d,u;return R(A(f("select",S(y([(d="mt-1 max-w-[480px] block w-full rounded-md bg-white border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 text-sm",["className",d]),["value",Ze(o.Selected)],["onChange",m=>{switch(m.target.value){case"API":{a(new os(1,[new wn(0,[])]));break}case"Direct":{a(new os(1,[new wn(1,[])]));break}}}],["disabled",o.UserCanEdit?Ce(o.Saving,new ie(1,[])):!0],(u=ae(k(()=>{const m=h=>{const p=o.Current;let g;switch(p.tag===2&&p.fields[0].tag===0&&Ce(p.fields[0].fields[0],h)?(g=0,p.fields[0].fields[0]):g=1,g){case 0:return" (active)";default:return""}};return R(A(f("option",{value:Ze(new wn(0,[])),children:`API${m(new wn(0,[]))}`})),k(()=>A(f("option",{value:Ze(new wn(1,[])),children:`Direct${m(new wn(1,[]))}`}))))})),["children",v.Children.toArray(Array.from(u))])])))),k(()=>{let m,h;return R(o.UserCanEdit?A(f("button",S(y([(m="mt-5 inline-flex items-center px-4 py-2 border border-transparent text-sm font-medium rounded-md shadow-sm text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 disabled:opacity-50 disabled:cursor-not-allowed",["className",m]),["onClick",p=>{a(new os(2,[new fo(0,[])]))}],["disabled",(h=o.Current,o.Saving.tag===1?!0:h.tag===2&&h.fields[0].tag===0&&Ce(h.fields[0].fields[0],o.Selected))],["children","Save settings"]])))):Ke(),k(()=>{const p=o.Saving;let g;switch(p.tag){case 2:{p.fields[0].tag===1?g=1:g=0;break}case 3:{g=1;break}default:g=0}switch(g){case 0:return A(ge());default:return A(f("div",{className:"mt-2 text-red-600",children:"Failed to save settings."}))}}))}))}))}})))))))),["children",v.Children.toArray(Array.from(t))]))))}function Ax(){Zh(e=>f(Sx,e),"superhero-account-registry-provisioning")}class ls extends Q{constructor(t,n,r,s){super(),this.Partners=t,this.Accounts=n,this.CurrentPage=r,this.Roles=s}}class Yn extends j{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["PageChanged","GetAccountName","AppendAccount","LoadPartners","UpdateAccount"]}}function kx(e){let t;const n=Ed(wd(window.location.hash,1)),r=n.tag===17?Ia(new q(0,[])):le();return[new ls(new ie(0,[]),K$(),n,(t=ff(e),t.tag===1?(Ql(`Failed to decode jwt: ${t.fields[0]}`),Md):Rd(t.fields[0]))),r]}function Ex(e,t,n,r){let s,i,o,a;switch(n.tag){case 1:{const l=n.fields[0],c=Kr(e,l,d=>new Yn(2,[l,new $(0,[d])]),d=>new Yn(2,[l,new $(1,["Failed to retrieve account name"])]));return[new ls(r.Partners,ka(r.Accounts,l,new ie(1,[])),r.CurrentPage,r.Roles),c]}case 2:return[new ls(r.Partners,ka(r.Accounts,n.fields[0],new ie(2,[n.fields[1]])),r.CurrentPage,r.Roles),le()];case 0:{const l=n.fields[0];return l.tag===17?[r,Ia(l)]:[new ls(r.Partners,r.Accounts,l,r.Roles),le()]}case 4:{const l=n.fields[1],c=n.fields[0],d=kd(r.Accounts,c);let u,m;switch(d!=null&&d.tag===2&&d.fields[0].tag===0?(u=0,m=d.fields[0].fields[0]):u=1,u){case 0:{const h=new Wc(m.StreamId,m.PartnerId,l.Name,m.Website,m.ContactDetails,m.Notes,(s=l.LegalEntity,i=m.LegalEntity,s!=null&&i!=null?(o=i,a=s,new jc(a.BusinessName,a.BusinessNumber,o.Address1,o.Address2,o.City,o.Postcode,o.State,o.Phone,o.CountryCode)):m.LegalEntity),m.ExternalId,m.ChannelId,m.ProvisioningMode);if(Ce(h,m))return[r,le()];{const p=Kr(t,[c,l],()=>new Yn(2,[c,new $(0,[h])]),g=>new Yn(2,[c,new $(1,[g])]));return[new ls(r.Partners,ka(r.Accounts,c,new ie(1,[])),r.CurrentPage,r.Roles),p]}}default:return[r,le()]}}default:return[new ls(n.fields[0],r.Accounts,r.CurrentPage,r.Roles),le()]}}function Ix(e){let t,n,r,s;const i=kx(e.accessToken);s=dr(()=>ur(()=>i,(x,E)=>Ex(D=>{const L=q$(D);return Af(e.backendUrl,e.accessToken,L[0],L[1])},D=>{const L=D[1],X=Ad(D[0]);return Bw(e.backendUrl,e.accessToken,X[0],X[1],new Zc(L.Name,Ge(pe=>pe.BusinessName,L.LegalEntity),Ge(pe=>pe.BusinessNumber,L.LegalEntity)))},x,E),(x,E)=>{}),void 0,void 0);const o=s[0],a=s[1];ba(pd(()=>Lw(e.backendUrl,e.accessToken),x=>{a(new Yn(3,[x]))}));const l=x=>{let E;const D=o.Partners;switch(D.tag){case 0:return new ie(0,[]);case 1:return new ie(1,[]);case 3:return new ie(3,[D.fields[0]]);default:return D.fields[0].tag===1?new ie(2,[new $(1,[qt(Xl("Unknown partner: %A%P()",[x]))])]):new ie(2,[(E=Ea(D.fields[0].fields[0],x),E==null?new $(1,[qt(Xl("Unknown partner: %A%P()",[x]))]):new $(0,[E.Name]))])}},c=x=>f(Fs,{page:o.CurrentPage,partner:{Id:x,Name:l(x)}}),d=(x,E)=>{const D=f(Uh,{mode:E});return[c(x),D]},u=(x,E)=>{let D,L,X;const pe=x[0],Se=x[1];let de;const Y=[pe,Se];de=G$(Y[0],Y[1]);let me;const G=de;me=oc(kd(o.Accounts,G),()=>(a(new Yn(1,[G])),new ie(0,[])));let re;return re=f(ox,{updateAccount:P=>{a(new Yn(4,[de,P]))},props:{accountDetails:[pe,Se]},mode:E,account:me}),[(D=[pe,Se,me],L=D[0],f(Fs,(X={Id:L,Name:l(L)},{account:{Id:D[1],Name:Y$(P=>pc(P.Name),D[2])},page:o.CurrentPage,partner:Io(X)}))),re]};let m;const h=o.Partners;let p,g,w,C;switch(h.tag){case 2:{h.fields[0].tag===1?(p=2,w=h.fields[0].fields[0]):(p=1,g=h.fields[0].fields[0]);break}case 3:{p=3,C=h.fields[0];break}default:p=0}switch(p){case 0:{m=[f(Ks,null),f(Ks,null)];break}case 1:{const x=o.CurrentPage;switch(x.tag){case 3:{const E=x.fields[0],D=c(E),L=Ea(g,E);if(L==null)m=[D,f(an,{error:"Unknown Partner"})];else{const X=L;m=d(E,new vr(1,[{accountProvisioningMode:X.AccountProvisioningMode,partnerId:E}]))}break}case 4:{const E=x.fields[0];m=d(E,new vr(2,[new $v(E,e.backendUrl,e.accessToken)]));break}case 5:{const E=x.fields[0];m=d(E,new vr(3,[new wv(E,e.backendUrl,e.accessToken)]));break}case 6:{const E=x.fields[0];m=d(E,new vr(4,[new yv(E,e.backendUrl,e.accessToken)]));break}case 2:{const E=x.fields[0];m=d(E,new vr(5,[new bv(E,e.backendUrl,e.accessToken)]));break}case 7:{const E=x.fields[0];m=d(E,new vr(6,[new _v(E,e.backendUrl,e.accessToken)]));break}case 16:{m=u([x.fields[0],x.fields[1]],new Dn(8,[]));break}case 8:{m=u([x.fields[0],x.fields[1]],new Dn(0,[]));break}case 9:{m=u([x.fields[0],x.fields[1]],new Dn(1,[]));break}case 10:{m=u([x.fields[0],x.fields[1]],new Dn(2,[]));break}case 11:{m=u([x.fields[0],x.fields[1]],new Dn(3,[]));break}case 12:{m=u([x.fields[0],x.fields[1]],new Dn(4,[]));break}case 13:{m=u([x.fields[0],x.fields[1]],new Dn(5,[]));break}case 14:{m=u([x.fields[0],x.fields[1]],new Dn(6,[]));break}case 15:{m=u([x.fields[0],x.fields[1]],new Dn(7,[]));break}case 0:case 17:{m=[f(Fs,{page:o.CurrentPage}),f(px,{partnerList:g})];break}default:{const E=x.fields[0],D=c(E),L=Ea(g,E);m=L==null?[D,f(an,{error:"Unknown Partner"})]:[D,(t=new vr(0,[L]),f(Uh,{mode:t}))]}}break}case 2:{m=[f(Fs,{page:o.CurrentPage}),f(an,{error:w})];break}default:m=[f(Fs,{page:o.CurrentPage}),(n=Ze(C),f(an,{error:n}))]}return Qg(Rn,new yy(o.Roles,e.backendUrl,e.accessToken),ee((r=y([f("style",{children:[Gh]}),V$({onUrlChanged:x=>{a(new Yn(0,[Ed(x)]))},application:f(ve,{},m[0],m[1])})]),f("div",{children:v.Children.toArray(Array.from(r))}))))}Zh(e=>f(Ix,e),"superhero-account-registry"),Ax()})();
53
+ If the account is found you will be redirected to the account details page.`,["children",e])])))];return["children",v.Children.toArray(Array.from(t))]})()])));function wx(e){let t,n,r,s;return f("div",S(y([["className","absolute right-0 top-0 hidden pr-4 pt-4 sm:block"],(t=[f("button",S(y([(n="rounded-md bg-white text-gray-400 hover:text-gray-500 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2",["className",n]),["type","button"],["onClick",e],(r=[f("span",{className:"sr-only",children:"Close"}),f("svg",S(y([["className","h-6 w-6"],["fill","none"],["stroke","currentColor"],["strokeWidth",1.5],["viewBox","0 0 24 24"],(s=ee(f("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"})),["children",v.Children.toArray(Array.from(s))])])))],["children",v.Children.toArray(Array.from(r))])])))],["children",v.Children.toArray(Array.from(t))])])))}function yx(e,t,n,r){let s,i,o;return f("div",S(y([["className","mt-5 sm:flex sm:items-center"],(s=[f("div",S(y([["className","w-full sm:max-w-xs"],(i=[f("label",{className:"sr-only",for:"account-id",children:"Account Id"}),f("input",S(se(k(()=>M(A(["id","account-id"]),k(()=>M(A(["autoComplete","off"]),k(()=>{let a;return M(A((a="block w-full rounded-md border-0 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm/6",["className",a])),k(()=>M(A(["placeholder","Account Id"]),k(()=>M(A(["disabled",!n]),k(()=>M(A(["onChange",l=>{e(l.target.value)}]),k(()=>{const l=r;return l==null?Ke():A(["value",wi(l)])}))))))))}))))))))],["children",v.Children.toArray(Array.from(i))])]))),f("button",S(y([["className",ne(" ",["mt-3 inline-flex w-full items-center justify-center rounded-md bg-indigo-600 px-3 py-2 text-sm font-semibold text-white shadow-sm","hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600","sm:ml-3 sm:mt-0 sm:w-auto","disabled:opacity-50"])],(o=se(k(()=>A(n?f("span",{children:["Search"]}):f("span",{children:["Searching..."]})))),["children",v.Children.toArray(Array.from(o))]),["onClick",t],["disabled",!n]])))],["children",v.Children.toArray(Array.from(s))])])))}function bx(e){let t,n,r,s,i,o,a;const l=e.closeModal,c=Wn(Mn),d=fr(()=>dr(mx,(w,C)=>px(c.BackendUrl,c.AccessToken,w,C),(w,C)=>{}),void 0,void 0),u=d[0],m=d[1],h=yx(w=>{m(new fo(0,[w]))},w=>{m(new fo(1,[]))},!Ce(u.AccountDetails,new ss(1,[])),u.AccountId);let p;const $=u.AccountDetails;return p=$.tag===3?f("div",{className:ne(" ",["mt-2 text-sm text-red-600"]),children:$.fields[0]}):ge(),f(ts,{onClose:l,child:f("div",S(y([["className","relative z-10"],["role",ne(" ",["dialog"])],(t=[f("div",{className:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity","aria-hidden":!0}),f("div",S(y([["className","fixed inset-0 z-10 w-screen overflow-y-auto"],(n=[f("div",S(y([["className","flex min-h-full items-end justify-center p-4 text-center sm:items-center sm:p-0"],["onClick",w=>{l()}],(r=[f("div",S(y([(s="relative transform overflow-hidden rounded-lg bg-white px-4 pb-4 pt-5 text-left shadow-xl transition-all sm:my-8 sm:w-full sm:max-w-lg sm:p-6",["className",s]),["onClick",w=>{w.preventDefault(),w.stopPropagation()}],(i=[wx(w=>{l()}),f("div",S(y([["className","sm:flex sm:items-start"],(o=[f("div",S(y([(a="mx-auto flex h-12 w-12 flex-shrink-0 items-center justify-center rounded-full bg-indigo-100 sm:mx-0 sm:h-10 sm:w-10",["className",a]),["children",v.Children.toArray([Ff])]]))),f("div",{className:"mt-3 text-center sm:ml-4 sm:mt-0 sm:text-left",children:v.Children.toArray([gx,$x,h,p])})],["children",v.Children.toArray(Array.from(o))])])))],["children",v.Children.toArray(Array.from(i))])])))],["children",v.Children.toArray(Array.from(r))])])))],["children",v.Children.toArray(Array.from(n))])])))],["children",v.Children.toArray(Array.from(t))])])))})}function _x(e,t){return dc(n=>{const r=e.toLocaleLowerCase();return Vr(n.StreamId).toLocaleLowerCase().indexOf(r)>=0?!0:_i(n.Name).toLocaleLowerCase().indexOf(r)>=0},t)}function vx(e){const t=Wn(Mn),n=Sp(c=>_i(c.Name).toLocaleLowerCase(),e.partnerList,{Compare:fs}),r=Gn(n),s=Gn(""),i=Gn(!1),o=i[1],a=se(k(()=>M(A(Yn("ID")),k(()=>M(A(Yn("Name")),k(()=>M(t.Roles.ReadProtectedData?M(A(Yn("Contact")),k(()=>A(Yn("Phone")))):Ke(),k(()=>A(Yn("Website")))))))))),l=se(k(()=>M(i[0]?A(f(bx,{closeModal:()=>{o(!1)}})):A(ge()),k(()=>{let c;return M(A(f("div",S(y([["className","flex items-end place-content-between"],(c=[Pf(s[0],"Partner ID or Name",d=>{s[1](d),r[1](_x(d,n))},()=>{}),f("button",{className:ne(" ",["max-h-10 inline-flex items-center gap-x-2 rounded-md bg-indigo-600 px-3.5 py-2.5 text-sm font-semibold text-white shadow-sm","hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600"]),type:"button",onClick:d=>{o(!0)},children:v.Children.toArray(["Account Search ",Ff])})],["children",v.Children.toArray(Array.from(c))])])))),k(()=>A(sv(a,rr(d=>{const u=Vr(d.StreamId),m=Ve(u);return se(k(()=>{let h;return M(A((h=[cr(Rs(new q(1,[m]))),u],rv(h[0],h[1]))),k(()=>M(A(Qi(["text-gray-500"],_i(d.Name))),k(()=>M(t.Roles.ReadProtectedData?M(A(Qi(["text-gray-500"],We(Ge(p=>`${Rc(p.FirstName)} ${Dc(p.LastName)}`,d.ContactDetails),""))),k(()=>A(Qi(["text-gray-500"],We(Ge(p=>Vc(p.MobilePhone),d.ContactDetails),""))))):Ke(),k(()=>A(Qi(["text-gray-500"],Tc(d.Website)))))))))}))},r[0])))))}))));return f("div",{children:v.Children.toArray(Array.from(l))})}const xx=`*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}[type=text],input:where(:not([type])),[type=email],[type=url],[type=password],[type=number],[type=date],[type=datetime-local],[type=month],[type=search],[type=tel],[type=time],[type=week],[multiple],textarea,select{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border-color:#6b7280;border-width:1px;border-radius:0;padding:.5rem .75rem;font-size:1rem;line-height:1.5rem;--tw-shadow: 0 0 #0000}[type=text]:focus,input:where(:not([type])):focus,[type=email]:focus,[type=url]:focus,[type=password]:focus,[type=number]:focus,[type=date]:focus,[type=datetime-local]:focus,[type=month]:focus,[type=search]:focus,[type=tel]:focus,[type=time]:focus,[type=week]:focus,[multiple]:focus,textarea:focus,select:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: #2563eb;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);border-color:#2563eb}input::-moz-placeholder,textarea::-moz-placeholder{color:#6b7280;opacity:1}input::placeholder,textarea::placeholder{color:#6b7280;opacity:1}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-date-and-time-value{min-height:1.5em;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit,::-webkit-datetime-edit-year-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-meridiem-field{padding-top:0;padding-bottom:0}select{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");background-position:right .5rem center;background-repeat:no-repeat;background-size:1.5em 1.5em;padding-right:2.5rem;-webkit-print-color-adjust:exact;print-color-adjust:exact}[multiple],[size]:where(select:not([size="1"])){background-image:initial;background-position:initial;background-repeat:unset;background-size:initial;padding-right:.75rem;-webkit-print-color-adjust:unset;print-color-adjust:unset}[type=checkbox],[type=radio]{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;-webkit-print-color-adjust:exact;print-color-adjust:exact;display:inline-block;vertical-align:middle;background-origin:border-box;-webkit-user-select:none;-moz-user-select:none;user-select:none;flex-shrink:0;height:1rem;width:1rem;color:#2563eb;background-color:#fff;border-color:#6b7280;border-width:1px;--tw-shadow: 0 0 #0000}[type=checkbox]{border-radius:0}[type=radio]{border-radius:100%}[type=checkbox]:focus,[type=radio]:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 2px;--tw-ring-offset-color: #fff;--tw-ring-color: #2563eb;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}[type=checkbox]:checked,[type=radio]:checked{border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:center;background-repeat:no-repeat}[type=checkbox]:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e")}@media (forced-colors: active){[type=checkbox]:checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=radio]:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e")}@media (forced-colors: active){[type=radio]:checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=checkbox]:checked:hover,[type=checkbox]:checked:focus,[type=radio]:checked:hover,[type=radio]:checked:focus{border-color:transparent;background-color:currentColor}[type=checkbox]:indeterminate{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3e%3c/svg%3e");border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:center;background-repeat:no-repeat}@media (forced-colors: active){[type=checkbox]:indeterminate{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=checkbox]:indeterminate:hover,[type=checkbox]:indeterminate:focus{border-color:transparent;background-color:currentColor}[type=file]{background:unset;border-color:inherit;border-width:0;border-radius:0;padding:0;font-size:unset;line-height:inherit}[type=file]:focus{outline:1px solid ButtonText;outline:1px auto -webkit-focus-ring-color}.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.\\!visible{visibility:visible!important}.visible{visibility:visible}.invisible{visibility:hidden}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.inset-y-0{top:0;bottom:0}.bottom-14{bottom:3.5rem}.bottom-8{bottom:2rem}.left-\\[1px\\]{left:1px}.left-\\[8px\\]{left:8px}.right-0{right:0}.top-0{top:0}.top-\\[1px\\]{top:1px}.top-\\[8px\\]{top:8px}.z-10{z-index:10}.order-none{order:0}.col-start-1{grid-column-start:1}.row-start-1{grid-row-start:1}.-mx-6{margin-left:-1.5rem;margin-right:-1.5rem}.-my-2{margin-top:-.5rem;margin-bottom:-.5rem}.mx-3{margin-left:.75rem;margin-right:.75rem}.mx-6{margin-left:1.5rem;margin-right:1.5rem}.mx-auto{margin-left:auto;margin-right:auto}.-ml-3{margin-left:-.75rem}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.ml-2{margin-left:.5rem}.ml-3{margin-left:.75rem}.ml-4{margin-left:1rem}.mr-2{margin-right:.5rem}.mr-6{margin-right:1.5rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.mt-8{margin-top:2rem}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.inline-table{display:inline-table}.table-caption{display:table-caption}.table-cell{display:table-cell}.table-column{display:table-column}.table-column-group{display:table-column-group}.table-footer-group{display:table-footer-group}.table-header-group{display:table-header-group}.table-row-group{display:table-row-group}.table-row{display:table-row}.flow-root{display:flow-root}.grid{display:grid}.inline-grid{display:inline-grid}.contents{display:contents}.list-item{display:list-item}.hidden{display:none}.size-4{width:1rem;height:1rem}.size-5{width:1.25rem;height:1.25rem}.size-6{width:1.5rem;height:1.5rem}.h-0{height:0px}.h-1\\.5{height:.375rem}.h-10{height:2.5rem}.h-12{height:3rem}.h-2{height:.5rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-8{height:2rem}.h-full{height:100%}.max-h-10{max-height:2.5rem}.max-h-60{max-height:15rem}.min-h-9{min-height:2.25rem}.min-h-\\[34px\\]{min-height:34px}.min-h-full{min-height:100%}.w-1\\.5{width:.375rem}.w-10{width:2.5rem}.w-12{width:3rem}.w-2{width:.5rem}.w-40{width:10rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-\\[432px\\]{width:432px}.w-\\[45px\\]{width:45px}.w-\\[480px\\]{width:480px}.w-\\[512px\\]{width:512px}.w-\\[560px\\]{width:560px}.w-\\[69px\\]{width:69px}.w-full{width:100%}.w-screen{width:100vw}.min-w-\\[280px\\]{min-width:280px}.min-w-full{min-width:100%}.max-w-2xl{max-width:42rem}.max-w-\\[480px\\]{max-width:480px}.max-w-md{max-width:28rem}.max-w-screen-xl{max-width:1280px}.flex-1{flex:1 1 0%}.flex-none{flex:none}.flex-shrink{flex-shrink:1}.flex-shrink-0{flex-shrink:0}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.flex-grow,.grow{flex-grow:1}.grow-0{flex-grow:0}.border-collapse{border-collapse:collapse}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize{resize:both}.list-outside{list-style-position:outside}.list-disc{list-style-type:disc}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-row{flex-direction:row}.flex-row-reverse{flex-direction:row-reverse}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.place-content-between{place-content:space-between}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-1\\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-2\\.5{gap:.625rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-gray-200>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(229 231 235 / var(--tw-divide-opacity))}.self-start{align-self:flex-start}.self-end{align-self:flex-end}.self-center{align-self:center}.self-stretch{align-self:stretch}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-line{white-space:pre-line}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.border{border-width:1px}.border-0{border-width:0px}.border-b{border-bottom-width:1px}.border-r{border-right-width:1px}.border-r-2{border-right-width:2px}.border-t{border-top-width:1px}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.border-indigo-500{--tw-border-opacity: 1;border-color:rgb(99 102 241 / var(--tw-border-opacity))}.border-transparent{border-color:transparent}.bg-\\[\\#2563EB\\]{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity))}.bg-blue-50{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.bg-gray-500{--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity))}.bg-gray-900{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}.bg-green-100{--tw-bg-opacity: 1;background-color:rgb(220 252 231 / var(--tw-bg-opacity))}.bg-green-400{--tw-bg-opacity: 1;background-color:rgb(74 222 128 / var(--tw-bg-opacity))}.bg-indigo-100{--tw-bg-opacity: 1;background-color:rgb(224 231 255 / var(--tw-bg-opacity))}.bg-indigo-600{--tw-bg-opacity: 1;background-color:rgb(79 70 229 / var(--tw-bg-opacity))}.bg-purple-50{--tw-bg-opacity: 1;background-color:rgb(250 245 255 / var(--tw-bg-opacity))}.bg-red-50{--tw-bg-opacity: 1;background-color:rgb(254 242 242 / var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-opacity-75{--tw-bg-opacity: .75}.bg-gradient-to-bl{background-image:linear-gradient(to bottom left,var(--tw-gradient-stops))}.from-red-200{--tw-gradient-from: #fecaca var(--tw-gradient-from-position);--tw-gradient-to: rgb(254 202 202 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.to-red-200\\/0{--tw-gradient-to: rgb(254 202 202 / 0) var(--tw-gradient-to-position)}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.px-0{padding-left:0;padding-right:0}.px-1{padding-left:.25rem;padding-right:.25rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-3\\.5{padding-left:.875rem;padding-right:.875rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-\\[13px\\]{padding-left:13px;padding-right:13px}.px-\\[17px\\]{padding-left:17px;padding-right:17px}.py-0\\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-\\[8\\.5px\\]{padding-top:8.5px;padding-bottom:8.5px}.py-\\[9px\\]{padding-top:9px;padding-bottom:9px}.pb-4{padding-bottom:1rem}.pb-6{padding-bottom:1.5rem}.pl-2{padding-left:.5rem}.pl-3{padding-left:.75rem}.pl-6{padding-left:1.5rem}.pl-9{padding-left:2.25rem}.pr-2{padding-right:.5rem}.pr-2\\.5{padding-right:.625rem}.pr-4{padding-right:1rem}.pr-9{padding-right:2.25rem}.pt-2{padding-top:.5rem}.pt-4{padding-top:1rem}.pt-5{padding-top:1.25rem}.pt-6{padding-top:1.5rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.text-justify{text-align:justify}.align-top{vertical-align:top}.align-middle{vertical-align:middle}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}.capitalize{text-transform:capitalize}.italic{font-style:italic}.not-italic{font-style:normal}.leading-4{line-height:1rem}.leading-5{line-height:1.25rem}.leading-6{line-height:1.5rem}.leading-7{line-height:1.75rem}.leading-none{line-height:1}.leading-tight{line-height:1.25}.tracking-tight{letter-spacing:-.025em}.tracking-wider{letter-spacing:.05em}.text-\\[\\#1D4ED8\\]{--tw-text-opacity: 1;color:rgb(29 78 216 / var(--tw-text-opacity))}.text-\\[\\#686F7D\\]{--tw-text-opacity: 1;color:rgb(104 111 125 / var(--tw-text-opacity))}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity))}.text-blue-700{--tw-text-opacity: 1;color:rgb(29 78 216 / var(--tw-text-opacity))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.text-gray-800{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}.text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.text-green-800{--tw-text-opacity: 1;color:rgb(22 101 52 / var(--tw-text-opacity))}.text-indigo-600{--tw-text-opacity: 1;color:rgb(79 70 229 / var(--tw-text-opacity))}.text-purple-700{--tw-text-opacity: 1;color:rgb(126 34 206 / var(--tw-text-opacity))}.text-red-400{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity))}.text-red-700{--tw-text-opacity: 1;color:rgb(185 28 28 / var(--tw-text-opacity))}.text-red-800{--tw-text-opacity: 1;color:rgb(153 27 27 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.underline{text-decoration-line:underline}.overline{text-decoration-line:overline}.line-through{text-decoration-line:line-through}.opacity-0{opacity:0}.opacity-90{opacity:.9}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.outline-1{outline-width:1px}.outline-offset-\\[-0\\.50px\\]{outline-offset:-.5px}.outline-offset-\\[-1px\\]{outline-offset:-1px}.outline-gray-100{outline-color:#f3f4f6}.outline-gray-300{outline-color:#d1d5db}.ring{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-inset{--tw-ring-inset: inset}.ring-black\\/5{--tw-ring-color: rgb(0 0 0 / .05)}.ring-gray-300{--tw-ring-opacity: 1;--tw-ring-color: rgb(209 213 219 / var(--tw-ring-opacity))}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.drop-shadow{--tw-drop-shadow: drop-shadow(0 1px 2px rgb(0 0 0 / .1)) drop-shadow(0 1px 1px rgb(0 0 0 / .06));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.grayscale{--tw-grayscale: grayscale(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.invert{--tw-invert: invert(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.sepia{--tw-sepia: sepia(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-100{transition-duration:.1s}.duration-500{transition-duration:.5s}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.placeholder\\:text-gray-400::-moz-placeholder{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.placeholder\\:text-gray-400::placeholder{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.hover\\:border-gray-300:hover{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.hover\\:bg-gray-200:hover{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.hover\\:bg-gray-300:hover{--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity))}.hover\\:bg-gray-50:hover{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.hover\\:bg-indigo-500:hover{--tw-bg-opacity: 1;background-color:rgb(99 102 241 / var(--tw-bg-opacity))}.hover\\:bg-indigo-700:hover{--tw-bg-opacity: 1;background-color:rgb(67 56 202 / var(--tw-bg-opacity))}.hover\\:text-gray-500:hover{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.hover\\:text-gray-700:hover{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.hover\\:text-indigo-900:hover{--tw-text-opacity: 1;color:rgb(49 46 129 / var(--tw-text-opacity))}.hover\\:underline:hover{text-decoration-line:underline}.focus\\:border-indigo-500:focus{--tw-border-opacity: 1;border-color:rgb(99 102 241 / var(--tw-border-opacity))}.focus\\:border-indigo-600:focus{--tw-border-opacity: 1;border-color:rgb(79 70 229 / var(--tw-border-opacity))}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\\:ring-inset:focus{--tw-ring-inset: inset}.focus\\:ring-indigo-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(99 102 241 / var(--tw-ring-opacity))}.focus\\:ring-indigo-600:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(79 70 229 / var(--tw-ring-opacity))}.focus\\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.focus-visible\\:outline:focus-visible{outline-style:solid}.focus-visible\\:outline-2:focus-visible{outline-width:2px}.focus-visible\\:outline-offset-2:focus-visible{outline-offset:2px}.focus-visible\\:outline-\\[\\#2563EB\\]:focus-visible{outline-color:#2563eb}.focus-visible\\:outline-gray-500:focus-visible{outline-color:#6b7280}.focus-visible\\:outline-indigo-600:focus-visible{outline-color:#4f46e5}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:border-gray-300:disabled{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.disabled\\:bg-gray-300:disabled{--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity))}.disabled\\:text-gray-500:disabled{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.disabled\\:opacity-50:disabled{opacity:.5}.group:hover .group-hover\\:visible{visibility:visible}.group:hover .group-hover\\:text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.group:focus .group-focus\\:visible{visibility:visible}@media (min-width: 640px){.sm\\:col-span-2{grid-column:span 2 / span 2}.sm\\:-mx-6{margin-left:-1.5rem;margin-right:-1.5rem}.sm\\:mx-0{margin-left:0;margin-right:0}.sm\\:my-8{margin-top:2rem;margin-bottom:2rem}.sm\\:-mr-6{margin-right:-1.5rem}.sm\\:ml-3{margin-left:.75rem}.sm\\:ml-4{margin-left:1rem}.sm\\:mt-0{margin-top:0}.sm\\:block{display:block}.sm\\:flex{display:flex}.sm\\:grid{display:grid}.sm\\:h-10{height:2.5rem}.sm\\:w-10{width:2.5rem}.sm\\:w-auto{width:auto}.sm\\:w-full{width:100%}.sm\\:max-w-lg{max-width:32rem}.sm\\:max-w-xs{max-width:20rem}.sm\\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\\:items-start{align-items:flex-start}.sm\\:items-center{align-items:center}.sm\\:justify-end{justify-content:flex-end}.sm\\:gap-4{gap:1rem}.sm\\:rounded-lg{border-radius:.5rem}.sm\\:p-0{padding:0}.sm\\:p-6{padding:1.5rem}.sm\\:px-0{padding-left:0;padding-right:0}.sm\\:px-4{padding-left:1rem;padding-right:1rem}.sm\\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\\:pl-6{padding-left:1.5rem}.sm\\:text-left{text-align:left}.sm\\:text-sm{font-size:.875rem;line-height:1.25rem}.sm\\:text-sm\\/6{font-size:.875rem;line-height:1.5rem}}@media (min-width: 1024px){.lg\\:-mx-8{margin-left:-2rem;margin-right:-2rem}.lg\\:mr-0{margin-right:0}.lg\\:px-8{padding-left:2rem;padding-right:2rem}}@media (prefers-color-scheme: dark){.dark\\:bg-blue-400\\/10{background-color:#60a5fa1a}.dark\\:bg-purple-400\\/10{background-color:#c084fc1a}.dark\\:text-blue-400{--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity))}.dark\\:text-purple-400{--tw-text-opacity: 1;color:rgb(192 132 252 / var(--tw-text-opacity))}}`,qh=Ze(xx);function vl(){return(vl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var Cx=["context","children"];function Sx(e){this.getChildContext=function(){return e.context};var t=e.children,n=function(r,s){if(r==null)return{};var i,o,a={},l=Object.keys(r);for(o=0;o<l.length;o++)s.indexOf(i=l[o])>=0||(a[i]=r[i]);return a}(e,Cx);return ra(t,n)}function Ax(){var e=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(e),this._vdom=f(Sx,vl({},this._props,{context:e.detail.context}),function t(n,r){if(n.nodeType===3)return n.data;if(n.nodeType!==1)return null;var s=[],i={},o=0,a=n.attributes,l=n.childNodes;for(o=a.length;o--;)a[o].name!=="slot"&&(i[a[o].name]=a[o].value,i[Kh(a[o].name)]=a[o].value);for(o=l.length;o--;){var c=t(l[o],null),d=l[o].slot;d?i[d]=f(Zh,{name:d},c):s[o]=c}var u=r?f(Zh,null,s):s;return f(r||n.nodeName.toLowerCase(),i,u)}(this,this._vdomComponent)),(this.hasAttribute("hydrate")?na:Un)(this._vdom,this._root)}function Kh(e){return e.replace(/-(\w)/g,function(t,n){return n?n.toUpperCase():""})}function kx(e,t,n){if(this._vdom){var r={};r[e]=n=n??void 0,r[Kh(e)]=n,this._vdom=ra(this._vdom,r),Un(this._vdom,this._root)}}function Ex(){Un(this._vdom=null,this._root)}function Zh(e,t){var n=this;return f("slot",vl({},e,{ref:function(r){r?(n.ref=r,n._listener||(n._listener=function(s){s.stopPropagation(),s.detail.context=t},r.addEventListener("_preact",n._listener))):n.ref.removeEventListener("_preact",n._listener)}}))}function Ix(e,t,n,r){function s(){var i=Reflect.construct(HTMLElement,[],s);return i._vdomComponent=e,i._root=r&&r.shadow?i.attachShadow({mode:r.mode||"open"}):i,i}return(s.prototype=Object.create(HTMLElement.prototype)).constructor=s,s.prototype.connectedCallback=Ax,s.prototype.attributeChangedCallback=kx,s.prototype.disconnectedCallback=Ex,n=n||e.observedAttributes||Object.keys(e.propTypes||{}),s.observedAttributes=n,n.forEach(function(i){Object.defineProperty(s.prototype,i,{get:function(){return this._vdom.props[i]},set:function(o){this._vdom?this.attributeChangedCallback(i,null,o):(this._props||(this._props={}),this._props[i]=o,this.connectedCallback());var a=typeof o;o!=null&&a!=="string"&&a!=="boolean"&&a!=="number"||this.setAttribute(i,o)}})}),customElements.define(t||e.tagName||e.displayName||e.name,s)}function Jh(e,t){Ix(e,t,void 0,{shadow:!0})}class ho extends j{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Started","Finished"]}}class wn extends j{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["API","Direct"]}}class os extends j{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["GetCurrent","SetSelected","Save"]}}class as extends Q{constructor(t,n,r,s){super(),this.Current=t,this.Selected=n,this.Saving=r,this.UserCanEdit=s}}function Nx(e){let t;return[new as(new oe(0,[]),new wn(0,[]),new oe(0,[]),(t=hf(e),t.tag===1?Pd.ProvisionAccounts:Rd(t.fields[0]).ProvisionAccounts)),ee(n=>{n(new os(0,[new ho(0,[])]))})]}function Tx(e,t,n,r){let s;switch(n.tag){case 1:return[new as(r.Current,n.fields[0],r.Saving,r.UserCanEdit),le()];case 2:return n.fields[0].tag===1?[new as(n.fields[0].fields[0].tag===1?r.Current:new oe(2,[new g(0,[r.Selected])]),r.Selected,new oe(2,[n.fields[0].fields[0]]),r.UserCanEdit),le()]:[new as(r.Current,r.Selected,new oe(1,[]),r.UserCanEdit),Is(i=>{Ns(i)},t,new Yc(r.Selected.tag===1?new Go(1,[]):new Go(0,[])),i=>new os(2,[new ho(1,[i])]))];default:return n.fields[0].tag===1?[new as(new oe(2,[n.fields[0].fields[0]]),(s=n.fields[0].fields[0],s.tag===1?new wn(0,[]):s.fields[0]),r.Saving,r.UserCanEdit),le()]:[new as(new oe(1,[]),r.Selected,r.Saving,r.UserCanEdit),Is(i=>{Ns(i)},e,void 0,i=>new os(0,[new ho(1,[i])]))]}}function Mx(e){let t,n;const r=Ve(e.partnerId),s=Rt(e.accountId),i=Nx(e.accessToken);n=fr(()=>dr(()=>i,(l,c)=>Tx(()=>{const d=kf(e.backendUrl,e.accessToken,r,s);return N.Bind(d,u=>{let m;const h=u;return m=h.tag===1?new g(1,[h.fields[0]]):new g(0,[h.fields[0].ProvisioningMode.tag===1?new wn(1,[]):new wn(0,[])]),N.Return(m)})},d=>qw(e.backendUrl,e.accessToken,r,s,d),l,c),(l,c)=>{}),void 0,void 0);const o=n[0],a=n[1];return f("div",S(ee((t=se(k(()=>M(A(f("style",{children:[qh]})),k(()=>M(A(f("h3",{className:"text-xl font-semibold text-gray-900",children:"Account provisioning mode settings"})),k(()=>M(A(f("p",{className:"mt-1 text-base font-normal text-gray-600",children:"Configure how accounts and profiles are provisioned."})),k(()=>{const l=o.Current;let c;switch(l.tag){case 3:{c=1;break}case 2:{l.fields[0].tag===0?c=2:c=1;break}default:c=0}switch(c){case 0:return A(f("div",{className:"mt-8",children:"Loading..."}));case 1:return A(f("div",{className:"mt-8 text-red-600",children:"Failed to load current settings."}));default:return M(A(f("label",{className:"mt-8 block text-sm font-medium text-gray-700",children:"Account provisioning mode"})),k(()=>{let d,u;return M(A(f("select",S(y([(d="mt-1 max-w-[480px] block w-full rounded-md bg-white border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 text-sm",["className",d]),["value",Ze(o.Selected)],["onChange",m=>{switch(m.target.value){case"API":{a(new os(1,[new wn(0,[])]));break}case"Direct":{a(new os(1,[new wn(1,[])]));break}}}],["disabled",o.UserCanEdit?Ce(o.Saving,new oe(1,[])):!0],(u=se(k(()=>{const m=h=>{const p=o.Current;let $;switch(p.tag===2&&p.fields[0].tag===0&&Ce(p.fields[0].fields[0],h)?($=0,p.fields[0].fields[0]):$=1,$){case 0:return" (active)";default:return""}};return M(A(f("option",{value:Ze(new wn(0,[])),children:`API${m(new wn(0,[]))}`})),k(()=>A(f("option",{value:Ze(new wn(1,[])),children:`Direct${m(new wn(1,[]))}`}))))})),["children",v.Children.toArray(Array.from(u))])])))),k(()=>{let m,h;return M(o.UserCanEdit?A(f("button",S(y([(m="mt-5 inline-flex items-center px-4 py-2 border border-transparent text-sm font-medium rounded-md shadow-sm text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 disabled:opacity-50 disabled:cursor-not-allowed",["className",m]),["onClick",p=>{a(new os(2,[new ho(0,[])]))}],["disabled",(h=o.Current,o.Saving.tag===1?!0:h.tag===2&&h.fields[0].tag===0&&Ce(h.fields[0].fields[0],o.Selected))],["children","Save settings"]])))):Ke(),k(()=>{const p=o.Saving;let $;switch(p.tag){case 2:{p.fields[0].tag===1?$=1:$=0;break}case 3:{$=1;break}default:$=0}switch($){case 0:return A(ge());default:return A(f("div",{className:"mt-2 text-red-600",children:"Failed to save settings."}))}}))}))}))}})))))))),["children",v.Children.toArray(Array.from(t))]))))}function Rx(){Jh(e=>f(Mx,e),"superhero-account-registry-provisioning")}class ls extends Q{constructor(t,n,r,s){super(),this.Partners=t,this.Accounts=n,this.CurrentPage=r,this.Roles=s}}class Xn extends j{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["PageChanged","GetAccountName","AppendAccount","LoadPartners","UpdateAccount"]}}function Px(e){let t;const n=Id(yd(window.location.hash,1)),r=n.tag===17?Na(new q(0,[])):le();return[new ls(new oe(0,[]),Q$(),n,(t=hf(e),t.tag===1?(ec(`Failed to decode jwt: ${t.fields[0]}`),Pd):Rd(t.fields[0]))),r]}function Dx(e,t,n,r){let s,i,o,a;switch(n.tag){case 1:{const l=n.fields[0],c=Zr(e,l,d=>new Xn(2,[l,new g(0,[d])]),d=>new Xn(2,[l,new g(1,["Failed to retrieve account name"])]));return[new ls(r.Partners,Ea(r.Accounts,l,new oe(1,[])),r.CurrentPage,r.Roles),c]}case 2:return[new ls(r.Partners,Ea(r.Accounts,n.fields[0],new oe(2,[n.fields[1]])),r.CurrentPage,r.Roles),le()];case 0:{const l=n.fields[0];return l.tag===17?[r,Na(l)]:[new ls(r.Partners,r.Accounts,l,r.Roles),le()]}case 4:{const l=n.fields[1],c=n.fields[0],d=Ed(r.Accounts,c);let u,m;switch(d!=null&&d.tag===2&&d.fields[0].tag===0?(u=0,m=d.fields[0].fields[0]):u=1,u){case 0:{const h=new Gc(m.StreamId,m.PartnerId,l.Name,m.Website,m.ContactDetails,m.Notes,(s=l.LegalEntity,i=m.LegalEntity,s!=null&&i!=null?(o=i,a=s,new jc(a.BusinessName,a.BusinessNumber,o.Address1,o.Address2,o.City,o.Postcode,o.State,o.Phone,o.CountryCode)):m.LegalEntity),l.ExternalId,m.ChannelId,m.ProvisioningMode);if(Ce(h,m))return[r,le()];{const p=Zr(t,[c,l],()=>new Xn(2,[c,new g(0,[h])]),$=>new Xn(2,[c,new g(1,[$])]));return[new ls(r.Partners,Ea(r.Accounts,c,new oe(1,[])),r.CurrentPage,r.Roles),p]}}default:return[r,le()]}}default:return[new ls(n.fields[0],r.Accounts,r.CurrentPage,r.Roles),le()]}}function Ox(e){let t,n,r,s;const i=Px(e.accessToken);s=fr(()=>dr(()=>i,(x,E)=>Dx(O=>{const L=X$(O);return kf(e.backendUrl,e.accessToken,L[0],L[1])},O=>{const L=O[1],X=kd(O[0]);return Ww(e.backendUrl,e.accessToken,X[0],X[1],new Jc(L.Name,L.ExternalId,Ge(pe=>pe.BusinessName,L.LegalEntity),Ge(pe=>pe.BusinessNumber,L.LegalEntity)))},x,E),(x,E)=>{}),void 0,void 0);const o=s[0],a=s[1];_a(gd(()=>Hw(e.backendUrl,e.accessToken),x=>{a(new Xn(3,[x]))}));const l=x=>{let E;const O=o.Partners;switch(O.tag){case 0:return new oe(0,[]);case 1:return new oe(1,[]);case 3:return new oe(3,[O.fields[0]]);default:return O.fields[0].tag===1?new oe(2,[new g(1,[qt(Ql("Unknown partner: %A%P()",[x]))])]):new oe(2,[(E=Ia(O.fields[0].fields[0],x),E==null?new g(1,[qt(Ql("Unknown partner: %A%P()",[x]))]):new g(0,[E.Name]))])}},c=x=>f(Fs,{page:o.CurrentPage,partner:{Id:x,Name:l(x)}}),d=(x,E)=>{const O=f(jh,{mode:E});return[c(x),O]},u=(x,E)=>{let O,L,X;const pe=x[0],Se=x[1];let de;const Y=[pe,Se];de=Y$(Y[0],Y[1]);let me;const G=de;me=oc(Ed(o.Accounts,G),()=>(a(new Xn(1,[G])),new oe(0,[])));let re;return re=f(hx,{updateAccount:P=>{a(new Xn(4,[de,P]))},props:{accountDetails:[pe,Se]},mode:E,account:me}),[(O=[pe,Se,me],L=O[0],f(Fs,(X={Id:L,Name:l(L)},{account:{Id:O[1],Name:n1(P=>pc(P.Name),O[2])},page:o.CurrentPage,partner:No(X)}))),re]};let m;const h=o.Partners;let p,$,w,C;switch(h.tag){case 2:{h.fields[0].tag===1?(p=2,w=h.fields[0].fields[0]):(p=1,$=h.fields[0].fields[0]);break}case 3:{p=3,C=h.fields[0];break}default:p=0}switch(p){case 0:{m=[f(Ks,null),f(Ks,null)];break}case 1:{const x=o.CurrentPage;switch(x.tag){case 3:{const E=x.fields[0],O=c(E),L=Ia($,E);if(L==null)m=[O,f(an,{error:"Unknown Partner"})];else{const X=L;m=d(E,new xr(1,[{accountProvisioningMode:X.AccountProvisioningMode,partnerId:E}]))}break}case 4:{const E=x.fields[0];m=d(E,new xr(2,[new xv(E,e.backendUrl,e.accessToken)]));break}case 5:{const E=x.fields[0];m=d(E,new xr(3,[new Cv(E,e.backendUrl,e.accessToken)]));break}case 6:{const E=x.fields[0];m=d(E,new xr(4,[new Sv(E,e.backendUrl,e.accessToken)]));break}case 2:{const E=x.fields[0];m=d(E,new xr(5,[new Av(E,e.backendUrl,e.accessToken)]));break}case 7:{const E=x.fields[0];m=d(E,new xr(6,[new kv(E,e.backendUrl,e.accessToken)]));break}case 16:{m=u([x.fields[0],x.fields[1]],new On(8,[]));break}case 8:{m=u([x.fields[0],x.fields[1]],new On(0,[]));break}case 9:{m=u([x.fields[0],x.fields[1]],new On(1,[]));break}case 10:{m=u([x.fields[0],x.fields[1]],new On(2,[]));break}case 11:{m=u([x.fields[0],x.fields[1]],new On(3,[]));break}case 12:{m=u([x.fields[0],x.fields[1]],new On(4,[]));break}case 13:{m=u([x.fields[0],x.fields[1]],new On(5,[]));break}case 14:{m=u([x.fields[0],x.fields[1]],new On(6,[]));break}case 15:{m=u([x.fields[0],x.fields[1]],new On(7,[]));break}case 0:case 17:{m=[f(Fs,{page:o.CurrentPage}),f(vx,{partnerList:$})];break}default:{const E=x.fields[0],O=c(E),L=Ia($,E);m=L==null?[O,f(an,{error:"Unknown Partner"})]:[O,(t=new xr(0,[L]),f(jh,{mode:t}))]}}break}case 2:{m=[f(Fs,{page:o.CurrentPage}),f(an,{error:w})];break}default:m=[f(Fs,{page:o.CurrentPage}),(n=Ze(C),f(an,{error:n}))]}return s$(Mn,new Cy(o.Roles,e.backendUrl,e.accessToken),ee((r=y([f("style",{children:[qh]}),z$({onUrlChanged:x=>{a(new Xn(0,[Id(x)]))},application:f(ve,{},m[0],m[1])})]),f("div",{children:v.Children.toArray(Array.from(r))}))))}Jh(e=>f(Ox,e),"superhero-account-registry"),Rx()})();