@flarehr/superhero-account-registry 0.1.2102 → 0.1.2104

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 tn(e){return Array.isArray(e)||ArrayBuffer.isView(e)}function Vm(e){return e!=null&&typeof e.GetEnumerator=="function"}function Lm(e){return e!=null&&typeof e.CompareTo=="function"}function Bm(e){return e!=null&&typeof e.Equals=="function"}function Yl(e){return e!=null&&typeof e.GetHashCode=="function"}function Fo(e){return e!=null&&typeof e.Dispose=="function"}function _e(e){Fo(e)&&e.Dispose()}function ie(){return null}function Ci(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 Um{constructor(t){this.iter=t,this.current=ie()}"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 ve(e){return Vm(e)?e.GetEnumerator():new Um(e[Symbol.iterator]())}function Kr(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 jm{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 Ce(e,t){return e.toString(10).padStart(t,"0")}function zm(e,t,n){return e.toString(10).padStart(t,"0").padEnd(n,"0")}function Xl(e){const t=e;return typeof t.offset=="number"?t.offset:e.kind===1?0:e.getTimezoneOffset()*-6e4}function Hm(e,t){return e=e,e.toString(t)}function vr(e,t){return e=e,e.toString(t)}class Nn{static id(t){return Nn.idMap.has(t)||Nn.idMap.set(t,++Nn.count),Nn.idMap.get(t)}}Nn.idMap=new WeakMap,Nn.count=0;function Qn(e){let t=0,n=5381;const r=e.length;for(;t<r;)n=n*33^e.charCodeAt(t++);return n}function nn(e){return e*2654435761|0}function Ql(e){return Qn(e.toString(32))}function Es(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 Wm(e){if(e==null)return 0;switch(typeof e){case"boolean":return e?1:0;case"number":return nn(e);case"bigint":return Ql(e);case"string":return Qn(e);default:return nn(Nn.id(e))}}function Gm(e){return Yl(e)?e.GetHashCode():Wm(e)}function qm(e){return e.getTime()}function Km(e){const t=e.length,n=new Array(t);for(let r=0;r<t;r++)n[r]=Tn(e[r]);return Es(n)}function Tn(e){var t;if(e==null)return 0;switch(typeof e){case"boolean":return e?1:0;case"number":return nn(e);case"bigint":return Ql(e);case"string":return Qn(e);default:{if(Yl(e))return e.GetHashCode();if(tn(e))return Km(e);if(e instanceof Date)return qm(e);if(((t=Object.getPrototypeOf(e))==null?void 0:t.constructor)===Object){const n=Object.values(e).map(r=>Tn(r));return Es(n)}else return nn(Nn.id(e))}}}function Zm(e){return Gm(e)}function Vo(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 ec(e,t){return Vo(e,t,Se)}function Jm(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]||!Se(e[n[s]],t[r[s]]))return!1;return!0}function Se(e,t){var n;return e===t?!0:e==null?t==null:t==null?!1:Bm(e)?e.Equals(t):tn(e)?tn(t)&&ec(e,t):typeof e!="object"?!1:e instanceof Date?t instanceof Date&&tc(e,t)===0:((n=Object.getPrototypeOf(e))==null?void 0:n.constructor)===Object&&Jm(e,t)}function tc(e,t){let n,r;return"offset"in e&&"offset"in t?(n=e.getTime(),r=t.getTime()):(n=e.getTime()+Xl(e),r=t.getTime()+Xl(t)),n===r?0:n<r?-1:1}function Rn(e,t){return e===t?0:e<t?-1:1}function Ym(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 nc(e,t){return Ym(e,t,Jt)}function Xm(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=Jt(e[o],t[o]),i!==0)return i}return 0}function Jt(e,t){var n;return e===t?0:e==null?t==null?0:-1:t==null?1:Lm(e)?e.CompareTo(t):tn(e)?tn(t)?nc(e,t):-1:typeof e!="object"?e<t?-1:1:e instanceof Date?t instanceof Date?tc(e,t):-1:((n=Object.getPrototypeOf(e))==null?void 0:n.constructor)===Object?Xm(e,t):-1}function _(e){const t={};for(const n of e)t[n[0]]=n[1];return t}function Qm(e){tn(e)?e.splice(0):e.clear()}const Si=new WeakMap;function pe(e){if(e==null)return null;const t=(n,r)=>e(n)(r);return Si.set(t,e),t}function er(e){return Si.get(e)??(t=>n=>e(t,n))}function Lo(e){if(e==null)return null;const t=(n,r,s)=>e(n)(r)(s);return Si.set(t,e),t}function Bo(e){return Si.get(e)??(t=>n=>r=>e(t,n,r))}function ep(e){let t=0,n="[";for(const r of e){if(t===0)n+=ot(r);else if(t===100){n+="; ...";break}else n+="; "+ot(r);t++}return n+"]"}function ot(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 ep(e);{const r=(n=Object.getPrototypeOf(e))==null?void 0:n.constructor;return r===Object&&t<10?"{ "+Object.entries(e).map(([s,i])=>s+" = "+ot(i,t+1)).join(`
2
- `)+" }":(r==null?void 0:r.name)??""}}return String(e)}function tp(e,t){if(t.length===0)return e;{let n,r=!0;return t.length===1?(n=ot(t[0]),r=n.indexOf(" ")>=0):n=t.map(s=>ot(s)).join(", "),e+(r?" (":" ")+n+(r?")":"")}}class B{get name(){return this.cases()[this.tag]}toJSON(){return this.fields.length===0?this.name:[this.name].concat(this.fields)}toString(){return tp(this.name,this.fields)}GetHashCode(){const t=this.fields.map(n=>Tn(n));return t.splice(0,0,nn(this.tag)),Es(t)}Equals(t){return this===t?!0:Ci(this,t)&&this.tag===t.tag?ec(this.fields,t.fields):!1}CompareTo(t){return this===t?0:Ci(this,t)?this.tag===t.tag?nc(this.fields,t.fields):this.tag<t.tag?-1:1:-1}}function np(e){const t={},n=Object.keys(e);for(let r=0;r<n.length;r++)t[n[r]]=e[n[r]];return t}function rp(e){return"{ "+Object.entries(e).map(([t,n])=>t+" = "+ot(n)).join(`
3
- `)+" }"}function sp(e){const t=Object.values(e).map(n=>Tn(n));return Es(t)}function ip(e,t){if(e===t)return!0;if(Ci(e,t)){const n=Object.keys(e);for(let r=0;r<n.length;r++)if(!Se(e[n[r]],t[n[r]]))return!1;return!0}else return!1}function op(e,t){if(e===t)return 0;if(Ci(e,t)){const n=Object.keys(e);for(let r=0;r<n.length;r++){const s=Jt(e[n[r]],t[n[r]]);if(s!==0)return s}return 0}else return-1}class Y{toJSON(){return np(this)}toString(){return rp(this)}GetHashCode(){return sp(this)}Equals(t){return ip(this,t)}CompareTo(t){return op(this,t)}}class at{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 ap{constructor(t){this.message=t}}function lp(e){return e instanceof ap||e instanceof Error}function cp(e){return e instanceof Promise}function Ai(e){return lp(e)||cp(e)?e:new Error(String(e))}const Zr=Symbol("numeric");function rc(e){return typeof e=="number"||typeof e=="bigint"||(e==null?void 0:e[Zr])}function up(e,t){return typeof e=="number"||typeof e=="bigint"?e<t?-1:e>t?1:0:e.CompareTo(t)}function Uo(e,t){return typeof e=="number"?e*t:typeof e=="bigint"?e*BigInt(t):e[Zr]().multiply(t)}function ki(e,t){return typeof e=="number"?e.toFixed(t):typeof e=="bigint"?e:e[Zr]().toFixed(t)}function Ei(e,t){return typeof e=="number"?e.toPrecision(t):typeof e=="bigint"?e:e[Zr]().toPrecision(t)}function Ii(e,t){return typeof e=="number"?e.toExponential(t):typeof e=="bigint"?e:e[Zr]().toExponential(t)}function Ni(e){return typeof e=="number"?(Number(e)>>>0).toString(16):typeof e=="bigint"?BigInt.asUintN(64,e).toString(16):e[Zr]().toHex()}class dp{constructor(t,n,r,s){this.declaringType=t,this.tag=n,this.name=r,this.fields=s}}class Yt{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 Fe(this)}GetHashCode(){return sc(this)}Equals(t){return jo(this,t)}}function jt(e){return e.generics!=null?e.generics:[]}function sc(e){const t=Qn(e.fullname),n=jt(e).map(sc);return Es([t,...n])}function jo(e,t){return e.fullname===""?t.fullname===""&&Vo(Ns(e),Ns(t),([n,r],[s,i])=>n===s&&jo(r,i)):e.fullname===t.fullname&&Vo(jt(e),jt(t),jo)}function Ti(e,t,n,r){return new Yt(e,t,n,r)}function Je(e,t,n,r){return new Yt(e,t,n,void 0,r)}function zo(e,t,n,r){const s=new Yt(e,t,n,void 0,void 0,()=>{const i=n.prototype.cases();return r().map((o,a)=>new dp(s,a,i[a],o))});return s}function $e(e){return new Yt("Microsoft.FSharp.Core.FSharpOption`1",[e])}function Ho(e){return new Yt("Microsoft.FSharp.Collections.FSharpList`1",[e])}function ic(e){return new Yt("[]",[e])}const fp=new Yt("System.Object"),H=new Yt("System.String");function Jr(e){if(Array.isArray(e))return e[0];if(e instanceof Yt){const t=Is(e);if(t!=null)return Jr(t)+"[]";{const n=e.fullname.lastIndexOf(".");return n===-1?e.fullname:e.fullname.substr(n+1)}}else return e.name}function Fe(e){const t=Is(e);return t!=null?Fe(t)+"[]":e.generics==null||e.generics.length===0?e.fullname:e.fullname+"["+e.generics.map(n=>Fe(n)).join(",")+"]"}function oc(e){return Is(e)!=null}function Is(e){var t;return e.fullname==="[]"&&((t=e.generics)==null?void 0:t.length)===1?e.generics[0]:void 0}function ac(e){return e.generics!=null&&e.generics.length>0}function Wo(e){return e.enumCases!=null&&e.enumCases.length>0}function lc(e){return e.generics==null?e:new Yt(e.fullname,e.generics.map(()=>fp))}function cc(e){var t;return(t=e.generics)==null?void 0:t[0]}function Yr(e){if(Wo(e)&&e.enumCases!=null)return e.enumCases.map(t=>t[1]);throw new Error(`${e.fullname} is not an enum type`)}function hp(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 Xr(e,t){const n=parseInt(t,10);return hp(e,isNaN(n)?t:n)[1]}function uc(e){if(e.cases!=null)return e.cases();throw new Error(`${e.fullname} is not an F# union type`)}function Ns(e){if(e.fields!=null)return e.fields();throw new Error(`${e.fullname} is not an F# record type`)}function dc(e){if(Go(e)&&e.generics!=null)return e.generics;throw new Error(`${e.fullname} is not a tuple type`)}function fc(e){return e instanceof Yt?e.cases!=null:e instanceof B}function hc(e){return e instanceof Yt?e.fields!=null:e instanceof Y}function Go(e){return e.fullname.startsWith("System.Tuple")}function mp(e,t){const r=uc(t)[e.tag];if(r==null)throw new Error(`Cannot find case ${e.name} in union type`);return[r,e.fields]}function mc(e){return e.fields==null?[]:e.fields}function pp(e,t){return e[t[0]]}function a2(e){return e}function gp(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 $p(e,t){const n=Ns(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 wp(e,t){return e}const yp=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],bp=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],_p=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],vp=["January","February","March","April","May","June","July","August","September","October","November","December"];function zt(e,t,n){let r=0,s=t;for(;s<e.length&&e[s]===n;)s++,r++;return r}function pc(e,t){return t>=e.length-1?-1:e.charCodeAt(t+1)}function xp(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 qo(e,t,n){let r=0,s=0,i="";const o=n?Ts(e.getTime(),1):e;for(;r<t.length;){const a=t[r];switch(a){case"d":switch(s=zt(t,r,"d"),r+=s,s){case 1:i+=wc(o);break;case 2:i+=Ce(wc(o),2);break;case 3:i+=yp[_c(o)];break;case 4:i+=bp[_c(o)];break}break;case"f":if(s=zt(t,r,"f"),r+=s,s<=3){const w=10**(3-s);i+=Ce(Math.floor(Pi(o)/w),s)}else s<=7&&(i+=(""+Pi(o)).padEnd(s,"0"));break;case"F":if(s=zt(t,r,"F"),r+=s,s<=3){const w=10**(3-s),S=Math.floor(Pi(o)/w);S!=0&&(i+=Ce(S,s))}else if(s<=7){const w=Pi(o);w!=0&&(i+=Ce(w,3))}break;case"g":s=zt(t,r,"g"),r+=s,s<=2&&(i+="A.D.");break;case"h":switch(s=zt(t,r,"h"),r+=s,s){case 1:i+=Mi(o)%12;break;case 2:i+=Ce(Mi(o)%12,2);break}break;case"H":switch(s=zt(t,r,"H"),r+=s,s){case 1:i+=Mi(o);break;case 2:i+=Ce(Mi(o),2);break}break;case"K":switch(s=zt(t,r,"K"),r+=s,s){case 1:switch(gc(o)){case 1:i+="Z";break;case 2:i+=Qr(o.getTimezoneOffset()*-6e4);break}break}break;case"m":switch(s=zt(t,r,"m"),r+=s,s){case 1:i+=yc(o);break;case 2:i+=Ce(yc(o),2);break}break;case"M":switch(s=zt(t,r,"M"),r+=s,s){case 1:i+=Di(o);break;case 2:i+=Ce(Di(o),2);break;case 3:i+=_p[Di(o)-1];break;case 4:i+=vp[Di(o)-1];break}break;case"s":switch(s=zt(t,r,"s"),r+=s,s){case 1:i+=bc(o);break;case 2:i+=Ce(bc(o),2);break}break;case"t":switch(s=zt(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=zt(t,r,"y"),r+=s,s){case 1:i+=o.getFullYear()%100;break;case 2:i+=Ce(o.getFullYear()%100,2);break;case 3:i+=Ce(o.getFullYear(),3);break;case 4:i+=Ce(o.getFullYear(),4);break;case 5:i+=Ce(o.getFullYear(),5);break}break;case"z":s=zt(t,r,"z"),r+=s;let l="";switch(gc(o)){case 1:l="+00:00";break;case 2:l=Qr(o.getTimezoneOffset()*-6e4);break;case 0:l=Qr(Rp(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}${Ce(d,2)}`;break;default:i+=`${c}${Ce(d,2)}:${Ce(u,2)}`;break}break;case":":i+=":",r++;break;case"/":i+="/",r++;break;case"'":case'"':const[m,h]=xp(t,r);i+=m,r+=h;break;case"%":const p=pc(t,r);if(p>=0&&p!==37)r+=2,i+=qo(o,String.fromCharCode(p),n);else throw new Error("Invalid format string");break;case"\\":const $=pc(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 gc(e){return e.kind||0}function Qr(e){const t=e<0;e=Math.abs(e);const n=~~(e/36e5),r=e%36e5/6e4;return(t?"-":"+")+Ce(n,2)+":"+Ce(r,2)}function Ri(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 Cp(e,t){if(t)return e.toISOString();{const n=e.kind==null?!0:e.kind===2;return Ce(e.getFullYear(),4)+"-"+Ce(e.getMonth()+1,2)+"-"+Ce(e.getDate(),2)+"T"+Ce(e.getHours(),2)+":"+Ce(e.getMinutes(),2)+":"+Ce(e.getSeconds(),2)+"."+Ce(e.getMilliseconds(),3)+(n?Qr(e.getTimezoneOffset()*-6e4):"")}}function Sp(e,t){const n=e.toISOString();return n.substring(0,n.length-1)+Qr(t)}function Ap(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," ")+Qr(e.offset??0);if(t.length===1)switch(t){case"D":case"d":return Ri(n,"first");case"T":case"t":return Ri(n,"second");case"O":case"o":return Sp(n,e.offset??0);default:throw new Error("Unrecognized Date print format")}else return qo(n,t,!0)}function kp(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?Ri(e,"first"):e.toLocaleDateString();case"T":case"t":return n?Ri(e,"second"):e.toLocaleTimeString();case"O":case"o":return Cp(e,n);default:throw new Error("Unrecognized Date print format")}else return qo(e,t,n)}function es(e,t,n){return e.offset!=null?Ap(e,t):kp(e,t)}function Ts(e,t){const n=new Date(e);return n.kind=(t??0)|0,n}function Ep(){return Ts(-621355968e5,1)}function $c(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 Ip(e,t=!1){const[n,r]=$c(e),s=r!=null?t&&r==="Z"?1:2:0;return Ts(n.getTime(),s)}function Np(e,t){try{return t.contents=Ip(e),!0}catch{return!1}}function Tp(e){return e.kind===1?e:Ts(e.getTime(),1)}function Rp(e){return e.kind===2?e:Ts(e.getTime(),2)}function wc(e){return e.kind===1?e.getUTCDate():e.getDate()}function Mi(e){return e.kind===1?e.getUTCHours():e.getHours()}function Pi(e){return e.kind===1?e.getUTCMilliseconds():e.getMilliseconds()}function yc(e){return e.kind===1?e.getUTCMinutes():e.getMinutes()}function Di(e){return(e.kind===1?e.getUTCMonth():e.getMonth())+1}function bc(e){return e.kind===1?e.getUTCSeconds():e.getSeconds()}function _c(e){return e.kind===1?e.getUTCDay():e.getDay()}function vc(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 Ko(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}function Mp(e,t,n=0){return e.lastIndex=n,e.exec(t)}function xc(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 Pp(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=vc(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=xc(e,a),c=xc.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 Rs=/(^|[^%])%([0+\- ]*)(\*|\d+)?(?:\.(\d+))?(\w)/g,Ms=/(?:(^|[^%])%([0+\- ]*)(\d+)?(?:\.(\d+))?(\w))?%P\(\)/g,Dp=/\{(\d+)(,-?\d+)?(?:\:([a-zA-Z])(\d{0,2})|\:(.+?))?\}/g;function Cc(e,t){return up(e,t)<0}function Xt(e){return{input:e,cont:Op(e)}}function Sc(e,t){let n=0,r=0,s="";Ms.lastIndex=0;let i=Ms.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=Ms.lastIndex,s+=Ec(t[n++],a,l,c,d),Ms.lastIndex=r-1,i=Ms.exec(e)}return s+=e.substring(r).replace(/%%/g,"%"),s}function Zo(e,t){return typeof t=="string"?e(t):t.cont(e)}function Ac(e){return Zo(t=>console.log(t),e)}function rn(e){return Zo(t=>t,e)}function kc(e){return Zo(t=>{throw new Error(t)},e)}function Ec(e,t,n,r,s){let i="";if(t=t||"",s=s||"",rc(e))switch(s.toLowerCase()!=="x"&&(Cc(e,0)?(e=Uo(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=ki(e,r);break;case"g":case"G":e=r!=null?Ei(e,r):Ei(e);break;case"e":case"E":e=r!=null?Ii(e,r):Ii(e);break;case"x":e=Ni(e);break;case"X":e=Ni(e).toUpperCase();break;default:e=String(e);break}else e instanceof Date?e=es(e):e=ot(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=Ps(e,n-i.length,l,a),e=i+e):e=Ps(i+e,n,l,a)}return e}function Ic(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+=Ec(c,d,p,m,h),a.splice(0,1),l.splice(0,1)}return l.length===0?(o+=a[0],e(o)):Ic(e,a,l,o,s)}}function Op(e){return t=>{Rs.lastIndex=0;const n=[],r=[];let s=0,i=Rs.exec(e);for(;i;){const o=i.index+(i[1]||"").length;n.push(e.substring(s,o).replace(/%%/g,"%")),r.push(i),s=Rs.lastIndex,Rs.lastIndex-=1,i=Rs.exec(e)}return n.length===0?t(e.replace(/%%/g,"%")):(n.push(e.substring(s).replace(/%%/g,"%")),Ic(t,n,r))}}function Nc(e,...t){let n;return typeof e=="object"?(n=String(t[0]),t.shift()):n=e,n.replace(Dp,(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(rc(c))switch(a=a==null?null:parseInt(a,10),o){case"f":case"F":a=a??2,c=ki(c,a);break;case"g":case"G":c=a!=null?Ei(c,a):Ei(c);break;case"e":case"E":c=a!=null?Ii(c,a):Ii(c);break;case"p":case"P":a=a??2,c=ki(Uo(c,100),a)+" %";break;case"d":case"D":c=a!=null?Jo(String(c),a,"0"):String(c);break;case"x":case"X":c=a!=null?Jo(Ni(c),a,"0"):Ni(c),o==="X"&&(c=c.toUpperCase());break;default:if(l){let d="";c=l.replace(/([0#,]+)(\.[0#]+)?/,(u,m,h)=>{Cc(c,0)&&(c=Uo(c,-1),d="-"),h=h==null?"":h.substring(1),c=ki(c,Math.max(h.length,0));let[p,$]=c.split(".");$||($="");const w=m.replace(/,/g,"").replace(/^#+/,"").length;p=Jo(p,w,"0");const S=h.replace(/#+$/,"").length;if(S>$.length?$=Vp($,S,"0"):S<$.length&&($=$.substring(0,S)+$.substring(S).replace(/0+$/,"")),m.indexOf(",")>0){const A=p.length%3,E=Math.floor(p.length/3);let P=A>0?p.substr(0,A)+(E>0?",":""):"";for(let V=0;V<E;V++)P+=p.substr(A+V*3,3)+(V<E-1?",":"");p=P}return $.length>0?p+"."+$:p}),c=d+c}}else c instanceof Date?c=es(c,l||o):c=ot(c);return i=parseInt((i||" ").substring(1),10),isNaN(i)||(c=Ps(String(c),Math.abs(i)," ",i<0)),c})}function Fp(e,t){const n=e.lastIndexOf(t);return n>=0&&n===e.length-t.length}function Oi(e){return typeof e!="string"||e.length===0}function yn(e){return typeof e!="string"||/^\s*$/.test(e)}function re(e,t){return Array.isArray(t)?t.join(e):Array.from(t).join(e)}function Ps(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 Jo(e,t,n){return Ps(e,t,n)}function Vp(e,t,n){return Ps(e,t,n,!0)}function Yo(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(Ko),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 Lp(e,...t){if(t.length===0)return e.trim();const n="["+Ko(t.join(""))+"]+";return e.replace(new RegExp("^"+n),"").replace(new RegExp(n+"$"),"")}function Bp(e,...t){return t.length===0?e.trimEnd():e.replace(new RegExp("["+Ko(t.join(""))+"]+$"),"")}function Tc(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 xr{constructor(t){this.value=t}toJSON(){return this.value}toString(){return String(this.value)}GetHashCode(){return Tn(this.value)}Equals(t){return t==null?!1:Se(this.value,t instanceof xr?t.value:t)}CompareTo(t){return t==null?1:Jt(this.value,t instanceof xr?t.value:t)}}function O(e){if(e==null)throw new Error("Option has no value");return e instanceof xr?e.value:e}function Xo(e){return e instanceof xr?e.value:e}function lt(e){return e==null||e instanceof xr?new xr(e):e}function Up(e){return e??void 0}function Qo(e){return e==null?[]:[O(e)]}function We(e,t){return e!=null?O(e):t}function Rc(e,t){return e!=null?O(e):t()}function Ge(e,t){return t!=null?lt(e(O(t))):void 0}function jp(e,t){return t!=null?e(O(t)):void 0}const Mc="Collection was empty.";function ea(e,t){return typeof e=="function"?new e(t):new Array(t)}function Pc(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 tr(e,t,n){const r=t.length|0,s=ea(n,r);for(let i=0;i<=r-1;i++)Rt(s,i,e(ye(i,t)));return s}function zp(e,t,n,r){if(t.length!==n.length)throw new Error("Arrays had different lengths");const s=ea(r,t.length);for(let i=0;i<=t.length-1;i++)Rt(s,i,e(ye(i,t),ye(i,n)));return s}function Hp(e,t){const n=ea(t,1);return Rt(n,0,e),n}function Wp(e){return e.slice().reverse()}function Gp(e,t){return t.find(e)}function qp(e,t,n){const r=[];for(let s=0;s<=t.length-1;s++){const i=e(ye(s,t));if(i!=null){const o=O(i);r.push(o)}}return Se(n,ie())?r:tr(s=>s,r,n)}function Vi(e,t,n){const r=e;return n.reduce(r,t)}function Kp(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 ta(e,t,n){return t==null}function ye(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 Rt(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 Dc(e,t,n){return t.reduceRight((r,s)=>e(s,r),n)}function Zp(e,t){let n=t.GetZero();for(let r=0;r<=e.length-1;r++)n=t.Add(n,ye(r,e));return n}class pt extends Y{constructor(t,n){super(),this.head=t,this.tail=n}toString(){return"["+re("; ",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(Se(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)+Tn(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=Jt(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 Yp(this)}[Symbol.iterator](){return Kr(ve(this))}"System.Collections.IEnumerable.GetEnumerator"(){return ve(this)}}class Jp{constructor(t){this.xs=t,this.it=this.xs,this.current=ie()}"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=ie()}Dispose(){}}function Yp(e){return new Jp(e)}function ze(){return new pt(ie(),void 0)}function Ds(e,t){return new pt(e,t)}function Mn(e){return e.tail==null}function Oc(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 nr(e){if(e.tail!=null)return e.head;throw new Error(Mc+"\\nParameter name: list")}function ct(e){const t=e.tail;if(t!=null)return O(t);throw new Error(Mc+"\\nParameter name: list")}function Ve(){return ze()}function ut(e,t){return Ds(e,t)}function ee(e){return Ds(e,ze())}function Z(e){return Mn(e)}function sn(e){return Oc(e)}function L(e){return nr(e)}function C(e){return ct(e)}function Cr(e){const t=Oc(e)|0,n=Fi(new Array(t),0,t,null);return((s,i)=>{e:for(;;){const o=s,a=i;if(!Mn(a)){Rt(n,o,nr(a)),s=o+1,i=ct(a);continue e}break}})(0,e),n}function bn(e,t,n){let r=t,s=n;for(;!Mn(s);)r=e(r,L(s)),s=ct(s);return r}function Li(e){return bn((t,n)=>Ds(n,t),ze(),e)}function Xp(e,t,n){return Dc(e,Cr(t),n)}function Qp(e,t,n){return((s,i,o)=>{e:for(;;){const a=s,l=i,c=o;if(Mn(c))return l;s=a+1,i=e(a,l,nr(c)),o=ct(c);continue e}})(0,t,n)}function Os(e,t){bn((n,r)=>{e(r)},void 0,t)}function Be(e,t){let n=t;for(let r=e.length-1;r>=0;r--)n=Ds(ye(r,e),n);return n}function y(e){return Be(e,ze())}function e0(e){let t,n;if(tn(e))return y(e);if(e instanceof pt)return e;{const r=ze();let s=r;const i=ve(e);try{for(;i["System.Collections.IEnumerator.MoveNext"]();){const l=i["System.Collections.Generic.IEnumerator`1.get_Current"]();s=(t=s,n=new pt(l,void 0),t.tail=n,n)}}finally{_e(i)}const o=s,a=ze();return o.tail=a,ct(r)}}function t0(e){const t=ze();let n=t;const r=o=>{n=bn((a,l)=>{const c=new pt(l,void 0);return a.tail=c,c},n,o)};if(tn(e))e.forEach(r);else if(e instanceof pt)Os(r,e);else{const o=ve(e);try{for(;o["System.Collections.IEnumerator.MoveNext"]();)r(o["System.Collections.Generic.IEnumerator`1.get_Current"]())}finally{_e(o)}}const s=n,i=ze();return s.tail=i,ct(t)}function Ye(e,t){return bn((n,r)=>Ds(r,n),t,Li(e))}function n0(e,t){let n,r;const s=ze();let i=s,o=t;for(;!Mn(o);){let c=e(nr(o));for(;!Mn(c);)i=(n=i,r=new pt(nr(c),void 0),n.tail=r,r),c=ct(c);o=ct(o)}const a=i,l=ze();return a.tail=l,ct(s)}function Fs(e,t){const n=ze(),r=Qp((i,o,a)=>{const l=new pt(e(i,a),void 0);return o.tail=l,l},n,t),s=ze();return r.tail=s,ct(n)}function St(e,t){const n=ze(),r=bn((i,o)=>{const a=new pt(e(o),void 0);return i.tail=a,a},n,t),s=ze();return r.tail=s,ct(n)}function r0(e){return Fs((t,n)=>[t,n],e)}function s0(e,t){return(r=>{e:for(;;){const s=r;if(Mn(s))return;{const i=e(nr(s));if(i==null){r=ct(s);continue e}else return i}}})(t)}function i0(e,t){return s0(n=>e(n)?lt(n):void 0,t)}function Fc(e,t){return((r,s)=>{e:for(;;){const i=r,o=s;if(Mn(o))return;if(e(nr(o)))return i;r=i+1,s=ct(o);continue e}})(0,t)}function o0(e,t){return((r,s)=>{e:for(;;){const i=r,o=s;if(Mn(o))return;if(i===e)return lt(nr(o));r=i+1,s=ct(o);continue e}})(0,t)}function Bi(e,t){const n=ze(),r=bn((i,o)=>{if(e(o)){const a=new pt(o,void 0);return i.tail=a,a}else return i},n,t),s=ze();return r.tail=s,ct(n)}function a0(e,t){const n=ze(),r=ze(),s=n,i=bn((l,c)=>{let d,u;const m=l[0],h=l[1];return e(c)?[(d=new pt(c,void 0),m.tail=d,d),h]:[m,(u=new pt(c,void 0),h.tail=u,u)]},[s,r],t),o=ze();i[0].tail=o;const a=ze();return i[1].tail=a,[ct(s),ct(r)]}function Vc(e,t){const n=ze(),r=bn((i,o)=>{const a=e(o);if(a==null)return i;{const l=new pt(O(a),void 0);return i.tail=l,l}},n,t),s=ze();return r.tail=s,ct(n)}function na(e,t,n){return Fc(r=>n.Equals(e,r),t)!=null}function Lc(e,t){return Fc(e,t)!=null}function l0(e,t){const n=Cr(t);return n.sort(e),y(n)}function c0(e,t,n){return l0((r,s)=>n.Compare(e(r),e(s)),t)}function u0(e,t){return y(tr(y,Kp(e,Cr(t))))}function d0(e){return new g(0,[e])}function Bc(e){return new g(1,[e])}class g extends B{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Ok","Error"]}}function Pn(e,t){return t.tag===0?d0(e(t.fields[0])):Bc(t.fields[0])}function f0(e,t){return t.tag===0?e(t.fields[0]):Bc(t.fields[0])}function gt(e){return e.tag===0}function h0(e){throw new Error(e)}const m0="Enumeration already finished.",p0="Enumeration has not started. Call MoveNext.",Uc="The input sequence has an insufficient number of elements.",g0="Reset is not supported on this enumerator.";function $0(){throw new Error(g0)}function ra(){throw new Error(p0)}function sa(){throw new Error(m0)}class w0{constructor(t){this.f=t}toString(){const t=this;let n=0,r="seq [";const s=ve(t);try{for(;n<4&&s["System.Collections.IEnumerator.MoveNext"]();)n>0&&(r=r+"; "),r=r+ot(s["System.Collections.Generic.IEnumerator`1.get_Current"]()),n=n+1|0;return n===4&&(r=r+"; ..."),r+"]"}finally{_e(s)}}GetEnumerator(){return this.f()}[Symbol.iterator](){return Kr(ve(this))}"System.Collections.IEnumerable.GetEnumerator"(){return this.f()}}function y0(e){return new w0(e)}class b0{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"(){$0()}Dispose(){this.dispose()}}function Ui(e,t,n){return new b0(e,t,n)}function _0(e){let t,n,r=!1,s=!1,i;const o=()=>{if(s=!0,n!=null){const a=O(n);try{_e(a)}finally{n=void 0}}if(t!=null){const a=O(t);try{_e(a)}finally{t=void 0}}};return Ui(()=>(r?s&&sa():ra(),i!=null?O(i):sa()),()=>{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{_e(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"](),ve(a)):(o(),l=!1)}else t=ve(e)}return O(l)}},()=>{s||o()})}function v0(e,t){return Ui(()=>t["System.Collections.Generic.IEnumerator`1.get_Current"](),()=>t["System.Collections.IEnumerator.MoveNext"](),()=>{try{_e(t)}finally{}})}function jc(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 Ui(()=>(r||ra(),s!=null?O(s):sa()),()=>{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 x0(e,t){let n,r=t;return Ui(()=>{if(n!=null){const s=O(n)[0];return O(n)[1],s}else return ra()},()=>(n=e(r),n!=null?(O(n)[0],r=O(n)[1],!0):!1),()=>{})}function C0(e,t){t==null&&h0(e)}function ts(e){return y0(e)}function Dn(e){return C0("source",e),ve(e)}function k(e){return ts(()=>ve(e()))}function ji(e){return ts(()=>_0(e))}function S0(e,t){return ts(()=>x0(e,t))}function He(){return k(()=>new Array(0))}function x(e){return k(()=>Hp(e))}function l2(e){return e}function ia(e){return e instanceof pt?Cr(e):Array.from(e)}function J(e){return tn(e)?y(e):e instanceof pt?e:e0(e)}function zc(e,t,n){return ts(()=>jc(e,t,n))}function Hc(e,t,n){return ts(()=>{let r=-1;return jc(e,s=>(r=r+1|0,t(r,s)),n)})}function R(e,t){return ji([e,t])}function ns(e,t){return zc(()=>Dn(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=>{_e(n)})}function A0(e,t,n){const r=Dn(t);try{const s=Dn(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{_e(s)}}finally{_e(r)}}function rs(e,t,n){const r=Dn(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{_e(r)}}function k0(e,t){return ns(n=>{if(e(n))return lt(n)},t)}function Vs(e,t,n){const r=Dn(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{_e(r)}}function Sr(e,t){Vs((n,r)=>{e(r)},void 0,t)}function Wc(e,t){Vs((n,r)=>(e(n,r),n+1|0),0,t)}function Ee(e,t){return zc(()=>Dn(t),n=>n["System.Collections.IEnumerator.MoveNext"]()?lt(e(n["System.Collections.Generic.IEnumerator`1.get_Current"]())):void 0,n=>{_e(n)})}function oa(e,t){return Hc(()=>Dn(t),(n,r)=>r["System.Collections.IEnumerator.MoveNext"]()?lt(e(n,r["System.Collections.Generic.IEnumerator`1.get_Current"]())):void 0,n=>{_e(n)})}function E0(e){return k(()=>Wp(ia(e)))}function I0(e,t){return ts(()=>{const n=Dn(t);try{for(let r=1;r<=e;r++)if(!n["System.Collections.IEnumerator.MoveNext"]())throw new Error(Uc+"\\nParameter name: source");return v0(()=>{},n)}catch(r){throw _e(n),r}})}function N0(e,t){return Hc(()=>Dn(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(Uc+"\\nParameter name: source")}else return},n=>{_e(n)})}function Gc(e,t){return k(()=>ji(Ee(e,t)))}class qc{constructor(t,n){this.k=t,this.v=n}}function zi(e,t){return new qc(e,t)}function $t(e){return e.k}function At(e){return e.v}class Xe extends qc{constructor(t,n,r,s,i){super(t,n),this.left=r,this.right=s,this.h=i|0}}function Hi(e,t,n,r,s){return new Xe(e,t,n,r,s)}function vt(e){return e.left}function xt(e){return e.right}function Ar(e){return e.h}function c2(){}function Kc(e,t){e:for(;;){const n=e,r=t;if(r!=null){const s=O(r);if(s instanceof Xe){const i=s;e=Kc(n+1,vt(i)),t=xt(i);continue e}else return n+1|0}else return n|0}}function T0(e){return Kc(0,e)}function on(e,t,n,r){let s,i,o;const a=e;if(a!=null){const u=O(a);o=u instanceof Xe?(s=u,Ar(s)):1}else o=0;let l;const c=r;if(c!=null){const u=O(c);l=u instanceof Xe?(i=u,Ar(i)):1}else l=0;const d=(o<l?l:o)|0;return d===0?zi(t,n):Hi(t,n,e,r,d+1)}function Zc(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 Xe?(s=w,Ar(s)):1}else m=0;let p;const $=r;if($!=null){const w=O($);p=w instanceof Xe?(i=w,Ar(i)):1}else p=0;if(p>m+2){const w=O(r);if(w instanceof Xe){const S=w;if(o=vt(S),(o!=null?(a=O(o),a instanceof Xe?(l=a,Ar(l)):1):0)>m+1){const A=O(vt(S));if(A instanceof Xe){const E=A;return on(on(e,t,n,vt(E)),$t(E),At(E),on(xt(E),$t(S),At(S),xt(S)))}else throw new Error("internal error: Map.rebalance")}else return on(on(e,t,n,vt(S)),$t(S),At(S),xt(S))}else throw new Error("internal error: Map.rebalance")}else if(m>p+2){const w=O(e);if(w instanceof Xe){const S=w;if(c=xt(S),(c!=null?(d=O(c),d instanceof Xe?(u=d,Ar(u)):1):0)>p+1){const A=O(xt(S));if(A instanceof Xe){const E=A;return on(on(vt(S),$t(S),At(S),vt(E)),$t(E),At(E),on(xt(E),t,n,r))}else throw new Error("internal error: Map.rebalance")}else return on(vt(S),$t(S),At(S),on(xt(S),t,n,r))}else throw new Error("internal error: Map.rebalance")}else return on(e,t,n,r)}function ss(e,t,n,r){if(r!=null){const s=O(r),i=e.Compare(t,$t(s))|0;if(s instanceof Xe){const o=s;return i<0?Zc(ss(e,t,n,vt(o)),$t(o),At(o),xt(o)):i===0?Hi(t,n,vt(o),xt(o),Ar(o)):Zc(vt(o),$t(o),At(o),ss(e,t,n,xt(o)))}else return i<0?Hi(t,n,void 0,r,2):i===0?zi(t,n):Hi(t,n,r,void 0,2)}else return zi(t,n)}function Jc(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(At(o));if(o instanceof Xe){const l=o;e=r,t=s,n=a<0?vt(l):xt(l);continue e}else return}else return}}function R0(e,t,n){const r=Jc(e,t,n);if(r==null)throw new Error;return O(r)}function M0(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 Xe){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 Yc(e,t){e:for(;;){const n=e,r=t;if(r!=null){const s=O(r);if(s instanceof Xe){const i=s;Yc(n,vt(i)),n($t(i),At(i)),e=n,t=xt(i);continue e}else n($t(s),At(s))}break}}function P0(e,t){Yc(e,t)}function D0(e){const t=(n,r)=>{e:for(;;){const s=n,i=r;if(s!=null){const o=O(s);if(o instanceof Xe){const a=o;n=vt(a),r=ut([$t(a),At(a)],t(xt(a),i));continue e}else return ut([$t(o),At(o)],i)}else return i}};return t(e,Ve())}function O0(e,t,n){let r=n;P0((s,i)=>{Rt(t,r,[s,i]),r=r+1|0},e)}function F0(e,t){return bn((n,r)=>ss(e,r[0],r[1],n),void 0,t)}function V0(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=ss(r,o[0],o[1],s),n=i;continue e}else return s}}function L0(e,t){let n=void 0;for(let r=0;r<=t.length-1;r++){const s=ye(r,t);n=ss(e,s[0],s[1],n)}return n}function aa(e,t){if(tn(t))return L0(e,t);if(t instanceof pt)return F0(e,t);{const n=ve(t);try{return V0(e,void 0,n)}finally{_e(n)}}}class B0 extends Y{constructor(t,n){super(),this.stack=t,this.started=n}}function Xc(e){e:for(;;){const t=e;if(Z(t))return Ve();{const n=C(t),r=L(t);if(r!=null){const s=O(r);if(s instanceof Xe){const i=s;e=Be([vt(i),zi($t(i),At(i)),xt(i)],n);continue e}else return t}else{e=n;continue e}}}}function Qc(e){return new B0(Xc(ee(e)),!1)}function U0(){throw new Error("enumeration not started")}function j0(){throw new Error("enumeration already finished")}function eu(e){if(e.started){const t=e.stack;if(Z(t))return j0();if(L(t)!=null){const n=O(L(t));if(n instanceof Xe)throw new Error("Please report error: Map iterator, unexpected stack for current");return[$t(n),At(n)]}else throw new Error("Please report error: Map iterator, unexpected stack for current")}else return U0()}function z0(e){if(e.started){const t=e.stack;if(Z(t))return!1;if(L(t)!=null){if(O(L(t))instanceof Xe)throw new Error("Please report error: Map iterator, unexpected stack for moveNext");return e.stack=Xc(C(t)),!Z(e.stack)}else throw new Error("Please report error: Map iterator, unexpected stack for moveNext")}else return e.started=!0,!Z(e.stack)}function tu(e){let t=Qc(e);return{"System.Collections.Generic.IEnumerator`1.get_Current"(){return eu(t)},"System.Collections.IEnumerator.get_Current"(){return eu(t)},"System.Collections.IEnumerator.MoveNext"(){return z0(t)},"System.Collections.IEnumerator.Reset"(){t=Qc(e)},Dispose(){}}}class Wi{constructor(t,n){this.comparer=t,this.tree=n}GetHashCode(){return K0(this)|0}Equals(t){const n=this;if(t instanceof Wi){const r=t,s=ve(n);try{const i=ve(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 Se(l[0],c[0])&&Se(l[1],c[1])?o():!1}else return!0;else return!1};return o()}finally{_e(i)}}finally{_e(s)}}else return!1}toString(){return"map ["+re("; ",Ee(n=>Nc("({0}, {1})",n[0],n[1]),this))+"]"}get[Symbol.toStringTag](){return"FSharpMap"}toJSON(){const t=this;return Array.from(t)}GetEnumerator(){return tu(this.tree)}[Symbol.iterator](){return Kr(ve(this))}"System.Collections.IEnumerable.GetEnumerator"(){return tu(this.tree)}CompareTo(t){const n=this;if(t instanceof Wi)return A0((s,i)=>{const o=n.comparer.Compare(s[0],i[0])|0;return(o!==0?o:Jt(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 ru(n,t[0])&&Se(nu(n,t[0]),t[1])}"System.Collections.Generic.ICollection`1.CopyToZ3B4C077E"(t,n){O0(this.tree,t,n)}"System.Collections.Generic.ICollection`1.get_IsReadOnly"(){return!0}"System.Collections.Generic.ICollection`1.get_Count"(){return la(this)|0}"System.Collections.Generic.IReadOnlyCollection`1.get_Count"(){return la(this)|0}get size(){return la(this)|0}clear(){throw new Error("Map cannot be mutated")}delete(t){throw new Error("Map cannot be mutated")}entries(){return Ee(n=>[n[0],n[1]],this)}get(t){return nu(this,t)}has(t){return ru(this,t)}keys(){return Ee(n=>n[0],this)}set(t,n){throw new Error("Map cannot be mutated")}values(){return Ee(n=>n[1],this)}forEach(t,n){const r=this;Sr(s=>{t(s[1],s[0],r)},r)}}function Ls(e,t){return new Wi(e,t)}function H0(e){return Ls(e,void 0)}function W0(e,t,n){return Ls(e.comparer,ss(e.comparer,t,n,e.tree))}function nu(e,t){return R0(e.comparer,t,e.tree)}function la(e){return T0(e.tree)}function ru(e,t){return M0(e.comparer,t,e.tree)}function G0(e,t){return Jc(e.comparer,t,e.tree)}function q0(e){return D0(e.tree)}function K0(e){const t=(s,i)=>(s<<1)+i+631;let n=0;const r=ve(e);try{for(;r["System.Collections.IEnumerator.MoveNext"]();){const s=r["System.Collections.Generic.IEnumerator`1.get_Current"]();n=t(n,Tn(s[0]))|0,n=t(n,Tn(s[1]))|0}}finally{_e(r)}return n|0}function su(e,t,n){return W0(n,e,t)}function Bs(e,t){return G0(t,e)}function iu(e,t){return Ls(t,aa(t,e))}function Z0(e,t){return Ls(t,aa(t,e))}function J0(e,t){return Ls(t,aa(t,e))}function ou(e){return q0(e)}function Us(e){return H0(e)}class Y0 extends B{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["Name"]}}function au(e){return new Y0(e)}function ca(e){return e.fields[0]}class X0 extends B{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["Website"]}}class Q0 extends B{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["FirstName"]}}class eg extends B{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["LastName"]}}class tg extends B{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["Email"]}}class ng extends B{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["MobilePhone"]}}class rg extends B{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["ExternalId"]}}let sg=class extends Y{constructor(t,n,r,s){super(),this.FirstName=t,this.LastName=n,this.Email=r,this.MobilePhone=s}};class ig extends B{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["Notes"]}}class og extends B{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["PartnerId"]}}function Mt(e){return e.fields[0]}function Le(e){return new og(e)}function Gi(e){return Mt(e)}class ag extends B{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["AccountId"]}}function an(e){return e.fields[0]}function Ht(e){return new ag(e)}function qi(e){return an(e)}class lg extends B{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["BusinessName"]}}class cg extends B{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["BusinessNumber"]}}class ug extends B{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["Address1"]}}class dg extends B{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["Address2"]}}class fg extends B{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["City"]}}class hg extends B{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["Postcode"]}}let mg=class extends B{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["State"]}};class pg extends B{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["SalesforceParentRecordId"]}}class gg extends B{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["ExternalApi","Admin"]}}new gg(0,[]);const kr={None:0,LowerFirst:1,SnakeCase:2,SnakeCaseAllCaps:3,KebabCase:4};function ua(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 $g(e,t){switch(t){case kr.LowerFirst:return e.charAt(0).toLowerCase()+e.slice(1);case kr.SnakeCase:return ua(e,"_");case kr.SnakeCaseAllCaps:return ua(e,"_").toUpperCase();case kr.KebabCase:return ua(e,"-");case kr.None:default:return e}}function rr(e,t=kr.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=$g(o,a),n[o]=l}for(let o of e){let a=kr.None;if(o==null&&s(o),o instanceof B){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 da(e,t,n){return e.has(t)?(n.contents=e.get(t),!0):!1}function wg(e,t){return t.has(e)?!1:(t.add(e),!0)}function Er(e,t){if(e.has(t))return e.get(t);throw new Error(`The given key '${t}' was not present in the dictionary.`)}class yg{constructor(t,n){const r=new at(ie());this.comparer=n,r.contents=this,this.hashMap=new Map([]),this["init@9"]=1;const s=ve(t);try{for(;s["System.Collections.IEnumerator.MoveNext"]();){const i=s["System.Collections.Generic.IEnumerator`1.get_Current"]();fa(r.contents,i[0],i[1])}}finally{_e(s)}}get[Symbol.toStringTag](){return"Dictionary"}toJSON(){const t=this;return Array.from(t)}"System.Collections.IEnumerable.GetEnumerator"(){return ve(this)}GetEnumerator(){return ve(ji(this.hashMap.values()))}[Symbol.iterator](){return Kr(ve(this))}"System.Collections.Generic.ICollection`1.Add2B595"(t){fa(this,t[0],t[1])}"System.Collections.Generic.ICollection`1.Clear"(){lu(this)}"System.Collections.Generic.ICollection`1.Contains2B595"(t){const r=Ki(this,t[0]);let s;switch(r!=null&&Se(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){Wc((s,i)=>{Rt(t,n+s,i)},this)}"System.Collections.Generic.ICollection`1.get_Count"(){return cu(this)|0}"System.Collections.Generic.ICollection`1.get_IsReadOnly"(){return!1}"System.Collections.Generic.ICollection`1.Remove2B595"(t){const n=this,r=Ki(n,t[0]);return r!=null?(Se(O(r)[1],t[1])&&ha(n,t[0]),!0):!1}"System.Collections.Generic.IDictionary`2.Add5BDDA1"(t,n){fa(this,t,n)}"System.Collections.Generic.IDictionary`2.ContainsKey2B595"(t){return fu(this,t)}"System.Collections.Generic.IDictionary`2.get_Item2B595"(t){return uu(this,t)}"System.Collections.Generic.IDictionary`2.set_Item5BDDA1"(t,n){du(this,t,n)}"System.Collections.Generic.IDictionary`2.get_Keys"(){const t=this;return ia(k(()=>Ee(n=>n[0],t)))}"System.Collections.Generic.IDictionary`2.Remove2B595"(t){return ha(this,t)}"System.Collections.Generic.IDictionary`2.TryGetValue6DC89625"(t,n){const s=Ki(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 ia(k(()=>Ee(n=>n[1],t)))}get size(){return cu(this)|0}clear(){lu(this)}delete(t){return ha(this,t)}entries(){return Ee(n=>[n[0],n[1]],this)}get(t){return uu(this,t)}has(t){return fu(this,t)}keys(){return Ee(n=>n[0],this)}set(t,n){const r=this;return du(r,t,n),r}values(){return Ee(n=>n[1],this)}forEach(t,n){const r=this;Sr(s=>{t(s[1],s[0],r)},r)}}function js(e,t){const n=e.comparer.GetHashCode(t)|0;let r,s=ie();return r=[da(e.hashMap,n,new at(()=>s,i=>{s=i})),s],r[0]?[!0,n,r[1].findIndex(i=>e.comparer.Equals(t,i[0]))]:[!1,n,-1]}function Ki(e,t){const n=js(e,t);let r;switch(n[0]&&n[2]>-1?r=0:r=1,r){case 0:return Er(e.hashMap,n[1])[n[2]];default:return}}function lu(e){e.hashMap.clear()}function cu(e){let t=0,n=ve(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{_e(n)}return t|0}function uu(e,t){const n=Ki(e,t);if(n!=null)return O(n)[1];throw new Error("The item was not found in collection")}function du(e,t,n){const r=js(e,t);r[0]?r[2]>-1?Er(e.hashMap,r[1])[r[2]]=[t,n]:Er(e.hashMap,r[1]).push([t,n]):e.hashMap.set(r[1],[[t,n]])}function fa(e,t,n){const r=js(e,t);if(r[0]){if(r[2]>-1)throw new Error(Nc("An item with the same key has already been added. Key: {0}",t));Er(e.hashMap,r[1]).push([t,n])}else e.hashMap.set(r[1],[[t,n]])}function fu(e,t){const n=js(e,t);let r;switch(n[0]&&n[2]>-1?r=0:r=1,r){case 0:return!0;default:return!1}}function ha(e,t){const n=js(e,t);let r;switch(n[0]&&n[2]>-1?r=0:r=1,r){case 0:return Er(e.hashMap,n[1]).splice(n[2],1),!0;default:return!1}}function bg(e){return new hu(0,[e])}function _g(e){return new hu(1,[e])}class hu extends B{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Choice1Of2","Choice2Of2"]}}function vg(e){return bg(e)}function xg(e){return _g(e)}const Cg=/^[\(\{]{0,2}[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}[\)\}]{0,2}$/,mu=/^([0-9a-f]{8})([0-9a-f]{4})([0-9a-f]{4})([0-9a-f]{4})([0-9a-f]{12})$/,Sg=/^\{0x[0-9a-f]{8},(0x[0-9a-f]{4},){2}\{(0x[0-9a-f]{2},){7}0x[0-9a-f]{2}\}\}$/;function Ag(e){function t(r){return r.replace(mu,"$1-$2-$3-$4-$5")}const n=e.trim().toLowerCase();if(Cg.test(n))return Lp(n,"{","}","(",")");if(mu.test(n))return t(n);if(Sg.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 kg(e,t){try{return t.contents=Ag(e),!0}catch{return!1}}class pu extends B{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["StreamId"]}}function is(e){return e.fields[0]}var ma;(function(e){e[e.AllowHexSpecifier=512]="AllowHexSpecifier"})(ma||(ma={}));function Eg(e,t){const[,n,r,s]=e;return{sign:n||"",prefix:r||"",digits:s,radix:t}}function gu(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 Ig(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 Ng(e,t){if(t&ma.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 Tg(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||Ng(i,t),!Ig(n).test(o))return Eg(s,n)}return null}function Rg(e,t,n,r,s){const i=Tg(e,t,s);if(i!=null){let o=Number.parseInt(i.sign+i.digits,i.radix);if(!Number.isNaN(o)){const[a,l]=gu(!0,r);!n&&i.radix!==10&&o>=a&&o<=l&&(o=o<<32-r>>32-r);const[c,d]=gu(n,r);if(o>=c&&o<=d)return o}}throw new Error(`The input string ${e} was not in a correct format.`)}function os(e,t,n,r,s){try{return s.contents=Rg(e,t,n,r),!0}catch{return!1}}const Mg="#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ƒ£ē︳𐀡%𐀡",Pg="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 Dg(){const t=[...Mg].map(i=>(i.codePointAt(0)??0)-35),n=[...Pg].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 Og=256,Fg=Dg();function Vg(e,t){if(t<e.length)return e.charCodeAt(t);throw new Error("Index out of range.")}const Lg=e=>Ug(e,0);function Bg(e,t){const n=Vg(e,t);return Fg(n)}function Ug(e,t){return(1<<Bg(e,t)&Og)!==0}function jg(e,t){const n=Mp(vc(e),t);if(n!=null)return C(J(k(()=>Ee(r=>r||"",n))))}function zg(e){let t;const n=jg(".*?@(.*)",e);switch(n!=null?Z(n)?t=1:Z(C(n))?t=0:t=1:t=1,t){case 0:return e;default:return}}function Hg(e,t){return t.length<=e?new g(0,[t]):new g(1,[`Value exceeds maximum length of ${e}`])}function Pt(e,t){return Oi(t)?new g(1,[rn(Xt("%s cannot be null or empty"))(e)]):new g(0,[t])}function Wg(e){const t=zg(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 Gg(e){return~~e.charCodeAt(0)-48}function qg(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=tr(Gg,(t=e.split(""),t.filter(Lg)),Int32Array);return s.length===11?(Rt(s,0,ye(0,s)-1|0),Zp(zp((i,o)=>i*o,s,r,Int32Array),{GetZero:()=>0,Add:(i,o)=>i+o})%89===0?new g(0,[e]):n):n}function pa(e){const t=Pt("Name",e);return t.tag===1?new g(1,[t.fields[0]]):new g(0,[au(t.fields[0])])}function Zi(e){return ca(e)}function $u(e){const t=Pt("Website",e);return t.tag===1?new g(1,[t.fields[0]]):new g(0,[new X0(t.fields[0])])}function wu(e){return e.fields[0]}function yu(e){const t=Pt("FirstName",e);return t.tag===1?new g(1,[t.fields[0]]):new g(0,[new Q0(t.fields[0])])}function bu(e){return e.fields[0]}function _u(e){const t=Pt("LastName",e);return t.tag===1?new g(1,[t.fields[0]]):new g(0,[new eg(t.fields[0])])}function vu(e){return e.fields[0]}function xu(e){let t;const n=Pt("Email",e);return t=n.tag===1?new g(1,[n.fields[0]]):Wg(n.fields[0]),t.tag===1?new g(1,[t.fields[0]]):new g(0,[new tg(t.fields[0])])}function Cu(e){const t=Pt("MobilePhone",e);return t.tag===1?new g(1,[t.fields[0]]):new g(0,[new ng(t.fields[0])])}function Su(e){return e.fields[0]}class Au extends Y{constructor(t,n,r,s){super(),this.FirstName=t,this.LastName=n,this.Email=r,this.MobilePhone=s}}function ga(){return Je("AccountRegistry.Shared.Primitives.ContactDetails",[],Au,()=>[["FirstName",H],["LastName",H],["Email",H],["MobilePhone",H]])}function Kg(e){const t=yu(e.FirstName);if(t.tag===1)return new g(1,[t.fields[0]]);{const n=_u(e.LastName);if(n.tag===1)return new g(1,[n.fields[0]]);{const r=xu(e.Email);if(r.tag===1)return new g(1,[r.fields[0]]);{const s=Cu(e.MobilePhone);return s.tag===1?new g(1,[s.fields[0]]):new g(0,[new sg(t.fields[0],n.fields[0],r.fields[0],s.fields[0])])}}}}function Zg(e){const t=e;if(t!=null)return new ig(t)}function Jg(e){if(e!=null)return e.fields[0]}const Yg=e=>{let t;const n=Pt("ExternalId",e);return t=n.tag===1?new g(1,[n.fields[0]]):Hg(60,n.fields[0]),t.tag===1?new g(1,[t.fields[0]]):new g(0,[new rg(t.fields[0])])};function dt(e){return Mt(e)}function _n(e){return an(e)}function ku(e){const t=Pt("BusinessName",e);return t.tag===1?new g(1,[t.fields[0]]):new g(0,[new lg(t.fields[0])])}function Eu(e){let t;const n=Pt("BusinessNumber",e);return t=n.tag===1?new g(1,[n.fields[0]]):qg(n.fields[0]),t.tag===1?new g(1,[t.fields[0]]):new g(0,[new cg(t.fields[0])])}function Xg(e){const t=Pt("Address1",e);return t.tag===1?new g(1,[t.fields[0]]):new g(0,[new ug(t.fields[0])])}function Qg(e){const t=e;if(t!=null)return new dg(t)}function e$(e){const t=Pt("City",e);return t.tag===1?new g(1,[t.fields[0]]):new g(0,[new fg(t.fields[0])])}function t$(e){const t=Pt("Postcode",e);return t.tag===1?new g(1,[t.fields[0]]):new g(0,[new hg(t.fields[0])])}function n$(e){const t=Pt("State",e);return t.tag===1?new g(1,[t.fields[0]]):new g(0,[new mg(t.fields[0])])}class Iu extends Y{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 r$(){return Je("AccountRegistry.Shared.Primitives.LegalEntity",[],Iu,()=>[["BusinessName",H],["BusinessNumber",H],["Address1",H],["Address2",$e(H)],["City",H],["Postcode",H],["State",$e(H)],["Phone",H],["CountryCode",$e(H)]])}function s$(e){const t=Pt("SalesforceParentRecordId",e);return t.tag===1?new g(1,[t.fields[0]]):new g(0,[new pg(t.fields[0])])}class Nu extends Y{constructor(t,n){super(),this.SalesforceParentRecordId=t,this.SalesforceRecordId=n}}function i$(){return Je("AccountRegistry.Shared.Primitives.SalesforceInfo",[],Nu,()=>[["SalesforceParentRecordId",H],["SalesforceRecordId",$e(H)]])}class Tu extends Y{constructor(t,n){super(),this.Code=t,this.Name=n}}function o$(){return Je("AccountRegistry.Shared.Primitives.AnzsicClassifier",[],Tu,()=>[["Code",H],["Name",H]])}class $a extends B{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Api","Direct"]}}function Ji(){return zo("AccountRegistry.Shared.Primitives.AccountProvisioningModeDto",[],$a,()=>[[],[]])}function Ru(e){return e.tag===1?"Direct":"API"}let a$=class extends Y{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 l$(){return Je("AccountRegistry.Shared.AdminApi.Partner",[],a$,()=>[["StreamId",H],["Name",H],["Website",H],["ContactDetails",$e(ga())],["Notes",$e(H)],["AccountProvisioningMode",Ji()]])}class Mu extends Y{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 c$(){return Je("AccountRegistry.Shared.AdminApi.Account",[],Mu,()=>[["StreamId",H],["PartnerId",H],["Name",H],["Website",H],["ContactDetails",$e(ga())],["Notes",$e(H)],["LegalEntity",$e(r$())],["ExternalId",$e(H)],["ChannelId",$e(H)],["ProvisioningMode",Ji()]])}class u$ extends Y{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 d$(){return Je("AccountRegistry.Shared.AdminApi.AccountLookupItem",[],u$,()=>[["AccountId",H],["Name",H],["Contact",$e(H)],["ContactMobilePhone",$e(H)],["Website",H],["BusinessName",$e(H)],["BusinessNumber",$e(H)],["ExternalId",$e(H)],["ChannelId",$e(H)],["ProvisioningMode",Ji()]])}class Pu extends Y{constructor(t,n){super(),this.Accounts=t,this.Token=n}}function f$(){return Je("AccountRegistry.Shared.AdminApi.AccountLookup",[],Pu,()=>[["Accounts",Ho(d$())],["Token",$e(H)]])}class h$ extends Y{constructor(t,n){super(),this.PartnerId=t,this.AccountId=n}}function m$(){return Je("AccountRegistry.Shared.AdminApi.FindAccountResponse",[],h$,()=>[["PartnerId",H],["AccountId",H]])}class p$ extends Y{constructor(t,n){super(),this.ClassCode=t,this.ClassTitle=n}}function g$(){return Je("AccountRegistry.Shared.AdminApi.AnzsicClass",[],p$,()=>[["ClassCode",H],["ClassTitle",H]])}class $$ extends Y{constructor(t,n,r){super(),this.GroupCode=t,this.GroupTitle=n,this.Classes=r}}function w$(){return Je("AccountRegistry.Shared.AdminApi.AnzsicGroup",[],$$,()=>[["GroupCode",H],["GroupTitle",H],["Classes",ic(g$())]])}class y$ extends B{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Success","TooManyResults"]}}function b$(){return zo("AccountRegistry.Shared.AdminApi.AnzsicSearchResult",[],y$,()=>[[["Item",ic(w$())]],[]])}class Du extends Y{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 _$(){return Je("AccountRegistry.Shared.AdminApi.Write.LegalEntityV2",[],Du,()=>[["BusinessName",H],["BusinessNumber",H],["Address1",H],["Address2",$e(H)],["City",H],["Postcode",H],["State",$e(H)],["Phone",H],["CountryCode",H]])}class Ou extends Y{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 v$(){return Je("AccountRegistry.Shared.AdminApi.Write.AccountPost",[],Ou,()=>[["Name",H],["Website",H],["ContactDetails",ga()],["Notes",$e(H)],["LegalEntity",$e(_$())],["ExternalId",$e(H)],["ChannelId",$e(H)],["SalesforceInfo",$e(i$())],["AnzsicClassifier",$e(o$())]])}class x$ extends Y{constructor(t){super(),this.Id=t}}function C$(){return Je("AccountRegistry.Shared.AdminApi.Write.AccountPostResponse",[],x$,()=>[["Id",H]])}class Fu extends Y{constructor(t,n,r,s){super(),this.Name=t,this.ExternalId=n,this.BusinessName=r,this.BusinessNumber=s}}function S$(){return Je("AccountRegistry.Shared.AdminApi.Write.PatchAccountDto",[],Fu,()=>[["Name",$e(H)],["ExternalId",$e(H)],["BusinessName",$e(H)],["BusinessNumber",$e(H)]])}class Vu extends Y{constructor(t){super(),this.ProvisioningMode=t}}function A$(){return Je("AccountRegistry.Shared.AdminApi.Write.UpdateAccountProvisioningModeDto",[],Vu,()=>[["ProvisioningMode",Ji()]])}class Lu extends Y{constructor(t,n,r){super(),this.Issuer=t,this.OpenIdConfigUrl=n,this.RequiredClaims=r}}function Bu(){return Je("AccountRegistry.Shared.AdminApi.Write.AdvancedSecurityConfigurationDataDto",[],Lu,()=>[["Issuer",H],["OpenIdConfigUrl",$e(H)],["RequiredClaims",Ti("Microsoft.FSharp.Collections.FSharpMap`2",[H,H])]])}class wa extends Y{constructor(t){super(),this.Configuration=t}}function Uu(){return Je("AccountRegistry.Shared.AdminApi.Write.AdvancedSecurityConfigurationRequest",[],wa,()=>[["Configuration",$e(Bu())]])}class k$ extends Y{constructor(t){super(),this.Configuration=t}}function ya(){return Je("AccountRegistry.Shared.AdminApi.Write.AdvancedSecurityConfigurationResponse",[],k$,()=>[["Configuration",$e(Bu())]])}var zs,ae,ju,Ir,zu,Hu,ba,_a,va,xa,Wu,Hs={},Gu=[],E$=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Yi=Array.isArray;function On(e,t){for(var n in t)e[n]=t[n];return e}function qu(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?zs.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 Ws(e,o,r,s,null)}function Ws(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??++ju,__i:-1,__u:0};return s==null&&ae.vnode!=null&&ae.vnode(i),i}function Ca(){return{current:null}}function be(e){return e.children}function ln(e,t){this.props=e,this.context=t}function Nr(e,t){if(t==null)return e.__?Nr(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"?Nr(e):null}function Ku(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 Ku(e)}}function Sa(e){(!e.__d&&(e.__d=!0)&&Ir.push(e)&&!Xi.__r++||zu!==ae.debounceRendering)&&((zu=ae.debounceRendering)||Hu)(Xi)}function Xi(){var e,t,n,r,s,i,o,a;for(Ir.sort(ba);e=Ir.shift();)e.__d&&(t=Ir.length,r=void 0,i=(s=(n=e).__v).__e,o=[],a=[],n.__P&&((r=On({},s)).__v=s.__v+1,ae.vnode&&ae.vnode(r),Aa(n.__P,r,s,n.__n,n.__P.namespaceURI,32&s.__u?[i]:null,o,i??Nr(s),!!(32&s.__u),a),r.__v=s.__v,r.__.__k[r.__i]=r,Qu(o,r,a),r.__e!=i&&Ku(r)),Ir.length>t&&Ir.sort(ba));Xi.__r=0}function Zu(e,t,n,r,s,i,o,a,l,c,d){var u,m,h,p,$,w=r&&r.__k||Gu,S=t.length;for(n.__d=l,I$(n,t,w),l=n.__d,u=0;u<S;u++)(h=n.__k[u])!=null&&typeof h!="boolean"&&typeof h!="function"&&(m=h.__i===-1?Hs:w[h.__i]||Hs,h.__i=u,Aa(e,h,m,s,i,o,a,l,c,d),p=h.__e,h.ref&&m.ref!=h.ref&&(m.ref&&ka(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=Nr(m)),l=Ju(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 I$(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?Ws(null,s,null,null,null):Yi(s)?Ws(be,{children:s},null,null,null):s.constructor===void 0&&s.__b>0?Ws(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):s)!=null?(s.__=e,s.__b=e.__b+1,a=N$(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=Nr(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=Nr(i)),Ea(i,i))}function Ju(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=Ju(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 Fn(e,t){return t=t||[],e==null||typeof e=="boolean"||(Yi(e)?e.some(function(n){Fn(n,t)}):t.push(e)),t}function N$(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 Yu(e,t,n){t[0]==="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||E$.test(t)?n:n+"px"}function Qi(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||Yu(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||Yu(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=_a,e.addEventListener(t,i?xa:va,i)):e.removeEventListener(t,i?xa:va,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 Xu(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t.t==null)t.t=_a++;else if(t.t<n.u)return;return n(ae.event?ae.event(t):t)}}}function Aa(e,t,n,r,s,i,o,a,l,c){var d,u,m,h,p,$,w,S,A,E,P,V,ne,we,Ae,he=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(l=!!(32&n.__u),i=[a=t.__e=n.__e]),(d=ae.__b)&&d(t);e:if(typeof he=="function")try{if(S=t.props,A=(d=he.contextType)&&r[d.__c],E=d?A?A.props.value:d.__:r,n.__c?w=(u=t.__c=n.__c).__=u.__E:("prototype"in he&&he.prototype.render?t.__c=u=new he(S,E):(t.__c=u=new ln(S,E),u.constructor=he,u.render=R$),A&&A.sub(u),u.props=S,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),he.getDerivedStateFromProps!=null&&(u.__s==u.state&&(u.__s=On({},u.__s)),On(u.__s,he.getDerivedStateFromProps(S,u.__s))),h=u.props,p=u.state,u.__v=t,m)he.getDerivedStateFromProps==null&&u.componentWillMount!=null&&u.componentWillMount(),u.componentDidMount!=null&&u.__h.push(u.componentDidMount);else{if(he.getDerivedStateFromProps==null&&S!==h&&u.componentWillReceiveProps!=null&&u.componentWillReceiveProps(S,E),!u.__e&&(u.shouldComponentUpdate!=null&&u.shouldComponentUpdate(S,u.__s,E)===!1||t.__v===n.__v)){for(t.__v!==n.__v&&(u.props=S,u.state=u.__s,u.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function(te){te&&(te.__=t)}),P=0;P<u._sb.length;P++)u.__h.push(u._sb[P]);u._sb=[],u.__h.length&&o.push(u);break e}u.componentWillUpdate!=null&&u.componentWillUpdate(S,u.__s,E),u.componentDidUpdate!=null&&u.__h.push(function(){u.componentDidUpdate(h,p,$)})}if(u.context=E,u.props=S,u.__P=e,u.__e=!1,V=ae.__r,ne=0,"prototype"in he&&he.prototype.render){for(u.state=u.__s,u.__d=!1,V&&V(t),d=u.render(u.props,u.state,u.context),we=0;we<u._sb.length;we++)u.__h.push(u._sb[we]);u._sb=[]}else do u.__d=!1,V&&V(t),d=u.render(u.props,u.state,u.context),u.state=u.__s;while(u.__d&&++ne<25);u.state=u.__s,u.getChildContext!=null&&(r=On(On({},r),u.getChildContext())),m||u.getSnapshotBeforeUpdate==null||($=u.getSnapshotBeforeUpdate(h,p)),Zu(e,Yi(Ae=d!=null&&d.type===be&&d.key==null?d.props.children:d)?Ae:[Ae],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(te){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),ae.__e(te,t,n)}else i==null&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=T$(n.__e,t,n,r,s,i,o,l,c);(d=ae.diffed)&&d(t)}function Qu(e,t,n){t.__d=void 0;for(var r=0;r<n.length;r++)ka(n[r],n[++r],n[++r]);ae.__c&&ae.__c(t,e),e.some(function(s){try{e=s.__h,s.__h=[],e.some(function(i){i.call(s)})}catch(i){ae.__e(i,s.__v)}})}function T$(e,t,n,r,s,i,o,a,l){var c,d,u,m,h,p,$,w=n.props,S=t.props,A=t.type;if(A==="svg"?s="http://www.w3.org/2000/svg":A==="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==!!A&&(A?h.localName===A:h.nodeType===3)){e=h,i[c]=null;break}}if(e==null){if(A===null)return document.createTextNode(S);e=document.createElementNS(s,A,S.is&&S),i=null,a=!1}if(A===null)w===S||a&&e.data===S||(e.data=S);else{if(i=i&&zs.call(e.childNodes),w=n.props||Hs,!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 S)){if(c=="value"&&"defaultValue"in S||c=="checked"&&"defaultChecked"in S)continue;Qi(e,c,null,h,s)}}for(c in S)h=S[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||Qi(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=""),Zu(e,Yi(m)?m:[m],t,n,r,A==="foreignObject"?"http://www.w3.org/1999/xhtml":s,i,o,i?i[0]:n.__k&&Nr(n,0),a,l),i!=null)for(c=i.length;c--;)i[c]!=null&&qu(i[c]);a||(c="value",p!==void 0&&(p!==e[c]||A==="progress"&&!p||A==="option"&&p!==w[c])&&Qi(e,c,p,w[c],s),c="checked",$!==void 0&&$!==e[c]&&Qi(e,c,$,w[c],s))}return e}function ka(e,t,n){try{typeof e=="function"?e(t):e.current=t}catch(r){ae.__e(r,n)}}function Ea(e,t,n){var r,s;if(ae.unmount&&ae.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||ka(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(i){ae.__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||qu(e.__e),e.__c=e.__=e.__e=e.__d=void 0}function R$(e,t,n){return this.constructor(e,n)}function sr(e,t,n){var r,s,i,o;ae.__&&ae.__(e,t),s=(r=typeof n=="function")?null:n&&n.__k||t.__k,i=[],o=[],Aa(t,e=(!r&&n||t).__k=f(be,null,[e]),s||Hs,Hs,t.namespaceURI,!r&&n?[n]:s?null:t.firstChild?zs.call(t.childNodes):null,i,!r&&n?n:s?s.__e:t.firstChild,r,o),Qu(i,e,o)}function Ia(e,t){sr(e,t,Ia)}function Na(e,t,n){var r,s,i,o,a=On({},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?zs.call(arguments,2):n),Ws(e.type,a,r||e.key,s||e.ref,null)}function ir(e,t){var n={__c:t="__cC"+Wu++,__: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,Sa(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}zs=Gu.slice,ae={__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}},ju=0,ln.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=On({},this.state),typeof e=="function"&&(e=e(On({},n),this.props)),e&&On(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),Sa(this))},ln.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Sa(this))},ln.prototype.render=be,Ir=[],Hu=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,ba=function(e,t){return e.__v.__b-t.__v.__b},Xi.__r=0,_a=0,va=Xu(!1),xa=Xu(!0),Wu=0;var Vn,Ie,Ta,ed,as=0,td=[],eo=[],Ue=ae,nd=Ue.__b,rd=Ue.__r,sd=Ue.diffed,id=Ue.__c,od=Ue.unmount,ad=Ue.__;function Tr(e,t){Ue.__h&&Ue.__h(Ie,e,as||t),as=0;var n=Ie.__H||(Ie.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:eo}),n.__[e]}function et(e){return as=1,ls(cd,e)}function ls(e,t,n){var r=Tr(Vn++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):cd(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=Ie,!Ie.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))};Ie.u=!0;var i=Ie.shouldComponentUpdate,o=Ie.componentWillUpdate;Ie.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)},Ie.shouldComponentUpdate=s}return r.__N||r.__}function Pe(e,t){var n=Tr(Vn++,3);!Ue.__s&&Oa(n.__H,t)&&(n.__=e,n.i=t,Ie.__H.__h.push(n))}function Ln(e,t){var n=Tr(Vn++,4);!Ue.__s&&Oa(n.__H,t)&&(n.__=e,n.i=t,Ie.__h.push(n))}function ge(e){return as=5,wt(function(){return{current:e}},[])}function Ra(e,t,n){as=6,Ln(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 wt(e,t){var n=Tr(Vn++,7);return Oa(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function or(e,t){return as=8,wt(function(){return e},t)}function vn(e){var t=Ie.context[e.__c],n=Tr(Vn++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(Ie)),t.props.value):e.__}function Ma(e,t){Ue.useDebugValue&&Ue.useDebugValue(t?t(e):e)}function M$(e){var t=Tr(Vn++,10),n=et();return t.__=e,Ie.componentDidCatch||(Ie.componentDidCatch=function(r,s){t.__&&t.__(r,s),n[1](r)}),[n[0],function(){n[1](void 0)}]}function Pa(){var e=Tr(Vn++,11);if(!e.__){for(var t=Ie.__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 P$(){for(var e;e=td.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(to),e.__H.__h.forEach(Da),e.__H.__h=[]}catch(t){e.__H.__h=[],Ue.__e(t,e.__v)}}Ue.__b=function(e){Ie=null,nd&&nd(e)},Ue.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),ad&&ad(e,t)},Ue.__r=function(e){rd&&rd(e),Vn=0;var t=(Ie=e.__c).__H;t&&(Ta===Ie?(t.__h=[],Ie.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=eo,n.__N=n.i=void 0})):(t.__h.forEach(to),t.__h.forEach(Da),t.__h=[],Vn=0)),Ta=Ie},Ue.diffed=function(e){sd&&sd(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(td.push(t)!==1&&ed===Ue.requestAnimationFrame||((ed=Ue.requestAnimationFrame)||D$)(P$)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==eo&&(n.__=n.__V),n.i=void 0,n.__V=eo})),Ta=Ie=null},Ue.__c=function(e,t){t.some(function(n){try{n.__h.forEach(to),n.__h=n.__h.filter(function(r){return!r.__||Da(r)})}catch(r){t.some(function(s){s.__h&&(s.__h=[])}),t=[],Ue.__e(r,n.__v)}}),id&&id(e,t)},Ue.unmount=function(e){od&&od(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{to(r)}catch(s){t=s}}),n.__H=void 0,t&&Ue.__e(t,n.__v))};var ld=typeof requestAnimationFrame=="function";function D$(e){var t,n=function(){clearTimeout(r),ld&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);ld&&(t=requestAnimationFrame(n))}function to(e){var t=Ie,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),Ie=t}function Da(e){var t=Ie;e.__c=e.__(),Ie=t}function Oa(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function cd(e,t){return typeof t=="function"?t(e):t}function ud(e,t){for(var n in t)e[n]=t[n];return e}function Fa(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 no(e,t){this.props=e,this.context=t}function dd(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:Fa(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}(no.prototype=new ln).isPureReactComponent=!0,no.prototype.shouldComponentUpdate=function(e,t){return Fa(this.props,e)||Fa(this.state,t)};var fd=ae.__b;ae.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),fd&&fd(e)};var O$=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function ar(e){function t(n){var r=ud({},n);return delete r.ref,e(r,n.ref||null)}return t.$$typeof=O$,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var hd=function(e,t){return e==null?null:Fn(Fn(e).map(t))},md={map:hd,forEach:hd,count:function(e){return e?Fn(e).length:0},only:function(e){var t=Fn(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:Fn},F$=ae.__e;ae.__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)}F$(e,t,n,r)};var pd=ae.unmount;function gd(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=ud({},e)).__c!=null&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(r){return gd(r,t,n)})),e}function $d(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(r){return $d(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 Gs(){this.__u=0,this.t=null,this.__b=null}function wd(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function yd(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 cs(){this.u=null,this.o=null}ae.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),pd&&pd(e)},(Gs.prototype=new ln).__c=function(e,t){var n=t.__c,r=this;r.t==null&&(r.t=[]),r.t.push(n);var s=wd(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]=$d(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)},Gs.prototype.componentWillUnmount=function(){this.t=[]},Gs.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]=gd(this.__b,n,r.__O=r.__P)}this.__b=null}var s=t.__a&&f(be,null,e.fallback);return s&&(s.__u&=-33),[f(be,null,t.__a?null:e.children),s]};var bd=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 V$(e){return this.getChildContext=function(){return e.context},e.children}function L$(e){var t=this,n=e.i;t.componentWillUnmount=function(){sr(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)}}),sr(f(V$,{context:t.context},e.__v),t.l)}function _d(e,t){var n=f(L$,{__v:e,i:t});return n.containerInfo=t,n}(cs.prototype=new ln).__a=function(e){var t=this,n=wd(t.__v),r=t.o.get(e);return r[0]++,function(s){var i=function(){t.props.revealOrder?(r.push(s),bd(t,e,r)):s()};n?n(i):i()}},cs.prototype.render=function(e){this.u=null,this.o=new Map;var t=Fn(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},cs.prototype.componentDidUpdate=cs.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,n){bd(e,n,t)})};var vd=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,B$=/^(?: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]/,U$=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,j$=/[A-Z0-9]/g,z$=typeof document<"u",H$=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function xd(e,t,n){return t.__k==null&&(t.textContent=""),sr(e,t),typeof n=="function"&&n(),e?e.__c:null}function Cd(e,t,n){return Ia(e,t),typeof n=="function"&&n(),e?e.__c:null}ln.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(ln.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var Sd=ae.event;function W$(){}function G$(){return this.cancelBubble}function q$(){return this.defaultPrevented}ae.event=function(e){return Sd&&(e=Sd(e)),e.persist=W$,e.isPropagationStopped=G$,e.isDefaultPrevented=q$,e.nativeEvent=e};var Va,K$={enumerable:!1,configurable:!0,get:function(){return this.class}},Ad=ae.vnode;ae.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||z$&&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"||H$(n.type)?a==="onfocus"?i="onfocusin":a==="onblur"?i="onfocusout":U$.test(i)?i=a:r.indexOf("-")===-1&&B$.test(i)?i=i.replace(j$,"-$&").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=Fn(n.children).forEach(function(l){l.props.selected=s.value.indexOf(l.props.value)!=-1})),r=="select"&&s.defaultValue!=null&&(s.value=Fn(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",K$)):(n.className&&!n.class||n.class&&n.className)&&(s.class=s.className=n.className),t.props=s}(e),e.$$typeof=vd,Ad&&Ad(e)};var kd=ae.__r;ae.__r=function(e){kd&&kd(e),Va=e.__c};var Ed=ae.diffed;ae.diffed=function(e){Ed&&Ed(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),Va=null};var Id={ReactCurrentDispatcher:{current:{readContext:function(e){return Va.__n[e.__c].props.value},useCallback:or,useContext:vn,useDebugValue:Ma,useDeferredValue:ja,useEffect:Pe,useId:Pa,useImperativeHandle:Ra,useInsertionEffect:Ha,useLayoutEffect:Ln,useMemo:wt,useReducer:ls,useRef:ge,useState:et,useSyncExternalStore:Wa,useTransition:za}}},Z$="17.0.2";function Nd(e){return f.bind(null,e)}function us(e){return!!e&&e.$$typeof===vd}function Td(e){return us(e)&&e.type===be}function Rd(e){return!!e&&!!e.displayName&&(typeof e.displayName=="string"||e.displayName instanceof String)&&e.displayName.startsWith("Memo(")}function La(e){return us(e)?Na.apply(null,arguments):e}function Md(e){return!!e.__k&&(sr(null,e),!0)}function Pd(e){return e&&(e.base||e.nodeType===1&&e)||null}var Dd=function(e,t){return e(t)},Ba=function(e,t){return e(t)},Od=be;function Ua(e){e()}function ja(e){return e}function za(){return[!1,Ua]}var Ha=Ln,Fd=us;function Wa(e,t){var n=t(),r=et({h:{__:n,v:t}}),s=r[0].h,i=r[1];return Ln(function(){s.__=n,s.v=t,Ga(s)&&i({h:s})},[e,n,t]),Pe(function(){return Ga(s)&&i({h:s}),e(function(){Ga(s)&&i({h:s})})},[e]),n}function Ga(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 X={useState:et,useId:Pa,useReducer:ls,useEffect:Pe,useLayoutEffect:Ln,useInsertionEffect:Ha,useTransition:za,useDeferredValue:ja,useSyncExternalStore:Wa,startTransition:Ua,useRef:ge,useImperativeHandle:Ra,useMemo:wt,useCallback:or,useContext:vn,useDebugValue:Ma,version:"17.0.2",Children:md,render:xd,hydrate:Cd,unmountComponentAtNode:Md,createPortal:_d,createElement:f,createContext:ir,createFactory:Nd,cloneElement:La,createRef:Ca,Fragment:be,isValidElement:us,isElement:Fd,isFragment:Td,isMemo:Rd,findDOMNode:Pd,Component:ln,PureComponent:no,memo:dd,forwardRef:ar,flushSync:Ba,unstable_batchedUpdates:Dd,StrictMode:Od,Suspense:Gs,SuspenseList:cs,lazy:yd,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Id};const qa=Object.freeze(Object.defineProperty({__proto__:null,Children:md,Component:ln,Fragment:be,PureComponent:no,StrictMode:Od,Suspense:Gs,SuspenseList:cs,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Id,cloneElement:La,createContext:ir,createElement:f,createFactory:Nd,createPortal:_d,createRef:Ca,default:X,findDOMNode:Pd,flushSync:Ba,forwardRef:ar,hydrate:Cd,isElement:Fd,isFragment:Td,isMemo:Rd,isValidElement:us,lazy:yd,memo:dd,render:xd,startTransition:Ua,unmountComponentAtNode:Md,unstable_batchedUpdates:Dd,useCallback:or,useContext:vn,useDebugValue:Ma,useDeferredValue:ja,useEffect:Pe,useErrorBoundary:M$,useId:Pa,useImperativeHandle:Ra,useInsertionEffect:Ha,useLayoutEffect:Ln,useMemo:wt,useReducer:ls,useRef:ge,useState:et,useSyncExternalStore:Wa,useTransition:za,version:Z$},Symbol.toStringTag,{value:"Module"})),J$=e=>{Pe(()=>{const t=e();return()=>{t.Dispose()}})},Y$=(e,t)=>{Pe(()=>{const n=e();return()=>{n.Dispose()}},t)},X$=e=>{Ln(()=>{const t=e();return()=>{t.Dispose()}})},b=X,Q$=J$,Vd=Y$,e1=X$;function t1(e,t,n,r){const s=b.memo(e,pe(We(Ge(er,n),ie())));return Sr(i=>{e.displayName=i},Qo(t)),i=>{const o=n1(r,i);return b.createElement(s,o)}}function n1(e,t){if(e==null)return t;{const n=e;return t.key=n(t),t}}function qs(e){return{Dispose(){e()}}}function Ld(e,t){Vd(e,t)}function r1(e){e1(t=>(e(),qs(()=>{})))}function Ka(e){const t=b.useRef(!1);i1(()=>{t.current||(t.current=!0,e())},[])}function Bd(e){const t=b.useRef(void 0),n=b.useRef(!1),r=b.useRef(!1);n.current&&(r.current=!0),Ld(()=>{let s;return n.current?s=void 0:(n.current=!0,t.current=lt(e()),s=r.current?t.current:void 0),{Dispose(){Sr(i=>{_e(i)},Qo(s))}}},[])}function s1(e){Q$(t=>(e(),qs(()=>{})))}function i1(e,t){Vd(n=>(e(),qs(()=>{})),t)}function o1(e,t){const n=We(t,[]);return b.useCallback(e,n)}function Ud(e){return b.useRef(e)}function a1(e,t,n){return t1(e,void 0,Xo(n),Xo(t))}function l1(e,t){const n=b.createContext(We(t,void 0));return Sr(r=>{n.displayName=r},Qo(e)),n}function c1(e,t,n){return b.createElement(e.Provider,{value:t},...n)}function Bn(e){return b.useContext(e)}function jd(e){const t=Ud(e),n=o1(r=>t.current(r),[]);return r1(()=>{t.current=e}),n}function lr(e){return b.useState(e)}class zd{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 ro extends Error{constructor(){super("The operation was canceled"),Object.setPrototypeOf(this,ro.prototype)}}class Za{static get maxTrampolineCallCount(){return 2e3}constructor(){this.callCount=0}incrementAndCheck(){return this.callCount++>Za.maxTrampolineCallCount}hijack(t){this.callCount=0,setTimeout(t,0)}}function Un(e){return t=>{if(t.cancelToken.isCancelled)t.onCancel(new ro);else if(t.trampoline.incrementAndCheck())t.trampoline.hijack(()=>{try{e(t)}catch(n){t.onError(Ai(n))}});else try{e(t)}catch(n){t.onError(Ai(n))}}}function u1(e,t){return Un(n=>{e({onSuccess:r=>{try{t(r)(n)}catch(s){n.onError(Ai(s))}},onError:n.onError,onCancel:n.onCancel,cancelToken:n.cancelToken,trampoline:n.trampoline})})}function d1(e){return Un(t=>t.onSuccess(e))}class f1{Bind(t,n){return u1(t,n)}Combine(t,n){return this.Bind(t,()=>n)}Delay(t){return Un(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 d1(t)}ReturnFrom(t){return t}TryFinally(t,n){return Un(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 Un(r=>{t({onSuccess:r.onSuccess,onCancel:r.onCancel,cancelToken:r.cancelToken,trampoline:r.trampoline,onError:s=>{try{n(s)(r)}catch(i){r.onError(Ai(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 Un(t=>t.onSuccess(void 0))}}const I=new f1;function Ja(e){}function h1(e){return new zd(!1)}function m1(e){e.cancel()}function p1(e){return e!=null&&e.isCancelled}const Hd=new zd;function g1(e){return Un(t=>{e({onSuccess:n=>t.onSuccess(vg(n)),onError:n=>t.onSuccess(xg(n)),onCancel:t.onCancel,cancelToken:t.cancelToken,trampoline:t.trampoline})})}function $1(e){return Un(t=>e([t.onSuccess,t.onError,t.onCancel]))}function Ya(e){return Un(t=>{let n;const r=setTimeout(()=>{t.cancelToken.removeListener(n),t.onSuccess(void 0)},e);n=t.cancelToken.addListener(()=>{clearTimeout(r),t.onCancel(new ro)})})}function w1(e,t){return Wd(e,t)}function ds(e,t){return w1(e,t)}function Wd(e,t,n,r,s){typeof t!="function"&&(s=t,t=void 0);const i=new Za;e({onSuccess:t||Ja,onError:n||Ja,onCancel:r||Ja,cancelToken:s||Hd,trampoline:i})}function y1(e,t){return new Promise((n,r)=>Wd(e,n,r,r,Hd))}class le extends B{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["HasNotStartedYet","InProgress","Resolved","Failed"]}}function Gd(e,t){const n=Ud(h1());return Bd(()=>qs(()=>{m1(n.current)})),jd(r=>{p1(n.current)||ds(I.Delay(()=>I.TryWith(I.Delay(()=>(t(new le(1,[])),I.Bind(e(r),s=>(t(new le(2,[s])),I.Zero())))),s=>(t(new le(3,[s])),I.Zero()))),n.current)})}class b1{constructor(t,n,r){this.OnNext=t,this.OnError=n||(s=>{}),this.OnCompleted=r||(()=>{})}}function _1(e,t){t.Subscribe(new b1(e))}class v1{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 C1(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 x1=class extends v1{};function C1(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 S1{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 x1}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 A1(e,t){console.error(lt(e),t)}function k1(e,t){let n,r=new S1(e);r.AutoReset=!1,n=r,_1(t,n.Elapsed()),n.Enabled=!0,n.Start()}function qd(e,t,n){Os(r=>{try{r(t)}catch(s){e(s)}},n)}function W(){return Ve()}function Kd(e,t){return St(n=>r=>{n(s=>{r(e(s))})},t)}function E1(e){return t0(e)}function Qe(e){return ee(e)}function cr(e,t,n,r){return ee(s=>{e(I.Delay(()=>I.Bind(g1(t(n)),i=>{const o=i;return o.tag===0&&s(r(o.fields[0])),I.Zero()})))})}function ur(e){k1(1,t=>{ds(e)})}function Ks(e,t){if(t.indexOf(e)===0)return t}function Zd(e,t){if(Fp(t,e))return t}function I1(e){return t=>{let n,r,s,i,o,a;return n=Ks("/",t),n!=null?(r=n,"#"+r):(s=Ks("#/",t),s!=null?(i=s,i):(o=Ks("#",t),o!=null?(a=o,"#/"+Tc(a,1,a.length-1)):"#/"+t))}}function Rr(e,t){return I1()(re("/",St(n=>n.indexOf("?")>=0||n.indexOf("#")===0||n.indexOf("/")===0?n:encodeURIComponent(n),e)))}function ft(e,t,n){history.pushState(void 0,"",Rr(e));const r=document.createEvent("CustomEvent");r.initEvent("CUSTOM_NAVIGATION_EVENT",!0,!0),window.dispatchEvent(r)}function Jd(e,t){return n0(n=>{if(yn(n))return Ve();{const r=Bp(n,"#");if(r==="?")return Ve();if(Ks("?",r)!=null)return ee(r);{const s=r.split("?");if(!ta((i,o)=>i===o,s)&&s.length===1){const i=ye(0,s);return ee(decodeURIComponent(i))}else if(!ta((i,o)=>i===o,s)&&s.length===2)if(ye(1,s)===""){const i=ye(0,s);return ee(decodeURIComponent(i))}else{const i=ye(0,s),o=ye(1,s);return y([decodeURIComponent(i),"?"+o])}else return Ve()}}},y(Yo(Ks("#",e)!=null?Tc(e,1,e.length-1):t===1&&(Zd("#",e)!=null||Zd("#/",e)!=null)?"":e,["/"],void 0,0)))}function N1(e,t,n){return t(Jd(e===2?window.location.pathname+window.location.search:window.location.hash,e))}const T1=a1(e=>{const t=jd(r=>{const s=We(e.onUrlChanged,i=>{});N1(We(e.hashMode,1),s)});Bd(()=>(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),qs(()=>{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)}))),Ka(()=>{const r=document.createEvent("CustomEvent");r.initEvent("CUSTOM_NAVIGATION_EVENT",!0,!0),window.dispatchEvent(r)});const n=e.application;return n??ie()});class jn extends B{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["AccountId","Name"]}}class Mr extends B{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Asc","Desc"]}}function Yd(e){return e.tag===0?new Mr(1,[]):new Mr(0,[])}class Zs extends B{constructor(t,n){super(),this.tag=0,this.fields=[t,n]}cases(){return["Sort"]}}const R1=new Zs(new jn(1,[]),new Mr(0,[]));function M1(e){return[e.fields[0],e.fields[1]]}function Xd(e){return e.fields[0]}function Qd(e){return e.fields[1]}function ef(e,t){const n=t.fields[0],r=t.fields[1];return e.tag===1?n.tag===1?new Zs(new jn(1,[]),Yd(r)):new Zs(new jn(1,[]),new Mr(0,[])):n.tag===0?new Zs(new jn(0,[]),Yd(r)):new Zs(new jn(0,[]),new Mr(0,[]))}class tf extends B{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["SearchText"]}}const P1=new tf("");function D1(e){return new tf(e)}function nf(e){return e.fields[0]}class O1 extends B{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["PageSize"]}}function F1(e){return new O1(e)}function rf(e){return e.fields[0]}class Xa extends Y{constructor(t,n,r){super(),this.SearchText=t,this.Sort=n,this.PageSize=r}}class V1 extends B{constructor(t,n){super(),this.tag=0,this.fields=[t,n]}cases(){return["AccountKey"]}}function sf(e){return[e.fields[0],e.fields[1]]}function L1(e,t){return new V1(e,t)}function B1(e){const t=sf(e);return[t[0],t[1]]}function U1(){return new yg([],{Equals:Se,GetHashCode:Zm})}function of(e,t){let n,r=ie();if(n=[da(e,t,new at(()=>r,s=>{r=s})),r],n[0])return n[1]}function Qa(e,t,n){return e.set(t,n),e}class j1 extends Y{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 z1(e){const t=pa(e.Name);if(t.tag===1)return new g(1,[t.fields[0]]);{const n=$u(e.Website);if(n.tag===1)return new g(1,[n.fields[0]]);{let r;const s=e.ContactDetails;if(s!=null){const i=Kg(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 j1(new pu(e.StreamId),t.fields[0],n.fields[0],r.fields[0],Zg(e.Notes),e.AccountProvisioningMode)])}}}function el(e,t){return i0(n=>is(n.StreamId)===Gi(t),e)}class K extends B{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["PartnerList","Partner","PartnerProfilesDirectory","PartnerAccountList","PartnerSuperConfiguration","PartnerBenefitsOnboardingConfiguration","PartnerBankDetailsConfiguration","PartnerWorkspace","PartnerSecurity","Account","AccountProfilesDirectory","AccountUsers","AccountSuperConfiguration","AccountBenefitsOnboardingConfiguration","AccountBankDetailsConfiguration","AccountSalaryPackagingConfiguration","AccountWorkspace","AccountHrisMigration","NotFound"]}}function af(e){let t,n,r,s,i,o,a,l,c,d,u,m,h,p,$,w,S,A,E,P,V,ne,we,Ae,he,te,de;if(Z(e))t=18;else if(L(e)==="account-registry")if(Z(C(e)))t=18;else if(L(C(e))==="partners")if(Z(C(C(e))))t=0;else if(Z(C(C(C(e)))))t=1,n=L(C(C(e)));else switch(L(C(C(C(e))))){case"accounts":{if(Z(C(C(C(C(e))))))t=2,r=L(C(C(e)));else if(Z(C(C(C(C(C(e)))))))t=9,d=L(C(C(C(C(e))))),u=L(C(C(e)));else switch(L(C(C(C(C(C(e))))))){case"directory":{Z(C(C(C(C(C(C(e)))))))?(t=10,m=L(C(C(C(C(e))))),h=L(C(C(e)))):t=18;break}case"users":{Z(C(C(C(C(C(C(e)))))))?(t=11,p=L(C(C(C(C(e))))),$=L(C(C(e)))):t=18;break}case"super-configuration":{Z(C(C(C(C(C(C(e)))))))?(t=12,w=L(C(C(C(C(e))))),S=L(C(C(e)))):t=18;break}case"benefits-onboarding-configuration":{Z(C(C(C(C(C(C(e)))))))?(t=13,A=L(C(C(C(C(e))))),E=L(C(C(e)))):t=18;break}case"bank-details-configuration":{Z(C(C(C(C(C(C(e)))))))?(t=14,P=L(C(C(C(C(e))))),V=L(C(C(e)))):t=18;break}case"salary-packaging-configuration":{Z(C(C(C(C(C(C(e)))))))?(t=15,ne=L(C(C(C(C(e))))),we=L(C(C(e)))):t=18;break}case"workspace":{Z(C(C(C(C(C(C(e)))))))?(t=16,Ae=L(C(C(C(C(e))))),he=L(C(C(e)))):t=18;break}case"hris-migration":{Z(C(C(C(C(C(C(e)))))))?(t=17,te=L(C(C(C(C(e))))),de=L(C(C(e)))):t=18;break}default:t=18}break}case"super-configuration":{Z(C(C(C(C(e)))))?(t=3,s=L(C(C(e)))):t=18;break}case"benefits-onboarding-configuration":{Z(C(C(C(C(e)))))?(t=4,i=L(C(C(e)))):t=18;break}case"directory":{Z(C(C(C(C(e)))))?(t=5,o=L(C(C(e)))):t=18;break}case"bank-details-configuration":{Z(C(C(C(C(e)))))?(t=6,a=L(C(C(e)))):t=18;break}case"workspace":{Z(C(C(C(C(e)))))?(t=7,l=L(C(C(e)))):t=18;break}case"security":{Z(C(C(C(C(e)))))?(t=8,c=L(C(C(e)))):t=18;break}default:t=18}else t=18;else t=18;switch(t){case 0:return new K(0,[]);case 1:return new K(1,[Le(n)]);case 2:return new K(3,[Le(r)]);case 3:return new K(4,[Le(s)]);case 4:return new K(5,[Le(i)]);case 5:return new K(2,[Le(o)]);case 6:return new K(6,[Le(a)]);case 7:return new K(7,[Le(l)]);case 8:return new K(8,[Le(c)]);case 9:return new K(9,[Le(u),Ht(d)]);case 10:return new K(10,[Le(h),Ht(m)]);case 11:return new K(11,[Le($),Ht(p)]);case 12:return new K(12,[Le(S),Ht(w)]);case 13:return new K(13,[Le(E),Ht(A)]);case 14:return new K(14,[Le(V),Ht(P)]);case 15:return new K(15,[Le(we),Ht(ne)]);case 16:return new K(16,[Le(he),Ht(Ae)]);case 17:return new K(17,[Le(de),Ht(te)]);default:return new K(18,[])}}function Js(e){const t=(r,s)=>J(k(()=>R(x("account-registry"),k(()=>R(x("partners"),k(()=>R(x(dt(r)),k(()=>s)))))))),n=(r,s,i)=>{const o=J(k(()=>R(x("accounts"),k(()=>R(x(_n(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 t(e.fields[0],["security"]);case 9:return n(e.fields[0],e.fields[1],[]);case 10:return n(e.fields[0],e.fields[1],["directory"]);case 11:return n(e.fields[0],e.fields[1],["users"]);case 12:return n(e.fields[0],e.fields[1],["super-configuration"]);case 13:return n(e.fields[0],e.fields[1],["benefits-onboarding-configuration"]);case 14:return n(e.fields[0],e.fields[1],["bank-details-configuration"]);case 15:return n(e.fields[0],e.fields[1],["salary-packaging-configuration"]);case 16:return n(e.fields[0],e.fields[1],["workspace"]);case 17:return n(e.fields[0],e.fields[1],["hris-migration"]);case 18:case 0:return y(["account-registry","partners"]);default:return t(e.fields[0],[])}}function tl(e){switch(e.tag){case 3:{const t=["account-registry","partners",dt(e.fields[0]),"accounts"];return Qe(n=>{ft(y(t))})}case 4:{const t=["account-registry","partners",dt(e.fields[0]),"super-configuration"];return Qe(n=>{ft(y(t))})}case 5:{const t=["account-registry","partners",dt(e.fields[0]),"benefits-onboarding-configuration"];return Qe(n=>{ft(y(t))})}case 6:{const t=["account-registry","partners",dt(e.fields[0]),"bank-details-configuration"];return Qe(n=>{ft(y(t))})}case 2:{const t=["account-registry","partners",dt(e.fields[0]),"directory"];return Qe(n=>{ft(y(t))})}case 7:{const t=["account-registry","partners",dt(e.fields[0]),"workspace"];return Qe(n=>{ft(y(t))})}case 8:{const t=["account-registry","partners",dt(e.fields[0]),"security"];return Qe(n=>{ft(y(t))})}case 9:{const t=["account-registry","partners",dt(e.fields[0]),"accounts",_n(e.fields[1])];return Qe(n=>{ft(y(t))})}case 10:{const t=["account-registry","partners",dt(e.fields[0]),"accounts",_n(e.fields[1]),"directory"];return Qe(n=>{ft(y(t))})}case 11:{const t=["account-registry","partners",dt(e.fields[0]),"accounts",_n(e.fields[1]),"users"];return Qe(n=>{ft(y(t))})}case 12:{const t=["account-registry","partners",dt(e.fields[0]),"accounts",_n(e.fields[1]),"super-configuration"];return Qe(n=>{ft(y(t))})}case 13:{const t=["account-registry","partners",dt(e.fields[0]),"accounts",_n(e.fields[1]),"benefits-onboarding-configuration"];return Qe(n=>{ft(y(t))})}case 14:{const t=["account-registry","partners",dt(e.fields[0]),"accounts",_n(e.fields[1]),"bank-details-configuration"];return Qe(n=>{ft(y(t))})}case 15:{const t=["account-registry","partners",dt(e.fields[0]),"accounts",_n(e.fields[1]),"salary-packaging-configuration"];return Qe(n=>{ft(y(t))})}case 16:{const t=["account-registry","partners",dt(e.fields[0]),"accounts",_n(e.fields[1]),"workspace"];return Qe(n=>{ft(y(t))})}case 17:{const t=["account-registry","partners",dt(e.fields[0]),"accounts",_n(e.fields[1]),"hris-migration"];return Qe(n=>{ft(y(t))})}case 0:case 18:return W();default:{const t=["account-registry","partners",dt(e.fields[0])];return Qe(n=>{ft(y(t))})}}}function H1(e,t){switch(t.tag){case 1:return new le(1,[]);case 2:return t.fields[0].tag===1?new le(2,[new g(1,[t.fields[0].fields[0]])]):new le(2,[new g(0,[e(t.fields[0].fields[0])])]);case 3:return new le(3,[t.fields[0]]);default:return new le(0,[])}}class lf extends Y{constructor(t,n,r){super(),this.Name=t,this.ExternalId=n,this.LegalEntity=r}}class cf extends Y{constructor(t,n){super(),this.BusinessName=t,this.BusinessNumber=n}}class uf extends Y{constructor(t,n,r){super(),this.ReadProtectedData=t,this.ProvisionAccounts=n,this.ConfigureSecurity=r}}function df(e){return new uf(na("AccountRegistry.ReadProtectedData",e.Roles,{Equals:(t,n)=>t===n,GetHashCode:Qn}),na("AccountRegistry.ProvisionAccounts",e.Roles,{Equals:(t,n)=>t===n,GetHashCode:Qn}),na("AccountRegistry.ConfigureSecurity",e.Roles,{Equals:(t,n)=>t===n,GetHashCode:Qn}))}const ff=new uf(!1,!1,!1);class G extends B{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["BadPrimitive","BadPrimitiveExtra","BadType","BadField","BadPath","TooSmallArray","FailMessage","BadOneOf"]}}class qe extends B{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["PascalCase","CamelCase","SnakeCase"]}}function hf(e){return e.slice(void 0,1).toLowerCase()+e.slice(1,e.length)}function mf(e,t){switch(e.tag){case 2:return Pp(hf(t),"[A-Z]","_$0").toLowerCase();case 0:return t;default:return hf(t)}}function pf(e,t){W1(t);const n=new Date(e);return n.offset=t??new Date().getTimezoneOffset()*-6e4,n}function W1(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 G1(){return pf(-621355968e5,0)}function q1(e){const[t,n]=$c(e),r=n==null?t.getTimezoneOffset()*-6e4:n==="Z"?0:n*6e4;return pf(t.getTime(),r)}function K1(e,t){try{return t.contents=q1(e),!0}catch{return!1}}function Ys(e){return e<0?Math.ceil(e):Math.floor(e)}function gf(e=0,t=0,n=0,r=0,s=0){switch(arguments.length){case 1:return Z1(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 Z1(e){return Number(BigInt(e)/10000n)}function J1(e){return Ys(e/864e5)}function Y1(e){return Ys(e%864e5/36e5)}function X1(e){return Ys(e%36e5/6e4)}function Q1(e){return Ys(e%6e4/1e3)}function ew(e){return Ys(e%1e3)}function tw(e,t="c",n){if(["c","g","G"].indexOf(t)===-1)throw new Error("Custom formats are not supported");const r=Math.abs(J1(e)),s=Math.abs(Y1(e)),i=Math.abs(X1(e)),o=Math.abs(Q1(e)),a=Math.abs(ew(e));return`${e<0?"-":""}${r===0&&(t==="c"||t==="g")?"":t==="c"?r+".":r+":"}${t==="g"?s:Ce(s,2)}:${Ce(i,2)}:${Ce(o,2)}${a===0&&(t==="c"||t==="g")?"":t==="g"?"."+Ce(a,3):"."+zm(a,3,7)}`}function nw(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 gf(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*gf(s,l,c,o,i)}}throw new Error(`String '${e}' was not recognized as a valid TimeSpan.`)}function rw(e,t){try{return t.contents=nw(e),!0}catch{return!1}}class sw{constructor(t,n){const r=new at(ie());this.comparer=n,r.contents=this,this.hashMap=new Map([]),this["init@9"]=1;const s=ve(t);try{for(;s["System.Collections.IEnumerator.MoveNext"]();){const i=s["System.Collections.Generic.IEnumerator`1.get_Current"]();rl(r.contents,i)}}finally{_e(s)}}get[Symbol.toStringTag](){return"HashSet"}toJSON(){const t=this;return Array.from(t)}"System.Collections.IEnumerable.GetEnumerator"(){return ve(this)}GetEnumerator(){return ve(ji(this.hashMap.values()))}[Symbol.iterator](){return Kr(ve(this))}"System.Collections.Generic.ICollection`1.Add2B595"(t){rl(this,t)}"System.Collections.Generic.ICollection`1.Clear"(){$f(this)}"System.Collections.Generic.ICollection`1.Contains2B595"(t){return yf(this,t)}"System.Collections.Generic.ICollection`1.CopyToZ3B4C077E"(t,n){Wc((s,i)=>{Rt(t,n+s,i)},this)}"System.Collections.Generic.ICollection`1.get_Count"(){return wf(this)|0}"System.Collections.Generic.ICollection`1.get_IsReadOnly"(){return!1}"System.Collections.Generic.ICollection`1.Remove2B595"(t){return bf(this,t)}get size(){return wf(this)|0}add(t){const n=this;return rl(n,t),n}clear(){$f(this)}delete(t){return bf(this,t)}has(t){return yf(this,t)}keys(){return Ee(n=>n,this)}values(){return Ee(n=>n,this)}entries(){return Ee(n=>[n,n],this)}forEach(t,n){const r=this;Sr(s=>{t(s,s,r)},r)}}function nl(e,t){const n=e.comparer.GetHashCode(t)|0;let r,s=ie();return r=[da(e.hashMap,n,new at(()=>s,i=>{s=i})),s],r[0]?[!0,n,r[1].findIndex(i=>e.comparer.Equals(t,i))]:[!1,n,-1]}function $f(e){e.hashMap.clear()}function wf(e){let t=0,n=ve(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{_e(n)}return t|0}function rl(e,t){const n=nl(e,t);return n[0]?n[2]>-1?!1:(Er(e.hashMap,n[1]).push(t),!0):(e.hashMap.set(n[1],[t]),!0)}function yf(e,t){const n=nl(e,t);let r;switch(n[0]&&n[2]>-1?r=0:r=1,r){case 0:return!0;default:return!1}}function bf(e,t){const n=nl(e,t);let r;switch(n[0]&&n[2]>-1?r=0:r=1,r){case 0:return Er(e.hashMap,n[1]).splice(n[2],1),!0;default:return!1}}class _f{constructor(t){this.k=t}}function Wt(e){return new _f(e)}function se(e){return e.k}class xe extends _f{constructor(t,n,r,s){super(t),this.left=n,this.right=r,this.h=s|0}}function Gt(e,t,n,r){return new xe(e,t,n,r)}function De(e){return e.left}function Ne(e){return e.right}function fs(e){return e.h}function u2(){}function vf(e,t){e:for(;;){const n=e,r=t;if(n!=null){const s=O(n);if(s instanceof xe){const i=s;e=De(i),t=vf(Ne(i),r+1);continue e}else return r+1|0}else return r|0}}function iw(e){return vf(e,0)}function cn(e,t,n){let r,s,i;const o=e;if(o!=null){const d=O(o);i=d instanceof xe?(r=d,fs(r)):1}else i=0;let a;const l=n;if(l!=null){const d=O(l);a=d instanceof xe?(s=d,fs(s)):1}else a=0;const c=(i<a?a:i)|0;return c===0?Wt(t):Gt(t,e,n,c+1)}function xf(e,t,n){let r,s,i,o,a,l,c,d,u;const m=e;if(m!=null){const $=O(m);u=$ instanceof xe?(r=$,fs(r)):1}else u=0;let h;const p=n;if(p!=null){const $=O(p);h=$ instanceof xe?(s=$,fs(s)):1}else h=0;if(h>u+2){const $=O(n);if($ instanceof xe){const w=$;if(i=De(w),(i!=null?(o=O(i),o instanceof xe?(a=o,fs(a)):1):0)>u+1){const S=O(De(w));if(S instanceof xe){const A=S;return cn(cn(e,t,De(A)),se(A),cn(Ne(A),se(w),Ne(w)))}else throw new Error("internal error: Set.rebalance")}else return cn(cn(e,t,De(w)),se(w),Ne(w))}else throw new Error("internal error: Set.rebalance")}else if(u>h+2){const $=O(e);if($ instanceof xe){const w=$;if(l=Ne(w),(l!=null?(c=O(l),c instanceof xe?(d=c,fs(d)):1):0)>h+1){const S=O(Ne(w));if(S instanceof xe){const A=S;return cn(cn(De(w),se(w),De(A)),se(A),cn(Ne(A),t,n))}else throw new Error("internal error: Set.rebalance")}else return cn(De(w),se(w),cn(Ne(w),t,n))}else throw new Error("internal error: Set.rebalance")}else return cn(e,t,n)}function hs(e,t,n){if(n!=null){const r=O(n),s=e.Compare(t,se(r))|0;if(r instanceof xe){const i=r;return s<0?xf(hs(e,t,De(i)),se(i),Ne(i)):s===0?n:xf(De(i),se(i),hs(e,t,Ne(i)))}else{const i=e.Compare(t,se(r))|0;return i<0?Gt(t,void 0,n,2):i===0?n:Gt(t,n,void 0,2)}}else return Wt(t)}function Cf(e,t,n){e:for(;;){const r=e,s=t,i=n;if(i!=null){const o=O(i),a=r.Compare(s,se(o))|0;if(o instanceof xe){const l=o;if(a<0){e=r,t=s,n=De(l);continue e}else{if(a===0)return!0;e=r,t=s,n=Ne(l);continue e}}else return a===0}else return!1}}function Sf(e,t){e:for(;;){const n=e,r=t;if(r!=null){const s=O(r);if(s instanceof xe){const i=s;Sf(n,De(i)),n(se(i)),e=n,t=Ne(i);continue e}else n(se(s))}break}}class ow extends Y{constructor(t,n){super(),this.stack=t,this.started=n}}function Af(e){e:for(;;){const t=e;if(Z(t))return Ve();{const n=L(t),r=C(t);if(n!=null){const s=O(n);if(s instanceof xe){const i=s;e=Be([De(i),Wt(se(i)),Ne(i)],r);continue e}else return t}else{e=r;continue e}}}}function kf(e){return new ow(Af(ee(e)),!1)}function aw(){throw new Error("Enumeration not started")}function lw(){throw new Error("Enumeration already started")}function Ef(e){if(e.started){const t=e.stack;if(Z(t))return lw();if(L(t)!=null){const n=O(L(t));return se(n)}else throw new Error("Please report error: Set iterator, unexpected stack for current")}else return aw()}function cw(e){if(e.started){const t=e.stack;if(Z(t))return!1;if(L(t)!=null){if(O(L(t))instanceof xe)throw new Error("Please report error: Set iterator, unexpected stack for moveNext");return e.stack=Af(C(t)),!Z(e.stack)}else throw new Error("Please report error: Set iterator, unexpected stack for moveNext")}else return e.started=!0,!Z(e.stack)}function If(e){let t=kf(e);return{"System.Collections.Generic.IEnumerator`1.get_Current"(){return Ef(t)},"System.Collections.IEnumerator.get_Current"(){return Ef(t)},"System.Collections.IEnumerator.MoveNext"(){return cw(t)},"System.Collections.IEnumerator.Reset"(){t=kf(e)},Dispose(){}}}function uw(e,t,n){e:for(;;){const r=e,s=t,i=n;if(Z(s))return Z(i)?0:-1;if(Z(i))return 1;if(L(i)!=null)if(L(s)!=null){const o=O(L(s)),a=O(L(i));if(o instanceof xe){const l=o;if(De(l)==null)if(a instanceof xe){const c=a;if(De(c)==null){const d=r.Compare(se(l),se(c))|0;if(d!==0)return d|0;e=r,t=ut(Ne(l),C(s)),n=ut(Ne(c),C(i));continue e}else{let d,u,m,h,p;switch(Z(s)?Z(i)?d=2:L(i)!=null?(d=1,h=C(i),p=O(L(i))):d=2:L(s)!=null?(d=0,u=C(s),m=O(L(s))):Z(i)?d=2:L(i)!=null?(d=1,h=C(i),p=O(L(i))):d=2,d){case 0:if(m instanceof xe){const $=m;e=r,t=Be([De($),Gt(se($),void 0,Ne($),0)],u),n=i;continue e}else{e=r,t=Be([void 0,Wt(se(m))],u),n=i;continue e}case 1:if(p instanceof xe){const $=p;e=r,t=s,n=Be([De($),Gt(se($),void 0,Ne($),0)],h);continue e}else{e=r,t=s,n=Be([void 0,Wt(se(p))],h);continue e}default:throw new Error("unexpected state in SetTree.compareStacks")}}}else{const c=r.Compare(se(l),se(a))|0;if(c!==0)return c|0;e=r,t=ut(Ne(l),C(s)),n=ut(void 0,C(i));continue e}else{let c,d,u,m,h;switch(Z(s)?Z(i)?c=2:L(i)!=null?(c=1,m=C(i),h=O(L(i))):c=2:L(s)!=null?(c=0,d=C(s),u=O(L(s))):Z(i)?c=2:L(i)!=null?(c=1,m=C(i),h=O(L(i))):c=2,c){case 0:if(u instanceof xe){const p=u;e=r,t=Be([De(p),Gt(se(p),void 0,Ne(p),0)],d),n=i;continue e}else{e=r,t=Be([void 0,Wt(se(u))],d),n=i;continue e}case 1:if(h instanceof xe){const p=h;e=r,t=s,n=Be([De(p),Gt(se(p),void 0,Ne(p),0)],m);continue e}else{e=r,t=s,n=Be([void 0,Wt(se(h))],m);continue e}default:throw new Error("unexpected state in SetTree.compareStacks")}}}else if(a instanceof xe){const l=a;if(De(l)==null){const c=r.Compare(se(o),se(l))|0;if(c!==0)return c|0;e=r,t=ut(void 0,C(s)),n=ut(Ne(l),C(i));continue e}else{let c,d,u,m,h;switch(Z(s)?Z(i)?c=2:L(i)!=null?(c=1,m=C(i),h=O(L(i))):c=2:L(s)!=null?(c=0,d=C(s),u=O(L(s))):Z(i)?c=2:L(i)!=null?(c=1,m=C(i),h=O(L(i))):c=2,c){case 0:if(u instanceof xe){const p=u;e=r,t=Be([De(p),Gt(se(p),void 0,Ne(p),0)],d),n=i;continue e}else{e=r,t=Be([void 0,Wt(se(u))],d),n=i;continue e}case 1:if(h instanceof xe){const p=h;e=r,t=s,n=Be([De(p),Gt(se(p),void 0,Ne(p),0)],m);continue e}else{e=r,t=s,n=Be([void 0,Wt(se(h))],m);continue e}default:throw new Error("unexpected state in SetTree.compareStacks")}}}else{const l=r.Compare(se(o),se(a))|0;if(l!==0)return l|0;e=r,t=C(s),n=C(i);continue e}}else{O(L(i));let o,a,l,c,d;switch(Z(s)?Z(i)?o=2:L(i)!=null?(o=1,c=C(i),d=O(L(i))):o=2:L(s)!=null?(o=0,a=C(s),l=O(L(s))):Z(i)?o=2:L(i)!=null?(o=1,c=C(i),d=O(L(i))):o=2,o){case 0:if(l instanceof xe){const u=l;e=r,t=Be([De(u),Gt(se(u),void 0,Ne(u),0)],a),n=i;continue e}else{e=r,t=Be([void 0,Wt(se(l))],a),n=i;continue e}case 1:if(d instanceof xe){const u=d;e=r,t=s,n=Be([De(u),Gt(se(u),void 0,Ne(u),0)],c);continue e}else{e=r,t=s,n=Be([void 0,Wt(se(d))],c);continue e}default:throw new Error("unexpected state in SetTree.compareStacks")}}else if(L(s)!=null){O(L(s));let o,a,l,c,d;switch(Z(s)?Z(i)?o=2:L(i)!=null?(o=1,c=C(i),d=O(L(i))):o=2:L(s)!=null?(o=0,a=C(s),l=O(L(s))):Z(i)?o=2:L(i)!=null?(o=1,c=C(i),d=O(L(i))):o=2,o){case 0:if(l instanceof xe){const u=l;e=r,t=Be([De(u),Gt(se(u),void 0,Ne(u),0)],a),n=i;continue e}else{e=r,t=Be([void 0,Wt(se(l))],a),n=i;continue e}case 1:if(d instanceof xe){const u=d;e=r,t=s,n=Be([De(u),Gt(se(u),void 0,Ne(u),0)],c);continue e}else{e=r,t=s,n=Be([void 0,Wt(se(d))],c);continue e}default:throw new Error("unexpected state in SetTree.compareStacks")}}else{e=r,t=C(s),n=C(i);continue e}}}function Nf(e,t,n){return t==null?n==null?0:-1:n==null?1:uw(e,ee(t),ee(n))|0}function dw(e,t,n){let r=n;Sf(s=>{Rt(t,r,s),r=r+1|0},e)}function fw(e,t,n){e:for(;;){const r=e,s=t,i=n;if(i["System.Collections.IEnumerator.MoveNext"]()){e=r,t=hs(r,i["System.Collections.Generic.IEnumerator`1.get_Current"](),s),n=i;continue e}else return s}}function hw(e,t){return Vi((n,r)=>hs(e,r,n),void 0,t)}function mw(e,t){return bn((n,r)=>hs(e,r,n),void 0,t)}function Tf(e,t){if(tn(t))return hw(e,t);if(t instanceof pt)return mw(e,t);{const n=ve(t);try{return fw(e,void 0,n)}finally{_e(n)}}}class sl{constructor(t,n){this.comparer=t,this.tree=n}GetHashCode(){return $w(this)|0}Equals(t){let n;const r=this;return t instanceof sl&&(n=t,Nf(ms(r),un(r),un(n))===0)}toString(){return"set ["+re("; ",Ee(n=>ot(n),this))+"]"}get[Symbol.toStringTag](){return"FSharpSet"}toJSON(){const t=this;return Array.from(t)}CompareTo(t){const n=this;return Nf(ms(n),un(n),un(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 Cf(ms(n),t,un(n))}"System.Collections.Generic.ICollection`1.CopyToZ3B4C077E"(t,n){dw(un(this),t,n)}"System.Collections.Generic.ICollection`1.get_IsReadOnly"(){return!0}"System.Collections.Generic.ICollection`1.get_Count"(){return il(this)|0}"System.Collections.Generic.IReadOnlyCollection`1.get_Count"(){return il(this)|0}GetEnumerator(){return If(un(this))}[Symbol.iterator](){return Kr(ve(this))}"System.Collections.IEnumerable.GetEnumerator"(){return If(un(this))}get size(){return il(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 Rf(this,t)}keys(){return Ee(n=>n,this)}values(){return Ee(n=>n,this)}entries(){return Ee(n=>[n,n],this)}forEach(t,n){const r=this;Sr(s=>{t(s,s,r)},r)}}function so(e,t){return new sl(e,t)}function ms(e){return e.comparer}function un(e){return e.tree}function pw(e){return so(e,void 0)}function gw(e,t){return so(ms(e),hs(ms(e),t,un(e)))}function il(e){return iw(un(e))}function Rf(e,t){return Cf(ms(e),t,un(e))}function $w(e){let t=0;const n=ve(e);try{for(;n["System.Collections.IEnumerator.MoveNext"]();){const r=n["System.Collections.Generic.IEnumerator`1.get_Current"]();t=(t<<1)+Tn(r)+631|0}}finally{_e(n)}return Math.abs(t)|0}function ol(e,t){return Rf(t,e)}function ww(e,t){return gw(t,e)}function yw(e){return pw(e)}function bw(e,t){return so(t,Tf(t,e))}function _w(e,t){return so(t,Tf(t,e))}function Xs(e,t,n){try{return"Expecting "+e+" but instead got:"+(n?`
1
+ (function(){"use strict";function nn(e){return Array.isArray(e)||ArrayBuffer.isView(e)}function Bm(e){return e!=null&&typeof e.GetEnumerator=="function"}function Um(e){return e!=null&&typeof e.CompareTo=="function"}function jm(e){return e!=null&&typeof e.Equals=="function"}function Ql(e){return e!=null&&typeof e.GetHashCode=="function"}function Lo(e){return e!=null&&typeof e.Dispose=="function"}function _e(e){Lo(e)&&e.Dispose()}function ie(){return null}function Ci(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 zm{constructor(t){this.iter=t,this.current=ie()}"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 ve(e){return Bm(e)?e.GetEnumerator():new zm(e[Symbol.iterator]())}function Kr(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 Hm{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 Ce(e,t){return e.toString(10).padStart(t,"0")}function Wm(e,t,n){return e.toString(10).padStart(t,"0").padEnd(n,"0")}function ec(e){const t=e;return typeof t.offset=="number"?t.offset:e.kind===1?0:e.getTimezoneOffset()*-6e4}function Gm(e,t){return e=e,e.toString(t)}function vr(e,t){return e=e,e.toString(t)}class Nn{static id(t){return Nn.idMap.has(t)||Nn.idMap.set(t,++Nn.count),Nn.idMap.get(t)}}Nn.idMap=new WeakMap,Nn.count=0;function Qn(e){let t=0,n=5381;const r=e.length;for(;t<r;)n=n*33^e.charCodeAt(t++);return n}function rn(e){return e*2654435761|0}function tc(e){return Qn(e.toString(32))}function Es(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 qm(e){if(e==null)return 0;switch(typeof e){case"boolean":return e?1:0;case"number":return rn(e);case"bigint":return tc(e);case"string":return Qn(e);default:return rn(Nn.id(e))}}function Km(e){return Ql(e)?e.GetHashCode():qm(e)}function Zm(e){return e.getTime()}function Jm(e){const t=e.length,n=new Array(t);for(let r=0;r<t;r++)n[r]=Tn(e[r]);return Es(n)}function Tn(e){var t;if(e==null)return 0;switch(typeof e){case"boolean":return e?1:0;case"number":return rn(e);case"bigint":return tc(e);case"string":return Qn(e);default:{if(Ql(e))return e.GetHashCode();if(nn(e))return Jm(e);if(e instanceof Date)return Zm(e);if(((t=Object.getPrototypeOf(e))==null?void 0:t.constructor)===Object){const n=Object.values(e).map(r=>Tn(r));return Es(n)}else return rn(Nn.id(e))}}}function Ym(e){return Km(e)}function Bo(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 nc(e,t){return Bo(e,t,Se)}function Xm(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]||!Se(e[n[s]],t[r[s]]))return!1;return!0}function Se(e,t){var n;return e===t?!0:e==null?t==null:t==null?!1:jm(e)?e.Equals(t):nn(e)?nn(t)&&nc(e,t):typeof e!="object"?!1:e instanceof Date?t instanceof Date&&rc(e,t)===0:((n=Object.getPrototypeOf(e))==null?void 0:n.constructor)===Object&&Xm(e,t)}function rc(e,t){let n,r;return"offset"in e&&"offset"in t?(n=e.getTime(),r=t.getTime()):(n=e.getTime()+ec(e),r=t.getTime()+ec(t)),n===r?0:n<r?-1:1}function Rn(e,t){return e===t?0:e<t?-1:1}function Qm(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 sc(e,t){return Qm(e,t,Xt)}function ep(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=Xt(e[o],t[o]),i!==0)return i}return 0}function Xt(e,t){var n;return e===t?0:e==null?t==null?0:-1:t==null?1:Um(e)?e.CompareTo(t):nn(e)?nn(t)?sc(e,t):-1:typeof e!="object"?e<t?-1:1:e instanceof Date?t instanceof Date?rc(e,t):-1:((n=Object.getPrototypeOf(e))==null?void 0:n.constructor)===Object?ep(e,t):-1}function _(e){const t={};for(const n of e)t[n[0]]=n[1];return t}function tp(e){nn(e)?e.splice(0):e.clear()}const Si=new WeakMap;function pe(e){if(e==null)return null;const t=(n,r)=>e(n)(r);return Si.set(t,e),t}function er(e){return Si.get(e)??(t=>n=>e(t,n))}function Uo(e){if(e==null)return null;const t=(n,r,s)=>e(n)(r)(s);return Si.set(t,e),t}function jo(e){return Si.get(e)??(t=>n=>r=>e(t,n,r))}function np(e){let t=0,n="[";for(const r of e){if(t===0)n+=ot(r);else if(t===100){n+="; ...";break}else n+="; "+ot(r);t++}return n+"]"}function ot(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 np(e);{const r=(n=Object.getPrototypeOf(e))==null?void 0:n.constructor;return r===Object&&t<10?"{ "+Object.entries(e).map(([s,i])=>s+" = "+ot(i,t+1)).join(`
2
+ `)+" }":(r==null?void 0:r.name)??""}}return String(e)}function rp(e,t){if(t.length===0)return e;{let n,r=!0;return t.length===1?(n=ot(t[0]),r=n.indexOf(" ")>=0):n=t.map(s=>ot(s)).join(", "),e+(r?" (":" ")+n+(r?")":"")}}class B{get name(){return this.cases()[this.tag]}toJSON(){return this.fields.length===0?this.name:[this.name].concat(this.fields)}toString(){return rp(this.name,this.fields)}GetHashCode(){const t=this.fields.map(n=>Tn(n));return t.splice(0,0,rn(this.tag)),Es(t)}Equals(t){return this===t?!0:Ci(this,t)&&this.tag===t.tag?nc(this.fields,t.fields):!1}CompareTo(t){return this===t?0:Ci(this,t)?this.tag===t.tag?sc(this.fields,t.fields):this.tag<t.tag?-1:1:-1}}function sp(e){const t={},n=Object.keys(e);for(let r=0;r<n.length;r++)t[n[r]]=e[n[r]];return t}function ip(e){return"{ "+Object.entries(e).map(([t,n])=>t+" = "+ot(n)).join(`
3
+ `)+" }"}function op(e){const t=Object.values(e).map(n=>Tn(n));return Es(t)}function ap(e,t){if(e===t)return!0;if(Ci(e,t)){const n=Object.keys(e);for(let r=0;r<n.length;r++)if(!Se(e[n[r]],t[n[r]]))return!1;return!0}else return!1}function lp(e,t){if(e===t)return 0;if(Ci(e,t)){const n=Object.keys(e);for(let r=0;r<n.length;r++){const s=Xt(e[n[r]],t[n[r]]);if(s!==0)return s}return 0}else return-1}class Y{toJSON(){return sp(this)}toString(){return ip(this)}GetHashCode(){return op(this)}Equals(t){return ap(this,t)}CompareTo(t){return lp(this,t)}}class at{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 cp{constructor(t){this.message=t}}function up(e){return e instanceof cp||e instanceof Error}function dp(e){return e instanceof Promise}function Ai(e){return up(e)||dp(e)?e:new Error(String(e))}const Zr=Symbol("numeric");function ic(e){return typeof e=="number"||typeof e=="bigint"||(e==null?void 0:e[Zr])}function fp(e,t){return typeof e=="number"||typeof e=="bigint"?e<t?-1:e>t?1:0:e.CompareTo(t)}function zo(e,t){return typeof e=="number"?e*t:typeof e=="bigint"?e*BigInt(t):e[Zr]().multiply(t)}function ki(e,t){return typeof e=="number"?e.toFixed(t):typeof e=="bigint"?e:e[Zr]().toFixed(t)}function Ei(e,t){return typeof e=="number"?e.toPrecision(t):typeof e=="bigint"?e:e[Zr]().toPrecision(t)}function Ii(e,t){return typeof e=="number"?e.toExponential(t):typeof e=="bigint"?e:e[Zr]().toExponential(t)}function Ni(e){return typeof e=="number"?(Number(e)>>>0).toString(16):typeof e=="bigint"?BigInt.asUintN(64,e).toString(16):e[Zr]().toHex()}class hp{constructor(t,n,r,s){this.declaringType=t,this.tag=n,this.name=r,this.fields=s}}class Qt{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 Fe(this)}GetHashCode(){return oc(this)}Equals(t){return Ho(this,t)}}function Ht(e){return e.generics!=null?e.generics:[]}function oc(e){const t=Qn(e.fullname),n=Ht(e).map(oc);return Es([t,...n])}function Ho(e,t){return e.fullname===""?t.fullname===""&&Bo(Ns(e),Ns(t),([n,r],[s,i])=>n===s&&Ho(r,i)):e.fullname===t.fullname&&Bo(Ht(e),Ht(t),Ho)}function Ti(e,t,n,r){return new Qt(e,t,n,r)}function Je(e,t,n,r){return new Qt(e,t,n,void 0,r)}function Wo(e,t,n,r){const s=new Qt(e,t,n,void 0,void 0,()=>{const i=n.prototype.cases();return r().map((o,a)=>new hp(s,a,i[a],o))});return s}function $e(e){return new Qt("Microsoft.FSharp.Core.FSharpOption`1",[e])}function Go(e){return new Qt("Microsoft.FSharp.Collections.FSharpList`1",[e])}function ac(e){return new Qt("[]",[e])}const mp=new Qt("System.Object"),W=new Qt("System.String");function Jr(e){if(Array.isArray(e))return e[0];if(e instanceof Qt){const t=Is(e);if(t!=null)return Jr(t)+"[]";{const n=e.fullname.lastIndexOf(".");return n===-1?e.fullname:e.fullname.substr(n+1)}}else return e.name}function Fe(e){const t=Is(e);return t!=null?Fe(t)+"[]":e.generics==null||e.generics.length===0?e.fullname:e.fullname+"["+e.generics.map(n=>Fe(n)).join(",")+"]"}function lc(e){return Is(e)!=null}function Is(e){var t;return e.fullname==="[]"&&((t=e.generics)==null?void 0:t.length)===1?e.generics[0]:void 0}function cc(e){return e.generics!=null&&e.generics.length>0}function qo(e){return e.enumCases!=null&&e.enumCases.length>0}function uc(e){return e.generics==null?e:new Qt(e.fullname,e.generics.map(()=>mp))}function dc(e){var t;return(t=e.generics)==null?void 0:t[0]}function Yr(e){if(qo(e)&&e.enumCases!=null)return e.enumCases.map(t=>t[1]);throw new Error(`${e.fullname} is not an enum type`)}function pp(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 Xr(e,t){const n=parseInt(t,10);return pp(e,isNaN(n)?t:n)[1]}function fc(e){if(e.cases!=null)return e.cases();throw new Error(`${e.fullname} is not an F# union type`)}function Ns(e){if(e.fields!=null)return e.fields();throw new Error(`${e.fullname} is not an F# record type`)}function hc(e){if(Ko(e)&&e.generics!=null)return e.generics;throw new Error(`${e.fullname} is not a tuple type`)}function mc(e){return e instanceof Qt?e.cases!=null:e instanceof B}function pc(e){return e instanceof Qt?e.fields!=null:e instanceof Y}function Ko(e){return e.fullname.startsWith("System.Tuple")}function gp(e,t){const r=fc(t)[e.tag];if(r==null)throw new Error(`Cannot find case ${e.name} in union type`);return[r,e.fields]}function gc(e){return e.fields==null?[]:e.fields}function $p(e,t){return e[t[0]]}function u2(e){return e}function wp(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 yp(e,t){const n=Ns(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 bp(e,t){return e}const _p=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],vp=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],xp=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Cp=["January","February","March","April","May","June","July","August","September","October","November","December"];function Wt(e,t,n){let r=0,s=t;for(;s<e.length&&e[s]===n;)s++,r++;return r}function $c(e,t){return t>=e.length-1?-1:e.charCodeAt(t+1)}function Sp(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 Zo(e,t,n){let r=0,s=0,i="";const o=n?Ts(e.getTime(),1):e;for(;r<t.length;){const a=t[r];switch(a){case"d":switch(s=Wt(t,r,"d"),r+=s,s){case 1:i+=bc(o);break;case 2:i+=Ce(bc(o),2);break;case 3:i+=_p[xc(o)];break;case 4:i+=vp[xc(o)];break}break;case"f":if(s=Wt(t,r,"f"),r+=s,s<=3){const w=10**(3-s);i+=Ce(Math.floor(Pi(o)/w),s)}else s<=7&&(i+=(""+Pi(o)).padEnd(s,"0"));break;case"F":if(s=Wt(t,r,"F"),r+=s,s<=3){const w=10**(3-s),S=Math.floor(Pi(o)/w);S!=0&&(i+=Ce(S,s))}else if(s<=7){const w=Pi(o);w!=0&&(i+=Ce(w,3))}break;case"g":s=Wt(t,r,"g"),r+=s,s<=2&&(i+="A.D.");break;case"h":switch(s=Wt(t,r,"h"),r+=s,s){case 1:i+=Mi(o)%12;break;case 2:i+=Ce(Mi(o)%12,2);break}break;case"H":switch(s=Wt(t,r,"H"),r+=s,s){case 1:i+=Mi(o);break;case 2:i+=Ce(Mi(o),2);break}break;case"K":switch(s=Wt(t,r,"K"),r+=s,s){case 1:switch(wc(o)){case 1:i+="Z";break;case 2:i+=Qr(o.getTimezoneOffset()*-6e4);break}break}break;case"m":switch(s=Wt(t,r,"m"),r+=s,s){case 1:i+=_c(o);break;case 2:i+=Ce(_c(o),2);break}break;case"M":switch(s=Wt(t,r,"M"),r+=s,s){case 1:i+=Di(o);break;case 2:i+=Ce(Di(o),2);break;case 3:i+=xp[Di(o)-1];break;case 4:i+=Cp[Di(o)-1];break}break;case"s":switch(s=Wt(t,r,"s"),r+=s,s){case 1:i+=vc(o);break;case 2:i+=Ce(vc(o),2);break}break;case"t":switch(s=Wt(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=Wt(t,r,"y"),r+=s,s){case 1:i+=o.getFullYear()%100;break;case 2:i+=Ce(o.getFullYear()%100,2);break;case 3:i+=Ce(o.getFullYear(),3);break;case 4:i+=Ce(o.getFullYear(),4);break;case 5:i+=Ce(o.getFullYear(),5);break}break;case"z":s=Wt(t,r,"z"),r+=s;let l="";switch(wc(o)){case 1:l="+00:00";break;case 2:l=Qr(o.getTimezoneOffset()*-6e4);break;case 0:l=Qr(Pp(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}${Ce(d,2)}`;break;default:i+=`${c}${Ce(d,2)}:${Ce(u,2)}`;break}break;case":":i+=":",r++;break;case"/":i+="/",r++;break;case"'":case'"':const[m,h]=Sp(t,r);i+=m,r+=h;break;case"%":const p=$c(t,r);if(p>=0&&p!==37)r+=2,i+=Zo(o,String.fromCharCode(p),n);else throw new Error("Invalid format string");break;case"\\":const $=$c(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 wc(e){return e.kind||0}function Qr(e){const t=e<0;e=Math.abs(e);const n=~~(e/36e5),r=e%36e5/6e4;return(t?"-":"+")+Ce(n,2)+":"+Ce(r,2)}function Ri(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 Ap(e,t){if(t)return e.toISOString();{const n=e.kind==null?!0:e.kind===2;return Ce(e.getFullYear(),4)+"-"+Ce(e.getMonth()+1,2)+"-"+Ce(e.getDate(),2)+"T"+Ce(e.getHours(),2)+":"+Ce(e.getMinutes(),2)+":"+Ce(e.getSeconds(),2)+"."+Ce(e.getMilliseconds(),3)+(n?Qr(e.getTimezoneOffset()*-6e4):"")}}function kp(e,t){const n=e.toISOString();return n.substring(0,n.length-1)+Qr(t)}function Ep(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," ")+Qr(e.offset??0);if(t.length===1)switch(t){case"D":case"d":return Ri(n,"first");case"T":case"t":return Ri(n,"second");case"O":case"o":return kp(n,e.offset??0);default:throw new Error("Unrecognized Date print format")}else return Zo(n,t,!0)}function Ip(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?Ri(e,"first"):e.toLocaleDateString();case"T":case"t":return n?Ri(e,"second"):e.toLocaleTimeString();case"O":case"o":return Ap(e,n);default:throw new Error("Unrecognized Date print format")}else return Zo(e,t,n)}function es(e,t,n){return e.offset!=null?Ep(e,t):Ip(e,t)}function Ts(e,t){const n=new Date(e);return n.kind=(t??0)|0,n}function Np(){return Ts(-621355968e5,1)}function yc(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 Tp(e,t=!1){const[n,r]=yc(e),s=r!=null?t&&r==="Z"?1:2:0;return Ts(n.getTime(),s)}function Rp(e,t){try{return t.contents=Tp(e),!0}catch{return!1}}function Mp(e){return e.kind===1?e:Ts(e.getTime(),1)}function Pp(e){return e.kind===2?e:Ts(e.getTime(),2)}function bc(e){return e.kind===1?e.getUTCDate():e.getDate()}function Mi(e){return e.kind===1?e.getUTCHours():e.getHours()}function Pi(e){return e.kind===1?e.getUTCMilliseconds():e.getMilliseconds()}function _c(e){return e.kind===1?e.getUTCMinutes():e.getMinutes()}function Di(e){return(e.kind===1?e.getUTCMonth():e.getMonth())+1}function vc(e){return e.kind===1?e.getUTCSeconds():e.getSeconds()}function xc(e){return e.kind===1?e.getUTCDay():e.getDay()}function Cc(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 Jo(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}function Dp(e,t,n=0){return e.lastIndex=n,e.exec(t)}function Sc(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 Op(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=Cc(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=Sc(e,a),c=Sc.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 Rs=/(^|[^%])%([0+\- ]*)(\*|\d+)?(?:\.(\d+))?(\w)/g,Ms=/(?:(^|[^%])%([0+\- ]*)(\d+)?(?:\.(\d+))?(\w))?%P\(\)/g,Fp=/\{(\d+)(,-?\d+)?(?:\:([a-zA-Z])(\d{0,2})|\:(.+?))?\}/g;function Ac(e,t){return fp(e,t)<0}function en(e){return{input:e,cont:Vp(e)}}function kc(e,t){let n=0,r=0,s="";Ms.lastIndex=0;let i=Ms.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=Ms.lastIndex,s+=Nc(t[n++],a,l,c,d),Ms.lastIndex=r-1,i=Ms.exec(e)}return s+=e.substring(r).replace(/%%/g,"%"),s}function Yo(e,t){return typeof t=="string"?e(t):t.cont(e)}function Ec(e){return Yo(t=>console.log(t),e)}function sn(e){return Yo(t=>t,e)}function Ic(e){return Yo(t=>{throw new Error(t)},e)}function Nc(e,t,n,r,s){let i="";if(t=t||"",s=s||"",ic(e))switch(s.toLowerCase()!=="x"&&(Ac(e,0)?(e=zo(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=ki(e,r);break;case"g":case"G":e=r!=null?Ei(e,r):Ei(e);break;case"e":case"E":e=r!=null?Ii(e,r):Ii(e);break;case"x":e=Ni(e);break;case"X":e=Ni(e).toUpperCase();break;default:e=String(e);break}else e instanceof Date?e=es(e):e=ot(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=Ps(e,n-i.length,l,a),e=i+e):e=Ps(i+e,n,l,a)}return e}function Tc(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)):Tc(e,a,l,o,s)}}function Vp(e){return t=>{Rs.lastIndex=0;const n=[],r=[];let s=0,i=Rs.exec(e);for(;i;){const o=i.index+(i[1]||"").length;n.push(e.substring(s,o).replace(/%%/g,"%")),r.push(i),s=Rs.lastIndex,Rs.lastIndex-=1,i=Rs.exec(e)}return n.length===0?t(e.replace(/%%/g,"%")):(n.push(e.substring(s).replace(/%%/g,"%")),Tc(t,n,r))}}function Rc(e,...t){let n;return typeof e=="object"?(n=String(t[0]),t.shift()):n=e,n.replace(Fp,(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(ic(c))switch(a=a==null?null:parseInt(a,10),o){case"f":case"F":a=a??2,c=ki(c,a);break;case"g":case"G":c=a!=null?Ei(c,a):Ei(c);break;case"e":case"E":c=a!=null?Ii(c,a):Ii(c);break;case"p":case"P":a=a??2,c=ki(zo(c,100),a)+" %";break;case"d":case"D":c=a!=null?Xo(String(c),a,"0"):String(c);break;case"x":case"X":c=a!=null?Xo(Ni(c),a,"0"):Ni(c),o==="X"&&(c=c.toUpperCase());break;default:if(l){let d="";c=l.replace(/([0#,]+)(\.[0#]+)?/,(u,m,h)=>{Ac(c,0)&&(c=zo(c,-1),d="-"),h=h==null?"":h.substring(1),c=ki(c,Math.max(h.length,0));let[p,$]=c.split(".");$||($="");const w=m.replace(/,/g,"").replace(/^#+/,"").length;p=Xo(p,w,"0");const S=h.replace(/#+$/,"").length;if(S>$.length?$=Bp($,S,"0"):S<$.length&&($=$.substring(0,S)+$.substring(S).replace(/0+$/,"")),m.indexOf(",")>0){const A=p.length%3,E=Math.floor(p.length/3);let P=A>0?p.substr(0,A)+(E>0?",":""):"";for(let V=0;V<E;V++)P+=p.substr(A+V*3,3)+(V<E-1?",":"");p=P}return $.length>0?p+"."+$:p}),c=d+c}}else c instanceof Date?c=es(c,l||o):c=ot(c);return i=parseInt((i||" ").substring(1),10),isNaN(i)||(c=Ps(String(c),Math.abs(i)," ",i<0)),c})}function Lp(e,t){const n=e.lastIndexOf(t);return n>=0&&n===e.length-t.length}function Oi(e){return typeof e!="string"||e.length===0}function yn(e){return typeof e!="string"||/^\s*$/.test(e)}function re(e,t){return Array.isArray(t)?t.join(e):Array.from(t).join(e)}function Ps(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 Xo(e,t,n){return Ps(e,t,n)}function Bp(e,t,n){return Ps(e,t,n,!0)}function Qo(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(Jo),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 Up(e,...t){if(t.length===0)return e.trim();const n="["+Jo(t.join(""))+"]+";return e.replace(new RegExp("^"+n),"").replace(new RegExp(n+"$"),"")}function jp(e,...t){return t.length===0?e.trimEnd():e.replace(new RegExp("["+Jo(t.join(""))+"]+$"),"")}function Mc(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 xr{constructor(t){this.value=t}toJSON(){return this.value}toString(){return String(this.value)}GetHashCode(){return Tn(this.value)}Equals(t){return t==null?!1:Se(this.value,t instanceof xr?t.value:t)}CompareTo(t){return t==null?1:Xt(this.value,t instanceof xr?t.value:t)}}function O(e){if(e==null)throw new Error("Option has no value");return e instanceof xr?e.value:e}function ea(e){return e instanceof xr?e.value:e}function lt(e){return e==null||e instanceof xr?new xr(e):e}function zp(e){return e??void 0}function ta(e){return e==null?[]:[O(e)]}function We(e,t){return e!=null?O(e):t}function Pc(e,t){return e!=null?O(e):t()}function Ge(e,t){return t!=null?lt(e(O(t))):void 0}function Hp(e,t){return t!=null?e(O(t)):void 0}const Dc="Collection was empty.";function na(e,t){return typeof e=="function"?new e(t):new Array(t)}function Oc(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 tr(e,t,n){const r=t.length|0,s=na(n,r);for(let i=0;i<=r-1;i++)Pt(s,i,e(ye(i,t)));return s}function Wp(e,t,n,r){if(t.length!==n.length)throw new Error("Arrays had different lengths");const s=na(r,t.length);for(let i=0;i<=t.length-1;i++)Pt(s,i,e(ye(i,t),ye(i,n)));return s}function Gp(e,t){const n=na(t,1);return Pt(n,0,e),n}function qp(e){return e.slice().reverse()}function Kp(e,t){return t.find(e)}function Zp(e,t,n){const r=[];for(let s=0;s<=t.length-1;s++){const i=e(ye(s,t));if(i!=null){const o=O(i);r.push(o)}}return Se(n,ie())?r:tr(s=>s,r,n)}function Vi(e,t,n){const r=e;return n.reduce(r,t)}function Jp(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 ra(e,t,n){return t==null}function ye(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 Pt(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 Fc(e,t,n){return t.reduceRight((r,s)=>e(s,r),n)}function Yp(e,t){let n=t.GetZero();for(let r=0;r<=e.length-1;r++)n=t.Add(n,ye(r,e));return n}class pt extends Y{constructor(t,n){super(),this.head=t,this.tail=n}toString(){return"["+re("; ",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(Se(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)+Tn(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=Xt(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 Qp(this)}[Symbol.iterator](){return Kr(ve(this))}"System.Collections.IEnumerable.GetEnumerator"(){return ve(this)}}class Xp{constructor(t){this.xs=t,this.it=this.xs,this.current=ie()}"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=ie()}Dispose(){}}function Qp(e){return new Xp(e)}function ze(){return new pt(ie(),void 0)}function Ds(e,t){return new pt(e,t)}function Mn(e){return e.tail==null}function Vc(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 nr(e){if(e.tail!=null)return e.head;throw new Error(Dc+"\\nParameter name: list")}function ct(e){const t=e.tail;if(t!=null)return O(t);throw new Error(Dc+"\\nParameter name: list")}function Ve(){return ze()}function ut(e,t){return Ds(e,t)}function ee(e){return Ds(e,ze())}function Z(e){return Mn(e)}function on(e){return Vc(e)}function L(e){return nr(e)}function C(e){return ct(e)}function Cr(e){const t=Vc(e)|0,n=Fi(new Array(t),0,t,null);return((s,i)=>{e:for(;;){const o=s,a=i;if(!Mn(a)){Pt(n,o,nr(a)),s=o+1,i=ct(a);continue e}break}})(0,e),n}function bn(e,t,n){let r=t,s=n;for(;!Mn(s);)r=e(r,L(s)),s=ct(s);return r}function Li(e){return bn((t,n)=>Ds(n,t),ze(),e)}function e0(e,t,n){return Fc(e,Cr(t),n)}function t0(e,t,n){return((s,i,o)=>{e:for(;;){const a=s,l=i,c=o;if(Mn(c))return l;s=a+1,i=e(a,l,nr(c)),o=ct(c);continue e}})(0,t,n)}function Os(e,t){bn((n,r)=>{e(r)},void 0,t)}function Be(e,t){let n=t;for(let r=e.length-1;r>=0;r--)n=Ds(ye(r,e),n);return n}function y(e){return Be(e,ze())}function n0(e){let t,n;if(nn(e))return y(e);if(e instanceof pt)return e;{const r=ze();let s=r;const i=ve(e);try{for(;i["System.Collections.IEnumerator.MoveNext"]();){const l=i["System.Collections.Generic.IEnumerator`1.get_Current"]();s=(t=s,n=new pt(l,void 0),t.tail=n,n)}}finally{_e(i)}const o=s,a=ze();return o.tail=a,ct(r)}}function r0(e){const t=ze();let n=t;const r=o=>{n=bn((a,l)=>{const c=new pt(l,void 0);return a.tail=c,c},n,o)};if(nn(e))e.forEach(r);else if(e instanceof pt)Os(r,e);else{const o=ve(e);try{for(;o["System.Collections.IEnumerator.MoveNext"]();)r(o["System.Collections.Generic.IEnumerator`1.get_Current"]())}finally{_e(o)}}const s=n,i=ze();return s.tail=i,ct(t)}function Ye(e,t){return bn((n,r)=>Ds(r,n),t,Li(e))}function s0(e,t){let n,r;const s=ze();let i=s,o=t;for(;!Mn(o);){let c=e(nr(o));for(;!Mn(c);)i=(n=i,r=new pt(nr(c),void 0),n.tail=r,r),c=ct(c);o=ct(o)}const a=i,l=ze();return a.tail=l,ct(s)}function Fs(e,t){const n=ze(),r=t0((i,o,a)=>{const l=new pt(e(i,a),void 0);return o.tail=l,l},n,t),s=ze();return r.tail=s,ct(n)}function At(e,t){const n=ze(),r=bn((i,o)=>{const a=new pt(e(o),void 0);return i.tail=a,a},n,t),s=ze();return r.tail=s,ct(n)}function i0(e){return Fs((t,n)=>[t,n],e)}function o0(e,t){return(r=>{e:for(;;){const s=r;if(Mn(s))return;{const i=e(nr(s));if(i==null){r=ct(s);continue e}else return i}}})(t)}function a0(e,t){return o0(n=>e(n)?lt(n):void 0,t)}function Lc(e,t){return((r,s)=>{e:for(;;){const i=r,o=s;if(Mn(o))return;if(e(nr(o)))return i;r=i+1,s=ct(o);continue e}})(0,t)}function l0(e,t){return((r,s)=>{e:for(;;){const i=r,o=s;if(Mn(o))return;if(i===e)return lt(nr(o));r=i+1,s=ct(o);continue e}})(0,t)}function Bi(e,t){const n=ze(),r=bn((i,o)=>{if(e(o)){const a=new pt(o,void 0);return i.tail=a,a}else return i},n,t),s=ze();return r.tail=s,ct(n)}function c0(e,t){const n=ze(),r=ze(),s=n,i=bn((l,c)=>{let d,u;const m=l[0],h=l[1];return e(c)?[(d=new pt(c,void 0),m.tail=d,d),h]:[m,(u=new pt(c,void 0),h.tail=u,u)]},[s,r],t),o=ze();i[0].tail=o;const a=ze();return i[1].tail=a,[ct(s),ct(r)]}function Bc(e,t){const n=ze(),r=bn((i,o)=>{const a=e(o);if(a==null)return i;{const l=new pt(O(a),void 0);return i.tail=l,l}},n,t),s=ze();return r.tail=s,ct(n)}function sa(e,t,n){return Lc(r=>n.Equals(e,r),t)!=null}function Uc(e,t){return Lc(e,t)!=null}function u0(e,t){const n=Cr(t);return n.sort(e),y(n)}function d0(e,t,n){return u0((r,s)=>n.Compare(e(r),e(s)),t)}function f0(e,t){return y(tr(y,Jp(e,Cr(t))))}function h0(e){return new g(0,[e])}function jc(e){return new g(1,[e])}class g extends B{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Ok","Error"]}}function Pn(e,t){return t.tag===0?h0(e(t.fields[0])):jc(t.fields[0])}function m0(e,t){return t.tag===0?e(t.fields[0]):jc(t.fields[0])}function gt(e){return e.tag===0}function p0(e){throw new Error(e)}const g0="Enumeration already finished.",$0="Enumeration has not started. Call MoveNext.",zc="The input sequence has an insufficient number of elements.",w0="Reset is not supported on this enumerator.";function y0(){throw new Error(w0)}function ia(){throw new Error($0)}function oa(){throw new Error(g0)}class b0{constructor(t){this.f=t}toString(){const t=this;let n=0,r="seq [";const s=ve(t);try{for(;n<4&&s["System.Collections.IEnumerator.MoveNext"]();)n>0&&(r=r+"; "),r=r+ot(s["System.Collections.Generic.IEnumerator`1.get_Current"]()),n=n+1|0;return n===4&&(r=r+"; ..."),r+"]"}finally{_e(s)}}GetEnumerator(){return this.f()}[Symbol.iterator](){return Kr(ve(this))}"System.Collections.IEnumerable.GetEnumerator"(){return this.f()}}function _0(e){return new b0(e)}class v0{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"(){y0()}Dispose(){this.dispose()}}function Ui(e,t,n){return new v0(e,t,n)}function x0(e){let t,n,r=!1,s=!1,i;const o=()=>{if(s=!0,n!=null){const a=O(n);try{_e(a)}finally{n=void 0}}if(t!=null){const a=O(t);try{_e(a)}finally{t=void 0}}};return Ui(()=>(r?s&&oa():ia(),i!=null?O(i):oa()),()=>{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{_e(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"](),ve(a)):(o(),l=!1)}else t=ve(e)}return O(l)}},()=>{s||o()})}function C0(e,t){return Ui(()=>t["System.Collections.Generic.IEnumerator`1.get_Current"](),()=>t["System.Collections.IEnumerator.MoveNext"](),()=>{try{_e(t)}finally{}})}function Hc(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 Ui(()=>(r||ia(),s!=null?O(s):oa()),()=>{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 S0(e,t){let n,r=t;return Ui(()=>{if(n!=null){const s=O(n)[0];return O(n)[1],s}else return ia()},()=>(n=e(r),n!=null?(O(n)[0],r=O(n)[1],!0):!1),()=>{})}function A0(e,t){t==null&&p0(e)}function ts(e){return _0(e)}function Dn(e){return A0("source",e),ve(e)}function k(e){return ts(()=>ve(e()))}function ji(e){return ts(()=>x0(e))}function k0(e,t){return ts(()=>S0(e,t))}function He(){return k(()=>new Array(0))}function x(e){return k(()=>Gp(e))}function d2(e){return e}function aa(e){return e instanceof pt?Cr(e):Array.from(e)}function J(e){return nn(e)?y(e):e instanceof pt?e:n0(e)}function Wc(e,t,n){return ts(()=>Hc(e,t,n))}function Gc(e,t,n){return ts(()=>{let r=-1;return Hc(e,s=>(r=r+1|0,t(r,s)),n)})}function R(e,t){return ji([e,t])}function ns(e,t){return Wc(()=>Dn(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=>{_e(n)})}function E0(e,t,n){const r=Dn(t);try{const s=Dn(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{_e(s)}}finally{_e(r)}}function rs(e,t,n){const r=Dn(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{_e(r)}}function I0(e,t){return ns(n=>{if(e(n))return lt(n)},t)}function Vs(e,t,n){const r=Dn(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{_e(r)}}function Sr(e,t){Vs((n,r)=>{e(r)},void 0,t)}function qc(e,t){Vs((n,r)=>(e(n,r),n+1|0),0,t)}function Ee(e,t){return Wc(()=>Dn(t),n=>n["System.Collections.IEnumerator.MoveNext"]()?lt(e(n["System.Collections.Generic.IEnumerator`1.get_Current"]())):void 0,n=>{_e(n)})}function la(e,t){return Gc(()=>Dn(t),(n,r)=>r["System.Collections.IEnumerator.MoveNext"]()?lt(e(n,r["System.Collections.Generic.IEnumerator`1.get_Current"]())):void 0,n=>{_e(n)})}function N0(e){return k(()=>qp(aa(e)))}function T0(e,t){return ts(()=>{const n=Dn(t);try{for(let r=1;r<=e;r++)if(!n["System.Collections.IEnumerator.MoveNext"]())throw new Error(zc+"\\nParameter name: source");return C0(()=>{},n)}catch(r){throw _e(n),r}})}function R0(e,t){return Gc(()=>Dn(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(zc+"\\nParameter name: source")}else return},n=>{_e(n)})}function Kc(e,t){return k(()=>ji(Ee(e,t)))}class Zc{constructor(t,n){this.k=t,this.v=n}}function zi(e,t){return new Zc(e,t)}function $t(e){return e.k}function kt(e){return e.v}class Xe extends Zc{constructor(t,n,r,s,i){super(t,n),this.left=r,this.right=s,this.h=i|0}}function Hi(e,t,n,r,s){return new Xe(e,t,n,r,s)}function xt(e){return e.left}function Ct(e){return e.right}function Ar(e){return e.h}function f2(){}function Jc(e,t){e:for(;;){const n=e,r=t;if(r!=null){const s=O(r);if(s instanceof Xe){const i=s;e=Jc(n+1,xt(i)),t=Ct(i);continue e}else return n+1|0}else return n|0}}function M0(e){return Jc(0,e)}function an(e,t,n,r){let s,i,o;const a=e;if(a!=null){const u=O(a);o=u instanceof Xe?(s=u,Ar(s)):1}else o=0;let l;const c=r;if(c!=null){const u=O(c);l=u instanceof Xe?(i=u,Ar(i)):1}else l=0;const d=(o<l?l:o)|0;return d===0?zi(t,n):Hi(t,n,e,r,d+1)}function Yc(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 Xe?(s=w,Ar(s)):1}else m=0;let p;const $=r;if($!=null){const w=O($);p=w instanceof Xe?(i=w,Ar(i)):1}else p=0;if(p>m+2){const w=O(r);if(w instanceof Xe){const S=w;if(o=xt(S),(o!=null?(a=O(o),a instanceof Xe?(l=a,Ar(l)):1):0)>m+1){const A=O(xt(S));if(A instanceof Xe){const E=A;return an(an(e,t,n,xt(E)),$t(E),kt(E),an(Ct(E),$t(S),kt(S),Ct(S)))}else throw new Error("internal error: Map.rebalance")}else return an(an(e,t,n,xt(S)),$t(S),kt(S),Ct(S))}else throw new Error("internal error: Map.rebalance")}else if(m>p+2){const w=O(e);if(w instanceof Xe){const S=w;if(c=Ct(S),(c!=null?(d=O(c),d instanceof Xe?(u=d,Ar(u)):1):0)>p+1){const A=O(Ct(S));if(A instanceof Xe){const E=A;return an(an(xt(S),$t(S),kt(S),xt(E)),$t(E),kt(E),an(Ct(E),t,n,r))}else throw new Error("internal error: Map.rebalance")}else return an(xt(S),$t(S),kt(S),an(Ct(S),t,n,r))}else throw new Error("internal error: Map.rebalance")}else return an(e,t,n,r)}function ss(e,t,n,r){if(r!=null){const s=O(r),i=e.Compare(t,$t(s))|0;if(s instanceof Xe){const o=s;return i<0?Yc(ss(e,t,n,xt(o)),$t(o),kt(o),Ct(o)):i===0?Hi(t,n,xt(o),Ct(o),Ar(o)):Yc(xt(o),$t(o),kt(o),ss(e,t,n,Ct(o)))}else return i<0?Hi(t,n,void 0,r,2):i===0?zi(t,n):Hi(t,n,r,void 0,2)}else return zi(t,n)}function Xc(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(kt(o));if(o instanceof Xe){const l=o;e=r,t=s,n=a<0?xt(l):Ct(l);continue e}else return}else return}}function P0(e,t,n){const r=Xc(e,t,n);if(r==null)throw new Error;return O(r)}function D0(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 Xe){const l=o;if(a<0){e=r,t=s,n=xt(l);continue e}else{if(a===0)return!0;e=r,t=s,n=Ct(l);continue e}}else return a===0}else return!1}}function Qc(e,t){e:for(;;){const n=e,r=t;if(r!=null){const s=O(r);if(s instanceof Xe){const i=s;Qc(n,xt(i)),n($t(i),kt(i)),e=n,t=Ct(i);continue e}else n($t(s),kt(s))}break}}function O0(e,t){Qc(e,t)}function F0(e){const t=(n,r)=>{e:for(;;){const s=n,i=r;if(s!=null){const o=O(s);if(o instanceof Xe){const a=o;n=xt(a),r=ut([$t(a),kt(a)],t(Ct(a),i));continue e}else return ut([$t(o),kt(o)],i)}else return i}};return t(e,Ve())}function V0(e,t,n){let r=n;O0((s,i)=>{Pt(t,r,[s,i]),r=r+1|0},e)}function L0(e,t){return bn((n,r)=>ss(e,r[0],r[1],n),void 0,t)}function B0(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=ss(r,o[0],o[1],s),n=i;continue e}else return s}}function U0(e,t){let n=void 0;for(let r=0;r<=t.length-1;r++){const s=ye(r,t);n=ss(e,s[0],s[1],n)}return n}function ca(e,t){if(nn(t))return U0(e,t);if(t instanceof pt)return L0(e,t);{const n=ve(t);try{return B0(e,void 0,n)}finally{_e(n)}}}class j0 extends Y{constructor(t,n){super(),this.stack=t,this.started=n}}function eu(e){e:for(;;){const t=e;if(Z(t))return Ve();{const n=C(t),r=L(t);if(r!=null){const s=O(r);if(s instanceof Xe){const i=s;e=Be([xt(i),zi($t(i),kt(i)),Ct(i)],n);continue e}else return t}else{e=n;continue e}}}}function tu(e){return new j0(eu(ee(e)),!1)}function z0(){throw new Error("enumeration not started")}function H0(){throw new Error("enumeration already finished")}function nu(e){if(e.started){const t=e.stack;if(Z(t))return H0();if(L(t)!=null){const n=O(L(t));if(n instanceof Xe)throw new Error("Please report error: Map iterator, unexpected stack for current");return[$t(n),kt(n)]}else throw new Error("Please report error: Map iterator, unexpected stack for current")}else return z0()}function W0(e){if(e.started){const t=e.stack;if(Z(t))return!1;if(L(t)!=null){if(O(L(t))instanceof Xe)throw new Error("Please report error: Map iterator, unexpected stack for moveNext");return e.stack=eu(C(t)),!Z(e.stack)}else throw new Error("Please report error: Map iterator, unexpected stack for moveNext")}else return e.started=!0,!Z(e.stack)}function ru(e){let t=tu(e);return{"System.Collections.Generic.IEnumerator`1.get_Current"(){return nu(t)},"System.Collections.IEnumerator.get_Current"(){return nu(t)},"System.Collections.IEnumerator.MoveNext"(){return W0(t)},"System.Collections.IEnumerator.Reset"(){t=tu(e)},Dispose(){}}}class Wi{constructor(t,n){this.comparer=t,this.tree=n}GetHashCode(){return Y0(this)|0}Equals(t){const n=this;if(t instanceof Wi){const r=t,s=ve(n);try{const i=ve(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 Se(l[0],c[0])&&Se(l[1],c[1])?o():!1}else return!0;else return!1};return o()}finally{_e(i)}}finally{_e(s)}}else return!1}toString(){return"map ["+re("; ",Ee(n=>Rc("({0}, {1})",n[0],n[1]),this))+"]"}get[Symbol.toStringTag](){return"FSharpMap"}toJSON(){const t=this;return Array.from(t)}GetEnumerator(){return ru(this.tree)}[Symbol.iterator](){return Kr(ve(this))}"System.Collections.IEnumerable.GetEnumerator"(){return ru(this.tree)}CompareTo(t){const n=this;if(t instanceof Wi)return E0((s,i)=>{const o=n.comparer.Compare(s[0],i[0])|0;return(o!==0?o:Xt(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 iu(n,t[0])&&Se(su(n,t[0]),t[1])}"System.Collections.Generic.ICollection`1.CopyToZ3B4C077E"(t,n){V0(this.tree,t,n)}"System.Collections.Generic.ICollection`1.get_IsReadOnly"(){return!0}"System.Collections.Generic.ICollection`1.get_Count"(){return ua(this)|0}"System.Collections.Generic.IReadOnlyCollection`1.get_Count"(){return ua(this)|0}get size(){return ua(this)|0}clear(){throw new Error("Map cannot be mutated")}delete(t){throw new Error("Map cannot be mutated")}entries(){return Ee(n=>[n[0],n[1]],this)}get(t){return su(this,t)}has(t){return iu(this,t)}keys(){return Ee(n=>n[0],this)}set(t,n){throw new Error("Map cannot be mutated")}values(){return Ee(n=>n[1],this)}forEach(t,n){const r=this;Sr(s=>{t(s[1],s[0],r)},r)}}function Ls(e,t){return new Wi(e,t)}function G0(e){return Ls(e,void 0)}function q0(e,t,n){return Ls(e.comparer,ss(e.comparer,t,n,e.tree))}function K0(e){return e.tree==null}function su(e,t){return P0(e.comparer,t,e.tree)}function ua(e){return M0(e.tree)}function iu(e,t){return D0(e.comparer,t,e.tree)}function Z0(e,t){return Xc(e.comparer,t,e.tree)}function J0(e){return F0(e.tree)}function Y0(e){const t=(s,i)=>(s<<1)+i+631;let n=0;const r=ve(e);try{for(;r["System.Collections.IEnumerator.MoveNext"]();){const s=r["System.Collections.Generic.IEnumerator`1.get_Current"]();n=t(n,Tn(s[0]))|0,n=t(n,Tn(s[1]))|0}}finally{_e(r)}return n|0}function Gi(e){return K0(e)}function ou(e,t,n){return q0(n,e,t)}function Bs(e,t){return Z0(t,e)}function au(e,t){return Ls(t,ca(t,e))}function X0(e,t){return Ls(t,ca(t,e))}function Q0(e,t){return Ls(t,ca(t,e))}function lu(e){return J0(e)}function Us(e){return G0(e)}class eg extends B{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["Name"]}}function cu(e){return new eg(e)}function da(e){return e.fields[0]}class tg extends B{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["Website"]}}class ng extends B{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["FirstName"]}}class rg extends B{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["LastName"]}}class sg extends B{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["Email"]}}class ig extends B{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["MobilePhone"]}}class og extends B{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["ExternalId"]}}let ag=class extends Y{constructor(t,n,r,s){super(),this.FirstName=t,this.LastName=n,this.Email=r,this.MobilePhone=s}};class lg extends B{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["Notes"]}}class cg extends B{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["PartnerId"]}}function Dt(e){return e.fields[0]}function Le(e){return new cg(e)}function qi(e){return Dt(e)}class ug extends B{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["AccountId"]}}function ln(e){return e.fields[0]}function Gt(e){return new ug(e)}function Ki(e){return ln(e)}class dg extends B{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["BusinessName"]}}class fg extends B{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["BusinessNumber"]}}class hg extends B{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["Address1"]}}class mg extends B{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["Address2"]}}class pg extends B{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["City"]}}class gg extends B{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["Postcode"]}}let $g=class extends B{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["State"]}};class wg extends B{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["SalesforceParentRecordId"]}}class yg extends B{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["ExternalApi","Admin"]}}new yg(0,[]);const kr={None:0,LowerFirst:1,SnakeCase:2,SnakeCaseAllCaps:3,KebabCase:4};function fa(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 bg(e,t){switch(t){case kr.LowerFirst:return e.charAt(0).toLowerCase()+e.slice(1);case kr.SnakeCase:return fa(e,"_");case kr.SnakeCaseAllCaps:return fa(e,"_").toUpperCase();case kr.KebabCase:return fa(e,"-");case kr.None:default:return e}}function rr(e,t=kr.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=bg(o,a),n[o]=l}for(let o of e){let a=kr.None;if(o==null&&s(o),o instanceof B){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 ha(e,t,n){return e.has(t)?(n.contents=e.get(t),!0):!1}function _g(e,t){return t.has(e)?!1:(t.add(e),!0)}function Er(e,t){if(e.has(t))return e.get(t);throw new Error(`The given key '${t}' was not present in the dictionary.`)}class vg{constructor(t,n){const r=new at(ie());this.comparer=n,r.contents=this,this.hashMap=new Map([]),this["init@9"]=1;const s=ve(t);try{for(;s["System.Collections.IEnumerator.MoveNext"]();){const i=s["System.Collections.Generic.IEnumerator`1.get_Current"]();ma(r.contents,i[0],i[1])}}finally{_e(s)}}get[Symbol.toStringTag](){return"Dictionary"}toJSON(){const t=this;return Array.from(t)}"System.Collections.IEnumerable.GetEnumerator"(){return ve(this)}GetEnumerator(){return ve(ji(this.hashMap.values()))}[Symbol.iterator](){return Kr(ve(this))}"System.Collections.Generic.ICollection`1.Add2B595"(t){ma(this,t[0],t[1])}"System.Collections.Generic.ICollection`1.Clear"(){uu(this)}"System.Collections.Generic.ICollection`1.Contains2B595"(t){const r=Zi(this,t[0]);let s;switch(r!=null&&Se(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){qc((s,i)=>{Pt(t,n+s,i)},this)}"System.Collections.Generic.ICollection`1.get_Count"(){return du(this)|0}"System.Collections.Generic.ICollection`1.get_IsReadOnly"(){return!1}"System.Collections.Generic.ICollection`1.Remove2B595"(t){const n=this,r=Zi(n,t[0]);return r!=null?(Se(O(r)[1],t[1])&&pa(n,t[0]),!0):!1}"System.Collections.Generic.IDictionary`2.Add5BDDA1"(t,n){ma(this,t,n)}"System.Collections.Generic.IDictionary`2.ContainsKey2B595"(t){return mu(this,t)}"System.Collections.Generic.IDictionary`2.get_Item2B595"(t){return fu(this,t)}"System.Collections.Generic.IDictionary`2.set_Item5BDDA1"(t,n){hu(this,t,n)}"System.Collections.Generic.IDictionary`2.get_Keys"(){const t=this;return aa(k(()=>Ee(n=>n[0],t)))}"System.Collections.Generic.IDictionary`2.Remove2B595"(t){return pa(this,t)}"System.Collections.Generic.IDictionary`2.TryGetValue6DC89625"(t,n){const s=Zi(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 aa(k(()=>Ee(n=>n[1],t)))}get size(){return du(this)|0}clear(){uu(this)}delete(t){return pa(this,t)}entries(){return Ee(n=>[n[0],n[1]],this)}get(t){return fu(this,t)}has(t){return mu(this,t)}keys(){return Ee(n=>n[0],this)}set(t,n){const r=this;return hu(r,t,n),r}values(){return Ee(n=>n[1],this)}forEach(t,n){const r=this;Sr(s=>{t(s[1],s[0],r)},r)}}function js(e,t){const n=e.comparer.GetHashCode(t)|0;let r,s=ie();return r=[ha(e.hashMap,n,new at(()=>s,i=>{s=i})),s],r[0]?[!0,n,r[1].findIndex(i=>e.comparer.Equals(t,i[0]))]:[!1,n,-1]}function Zi(e,t){const n=js(e,t);let r;switch(n[0]&&n[2]>-1?r=0:r=1,r){case 0:return Er(e.hashMap,n[1])[n[2]];default:return}}function uu(e){e.hashMap.clear()}function du(e){let t=0,n=ve(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{_e(n)}return t|0}function fu(e,t){const n=Zi(e,t);if(n!=null)return O(n)[1];throw new Error("The item was not found in collection")}function hu(e,t,n){const r=js(e,t);r[0]?r[2]>-1?Er(e.hashMap,r[1])[r[2]]=[t,n]:Er(e.hashMap,r[1]).push([t,n]):e.hashMap.set(r[1],[[t,n]])}function ma(e,t,n){const r=js(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));Er(e.hashMap,r[1]).push([t,n])}else e.hashMap.set(r[1],[[t,n]])}function mu(e,t){const n=js(e,t);let r;switch(n[0]&&n[2]>-1?r=0:r=1,r){case 0:return!0;default:return!1}}function pa(e,t){const n=js(e,t);let r;switch(n[0]&&n[2]>-1?r=0:r=1,r){case 0:return Er(e.hashMap,n[1]).splice(n[2],1),!0;default:return!1}}function xg(e){return new pu(0,[e])}function Cg(e){return new pu(1,[e])}class pu extends B{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Choice1Of2","Choice2Of2"]}}function Sg(e){return xg(e)}function Ag(e){return Cg(e)}const kg=/^[\(\{]{0,2}[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}[\)\}]{0,2}$/,gu=/^([0-9a-f]{8})([0-9a-f]{4})([0-9a-f]{4})([0-9a-f]{4})([0-9a-f]{12})$/,Eg=/^\{0x[0-9a-f]{8},(0x[0-9a-f]{4},){2}\{(0x[0-9a-f]{2},){7}0x[0-9a-f]{2}\}\}$/;function Ig(e){function t(r){return r.replace(gu,"$1-$2-$3-$4-$5")}const n=e.trim().toLowerCase();if(kg.test(n))return Up(n,"{","}","(",")");if(gu.test(n))return t(n);if(Eg.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 Ng(e,t){try{return t.contents=Ig(e),!0}catch{return!1}}class $u extends B{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["StreamId"]}}function is(e){return e.fields[0]}var ga;(function(e){e[e.AllowHexSpecifier=512]="AllowHexSpecifier"})(ga||(ga={}));function Tg(e,t){const[,n,r,s]=e;return{sign:n||"",prefix:r||"",digits:s,radix:t}}function wu(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 Rg(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 Mg(e,t){if(t&ga.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 Pg(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||Mg(i,t),!Rg(n).test(o))return Tg(s,n)}return null}function Dg(e,t,n,r,s){const i=Pg(e,t,s);if(i!=null){let o=Number.parseInt(i.sign+i.digits,i.radix);if(!Number.isNaN(o)){const[a,l]=wu(!0,r);!n&&i.radix!==10&&o>=a&&o<=l&&(o=o<<32-r>>32-r);const[c,d]=wu(n,r);if(o>=c&&o<=d)return o}}throw new Error(`The input string ${e} was not in a correct format.`)}function os(e,t,n,r,s){try{return s.contents=Dg(e,t,n,r),!0}catch{return!1}}const Og="#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ƒ£ē︳𐀡%𐀡",Fg="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 Vg(){const t=[...Og].map(i=>(i.codePointAt(0)??0)-35),n=[...Fg].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 Lg=256,Bg=Vg();function Ug(e,t){if(t<e.length)return e.charCodeAt(t);throw new Error("Index out of range.")}const jg=e=>Hg(e,0);function zg(e,t){const n=Ug(e,t);return Bg(n)}function Hg(e,t){return(1<<zg(e,t)&Lg)!==0}function Wg(e,t){const n=Dp(Cc(e),t);if(n!=null)return C(J(k(()=>Ee(r=>r||"",n))))}function Gg(e){let t;const n=Wg(".*?@(.*)",e);switch(n!=null?Z(n)?t=1:Z(C(n))?t=0:t=1:t=1,t){case 0:return e;default:return}}function qg(e,t){return t.length<=e?new g(0,[t]):new g(1,[`Value exceeds maximum length of ${e}`])}function Ot(e,t){return Oi(t)?new g(1,[sn(en("%s cannot be null or empty"))(e)]):new g(0,[t])}function Kg(e){const t=Gg(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 Zg(e){return~~e.charCodeAt(0)-48}function Jg(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=tr(Zg,(t=e.split(""),t.filter(jg)),Int32Array);return s.length===11?(Pt(s,0,ye(0,s)-1|0),Yp(Wp((i,o)=>i*o,s,r,Int32Array),{GetZero:()=>0,Add:(i,o)=>i+o})%89===0?new g(0,[e]):n):n}function $a(e){const t=Ot("Name",e);return t.tag===1?new g(1,[t.fields[0]]):new g(0,[cu(t.fields[0])])}function Ji(e){return da(e)}function yu(e){const t=Ot("Website",e);return t.tag===1?new g(1,[t.fields[0]]):new g(0,[new tg(t.fields[0])])}function bu(e){return e.fields[0]}function _u(e){const t=Ot("FirstName",e);return t.tag===1?new g(1,[t.fields[0]]):new g(0,[new ng(t.fields[0])])}function vu(e){return e.fields[0]}function xu(e){const t=Ot("LastName",e);return t.tag===1?new g(1,[t.fields[0]]):new g(0,[new rg(t.fields[0])])}function Cu(e){return e.fields[0]}function Su(e){let t;const n=Ot("Email",e);return t=n.tag===1?new g(1,[n.fields[0]]):Kg(n.fields[0]),t.tag===1?new g(1,[t.fields[0]]):new g(0,[new sg(t.fields[0])])}function Au(e){const t=Ot("MobilePhone",e);return t.tag===1?new g(1,[t.fields[0]]):new g(0,[new ig(t.fields[0])])}function ku(e){return e.fields[0]}class Eu extends Y{constructor(t,n,r,s){super(),this.FirstName=t,this.LastName=n,this.Email=r,this.MobilePhone=s}}function wa(){return Je("AccountRegistry.Shared.Primitives.ContactDetails",[],Eu,()=>[["FirstName",W],["LastName",W],["Email",W],["MobilePhone",W]])}function Yg(e){const t=_u(e.FirstName);if(t.tag===1)return new g(1,[t.fields[0]]);{const n=xu(e.LastName);if(n.tag===1)return new g(1,[n.fields[0]]);{const r=Su(e.Email);if(r.tag===1)return new g(1,[r.fields[0]]);{const s=Au(e.MobilePhone);return s.tag===1?new g(1,[s.fields[0]]):new g(0,[new ag(t.fields[0],n.fields[0],r.fields[0],s.fields[0])])}}}}function Xg(e){const t=e;if(t!=null)return new lg(t)}function Qg(e){if(e!=null)return e.fields[0]}const e$=e=>{let t;const n=Ot("ExternalId",e);return t=n.tag===1?new g(1,[n.fields[0]]):qg(60,n.fields[0]),t.tag===1?new g(1,[t.fields[0]]):new g(0,[new og(t.fields[0])])};function dt(e){return Dt(e)}function _n(e){return ln(e)}function Iu(e){const t=Ot("BusinessName",e);return t.tag===1?new g(1,[t.fields[0]]):new g(0,[new dg(t.fields[0])])}function Nu(e){let t;const n=Ot("BusinessNumber",e);return t=n.tag===1?new g(1,[n.fields[0]]):Jg(n.fields[0]),t.tag===1?new g(1,[t.fields[0]]):new g(0,[new fg(t.fields[0])])}function t$(e){const t=Ot("Address1",e);return t.tag===1?new g(1,[t.fields[0]]):new g(0,[new hg(t.fields[0])])}function n$(e){const t=e;if(t!=null)return new mg(t)}function r$(e){const t=Ot("City",e);return t.tag===1?new g(1,[t.fields[0]]):new g(0,[new pg(t.fields[0])])}function s$(e){const t=Ot("Postcode",e);return t.tag===1?new g(1,[t.fields[0]]):new g(0,[new gg(t.fields[0])])}function i$(e){const t=Ot("State",e);return t.tag===1?new g(1,[t.fields[0]]):new g(0,[new $g(t.fields[0])])}class Tu extends Y{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 o$(){return Je("AccountRegistry.Shared.Primitives.LegalEntity",[],Tu,()=>[["BusinessName",W],["BusinessNumber",W],["Address1",W],["Address2",$e(W)],["City",W],["Postcode",W],["State",$e(W)],["Phone",W],["CountryCode",$e(W)]])}function a$(e){const t=Ot("SalesforceParentRecordId",e);return t.tag===1?new g(1,[t.fields[0]]):new g(0,[new wg(t.fields[0])])}class Ru extends Y{constructor(t,n){super(),this.SalesforceParentRecordId=t,this.SalesforceRecordId=n}}function l$(){return Je("AccountRegistry.Shared.Primitives.SalesforceInfo",[],Ru,()=>[["SalesforceParentRecordId",W],["SalesforceRecordId",$e(W)]])}class Mu extends Y{constructor(t,n){super(),this.Code=t,this.Name=n}}function c$(){return Je("AccountRegistry.Shared.Primitives.AnzsicClassifier",[],Mu,()=>[["Code",W],["Name",W]])}class ya extends B{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Api","Direct"]}}function Yi(){return Wo("AccountRegistry.Shared.Primitives.AccountProvisioningModeDto",[],ya,()=>[[],[]])}function Pu(e){return e.tag===1?"Direct":"API"}let u$=class extends Y{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 d$(){return Je("AccountRegistry.Shared.AdminApi.Partner",[],u$,()=>[["StreamId",W],["Name",W],["Website",W],["ContactDetails",$e(wa())],["Notes",$e(W)],["AccountProvisioningMode",Yi()]])}class Du extends Y{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 f$(){return Je("AccountRegistry.Shared.AdminApi.Account",[],Du,()=>[["StreamId",W],["PartnerId",W],["Name",W],["Website",W],["ContactDetails",$e(wa())],["Notes",$e(W)],["LegalEntity",$e(o$())],["ExternalId",$e(W)],["ChannelId",$e(W)],["ProvisioningMode",Yi()]])}class h$ extends Y{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 m$(){return Je("AccountRegistry.Shared.AdminApi.AccountLookupItem",[],h$,()=>[["AccountId",W],["Name",W],["Contact",$e(W)],["ContactMobilePhone",$e(W)],["Website",W],["BusinessName",$e(W)],["BusinessNumber",$e(W)],["ExternalId",$e(W)],["ChannelId",$e(W)],["ProvisioningMode",Yi()]])}class Ou extends Y{constructor(t,n){super(),this.Accounts=t,this.Token=n}}function p$(){return Je("AccountRegistry.Shared.AdminApi.AccountLookup",[],Ou,()=>[["Accounts",Go(m$())],["Token",$e(W)]])}class g$ extends Y{constructor(t,n){super(),this.PartnerId=t,this.AccountId=n}}function $$(){return Je("AccountRegistry.Shared.AdminApi.FindAccountResponse",[],g$,()=>[["PartnerId",W],["AccountId",W]])}class w$ extends Y{constructor(t,n){super(),this.ClassCode=t,this.ClassTitle=n}}function y$(){return Je("AccountRegistry.Shared.AdminApi.AnzsicClass",[],w$,()=>[["ClassCode",W],["ClassTitle",W]])}class b$ extends Y{constructor(t,n,r){super(),this.GroupCode=t,this.GroupTitle=n,this.Classes=r}}function _$(){return Je("AccountRegistry.Shared.AdminApi.AnzsicGroup",[],b$,()=>[["GroupCode",W],["GroupTitle",W],["Classes",ac(y$())]])}class v$ extends B{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Success","TooManyResults"]}}function x$(){return Wo("AccountRegistry.Shared.AdminApi.AnzsicSearchResult",[],v$,()=>[[["Item",ac(_$())]],[]])}class Fu extends Y{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 C$(){return Je("AccountRegistry.Shared.AdminApi.Write.LegalEntityV2",[],Fu,()=>[["BusinessName",W],["BusinessNumber",W],["Address1",W],["Address2",$e(W)],["City",W],["Postcode",W],["State",$e(W)],["Phone",W],["CountryCode",W]])}class Vu extends Y{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 S$(){return Je("AccountRegistry.Shared.AdminApi.Write.AccountPost",[],Vu,()=>[["Name",W],["Website",W],["ContactDetails",wa()],["Notes",$e(W)],["LegalEntity",$e(C$())],["ExternalId",$e(W)],["ChannelId",$e(W)],["SalesforceInfo",$e(l$())],["AnzsicClassifier",$e(c$())]])}class A$ extends Y{constructor(t){super(),this.Id=t}}function k$(){return Je("AccountRegistry.Shared.AdminApi.Write.AccountPostResponse",[],A$,()=>[["Id",W]])}class Lu extends Y{constructor(t,n,r,s){super(),this.Name=t,this.ExternalId=n,this.BusinessName=r,this.BusinessNumber=s}}function E$(){return Je("AccountRegistry.Shared.AdminApi.Write.PatchAccountDto",[],Lu,()=>[["Name",$e(W)],["ExternalId",$e(W)],["BusinessName",$e(W)],["BusinessNumber",$e(W)]])}class Bu extends Y{constructor(t){super(),this.ProvisioningMode=t}}function I$(){return Je("AccountRegistry.Shared.AdminApi.Write.UpdateAccountProvisioningModeDto",[],Bu,()=>[["ProvisioningMode",Yi()]])}class Uu extends Y{constructor(t,n,r){super(),this.Issuer=t,this.OpenIdConfigUrl=n,this.RequiredClaims=r}}function ju(){return Je("AccountRegistry.Shared.AdminApi.Write.AdvancedSecurityConfigurationDataDto",[],Uu,()=>[["Issuer",W],["OpenIdConfigUrl",$e(W)],["RequiredClaims",Ti("Microsoft.FSharp.Collections.FSharpMap`2",[W,W])]])}class ba extends Y{constructor(t){super(),this.Configuration=t}}function zu(){return Je("AccountRegistry.Shared.AdminApi.Write.AdvancedSecurityConfigurationRequest",[],ba,()=>[["Configuration",$e(ju())]])}class N$ extends Y{constructor(t){super(),this.Configuration=t}}function _a(){return Je("AccountRegistry.Shared.AdminApi.Write.AdvancedSecurityConfigurationResponse",[],N$,()=>[["Configuration",$e(ju())]])}var zs,ae,Hu,Ir,Wu,Gu,va,xa,Ca,Sa,qu,Hs={},Ku=[],T$=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Xi=Array.isArray;function On(e,t){for(var n in t)e[n]=t[n];return e}function Zu(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?zs.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 Ws(e,o,r,s,null)}function Ws(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??++Hu,__i:-1,__u:0};return s==null&&ae.vnode!=null&&ae.vnode(i),i}function Aa(){return{current:null}}function be(e){return e.children}function cn(e,t){this.props=e,this.context=t}function Nr(e,t){if(t==null)return e.__?Nr(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"?Nr(e):null}function Ju(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 Ju(e)}}function ka(e){(!e.__d&&(e.__d=!0)&&Ir.push(e)&&!Qi.__r++||Wu!==ae.debounceRendering)&&((Wu=ae.debounceRendering)||Gu)(Qi)}function Qi(){var e,t,n,r,s,i,o,a;for(Ir.sort(va);e=Ir.shift();)e.__d&&(t=Ir.length,r=void 0,i=(s=(n=e).__v).__e,o=[],a=[],n.__P&&((r=On({},s)).__v=s.__v+1,ae.vnode&&ae.vnode(r),Ea(n.__P,r,s,n.__n,n.__P.namespaceURI,32&s.__u?[i]:null,o,i??Nr(s),!!(32&s.__u),a),r.__v=s.__v,r.__.__k[r.__i]=r,td(o,r,a),r.__e!=i&&Ju(r)),Ir.length>t&&Ir.sort(va));Qi.__r=0}function Yu(e,t,n,r,s,i,o,a,l,c,d){var u,m,h,p,$,w=r&&r.__k||Ku,S=t.length;for(n.__d=l,R$(n,t,w),l=n.__d,u=0;u<S;u++)(h=n.__k[u])!=null&&typeof h!="boolean"&&typeof h!="function"&&(m=h.__i===-1?Hs:w[h.__i]||Hs,h.__i=u,Ea(e,h,m,s,i,o,a,l,c,d),p=h.__e,h.ref&&m.ref!=h.ref&&(m.ref&&Ia(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=Nr(m)),l=Xu(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 R$(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?Ws(null,s,null,null,null):Xi(s)?Ws(be,{children:s},null,null,null):s.constructor===void 0&&s.__b>0?Ws(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):s)!=null?(s.__=e,s.__b=e.__b+1,a=M$(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=Nr(i)),Na(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=Nr(i)),Na(i,i))}function Xu(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=Xu(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 Fn(e,t){return t=t||[],e==null||typeof e=="boolean"||(Xi(e)?e.some(function(n){Fn(n,t)}):t.push(e)),t}function M$(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 Qu(e,t,n){t[0]==="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||T$.test(t)?n:n+"px"}function eo(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||Qu(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||Qu(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=xa,e.addEventListener(t,i?Sa:Ca,i)):e.removeEventListener(t,i?Sa:Ca,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 ed(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t.t==null)t.t=xa++;else if(t.t<n.u)return;return n(ae.event?ae.event(t):t)}}}function Ea(e,t,n,r,s,i,o,a,l,c){var d,u,m,h,p,$,w,S,A,E,P,V,ne,we,Ae,he=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(l=!!(32&n.__u),i=[a=t.__e=n.__e]),(d=ae.__b)&&d(t);e:if(typeof he=="function")try{if(S=t.props,A=(d=he.contextType)&&r[d.__c],E=d?A?A.props.value:d.__:r,n.__c?w=(u=t.__c=n.__c).__=u.__E:("prototype"in he&&he.prototype.render?t.__c=u=new he(S,E):(t.__c=u=new cn(S,E),u.constructor=he,u.render=D$),A&&A.sub(u),u.props=S,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),he.getDerivedStateFromProps!=null&&(u.__s==u.state&&(u.__s=On({},u.__s)),On(u.__s,he.getDerivedStateFromProps(S,u.__s))),h=u.props,p=u.state,u.__v=t,m)he.getDerivedStateFromProps==null&&u.componentWillMount!=null&&u.componentWillMount(),u.componentDidMount!=null&&u.__h.push(u.componentDidMount);else{if(he.getDerivedStateFromProps==null&&S!==h&&u.componentWillReceiveProps!=null&&u.componentWillReceiveProps(S,E),!u.__e&&(u.shouldComponentUpdate!=null&&u.shouldComponentUpdate(S,u.__s,E)===!1||t.__v===n.__v)){for(t.__v!==n.__v&&(u.props=S,u.state=u.__s,u.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function(te){te&&(te.__=t)}),P=0;P<u._sb.length;P++)u.__h.push(u._sb[P]);u._sb=[],u.__h.length&&o.push(u);break e}u.componentWillUpdate!=null&&u.componentWillUpdate(S,u.__s,E),u.componentDidUpdate!=null&&u.__h.push(function(){u.componentDidUpdate(h,p,$)})}if(u.context=E,u.props=S,u.__P=e,u.__e=!1,V=ae.__r,ne=0,"prototype"in he&&he.prototype.render){for(u.state=u.__s,u.__d=!1,V&&V(t),d=u.render(u.props,u.state,u.context),we=0;we<u._sb.length;we++)u.__h.push(u._sb[we]);u._sb=[]}else do u.__d=!1,V&&V(t),d=u.render(u.props,u.state,u.context),u.state=u.__s;while(u.__d&&++ne<25);u.state=u.__s,u.getChildContext!=null&&(r=On(On({},r),u.getChildContext())),m||u.getSnapshotBeforeUpdate==null||($=u.getSnapshotBeforeUpdate(h,p)),Yu(e,Xi(Ae=d!=null&&d.type===be&&d.key==null?d.props.children:d)?Ae:[Ae],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(te){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),ae.__e(te,t,n)}else i==null&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=P$(n.__e,t,n,r,s,i,o,l,c);(d=ae.diffed)&&d(t)}function td(e,t,n){t.__d=void 0;for(var r=0;r<n.length;r++)Ia(n[r],n[++r],n[++r]);ae.__c&&ae.__c(t,e),e.some(function(s){try{e=s.__h,s.__h=[],e.some(function(i){i.call(s)})}catch(i){ae.__e(i,s.__v)}})}function P$(e,t,n,r,s,i,o,a,l){var c,d,u,m,h,p,$,w=n.props,S=t.props,A=t.type;if(A==="svg"?s="http://www.w3.org/2000/svg":A==="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==!!A&&(A?h.localName===A:h.nodeType===3)){e=h,i[c]=null;break}}if(e==null){if(A===null)return document.createTextNode(S);e=document.createElementNS(s,A,S.is&&S),i=null,a=!1}if(A===null)w===S||a&&e.data===S||(e.data=S);else{if(i=i&&zs.call(e.childNodes),w=n.props||Hs,!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 S)){if(c=="value"&&"defaultValue"in S||c=="checked"&&"defaultChecked"in S)continue;eo(e,c,null,h,s)}}for(c in S)h=S[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||eo(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=""),Yu(e,Xi(m)?m:[m],t,n,r,A==="foreignObject"?"http://www.w3.org/1999/xhtml":s,i,o,i?i[0]:n.__k&&Nr(n,0),a,l),i!=null)for(c=i.length;c--;)i[c]!=null&&Zu(i[c]);a||(c="value",p!==void 0&&(p!==e[c]||A==="progress"&&!p||A==="option"&&p!==w[c])&&eo(e,c,p,w[c],s),c="checked",$!==void 0&&$!==e[c]&&eo(e,c,$,w[c],s))}return e}function Ia(e,t,n){try{typeof e=="function"?e(t):e.current=t}catch(r){ae.__e(r,n)}}function Na(e,t,n){var r,s;if(ae.unmount&&ae.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||Ia(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(i){ae.__e(i,t)}r.base=r.__P=null}if(r=e.__k)for(s=0;s<r.length;s++)r[s]&&Na(r[s],t,n||typeof e.type!="function");n||e.__e==null||Zu(e.__e),e.__c=e.__=e.__e=e.__d=void 0}function D$(e,t,n){return this.constructor(e,n)}function sr(e,t,n){var r,s,i,o;ae.__&&ae.__(e,t),s=(r=typeof n=="function")?null:n&&n.__k||t.__k,i=[],o=[],Ea(t,e=(!r&&n||t).__k=f(be,null,[e]),s||Hs,Hs,t.namespaceURI,!r&&n?[n]:s?null:t.firstChild?zs.call(t.childNodes):null,i,!r&&n?n:s?s.__e:t.firstChild,r,o),td(i,e,o)}function Ta(e,t){sr(e,t,Ta)}function Ra(e,t,n){var r,s,i,o,a=On({},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?zs.call(arguments,2):n),Ws(e.type,a,r||e.key,s||e.ref,null)}function ir(e,t){var n={__c:t="__cC"+qu++,__: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,ka(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}zs=Ku.slice,ae={__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}},Hu=0,cn.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=On({},this.state),typeof e=="function"&&(e=e(On({},n),this.props)),e&&On(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),ka(this))},cn.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),ka(this))},cn.prototype.render=be,Ir=[],Gu=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,va=function(e,t){return e.__v.__b-t.__v.__b},Qi.__r=0,xa=0,Ca=ed(!1),Sa=ed(!0),qu=0;var Vn,Ie,Ma,nd,as=0,rd=[],to=[],Ue=ae,sd=Ue.__b,id=Ue.__r,od=Ue.diffed,ad=Ue.__c,ld=Ue.unmount,cd=Ue.__;function Tr(e,t){Ue.__h&&Ue.__h(Ie,e,as||t),as=0;var n=Ie.__H||(Ie.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:to}),n.__[e]}function et(e){return as=1,ls(dd,e)}function ls(e,t,n){var r=Tr(Vn++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):dd(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=Ie,!Ie.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))};Ie.u=!0;var i=Ie.shouldComponentUpdate,o=Ie.componentWillUpdate;Ie.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)},Ie.shouldComponentUpdate=s}return r.__N||r.__}function Pe(e,t){var n=Tr(Vn++,3);!Ue.__s&&Va(n.__H,t)&&(n.__=e,n.i=t,Ie.__H.__h.push(n))}function Ln(e,t){var n=Tr(Vn++,4);!Ue.__s&&Va(n.__H,t)&&(n.__=e,n.i=t,Ie.__h.push(n))}function ge(e){return as=5,wt(function(){return{current:e}},[])}function Pa(e,t,n){as=6,Ln(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 wt(e,t){var n=Tr(Vn++,7);return Va(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function or(e,t){return as=8,wt(function(){return e},t)}function vn(e){var t=Ie.context[e.__c],n=Tr(Vn++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(Ie)),t.props.value):e.__}function Da(e,t){Ue.useDebugValue&&Ue.useDebugValue(t?t(e):e)}function O$(e){var t=Tr(Vn++,10),n=et();return t.__=e,Ie.componentDidCatch||(Ie.componentDidCatch=function(r,s){t.__&&t.__(r,s),n[1](r)}),[n[0],function(){n[1](void 0)}]}function Oa(){var e=Tr(Vn++,11);if(!e.__){for(var t=Ie.__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 F$(){for(var e;e=rd.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(no),e.__H.__h.forEach(Fa),e.__H.__h=[]}catch(t){e.__H.__h=[],Ue.__e(t,e.__v)}}Ue.__b=function(e){Ie=null,sd&&sd(e)},Ue.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),cd&&cd(e,t)},Ue.__r=function(e){id&&id(e),Vn=0;var t=(Ie=e.__c).__H;t&&(Ma===Ie?(t.__h=[],Ie.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=to,n.__N=n.i=void 0})):(t.__h.forEach(no),t.__h.forEach(Fa),t.__h=[],Vn=0)),Ma=Ie},Ue.diffed=function(e){od&&od(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(rd.push(t)!==1&&nd===Ue.requestAnimationFrame||((nd=Ue.requestAnimationFrame)||V$)(F$)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==to&&(n.__=n.__V),n.i=void 0,n.__V=to})),Ma=Ie=null},Ue.__c=function(e,t){t.some(function(n){try{n.__h.forEach(no),n.__h=n.__h.filter(function(r){return!r.__||Fa(r)})}catch(r){t.some(function(s){s.__h&&(s.__h=[])}),t=[],Ue.__e(r,n.__v)}}),ad&&ad(e,t)},Ue.unmount=function(e){ld&&ld(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{no(r)}catch(s){t=s}}),n.__H=void 0,t&&Ue.__e(t,n.__v))};var ud=typeof requestAnimationFrame=="function";function V$(e){var t,n=function(){clearTimeout(r),ud&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);ud&&(t=requestAnimationFrame(n))}function no(e){var t=Ie,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),Ie=t}function Fa(e){var t=Ie;e.__c=e.__(),Ie=t}function Va(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function dd(e,t){return typeof t=="function"?t(e):t}function fd(e,t){for(var n in t)e[n]=t[n];return e}function La(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 ro(e,t){this.props=e,this.context=t}function hd(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:La(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}(ro.prototype=new cn).isPureReactComponent=!0,ro.prototype.shouldComponentUpdate=function(e,t){return La(this.props,e)||La(this.state,t)};var md=ae.__b;ae.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),md&&md(e)};var L$=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function ar(e){function t(n){var r=fd({},n);return delete r.ref,e(r,n.ref||null)}return t.$$typeof=L$,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var pd=function(e,t){return e==null?null:Fn(Fn(e).map(t))},gd={map:pd,forEach:pd,count:function(e){return e?Fn(e).length:0},only:function(e){var t=Fn(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:Fn},B$=ae.__e;ae.__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)}B$(e,t,n,r)};var $d=ae.unmount;function wd(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=fd({},e)).__c!=null&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(r){return wd(r,t,n)})),e}function yd(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(r){return yd(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 Gs(){this.__u=0,this.t=null,this.__b=null}function bd(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function _d(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 cs(){this.u=null,this.o=null}ae.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),$d&&$d(e)},(Gs.prototype=new cn).__c=function(e,t){var n=t.__c,r=this;r.t==null&&(r.t=[]),r.t.push(n);var s=bd(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]=yd(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)},Gs.prototype.componentWillUnmount=function(){this.t=[]},Gs.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]=wd(this.__b,n,r.__O=r.__P)}this.__b=null}var s=t.__a&&f(be,null,e.fallback);return s&&(s.__u&=-33),[f(be,null,t.__a?null:e.children),s]};var vd=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 U$(e){return this.getChildContext=function(){return e.context},e.children}function j$(e){var t=this,n=e.i;t.componentWillUnmount=function(){sr(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)}}),sr(f(U$,{context:t.context},e.__v),t.l)}function xd(e,t){var n=f(j$,{__v:e,i:t});return n.containerInfo=t,n}(cs.prototype=new cn).__a=function(e){var t=this,n=bd(t.__v),r=t.o.get(e);return r[0]++,function(s){var i=function(){t.props.revealOrder?(r.push(s),vd(t,e,r)):s()};n?n(i):i()}},cs.prototype.render=function(e){this.u=null,this.o=new Map;var t=Fn(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},cs.prototype.componentDidUpdate=cs.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,n){vd(e,n,t)})};var Cd=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,z$=/^(?: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]/,H$=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,W$=/[A-Z0-9]/g,G$=typeof document<"u",q$=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function Sd(e,t,n){return t.__k==null&&(t.textContent=""),sr(e,t),typeof n=="function"&&n(),e?e.__c:null}function Ad(e,t,n){return Ta(e,t),typeof n=="function"&&n(),e?e.__c:null}cn.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(cn.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var kd=ae.event;function K$(){}function Z$(){return this.cancelBubble}function J$(){return this.defaultPrevented}ae.event=function(e){return kd&&(e=kd(e)),e.persist=K$,e.isPropagationStopped=Z$,e.isDefaultPrevented=J$,e.nativeEvent=e};var Ba,Y$={enumerable:!1,configurable:!0,get:function(){return this.class}},Ed=ae.vnode;ae.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||G$&&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"||q$(n.type)?a==="onfocus"?i="onfocusin":a==="onblur"?i="onfocusout":H$.test(i)?i=a:r.indexOf("-")===-1&&z$.test(i)?i=i.replace(W$,"-$&").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=Fn(n.children).forEach(function(l){l.props.selected=s.value.indexOf(l.props.value)!=-1})),r=="select"&&s.defaultValue!=null&&(s.value=Fn(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",Y$)):(n.className&&!n.class||n.class&&n.className)&&(s.class=s.className=n.className),t.props=s}(e),e.$$typeof=Cd,Ed&&Ed(e)};var Id=ae.__r;ae.__r=function(e){Id&&Id(e),Ba=e.__c};var Nd=ae.diffed;ae.diffed=function(e){Nd&&Nd(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),Ba=null};var Td={ReactCurrentDispatcher:{current:{readContext:function(e){return Ba.__n[e.__c].props.value},useCallback:or,useContext:vn,useDebugValue:Da,useDeferredValue:Ha,useEffect:Pe,useId:Oa,useImperativeHandle:Pa,useInsertionEffect:Ga,useLayoutEffect:Ln,useMemo:wt,useReducer:ls,useRef:ge,useState:et,useSyncExternalStore:qa,useTransition:Wa}}},X$="17.0.2";function Rd(e){return f.bind(null,e)}function us(e){return!!e&&e.$$typeof===Cd}function Md(e){return us(e)&&e.type===be}function Pd(e){return!!e&&!!e.displayName&&(typeof e.displayName=="string"||e.displayName instanceof String)&&e.displayName.startsWith("Memo(")}function Ua(e){return us(e)?Ra.apply(null,arguments):e}function Dd(e){return!!e.__k&&(sr(null,e),!0)}function Od(e){return e&&(e.base||e.nodeType===1&&e)||null}var Fd=function(e,t){return e(t)},ja=function(e,t){return e(t)},Vd=be;function za(e){e()}function Ha(e){return e}function Wa(){return[!1,za]}var Ga=Ln,Ld=us;function qa(e,t){var n=t(),r=et({h:{__:n,v:t}}),s=r[0].h,i=r[1];return Ln(function(){s.__=n,s.v=t,Ka(s)&&i({h:s})},[e,n,t]),Pe(function(){return Ka(s)&&i({h:s}),e(function(){Ka(s)&&i({h:s})})},[e]),n}function Ka(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 X={useState:et,useId:Oa,useReducer:ls,useEffect:Pe,useLayoutEffect:Ln,useInsertionEffect:Ga,useTransition:Wa,useDeferredValue:Ha,useSyncExternalStore:qa,startTransition:za,useRef:ge,useImperativeHandle:Pa,useMemo:wt,useCallback:or,useContext:vn,useDebugValue:Da,version:"17.0.2",Children:gd,render:Sd,hydrate:Ad,unmountComponentAtNode:Dd,createPortal:xd,createElement:f,createContext:ir,createFactory:Rd,cloneElement:Ua,createRef:Aa,Fragment:be,isValidElement:us,isElement:Ld,isFragment:Md,isMemo:Pd,findDOMNode:Od,Component:cn,PureComponent:ro,memo:hd,forwardRef:ar,flushSync:ja,unstable_batchedUpdates:Fd,StrictMode:Vd,Suspense:Gs,SuspenseList:cs,lazy:_d,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Td};const Za=Object.freeze(Object.defineProperty({__proto__:null,Children:gd,Component:cn,Fragment:be,PureComponent:ro,StrictMode:Vd,Suspense:Gs,SuspenseList:cs,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Td,cloneElement:Ua,createContext:ir,createElement:f,createFactory:Rd,createPortal:xd,createRef:Aa,default:X,findDOMNode:Od,flushSync:ja,forwardRef:ar,hydrate:Ad,isElement:Ld,isFragment:Md,isMemo:Pd,isValidElement:us,lazy:_d,memo:hd,render:Sd,startTransition:za,unmountComponentAtNode:Dd,unstable_batchedUpdates:Fd,useCallback:or,useContext:vn,useDebugValue:Da,useDeferredValue:Ha,useEffect:Pe,useErrorBoundary:O$,useId:Oa,useImperativeHandle:Pa,useInsertionEffect:Ga,useLayoutEffect:Ln,useMemo:wt,useReducer:ls,useRef:ge,useState:et,useSyncExternalStore:qa,useTransition:Wa,version:X$},Symbol.toStringTag,{value:"Module"})),Q$=e=>{Pe(()=>{const t=e();return()=>{t.Dispose()}})},e1=(e,t)=>{Pe(()=>{const n=e();return()=>{n.Dispose()}},t)},t1=e=>{Ln(()=>{const t=e();return()=>{t.Dispose()}})},b=X,n1=Q$,Bd=e1,r1=t1;function s1(e,t,n,r){const s=b.memo(e,pe(We(Ge(er,n),ie())));return Sr(i=>{e.displayName=i},ta(t)),i=>{const o=i1(r,i);return b.createElement(s,o)}}function i1(e,t){if(e==null)return t;{const n=e;return t.key=n(t),t}}function qs(e){return{Dispose(){e()}}}function Ud(e,t){Bd(e,t)}function o1(e){r1(t=>(e(),qs(()=>{})))}function Ja(e){const t=b.useRef(!1);l1(()=>{t.current||(t.current=!0,e())},[])}function jd(e){const t=b.useRef(void 0),n=b.useRef(!1),r=b.useRef(!1);n.current&&(r.current=!0),Ud(()=>{let s;return n.current?s=void 0:(n.current=!0,t.current=lt(e()),s=r.current?t.current:void 0),{Dispose(){Sr(i=>{_e(i)},ta(s))}}},[])}function a1(e){n1(t=>(e(),qs(()=>{})))}function l1(e,t){Bd(n=>(e(),qs(()=>{})),t)}function c1(e,t){const n=We(t,[]);return b.useCallback(e,n)}function zd(e){return b.useRef(e)}function u1(e,t,n){return s1(e,void 0,ea(n),ea(t))}function d1(e,t){const n=b.createContext(We(t,void 0));return Sr(r=>{n.displayName=r},ta(e)),n}function f1(e,t,n){return b.createElement(e.Provider,{value:t},...n)}function Bn(e){return b.useContext(e)}function Hd(e){const t=zd(e),n=c1(r=>t.current(r),[]);return o1(()=>{t.current=e}),n}function lr(e){return b.useState(e)}class Wd{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 so extends Error{constructor(){super("The operation was canceled"),Object.setPrototypeOf(this,so.prototype)}}class Ya{static get maxTrampolineCallCount(){return 2e3}constructor(){this.callCount=0}incrementAndCheck(){return this.callCount++>Ya.maxTrampolineCallCount}hijack(t){this.callCount=0,setTimeout(t,0)}}function Un(e){return t=>{if(t.cancelToken.isCancelled)t.onCancel(new so);else if(t.trampoline.incrementAndCheck())t.trampoline.hijack(()=>{try{e(t)}catch(n){t.onError(Ai(n))}});else try{e(t)}catch(n){t.onError(Ai(n))}}}function h1(e,t){return Un(n=>{e({onSuccess:r=>{try{t(r)(n)}catch(s){n.onError(Ai(s))}},onError:n.onError,onCancel:n.onCancel,cancelToken:n.cancelToken,trampoline:n.trampoline})})}function m1(e){return Un(t=>t.onSuccess(e))}class p1{Bind(t,n){return h1(t,n)}Combine(t,n){return this.Bind(t,()=>n)}Delay(t){return Un(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 m1(t)}ReturnFrom(t){return t}TryFinally(t,n){return Un(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 Un(r=>{t({onSuccess:r.onSuccess,onCancel:r.onCancel,cancelToken:r.cancelToken,trampoline:r.trampoline,onError:s=>{try{n(s)(r)}catch(i){r.onError(Ai(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 Un(t=>t.onSuccess(void 0))}}const I=new p1;function Xa(e){}function g1(e){return new Wd(!1)}function $1(e){e.cancel()}function w1(e){return e!=null&&e.isCancelled}const Gd=new Wd;function y1(e){return Un(t=>{e({onSuccess:n=>t.onSuccess(Sg(n)),onError:n=>t.onSuccess(Ag(n)),onCancel:t.onCancel,cancelToken:t.cancelToken,trampoline:t.trampoline})})}function b1(e){return Un(t=>e([t.onSuccess,t.onError,t.onCancel]))}function Qa(e){return Un(t=>{let n;const r=setTimeout(()=>{t.cancelToken.removeListener(n),t.onSuccess(void 0)},e);n=t.cancelToken.addListener(()=>{clearTimeout(r),t.onCancel(new so)})})}function _1(e,t){return qd(e,t)}function ds(e,t){return _1(e,t)}function qd(e,t,n,r,s){typeof t!="function"&&(s=t,t=void 0);const i=new Ya;e({onSuccess:t||Xa,onError:n||Xa,onCancel:r||Xa,cancelToken:s||Gd,trampoline:i})}function v1(e,t){return new Promise((n,r)=>qd(e,n,r,r,Gd))}class le extends B{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["HasNotStartedYet","InProgress","Resolved","Failed"]}}function Kd(e,t){const n=zd(g1());return jd(()=>qs(()=>{$1(n.current)})),Hd(r=>{w1(n.current)||ds(I.Delay(()=>I.TryWith(I.Delay(()=>(t(new le(1,[])),I.Bind(e(r),s=>(t(new le(2,[s])),I.Zero())))),s=>(t(new le(3,[s])),I.Zero()))),n.current)})}class x1{constructor(t,n,r){this.OnNext=t,this.OnError=n||(s=>{}),this.OnCompleted=r||(()=>{})}}function C1(e,t){t.Subscribe(new x1(e))}class S1{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 k1(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 A1=class extends S1{};function k1(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 E1{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 A1}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 I1(e,t){console.error(lt(e),t)}function N1(e,t){let n,r=new E1(e);r.AutoReset=!1,n=r,C1(t,n.Elapsed()),n.Enabled=!0,n.Start()}function Zd(e,t,n){Os(r=>{try{r(t)}catch(s){e(s)}},n)}function z(){return Ve()}function Jd(e,t){return At(n=>r=>{n(s=>{r(e(s))})},t)}function T1(e){return r0(e)}function Qe(e){return ee(e)}function cr(e,t,n,r){return ee(s=>{e(I.Delay(()=>I.Bind(y1(t(n)),i=>{const o=i;return o.tag===0&&s(r(o.fields[0])),I.Zero()})))})}function ur(e){N1(1,t=>{ds(e)})}function Ks(e,t){if(t.indexOf(e)===0)return t}function Yd(e,t){if(Lp(t,e))return t}function R1(e){return t=>{let n,r,s,i,o,a;return n=Ks("/",t),n!=null?(r=n,"#"+r):(s=Ks("#/",t),s!=null?(i=s,i):(o=Ks("#",t),o!=null?(a=o,"#/"+Mc(a,1,a.length-1)):"#/"+t))}}function Rr(e,t){return R1()(re("/",At(n=>n.indexOf("?")>=0||n.indexOf("#")===0||n.indexOf("/")===0?n:encodeURIComponent(n),e)))}function ft(e,t,n){history.pushState(void 0,"",Rr(e));const r=document.createEvent("CustomEvent");r.initEvent("CUSTOM_NAVIGATION_EVENT",!0,!0),window.dispatchEvent(r)}function Xd(e,t){return s0(n=>{if(yn(n))return Ve();{const r=jp(n,"#");if(r==="?")return Ve();if(Ks("?",r)!=null)return ee(r);{const s=r.split("?");if(!ra((i,o)=>i===o,s)&&s.length===1){const i=ye(0,s);return ee(decodeURIComponent(i))}else if(!ra((i,o)=>i===o,s)&&s.length===2)if(ye(1,s)===""){const i=ye(0,s);return ee(decodeURIComponent(i))}else{const i=ye(0,s),o=ye(1,s);return y([decodeURIComponent(i),"?"+o])}else return Ve()}}},y(Qo(Ks("#",e)!=null?Mc(e,1,e.length-1):t===1&&(Yd("#",e)!=null||Yd("#/",e)!=null)?"":e,["/"],void 0,0)))}function M1(e,t,n){return t(Xd(e===2?window.location.pathname+window.location.search:window.location.hash,e))}const P1=u1(e=>{const t=Hd(r=>{const s=We(e.onUrlChanged,i=>{});M1(We(e.hashMode,1),s)});jd(()=>(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),qs(()=>{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)}))),Ja(()=>{const r=document.createEvent("CustomEvent");r.initEvent("CUSTOM_NAVIGATION_EVENT",!0,!0),window.dispatchEvent(r)});const n=e.application;return n??ie()});class jn extends B{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["AccountId","Name"]}}class Mr extends B{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Asc","Desc"]}}function Qd(e){return e.tag===0?new Mr(1,[]):new Mr(0,[])}class Zs extends B{constructor(t,n){super(),this.tag=0,this.fields=[t,n]}cases(){return["Sort"]}}const D1=new Zs(new jn(1,[]),new Mr(0,[]));function O1(e){return[e.fields[0],e.fields[1]]}function ef(e){return e.fields[0]}function tf(e){return e.fields[1]}function nf(e,t){const n=t.fields[0],r=t.fields[1];return e.tag===1?n.tag===1?new Zs(new jn(1,[]),Qd(r)):new Zs(new jn(1,[]),new Mr(0,[])):n.tag===0?new Zs(new jn(0,[]),Qd(r)):new Zs(new jn(0,[]),new Mr(0,[]))}class rf extends B{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["SearchText"]}}const F1=new rf("");function V1(e){return new rf(e)}function sf(e){return e.fields[0]}class L1 extends B{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["PageSize"]}}function B1(e){return new L1(e)}function of(e){return e.fields[0]}class el extends Y{constructor(t,n,r){super(),this.SearchText=t,this.Sort=n,this.PageSize=r}}class U1 extends B{constructor(t,n){super(),this.tag=0,this.fields=[t,n]}cases(){return["AccountKey"]}}function af(e){return[e.fields[0],e.fields[1]]}function j1(e,t){return new U1(e,t)}function z1(e){const t=af(e);return[t[0],t[1]]}function H1(){return new vg([],{Equals:Se,GetHashCode:Ym})}function lf(e,t){let n,r=ie();if(n=[ha(e,t,new at(()=>r,s=>{r=s})),r],n[0])return n[1]}function tl(e,t,n){return e.set(t,n),e}class W1 extends Y{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 G1(e){const t=$a(e.Name);if(t.tag===1)return new g(1,[t.fields[0]]);{const n=yu(e.Website);if(n.tag===1)return new g(1,[n.fields[0]]);{let r;const s=e.ContactDetails;if(s!=null){const i=Yg(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 W1(new $u(e.StreamId),t.fields[0],n.fields[0],r.fields[0],Xg(e.Notes),e.AccountProvisioningMode)])}}}function nl(e,t){return a0(n=>is(n.StreamId)===qi(t),e)}class K extends B{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["PartnerList","Partner","PartnerProfilesDirectory","PartnerAccountList","PartnerSuperConfiguration","PartnerBenefitsOnboardingConfiguration","PartnerBankDetailsConfiguration","PartnerWorkspace","PartnerSecurity","Account","AccountProfilesDirectory","AccountUsers","AccountSuperConfiguration","AccountBenefitsOnboardingConfiguration","AccountBankDetailsConfiguration","AccountSalaryPackagingConfiguration","AccountWorkspace","AccountHrisMigration","NotFound"]}}function cf(e){let t,n,r,s,i,o,a,l,c,d,u,m,h,p,$,w,S,A,E,P,V,ne,we,Ae,he,te,de;if(Z(e))t=18;else if(L(e)==="account-registry")if(Z(C(e)))t=18;else if(L(C(e))==="partners")if(Z(C(C(e))))t=0;else if(Z(C(C(C(e)))))t=1,n=L(C(C(e)));else switch(L(C(C(C(e))))){case"accounts":{if(Z(C(C(C(C(e))))))t=2,r=L(C(C(e)));else if(Z(C(C(C(C(C(e)))))))t=9,d=L(C(C(C(C(e))))),u=L(C(C(e)));else switch(L(C(C(C(C(C(e))))))){case"directory":{Z(C(C(C(C(C(C(e)))))))?(t=10,m=L(C(C(C(C(e))))),h=L(C(C(e)))):t=18;break}case"users":{Z(C(C(C(C(C(C(e)))))))?(t=11,p=L(C(C(C(C(e))))),$=L(C(C(e)))):t=18;break}case"super-configuration":{Z(C(C(C(C(C(C(e)))))))?(t=12,w=L(C(C(C(C(e))))),S=L(C(C(e)))):t=18;break}case"benefits-onboarding-configuration":{Z(C(C(C(C(C(C(e)))))))?(t=13,A=L(C(C(C(C(e))))),E=L(C(C(e)))):t=18;break}case"bank-details-configuration":{Z(C(C(C(C(C(C(e)))))))?(t=14,P=L(C(C(C(C(e))))),V=L(C(C(e)))):t=18;break}case"salary-packaging-configuration":{Z(C(C(C(C(C(C(e)))))))?(t=15,ne=L(C(C(C(C(e))))),we=L(C(C(e)))):t=18;break}case"workspace":{Z(C(C(C(C(C(C(e)))))))?(t=16,Ae=L(C(C(C(C(e))))),he=L(C(C(e)))):t=18;break}case"hris-migration":{Z(C(C(C(C(C(C(e)))))))?(t=17,te=L(C(C(C(C(e))))),de=L(C(C(e)))):t=18;break}default:t=18}break}case"super-configuration":{Z(C(C(C(C(e)))))?(t=3,s=L(C(C(e)))):t=18;break}case"benefits-onboarding-configuration":{Z(C(C(C(C(e)))))?(t=4,i=L(C(C(e)))):t=18;break}case"directory":{Z(C(C(C(C(e)))))?(t=5,o=L(C(C(e)))):t=18;break}case"bank-details-configuration":{Z(C(C(C(C(e)))))?(t=6,a=L(C(C(e)))):t=18;break}case"workspace":{Z(C(C(C(C(e)))))?(t=7,l=L(C(C(e)))):t=18;break}case"security":{Z(C(C(C(C(e)))))?(t=8,c=L(C(C(e)))):t=18;break}default:t=18}else t=18;else t=18;switch(t){case 0:return new K(0,[]);case 1:return new K(1,[Le(n)]);case 2:return new K(3,[Le(r)]);case 3:return new K(4,[Le(s)]);case 4:return new K(5,[Le(i)]);case 5:return new K(2,[Le(o)]);case 6:return new K(6,[Le(a)]);case 7:return new K(7,[Le(l)]);case 8:return new K(8,[Le(c)]);case 9:return new K(9,[Le(u),Gt(d)]);case 10:return new K(10,[Le(h),Gt(m)]);case 11:return new K(11,[Le($),Gt(p)]);case 12:return new K(12,[Le(S),Gt(w)]);case 13:return new K(13,[Le(E),Gt(A)]);case 14:return new K(14,[Le(V),Gt(P)]);case 15:return new K(15,[Le(we),Gt(ne)]);case 16:return new K(16,[Le(he),Gt(Ae)]);case 17:return new K(17,[Le(de),Gt(te)]);default:return new K(18,[])}}function Js(e){const t=(r,s)=>J(k(()=>R(x("account-registry"),k(()=>R(x("partners"),k(()=>R(x(dt(r)),k(()=>s)))))))),n=(r,s,i)=>{const o=J(k(()=>R(x("accounts"),k(()=>R(x(_n(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 t(e.fields[0],["security"]);case 9:return n(e.fields[0],e.fields[1],[]);case 10:return n(e.fields[0],e.fields[1],["directory"]);case 11:return n(e.fields[0],e.fields[1],["users"]);case 12:return n(e.fields[0],e.fields[1],["super-configuration"]);case 13:return n(e.fields[0],e.fields[1],["benefits-onboarding-configuration"]);case 14:return n(e.fields[0],e.fields[1],["bank-details-configuration"]);case 15:return n(e.fields[0],e.fields[1],["salary-packaging-configuration"]);case 16:return n(e.fields[0],e.fields[1],["workspace"]);case 17:return n(e.fields[0],e.fields[1],["hris-migration"]);case 18:case 0:return y(["account-registry","partners"]);default:return t(e.fields[0],[])}}function rl(e){switch(e.tag){case 3:{const t=["account-registry","partners",dt(e.fields[0]),"accounts"];return Qe(n=>{ft(y(t))})}case 4:{const t=["account-registry","partners",dt(e.fields[0]),"super-configuration"];return Qe(n=>{ft(y(t))})}case 5:{const t=["account-registry","partners",dt(e.fields[0]),"benefits-onboarding-configuration"];return Qe(n=>{ft(y(t))})}case 6:{const t=["account-registry","partners",dt(e.fields[0]),"bank-details-configuration"];return Qe(n=>{ft(y(t))})}case 2:{const t=["account-registry","partners",dt(e.fields[0]),"directory"];return Qe(n=>{ft(y(t))})}case 7:{const t=["account-registry","partners",dt(e.fields[0]),"workspace"];return Qe(n=>{ft(y(t))})}case 8:{const t=["account-registry","partners",dt(e.fields[0]),"security"];return Qe(n=>{ft(y(t))})}case 9:{const t=["account-registry","partners",dt(e.fields[0]),"accounts",_n(e.fields[1])];return Qe(n=>{ft(y(t))})}case 10:{const t=["account-registry","partners",dt(e.fields[0]),"accounts",_n(e.fields[1]),"directory"];return Qe(n=>{ft(y(t))})}case 11:{const t=["account-registry","partners",dt(e.fields[0]),"accounts",_n(e.fields[1]),"users"];return Qe(n=>{ft(y(t))})}case 12:{const t=["account-registry","partners",dt(e.fields[0]),"accounts",_n(e.fields[1]),"super-configuration"];return Qe(n=>{ft(y(t))})}case 13:{const t=["account-registry","partners",dt(e.fields[0]),"accounts",_n(e.fields[1]),"benefits-onboarding-configuration"];return Qe(n=>{ft(y(t))})}case 14:{const t=["account-registry","partners",dt(e.fields[0]),"accounts",_n(e.fields[1]),"bank-details-configuration"];return Qe(n=>{ft(y(t))})}case 15:{const t=["account-registry","partners",dt(e.fields[0]),"accounts",_n(e.fields[1]),"salary-packaging-configuration"];return Qe(n=>{ft(y(t))})}case 16:{const t=["account-registry","partners",dt(e.fields[0]),"accounts",_n(e.fields[1]),"workspace"];return Qe(n=>{ft(y(t))})}case 17:{const t=["account-registry","partners",dt(e.fields[0]),"accounts",_n(e.fields[1]),"hris-migration"];return Qe(n=>{ft(y(t))})}case 0:case 18:return z();default:{const t=["account-registry","partners",dt(e.fields[0])];return Qe(n=>{ft(y(t))})}}}function q1(e,t){switch(t.tag){case 1:return new le(1,[]);case 2:return t.fields[0].tag===1?new le(2,[new g(1,[t.fields[0].fields[0]])]):new le(2,[new g(0,[e(t.fields[0].fields[0])])]);case 3:return new le(3,[t.fields[0]]);default:return new le(0,[])}}class uf extends Y{constructor(t,n,r){super(),this.Name=t,this.ExternalId=n,this.LegalEntity=r}}class df extends Y{constructor(t,n){super(),this.BusinessName=t,this.BusinessNumber=n}}class ff extends Y{constructor(t,n,r){super(),this.ReadProtectedData=t,this.ProvisionAccounts=n,this.ConfigureSecurity=r}}function hf(e){return new ff(sa("AccountRegistry.ReadProtectedData",e.Roles,{Equals:(t,n)=>t===n,GetHashCode:Qn}),sa("AccountRegistry.ProvisionAccounts",e.Roles,{Equals:(t,n)=>t===n,GetHashCode:Qn}),sa("AccountRegistry.ConfigureSecurity",e.Roles,{Equals:(t,n)=>t===n,GetHashCode:Qn}))}const mf=new ff(!1,!1,!1);class G extends B{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["BadPrimitive","BadPrimitiveExtra","BadType","BadField","BadPath","TooSmallArray","FailMessage","BadOneOf"]}}class qe extends B{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["PascalCase","CamelCase","SnakeCase"]}}function pf(e){return e.slice(void 0,1).toLowerCase()+e.slice(1,e.length)}function gf(e,t){switch(e.tag){case 2:return Op(pf(t),"[A-Z]","_$0").toLowerCase();case 0:return t;default:return pf(t)}}function $f(e,t){K1(t);const n=new Date(e);return n.offset=t??new Date().getTimezoneOffset()*-6e4,n}function K1(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 Z1(){return $f(-621355968e5,0)}function J1(e){const[t,n]=yc(e),r=n==null?t.getTimezoneOffset()*-6e4:n==="Z"?0:n*6e4;return $f(t.getTime(),r)}function Y1(e,t){try{return t.contents=J1(e),!0}catch{return!1}}function Ys(e){return e<0?Math.ceil(e):Math.floor(e)}function wf(e=0,t=0,n=0,r=0,s=0){switch(arguments.length){case 1:return X1(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 X1(e){return Number(BigInt(e)/10000n)}function Q1(e){return Ys(e/864e5)}function ew(e){return Ys(e%864e5/36e5)}function tw(e){return Ys(e%36e5/6e4)}function nw(e){return Ys(e%6e4/1e3)}function rw(e){return Ys(e%1e3)}function sw(e,t="c",n){if(["c","g","G"].indexOf(t)===-1)throw new Error("Custom formats are not supported");const r=Math.abs(Q1(e)),s=Math.abs(ew(e)),i=Math.abs(tw(e)),o=Math.abs(nw(e)),a=Math.abs(rw(e));return`${e<0?"-":""}${r===0&&(t==="c"||t==="g")?"":t==="c"?r+".":r+":"}${t==="g"?s:Ce(s,2)}:${Ce(i,2)}:${Ce(o,2)}${a===0&&(t==="c"||t==="g")?"":t==="g"?"."+Ce(a,3):"."+Wm(a,3,7)}`}function iw(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 wf(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*wf(s,l,c,o,i)}}throw new Error(`String '${e}' was not recognized as a valid TimeSpan.`)}function ow(e,t){try{return t.contents=iw(e),!0}catch{return!1}}class aw{constructor(t,n){const r=new at(ie());this.comparer=n,r.contents=this,this.hashMap=new Map([]),this["init@9"]=1;const s=ve(t);try{for(;s["System.Collections.IEnumerator.MoveNext"]();){const i=s["System.Collections.Generic.IEnumerator`1.get_Current"]();il(r.contents,i)}}finally{_e(s)}}get[Symbol.toStringTag](){return"HashSet"}toJSON(){const t=this;return Array.from(t)}"System.Collections.IEnumerable.GetEnumerator"(){return ve(this)}GetEnumerator(){return ve(ji(this.hashMap.values()))}[Symbol.iterator](){return Kr(ve(this))}"System.Collections.Generic.ICollection`1.Add2B595"(t){il(this,t)}"System.Collections.Generic.ICollection`1.Clear"(){yf(this)}"System.Collections.Generic.ICollection`1.Contains2B595"(t){return _f(this,t)}"System.Collections.Generic.ICollection`1.CopyToZ3B4C077E"(t,n){qc((s,i)=>{Pt(t,n+s,i)},this)}"System.Collections.Generic.ICollection`1.get_Count"(){return bf(this)|0}"System.Collections.Generic.ICollection`1.get_IsReadOnly"(){return!1}"System.Collections.Generic.ICollection`1.Remove2B595"(t){return vf(this,t)}get size(){return bf(this)|0}add(t){const n=this;return il(n,t),n}clear(){yf(this)}delete(t){return vf(this,t)}has(t){return _f(this,t)}keys(){return Ee(n=>n,this)}values(){return Ee(n=>n,this)}entries(){return Ee(n=>[n,n],this)}forEach(t,n){const r=this;Sr(s=>{t(s,s,r)},r)}}function sl(e,t){const n=e.comparer.GetHashCode(t)|0;let r,s=ie();return r=[ha(e.hashMap,n,new at(()=>s,i=>{s=i})),s],r[0]?[!0,n,r[1].findIndex(i=>e.comparer.Equals(t,i))]:[!1,n,-1]}function yf(e){e.hashMap.clear()}function bf(e){let t=0,n=ve(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{_e(n)}return t|0}function il(e,t){const n=sl(e,t);return n[0]?n[2]>-1?!1:(Er(e.hashMap,n[1]).push(t),!0):(e.hashMap.set(n[1],[t]),!0)}function _f(e,t){const n=sl(e,t);let r;switch(n[0]&&n[2]>-1?r=0:r=1,r){case 0:return!0;default:return!1}}function vf(e,t){const n=sl(e,t);let r;switch(n[0]&&n[2]>-1?r=0:r=1,r){case 0:return Er(e.hashMap,n[1]).splice(n[2],1),!0;default:return!1}}class xf{constructor(t){this.k=t}}function qt(e){return new xf(e)}function se(e){return e.k}class xe extends xf{constructor(t,n,r,s){super(t),this.left=n,this.right=r,this.h=s|0}}function Kt(e,t,n,r){return new xe(e,t,n,r)}function De(e){return e.left}function Ne(e){return e.right}function fs(e){return e.h}function h2(){}function Cf(e,t){e:for(;;){const n=e,r=t;if(n!=null){const s=O(n);if(s instanceof xe){const i=s;e=De(i),t=Cf(Ne(i),r+1);continue e}else return r+1|0}else return r|0}}function lw(e){return Cf(e,0)}function un(e,t,n){let r,s,i;const o=e;if(o!=null){const d=O(o);i=d instanceof xe?(r=d,fs(r)):1}else i=0;let a;const l=n;if(l!=null){const d=O(l);a=d instanceof xe?(s=d,fs(s)):1}else a=0;const c=(i<a?a:i)|0;return c===0?qt(t):Kt(t,e,n,c+1)}function Sf(e,t,n){let r,s,i,o,a,l,c,d,u;const m=e;if(m!=null){const $=O(m);u=$ instanceof xe?(r=$,fs(r)):1}else u=0;let h;const p=n;if(p!=null){const $=O(p);h=$ instanceof xe?(s=$,fs(s)):1}else h=0;if(h>u+2){const $=O(n);if($ instanceof xe){const w=$;if(i=De(w),(i!=null?(o=O(i),o instanceof xe?(a=o,fs(a)):1):0)>u+1){const S=O(De(w));if(S instanceof xe){const A=S;return un(un(e,t,De(A)),se(A),un(Ne(A),se(w),Ne(w)))}else throw new Error("internal error: Set.rebalance")}else return un(un(e,t,De(w)),se(w),Ne(w))}else throw new Error("internal error: Set.rebalance")}else if(u>h+2){const $=O(e);if($ instanceof xe){const w=$;if(l=Ne(w),(l!=null?(c=O(l),c instanceof xe?(d=c,fs(d)):1):0)>h+1){const S=O(Ne(w));if(S instanceof xe){const A=S;return un(un(De(w),se(w),De(A)),se(A),un(Ne(A),t,n))}else throw new Error("internal error: Set.rebalance")}else return un(De(w),se(w),un(Ne(w),t,n))}else throw new Error("internal error: Set.rebalance")}else return un(e,t,n)}function hs(e,t,n){if(n!=null){const r=O(n),s=e.Compare(t,se(r))|0;if(r instanceof xe){const i=r;return s<0?Sf(hs(e,t,De(i)),se(i),Ne(i)):s===0?n:Sf(De(i),se(i),hs(e,t,Ne(i)))}else{const i=e.Compare(t,se(r))|0;return i<0?Kt(t,void 0,n,2):i===0?n:Kt(t,n,void 0,2)}}else return qt(t)}function Af(e,t,n){e:for(;;){const r=e,s=t,i=n;if(i!=null){const o=O(i),a=r.Compare(s,se(o))|0;if(o instanceof xe){const l=o;if(a<0){e=r,t=s,n=De(l);continue e}else{if(a===0)return!0;e=r,t=s,n=Ne(l);continue e}}else return a===0}else return!1}}function kf(e,t){e:for(;;){const n=e,r=t;if(r!=null){const s=O(r);if(s instanceof xe){const i=s;kf(n,De(i)),n(se(i)),e=n,t=Ne(i);continue e}else n(se(s))}break}}class cw extends Y{constructor(t,n){super(),this.stack=t,this.started=n}}function Ef(e){e:for(;;){const t=e;if(Z(t))return Ve();{const n=L(t),r=C(t);if(n!=null){const s=O(n);if(s instanceof xe){const i=s;e=Be([De(i),qt(se(i)),Ne(i)],r);continue e}else return t}else{e=r;continue e}}}}function If(e){return new cw(Ef(ee(e)),!1)}function uw(){throw new Error("Enumeration not started")}function dw(){throw new Error("Enumeration already started")}function Nf(e){if(e.started){const t=e.stack;if(Z(t))return dw();if(L(t)!=null){const n=O(L(t));return se(n)}else throw new Error("Please report error: Set iterator, unexpected stack for current")}else return uw()}function fw(e){if(e.started){const t=e.stack;if(Z(t))return!1;if(L(t)!=null){if(O(L(t))instanceof xe)throw new Error("Please report error: Set iterator, unexpected stack for moveNext");return e.stack=Ef(C(t)),!Z(e.stack)}else throw new Error("Please report error: Set iterator, unexpected stack for moveNext")}else return e.started=!0,!Z(e.stack)}function Tf(e){let t=If(e);return{"System.Collections.Generic.IEnumerator`1.get_Current"(){return Nf(t)},"System.Collections.IEnumerator.get_Current"(){return Nf(t)},"System.Collections.IEnumerator.MoveNext"(){return fw(t)},"System.Collections.IEnumerator.Reset"(){t=If(e)},Dispose(){}}}function hw(e,t,n){e:for(;;){const r=e,s=t,i=n;if(Z(s))return Z(i)?0:-1;if(Z(i))return 1;if(L(i)!=null)if(L(s)!=null){const o=O(L(s)),a=O(L(i));if(o instanceof xe){const l=o;if(De(l)==null)if(a instanceof xe){const c=a;if(De(c)==null){const d=r.Compare(se(l),se(c))|0;if(d!==0)return d|0;e=r,t=ut(Ne(l),C(s)),n=ut(Ne(c),C(i));continue e}else{let d,u,m,h,p;switch(Z(s)?Z(i)?d=2:L(i)!=null?(d=1,h=C(i),p=O(L(i))):d=2:L(s)!=null?(d=0,u=C(s),m=O(L(s))):Z(i)?d=2:L(i)!=null?(d=1,h=C(i),p=O(L(i))):d=2,d){case 0:if(m instanceof xe){const $=m;e=r,t=Be([De($),Kt(se($),void 0,Ne($),0)],u),n=i;continue e}else{e=r,t=Be([void 0,qt(se(m))],u),n=i;continue e}case 1:if(p instanceof xe){const $=p;e=r,t=s,n=Be([De($),Kt(se($),void 0,Ne($),0)],h);continue e}else{e=r,t=s,n=Be([void 0,qt(se(p))],h);continue e}default:throw new Error("unexpected state in SetTree.compareStacks")}}}else{const c=r.Compare(se(l),se(a))|0;if(c!==0)return c|0;e=r,t=ut(Ne(l),C(s)),n=ut(void 0,C(i));continue e}else{let c,d,u,m,h;switch(Z(s)?Z(i)?c=2:L(i)!=null?(c=1,m=C(i),h=O(L(i))):c=2:L(s)!=null?(c=0,d=C(s),u=O(L(s))):Z(i)?c=2:L(i)!=null?(c=1,m=C(i),h=O(L(i))):c=2,c){case 0:if(u instanceof xe){const p=u;e=r,t=Be([De(p),Kt(se(p),void 0,Ne(p),0)],d),n=i;continue e}else{e=r,t=Be([void 0,qt(se(u))],d),n=i;continue e}case 1:if(h instanceof xe){const p=h;e=r,t=s,n=Be([De(p),Kt(se(p),void 0,Ne(p),0)],m);continue e}else{e=r,t=s,n=Be([void 0,qt(se(h))],m);continue e}default:throw new Error("unexpected state in SetTree.compareStacks")}}}else if(a instanceof xe){const l=a;if(De(l)==null){const c=r.Compare(se(o),se(l))|0;if(c!==0)return c|0;e=r,t=ut(void 0,C(s)),n=ut(Ne(l),C(i));continue e}else{let c,d,u,m,h;switch(Z(s)?Z(i)?c=2:L(i)!=null?(c=1,m=C(i),h=O(L(i))):c=2:L(s)!=null?(c=0,d=C(s),u=O(L(s))):Z(i)?c=2:L(i)!=null?(c=1,m=C(i),h=O(L(i))):c=2,c){case 0:if(u instanceof xe){const p=u;e=r,t=Be([De(p),Kt(se(p),void 0,Ne(p),0)],d),n=i;continue e}else{e=r,t=Be([void 0,qt(se(u))],d),n=i;continue e}case 1:if(h instanceof xe){const p=h;e=r,t=s,n=Be([De(p),Kt(se(p),void 0,Ne(p),0)],m);continue e}else{e=r,t=s,n=Be([void 0,qt(se(h))],m);continue e}default:throw new Error("unexpected state in SetTree.compareStacks")}}}else{const l=r.Compare(se(o),se(a))|0;if(l!==0)return l|0;e=r,t=C(s),n=C(i);continue e}}else{O(L(i));let o,a,l,c,d;switch(Z(s)?Z(i)?o=2:L(i)!=null?(o=1,c=C(i),d=O(L(i))):o=2:L(s)!=null?(o=0,a=C(s),l=O(L(s))):Z(i)?o=2:L(i)!=null?(o=1,c=C(i),d=O(L(i))):o=2,o){case 0:if(l instanceof xe){const u=l;e=r,t=Be([De(u),Kt(se(u),void 0,Ne(u),0)],a),n=i;continue e}else{e=r,t=Be([void 0,qt(se(l))],a),n=i;continue e}case 1:if(d instanceof xe){const u=d;e=r,t=s,n=Be([De(u),Kt(se(u),void 0,Ne(u),0)],c);continue e}else{e=r,t=s,n=Be([void 0,qt(se(d))],c);continue e}default:throw new Error("unexpected state in SetTree.compareStacks")}}else if(L(s)!=null){O(L(s));let o,a,l,c,d;switch(Z(s)?Z(i)?o=2:L(i)!=null?(o=1,c=C(i),d=O(L(i))):o=2:L(s)!=null?(o=0,a=C(s),l=O(L(s))):Z(i)?o=2:L(i)!=null?(o=1,c=C(i),d=O(L(i))):o=2,o){case 0:if(l instanceof xe){const u=l;e=r,t=Be([De(u),Kt(se(u),void 0,Ne(u),0)],a),n=i;continue e}else{e=r,t=Be([void 0,qt(se(l))],a),n=i;continue e}case 1:if(d instanceof xe){const u=d;e=r,t=s,n=Be([De(u),Kt(se(u),void 0,Ne(u),0)],c);continue e}else{e=r,t=s,n=Be([void 0,qt(se(d))],c);continue e}default:throw new Error("unexpected state in SetTree.compareStacks")}}else{e=r,t=C(s),n=C(i);continue e}}}function Rf(e,t,n){return t==null?n==null?0:-1:n==null?1:hw(e,ee(t),ee(n))|0}function mw(e,t,n){let r=n;kf(s=>{Pt(t,r,s),r=r+1|0},e)}function pw(e,t,n){e:for(;;){const r=e,s=t,i=n;if(i["System.Collections.IEnumerator.MoveNext"]()){e=r,t=hs(r,i["System.Collections.Generic.IEnumerator`1.get_Current"](),s),n=i;continue e}else return s}}function gw(e,t){return Vi((n,r)=>hs(e,r,n),void 0,t)}function $w(e,t){return bn((n,r)=>hs(e,r,n),void 0,t)}function Mf(e,t){if(nn(t))return gw(e,t);if(t instanceof pt)return $w(e,t);{const n=ve(t);try{return pw(e,void 0,n)}finally{_e(n)}}}class ol{constructor(t,n){this.comparer=t,this.tree=n}GetHashCode(){return bw(this)|0}Equals(t){let n;const r=this;return t instanceof ol&&(n=t,Rf(ms(r),dn(r),dn(n))===0)}toString(){return"set ["+re("; ",Ee(n=>ot(n),this))+"]"}get[Symbol.toStringTag](){return"FSharpSet"}toJSON(){const t=this;return Array.from(t)}CompareTo(t){const n=this;return Rf(ms(n),dn(n),dn(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 Af(ms(n),t,dn(n))}"System.Collections.Generic.ICollection`1.CopyToZ3B4C077E"(t,n){mw(dn(this),t,n)}"System.Collections.Generic.ICollection`1.get_IsReadOnly"(){return!0}"System.Collections.Generic.ICollection`1.get_Count"(){return al(this)|0}"System.Collections.Generic.IReadOnlyCollection`1.get_Count"(){return al(this)|0}GetEnumerator(){return Tf(dn(this))}[Symbol.iterator](){return Kr(ve(this))}"System.Collections.IEnumerable.GetEnumerator"(){return Tf(dn(this))}get size(){return al(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 Pf(this,t)}keys(){return Ee(n=>n,this)}values(){return Ee(n=>n,this)}entries(){return Ee(n=>[n,n],this)}forEach(t,n){const r=this;Sr(s=>{t(s,s,r)},r)}}function io(e,t){return new ol(e,t)}function ms(e){return e.comparer}function dn(e){return e.tree}function ww(e){return io(e,void 0)}function yw(e,t){return io(ms(e),hs(ms(e),t,dn(e)))}function al(e){return lw(dn(e))}function Pf(e,t){return Af(ms(e),t,dn(e))}function bw(e){let t=0;const n=ve(e);try{for(;n["System.Collections.IEnumerator.MoveNext"]();){const r=n["System.Collections.Generic.IEnumerator`1.get_Current"]();t=(t<<1)+Tn(r)+631|0}}finally{_e(n)}return Math.abs(t)|0}function ll(e,t){return Pf(t,e)}function _w(e,t){return yw(t,e)}function vw(e){return ww(e)}function xw(e,t){return io(t,Mf(t,e))}function Cw(e,t){return io(t,Mf(t,e))}function Xs(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 vw(e,t){const n=t.tag===2?Xs(t.fields[0],t.fields[1],!0):t.tag===1?Xs(t.fields[0],t.fields[1],!1)+`
5
+ `:" ")}}function Sw(e,t){const n=t.tag===2?Xs(t.fields[0],t.fields[1],!0):t.tag===1?Xs(t.fields[0],t.fields[1],!1)+`
6
6
  Reason: `+t.fields[2]:t.tag===3?Xs(t.fields[0],t.fields[1],!0):t.tag===4?Xs(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
  `+re(`
10
10
 
11
- `,t.fields[0]):t.tag===6?"The following `failure` occurred with the decoder: "+t.fields[0]:Xs(t.fields[0],t.fields[1],!1);return t.tag===7?n:"Error at: `"+e+"`\n"+n}function Mf(e,t,n){const r=t(e,n);if(r.tag===1){const s=r.fields[0];return new g(1,[vw(s[0],s[1])])}else return new g(0,[r.fields[0]])}function Dt(e,t){try{return Mf("$",e,JSON.parse(t))}catch(n){if(n instanceof SyntaxError)return new g(1,["Given an invalid JSON: "+n.message]);throw n}}function Pf(e,t){return typeof t=="string"?new g(0,[t]):new g(1,[[e,new G(0,["a string",t])]])}function xw(e,t){if(typeof t=="string"){const n=t;return n.length===1?new g(0,[n[0]]):new g(1,[[e,new G(0,["a single character string",t])]])}else return new g(1,[[e,new G(0,["a char",t])]])}function Cw(e,t){if(typeof t=="string"){let n,r="00000000-0000-0000-0000-000000000000";return n=[kg(t,new at(()=>r,s=>{r=s})),r],n[0]?new g(0,[n[1]]):new g(1,[[e,new G(0,["a guid",t])]])}else return new g(1,[[e,new G(0,["a guid",t])]])}function Sw(e,t){return t==null?new g(0,[void 0]):new g(1,[[e,new G(0,["null",t])]])}const Df=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 G(1,["a sbyte",s,"Value was either too large or too small for a sbyte"])]]):new g(1,[[n,new G(1,["a sbyte",s,"Value is not an integral value"])]])}else if(typeof r=="string"){let s,i=0;return s=[os(r,511,!1,8,new at(()=>i,o=>{i=o|0})),i],s[0]?new g(0,[s[1]]):new g(1,[[n,new G(0,["a sbyte",r])]])}else return new g(1,[[n,new G(0,["a sbyte",r])]])},Of=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 G(1,["a byte",s,"Value was either too large or too small for a byte"])]]):new g(1,[[n,new G(1,["a byte",s,"Value is not an integral value"])]])}else if(typeof r=="string"){let s,i=0;return s=[os(r,511,!0,8,new at(()=>i,o=>{i=o})),i],s[0]?new g(0,[s[1]]):new g(1,[[n,new G(0,["a byte",r])]])}else return new g(1,[[n,new G(0,["a byte",r])]])},Ff=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 G(1,["an int16",s,"Value was either too large or too small for an int16"])]]):new g(1,[[n,new G(1,["an int16",s,"Value is not an integral value"])]])}else if(typeof r=="string"){let s,i=0;return s=[os(r,511,!1,16,new at(()=>i,o=>{i=o|0})),i],s[0]?new g(0,[s[1]]):new g(1,[[n,new G(0,["an int16",r])]])}else return new g(1,[[n,new G(0,["an int16",r])]])},Vf=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 G(1,["an uint16",s,"Value was either too large or too small for an uint16"])]]):new g(1,[[n,new G(1,["an uint16",s,"Value is not an integral value"])]])}else if(typeof r=="string"){let s,i=0;return s=[os(r,511,!0,16,new at(()=>i,o=>{i=o})),i],s[0]?new g(0,[s[1]]):new g(1,[[n,new G(0,["an uint16",r])]])}else return new g(1,[[n,new G(0,["an uint16",r])]])},Lf=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 G(1,["an int",s,"Value was either too large or too small for an int"])]]):new g(1,[[n,new G(1,["an int",s,"Value is not an integral value"])]])}else if(typeof r=="string"){let s,i=0;return s=[os(r,511,!1,32,new at(()=>i,o=>{i=o|0})),i],s[0]?new g(0,[s[1]]):new g(1,[[n,new G(0,["an int",r])]])}else return new g(1,[[n,new G(0,["an int",r])]])},Bf=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 G(1,["an uint32",s,"Value was either too large or too small for an uint32"])]]):new g(1,[[n,new G(1,["an uint32",s,"Value is not an integral value"])]])}else if(typeof r=="string"){let s,i=0;return s=[os(r,511,!0,32,new at(()=>i,o=>{i=o})),i],s[0]?new g(0,[s[1]]):new g(1,[[n,new G(0,["an uint32",r])]])}else return new g(1,[[n,new G(0,["an uint32",r])]])};function Aw(e,t){return typeof t=="boolean"?new g(0,[t]):new g(1,[[e,new G(0,["a boolean",t])]])}function kw(e,t){return typeof t=="number"?new g(0,[t]):new g(1,[[e,new G(0,["a float",t])]])}function Ew(e,t){return typeof t=="number"?new g(0,[t]):new g(1,[[e,new G(0,["a float32",t])]])}function Iw(e,t){if(typeof t=="string"){let n,r=Ep();return n=[Np(t,new at(()=>r,s=>{r=s})),r],n[0]?new g(0,[Tp(n[1])]):new g(1,[[e,new G(0,["a datetime",t])]])}else return new g(1,[[e,new G(0,["a datetime",t])]])}function Nw(e,t){if(typeof t=="string"){let n,r=G1();return n=[K1(t,new at(()=>r,s=>{r=s})),r],n[0]?new g(0,[n[1]]):new g(1,[[e,new G(0,["a datetimeoffset",t])]])}else return new g(1,[[e,new G(0,["a datetime",t])]])}function Tw(e,t){if(typeof t=="string"){let n,r=0;return n=[rw(t,new at(()=>r,s=>{r=s})),r],n[0]?new g(0,[n[1]]):new g(1,[[e,new G(0,["a timespan",t])]])}else return new g(1,[[e,new G(0,["a timespan",t])]])}function Uf(e,t,n,r){let s;const i=n+".["+vr(e)+"]";if(Array.isArray(r)){const o=r;return e<o.length?t(i,ye(e,o)):new g(1,[[i,new G(5,["a longer array. Need index `"+vr(e)+"` but there are only `"+(s=o.length,vr(s))+"` entries",r])]])}else return new g(1,[[i,new G(0,["an array",r])]])}function Rw(e,t,n){return n==null?new g(0,[void 0]):Pn(lt,e(t,n))}function jf(e,t,n){if(Array.isArray(n)){let r=-1;return Pn(Li,Vi((s,i)=>{if(r=r+1|0,s.tag===0){const o=e(t+".["+vr(r)+"]",i);return o.tag===0?new g(0,[ut(o.fields[0],s.fields[0])]):new g(1,[o.fields[0]])}else return s},new g(0,[Ve()]),n))}else return new g(1,[[t,new G(0,["a list",n])]])}function Mw(e,t,n){if(Array.isArray(n)){let r=-1;return Pn(E0,Vi((s,i)=>{if(r=r+1|0,s.tag===0){const o=e(t+".["+vr(r)+"]",i);return o.tag===0?new g(0,[R([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 G(0,["a seq",n])]])}function zf(e,t,n){if(Array.isArray(n)){let r=-1;const s=n;return Vi((i,o)=>{if(r=r+1|0,i.tag===0){const a=i.fields[0],l=e(t+".["+vr(r)+"]",o);return l.tag===0?(Rt(a,r,l.fields[0]),new g(0,[a])):new g(1,[l.fields[0]])}else return i},new g(0,[Fi(new Array(s.length),0,s.length,null)]),s)}else return new g(1,[[t,new G(0,["an array",n])]])}function Pw(e,t,n){return((s,i)=>{e:for(;;){const o=s,a=i;if(Z(o))return new g(1,[[t,new G(7,[a])]]);{const l=Mf(t,pe(L(o)),n);if(l.tag===1){s=C(o),i=Ye(a,ee(l.fields[0]));continue e}else return new g(0,[l.fields[0]])}}})(e,Ve())}function Dw(e,t,n){return new g(0,[e])}function Hf(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 Ow(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 Fw(e,t){let n;const r=e;return n=s=>i=>Uf(0,r,s,i),s=>i=>Hf(Lo(o=>{let a;const l=t;return a=c=>d=>Uf(1,l,c,d),c=>d=>Hf((u,m,h)=>Dw([o,u]),pe(a),c,d)}),pe(n),s,i)}function Vw(e){return Z0(e,{Compare:Jt})}function Lw(e){return _w(e,{Compare:Jt})}function Bw(e,t,n){return n!==null&&Object.getPrototypeOf(n||!1)===Object.prototype?Dc((r,s)=>{const i=r[0];return s.tag===0?Pn(o=>ut(o,s.fields[0]),r[1](t+"."+i)(n[i])):s},e,new g(0,[Ve()])):new g(1,[[t,new G(0,["an object",n])]])}function Uw(e,t,n,r){return r!==null&&Object.getPrototypeOf(r||!1)===Object.prototype?Vs((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,[ut([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,[Ve()]),Object.keys(r)):new g(1,[[n,new G(0,["an object",r])]])}function Wf(e,t,n,r){let s;const i=t.length+e|0;if(i!==r.length)return new g(1,[[n,new G(6,[(s=r.length|0,rn(Xt("Expected array of length %i but got %i"))(i)(s))])]]);{let o=new g(0,[Ve()]);for(let a=e;a<=r.length-1;a++)if(o.tag===0){const l=o.fields[0],c=rn(Xt("%s[%i]"))(n)(a),d=ye(a-e,t),u=ye(a,r);o=Pn(m=>ut(m,l),d(c)(u))}return Pn(Li,o)}}function Gf(e,t,n,r,s,i){const o=Gp(a=>Jr(a)===r,uc(n));if(o!=null){const a=o,l=tr(c=>dn(e,t,!1,c[1]),mc(a));return Pn(c=>gp(a,Cr(c)),l.length===0&&i.length<=1?new g(0,[Ve()]):Wf(1,l,s,i))}else return new g(1,[[s,new G(6,["Cannot find case "+r+" in "+Fe(n)])]])}function qf(e,t,n,r){let s;const i=new at(ie());let o;const a=Fe(r);o=a===""?e:su(a,i,e);let l;if(hc(r)){const c=tr(d=>[mf(t,Jr(d)),dn(o,t,!1,d[1])],Ns(r));l=d=>u=>Pn(m=>$p(r,Cr(m)),Bw(c,d,u))}else if(fc(r))l=c=>d=>{if(typeof d=="string")return Gf(o,t,r,d,c,[]);if(Array.isArray(d)){const u=d;return f0(m=>Gf(o,t,r,m,c,u),Pf(c+"[0]",ye(0,u)))}else return new g(1,[[c,new G(0,["a string or array",d])]])};else if(n)l=c=>d=>new g(1,[[c,new G(2,["an extra coder for "+Fe(r),d])]]);else throw new Error((s=Fe(r),rn(Xt(`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]:Xs(t.fields[0],t.fields[1],!1);return t.tag===7?n:"Error at: `"+e+"`\n"+n}function Df(e,t,n){const r=t(e,n);if(r.tag===1){const s=r.fields[0];return new g(1,[Sw(s[0],s[1])])}else return new g(0,[r.fields[0]])}function Ft(e,t){try{return Df("$",e,JSON.parse(t))}catch(n){if(n instanceof SyntaxError)return new g(1,["Given an invalid JSON: "+n.message]);throw n}}function Of(e,t){return typeof t=="string"?new g(0,[t]):new g(1,[[e,new G(0,["a string",t])]])}function Aw(e,t){if(typeof t=="string"){const n=t;return n.length===1?new g(0,[n[0]]):new g(1,[[e,new G(0,["a single character string",t])]])}else return new g(1,[[e,new G(0,["a char",t])]])}function kw(e,t){if(typeof t=="string"){let n,r="00000000-0000-0000-0000-000000000000";return n=[Ng(t,new at(()=>r,s=>{r=s})),r],n[0]?new g(0,[n[1]]):new g(1,[[e,new G(0,["a guid",t])]])}else return new g(1,[[e,new G(0,["a guid",t])]])}function Ew(e,t){return t==null?new g(0,[void 0]):new g(1,[[e,new G(0,["null",t])]])}const Ff=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 G(1,["a sbyte",s,"Value was either too large or too small for a sbyte"])]]):new g(1,[[n,new G(1,["a sbyte",s,"Value is not an integral value"])]])}else if(typeof r=="string"){let s,i=0;return s=[os(r,511,!1,8,new at(()=>i,o=>{i=o|0})),i],s[0]?new g(0,[s[1]]):new g(1,[[n,new G(0,["a sbyte",r])]])}else return new g(1,[[n,new G(0,["a sbyte",r])]])},Vf=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 G(1,["a byte",s,"Value was either too large or too small for a byte"])]]):new g(1,[[n,new G(1,["a byte",s,"Value is not an integral value"])]])}else if(typeof r=="string"){let s,i=0;return s=[os(r,511,!0,8,new at(()=>i,o=>{i=o})),i],s[0]?new g(0,[s[1]]):new g(1,[[n,new G(0,["a byte",r])]])}else return new g(1,[[n,new G(0,["a byte",r])]])},Lf=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 G(1,["an int16",s,"Value was either too large or too small for an int16"])]]):new g(1,[[n,new G(1,["an int16",s,"Value is not an integral value"])]])}else if(typeof r=="string"){let s,i=0;return s=[os(r,511,!1,16,new at(()=>i,o=>{i=o|0})),i],s[0]?new g(0,[s[1]]):new g(1,[[n,new G(0,["an int16",r])]])}else return new g(1,[[n,new G(0,["an int16",r])]])},Bf=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 G(1,["an uint16",s,"Value was either too large or too small for an uint16"])]]):new g(1,[[n,new G(1,["an uint16",s,"Value is not an integral value"])]])}else if(typeof r=="string"){let s,i=0;return s=[os(r,511,!0,16,new at(()=>i,o=>{i=o})),i],s[0]?new g(0,[s[1]]):new g(1,[[n,new G(0,["an uint16",r])]])}else return new g(1,[[n,new G(0,["an uint16",r])]])},Uf=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 G(1,["an int",s,"Value was either too large or too small for an int"])]]):new g(1,[[n,new G(1,["an int",s,"Value is not an integral value"])]])}else if(typeof r=="string"){let s,i=0;return s=[os(r,511,!1,32,new at(()=>i,o=>{i=o|0})),i],s[0]?new g(0,[s[1]]):new g(1,[[n,new G(0,["an int",r])]])}else return new g(1,[[n,new G(0,["an int",r])]])},jf=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 G(1,["an uint32",s,"Value was either too large or too small for an uint32"])]]):new g(1,[[n,new G(1,["an uint32",s,"Value is not an integral value"])]])}else if(typeof r=="string"){let s,i=0;return s=[os(r,511,!0,32,new at(()=>i,o=>{i=o})),i],s[0]?new g(0,[s[1]]):new g(1,[[n,new G(0,["an uint32",r])]])}else return new g(1,[[n,new G(0,["an uint32",r])]])};function Iw(e,t){return typeof t=="boolean"?new g(0,[t]):new g(1,[[e,new G(0,["a boolean",t])]])}function Nw(e,t){return typeof t=="number"?new g(0,[t]):new g(1,[[e,new G(0,["a float",t])]])}function Tw(e,t){return typeof t=="number"?new g(0,[t]):new g(1,[[e,new G(0,["a float32",t])]])}function Rw(e,t){if(typeof t=="string"){let n,r=Np();return n=[Rp(t,new at(()=>r,s=>{r=s})),r],n[0]?new g(0,[Mp(n[1])]):new g(1,[[e,new G(0,["a datetime",t])]])}else return new g(1,[[e,new G(0,["a datetime",t])]])}function Mw(e,t){if(typeof t=="string"){let n,r=Z1();return n=[Y1(t,new at(()=>r,s=>{r=s})),r],n[0]?new g(0,[n[1]]):new g(1,[[e,new G(0,["a datetimeoffset",t])]])}else return new g(1,[[e,new G(0,["a datetime",t])]])}function Pw(e,t){if(typeof t=="string"){let n,r=0;return n=[ow(t,new at(()=>r,s=>{r=s})),r],n[0]?new g(0,[n[1]]):new g(1,[[e,new G(0,["a timespan",t])]])}else return new g(1,[[e,new G(0,["a timespan",t])]])}function zf(e,t,n,r){let s;const i=n+".["+vr(e)+"]";if(Array.isArray(r)){const o=r;return e<o.length?t(i,ye(e,o)):new g(1,[[i,new G(5,["a longer array. Need index `"+vr(e)+"` but there are only `"+(s=o.length,vr(s))+"` entries",r])]])}else return new g(1,[[i,new G(0,["an array",r])]])}function Dw(e,t,n){return n==null?new g(0,[void 0]):Pn(lt,e(t,n))}function Hf(e,t,n){if(Array.isArray(n)){let r=-1;return Pn(Li,Vi((s,i)=>{if(r=r+1|0,s.tag===0){const o=e(t+".["+vr(r)+"]",i);return o.tag===0?new g(0,[ut(o.fields[0],s.fields[0])]):new g(1,[o.fields[0]])}else return s},new g(0,[Ve()]),n))}else return new g(1,[[t,new G(0,["a list",n])]])}function Ow(e,t,n){if(Array.isArray(n)){let r=-1;return Pn(N0,Vi((s,i)=>{if(r=r+1|0,s.tag===0){const o=e(t+".["+vr(r)+"]",i);return o.tag===0?new g(0,[R([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 G(0,["a seq",n])]])}function Wf(e,t,n){if(Array.isArray(n)){let r=-1;const s=n;return Vi((i,o)=>{if(r=r+1|0,i.tag===0){const a=i.fields[0],l=e(t+".["+vr(r)+"]",o);return l.tag===0?(Pt(a,r,l.fields[0]),new g(0,[a])):new g(1,[l.fields[0]])}else return i},new g(0,[Fi(new Array(s.length),0,s.length,null)]),s)}else return new g(1,[[t,new G(0,["an array",n])]])}function Fw(e,t,n){return((s,i)=>{e:for(;;){const o=s,a=i;if(Z(o))return new g(1,[[t,new G(7,[a])]]);{const l=Df(t,pe(L(o)),n);if(l.tag===1){s=C(o),i=Ye(a,ee(l.fields[0]));continue e}else return new g(0,[l.fields[0]])}}})(e,Ve())}function Vw(e,t,n){return new g(0,[e])}function Gf(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 Lw(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 Bw(e,t){let n;const r=e;return n=s=>i=>zf(0,r,s,i),s=>i=>Gf(Uo(o=>{let a;const l=t;return a=c=>d=>zf(1,l,c,d),c=>d=>Gf((u,m,h)=>Vw([o,u]),pe(a),c,d)}),pe(n),s,i)}function Uw(e){return X0(e,{Compare:Xt})}function jw(e){return Cw(e,{Compare:Xt})}function zw(e,t,n){return n!==null&&Object.getPrototypeOf(n||!1)===Object.prototype?Fc((r,s)=>{const i=r[0];return s.tag===0?Pn(o=>ut(o,s.fields[0]),r[1](t+"."+i)(n[i])):s},e,new g(0,[Ve()])):new g(1,[[t,new G(0,["an object",n])]])}function Hw(e,t,n,r){return r!==null&&Object.getPrototypeOf(r||!1)===Object.prototype?Vs((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,[ut([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,[Ve()]),Object.keys(r)):new g(1,[[n,new G(0,["an object",r])]])}function qf(e,t,n,r){let s;const i=t.length+e|0;if(i!==r.length)return new g(1,[[n,new G(6,[(s=r.length|0,sn(en("Expected array of length %i but got %i"))(i)(s))])]]);{let o=new g(0,[Ve()]);for(let a=e;a<=r.length-1;a++)if(o.tag===0){const l=o.fields[0],c=sn(en("%s[%i]"))(n)(a),d=ye(a-e,t),u=ye(a,r);o=Pn(m=>ut(m,l),d(c)(u))}return Pn(Li,o)}}function Kf(e,t,n,r,s,i){const o=Kp(a=>Jr(a)===r,fc(n));if(o!=null){const a=o,l=tr(c=>fn(e,t,!1,c[1]),gc(a));return Pn(c=>wp(a,Cr(c)),l.length===0&&i.length<=1?new g(0,[Ve()]):qf(1,l,s,i))}else return new g(1,[[s,new G(6,["Cannot find case "+r+" in "+Fe(n)])]])}function Zf(e,t,n,r){let s;const i=new at(ie());let o;const a=Fe(r);o=a===""?e:ou(a,i,e);let l;if(pc(r)){const c=tr(d=>[gf(t,Jr(d)),fn(o,t,!1,d[1])],Ns(r));l=d=>u=>Pn(m=>yp(r,Cr(m)),zw(c,d,u))}else if(mc(r))l=c=>d=>{if(typeof d=="string")return Kf(o,t,r,d,c,[]);if(Array.isArray(d)){const u=d;return m0(m=>Kf(o,t,r,m,c,u),Of(c+"[0]",ye(0,u)))}else return new g(1,[[c,new G(0,["a string or array",d])]])};else if(n)l=c=>d=>new g(1,[[c,new G(2,["an extra coder for "+Fe(r),d])]]);else throw new Error((s=Fe(r),sn(en(`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 dn(e,t,n,r){let s,i,o,a;const l=Fe(r),c=Bs(l,e);if(c==null)if(oc(r)){const d=dn(e,t,!1,Is(r));return u=>m=>zf(pe(d),u,m)}else if(Wo(r))switch(Fe(cc(r))){case"System.SByte":return u=>m=>{const h=r,p=u,$=m,w=Df(p)($);if(w.tag===1)return new g(1,[w.fields[0]]);{const S=w.fields[0]|0;return rs(S,Yr(h),{Equals:(A,E)=>A===E,GetHashCode:nn})?new g(0,[Xr(h,S.toString())]):new g(1,[[p,new G(1,[Fe(h),$,"Unkown value provided for the enum"])]])}};case"System.Byte":return u=>m=>{const h=r,p=u,$=m,w=Of(p)($);if(w.tag===1)return new g(1,[w.fields[0]]);{const S=w.fields[0];return rs(S,Yr(h),{Equals:(A,E)=>A===E,GetHashCode:nn})?new g(0,[Xr(h,S.toString())]):new g(1,[[p,new G(1,[Fe(h),$,"Unkown value provided for the enum"])]])}};case"System.Int16":return u=>m=>{const h=r,p=u,$=m,w=Ff(p)($);if(w.tag===1)return new g(1,[w.fields[0]]);{const S=w.fields[0]|0;return rs(S,Yr(h),{Equals:(A,E)=>A===E,GetHashCode:nn})?new g(0,[Xr(h,Hm(S))]):new g(1,[[p,new G(1,[Fe(h),$,"Unkown value provided for the enum"])]])}};case"System.UInt16":return u=>m=>{const h=r,p=u,$=m,w=Vf(p)($);if(w.tag===1)return new g(1,[w.fields[0]]);{const S=w.fields[0];return rs(S,Yr(h),{Equals:(A,E)=>A===E,GetHashCode:nn})?new g(0,[Xr(h,S.toString())]):new g(1,[[p,new G(1,[Fe(h),$,"Unkown value provided for the enum"])]])}};case"System.Int32":return u=>m=>{const h=r,p=u,$=m,w=Lf(p)($);if(w.tag===1)return new g(1,[w.fields[0]]);{const S=w.fields[0]|0;return rs(S,Yr(h),{Equals:(A,E)=>A===E,GetHashCode:nn})?new g(0,[Xr(h,vr(S))]):new g(1,[[p,new G(1,[Fe(h),$,"Unkown value provided for the enum"])]])}};case"System.UInt32":return u=>m=>{const h=r,p=u,$=m,w=Bf(p)($);if(w.tag===1)return new g(1,[w.fields[0]]);{const S=w.fields[0];return rs(S,Yr(h),{Equals:(A,E)=>A===E,GetHashCode:nn})?new g(0,[Xr(h,S.toString())]):new g(1,[[p,new G(1,[Fe(h),$,"Unkown value provided for the enum"])]])}};default:{const u=Fe(r),m=kc(Xt(`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 fn(e,t,n,r){let s,i,o,a;const l=Fe(r),c=Bs(l,e);if(c==null)if(lc(r)){const d=fn(e,t,!1,Is(r));return u=>m=>Wf(pe(d),u,m)}else if(qo(r))switch(Fe(dc(r))){case"System.SByte":return u=>m=>{const h=r,p=u,$=m,w=Ff(p)($);if(w.tag===1)return new g(1,[w.fields[0]]);{const S=w.fields[0]|0;return rs(S,Yr(h),{Equals:(A,E)=>A===E,GetHashCode:rn})?new g(0,[Xr(h,S.toString())]):new g(1,[[p,new G(1,[Fe(h),$,"Unkown value provided for the enum"])]])}};case"System.Byte":return u=>m=>{const h=r,p=u,$=m,w=Vf(p)($);if(w.tag===1)return new g(1,[w.fields[0]]);{const S=w.fields[0];return rs(S,Yr(h),{Equals:(A,E)=>A===E,GetHashCode:rn})?new g(0,[Xr(h,S.toString())]):new g(1,[[p,new G(1,[Fe(h),$,"Unkown value provided for the enum"])]])}};case"System.Int16":return u=>m=>{const h=r,p=u,$=m,w=Lf(p)($);if(w.tag===1)return new g(1,[w.fields[0]]);{const S=w.fields[0]|0;return rs(S,Yr(h),{Equals:(A,E)=>A===E,GetHashCode:rn})?new g(0,[Xr(h,Gm(S))]):new g(1,[[p,new G(1,[Fe(h),$,"Unkown value provided for the enum"])]])}};case"System.UInt16":return u=>m=>{const h=r,p=u,$=m,w=Bf(p)($);if(w.tag===1)return new g(1,[w.fields[0]]);{const S=w.fields[0];return rs(S,Yr(h),{Equals:(A,E)=>A===E,GetHashCode:rn})?new g(0,[Xr(h,S.toString())]):new g(1,[[p,new G(1,[Fe(h),$,"Unkown value provided for the enum"])]])}};case"System.Int32":return u=>m=>{const h=r,p=u,$=m,w=Uf(p)($);if(w.tag===1)return new g(1,[w.fields[0]]);{const S=w.fields[0]|0;return rs(S,Yr(h),{Equals:(A,E)=>A===E,GetHashCode:rn})?new g(0,[Xr(h,vr(S))]):new g(1,[[p,new G(1,[Fe(h),$,"Unkown value provided for the enum"])]])}};case"System.UInt32":return u=>m=>{const h=r,p=u,$=m,w=jf(p)($);if(w.tag===1)return new g(1,[w.fields[0]]);{const S=w.fields[0];return rs(S,Yr(h),{Equals:(A,E)=>A===E,GetHashCode:rn})?new g(0,[Xr(h,S.toString())]):new g(1,[[p,new G(1,[Fe(h),$,"Unkown value provided for the enum"])]])}};default:{const u=Fe(r),m=Ic(en(`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(ac(r))if(Go(r)){const d=tr(u=>dn(e,t,!1,u),dc(r));return u=>m=>Array.isArray(m)?Pn(h=>wp(Cr(h)),Wf(0,d,u,m)):new g(1,[[u,new G(0,["an array",m])]])}else switch(Fe(lc(r))){case"Microsoft.FSharp.Core.FSharpOption`1[System.Object]":return s=dn(e,t,!0,ye(0,jt(r))),u=>m=>Rw(pe(s),u,m);case"Microsoft.FSharp.Collections.FSharpList`1[System.Object]":return i=dn(e,t,!1,ye(0,jt(r))),u=>m=>jf(pe(i),u,m);case"System.Collections.Generic.IEnumerable`1[System.Object]":return o=dn(e,t,!1,ye(0,jt(r))),u=>m=>Mw(pe(o),u,m);case"Microsoft.FSharp.Collections.FSharpMap`2[System.Object,System.Object]":{const u=dn(e,t,!1,ye(0,jt(r))),m=dn(e,t,!1,ye(1,jt(r)));let h;const p=y([$=>w=>Uw(pe(u),pe(m),$,w),(a=Fw(pe(u),pe(m)),$=>w=>jf(pe(a),$,w))]);return h=$=>w=>Pw(p,$,w),$=>w=>Ow(Vw,pe(h),$,w)}case"Microsoft.FSharp.Collections.FSharpSet`1[System.Object]":{const u=dn(e,t,!1,ye(0,jt(r)));return m=>h=>{const p=zf(pe(u),m,h);return p.tag===0?new g(0,[Lw(p.fields[0])]):new g(1,[p.fields[0]])}}default:return qf(e,t,n,r)}else switch(l){case"System.Boolean":return d=>u=>Aw(d,u);case"Microsoft.FSharp.Core.Unit":return d=>u=>Sw(d,u);case"System.String":return d=>u=>Pf(d,u);case"System.Char":return d=>u=>xw(d,u);case"System.SByte":return Df;case"System.Byte":return Of;case"System.Int16":return Ff;case"System.UInt16":return Vf;case"System.Int32":return Lf;case"System.UInt32":return Bf;case"System.Double":return d=>u=>kw(d,u);case"System.Single":return d=>u=>Ew(d,u);case"System.DateTime":return d=>u=>Iw(d,u);case"System.DateTimeOffset":return d=>u=>Nw(d,u);case"System.TimeSpan":return d=>u=>Tw(d,u);case"System.Guid":return d=>u=>Cw(d,u);case"System.Object":return d=>u=>new g(0,[u]);default:return qf(e,t,n,r)}else{const d=c;return u=>m=>d.contents(u)(m)}}function jw(e){return Us({Compare:Rn})}function Ot(e,t,n){const r=We(t,new qe(0,[]));return dn(jw(),r,!1,e)}class zw extends Y{constructor(t){super(),this.Roles=t}}function Hw(){return Je("AccountRegistry.AdminUI.Jwt.JwtPayload",[],zw,()=>[["Roles",Ho(H)]])}function Kf(e){const t=Yo(e??"",["."],void 0,0);if(!ta((n,r)=>n===r,t)&&t.length===3){let n;const r=ye(1,t);return n=atob(r),Dt(pe(Ot(Hw(),new qe(1,[]))),n)}else return new g(1,["Failed to decode access token"])}function ps(e,t,n,r){return cr(s=>{ur(s)},e,t,s=>s.tag===1?r(s.fields[0]):n(s.fields[0]))}function Ww(){return Ve()}function al(e){return re("/",e)}function Gw(e,t){const n=new Error("Duplicate SubId");return e(["Duplicate SubId: "+al(t),n])}function Zf(e,t,n){try{_e(n)}catch(r){e(["Error stopping subscription: "+al(t),r])}}function qw(e,t,n,r){try{return[n,r(t)]}catch(s){e(["Error starting subscription: "+al(n),s]);return}}function Kw(e,t){Os(n=>{Zf(e,n[0],n[1])},t)}function Jf(e,t,n,r,s,i){return Os(o=>{Gw(e,o)},n),Os(o=>{Zf(e,o[0],o[1])},r),Ye(s,Vc(o=>qw(e,t,o[0],o[1]),i))}function Zw(){return[Ve(),yw({Compare:Jt}),Ve()]}function Jw(e,t,n,r,s){return ol(e,r)?[ut(e,n),r,s]:[n,ww(e,r),ut([e,t],s)]}function Yw(e){return Xp((t,n)=>Jw(t[0],t[1],n[0],n[1],n[2]),e,Zw())}const Xw=Ve();function Yf(e,t){const n=bw(St(o=>o[0],e),{Compare:Jt}),r=Yw(t),s=r[1],i=r[0];if(n.Equals(s))return[i,Ve(),e,Ve()];{const o=a0(a=>ol(a[0],s),e);return[i,o[1],o[0],Bi(a=>!ol(a[0],n),r[2])]}}function Qw(e,t,n,r){const s=Jt(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=Jt(o,t)|0;return i&&a<=0||!i&&a>=0?[o,r(o,e)]:void 0}}function ey(e,t,n,r,s){const i=Qw(t,n,r,s);return k(()=>S0(i,e))}function ty(e,t,n){return ey(e,t,n,0,(r,s)=>r+s)}class gs extends B{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Writable","ReadWritable"]}}class ny{constructor(t){this.state=new gs(0,[Fi(new Array(Pc(t,10)),0,Pc(t,10),null),0])}}function ry(e){return new ny(e)}function Xf(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 gs(0,[s,n]):e.state=new gs(1,[s,n,i]),lt(ye(r,s))}else return}function sy(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];Rt(i,r,t);const o=(r+1)%i.length|0;o===s?e.state=new gs(1,[iy(e,s,i),i.length,0]):e.state=new gs(1,[i,o,s])}else{const r=n.fields[1]|0,s=n.fields[0];Rt(s,r,t);const i=(r+1)%s.length|0;e.state=new gs(1,[s,i,r])}}function iy(e,t,n){return Array.from(k(()=>R(I0(t,n),k(()=>R(N0(t,n),k(()=>Gc(r=>x(ie()),ty(0,1,n.length))))))))}class ll extends Y{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 zn(e,t,n){return new ll(e,t,r=>Ww(),n,pe(r=>{const s=er(n)(r);return i=>{s(i)}}),r=>{A1(r[0],r[1])},[r=>!1,r=>{}])}function oy(e,t){return new ll(t.init,t.update,t.subscribe,t.view,e,t.onError,t.termination)}function ay(e){return e.init}function ly(e,t,n,r,s,i,o){const a=er(e)(o.init),l=Bo(t)(er(o.update)),c=Bo(n)(er(o.view)),d=Bo(r)(er(o.setState));return new ll(a,pe(l),er(s)(o.subscribe),pe(c),pe(d),o.onError,i(o.termination))}function cy(e,t,n){let r;const s=n.init(t),i=s[0],o=n.subscribe(i),a=n.termination,l=ry(10);let c=!1,d=i,u=Xw,m=!1;const h=w=>{m||(sy(l,w),c||(c=!0,$(),c=!1))},p=er(e)(h),$=()=>{let w,S=Xf(l);for(;!m&&S!=null;){const A=O(S);if(a[0](A))Kw(n.onError,u),a[1](d),m=!0;else{const E=n.update(A,d),P=E[0],V=n.subscribe(P);n.setState(P,p),qd(ne=>{n.onError([rn(Xt("Error handling the message: %A"))(A),ne])},p,E[1]),d=P,u=(w=Yf(u,V),Jf(n.onError,p,w[0],w[1],w[2],w[3])),S=Xf(l)}}};c=!0,n.setState(i,p),qd(w=>{n.onError([rn(Xt("Error intitializing:")),w])},p,s[1]),u=(r=Yf(u,o),Jf(n.onError,p,r[0],r[1],r[2],r[3])),$(),c=!1}function uy(e,t){cy(pe(n=>n),e,t)}function dy(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 cl={exports:{}},ul={};const fy=dy(qa);/**
22
+ `))(u);return h=>m(h)}}else if(cc(r))if(Ko(r)){const d=tr(u=>fn(e,t,!1,u),hc(r));return u=>m=>Array.isArray(m)?Pn(h=>bp(Cr(h)),qf(0,d,u,m)):new g(1,[[u,new G(0,["an array",m])]])}else switch(Fe(uc(r))){case"Microsoft.FSharp.Core.FSharpOption`1[System.Object]":return s=fn(e,t,!0,ye(0,Ht(r))),u=>m=>Dw(pe(s),u,m);case"Microsoft.FSharp.Collections.FSharpList`1[System.Object]":return i=fn(e,t,!1,ye(0,Ht(r))),u=>m=>Hf(pe(i),u,m);case"System.Collections.Generic.IEnumerable`1[System.Object]":return o=fn(e,t,!1,ye(0,Ht(r))),u=>m=>Ow(pe(o),u,m);case"Microsoft.FSharp.Collections.FSharpMap`2[System.Object,System.Object]":{const u=fn(e,t,!1,ye(0,Ht(r))),m=fn(e,t,!1,ye(1,Ht(r)));let h;const p=y([$=>w=>Hw(pe(u),pe(m),$,w),(a=Bw(pe(u),pe(m)),$=>w=>Hf(pe(a),$,w))]);return h=$=>w=>Fw(p,$,w),$=>w=>Lw(Uw,pe(h),$,w)}case"Microsoft.FSharp.Collections.FSharpSet`1[System.Object]":{const u=fn(e,t,!1,ye(0,Ht(r)));return m=>h=>{const p=Wf(pe(u),m,h);return p.tag===0?new g(0,[jw(p.fields[0])]):new g(1,[p.fields[0]])}}default:return Zf(e,t,n,r)}else switch(l){case"System.Boolean":return d=>u=>Iw(d,u);case"Microsoft.FSharp.Core.Unit":return d=>u=>Ew(d,u);case"System.String":return d=>u=>Of(d,u);case"System.Char":return d=>u=>Aw(d,u);case"System.SByte":return Ff;case"System.Byte":return Vf;case"System.Int16":return Lf;case"System.UInt16":return Bf;case"System.Int32":return Uf;case"System.UInt32":return jf;case"System.Double":return d=>u=>Nw(d,u);case"System.Single":return d=>u=>Tw(d,u);case"System.DateTime":return d=>u=>Rw(d,u);case"System.DateTimeOffset":return d=>u=>Mw(d,u);case"System.TimeSpan":return d=>u=>Pw(d,u);case"System.Guid":return d=>u=>kw(d,u);case"System.Object":return d=>u=>new g(0,[u]);default:return Zf(e,t,n,r)}else{const d=c;return u=>m=>d.contents(u)(m)}}function Ww(e){return Us({Compare:Rn})}function Vt(e,t,n){const r=We(t,new qe(0,[]));return fn(Ww(),r,!1,e)}class Gw extends Y{constructor(t){super(),this.Roles=t}}function qw(){return Je("AccountRegistry.AdminUI.Jwt.JwtPayload",[],Gw,()=>[["Roles",Go(W)]])}function Jf(e){const t=Qo(e??"",["."],void 0,0);if(!ra((n,r)=>n===r,t)&&t.length===3){let n;const r=ye(1,t);return n=atob(r),Ft(pe(Vt(qw(),new qe(1,[]))),n)}else return new g(1,["Failed to decode access token"])}function ps(e,t,n,r){return cr(s=>{ur(s)},e,t,s=>s.tag===1?r(s.fields[0]):n(s.fields[0]))}function Kw(){return Ve()}function cl(e){return re("/",e)}function Zw(e,t){const n=new Error("Duplicate SubId");return e(["Duplicate SubId: "+cl(t),n])}function Yf(e,t,n){try{_e(n)}catch(r){e(["Error stopping subscription: "+cl(t),r])}}function Jw(e,t,n,r){try{return[n,r(t)]}catch(s){e(["Error starting subscription: "+cl(n),s]);return}}function Yw(e,t){Os(n=>{Yf(e,n[0],n[1])},t)}function Xf(e,t,n,r,s,i){return Os(o=>{Zw(e,o)},n),Os(o=>{Yf(e,o[0],o[1])},r),Ye(s,Bc(o=>Jw(e,t,o[0],o[1]),i))}function Xw(){return[Ve(),vw({Compare:Xt}),Ve()]}function Qw(e,t,n,r,s){return ll(e,r)?[ut(e,n),r,s]:[n,_w(e,r),ut([e,t],s)]}function ey(e){return e0((t,n)=>Qw(t[0],t[1],n[0],n[1],n[2]),e,Xw())}const ty=Ve();function Qf(e,t){const n=xw(At(o=>o[0],e),{Compare:Xt}),r=ey(t),s=r[1],i=r[0];if(n.Equals(s))return[i,Ve(),e,Ve()];{const o=c0(a=>ll(a[0],s),e);return[i,o[1],o[0],Bi(a=>!ll(a[0],n),r[2])]}}function ny(e,t,n,r){const s=Xt(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=Xt(o,t)|0;return i&&a<=0||!i&&a>=0?[o,r(o,e)]:void 0}}function ry(e,t,n,r,s){const i=ny(t,n,r,s);return k(()=>k0(i,e))}function sy(e,t,n){return ry(e,t,n,0,(r,s)=>r+s)}class gs extends B{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Writable","ReadWritable"]}}class iy{constructor(t){this.state=new gs(0,[Fi(new Array(Oc(t,10)),0,Oc(t,10),null),0])}}function oy(e){return new iy(e)}function eh(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 gs(0,[s,n]):e.state=new gs(1,[s,n,i]),lt(ye(r,s))}else return}function ay(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];Pt(i,r,t);const o=(r+1)%i.length|0;o===s?e.state=new gs(1,[ly(e,s,i),i.length,0]):e.state=new gs(1,[i,o,s])}else{const r=n.fields[1]|0,s=n.fields[0];Pt(s,r,t);const i=(r+1)%s.length|0;e.state=new gs(1,[s,i,r])}}function ly(e,t,n){return Array.from(k(()=>R(T0(t,n),k(()=>R(R0(t,n),k(()=>Kc(r=>x(ie()),sy(0,1,n.length))))))))}class ul extends Y{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 zn(e,t,n){return new ul(e,t,r=>Kw(),n,pe(r=>{const s=er(n)(r);return i=>{s(i)}}),r=>{I1(r[0],r[1])},[r=>!1,r=>{}])}function cy(e,t){return new ul(t.init,t.update,t.subscribe,t.view,e,t.onError,t.termination)}function uy(e){return e.init}function dy(e,t,n,r,s,i,o){const a=er(e)(o.init),l=jo(t)(er(o.update)),c=jo(n)(er(o.view)),d=jo(r)(er(o.setState));return new ul(a,pe(l),er(s)(o.subscribe),pe(c),pe(d),o.onError,i(o.termination))}function fy(e,t,n){let r;const s=n.init(t),i=s[0],o=n.subscribe(i),a=n.termination,l=oy(10);let c=!1,d=i,u=ty,m=!1;const h=w=>{m||(ay(l,w),c||(c=!0,$(),c=!1))},p=er(e)(h),$=()=>{let w,S=eh(l);for(;!m&&S!=null;){const A=O(S);if(a[0](A))Yw(n.onError,u),a[1](d),m=!0;else{const E=n.update(A,d),P=E[0],V=n.subscribe(P);n.setState(P,p),Zd(ne=>{n.onError([sn(en("Error handling the message: %A"))(A),ne])},p,E[1]),d=P,u=(w=Qf(u,V),Xf(n.onError,p,w[0],w[1],w[2],w[3])),S=eh(l)}}};c=!0,n.setState(i,p),Zd(w=>{n.onError([sn(en("Error intitializing:")),w])},p,s[1]),u=(r=Qf(u,o),Xf(n.onError,p,r[0],r[1],r[2],r[3])),$(),c=!1}function hy(e,t){fy(pe(n=>n),e,t)}function my(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 dl={exports:{}},fl={};const py=my(Za);/**
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 Qf;function hy(){if(Qf)return ul;Qf=1;var e=fy;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 ul.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:d,ul}var eh;function my(){return eh||(eh=1,cl.exports=hy()),cl.exports}var py=my();class gy{constructor(t,n,r){this.arg=n,this.dependencies=r;const s=t(),i=[];this.finalDispatch=void 0;let o;const a=ay(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=Fo(this.state[0]);return uy(this.arg,oy((h,p)=>{const $=this.state;this.finalDispatch=p,this.state=[h,$[1],!0,i],h!==$[0]&&d()},ly((h,p)=>{const $=this.cmd;return this.cmd=W(),[this.state[0],$]},(h,p,$)=>h(p)(this.state[0]),Lo(h=>h),Lo(h=>h),pe(h=>h),h=>[p=>h[0](p)?!0:m&&u,p=>{const $=p;Fo($)?_e($):h[1](p)}],s))),()=>{u=!0}}}}function th(e,t,n){return new gy(e,t,n)}function $y(e){return e.state}function wy(e){return e.subscribe}function yy(e,t,n){return Se(e.arg,t)?!Se(e.dependencies,n):!0}function Hn(e,t,n){const r=et(()=>th(e,t,n)),s=r[0];yy(s,t,n)&&r[1](th(e,t,n));const i=py.useSyncExternalStore(wy(s),()=>$y(s)),o=i[2],a=i[3],l=i[1];return Pe(()=>{if(o&&a.length>0){let c=ve(a);try{for(;c["System.Collections.IEnumerator.MoveNext"]();){const d=c["System.Collections.Generic.IEnumerator`1.get_Current"]();setTimeout(()=>{l(d)})}}finally{_e(c)}Qm(a)}},[o,a]),[i[0],l]}class kt extends B{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["GET","POST","PUT","PATCH","DELETE","HEAD","OPTIONS"]}}class nh extends B{constructor(t,n){super(),this.tag=0,this.fields=[t,n]}cases(){return["Header"]}}class $s extends B{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Empty","Text","Binary","Form"]}}class Qs extends Y{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 ws extends B{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Text","Blob","ArrayBuffer","Unknown"]}}class rh extends Y{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 dl(e){return new nh("Authorization",e)}const Pr=new Qs("",new kt(0,[]),Ve(),!1,void 0,void 0,void 0,new $s(0,[]));new rh(0,"","","",Us({Compare:Rn}),new ws(0,[""]));function sh(e,t){return Oi(t)?new Array(0):Yo(t,[e],void 0,0)}function by(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 Et(e){return new Qs(e,Pr.method,Pr.headers,Pr.withCredentials,Pr.overridenMimeType,Pr.overridenResponseType,Pr.timeout,Pr.content)}function Ft(e,t){return new Qs(t.url,e,t.headers,t.withCredentials,t.overridenMimeType,t.overridenResponseType,t.timeout,t.content)}function io(e,t){return new Qs(t.url,t.method,Ye(t.headers,ee(e)),t.withCredentials,t.overridenMimeType,t.overridenResponseType,t.timeout,t.content)}function ei(e,t){return new Qs(t.url,t.method,t.headers,t.withCredentials,t.overridenMimeType,t.overridenResponseType,t.timeout,e)}function fl(e){return $1(t=>{const n=new XMLHttpRequest;n.open(by(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 ws(0,[n.responseText]):h==="text"?new ws(0,[n.responseText]):h==="arraybuffer"?new ws(2,[n.response]):h==="blob"?new ws(1,[n.response]):new ws(3,[n.response])),p=J0(qp($=>{const w=y(sh(":",$));if(!Z(w))return[L(w).toLocaleLowerCase(),re(":",C(w)).trim()]},sh(`\r
31
- `,n.getAllResponseHeaders())),{Compare:Rn}),new rh(d,l,u,n.responseURL,p,m)))};const r=ve(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{_e(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 _y(e,t,n){e:for(;;){const r=e,s=t,i=n;if(Z(i)){const o=r;return o.tag===1?new g(1,[o.fields[0]]):new g(0,[Li(o.fields[0])])}else{let o;const a=s(L(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,[ut(a.fields[0],l.fields[0])])}if(o.tag===1)return o;e=o,t=s,n=C(i);continue e}}}function vy(e,t){return _y(new g(0,[Ve()]),e,t)}function xy(e){return vy(t=>t,e)}function Cy(e){return e}const ih=ie();function oo(e){return Array.from(e)}function Sy(e){return es(e,"O")}function Ay(e){return tw(e)}function ky(){return ie()}function Ey(e){return es(e,"O")}function ti(e,t){return JSON.stringify(t,void 0,lt(e))}function Iy(e){return t=>Rc(Ge(e,t),()=>ih)}function oh(e,t,n,r){let s;const i=new at(ie());let o;const a=Fe(r);o=a===""?e:su(a,i,e);let l;if(hc(r)){const c=tr(d=>{const u=mf(t,Jr(d)),m=Wn(o,t,n,d[1]);return h=>p=>{const $=pp(h,d);return(!n||n&&$!=null)&&(p[u]=m($)),p}},Ns(r));l=d=>Vs((u,m)=>m(d)(u),{},c)}else if(fc(r))l=c=>{const d=mp(c,r),u=d[0],m=d[1],h=m.length|0;if(h===0)return Jr(u);{const p=h|0,$=mc(u),w=Fi(new Array(p+1),0,p+1,null);Rt(w,0,Jr(u));for(let S=1;S<=p;S++){const A=Wn(o,t,n,ye(S-1,$)[1]);Rt(w,S,A(ye(S-1,m)))}return w}};else throw new Error((s=Fe(r),rn(Xt(`Cannot generate auto encoder for %s. Please pass an extra encoder.
30
+ */var th;function gy(){if(th)return fl;th=1;var e=py;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 fl.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:d,fl}var nh;function $y(){return nh||(nh=1,dl.exports=gy()),dl.exports}var wy=$y();class yy{constructor(t,n,r){this.arg=n,this.dependencies=r;const s=t(),i=[];this.finalDispatch=void 0;let o;const a=uy(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=Lo(this.state[0]);return hy(this.arg,cy((h,p)=>{const $=this.state;this.finalDispatch=p,this.state=[h,$[1],!0,i],h!==$[0]&&d()},dy((h,p)=>{const $=this.cmd;return this.cmd=z(),[this.state[0],$]},(h,p,$)=>h(p)(this.state[0]),Uo(h=>h),Uo(h=>h),pe(h=>h),h=>[p=>h[0](p)?!0:m&&u,p=>{const $=p;Lo($)?_e($):h[1](p)}],s))),()=>{u=!0}}}}function rh(e,t,n){return new yy(e,t,n)}function by(e){return e.state}function _y(e){return e.subscribe}function vy(e,t,n){return Se(e.arg,t)?!Se(e.dependencies,n):!0}function Hn(e,t,n){const r=et(()=>rh(e,t,n)),s=r[0];vy(s,t,n)&&r[1](rh(e,t,n));const i=wy.useSyncExternalStore(_y(s),()=>by(s)),o=i[2],a=i[3],l=i[1];return Pe(()=>{if(o&&a.length>0){let c=ve(a);try{for(;c["System.Collections.IEnumerator.MoveNext"]();){const d=c["System.Collections.Generic.IEnumerator`1.get_Current"]();setTimeout(()=>{l(d)})}}finally{_e(c)}tp(a)}},[o,a]),[i[0],l]}class Et extends B{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["GET","POST","PUT","PATCH","DELETE","HEAD","OPTIONS"]}}class sh extends B{constructor(t,n){super(),this.tag=0,this.fields=[t,n]}cases(){return["Header"]}}class $s extends B{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Empty","Text","Binary","Form"]}}class Qs extends Y{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 ws extends B{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Text","Blob","ArrayBuffer","Unknown"]}}class ih extends Y{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 hl(e){return new sh("Authorization",e)}const Pr=new Qs("",new Et(0,[]),Ve(),!1,void 0,void 0,void 0,new $s(0,[]));new ih(0,"","","",Us({Compare:Rn}),new ws(0,[""]));function oh(e,t){return Oi(t)?new Array(0):Qo(t,[e],void 0,0)}function xy(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 It(e){return new Qs(e,Pr.method,Pr.headers,Pr.withCredentials,Pr.overridenMimeType,Pr.overridenResponseType,Pr.timeout,Pr.content)}function Lt(e,t){return new Qs(t.url,e,t.headers,t.withCredentials,t.overridenMimeType,t.overridenResponseType,t.timeout,t.content)}function oo(e,t){return new Qs(t.url,t.method,Ye(t.headers,ee(e)),t.withCredentials,t.overridenMimeType,t.overridenResponseType,t.timeout,t.content)}function ei(e,t){return new Qs(t.url,t.method,t.headers,t.withCredentials,t.overridenMimeType,t.overridenResponseType,t.timeout,e)}function ml(e){return b1(t=>{const n=new XMLHttpRequest;n.open(xy(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 ws(0,[n.responseText]):h==="text"?new ws(0,[n.responseText]):h==="arraybuffer"?new ws(2,[n.response]):h==="blob"?new ws(1,[n.response]):new ws(3,[n.response])),p=Q0(Zp($=>{const w=y(oh(":",$));if(!Z(w))return[L(w).toLocaleLowerCase(),re(":",C(w)).trim()]},oh(`\r
31
+ `,n.getAllResponseHeaders())),{Compare:Rn}),new ih(d,l,u,n.responseURL,p,m)))};const r=ve(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{_e(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 Cy(e,t,n){e:for(;;){const r=e,s=t,i=n;if(Z(i)){const o=r;return o.tag===1?new g(1,[o.fields[0]]):new g(0,[Li(o.fields[0])])}else{let o;const a=s(L(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,[ut(a.fields[0],l.fields[0])])}if(o.tag===1)return o;e=o,t=s,n=C(i);continue e}}}function Sy(e,t){return Cy(new g(0,[Ve()]),e,t)}function Ay(e){return Sy(t=>t,e)}function ky(e){return e}const ah=ie();function ao(e){return Array.from(e)}function Ey(e){return es(e,"O")}function Iy(e){return sw(e)}function Ny(){return ie()}function Ty(e){return es(e,"O")}function ti(e,t){return JSON.stringify(t,void 0,lt(e))}function Ry(e){return t=>Pc(Ge(e,t),()=>ah)}function lh(e,t,n,r){let s;const i=new at(ie());let o;const a=Fe(r);o=a===""?e:ou(a,i,e);let l;if(pc(r)){const c=tr(d=>{const u=gf(t,Jr(d)),m=Wn(o,t,n,d[1]);return h=>p=>{const $=$p(h,d);return(!n||n&&$!=null)&&(p[u]=m($)),p}},Ns(r));l=d=>Vs((u,m)=>m(d)(u),{},c)}else if(mc(r))l=c=>{const d=gp(c,r),u=d[0],m=d[1],h=m.length|0;if(h===0)return Jr(u);{const p=h|0,$=gc(u),w=Fi(new Array(p+1),0,p+1,null);Pt(w,0,Jr(u));for(let S=1;S<=p;S++){const A=Wn(o,t,n,ye(S-1,$)[1]);Pt(w,S,A(ye(S-1,m)))}return w}};else throw new Error((s=Fe(r),sn(en(`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 Wn(e,t,n,r){const s=Fe(r),i=Bs(s,e);if(i==null)if(oc(r)){const o=Wn(e,t,n,Is(r));return a=>oo(Ee(o,a))}else if(Wo(r))switch(Fe(cc(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=Fe(r);return kc(Xt(`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 Wn(e,t,n,r){const s=Fe(r),i=Bs(s,e);if(i==null)if(lc(r)){const o=Wn(e,t,n,Is(r));return a=>ao(Ee(o,a))}else if(qo(r))switch(Fe(dc(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=Fe(r);return Ic(en(`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(ac(r))if(Go(r)){const o=tr(a=>Wn(e,t,n,a),dc(r));return a=>oo(oa((l,c)=>ye(l,o)(c),a))}else{const o=Fe(lc(r));if(o==="Microsoft.FSharp.Core.FSharpOption`1[System.Object]"){const a=new jm(()=>Iy(Wn(e,t,n,ye(0,jt(r)))));return l=>l==null?ih: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=Wn(e,t,n,ye(0,jt(r)));return l=>oo(Ee(a,l))}else if(o==="Microsoft.FSharp.Collections.FSharpMap`2[System.Object,System.Object]"){const a=ye(0,jt(r)),l=Wn(e,t,n,ye(1,jt(r)));if(Fe(a)==="System.String"||Fe(a)==="System.Guid")return c=>Vs((d,u)=>{const m=u;return d[m[0]]=l(m[1]),d},{},c);{let c;return c=Wn(e,t,n,a),u=>oo(Ee(m=>{const h=m;return[c(h[0]),l(h[1])]},u))}}else return oh(e,t,n,r)}else switch(s){case"System.Boolean":return o=>o;case"Microsoft.FSharp.Core.Unit":return ky;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 Ey;case"System.DateTimeOffset":return Sy;case"System.TimeSpan":return Ay;case"System.Guid":return Cy;case"System.Object":return o=>o;default:return oh(e,t,n,r)}else{const o=i;return a=>o.contents(a)}}function Ny(e){return Us({Compare:Rn})}function ni(e,t,n,r){const s=We(t,new qe(0,[])),i=We(r,!0);return Wn(Ny(),s,i,e)}function hl(e){return new pu(Mt(e))}function Gn(e){return`${e}/account-registry/admin`}const Ty=5,Ry=1e3;function ah(e,t,n,r){return I.Delay(()=>{const s=io(dl(rn(Xt("Bearer %s"))(n)),r);return I.Bind(fl(s),i=>{let o,a;const l=i,c=l.statusCode|0;return o=c|0,o>=200&&o<=299?I.Return(l):(a=c|0,(a===429?!0:a>=500)&&e>=1?I.Bind(Ya(t),()=>I.ReturnFrom(ah(e-1,t,n,r))):I.Return(l))})})}const qn=e=>t=>ah(Ty,Ry,e,t);function My(e,t){return I.Delay(()=>{let n;const r=qn(t)(Ft(new kt(0,[]),Et(`${Gn(e)}/partners`)));return n=I.Bind(r,s=>I.Return(new g(0,[s]))),I.Bind(n,s=>{const i=s;if(i.tag===1)return I.Return(new g(1,[i.fields[0]]));{const o=i.fields[0];if(o.statusCode===200){let a;const l=Dt(pe(Ot(Ho(l$()),new qe(1,[]))),o.responseText);return a=l.tag===1?new g(1,[l.fields[0]]):xy(St(z1,l.fields[0])),I.Return(a)}else return I.Return(new g(1,["Unexpected response from backend"]))}})})}function Py(e,t,n){const r=Mt(n);return I.Delay(()=>{let s;const i=qn(t)(Ft(new kt(0,[]),Et(`${Gn(e)}/partners/${r}/advanced-security-config`)));return s=I.Bind(i,o=>I.Return(new g(0,[o]))),I.Bind(s,o=>{const a=o;if(a.tag===1)return I.Return(new g(1,[a.fields[0]]));{const l=a.fields[0];if(l.statusCode===200){let c;const d=Dt(pe(Ot(ya(),new qe(1,[]))),l.responseText);return c=d.tag===1?new g(1,[d.fields[0]]):new g(0,[d.fields[0].Configuration]),I.Return(c)}else return I.Return(new g(1,["Unexpected response from backend"]))}})})}function Dy(e,t,n,r){const s=Mt(n);return I.Delay(()=>{let i;const o=new wa(r);let a;const l=qn(t)((i=Ft(new kt(2,[]),Et(`${Gn(e)}/partners/${s}/advanced-security-config`)),ei(new $s(1,[ti(0,ni(Uu(),new qe(1,[]),void 0,void 0)(o))]),i)));return a=I.Bind(l,c=>I.Return(new g(0,[c]))),I.Bind(a,c=>{const d=c;if(d.tag===1)return I.Return(new g(1,[d.fields[0]]));{const u=d.fields[0];if(u.statusCode===200){let m;const h=Dt(pe(Ot(ya(),new qe(1,[]))),u.responseText);return m=h.tag===1?new g(1,[h.fields[0]]):new g(0,[h.fields[0].Configuration]),I.Return(m)}else return I.Return(new g(1,["Unexpected response from backend"]))}})})}function Oy(e,t,n){const r=Mt(n);return I.Delay(()=>{let s;const i=new wa(void 0);let o;const a=qn(t)((s=Ft(new kt(2,[]),Et(`${Gn(e)}/partners/${r}/advanced-security-config`)),ei(new $s(1,[ti(0,ni(Uu(),new qe(1,[]),void 0,void 0)(i))]),s)));return o=I.Bind(a,l=>I.Return(new g(0,[l]))),I.Bind(o,l=>{const c=l;if(c.tag===1)return I.Return(new g(1,[c.fields[0]]));{const d=c.fields[0];if(d.statusCode===200){let u;const m=Dt(pe(Ot(ya(),new qe(1,[]))),d.responseText);return u=m.tag===1?new g(1,[m.fields[0]]):new g(0,[m.fields[0].Configuration]),I.Return(u)}else return I.Return(new g(1,["Unexpected response from backend"]))}})})}function lh(e,t,n,r){const s=Mt(n),i=an(r);return I.Delay(()=>{let o;const a=qn(t)(Ft(new kt(0,[]),Et(`${Gn(e)}/partners/${s}/accounts/${i}`)));return o=I.Bind(a,l=>I.Return(new g(0,[l]))),I.Bind(o,l=>{const c=l;if(c.tag===1)return I.Return(new g(1,[c.fields[0]]));{const d=c.fields[0];if(d.statusCode===200){const u=Dt(pe(Ot(c$(),new qe(1,[]))),d.responseText);return I.Return(u)}else return I.Return(new g(1,["Unexpected response from backend"]))}})})}function Fy(e,t,n,r,s){const i=Mt(n),o=an(r);return I.Delay(()=>{const a=ti(0,ni(S$(),new qe(1,[]),void 0,void 0)(s));let l;const c=qn(t)(ei(new $s(1,[a]),Ft(new kt(3,[]),Et(`${Gn(e)}/partners/${i}/accounts/${o}`))));return l=I.Bind(c,d=>I.Return(new g(0,[d]))),I.Bind(l,d=>{const u=d;if(u.tag===1)return I.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=I.Return(h),I.Bind(m,p=>{let $;const w=p;return $=w.tag===1?new g(1,[w.fields[0]]):new g(0,[void 0]),I.Return($)})}})})}function ml(e,t,n,r,s){return I.Delay(()=>{let i,o,a,l;const c="?"+re("&",Vc(m=>m,y([(i=nf(r.SearchText),yn(i)?void 0:`search=${encodeURIComponent(i.trim())}`),(o=M1(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=rf(r.PageSize)|0,a<=100&&a>=10?`page_size=${a}`:void 0)])));let d;const u=qn(t)((l=Ft(new kt(0,[]),Et(`${Gn(e)}/partners/${is(n)}/accounts${c}`)),s==null?l:io(new nh("token",s),l)));return d=I.Bind(u,m=>I.Return(new g(0,[m]))),I.Bind(d,m=>{const h=m;if(h.tag===1)return I.Return(new g(1,[h.fields[0]]));{const p=h.fields[0];if(p.statusCode===200){const $=Dt(pe(Ot(f$(),new qe(1,[]))),p.responseText);return I.Return($)}else return I.Return(new g(1,["Unexpected response from backend"]))}})})}function Vy(e,t,n){const r=an(n);return I.Delay(()=>{let s;const i=qn(t)(Ft(new kt(0,[]),Et(`${Gn(e)}/search-by-id/${r}`)));return s=I.Bind(i,o=>I.Return(new g(0,[o]))),I.Bind(s,o=>{const a=o;if(a.tag===1)return I.Return(new g(1,[a.fields[0]]));{const l=a.fields[0];if(l.statusCode===200){const c=Dt(pe(Ot(m$(),new qe(1,[]))),l.responseText);return I.Return(c)}else return I.Return(new g(1,["Unexpected response from backend"]))}})})}function Ly(e,t,n,r,s){const i=Mt(n),o=an(r);return I.Delay(()=>{let a,l;const c=qn(t)((a=Ft(new kt(2,[]),Et(`${Gn(e)}/partners/${i}/accounts/${o}/provisioning`)),ei(new $s(1,[ti(0,ni(A$(),new qe(1,[]),void 0,void 0)(s))]),a)));return l=I.Bind(c,d=>I.Return(new g(0,[d]))),I.Bind(l,d=>{const u=d;if(u.tag===1)return I.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=I.Return(h),I.Bind(m,p=>{let $;const w=p;return $=w.tag===1?new g(1,[w.fields[0]]):new g(0,[void 0]),I.Return($)})}})})}function By(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 Uy=ar(By);function jy(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 zy=ar(jy);function Hy(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 Wy=ar(Hy);function Gy(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 qy=ar(Gy);function Ky(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 Zy=ar(Ky);class ch extends B{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["BreadCrumb"]}}function Jy(e,t,n){let r,s;return f("li",_(y([["key",e],["className","flex"],(r=[f("div",_(y([["className","flex items-center"],(s=J(k(()=>{let i;return R(n?He():x((i={className:"flex-shrink-0 h-5 w-5 text-gray-400"},f(zy,i))),k(()=>x(f("a",_(J(k(()=>R(x(["children",e]),k(()=>R(t!=null?x(["href",Rr(O(t))]):He(),k(()=>x(["className","ml-4 text-sm font-medium text-gray-500 hover:text-gray-700"]))))))))))))})),["children",b.Children.toArray(Array.from(s))])])))],["children",b.Children.toArray(Array.from(r))])])))}function Yy(e){let t,n;return f("nav",_(y([["className","pt-2 mb-6"],["aria-label","Breadcrumb"],(t=[f("ol",_(y([["className","-ml-3 max-w-screen-xl w-full flex space-x-4"],(n=Fs((r,s)=>Jy(s.fields[0][0],s.fields[0][1],r===0),e),["children",b.Children.toArray(Array.from(n))])])))],["children",b.Children.toArray(Array.from(t))])])))}function yt(e,t){return new ch([e,Js(t)])}function uh(){return yt("Partners",new K(0,[]))}function dh(e,t){return yt(t,new K(1,[e]))}function Xy(e){return yt("Super",new K(4,[e]))}function Qy(e){return yt("Benefits",new K(5,[e]))}function eb(e){return yt("Bank Details",new K(6,[e]))}function tb(e){return yt("Directory",new K(2,[e]))}function nb(e){return yt("Workspace",new K(7,[e]))}function rb(e){return yt("Security",new K(8,[e]))}function sb(e){return yt("Accounts",new K(3,[e]))}function ib(e){return new ch([e,void 0])}function ob(e,t){let n;return yt("Directory",(n=[e,t],new K(10,[n[0],n[1]])))}function ab(e,t){let n;return yt("Users",(n=[e,t],new K(11,[n[0],n[1]])))}function lb(e,t){let n;return yt("Super",(n=[e,t],new K(12,[n[0],n[1]])))}function cb(e,t){let n;return yt("Benefits",(n=[e,t],new K(13,[n[0],n[1]])))}function ub(e,t){let n;return yt("Bank Details",(n=[e,t],new K(14,[n[0],n[1]])))}function db(e,t){let n;return yt("Salary Packaging",(n=[e,t],new K(15,[n[0],n[1]])))}function fb(e,t){let n;return yt("Workspace",(n=[e,t],new K(16,[n[0],n[1]])))}function hb(e,t){let n;return yt("HRIS Migration",(n=[e,t],new K(17,[n[0],n[1]])))}function ri(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):ca(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?qi(m.Id):ca(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([uh(),dh(d.Id,n),sb(d.Id),ib(s)]);break}case 1:{o=y([uh(),dh(u.Id,n)]);break}default:o=Ve()}return Yy((t=e.page,t.tag===18||t.tag===1||t.tag===3?o:t.tag===4?Ye(o,ee(Xy(t.fields[0]))):t.tag===5?Ye(o,ee(Qy(t.fields[0]))):t.tag===6?Ye(o,ee(eb(t.fields[0]))):t.tag===2?Ye(o,ee(tb(t.fields[0]))):t.tag===7?Ye(o,ee(nb(t.fields[0]))):t.tag===8?Ye(o,ee(rb(t.fields[0]))):t.tag===9?o:t.tag===10?Ye(o,ee(ob(t.fields[0],t.fields[1]))):t.tag===11?Ye(o,ee(ab(t.fields[0],t.fields[1]))):t.tag===12?Ye(o,ee(lb(t.fields[0],t.fields[1]))):t.tag===13?Ye(o,ee(cb(t.fields[0],t.fields[1]))):t.tag===14?Ye(o,ee(ub(t.fields[0],t.fields[1]))):t.tag===15?Ye(o,ee(db(t.fields[0],t.fields[1]))):t.tag===16?Ye(o,ee(fb(t.fields[0],t.fields[1]))):t.tag===17?Ye(o,ee(hb(t.fields[0],t.fields[1]))):o))}class mb extends B{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["Tab"]}}function pb(e){return new mb(e)}function gb(e){return e.fields[0]}function fh(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 pb(f("a",_(J(k(()=>R(x(["key",t]),k(()=>R(x(["children",t]),k(()=>R(x(["className",r]),k(()=>e!==t?x(["href",Rr(ee(n))]):He())))))))))))}function hh(e){let t,n;const r=e.headers,s=lr(100);return f("div",_(y([["ref",i=>{const o=Up(i);if(o!=null){const a=o;s[1](~~a.offsetTop)}}],["className","relative"],(t=[f("div",{className:"w-40 mr-6"}),f("nav",_(y([["className","fixed bottom-14 flex flex-col w-40 border-r border-gray-300 mr-6"],["style",{top:s[0]}],(n=Ee(gb,r),["children",b.Children.toArray(Array.from(n))])])))],["children",b.Children.toArray(Array.from(t))])])))}class mh extends B{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Enabled","Disabled"]}}function $b(e){return e==null?new mh(1,[]):new mh(0,[e])}class si extends Y{constructor(t,n){super(),this.Key=t,this.Value=n}}class dr extends Y{constructor(t,n,r){super(),this.Issuer=t,this.OpenIdConfigUrl=n,this.RequiredClaims=r}}class fn extends Y{constructor(t,n,r){super(),this.Config=t,this.IsSaving=n,this.ValidationErrors=r}}const wb=new fn(new dr("",void 0,Ve()),!1,Us({Compare:Rn}));function yb(e){if(e.tag===0){const t=e.fields[0];return new fn(new dr(t.Issuer,t.OpenIdConfigUrl,St(n=>new si(n[0],n[1]),ou(t.RequiredClaims))),!1,Us({Compare:Rn}))}else return wb}class bb extends Y{constructor(t,n,r){super(),this.Roles=t,this.BackendUrl=n,this.AccessToken=r}}const xn=l1();let Dr=class extends B{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["UpdateSearchText","UpdateSort","LoadAccountLookup","UpdateAccountLookup","QueryAccountLookup"]}};class _b{constructor(t){this.props=t}}function vb(e){return new _b(e)}function ph(e){return t=>n=>I.Delay(()=>{const r=hl(e.props.partnerId);return I.Bind(ml(e.props.backendUrl,e.props.accessToken,r,t,void 0),s=>(n(new Dr(2,[new le(2,[s])])),I.Zero()))})}function xb(e){return t=>n=>r=>I.Delay(()=>{const s=hl(e.props.partnerId);return I.Bind(ml(e.props.backendUrl,e.props.accessToken,s,t,n),i=>(r(new Dr(3,[i])),I.Zero()))})}function Cb(e,t,n){return ml(e.props.backendUrl,e.props.accessToken,hl(e.props.partnerId),t,void 0)}let ys=class extends Y{constructor(t,n,r,s){super(),this.Data=t,this.SearchText=n,this.Sort=r,this.PageSize=s}};function Sb(){return[new ys(new le(0,[]),P1,R1,F1(20)),W()]}function Ab(e,t,n){let r,s,i,o;switch(t.tag){case 1:{const a=t.fields[0];return[new ys(new le(1,[]),n.SearchText,a,n.PageSize),Qe(l=>{const c=new Xa(n.SearchText,a,n.PageSize);ds(ph(e)(c)(l))})]}case 2:return[new ys(t.fields[0],n.SearchText,n.Sort,n.PageSize),W()];case 3:{const a=t.fields[0];return[new ys((r=n.Data,r.tag===2?r.fields[0].tag===0?(s=a,s.tag===1?new le(2,[new g(1,[s.fields[0]])]):new le(2,[new g(0,[new Pu(Ye(r.fields[0].fields[0].Accounts,s.fields[0].Accounts),s.fields[0].Token)])])):(i=a,i.tag===1?new le(2,[new g(1,[i.fields[0]])]):new le(3,[new Error("Failed to retrieve the account data")])):(o=a,o.tag===1?new le(2,[new g(1,[o.fields[0]])]):new le(3,[new Error("Failed to retrieve the account data")]))),n.SearchText,n.Sort,n.PageSize),W()]}case 4:return[new ys(new le(1,[]),n.SearchText,n.Sort,n.PageSize),Qe(a=>{const l=new Xa(n.SearchText,n.Sort,n.PageSize);ds(ph(e)(l)(a))})];default:return[new ys(n.Data,D1(t.fields[0]),n.Sort,n.PageSize),W()]}}function gh(e,t,n,r){let s,i;return f("div",_(y([["className",re(" ",["flex-grow","max-w-md"])],(s=[f("label",{for:"search",children:"Search",className:re(" ",["block","text-sm","font-medium","text-gray-700"])}),f("div",_(y([["className","mt-1"],(i=[f("input",{id:"search",name:"search",type:"text",className:re(" ",["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",b.Children.toArray(Array.from(i))])])))],["children",b.Children.toArray(Array.from(s))])])))}function kb(e){let t,n;return f("div",_(y([["className","pt-6"],(t=[f("div",_(y([["className",re(" ",["flex","justify-end"])],(n=[f("button",{type:"search",children:"Search",className:re(" ",["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",b.Children.toArray(Array.from(n))])])))],["children",b.Children.toArray(Array.from(t))])])))}function $h(e){return["fillRule",e]}function wh(e){return["clipRule",e]}const Eb=f("svg",_(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",_(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",b.Children.toArray(Array.from(t))]})()]))),Ib=f("svg",_(y([["className",re(" ",["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",_(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]),$h("evenodd"),wh("evenodd")]))));return["children",b.Children.toArray(Array.from(t))]})()]))),Nb=f("svg",_(y([["className",re(" ",["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",_(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]),$h("evenodd"),wh("evenodd")]))));return["children",b.Children.toArray(Array.from(t))]})()]))),yh=f("svg",_(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",b.Children.toArray(Array.from(e))]})()]))),Tb=f("svg",_(y([["className",re(" ",["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",b.Children.toArray(Array.from(e))]})()]))),Rb=f("svg",_(y([["className",re(" ",["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",_(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",_(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",b.Children.toArray(Array.from(n))]})()]))),ii=f("svg",_(y([["className",re(" ",["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",_(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",_(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",b.Children.toArray(Array.from(n))]})()]))),oi=f("svg",_(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",_(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",_(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",b.Children.toArray(Array.from(n))]})()])));function fr(e){const t=e.child,n=e.onClose;return Ld(()=>{const r=s=>{s.key==="Escape"&&n()};return window.addEventListener("keydown",r),{Dispose(){window.removeEventListener("keydown",r)}}},[]),t}class Mb{constructor(t,n){this.accessToken=n,this.adminUrl=`${t}/account-registry/admin`}QueryAnzsic(t){const n=this;return y1(I.Delay(()=>I.Bind(bh(n,Et(`${n.adminUrl}/anzsic?maxRecordCount=15&search=${t}`)),r=>{const s=Dt(pe(Ot(b$(),new qe(1,[]))),r.responseText);return I.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 I.Delay(()=>{let o,a;const l=bh(i,ei(new $s(1,[(o=new Ou(n.AccountName,n.WebsiteUrl,new Au(r.FirstName,r.LastName,r.Email,r.MobilePhone),void 0,new Du(n.LegalEntityName,n.Abn,s.Line1,Oi(s.Line2)?void 0:s.Line2,s.City,s.Postcode,s.State,r.MobilePhone,"AU"),void 0,void 0,new Nu(n.SalesforceParentRecordId,void 0),new Tu(n.Industry.ClassCode,n.Industry.ClassTitle)),ti(0,ni(v$(),new qe(1,[]),void 0,void 0)(o)))]),Ft(new kt(1,[]),Et(`${i.adminUrl}/partners/${Gi(t)}/accounts`))));return a=I.Bind(l,c=>I.Return(new g(0,[c]))),I.Bind(a,c=>{const d=c;if(d.tag===1)return I.Return(new g(1,[d.fields[0]]));{let u;const m=Dt(pe(Ot(C$(),new qe(1,[]))),d.fields[0].responseText);return u=m.tag===1?new g(1,[void 0]):new g(0,[m.fields[0].Id]),I.Return(u)}})})}}function Pb(e,t){return new Mb(e,t)}function bh(e,t){return fl(io(dl(`Bearer ${e.accessToken}`),t))}let Db=class extends Y{constructor(t,n,r,s){super(),this.Name=t,this.ExternalId=n,this.BusinessName=r,this.BusinessNumber=s}};class Or extends B{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["AccountDetailsForm","PrimaryContactForm","BusinessAddressForm"]}}let hn=class extends B{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["NextForm","PreviousForm","SetAccountDetailsForm","SetPrimaryContactForm","SetBusinessAddressForm","StartAccountCreation","FinishAccountCreation"]}},hr=class extends Y{constructor(t,n,r,s,i){super(),this.AccountDetailsForm=t,this.PrimaryContactForm=n,this.BusinessAddressForm=r,this.CurrentView=s,this.AccountCreation=i}};function Ob(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 Fb(e){switch(e.AccountCreation.tag){case 0:case 2:case 3:return!1;default:return!0}}const Vb=[new hr({},{},{},new Or(0,[]),new le(0,[])),W()];function Lb(e,t,n,r){let s,i;switch(n.tag){case 1:return[new hr(r.AccountDetailsForm,r.PrimaryContactForm,r.BusinessAddressForm,(s=r.CurrentView,s.tag===1?new Or(0,[]):s.tag===2?new Or(1,[]):new Or(0,[])),r.AccountCreation),W()];case 2:return[new hr(n.fields[0],r.PrimaryContactForm,r.BusinessAddressForm,r.CurrentView,r.AccountCreation),W()];case 3:return[new hr(r.AccountDetailsForm,n.fields[0],r.BusinessAddressForm,r.CurrentView,r.AccountCreation),W()];case 4:return[new hr(r.AccountDetailsForm,r.PrimaryContactForm,n.fields[0],r.CurrentView,r.AccountCreation),W()];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,W()];default:return[new hr(r.AccountDetailsForm,r.PrimaryContactForm,r.BusinessAddressForm,r.CurrentView,new le(1,[])),cr(l=>{ur(l)},l=>t.CreateAccount(l[0],l[1],l[2],l[3]),[e,r.AccountDetailsForm,r.PrimaryContactForm,r.BusinessAddressForm],l=>new hn(6,[l]))]}}case 6:{const o=n.fields[0];return[new hr(r.AccountDetailsForm,r.PrimaryContactForm,r.BusinessAddressForm,r.CurrentView,new le(2,[o])),o.tag===1?W():tl(new K(16,[e,Ht(o.fields[0])]))]}default:return[new hr(r.AccountDetailsForm,r.PrimaryContactForm,r.BusinessAddressForm,(i=r.CurrentView,i.tag===1?new Or(2,[]):i.tag===2?new Or(2,[]):new Or(1,[])),r.AccountCreation),W()]}}var Bb=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:--Bb,__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 ae.vnode&&ae.vnode(c),c}var ai=e=>e.type==="checkbox",Fr=e=>e instanceof Date,It=e=>e==null;const _h=e=>typeof e=="object";var Ke=e=>!It(e)&&!Array.isArray(e)&&_h(e)&&!Fr(e),vh=e=>Ke(e)&&e.target?ai(e.target)?e.target.checked:e.target.value:e,Ub=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,xh=(e,t)=>e.has(Ub(t)),jb=e=>{const t=e.constructor&&e.constructor.prototype;return Ke(t)&&t.hasOwnProperty("isPrototypeOf")},pl=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Vt(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(!(pl&&(e instanceof Blob||r))&&(n||Ke(e)))if(t=n?[]:{},!n&&!jb(e))t=e;else for(const s in e)e.hasOwnProperty(s)&&(t[s]=Vt(e[s]));else return e;return t}var ao=e=>Array.isArray(e)?e.filter(Boolean):[],Ze=e=>e===void 0,U=(e,t,n)=>{if(!t||!Ke(e))return n;const r=ao(t.split(/[,[\].]+?/)).reduce((s,i)=>It(s)?s:s[i],e);return Ze(r)||r===e?Ze(e[t])?n:e[t]:r},Qt=e=>typeof e=="boolean",gl=e=>/^\w*$/.test(e),Ch=e=>ao(e.replace(/["|']|\]/g,"").split(/\.|\[/)),Te=(e,t,n)=>{let r=-1;const s=gl(t)?[t]:Ch(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=Ke(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 lo={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},mn={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Kn={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},zb=X.createContext(null),$l=()=>X.useContext(zb);var Sh=(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]!==mn.all&&(t._proxyFormState[o]=!r||mn.all),n&&(n[o]=!0),e[o]}});return s},Lt=e=>Ke(e)&&!Object.keys(e).length,Ah=(e,t,n,r)=>{n(e);const{name:s,...i}=e;return Lt(i)||Object.keys(i).length>=Object.keys(t).length||Object.keys(i).find(o=>t[o]===(!r||mn.all))},li=e=>Array.isArray(e)?e:[e],kh=(e,t,n)=>!e||!t||e===t||li(e).some(r=>r&&(n?r===t:r.startsWith(t)||t.startsWith(r)));function wl(e){const t=X.useRef(e);t.current=e,X.useEffect(()=>{const n=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{n&&n.unsubscribe()}},[e.disabled])}function Hb(e){const t=$l(),{control:n=t.control,disabled:r,name:s,exact:i}=e||{},[o,a]=X.useState(n._formState),l=X.useRef(!0),c=X.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),d=X.useRef(s);return d.current=s,wl({disabled:r,next:u=>l.current&&kh(d.current,u.name,i)&&Ah(u,c.current,n._updateFormState)&&a({...n._formState,...u}),subject:n._subjects.state}),X.useEffect(()=>(l.current=!0,c.current.isValid&&n._updateValid(!0),()=>{l.current=!1}),[n]),X.useMemo(()=>Sh(o,n,c.current,!1),[o,n])}var Cn=e=>typeof e=="string",Eh=(e,t,n,r,s)=>Cn(e)?(r&&t.watch.add(e),U(n,e,s)):Array.isArray(e)?e.map(i=>(r&&t.watch.add(i),U(n,i))):(r&&(t.watchAll=!0),n);function Wb(e){const t=$l(),{control:n=t.control,name:r,defaultValue:s,disabled:i,exact:o}=e||{},a=X.useRef(r);a.current=r,wl({disabled:i,subject:n._subjects.values,next:d=>{kh(a.current,d.name,o)&&c(Vt(Eh(a.current,n._names,d.values||n._formValues,!1,s)))}});const[l,c]=X.useState(n._getWatch(r,s));return X.useEffect(()=>n._removeUnmounted()),l}function Ih(e){const t=$l(),{name:n,disabled:r,control:s=t.control,shouldUnregister:i}=e,o=xh(s._names.array,n),a=Wb({control:s,name:n,defaultValue:U(s._formValues,n,U(s._defaultValues,n,e.defaultValue)),exact:!0}),l=Hb({control:s,name:n,exact:!0}),c=X.useRef(s.register(n,{...e.rules,value:a,...Qt(e.disabled)?{disabled:e.disabled}:{}})),d=X.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!U(l.errors,n)},isDirty:{enumerable:!0,get:()=>!!U(l.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!U(l.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!U(l.validatingFields,n)},error:{enumerable:!0,get:()=>U(l.errors,n)}}),[l,n]),u=X.useMemo(()=>({name:n,value:a,...Qt(r)||l.disabled?{disabled:l.disabled||r}:{},onChange:m=>c.current.onChange({target:{value:vh(m),name:n},type:lo.CHANGE}),onBlur:()=>c.current.onBlur({target:{value:U(s._formValues,n),name:n},type:lo.BLUR}),ref:m=>{const h=U(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 X.useEffect(()=>{const m=s._options.shouldUnregister||i,h=(p,$)=>{const w=U(s._fields,p);w&&w._f&&(w._f.mount=$)};if(h(n,!0),m){const p=Vt(U(s._options.defaultValues,n));Te(s._defaultValues,n,p),Ze(U(s._formValues,n))&&Te(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]),X.useEffect(()=>{s._updateDisabledField({disabled:r,fields:s._fields,name:n})},[r,n,s]),X.useMemo(()=>({field:u,formState:l,fieldState:d}),[u,l,d])}var Gb=(e,t,n,r,s)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:s||!0}}:{},Nh=e=>({isOnSubmit:!e||e===mn.onSubmit,isOnBlur:e===mn.onBlur,isOnChange:e===mn.onChange,isOnAll:e===mn.all,isOnTouch:e===mn.onTouched}),Th=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const ci=(e,t,n,r)=>{for(const s of n||Object.keys(e)){const i=U(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(ci(a,t))break}else if(Ke(a)&&ci(a,t))break}}};var qb=(e,t,n)=>{const r=li(U(e,n));return Te(r,"root",t[n]),Te(e,n,r),e},yl=e=>e.type==="file",Sn=e=>typeof e=="function",co=e=>{if(!pl)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},uo=e=>Cn(e),bl=e=>e.type==="radio",fo=e=>e instanceof RegExp;const Rh={value:!1,isValid:!1},Mh={value:!0,isValid:!0};var Ph=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&&!Ze(e[0].attributes.value)?Ze(e[0].value)||e[0].value===""?Mh:{value:e[0].value,isValid:!0}:Mh:Rh}return Rh};const Dh={isValid:!1,value:null};var Oh=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,Dh):Dh;function Fh(e,t,n="validate"){if(uo(e)||Array.isArray(e)&&e.every(uo)||Qt(e)&&!e)return{type:n,message:uo(e)?e:"",ref:t}}var bs=e=>Ke(e)&&!fo(e)?e:{value:e,message:""},Vh=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:S}=e._f,A=U(n,$);if(!S||t.has($))return{};const E=a?a[0]:o,P=q=>{s&&E.reportValidity&&(E.setCustomValidity(Qt(q)?"":q||""),E.reportValidity())},V={},ne=bl(o),we=ai(o),Ae=ne||we,he=(w||yl(o))&&Ze(o.value)&&Ze(A)||co(o)&&o.value===""||A===""||Array.isArray(A)&&!A.length,te=Gb.bind(null,$,r,V),de=(q,oe,Oe,D=Kn.maxLength,ke=Kn.minLength)=>{const me=q?oe:Oe;V[$]={type:q?D:ke,message:me,ref:o,...te(q?D:ke,me)}};if(i?!Array.isArray(A)||!A.length:l&&(!Ae&&(he||It(A))||Qt(A)&&!A||we&&!Ph(a).isValid||ne&&!Oh(a).isValid)){const{value:q,message:oe}=uo(l)?{value:!!l,message:l}:bs(l);if(q&&(V[$]={type:Kn.required,message:oe,ref:E,...te(Kn.required,oe)},!r))return P(oe),V}if(!he&&(!It(u)||!It(m))){let q,oe;const Oe=bs(m),D=bs(u);if(!It(A)&&!isNaN(A)){const ke=o.valueAsNumber||A&&+A;It(Oe.value)||(q=ke>Oe.value),It(D.value)||(oe=ke<D.value)}else{const ke=o.valueAsDate||new Date(A),me=je=>new Date(new Date().toDateString()+" "+je),it=o.type=="time",Re=o.type=="week";Cn(Oe.value)&&A&&(q=it?me(A)>me(Oe.value):Re?A>Oe.value:ke>new Date(Oe.value)),Cn(D.value)&&A&&(oe=it?me(A)<me(D.value):Re?A<D.value:ke<new Date(D.value))}if((q||oe)&&(de(!!q,Oe.message,D.message,Kn.max,Kn.min),!r))return P(V[$].message),V}if((c||d)&&!he&&(Cn(A)||i&&Array.isArray(A))){const q=bs(c),oe=bs(d),Oe=!It(q.value)&&A.length>+q.value,D=!It(oe.value)&&A.length<+oe.value;if((Oe||D)&&(de(Oe,q.message,oe.message),!r))return P(V[$].message),V}if(h&&!he&&Cn(A)){const{value:q,message:oe}=bs(h);if(fo(q)&&!A.match(q)&&(V[$]={type:Kn.pattern,message:oe,ref:o,...te(Kn.pattern,oe)},!r))return P(oe),V}if(p){if(Sn(p)){const q=await p(A,n),oe=Fh(q,E);if(oe&&(V[$]={...oe,...te(Kn.validate,oe.message)},!r))return P(oe.message),V}else if(Ke(p)){let q={};for(const oe in p){if(!Lt(q)&&!r)break;const Oe=Fh(await p[oe](A,n),E,oe);Oe&&(q={...Oe,...te(oe,Oe.message)},P(Oe.message),r&&(V[$]=q))}if(!Lt(q)&&(V[$]={ref:E,...q},!r))return V}}return P(!0),V};function Kb(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=Ze(e)?r++:e[t[r++]];return e}function Zb(e){for(const t in e)if(e.hasOwnProperty(t)&&!Ze(e[t]))return!1;return!0}function tt(e,t){const n=Array.isArray(t)?t:gl(t)?[t]:Ch(t),r=n.length===1?e:Kb(e,n),s=n.length-1,i=n[s];return r&&delete r[i],s!==0&&(Ke(r)&&Lt(r)||Array.isArray(r)&&Zb(r))&&tt(e,n.slice(0,-1)),e}var _l=()=>{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=[]}}},vl=e=>It(e)||!_h(e);function mr(e,t){if(vl(e)||vl(t))return e===t;if(Fr(e)&&Fr(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(Fr(i)&&Fr(o)||Ke(i)&&Ke(o)||Array.isArray(i)&&Array.isArray(o)?!mr(i,o):i!==o)return!1}}return!0}var Lh=e=>e.type==="select-multiple",Jb=e=>bl(e)||ai(e),xl=e=>co(e)&&e.isConnected,Bh=e=>{for(const t in e)if(Sn(e[t]))return!0;return!1};function ho(e,t={}){const n=Array.isArray(e);if(Ke(e)||n)for(const r in e)Array.isArray(e[r])||Ke(e[r])&&!Bh(e[r])?(t[r]=Array.isArray(e[r])?[]:{},ho(e[r],t[r])):It(e[r])||(t[r]=!0);return t}function Uh(e,t,n){const r=Array.isArray(e);if(Ke(e)||r)for(const s in e)Array.isArray(e[s])||Ke(e[s])&&!Bh(e[s])?Ze(t)||vl(n[s])?n[s]=Array.isArray(e[s])?ho(e[s],[]):{...ho(e[s])}:Uh(e[s],It(t)?{}:t[s],n[s]):n[s]=!mr(e[s],t[s]);return n}var ui=(e,t)=>Uh(e,t,ho(t)),jh=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>Ze(e)?e:t?e===""?NaN:e&&+e:n&&Cn(e)?new Date(e):r?r(e):e;function Cl(e){const t=e.ref;return yl(t)?t.files:bl(t)?Oh(e.refs).value:Lh(t)?[...t.selectedOptions].map(({value:n})=>n):ai(t)?Ph(e.refs).value:jh(Ze(t.value)?e.ref.value:t.value,e)}var Yb=(e,t,n,r)=>{const s={};for(const i of e){const o=U(t,i);o&&Te(s,i,o._f)}return{criteriaMode:n,names:[...e],fields:s,shouldUseNativeValidation:r}},di=e=>Ze(e)?e:fo(e)?e.source:Ke(e)?fo(e.value)?e.value.source:e.value:e;const zh="AsyncFunction";var Xb=e=>!!e&&!!e.validate&&!!(Sn(e.validate)&&e.validate.constructor.name===zh||Ke(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===zh)),Qb=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function Hh(e,t,n){const r=U(e,n);if(r||gl(n))return{error:r,name:n};const s=n.split(".");for(;s.length;){const i=s.join("."),o=U(t,i),a=U(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 e_=(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,t_=(e,t)=>!ao(U(e,t)).length&&tt(e,t);const n_={mode:mn.onSubmit,reValidateMode:mn.onChange,shouldFocusError:!0};function r_(e={}){let t={...n_,...e},n={submitCount:0,isDirty:!1,isLoading:Sn(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},r={},s=Ke(t.defaultValues)||Ke(t.values)?Vt(t.defaultValues||t.values)||{}:{},i=t.shouldUnregister?{}:Vt(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:_l(),array:_l(),state:_l()},m=Nh(t.mode),h=Nh(t.reValidateMode),p=t.criteriaMode===mn.all,$=v=>N=>{clearTimeout(c),c=setTimeout(v,N)},w=async v=>{if(!t.disabled&&(d.isValid||v)){const N=t.resolver?Lt((await Ae()).errors):await te(r,!0);N!==n.isValid&&u.state.next({isValid:N})}},S=(v,N)=>{!t.disabled&&(d.isValidating||d.validatingFields)&&((v||Array.from(a.mount)).forEach(T=>{T&&(N?Te(n.validatingFields,T,N):tt(n.validatingFields,T))}),u.state.next({validatingFields:n.validatingFields,isValidating:!Lt(n.validatingFields)}))},A=(v,N=[],T,z,j=!0,F=!0)=>{if(z&&T&&!t.disabled){if(o.action=!0,F&&Array.isArray(U(r,v))){const Q=T(U(r,v),z.argA,z.argB);j&&Te(r,v,Q)}if(F&&Array.isArray(U(n.errors,v))){const Q=T(U(n.errors,v),z.argA,z.argB);j&&Te(n.errors,v,Q),t_(n.errors,v)}if(d.touchedFields&&F&&Array.isArray(U(n.touchedFields,v))){const Q=T(U(n.touchedFields,v),z.argA,z.argB);j&&Te(n.touchedFields,v,Q)}d.dirtyFields&&(n.dirtyFields=ui(s,i)),u.state.next({name:v,isDirty:q(v,N),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else Te(i,v,N)},E=(v,N)=>{Te(n.errors,v,N),u.state.next({errors:n.errors})},P=v=>{n.errors=v,u.state.next({errors:n.errors,isValid:!1})},V=(v,N,T,z)=>{const j=U(r,v);if(j){const F=U(i,v,Ze(T)?U(s,v):T);Ze(F)||z&&z.defaultChecked||N?Te(i,v,N?F:Cl(j._f)):D(v,F),o.mount&&w()}},ne=(v,N,T,z,j)=>{let F=!1,Q=!1;const fe={name:v};if(!t.disabled){const ht=!!(U(r,v)&&U(r,v)._f&&U(r,v)._f.disabled);if(!T||z){d.isDirty&&(Q=n.isDirty,n.isDirty=fe.isDirty=q(),F=Q!==fe.isDirty);const mt=ht||mr(U(s,v),N);Q=!!(!ht&&U(n.dirtyFields,v)),mt||ht?tt(n.dirtyFields,v):Te(n.dirtyFields,v,!0),fe.dirtyFields=n.dirtyFields,F=F||d.dirtyFields&&Q!==!mt}if(T){const mt=U(n.touchedFields,v);mt||(Te(n.touchedFields,v,T),fe.touchedFields=n.touchedFields,F=F||d.touchedFields&&mt!==T)}F&&j&&u.state.next(fe)}return F?fe:{}},we=(v,N,T,z)=>{const j=U(n.errors,v),F=d.isValid&&Qt(N)&&n.isValid!==N;if(t.delayError&&T?(l=$(()=>E(v,T)),l(t.delayError)):(clearTimeout(c),l=null,T?Te(n.errors,v,T):tt(n.errors,v)),(T?!mr(j,T):j)||!Lt(z)||F){const Q={...z,...F&&Qt(N)?{isValid:N}:{},errors:n.errors,name:v};n={...n,...Q},u.state.next(Q)}},Ae=async v=>{S(v,!0);const N=await t.resolver(i,t.context,Yb(v||a.mount,r,t.criteriaMode,t.shouldUseNativeValidation));return S(v),N},he=async v=>{const{errors:N}=await Ae(v);if(v)for(const T of v){const z=U(N,T);z?Te(n.errors,T,z):tt(n.errors,T)}else n.errors=N;return N},te=async(v,N,T={valid:!0})=>{for(const z in v){const j=v[z];if(j){const{_f:F,...Q}=j;if(F){const fe=a.array.has(F.name),ht=j._f&&Xb(j._f);ht&&d.validatingFields&&S([z],!0);const mt=await Vh(j,a.disabled,i,p,t.shouldUseNativeValidation&&!N,fe);if(ht&&d.validatingFields&&S([z]),mt[F.name]&&(T.valid=!1,N))break;!N&&(U(mt,F.name)?fe?qb(n.errors,mt,F.name):Te(n.errors,F.name,mt[F.name]):tt(n.errors,F.name))}!Lt(Q)&&await te(Q,N,T)}}return T.valid},de=()=>{for(const v of a.unMount){const N=U(r,v);N&&(N._f.refs?N._f.refs.every(T=>!xl(T)):!xl(N._f.ref))&&_i(v)}a.unMount=new Set},q=(v,N)=>!t.disabled&&(v&&N&&Te(i,v,N),!mr(Ut(),s)),oe=(v,N,T)=>Eh(v,a,{...o.mount?i:Ze(N)?s:Cn(v)?{[v]:N}:N},T,N),Oe=v=>ao(U(o.mount?i:s,v,t.shouldUnregister?U(s,v,[]):[])),D=(v,N,T={})=>{const z=U(r,v);let j=N;if(z){const F=z._f;F&&(!F.disabled&&Te(i,v,jh(N,F)),j=co(F.ref)&&It(N)?"":N,Lh(F.ref)?[...F.ref.options].forEach(Q=>Q.selected=j.includes(Q.value)):F.refs?ai(F.ref)?F.refs.length>1?F.refs.forEach(Q=>(!Q.defaultChecked||!Q.disabled)&&(Q.checked=Array.isArray(j)?!!j.find(fe=>fe===Q.value):j===Q.value)):F.refs[0]&&(F.refs[0].checked=!!j):F.refs.forEach(Q=>Q.checked=Q.value===j):yl(F.ref)?F.ref.value="":(F.ref.value=j,F.ref.type||u.values.next({name:v,values:{...i}})))}(T.shouldDirty||T.shouldTouch)&&ne(v,j,T.shouldTouch,T.shouldDirty,!0),T.shouldValidate&&je(v)},ke=(v,N,T)=>{for(const z in N){const j=N[z],F=`${v}.${z}`,Q=U(r,F);(a.array.has(v)||Ke(j)||Q&&!Q._f)&&!Fr(j)?ke(F,j,T):D(F,j,T)}},me=(v,N,T={})=>{const z=U(r,v),j=a.array.has(v),F=Vt(N);Te(i,v,F),j?(u.array.next({name:v,values:{...i}}),(d.isDirty||d.dirtyFields)&&T.shouldDirty&&u.state.next({name:v,dirtyFields:ui(s,i),isDirty:q(v,F)})):z&&!z._f&&!It(F)?ke(v,F,T):D(v,F,T),Th(v,a)&&u.state.next({...n}),u.values.next({name:o.mount?v:void 0,values:{...i}})},it=async v=>{o.mount=!0;const N=v.target;let T=N.name,z=!0;const j=U(r,T),F=()=>N.type?Cl(j._f):vh(v),Q=fe=>{z=Number.isNaN(fe)||Fr(fe)&&isNaN(fe.getTime())||mr(fe,U(i,T,fe))};if(j){let fe,ht;const mt=F(),_r=v.type===lo.BLUR||v.type===lo.FOCUS_OUT,s2=!Qb(j._f)&&!t.resolver&&!U(n.errors,T)&&!j._f.deps||e_(_r,U(n.touchedFields,T),n.isSubmitted,h,m),Zl=Th(T,a,_r);Te(i,T,mt),_r?(j._f.onBlur&&j._f.onBlur(v),l&&l(0)):j._f.onChange&&j._f.onChange(v);const Jl=ne(T,mt,_r,!1),i2=!Lt(Jl)||Zl;if(!_r&&u.values.next({name:T,type:v.type,values:{...i}}),s2)return d.isValid&&(t.mode==="onBlur"&&_r?w():_r||w()),i2&&u.state.next({name:T,...Zl?{}:Jl});if(!_r&&Zl&&u.state.next({...n}),t.resolver){const{errors:Om}=await Ae([T]);if(Q(mt),z){const o2=Hh(n.errors,r,T),Fm=Hh(Om,r,o2.name||T);fe=Fm.error,T=Fm.name,ht=Lt(Om)}}else S([T],!0),fe=(await Vh(j,a.disabled,i,p,t.shouldUseNativeValidation))[T],S([T]),Q(mt),z&&(fe?ht=!1:d.isValid&&(ht=await te(r,!0)));z&&(j._f.deps&&je(j._f.deps),we(T,ht,fe,Jl))}},Re=(v,N)=>{if(U(n.errors,N)&&v.focus)return v.focus(),1},je=async(v,N={})=>{let T,z;const j=li(v);if(t.resolver){const F=await he(Ze(v)?v:j);T=Lt(F),z=v?!j.some(Q=>U(F,Q)):T}else v?(z=(await Promise.all(j.map(async F=>{const Q=U(r,F);return await te(Q&&Q._f?{[F]:Q}:Q)}))).every(Boolean),!(!z&&!n.isValid)&&w()):z=T=await te(r);return u.state.next({...!Cn(v)||d.isValid&&T!==n.isValid?{}:{name:v},...t.resolver||!v?{isValid:T}:{},errors:n.errors}),N.shouldFocus&&!z&&ci(r,Re,v?j:a.mount),z},Ut=v=>{const N={...o.mount?i:s};return Ze(v)?N:Cn(v)?U(N,v):v.map(T=>U(N,T))},wn=(v,N)=>({invalid:!!U((N||n).errors,v),isDirty:!!U((N||n).dirtyFields,v),error:U((N||n).errors,v),isValidating:!!U(n.validatingFields,v),isTouched:!!U((N||n).touchedFields,v)}),Gr=v=>{v&&li(v).forEach(N=>tt(n.errors,N)),u.state.next({errors:v?n.errors:{}})},Zt=(v,N,T)=>{const z=(U(r,v,{_f:{}})._f||{}).ref,j=U(n.errors,v)||{},{ref:F,message:Q,type:fe,...ht}=j;Te(n.errors,v,{...ht,...N,ref:z}),u.state.next({name:v,errors:n.errors,isValid:!1}),T&&T.shouldFocus&&z&&z.focus&&z.focus()},bi=(v,N)=>Sn(v)?u.values.subscribe({next:T=>v(oe(void 0,N),T)}):oe(v,N,!0),_i=(v,N={})=>{for(const T of v?li(v):a.mount)a.mount.delete(T),a.array.delete(T),N.keepValue||(tt(r,T),tt(i,T)),!N.keepError&&tt(n.errors,T),!N.keepDirty&&tt(n.dirtyFields,T),!N.keepTouched&&tt(n.touchedFields,T),!N.keepIsValidating&&tt(n.validatingFields,T),!t.shouldUnregister&&!N.keepDefaultValue&&tt(s,T);u.values.next({values:{...i}}),u.state.next({...n,...N.keepDirty?{isDirty:q()}:{}}),!N.keepIsValid&&w()},qr=({disabled:v,name:N,field:T,fields:z})=>{(Qt(v)&&o.mount||v||a.disabled.has(N))&&(v?a.disabled.add(N):a.disabled.delete(N),ne(N,Cl(T?T._f:U(z,N)._f),!1,!1,!0))},vi=(v,N={})=>{let T=U(r,v);const z=Qt(N.disabled)||Qt(t.disabled);return Te(r,v,{...T||{},_f:{...T&&T._f?T._f:{ref:{name:v}},name:v,mount:!0,...N}}),a.mount.add(v),T?qr({field:T,disabled:Qt(N.disabled)?N.disabled:t.disabled,name:v}):V(v,!0,N.value),{...z?{disabled:N.disabled||t.disabled}:{},...t.progressive?{required:!!N.required,min:di(N.min),max:di(N.max),minLength:di(N.minLength),maxLength:di(N.maxLength),pattern:di(N.pattern)}:{},name:v,onChange:it,onBlur:it,ref:j=>{if(j){vi(v,N),T=U(r,v);const F=Ze(j.value)&&j.querySelectorAll&&j.querySelectorAll("input,select,textarea")[0]||j,Q=Jb(F),fe=T._f.refs||[];if(Q?fe.find(ht=>ht===F):F===T._f.ref)return;Te(r,v,{_f:{...T._f,...Q?{refs:[...fe.filter(xl),F,...Array.isArray(U(s,v))?[{}]:[]],ref:{type:F.type,name:v}}:{ref:F}}}),V(v,!1,void 0,F)}else T=U(r,v,{}),T._f&&(T._f.mount=!1),(t.shouldUnregister||N.shouldUnregister)&&!(xh(a.array,v)&&o.action)&&a.unMount.add(v)}}},ce=()=>t.shouldFocusError&&ci(r,Re,a.mount),Me=v=>{Qt(v)&&(u.state.next({disabled:v}),ci(r,(N,T)=>{const z=U(r,T);z&&(N.disabled=z._f.disabled||v,Array.isArray(z._f.refs)&&z._f.refs.forEach(j=>{j.disabled=z._f.disabled||v}))},0,!1))},Ct=(v,N)=>async T=>{let z;T&&(T.preventDefault&&T.preventDefault(),T.persist&&T.persist());let j=Vt(i);if(a.disabled.size)for(const F of a.disabled)Te(j,F,void 0);if(u.state.next({isSubmitting:!0}),t.resolver){const{errors:F,values:Q}=await Ae();n.errors=F,j=Q}else await te(r);if(tt(n.errors,"root"),Lt(n.errors)){u.state.next({errors:{}});try{await v(j,T)}catch(F){z=F}}else N&&await N({...n.errors},T),ce(),setTimeout(ce);if(u.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Lt(n.errors)&&!z,submitCount:n.submitCount+1,errors:n.errors}),z)throw z},ks=(v,N={})=>{U(r,v)&&(Ze(N.defaultValue)?me(v,Vt(U(s,v))):(me(v,N.defaultValue),Te(s,v,Vt(N.defaultValue))),N.keepTouched||tt(n.touchedFields,v),N.keepDirty||(tt(n.dirtyFields,v),n.isDirty=N.defaultValue?q(v,Vt(U(s,v))):q()),N.keepError||(tt(n.errors,v),d.isValid&&w()),u.state.next({...n}))},xi=(v,N={})=>{const T=v?Vt(v):s,z=Vt(T),j=Lt(v),F=j?s:z;if(N.keepDefaultValues||(s=T),!N.keepValues){if(N.keepDirtyValues){const Q=new Set([...a.mount,...Object.keys(ui(s,i))]);for(const fe of Array.from(Q))U(n.dirtyFields,fe)?Te(F,fe,U(i,fe)):me(fe,U(F,fe))}else{if(pl&&Ze(v))for(const Q of a.mount){const fe=U(r,Q);if(fe&&fe._f){const ht=Array.isArray(fe._f.refs)?fe._f.refs[0]:fe._f.ref;if(co(ht)){const mt=ht.closest("form");if(mt){mt.reset();break}}}}r={}}i=t.shouldUnregister?N.keepDefaultValues?Vt(s):{}:Vt(F),u.array.next({values:{...F}}),u.values.next({values:{...F}})}a={mount:N.keepDirtyValues?a.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},o.mount=!d.isValid||!!N.keepIsValid||!!N.keepDirtyValues,o.watch=!!t.shouldUnregister,u.state.next({submitCount:N.keepSubmitCount?n.submitCount:0,isDirty:j?!1:N.keepDirty?n.isDirty:!!(N.keepDefaultValues&&!mr(v,s)),isSubmitted:N.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:j?{}:N.keepDirtyValues?N.keepDefaultValues&&i?ui(s,i):n.dirtyFields:N.keepDefaultValues&&v?ui(s,v):N.keepDirty?n.dirtyFields:{},touchedFields:N.keepTouched?n.touchedFields:{},errors:N.keepErrors?n.errors:{},isSubmitSuccessful:N.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1})},Dm=(v,N)=>xi(Sn(v)?v(i):v,N);return{control:{register:vi,unregister:_i,getFieldState:wn,handleSubmit:Ct,setError:Zt,_executeSchema:Ae,_getWatch:oe,_getDirty:q,_updateValid:w,_removeUnmounted:de,_updateFieldArray:A,_updateDisabledField:qr,_getFieldArray:Oe,_reset:xi,_resetDefaultValues:()=>Sn(t.defaultValues)&&t.defaultValues().then(v=>{Dm(v,t.resetOptions),u.state.next({isLoading:!1})}),_updateFormState:v=>{n={...n,...v}},_disableForm:Me,_subjects:u,_proxyFormState:d,_setErrors:P,get _fields(){return r},get _formValues(){return i},get _state(){return o},set _state(v){o=v},get _defaultValues(){return s},get _names(){return a},set _names(v){a=v},get _formState(){return n},set _formState(v){n=v},get _options(){return t},set _options(v){t={...t,...v}}},trigger:je,register:vi,handleSubmit:Ct,watch:bi,setValue:me,getValues:Ut,reset:Dm,resetField:ks,clearErrors:Gr,unregister:_i,setError:Zt,setFocus:(v,N={})=>{const T=U(r,v),z=T&&T._f;if(z){const j=z.refs?z.refs[0]:z.ref;j.focus&&(j.focus(),N.shouldSelect&&Sn(j.select)&&j.select())}},getFieldState:wn}}function mo(e={}){const t=X.useRef(void 0),n=X.useRef(void 0),[r,s]=X.useState({isDirty:!1,isValidating:!1,isLoading:Sn(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:Sn(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...r_(e),formState:r});const i=t.current.control;return i._options=e,wl({subject:i._subjects.state,next:o=>{Ah(o,i._proxyFormState,i._updateFormState,!0)&&s({...i._formState})}}),X.useEffect(()=>i._disableForm(e.disabled),[i,e.disabled]),X.useEffect(()=>{if(i._proxyFormState.isDirty){const o=i._getDirty();o!==r.isDirty&&i._subjects.state.next({isDirty:o})}},[i,r.isDirty]),X.useEffect(()=>{e.values&&!mr(e.values,n.current)?(i._reset(e.values,i._options.resetOptions),n.current=e.values,s(o=>({...o}))):i._resetDefaultValues()},[e.values,i]),X.useEffect(()=>{e.errors&&i._setErrors(e.errors)},[e.errors,i]),X.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()}),X.useEffect(()=>{e.shouldUnregister&&i._subjects.values.next({values:i._getWatch()})},[e.shouldUnregister,i]),t.current.formState=Sh(r,i),t.current}function s_(e){const t=e==null?void 0:e.match(/\d+/g);return t?t.join(""):""}function bt({label:e,name:t,control:n,validate:r,placeholder:s,optional:i,isNumber:o}){const{field:a,fieldState:l}=Ih({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(s_(c.target.value)):a.onChange(c)})}),l.invalid&&M("p",{className:"mt-2 text-sm text-red-600",children:[e," is invalid"]})]})}function po({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(Wy,{})}):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 i_({defaultValues:e,validateFirstName:t,validateLastName:n,validateEmail:r,validateMobilePhone:s,onSubmit:i,onBack:o}){const{handleSubmit:a,control:l,getValues:c}=mo({mode:"onChange",defaultValues:e});return M(be,{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(bt,{label:"Given name",name:"FirstName",control:l,placeholder:"e.g. Sam",validate:t}),M(bt,{label:"Family name / surname",name:"LastName",control:l,placeholder:"e.g. Smith",validate:n})]}),M(bt,{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(bt,{label:"Mobile phone number",name:"MobilePhone",control:l,placeholder:"e.g. +61400111222",validate:s})}),M(po,{primaryLabel:"Next",secondaryLabel:"Back",secondaryOnClick:()=>o(c())})]})]})}function o_(e,t){return f(i_,{defaultValues:e,validateFirstName:n=>gt(yu(n)),validateLastName:n=>gt(_u(n)),validateEmail:n=>gt(xu(n)),validateMobilePhone:n=>gt(Cu(n)),onSubmit:n=>{t(new hn(3,[n])),t(new hn(0,[]))},onBack:n=>{t(new hn(3,[n])),t(new hn(1,[]))}})}function a_(){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(Zy,{"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 l_({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}=mo({mode:"onChange",defaultValues:e});return M(be,{children:[a&&M(a_,{}),M("div",{className:"font-bold text-lg mb-4",children:"Business address"}),M("form",{className:"space-y-6",onSubmit:d(l),children:[M(bt,{label:"Address (Line one)",name:"Line1",control:u,placeholder:"e.g. 100 Example Street",validate:t}),M(bt,{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(bt,{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(bt,{label:"Postcode",name:"Postcode",control:u,placeholder:"e.g. 2000",validate:i,isNumber:!0})}),M(po,{primaryLabel:"Add account",secondaryLabel:"Back",secondaryOnClick:()=>c(h()),isBusy:o})]})]})}function c_(e,t,n,r){return f(l_,{defaultValues:e,validateAddress1:s=>gt(Xg(s)),validateAddress2:s=>Oi(s)?!0:Qg(s)!=null,validateCity:s=>gt(e$(s)),validateState:s=>gt(n$(s)),validatePostcode:s=>gt(t$(s)),accountCreationInProgress:t,accountCreationFailed:n,onSubmit:s=>{r(new hn(4,[s])),r(new hn(5,[]))},onBack:s=>{r(new hn(4,[s])),r(new hn(1,[]))}})}function fi(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=(S,A)=>{for(S=String(S);S.length<A;)S=" "+S;return S};console.info(`%c⏱ ${w(p,5)} /${w(h,5)} ms`,`
45
+ `))(a)}}else if(cc(r))if(Ko(r)){const o=tr(a=>Wn(e,t,n,a),hc(r));return a=>ao(la((l,c)=>ye(l,o)(c),a))}else{const o=Fe(uc(r));if(o==="Microsoft.FSharp.Core.FSharpOption`1[System.Object]"){const a=new Hm(()=>Ry(Wn(e,t,n,ye(0,Ht(r)))));return l=>l==null?ah: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=Wn(e,t,n,ye(0,Ht(r)));return l=>ao(Ee(a,l))}else if(o==="Microsoft.FSharp.Collections.FSharpMap`2[System.Object,System.Object]"){const a=ye(0,Ht(r)),l=Wn(e,t,n,ye(1,Ht(r)));if(Fe(a)==="System.String"||Fe(a)==="System.Guid")return c=>Vs((d,u)=>{const m=u;return d[m[0]]=l(m[1]),d},{},c);{let c;return c=Wn(e,t,n,a),u=>ao(Ee(m=>{const h=m;return[c(h[0]),l(h[1])]},u))}}else return lh(e,t,n,r)}else switch(s){case"System.Boolean":return o=>o;case"Microsoft.FSharp.Core.Unit":return Ny;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 Ty;case"System.DateTimeOffset":return Ey;case"System.TimeSpan":return Iy;case"System.Guid":return ky;case"System.Object":return o=>o;default:return lh(e,t,n,r)}else{const o=i;return a=>o.contents(a)}}function My(e){return Us({Compare:Rn})}function ni(e,t,n,r){const s=We(t,new qe(0,[])),i=We(r,!0);return Wn(My(),s,i,e)}function pl(e){return new $u(Dt(e))}function Gn(e){return`${e}/account-registry/admin`}const Py=5,Dy=1e3;function ch(e,t,n,r){return I.Delay(()=>{const s=oo(hl(sn(en("Bearer %s"))(n)),r);return I.Bind(ml(s),i=>{let o,a;const l=i,c=l.statusCode|0;return o=c|0,o>=200&&o<=299?I.Return(l):(a=c|0,(a===429?!0:a>=500)&&e>=1?I.Bind(Qa(t),()=>I.ReturnFrom(ch(e-1,t,n,r))):I.Return(l))})})}const qn=e=>t=>ch(Py,Dy,e,t);function Oy(e,t){return I.Delay(()=>{let n;const r=qn(t)(Lt(new Et(0,[]),It(`${Gn(e)}/partners`)));return n=I.Bind(r,s=>I.Return(new g(0,[s]))),I.Bind(n,s=>{const i=s;if(i.tag===1)return I.Return(new g(1,[i.fields[0]]));{const o=i.fields[0];if(o.statusCode===200){let a;const l=Ft(pe(Vt(Go(d$()),new qe(1,[]))),o.responseText);return a=l.tag===1?new g(1,[l.fields[0]]):Ay(At(G1,l.fields[0])),I.Return(a)}else return I.Return(new g(1,["Unexpected response from backend"]))}})})}function Fy(e,t,n){const r=Dt(n);return I.Delay(()=>{let s;const i=qn(t)(Lt(new Et(0,[]),It(`${Gn(e)}/partners/${r}/advanced-security-config`)));return s=I.Bind(i,o=>I.Return(new g(0,[o]))),I.Bind(s,o=>{const a=o;if(a.tag===1)return I.Return(new g(1,[a.fields[0]]));{const l=a.fields[0];if(l.statusCode===200){let c;const d=Ft(pe(Vt(_a(),new qe(1,[]))),l.responseText);return c=d.tag===1?new g(1,[d.fields[0]]):new g(0,[d.fields[0].Configuration]),I.Return(c)}else return I.Return(new g(1,["Unexpected response from backend"]))}})})}function Vy(e,t,n,r){const s=Dt(n);return I.Delay(()=>{let i;const o=new ba(r);let a;const l=qn(t)((i=Lt(new Et(2,[]),It(`${Gn(e)}/partners/${s}/advanced-security-config`)),ei(new $s(1,[ti(0,ni(zu(),new qe(1,[]),void 0,void 0)(o))]),i)));return a=I.Bind(l,c=>I.Return(new g(0,[c]))),I.Bind(a,c=>{const d=c;if(d.tag===1)return I.Return(new g(1,[d.fields[0]]));{const u=d.fields[0];if(u.statusCode===200){let m;const h=Ft(pe(Vt(_a(),new qe(1,[]))),u.responseText);return m=h.tag===1?new g(1,[h.fields[0]]):new g(0,[h.fields[0].Configuration]),I.Return(m)}else return I.Return(new g(1,["Unexpected response from backend"]))}})})}function Ly(e,t,n){const r=Dt(n);return I.Delay(()=>{let s;const i=new ba(void 0);let o;const a=qn(t)((s=Lt(new Et(2,[]),It(`${Gn(e)}/partners/${r}/advanced-security-config`)),ei(new $s(1,[ti(0,ni(zu(),new qe(1,[]),void 0,void 0)(i))]),s)));return o=I.Bind(a,l=>I.Return(new g(0,[l]))),I.Bind(o,l=>{const c=l;if(c.tag===1)return I.Return(new g(1,[c.fields[0]]));{const d=c.fields[0];if(d.statusCode===200){let u;const m=Ft(pe(Vt(_a(),new qe(1,[]))),d.responseText);return u=m.tag===1?new g(1,[m.fields[0]]):new g(0,[m.fields[0].Configuration]),I.Return(u)}else return I.Return(new g(1,["Unexpected response from backend"]))}})})}function uh(e,t,n,r){const s=Dt(n),i=ln(r);return I.Delay(()=>{let o;const a=qn(t)(Lt(new Et(0,[]),It(`${Gn(e)}/partners/${s}/accounts/${i}`)));return o=I.Bind(a,l=>I.Return(new g(0,[l]))),I.Bind(o,l=>{const c=l;if(c.tag===1)return I.Return(new g(1,[c.fields[0]]));{const d=c.fields[0];if(d.statusCode===200){const u=Ft(pe(Vt(f$(),new qe(1,[]))),d.responseText);return I.Return(u)}else return I.Return(new g(1,["Unexpected response from backend"]))}})})}function By(e,t,n,r,s){const i=Dt(n),o=ln(r);return I.Delay(()=>{const a=ti(0,ni(E$(),new qe(1,[]),void 0,void 0)(s));let l;const c=qn(t)(ei(new $s(1,[a]),Lt(new Et(3,[]),It(`${Gn(e)}/partners/${i}/accounts/${o}`))));return l=I.Bind(c,d=>I.Return(new g(0,[d]))),I.Bind(l,d=>{const u=d;if(u.tag===1)return I.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=I.Return(h),I.Bind(m,p=>{let $;const w=p;return $=w.tag===1?new g(1,[w.fields[0]]):new g(0,[void 0]),I.Return($)})}})})}function gl(e,t,n,r,s){return I.Delay(()=>{let i,o,a,l;const c="?"+re("&",Bc(m=>m,y([(i=sf(r.SearchText),yn(i)?void 0:`search=${encodeURIComponent(i.trim())}`),(o=O1(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=of(r.PageSize)|0,a<=100&&a>=10?`page_size=${a}`:void 0)])));let d;const u=qn(t)((l=Lt(new Et(0,[]),It(`${Gn(e)}/partners/${is(n)}/accounts${c}`)),s==null?l:oo(new sh("token",s),l)));return d=I.Bind(u,m=>I.Return(new g(0,[m]))),I.Bind(d,m=>{const h=m;if(h.tag===1)return I.Return(new g(1,[h.fields[0]]));{const p=h.fields[0];if(p.statusCode===200){const $=Ft(pe(Vt(p$(),new qe(1,[]))),p.responseText);return I.Return($)}else return I.Return(new g(1,["Unexpected response from backend"]))}})})}function Uy(e,t,n){const r=ln(n);return I.Delay(()=>{let s;const i=qn(t)(Lt(new Et(0,[]),It(`${Gn(e)}/search-by-id/${r}`)));return s=I.Bind(i,o=>I.Return(new g(0,[o]))),I.Bind(s,o=>{const a=o;if(a.tag===1)return I.Return(new g(1,[a.fields[0]]));{const l=a.fields[0];if(l.statusCode===200){const c=Ft(pe(Vt($$(),new qe(1,[]))),l.responseText);return I.Return(c)}else return I.Return(new g(1,["Unexpected response from backend"]))}})})}function jy(e,t,n,r,s){const i=Dt(n),o=ln(r);return I.Delay(()=>{let a,l;const c=qn(t)((a=Lt(new Et(2,[]),It(`${Gn(e)}/partners/${i}/accounts/${o}/provisioning`)),ei(new $s(1,[ti(0,ni(I$(),new qe(1,[]),void 0,void 0)(s))]),a)));return l=I.Bind(c,d=>I.Return(new g(0,[d]))),I.Bind(l,d=>{const u=d;if(u.tag===1)return I.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=I.Return(h),I.Bind(m,p=>{let $;const w=p;return $=w.tag===1?new g(1,[w.fields[0]]):new g(0,[void 0]),I.Return($)})}})})}function zy(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 Hy=ar(zy);function Wy(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 Gy=ar(Wy);function qy(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 Ky=ar(qy);function Zy(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 Jy=ar(Zy);function Yy(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 Xy=ar(Yy);class dh extends B{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["BreadCrumb"]}}function Qy(e,t,n){let r,s;return f("li",_(y([["key",e],["className","flex"],(r=[f("div",_(y([["className","flex items-center"],(s=J(k(()=>{let i;return R(n?He():x((i={className:"flex-shrink-0 h-5 w-5 text-gray-400"},f(Gy,i))),k(()=>x(f("a",_(J(k(()=>R(x(["children",e]),k(()=>R(t!=null?x(["href",Rr(O(t))]):He(),k(()=>x(["className","ml-4 text-sm font-medium text-gray-500 hover:text-gray-700"]))))))))))))})),["children",b.Children.toArray(Array.from(s))])])))],["children",b.Children.toArray(Array.from(r))])])))}function eb(e){let t,n;return f("nav",_(y([["className","pt-2 mb-6"],["aria-label","Breadcrumb"],(t=[f("ol",_(y([["className","-ml-3 max-w-screen-xl w-full flex space-x-4"],(n=Fs((r,s)=>Qy(s.fields[0][0],s.fields[0][1],r===0),e),["children",b.Children.toArray(Array.from(n))])])))],["children",b.Children.toArray(Array.from(t))])])))}function yt(e,t){return new dh([e,Js(t)])}function fh(){return yt("Partners",new K(0,[]))}function hh(e,t){return yt(t,new K(1,[e]))}function tb(e){return yt("Super",new K(4,[e]))}function nb(e){return yt("Benefits",new K(5,[e]))}function rb(e){return yt("Bank Details",new K(6,[e]))}function sb(e){return yt("Directory",new K(2,[e]))}function ib(e){return yt("Workspace",new K(7,[e]))}function ob(e){return yt("Security",new K(8,[e]))}function ab(e){return yt("Accounts",new K(3,[e]))}function lb(e){return new dh([e,void 0])}function cb(e,t){let n;return yt("Directory",(n=[e,t],new K(10,[n[0],n[1]])))}function ub(e,t){let n;return yt("Users",(n=[e,t],new K(11,[n[0],n[1]])))}function db(e,t){let n;return yt("Super",(n=[e,t],new K(12,[n[0],n[1]])))}function fb(e,t){let n;return yt("Benefits",(n=[e,t],new K(13,[n[0],n[1]])))}function hb(e,t){let n;return yt("Bank Details",(n=[e,t],new K(14,[n[0],n[1]])))}function mb(e,t){let n;return yt("Salary Packaging",(n=[e,t],new K(15,[n[0],n[1]])))}function pb(e,t){let n;return yt("Workspace",(n=[e,t],new K(16,[n[0],n[1]])))}function gb(e,t){let n;return yt("HRIS Migration",(n=[e,t],new K(17,[n[0],n[1]])))}function ri(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?qi(m.Id):da(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?Ki(m.Id):da(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([fh(),hh(d.Id,n),ab(d.Id),lb(s)]);break}case 1:{o=y([fh(),hh(u.Id,n)]);break}default:o=Ve()}return eb((t=e.page,t.tag===18||t.tag===1||t.tag===3?o:t.tag===4?Ye(o,ee(tb(t.fields[0]))):t.tag===5?Ye(o,ee(nb(t.fields[0]))):t.tag===6?Ye(o,ee(rb(t.fields[0]))):t.tag===2?Ye(o,ee(sb(t.fields[0]))):t.tag===7?Ye(o,ee(ib(t.fields[0]))):t.tag===8?Ye(o,ee(ob(t.fields[0]))):t.tag===9?o:t.tag===10?Ye(o,ee(cb(t.fields[0],t.fields[1]))):t.tag===11?Ye(o,ee(ub(t.fields[0],t.fields[1]))):t.tag===12?Ye(o,ee(db(t.fields[0],t.fields[1]))):t.tag===13?Ye(o,ee(fb(t.fields[0],t.fields[1]))):t.tag===14?Ye(o,ee(hb(t.fields[0],t.fields[1]))):t.tag===15?Ye(o,ee(mb(t.fields[0],t.fields[1]))):t.tag===16?Ye(o,ee(pb(t.fields[0],t.fields[1]))):t.tag===17?Ye(o,ee(gb(t.fields[0],t.fields[1]))):o))}class $b extends B{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["Tab"]}}function wb(e){return new $b(e)}function yb(e){return e.fields[0]}function mh(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 wb(f("a",_(J(k(()=>R(x(["key",t]),k(()=>R(x(["children",t]),k(()=>R(x(["className",r]),k(()=>e!==t?x(["href",Rr(ee(n))]):He())))))))))))}function ph(e){let t,n;const r=e.headers,s=lr(100);return f("div",_(y([["ref",i=>{const o=zp(i);if(o!=null){const a=o;s[1](~~a.offsetTop)}}],["className","relative"],(t=[f("div",{className:"w-40 mr-6"}),f("nav",_(y([["className","fixed bottom-14 flex flex-col w-40 border-r border-gray-300 mr-6"],["style",{top:s[0]}],(n=Ee(yb,r),["children",b.Children.toArray(Array.from(n))])])))],["children",b.Children.toArray(Array.from(t))])])))}class gh extends B{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Enabled","Disabled"]}}function bb(e){return e==null?new gh(1,[]):new gh(0,[e])}class si extends Y{constructor(t,n){super(),this.Key=t,this.Value=n}}class dr extends Y{constructor(t,n,r){super(),this.Issuer=t,this.OpenIdConfigUrl=n,this.RequiredClaims=r}}class bt extends Y{constructor(t,n,r){super(),this.Config=t,this.IsSaving=n,this.ValidationErrors=r}}const _b=new bt(new dr("",void 0,Ve()),!1,Us({Compare:Rn}));function vb(e){if(e.tag===0){const t=e.fields[0];return new bt(new dr(t.Issuer,t.OpenIdConfigUrl,At(n=>new si(n[0],n[1]),lu(t.RequiredClaims))),!1,Us({Compare:Rn}))}else return _b}class xb extends Y{constructor(t,n,r){super(),this.Roles=t,this.BackendUrl=n,this.AccessToken=r}}const xn=d1();let Dr=class extends B{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["UpdateSearchText","UpdateSort","LoadAccountLookup","UpdateAccountLookup","QueryAccountLookup"]}};class Cb{constructor(t){this.props=t}}function Sb(e){return new Cb(e)}function $h(e){return t=>n=>I.Delay(()=>{const r=pl(e.props.partnerId);return I.Bind(gl(e.props.backendUrl,e.props.accessToken,r,t,void 0),s=>(n(new Dr(2,[new le(2,[s])])),I.Zero()))})}function Ab(e){return t=>n=>r=>I.Delay(()=>{const s=pl(e.props.partnerId);return I.Bind(gl(e.props.backendUrl,e.props.accessToken,s,t,n),i=>(r(new Dr(3,[i])),I.Zero()))})}function kb(e,t,n){return gl(e.props.backendUrl,e.props.accessToken,pl(e.props.partnerId),t,void 0)}let ys=class extends Y{constructor(t,n,r,s){super(),this.Data=t,this.SearchText=n,this.Sort=r,this.PageSize=s}};function Eb(){return[new ys(new le(0,[]),F1,D1,B1(20)),z()]}function Ib(e,t,n){let r,s,i,o;switch(t.tag){case 1:{const a=t.fields[0];return[new ys(new le(1,[]),n.SearchText,a,n.PageSize),Qe(l=>{const c=new el(n.SearchText,a,n.PageSize);ds($h(e)(c)(l))})]}case 2:return[new ys(t.fields[0],n.SearchText,n.Sort,n.PageSize),z()];case 3:{const a=t.fields[0];return[new ys((r=n.Data,r.tag===2?r.fields[0].tag===0?(s=a,s.tag===1?new le(2,[new g(1,[s.fields[0]])]):new le(2,[new g(0,[new Ou(Ye(r.fields[0].fields[0].Accounts,s.fields[0].Accounts),s.fields[0].Token)])])):(i=a,i.tag===1?new le(2,[new g(1,[i.fields[0]])]):new le(3,[new Error("Failed to retrieve the account data")])):(o=a,o.tag===1?new le(2,[new g(1,[o.fields[0]])]):new le(3,[new Error("Failed to retrieve the account data")]))),n.SearchText,n.Sort,n.PageSize),z()]}case 4:return[new ys(new le(1,[]),n.SearchText,n.Sort,n.PageSize),Qe(a=>{const l=new el(n.SearchText,n.Sort,n.PageSize);ds($h(e)(l)(a))})];default:return[new ys(n.Data,V1(t.fields[0]),n.Sort,n.PageSize),z()]}}function wh(e,t,n,r){let s,i;return f("div",_(y([["className",re(" ",["flex-grow","max-w-md"])],(s=[f("label",{for:"search",children:"Search",className:re(" ",["block","text-sm","font-medium","text-gray-700"])}),f("div",_(y([["className","mt-1"],(i=[f("input",{id:"search",name:"search",type:"text",className:re(" ",["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",b.Children.toArray(Array.from(i))])])))],["children",b.Children.toArray(Array.from(s))])])))}function Nb(e){let t,n;return f("div",_(y([["className","pt-6"],(t=[f("div",_(y([["className",re(" ",["flex","justify-end"])],(n=[f("button",{type:"search",children:"Search",className:re(" ",["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",b.Children.toArray(Array.from(n))])])))],["children",b.Children.toArray(Array.from(t))])])))}function yh(e){return["fillRule",e]}function bh(e){return["clipRule",e]}const Tb=f("svg",_(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",_(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",b.Children.toArray(Array.from(t))]})()]))),Rb=f("svg",_(y([["className",re(" ",["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",_(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]),yh("evenodd"),bh("evenodd")]))));return["children",b.Children.toArray(Array.from(t))]})()]))),Mb=f("svg",_(y([["className",re(" ",["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",_(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]),yh("evenodd"),bh("evenodd")]))));return["children",b.Children.toArray(Array.from(t))]})()]))),_h=f("svg",_(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",b.Children.toArray(Array.from(e))]})()]))),Pb=f("svg",_(y([["className",re(" ",["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",b.Children.toArray(Array.from(e))]})()]))),Db=f("svg",_(y([["className",re(" ",["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",_(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",_(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",b.Children.toArray(Array.from(n))]})()]))),ii=f("svg",_(y([["className",re(" ",["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",_(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",_(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",b.Children.toArray(Array.from(n))]})()]))),oi=f("svg",_(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",_(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",_(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",b.Children.toArray(Array.from(n))]})()])));function fr(e){const t=e.child,n=e.onClose;return Ud(()=>{const r=s=>{s.key==="Escape"&&n()};return window.addEventListener("keydown",r),{Dispose(){window.removeEventListener("keydown",r)}}},[]),t}class Ob{constructor(t,n){this.accessToken=n,this.adminUrl=`${t}/account-registry/admin`}QueryAnzsic(t){const n=this;return v1(I.Delay(()=>I.Bind(vh(n,It(`${n.adminUrl}/anzsic?maxRecordCount=15&search=${t}`)),r=>{const s=Ft(pe(Vt(x$(),new qe(1,[]))),r.responseText);return I.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 I.Delay(()=>{let o,a;const l=vh(i,ei(new $s(1,[(o=new Vu(n.AccountName,n.WebsiteUrl,new Eu(r.FirstName,r.LastName,r.Email,r.MobilePhone),void 0,new Fu(n.LegalEntityName,n.Abn,s.Line1,Oi(s.Line2)?void 0:s.Line2,s.City,s.Postcode,s.State,r.MobilePhone,"AU"),void 0,void 0,new Ru(n.SalesforceParentRecordId,void 0),new Mu(n.Industry.ClassCode,n.Industry.ClassTitle)),ti(0,ni(S$(),new qe(1,[]),void 0,void 0)(o)))]),Lt(new Et(1,[]),It(`${i.adminUrl}/partners/${qi(t)}/accounts`))));return a=I.Bind(l,c=>I.Return(new g(0,[c]))),I.Bind(a,c=>{const d=c;if(d.tag===1)return I.Return(new g(1,[d.fields[0]]));{let u;const m=Ft(pe(Vt(k$(),new qe(1,[]))),d.fields[0].responseText);return u=m.tag===1?new g(1,[void 0]):new g(0,[m.fields[0].Id]),I.Return(u)}})})}}function Fb(e,t){return new Ob(e,t)}function vh(e,t){return ml(oo(hl(`Bearer ${e.accessToken}`),t))}let Vb=class extends Y{constructor(t,n,r,s){super(),this.Name=t,this.ExternalId=n,this.BusinessName=r,this.BusinessNumber=s}};class Or extends B{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["AccountDetailsForm","PrimaryContactForm","BusinessAddressForm"]}}let hn=class extends B{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["NextForm","PreviousForm","SetAccountDetailsForm","SetPrimaryContactForm","SetBusinessAddressForm","StartAccountCreation","FinishAccountCreation"]}},hr=class extends Y{constructor(t,n,r,s,i){super(),this.AccountDetailsForm=t,this.PrimaryContactForm=n,this.BusinessAddressForm=r,this.CurrentView=s,this.AccountCreation=i}};function Lb(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 Bb(e){switch(e.AccountCreation.tag){case 0:case 2:case 3:return!1;default:return!0}}const Ub=[new hr({},{},{},new Or(0,[]),new le(0,[])),z()];function jb(e,t,n,r){let s,i;switch(n.tag){case 1:return[new hr(r.AccountDetailsForm,r.PrimaryContactForm,r.BusinessAddressForm,(s=r.CurrentView,s.tag===1?new Or(0,[]):s.tag===2?new Or(1,[]):new Or(0,[])),r.AccountCreation),z()];case 2:return[new hr(n.fields[0],r.PrimaryContactForm,r.BusinessAddressForm,r.CurrentView,r.AccountCreation),z()];case 3:return[new hr(r.AccountDetailsForm,n.fields[0],r.BusinessAddressForm,r.CurrentView,r.AccountCreation),z()];case 4:return[new hr(r.AccountDetailsForm,r.PrimaryContactForm,n.fields[0],r.CurrentView,r.AccountCreation),z()];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,z()];default:return[new hr(r.AccountDetailsForm,r.PrimaryContactForm,r.BusinessAddressForm,r.CurrentView,new le(1,[])),cr(l=>{ur(l)},l=>t.CreateAccount(l[0],l[1],l[2],l[3]),[e,r.AccountDetailsForm,r.PrimaryContactForm,r.BusinessAddressForm],l=>new hn(6,[l]))]}}case 6:{const o=n.fields[0];return[new hr(r.AccountDetailsForm,r.PrimaryContactForm,r.BusinessAddressForm,r.CurrentView,new le(2,[o])),o.tag===1?z():rl(new K(16,[e,Gt(o.fields[0])]))]}default:return[new hr(r.AccountDetailsForm,r.PrimaryContactForm,r.BusinessAddressForm,(i=r.CurrentView,i.tag===1?new Or(2,[]):i.tag===2?new Or(2,[]):new Or(1,[])),r.AccountCreation),z()]}}var zb=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:--zb,__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 ae.vnode&&ae.vnode(c),c}var ai=e=>e.type==="checkbox",Fr=e=>e instanceof Date,Nt=e=>e==null;const xh=e=>typeof e=="object";var Ke=e=>!Nt(e)&&!Array.isArray(e)&&xh(e)&&!Fr(e),Ch=e=>Ke(e)&&e.target?ai(e.target)?e.target.checked:e.target.value:e,Hb=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,Sh=(e,t)=>e.has(Hb(t)),Wb=e=>{const t=e.constructor&&e.constructor.prototype;return Ke(t)&&t.hasOwnProperty("isPrototypeOf")},$l=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Bt(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(!($l&&(e instanceof Blob||r))&&(n||Ke(e)))if(t=n?[]:{},!n&&!Wb(e))t=e;else for(const s in e)e.hasOwnProperty(s)&&(t[s]=Bt(e[s]));else return e;return t}var lo=e=>Array.isArray(e)?e.filter(Boolean):[],Ze=e=>e===void 0,U=(e,t,n)=>{if(!t||!Ke(e))return n;const r=lo(t.split(/[,[\].]+?/)).reduce((s,i)=>Nt(s)?s:s[i],e);return Ze(r)||r===e?Ze(e[t])?n:e[t]:r},tn=e=>typeof e=="boolean",wl=e=>/^\w*$/.test(e),Ah=e=>lo(e.replace(/["|']|\]/g,"").split(/\.|\[/)),Te=(e,t,n)=>{let r=-1;const s=wl(t)?[t]:Ah(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=Ke(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 co={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},mn={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Kn={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},Gb=X.createContext(null),yl=()=>X.useContext(Gb);var kh=(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]!==mn.all&&(t._proxyFormState[o]=!r||mn.all),n&&(n[o]=!0),e[o]}});return s},Ut=e=>Ke(e)&&!Object.keys(e).length,Eh=(e,t,n,r)=>{n(e);const{name:s,...i}=e;return Ut(i)||Object.keys(i).length>=Object.keys(t).length||Object.keys(i).find(o=>t[o]===(!r||mn.all))},li=e=>Array.isArray(e)?e:[e],Ih=(e,t,n)=>!e||!t||e===t||li(e).some(r=>r&&(n?r===t:r.startsWith(t)||t.startsWith(r)));function bl(e){const t=X.useRef(e);t.current=e,X.useEffect(()=>{const n=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{n&&n.unsubscribe()}},[e.disabled])}function qb(e){const t=yl(),{control:n=t.control,disabled:r,name:s,exact:i}=e||{},[o,a]=X.useState(n._formState),l=X.useRef(!0),c=X.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),d=X.useRef(s);return d.current=s,bl({disabled:r,next:u=>l.current&&Ih(d.current,u.name,i)&&Eh(u,c.current,n._updateFormState)&&a({...n._formState,...u}),subject:n._subjects.state}),X.useEffect(()=>(l.current=!0,c.current.isValid&&n._updateValid(!0),()=>{l.current=!1}),[n]),X.useMemo(()=>kh(o,n,c.current,!1),[o,n])}var Cn=e=>typeof e=="string",Nh=(e,t,n,r,s)=>Cn(e)?(r&&t.watch.add(e),U(n,e,s)):Array.isArray(e)?e.map(i=>(r&&t.watch.add(i),U(n,i))):(r&&(t.watchAll=!0),n);function Kb(e){const t=yl(),{control:n=t.control,name:r,defaultValue:s,disabled:i,exact:o}=e||{},a=X.useRef(r);a.current=r,bl({disabled:i,subject:n._subjects.values,next:d=>{Ih(a.current,d.name,o)&&c(Bt(Nh(a.current,n._names,d.values||n._formValues,!1,s)))}});const[l,c]=X.useState(n._getWatch(r,s));return X.useEffect(()=>n._removeUnmounted()),l}function Th(e){const t=yl(),{name:n,disabled:r,control:s=t.control,shouldUnregister:i}=e,o=Sh(s._names.array,n),a=Kb({control:s,name:n,defaultValue:U(s._formValues,n,U(s._defaultValues,n,e.defaultValue)),exact:!0}),l=qb({control:s,name:n,exact:!0}),c=X.useRef(s.register(n,{...e.rules,value:a,...tn(e.disabled)?{disabled:e.disabled}:{}})),d=X.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!U(l.errors,n)},isDirty:{enumerable:!0,get:()=>!!U(l.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!U(l.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!U(l.validatingFields,n)},error:{enumerable:!0,get:()=>U(l.errors,n)}}),[l,n]),u=X.useMemo(()=>({name:n,value:a,...tn(r)||l.disabled?{disabled:l.disabled||r}:{},onChange:m=>c.current.onChange({target:{value:Ch(m),name:n},type:co.CHANGE}),onBlur:()=>c.current.onBlur({target:{value:U(s._formValues,n),name:n},type:co.BLUR}),ref:m=>{const h=U(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 X.useEffect(()=>{const m=s._options.shouldUnregister||i,h=(p,$)=>{const w=U(s._fields,p);w&&w._f&&(w._f.mount=$)};if(h(n,!0),m){const p=Bt(U(s._options.defaultValues,n));Te(s._defaultValues,n,p),Ze(U(s._formValues,n))&&Te(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]),X.useEffect(()=>{s._updateDisabledField({disabled:r,fields:s._fields,name:n})},[r,n,s]),X.useMemo(()=>({field:u,formState:l,fieldState:d}),[u,l,d])}var Zb=(e,t,n,r,s)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:s||!0}}:{},Rh=e=>({isOnSubmit:!e||e===mn.onSubmit,isOnBlur:e===mn.onBlur,isOnChange:e===mn.onChange,isOnAll:e===mn.all,isOnTouch:e===mn.onTouched}),Mh=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const ci=(e,t,n,r)=>{for(const s of n||Object.keys(e)){const i=U(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(ci(a,t))break}else if(Ke(a)&&ci(a,t))break}}};var Jb=(e,t,n)=>{const r=li(U(e,n));return Te(r,"root",t[n]),Te(e,n,r),e},_l=e=>e.type==="file",Sn=e=>typeof e=="function",uo=e=>{if(!$l)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},fo=e=>Cn(e),vl=e=>e.type==="radio",ho=e=>e instanceof RegExp;const Ph={value:!1,isValid:!1},Dh={value:!0,isValid:!0};var Oh=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&&!Ze(e[0].attributes.value)?Ze(e[0].value)||e[0].value===""?Dh:{value:e[0].value,isValid:!0}:Dh:Ph}return Ph};const Fh={isValid:!1,value:null};var Vh=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,Fh):Fh;function Lh(e,t,n="validate"){if(fo(e)||Array.isArray(e)&&e.every(fo)||tn(e)&&!e)return{type:n,message:fo(e)?e:"",ref:t}}var bs=e=>Ke(e)&&!ho(e)?e:{value:e,message:""},Bh=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:S}=e._f,A=U(n,$);if(!S||t.has($))return{};const E=a?a[0]:o,P=q=>{s&&E.reportValidity&&(E.setCustomValidity(tn(q)?"":q||""),E.reportValidity())},V={},ne=vl(o),we=ai(o),Ae=ne||we,he=(w||_l(o))&&Ze(o.value)&&Ze(A)||uo(o)&&o.value===""||A===""||Array.isArray(A)&&!A.length,te=Zb.bind(null,$,r,V),de=(q,oe,Oe,D=Kn.maxLength,ke=Kn.minLength)=>{const me=q?oe:Oe;V[$]={type:q?D:ke,message:me,ref:o,...te(q?D:ke,me)}};if(i?!Array.isArray(A)||!A.length:l&&(!Ae&&(he||Nt(A))||tn(A)&&!A||we&&!Oh(a).isValid||ne&&!Vh(a).isValid)){const{value:q,message:oe}=fo(l)?{value:!!l,message:l}:bs(l);if(q&&(V[$]={type:Kn.required,message:oe,ref:E,...te(Kn.required,oe)},!r))return P(oe),V}if(!he&&(!Nt(u)||!Nt(m))){let q,oe;const Oe=bs(m),D=bs(u);if(!Nt(A)&&!isNaN(A)){const ke=o.valueAsNumber||A&&+A;Nt(Oe.value)||(q=ke>Oe.value),Nt(D.value)||(oe=ke<D.value)}else{const ke=o.valueAsDate||new Date(A),me=je=>new Date(new Date().toDateString()+" "+je),it=o.type=="time",Re=o.type=="week";Cn(Oe.value)&&A&&(q=it?me(A)>me(Oe.value):Re?A>Oe.value:ke>new Date(Oe.value)),Cn(D.value)&&A&&(oe=it?me(A)<me(D.value):Re?A<D.value:ke<new Date(D.value))}if((q||oe)&&(de(!!q,Oe.message,D.message,Kn.max,Kn.min),!r))return P(V[$].message),V}if((c||d)&&!he&&(Cn(A)||i&&Array.isArray(A))){const q=bs(c),oe=bs(d),Oe=!Nt(q.value)&&A.length>+q.value,D=!Nt(oe.value)&&A.length<+oe.value;if((Oe||D)&&(de(Oe,q.message,oe.message),!r))return P(V[$].message),V}if(h&&!he&&Cn(A)){const{value:q,message:oe}=bs(h);if(ho(q)&&!A.match(q)&&(V[$]={type:Kn.pattern,message:oe,ref:o,...te(Kn.pattern,oe)},!r))return P(oe),V}if(p){if(Sn(p)){const q=await p(A,n),oe=Lh(q,E);if(oe&&(V[$]={...oe,...te(Kn.validate,oe.message)},!r))return P(oe.message),V}else if(Ke(p)){let q={};for(const oe in p){if(!Ut(q)&&!r)break;const Oe=Lh(await p[oe](A,n),E,oe);Oe&&(q={...Oe,...te(oe,Oe.message)},P(Oe.message),r&&(V[$]=q))}if(!Ut(q)&&(V[$]={ref:E,...q},!r))return V}}return P(!0),V};function Yb(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=Ze(e)?r++:e[t[r++]];return e}function Xb(e){for(const t in e)if(e.hasOwnProperty(t)&&!Ze(e[t]))return!1;return!0}function tt(e,t){const n=Array.isArray(t)?t:wl(t)?[t]:Ah(t),r=n.length===1?e:Yb(e,n),s=n.length-1,i=n[s];return r&&delete r[i],s!==0&&(Ke(r)&&Ut(r)||Array.isArray(r)&&Xb(r))&&tt(e,n.slice(0,-1)),e}var xl=()=>{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=[]}}},Cl=e=>Nt(e)||!xh(e);function mr(e,t){if(Cl(e)||Cl(t))return e===t;if(Fr(e)&&Fr(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(Fr(i)&&Fr(o)||Ke(i)&&Ke(o)||Array.isArray(i)&&Array.isArray(o)?!mr(i,o):i!==o)return!1}}return!0}var Uh=e=>e.type==="select-multiple",Qb=e=>vl(e)||ai(e),Sl=e=>uo(e)&&e.isConnected,jh=e=>{for(const t in e)if(Sn(e[t]))return!0;return!1};function mo(e,t={}){const n=Array.isArray(e);if(Ke(e)||n)for(const r in e)Array.isArray(e[r])||Ke(e[r])&&!jh(e[r])?(t[r]=Array.isArray(e[r])?[]:{},mo(e[r],t[r])):Nt(e[r])||(t[r]=!0);return t}function zh(e,t,n){const r=Array.isArray(e);if(Ke(e)||r)for(const s in e)Array.isArray(e[s])||Ke(e[s])&&!jh(e[s])?Ze(t)||Cl(n[s])?n[s]=Array.isArray(e[s])?mo(e[s],[]):{...mo(e[s])}:zh(e[s],Nt(t)?{}:t[s],n[s]):n[s]=!mr(e[s],t[s]);return n}var ui=(e,t)=>zh(e,t,mo(t)),Hh=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>Ze(e)?e:t?e===""?NaN:e&&+e:n&&Cn(e)?new Date(e):r?r(e):e;function Al(e){const t=e.ref;return _l(t)?t.files:vl(t)?Vh(e.refs).value:Uh(t)?[...t.selectedOptions].map(({value:n})=>n):ai(t)?Oh(e.refs).value:Hh(Ze(t.value)?e.ref.value:t.value,e)}var e_=(e,t,n,r)=>{const s={};for(const i of e){const o=U(t,i);o&&Te(s,i,o._f)}return{criteriaMode:n,names:[...e],fields:s,shouldUseNativeValidation:r}},di=e=>Ze(e)?e:ho(e)?e.source:Ke(e)?ho(e.value)?e.value.source:e.value:e;const Wh="AsyncFunction";var t_=e=>!!e&&!!e.validate&&!!(Sn(e.validate)&&e.validate.constructor.name===Wh||Ke(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===Wh)),n_=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function Gh(e,t,n){const r=U(e,n);if(r||wl(n))return{error:r,name:n};const s=n.split(".");for(;s.length;){const i=s.join("."),o=U(t,i),a=U(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 r_=(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,s_=(e,t)=>!lo(U(e,t)).length&&tt(e,t);const i_={mode:mn.onSubmit,reValidateMode:mn.onChange,shouldFocusError:!0};function o_(e={}){let t={...i_,...e},n={submitCount:0,isDirty:!1,isLoading:Sn(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},r={},s=Ke(t.defaultValues)||Ke(t.values)?Bt(t.defaultValues||t.values)||{}:{},i=t.shouldUnregister?{}:Bt(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:xl(),array:xl(),state:xl()},m=Rh(t.mode),h=Rh(t.reValidateMode),p=t.criteriaMode===mn.all,$=v=>N=>{clearTimeout(c),c=setTimeout(v,N)},w=async v=>{if(!t.disabled&&(d.isValid||v)){const N=t.resolver?Ut((await Ae()).errors):await te(r,!0);N!==n.isValid&&u.state.next({isValid:N})}},S=(v,N)=>{!t.disabled&&(d.isValidating||d.validatingFields)&&((v||Array.from(a.mount)).forEach(T=>{T&&(N?Te(n.validatingFields,T,N):tt(n.validatingFields,T))}),u.state.next({validatingFields:n.validatingFields,isValidating:!Ut(n.validatingFields)}))},A=(v,N=[],T,H,j=!0,F=!0)=>{if(H&&T&&!t.disabled){if(o.action=!0,F&&Array.isArray(U(r,v))){const Q=T(U(r,v),H.argA,H.argB);j&&Te(r,v,Q)}if(F&&Array.isArray(U(n.errors,v))){const Q=T(U(n.errors,v),H.argA,H.argB);j&&Te(n.errors,v,Q),s_(n.errors,v)}if(d.touchedFields&&F&&Array.isArray(U(n.touchedFields,v))){const Q=T(U(n.touchedFields,v),H.argA,H.argB);j&&Te(n.touchedFields,v,Q)}d.dirtyFields&&(n.dirtyFields=ui(s,i)),u.state.next({name:v,isDirty:q(v,N),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else Te(i,v,N)},E=(v,N)=>{Te(n.errors,v,N),u.state.next({errors:n.errors})},P=v=>{n.errors=v,u.state.next({errors:n.errors,isValid:!1})},V=(v,N,T,H)=>{const j=U(r,v);if(j){const F=U(i,v,Ze(T)?U(s,v):T);Ze(F)||H&&H.defaultChecked||N?Te(i,v,N?F:Al(j._f)):D(v,F),o.mount&&w()}},ne=(v,N,T,H,j)=>{let F=!1,Q=!1;const fe={name:v};if(!t.disabled){const ht=!!(U(r,v)&&U(r,v)._f&&U(r,v)._f.disabled);if(!T||H){d.isDirty&&(Q=n.isDirty,n.isDirty=fe.isDirty=q(),F=Q!==fe.isDirty);const mt=ht||mr(U(s,v),N);Q=!!(!ht&&U(n.dirtyFields,v)),mt||ht?tt(n.dirtyFields,v):Te(n.dirtyFields,v,!0),fe.dirtyFields=n.dirtyFields,F=F||d.dirtyFields&&Q!==!mt}if(T){const mt=U(n.touchedFields,v);mt||(Te(n.touchedFields,v,T),fe.touchedFields=n.touchedFields,F=F||d.touchedFields&&mt!==T)}F&&j&&u.state.next(fe)}return F?fe:{}},we=(v,N,T,H)=>{const j=U(n.errors,v),F=d.isValid&&tn(N)&&n.isValid!==N;if(t.delayError&&T?(l=$(()=>E(v,T)),l(t.delayError)):(clearTimeout(c),l=null,T?Te(n.errors,v,T):tt(n.errors,v)),(T?!mr(j,T):j)||!Ut(H)||F){const Q={...H,...F&&tn(N)?{isValid:N}:{},errors:n.errors,name:v};n={...n,...Q},u.state.next(Q)}},Ae=async v=>{S(v,!0);const N=await t.resolver(i,t.context,e_(v||a.mount,r,t.criteriaMode,t.shouldUseNativeValidation));return S(v),N},he=async v=>{const{errors:N}=await Ae(v);if(v)for(const T of v){const H=U(N,T);H?Te(n.errors,T,H):tt(n.errors,T)}else n.errors=N;return N},te=async(v,N,T={valid:!0})=>{for(const H in v){const j=v[H];if(j){const{_f:F,...Q}=j;if(F){const fe=a.array.has(F.name),ht=j._f&&t_(j._f);ht&&d.validatingFields&&S([H],!0);const mt=await Bh(j,a.disabled,i,p,t.shouldUseNativeValidation&&!N,fe);if(ht&&d.validatingFields&&S([H]),mt[F.name]&&(T.valid=!1,N))break;!N&&(U(mt,F.name)?fe?Jb(n.errors,mt,F.name):Te(n.errors,F.name,mt[F.name]):tt(n.errors,F.name))}!Ut(Q)&&await te(Q,N,T)}}return T.valid},de=()=>{for(const v of a.unMount){const N=U(r,v);N&&(N._f.refs?N._f.refs.every(T=>!Sl(T)):!Sl(N._f.ref))&&_i(v)}a.unMount=new Set},q=(v,N)=>!t.disabled&&(v&&N&&Te(i,v,N),!mr(zt(),s)),oe=(v,N,T)=>Nh(v,a,{...o.mount?i:Ze(N)?s:Cn(v)?{[v]:N}:N},T,N),Oe=v=>lo(U(o.mount?i:s,v,t.shouldUnregister?U(s,v,[]):[])),D=(v,N,T={})=>{const H=U(r,v);let j=N;if(H){const F=H._f;F&&(!F.disabled&&Te(i,v,Hh(N,F)),j=uo(F.ref)&&Nt(N)?"":N,Uh(F.ref)?[...F.ref.options].forEach(Q=>Q.selected=j.includes(Q.value)):F.refs?ai(F.ref)?F.refs.length>1?F.refs.forEach(Q=>(!Q.defaultChecked||!Q.disabled)&&(Q.checked=Array.isArray(j)?!!j.find(fe=>fe===Q.value):j===Q.value)):F.refs[0]&&(F.refs[0].checked=!!j):F.refs.forEach(Q=>Q.checked=Q.value===j):_l(F.ref)?F.ref.value="":(F.ref.value=j,F.ref.type||u.values.next({name:v,values:{...i}})))}(T.shouldDirty||T.shouldTouch)&&ne(v,j,T.shouldTouch,T.shouldDirty,!0),T.shouldValidate&&je(v)},ke=(v,N,T)=>{for(const H in N){const j=N[H],F=`${v}.${H}`,Q=U(r,F);(a.array.has(v)||Ke(j)||Q&&!Q._f)&&!Fr(j)?ke(F,j,T):D(F,j,T)}},me=(v,N,T={})=>{const H=U(r,v),j=a.array.has(v),F=Bt(N);Te(i,v,F),j?(u.array.next({name:v,values:{...i}}),(d.isDirty||d.dirtyFields)&&T.shouldDirty&&u.state.next({name:v,dirtyFields:ui(s,i),isDirty:q(v,F)})):H&&!H._f&&!Nt(F)?ke(v,F,T):D(v,F,T),Mh(v,a)&&u.state.next({...n}),u.values.next({name:o.mount?v:void 0,values:{...i}})},it=async v=>{o.mount=!0;const N=v.target;let T=N.name,H=!0;const j=U(r,T),F=()=>N.type?Al(j._f):Ch(v),Q=fe=>{H=Number.isNaN(fe)||Fr(fe)&&isNaN(fe.getTime())||mr(fe,U(i,T,fe))};if(j){let fe,ht;const mt=F(),_r=v.type===co.BLUR||v.type===co.FOCUS_OUT,a2=!n_(j._f)&&!t.resolver&&!U(n.errors,T)&&!j._f.deps||r_(_r,U(n.touchedFields,T),n.isSubmitted,h,m),Yl=Mh(T,a,_r);Te(i,T,mt),_r?(j._f.onBlur&&j._f.onBlur(v),l&&l(0)):j._f.onChange&&j._f.onChange(v);const Xl=ne(T,mt,_r,!1),l2=!Ut(Xl)||Yl;if(!_r&&u.values.next({name:T,type:v.type,values:{...i}}),a2)return d.isValid&&(t.mode==="onBlur"&&_r?w():_r||w()),l2&&u.state.next({name:T,...Yl?{}:Xl});if(!_r&&Yl&&u.state.next({...n}),t.resolver){const{errors:Vm}=await Ae([T]);if(Q(mt),H){const c2=Gh(n.errors,r,T),Lm=Gh(Vm,r,c2.name||T);fe=Lm.error,T=Lm.name,ht=Ut(Vm)}}else S([T],!0),fe=(await Bh(j,a.disabled,i,p,t.shouldUseNativeValidation))[T],S([T]),Q(mt),H&&(fe?ht=!1:d.isValid&&(ht=await te(r,!0)));H&&(j._f.deps&&je(j._f.deps),we(T,ht,fe,Xl))}},Re=(v,N)=>{if(U(n.errors,N)&&v.focus)return v.focus(),1},je=async(v,N={})=>{let T,H;const j=li(v);if(t.resolver){const F=await he(Ze(v)?v:j);T=Ut(F),H=v?!j.some(Q=>U(F,Q)):T}else v?(H=(await Promise.all(j.map(async F=>{const Q=U(r,F);return await te(Q&&Q._f?{[F]:Q}:Q)}))).every(Boolean),!(!H&&!n.isValid)&&w()):H=T=await te(r);return u.state.next({...!Cn(v)||d.isValid&&T!==n.isValid?{}:{name:v},...t.resolver||!v?{isValid:T}:{},errors:n.errors}),N.shouldFocus&&!H&&ci(r,Re,v?j:a.mount),H},zt=v=>{const N={...o.mount?i:s};return Ze(v)?N:Cn(v)?U(N,v):v.map(T=>U(N,T))},wn=(v,N)=>({invalid:!!U((N||n).errors,v),isDirty:!!U((N||n).dirtyFields,v),error:U((N||n).errors,v),isValidating:!!U(n.validatingFields,v),isTouched:!!U((N||n).touchedFields,v)}),Gr=v=>{v&&li(v).forEach(N=>tt(n.errors,N)),u.state.next({errors:v?n.errors:{}})},Yt=(v,N,T)=>{const H=(U(r,v,{_f:{}})._f||{}).ref,j=U(n.errors,v)||{},{ref:F,message:Q,type:fe,...ht}=j;Te(n.errors,v,{...ht,...N,ref:H}),u.state.next({name:v,errors:n.errors,isValid:!1}),T&&T.shouldFocus&&H&&H.focus&&H.focus()},bi=(v,N)=>Sn(v)?u.values.subscribe({next:T=>v(oe(void 0,N),T)}):oe(v,N,!0),_i=(v,N={})=>{for(const T of v?li(v):a.mount)a.mount.delete(T),a.array.delete(T),N.keepValue||(tt(r,T),tt(i,T)),!N.keepError&&tt(n.errors,T),!N.keepDirty&&tt(n.dirtyFields,T),!N.keepTouched&&tt(n.touchedFields,T),!N.keepIsValidating&&tt(n.validatingFields,T),!t.shouldUnregister&&!N.keepDefaultValue&&tt(s,T);u.values.next({values:{...i}}),u.state.next({...n,...N.keepDirty?{isDirty:q()}:{}}),!N.keepIsValid&&w()},qr=({disabled:v,name:N,field:T,fields:H})=>{(tn(v)&&o.mount||v||a.disabled.has(N))&&(v?a.disabled.add(N):a.disabled.delete(N),ne(N,Al(T?T._f:U(H,N)._f),!1,!1,!0))},vi=(v,N={})=>{let T=U(r,v);const H=tn(N.disabled)||tn(t.disabled);return Te(r,v,{...T||{},_f:{...T&&T._f?T._f:{ref:{name:v}},name:v,mount:!0,...N}}),a.mount.add(v),T?qr({field:T,disabled:tn(N.disabled)?N.disabled:t.disabled,name:v}):V(v,!0,N.value),{...H?{disabled:N.disabled||t.disabled}:{},...t.progressive?{required:!!N.required,min:di(N.min),max:di(N.max),minLength:di(N.minLength),maxLength:di(N.maxLength),pattern:di(N.pattern)}:{},name:v,onChange:it,onBlur:it,ref:j=>{if(j){vi(v,N),T=U(r,v);const F=Ze(j.value)&&j.querySelectorAll&&j.querySelectorAll("input,select,textarea")[0]||j,Q=Qb(F),fe=T._f.refs||[];if(Q?fe.find(ht=>ht===F):F===T._f.ref)return;Te(r,v,{_f:{...T._f,...Q?{refs:[...fe.filter(Sl),F,...Array.isArray(U(s,v))?[{}]:[]],ref:{type:F.type,name:v}}:{ref:F}}}),V(v,!1,void 0,F)}else T=U(r,v,{}),T._f&&(T._f.mount=!1),(t.shouldUnregister||N.shouldUnregister)&&!(Sh(a.array,v)&&o.action)&&a.unMount.add(v)}}},ce=()=>t.shouldFocusError&&ci(r,Re,a.mount),Me=v=>{tn(v)&&(u.state.next({disabled:v}),ci(r,(N,T)=>{const H=U(r,T);H&&(N.disabled=H._f.disabled||v,Array.isArray(H._f.refs)&&H._f.refs.forEach(j=>{j.disabled=H._f.disabled||v}))},0,!1))},St=(v,N)=>async T=>{let H;T&&(T.preventDefault&&T.preventDefault(),T.persist&&T.persist());let j=Bt(i);if(a.disabled.size)for(const F of a.disabled)Te(j,F,void 0);if(u.state.next({isSubmitting:!0}),t.resolver){const{errors:F,values:Q}=await Ae();n.errors=F,j=Q}else await te(r);if(tt(n.errors,"root"),Ut(n.errors)){u.state.next({errors:{}});try{await v(j,T)}catch(F){H=F}}else N&&await N({...n.errors},T),ce(),setTimeout(ce);if(u.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Ut(n.errors)&&!H,submitCount:n.submitCount+1,errors:n.errors}),H)throw H},ks=(v,N={})=>{U(r,v)&&(Ze(N.defaultValue)?me(v,Bt(U(s,v))):(me(v,N.defaultValue),Te(s,v,Bt(N.defaultValue))),N.keepTouched||tt(n.touchedFields,v),N.keepDirty||(tt(n.dirtyFields,v),n.isDirty=N.defaultValue?q(v,Bt(U(s,v))):q()),N.keepError||(tt(n.errors,v),d.isValid&&w()),u.state.next({...n}))},xi=(v,N={})=>{const T=v?Bt(v):s,H=Bt(T),j=Ut(v),F=j?s:H;if(N.keepDefaultValues||(s=T),!N.keepValues){if(N.keepDirtyValues){const Q=new Set([...a.mount,...Object.keys(ui(s,i))]);for(const fe of Array.from(Q))U(n.dirtyFields,fe)?Te(F,fe,U(i,fe)):me(fe,U(F,fe))}else{if($l&&Ze(v))for(const Q of a.mount){const fe=U(r,Q);if(fe&&fe._f){const ht=Array.isArray(fe._f.refs)?fe._f.refs[0]:fe._f.ref;if(uo(ht)){const mt=ht.closest("form");if(mt){mt.reset();break}}}}r={}}i=t.shouldUnregister?N.keepDefaultValues?Bt(s):{}:Bt(F),u.array.next({values:{...F}}),u.values.next({values:{...F}})}a={mount:N.keepDirtyValues?a.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},o.mount=!d.isValid||!!N.keepIsValid||!!N.keepDirtyValues,o.watch=!!t.shouldUnregister,u.state.next({submitCount:N.keepSubmitCount?n.submitCount:0,isDirty:j?!1:N.keepDirty?n.isDirty:!!(N.keepDefaultValues&&!mr(v,s)),isSubmitted:N.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:j?{}:N.keepDirtyValues?N.keepDefaultValues&&i?ui(s,i):n.dirtyFields:N.keepDefaultValues&&v?ui(s,v):N.keepDirty?n.dirtyFields:{},touchedFields:N.keepTouched?n.touchedFields:{},errors:N.keepErrors?n.errors:{},isSubmitSuccessful:N.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1})},Fm=(v,N)=>xi(Sn(v)?v(i):v,N);return{control:{register:vi,unregister:_i,getFieldState:wn,handleSubmit:St,setError:Yt,_executeSchema:Ae,_getWatch:oe,_getDirty:q,_updateValid:w,_removeUnmounted:de,_updateFieldArray:A,_updateDisabledField:qr,_getFieldArray:Oe,_reset:xi,_resetDefaultValues:()=>Sn(t.defaultValues)&&t.defaultValues().then(v=>{Fm(v,t.resetOptions),u.state.next({isLoading:!1})}),_updateFormState:v=>{n={...n,...v}},_disableForm:Me,_subjects:u,_proxyFormState:d,_setErrors:P,get _fields(){return r},get _formValues(){return i},get _state(){return o},set _state(v){o=v},get _defaultValues(){return s},get _names(){return a},set _names(v){a=v},get _formState(){return n},set _formState(v){n=v},get _options(){return t},set _options(v){t={...t,...v}}},trigger:je,register:vi,handleSubmit:St,watch:bi,setValue:me,getValues:zt,reset:Fm,resetField:ks,clearErrors:Gr,unregister:_i,setError:Yt,setFocus:(v,N={})=>{const T=U(r,v),H=T&&T._f;if(H){const j=H.refs?H.refs[0]:H.ref;j.focus&&(j.focus(),N.shouldSelect&&Sn(j.select)&&j.select())}},getFieldState:wn}}function po(e={}){const t=X.useRef(void 0),n=X.useRef(void 0),[r,s]=X.useState({isDirty:!1,isValidating:!1,isLoading:Sn(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:Sn(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...o_(e),formState:r});const i=t.current.control;return i._options=e,bl({subject:i._subjects.state,next:o=>{Eh(o,i._proxyFormState,i._updateFormState,!0)&&s({...i._formState})}}),X.useEffect(()=>i._disableForm(e.disabled),[i,e.disabled]),X.useEffect(()=>{if(i._proxyFormState.isDirty){const o=i._getDirty();o!==r.isDirty&&i._subjects.state.next({isDirty:o})}},[i,r.isDirty]),X.useEffect(()=>{e.values&&!mr(e.values,n.current)?(i._reset(e.values,i._options.resetOptions),n.current=e.values,s(o=>({...o}))):i._resetDefaultValues()},[e.values,i]),X.useEffect(()=>{e.errors&&i._setErrors(e.errors)},[e.errors,i]),X.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()}),X.useEffect(()=>{e.shouldUnregister&&i._subjects.values.next({values:i._getWatch()})},[e.shouldUnregister,i]),t.current.formState=kh(r,i),t.current}function a_(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}=Th({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(a_(c.target.value)):a.onChange(c)})}),l.invalid&&M("p",{className:"mt-2 text-sm text-red-600",children:[e," is invalid"]})]})}function go({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(Ky,{})}):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 l_({defaultValues:e,validateFirstName:t,validateLastName:n,validateEmail:r,validateMobilePhone:s,onSubmit:i,onBack:o}){const{handleSubmit:a,control:l,getValues:c}=po({mode:"onChange",defaultValues:e});return M(be,{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(go,{primaryLabel:"Next",secondaryLabel:"Back",secondaryOnClick:()=>o(c())})]})]})}function c_(e,t){return f(l_,{defaultValues:e,validateFirstName:n=>gt(_u(n)),validateLastName:n=>gt(xu(n)),validateEmail:n=>gt(Su(n)),validateMobilePhone:n=>gt(Au(n)),onSubmit:n=>{t(new hn(3,[n])),t(new hn(0,[]))},onBack:n=>{t(new hn(3,[n])),t(new hn(1,[]))}})}function u_(){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(Xy,{"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 d_({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}=po({mode:"onChange",defaultValues:e});return M(be,{children:[a&&M(u_,{}),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(go,{primaryLabel:"Add account",secondaryLabel:"Back",secondaryOnClick:()=>c(h()),isBusy:o})]})]})}function f_(e,t,n,r){return f(d_,{defaultValues:e,validateAddress1:s=>gt(t$(s)),validateAddress2:s=>Oi(s)?!0:n$(s)!=null,validateCity:s=>gt(r$(s)),validateState:s=>gt(i$(s)),validatePostcode:s=>gt(s$(s)),accountCreationInProgress:t,accountCreationFailed:n,onSubmit:s=>{r(new hn(4,[s])),r(new hn(5,[]))},onBack:s=>{r(new hn(4,[s])),r(new hn(1,[]))}})}function fi(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=(S,A)=>{for(S=String(S);S.length<A;)S=" "+S;return S};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*$,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 Sl(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const u_=(e,t)=>Math.abs(e-t)<1,d_=(e,t,n)=>{let r;return function(...s){e.clearTimeout(r),r=e.setTimeout(()=>t.apply(this,s),n)}},f_=e=>e,h_=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},m_=(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)}},Wh={passive:!0},p_=typeof window>"u"?!0:"onscrollend"in window,g_=(e,t)=>{const n=e.scrollElement;if(!n)return;const r=e.targetWindow;if(!r)return;let s=0;const i=p_?()=>{}:d_(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,Wh),n.addEventListener("scrollend",l,Wh),()=>{n.removeEventListener("scroll",a),n.removeEventListener("scrollend",l)}},$_=(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"])},w_=(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 y_{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:f_,rangeExtractor:h_,onChange:()=>{},measureElement:$_,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=fi(()=>[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=fi(()=>[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=P=>{const V=i(u),ne=this.elementsCache.get(V);if(!P){ne&&(this.observer.unobserve(ne),this.elementsCache.delete(V));return}ne!==P&&(ne&&this.observer.unobserve(ne),this.observer.observe(P),this.elementsCache.set(V,P)),P.isConnected&&this.resizeItem(u,this.options.measureElement(P,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),S=typeof w=="number"?w:this.options.estimateSize(u),A=$+S,E=p?p.lane:u%this.options.lanes;d[u]={index:u,start:$,size:S,end:A,key:h,lane:E,measureElement:m}}return this.measurementsCache=d,d},{key:!1,debug:()=>this.options.debug}),this.calculateRange=fi(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset()],(n,r,s)=>this.range=n.length>0&&r>0?b_({measurements:n,outerSize:r,scrollOffset:s}):null,{key:!1,debug:()=>this.options.debug}),this.getIndexes=fi(()=>[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=fi(()=>[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 Sl(r[Gh(0,r.length-1,s=>Sl(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]=Sl(this.getOffsetForIndex(n,a));u_(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 Gh=(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 b_({measurements:e,outerSize:t,scrollOffset:n}){const r=e.length-1,i=Gh(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 __=typeof document<"u"?Ln:Pe;function v_(e){const t=ls(()=>({}),{})[1],n={...e,onChange:(s,i)=>{var o;i?Ba(t):t(),(o=e.onChange)==null||o.call(e,s,i)}},[r]=et(()=>new y_(n));return r.setOptions(n),Pe(()=>r._didMount(),[]),__(()=>r._willUpdate()),r}function x_(e){return v_({observeElementRect:m_,observeElementOffset:g_,scrollToFn:w_,...e})}var C_=Object.defineProperty,S_=(e,t,n)=>t in e?C_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Al=(e,t,n)=>(S_(e,typeof t!="symbol"?t+"":t,n),n);let A_=class{constructor(){Al(this,"current",this.detect()),Al(this,"handoffState","pending"),Al(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"}},Vr=new A_,nt=(e,t)=>{Vr.isServer?Pe(e,t):Ln(e,t)};function An(e){let t=ge(e);return nt(()=>{t.current=e},[e]),t}function kl(e,t){let[n,r]=et(e),s=An(e);return nt(()=>r(s.current),[s,r,...t]),n}let ue=function(e){let t=An(e);return X.useCallback((...n)=>t.current(...n),[t])};function k_(e,t,n){let[r,s]=et(n),i=e!==void 0,o=ge(i),a=ge(!1),l=ge(!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,ue(c=>(i||s(c),t==null?void 0:t(c)))]}function E_(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function Lr(){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 E_(()=>{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=Lr();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 hi(){let[e]=et(Lr);return Pe(()=>()=>e.dispose(),[e]),e}function I_(){let e=typeof document>"u";return"useSyncExternalStore"in qa?(t=>t.useSyncExternalStore)(qa)(()=>()=>{},()=>!1,()=>!e):!1}function El(){let e=I_(),[t,n]=et(Vr.isHandoffComplete);return t&&Vr.isHandoffComplete===!1&&n(!1),Pe(()=>{t!==!0&&n(!0)},[t]),Pe(()=>Vr.handoff(),[]),e?!1:t}var qh;let mi=(qh=X.useId)!=null?qh:function(){let e=El(),[t,n]=X.useState(e?()=>Vr.nextId():null);return nt(()=>{t===null&&n(Vr.nextId())},[t]),t!=null?""+t:void 0};function _t(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,_t),r}function Il(e){return Vr.isServer?null:e instanceof Node?e.ownerDocument:e!=null&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}let Kh=["[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 N_=(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))(N_||{}),T_=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(T_||{}),R_=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(R_||{}),Zh=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(Zh||{});function M_(e,t=0){var n;return e===((n=Il(e))==null?void 0:n.body)?!1:_t(t,{0(){return e.matches(Kh)},1(){let r=e;for(;r!==null;){if(r.matches(Kh))return!0;r=r.parentElement}return!1}})}var P_=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(P_||{});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 D_(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 O_(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function F_(){return/Android/gi.test(window.navigator.userAgent)}function Jh(){return O_()||F_()}function go(e,t,n){let r=An(t);Pe(()=>{function s(i){r.current(i)}return document.addEventListener(e,s,n),()=>document.removeEventListener(e,s,n)},[e,n])}function V_(e,t,n){let r=An(t);Pe(()=>{function s(i){r.current(i)}return window.addEventListener(e,s,n),()=>window.removeEventListener(e,s,n)},[e,n])}function L_(e,t,n=!0){let r=ge(!1);Pe(()=>{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!M_(l,Zh.Loose)&&l.tabIndex!==-1&&o.preventDefault(),t(o,l)}let i=ge(null);go("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),go("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),go("click",o=>{Jh()||i.current&&(s(o,()=>i.current),i.current=null)},!0),go("touchend",o=>s(o,()=>o.target instanceof HTMLElement?o.target:null),!0),V_("blur",o=>s(o,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function B_(...e){return wt(()=>Il(...e),[...e])}function Yh(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 U_(e,t){let[n,r]=et(()=>Yh(e));return nt(()=>{r(Yh(e))},[e.type,e.as]),nt(()=>{n||t.current&&t.current instanceof HTMLButtonElement&&!t.current.hasAttribute("type")&&r("button")},[n,t]),n}let j_=Symbol();function Br(...e){let t=ge(e);Pe(()=>{t.current=e},[e]);let n=ue(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[j_]))?void 0:n}function Xh(e){return[e.screenX,e.screenY]}function z_(){let e=ge([-1,-1]);return{wasMoved(t){let n=Xh(t);return e.current[0]===n[0]&&e.current[1]===n[1]?!1:(e.current=n,!0)},update(t){e.current=Xh(t)}}}function H_({container:e,accept:t,walk:n,enabled:r=!0}){let s=ge(t),i=ge(n);Pe(()=>{s.current=t,i.current=n},[t,n]),nt(()=>{if(!e||!r)return;let o=Il(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 Qh(e,t){let n=ge([]),r=ue(e);Pe(()=>{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 $o(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}var wo=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(wo||{}),pr=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(pr||{});function Zn({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:s,visible:i=!0,name:o,mergeRefs:a}){a=a??W_;let l=em(t,e);if(i)return yo(l,n,r,o,a);let c=s??0;if(c&2){let{static:d=!1,...u}=l;if(d)return yo(u,n,r,o,a)}if(c&1){let{unmount:d=!0,...u}=l;return _t(d?0:1,{0(){return null},1(){return yo({...u,hidden:!0,style:{display:"none"}},n,r,o,a)}})}return yo(l,n,r,o,a)}function yo(e,t={},n,r,s){let{as:i=n,children:o,refName:a="ref",...l}=Tl(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===be&&Object.keys(Nl(l)).length>0){if(!us(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(`
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 kl(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const h_=(e,t)=>Math.abs(e-t)<1,m_=(e,t,n)=>{let r;return function(...s){e.clearTimeout(r),r=e.setTimeout(()=>t.apply(this,s),n)}},p_=e=>e,g_=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},$_=(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)}},qh={passive:!0},w_=typeof window>"u"?!0:"onscrollend"in window,y_=(e,t)=>{const n=e.scrollElement;if(!n)return;const r=e.targetWindow;if(!r)return;let s=0;const i=w_?()=>{}:m_(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,qh),n.addEventListener("scrollend",l,qh),()=>{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"])},__=(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 v_{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:p_,rangeExtractor:g_,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=fi(()=>[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=fi(()=>[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=P=>{const V=i(u),ne=this.elementsCache.get(V);if(!P){ne&&(this.observer.unobserve(ne),this.elementsCache.delete(V));return}ne!==P&&(ne&&this.observer.unobserve(ne),this.observer.observe(P),this.elementsCache.set(V,P)),P.isConnected&&this.resizeItem(u,this.options.measureElement(P,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),S=typeof w=="number"?w:this.options.estimateSize(u),A=$+S,E=p?p.lane:u%this.options.lanes;d[u]={index:u,start:$,size:S,end:A,key:h,lane:E,measureElement:m}}return this.measurementsCache=d,d},{key:!1,debug:()=>this.options.debug}),this.calculateRange=fi(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset()],(n,r,s)=>this.range=n.length>0&&r>0?x_({measurements:n,outerSize:r,scrollOffset:s}):null,{key:!1,debug:()=>this.options.debug}),this.getIndexes=fi(()=>[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=fi(()=>[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 kl(r[Kh(0,r.length-1,s=>kl(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]=kl(this.getOffsetForIndex(n,a));h_(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 Kh=(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 x_({measurements:e,outerSize:t,scrollOffset:n}){const r=e.length-1,i=Kh(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 C_=typeof document<"u"?Ln:Pe;function S_(e){const t=ls(()=>({}),{})[1],n={...e,onChange:(s,i)=>{var o;i?ja(t):t(),(o=e.onChange)==null||o.call(e,s,i)}},[r]=et(()=>new v_(n));return r.setOptions(n),Pe(()=>r._didMount(),[]),C_(()=>r._willUpdate()),r}function A_(e){return S_({observeElementRect:$_,observeElementOffset:y_,scrollToFn:__,...e})}var k_=Object.defineProperty,E_=(e,t,n)=>t in e?k_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,El=(e,t,n)=>(E_(e,typeof t!="symbol"?t+"":t,n),n);let I_=class{constructor(){El(this,"current",this.detect()),El(this,"handoffState","pending"),El(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"}},Vr=new I_,nt=(e,t)=>{Vr.isServer?Pe(e,t):Ln(e,t)};function An(e){let t=ge(e);return nt(()=>{t.current=e},[e]),t}function Il(e,t){let[n,r]=et(e),s=An(e);return nt(()=>r(s.current),[s,r,...t]),n}let ue=function(e){let t=An(e);return X.useCallback((...n)=>t.current(...n),[t])};function N_(e,t,n){let[r,s]=et(n),i=e!==void 0,o=ge(i),a=ge(!1),l=ge(!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,ue(c=>(i||s(c),t==null?void 0:t(c)))]}function T_(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function Lr(){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 T_(()=>{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=Lr();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 hi(){let[e]=et(Lr);return Pe(()=>()=>e.dispose(),[e]),e}function R_(){let e=typeof document>"u";return"useSyncExternalStore"in Za?(t=>t.useSyncExternalStore)(Za)(()=>()=>{},()=>!1,()=>!e):!1}function Nl(){let e=R_(),[t,n]=et(Vr.isHandoffComplete);return t&&Vr.isHandoffComplete===!1&&n(!1),Pe(()=>{t!==!0&&n(!0)},[t]),Pe(()=>Vr.handoff(),[]),e?!1:t}var Zh;let mi=(Zh=X.useId)!=null?Zh:function(){let e=Nl(),[t,n]=X.useState(e?()=>Vr.nextId():null);return nt(()=>{t===null&&n(Vr.nextId())},[t]),t!=null?""+t:void 0};function vt(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,vt),r}function Tl(e){return Vr.isServer?null:e instanceof Node?e.ownerDocument:e!=null&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}let Jh=["[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 M_=(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))(M_||{}),P_=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(P_||{}),D_=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(D_||{}),Yh=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(Yh||{});function O_(e,t=0){var n;return e===((n=Tl(e))==null?void 0:n.body)?!1:vt(t,{0(){return e.matches(Jh)},1(){let r=e;for(;r!==null;){if(r.matches(Jh))return!0;r=r.parentElement}return!1}})}var F_=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(F_||{});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 V_(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 L_(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function B_(){return/Android/gi.test(window.navigator.userAgent)}function Xh(){return L_()||B_()}function $o(e,t,n){let r=An(t);Pe(()=>{function s(i){r.current(i)}return document.addEventListener(e,s,n),()=>document.removeEventListener(e,s,n)},[e,n])}function U_(e,t,n){let r=An(t);Pe(()=>{function s(i){r.current(i)}return window.addEventListener(e,s,n),()=>window.removeEventListener(e,s,n)},[e,n])}function j_(e,t,n=!0){let r=ge(!1);Pe(()=>{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!O_(l,Yh.Loose)&&l.tabIndex!==-1&&o.preventDefault(),t(o,l)}let i=ge(null);$o("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),$o("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),$o("click",o=>{Xh()||i.current&&(s(o,()=>i.current),i.current=null)},!0),$o("touchend",o=>s(o,()=>o.target instanceof HTMLElement?o.target:null),!0),U_("blur",o=>s(o,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function z_(...e){return wt(()=>Tl(...e),[...e])}function Qh(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 H_(e,t){let[n,r]=et(()=>Qh(e));return nt(()=>{r(Qh(e))},[e.type,e.as]),nt(()=>{n||t.current&&t.current instanceof HTMLButtonElement&&!t.current.hasAttribute("type")&&r("button")},[n,t]),n}let W_=Symbol();function Br(...e){let t=ge(e);Pe(()=>{t.current=e},[e]);let n=ue(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[W_]))?void 0:n}function em(e){return[e.screenX,e.screenY]}function G_(){let e=ge([-1,-1]);return{wasMoved(t){let n=em(t);return e.current[0]===n[0]&&e.current[1]===n[1]?!1:(e.current=n,!0)},update(t){e.current=em(t)}}}function q_({container:e,accept:t,walk:n,enabled:r=!0}){let s=ge(t),i=ge(n);Pe(()=>{s.current=t,i.current=n},[t,n]),nt(()=>{if(!e||!r)return;let o=Tl(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 tm(e,t){let n=ge([]),r=ue(e);Pe(()=>{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 wo(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}var yo=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(yo||{}),pr=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(pr||{});function Zn({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:s,visible:i=!0,name:o,mergeRefs:a}){a=a??K_;let l=nm(t,e);if(i)return bo(l,n,r,o,a);let c=s??0;if(c&2){let{static:d=!1,...u}=l;if(d)return bo(u,n,r,o,a)}if(c&1){let{unmount:d=!0,...u}=l;return vt(d?0:1,{0(){return null},1(){return bo({...u,hidden:!0,style:{display:"none"}},n,r,o,a)}})}return bo(l,n,r,o,a)}function bo(e,t={},n,r,s){let{as:i=n,children:o,refName:a="ref",...l}=Ml(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===be&&Object.keys(Rl(l)).length>0){if(!us(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
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"?(...$)=>$o(m==null?void 0:m.className(...$),l.className):$o(m==null?void 0:m.className,l.className),p=h?{className:h}:{};return La(d,Object.assign({},em(d.props,Nl(Tl(l,["ref"]))),u,c,{ref:s(d.ref,c.ref)},p))}return f(i,Object.assign({},Tl(l,["ref"]),i!==be&&c,i!==be&&u),d)}function W_(...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 em(...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 kn(e){var t;return Object.assign(ar(e),{displayName:(t=e.displayName)!=null?t:e.name})}function Nl(e){let t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}function Tl(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}let G_="div";var tm=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(tm||{});function q_(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 Zn({ourProps:i,theirProps:s,slot:{},defaultTag:G_,name:"Hidden"})}let K_=kn(q_),Rl=ir(null);Rl.displayName="OpenClosedContext";var qt=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(qt||{});function Ml(){return vn(Rl)}function nm({value:e,children:t}){return X.createElement(Rl.Provider,{value:e},t)}function Z_(e){function t(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",t))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",t),t())}let Ur=[];Z_(()=>{function e(t){t.target instanceof HTMLElement&&t.target!==document.body&&Ur[0]!==t.target&&(Ur.unshift(t.target),Ur=Ur.filter(n=>n!=null&&n.isConnected),Ur.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 J_(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&&Y_(n)?!1:r}function Y_(e){if(!e)return!1;let t=e.previousElementSibling;for(;t!==null;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}function X_(e){throw new Error("Unexpected object: "+e)}var rt=(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))(rt||{});function rm(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:X_(e)}}function sm(e={},t=null,n=[]){for(let[r,s]of Object.entries(e))om(n,im(t,r),s);return n}function im(e,t){return e?e+"["+t+"]":t}function om(e,t,n){if(Array.isArray(n))for(let[r,s]of n.entries())om(e,im(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,""]):sm(n,t,e)}var Kt=(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))(Kt||{}),Q_={},ev=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(ev||{}),tv=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(tv||{}),nv=(e=>(e[e.Pointer=0]="Pointer",e[e.Focus=1]="Focus",e[e.Other=2]="Other",e))(nv||{}),rv=(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))(rv||{});function Pl(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):D_(r,o=>o.dataRef.current.domRef.current),i=n?s.indexOf(n):null;return i===-1&&(i=null),{options:s,activeOptionIndex:i}}let sv={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===rt.Specific?t.idx:rm(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=Pl(e);if(a.activeOptionIndex===null){let d=a.options.findIndex(u=>!u.dataRef.current.disabled);d!==-1&&(a.activeOptionIndex=d)}let l=t.focus===rt.Specific?t.idx:rm(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=Pl(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=Pl(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})}}},Dl=ir(null);Dl.displayName="ComboboxActionsContext";function pi(e){let t=vn(Dl);if(t===null){let n=new Error(`<${e} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,pi),n}return t}let am=ir(null);function iv(e){var t;let n=jr("VirtualProvider"),[r,s]=wt(()=>{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=x_({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]=et(0);return nt(()=>{a(l=>l+1)},[(t=n.virtual)==null?void 0:t.options]),X.createElement(am.Provider,{value:i},X.createElement("div",{style:{position:"relative",width:"100%",height:`${i.getTotalSize()}px`},ref:l=>{if(l){if(typeof process<"u"&&Q_.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 X.createElement(be,{key:l.key},X.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 Ol=ir(null);Ol.displayName="ComboboxDataContext";function jr(e){let t=vn(Ol);if(t===null){let n=new Error(`<${e} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,jr),n}return t}function ov(e,t){return _t(t.type,sv,e,t)}let av=be;function lv(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,[S=u?[]:void 0,A]=k_(n,s,r),[E,P]=ls(ov,{dataRef:Ca(),comboboxState:c?0:1,options:[],virtual:null,activeOptionIndex:null,activationTrigger:2,labelId:null}),V=ge(!1),ne=ge({static:!1,hold:!1}),we=ge(null),Ae=ge(null),he=ge(null),te=ge(null),de=ue(typeof a=="string"?(ce,Me)=>{let Ct=a;return(ce==null?void 0:ce[Ct])===(Me==null?void 0:Me[Ct])}:a??((ce,Me)=>ce===Me)),q=ue(ce=>E.options.findIndex(Me=>de(Me.dataRef.current.value,ce))),oe=or(ce=>_t(D.mode,{1:()=>S.some(Me=>de(Me,ce)),0:()=>de(S,ce)}),[S]),Oe=ue(ce=>E.activeOptionIndex===q(ce)),D=wt(()=>({...E,immediate:$,optionsPropsRef:ne,labelRef:we,inputRef:Ae,buttonRef:he,optionsRef:te,value:S,defaultValue:r,disabled:l,mode:u?1:0,virtual:E.virtual,get activeOptionIndex(){if(V.current&&E.activeOptionIndex===null&&E.options.length>0){let ce=E.options.findIndex(Me=>!Me.dataRef.current.disabled);if(ce!==-1)return ce}return E.activeOptionIndex},calculateIndex:q,compare:de,isSelected:oe,isActive:Oe,nullable:d,__demoMode:c}),[S,r,l,u,d,c,E,w]);nt(()=>{},[w,void 0]),nt(()=>{E.dataRef.current=D},[D]),L_([D.buttonRef,D.inputRef,D.optionsRef],()=>bi.closeCombobox(),D.comboboxState===0);let ke=wt(()=>{var ce,Me,Ct;return{open:D.comboboxState===0,disabled:l,activeIndex:D.activeOptionIndex,activeOption:D.activeOptionIndex===null?null:D.virtual?D.virtual.options[(ce=D.activeOptionIndex)!=null?ce:0]:(Ct=(Me=D.options[D.activeOptionIndex])==null?void 0:Me.dataRef.current.value)!=null?Ct:null,value:S}},[D,l,S]),me=ue(()=>{if(D.activeOptionIndex!==null){if(D.virtual)Gr(D.virtual.options[D.activeOptionIndex]);else{let{dataRef:ce}=D.options[D.activeOptionIndex];Gr(ce.current.value)}bi.goToOption(rt.Specific,D.activeOptionIndex)}}),it=ue(()=>{P({type:0}),V.current=!0}),Re=ue(()=>{P({type:1}),V.current=!1}),je=ue((ce,Me,Ct)=>(V.current=!1,ce===rt.Specific?P({type:2,focus:rt.Specific,idx:Me,trigger:Ct}):P({type:2,focus:ce,trigger:Ct}))),Ut=ue((ce,Me)=>(P({type:3,payload:{id:ce,dataRef:Me}}),()=>{D.isActive(Me.current.value)&&(V.current=!0),P({type:4,id:ce})})),wn=ue(ce=>(P({type:5,id:ce}),()=>P({type:5,id:null}))),Gr=ue(ce=>_t(D.mode,{0(){return A==null?void 0:A(ce)},1(){let Me=D.value.slice(),Ct=Me.findIndex(ks=>de(ks,ce));return Ct===-1?Me.push(ce):Me.splice(Ct,1),A==null?void 0:A(Me)}})),Zt=ue(ce=>{P({type:6,trigger:ce})}),bi=wt(()=>({onChange:Gr,registerOption:Ut,registerLabel:wn,goToOption:je,closeCombobox:Re,openCombobox:it,setActivationTrigger:Zt,selectActiveOption:me}),[]),_i=t===null?{}:{ref:t},qr=ge(null),vi=hi();return Pe(()=>{qr.current&&r!==void 0&&vi.addEventListener(qr.current,"reset",()=>{A==null||A(r)})},[qr,A]),X.createElement(Dl.Provider,{value:bi},X.createElement(Ol.Provider,{value:D},X.createElement(nm,{value:_t(D.comboboxState,{0:qt.Open,1:qt.Closed})},o!=null&&S!=null&&sm({[o]:S}).map(([ce,Me],Ct)=>X.createElement(K_,{features:tm.Hidden,ref:Ct===0?ks=>{var xi;qr.current=(xi=ks==null?void 0:ks.closest("form"))!=null?xi:null}:void 0,...Nl({key:ce,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:i,disabled:l,name:ce,value:Me})})),Zn({ourProps:_i,theirProps:p,slot:ke,defaultTag:av,name:"Combobox"}))))}let cv="input";function uv(e,t){var n,r,s,i,o;let a=mi(),{id:l=`headlessui-combobox-input-${a}`,onChange:c,displayValue:d,type:u="text",...m}=e,h=jr("Combobox.Input"),p=pi("Combobox.Input"),$=Br(h.inputRef,t),w=B_(h.inputRef),S=ge(!1),A=hi(),E=ue(()=>{p.onChange(null),h.optionsRef.current&&(h.optionsRef.current.scrollTop=0),p.goToOption(rt.Nothing)}),P=function(){var D;return typeof d=="function"&&h.value!==void 0?(D=d(h.value))!=null?D:"":typeof h.value=="string"?h.value:""}();Qh(([D,ke],[me,it])=>{if(S.current)return;let Re=h.inputRef.current;Re&&((it===0&&ke===1||D!==me)&&(Re.value=D),requestAnimationFrame(()=>{if(S.current||!Re||(w==null?void 0:w.activeElement)!==Re)return;let{selectionStart:je,selectionEnd:Ut}=Re;Math.abs((Ut??0)-(je??0))===0&&je===0&&Re.setSelectionRange(Re.value.length,Re.value.length)}))},[P,h.comboboxState,w]),Qh(([D],[ke])=>{if(D===0&&ke===1){if(S.current)return;let me=h.inputRef.current;if(!me)return;let it=me.value,{selectionStart:Re,selectionEnd:je,selectionDirection:Ut}=me;me.value="",me.value=it,Ut!==null?me.setSelectionRange(Re,je,Ut):me.setSelectionRange(Re,je)}},[h.comboboxState]);let V=ge(!1),ne=ue(()=>{V.current=!0}),we=ue(()=>{A.nextFrame(()=>{V.current=!1})}),Ae=ue(D=>{switch(S.current=!0,D.key){case Kt.Enter:if(S.current=!1,h.comboboxState!==0||V.current)return;if(D.preventDefault(),D.stopPropagation(),h.activeOptionIndex===null){p.closeCombobox();return}p.selectActiveOption(),h.mode===0&&p.closeCombobox();break;case Kt.ArrowDown:return S.current=!1,D.preventDefault(),D.stopPropagation(),_t(h.comboboxState,{0:()=>p.goToOption(rt.Next),1:()=>p.openCombobox()});case Kt.ArrowUp:return S.current=!1,D.preventDefault(),D.stopPropagation(),_t(h.comboboxState,{0:()=>p.goToOption(rt.Previous),1:()=>{p.openCombobox(),A.nextFrame(()=>{h.value||p.goToOption(rt.Last)})}});case Kt.Home:if(D.shiftKey)break;return S.current=!1,D.preventDefault(),D.stopPropagation(),p.goToOption(rt.First);case Kt.PageUp:return S.current=!1,D.preventDefault(),D.stopPropagation(),p.goToOption(rt.First);case Kt.End:if(D.shiftKey)break;return S.current=!1,D.preventDefault(),D.stopPropagation(),p.goToOption(rt.Last);case Kt.PageDown:return S.current=!1,D.preventDefault(),D.stopPropagation(),p.goToOption(rt.Last);case Kt.Escape:return S.current=!1,h.comboboxState!==0?void 0:(D.preventDefault(),h.optionsRef.current&&!h.optionsPropsRef.current.static&&D.stopPropagation(),h.nullable&&h.mode===0&&h.value===null&&E(),p.closeCombobox());case Kt.Tab:if(S.current=!1,h.comboboxState!==0)return;h.mode===0&&h.activationTrigger!==1&&p.selectActiveOption(),p.closeCombobox();break}}),he=ue(D=>{c==null||c(D),h.nullable&&h.mode===0&&D.target.value===""&&E(),p.openCombobox()}),te=ue(D=>{var ke,me,it;let Re=(ke=D.relatedTarget)!=null?ke:Ur.find(je=>je!==D.currentTarget);if(S.current=!1,!((me=h.optionsRef.current)!=null&&me.contains(Re))&&!((it=h.buttonRef.current)!=null&&it.contains(Re))&&h.comboboxState===0)return D.preventDefault(),h.mode===0&&(h.nullable&&h.value===null?E():h.activationTrigger!==1&&p.selectActiveOption()),p.closeCombobox()}),de=ue(D=>{var ke,me,it;let Re=(ke=D.relatedTarget)!=null?ke:Ur.find(je=>je!==D.currentTarget);(me=h.buttonRef.current)!=null&&me.contains(Re)||(it=h.optionsRef.current)!=null&&it.contains(Re)||h.disabled||h.immediate&&h.comboboxState!==0&&(p.openCombobox(),A.nextFrame(()=>{p.setActivationTrigger(1)}))}),q=kl(()=>{if(h.labelId)return[h.labelId].join(" ")},[h.labelId]),oe=wt(()=>({open:h.comboboxState===0,disabled:h.disabled}),[h]),Oe={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(D=>{var ke;return!((ke=h.virtual)!=null&&ke.disabled(D.dataRef.current.value))&&h.compare(D.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":q,"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:ne,onCompositionEnd:we,onKeyDown:Ae,onChange:he,onFocus:de,onBlur:te};return Zn({ourProps:Oe,theirProps:m,slot:oe,defaultTag:cv,name:"Combobox.Input"})}let dv="button";function fv(e,t){var n;let r=jr("Combobox.Button"),s=pi("Combobox.Button"),i=Br(r.buttonRef,t),o=mi(),{id:a=`headlessui-combobox-button-${o}`,...l}=e,c=hi(),d=ue($=>{switch($.key){case Kt.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 Kt.ArrowUp:return $.preventDefault(),$.stopPropagation(),r.comboboxState===1&&(s.openCombobox(),c.nextFrame(()=>{r.value||s.goToOption(rt.Last)})),c.nextFrame(()=>{var w;return(w=r.inputRef.current)==null?void 0:w.focus({preventScroll:!0})});case Kt.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=ue($=>{if(J_($.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=kl(()=>{if(r.labelId)return[r.labelId,a].join(" ")},[r.labelId,a]),h=wt(()=>({open:r.comboboxState===0,disabled:r.disabled,value:r.value}),[r]),p={ref:i,id:a,type:U_(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 Zn({ourProps:p,theirProps:l,slot:h,defaultTag:dv,name:"Combobox.Button"})}let hv="label";function mv(e,t){let n=mi(),{id:r=`headlessui-combobox-label-${n}`,...s}=e,i=jr("Combobox.Label"),o=pi("Combobox.Label"),a=Br(i.labelRef,t);nt(()=>o.registerLabel(r),[r]);let l=ue(()=>{var d;return(d=i.inputRef.current)==null?void 0:d.focus({preventScroll:!0})}),c=wt(()=>({open:i.comboboxState===0,disabled:i.disabled}),[i]);return Zn({ourProps:{ref:a,id:r,onClick:l},theirProps:s,slot:c,defaultTag:hv,name:"Combobox.Label"})}let pv="ul",gv=wo.RenderStrategy|wo.Static;function $v(e,t){let n=mi(),{id:r=`headlessui-combobox-options-${n}`,hold:s=!1,...i}=e,o=jr("Combobox.Options"),a=Br(o.optionsRef,t),l=Ml(),c=l!==null?(l&qt.Open)===qt.Open:o.comboboxState===0;nt(()=>{var h;o.optionsPropsRef.current.static=(h=e.static)!=null?h:!1},[o.optionsPropsRef,e.static]),nt(()=>{o.optionsPropsRef.current.hold=s},[o.optionsPropsRef,s]),H_({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=kl(()=>{var h,p;return(p=o.labelId)!=null?p:(h=o.buttonRef.current)==null?void 0:h.id},[o.labelId,o.buttonRef.current]),u=wt(()=>({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:X.createElement(iv,null,i.children)}),Zn({ourProps:m,theirProps:i,slot:u,defaultTag:pv,features:gv,visible:c,name:"Combobox.Options"})}let wv="li";function yv(e,t){var n;let r=mi(),{id:s=`headlessui-combobox-option-${r}`,disabled:i=!1,value:o,order:a=null,...l}=e,c=jr("Combobox.Option"),d=pi("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=ge(null),p=An({disabled:i,value:o,domRef:h,order:a}),$=vn(am),w=Br(t,h,$?$.measureElement:null),S=ue(()=>d.onChange(o));nt(()=>d.registerOption(s,p),[p,s]);let A=ge(!(c.virtual||c.__demoMode));nt(()=>{if(!c.virtual||!c.__demoMode)return;let te=Lr();return te.requestAnimationFrame(()=>{A.current=!0}),te.dispose},[c.virtual,c.__demoMode]),nt(()=>{if(!A.current||c.comboboxState!==0||!u||c.activationTrigger===0)return;let te=Lr();return te.requestAnimationFrame(()=>{var de,q;(q=(de=h.current)==null?void 0:de.scrollIntoView)==null||q.call(de,{block:"nearest"})}),te.dispose},[h,u,c.comboboxState,c.activationTrigger,c.activeOptionIndex]);let E=ue(te=>{var de;if(i||(de=c.virtual)!=null&&de.disabled(o))return te.preventDefault();S(),Jh()||requestAnimationFrame(()=>{var q;return(q=c.inputRef.current)==null?void 0:q.focus({preventScroll:!0})}),c.mode===0&&requestAnimationFrame(()=>d.closeCombobox())}),P=ue(()=>{var te;if(i||(te=c.virtual)!=null&&te.disabled(o))return d.goToOption(rt.Nothing);let de=c.calculateIndex(o);d.goToOption(rt.Specific,de)}),V=z_(),ne=ue(te=>V.update(te)),we=ue(te=>{var de;if(!V.wasMoved(te)||i||(de=c.virtual)!=null&&de.disabled(o)||u)return;let q=c.calculateIndex(o);d.goToOption(rt.Specific,q,0)}),Ae=ue(te=>{var de;V.wasMoved(te)&&(i||(de=c.virtual)!=null&&de.disabled(o)||u&&(c.optionsPropsRef.current.hold||d.goToOption(rt.Nothing)))}),he=wt(()=>({active:u,selected:m,disabled:i}),[u,m,i]);return Zn({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:P,onPointerEnter:ne,onMouseEnter:ne,onPointerMove:we,onMouseMove:we,onPointerLeave:Ae,onMouseLeave:Ae},theirProps:l,slot:he,defaultTag:wv,name:"Combobox.Option"})}let bv=kn(lv),_v=kn(fv),vv=kn(uv),xv=kn(mv),Cv=kn($v),Sv=kn(yv),gi=Object.assign(bv,{Input:vv,Button:_v,Label:xv,Options:Cv,Option:Sv});function Fl(){let e=ge(!1);return nt(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function Av(e=0){let[t,n]=et(e),r=Fl(),s=or(l=>{r.current&&n(c=>c|l)},[t,r]),i=or(l=>!!(t&l),[t]),o=or(l=>{r.current&&n(c=>c&~l)},[n,r]),a=or(l=>{r.current&&n(c=>c^l)},[n]);return{flags:t,addFlag:s,hasFlag:i,removeFlag:o,toggleFlag:a}}function kv(e){let t={called:!1};return(...n)=>{if(!t.called)return t.called=!0,e(...n)}}function Vl(e,...t){e&&t.length>0&&e.classList.add(...t)}function Ll(e,...t){e&&t.length>0&&e.classList.remove(...t)}function Ev(e,t){let n=Lr();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 Iv(e,t,n,r){let s=n?"enter":"leave",i=Lr(),o=r!==void 0?kv(r):()=>{};s==="enter"&&(e.removeAttribute("hidden"),e.style.display="");let a=_t(s,{enter:()=>t.enter,leave:()=>t.leave}),l=_t(s,{enter:()=>t.enterTo,leave:()=>t.leaveTo}),c=_t(s,{enter:()=>t.enterFrom,leave:()=>t.leaveFrom});return Ll(e,...t.base,...t.enter,...t.enterTo,...t.enterFrom,...t.leave,...t.leaveFrom,...t.leaveTo,...t.entered),Vl(e,...t.base,...a,...c),i.nextFrame(()=>{Ll(e,...t.base,...a,...c),Vl(e,...t.base,...a,...l),Ev(e,()=>(Ll(e,...t.base,...a),Vl(e,...t.base,...t.entered),o()))}),i.dispose}function Nv({immediate:e,container:t,direction:n,classes:r,onStart:s,onStop:i}){let o=Fl(),a=hi(),l=An(n);nt(()=>{e&&(l.current="enter")},[e]),nt(()=>{let c=Lr();a.add(c.dispose);let d=t.current;if(d&&l.current!=="idle"&&o.current)return c.dispose(),s.current(l.current),c.add(Iv(d,r.current,l.current==="enter",()=>{c.dispose(),i.current(l.current)})),c.dispose},[n])}function gr(e=""){return e.split(/\s+/).filter(t=>t.length>1)}let bo=ir(null);bo.displayName="TransitionContext";var Tv=(e=>(e.Visible="visible",e.Hidden="hidden",e))(Tv||{});function Rv(){let e=vn(bo);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}function Mv(){let e=vn(_o);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}let _o=ir(null);_o.displayName="NestingContext";function vo(e){return"children"in e?vo(e.children):e.current.filter(({el:t})=>t.current!==null).filter(({state:t})=>t==="visible").length>0}function lm(e,t){let n=An(e),r=ge([]),s=Fl(),i=hi(),o=ue((h,p=pr.Hidden)=>{let $=r.current.findIndex(({el:w})=>w===h);$!==-1&&(_t(p,{[pr.Unmount](){r.current.splice($,1)},[pr.Hidden](){r.current[$].state="hidden"}}),i.microTask(()=>{var w;!vo(r)&&s.current&&((w=n.current)==null||w.call(n))}))}),a=ue(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,pr.Unmount)}),l=ge([]),c=ge(Promise.resolve()),d=ge({enter:[],leave:[],idle:[]}),u=ue((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(([S,A])=>A)).then(()=>w())})]),p==="enter"?c.current=c.current.then(()=>t==null?void 0:t.wait.current).then(()=>$(p)):$(p)}),m=ue((h,p,$)=>{Promise.all(d.current[p].splice(0).map(([w,S])=>S)).then(()=>{var w;(w=l.current.shift())==null||w()}).then(()=>$(p))});return wt(()=>({children:r,register:a,unregister:o,onStart:u,onStop:m,wait:c,chains:d}),[a,o,r,u,m,d,c])}function Pv(){}let Dv=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function cm(e){var t;let n={};for(let r of Dv)n[r]=(t=e[r])!=null?t:Pv;return n}function Ov(e){let t=ge(cm(e));return Pe(()=>{t.current=cm(e)},[e]),t}let Fv="div",um=wo.RenderStrategy;function Vv(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=ge(null),S=Br(w,t),A=(n=$.unmount)==null||n?pr.Unmount:pr.Hidden,{show:E,appear:P,initial:V}=Rv(),[ne,we]=et(E?"visible":"hidden"),Ae=Mv(),{register:he,unregister:te}=Ae;Pe(()=>he(w),[he,w]),Pe(()=>{if(A===pr.Hidden&&w.current){if(E&&ne!=="visible"){we("visible");return}return _t(ne,{hidden:()=>te(w),visible:()=>he(w)})}},[ne,w,he,te,E,A]);let de=An({base:gr($.className),enter:gr(l),enterFrom:gr(c),enterTo:gr(d),entered:gr(u),leave:gr(m),leaveFrom:gr(h),leaveTo:gr(p)}),q=Ov({beforeEnter:s,afterEnter:i,beforeLeave:o,afterLeave:a}),oe=El();Pe(()=>{if(oe&&ne==="visible"&&w.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[w,ne,oe]);let Oe=V&&!P,D=P&&E&&V,ke=!oe||Oe?"idle":E?"enter":"leave",me=Av(0),it=ue(Zt=>_t(Zt,{enter:()=>{me.addFlag(qt.Opening),q.current.beforeEnter()},leave:()=>{me.addFlag(qt.Closing),q.current.beforeLeave()},idle:()=>{}})),Re=ue(Zt=>_t(Zt,{enter:()=>{me.removeFlag(qt.Opening),q.current.afterEnter()},leave:()=>{me.removeFlag(qt.Closing),q.current.afterLeave()},idle:()=>{}})),je=lm(()=>{we("hidden"),te(w)},Ae),Ut=ge(!1);Nv({immediate:D,container:w,classes:de,direction:ke,onStart:An(Zt=>{Ut.current=!0,je.onStart(w,Zt,it)}),onStop:An(Zt=>{Ut.current=!1,je.onStop(w,Zt,Re),Zt==="leave"&&!vo(je)&&(we("hidden"),te(w))})});let wn=$,Gr={ref:S};return D?wn={...wn,className:$o($.className,...de.current.enter,...de.current.enterFrom)}:Ut.current&&(wn.className=$o($.className,(r=w.current)==null?void 0:r.className),wn.className===""&&delete wn.className),X.createElement(_o.Provider,{value:je},X.createElement(nm,{value:_t(ne,{visible:qt.Open,hidden:qt.Closed})|me.flags},Zn({ourProps:Gr,theirProps:wn,defaultTag:Fv,features:um,visible:ne==="visible",name:"Transition.Child"})))}function Lv(e,t){let{show:n,appear:r=!1,unmount:s=!0,...i}=e,o=ge(null),a=Br(o,t);El();let l=Ml();if(n===void 0&&l!==null&&(n=(l&qt.Open)===qt.Open),![!0,!1].includes(n))throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[c,d]=et(n?"visible":"hidden"),u=lm(()=>{d("hidden")}),[m,h]=et(!0),p=ge([n]);nt(()=>{m!==!1&&p.current[p.current.length-1]!==n&&(p.current.push(n),h(!1))},[p,n]);let $=wt(()=>({show:n,appear:r,initial:m}),[n,r,m]);Pe(()=>{if(n)d("visible");else if(!vo(u))d("hidden");else{let E=o.current;if(!E)return;let P=E.getBoundingClientRect();P.x===0&&P.y===0&&P.width===0&&P.height===0&&d("hidden")}},[n,u]);let w={unmount:s},S=ue(()=>{var E;m&&h(!1),(E=e.beforeEnter)==null||E.call(e)}),A=ue(()=>{var E;m&&h(!1),(E=e.beforeLeave)==null||E.call(e)});return X.createElement(_o.Provider,{value:u},X.createElement(bo.Provider,{value:$},Zn({ourProps:{...w,as:be,children:X.createElement(dm,{ref:a,...w,...i,beforeEnter:S,beforeLeave:A})},theirProps:{},defaultTag:be,features:um,visible:c==="visible",name:"Transition"})))}function Bv(e,t){let n=vn(bo)!==null,r=Ml()!==null;return X.createElement(X.Fragment,null,!n&&r?X.createElement(Bl,{ref:t,...e}):X.createElement(dm,{ref:t,...e}))}let Bl=kn(Lv),dm=kn(Vv),Uv=kn(Bv),jv=Object.assign(Bl,{Child:Uv,Root:Bl});function zv({name:e,control:t,queryAnzsic:n}){const[r,s]=et(""),[i,o]=et([]),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([])}};Pe(()=>{const d=setTimeout(()=>{a()},500);return()=>clearTimeout(d)},[r]);const{field:l,fieldState:c}=Ih({name:e,control:t,rules:{required:!0}});return M("div",{children:M(gi,{onChange:l.onChange,value:l.value??null,name:l.name,children:[M(gi.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(gi.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(qy,{className:"pointer-events-none col-start-1 row-start-1 ml-3 self-center text-gray-400 size-4"})]}),i.length>0&&M(gi.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(be,{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(gi.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(Uy,{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 Hv({defaultValues:e,validateAccountName:t,validateLegalEntityName:n,validateAbn:r,validateSalesforceParentRecordId:s,validateWebsiteUrl:i,queryAnzsic:o,onSubmit:a,closeModal:l}){const{handleSubmit:c,control:d}=mo({mode:"onChange",defaultValues:e});return M(be,{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(bt,{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(bt,{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(bt,{label:"ABN",name:"Abn",control:d,validate:r,isNumber:!0}),M(bt,{label:"Salesforce parent RecordID",name:"SalesforceParentRecordId",control:d,validate:s})]}),M(bt,{label:"Website URL",name:"WebsiteUrl",control:d,placeholder:"https://acme.com.au",validate:i}),M(zv,{name:"Industry",control:d,queryAnzsic:o}),M(po,{primaryLabel:"Next",secondaryLabel:"Cancel",secondaryOnClick:l})]})]})}function Wv(e,t,n,r){return f(Hv,{defaultValues:e,validateAccountName:s=>gt(pa(s)),validateLegalEntityName:s=>gt(ku(s)),validateAbn:s=>gt(Eu(s)),validateSalesforceParentRecordId:s=>gt(s$(s)),validateWebsiteUrl:s=>gt($u(s)),queryAnzsic:t,onSubmit:s=>{r(new hn(2,[s])),r(new hn(0,[]))},closeModal:n})}function fm(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",_(y([["className","pt-4 mx-6"],(n=J(k(()=>t)),["children",b.Children.toArray(Array.from(n))])])));return f(fr,{onClose:e,child:(r=[f("div",{className:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity","aria-hidden":!0}),f("div",_(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:b.Children.toArray([i,o])})],["children",b.Children.toArray(Array.from(s))])])))],f(be,{},...r))})}function Gv(e,t){let n;const r=f("div",_(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",b.Children.toArray(Array.from(n))])])));return fm(e,J(k(()=>R(x(r),k(()=>t)))))}function qv(e){let t,n,r,s;return fm(e,[f("div",_(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:b.Children.toArray(Array.from(n))})),f("div",_(y([["className","flex justify-end"],(r=[f("button",_(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",b.Children.toArray(Array.from(r))])])))],["children",b.Children.toArray(Array.from(t))])])))])}function Kv(e){const t=e.closeModal,n=e.partnerId,r=Bn(xn),s=Pb(r.BackendUrl,r.AccessToken),i=Hn(()=>zn(()=>Vb,(l,c)=>Lb(n,s,l,c),(l,c)=>{}),void 0,void 0),o=i[0],a=i[1];return r.Roles.ProvisionAccounts?Gv(t,J(k(()=>{const l=o.CurrentView;return l.tag===1?x(o_(o.PrimaryContactForm,a)):l.tag===2?x(c_(o.BusinessAddressForm,Fb(o),Ob(o),a)):x(Wv(o.AccountDetailsForm,c=>s.QueryAnzsic(c),t,a))}))):qv(t)}function Zv(e){const t=e.partnerId,n=lr(!1),r=n[1],s=J(k(()=>{let i;return R(x(f("button",_(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",b.Children.toArray([Tb,"Add account"])]])))),k(()=>n[0]?x(f(Kv,{partnerId:t,closeModal:()=>{r(!1)}})):He()))}));return f(be,{},...s)}class Jv extends B{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["ColumnHeader"]}}function hm(e){return new Jv(e)}function mm(e){return e.fields[0]}class Yv extends B{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["RowCell"]}}function zr(e){return new Yv(e)}function pm(e){return e.fields[0]}function Xv(){return["scope","col"]}function $r(e){return hm(f("th",_(y([["className","px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"],Xv(),["children",e]]))))}function Qv(e,t){let n;return zr(f("td",_(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",b.Children.toArray(Array.from(n))])]))))}function xo(e,t){return zr(f("td",{className:re(" ",R(e,["px-6","py-4","whitespace-nowrap","text-sm"])),children:t}))}function ex(e,t){let n,r,s,i,o,a,l;return f("div",_(y([["className","flex flex-col mt-4"],(n=[f("div",_(y([["className","-my-2 overflow-x-auto sm:-mx-6 lg:-mx-8"],(r=[f("div",_(y([["className","py-2 align-middle inline-block min-w-full sm:px-6 lg:px-8"],(s=[f("div",_(y([["className","shadow overflow-hidden border-b border-gray-200 sm:rounded-lg"],(i=[f("table",_(y([["className","min-w-full divide-y divide-gray-200"],(o=[f("thead",{className:"bg-gray-50",children:(a=Ee(mm,e),f("tr",{children:b.Children.toArray(Array.from(a))}))}),(l=oa((c,d)=>(u=>{let m;return f("tr",_(y([["className",c%2===0?"bg-white":"bg-gray-50"],(m=Ee(pm,u),["children",b.Children.toArray(Array.from(m))])])))})(d),t),f("tbody",{children:b.Children.toArray(Array.from(l))}))],["children",b.Children.toArray(Array.from(o))])])))],["children",b.Children.toArray(Array.from(i))])])))],["children",b.Children.toArray(Array.from(s))])])))],["children",b.Children.toArray(Array.from(r))])])))],["children",b.Children.toArray(Array.from(n))])])))}function tx(e,t,n){return e?Ye(n,t):n}function gm(e,t,n,r){let s,i,o;return hm(f("th",_(y([["className",re(" ",["px-6","py-3","text-left","text-xs","font-medium","text-gray-500","sm:pl-6","uppercase","tracking-wider"])],["scope","col"],(s=[f("a",_(y([["className",re(" ",["group","inline-flex","cursor-pointer"])],["onClick",n],(i=[r,f("span",_(y([["className",re(" ",tx(!e,ee("invisible"),y(["ml-2","flex-none","rounded","text-gray-400","group-hover:visible","group-focus:visible"])))],(o=J(k(()=>x(t?Ib:Nb))),["children",b.Children.toArray(Array.from(o))])])))],["children",b.Children.toArray(Array.from(i))])])))],["children",b.Children.toArray(Array.from(s))])]))))}function nx(e,t){return gm(Se(Xd(e.Sort),new jn(1,[])),Se(Qd(e.Sort),new Mr(0,[])),n=>{t(new Dr(1,[ef(new jn(1,[]),e.Sort)]))},"Name")}function rx(e,t){return gm(Se(Xd(e.Sort),new jn(0,[])),Se(Qd(e.Sort),new Mr(0,[])),n=>{t(new Dr(1,[ef(new jn(0,[]),e.Sort)]))},"Id")}function sx(e,t){let n;return zr(f("td",_(y([["className",re(" ",["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",b.Children.toArray(Array.from(n))])]))))}function ix(e,t,n){let r;return zr(f("td",_(y([["className",re(" ",["text-gray-500","px-6","py-2","whitespace-nowrap","text-sm","align-top"])],(r=J(k(()=>{let s;return R(x(f("div",_(y([["className",re(" ",["font-medium"])],(s=[f("span",{children:[e]})],["children",b.Children.toArray(Array.from(s))])])))),k(()=>{let i;return R((i=t,i==null?x(ie()):x(f("span",{children:["Legal Entity: "+i]}))),k(()=>{const o=n;if(o==null)return x(ie());{const a=o;return R(x(f("br",{})),k(()=>x(f("span",{children:["ABN: "+a]}))))}}))}))})),["children",b.Children.toArray(Array.from(r))])]))))}function ox(e){return zr(f("td",{className:re(" ",["px-6","py-2","whitespace-nowrap","text-sm","text-gray-500","align-top"]),children:e}))}function ax(e){let t;return zr(f("td",_(y([["className","px-6 py-2 text-sm align-top"],(t=[f("span",{className:re(" ",J(k(()=>R(x("inline-flex items-center rounded-full px-2 py-1 font-medium inset-ring"),k(()=>e.tag===1?x("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"):x("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:Ru(e)})],["children",b.Children.toArray(Array.from(t))])]))))}function lx(e,t,n,r){let s;return zr(f("td",_(y([["className","px-6 py-2 whitespace-nowrap text-sm align-top"],(s=J(k(()=>R(x(f("a",{className:"text-indigo-600 hover:text-indigo-900",children:t,href:e})),k(()=>{let i,o;return R((i=r,i==null?x(ie()):(o=i,R(x(f("br",{})),k(()=>x(f("span",{children:[`Channel ID: ${o}`]})))))),k(()=>{const a=n;if(a==null)return x(ie());{const l=a;return R(x(f("br",{})),k(()=>x(f("span",{children:[`External ID: ${l}`]}))))}}))})))),["children",b.Children.toArray(Array.from(s))])]))))}function cx(e,t,n){const r=Ht(n.AccountId);return J(k(()=>{let s;return R(x(lx(Rr(Js((s=[e,r],new K(9,[s[0],s[1]])))),n.AccountId,n.ExternalId,n.ChannelId)),k(()=>R(x(ix(n.Name,n.BusinessName,n.BusinessNumber)),k(()=>R(x(ax(n.ProvisioningMode)),k(()=>R(t.ReadProtectedData?x(sx(We(n.Contact,""),We(n.ContactMobilePhone,""))):He(),k(()=>x(ox(n.Website))))))))))}))}class ux extends Y{constructor(t,n){super(),this.Data=t,this.LoadNext=n}}class $m extends B{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Resolved","InProgress"]}}class wm extends B{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Known","Unknown"]}}function dx(e){let t;return f("thead",{className:"bg-gray-50",children:(t=Ee(mm,e),f("tr",{children:b.Children.toArray(Array.from(t))}))})}function fx(e,t){let n;return f("tr",_(y([["className",e%2===0?"bg-white":"bg-gray-50"],(n=Ee(pm,t),["children",b.Children.toArray(Array.from(n))])])))}function hx(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,J(k(()=>R(x("Showing "),k(()=>R(x(f("span",{className:"font-medium",children:`${o}`})),k(()=>R(x(" to "),k(()=>R(x(f("span",{className:"font-medium",children:`${a}`})),k(()=>R(x(" of "),k(()=>r.tag===1?ee(" many"):y([f("span",{className:"font-medium",children:ot(r.fields[0])})," results"])))))))))))))):ee(ie()),p=J(k(()=>{let $,w;return R(($=i,$==null?x(ie()):(w=$,x(f("a",{className:re(" ",["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 S=s;if(S==null)return x(ie());{const A=S;return x(f("a",{className:re(" ",["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:A,children:" Next"}))}}))}));return f("tfoot",_(y([["className",re(" ",["w-full"])],(l=[f("tr",_(ee((c=[f("td",_(y([["colSpan",e],(d=[f("nav",_(y([["className",re(" ",["bg-white","px-4","py-3","flex","items-center","justify-between","border-t-1","border-gray-200","sm:px-6"])],(u=[f("div",_(y([["className",re(" ",["hidden","sm:block"])],(m=[f("p",{className:re(" ",["text-sm","text-gray-700"]),children:b.Children.toArray(Array.from(h))})],["children",b.Children.toArray(Array.from(m))])]))),f("div",{className:re(" ",["flex-1","flex","justify-between","sm:justify-end"]),children:b.Children.toArray(Array.from(p))})],["children",b.Children.toArray(Array.from(u))])])))],["children",b.Children.toArray(Array.from(d))])])))],["children",b.Children.toArray(Array.from(c))]))))],["children",b.Children.toArray(Array.from(l))])])))}function mx(e,t){const n=lr(1),r=n[1],s=n[0]|0;return[s,i=>{if(s===e){if(t!=null){const o=t;Ac(Xt("Calling Load")),o(),r(s+1)}}else r(s+1)},i=>{r(s-1)}]}function px(e){let t,n,r,s,i;const o=e.data,a=e.pageSize,l=e.renderRowCells,c=e.columnHeaders,d=u0(a,o.Data),u=mx(sn(d),o.LoadNext),m=u[0]|0,h=u[1];let p;const $=o0(m-1,d);p=$==null?new $m(1,[]):new $m(0,[$]);const w=sn(o.Data)|0,S=o.LoadNext==null?new wm(0,[w]):new wm(1,[]),A=p.tag===1?void 0:w>=1?(m-1)*a+1:void 0,E=p.tag===1?void 0:w>=1?(m-1)*a+sn(p.fields[0]):void 0,P=m===1?void 0:u[2],V=m===sn(d)?o.LoadNext!=null?h:void 0:m<sn(d)?h:void 0;return f("div",_(y([["className","flex flex-col mt-4"],(t=[f("div",_(y([["className","-my-2 overflow-x-auto sm:-mx-6 lg:-mx-8"],(n=[f("div",_(y([["className","py-2 align-middle inline-block min-w-full sm:px-6 lg:px-8"],(r=[f("div",_(y([["className","shadow overflow-hidden border-b border-gray-200 sm:rounded-lg"],(s=[f("table",_(y([["className","min-w-full divide-y divide-gray-200"],(i=J(k(()=>R(x(dx(c)),k(()=>{let ne,we;return R((ne=p,ne.tag===1?x(ie()):x((we=oa(fx,l(ne.fields[0])),f("tbody",{children:b.Children.toArray(Array.from(we))})))),k(()=>x(hx(sn(c),A,E,S,V,P))))})))),["children",b.Children.toArray(Array.from(i))])])))],["children",b.Children.toArray(Array.from(s))])])))],["children",b.Children.toArray(Array.from(r))])])))],["children",b.Children.toArray(Array.from(n))])])))],["children",b.Children.toArray(Array.from(t))])])))}function Jn(e){const t=e.error,n=ee(f("span",{children:[t]}));return f("div",{children:b.Children.toArray(Array.from(n))})}function Co(){const e=ee(f("span",{children:["Please wait..."]}));return f("div",{children:b.Children.toArray(Array.from(e))})}function gx(e){let t,n,r,s,i,o;const a=Bn(xn),l=vb({accessToken:a.AccessToken,backendUrl:a.BackendUrl,partnerId:e.partnerId}),c=Hn(()=>zn(Sb,(E,P)=>Ab(l,E,P),(E,P)=>{}),void 0,void 0),d=c[0],u=c[1],m=new Xa(d.SearchText,d.Sort,d.PageSize);Ka((t=[()=>Cb(l,m),E=>{u(new Dr(2,[E]))}],Gd(t[0],t[1])));const h=E=>{u(new Dr(4,[]))},p=d.Data;let $,w,S,A;switch(p.tag){case 0:case 1:{$=2;break}case 3:{$=3,A=p.fields[0];break}default:p.fields[0].tag===1?($=1,S=p.fields[0].fields[0]):($=0,w=p.fields[0].fields[0])}switch($){case 0:{const E=y([f("div",_(y([["className",re(" ",["flex","justify-between","items-end","pt-2","sm:-mr-6","lg:mr-0"])],(n=J(k(()=>{let P;return R(x(f("div",_(y([["className",re(" ",["flex","flex-row","gap-4","sm:-mr-6","lg:mr-0","w-[560px]"])],(P=[gh(nf(d.SearchText),"Account ID, Name, Legal Entity, Channel ID or External ID",V=>{u(new Dr(0,[V]))},h),kb(h)],["children",b.Children.toArray(Array.from(P))])])))),k(()=>e.accountProvisioningMode.tag===0?x(ie()):x(f(Zv,{partnerId:e.partnerId}))))})),["children",b.Children.toArray(Array.from(n))])]))),(r=w,s=J(k(()=>R(x(rx(d,u)),k(()=>R(x(nx(d,u)),k(()=>R(x($r("Provisioning")),k(()=>R(a.Roles.ReadProtectedData?x($r("Contact")):He(),k(()=>x($r("Website")))))))))))),i=new ux(r.Accounts,Ge(P=>()=>{ds(xb(l)(m)(P)(u))},r.Token)),o=rf(d.PageSize)|0,f(px,{columnHeaders:s,renderRowCells:P=>St(V=>cx(e.partnerId,a.Roles,V),P),pageSize:o,data:i}))]);return f("div",{children:b.Children.toArray(Array.from(E))})}case 1:return f(Jn,{error:S});case 2:return f(Co,null);default:{const E=ot(A);return f(Jn,{error:E})}}}let So=class extends B{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["backend-url","access-token","partner-id","account-id"]}};function ym(e){const t=e.accessToken,n=e.backendUrl,r=e.accountId,s=e.partnerId,i=ns(o=>o,[new So(1,[t]),new So(0,[n]),new So(2,[Mt(s)]),Ge(o=>new So(3,[an(o)]),r)]);return f("superhero-super-configuration",rr(i,1))}let Ao=class extends B{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["backend-url","access-token","partner-id","account-id"]}};function bm(e){const t=e.accessToken,n=e.backendUrl,r=e.accountId,s=e.partnerId,i=ns(o=>o,[new Ao(1,[t]),new Ao(0,[n]),new Ao(2,[Mt(s)]),Ge(o=>new Ao(3,[an(o)]),r)]);return f("superhero-benefits-onboarding-configuration",rr(i,1))}let ko=class extends B{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["backend-url","access-token","partner-id","account-id"]}};function _m(e){const t=e.accessToken,n=e.backendUrl,r=e.accountId,s=e.partnerId,i=ns(o=>o,[new ko(1,[t]),new ko(0,[n]),new ko(2,[Mt(s)]),Ge(o=>new ko(3,[an(o)]),r)]);return f("superhero-bank-details",rr(i,1))}let Eo=class extends B{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["backend-url","access-token","partner-id","account-id"]}};function vm(e){const t=e.accessToken,n=e.backendUrl,r=e.accountId,s=e.partnerId,i=ns(o=>o,[new Eo(1,[t]),new Eo(0,[n]),new Eo(2,[Mt(s)]),Ge(o=>new Eo(3,[an(o)]),r)]);return f("superhero-profile-directory-app",rr(i,1))}let $i=class extends B{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["backend-url","access-token","partner-id","account-id","account-provisioning-mode"]}};function xm(e){const t=e.accountProvisioningMode,n=e.accountId,r=e.partnerId,s=e.accessToken,i=e.backendUrl,o=ns(a=>a,[new $i(1,[s]),new $i(0,[i]),new $i(2,[Mt(r)]),Ge(a=>new $i(3,[an(a)]),n),Ge(a=>new $i(4,[a]),t)]);return f("workspace-account-registry-app",rr(o,1))}const Hr=e=>({tag:"ok",value:e}),wi=e=>({tag:"error",error:e});class Nt{constructor(t){this.uri=t}static isAbsoluteUri(t){try{return new URL(t),!0}catch{return!1}}static tryCreateWithKind(t,n){switch(n){case 1:return Nt.isAbsoluteUri(t)?Hr(new Nt({original:t,value:new URL(t),kind:n})):wi("Invalid URI: The format of the URI could not be determined.");case 2:return Nt.isAbsoluteUri(t)?wi("URI is not a relative path."):Hr(new Nt({original:t,value:t,kind:n}));case 0:return Nt.isAbsoluteUri(t)?Hr(new Nt({original:t,value:new URL(t),kind:1})):Hr(new Nt({original:t,value:t,kind:2}));default:return n}}static tryCreateWithBase(t,n){return t.uri.kind!==1?wi("Base URI should have Absolute kind"):typeof n=="string"?Hr(new Nt({original:new URL(n,t.uri.value).toString(),value:new URL(n,t.uri.value),kind:1})):n.uri.kind===2?Hr(new Nt({original:new URL(n.uri.value,t.uri.value).toString(),value:new URL(n.uri.value,t.uri.value),kind:1})):Hr(t)}static tryCreateImpl(t,n=1){return typeof t=="string"?typeof n!="number"?wi("Kind must be specified when the baseUri is a string."):Nt.tryCreateWithKind(t,n):typeof n=="number"?wi("Kind should not be specified when the baseUri is an absolute Uri."):Nt.tryCreateWithBase(t,n)}static create(t,n=1){const r=Nt.tryCreateImpl(t,n);switch(r.tag){case"ok":return r.value;case"error":throw new Error(r.error);default:return r}}static tryCreate(t,n=1,r){const s=Nt.tryCreateImpl(t,n);switch(s.tag){case"ok":return r.contents=s.value,!0;case"error":return!1;default:return s}}toString(){switch(this.uri.kind){case 1:return decodeURIComponent(this.asUrl().toString());case 2:return this.uri.value;default:return this.uri}}asUrl(){switch(this.uri.kind){case 1:return this.uri.value;case 2:throw new Error("This operation is not supported for a relative URI.");default:return this.uri}}get isAbsoluteUri(){return this.uri.kind===1}get absoluteUri(){return this.asUrl().href}get scheme(){const t=this.asUrl().protocol;return t.slice(0,t.length-1)}get host(){return this.asUrl().host}get absolutePath(){return this.asUrl().pathname}get query(){return this.asUrl().search}get pathAndQuery(){const t=this.asUrl();return t.pathname+t.search}get fragment(){return this.asUrl().hash}get originalString(){return this.uri.original}}function $x(e,t){return k(()=>{const n=new sw([],t);return k0(r=>wg(r,n),e)})}function wx(e,t){return J($x(e,t))}function yx(e,t){return yn(e)?ut(["Issuer","Issuer is required"],t):t}function bx(e,t){let n,r;switch(e!=null?yn(e)?n=1:(n=0,r=e):n=1,n){case 0:{let s,i=ie();s=[Nt.tryCreate(r,1,new at(()=>i,a=>{i=a})),i];let o;switch(s[0]&&s[1].scheme==="https"?o=0:o=1,o){case 0:return t;default:return ut(["OpenIdConfigUrl","OpenIdConfigUrl must be a valid URL."],t)}}default:return t}}function _x(e,t){let n;const r=St(o=>o.Key,e),s=St(o=>o.Value,e),i=Lc(yn,r)||Lc(yn,s)||(n=Bi(o=>!yn(o),St(o=>o.trim().toLowerCase(),r)),sn(wx(n,{Equals:(o,a)=>o===a,GetHashCode:Qn}))!==sn(n))?"Claims must have unique keys with valid key-value pairs":void 0;return i==null?t:ut(["RequiredClaims",i],t)}class en extends B{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["NoOp","Save","Cancel"]}}let wr=class extends B{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["SetIssuer","SetOpenIdConfigUrl","AddClaim","UpdateClaimKey","UpdateClaimValue","RemoveClaim","ClickSave","ClickCancel"]}};function vx(e,t){let n,r,s,i,o,a;switch(e.tag){case 1:{const l=e.fields[0];return[new fn((n=t.Config,new dr(n.Issuer,yn(l)?void 0:l,n.RequiredClaims)),t.IsSaving,t.ValidationErrors),W(),new en(0,[])]}case 2:return[new fn((r=t.Config,new dr(r.Issuer,r.OpenIdConfigUrl,Ye(t.Config.RequiredClaims,ee(new si("",""))))),t.IsSaving,t.ValidationErrors),W(),new en(0,[])];case 3:{const l=e.fields[0]|0,c=t.Config.RequiredClaims;return l>=0&&l<sn(c)?[new fn((s=t.Config,new dr(s.Issuer,s.OpenIdConfigUrl,Fs((d,u)=>d===l?new si(e.fields[1],u.Value):u,c))),t.IsSaving,t.ValidationErrors),W(),new en(0,[])]:[t,W(),new en(0,[])]}case 4:{const l=e.fields[0]|0,c=t.Config.RequiredClaims;return l>=0&&l<sn(c)?[new fn((i=t.Config,new dr(i.Issuer,i.OpenIdConfigUrl,Fs((d,u)=>d===l?new si(u.Key,e.fields[1]):u,c))),t.IsSaving,t.ValidationErrors),W(),new en(0,[])]:[t,W(),new en(0,[])]}case 5:{const l=e.fields[0]|0,c=t.Config.RequiredClaims;return l>=0&&l<sn(c)?[new fn((o=t.Config,new dr(o.Issuer,o.OpenIdConfigUrl,St(d=>d[1],Bi(d=>d[0]!==l,Fs((d,u)=>[d,u],c))))),t.IsSaving,t.ValidationErrors),W(),new en(0,[])]:[t,W(),new en(0,[])]}case 6:{const l=_x(t.Config.RequiredClaims,bx(t.Config.OpenIdConfigUrl,yx(t.Config.Issuer,Ve())));return Z(l)?[t,W(),new en(1,[t.Config])]:[new fn(t.Config,t.IsSaving,iu(l,{Compare:Rn})),W(),new en(0,[])]}case 7:return[t,W(),new en(2,[])];default:return[new fn((a=t.Config,new dr(e.fields[0],a.OpenIdConfigUrl,a.RequiredClaims)),t.IsSaving,t.ValidationErrors),W(),new en(0,[])]}}function Cm(e,t,n,r,s){let i;return f("div",_(y([["className","flex flex-col gap-2"],(i=J(k(()=>R(x(f("label",{className:"text-sm font-medium text-gray-900",children:e})),k(()=>R(x(f("input",{className:re(" ",J(k(()=>R(x("px-3 py-2 border rounded-md text-sm"),k(()=>s!=null?x("border-red-500"):x("border-gray-300")))))),type:"text",value:t,placeholder:n,onChange:o=>{r(o.target.value)}})),k(()=>{const o=s;return o==null?x(ie()):x(f("div",{className:"text-sm text-red-600",children:o}))})))))),["children",b.Children.toArray(Array.from(i))])])))}function xx(e,t,n){let r;return f("div",_(y([["className","flex gap-2 items-center"],(r=[f("input",{className:"flex-1 px-3 py-2 border border-gray-300 rounded-md text-sm",type:"text",value:t.Key,placeholder:"Claim key",onChange:s=>{n(new wr(3,[e,s.target.value]))}}),f("input",{className:"flex-1 px-3 py-2 border border-gray-300 rounded-md text-sm",type:"text",value:t.Value,placeholder:"Claim value",onChange:s=>{n(new wr(4,[e,s.target.value]))}}),f("button",{className:"text-gray-400 hover:text-gray-600",onClick:s=>{n(new wr(5,[e]))},children:b.Children.toArray(["×"])})],["children",b.Children.toArray(Array.from(r))])])))}function Cx(e,t){let n,r,s,i;return f("div",_(y([["className","flex flex-col gap-6 max-w-4xl pr-4 sm:pr-6"],(n=[Cm("Issuer",e.Config.Issuer,"https://example.com",o=>{t(new wr(0,[o]))},Bs("Issuer",e.ValidationErrors)),Cm("OpenID Config URL (optional)",We(e.Config.OpenIdConfigUrl,""),"https://example.com/.well-known/openid-configuration",o=>{t(new wr(1,[o]))},Bs("OpenIdConfigUrl",e.ValidationErrors)),f("div",_(y([["className","flex flex-col gap-3"],(r=J(k(()=>{let o;return R(x(f("div",_(y([["className","flex justify-between items-center"],(o=[f("label",{className:"text-sm font-medium text-gray-900",children:"Required Claims"}),f("button",{className:"text-blue-700 text-sm font-medium flex items-center gap-1",onClick:a=>{t(new wr(2,[]))},children:b.Children.toArray(["+ Add Claim"])})],["children",b.Children.toArray(Array.from(o))])])))),k(()=>{let a;return R(x(f("div",_(y([["className","flex flex-col gap-2"],(a=J(k(()=>Gc(l=>x(xx(l[0],l[1],t)),r0(e.Config.RequiredClaims)))),["children",b.Children.toArray(Array.from(a))])])))),k(()=>{const l=Bs("RequiredClaims",e.ValidationErrors);return l==null?x(ie()):x(f("div",{className:"text-sm text-red-600",children:l}))}))}))})),["children",b.Children.toArray(Array.from(r))])]))),f("hr",{className:"border-t border-gray-200"}),f("div",_(y([["className","flex gap-3 justify-end"],(s=[f("button",{className:"px-4 py-2 border border-gray-300 text-gray-700 rounded-md text-sm font-medium",onClick:o=>{t(new wr(7,[]))},children:"Cancel"}),f("button",_(y([(i="px-4 py-2 bg-blue-700 text-white rounded-md text-sm font-medium disabled:bg-gray-300 disabled:cursor-not-allowed",["className",i]),["disabled",e.IsSaving],["onClick",o=>{t(new wr(6,[]))}],["children","Save Configuration"]])))],["children",b.Children.toArray(Array.from(s))])])))],["children",b.Children.toArray(Array.from(n))])])))}function Sx(e,t){let n;return f("div",_(y([["className","flex flex-col gap-1"],(n=[f("label",{className:"text-sm font-medium text-gray-700",children:e}),f("div",{className:"px-3 py-2 bg-gray-50 border border-gray-200 rounded-md text-sm text-gray-900",children:t})],["children",b.Children.toArray(Array.from(n))])])))}function Ax(e){let t;return f("div",_(y([["className","flex gap-2 items-center"],(t=[f("div",{className:"flex-1 px-3 py-2 bg-gray-50 border border-gray-200 rounded-md text-sm text-gray-900",children:e.Key}),f("div",{className:"flex-1 px-3 py-2 bg-gray-50 border border-gray-200 rounded-md text-sm text-gray-900",children:e.Value})],["children",b.Children.toArray(Array.from(t))])])))}function kx(e,t,n){let r,s,i,o,a,l;const c=St(d=>new si(d[0],d[1]),ou(e.RequiredClaims));return f("div",_(y([["className","flex flex-col gap-6 max-w-4xl pr-4 sm:pr-6"],(r=[f("div",_(y([["className","inline-flex items-start justify-start gap-3 rounded-md bg-blue-50 p-4"],(s=[f("div",_(y([["className","inline-flex flex-1 flex-col items-start justify-start gap-2"],(i=[f("div",{className:"justify-start self-stretch text-sm font-medium leading-5 text-blue-800",children:"Advanced security is enabled"})],["children",b.Children.toArray(Array.from(i))])])))],["children",b.Children.toArray(Array.from(s))])]))),Sx("Issuer",e.Issuer),f("div",_(y([["className","flex flex-col gap-1"],(o=J(k(()=>R(x(f("label",{className:"text-sm font-medium text-gray-700",children:"OpenID Config URL (optional)"})),k(()=>{const d=e.OpenIdConfigUrl;return d==null?x(f("div",{className:"px-3 py-2 bg-gray-50 border border-gray-200 rounded-md text-sm text-gray-400 italic",children:"Not set"})):x(f("div",{className:"px-3 py-2 bg-gray-50 border border-gray-200 rounded-md text-sm text-gray-900",children:d}))})))),["children",b.Children.toArray(Array.from(o))])]))),f("div",_(y([["className","flex flex-col gap-3"],(a=J(k(()=>R(x(f("label",{className:"text-sm font-medium text-gray-700",children:"Required Claims"})),k(()=>{let d;return Z(c)?x(f("div",{className:"px-3 py-2 bg-gray-50 border border-gray-200 rounded-md text-sm text-gray-400 italic",children:"No claims configured"})):R(x(f("div",_(y([["className","flex gap-2 items-center"],(d=[f("div",{className:"flex-1 text-xs font-medium text-gray-500 uppercase tracking-wider px-3 py-1",children:"Claim Key"}),f("div",{className:"flex-1 text-xs font-medium text-gray-500 uppercase tracking-wider px-3 py-1",children:"Claim Value"})],["children",b.Children.toArray(Array.from(d))])])))),k(()=>{let u;return x(f("div",_(y([["className","flex flex-col gap-2"],(u=J(k(()=>Ee(Ax,c))),["children",b.Children.toArray(Array.from(u))])]))))}))})))),["children",b.Children.toArray(Array.from(a))])]))),f("hr",{className:"border-t border-gray-200"}),f("div",_(y([["className","flex gap-3 justify-end"],(l=J(k(()=>{let d,u;return R((d=t,d==null?x(ie()):(u=d,x(f("button",{className:"px-4 py-2 border border-gray-300 text-gray-700 rounded-md text-sm font-medium hover:bg-gray-50",onClick:m=>{u()},children:"Edit"})))),k(()=>{const m=n;if(m==null)return x(ie());{const h=m;return x(f("button",{className:"px-4 py-2 border border-red-300 text-red-700 rounded-md text-sm font-medium hover:bg-red-50",onClick:p=>{h()},children:"Disable"}))}}))})),["children",b.Children.toArray(Array.from(l))])])))],["children",b.Children.toArray(Array.from(r))])])))}function Ex(e){let t;return f("div",_(y([["className","flex flex-col gap-4"],(t=J(k(()=>{let n,r;return R(x(f("div",_(y([["className","inline-flex items-start justify-start gap-3 self-stretch rounded-md bg-amber-50 p-4"],(n=[f("div",_(y([["className","inline-flex flex-1 flex-col items-start justify-start gap-2"],(r=J(k(()=>R(x(f("div",{className:"justify-start self-stretch text-sm font-medium leading-5 text-amber-800",children:"Advanced security is not currently configured"})),k(()=>R(x(f("div",{className:"justify-start self-stretch text-sm font-normal leading-5 text-amber-700",children:"Configure advanced security to enable OAuth 2 authentication for the Partner and External API."})),k(()=>e!=null?x(ie()):x(f("div",{className:"justify-start self-stretch text-sm font-normal leading-5 text-amber-700",children:"The permission AccountRegistry.ConfigureSecurity is required to configure advanced security."})))))))),["children",b.Children.toArray(Array.from(r))])])))],["children",b.Children.toArray(Array.from(n))])])))),k(()=>{const s=e;if(s!=null){const i=s;return x(f("button",{className:"px-4 py-2 bg-blue-700 text-white rounded-md text-sm font-medium shadow-sm max-w-xs",children:"Configure advanced security",onClick:o=>{i()}}))}else return x(ie())}))})),["children",b.Children.toArray(Array.from(t))])])))}function Ix(e){let t,n;return f("button",_(y([(t="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",t]),["onClick",r=>{e()}],(n=[f("div",{className:"justify-start text-gray-700 text-sm font-medium leading-tight",children:"Cancel"})],["children",b.Children.toArray(Array.from(n))])])))}function Nx(e,t){let n,r;return f("button",_(y([(n="min-h-[34px] px-[13px] py-[9px] bg-[#2563EB] rounded-md flex justify-center items-center gap-2 overflow-hidden",["className",n]),["onClick",s=>{e()}],["disabled",t],(r=J(k(()=>R(x(f("div",{className:"justify-start text-white text-sm font-medium leading-none",children:"Save configuration"})),k(()=>t?x(f("span",{className:"animate-spin",children:b.Children.toArray([oi])})):He())))),["children",b.Children.toArray(Array.from(r))])])))}function Tx(e,t,n){let r,s,i,o,a,l,c,d,u;return f(fr,{onClose:e,child:(r=[f("div",{className:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity","aria-hidden":!0}),f("div",_(y([["className","fixed inset-0 z-10 w-screen overflow-y-auto h-full flex items-center justify-center"],["onClick",m=>{e()}],(s=[f("div",_(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",m=>{m.preventDefault(),m.stopPropagation()}],(o=[f("div",_(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:b.Children.toArray([ii])})],["children",b.Children.toArray(Array.from(a))])]))),f("div",_(y([["className","flex-1 inline-flex flex-col justify-start items-start gap-4"],(l=[f("div",_(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:"Save advanced security configuration?"}),f("div",_(y([["className","self-stretch justify-start"],(d=[f("div",{className:"text-gray-700 text-sm font-normal leading-5",children:b.Children.toArray(["Saving this configuration will enable OAuth 2 authentication for the Partner and External API."])}),f("div",{className:"text-red-700 text-sm font-bold leading-5 mt-2",children:"Warning: Incorrect settings or missing valid tokens will disrupt all partner communications."}),f("div",{className:"text-gray-700 text-sm font-normal leading-5 mt-2",children:"Ensure your partner is configured to provide valid authentication tokens before proceeding."})],["children",b.Children.toArray(Array.from(d))])])))],["children",b.Children.toArray(Array.from(c))])]))),f("div",_(y([["className","self-stretch inline-flex justify-end items-center gap-3"],(u=[Ix(e),Nx(t,n)],["children",b.Children.toArray(Array.from(u))])])))],["children",b.Children.toArray(Array.from(l))])])))],["children",b.Children.toArray(Array.from(o))])])))],["children",b.Children.toArray(Array.from(s))])])))],f(be,{},...r))})}function Rx(e){let t,n;return f("button",_(y([(t="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",t]),["onClick",r=>{e()}],(n=[f("div",{className:"justify-start text-gray-700 text-sm font-medium leading-tight",children:"Cancel"})],["children",b.Children.toArray(Array.from(n))])])))}function Mx(e,t){let n,r;return f("button",_(y([(n="min-h-[34px] px-[13px] py-[9px] bg-red-600 rounded-md flex justify-center items-center gap-2 overflow-hidden",["className",n]),["onClick",s=>{e()}],["disabled",t],(r=J(k(()=>R(x(f("div",{className:"justify-start text-white text-sm font-medium leading-none",children:"Disable configuration"})),k(()=>t?x(f("span",{className:"animate-spin",children:b.Children.toArray([oi])})):He())))),["children",b.Children.toArray(Array.from(r))])])))}function Px(e,t,n){let r,s,i,o,a,l,c,d,u,m,h;return f(fr,{onClose:e,child:(r=[f("div",{className:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity","aria-hidden":!0}),f("div",_(y([["className","fixed inset-0 z-10 w-screen overflow-y-auto h-full flex items-center justify-center"],["onClick",p=>{e()}],(s=[f("div",_(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",p=>{p.preventDefault(),p.stopPropagation()}],(o=[f("div",_(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:b.Children.toArray([ii])})],["children",b.Children.toArray(Array.from(a))])]))),f("div",_(y([["className","flex-1 inline-flex flex-col justify-start items-start gap-4"],(l=[f("div",_(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:"Disable advanced security configuration?"}),f("div",_(y([["className","self-stretch justify-start"],(d=[f("div",_(y([["className","text-gray-700 text-sm font-normal leading-5"],(u=[(m="OAuth 2 authentication will be disabled for the Partner and External API. This will remove advanced security requirements for API access.",m)],["children",b.Children.toArray(Array.from(u))])]))),f("div",{className:"text-gray-700 text-sm font-bold leading-5 mt-2",children:"This will remove all advanced security configuration."})],["children",b.Children.toArray(Array.from(d))])])))],["children",b.Children.toArray(Array.from(c))])]))),f("div",_(y([["className","self-stretch inline-flex justify-end items-center gap-3"],(h=[Rx(e),Mx(t,n)],["children",b.Children.toArray(Array.from(h))])])))],["children",b.Children.toArray(Array.from(l))])])))],["children",b.Children.toArray(Array.from(o))])])))],["children",b.Children.toArray(Array.from(s))])])))],f(be,{},...r))})}class pn extends B{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["NoModal","ConfirmDisable","ConfirmEnable"]}}class gn extends B{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Loading","LoadError","SaveError","Viewing","Editing"]}}let Tt=class extends Y{constructor(t,n,r,s,i){super(),this.PartnerId=t,this.InitialConfig=n,this.CanEdit=r,this.Page=s,this.Modal=i}},Bt=class extends B{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["StartEdit","CancelEdit","EditingViewMsg","ShowEnableModal","ConfirmEnable","Save","SaveCompleted","ShowDisableModal","CloseModal","ConfirmDisable","DisableCompleted"]}};function Dx(e,t,n){return[new Tt(e,t,n.ConfigureSecurity,new gn(3,[t]),new pn(0,[])),W()]}function Ox(e,t,n,r){switch(n.tag){case 8:return[new Tt(r.PartnerId,r.InitialConfig,r.CanEdit,r.Page,new pn(0,[])),W()];case 9:return[new Tt(r.PartnerId,r.InitialConfig,r.CanEdit,r.Page,new pn(1,[!0])),cr(s=>{ur(s)},t,void 0,s=>new Bt(10,[s]))];case 10:return n.fields[0].tag===1?[new Tt(r.PartnerId,r.InitialConfig,r.CanEdit,new gn(2,[n.fields[0].fields[0]]),new pn(0,[])),W()]:[new Tt(r.PartnerId,n.fields[0].fields[0],r.CanEdit,new gn(3,[n.fields[0].fields[0]]),new pn(0,[])),W()];case 0:{const s=r.Page;return s.tag===3?[new Tt(r.PartnerId,r.InitialConfig,r.CanEdit,new gn(4,[yb(s.fields[0])]),r.Modal),W()]:[r,W()]}case 1:return r.Page.tag===4?[new Tt(r.PartnerId,r.InitialConfig,r.CanEdit,new gn(3,[r.InitialConfig]),r.Modal),W()]:[r,W()];case 2:{const s=r.Page;if(s.tag===4){const i=vx(n.fields[0],s.fields[0]),o=i[0],a=i[2],l=i[1];switch(a.tag){case 1:return[new Tt(r.PartnerId,r.InitialConfig,r.CanEdit,new gn(4,[o]),r.Modal),E1(y([Kd(c=>new Bt(2,[c]),l),ee(c=>{c(new Bt(3,[]))})]))];case 2:return[r,ee(c=>{c(new Bt(1,[]))})];default:return[new Tt(r.PartnerId,r.InitialConfig,r.CanEdit,new gn(4,[o]),r.Modal),Kd(c=>new Bt(2,[c]),l)]}}else return[r,W()]}case 3:return[new Tt(r.PartnerId,r.InitialConfig,r.CanEdit,r.Page,new pn(2,[!1])),W()];case 4:{const s=r.Page;if(s.tag===4){const i=s.fields[0];return[new Tt(r.PartnerId,r.InitialConfig,r.CanEdit,new gn(4,[new fn(i.Config,!0,i.ValidationErrors)]),new pn(2,[!0])),ee(o=>{o(new Bt(5,[]))})]}else return[r,W()]}case 5:{const s=r.Page;if(s.tag===4){const i=s.fields[0];return[r,cr(o=>{ur(o)},e,new Lu(i.Config.Issuer,i.Config.OpenIdConfigUrl,iu(St(o=>[o.Key,o.Value],i.Config.RequiredClaims),{Compare:Rn})),o=>new Bt(6,[o]))]}else return[r,W()]}case 6:if(n.fields[0].tag===1){const s=r.Page;if(s.tag===4){const i=s.fields[0];return[new Tt(r.PartnerId,r.InitialConfig,r.CanEdit,new gn(4,[new fn(i.Config,!1,i.ValidationErrors)]),new pn(0,[])),W()]}else return[new Tt(r.PartnerId,r.InitialConfig,r.CanEdit,new gn(2,[n.fields[0].fields[0]]),new pn(0,[])),W()]}else return[new Tt(r.PartnerId,n.fields[0].fields[0],r.CanEdit,new gn(3,[n.fields[0].fields[0]]),new pn(0,[])),W()];default:return[new Tt(r.PartnerId,r.InitialConfig,r.CanEdit,r.Page,new pn(1,[!1])),W()]}}function Fx(e){const t=e.disableAdvancedSecurity,n=e.saveAdvancedSecurity,r=e.roles,s=e.config,i=e.partnerId;let o;const a=Dx(i,s,r);o=Hn(()=>zn(()=>a,($,w)=>Ox(n,t,$,w),($,w)=>{}),void 0,void 0);const l=o[0],c=o[1],d=l.CanEdit?()=>{c(new Bt(0,[]))}:void 0,u=l.CanEdit?()=>{c(new Bt(7,[]))}:void 0,m=f("div",{className:"justify-start self-stretch text-xl leading-normal font-semibold text-gray-900",children:"Advanced Security Configuration"}),h=f("div",{className:"justify-start self-stretch text-sm font-normal text-gray-700",children:"Configure advanced security settings for OAuth 2 authentication."}),p=J(k(()=>{let $;return R(x(f("div",_(y([["className","mx-auto max-w-7xl m-6 gap-4 flex flex-col"],($=J(k(()=>R(x(f("div",{className:"flex flex-col gap-2",children:b.Children.toArray([m,h])})),k(()=>{const w=l.Page;let S,A,E,P;switch(w.tag){case 4:{S=2,E=w.fields[0];break}case 0:{S=3;break}case 1:{S=4,P=w.fields[0];break}case 2:{S=4,P=w.fields[0];break}default:w.fields[0].tag===1?S=1:(S=0,A=w.fields[0].fields[0])}switch(S){case 0:return x(kx(A,d,u));case 1:return x(Ex(d));case 2:return x(Cx(E,V=>{c(new Bt(2,[V]))}));case 3:return x(f("div",{className:"text-gray-500",children:"Loading..."}));default:return x(f("div",{className:"text-red-600",children:`Error: ${P}`}))}})))),["children",b.Children.toArray(Array.from($))])])))),k(()=>{const w=l.Modal;return w.tag===2?x(Tx(()=>{c(new Bt(8,[]))},()=>{c(new Bt(4,[]))},w.fields[0])):w.tag===0?x(ie()):x(Px(()=>{c(new Bt(8,[]))},()=>{c(new Bt(9,[]))},w.fields[0]))}))}));return f(be,{},...p)}let Ul=class extends Y{constructor(t,n){super(),this.Roles=t,this.LoadingStatus=n}};class jl extends B{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Loading","Loaded","Failed"]}}let Sm=class extends B{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Initialise","ConfigLoaded"]}};function Vx(e,t){return[new Ul(e,new jl(0,[])),ee(n=>{n(new Sm(0,[]))})]}function Lx(e,t,n){return t.tag===1?t.fields[0].tag===1?[new Ul(n.Roles,new jl(2,[t.fields[0].fields[0]])),W()]:[new Ul(n.Roles,new jl(1,[t.fields[0].fields[0]])),W()]:[n,cr(r=>{ur(r)},e,void 0,r=>new Sm(1,[r]))]}function zl(e){let t;return f("div",_(y([["className","mx-auto max-w-7xl"],(t=[f("div",{className:"mx-auto max-w-3xl",children:b.Children.toArray([e])})],["children",b.Children.toArray(Array.from(t))])])))}function Bx(e){const t=e.disableSecurityConfig,n=e.saveSecurityConfig,r=e.loadSecurityConfig,s=e.roles,i=e.partnerId,o=Hn(()=>zn(()=>Vx(s),(a,l)=>Lx(r,a,l),(a,l)=>{}),void 0,void 0)[0].LoadingStatus;switch(o.tag){case 1:return zl(f(Fx,{partnerId:i,config:o.fields[0],roles:s,saveAdvancedSecurity:n,disableAdvancedSecurity:t}));case 2:return zl(f("div",{children:b.Children.toArray(["We are unable to load the Security config at this time."])}));default:return zl(f("div",{children:b.Children.toArray(["Loading security configuration..."])}))}}let Yn=class extends B{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Key","Appear","Show","ClassName","Enter","EnterFrom","EnterTo","Leave","LeaveFrom","LeaveTo","Children"]}};function Ux(e){const t=rr(e,1);return f(jv,t)}function Io(e,t){let n;return f("div",_(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),ie())],["children",b.Children.toArray(Array.from(n))])])))}function st(e,t){let n;return f("div",_(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",b.Children.toArray(Array.from(n))])])))}function Hl(e){let t,n;const r=e.value,s=e.label,i=lr(!1),o=i[0],a=i[1];return s1(()=>{ds(I.Delay(()=>o?I.Bind(Ya(2e3),()=>(a(!1),I.Zero())):I.Zero()))}),f("div",_(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",_(y([["className","flex mt-1 text-sm leading-6 text-primary-700 sm:col-span-2 sm:mt-0 relative"],(n=[Ux(y([new Yn(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 Yn(2,[o]),new Yn(4,["transition-opacity ease-in duration-100"]),new Yn(5,["opacity-0"]),new Yn(6,["opacity-90"]),new Yn(7,["transition-opacity ease-out duration-500"]),new Yn(8,["opacity-90"]),new Yn(9,["opacity-0"]),new Yn(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",b.Children.toArray(Array.from(n))]),["onClick",l=>{navigator.clipboard.writeText(r),a(!0)}]])))],["children",b.Children.toArray(Array.from(t))])])))}function No(e,t){let n;const r=y([e,f("div",_(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:b.Children.toArray(Array.from(t))})],["children",b.Children.toArray(Array.from(n))])])))]);return f("div",{children:b.Children.toArray(Array.from(r))})}function jx(e){const t=Bn(xn);return No(Io("Partner Information",void 0),J(k(()=>{let n;return R(x((n=["ID",is(e.StreamId)],f(Hl,{label:n[0],value:n[1]}))),k(()=>{let r;return R(x((r=["Name",Zi(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(x((o=["Contact",`${bu(i.FirstName)} ${vu(i.LastName)}`],st(o[0],o[1]))),k(()=>{let a;return x((a=["Phone",Su(i.MobilePhone)],st(a[0],a[1])))}))):He()):He(),k(()=>{let a;return R(x((a=["Website",wu(e.Website)],st(a[0],a[1]))),k(()=>{let l;return x((l=["Notes",We(Jg(e.Notes),"")],st(l[0],l[1])))}))}))}))}))})))}let yr=class extends B{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Details","AccountList","SuperConfiguration","BenefitsOnboardingConfiguration","BankDetailsConfiguration","ProfileDirectory","Workspace","Security"]}};class zx extends Y{constructor(t,n,r){super(),this.PartnerId=t,this.BackendUrl=n,this.AccessToken=r}}class Hx extends Y{constructor(t,n,r){super(),this.PartnerId=t,this.BackendUrl=n,this.AccessToken=r}}class Wx extends Y{constructor(t,n,r){super(),this.PartnerId=t,this.BackendUrl=n,this.AccessToken=r}}class Gx extends Y{constructor(t,n,r){super(),this.PartnerId=t,this.BackendUrl=n,this.AccessToken=r}}class qx extends Y{constructor(t,n,r){super(),this.PartnerId=t,this.BackendUrl=n,this.AccessToken=r}}class Kx extends Y{constructor(t,n,r){super(),this.PartnerId=t,this.BackendUrl=n,this.AccessToken=r}}function Zx(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";case 7:return"Security";default:return"Details"}}function Jx(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;case 7:return e.fields[0].PartnerId;default:return Le(is(e.fields[0].StreamId))}}function Yx(e){const t=St(n=>fh(Zx(e),n[0],Rr(Js(n[1](Jx(e))))),y([["Details",n=>new K(1,[n])],["Accounts",n=>new K(3,[n])],["Super",n=>new K(4,[n])],["Benefits",n=>new K(5,[n])],["Bank Details",n=>new K(6,[n])],["Directory",n=>new K(2,[n])],["Security",n=>new K(8,[n])]]));return f(hh,{headers:t})}const Wl=e=>I.Bind(e,t=>{let n;const r=t;return n=r.tag===1?new g(1,[r.fields[0]]):new g(0,[$b(r.fields[0])]),I.Return(n)});function Xx(e,t){switch(t.tag){case 1:return f(gx,t.fields[0]);case 2:return f(ym,{partnerId:t.fields[0].PartnerId,backendUrl:t.fields[0].BackendUrl,accessToken:t.fields[0].AccessToken});case 3:return f(bm,{partnerId:t.fields[0].PartnerId,backendUrl:t.fields[0].BackendUrl,accessToken:t.fields[0].AccessToken});case 4:return f(_m,{partnerId:t.fields[0].PartnerId,backendUrl:t.fields[0].BackendUrl,accessToken:t.fields[0].AccessToken});case 5:return f(vm,{partnerId:t.fields[0].PartnerId,backendUrl:t.fields[0].BackendUrl,accessToken:t.fields[0].AccessToken});case 6:return f(xm,{backendUrl:t.fields[0].BackendUrl,accessToken:t.fields[0].AccessToken,partnerId:t.fields[0].PartnerId});case 7:{const n=t.fields[0].PartnerId,r=t.fields[0].BackendUrl,s=t.fields[0].AccessToken;return f(Bx,{partnerId:n,roles:e,loadSecurityConfig:()=>Wl(Py(r,s,n)),saveSecurityConfig:i=>Wl(Dy(r,s,n,i)),disableSecurityConfig:()=>Wl(Oy(r,s,n))})}default:return f(jx,t.fields[0])}}function Am(e){let t,n;const r=e.mode,s=Bn(xn);return f("div",_(y([["className","flex flex-row"],(t=[Yx(r),f("div",_(y([["className","w-full"],(n=[Xx(s.Roles,r)],["children",b.Children.toArray(Array.from(n))])])))],["children",b.Children.toArray(Array.from(t))])])))}let To=class extends B{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["backend-url","access-token","partner-id","account-id"]}};function Qx(e){const t=e.accessToken,n=e.backendUrl,r=e.accountId,s=e.partnerId,i=k(()=>R(x(new To(1,[t])),k(()=>R(x(new To(0,[n])),k(()=>R(x(new To(2,[Gi(s)])),k(()=>x(new To(3,[qi(r)])))))))));return f("superhero-import-app",rr(i,1))}class Gl extends B{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["backend-url","access-token","account-id"]}}function eC(e){const t=e.accessToken,n=e.backendUrl,r=e.accountId,s=k(()=>R(x(new Gl(1,[t])),k(()=>R(x(new Gl(0,[n])),k(()=>x(new Gl(2,[qi(r)])))))));return f("superhero-salpac-profile-admin",rr(s,1))}class tC extends B{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["RedirectionOff","RedirectionOn","Complete"]}}function Ro(){return zo("AccountRegistry.AdminUI.FlareIdentityService.MigrationStateDto",[],tC,()=>[[["lastUpdated",$e(Ti("System.DateTime"))]],[["lastUpdated",Ti("System.DateTime")]],[["lastUpdated",Ti("System.DateTime")]]])}function Mo(e){return`${e}/flare-identity/admin`}const nC=5,rC=1e3;function km(e,t,n,r){return I.Delay(()=>{const s=io(dl(rn(Xt("Bearer %s"))(n)),r);return I.Bind(fl(s),i=>{let o,a;const l=i,c=l.statusCode|0;return o=c|0,o>=200&&o<=299?I.Return(l):(a=c|0,(a===429?!0:a>=500)&&e>=1?I.Bind(Ya(t),()=>I.ReturnFrom(km(e-1,t,n,r))):I.Return(l))})})}const Po=e=>t=>km(nC,rC,e,t);function sC(e,t,n,r){return I.Delay(()=>{let s;const i=Po(t)(Ft(new kt(0,[]),Et(`${Mo(e)}/accounts/${n}/migration`)));return s=I.Bind(i,o=>I.Return(new g(0,[o]))),I.Bind(s,o=>{const a=o;if(a.tag===1)return I.Return(new g(1,[a.fields[0]]));{const l=a.fields[0];if(l.statusCode===200){const c=Dt(pe(Ot(Ro(),new qe(1,[]))),l.responseText);return I.Return(c)}else return I.Return(new g(1,["Unexpected response from flare identity backend"]))}})})}function iC(e,t,n,r){return I.Delay(()=>{let s;const i=Po(t)(Ft(new kt(2,[]),Et(`${Mo(e)}/accounts/${n}/migration/start`)));return s=I.Bind(i,o=>I.Return(new g(0,[o]))),I.Bind(s,o=>{const a=o;if(a.tag===1)return I.Return(new g(1,[a.fields[0]]));{const l=a.fields[0];if(l.statusCode===200){let c;const d=Dt(pe(Ot(Ro(),new qe(1,[]))),l.responseText);return c=I.Return(d),I.Bind(c,u=>{const m=u;if(m.tag===1)return I.Return(new g(1,[m.fields[0]]));{const h=m.fields[0];return h.tag===1?I.Return(new g(0,[h.fields[0]])):I.Return(new g(1,["Unexpected migration state after starting migration"]))}})}else return I.Return(new g(1,["Unexpected response from flare identity backend"]))}})})}function oC(e,t,n,r){return I.Delay(()=>{let s;const i=Po(t)(Ft(new kt(2,[]),Et(`${Mo(e)}/accounts/${n}/migration/rollback`)));return s=I.Bind(i,o=>I.Return(new g(0,[o]))),I.Bind(s,o=>{const a=o;if(a.tag===1)return I.Return(new g(1,[a.fields[0]]));{const l=a.fields[0];if(l.statusCode===200){let c;const d=Dt(pe(Ot(Ro(),new qe(1,[]))),l.responseText);return c=I.Return(d),I.Bind(c,u=>{const m=u;return m.tag===1?I.Return(new g(1,[m.fields[0]])):m.fields[0].tag===0?I.Return(new g(0,[void 0])):I.Return(new g(1,["Unexpected migration state after rolling back migration"]))})}else return I.Return(new g(1,["Unexpected response from flare identity backend"]))}})})}function aC(e,t,n,r){return I.Delay(()=>{let s;const i=Po(t)(Ft(new kt(2,[]),Et(`${Mo(e)}/accounts/${n}/migration/stop`)));return s=I.Bind(i,o=>I.Return(new g(0,[o]))),I.Bind(s,o=>{const a=o;if(a.tag===1)return I.Return(new g(1,[a.fields[0]]));{const l=a.fields[0];if(l.statusCode===200){let c;const d=Dt(pe(Ot(Ro(),new qe(1,[]))),l.responseText);return c=I.Return(d),I.Bind(c,u=>{const m=u;if(m.tag===1)return I.Return(new g(1,[m.fields[0]]));{const h=m.fields[0];return h.tag===2?I.Return(new g(0,[h.fields[0]])):I.Return(new g(1,["Unexpected migration state after stopping migration"]))}})}else return I.Return(new g(1,["Unexpected response from flare identity backend"]))}})})}class Wr extends B{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["RedirectionOff","RedirectionOn","Complete","Failed"]}}class _s extends B{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["ConfirmStartRedirection","ConfirmRollbackRedirection","ConfirmStopMigration"]}}function ql(e){switch(e.tag){case 1:return new _s(1,[!0]);case 2:return new _s(2,[!0]);default:return new _s(0,[!0])}}class En extends Y{constructor(t,n){super(),this.Status=t,this.CurrentModal=n}}let $n=class extends B{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["ShowModal","HideModal","RequestStartRedirection","RedirectionStarted","RequestRollbackRedirection","RedirectionRolledBack","RequestStopMigration","MigrationStopped","OperationFailed"]}};function lC(e,t){return[new En(e,void 0),W()]}function cC(e,t,n,r,s){switch(r.tag){case 1:return[new En(s.Status,void 0),W()];case 2:return[new En(s.Status,Ge(ql,s.CurrentModal)),ps(e,void 0,i=>new $n(3,[i]),i=>new $n(8,[i]))];case 3:return[new En(new Wr(1,[r.fields[0]]),void 0),W()];case 4:return[new En(s.Status,Ge(ql,s.CurrentModal)),ps(t,void 0,()=>new $n(5,[void 0]),i=>new $n(8,[i]))];case 5:return[new En(new Wr(0,[]),void 0),W()];case 6:return[new En(s.Status,Ge(ql,s.CurrentModal)),ps(n,void 0,i=>new $n(7,[i]),i=>new $n(8,[i]))];case 7:return[new En(new Wr(2,[r.fields[0]]),void 0),W()];case 8:return[new En(new Wr(3,[r.fields[0]]),void 0),W()];default:return[new En(s.Status,r.fields[0]),W()]}}function uC(e,t,n){let r,s,i,o,a,l,c,d,u,m,h,p,$,w;return f(fr,{onClose:e,child:(r=[f("div",{className:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity","aria-hidden":!0}),f("div",_(y([["className","fixed inset-0 z-10 w-screen overflow-y-auto h-full flex items-center justify-center"],["onClick",S=>{e()}],(s=[f("div",_(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",S=>{S.preventDefault(),S.stopPropagation()}],(o=[f("div",_(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:b.Children.toArray([ii])})],["children",b.Children.toArray(Array.from(a))])]))),f("div",_(y([["className","flex-1 inline-flex flex-col justify-start items-start gap-4"],(l=[f("div",_(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",_(y([["className","self-stretch justify-start"],(d=[f("div",{className:"text-gray-700 text-sm font-normal leading-5",children:b.Children.toArray(["Employees will be able to log into HRIS again."])})],["children",b.Children.toArray(Array.from(d))])])))],["children",b.Children.toArray(Array.from(c))])]))),f("div",_(y([["className","self-stretch inline-flex justify-end items-center gap-3"],(u=[f("button",_(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:S=>{e()}})],["children",b.Children.toArray(Array.from(h))])]))),f("div",_(y([["className","flex justify-start items-start gap-2"],(p=[f("button",_(y([($="min-h-[34px] px-[13px] py-[9px] bg-[#2563EB] rounded-md flex justify-center items-center overflow-hidden",["className",$]),(w=J(k(()=>R(x(f("div",{className:"justify-start text-white text-sm font-medium leading-none",children:"Turn off redirection",onClick:S=>{t()}})),k(()=>n?x(f("span",{className:"animate-spin",children:b.Children.toArray([oi])})):He())))),["children",b.Children.toArray(Array.from(w))])])))],["children",b.Children.toArray(Array.from(p))])])))],["children",b.Children.toArray(Array.from(u))])])))],["children",b.Children.toArray(Array.from(l))])])))],["children",b.Children.toArray(Array.from(o))])])))],["children",b.Children.toArray(Array.from(s))])])))],f(be,{},...r))})}function dC(e,t,n){let r,s,i,o,a,l,c,d,u,m,h,p,$,w,S,A;return f(fr,{onClose:e,child:(r=[f("div",{className:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity","aria-hidden":!0}),f("div",_(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",_(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",_(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:b.Children.toArray([ii])})],["children",b.Children.toArray(Array.from(a))])]))),f("div",_(y([["className","flex-1 inline-flex flex-col justify-start items-start gap-4"],(l=[f("div",_(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",_(y([["className","self-stretch justify-start"],(d=[f("div",_(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",b.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",b.Children.toArray(Array.from(d))])])))],["children",b.Children.toArray(Array.from(c))])]))),f("div",_(y([["className","self-stretch inline-flex justify-end items-center gap-3"],(h=[f("button",_(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",b.Children.toArray(Array.from($))])]))),f("div",_(y([["className","flex justify-start items-start gap-2"],(w=[f("button",_(y([(S="min-h-[34px] px-[13px] py-[9px] bg-[#2563EB] rounded-md flex justify-center items-center overflow-hidden",["className",S]),(A=J(k(()=>R(x(f("div",{className:"justify-start text-white text-sm font-medium leading-none",children:"Finalise redirection",onClick:E=>{t()}})),k(()=>n?x(f("span",{className:"animate-spin",children:b.Children.toArray([oi])})):He())))),["children",b.Children.toArray(Array.from(A))])])))],["children",b.Children.toArray(Array.from(w))])])))],["children",b.Children.toArray(Array.from(h))])])))],["children",b.Children.toArray(Array.from(l))])])))],["children",b.Children.toArray(Array.from(o))])])))],["children",b.Children.toArray(Array.from(s))])])))],f(be,{},...r))})}function fC(e,t,n){let r,s,i,o,a,l,c,d,u,m,h,p,$,w,S,A;return f(fr,{onClose:e,child:(r=[f("div",{className:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity","aria-hidden":!0}),f("div",_(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",_(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",_(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:b.Children.toArray([ii])})],["children",b.Children.toArray(Array.from(a))])]))),f("div",_(y([["className","flex-1 inline-flex flex-col justify-start items-start gap-4"],(l=[f("div",_(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",_(y([["className","self-stretch justify-start"],(d=[f("div",_(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",b.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",b.Children.toArray(Array.from(d))])])))],["children",b.Children.toArray(Array.from(c))])]))),f("div",_(y([["className","self-stretch inline-flex justify-end items-center gap-3"],(h=[f("button",_(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",b.Children.toArray(Array.from($))])]))),f("div",_(y([["className","flex justify-start items-start gap-2"],(w=[f("button",_(y([(S="min-h-[34px] px-[13px] py-[9px] bg-[#2563EB] rounded-md flex justify-center items-center overflow-hidden",["className",S]),(A=J(k(()=>R(x(f("div",{className:"justify-start text-white text-sm font-medium leading-none",children:"Turn on redirection",onClick:E=>{t()}})),k(()=>n?x(f("span",{className:"animate-spin",children:b.Children.toArray([oi])})):He())))),["children",b.Children.toArray(Array.from(A))])])))],["children",b.Children.toArray(Array.from(w))])])))],["children",b.Children.toArray(Array.from(h))])])))],["children",b.Children.toArray(Array.from(l))])])))],["children",b.Children.toArray(Array.from(o))])])))],["children",b.Children.toArray(Array.from(s))])])))],f(be,{},...r))})}const hC=f("h3",{className:"justify-start text-xl leading-6 font-semibold text-gray-900",children:"HRIS Migration - Redirection"}),mC=f("div",_(y([["className","flex flex-col gap-2"],(()=>{let e,t,n,r;const s=[f("div",_(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",_(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",b.Children.toArray(Array.from(t))])])))],["children",b.Children.toArray(Array.from(e))])]))),f("button",_(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"}),Rb],["children",b.Children.toArray(Array.from(r))])])))];return["children",b.Children.toArray(Array.from(s))]})()])));function Em(e,t,n,r){return f("button",_(J(k(()=>R(x(["type","button"]),k(()=>R(x(["className",re(" ",J(k(()=>R(x("flex min-h-9 items-center justify-center overflow-hidden rounded-md"),k(()=>R(x("px-4 py-2.5 text-sm font-medium leading-none"),k(()=>R(x("focus-visible:outline-2 focus-visible:outline-offset-2"),k(()=>R(x("disabled:bg-gray-300 disabled:text-gray-500 disabled:cursor-not-allowed disabled:border-gray-300"),k(()=>e)))))))))))]),k(()=>R(x(["children",n]),k(()=>R(x(["onClick",r]),k(()=>t.tag===0?Ve():y([["disabled",!0],["title",t.fields[0]]])))))))))))))}const pC=e=>t=>n=>Em(["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),Im=e=>t=>n=>Em(["bg-white text-gray-700 outline outline-1 outline-offset-[-1px] outline-gray-300 focus-visible:outline-gray-500"],e,t,n);function gC(e,t){let n,r,s,i,o,a,l,c,d,u;return f("div",_(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",_(y([["className","self-stretch flex flex-col justify-start items-start gap-2"],(s=[f("div",_(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",_(y([["className","flex justify-start items-start"],(o=[f("div",_(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",b.Children.toArray(Array.from(a))])])))],["children",b.Children.toArray(Array.from(o))])])))],["children",b.Children.toArray(Array.from(i))])])))],["children",b.Children.toArray(Array.from(s))])]))),f("div",_(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",_(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",_(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",b.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",b.Children.toArray(Array.from(l))])]))),f("div",_(y([["className","inline-flex justify-start items-start gap-2"],(u=[pC(e)("Turn on redirection")(t)],["children",b.Children.toArray(Array.from(u))])])))],["children",b.Children.toArray(Array.from(r))])])))}function $C(e,t,n,r){let s,i,o,a,l,c,d,u,m,h,p,$,w,S,A,E;const P=es(t,"dd/MM/yyyy");return f("div",_(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",_(y([["className","self-stretch flex flex-col justify-start items-start gap-2"],(o=[f("div",_(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",_(y([["className","flex justify-start items-start"],(l=[f("div",_(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",_(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",b.Children.toArray(Array.from(d))])]))),f("div",{className:"text-center justify-start text-gray-800 text-xs font-medium leading-none",children:"Active"})],["children",b.Children.toArray(Array.from(c))])])))],["children",b.Children.toArray(Array.from(l))])])))],["children",b.Children.toArray(Array.from(a))])]))),f("div",_(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 ${P}`})],["children",b.Children.toArray(Array.from(u))])])))],["children",b.Children.toArray(Array.from(o))])]))),f("div",_(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",_(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",_(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",b.Children.toArray(Array.from(h))])])))],["children",b.Children.toArray(Array.from(m))])]))),f("div",_(y([["className","inline-flex justify-start items-start gap-2"],($=[Im(e)("Turn off redirection")(n)],["children",b.Children.toArray(Array.from($))])]))),f("div",_(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",b.Children.toArray(Array.from(w))])]))),f("div",_(y([["className","self-stretch justify-start"],(S=[f("div",{className:"text-black text-sm font-semibold leading-tight tracking-tight",children:b.Children.toArray(["Has the migration finished?"])}),f("div",_(y([["className","mt-4 text-black text-sm font-normal leading-tight tracking-tight"],(A="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",A])])))],["children",b.Children.toArray(Array.from(S))])]))),f("div",_(y([["className","inline-flex justify-start items-start gap-2"],(E=[Im(e)("Finalise redirection")(r)],["children",b.Children.toArray(Array.from(E))])])))],["children",b.Children.toArray(Array.from(i))])])))}function wC(e){let t,n,r,s,i,o,a;const l=es(e,"dd/MM/yyyy");return f("div",_(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",_(y([["className","self-stretch flex flex-col justify-start items-start gap-2"],(r=[f("div",_(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",_(y([["className","flex justify-start items-start"],(i=[f("div",_(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",b.Children.toArray(Array.from(o))])])))],["children",b.Children.toArray(Array.from(i))])])))],["children",b.Children.toArray(Array.from(s))])]))),f("div",_(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",b.Children.toArray(Array.from(a))])])))],["children",b.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",b.Children.toArray(Array.from(n))])])))}function yC(e){let t,n;const r=e.stopMigration,s=e.rollbackRedirection,i=e.startRedirection,o=e.migrationStatus,a=e.roles,l=Hn(()=>zn(()=>lC(o),(p,$)=>cC(i,s,r,p,$),(p,$)=>{}),void 0,void 0),c=l[0],d=l[1],u=p=>{d(new $n(0,[p]))},m=()=>{d(new $n(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",_(y([["className","flex flex-col gap-4 bg-gray-100"],(t=[hC,mC,f("div",_(y([["className","flex mb-4 gap-6 flex-col"],(n=J(k(()=>{let p;return R((p=c.Status,p.tag===1?x($C(h,p.fields[0],$=>{u(new _s(1,[!1]))},$=>{u(new _s(2,[!1]))})):p.tag===2?x(wC(p.fields[0])):p.tag===3?x(f("div",{className:"text-red-600",children:`Operation failed: ${p.fields[0]}`})):x(gC(h,$=>{u(new _s(0,[!1]))}))),k(()=>{let $,w,S;const A=c.CurrentModal;return A==null?x(ie()):A.tag===1?($=A.fields[0],x(uC(m,()=>{d(new $n(4,[]))},$))):A.tag===2?(w=A.fields[0],x(dC(m,()=>{d(new $n(6,[]))},w))):(S=A.fields[0],x(fC(m,()=>{d(new $n(2,[]))},S)))}))})),["children",b.Children.toArray(Array.from(n))])])))],["children",b.Children.toArray(Array.from(t))])])))}let Nm=class extends B{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Initialise","LoadedMigrationStatus"]}},yi=class extends B{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Loading","Loaded","Failed"]}};function bC(){return[new yi(0,[]),ee(e=>{e(new Nm(0,[]))})]}function _C(e,t,n){if(t.tag===1){if(t.fields[0].tag===1)return[new yi(2,[]),W()];switch(t.fields[0].fields[0].tag){case 1:return[new yi(1,[new Wr(1,[t.fields[0].fields[0].fields[0]])]),W()];case 2:return[new yi(1,[new Wr(2,[t.fields[0].fields[0].fields[0]])]),W()];default:return[new yi(1,[new Wr(0,[])]),W()]}}else return[n,cr(r=>{ur(r)},e,void 0,r=>new Nm(1,[r]))]}function vC(e){const t=e.flareAccountId,n=Bn(xn),r=Hn(()=>zn(bC,(i,o)=>_C(()=>sC(n.BackendUrl,n.AccessToken,t),i,o),(i,o)=>{}),void 0,void 0)[0],s=J(k(()=>r.tag===1?x(f(yC,{roles:n.Roles,migrationStatus:r.fields[0],startRedirection:()=>iC(n.BackendUrl,n.AccessToken,t),rollbackRedirection:()=>oC(n.BackendUrl,n.AccessToken,t),stopMigration:()=>aC(n.BackendUrl,n.AccessToken,t)})):r.tag===2?x(f("div",{children:"We are unable to load the HRIS Migration component at this time."})):x(f("div",{children:"Loading..."}))));return f("div",{children:b.Children.toArray(Array.from(s))})}function xC({hasLegalEntity:e,defaultValues:t,validateName:n,validateBusinessName:r,validateBusinessNumber:s,validateExternalId:i,onSubmit:o,closeModal:a}){const{handleSubmit:l,control:c}=mo({mode:"onChange",defaultValues:t});return M(be,{children:[M("div",{className:"font-bold text-lg mb-4",children:"Account details"}),M("form",{className:"space-y-6",onSubmit:l(o),children:[M("div",{children:[M(bt,{label:"Name",name:"Name",control:c,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."})]}),M(bt,{label:"External ID",name:"ExternalId",control:c,placeholder:"e.g. 123456",validate:i,optional:!0}),e&&M(bt,{label:"Business Name",name:"BusinessName",control:c,placeholder:"e.g. ACME LTD PTY",validate:r}),e&&M(bt,{label:"Business Number",name:"BusinessNumber",control:c,validate:s,isNumber:!0}),M(po,{primaryLabel:"Update",secondaryLabel:"Cancel",secondaryOnClick:a})]})]})}function CC(e){let t,n;switch(e==null||yn(e)?t=1:(t=0,n=e),t){case 0:return gt(Yg(n));default:return!0}}function SC(e,t,n){return f(xC,{hasLegalEntity:n.LegalEntity!=null,defaultValues:new Db(n.Name,n.ExternalId,We(Ge(r=>r.BusinessName,n.LegalEntity),""),We(Ge(r=>r.BusinessNumber,n.LegalEntity),"")),validateName:r=>gt(pa(r)),validateBusinessName:r=>gt(ku(r)),validateBusinessNumber:r=>gt(Eu(r)),validateExternalId:CC,onSubmit:r=>{const s=new lf(r.Name.trim(),jp(i=>{if(!yn(i))return i.trim()},r.ExternalId),Ge(i=>new cf(r.BusinessName.trim(),r.BusinessNumber.trim()),n.LegalEntity));Se(s,n)?e():t(s)},closeModal:e})}function AC(e){const t=e.account,n=e.updateAccount,r=Bn(xn),s=lr(!1),i=s[1],o=J(k(()=>{let a;return R(x(No(f("div",_(y([["className","flex flex-row space-x-4 items-center"],(a=[Io("Account Information",void 0),f("button",{className:re(" ",J(k(()=>R(r.Roles.ProvisionAccounts?He():x("hidden"),k(()=>x("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:b.Children.toArray([Eb])})],["children",b.Children.toArray(Array.from(a))])]))),J(k(()=>{let l;return R(x((l=["ID",t.StreamId],f(Hl,{label:l[0],value:l[1]}))),k(()=>{let c;return R(x((c=["Provisioning Mode",Ru(t.ProvisioningMode)],st(c[0],c[1]))),k(()=>{let d;return R(x((d=["Name",t.Name],f(Hl,{label:d[0],value:d[1]}))),k(()=>{let u;return R(x((u=["External ID",We(t.ExternalId,"")],st(u[0],u[1]))),k(()=>{let m;return R(x((m=["Channel ID",We(t.ChannelId,"")],st(m[0],m[1]))),k(()=>{let h;if(r.Roles.ReadProtectedData){const p=t.ContactDetails;if(p!=null){const $=p;return R(x((h=["Contact",`${$.FirstName} ${$.LastName}`],st(h[0],h[1]))),k(()=>{let w;return R(x((w=["Phone",$.MobilePhone],st(w[0],w[1]))),k(()=>{let S;return x((S=["Email",$.Email],st(S[0],S[1])))}))}))}else return He()}else return He()}))}))}))}))}))})))),k(()=>{let l,c,d,u,m,h,p;return s[0]?x((l=()=>{i(!1)},c=new lf(t.Name,t.ExternalId,Ge($=>new cf($.BusinessName,$.BusinessNumber),t.LegalEntity)),f(fr,{onClose:l,child:f("div",_(ee((d=[f("div",{className:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity","aria-hidden":!0}),f("div",_(y([["className","fixed inset-0 z-10 w-screen overflow-y-auto"],(u=[f("div",_(y([["className","fixed inset-0 z-10 w-screen overflow-y-auto h-full flex items-center justify-center"],(m=[f("div",_(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",_(y([["className","pt-4 mx-6"],(p=[f("div",{className:"mb-4 text-sm font-normal text-gray-500",children:b.Children.toArray(["Fields are required unless marked as optional."])}),SC(l,$=>{n($),i(!1)},c)],["children",b.Children.toArray(Array.from(p))])])))],["children",b.Children.toArray(Array.from(h))])])))],["children",b.Children.toArray(Array.from(m))])])))],["children",b.Children.toArray(Array.from(u))])])))],["children",b.Children.toArray(Array.from(d))]))))}))):He()}))}));return f(be,{},...o)}function kC(e){let t,n,r,s,i,o,a;if(e==null)return ie();{const l=e;return No(Io("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 EC(e){let t;if(e==null)return ie();{const n=e;return No(Io("Legal Entity",void 0),ee((t=["Notes",n],st(t[0],t[1]))))}}function IC(e){const t=e.account,n=e.updateAccount,r=y([f(AC,{updateAccount:n,account:t}),kC(t.LegalEntity),EC(t.Notes)]);return f("div",{children:b.Children.toArray(Array.from(r))})}class Xn extends B{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Details","ProfilesDirectory","Users","SuperConfiguration","BenefitsOnboardingConfiguration","BankDetailsConfiguration","SalaryPackagingConfiguration","Workspace","HrisMigration"]}}function NC(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 TC(e,t){const n=[e,t];return Se(n[0],Le("7cb0e66f-74b7-49f1-a3aa-be7970b48cb3"))||Se(n[0],Le("1c74bcf9-b795-42c6-88dc-d45c8f8827d4"))||Se(n[0],Le("89837631-c6b3-4635-a08d-fdd3383f4fbb"))?!0:Se(n[0],Le("e8269f8b-4f5e-482a-863e-4512cca40ec6"))}function RC(e,t,n){const r=[e,t],s=St(i=>fh(NC(n),i[0],Rr(Js(i[1](r)))),J(k(()=>R(x(["Details",i=>new K(9,[i[0],i[1]])]),k(()=>R(x(["Workspace",i=>new K(16,[i[0],i[1]])]),k(()=>R(x(["Directory",i=>new K(10,[i[0],i[1]])]),k(()=>R(x(["Users",i=>new K(11,[i[0],i[1]])]),k(()=>R(x(["Super",i=>new K(12,[i[0],i[1]])]),k(()=>R(x(["Benefits",i=>new K(13,[i[0],i[1]])]),k(()=>R(x(["Bank Details",i=>new K(14,[i[0],i[1]])]),k(()=>R(x(["Salary Packaging",i=>new K(15,[i[0],i[1]])]),k(()=>TC(r[0],r[1])?x(["HRIS Migration",i=>new K(17,[i[0],i[1]])]):He())))))))))))))))))));return f(hh,{headers:s})}function MC(e){const t=e.accountView,n=e.mode,r=e.props,s=e.updateAccount,i=Bn(xn),o=r.accountDetails,a=o[0],l=o[1];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:switch(n.tag){case 1:return f(vm,{partnerId:a,accountId:l,backendUrl:i.BackendUrl,accessToken:i.AccessToken});case 2:return f(Qx,{partnerId:a,accountId:l,backendUrl:i.BackendUrl,accessToken:i.AccessToken});case 3:return f(ym,{partnerId:a,accountId:l,backendUrl:i.BackendUrl,accessToken:i.AccessToken});case 4:return f(bm,{partnerId:a,accountId:l,backendUrl:i.BackendUrl,accessToken:i.AccessToken});case 5:return f(_m,{partnerId:a,accountId:l,backendUrl:i.BackendUrl,accessToken:i.AccessToken});case 6:return f(eC,{accountId:l,backendUrl:i.BackendUrl,accessToken:i.AccessToken});case 7:{const m=d.ProvisioningMode.tag===0?"Api":"Direct";return f(xm,{backendUrl:i.BackendUrl,accessToken:i.AccessToken,partnerId:a,accountId:l,accountProvisioningMode:m})}case 8:{const m=d.ExternalId;return m==null?f(Jn,{error:"This account does not have externalId (Flare AccountId)"}):f(vC,{flareAccountId:m})}default:return f(IC,{updateAccount:s,account:d})}case 1:return f(Jn,{error:"There was an error retrieving account"});case 2:return f(Co,null);default:{const m=ot(u);return f(Jn,{error:m})}}}function PC(e){let t,n,r;const s=e.account,i=e.mode,o=e.props,a=e.updateAccount;return f("div",_(y([["className","flex flex-row"],(t=[(n=o.accountDetails,RC(n[0],n[1],i)),f("div",_(y([["className","w-full"],(r=[f(MC,{updateAccount:a,props:o,mode:i,accountView:s})],["children",b.Children.toArray(Array.from(r))])])))],["children",b.Children.toArray(Array.from(t))])])))}class vs extends B{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["NotStarted","Started","Finished","Failed"]}}let Do=class extends B{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["UpdateAccountId","Search","SearchSuccess","SearchFailure"]}},xs=class extends Y{constructor(t,n){super(),this.AccountId=t,this.AccountDetails=n}};function DC(){return[new xs(void 0,new vs(0,[])),W()]}function OC(e,t,n,r){let s,i;switch(n.tag){case 1:{const o=r.AccountId;if(o!=null){const a=o;return[new xs(r.AccountId,new vs(1,[])),ps(()=>Vy(e,t,a),void 0,l=>new Do(2,[l]),l=>new Do(3,[l]))]}else return[new xs(r.AccountId,new vs(3,["Account Id is required"])),W()]}case 2:{const o=n.fields[0];return[new xs(r.AccountId,new vs(2,[o])),(s=["account-registry","partners",`${o.PartnerId}`,"accounts",`${o.AccountId}`],i=[s[0],s[1],s[2],s[3],s[4]],Qe(a=>{ft(y(i))}))]}case 3:return[new xs(r.AccountId,new vs(3,["Account not found"])),W()];default:return[new xs(Ht(n.fields[0]),r.AccountDetails),W()]}}const FC=f("h3",{className:"text-base font-semibold text-gray-900",id:"modal-title",children:"Account Search"}),VC=f("div",_(y([["className","mt-2"],(()=>{let e;const t=[f("p",_(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"?(...$)=>wo(m==null?void 0:m.className(...$),l.className):wo(m==null?void 0:m.className,l.className),p=h?{className:h}:{};return Ua(d,Object.assign({},nm(d.props,Rl(Ml(l,["ref"]))),u,c,{ref:s(d.ref,c.ref)},p))}return f(i,Object.assign({},Ml(l,["ref"]),i!==be&&c,i!==be&&u),d)}function K_(...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 nm(...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 kn(e){var t;return Object.assign(ar(e),{displayName:(t=e.displayName)!=null?t:e.name})}function Rl(e){let t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}function Ml(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}let Z_="div";var rm=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(rm||{});function J_(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 Zn({ourProps:i,theirProps:s,slot:{},defaultTag:Z_,name:"Hidden"})}let Y_=kn(J_),Pl=ir(null);Pl.displayName="OpenClosedContext";var Zt=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(Zt||{});function Dl(){return vn(Pl)}function sm({value:e,children:t}){return X.createElement(Pl.Provider,{value:e},t)}function X_(e){function t(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",t))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",t),t())}let Ur=[];X_(()=>{function e(t){t.target instanceof HTMLElement&&t.target!==document.body&&Ur[0]!==t.target&&(Ur.unshift(t.target),Ur=Ur.filter(n=>n!=null&&n.isConnected),Ur.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 Q_(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&&ev(n)?!1:r}function ev(e){if(!e)return!1;let t=e.previousElementSibling;for(;t!==null;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}function tv(e){throw new Error("Unexpected object: "+e)}var rt=(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))(rt||{});function im(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:tv(e)}}function om(e={},t=null,n=[]){for(let[r,s]of Object.entries(e))lm(n,am(t,r),s);return n}function am(e,t){return e?e+"["+t+"]":t}function lm(e,t,n){if(Array.isArray(n))for(let[r,s]of n.entries())lm(e,am(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,""]):om(n,t,e)}var Jt=(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))(Jt||{}),nv={},rv=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(rv||{}),sv=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(sv||{}),iv=(e=>(e[e.Pointer=0]="Pointer",e[e.Focus=1]="Focus",e[e.Other=2]="Other",e))(iv||{}),ov=(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))(ov||{});function Ol(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):V_(r,o=>o.dataRef.current.domRef.current),i=n?s.indexOf(n):null;return i===-1&&(i=null),{options:s,activeOptionIndex:i}}let av={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===rt.Specific?t.idx:im(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=Ol(e);if(a.activeOptionIndex===null){let d=a.options.findIndex(u=>!u.dataRef.current.disabled);d!==-1&&(a.activeOptionIndex=d)}let l=t.focus===rt.Specific?t.idx:im(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=Ol(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=Ol(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=ir(null);Fl.displayName="ComboboxActionsContext";function pi(e){let t=vn(Fl);if(t===null){let n=new Error(`<${e} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,pi),n}return t}let cm=ir(null);function lv(e){var t;let n=jr("VirtualProvider"),[r,s]=wt(()=>{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=A_({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]=et(0);return nt(()=>{a(l=>l+1)},[(t=n.virtual)==null?void 0:t.options]),X.createElement(cm.Provider,{value:i},X.createElement("div",{style:{position:"relative",width:"100%",height:`${i.getTotalSize()}px`},ref:l=>{if(l){if(typeof process<"u"&&nv.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 X.createElement(be,{key:l.key},X.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 Vl=ir(null);Vl.displayName="ComboboxDataContext";function jr(e){let t=vn(Vl);if(t===null){let n=new Error(`<${e} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,jr),n}return t}function cv(e,t){return vt(t.type,av,e,t)}let uv=be;function dv(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,[S=u?[]:void 0,A]=N_(n,s,r),[E,P]=ls(cv,{dataRef:Aa(),comboboxState:c?0:1,options:[],virtual:null,activeOptionIndex:null,activationTrigger:2,labelId:null}),V=ge(!1),ne=ge({static:!1,hold:!1}),we=ge(null),Ae=ge(null),he=ge(null),te=ge(null),de=ue(typeof a=="string"?(ce,Me)=>{let St=a;return(ce==null?void 0:ce[St])===(Me==null?void 0:Me[St])}:a??((ce,Me)=>ce===Me)),q=ue(ce=>E.options.findIndex(Me=>de(Me.dataRef.current.value,ce))),oe=or(ce=>vt(D.mode,{1:()=>S.some(Me=>de(Me,ce)),0:()=>de(S,ce)}),[S]),Oe=ue(ce=>E.activeOptionIndex===q(ce)),D=wt(()=>({...E,immediate:$,optionsPropsRef:ne,labelRef:we,inputRef:Ae,buttonRef:he,optionsRef:te,value:S,defaultValue:r,disabled:l,mode:u?1:0,virtual:E.virtual,get activeOptionIndex(){if(V.current&&E.activeOptionIndex===null&&E.options.length>0){let ce=E.options.findIndex(Me=>!Me.dataRef.current.disabled);if(ce!==-1)return ce}return E.activeOptionIndex},calculateIndex:q,compare:de,isSelected:oe,isActive:Oe,nullable:d,__demoMode:c}),[S,r,l,u,d,c,E,w]);nt(()=>{},[w,void 0]),nt(()=>{E.dataRef.current=D},[D]),j_([D.buttonRef,D.inputRef,D.optionsRef],()=>bi.closeCombobox(),D.comboboxState===0);let ke=wt(()=>{var ce,Me,St;return{open:D.comboboxState===0,disabled:l,activeIndex:D.activeOptionIndex,activeOption:D.activeOptionIndex===null?null:D.virtual?D.virtual.options[(ce=D.activeOptionIndex)!=null?ce:0]:(St=(Me=D.options[D.activeOptionIndex])==null?void 0:Me.dataRef.current.value)!=null?St:null,value:S}},[D,l,S]),me=ue(()=>{if(D.activeOptionIndex!==null){if(D.virtual)Gr(D.virtual.options[D.activeOptionIndex]);else{let{dataRef:ce}=D.options[D.activeOptionIndex];Gr(ce.current.value)}bi.goToOption(rt.Specific,D.activeOptionIndex)}}),it=ue(()=>{P({type:0}),V.current=!0}),Re=ue(()=>{P({type:1}),V.current=!1}),je=ue((ce,Me,St)=>(V.current=!1,ce===rt.Specific?P({type:2,focus:rt.Specific,idx:Me,trigger:St}):P({type:2,focus:ce,trigger:St}))),zt=ue((ce,Me)=>(P({type:3,payload:{id:ce,dataRef:Me}}),()=>{D.isActive(Me.current.value)&&(V.current=!0),P({type:4,id:ce})})),wn=ue(ce=>(P({type:5,id:ce}),()=>P({type:5,id:null}))),Gr=ue(ce=>vt(D.mode,{0(){return A==null?void 0:A(ce)},1(){let Me=D.value.slice(),St=Me.findIndex(ks=>de(ks,ce));return St===-1?Me.push(ce):Me.splice(St,1),A==null?void 0:A(Me)}})),Yt=ue(ce=>{P({type:6,trigger:ce})}),bi=wt(()=>({onChange:Gr,registerOption:zt,registerLabel:wn,goToOption:je,closeCombobox:Re,openCombobox:it,setActivationTrigger:Yt,selectActiveOption:me}),[]),_i=t===null?{}:{ref:t},qr=ge(null),vi=hi();return Pe(()=>{qr.current&&r!==void 0&&vi.addEventListener(qr.current,"reset",()=>{A==null||A(r)})},[qr,A]),X.createElement(Fl.Provider,{value:bi},X.createElement(Vl.Provider,{value:D},X.createElement(sm,{value:vt(D.comboboxState,{0:Zt.Open,1:Zt.Closed})},o!=null&&S!=null&&om({[o]:S}).map(([ce,Me],St)=>X.createElement(Y_,{features:rm.Hidden,ref:St===0?ks=>{var xi;qr.current=(xi=ks==null?void 0:ks.closest("form"))!=null?xi:null}:void 0,...Rl({key:ce,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:i,disabled:l,name:ce,value:Me})})),Zn({ourProps:_i,theirProps:p,slot:ke,defaultTag:uv,name:"Combobox"}))))}let fv="input";function hv(e,t){var n,r,s,i,o;let a=mi(),{id:l=`headlessui-combobox-input-${a}`,onChange:c,displayValue:d,type:u="text",...m}=e,h=jr("Combobox.Input"),p=pi("Combobox.Input"),$=Br(h.inputRef,t),w=z_(h.inputRef),S=ge(!1),A=hi(),E=ue(()=>{p.onChange(null),h.optionsRef.current&&(h.optionsRef.current.scrollTop=0),p.goToOption(rt.Nothing)}),P=function(){var D;return typeof d=="function"&&h.value!==void 0?(D=d(h.value))!=null?D:"":typeof h.value=="string"?h.value:""}();tm(([D,ke],[me,it])=>{if(S.current)return;let Re=h.inputRef.current;Re&&((it===0&&ke===1||D!==me)&&(Re.value=D),requestAnimationFrame(()=>{if(S.current||!Re||(w==null?void 0:w.activeElement)!==Re)return;let{selectionStart:je,selectionEnd:zt}=Re;Math.abs((zt??0)-(je??0))===0&&je===0&&Re.setSelectionRange(Re.value.length,Re.value.length)}))},[P,h.comboboxState,w]),tm(([D],[ke])=>{if(D===0&&ke===1){if(S.current)return;let me=h.inputRef.current;if(!me)return;let it=me.value,{selectionStart:Re,selectionEnd:je,selectionDirection:zt}=me;me.value="",me.value=it,zt!==null?me.setSelectionRange(Re,je,zt):me.setSelectionRange(Re,je)}},[h.comboboxState]);let V=ge(!1),ne=ue(()=>{V.current=!0}),we=ue(()=>{A.nextFrame(()=>{V.current=!1})}),Ae=ue(D=>{switch(S.current=!0,D.key){case Jt.Enter:if(S.current=!1,h.comboboxState!==0||V.current)return;if(D.preventDefault(),D.stopPropagation(),h.activeOptionIndex===null){p.closeCombobox();return}p.selectActiveOption(),h.mode===0&&p.closeCombobox();break;case Jt.ArrowDown:return S.current=!1,D.preventDefault(),D.stopPropagation(),vt(h.comboboxState,{0:()=>p.goToOption(rt.Next),1:()=>p.openCombobox()});case Jt.ArrowUp:return S.current=!1,D.preventDefault(),D.stopPropagation(),vt(h.comboboxState,{0:()=>p.goToOption(rt.Previous),1:()=>{p.openCombobox(),A.nextFrame(()=>{h.value||p.goToOption(rt.Last)})}});case Jt.Home:if(D.shiftKey)break;return S.current=!1,D.preventDefault(),D.stopPropagation(),p.goToOption(rt.First);case Jt.PageUp:return S.current=!1,D.preventDefault(),D.stopPropagation(),p.goToOption(rt.First);case Jt.End:if(D.shiftKey)break;return S.current=!1,D.preventDefault(),D.stopPropagation(),p.goToOption(rt.Last);case Jt.PageDown:return S.current=!1,D.preventDefault(),D.stopPropagation(),p.goToOption(rt.Last);case Jt.Escape:return S.current=!1,h.comboboxState!==0?void 0:(D.preventDefault(),h.optionsRef.current&&!h.optionsPropsRef.current.static&&D.stopPropagation(),h.nullable&&h.mode===0&&h.value===null&&E(),p.closeCombobox());case Jt.Tab:if(S.current=!1,h.comboboxState!==0)return;h.mode===0&&h.activationTrigger!==1&&p.selectActiveOption(),p.closeCombobox();break}}),he=ue(D=>{c==null||c(D),h.nullable&&h.mode===0&&D.target.value===""&&E(),p.openCombobox()}),te=ue(D=>{var ke,me,it;let Re=(ke=D.relatedTarget)!=null?ke:Ur.find(je=>je!==D.currentTarget);if(S.current=!1,!((me=h.optionsRef.current)!=null&&me.contains(Re))&&!((it=h.buttonRef.current)!=null&&it.contains(Re))&&h.comboboxState===0)return D.preventDefault(),h.mode===0&&(h.nullable&&h.value===null?E():h.activationTrigger!==1&&p.selectActiveOption()),p.closeCombobox()}),de=ue(D=>{var ke,me,it;let Re=(ke=D.relatedTarget)!=null?ke:Ur.find(je=>je!==D.currentTarget);(me=h.buttonRef.current)!=null&&me.contains(Re)||(it=h.optionsRef.current)!=null&&it.contains(Re)||h.disabled||h.immediate&&h.comboboxState!==0&&(p.openCombobox(),A.nextFrame(()=>{p.setActivationTrigger(1)}))}),q=Il(()=>{if(h.labelId)return[h.labelId].join(" ")},[h.labelId]),oe=wt(()=>({open:h.comboboxState===0,disabled:h.disabled}),[h]),Oe={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(D=>{var ke;return!((ke=h.virtual)!=null&&ke.disabled(D.dataRef.current.value))&&h.compare(D.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":q,"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:ne,onCompositionEnd:we,onKeyDown:Ae,onChange:he,onFocus:de,onBlur:te};return Zn({ourProps:Oe,theirProps:m,slot:oe,defaultTag:fv,name:"Combobox.Input"})}let mv="button";function pv(e,t){var n;let r=jr("Combobox.Button"),s=pi("Combobox.Button"),i=Br(r.buttonRef,t),o=mi(),{id:a=`headlessui-combobox-button-${o}`,...l}=e,c=hi(),d=ue($=>{switch($.key){case Jt.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 Jt.ArrowUp:return $.preventDefault(),$.stopPropagation(),r.comboboxState===1&&(s.openCombobox(),c.nextFrame(()=>{r.value||s.goToOption(rt.Last)})),c.nextFrame(()=>{var w;return(w=r.inputRef.current)==null?void 0:w.focus({preventScroll:!0})});case Jt.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=ue($=>{if(Q_($.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=wt(()=>({open:r.comboboxState===0,disabled:r.disabled,value:r.value}),[r]),p={ref:i,id:a,type:H_(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 Zn({ourProps:p,theirProps:l,slot:h,defaultTag:mv,name:"Combobox.Button"})}let gv="label";function $v(e,t){let n=mi(),{id:r=`headlessui-combobox-label-${n}`,...s}=e,i=jr("Combobox.Label"),o=pi("Combobox.Label"),a=Br(i.labelRef,t);nt(()=>o.registerLabel(r),[r]);let l=ue(()=>{var d;return(d=i.inputRef.current)==null?void 0:d.focus({preventScroll:!0})}),c=wt(()=>({open:i.comboboxState===0,disabled:i.disabled}),[i]);return Zn({ourProps:{ref:a,id:r,onClick:l},theirProps:s,slot:c,defaultTag:gv,name:"Combobox.Label"})}let wv="ul",yv=yo.RenderStrategy|yo.Static;function bv(e,t){let n=mi(),{id:r=`headlessui-combobox-options-${n}`,hold:s=!1,...i}=e,o=jr("Combobox.Options"),a=Br(o.optionsRef,t),l=Dl(),c=l!==null?(l&Zt.Open)===Zt.Open:o.comboboxState===0;nt(()=>{var h;o.optionsPropsRef.current.static=(h=e.static)!=null?h:!1},[o.optionsPropsRef,e.static]),nt(()=>{o.optionsPropsRef.current.hold=s},[o.optionsPropsRef,s]),q_({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=wt(()=>({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:X.createElement(lv,null,i.children)}),Zn({ourProps:m,theirProps:i,slot:u,defaultTag:wv,features:yv,visible:c,name:"Combobox.Options"})}let _v="li";function vv(e,t){var n;let r=mi(),{id:s=`headlessui-combobox-option-${r}`,disabled:i=!1,value:o,order:a=null,...l}=e,c=jr("Combobox.Option"),d=pi("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=ge(null),p=An({disabled:i,value:o,domRef:h,order:a}),$=vn(cm),w=Br(t,h,$?$.measureElement:null),S=ue(()=>d.onChange(o));nt(()=>d.registerOption(s,p),[p,s]);let A=ge(!(c.virtual||c.__demoMode));nt(()=>{if(!c.virtual||!c.__demoMode)return;let te=Lr();return te.requestAnimationFrame(()=>{A.current=!0}),te.dispose},[c.virtual,c.__demoMode]),nt(()=>{if(!A.current||c.comboboxState!==0||!u||c.activationTrigger===0)return;let te=Lr();return te.requestAnimationFrame(()=>{var de,q;(q=(de=h.current)==null?void 0:de.scrollIntoView)==null||q.call(de,{block:"nearest"})}),te.dispose},[h,u,c.comboboxState,c.activationTrigger,c.activeOptionIndex]);let E=ue(te=>{var de;if(i||(de=c.virtual)!=null&&de.disabled(o))return te.preventDefault();S(),Xh()||requestAnimationFrame(()=>{var q;return(q=c.inputRef.current)==null?void 0:q.focus({preventScroll:!0})}),c.mode===0&&requestAnimationFrame(()=>d.closeCombobox())}),P=ue(()=>{var te;if(i||(te=c.virtual)!=null&&te.disabled(o))return d.goToOption(rt.Nothing);let de=c.calculateIndex(o);d.goToOption(rt.Specific,de)}),V=G_(),ne=ue(te=>V.update(te)),we=ue(te=>{var de;if(!V.wasMoved(te)||i||(de=c.virtual)!=null&&de.disabled(o)||u)return;let q=c.calculateIndex(o);d.goToOption(rt.Specific,q,0)}),Ae=ue(te=>{var de;V.wasMoved(te)&&(i||(de=c.virtual)!=null&&de.disabled(o)||u&&(c.optionsPropsRef.current.hold||d.goToOption(rt.Nothing)))}),he=wt(()=>({active:u,selected:m,disabled:i}),[u,m,i]);return Zn({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:P,onPointerEnter:ne,onMouseEnter:ne,onPointerMove:we,onMouseMove:we,onPointerLeave:Ae,onMouseLeave:Ae},theirProps:l,slot:he,defaultTag:_v,name:"Combobox.Option"})}let xv=kn(dv),Cv=kn(pv),Sv=kn(hv),Av=kn($v),kv=kn(bv),Ev=kn(vv),gi=Object.assign(xv,{Input:Sv,Button:Cv,Label:Av,Options:kv,Option:Ev});function Ll(){let e=ge(!1);return nt(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function Iv(e=0){let[t,n]=et(e),r=Ll(),s=or(l=>{r.current&&n(c=>c|l)},[t,r]),i=or(l=>!!(t&l),[t]),o=or(l=>{r.current&&n(c=>c&~l)},[n,r]),a=or(l=>{r.current&&n(c=>c^l)},[n]);return{flags:t,addFlag:s,hasFlag:i,removeFlag:o,toggleFlag:a}}function Nv(e){let t={called:!1};return(...n)=>{if(!t.called)return t.called=!0,e(...n)}}function Bl(e,...t){e&&t.length>0&&e.classList.add(...t)}function Ul(e,...t){e&&t.length>0&&e.classList.remove(...t)}function Tv(e,t){let n=Lr();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 Rv(e,t,n,r){let s=n?"enter":"leave",i=Lr(),o=r!==void 0?Nv(r):()=>{};s==="enter"&&(e.removeAttribute("hidden"),e.style.display="");let a=vt(s,{enter:()=>t.enter,leave:()=>t.leave}),l=vt(s,{enter:()=>t.enterTo,leave:()=>t.leaveTo}),c=vt(s,{enter:()=>t.enterFrom,leave:()=>t.leaveFrom});return Ul(e,...t.base,...t.enter,...t.enterTo,...t.enterFrom,...t.leave,...t.leaveFrom,...t.leaveTo,...t.entered),Bl(e,...t.base,...a,...c),i.nextFrame(()=>{Ul(e,...t.base,...a,...c),Bl(e,...t.base,...a,...l),Tv(e,()=>(Ul(e,...t.base,...a),Bl(e,...t.base,...t.entered),o()))}),i.dispose}function Mv({immediate:e,container:t,direction:n,classes:r,onStart:s,onStop:i}){let o=Ll(),a=hi(),l=An(n);nt(()=>{e&&(l.current="enter")},[e]),nt(()=>{let c=Lr();a.add(c.dispose);let d=t.current;if(d&&l.current!=="idle"&&o.current)return c.dispose(),s.current(l.current),c.add(Rv(d,r.current,l.current==="enter",()=>{c.dispose(),i.current(l.current)})),c.dispose},[n])}function gr(e=""){return e.split(/\s+/).filter(t=>t.length>1)}let _o=ir(null);_o.displayName="TransitionContext";var Pv=(e=>(e.Visible="visible",e.Hidden="hidden",e))(Pv||{});function Dv(){let e=vn(_o);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}function Ov(){let e=vn(vo);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}let vo=ir(null);vo.displayName="NestingContext";function xo(e){return"children"in e?xo(e.children):e.current.filter(({el:t})=>t.current!==null).filter(({state:t})=>t==="visible").length>0}function um(e,t){let n=An(e),r=ge([]),s=Ll(),i=hi(),o=ue((h,p=pr.Hidden)=>{let $=r.current.findIndex(({el:w})=>w===h);$!==-1&&(vt(p,{[pr.Unmount](){r.current.splice($,1)},[pr.Hidden](){r.current[$].state="hidden"}}),i.microTask(()=>{var w;!xo(r)&&s.current&&((w=n.current)==null||w.call(n))}))}),a=ue(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,pr.Unmount)}),l=ge([]),c=ge(Promise.resolve()),d=ge({enter:[],leave:[],idle:[]}),u=ue((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(([S,A])=>A)).then(()=>w())})]),p==="enter"?c.current=c.current.then(()=>t==null?void 0:t.wait.current).then(()=>$(p)):$(p)}),m=ue((h,p,$)=>{Promise.all(d.current[p].splice(0).map(([w,S])=>S)).then(()=>{var w;(w=l.current.shift())==null||w()}).then(()=>$(p))});return wt(()=>({children:r,register:a,unregister:o,onStart:u,onStop:m,wait:c,chains:d}),[a,o,r,u,m,d,c])}function Fv(){}let Vv=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function dm(e){var t;let n={};for(let r of Vv)n[r]=(t=e[r])!=null?t:Fv;return n}function Lv(e){let t=ge(dm(e));return Pe(()=>{t.current=dm(e)},[e]),t}let Bv="div",fm=yo.RenderStrategy;function Uv(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=ge(null),S=Br(w,t),A=(n=$.unmount)==null||n?pr.Unmount:pr.Hidden,{show:E,appear:P,initial:V}=Dv(),[ne,we]=et(E?"visible":"hidden"),Ae=Ov(),{register:he,unregister:te}=Ae;Pe(()=>he(w),[he,w]),Pe(()=>{if(A===pr.Hidden&&w.current){if(E&&ne!=="visible"){we("visible");return}return vt(ne,{hidden:()=>te(w),visible:()=>he(w)})}},[ne,w,he,te,E,A]);let de=An({base:gr($.className),enter:gr(l),enterFrom:gr(c),enterTo:gr(d),entered:gr(u),leave:gr(m),leaveFrom:gr(h),leaveTo:gr(p)}),q=Lv({beforeEnter:s,afterEnter:i,beforeLeave:o,afterLeave:a}),oe=Nl();Pe(()=>{if(oe&&ne==="visible"&&w.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[w,ne,oe]);let Oe=V&&!P,D=P&&E&&V,ke=!oe||Oe?"idle":E?"enter":"leave",me=Iv(0),it=ue(Yt=>vt(Yt,{enter:()=>{me.addFlag(Zt.Opening),q.current.beforeEnter()},leave:()=>{me.addFlag(Zt.Closing),q.current.beforeLeave()},idle:()=>{}})),Re=ue(Yt=>vt(Yt,{enter:()=>{me.removeFlag(Zt.Opening),q.current.afterEnter()},leave:()=>{me.removeFlag(Zt.Closing),q.current.afterLeave()},idle:()=>{}})),je=um(()=>{we("hidden"),te(w)},Ae),zt=ge(!1);Mv({immediate:D,container:w,classes:de,direction:ke,onStart:An(Yt=>{zt.current=!0,je.onStart(w,Yt,it)}),onStop:An(Yt=>{zt.current=!1,je.onStop(w,Yt,Re),Yt==="leave"&&!xo(je)&&(we("hidden"),te(w))})});let wn=$,Gr={ref:S};return D?wn={...wn,className:wo($.className,...de.current.enter,...de.current.enterFrom)}:zt.current&&(wn.className=wo($.className,(r=w.current)==null?void 0:r.className),wn.className===""&&delete wn.className),X.createElement(vo.Provider,{value:je},X.createElement(sm,{value:vt(ne,{visible:Zt.Open,hidden:Zt.Closed})|me.flags},Zn({ourProps:Gr,theirProps:wn,defaultTag:Bv,features:fm,visible:ne==="visible",name:"Transition.Child"})))}function jv(e,t){let{show:n,appear:r=!1,unmount:s=!0,...i}=e,o=ge(null),a=Br(o,t);Nl();let l=Dl();if(n===void 0&&l!==null&&(n=(l&Zt.Open)===Zt.Open),![!0,!1].includes(n))throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[c,d]=et(n?"visible":"hidden"),u=um(()=>{d("hidden")}),[m,h]=et(!0),p=ge([n]);nt(()=>{m!==!1&&p.current[p.current.length-1]!==n&&(p.current.push(n),h(!1))},[p,n]);let $=wt(()=>({show:n,appear:r,initial:m}),[n,r,m]);Pe(()=>{if(n)d("visible");else if(!xo(u))d("hidden");else{let E=o.current;if(!E)return;let P=E.getBoundingClientRect();P.x===0&&P.y===0&&P.width===0&&P.height===0&&d("hidden")}},[n,u]);let w={unmount:s},S=ue(()=>{var E;m&&h(!1),(E=e.beforeEnter)==null||E.call(e)}),A=ue(()=>{var E;m&&h(!1),(E=e.beforeLeave)==null||E.call(e)});return X.createElement(vo.Provider,{value:u},X.createElement(_o.Provider,{value:$},Zn({ourProps:{...w,as:be,children:X.createElement(hm,{ref:a,...w,...i,beforeEnter:S,beforeLeave:A})},theirProps:{},defaultTag:be,features:fm,visible:c==="visible",name:"Transition"})))}function zv(e,t){let n=vn(_o)!==null,r=Dl()!==null;return X.createElement(X.Fragment,null,!n&&r?X.createElement(jl,{ref:t,...e}):X.createElement(hm,{ref:t,...e}))}let jl=kn(jv),hm=kn(Uv),Hv=kn(zv),Wv=Object.assign(jl,{Child:Hv,Root:jl});function Gv({name:e,control:t,queryAnzsic:n}){const[r,s]=et(""),[i,o]=et([]),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([])}};Pe(()=>{const d=setTimeout(()=>{a()},500);return()=>clearTimeout(d)},[r]);const{field:l,fieldState:c}=Th({name:e,control:t,rules:{required:!0}});return M("div",{children:M(gi,{onChange:l.onChange,value:l.value??null,name:l.name,children:[M(gi.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(gi.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(Jy,{className:"pointer-events-none col-start-1 row-start-1 ml-3 self-center text-gray-400 size-4"})]}),i.length>0&&M(gi.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(be,{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(gi.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(Hy,{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 qv({defaultValues:e,validateAccountName:t,validateLegalEntityName:n,validateAbn:r,validateSalesforceParentRecordId:s,validateWebsiteUrl:i,queryAnzsic:o,onSubmit:a,closeModal:l}){const{handleSubmit:c,control:d}=po({mode:"onChange",defaultValues:e});return M(be,{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(Gv,{name:"Industry",control:d,queryAnzsic:o}),M(go,{primaryLabel:"Next",secondaryLabel:"Cancel",secondaryOnClick:l})]})]})}function Kv(e,t,n,r){return f(qv,{defaultValues:e,validateAccountName:s=>gt($a(s)),validateLegalEntityName:s=>gt(Iu(s)),validateAbn:s=>gt(Nu(s)),validateSalesforceParentRecordId:s=>gt(a$(s)),validateWebsiteUrl:s=>gt(yu(s)),queryAnzsic:t,onSubmit:s=>{r(new hn(2,[s])),r(new hn(0,[]))},closeModal:n})}function mm(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",_(y([["className","pt-4 mx-6"],(n=J(k(()=>t)),["children",b.Children.toArray(Array.from(n))])])));return f(fr,{onClose:e,child:(r=[f("div",{className:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity","aria-hidden":!0}),f("div",_(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:b.Children.toArray([i,o])})],["children",b.Children.toArray(Array.from(s))])])))],f(be,{},...r))})}function Zv(e,t){let n;const r=f("div",_(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",b.Children.toArray(Array.from(n))])])));return mm(e,J(k(()=>R(x(r),k(()=>t)))))}function Jv(e){let t,n,r,s;return mm(e,[f("div",_(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:b.Children.toArray(Array.from(n))})),f("div",_(y([["className","flex justify-end"],(r=[f("button",_(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",b.Children.toArray(Array.from(r))])])))],["children",b.Children.toArray(Array.from(t))])])))])}function Yv(e){const t=e.closeModal,n=e.partnerId,r=Bn(xn),s=Fb(r.BackendUrl,r.AccessToken),i=Hn(()=>zn(()=>Ub,(l,c)=>jb(n,s,l,c),(l,c)=>{}),void 0,void 0),o=i[0],a=i[1];return r.Roles.ProvisionAccounts?Zv(t,J(k(()=>{const l=o.CurrentView;return l.tag===1?x(c_(o.PrimaryContactForm,a)):l.tag===2?x(f_(o.BusinessAddressForm,Bb(o),Lb(o),a)):x(Kv(o.AccountDetailsForm,c=>s.QueryAnzsic(c),t,a))}))):Jv(t)}function Xv(e){const t=e.partnerId,n=lr(!1),r=n[1],s=J(k(()=>{let i;return R(x(f("button",_(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",b.Children.toArray([Pb,"Add account"])]])))),k(()=>n[0]?x(f(Yv,{partnerId:t,closeModal:()=>{r(!1)}})):He()))}));return f(be,{},...s)}class Qv extends B{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["ColumnHeader"]}}function pm(e){return new Qv(e)}function gm(e){return e.fields[0]}class ex extends B{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["RowCell"]}}function zr(e){return new ex(e)}function $m(e){return e.fields[0]}function tx(){return["scope","col"]}function $r(e){return pm(f("th",_(y([["className","px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"],tx(),["children",e]]))))}function nx(e,t){let n;return zr(f("td",_(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",b.Children.toArray(Array.from(n))])]))))}function Co(e,t){return zr(f("td",{className:re(" ",R(e,["px-6","py-4","whitespace-nowrap","text-sm"])),children:t}))}function rx(e,t){let n,r,s,i,o,a,l;return f("div",_(y([["className","flex flex-col mt-4"],(n=[f("div",_(y([["className","-my-2 overflow-x-auto sm:-mx-6 lg:-mx-8"],(r=[f("div",_(y([["className","py-2 align-middle inline-block min-w-full sm:px-6 lg:px-8"],(s=[f("div",_(y([["className","shadow overflow-hidden border-b border-gray-200 sm:rounded-lg"],(i=[f("table",_(y([["className","min-w-full divide-y divide-gray-200"],(o=[f("thead",{className:"bg-gray-50",children:(a=Ee(gm,e),f("tr",{children:b.Children.toArray(Array.from(a))}))}),(l=la((c,d)=>(u=>{let m;return f("tr",_(y([["className",c%2===0?"bg-white":"bg-gray-50"],(m=Ee($m,u),["children",b.Children.toArray(Array.from(m))])])))})(d),t),f("tbody",{children:b.Children.toArray(Array.from(l))}))],["children",b.Children.toArray(Array.from(o))])])))],["children",b.Children.toArray(Array.from(i))])])))],["children",b.Children.toArray(Array.from(s))])])))],["children",b.Children.toArray(Array.from(r))])])))],["children",b.Children.toArray(Array.from(n))])])))}function sx(e,t,n){return e?Ye(n,t):n}function wm(e,t,n,r){let s,i,o;return pm(f("th",_(y([["className",re(" ",["px-6","py-3","text-left","text-xs","font-medium","text-gray-500","sm:pl-6","uppercase","tracking-wider"])],["scope","col"],(s=[f("a",_(y([["className",re(" ",["group","inline-flex","cursor-pointer"])],["onClick",n],(i=[r,f("span",_(y([["className",re(" ",sx(!e,ee("invisible"),y(["ml-2","flex-none","rounded","text-gray-400","group-hover:visible","group-focus:visible"])))],(o=J(k(()=>x(t?Rb:Mb))),["children",b.Children.toArray(Array.from(o))])])))],["children",b.Children.toArray(Array.from(i))])])))],["children",b.Children.toArray(Array.from(s))])]))))}function ix(e,t){return wm(Se(ef(e.Sort),new jn(1,[])),Se(tf(e.Sort),new Mr(0,[])),n=>{t(new Dr(1,[nf(new jn(1,[]),e.Sort)]))},"Name")}function ox(e,t){return wm(Se(ef(e.Sort),new jn(0,[])),Se(tf(e.Sort),new Mr(0,[])),n=>{t(new Dr(1,[nf(new jn(0,[]),e.Sort)]))},"Id")}function ax(e,t){let n;return zr(f("td",_(y([["className",re(" ",["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",b.Children.toArray(Array.from(n))])]))))}function lx(e,t,n){let r;return zr(f("td",_(y([["className",re(" ",["text-gray-500","px-6","py-2","whitespace-nowrap","text-sm","align-top"])],(r=J(k(()=>{let s;return R(x(f("div",_(y([["className",re(" ",["font-medium"])],(s=[f("span",{children:[e]})],["children",b.Children.toArray(Array.from(s))])])))),k(()=>{let i;return R((i=t,i==null?x(ie()):x(f("span",{children:["Legal Entity: "+i]}))),k(()=>{const o=n;if(o==null)return x(ie());{const a=o;return R(x(f("br",{})),k(()=>x(f("span",{children:["ABN: "+a]}))))}}))}))})),["children",b.Children.toArray(Array.from(r))])]))))}function cx(e){return zr(f("td",{className:re(" ",["px-6","py-2","whitespace-nowrap","text-sm","text-gray-500","align-top"]),children:e}))}function ux(e){let t;return zr(f("td",_(y([["className","px-6 py-2 text-sm align-top"],(t=[f("span",{className:re(" ",J(k(()=>R(x("inline-flex items-center rounded-full px-2 py-1 font-medium inset-ring"),k(()=>e.tag===1?x("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"):x("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:Pu(e)})],["children",b.Children.toArray(Array.from(t))])]))))}function dx(e,t,n,r){let s;return zr(f("td",_(y([["className","px-6 py-2 whitespace-nowrap text-sm align-top"],(s=J(k(()=>R(x(f("a",{className:"text-indigo-600 hover:text-indigo-900",children:t,href:e})),k(()=>{let i,o;return R((i=r,i==null?x(ie()):(o=i,R(x(f("br",{})),k(()=>x(f("span",{children:[`Channel ID: ${o}`]})))))),k(()=>{const a=n;if(a==null)return x(ie());{const l=a;return R(x(f("br",{})),k(()=>x(f("span",{children:[`External ID: ${l}`]}))))}}))})))),["children",b.Children.toArray(Array.from(s))])]))))}function fx(e,t,n){const r=Gt(n.AccountId);return J(k(()=>{let s;return R(x(dx(Rr(Js((s=[e,r],new K(9,[s[0],s[1]])))),n.AccountId,n.ExternalId,n.ChannelId)),k(()=>R(x(lx(n.Name,n.BusinessName,n.BusinessNumber)),k(()=>R(x(ux(n.ProvisioningMode)),k(()=>R(t.ReadProtectedData?x(ax(We(n.Contact,""),We(n.ContactMobilePhone,""))):He(),k(()=>x(cx(n.Website))))))))))}))}class hx extends Y{constructor(t,n){super(),this.Data=t,this.LoadNext=n}}class ym extends B{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Resolved","InProgress"]}}class bm extends B{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Known","Unknown"]}}function mx(e){let t;return f("thead",{className:"bg-gray-50",children:(t=Ee(gm,e),f("tr",{children:b.Children.toArray(Array.from(t))}))})}function px(e,t){let n;return f("tr",_(y([["className",e%2===0?"bg-white":"bg-gray-50"],(n=Ee($m,t),["children",b.Children.toArray(Array.from(n))])])))}function gx(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,J(k(()=>R(x("Showing "),k(()=>R(x(f("span",{className:"font-medium",children:`${o}`})),k(()=>R(x(" to "),k(()=>R(x(f("span",{className:"font-medium",children:`${a}`})),k(()=>R(x(" of "),k(()=>r.tag===1?ee(" many"):y([f("span",{className:"font-medium",children:ot(r.fields[0])})," results"])))))))))))))):ee(ie()),p=J(k(()=>{let $,w;return R(($=i,$==null?x(ie()):(w=$,x(f("a",{className:re(" ",["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 S=s;if(S==null)return x(ie());{const A=S;return x(f("a",{className:re(" ",["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:A,children:" Next"}))}}))}));return f("tfoot",_(y([["className",re(" ",["w-full"])],(l=[f("tr",_(ee((c=[f("td",_(y([["colSpan",e],(d=[f("nav",_(y([["className",re(" ",["bg-white","px-4","py-3","flex","items-center","justify-between","border-t-1","border-gray-200","sm:px-6"])],(u=[f("div",_(y([["className",re(" ",["hidden","sm:block"])],(m=[f("p",{className:re(" ",["text-sm","text-gray-700"]),children:b.Children.toArray(Array.from(h))})],["children",b.Children.toArray(Array.from(m))])]))),f("div",{className:re(" ",["flex-1","flex","justify-between","sm:justify-end"]),children:b.Children.toArray(Array.from(p))})],["children",b.Children.toArray(Array.from(u))])])))],["children",b.Children.toArray(Array.from(d))])])))],["children",b.Children.toArray(Array.from(c))]))))],["children",b.Children.toArray(Array.from(l))])])))}function $x(e,t){const n=lr(1),r=n[1],s=n[0]|0;return[s,i=>{if(s===e){if(t!=null){const o=t;Ec(en("Calling Load")),o(),r(s+1)}}else r(s+1)},i=>{r(s-1)}]}function wx(e){let t,n,r,s,i;const o=e.data,a=e.pageSize,l=e.renderRowCells,c=e.columnHeaders,d=f0(a,o.Data),u=$x(on(d),o.LoadNext),m=u[0]|0,h=u[1];let p;const $=l0(m-1,d);p=$==null?new ym(1,[]):new ym(0,[$]);const w=on(o.Data)|0,S=o.LoadNext==null?new bm(0,[w]):new bm(1,[]),A=p.tag===1?void 0:w>=1?(m-1)*a+1:void 0,E=p.tag===1?void 0:w>=1?(m-1)*a+on(p.fields[0]):void 0,P=m===1?void 0:u[2],V=m===on(d)?o.LoadNext!=null?h:void 0:m<on(d)?h:void 0;return f("div",_(y([["className","flex flex-col mt-4"],(t=[f("div",_(y([["className","-my-2 overflow-x-auto sm:-mx-6 lg:-mx-8"],(n=[f("div",_(y([["className","py-2 align-middle inline-block min-w-full sm:px-6 lg:px-8"],(r=[f("div",_(y([["className","shadow overflow-hidden border-b border-gray-200 sm:rounded-lg"],(s=[f("table",_(y([["className","min-w-full divide-y divide-gray-200"],(i=J(k(()=>R(x(mx(c)),k(()=>{let ne,we;return R((ne=p,ne.tag===1?x(ie()):x((we=la(px,l(ne.fields[0])),f("tbody",{children:b.Children.toArray(Array.from(we))})))),k(()=>x(gx(on(c),A,E,S,V,P))))})))),["children",b.Children.toArray(Array.from(i))])])))],["children",b.Children.toArray(Array.from(s))])])))],["children",b.Children.toArray(Array.from(r))])])))],["children",b.Children.toArray(Array.from(n))])])))],["children",b.Children.toArray(Array.from(t))])])))}function Jn(e){const t=e.error,n=ee(f("span",{children:[t]}));return f("div",{children:b.Children.toArray(Array.from(n))})}function So(){const e=ee(f("span",{children:["Please wait..."]}));return f("div",{children:b.Children.toArray(Array.from(e))})}function yx(e){let t,n,r,s,i,o;const a=Bn(xn),l=Sb({accessToken:a.AccessToken,backendUrl:a.BackendUrl,partnerId:e.partnerId}),c=Hn(()=>zn(Eb,(E,P)=>Ib(l,E,P),(E,P)=>{}),void 0,void 0),d=c[0],u=c[1],m=new el(d.SearchText,d.Sort,d.PageSize);Ja((t=[()=>kb(l,m),E=>{u(new Dr(2,[E]))}],Kd(t[0],t[1])));const h=E=>{u(new Dr(4,[]))},p=d.Data;let $,w,S,A;switch(p.tag){case 0:case 1:{$=2;break}case 3:{$=3,A=p.fields[0];break}default:p.fields[0].tag===1?($=1,S=p.fields[0].fields[0]):($=0,w=p.fields[0].fields[0])}switch($){case 0:{const E=y([f("div",_(y([["className",re(" ",["flex","justify-between","items-end","pt-2","sm:-mr-6","lg:mr-0"])],(n=J(k(()=>{let P;return R(x(f("div",_(y([["className",re(" ",["flex","flex-row","gap-4","sm:-mr-6","lg:mr-0","w-[560px]"])],(P=[wh(sf(d.SearchText),"Account ID, Name, Legal Entity, Channel ID or External ID",V=>{u(new Dr(0,[V]))},h),Nb(h)],["children",b.Children.toArray(Array.from(P))])])))),k(()=>e.accountProvisioningMode.tag===0?x(ie()):x(f(Xv,{partnerId:e.partnerId}))))})),["children",b.Children.toArray(Array.from(n))])]))),(r=w,s=J(k(()=>R(x(ox(d,u)),k(()=>R(x(ix(d,u)),k(()=>R(x($r("Provisioning")),k(()=>R(a.Roles.ReadProtectedData?x($r("Contact")):He(),k(()=>x($r("Website")))))))))))),i=new hx(r.Accounts,Ge(P=>()=>{ds(Ab(l)(m)(P)(u))},r.Token)),o=of(d.PageSize)|0,f(wx,{columnHeaders:s,renderRowCells:P=>At(V=>fx(e.partnerId,a.Roles,V),P),pageSize:o,data:i}))]);return f("div",{children:b.Children.toArray(Array.from(E))})}case 1:return f(Jn,{error:S});case 2:return f(So,null);default:{const E=ot(A);return f(Jn,{error:E})}}}let Ao=class extends B{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["backend-url","access-token","partner-id","account-id"]}};function _m(e){const t=e.accessToken,n=e.backendUrl,r=e.accountId,s=e.partnerId,i=ns(o=>o,[new Ao(1,[t]),new Ao(0,[n]),new Ao(2,[Dt(s)]),Ge(o=>new Ao(3,[ln(o)]),r)]);return f("superhero-super-configuration",rr(i,1))}let ko=class extends B{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["backend-url","access-token","partner-id","account-id"]}};function vm(e){const t=e.accessToken,n=e.backendUrl,r=e.accountId,s=e.partnerId,i=ns(o=>o,[new ko(1,[t]),new ko(0,[n]),new ko(2,[Dt(s)]),Ge(o=>new ko(3,[ln(o)]),r)]);return f("superhero-benefits-onboarding-configuration",rr(i,1))}let Eo=class extends B{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["backend-url","access-token","partner-id","account-id"]}};function xm(e){const t=e.accessToken,n=e.backendUrl,r=e.accountId,s=e.partnerId,i=ns(o=>o,[new Eo(1,[t]),new Eo(0,[n]),new Eo(2,[Dt(s)]),Ge(o=>new Eo(3,[ln(o)]),r)]);return f("superhero-bank-details",rr(i,1))}let Io=class extends B{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["backend-url","access-token","partner-id","account-id"]}};function Cm(e){const t=e.accessToken,n=e.backendUrl,r=e.accountId,s=e.partnerId,i=ns(o=>o,[new Io(1,[t]),new Io(0,[n]),new Io(2,[Dt(s)]),Ge(o=>new Io(3,[ln(o)]),r)]);return f("superhero-profile-directory-app",rr(i,1))}let $i=class extends B{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["backend-url","access-token","partner-id","account-id","account-provisioning-mode"]}};function Sm(e){const t=e.accountProvisioningMode,n=e.accountId,r=e.partnerId,s=e.accessToken,i=e.backendUrl,o=ns(a=>a,[new $i(1,[s]),new $i(0,[i]),new $i(2,[Dt(r)]),Ge(a=>new $i(3,[ln(a)]),n),Ge(a=>new $i(4,[a]),t)]);return f("workspace-account-registry-app",rr(o,1))}const Hr=e=>({tag:"ok",value:e}),wi=e=>({tag:"error",error:e});class Tt{constructor(t){this.uri=t}static isAbsoluteUri(t){try{return new URL(t),!0}catch{return!1}}static tryCreateWithKind(t,n){switch(n){case 1:return Tt.isAbsoluteUri(t)?Hr(new Tt({original:t,value:new URL(t),kind:n})):wi("Invalid URI: The format of the URI could not be determined.");case 2:return Tt.isAbsoluteUri(t)?wi("URI is not a relative path."):Hr(new Tt({original:t,value:t,kind:n}));case 0:return Tt.isAbsoluteUri(t)?Hr(new Tt({original:t,value:new URL(t),kind:1})):Hr(new Tt({original:t,value:t,kind:2}));default:return n}}static tryCreateWithBase(t,n){return t.uri.kind!==1?wi("Base URI should have Absolute kind"):typeof n=="string"?Hr(new Tt({original:new URL(n,t.uri.value).toString(),value:new URL(n,t.uri.value),kind:1})):n.uri.kind===2?Hr(new Tt({original:new URL(n.uri.value,t.uri.value).toString(),value:new URL(n.uri.value,t.uri.value),kind:1})):Hr(t)}static tryCreateImpl(t,n=1){return typeof t=="string"?typeof n!="number"?wi("Kind must be specified when the baseUri is a string."):Tt.tryCreateWithKind(t,n):typeof n=="number"?wi("Kind should not be specified when the baseUri is an absolute Uri."):Tt.tryCreateWithBase(t,n)}static create(t,n=1){const r=Tt.tryCreateImpl(t,n);switch(r.tag){case"ok":return r.value;case"error":throw new Error(r.error);default:return r}}static tryCreate(t,n=1,r){const s=Tt.tryCreateImpl(t,n);switch(s.tag){case"ok":return r.contents=s.value,!0;case"error":return!1;default:return s}}toString(){switch(this.uri.kind){case 1:return decodeURIComponent(this.asUrl().toString());case 2:return this.uri.value;default:return this.uri}}asUrl(){switch(this.uri.kind){case 1:return this.uri.value;case 2:throw new Error("This operation is not supported for a relative URI.");default:return this.uri}}get isAbsoluteUri(){return this.uri.kind===1}get absoluteUri(){return this.asUrl().href}get scheme(){const t=this.asUrl().protocol;return t.slice(0,t.length-1)}get host(){return this.asUrl().host}get absolutePath(){return this.asUrl().pathname}get query(){return this.asUrl().search}get pathAndQuery(){const t=this.asUrl();return t.pathname+t.search}get fragment(){return this.asUrl().hash}get originalString(){return this.uri.original}}function bx(e,t){return k(()=>{const n=new aw([],t);return I0(r=>_g(r,n),e)})}function _x(e,t){return J(bx(e,t))}function vx(e,t){return yn(e)?ut(["Issuer","Issuer is required"],t):t}function xx(e,t){let n,r;switch(e!=null?yn(e)?n=1:(n=0,r=e):n=1,n){case 0:{let s,i=ie();s=[Tt.tryCreate(r,1,new at(()=>i,a=>{i=a})),i];let o;switch(s[0]&&s[1].scheme==="https"?o=0:o=1,o){case 0:return t;default:return ut(["OpenIdConfigUrl","OpenIdConfigUrl must be a valid URL."],t)}}default:return t}}function Cx(e,t){let n;const r=At(o=>o.Key,e),s=At(o=>o.Value,e),i=Uc(yn,r)||Uc(yn,s)||(n=Bi(o=>!yn(o),At(o=>o.trim().toLowerCase(),r)),on(_x(n,{Equals:(o,a)=>o===a,GetHashCode:Qn}))!==on(n))?"Claims must have unique keys with valid key-value pairs":void 0;return i==null?t:ut(["RequiredClaims",i],t)}function No(e){return au(Cx(e.Config.RequiredClaims,xx(e.Config.OpenIdConfigUrl,vx(e.Config.Issuer,Ve()))),{Compare:Rn})}class Rt extends B{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["NoOp","Save","Cancel"]}}let wr=class extends B{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["SetIssuer","SetOpenIdConfigUrl","AddClaim","UpdateClaimKey","UpdateClaimValue","RemoveClaim","ClickSave","ClickCancel"]}};function Sx(e,t){let n,r,s;switch(e.tag){case 1:{const i=e.fields[0];return[new bt((n=t.Config,new dr(n.Issuer,yn(i)?void 0:i,n.RequiredClaims)),t.IsSaving,t.ValidationErrors),z(),new Rt(0,[])]}case 2:return[new bt((r=t.Config,new dr(r.Issuer,r.OpenIdConfigUrl,Ye(t.Config.RequiredClaims,ee(new si("",""))))),t.IsSaving,t.ValidationErrors),z(),new Rt(0,[])];case 3:{const i=e.fields[0]|0,o=t.Config.RequiredClaims;if(i>=0&&i<on(o)){let a;const l=t.Config;return a=new dr(l.Issuer,l.OpenIdConfigUrl,Fs((c,d)=>c===i?new si(e.fields[1],d.Value):d,o)),Gi(t.ValidationErrors)?[new bt(a,t.IsSaving,t.ValidationErrors),z(),new Rt(0,[])]:[new bt(a,t.IsSaving,No(new bt(a,t.IsSaving,t.ValidationErrors))),z(),new Rt(0,[])]}else return[t,z(),new Rt(0,[])]}case 4:{const i=e.fields[0]|0,o=t.Config.RequiredClaims;if(i>=0&&i<on(o)){let a;const l=t.Config;return a=new dr(l.Issuer,l.OpenIdConfigUrl,Fs((c,d)=>c===i?new si(d.Key,e.fields[1]):d,o)),Gi(t.ValidationErrors)?[new bt(a,t.IsSaving,t.ValidationErrors),z(),new Rt(0,[])]:[new bt(a,t.IsSaving,No(new bt(a,t.IsSaving,t.ValidationErrors))),z(),new Rt(0,[])]}else return[t,z(),new Rt(0,[])]}case 5:{const i=e.fields[0]|0,o=t.Config.RequiredClaims;if(i>=0&&i<on(o)){let a;const l=t.Config;return a=new dr(l.Issuer,l.OpenIdConfigUrl,At(c=>c[1],Bi(c=>c[0]!==i,Fs((c,d)=>[c,d],o)))),Gi(t.ValidationErrors)?[new bt(a,t.IsSaving,t.ValidationErrors),z(),new Rt(0,[])]:[new bt(a,t.IsSaving,No(new bt(a,t.IsSaving,t.ValidationErrors))),z(),new Rt(0,[])]}else return[t,z(),new Rt(0,[])]}case 6:{const i=No(t);return Gi(i)?[t,z(),new Rt(1,[t.Config])]:[new bt(t.Config,t.IsSaving,i),z(),new Rt(0,[])]}case 7:return[t,z(),new Rt(2,[])];default:return[new bt((s=t.Config,new dr(e.fields[0],s.OpenIdConfigUrl,s.RequiredClaims)),t.IsSaving,t.ValidationErrors),z(),new Rt(0,[])]}}function Am(e,t,n,r,s){let i;return f("div",_(y([["className","flex flex-col gap-2"],(i=J(k(()=>R(x(f("label",{className:"text-sm font-medium text-gray-900",children:e})),k(()=>R(x(f("input",{className:re(" ",J(k(()=>R(x("px-3 py-2 border rounded-md text-sm"),k(()=>s!=null?x("border-red-500"):x("border-gray-300")))))),type:"text",value:t,placeholder:n,onChange:o=>{r(o.target.value)}})),k(()=>{const o=s;return o==null?x(ie()):x(f("div",{className:"text-sm text-red-600",children:o}))})))))),["children",b.Children.toArray(Array.from(i))])])))}function Ax(e,t,n){let r;return f("div",_(y([["className","flex gap-2 items-center"],(r=[f("input",{className:"flex-1 px-3 py-2 border border-gray-300 rounded-md text-sm",type:"text",value:t.Key,placeholder:"Claim key",onChange:s=>{n(new wr(3,[e,s.target.value]))}}),f("input",{className:"flex-1 px-3 py-2 border border-gray-300 rounded-md text-sm",type:"text",value:t.Value,placeholder:"Claim value",onChange:s=>{n(new wr(4,[e,s.target.value]))}}),f("button",{className:"text-gray-400 hover:text-gray-600",onClick:s=>{n(new wr(5,[e]))},children:b.Children.toArray(["×"])})],["children",b.Children.toArray(Array.from(r))])])))}function kx(e,t){let n,r,s,i;return f("div",_(y([["className","flex flex-col gap-6 max-w-4xl pr-4 sm:pr-6"],(n=[Am("Issuer",e.Config.Issuer,"https://example.com",o=>{t(new wr(0,[o]))},Bs("Issuer",e.ValidationErrors)),Am("OpenID Config URL (optional)",We(e.Config.OpenIdConfigUrl,""),"https://example.com/.well-known/openid-configuration",o=>{t(new wr(1,[o]))},Bs("OpenIdConfigUrl",e.ValidationErrors)),f("div",_(y([["className","flex flex-col gap-3"],(r=J(k(()=>{let o;return R(x(f("div",_(y([["className","flex justify-between items-center"],(o=[f("label",{className:"text-sm font-medium text-gray-900",children:"Required Claims"}),f("button",{className:"text-blue-700 text-sm font-medium flex items-center gap-1",onClick:a=>{t(new wr(2,[]))},children:b.Children.toArray(["+ Add Claim"])})],["children",b.Children.toArray(Array.from(o))])])))),k(()=>{let a;return R(x(f("div",_(y([["className","flex flex-col gap-2"],(a=J(k(()=>Kc(l=>x(Ax(l[0],l[1],t)),i0(e.Config.RequiredClaims)))),["children",b.Children.toArray(Array.from(a))])])))),k(()=>{const l=Bs("RequiredClaims",e.ValidationErrors);return l==null?x(ie()):x(f("div",{className:"text-sm text-red-600",children:l}))}))}))})),["children",b.Children.toArray(Array.from(r))])]))),f("hr",{className:"border-t border-gray-200"}),f("div",_(y([["className","flex gap-3 justify-end"],(s=[f("button",{className:"px-4 py-2 border border-gray-300 text-gray-700 rounded-md text-sm font-medium",onClick:o=>{t(new wr(7,[]))},children:"Cancel"}),f("button",_(y([(i="px-4 py-2 bg-blue-700 text-white rounded-md text-sm font-medium disabled:bg-gray-300 disabled:cursor-not-allowed",["className",i]),["disabled",e.IsSaving],["onClick",o=>{t(new wr(6,[]))}],["children","Save Configuration"]])))],["children",b.Children.toArray(Array.from(s))])])))],["children",b.Children.toArray(Array.from(n))])])))}function Ex(e,t){let n;return f("div",_(y([["className","flex flex-col gap-1"],(n=[f("label",{className:"text-sm font-medium text-gray-700",children:e}),f("div",{className:"px-3 py-2 bg-gray-50 border border-gray-200 rounded-md text-sm text-gray-900",children:t})],["children",b.Children.toArray(Array.from(n))])])))}function Ix(e){let t;return f("div",_(y([["className","flex gap-2 items-center"],(t=[f("div",{className:"flex-1 px-3 py-2 bg-gray-50 border border-gray-200 rounded-md text-sm text-gray-900",children:e.Key}),f("div",{className:"flex-1 px-3 py-2 bg-gray-50 border border-gray-200 rounded-md text-sm text-gray-900",children:e.Value})],["children",b.Children.toArray(Array.from(t))])])))}function Nx(e,t,n){let r,s,i,o,a,l;const c=At(d=>new si(d[0],d[1]),lu(e.RequiredClaims));return f("div",_(y([["className","flex flex-col gap-6 max-w-4xl pr-4 sm:pr-6"],(r=[f("div",_(y([["className","inline-flex items-start justify-start gap-3 rounded-md bg-blue-50 p-4"],(s=[f("div",_(y([["className","inline-flex flex-1 flex-col items-start justify-start gap-2"],(i=[f("div",{className:"justify-start self-stretch text-sm font-medium leading-5 text-blue-800",children:"Advanced security is enabled"})],["children",b.Children.toArray(Array.from(i))])])))],["children",b.Children.toArray(Array.from(s))])]))),Ex("Issuer",e.Issuer),f("div",_(y([["className","flex flex-col gap-1"],(o=J(k(()=>R(x(f("label",{className:"text-sm font-medium text-gray-700",children:"OpenID Config URL (optional)"})),k(()=>{const d=e.OpenIdConfigUrl;return d==null?x(f("div",{className:"px-3 py-2 bg-gray-50 border border-gray-200 rounded-md text-sm text-gray-400 italic",children:"Not set"})):x(f("div",{className:"px-3 py-2 bg-gray-50 border border-gray-200 rounded-md text-sm text-gray-900",children:d}))})))),["children",b.Children.toArray(Array.from(o))])]))),f("div",_(y([["className","flex flex-col gap-3"],(a=J(k(()=>R(x(f("label",{className:"text-sm font-medium text-gray-700",children:"Required Claims"})),k(()=>{let d;return Z(c)?x(f("div",{className:"px-3 py-2 bg-gray-50 border border-gray-200 rounded-md text-sm text-gray-400 italic",children:"No claims configured"})):R(x(f("div",_(y([["className","flex gap-2 items-center"],(d=[f("div",{className:"flex-1 text-xs font-medium text-gray-500 uppercase tracking-wider px-3 py-1",children:"Claim Key"}),f("div",{className:"flex-1 text-xs font-medium text-gray-500 uppercase tracking-wider px-3 py-1",children:"Claim Value"})],["children",b.Children.toArray(Array.from(d))])])))),k(()=>{let u;return x(f("div",_(y([["className","flex flex-col gap-2"],(u=J(k(()=>Ee(Ix,c))),["children",b.Children.toArray(Array.from(u))])]))))}))})))),["children",b.Children.toArray(Array.from(a))])]))),f("hr",{className:"border-t border-gray-200"}),f("div",_(y([["className","flex gap-3 justify-end"],(l=J(k(()=>{let d,u;return R((d=t,d==null?x(ie()):(u=d,x(f("button",{className:"px-4 py-2 border border-gray-300 text-gray-700 rounded-md text-sm font-medium hover:bg-gray-50",onClick:m=>{u()},children:"Edit"})))),k(()=>{const m=n;if(m==null)return x(ie());{const h=m;return x(f("button",{className:"px-4 py-2 border border-red-300 text-red-700 rounded-md text-sm font-medium hover:bg-red-50",onClick:p=>{h()},children:"Disable"}))}}))})),["children",b.Children.toArray(Array.from(l))])])))],["children",b.Children.toArray(Array.from(r))])])))}function Tx(e){let t;return f("div",_(y([["className","flex flex-col gap-4"],(t=J(k(()=>{let n,r;return R(x(f("div",_(y([["className","inline-flex items-start justify-start gap-3 self-stretch rounded-md bg-amber-50 p-4"],(n=[f("div",_(y([["className","inline-flex flex-1 flex-col items-start justify-start gap-2"],(r=J(k(()=>R(x(f("div",{className:"justify-start self-stretch text-sm font-medium leading-5 text-amber-800",children:"Advanced security is not currently configured"})),k(()=>R(x(f("div",{className:"justify-start self-stretch text-sm font-normal leading-5 text-amber-700",children:"Configure advanced security to enable OAuth 2 authentication for the Partner and External API."})),k(()=>e!=null?x(ie()):x(f("div",{className:"justify-start self-stretch text-sm font-normal leading-5 text-amber-700",children:"The permission AccountRegistry.ConfigureSecurity is required to configure advanced security."})))))))),["children",b.Children.toArray(Array.from(r))])])))],["children",b.Children.toArray(Array.from(n))])])))),k(()=>{const s=e;if(s!=null){const i=s;return x(f("button",{className:"px-4 py-2 bg-blue-700 text-white rounded-md text-sm font-medium shadow-sm max-w-xs",children:"Configure advanced security",onClick:o=>{i()}}))}else return x(ie())}))})),["children",b.Children.toArray(Array.from(t))])])))}function Rx(e){let t,n;return f("button",_(y([(t="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",t]),["onClick",r=>{e()}],(n=[f("div",{className:"justify-start text-gray-700 text-sm font-medium leading-tight",children:"Cancel"})],["children",b.Children.toArray(Array.from(n))])])))}function Mx(e,t){let n,r;return f("button",_(y([(n="min-h-[34px] px-[13px] py-[9px] bg-[#2563EB] rounded-md flex justify-center items-center gap-2 overflow-hidden",["className",n]),["onClick",s=>{e()}],["disabled",t],(r=J(k(()=>R(x(f("div",{className:"justify-start text-white text-sm font-medium leading-none",children:"Save configuration"})),k(()=>t?x(f("span",{className:"animate-spin",children:b.Children.toArray([oi])})):He())))),["children",b.Children.toArray(Array.from(r))])])))}function Px(e,t,n){let r,s,i,o,a,l,c,d,u;return f(fr,{onClose:e,child:(r=[f("div",{className:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity","aria-hidden":!0}),f("div",_(y([["className","fixed inset-0 z-10 w-screen overflow-y-auto h-full flex items-center justify-center"],["onClick",m=>{e()}],(s=[f("div",_(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",m=>{m.preventDefault(),m.stopPropagation()}],(o=[f("div",_(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:b.Children.toArray([ii])})],["children",b.Children.toArray(Array.from(a))])]))),f("div",_(y([["className","flex-1 inline-flex flex-col justify-start items-start gap-4"],(l=[f("div",_(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:"Save advanced security configuration?"}),f("div",_(y([["className","self-stretch justify-start"],(d=[f("div",{className:"text-gray-700 text-sm font-normal leading-5",children:b.Children.toArray(["Saving this configuration will enable OAuth 2 authentication for the Partner and External API."])}),f("div",{className:"text-red-700 text-sm font-bold leading-5 mt-2",children:"Warning: Incorrect settings or missing valid tokens will disrupt all partner communications."}),f("div",{className:"text-gray-700 text-sm font-normal leading-5 mt-2",children:"Ensure your partner is configured to provide valid authentication tokens before proceeding."})],["children",b.Children.toArray(Array.from(d))])])))],["children",b.Children.toArray(Array.from(c))])]))),f("div",_(y([["className","self-stretch inline-flex justify-end items-center gap-3"],(u=[Rx(e),Mx(t,n)],["children",b.Children.toArray(Array.from(u))])])))],["children",b.Children.toArray(Array.from(l))])])))],["children",b.Children.toArray(Array.from(o))])])))],["children",b.Children.toArray(Array.from(s))])])))],f(be,{},...r))})}function Dx(e){let t,n;return f("button",_(y([(t="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",t]),["onClick",r=>{e()}],(n=[f("div",{className:"justify-start text-gray-700 text-sm font-medium leading-tight",children:"Cancel"})],["children",b.Children.toArray(Array.from(n))])])))}function Ox(e,t){let n,r;return f("button",_(y([(n="min-h-[34px] px-[13px] py-[9px] bg-red-600 rounded-md flex justify-center items-center gap-2 overflow-hidden",["className",n]),["onClick",s=>{e()}],["disabled",t],(r=J(k(()=>R(x(f("div",{className:"justify-start text-white text-sm font-medium leading-none",children:"Disable configuration"})),k(()=>t?x(f("span",{className:"animate-spin",children:b.Children.toArray([oi])})):He())))),["children",b.Children.toArray(Array.from(r))])])))}function Fx(e,t,n){let r,s,i,o,a,l,c,d,u,m,h;return f(fr,{onClose:e,child:(r=[f("div",{className:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity","aria-hidden":!0}),f("div",_(y([["className","fixed inset-0 z-10 w-screen overflow-y-auto h-full flex items-center justify-center"],["onClick",p=>{e()}],(s=[f("div",_(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",p=>{p.preventDefault(),p.stopPropagation()}],(o=[f("div",_(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:b.Children.toArray([ii])})],["children",b.Children.toArray(Array.from(a))])]))),f("div",_(y([["className","flex-1 inline-flex flex-col justify-start items-start gap-4"],(l=[f("div",_(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:"Disable advanced security configuration?"}),f("div",_(y([["className","self-stretch justify-start"],(d=[f("div",_(y([["className","text-gray-700 text-sm font-normal leading-5"],(u=[(m="OAuth 2 authentication will be disabled for the Partner and External API. This will remove advanced security requirements for API access.",m)],["children",b.Children.toArray(Array.from(u))])]))),f("div",{className:"text-gray-700 text-sm font-bold leading-5 mt-2",children:"This will remove all advanced security configuration."})],["children",b.Children.toArray(Array.from(d))])])))],["children",b.Children.toArray(Array.from(c))])]))),f("div",_(y([["className","self-stretch inline-flex justify-end items-center gap-3"],(h=[Dx(e),Ox(t,n)],["children",b.Children.toArray(Array.from(h))])])))],["children",b.Children.toArray(Array.from(l))])])))],["children",b.Children.toArray(Array.from(o))])])))],["children",b.Children.toArray(Array.from(s))])])))],f(be,{},...r))})}class pn extends B{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["NoModal","ConfirmDisable","ConfirmEnable"]}}class gn extends B{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Loading","LoadError","SaveError","Viewing","Editing"]}}let Mt=class extends Y{constructor(t,n,r,s,i){super(),this.PartnerId=t,this.InitialConfig=n,this.CanEdit=r,this.Page=s,this.Modal=i}},jt=class extends B{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["StartEdit","CancelEdit","EditingViewMsg","ShowEnableModal","ConfirmEnable","Save","SaveCompleted","ShowDisableModal","CloseModal","ConfirmDisable","DisableCompleted"]}};function Vx(e,t,n){return[new Mt(e,t,n.ConfigureSecurity,new gn(3,[t]),new pn(0,[])),z()]}function Lx(e,t,n,r){switch(n.tag){case 8:return[new Mt(r.PartnerId,r.InitialConfig,r.CanEdit,r.Page,new pn(0,[])),z()];case 9:return[new Mt(r.PartnerId,r.InitialConfig,r.CanEdit,r.Page,new pn(1,[!0])),cr(s=>{ur(s)},t,void 0,s=>new jt(10,[s]))];case 10:return n.fields[0].tag===1?[new Mt(r.PartnerId,r.InitialConfig,r.CanEdit,new gn(2,[n.fields[0].fields[0]]),new pn(0,[])),z()]:[new Mt(r.PartnerId,n.fields[0].fields[0],r.CanEdit,new gn(3,[n.fields[0].fields[0]]),new pn(0,[])),z()];case 0:{const s=r.Page;return s.tag===3?[new Mt(r.PartnerId,r.InitialConfig,r.CanEdit,new gn(4,[vb(s.fields[0])]),r.Modal),z()]:[r,z()]}case 1:return r.Page.tag===4?[new Mt(r.PartnerId,r.InitialConfig,r.CanEdit,new gn(3,[r.InitialConfig]),r.Modal),z()]:[r,z()];case 2:{const s=r.Page;if(s.tag===4){const i=Sx(n.fields[0],s.fields[0]),o=i[0],a=i[2],l=i[1];switch(a.tag){case 1:return[new Mt(r.PartnerId,r.InitialConfig,r.CanEdit,new gn(4,[o]),r.Modal),T1(y([Jd(c=>new jt(2,[c]),l),ee(c=>{c(new jt(3,[]))})]))];case 2:return[r,ee(c=>{c(new jt(1,[]))})];default:return[new Mt(r.PartnerId,r.InitialConfig,r.CanEdit,new gn(4,[o]),r.Modal),Jd(c=>new jt(2,[c]),l)]}}else return[r,z()]}case 3:return[new Mt(r.PartnerId,r.InitialConfig,r.CanEdit,r.Page,new pn(2,[!1])),z()];case 4:{const s=r.Page;if(s.tag===4){const i=s.fields[0];return[new Mt(r.PartnerId,r.InitialConfig,r.CanEdit,new gn(4,[new bt(i.Config,!0,i.ValidationErrors)]),new pn(2,[!0])),ee(o=>{o(new jt(5,[]))})]}else return[r,z()]}case 5:{const s=r.Page;if(s.tag===4){const i=s.fields[0];return[r,cr(o=>{ur(o)},e,new Uu(i.Config.Issuer,i.Config.OpenIdConfigUrl,au(At(o=>[o.Key,o.Value],i.Config.RequiredClaims),{Compare:Rn})),o=>new jt(6,[o]))]}else return[r,z()]}case 6:if(n.fields[0].tag===1){const s=r.Page;if(s.tag===4){const i=s.fields[0];return[new Mt(r.PartnerId,r.InitialConfig,r.CanEdit,new gn(4,[new bt(i.Config,!1,i.ValidationErrors)]),new pn(0,[])),z()]}else return[new Mt(r.PartnerId,r.InitialConfig,r.CanEdit,new gn(2,[n.fields[0].fields[0]]),new pn(0,[])),z()]}else return[new Mt(r.PartnerId,n.fields[0].fields[0],r.CanEdit,new gn(3,[n.fields[0].fields[0]]),new pn(0,[])),z()];default:return[new Mt(r.PartnerId,r.InitialConfig,r.CanEdit,r.Page,new pn(1,[!1])),z()]}}function Bx(e){const t=e.disableAdvancedSecurity,n=e.saveAdvancedSecurity,r=e.roles,s=e.config,i=e.partnerId;let o;const a=Vx(i,s,r);o=Hn(()=>zn(()=>a,($,w)=>Lx(n,t,$,w),($,w)=>{}),void 0,void 0);const l=o[0],c=o[1],d=l.CanEdit?()=>{c(new jt(0,[]))}:void 0,u=l.CanEdit?()=>{c(new jt(7,[]))}:void 0,m=f("div",{className:"justify-start self-stretch text-xl leading-normal font-semibold text-gray-900",children:"Advanced Security Configuration"}),h=f("div",{className:"justify-start self-stretch text-sm font-normal text-gray-700",children:"Configure advanced security settings for OAuth 2 authentication."}),p=J(k(()=>{let $;return R(x(f("div",_(y([["className","mx-auto max-w-7xl m-6 gap-4 flex flex-col"],($=J(k(()=>R(x(f("div",{className:"flex flex-col gap-2",children:b.Children.toArray([m,h])})),k(()=>{const w=l.Page;let S,A,E,P;switch(w.tag){case 4:{S=2,E=w.fields[0];break}case 0:{S=3;break}case 1:{S=4,P=w.fields[0];break}case 2:{S=4,P=w.fields[0];break}default:w.fields[0].tag===1?S=1:(S=0,A=w.fields[0].fields[0])}switch(S){case 0:return x(Nx(A,d,u));case 1:return x(Tx(d));case 2:return x(kx(E,V=>{c(new jt(2,[V]))}));case 3:return x(f("div",{className:"text-gray-500",children:"Loading..."}));default:return x(f("div",{className:"text-red-600",children:`Error: ${P}`}))}})))),["children",b.Children.toArray(Array.from($))])])))),k(()=>{const w=l.Modal;return w.tag===2?x(Px(()=>{c(new jt(8,[]))},()=>{c(new jt(4,[]))},w.fields[0])):w.tag===0?x(ie()):x(Fx(()=>{c(new jt(8,[]))},()=>{c(new jt(9,[]))},w.fields[0]))}))}));return f(be,{},...p)}let zl=class extends Y{constructor(t,n){super(),this.Roles=t,this.LoadingStatus=n}};class Hl extends B{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Loading","Loaded","Failed"]}}let km=class extends B{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Initialise","ConfigLoaded"]}};function Ux(e,t){return[new zl(e,new Hl(0,[])),ee(n=>{n(new km(0,[]))})]}function jx(e,t,n){return t.tag===1?t.fields[0].tag===1?[new zl(n.Roles,new Hl(2,[t.fields[0].fields[0]])),z()]:[new zl(n.Roles,new Hl(1,[t.fields[0].fields[0]])),z()]:[n,cr(r=>{ur(r)},e,void 0,r=>new km(1,[r]))]}function Wl(e){let t;return f("div",_(y([["className","mx-auto max-w-7xl"],(t=[f("div",{className:"mx-auto max-w-3xl",children:b.Children.toArray([e])})],["children",b.Children.toArray(Array.from(t))])])))}function zx(e){const t=e.disableSecurityConfig,n=e.saveSecurityConfig,r=e.loadSecurityConfig,s=e.roles,i=e.partnerId,o=Hn(()=>zn(()=>Ux(s),(a,l)=>jx(r,a,l),(a,l)=>{}),void 0,void 0)[0].LoadingStatus;switch(o.tag){case 1:return Wl(f(Bx,{partnerId:i,config:o.fields[0],roles:s,saveAdvancedSecurity:n,disableAdvancedSecurity:t}));case 2:return Wl(f("div",{children:b.Children.toArray(["We are unable to load the Security config at this time."])}));default:return Wl(f("div",{children:b.Children.toArray(["Loading security configuration..."])}))}}let Yn=class extends B{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Key","Appear","Show","ClassName","Enter","EnterFrom","EnterTo","Leave","LeaveFrom","LeaveTo","Children"]}};function Hx(e){const t=rr(e,1);return f(Wv,t)}function To(e,t){let n;return f("div",_(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),ie())],["children",b.Children.toArray(Array.from(n))])])))}function st(e,t){let n;return f("div",_(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",b.Children.toArray(Array.from(n))])])))}function Gl(e){let t,n;const r=e.value,s=e.label,i=lr(!1),o=i[0],a=i[1];return a1(()=>{ds(I.Delay(()=>o?I.Bind(Qa(2e3),()=>(a(!1),I.Zero())):I.Zero()))}),f("div",_(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",_(y([["className","flex mt-1 text-sm leading-6 text-primary-700 sm:col-span-2 sm:mt-0 relative"],(n=[Hx(y([new Yn(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 Yn(2,[o]),new Yn(4,["transition-opacity ease-in duration-100"]),new Yn(5,["opacity-0"]),new Yn(6,["opacity-90"]),new Yn(7,["transition-opacity ease-out duration-500"]),new Yn(8,["opacity-90"]),new Yn(9,["opacity-0"]),new Yn(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",b.Children.toArray(Array.from(n))]),["onClick",l=>{navigator.clipboard.writeText(r),a(!0)}]])))],["children",b.Children.toArray(Array.from(t))])])))}function Ro(e,t){let n;const r=y([e,f("div",_(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:b.Children.toArray(Array.from(t))})],["children",b.Children.toArray(Array.from(n))])])))]);return f("div",{children:b.Children.toArray(Array.from(r))})}function Wx(e){const t=Bn(xn);return Ro(To("Partner Information",void 0),J(k(()=>{let n;return R(x((n=["ID",is(e.StreamId)],f(Gl,{label:n[0],value:n[1]}))),k(()=>{let r;return R(x((r=["Name",Ji(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(x((o=["Contact",`${vu(i.FirstName)} ${Cu(i.LastName)}`],st(o[0],o[1]))),k(()=>{let a;return x((a=["Phone",ku(i.MobilePhone)],st(a[0],a[1])))}))):He()):He(),k(()=>{let a;return R(x((a=["Website",bu(e.Website)],st(a[0],a[1]))),k(()=>{let l;return x((l=["Notes",We(Qg(e.Notes),"")],st(l[0],l[1])))}))}))}))}))})))}let yr=class extends B{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Details","AccountList","SuperConfiguration","BenefitsOnboardingConfiguration","BankDetailsConfiguration","ProfileDirectory","Workspace","Security"]}};class Gx extends Y{constructor(t,n,r){super(),this.PartnerId=t,this.BackendUrl=n,this.AccessToken=r}}class qx extends Y{constructor(t,n,r){super(),this.PartnerId=t,this.BackendUrl=n,this.AccessToken=r}}class Kx extends Y{constructor(t,n,r){super(),this.PartnerId=t,this.BackendUrl=n,this.AccessToken=r}}class Zx extends Y{constructor(t,n,r){super(),this.PartnerId=t,this.BackendUrl=n,this.AccessToken=r}}class Jx extends Y{constructor(t,n,r){super(),this.PartnerId=t,this.BackendUrl=n,this.AccessToken=r}}class Yx extends Y{constructor(t,n,r){super(),this.PartnerId=t,this.BackendUrl=n,this.AccessToken=r}}function Xx(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";case 7:return"Security";default:return"Details"}}function Qx(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;case 7:return e.fields[0].PartnerId;default:return Le(is(e.fields[0].StreamId))}}function eC(e){const t=At(n=>mh(Xx(e),n[0],Rr(Js(n[1](Qx(e))))),y([["Details",n=>new K(1,[n])],["Accounts",n=>new K(3,[n])],["Super",n=>new K(4,[n])],["Benefits",n=>new K(5,[n])],["Bank Details",n=>new K(6,[n])],["Directory",n=>new K(2,[n])],["Security",n=>new K(8,[n])]]));return f(ph,{headers:t})}const ql=e=>I.Bind(e,t=>{let n;const r=t;return n=r.tag===1?new g(1,[r.fields[0]]):new g(0,[bb(r.fields[0])]),I.Return(n)});function tC(e,t){switch(t.tag){case 1:return f(yx,t.fields[0]);case 2:return f(_m,{partnerId:t.fields[0].PartnerId,backendUrl:t.fields[0].BackendUrl,accessToken:t.fields[0].AccessToken});case 3:return f(vm,{partnerId:t.fields[0].PartnerId,backendUrl:t.fields[0].BackendUrl,accessToken:t.fields[0].AccessToken});case 4:return f(xm,{partnerId:t.fields[0].PartnerId,backendUrl:t.fields[0].BackendUrl,accessToken:t.fields[0].AccessToken});case 5:return f(Cm,{partnerId:t.fields[0].PartnerId,backendUrl:t.fields[0].BackendUrl,accessToken:t.fields[0].AccessToken});case 6:return f(Sm,{backendUrl:t.fields[0].BackendUrl,accessToken:t.fields[0].AccessToken,partnerId:t.fields[0].PartnerId});case 7:{const n=t.fields[0].PartnerId,r=t.fields[0].BackendUrl,s=t.fields[0].AccessToken;return f(zx,{partnerId:n,roles:e,loadSecurityConfig:()=>ql(Fy(r,s,n)),saveSecurityConfig:i=>ql(Vy(r,s,n,i)),disableSecurityConfig:()=>ql(Ly(r,s,n))})}default:return f(Wx,t.fields[0])}}function Em(e){let t,n;const r=e.mode,s=Bn(xn);return f("div",_(y([["className","flex flex-row"],(t=[eC(r),f("div",_(y([["className","w-full"],(n=[tC(s.Roles,r)],["children",b.Children.toArray(Array.from(n))])])))],["children",b.Children.toArray(Array.from(t))])])))}let Mo=class extends B{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["backend-url","access-token","partner-id","account-id"]}};function nC(e){const t=e.accessToken,n=e.backendUrl,r=e.accountId,s=e.partnerId,i=k(()=>R(x(new Mo(1,[t])),k(()=>R(x(new Mo(0,[n])),k(()=>R(x(new Mo(2,[qi(s)])),k(()=>x(new Mo(3,[Ki(r)])))))))));return f("superhero-import-app",rr(i,1))}class Kl extends B{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["backend-url","access-token","account-id"]}}function rC(e){const t=e.accessToken,n=e.backendUrl,r=e.accountId,s=k(()=>R(x(new Kl(1,[t])),k(()=>R(x(new Kl(0,[n])),k(()=>x(new Kl(2,[Ki(r)])))))));return f("superhero-salpac-profile-admin",rr(s,1))}class sC extends B{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["RedirectionOff","RedirectionOn","Complete"]}}function Po(){return Wo("AccountRegistry.AdminUI.FlareIdentityService.MigrationStateDto",[],sC,()=>[[["lastUpdated",$e(Ti("System.DateTime"))]],[["lastUpdated",Ti("System.DateTime")]],[["lastUpdated",Ti("System.DateTime")]]])}function Do(e){return`${e}/flare-identity/admin`}const iC=5,oC=1e3;function Im(e,t,n,r){return I.Delay(()=>{const s=oo(hl(sn(en("Bearer %s"))(n)),r);return I.Bind(ml(s),i=>{let o,a;const l=i,c=l.statusCode|0;return o=c|0,o>=200&&o<=299?I.Return(l):(a=c|0,(a===429?!0:a>=500)&&e>=1?I.Bind(Qa(t),()=>I.ReturnFrom(Im(e-1,t,n,r))):I.Return(l))})})}const Oo=e=>t=>Im(iC,oC,e,t);function aC(e,t,n,r){return I.Delay(()=>{let s;const i=Oo(t)(Lt(new Et(0,[]),It(`${Do(e)}/accounts/${n}/migration`)));return s=I.Bind(i,o=>I.Return(new g(0,[o]))),I.Bind(s,o=>{const a=o;if(a.tag===1)return I.Return(new g(1,[a.fields[0]]));{const l=a.fields[0];if(l.statusCode===200){const c=Ft(pe(Vt(Po(),new qe(1,[]))),l.responseText);return I.Return(c)}else return I.Return(new g(1,["Unexpected response from flare identity backend"]))}})})}function lC(e,t,n,r){return I.Delay(()=>{let s;const i=Oo(t)(Lt(new Et(2,[]),It(`${Do(e)}/accounts/${n}/migration/start`)));return s=I.Bind(i,o=>I.Return(new g(0,[o]))),I.Bind(s,o=>{const a=o;if(a.tag===1)return I.Return(new g(1,[a.fields[0]]));{const l=a.fields[0];if(l.statusCode===200){let c;const d=Ft(pe(Vt(Po(),new qe(1,[]))),l.responseText);return c=I.Return(d),I.Bind(c,u=>{const m=u;if(m.tag===1)return I.Return(new g(1,[m.fields[0]]));{const h=m.fields[0];return h.tag===1?I.Return(new g(0,[h.fields[0]])):I.Return(new g(1,["Unexpected migration state after starting migration"]))}})}else return I.Return(new g(1,["Unexpected response from flare identity backend"]))}})})}function cC(e,t,n,r){return I.Delay(()=>{let s;const i=Oo(t)(Lt(new Et(2,[]),It(`${Do(e)}/accounts/${n}/migration/rollback`)));return s=I.Bind(i,o=>I.Return(new g(0,[o]))),I.Bind(s,o=>{const a=o;if(a.tag===1)return I.Return(new g(1,[a.fields[0]]));{const l=a.fields[0];if(l.statusCode===200){let c;const d=Ft(pe(Vt(Po(),new qe(1,[]))),l.responseText);return c=I.Return(d),I.Bind(c,u=>{const m=u;return m.tag===1?I.Return(new g(1,[m.fields[0]])):m.fields[0].tag===0?I.Return(new g(0,[void 0])):I.Return(new g(1,["Unexpected migration state after rolling back migration"]))})}else return I.Return(new g(1,["Unexpected response from flare identity backend"]))}})})}function uC(e,t,n,r){return I.Delay(()=>{let s;const i=Oo(t)(Lt(new Et(2,[]),It(`${Do(e)}/accounts/${n}/migration/stop`)));return s=I.Bind(i,o=>I.Return(new g(0,[o]))),I.Bind(s,o=>{const a=o;if(a.tag===1)return I.Return(new g(1,[a.fields[0]]));{const l=a.fields[0];if(l.statusCode===200){let c;const d=Ft(pe(Vt(Po(),new qe(1,[]))),l.responseText);return c=I.Return(d),I.Bind(c,u=>{const m=u;if(m.tag===1)return I.Return(new g(1,[m.fields[0]]));{const h=m.fields[0];return h.tag===2?I.Return(new g(0,[h.fields[0]])):I.Return(new g(1,["Unexpected migration state after stopping migration"]))}})}else return I.Return(new g(1,["Unexpected response from flare identity backend"]))}})})}class Wr extends B{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["RedirectionOff","RedirectionOn","Complete","Failed"]}}class _s extends B{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["ConfirmStartRedirection","ConfirmRollbackRedirection","ConfirmStopMigration"]}}function Zl(e){switch(e.tag){case 1:return new _s(1,[!0]);case 2:return new _s(2,[!0]);default:return new _s(0,[!0])}}class En extends Y{constructor(t,n){super(),this.Status=t,this.CurrentModal=n}}let $n=class extends B{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["ShowModal","HideModal","RequestStartRedirection","RedirectionStarted","RequestRollbackRedirection","RedirectionRolledBack","RequestStopMigration","MigrationStopped","OperationFailed"]}};function dC(e,t){return[new En(e,void 0),z()]}function fC(e,t,n,r,s){switch(r.tag){case 1:return[new En(s.Status,void 0),z()];case 2:return[new En(s.Status,Ge(Zl,s.CurrentModal)),ps(e,void 0,i=>new $n(3,[i]),i=>new $n(8,[i]))];case 3:return[new En(new Wr(1,[r.fields[0]]),void 0),z()];case 4:return[new En(s.Status,Ge(Zl,s.CurrentModal)),ps(t,void 0,()=>new $n(5,[void 0]),i=>new $n(8,[i]))];case 5:return[new En(new Wr(0,[]),void 0),z()];case 6:return[new En(s.Status,Ge(Zl,s.CurrentModal)),ps(n,void 0,i=>new $n(7,[i]),i=>new $n(8,[i]))];case 7:return[new En(new Wr(2,[r.fields[0]]),void 0),z()];case 8:return[new En(new Wr(3,[r.fields[0]]),void 0),z()];default:return[new En(s.Status,r.fields[0]),z()]}}function hC(e,t,n){let r,s,i,o,a,l,c,d,u,m,h,p,$,w;return f(fr,{onClose:e,child:(r=[f("div",{className:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity","aria-hidden":!0}),f("div",_(y([["className","fixed inset-0 z-10 w-screen overflow-y-auto h-full flex items-center justify-center"],["onClick",S=>{e()}],(s=[f("div",_(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",S=>{S.preventDefault(),S.stopPropagation()}],(o=[f("div",_(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:b.Children.toArray([ii])})],["children",b.Children.toArray(Array.from(a))])]))),f("div",_(y([["className","flex-1 inline-flex flex-col justify-start items-start gap-4"],(l=[f("div",_(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",_(y([["className","self-stretch justify-start"],(d=[f("div",{className:"text-gray-700 text-sm font-normal leading-5",children:b.Children.toArray(["Employees will be able to log into HRIS again."])})],["children",b.Children.toArray(Array.from(d))])])))],["children",b.Children.toArray(Array.from(c))])]))),f("div",_(y([["className","self-stretch inline-flex justify-end items-center gap-3"],(u=[f("button",_(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:S=>{e()}})],["children",b.Children.toArray(Array.from(h))])]))),f("div",_(y([["className","flex justify-start items-start gap-2"],(p=[f("button",_(y([($="min-h-[34px] px-[13px] py-[9px] bg-[#2563EB] rounded-md flex justify-center items-center overflow-hidden",["className",$]),(w=J(k(()=>R(x(f("div",{className:"justify-start text-white text-sm font-medium leading-none",children:"Turn off redirection",onClick:S=>{t()}})),k(()=>n?x(f("span",{className:"animate-spin",children:b.Children.toArray([oi])})):He())))),["children",b.Children.toArray(Array.from(w))])])))],["children",b.Children.toArray(Array.from(p))])])))],["children",b.Children.toArray(Array.from(u))])])))],["children",b.Children.toArray(Array.from(l))])])))],["children",b.Children.toArray(Array.from(o))])])))],["children",b.Children.toArray(Array.from(s))])])))],f(be,{},...r))})}function mC(e,t,n){let r,s,i,o,a,l,c,d,u,m,h,p,$,w,S,A;return f(fr,{onClose:e,child:(r=[f("div",{className:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity","aria-hidden":!0}),f("div",_(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",_(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",_(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:b.Children.toArray([ii])})],["children",b.Children.toArray(Array.from(a))])]))),f("div",_(y([["className","flex-1 inline-flex flex-col justify-start items-start gap-4"],(l=[f("div",_(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",_(y([["className","self-stretch justify-start"],(d=[f("div",_(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",b.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",b.Children.toArray(Array.from(d))])])))],["children",b.Children.toArray(Array.from(c))])]))),f("div",_(y([["className","self-stretch inline-flex justify-end items-center gap-3"],(h=[f("button",_(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",b.Children.toArray(Array.from($))])]))),f("div",_(y([["className","flex justify-start items-start gap-2"],(w=[f("button",_(y([(S="min-h-[34px] px-[13px] py-[9px] bg-[#2563EB] rounded-md flex justify-center items-center overflow-hidden",["className",S]),(A=J(k(()=>R(x(f("div",{className:"justify-start text-white text-sm font-medium leading-none",children:"Finalise redirection",onClick:E=>{t()}})),k(()=>n?x(f("span",{className:"animate-spin",children:b.Children.toArray([oi])})):He())))),["children",b.Children.toArray(Array.from(A))])])))],["children",b.Children.toArray(Array.from(w))])])))],["children",b.Children.toArray(Array.from(h))])])))],["children",b.Children.toArray(Array.from(l))])])))],["children",b.Children.toArray(Array.from(o))])])))],["children",b.Children.toArray(Array.from(s))])])))],f(be,{},...r))})}function pC(e,t,n){let r,s,i,o,a,l,c,d,u,m,h,p,$,w,S,A;return f(fr,{onClose:e,child:(r=[f("div",{className:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity","aria-hidden":!0}),f("div",_(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",_(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",_(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:b.Children.toArray([ii])})],["children",b.Children.toArray(Array.from(a))])]))),f("div",_(y([["className","flex-1 inline-flex flex-col justify-start items-start gap-4"],(l=[f("div",_(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",_(y([["className","self-stretch justify-start"],(d=[f("div",_(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",b.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",b.Children.toArray(Array.from(d))])])))],["children",b.Children.toArray(Array.from(c))])]))),f("div",_(y([["className","self-stretch inline-flex justify-end items-center gap-3"],(h=[f("button",_(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",b.Children.toArray(Array.from($))])]))),f("div",_(y([["className","flex justify-start items-start gap-2"],(w=[f("button",_(y([(S="min-h-[34px] px-[13px] py-[9px] bg-[#2563EB] rounded-md flex justify-center items-center overflow-hidden",["className",S]),(A=J(k(()=>R(x(f("div",{className:"justify-start text-white text-sm font-medium leading-none",children:"Turn on redirection",onClick:E=>{t()}})),k(()=>n?x(f("span",{className:"animate-spin",children:b.Children.toArray([oi])})):He())))),["children",b.Children.toArray(Array.from(A))])])))],["children",b.Children.toArray(Array.from(w))])])))],["children",b.Children.toArray(Array.from(h))])])))],["children",b.Children.toArray(Array.from(l))])])))],["children",b.Children.toArray(Array.from(o))])])))],["children",b.Children.toArray(Array.from(s))])])))],f(be,{},...r))})}const gC=f("h3",{className:"justify-start text-xl leading-6 font-semibold text-gray-900",children:"HRIS Migration - Redirection"}),$C=f("div",_(y([["className","flex flex-col gap-2"],(()=>{let e,t,n,r;const s=[f("div",_(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",_(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",b.Children.toArray(Array.from(t))])])))],["children",b.Children.toArray(Array.from(e))])]))),f("button",_(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"}),Db],["children",b.Children.toArray(Array.from(r))])])))];return["children",b.Children.toArray(Array.from(s))]})()])));function Nm(e,t,n,r){return f("button",_(J(k(()=>R(x(["type","button"]),k(()=>R(x(["className",re(" ",J(k(()=>R(x("flex min-h-9 items-center justify-center overflow-hidden rounded-md"),k(()=>R(x("px-4 py-2.5 text-sm font-medium leading-none"),k(()=>R(x("focus-visible:outline-2 focus-visible:outline-offset-2"),k(()=>R(x("disabled:bg-gray-300 disabled:text-gray-500 disabled:cursor-not-allowed disabled:border-gray-300"),k(()=>e)))))))))))]),k(()=>R(x(["children",n]),k(()=>R(x(["onClick",r]),k(()=>t.tag===0?Ve():y([["disabled",!0],["title",t.fields[0]]])))))))))))))}const wC=e=>t=>n=>Nm(["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),Tm=e=>t=>n=>Nm(["bg-white text-gray-700 outline outline-1 outline-offset-[-1px] outline-gray-300 focus-visible:outline-gray-500"],e,t,n);function yC(e,t){let n,r,s,i,o,a,l,c,d,u;return f("div",_(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",_(y([["className","self-stretch flex flex-col justify-start items-start gap-2"],(s=[f("div",_(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",_(y([["className","flex justify-start items-start"],(o=[f("div",_(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",b.Children.toArray(Array.from(a))])])))],["children",b.Children.toArray(Array.from(o))])])))],["children",b.Children.toArray(Array.from(i))])])))],["children",b.Children.toArray(Array.from(s))])]))),f("div",_(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",_(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",_(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",b.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",b.Children.toArray(Array.from(l))])]))),f("div",_(y([["className","inline-flex justify-start items-start gap-2"],(u=[wC(e)("Turn on redirection")(t)],["children",b.Children.toArray(Array.from(u))])])))],["children",b.Children.toArray(Array.from(r))])])))}function bC(e,t,n,r){let s,i,o,a,l,c,d,u,m,h,p,$,w,S,A,E;const P=es(t,"dd/MM/yyyy");return f("div",_(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",_(y([["className","self-stretch flex flex-col justify-start items-start gap-2"],(o=[f("div",_(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",_(y([["className","flex justify-start items-start"],(l=[f("div",_(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",_(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",b.Children.toArray(Array.from(d))])]))),f("div",{className:"text-center justify-start text-gray-800 text-xs font-medium leading-none",children:"Active"})],["children",b.Children.toArray(Array.from(c))])])))],["children",b.Children.toArray(Array.from(l))])])))],["children",b.Children.toArray(Array.from(a))])]))),f("div",_(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 ${P}`})],["children",b.Children.toArray(Array.from(u))])])))],["children",b.Children.toArray(Array.from(o))])]))),f("div",_(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",_(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",_(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",b.Children.toArray(Array.from(h))])])))],["children",b.Children.toArray(Array.from(m))])]))),f("div",_(y([["className","inline-flex justify-start items-start gap-2"],($=[Tm(e)("Turn off redirection")(n)],["children",b.Children.toArray(Array.from($))])]))),f("div",_(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",b.Children.toArray(Array.from(w))])]))),f("div",_(y([["className","self-stretch justify-start"],(S=[f("div",{className:"text-black text-sm font-semibold leading-tight tracking-tight",children:b.Children.toArray(["Has the migration finished?"])}),f("div",_(y([["className","mt-4 text-black text-sm font-normal leading-tight tracking-tight"],(A="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",A])])))],["children",b.Children.toArray(Array.from(S))])]))),f("div",_(y([["className","inline-flex justify-start items-start gap-2"],(E=[Tm(e)("Finalise redirection")(r)],["children",b.Children.toArray(Array.from(E))])])))],["children",b.Children.toArray(Array.from(i))])])))}function _C(e){let t,n,r,s,i,o,a;const l=es(e,"dd/MM/yyyy");return f("div",_(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",_(y([["className","self-stretch flex flex-col justify-start items-start gap-2"],(r=[f("div",_(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",_(y([["className","flex justify-start items-start"],(i=[f("div",_(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",b.Children.toArray(Array.from(o))])])))],["children",b.Children.toArray(Array.from(i))])])))],["children",b.Children.toArray(Array.from(s))])]))),f("div",_(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",b.Children.toArray(Array.from(a))])])))],["children",b.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",b.Children.toArray(Array.from(n))])])))}function vC(e){let t,n;const r=e.stopMigration,s=e.rollbackRedirection,i=e.startRedirection,o=e.migrationStatus,a=e.roles,l=Hn(()=>zn(()=>dC(o),(p,$)=>fC(i,s,r,p,$),(p,$)=>{}),void 0,void 0),c=l[0],d=l[1],u=p=>{d(new $n(0,[p]))},m=()=>{d(new $n(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",_(y([["className","flex flex-col gap-4 bg-gray-100"],(t=[gC,$C,f("div",_(y([["className","flex mb-4 gap-6 flex-col"],(n=J(k(()=>{let p;return R((p=c.Status,p.tag===1?x(bC(h,p.fields[0],$=>{u(new _s(1,[!1]))},$=>{u(new _s(2,[!1]))})):p.tag===2?x(_C(p.fields[0])):p.tag===3?x(f("div",{className:"text-red-600",children:`Operation failed: ${p.fields[0]}`})):x(yC(h,$=>{u(new _s(0,[!1]))}))),k(()=>{let $,w,S;const A=c.CurrentModal;return A==null?x(ie()):A.tag===1?($=A.fields[0],x(hC(m,()=>{d(new $n(4,[]))},$))):A.tag===2?(w=A.fields[0],x(mC(m,()=>{d(new $n(6,[]))},w))):(S=A.fields[0],x(pC(m,()=>{d(new $n(2,[]))},S)))}))})),["children",b.Children.toArray(Array.from(n))])])))],["children",b.Children.toArray(Array.from(t))])])))}let Rm=class extends B{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Initialise","LoadedMigrationStatus"]}},yi=class extends B{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Loading","Loaded","Failed"]}};function xC(){return[new yi(0,[]),ee(e=>{e(new Rm(0,[]))})]}function CC(e,t,n){if(t.tag===1){if(t.fields[0].tag===1)return[new yi(2,[]),z()];switch(t.fields[0].fields[0].tag){case 1:return[new yi(1,[new Wr(1,[t.fields[0].fields[0].fields[0]])]),z()];case 2:return[new yi(1,[new Wr(2,[t.fields[0].fields[0].fields[0]])]),z()];default:return[new yi(1,[new Wr(0,[])]),z()]}}else return[n,cr(r=>{ur(r)},e,void 0,r=>new Rm(1,[r]))]}function SC(e){const t=e.flareAccountId,n=Bn(xn),r=Hn(()=>zn(xC,(i,o)=>CC(()=>aC(n.BackendUrl,n.AccessToken,t),i,o),(i,o)=>{}),void 0,void 0)[0],s=J(k(()=>r.tag===1?x(f(vC,{roles:n.Roles,migrationStatus:r.fields[0],startRedirection:()=>lC(n.BackendUrl,n.AccessToken,t),rollbackRedirection:()=>cC(n.BackendUrl,n.AccessToken,t),stopMigration:()=>uC(n.BackendUrl,n.AccessToken,t)})):r.tag===2?x(f("div",{children:"We are unable to load the HRIS Migration component at this time."})):x(f("div",{children:"Loading..."}))));return f("div",{children:b.Children.toArray(Array.from(s))})}function AC({hasLegalEntity:e,defaultValues:t,validateName:n,validateBusinessName:r,validateBusinessNumber:s,validateExternalId:i,onSubmit:o,closeModal:a}){const{handleSubmit:l,control:c}=po({mode:"onChange",defaultValues:t});return M(be,{children:[M("div",{className:"font-bold text-lg mb-4",children:"Account details"}),M("form",{className:"space-y-6",onSubmit:l(o),children:[M("div",{children:[M(_t,{label:"Name",name:"Name",control:c,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."})]}),M(_t,{label:"External ID",name:"ExternalId",control:c,placeholder:"e.g. 123456",validate:i,optional:!0}),e&&M(_t,{label:"Business Name",name:"BusinessName",control:c,placeholder:"e.g. ACME LTD PTY",validate:r}),e&&M(_t,{label:"Business Number",name:"BusinessNumber",control:c,validate:s,isNumber:!0}),M(go,{primaryLabel:"Update",secondaryLabel:"Cancel",secondaryOnClick:a})]})]})}function kC(e){let t,n;switch(e==null||yn(e)?t=1:(t=0,n=e),t){case 0:return gt(e$(n));default:return!0}}function EC(e,t,n){return f(AC,{hasLegalEntity:n.LegalEntity!=null,defaultValues:new Vb(n.Name,n.ExternalId,We(Ge(r=>r.BusinessName,n.LegalEntity),""),We(Ge(r=>r.BusinessNumber,n.LegalEntity),"")),validateName:r=>gt($a(r)),validateBusinessName:r=>gt(Iu(r)),validateBusinessNumber:r=>gt(Nu(r)),validateExternalId:kC,onSubmit:r=>{const s=new uf(r.Name.trim(),Hp(i=>{if(!yn(i))return i.trim()},r.ExternalId),Ge(i=>new df(r.BusinessName.trim(),r.BusinessNumber.trim()),n.LegalEntity));Se(s,n)?e():t(s)},closeModal:e})}function IC(e){const t=e.account,n=e.updateAccount,r=Bn(xn),s=lr(!1),i=s[1],o=J(k(()=>{let a;return R(x(Ro(f("div",_(y([["className","flex flex-row space-x-4 items-center"],(a=[To("Account Information",void 0),f("button",{className:re(" ",J(k(()=>R(r.Roles.ProvisionAccounts?He():x("hidden"),k(()=>x("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:b.Children.toArray([Tb])})],["children",b.Children.toArray(Array.from(a))])]))),J(k(()=>{let l;return R(x((l=["ID",t.StreamId],f(Gl,{label:l[0],value:l[1]}))),k(()=>{let c;return R(x((c=["Provisioning Mode",Pu(t.ProvisioningMode)],st(c[0],c[1]))),k(()=>{let d;return R(x((d=["Name",t.Name],f(Gl,{label:d[0],value:d[1]}))),k(()=>{let u;return R(x((u=["External ID",We(t.ExternalId,"")],st(u[0],u[1]))),k(()=>{let m;return R(x((m=["Channel ID",We(t.ChannelId,"")],st(m[0],m[1]))),k(()=>{let h;if(r.Roles.ReadProtectedData){const p=t.ContactDetails;if(p!=null){const $=p;return R(x((h=["Contact",`${$.FirstName} ${$.LastName}`],st(h[0],h[1]))),k(()=>{let w;return R(x((w=["Phone",$.MobilePhone],st(w[0],w[1]))),k(()=>{let S;return x((S=["Email",$.Email],st(S[0],S[1])))}))}))}else return He()}else return He()}))}))}))}))}))})))),k(()=>{let l,c,d,u,m,h,p;return s[0]?x((l=()=>{i(!1)},c=new uf(t.Name,t.ExternalId,Ge($=>new df($.BusinessName,$.BusinessNumber),t.LegalEntity)),f(fr,{onClose:l,child:f("div",_(ee((d=[f("div",{className:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity","aria-hidden":!0}),f("div",_(y([["className","fixed inset-0 z-10 w-screen overflow-y-auto"],(u=[f("div",_(y([["className","fixed inset-0 z-10 w-screen overflow-y-auto h-full flex items-center justify-center"],(m=[f("div",_(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",_(y([["className","pt-4 mx-6"],(p=[f("div",{className:"mb-4 text-sm font-normal text-gray-500",children:b.Children.toArray(["Fields are required unless marked as optional."])}),EC(l,$=>{n($),i(!1)},c)],["children",b.Children.toArray(Array.from(p))])])))],["children",b.Children.toArray(Array.from(h))])])))],["children",b.Children.toArray(Array.from(m))])])))],["children",b.Children.toArray(Array.from(u))])])))],["children",b.Children.toArray(Array.from(d))]))))}))):He()}))}));return f(be,{},...o)}function NC(e){let t,n,r,s,i,o,a;if(e==null)return ie();{const l=e;return Ro(To("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 TC(e){let t;if(e==null)return ie();{const n=e;return Ro(To("Legal Entity",void 0),ee((t=["Notes",n],st(t[0],t[1]))))}}function RC(e){const t=e.account,n=e.updateAccount,r=y([f(IC,{updateAccount:n,account:t}),NC(t.LegalEntity),TC(t.Notes)]);return f("div",{children:b.Children.toArray(Array.from(r))})}class Xn extends B{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Details","ProfilesDirectory","Users","SuperConfiguration","BenefitsOnboardingConfiguration","BankDetailsConfiguration","SalaryPackagingConfiguration","Workspace","HrisMigration"]}}function MC(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 PC(e,t){const n=[e,t];return Se(n[0],Le("7cb0e66f-74b7-49f1-a3aa-be7970b48cb3"))||Se(n[0],Le("1c74bcf9-b795-42c6-88dc-d45c8f8827d4"))||Se(n[0],Le("89837631-c6b3-4635-a08d-fdd3383f4fbb"))?!0:Se(n[0],Le("e8269f8b-4f5e-482a-863e-4512cca40ec6"))}function DC(e,t,n){const r=[e,t],s=At(i=>mh(MC(n),i[0],Rr(Js(i[1](r)))),J(k(()=>R(x(["Details",i=>new K(9,[i[0],i[1]])]),k(()=>R(x(["Workspace",i=>new K(16,[i[0],i[1]])]),k(()=>R(x(["Directory",i=>new K(10,[i[0],i[1]])]),k(()=>R(x(["Users",i=>new K(11,[i[0],i[1]])]),k(()=>R(x(["Super",i=>new K(12,[i[0],i[1]])]),k(()=>R(x(["Benefits",i=>new K(13,[i[0],i[1]])]),k(()=>R(x(["Bank Details",i=>new K(14,[i[0],i[1]])]),k(()=>R(x(["Salary Packaging",i=>new K(15,[i[0],i[1]])]),k(()=>PC(r[0],r[1])?x(["HRIS Migration",i=>new K(17,[i[0],i[1]])]):He())))))))))))))))))));return f(ph,{headers:s})}function OC(e){const t=e.accountView,n=e.mode,r=e.props,s=e.updateAccount,i=Bn(xn),o=r.accountDetails,a=o[0],l=o[1];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:switch(n.tag){case 1:return f(Cm,{partnerId:a,accountId:l,backendUrl:i.BackendUrl,accessToken:i.AccessToken});case 2:return f(nC,{partnerId:a,accountId:l,backendUrl:i.BackendUrl,accessToken:i.AccessToken});case 3:return f(_m,{partnerId:a,accountId:l,backendUrl:i.BackendUrl,accessToken:i.AccessToken});case 4:return f(vm,{partnerId:a,accountId:l,backendUrl:i.BackendUrl,accessToken:i.AccessToken});case 5:return f(xm,{partnerId:a,accountId:l,backendUrl:i.BackendUrl,accessToken:i.AccessToken});case 6:return f(rC,{accountId:l,backendUrl:i.BackendUrl,accessToken:i.AccessToken});case 7:{const m=d.ProvisioningMode.tag===0?"Api":"Direct";return f(Sm,{backendUrl:i.BackendUrl,accessToken:i.AccessToken,partnerId:a,accountId:l,accountProvisioningMode:m})}case 8:{const m=d.ExternalId;return m==null?f(Jn,{error:"This account does not have externalId (Flare AccountId)"}):f(SC,{flareAccountId:m})}default:return f(RC,{updateAccount:s,account:d})}case 1:return f(Jn,{error:"There was an error retrieving account"});case 2:return f(So,null);default:{const m=ot(u);return f(Jn,{error:m})}}}function FC(e){let t,n,r;const s=e.account,i=e.mode,o=e.props,a=e.updateAccount;return f("div",_(y([["className","flex flex-row"],(t=[(n=o.accountDetails,DC(n[0],n[1],i)),f("div",_(y([["className","w-full"],(r=[f(OC,{updateAccount:a,props:o,mode:i,accountView:s})],["children",b.Children.toArray(Array.from(r))])])))],["children",b.Children.toArray(Array.from(t))])])))}class vs extends B{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["NotStarted","Started","Finished","Failed"]}}let Fo=class extends B{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["UpdateAccountId","Search","SearchSuccess","SearchFailure"]}},xs=class extends Y{constructor(t,n){super(),this.AccountId=t,this.AccountDetails=n}};function VC(){return[new xs(void 0,new vs(0,[])),z()]}function LC(e,t,n,r){let s,i;switch(n.tag){case 1:{const o=r.AccountId;if(o!=null){const a=o;return[new xs(r.AccountId,new vs(1,[])),ps(()=>Uy(e,t,a),void 0,l=>new Fo(2,[l]),l=>new Fo(3,[l]))]}else return[new xs(r.AccountId,new vs(3,["Account Id is required"])),z()]}case 2:{const o=n.fields[0];return[new xs(r.AccountId,new vs(2,[o])),(s=["account-registry","partners",`${o.PartnerId}`,"accounts",`${o.AccountId}`],i=[s[0],s[1],s[2],s[3],s[4]],Qe(a=>{ft(y(i))}))]}case 3:return[new xs(r.AccountId,new vs(3,["Account not found"])),z()];default:return[new xs(Gt(n.fields[0]),r.AccountDetails),z()]}}const BC=f("h3",{className:"text-base font-semibold text-gray-900",id:"modal-title",children:"Account Search"}),UC=f("div",_(y([["className","mt-2"],(()=>{let e;const t=[f("p",_(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",b.Children.toArray(Array.from(t))]})()])));function LC(e){let t,n,r,s;return f("div",_(y([["className","absolute right-0 top-0 hidden pr-4 pt-4 sm:block"],(t=[f("button",_(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",_(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",b.Children.toArray(Array.from(s))])])))],["children",b.Children.toArray(Array.from(r))])])))],["children",b.Children.toArray(Array.from(t))])])))}function BC(e,t,n,r){let s,i,o;return f("div",_(y([["className","mt-5 sm:flex sm:items-center"],(s=[f("div",_(y([["className","w-full sm:max-w-xs"],(i=[f("label",{className:"sr-only",for:"account-id",children:"Account Id"}),f("input",_(J(k(()=>R(x(["id","account-id"]),k(()=>R(x(["autoComplete","off"]),k(()=>{let a;return R(x((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(x(["placeholder","Account Id"]),k(()=>R(x(["disabled",!n]),k(()=>R(x(["onChange",l=>{e(l.target.value)}]),k(()=>{const l=r;return l==null?He():x(["value",qi(l)])}))))))))}))))))))],["children",b.Children.toArray(Array.from(i))])]))),f("button",_(y([["className",re(" ",["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=J(k(()=>x(n?f("span",{children:["Search"]}):f("span",{children:["Searching..."]})))),["children",b.Children.toArray(Array.from(o))]),["onClick",t],["disabled",!n]])))],["children",b.Children.toArray(Array.from(s))])])))}function UC(e){let t,n,r,s,i,o,a;const l=e.closeModal,c=Bn(xn),d=Hn(()=>zn(DC,(w,S)=>OC(c.BackendUrl,c.AccessToken,w,S),(w,S)=>{}),void 0,void 0),u=d[0],m=d[1],h=BC(w=>{m(new Do(0,[w]))},w=>{m(new Do(1,[]))},!Se(u.AccountDetails,new vs(1,[])),u.AccountId);let p;const $=u.AccountDetails;return p=$.tag===3?f("div",{className:re(" ",["mt-2 text-sm text-red-600"]),children:$.fields[0]}):ie(),f(fr,{onClose:l,child:f("div",_(y([["className","relative z-10"],["role",re(" ",["dialog"])],(t=[f("div",{className:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity","aria-hidden":!0}),f("div",_(y([["className","fixed inset-0 z-10 w-screen overflow-y-auto"],(n=[f("div",_(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",_(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=[LC(w=>{l()}),f("div",_(y([["className","sm:flex sm:items-start"],(o=[f("div",_(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",b.Children.toArray([yh])]]))),f("div",{className:"mt-3 text-center sm:ml-4 sm:mt-0 sm:text-left",children:b.Children.toArray([FC,VC,h,p])})],["children",b.Children.toArray(Array.from(o))])])))],["children",b.Children.toArray(Array.from(i))])])))],["children",b.Children.toArray(Array.from(r))])])))],["children",b.Children.toArray(Array.from(n))])])))],["children",b.Children.toArray(Array.from(t))])])))})}function jC(e,t){return Bi(n=>{const r=e.toLocaleLowerCase();return is(n.StreamId).toLocaleLowerCase().indexOf(r)>=0?!0:Zi(n.Name).toLocaleLowerCase().indexOf(r)>=0},t)}function zC(e){const t=Bn(xn),n=c0(c=>Zi(c.Name).toLocaleLowerCase(),e.partnerList,{Compare:Rn}),r=lr(n),s=lr(""),i=lr(!1),o=i[1],a=J(k(()=>R(x($r("ID")),k(()=>R(x($r("Name")),k(()=>R(t.Roles.ReadProtectedData?R(x($r("Contact")),k(()=>x($r("Phone")))):He(),k(()=>x($r("Website")))))))))),l=J(k(()=>R(i[0]?x(f(UC,{closeModal:()=>{o(!1)}})):x(ie()),k(()=>{let c;return R(x(f("div",_(y([["className","flex items-end place-content-between"],(c=[gh(s[0],"Partner ID or Name",d=>{s[1](d),r[1](jC(d,n))},()=>{}),f("button",{className:re(" ",["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:b.Children.toArray(["Account Search ",yh])})],["children",b.Children.toArray(Array.from(c))])])))),k(()=>x(ex(a,St(d=>{const u=is(d.StreamId),m=Le(u);return J(k(()=>{let h;return R(x((h=[Rr(Js(new K(1,[m]))),u],Qv(h[0],h[1]))),k(()=>R(x(xo(["text-gray-500"],Zi(d.Name))),k(()=>R(t.Roles.ReadProtectedData?R(x(xo(["text-gray-500"],We(Ge(p=>`${bu(p.FirstName)} ${vu(p.LastName)}`,d.ContactDetails),""))),k(()=>x(xo(["text-gray-500"],We(Ge(p=>Su(p.MobilePhone),d.ContactDetails),""))))):He(),k(()=>x(xo(["text-gray-500"],wu(d.Website)))))))))}))},r[0])))))}))));return f("div",{children:b.Children.toArray(Array.from(l))})}const HC=`*,: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}.m-6{margin:1.5rem}.-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-3xl{max-width:48rem}.max-w-4xl{max-width:56rem}.max-w-7xl{max-width:80rem}.max-w-\\[480px\\]{max-width:480px}.max-w-md{max-width:28rem}.max-w-screen-xl{max-width:1280px}.max-w-xs{max-width:20rem}.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-red-300{--tw-border-opacity: 1;border-color:rgb(252 165 165 / var(--tw-border-opacity))}.border-red-500{--tw-border-opacity: 1;border-color:rgb(239 68 68 / 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-amber-50{--tw-bg-opacity: 1;background-color:rgb(255 251 235 / var(--tw-bg-opacity))}.bg-blue-50{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity))}.bg-blue-700{--tw-bg-opacity: 1;background-color:rgb(29 78 216 / 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-red-600{--tw-bg-opacity: 1;background-color:rgb(220 38 38 / 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-normal{line-height:1.5}.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-amber-700{--tw-text-opacity: 1;color:rgb(180 83 9 / var(--tw-text-opacity))}.text-amber-800{--tw-text-opacity: 1;color:rgb(146 64 14 / 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-blue-800{--tw-text-opacity: 1;color:rgb(30 64 175 / 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\\:bg-red-50:hover{--tw-bg-opacity: 1;background-color:rgb(254 242 242 / 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-600:hover{--tw-text-opacity: 1;color:rgb(75 85 99 / 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\\:pr-6{padding-right: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))}}`,Tm=ot(HC);function Kl(){return(Kl=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 WC=["context","children"];function GC(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,WC);return Na(t,n)}function qC(){var e=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(e),this._vdom=f(GC,Kl({},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[Rm(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(Mm,{name:d},c):s[o]=c}var u=r?f(Mm,null,s):s;return f(r||n.nodeName.toLowerCase(),i,u)}(this,this._vdomComponent)),(this.hasAttribute("hydrate")?Ia:sr)(this._vdom,this._root)}function Rm(e){return e.replace(/-(\w)/g,function(t,n){return n?n.toUpperCase():""})}function KC(e,t,n){if(this._vdom){var r={};r[e]=n=n??void 0,r[Rm(e)]=n,this._vdom=Na(this._vdom,r),sr(this._vdom,this._root)}}function ZC(){sr(this._vdom=null,this._root)}function Mm(e,t){var n=this;return f("slot",Kl({},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 JC(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=qC,s.prototype.attributeChangedCallback=KC,s.prototype.disconnectedCallback=ZC,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 Pm(e,t){JC(e,t,void 0,{shadow:!0})}class Oo extends B{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Started","Finished"]}}class In extends B{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["API","Direct"]}}class Cs extends B{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["GetCurrent","SetSelected","Save"]}}class Ss extends Y{constructor(t,n,r,s){super(),this.Current=t,this.Selected=n,this.Saving=r,this.UserCanEdit=s}}function YC(e){let t;return[new Ss(new le(0,[]),new In(0,[]),new le(0,[]),(t=Kf(e),t.tag===1?ff.ProvisionAccounts:df(t.fields[0]).ProvisionAccounts)),ee(n=>{n(new Cs(0,[new Oo(0,[])]))})]}function XC(e,t,n,r){let s;switch(n.tag){case 1:return[new Ss(r.Current,n.fields[0],r.Saving,r.UserCanEdit),W()];case 2:return n.fields[0].tag===1?[new Ss(n.fields[0].fields[0].tag===1?r.Current:new le(2,[new g(0,[r.Selected])]),r.Selected,new le(2,[n.fields[0].fields[0]]),r.UserCanEdit),W()]:[new Ss(r.Current,r.Selected,new le(1,[]),r.UserCanEdit),cr(i=>{ur(i)},t,new Vu(r.Selected.tag===1?new $a(1,[]):new $a(0,[])),i=>new Cs(2,[new Oo(1,[i])]))];default:return n.fields[0].tag===1?[new Ss(new le(2,[n.fields[0].fields[0]]),(s=n.fields[0].fields[0],s.tag===1?new In(0,[]):s.fields[0]),r.Saving,r.UserCanEdit),W()]:[new Ss(new le(1,[]),r.Selected,r.Saving,r.UserCanEdit),cr(i=>{ur(i)},e,void 0,i=>new Cs(0,[new Oo(1,[i])]))]}}function QC(e){let t,n;const r=Le(e.partnerId),s=Ht(e.accountId),i=YC(e.accessToken);n=Hn(()=>zn(()=>i,(l,c)=>XC(()=>{const d=lh(e.backendUrl,e.accessToken,r,s);return I.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 In(1,[]):new In(0,[])]),I.Return(m)})},d=>Ly(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",_(ee((t=J(k(()=>R(x(f("style",{children:[Tm]})),k(()=>R(x(f("h3",{className:"text-xl font-semibold text-gray-900",children:"Account provisioning mode settings"})),k(()=>R(x(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 x(f("div",{className:"mt-8",children:"Loading..."}));case 1:return x(f("div",{className:"mt-8 text-red-600",children:"Failed to load current settings."}));default:return R(x(f("label",{className:"mt-8 block text-sm font-medium text-gray-700",children:"Account provisioning mode"})),k(()=>{let d,u;return R(x(f("select",_(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",ot(o.Selected)],["onChange",m=>{switch(m.target.value){case"API":{a(new Cs(1,[new In(0,[])]));break}case"Direct":{a(new Cs(1,[new In(1,[])]));break}}}],["disabled",o.UserCanEdit?Se(o.Saving,new le(1,[])):!0],(u=J(k(()=>{const m=h=>{const p=o.Current;let $;switch(p.tag===2&&p.fields[0].tag===0&&Se(p.fields[0].fields[0],h)?($=0,p.fields[0].fields[0]):$=1,$){case 0:return" (active)";default:return""}};return R(x(f("option",{value:ot(new In(0,[])),children:`API${m(new In(0,[]))}`})),k(()=>x(f("option",{value:ot(new In(1,[])),children:`Direct${m(new In(1,[]))}`}))))})),["children",b.Children.toArray(Array.from(u))])])))),k(()=>{let m,h;return R(o.UserCanEdit?x(f("button",_(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 Cs(2,[new Oo(0,[])]))}],["disabled",(h=o.Current,o.Saving.tag===1?!0:h.tag===2&&h.fields[0].tag===0&&Se(h.fields[0].fields[0],o.Selected))],["children","Save settings"]])))):He(),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 x(ie());default:return x(f("div",{className:"mt-2 text-red-600",children:"Failed to save settings."}))}}))}))}))}})))))))),["children",b.Children.toArray(Array.from(t))]))))}function e2(){Pm(e=>f(QC,e),"superhero-account-registry-provisioning")}class As extends Y{constructor(t,n,r,s){super(),this.Partners=t,this.Accounts=n,this.CurrentPage=r,this.Roles=s}}class br extends B{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["PageChanged","GetAccountName","AppendAccount","LoadPartners","UpdateAccount"]}}function t2(e){let t;const n=af(Jd(window.location.hash,1)),r=n.tag===18?tl(new K(0,[])):W();return[new As(new le(0,[]),U1(),n,(t=Kf(e),t.tag===1?(Ac(`Failed to decode jwt: ${t.fields[0]}`),ff):df(t.fields[0]))),r]}function n2(e,t,n,r){let s,i,o,a;switch(n.tag){case 1:{const l=n.fields[0],c=ps(e,l,d=>new br(2,[l,new g(0,[d])]),d=>new br(2,[l,new g(1,["Failed to retrieve account name"])]));return[new As(r.Partners,Qa(r.Accounts,l,new le(1,[])),r.CurrentPage,r.Roles),c]}case 2:return[new As(r.Partners,Qa(r.Accounts,n.fields[0],new le(2,[n.fields[1]])),r.CurrentPage,r.Roles),W()];case 0:{const l=n.fields[0];return l.tag===18?[r,tl(l)]:[new As(r.Partners,r.Accounts,l,r.Roles),W()]}case 4:{const l=n.fields[1],c=n.fields[0],d=of(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 Mu(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 Iu(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(Se(h,m))return[r,W()];{const p=ps(t,[c,l],()=>new br(2,[c,new g(0,[h])]),$=>new br(2,[c,new g(1,[$])]));return[new As(r.Partners,Qa(r.Accounts,c,new le(1,[])),r.CurrentPage,r.Roles),p]}}default:return[r,W()]}}default:return[new As(n.fields[0],r.Accounts,r.CurrentPage,r.Roles),W()]}}function r2(e){let t,n,r,s;const i=t2(e.accessToken);s=Hn(()=>zn(()=>i,(A,E)=>n2(P=>{const V=B1(P);return lh(e.backendUrl,e.accessToken,V[0],V[1])},P=>{const V=P[1],ne=sf(P[0]);return Fy(e.backendUrl,e.accessToken,ne[0],ne[1],new Fu(V.Name,V.ExternalId,Ge(we=>we.BusinessName,V.LegalEntity),Ge(we=>we.BusinessNumber,V.LegalEntity)))},A,E),(A,E)=>{}),void 0,void 0);const o=s[0],a=s[1];Ka(Gd(()=>My(e.backendUrl,e.accessToken),A=>{a(new br(3,[A]))}));const l=A=>{let E;const P=o.Partners;switch(P.tag){case 0:return new le(0,[]);case 1:return new le(1,[]);case 3:return new le(3,[P.fields[0]]);default:return P.fields[0].tag===1?new le(2,[new g(1,[rn(Sc("Unknown partner: %A%P()",[A]))])]):new le(2,[(E=el(P.fields[0].fields[0],A),E==null?new g(1,[rn(Sc("Unknown partner: %A%P()",[A]))]):new g(0,[E.Name]))])}},c=A=>f(ri,{page:o.CurrentPage,partner:{Id:A,Name:l(A)}}),d=(A,E)=>{const P=f(Am,{mode:E});return[c(A),P]},u=(A,E)=>{let P,V,ne;const we=A[0],Ae=A[1];let he;const te=[we,Ae];he=L1(te[0],te[1]);let de;const q=he;de=Rc(of(o.Accounts,q),()=>(a(new br(1,[q])),new le(0,[])));let oe;return oe=f(PC,{updateAccount:D=>{a(new br(4,[he,D]))},props:{accountDetails:[we,Ae]},mode:E,account:de}),[(P=[we,Ae,de],V=P[0],f(ri,(ne={Id:V,Name:l(V)},{account:{Id:P[1],Name:H1(D=>au(D.Name),P[2])},page:o.CurrentPage,partner:Xo(ne)}))),oe]};let m;const h=o.Partners;let p,$,w,S;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,S=h.fields[0];break}default:p=0}switch(p){case 0:{m=[f(Co,null),f(Co,null)];break}case 1:{const A=o.CurrentPage;switch(A.tag){case 3:{const E=A.fields[0],P=c(E),V=el($,E);if(V==null)m=[P,f(Jn,{error:"Unknown Partner"})];else{const ne=V;m=d(E,new yr(1,[{accountProvisioningMode:ne.AccountProvisioningMode,partnerId:E}]))}break}case 4:{const E=A.fields[0];m=d(E,new yr(2,[new zx(E,e.backendUrl,e.accessToken)]));break}case 5:{const E=A.fields[0];m=d(E,new yr(3,[new Hx(E,e.backendUrl,e.accessToken)]));break}case 6:{const E=A.fields[0];m=d(E,new yr(4,[new Wx(E,e.backendUrl,e.accessToken)]));break}case 2:{const E=A.fields[0];m=d(E,new yr(5,[new Gx(E,e.backendUrl,e.accessToken)]));break}case 7:{const E=A.fields[0];m=d(E,new yr(6,[new qx(E,e.backendUrl,e.accessToken)]));break}case 8:{const E=A.fields[0];m=d(E,new yr(7,[new Kx(E,e.backendUrl,e.accessToken)]));break}case 17:{m=u([A.fields[0],A.fields[1]],new Xn(8,[]));break}case 9:{m=u([A.fields[0],A.fields[1]],new Xn(0,[]));break}case 10:{m=u([A.fields[0],A.fields[1]],new Xn(1,[]));break}case 11:{m=u([A.fields[0],A.fields[1]],new Xn(2,[]));break}case 12:{m=u([A.fields[0],A.fields[1]],new Xn(3,[]));break}case 13:{m=u([A.fields[0],A.fields[1]],new Xn(4,[]));break}case 14:{m=u([A.fields[0],A.fields[1]],new Xn(5,[]));break}case 15:{m=u([A.fields[0],A.fields[1]],new Xn(6,[]));break}case 16:{m=u([A.fields[0],A.fields[1]],new Xn(7,[]));break}case 0:case 18:{m=[f(ri,{page:o.CurrentPage}),f(zC,{partnerList:$})];break}default:{const E=A.fields[0],P=c(E),V=el($,E);m=V==null?[P,f(Jn,{error:"Unknown Partner"})]:[P,(t=new yr(0,[V]),f(Am,{mode:t}))]}}break}case 2:{m=[f(ri,{page:o.CurrentPage}),f(Jn,{error:w})];break}default:m=[f(ri,{page:o.CurrentPage}),(n=ot(S),f(Jn,{error:n}))]}return c1(xn,new bb(o.Roles,e.backendUrl,e.accessToken),ee((r=y([f("style",{children:[Tm]}),T1({onUrlChanged:A=>{a(new br(0,[af(A)]))},application:f(be,{},m[0],m[1])})]),f("div",{children:b.Children.toArray(Array.from(r))}))))}Pm(e=>f(r2,e),"superhero-account-registry"),e2()})();
53
+ If the account is found you will be redirected to the account details page.`,["children",e])])))];return["children",b.Children.toArray(Array.from(t))]})()])));function jC(e){let t,n,r,s;return f("div",_(y([["className","absolute right-0 top-0 hidden pr-4 pt-4 sm:block"],(t=[f("button",_(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",_(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",b.Children.toArray(Array.from(s))])])))],["children",b.Children.toArray(Array.from(r))])])))],["children",b.Children.toArray(Array.from(t))])])))}function zC(e,t,n,r){let s,i,o;return f("div",_(y([["className","mt-5 sm:flex sm:items-center"],(s=[f("div",_(y([["className","w-full sm:max-w-xs"],(i=[f("label",{className:"sr-only",for:"account-id",children:"Account Id"}),f("input",_(J(k(()=>R(x(["id","account-id"]),k(()=>R(x(["autoComplete","off"]),k(()=>{let a;return R(x((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(x(["placeholder","Account Id"]),k(()=>R(x(["disabled",!n]),k(()=>R(x(["onChange",l=>{e(l.target.value)}]),k(()=>{const l=r;return l==null?He():x(["value",Ki(l)])}))))))))}))))))))],["children",b.Children.toArray(Array.from(i))])]))),f("button",_(y([["className",re(" ",["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=J(k(()=>x(n?f("span",{children:["Search"]}):f("span",{children:["Searching..."]})))),["children",b.Children.toArray(Array.from(o))]),["onClick",t],["disabled",!n]])))],["children",b.Children.toArray(Array.from(s))])])))}function HC(e){let t,n,r,s,i,o,a;const l=e.closeModal,c=Bn(xn),d=Hn(()=>zn(VC,(w,S)=>LC(c.BackendUrl,c.AccessToken,w,S),(w,S)=>{}),void 0,void 0),u=d[0],m=d[1],h=zC(w=>{m(new Fo(0,[w]))},w=>{m(new Fo(1,[]))},!Se(u.AccountDetails,new vs(1,[])),u.AccountId);let p;const $=u.AccountDetails;return p=$.tag===3?f("div",{className:re(" ",["mt-2 text-sm text-red-600"]),children:$.fields[0]}):ie(),f(fr,{onClose:l,child:f("div",_(y([["className","relative z-10"],["role",re(" ",["dialog"])],(t=[f("div",{className:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity","aria-hidden":!0}),f("div",_(y([["className","fixed inset-0 z-10 w-screen overflow-y-auto"],(n=[f("div",_(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",_(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=[jC(w=>{l()}),f("div",_(y([["className","sm:flex sm:items-start"],(o=[f("div",_(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",b.Children.toArray([_h])]]))),f("div",{className:"mt-3 text-center sm:ml-4 sm:mt-0 sm:text-left",children:b.Children.toArray([BC,UC,h,p])})],["children",b.Children.toArray(Array.from(o))])])))],["children",b.Children.toArray(Array.from(i))])])))],["children",b.Children.toArray(Array.from(r))])])))],["children",b.Children.toArray(Array.from(n))])])))],["children",b.Children.toArray(Array.from(t))])])))})}function WC(e,t){return Bi(n=>{const r=e.toLocaleLowerCase();return is(n.StreamId).toLocaleLowerCase().indexOf(r)>=0?!0:Ji(n.Name).toLocaleLowerCase().indexOf(r)>=0},t)}function GC(e){const t=Bn(xn),n=d0(c=>Ji(c.Name).toLocaleLowerCase(),e.partnerList,{Compare:Rn}),r=lr(n),s=lr(""),i=lr(!1),o=i[1],a=J(k(()=>R(x($r("ID")),k(()=>R(x($r("Name")),k(()=>R(t.Roles.ReadProtectedData?R(x($r("Contact")),k(()=>x($r("Phone")))):He(),k(()=>x($r("Website")))))))))),l=J(k(()=>R(i[0]?x(f(HC,{closeModal:()=>{o(!1)}})):x(ie()),k(()=>{let c;return R(x(f("div",_(y([["className","flex items-end place-content-between"],(c=[wh(s[0],"Partner ID or Name",d=>{s[1](d),r[1](WC(d,n))},()=>{}),f("button",{className:re(" ",["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:b.Children.toArray(["Account Search ",_h])})],["children",b.Children.toArray(Array.from(c))])])))),k(()=>x(rx(a,At(d=>{const u=is(d.StreamId),m=Le(u);return J(k(()=>{let h;return R(x((h=[Rr(Js(new K(1,[m]))),u],nx(h[0],h[1]))),k(()=>R(x(Co(["text-gray-500"],Ji(d.Name))),k(()=>R(t.Roles.ReadProtectedData?R(x(Co(["text-gray-500"],We(Ge(p=>`${vu(p.FirstName)} ${Cu(p.LastName)}`,d.ContactDetails),""))),k(()=>x(Co(["text-gray-500"],We(Ge(p=>ku(p.MobilePhone),d.ContactDetails),""))))):He(),k(()=>x(Co(["text-gray-500"],bu(d.Website)))))))))}))},r[0])))))}))));return f("div",{children:b.Children.toArray(Array.from(l))})}const qC=`*,: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}.m-6{margin:1.5rem}.-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-3xl{max-width:48rem}.max-w-4xl{max-width:56rem}.max-w-7xl{max-width:80rem}.max-w-\\[480px\\]{max-width:480px}.max-w-md{max-width:28rem}.max-w-screen-xl{max-width:1280px}.max-w-xs{max-width:20rem}.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-red-300{--tw-border-opacity: 1;border-color:rgb(252 165 165 / var(--tw-border-opacity))}.border-red-500{--tw-border-opacity: 1;border-color:rgb(239 68 68 / 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-amber-50{--tw-bg-opacity: 1;background-color:rgb(255 251 235 / var(--tw-bg-opacity))}.bg-blue-50{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity))}.bg-blue-700{--tw-bg-opacity: 1;background-color:rgb(29 78 216 / 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-red-600{--tw-bg-opacity: 1;background-color:rgb(220 38 38 / 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-normal{line-height:1.5}.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-amber-700{--tw-text-opacity: 1;color:rgb(180 83 9 / var(--tw-text-opacity))}.text-amber-800{--tw-text-opacity: 1;color:rgb(146 64 14 / 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-blue-800{--tw-text-opacity: 1;color:rgb(30 64 175 / 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\\:bg-red-50:hover{--tw-bg-opacity: 1;background-color:rgb(254 242 242 / 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-600:hover{--tw-text-opacity: 1;color:rgb(75 85 99 / 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\\:pr-6{padding-right: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))}}`,Mm=ot(qC);function Jl(){return(Jl=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 KC=["context","children"];function ZC(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,KC);return Ra(t,n)}function JC(){var e=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(e),this._vdom=f(ZC,Jl({},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[Pm(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(Dm,{name:d},c):s[o]=c}var u=r?f(Dm,null,s):s;return f(r||n.nodeName.toLowerCase(),i,u)}(this,this._vdomComponent)),(this.hasAttribute("hydrate")?Ta:sr)(this._vdom,this._root)}function Pm(e){return e.replace(/-(\w)/g,function(t,n){return n?n.toUpperCase():""})}function YC(e,t,n){if(this._vdom){var r={};r[e]=n=n??void 0,r[Pm(e)]=n,this._vdom=Ra(this._vdom,r),sr(this._vdom,this._root)}}function XC(){sr(this._vdom=null,this._root)}function Dm(e,t){var n=this;return f("slot",Jl({},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 QC(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=JC,s.prototype.attributeChangedCallback=YC,s.prototype.disconnectedCallback=XC,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 Om(e,t){QC(e,t,void 0,{shadow:!0})}class Vo extends B{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Started","Finished"]}}class In extends B{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["API","Direct"]}}class Cs extends B{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["GetCurrent","SetSelected","Save"]}}class Ss extends Y{constructor(t,n,r,s){super(),this.Current=t,this.Selected=n,this.Saving=r,this.UserCanEdit=s}}function e2(e){let t;return[new Ss(new le(0,[]),new In(0,[]),new le(0,[]),(t=Jf(e),t.tag===1?mf.ProvisionAccounts:hf(t.fields[0]).ProvisionAccounts)),ee(n=>{n(new Cs(0,[new Vo(0,[])]))})]}function t2(e,t,n,r){let s;switch(n.tag){case 1:return[new Ss(r.Current,n.fields[0],r.Saving,r.UserCanEdit),z()];case 2:return n.fields[0].tag===1?[new Ss(n.fields[0].fields[0].tag===1?r.Current:new le(2,[new g(0,[r.Selected])]),r.Selected,new le(2,[n.fields[0].fields[0]]),r.UserCanEdit),z()]:[new Ss(r.Current,r.Selected,new le(1,[]),r.UserCanEdit),cr(i=>{ur(i)},t,new Bu(r.Selected.tag===1?new ya(1,[]):new ya(0,[])),i=>new Cs(2,[new Vo(1,[i])]))];default:return n.fields[0].tag===1?[new Ss(new le(2,[n.fields[0].fields[0]]),(s=n.fields[0].fields[0],s.tag===1?new In(0,[]):s.fields[0]),r.Saving,r.UserCanEdit),z()]:[new Ss(new le(1,[]),r.Selected,r.Saving,r.UserCanEdit),cr(i=>{ur(i)},e,void 0,i=>new Cs(0,[new Vo(1,[i])]))]}}function n2(e){let t,n;const r=Le(e.partnerId),s=Gt(e.accountId),i=e2(e.accessToken);n=Hn(()=>zn(()=>i,(l,c)=>t2(()=>{const d=uh(e.backendUrl,e.accessToken,r,s);return I.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 In(1,[]):new In(0,[])]),I.Return(m)})},d=>jy(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",_(ee((t=J(k(()=>R(x(f("style",{children:[Mm]})),k(()=>R(x(f("h3",{className:"text-xl font-semibold text-gray-900",children:"Account provisioning mode settings"})),k(()=>R(x(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 x(f("div",{className:"mt-8",children:"Loading..."}));case 1:return x(f("div",{className:"mt-8 text-red-600",children:"Failed to load current settings."}));default:return R(x(f("label",{className:"mt-8 block text-sm font-medium text-gray-700",children:"Account provisioning mode"})),k(()=>{let d,u;return R(x(f("select",_(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",ot(o.Selected)],["onChange",m=>{switch(m.target.value){case"API":{a(new Cs(1,[new In(0,[])]));break}case"Direct":{a(new Cs(1,[new In(1,[])]));break}}}],["disabled",o.UserCanEdit?Se(o.Saving,new le(1,[])):!0],(u=J(k(()=>{const m=h=>{const p=o.Current;let $;switch(p.tag===2&&p.fields[0].tag===0&&Se(p.fields[0].fields[0],h)?($=0,p.fields[0].fields[0]):$=1,$){case 0:return" (active)";default:return""}};return R(x(f("option",{value:ot(new In(0,[])),children:`API${m(new In(0,[]))}`})),k(()=>x(f("option",{value:ot(new In(1,[])),children:`Direct${m(new In(1,[]))}`}))))})),["children",b.Children.toArray(Array.from(u))])])))),k(()=>{let m,h;return R(o.UserCanEdit?x(f("button",_(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 Cs(2,[new Vo(0,[])]))}],["disabled",(h=o.Current,o.Saving.tag===1?!0:h.tag===2&&h.fields[0].tag===0&&Se(h.fields[0].fields[0],o.Selected))],["children","Save settings"]])))):He(),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 x(ie());default:return x(f("div",{className:"mt-2 text-red-600",children:"Failed to save settings."}))}}))}))}))}})))))))),["children",b.Children.toArray(Array.from(t))]))))}function r2(){Om(e=>f(n2,e),"superhero-account-registry-provisioning")}class As extends Y{constructor(t,n,r,s){super(),this.Partners=t,this.Accounts=n,this.CurrentPage=r,this.Roles=s}}class br extends B{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["PageChanged","GetAccountName","AppendAccount","LoadPartners","UpdateAccount"]}}function s2(e){let t;const n=cf(Xd(window.location.hash,1)),r=n.tag===18?rl(new K(0,[])):z();return[new As(new le(0,[]),H1(),n,(t=Jf(e),t.tag===1?(Ec(`Failed to decode jwt: ${t.fields[0]}`),mf):hf(t.fields[0]))),r]}function i2(e,t,n,r){let s,i,o,a;switch(n.tag){case 1:{const l=n.fields[0],c=ps(e,l,d=>new br(2,[l,new g(0,[d])]),d=>new br(2,[l,new g(1,["Failed to retrieve account name"])]));return[new As(r.Partners,tl(r.Accounts,l,new le(1,[])),r.CurrentPage,r.Roles),c]}case 2:return[new As(r.Partners,tl(r.Accounts,n.fields[0],new le(2,[n.fields[1]])),r.CurrentPage,r.Roles),z()];case 0:{const l=n.fields[0];return l.tag===18?[r,rl(l)]:[new As(r.Partners,r.Accounts,l,r.Roles),z()]}case 4:{const l=n.fields[1],c=n.fields[0],d=lf(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 Du(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 Tu(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(Se(h,m))return[r,z()];{const p=ps(t,[c,l],()=>new br(2,[c,new g(0,[h])]),$=>new br(2,[c,new g(1,[$])]));return[new As(r.Partners,tl(r.Accounts,c,new le(1,[])),r.CurrentPage,r.Roles),p]}}default:return[r,z()]}}default:return[new As(n.fields[0],r.Accounts,r.CurrentPage,r.Roles),z()]}}function o2(e){let t,n,r,s;const i=s2(e.accessToken);s=Hn(()=>zn(()=>i,(A,E)=>i2(P=>{const V=z1(P);return uh(e.backendUrl,e.accessToken,V[0],V[1])},P=>{const V=P[1],ne=af(P[0]);return By(e.backendUrl,e.accessToken,ne[0],ne[1],new Lu(V.Name,V.ExternalId,Ge(we=>we.BusinessName,V.LegalEntity),Ge(we=>we.BusinessNumber,V.LegalEntity)))},A,E),(A,E)=>{}),void 0,void 0);const o=s[0],a=s[1];Ja(Kd(()=>Oy(e.backendUrl,e.accessToken),A=>{a(new br(3,[A]))}));const l=A=>{let E;const P=o.Partners;switch(P.tag){case 0:return new le(0,[]);case 1:return new le(1,[]);case 3:return new le(3,[P.fields[0]]);default:return P.fields[0].tag===1?new le(2,[new g(1,[sn(kc("Unknown partner: %A%P()",[A]))])]):new le(2,[(E=nl(P.fields[0].fields[0],A),E==null?new g(1,[sn(kc("Unknown partner: %A%P()",[A]))]):new g(0,[E.Name]))])}},c=A=>f(ri,{page:o.CurrentPage,partner:{Id:A,Name:l(A)}}),d=(A,E)=>{const P=f(Em,{mode:E});return[c(A),P]},u=(A,E)=>{let P,V,ne;const we=A[0],Ae=A[1];let he;const te=[we,Ae];he=j1(te[0],te[1]);let de;const q=he;de=Pc(lf(o.Accounts,q),()=>(a(new br(1,[q])),new le(0,[])));let oe;return oe=f(FC,{updateAccount:D=>{a(new br(4,[he,D]))},props:{accountDetails:[we,Ae]},mode:E,account:de}),[(P=[we,Ae,de],V=P[0],f(ri,(ne={Id:V,Name:l(V)},{account:{Id:P[1],Name:q1(D=>cu(D.Name),P[2])},page:o.CurrentPage,partner:ea(ne)}))),oe]};let m;const h=o.Partners;let p,$,w,S;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,S=h.fields[0];break}default:p=0}switch(p){case 0:{m=[f(So,null),f(So,null)];break}case 1:{const A=o.CurrentPage;switch(A.tag){case 3:{const E=A.fields[0],P=c(E),V=nl($,E);if(V==null)m=[P,f(Jn,{error:"Unknown Partner"})];else{const ne=V;m=d(E,new yr(1,[{accountProvisioningMode:ne.AccountProvisioningMode,partnerId:E}]))}break}case 4:{const E=A.fields[0];m=d(E,new yr(2,[new Gx(E,e.backendUrl,e.accessToken)]));break}case 5:{const E=A.fields[0];m=d(E,new yr(3,[new qx(E,e.backendUrl,e.accessToken)]));break}case 6:{const E=A.fields[0];m=d(E,new yr(4,[new Kx(E,e.backendUrl,e.accessToken)]));break}case 2:{const E=A.fields[0];m=d(E,new yr(5,[new Zx(E,e.backendUrl,e.accessToken)]));break}case 7:{const E=A.fields[0];m=d(E,new yr(6,[new Jx(E,e.backendUrl,e.accessToken)]));break}case 8:{const E=A.fields[0];m=d(E,new yr(7,[new Yx(E,e.backendUrl,e.accessToken)]));break}case 17:{m=u([A.fields[0],A.fields[1]],new Xn(8,[]));break}case 9:{m=u([A.fields[0],A.fields[1]],new Xn(0,[]));break}case 10:{m=u([A.fields[0],A.fields[1]],new Xn(1,[]));break}case 11:{m=u([A.fields[0],A.fields[1]],new Xn(2,[]));break}case 12:{m=u([A.fields[0],A.fields[1]],new Xn(3,[]));break}case 13:{m=u([A.fields[0],A.fields[1]],new Xn(4,[]));break}case 14:{m=u([A.fields[0],A.fields[1]],new Xn(5,[]));break}case 15:{m=u([A.fields[0],A.fields[1]],new Xn(6,[]));break}case 16:{m=u([A.fields[0],A.fields[1]],new Xn(7,[]));break}case 0:case 18:{m=[f(ri,{page:o.CurrentPage}),f(GC,{partnerList:$})];break}default:{const E=A.fields[0],P=c(E),V=nl($,E);m=V==null?[P,f(Jn,{error:"Unknown Partner"})]:[P,(t=new yr(0,[V]),f(Em,{mode:t}))]}}break}case 2:{m=[f(ri,{page:o.CurrentPage}),f(Jn,{error:w})];break}default:m=[f(ri,{page:o.CurrentPage}),(n=ot(S),f(Jn,{error:n}))]}return f1(xn,new xb(o.Roles,e.backendUrl,e.accessToken),ee((r=y([f("style",{children:[Mm]}),P1({onUrlChanged:A=>{a(new br(0,[cf(A)]))},application:f(be,{},m[0],m[1])})]),f("div",{children:b.Children.toArray(Array.from(r))}))))}Om(e=>f(o2,e),"superhero-account-registry"),r2()})();