"use strict";var bg=Object.create;var pn=Object.defineProperty,Cg=Object.defineProperties,Og=Object.getOwnPropertyDescriptor,Tg=Object.getOwnPropertyDescriptors,Ig=Object.getOwnPropertyNames,gu=Object.getOwnPropertySymbols,kg=Object.getPrototypeOf,vu=Object.prototype.hasOwnProperty,Ag=Object.prototype.propertyIsEnumerable;var Pi=(u,f,o)=>f in u?pn(u,f,{enumerable:!0,configurable:!0,writable:!0,value:o}):u[f]=o,fn=(u,f)=>{for(var o in f||(f={}))vu.call(f,o)&&Pi(u,o,f[o]);if(gu)for(var o of gu(f))Ag.call(f,o)&&Pi(u,o,f[o]);return u},_u=(u,f)=>Cg(u,Tg(f));var qg=(u,f)=>{for(var o in f)pn(u,o,{get:f[o],enumerable:!0})},yu=(u,f,o,b)=>{if(f&&typeof f=="object"||typeof f=="function")for(let S of Ig(f))!vu.call(u,S)&&S!==o&&pn(u,S,{get:()=>f[S],enumerable:!(b=Og(f,S))||b.enumerable});return u};var Fg=(u,f,o)=>(o=u!=null?bg(kg(u)):{},yu(f||!u||!u.__esModule?pn(o,"default",{value:u,enumerable:!0}):o,u)),Pg=u=>yu(pn({},"__esModule",{value:!0}),u);var Lt=(u,f,o)=>(Pi(u,typeof f!="symbol"?f+"":f,o),o);var ne=(u,f,o)=>new Promise((b,S)=>{var E=Q=>{try{ce(o.next(Q))}catch(ut){S(ut)}},V=Q=>{try{ce(o.throw(Q))}catch(ut){S(ut)}},ce=Q=>Q.done?b(Q.value):Promise.resolve(Q.value).then(E,V);ce((o=o.apply(u,f)).next())});var fv={};qg(fv,{CreateCredentialUtils:()=>hn,GetCredentialUtils:()=>Ni});module.exports=Pg(fv);var mu=(u,f)=>ne(void 0,null,function*(){let o,b=new Promise(S=>{o=setTimeout(S,f)});return Promise.race([u,b]).then(S=>(clearTimeout(o),S))});var Ng=Object.create,Ru=Object.defineProperty,Jg=Object.getOwnPropertyDescriptor,xg=Object.getOwnPropertyNames,Mg=Object.getPrototypeOf,Ug=Object.prototype.hasOwnProperty,Wg=(u,f)=>()=>(f||u((f={exports:{}}).exports,f),f.exports),Eg=(u,f,o,b)=>{if(f&&typeof f=="object"||typeof f=="function")for(let S of xg(f))!Ug.call(u,S)&&S!==o&&Ru(u,S,{get:()=>f[S],enumerable:!(b=Jg(f,S))||b.enumerable});return u},Su=(u,f,o)=>(o=u!=null?Ng(Mg(u)):{},Eg(f||!u||!u.__esModule?Ru(o,"default",{value:u,enumerable:!0}):o,u)),bu=Wg((u,f)=>{"use strict";(function(){var o,b="4.17.21",S=200,E="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",V="Expected a function",ce="Invalid `variable` option passed into `_.template`",Q="__lodash_hash_undefined__",ut=500,st="__lodash_placeholder__",He=1,Ji=2,Rt=4,St=1,vn=2,_e=1,lt=2,xi=4,Pe=8,bt=16,Ne=32,Ct=64,We=128,jt=256,cr=512,Iu=30,ku="...",Au=800,qu=16,Mi=1,Fu=2,Pu=3,ct=1/0,Ze=9007199254740991,Nu=17976931348623157e292,_n=NaN,Je=4294967295,Ju=Je-1,xu=Je>>>1,Mu=[["ary",We],["bind",_e],["bindKey",lt],["curry",Pe],["curryRight",bt],["flip",cr],["partial",Ne],["partialRight",Ct],["rearg",jt]],Ot="[object Arguments]",yn="[object Array]",Uu="[object AsyncFunction]",Bt="[object Boolean]",Kt="[object Date]",Wu="[object DOMException]",mn="[object Error]",wn="[object Function]",Ui="[object GeneratorFunction]",Te="[object Map]",zt="[object Number]",Eu="[object Null]",Ee="[object Object]",Wi="[object Promise]",Lu="[object Proxy]",Gt="[object RegExp]",Ie="[object Set]",Vt="[object String]",Rn="[object Symbol]",Du="[object Undefined]",$t="[object WeakMap]",ju="[object WeakSet]",Ht="[object ArrayBuffer]",Tt="[object DataView]",dr="[object Float32Array]",pr="[object Float64Array]",fr="[object Int8Array]",hr="[object Int16Array]",gr="[object Int32Array]",vr="[object Uint8Array]",_r="[object Uint8ClampedArray]",yr="[object Uint16Array]",mr="[object Uint32Array]",Bu=/\b__p \+= '';/g,Ku=/\b(__p \+=) '' \+/g,zu=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Ei=/&(?:amp|lt|gt|quot|#39);/g,Li=/[&<>"']/g,Gu=RegExp(Ei.source),Vu=RegExp(Li.source),$u=/<%-([\s\S]+?)%>/g,Hu=/<%([\s\S]+?)%>/g,Di=/<%=([\s\S]+?)%>/g,Zu=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Yu=/^\w*$/,Xu=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,wr=/[\\^$.*+?()[\]{}|]/g,Qu=RegExp(wr.source),Rr=/^\s+/,es=/\s/,ts=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ns=/\{\n\/\* \[wrapped with (.+)\] \*/,rs=/,? & /,is=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,as=/[()=,{}\[\]\/\s]/,os=/\\(\\)?/g,us=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ji=/\w*$/,ss=/^[-+]0x[0-9a-f]+$/i,ls=/^0b[01]+$/i,cs=/^\[object .+?Constructor\]$/,ds=/^0o[0-7]+$/i,ps=/^(?:0|[1-9]\d*)$/,fs=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Sn=/($^)/,hs=/['\n\r\u2028\u2029\\]/g,bn="\\ud800-\\udfff",gs="\\u0300-\\u036f",vs="\\ufe20-\\ufe2f",_s="\\u20d0-\\u20ff",Bi=gs+vs+_s,Ki="\\u2700-\\u27bf",zi="a-z\\xdf-\\xf6\\xf8-\\xff",ys="\\xac\\xb1\\xd7\\xf7",ms="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",ws="\\u2000-\\u206f",Rs=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Gi="A-Z\\xc0-\\xd6\\xd8-\\xde",Vi="\\ufe0e\\ufe0f",$i=ys+ms+ws+Rs,Sr="['\u2019]",Ss="["+bn+"]",Hi="["+$i+"]",Cn="["+Bi+"]",Zi="\\d+",bs="["+Ki+"]",Yi="["+zi+"]",Xi="[^"+bn+$i+Zi+Ki+zi+Gi+"]",br="\\ud83c[\\udffb-\\udfff]",Cs="(?:"+Cn+"|"+br+")",Qi="[^"+bn+"]",Cr="(?:\\ud83c[\\udde6-\\uddff]){2}",Or="[\\ud800-\\udbff][\\udc00-\\udfff]",It="["+Gi+"]",ea="\\u200d",ta="(?:"+Yi+"|"+Xi+")",Os="(?:"+It+"|"+Xi+")",na="(?:"+Sr+"(?:d|ll|m|re|s|t|ve))?",ra="(?:"+Sr+"(?:D|LL|M|RE|S|T|VE))?",ia=Cs+"?",aa="["+Vi+"]?",Ts="(?:"+ea+"(?:"+[Qi,Cr,Or].join("|")+")"+aa+ia+")*",Is="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",ks="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",oa=aa+ia+Ts,As="(?:"+[bs,Cr,Or].join("|")+")"+oa,qs="(?:"+[Qi+Cn+"?",Cn,Cr,Or,Ss].join("|")+")",Fs=RegExp(Sr,"g"),Ps=RegExp(Cn,"g"),Tr=RegExp(br+"(?="+br+")|"+qs+oa,"g"),Ns=RegExp([It+"?"+Yi+"+"+na+"(?="+[Hi,It,"$"].join("|")+")",Os+"+"+ra+"(?="+[Hi,It+ta,"$"].join("|")+")",It+"?"+ta+"+"+na,It+"+"+ra,ks,Is,Zi,As].join("|"),"g"),Js=RegExp("["+ea+bn+Bi+Vi+"]"),xs=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Ms=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Us=-1,D={};D[dr]=D[pr]=D[fr]=D[hr]=D[gr]=D[vr]=D[_r]=D[yr]=D[mr]=!0,D[Ot]=D[yn]=D[Ht]=D[Bt]=D[Tt]=D[Kt]=D[mn]=D[wn]=D[Te]=D[zt]=D[Ee]=D[Gt]=D[Ie]=D[Vt]=D[$t]=!1;var L={};L[Ot]=L[yn]=L[Ht]=L[Tt]=L[Bt]=L[Kt]=L[dr]=L[pr]=L[fr]=L[hr]=L[gr]=L[Te]=L[zt]=L[Ee]=L[Gt]=L[Ie]=L[Vt]=L[Rn]=L[vr]=L[_r]=L[yr]=L[mr]=!0,L[mn]=L[wn]=L[$t]=!1;var Ws={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},Es={"&":"&","<":"<",">":">",'"':""","'":"'"},Ls={"&":"&","<":"<",">":">",""":'"',"'":"'"},Ds={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},js=parseFloat,Bs=parseInt,ua=typeof global=="object"&&global&&global.Object===Object&&global,Ks=typeof self=="object"&&self&&self.Object===Object&&self,Z=ua||Ks||Function("return this")(),Ir=typeof u=="object"&&u&&!u.nodeType&&u,dt=Ir&&typeof f=="object"&&f&&!f.nodeType&&f,sa=dt&&dt.exports===Ir,kr=sa&&ua.process,ye=function(){try{var d=dt&&dt.require&&dt.require("util").types;return d||kr&&kr.binding&&kr.binding("util")}catch(g){}}(),la=ye&&ye.isArrayBuffer,ca=ye&&ye.isDate,da=ye&&ye.isMap,pa=ye&&ye.isRegExp,fa=ye&&ye.isSet,ha=ye&&ye.isTypedArray;function de(d,g,h){switch(h.length){case 0:return d.call(g);case 1:return d.call(g,h[0]);case 2:return d.call(g,h[0],h[1]);case 3:return d.call(g,h[0],h[1],h[2])}return d.apply(g,h)}function zs(d,g,h,w){for(var I=-1,x=d==null?0:d.length;++I-1}function Ar(d,g,h){for(var w=-1,I=d==null?0:d.length;++w-1;);return h}function Sa(d,g){for(var h=d.length;h--&&kt(g,d[h],0)>-1;);return h}function el(d,g){for(var h=d.length,w=0;h--;)d[h]===g&&++w;return w}var tl=Nr(Ws),nl=Nr(Es);function rl(d){return"\\"+Ds[d]}function il(d,g){return d==null?o:d[g]}function At(d){return Js.test(d)}function al(d){return xs.test(d)}function ol(d){for(var g,h=[];!(g=d.next()).done;)h.push(g.value);return h}function Ur(d){var g=-1,h=Array(d.size);return d.forEach(function(w,I){h[++g]=[I,w]}),h}function ba(d,g){return function(h){return d(g(h))}}function Qe(d,g){for(var h=-1,w=d.length,I=0,x=[];++h-1}function Vl(e,t){var n=this.__data__,r=jn(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}Le.prototype.clear=Bl,Le.prototype.delete=Kl,Le.prototype.get=zl,Le.prototype.has=Gl,Le.prototype.set=Vl;function De(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t=t?e:t)),e}function Se(e,t,n,r,i,s){var l,c=t&He,p=t&Ji,v=t&Rt;if(n&&(l=i?n(e,r,i,s):n(e)),l!==o)return l;if(!B(e))return e;var _=k(e);if(_){if(l=Yc(e),!c)return oe(e,l)}else{var y=te(e),m=y==wn||y==Ui;if(ot(e))return ao(e,c);if(y==Ee||y==Ot||m&&!i){if(l=p||m?{}:Oo(e),!c)return p?Lc(e,lc(l,e)):Ec(e,xa(l,e))}else{if(!L[y])return i?e:{};l=Xc(e,y,c)}}s||(s=new Ae);var R=s.get(e);if(R)return R;s.set(e,l),eu(e)?e.forEach(function(T){l.add(Se(T,t,n,T,e,s))}):Xo(e)&&e.forEach(function(T,P){l.set(P,Se(T,t,n,P,e,s))});var O=v?p?li:si:p?se:Y,q=_?o:O(e);return me(q||e,function(T,P){q&&(P=T,T=e[P]),nn(l,P,Se(T,t,n,P,e,s))}),l}function cc(e){var t=Y(e);return function(n){return Ma(n,e,t)}}function Ma(e,t,n){var r=n.length;if(e==null)return!r;for(e=W(e);r--;){var i=n[r],s=t[i],l=e[i];if(l===o&&!(i in e)||!s(l))return!1}return!0}function Ua(e,t,n){if(typeof e!="function")throw new we(V);return cn(function(){e.apply(o,n)},t)}function rn(e,t,n,r){var i=-1,s=On,l=!0,c=e.length,p=[],v=t.length;if(!c)return p;n&&(t=j(t,pe(n))),r?(s=Ar,l=!1):t.length>=S&&(s=Zt,l=!1,t=new ht(t));e:for(;++ii?0:i+n),r=r===o||r>i?i:A(r),r<0&&(r+=i),r=n>r?0:nu(r);n0&&n(c)?t>1?X(c,t-1,n,r,i):Xe(i,c):r||(i[i.length]=c)}return i}var Kr=po(),La=po(!0);function xe(e,t){return e&&Kr(e,t,Y)}function zr(e,t){return e&&La(e,t,Y)}function Kn(e,t){return Ye(t,function(n){return Ge(e[n])})}function vt(e,t){t=it(t,e);for(var n=0,r=t.length;e!=null&&nt}function fc(e,t){return e!=null&&U.call(e,t)}function hc(e,t){return e!=null&&t in W(e)}function gc(e,t,n){return e>=ee(t,n)&&e=120&&_.length>=120)?new ht(l&&_):o}_=e[0];var y=-1,m=c[0];e:for(;++y-1;)c!==e&&xn.call(c,p,1),xn.call(e,p,1);return e}function Ya(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==s){var s=i;ze(i)?xn.call(e,i,1):ti(e,i)}}return e}function Xr(e,t){return e+Wn(Fa()*(t-e+1))}function kc(e,t,n,r){for(var i=-1,s=H(Un((t-e)/(n||1)),0),l=h(s);s--;)l[r?s:++i]=e,e+=n;return l}function Qr(e,t){var n="";if(!e||t<1||t>Ze)return n;do t%2&&(n+=e),t=Wn(t/2),t&&(e+=e);while(t);return n}function F(e,t){return vi(ko(e,t,le),e+"")}function Ac(e){return Ja(Et(e))}function qc(e,t){var n=Et(e);return tr(n,gt(t,0,n.length))}function un(e,t,n,r){if(!B(e))return e;t=it(t,e);for(var i=-1,s=t.length,l=s-1,c=e;c!=null&&++ii?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var s=h(i);++r>>1,l=e[s];l!==null&&!he(l)&&(n?l<=t:l=S){var v=t?null:Kc(e);if(v)return In(v);l=!1,i=Zt,p=new ht}else p=t?[]:c;e:for(;++r=r?e:be(e,t,n)}var io=Rl||function(e){return Z.clearTimeout(e)};function ao(e,t){if(t)return e.slice();var n=e.length,r=Ta?Ta(n):new e.constructor(n);return e.copy(r),r}function ai(e){var t=new e.constructor(e.byteLength);return new Nn(t).set(new Nn(e)),t}function xc(e,t){var n=t?ai(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}function Mc(e){var t=new e.constructor(e.source,ji.exec(e));return t.lastIndex=e.lastIndex,t}function Uc(e){return tn?W(tn.call(e)):{}}function oo(e,t){var n=t?ai(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function uo(e,t){if(e!==t){var n=e!==o,r=e===null,i=e===e,s=he(e),l=t!==o,c=t===null,p=t===t,v=he(t);if(!c&&!v&&!s&&e>t||s&&l&&p&&!c&&!v||r&&l&&p||!n&&p||!i)return 1;if(!r&&!s&&!v&&e=c)return p;var v=n[r];return p*(v=="desc"?-1:1)}}return e.index-t.index}function so(e,t,n,r){for(var i=-1,s=e.length,l=n.length,c=-1,p=t.length,v=H(s-l,0),_=h(p+v),y=!r;++c1?n[i-1]:o,l=i>2?n[2]:o;for(s=e.length>3&&typeof s=="function"?(i--,s):o,l&&ie(n[0],n[1],l)&&(s=i<3?o:s,i=1),t=W(t);++r-1?i[s?t[l]:l]:o}}function go(e){return Ke(function(t){var n=t.length,r=n,i=Re.prototype.thru;for(e&&t.reverse();r--;){var s=t[r];if(typeof s!="function")throw new we(V);if(i&&!l&&Qn(s)=="wrapper")var l=new Re([],!0)}for(r=l?r:n;++r1&&J.reverse(),_&&pc))return!1;var v=s.get(e),_=s.get(t);if(v&&_)return v==t&&_==e;var y=-1,m=!0,R=n&vn?new ht:o;for(s.set(e,t),s.set(t,e);++y1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(ts,`{ /* [wrapped with `+t+`] */ `)}function ed(e){return k(e)||mt(e)||!!(Aa&&e&&e[Aa])}function ze(e,t){var n=typeof e;return t=t!=null?t:Ze,!!t&&(n=="number"||n!="symbol"&&ps.test(e))&&e>-1&&e%1==0&&e0){if(++t>=Au)return arguments[0]}else t=0;return e.apply(o,arguments)}}function tr(e,t){var n=-1,r=e.length,i=r-1;for(t=t===o?r:t;++n1?e[t-1]:o;return n=typeof n=="function"?(e.pop(),n):o,Lo(e,n)});function Do(e){var t=a(e);return t.__chain__=!0,t}function dp(e,t){return t(e),e}function nr(e,t){return t(e)}var pp=Ke(function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,i=function(s){return Br(s,e)};return t>1||this.__actions__.length||!(r instanceof N)||!ze(n)?this.thru(i):(r=r.slice(n,+n+(t?1:0)),r.__actions__.push({func:nr,args:[i],thisArg:o}),new Re(r,this.__chain__).thru(function(s){return t&&!s.length&&s.push(o),s}))});function fp(){return Do(this)}function hp(){return new Re(this.value(),this.__chain__)}function gp(){this.__values__===o&&(this.__values__=tu(this.value()));var e=this.__index__>=this.__values__.length,t=e?o:this.__values__[this.__index__++];return{done:e,value:t}}function vp(){return this}function _p(e){for(var t,n=this;n instanceof Dn;){var r=Jo(n);r.__index__=0,r.__values__=o,t?i.__wrapped__=r:t=r;var i=r;n=n.__wrapped__}return i.__wrapped__=e,t}function yp(){var e=this.__wrapped__;if(e instanceof N){var t=e;return this.__actions__.length&&(t=new N(this)),t=t.reverse(),t.__actions__.push({func:nr,args:[_i],thisArg:o}),new Re(t,this.__chain__)}return this.thru(_i)}function mp(){return no(this.__wrapped__,this.__actions__)}var wp=$n(function(e,t,n){U.call(e,n)?++e[n]:je(e,n,1)});function Rp(e,t,n){var r=k(e)?ga:dc;return n&&ie(e,t,n)&&(t=o),r(e,C(t,3))}function Sp(e,t){var n=k(e)?Ye:Ea;return n(e,C(t,3))}var bp=ho(xo),Cp=ho(Mo);function Op(e,t){return X(rr(e,t),1)}function Tp(e,t){return X(rr(e,t),ct)}function Ip(e,t,n){return n=n===o?1:A(n),X(rr(e,t),n)}function jo(e,t){var n=k(e)?me:nt;return n(e,C(t,3))}function Bo(e,t){var n=k(e)?Gs:Wa;return n(e,C(t,3))}var kp=$n(function(e,t,n){U.call(e,n)?e[n].push(t):je(e,n,[t])});function Ap(e,t,n,r){e=ue(e)?e:Et(e),n=n&&!r?A(n):0;var i=e.length;return n<0&&(n=H(i+n,0)),sr(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&kt(e,t,n)>-1}var qp=F(function(e,t,n){var r=-1,i=typeof t=="function",s=ue(e)?h(e.length):[];return nt(e,function(l){s[++r]=i?de(t,l,n):an(l,t,n)}),s}),Fp=$n(function(e,t,n){je(e,n,t)});function rr(e,t){var n=k(e)?j:za;return n(e,C(t,3))}function Pp(e,t,n,r){return e==null?[]:(k(t)||(t=t==null?[]:[t]),n=r?o:n,k(n)||(n=n==null?[]:[n]),Ha(e,t,n))}var Np=$n(function(e,t,n){e[n?0:1].push(t)},function(){return[[],[]]});function Jp(e,t,n){var r=k(e)?qr:ma,i=arguments.length<3;return r(e,C(t,4),n,i,nt)}function xp(e,t,n){var r=k(e)?Vs:ma,i=arguments.length<3;return r(e,C(t,4),n,i,Wa)}function Mp(e,t){var n=k(e)?Ye:Ea;return n(e,or(C(t,3)))}function Up(e){var t=k(e)?Ja:Ac;return t(e)}function Wp(e,t,n){(n?ie(e,t,n):t===o)?t=1:t=A(t);var r=k(e)?oc:qc;return r(e,t)}function Ep(e){var t=k(e)?uc:Pc;return t(e)}function Lp(e){if(e==null)return 0;if(ue(e))return sr(e)?qt(e):e.length;var t=te(e);return t==Te||t==Ie?e.size:Hr(e).length}function Dp(e,t,n){var r=k(e)?Fr:Nc;return n&&ie(e,t,n)&&(t=o),r(e,C(t,3))}var jp=F(function(e,t){if(e==null)return[];var n=t.length;return n>1&&ie(e,t[0],t[1])?t=[]:n>2&&ie(t[0],t[1],t[2])&&(t=[t[0]]),Ha(e,X(t,1),[])}),ir=Sl||function(){return Z.Date.now()};function Bp(e,t){if(typeof t!="function")throw new we(V);return e=A(e),function(){if(--e<1)return t.apply(this,arguments)}}function Ko(e,t,n){return t=n?o:t,t=e&&t==null?e.length:t,Be(e,We,o,o,o,o,t)}function zo(e,t){var n;if(typeof t!="function")throw new we(V);return e=A(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=o),n}}var mi=F(function(e,t,n){var r=_e;if(n.length){var i=Qe(n,Ut(mi));r|=Ne}return Be(e,r,t,n,i)}),Go=F(function(e,t,n){var r=_e|lt;if(n.length){var i=Qe(n,Ut(Go));r|=Ne}return Be(t,r,e,n,i)});function Vo(e,t,n){t=n?o:t;var r=Be(e,Pe,o,o,o,o,o,t);return r.placeholder=Vo.placeholder,r}function $o(e,t,n){t=n?o:t;var r=Be(e,bt,o,o,o,o,o,t);return r.placeholder=$o.placeholder,r}function Ho(e,t,n){var r,i,s,l,c,p,v=0,_=!1,y=!1,m=!0;if(typeof e!="function")throw new we(V);t=Oe(t)||0,B(n)&&(_=!!n.leading,y="maxWait"in n,s=y?H(Oe(n.maxWait)||0,t):s,m="trailing"in n?!!n.trailing:m);function R(G){var Fe=r,$e=i;return r=i=o,v=G,l=e.apply($e,Fe),l}function O(G){return v=G,c=cn(P,t),_?R(G):l}function q(G){var Fe=G-p,$e=G-v,hu=t-Fe;return y?ee(hu,s-$e):hu}function T(G){var Fe=G-p,$e=G-v;return p===o||Fe>=t||Fe<0||y&&$e>=s}function P(){var G=ir();if(T(G))return J(G);c=cn(P,q(G))}function J(G){return c=o,m&&r?R(G):(r=i=o,l)}function ge(){c!==o&&io(c),v=0,r=p=i=c=o}function ae(){return c===o?l:J(ir())}function ve(){var G=ir(),Fe=T(G);if(r=arguments,i=this,p=G,Fe){if(c===o)return O(p);if(y)return io(c),c=cn(P,t),R(p)}return c===o&&(c=cn(P,t)),l}return ve.cancel=ge,ve.flush=ae,ve}var Kp=F(function(e,t){return Ua(e,1,t)}),zp=F(function(e,t,n){return Ua(e,Oe(t)||0,n)});function Gp(e){return Be(e,cr)}function ar(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new we(V);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],s=n.cache;if(s.has(i))return s.get(i);var l=e.apply(this,r);return n.cache=s.set(i,l)||s,l};return n.cache=new(ar.Cache||De),n}ar.Cache=De;function or(e){if(typeof e!="function")throw new we(V);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}function Vp(e){return zo(2,e)}var $p=Jc(function(e,t){t=t.length==1&&k(t[0])?j(t[0],pe(C())):j(X(t,1),pe(C()));var n=t.length;return F(function(r){for(var i=-1,s=ee(r.length,n);++i=t}),mt=ja(function(){return arguments}())?ja:function(e){return K(e)&&U.call(e,"callee")&&!ka.call(e,"callee")},k=h.isArray,cf=la?pe(la):_c;function ue(e){return e!=null&&ur(e.length)&&!Ge(e)}function z(e){return K(e)&&ue(e)}function df(e){return e===!0||e===!1||K(e)&&re(e)==Bt}var ot=Cl||Fi,pf=ca?pe(ca):yc;function ff(e){return K(e)&&e.nodeType===1&&!dn(e)}function hf(e){if(e==null)return!0;if(ue(e)&&(k(e)||typeof e=="string"||typeof e.splice=="function"||ot(e)||Wt(e)||mt(e)))return!e.length;var t=te(e);if(t==Te||t==Ie)return!e.size;if(ln(e))return!Hr(e).length;for(var n in e)if(U.call(e,n))return!1;return!0}function gf(e,t){return on(e,t)}function vf(e,t,n){n=typeof n=="function"?n:o;var r=n?n(e,t):o;return r===o?on(e,t,o,n):!!r}function Ri(e){if(!K(e))return!1;var t=re(e);return t==mn||t==Wu||typeof e.message=="string"&&typeof e.name=="string"&&!dn(e)}function _f(e){return typeof e=="number"&&qa(e)}function Ge(e){if(!B(e))return!1;var t=re(e);return t==wn||t==Ui||t==Uu||t==Lu}function Yo(e){return typeof e=="number"&&e==A(e)}function ur(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Ze}function B(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function K(e){return e!=null&&typeof e=="object"}var Xo=da?pe(da):wc;function yf(e,t){return e===t||$r(e,t,di(t))}function mf(e,t,n){return n=typeof n=="function"?n:o,$r(e,t,di(t),n)}function wf(e){return Qo(e)&&e!=+e}function Rf(e){if(rd(e))throw new I(E);return Ba(e)}function Sf(e){return e===null}function bf(e){return e==null}function Qo(e){return typeof e=="number"||K(e)&&re(e)==zt}function dn(e){if(!K(e)||re(e)!=Ee)return!1;var t=Jn(e);if(t===null)return!0;var n=U.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&qn.call(n)==yl}var Si=pa?pe(pa):Rc;function Cf(e){return Yo(e)&&e>=-Ze&&e<=Ze}var eu=fa?pe(fa):Sc;function sr(e){return typeof e=="string"||!k(e)&&K(e)&&re(e)==Vt}function he(e){return typeof e=="symbol"||K(e)&&re(e)==Rn}var Wt=ha?pe(ha):bc;function Of(e){return e===o}function Tf(e){return K(e)&&te(e)==$t}function If(e){return K(e)&&re(e)==ju}var kf=Xn(Zr),Af=Xn(function(e,t){return e<=t});function tu(e){if(!e)return[];if(ue(e))return sr(e)?ke(e):oe(e);if(Yt&&e[Yt])return ol(e[Yt]());var t=te(e),n=t==Te?Ur:t==Ie?In:Et;return n(e)}function Ve(e){if(!e)return e===0?e:0;if(e=Oe(e),e===ct||e===-ct){var t=e<0?-1:1;return t*Nu}return e===e?e:0}function A(e){var t=Ve(e),n=t%1;return t===t?n?t-n:t:0}function nu(e){return e?gt(A(e),0,Je):0}function Oe(e){if(typeof e=="number")return e;if(he(e))return _n;if(B(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=B(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=wa(e);var n=ls.test(e);return n||ds.test(e)?Bs(e.slice(2),n?2:8):ss.test(e)?_n:+e}function ru(e){return Me(e,se(e))}function qf(e){return e?gt(A(e),-Ze,Ze):e===0?e:0}function M(e){return e==null?"":fe(e)}var Ff=xt(function(e,t){if(ln(t)||ue(t)){Me(t,Y(t),e);return}for(var n in t)U.call(t,n)&&nn(e,n,t[n])}),iu=xt(function(e,t){Me(t,se(t),e)}),lr=xt(function(e,t,n,r){Me(t,se(t),e,r)}),Pf=xt(function(e,t,n,r){Me(t,Y(t),e,r)}),Nf=Ke(Br);function Jf(e,t){var n=Jt(e);return t==null?n:xa(n,t)}var xf=F(function(e,t){e=W(e);var n=-1,r=t.length,i=r>2?t[2]:o;for(i&&ie(t[0],t[1],i)&&(r=1);++n1),s}),Me(e,li(e),n),r&&(n=Se(n,He|Ji|Rt,zc));for(var i=t.length;i--;)ti(n,t[i]);return n});function Qf(e,t){return ou(e,or(C(t)))}var eh=Ke(function(e,t){return e==null?{}:Tc(e,t)});function ou(e,t){if(e==null)return{};var n=j(li(e),function(r){return[r]});return t=C(t),Za(e,n,function(r,i){return t(r,i[0])})}function th(e,t,n){t=it(t,e);var r=-1,i=t.length;for(i||(i=1,e=o);++rt){var r=e;e=t,t=r}if(n||e%1||t%1){var i=Fa();return ee(e+i*(t-e+js("1e-"+((i+"").length-1))),t)}return Xr(e,t)}var ph=Mt(function(e,t,n){return t=t.toLowerCase(),e+(n?lu(t):t)});function lu(e){return Oi(M(e).toLowerCase())}function cu(e){return e=M(e),e&&e.replace(fs,tl).replace(Ps,"")}function fh(e,t,n){e=M(e),t=fe(t);var r=e.length;n=n===o?r:gt(A(n),0,r);var i=n;return n-=t.length,n>=0&&e.slice(n,i)==t}function hh(e){return e=M(e),e&&Vu.test(e)?e.replace(Li,nl):e}function gh(e){return e=M(e),e&&Qu.test(e)?e.replace(wr,"\\$&"):e}var vh=Mt(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()}),_h=Mt(function(e,t,n){return e+(n?" ":"")+t.toLowerCase()}),yh=fo("toLowerCase");function mh(e,t,n){e=M(e),t=A(t);var r=t?qt(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return Yn(Wn(i),n)+e+Yn(Un(i),n)}function wh(e,t,n){e=M(e),t=A(t);var r=t?qt(e):0;return t&&r>>0,n?(e=M(e),e&&(typeof t=="string"||t!=null&&!Si(t))&&(t=fe(t),!t&&At(e))?at(ke(e),0,n):e.split(t,n)):[]}var Ih=Mt(function(e,t,n){return e+(n?" ":"")+Oi(t)});function kh(e,t,n){return e=M(e),n=n==null?0:gt(A(n),0,e.length),t=fe(t),e.slice(n,n+t.length)==t}function Ah(e,t,n){var r=a.templateSettings;n&&ie(e,t,n)&&(t=o),e=M(e),t=lr({},t,r,wo);var i=lr({},t.imports,r.imports,wo),s=Y(i),l=Mr(i,s),c,p,v=0,_=t.interpolate||Sn,y="__p += '",m=Wr((t.escape||Sn).source+"|"+_.source+"|"+(_===Di?us:Sn).source+"|"+(t.evaluate||Sn).source+"|$","g"),R="//# sourceURL="+(U.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Us+"]")+` `;e.replace(m,function(T,P,J,ge,ae,ve){return J||(J=ge),y+=e.slice(v,ve).replace(hs,rl),P&&(c=!0,y+=`' + __e(`+P+`) + '`),ae&&(p=!0,y+=`'; `+ae+`; __p += '`),J&&(y+=`' + ((__t = (`+J+`)) == null ? '' : __t) + '`),v=ve+T.length,T}),y+=`'; `;var O=U.call(t,"variable")&&t.variable;if(!O)y=`with (obj) { `+y+` } `;else if(as.test(O))throw new I(ce);y=(p?y.replace(Bu,""):y).replace(Ku,"$1").replace(zu,"$1;"),y="function("+(O||"obj")+`) { `+(O?"":`obj || (obj = {}); `)+"var __t, __p = ''"+(c?", __e = _.escape":"")+(p?`, __j = Array.prototype.join; function print() { __p += __j.call(arguments, '') } `:`; `)+y+`return __p }`;var q=pu(function(){return x(s,R+"return "+y).apply(o,l)});if(q.source=y,Ri(q))throw q;return q}function qh(e){return M(e).toLowerCase()}function Fh(e){return M(e).toUpperCase()}function Ph(e,t,n){if(e=M(e),e&&(n||t===o))return wa(e);if(!e||!(t=fe(t)))return e;var r=ke(e),i=ke(t),s=Ra(r,i),l=Sa(r,i)+1;return at(r,s,l).join("")}function Nh(e,t,n){if(e=M(e),e&&(n||t===o))return e.slice(0,Ca(e)+1);if(!e||!(t=fe(t)))return e;var r=ke(e),i=Sa(r,ke(t))+1;return at(r,0,i).join("")}function Jh(e,t,n){if(e=M(e),e&&(n||t===o))return e.replace(Rr,"");if(!e||!(t=fe(t)))return e;var r=ke(e),i=Ra(r,ke(t));return at(r,i).join("")}function xh(e,t){var n=Iu,r=ku;if(B(t)){var i="separator"in t?t.separator:i;n="length"in t?A(t.length):n,r="omission"in t?fe(t.omission):r}e=M(e);var s=e.length;if(At(e)){var l=ke(e);s=l.length}if(n>=s)return e;var c=n-qt(r);if(c<1)return r;var p=l?at(l,0,c).join(""):e.slice(0,c);if(i===o)return p+r;if(l&&(c+=p.length-c),Si(i)){if(e.slice(c).search(i)){var v,_=p;for(i.global||(i=Wr(i.source,M(ji.exec(i))+"g")),i.lastIndex=0;v=i.exec(_);)var y=v.index;p=p.slice(0,y===o?c:y)}}else if(e.indexOf(fe(i),c)!=c){var m=p.lastIndexOf(i);m>-1&&(p=p.slice(0,m))}return p+r}function Mh(e){return e=M(e),e&&Gu.test(e)?e.replace(Ei,cl):e}var Uh=Mt(function(e,t,n){return e+(n?" ":"")+t.toUpperCase()}),Oi=fo("toUpperCase");function du(e,t,n){return e=M(e),t=n?o:t,t===o?al(e)?fl(e):Zs(e):e.match(t)||[]}var pu=F(function(e,t){try{return de(e,o,t)}catch(n){return Ri(n)?n:new I(n)}}),Wh=Ke(function(e,t){return me(t,function(n){n=Ue(n),je(e,n,mi(e[n],e))}),e});function Eh(e){var t=e==null?0:e.length,n=C();return e=t?j(e,function(r){if(typeof r[1]!="function")throw new we(V);return[n(r[0]),r[1]]}):[],F(function(r){for(var i=-1;++iZe)return[];var n=Je,r=ee(e,Je);t=C(t),e-=Je;for(var i=xr(r,t);++n0||t<0)?new N(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==o&&(t=A(t),n=t<0?n.dropRight(-t):n.take(t-e)),n)},N.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},N.prototype.toArray=function(){return this.take(Je)},xe(N.prototype,function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),i=a[r?"take"+(t=="last"?"Right":""):t],s=r||/^find/.test(t);i&&(a.prototype[t]=function(){var l=this.__wrapped__,c=r?[1]:arguments,p=l instanceof N,v=c[0],_=p||k(l),y=function(P){var J=i.apply(a,Xe([P],c));return r&&m?J[0]:J};_&&n&&typeof v=="function"&&v.length!=1&&(p=_=!1);var m=this.__chain__,R=!!this.__actions__.length,O=s&&!m,q=p&&!R;if(!s&&_){l=q?l:new N(this);var T=e.apply(l,c);return T.__actions__.push({func:nr,args:[y],thisArg:o}),new Re(T,m)}return O&&q?e.apply(this,c):(T=this.thru(y),O?r?T.value()[0]:T.value():T)})}),me(["pop","push","shift","sort","splice","unshift"],function(e){var t=kn[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);a.prototype[e]=function(){var i=arguments;if(r&&!this.__chain__){var s=this.value();return t.apply(k(s)?s:[],i)}return this[n](function(l){return t.apply(k(l)?l:[],i)})}}),xe(N.prototype,function(e,t){var n=a[t];if(n){var r=n.name+"";U.call(Nt,r)||(Nt[r]=[]),Nt[r].push({name:t,func:n})}}),Nt[Hn(o,lt).name]=[{name:"wrapper",func:o}],N.prototype.clone=xl,N.prototype.reverse=Ml,N.prototype.value=Ul,a.prototype.at=pp,a.prototype.chain=fp,a.prototype.commit=hp,a.prototype.next=gp,a.prototype.plant=_p,a.prototype.reverse=yp,a.prototype.toJSON=a.prototype.valueOf=a.prototype.value=mp,a.prototype.first=a.prototype.head,Yt&&(a.prototype[Yt]=vp),a},et=hl();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(Z._=et,define(function(){return et})):dt?((dt.exports=et)._=et,Ir._=et):Z._=et}).call(u)}),wt=class{static encodeBytes(u){let f=btoa(String.fromCharCode(...new Uint8Array(u))).replace(/\+/g,"-").replace(/\//g,"_");return wu(f)}static decodeBytes(u){let f=u.replace(/-/g,"+").replace(/_/g,"/"),o=wu(f);return Uint8Array.from(atob(o),b=>b.charCodeAt(0))}},wu=u=>{let f=u.indexOf("=");return u.slice(0,f===-1?u.length:f)};var Lg=(u=>(u[u.MultipleChoice=300]="MultipleChoice",u[u.MovedPermanantly=301]="MovedPermanantly",u[u.Found=302]="Found",u[u.SeeOther=303]="SeeOther",u[u.NotModified=304]="NotModified",u[u.TemporaryRedirect=307]="TemporaryRedirect",u[u.PermanentRedirect=308]="PermanentRedirect",u[u.BadRequest=400]="BadRequest",u[u.Unauthorized=401]="Unauthorized",u[u.PaymentRequired=402]="PaymentRequired",u[u.Forbidden=403]="Forbidden",u[u.NotFound=404]="NotFound",u[u.MethodNotAllowed=405]="MethodNotAllowed",u[u.NotAcceptable=406]="NotAcceptable",u[u.ProxyAuthenticationRequired=407]="ProxyAuthenticationRequired",u[u.RequestTimeout=408]="RequestTimeout",u[u.Conflict=409]="Conflict",u[u.Gone=410]="Gone",u[u.LengthRequired=411]="LengthRequired",u[u.PreconditionFailed=412]="PreconditionFailed",u[u.PayloadTooLarge=413]="PayloadTooLarge",u[u.URITooLong=414]="URITooLong",u[u.UnsupportedMediaType=415]="UnsupportedMediaType",u[u.RangeNotSatisfiable=416]="RangeNotSatisfiable",u[u.ExpectationFailed=417]="ExpectationFailed",u[u.MisdirectedRequest=421]="MisdirectedRequest",u[u.UnprocessableEntity=422]="UnprocessableEntity",u[u.Locked=423]="Locked",u[u.FailedDependency=424]="FailedDependency",u[u.TooEarly=425]="TooEarly",u[u.UpgradeRequired=426]="UpgradeRequired",u[u.PreconditionRequired=428]="PreconditionRequired",u[u.TooManyRequests=429]="TooManyRequests",u[u.RequestHeaderFieldsTooLarge=431]="RequestHeaderFieldsTooLarge",u[u.UnavailableForLegalReasons=451]="UnavailableForLegalReasons",u[u.InternalServerError=500]="InternalServerError",u[u.NotImplemented=501]="NotImplemented",u[u.BadGateway=502]="BadGateway",u[u.ServiceUnavailable=503]="ServiceUnavailable",u[u.GatewayTimeout=504]="GatewayTimeout",u[u.HTTPVersionNotSupported=505]="HTTPVersionNotSupported",u[u.VariantAlsoNegotiates=506]="VariantAlsoNegotiates",u[u.InsufficientStorage=507]="InsufficientStorage",u[u.LoopDetected=508]="LoopDetected",u[u.NotExtended=510]="NotExtended",u[u.NetworkAuthenticationRequired=511]="NetworkAuthenticationRequired",u[u.PSGCredObjectDoesNotExist=700]="PSGCredObjectDoesNotExist",u[u.PSGParsePublicKeyForNewDeviceFailed=701]="PSGParsePublicKeyForNewDeviceFailed",u[u.PSGParsePublicKeyForLoginFailed=702]="PSGParsePublicKeyForLoginFailed",u[u.PSGCouldNotGetUserCredential=703]="PSGCouldNotGetUserCredential",u[u.PSGLoginRequired=704]="PSGLoginRequired",u[u.PSGSecureContextRequired=705]="PSGSecureContextRequired",u[u.PSGSocialSessionStorageError=706]="PSGSocialSessionStorageError",u[u.PSGParsePublicKeyForRegistrationFailed=707]="PSGParsePublicKeyForRegistrationFailed",u[u.PSGCanAuthenticateWithPasskeyFailed=708]="PSGCanAuthenticateWithPasskeyFailed",u[u.PSGCanRegisterWithPasskeyFailed=709]="PSGCanRegisterWithPasskeyFailed",u[u.PSGCanUseConditionalMediationFailed=710]="PSGCanUseConditionalMediationFailed",u[u.PSGAuthOriginConfigurationError=711]="PSGAuthOriginConfigurationError",u[u.PSGMustRunInBrowserContext=712]="PSGMustRunInBrowserContext",u))(Lg||{});var _v=Su(bu());var yv=Su(bu());var Dg="https://auth.passage.id/v1".replace(/\/+$/,""),jg=class{constructor(u={}){this.configuration=u}set config(u){this.configuration=u}get basePath(){return this.configuration.basePath!=null?this.configuration.basePath:Dg}get fetchApi(){return this.configuration.fetchApi}get middleware(){return this.configuration.middleware||[]}get queryParamsStringify(){return this.configuration.queryParamsStringify||Cu}get username(){return this.configuration.username}get password(){return this.configuration.password}get apiKey(){let u=this.configuration.apiKey;if(u)return typeof u=="function"?u:()=>u}get accessToken(){let u=this.configuration.accessToken;if(u)return typeof u=="function"?u:()=>ne(this,null,function*(){return u})}get headers(){return this.configuration.headers}get credentials(){return this.configuration.credentials}},Bg=new jg,Dt,mv=(Dt=class{constructor(f=Bg){Lt(this,"middleware");Lt(this,"fetchApi",(f,o)=>ne(this,null,function*(){let b={url:f,init:o};for(let E of this.middleware)E.pre&&(b=(yield E.pre(fn({fetch:this.fetchApi},b)))||b);let S;try{S=yield(this.configuration.fetchApi||fetch)(b.url,b.init)}catch(E){for(let V of this.middleware)V.onError&&(S=(yield V.onError({fetch:this.fetchApi,url:b.url,init:b.init,error:E,response:S?S.clone():void 0}))||S);if(S===void 0)throw E instanceof Error?new Vg(E,"The request failed and the interceptors did not return an alternative response"):E}for(let E of this.middleware)E.post&&(S=(yield E.post({fetch:this.fetchApi,url:b.url,init:b.init,response:S.clone()}))||S);return S}));this.configuration=f,this.middleware=f.middleware}withMiddleware(...f){let o=this.clone();return o.middleware=o.middleware.concat(...f),o}withPreMiddleware(...f){let o=f.map(b=>({pre:b}));return this.withMiddleware(...o)}withPostMiddleware(...f){let o=f.map(b=>({post:b}));return this.withMiddleware(...o)}isJsonMime(f){return f?Dt.jsonRegex.test(f):!1}request(f,o){return ne(this,null,function*(){let{url:b,init:S}=yield this.createFetchParams(f,o),E=yield this.fetchApi(b,S);if(E&&E.status>=200&&E.status<300)return E;throw new Gg(E,"Response returned an error code")})}createFetchParams(f,o){return ne(this,null,function*(){let b=this.configuration.basePath+f.path;f.query!==void 0&&Object.keys(f.query).length!==0&&(b+="?"+this.configuration.queryParamsStringify(f.query));let S=Object.assign({},this.configuration.headers,f.headers);Object.keys(S).forEach(st=>S[st]===void 0?delete S[st]:{});let E=typeof o=="function"?o:()=>ne(this,null,function*(){return o}),V={method:f.method,headers:S,body:f.body,credentials:this.configuration.credentials},ce=fn(fn({},V),yield E({init:V,context:f})),Q;zg(ce.body)||ce.body instanceof URLSearchParams||Kg(ce.body)?Q=ce.body:this.isJsonMime(S["Content-Type"])?Q=JSON.stringify(ce.body):Q=ce.body;let ut=_u(fn({},ce),{body:Q});return{url:b,init:ut}})}clone(){let f=this.constructor,o=new f(this.configuration);return o.middleware=this.middleware.slice(),o}},Lt(Dt,"jsonRegex",new RegExp("^(:?application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(:?;.*)?$","i")),Dt);function Kg(u){return typeof Blob<"u"&&u instanceof Blob}function zg(u){return typeof FormData<"u"&&u instanceof FormData}var Gg=class extends Error{constructor(f,o){super(o);Lt(this,"name","ResponseError");this.response=f}},Vg=class extends Error{constructor(f,o){super(o);Lt(this,"name","FetchError");this.cause=f}};function Cu(u,f=""){return Object.keys(u).map(o=>Ou(o,u[o],f)).filter(o=>o.length>0).join("&")}function Ou(u,f,o=""){let b=o+(o.length?`[${u}]`:u);if(f instanceof Array){let S=f.map(E=>encodeURIComponent(String(E))).join(`&${encodeURIComponent(b)}=`);return`${encodeURIComponent(b)}=${S}`}if(f instanceof Set){let S=Array.from(f);return Ou(u,S,o)}return f instanceof Date?`${encodeURIComponent(b)}=${encodeURIComponent(f.toISOString())}`:f instanceof Object?Cu(f,b):`${encodeURIComponent(b)}=${encodeURIComponent(String(f))}`}var $g=(u=>(u.Active="active",u.Inactive="inactive",u.Pending="pending",u))($g||{});var Hg=(u=>(u.Passkey="passkey",u.SecurityKey="security_key",u.Platform="platform",u))(Hg||{});var Zg=(u=>(u.S="s",u.M="m",u.H="h",u.D="d",u))(Zg||{});var Yg=(u=>(u.Helvetica="Helvetica",u.Arial="Arial",u.ArialBlack="Arial Black",u.Verdana="Verdana",u.Tahoma="Tahoma",u.TrebuchetMs="Trebuchet MS",u.Impact="Impact",u.GillSans="Gill Sans",u.TimesNewRoman="Times New Roman",u.Georgia="Georgia",u.Palatino="Palatino",u.Baskerville="Baskerville",u.AndalMono="Andal\xE9 Mono",u.Courier="Courier",u.Lucida="Lucida",u.Monaco="Monaco",u.BradleyHand="Bradley Hand",u.BrushScriptMt="Brush Script MT",u.Luminari="Luminari",u.ComicSansMs="Comic Sans MS",u))(Yg||{});var Xg=(u=>(u.MagicLink="magic_link",u.Otp="otp",u.None="none",u))(Xg||{});var Qg=(u=>(u.Platform="platform",u.CrossPlatform="cross-platform",u.Any="any",u))(Qg||{});var ev=(u=>(u.Apple="apple",u.Google="google",u))(ev||{});var tv=(u=>(u.Request="invalid_request",u.ClientVersion="invalid_client_version",u))(tv||{});var nv=(u=>(u.DiscoverableLoginFailed="discoverable_login_failed",u.WebauthnLoginFailed="webauthn_login_failed",u.InvalidMagicLink="invalid_magic_link",u.InvalidAccessToken="invalid_access_token",u.InvalidRefreshToken="invalid_refresh_token",u.ExceededAttempts="exceeded_attempts",u))(nv||{});var rv=(u=>(u.IdentifierNotVerified="identifier_not_verified",u.OperationNotAllowed="operation_not_allowed",u.UserNotActive="user_not_active",u))(rv||{});var iv=(u=>(u.AppNotFound="app_not_found",u.UserNotFound="user_not_found",u.MagicLinkNotFound="magic_link_not_found",u.SocialConnectionNotFound="social_connection_not_found",u.TransactionNotFound="transaction_not_found",u))(iv||{});var av=(u=>(u.UserHasNoPasskeys="user_has_no_passkeys",u))(av||{});var ov=(u=>(u.InternalServerError="internal_server_error",u))(ov||{});var uv=(u=>(u.Apple="apple",u.Github="github",u.Google="google",u))(uv||{});var sv=(u=>(u.UserCancelledAuthorize="user_cancelled_authorize",u))(sv||{}),lv=(u=>(u.UserCancelledAuthorize="user_cancelled_authorize",u))(lv||{}),cv=(u=>(u.Apple="apple",u.Github="github",u.Google="google",u.Passage="passage",u))(cv||{}),dv=(u=>(u.InteractionRequired="interaction_required",u.LoginRequired="login_required",u.AccountSelectionRequired="account_selection_required",u.ConsentRequired="consent_required",u.InvalidRequestUri="invalid_request_uri",u.InvalidRequestObject="invalid_request_object",u.RequestNotSupported="request_not_supported",u.RequestUriNotSupported="request_uri_not_supported",u.RegistrationNotSupported="registration_not_supported",u))(dv||{}),pv=(u=>(u.InteractionRequired="interaction_required",u.LoginRequired="login_required",u.AccountSelectionRequired="account_selection_required",u.ConsentRequired="consent_required",u.InvalidRequestUri="invalid_request_uri",u.InvalidRequestObject="invalid_request_object",u.RequestNotSupported="request_not_supported",u.RequestUriNotSupported="request_uri_not_supported",u.RegistrationNotSupported="registration_not_supported",u))(pv||{});var hn=class{static createCredentialAvailable(){return ne(this,null,function*(){let f={securityKey:!1,platform:!1,isAvailable:!1};return window.PublicKeyCredential&&(f.securityKey=!0,f.isAvailable=!0,yield mu(window.PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable().then(o=>{f.platform=o}).catch(()=>console.log("Something went wrong.")),1e3)),f})}static parsePublicKey(f){if(f.challenge=wt.decodeBytes(f.challenge.toString()),f.user.id=wt.decodeBytes(f.user.id.toString()),f.excludeCredentials)for(let o=0;oE);return S==null||(o.credential=S,o.transports=this.getTransports(S)),o})}};var Tu=Fg(require("ua-parser-js"),1),gn=class{constructor(){this.userAgent=new Tu.default}getSyncedCredential(){return!!(this._isiOSPasskeySupported()||this._isMacPasskeySupported()||this._isChromeSyncedCredential()||this._isFireFoxPasskeySupported())}getCrossDeviceCredential(){return!!(this._isiOSPasskeySupported()||this._isMacPasskeySupported()||this._isChromiumCrossDevice()||this._isFireFoxPasskeySupported())}_isiOSPasskeySupported(){return this.userAgent.getOS().name=="iOS"&&parseFloat(this.userAgent.getOS().version||"")>=16}_isMacPasskeySupported(){return this.userAgent.getBrowser().name=="Safari"&&parseFloat(this.userAgent.getBrowser().version||"")>=16&&this.userAgent.getOS().name=="Mac OS"}_isChromeSyncedCredential(){var b;let f=(b=this.userAgent.getOS().name)!=null?b:"";return((f==null?void 0:f.includes("Windows"))||(f==null?void 0:f.includes("Mac OS"))||(f==null?void 0:f.includes("Android")))&&this.userAgent.getBrowser().name=="Chrome"&&parseFloat(this.userAgent.getBrowser().version||"")>=108}_isChromiumCrossDevice(){return this.userAgent.getOS().name==="Android"?!1:this.userAgent.getEngine().name=="Blink"&&parseFloat(this.userAgent.getBrowser().version||"")>=109}_isFireFoxPasskeySupported(){return this.userAgent.getBrowser().name=="Firefox"&&parseFloat(this.userAgent.getBrowser().version||"")>=122}};var Ni=class{static parsePublicKey(f){if(f.challenge=wt.decodeBytes(f.challenge.toString()),f.allowCredentials){for(let o=0;oS)})}static getCredentialAvailable(){return ne(this,null,function*(){let f={securityKey:!1,platform:!1,syncedCredential:!1,crossDeviceCredential:!1,conditionalUI:!1,isAvailable:!1},o=yield hn.createCredentialAvailable();if(f.securityKey=o.securityKey,f.platform=o.platform,f.isAvailable=o.isAvailable,!f.securityKey)return f;let b=yield this._getClientCapabalities();if(b!==void 0)return b;f.conditionalUI=yield this._isConditionalMediationAvailable();let S=new gn;return f.syncedCredential=S.getSyncedCredential(),f.crossDeviceCredential=S.getCrossDeviceCredential(),f})}static _isConditionalMediationAvailable(){return ne(this,null,function*(){return PublicKeyCredential.isConditionalMediationAvailable?yield PublicKeyCredential.isConditionalMediationAvailable():!1})}static _getClientCapabalities(){return ne(this,null,function*(){if(window.PublicKeyCredential){let f=window.PublicKeyCredential;if(f.getClientCapabilities){let o=yield f.getClientCapabilities();return{securityKey:!0,platform:o.userVerifyingPlatformAuthenticator,syncedCredential:o.passkeyPlatformAuthenticator,crossDeviceCredential:o.hybridTransport,conditionalUI:o.conditionalMediation,isAvailable:!0}}}})}};0&&(module.exports={CreateCredentialUtils,GetCredentialUtils}); /*! Bundled license information: lodash/lodash.js: (** * @license * Lodash * Copyright OpenJS Foundation and other contributors * Released under MIT license * Based on Underscore.js 1.8.3 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors *) */ //#