@masonitestudios/spartanauth-widgets 1.2.1 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +231 -222
- package/dist/sa-widgets.mjs +2498 -1320
- package/dist/sa-widgets.umd.js +128 -4
- package/package.json +7 -3
package/dist/sa-widgets.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(it){typeof define=="function"&&define.amd?define(it):it()})(function(){"use strict";const Ke={equals:(e,t)=>e===t};let vt=Et;const Se=1,He=2,Ct={owned:null,cleanups:null,context:null,owner:null};var Q=null;let st=null,en=null,ee=null,ue=null,Be=null,We=0;function tn(e,t){const n=ee,r=Q,i=e.length===0,s=t===void 0?r:t,u=i?Ct:{owned:null,cleanups:null,context:s?s.context:null,owner:s},o=i?e:()=>e(()=>Ze(()=>Ge(u)));Q=u,ee=null;try{return Ve(o,!0)}finally{ee=n,Q=r}}function w(e,t){t=t?Object.assign({},Ke,t):Ke;const n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},r=i=>(typeof i=="function"&&(i=i(n.value)),At(n,i));return[wt.bind(n),r]}function y(e,t,n){const r=ut(e,t,!1,Se);Je(r)}function nn(e,t,n){vt=on;const r=ut(e,t,!1,Se);r.user=!0,Be?Be.push(r):Je(r)}function f(e,t,n){n=n?Object.assign({},Ke,n):Ke;const r=ut(e,t,!0,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,Je(r),wt.bind(r)}function Ze(e){if(ee===null)return e();const t=ee;ee=null;try{return e()}finally{ee=t}}function at(e){nn(()=>Ze(e))}function rn(e){return Q===null||(Q.cleanups===null?Q.cleanups=[e]:Q.cleanups.push(e)),e}function sn(){return Q}function wt(){if(this.sources&&this.state)if(this.state===Se)Je(this);else{const e=ue;ue=null,Ve(()=>Xe(this),!1),ue=e}if(ee){const e=this.observers?this.observers.length:0;ee.sources?(ee.sources.push(this),ee.sourceSlots.push(e)):(ee.sources=[this],ee.sourceSlots=[e]),this.observers?(this.observers.push(ee),this.observerSlots.push(ee.sources.length-1)):(this.observers=[ee],this.observerSlots=[ee.sources.length-1])}return this.value}function At(e,t,n){let r=e.value;return(!e.comparator||!e.comparator(r,t))&&(e.value=t,e.observers&&e.observers.length&&Ve(()=>{for(let i=0;i<e.observers.length;i+=1){const s=e.observers[i],u=st&&st.running;u&&st.disposed.has(s),(u?!s.tState:!s.state)&&(s.pure?ue.push(s):Be.push(s),s.observers&&Ft(s)),u||(s.state=Se)}if(ue.length>1e6)throw ue=[],new Error},!1)),t}function Je(e){if(!e.fn)return;Ge(e);const t=We;an(e,e.value,t)}function an(e,t,n){let r;const i=Q,s=ee;ee=Q=e;try{r=e.fn(t)}catch(u){return e.pure&&(e.state=Se,e.owned&&e.owned.forEach(Ge),e.owned=null),e.updatedAt=n+1,yt(u)}finally{ee=s,Q=i}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&"observers"in e?At(e,r):e.value=r,e.updatedAt=n)}function ut(e,t,n,r=Se,i){const s={fn:e,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:Q,context:Q?Q.context:null,pure:n};return Q===null||Q!==Ct&&(Q.owned?Q.owned.push(s):Q.owned=[s]),s}function Ye(e){if(e.state===0)return;if(e.state===He)return Xe(e);if(e.suspense&&Ze(e.suspense.inFallback))return e.suspense.effects.push(e);const t=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<We);)e.state&&t.push(e);for(let n=t.length-1;n>=0;n--)if(e=t[n],e.state===Se)Je(e);else if(e.state===He){const r=ue;ue=null,Ve(()=>Xe(e,t[0]),!1),ue=r}}function Ve(e,t){if(ue)return e();let n=!1;t||(ue=[]),Be?n=!0:Be=[],We++;try{const r=e();return un(n),r}catch(r){n||(Be=null),ue=null,yt(r)}}function un(e){if(ue&&(Et(ue),ue=null),e)return;const t=Be;Be=null,t.length&&Ve(()=>vt(t),!1)}function Et(e){for(let t=0;t<e.length;t++)Ye(e[t])}function on(e){let t,n=0;for(t=0;t<e.length;t++){const r=e[t];r.user?e[n++]=r:Ye(r)}for(t=0;t<n;t++)Ye(e[t])}function Xe(e,t){e.state=0;for(let n=0;n<e.sources.length;n+=1){const r=e.sources[n];if(r.sources){const i=r.state;i===Se?r!==t&&(!r.updatedAt||r.updatedAt<We)&&Ye(r):i===He&&Xe(r,t)}}}function Ft(e){for(let t=0;t<e.observers.length;t+=1){const n=e.observers[t];n.state||(n.state=He,n.pure?ue.push(n):Be.push(n),n.observers&&Ft(n))}}function Ge(e){let t;if(e.sources)for(;e.sources.length;){const n=e.sources.pop(),r=e.sourceSlots.pop(),i=n.observers;if(i&&i.length){const s=i.pop(),u=n.observerSlots.pop();r<i.length&&(s.sourceSlots[u]=r,i[r]=s,n.observerSlots[r]=u)}}if(e.tOwned){for(t=e.tOwned.length-1;t>=0;t--)Ge(e.tOwned[t]);delete e.tOwned}if(e.owned){for(t=e.owned.length-1;t>=0;t--)Ge(e.owned[t]);e.owned=null}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null}e.state=0}function ln(e){return e instanceof Error?e:new Error(typeof e=="string"?e:"Unknown error",{cause:e})}function yt(e,t=Q){throw ln(e)}function cn(e,t,n){let r=n.length,i=t.length,s=r,u=0,o=0,A=t[i-1].nextSibling,k=null;for(;u<i||o<s;){if(t[u]===n[o]){u++,o++;continue}for(;t[i-1]===n[s-1];)i--,s--;if(i===u){const g=s<r?o?n[o-1].nextSibling:n[s-o]:A;for(;o<s;)e.insertBefore(n[o++],g)}else if(s===o)for(;u<i;)(!k||!k.has(t[u]))&&t[u].remove(),u++;else if(t[u]===n[s-1]&&n[o]===t[i-1]){const g=t[--i].nextSibling;e.insertBefore(n[o++],t[u++].nextSibling),e.insertBefore(n[--s],g),t[i]=n[s]}else{if(!k){k=new Map;let q=o;for(;q<s;)k.set(n[q],q++)}const g=k.get(t[u]);if(g!=null)if(o<g&&g<s){let q=u,Ae=1,we;for(;++q<i&&q<s&&!((we=k.get(t[q]))==null||we!==g+Ae);)Ae++;if(Ae>g-o){const $e=t[u];for(;o<g;)e.insertBefore(n[o++],$e)}else e.replaceChild(n[o++],t[u++])}else u++;else t[u++].remove()}}}const $t="_$DX_DELEGATE";function v(e,t,n,r){let i;const s=()=>{const o=document.createElement("template");return o.innerHTML=e,o.content.firstChild},u=()=>(i||(i=s())).cloneNode(!0);return u.cloneNode=u,u}function ot(e,t=window.document){const n=t[$t]||(t[$t]=new Set);for(let r=0,i=e.length;r<i;r++){const s=e[r];n.has(s)||(n.add(s),t.addEventListener(s,dn))}}function fe(e,t,n){n==null?e.removeAttribute(t):e.setAttribute(t,n)}function kt(e,t,n){return Ze(()=>e(t,n))}function d(e,t,n,r){if(n!==void 0&&!r&&(r=[]),typeof t!="function")return Qe(e,t,r,n);y(i=>Qe(e,t(),i,n),r)}function dn(e){let t=e.target;const n=`$$${e.type}`,r=e.target,i=e.currentTarget,s=A=>Object.defineProperty(e,"target",{configurable:!0,value:A}),u=()=>{const A=t[n];if(A&&!t.disabled){const k=t[`${n}Data`];if(k!==void 0?A.call(t,k,e):A.call(t,e),e.cancelBubble)return}return t.host&&typeof t.host!="string"&&!t.host._$host&&t.contains(e.target)&&s(t.host),!0},o=()=>{for(;u()&&(t=t._$host||t.parentNode||t.host););};if(Object.defineProperty(e,"currentTarget",{configurable:!0,get(){return t||document}}),e.composedPath){const A=e.composedPath();s(A[0]);for(let k=0;k<A.length-2&&(t=A[k],!!u());k++){if(t._$host){t=t._$host,o();break}if(t.parentNode===i)break}}else o();s(r)}function Qe(e,t,n,r,i){for(;typeof n=="function";)n=n();if(t===n)return n;const s=typeof t,u=r!==void 0;if(e=u&&n[0]&&n[0].parentNode||e,s==="string"||s==="number"){if(s==="number"&&(t=t.toString(),t===n))return n;if(u){let o=n[0];o&&o.nodeType===3?o.data!==t&&(o.data=t):o=document.createTextNode(t),n=Re(e,n,r,o)}else n!==""&&typeof n=="string"?n=e.firstChild.data=t:n=e.textContent=t}else if(t==null||s==="boolean")n=Re(e,n,r);else{if(s==="function")return y(()=>{let o=t();for(;typeof o=="function";)o=o();n=Qe(e,o,n,r)}),()=>n;if(Array.isArray(t)){const o=[],A=n&&Array.isArray(n);if(lt(o,t,n,i))return y(()=>n=Qe(e,o,n,r,!0)),()=>n;if(o.length===0){if(n=Re(e,n,r),u)return n}else A?n.length===0?Bt(e,o,r):cn(e,n,o):(n&&Re(e),Bt(e,o));n=o}else if(t.nodeType){if(Array.isArray(n)){if(u)return n=Re(e,n,r,t);Re(e,n,null,t)}else n==null||n===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}}return n}function lt(e,t,n,r){let i=!1;for(let s=0,u=t.length;s<u;s++){let o=t[s],A=n&&n[e.length],k;if(!(o==null||o===!0||o===!1))if((k=typeof o)=="object"&&o.nodeType)e.push(o);else if(Array.isArray(o))i=lt(e,o,A)||i;else if(k==="function")if(r){for(;typeof o=="function";)o=o();i=lt(e,Array.isArray(o)?o:[o],Array.isArray(A)?A:[A])||i}else e.push(o),i=!0;else{const g=String(o);A&&A.nodeType===3&&A.data===g?e.push(A):e.push(document.createTextNode(g))}}return i}function Bt(e,t,n=null){for(let r=0,i=t.length;r<i;r++)e.insertBefore(t[r],n)}function Re(e,t,n,r){if(n===void 0)return e.textContent="";const i=r||document.createTextNode("");if(t.length){let s=!1;for(let u=t.length-1;u>=0;u--){const o=t[u];if(i!==o){const A=o.parentNode===e;!s&&!u?A?e.replaceChild(i,o):e.insertBefore(i,n):A&&o.remove()}else s=!0}}else e.insertBefore(i,n);return[i]}function hn(e){return Object.keys(e).reduce((n,r)=>{const i=e[r];return n[r]=Object.assign({},i),St(i.value)&&!mn(i.value)&&!Array.isArray(i.value)&&(n[r].value=Object.assign({},i.value)),Array.isArray(i.value)&&(n[r].value=i.value.slice(0)),n},{})}function fn(e){return e?Object.keys(e).reduce((n,r)=>{const i=e[r];return n[r]=St(i)&&"value"in i?i:{value:i},n[r].attribute||(n[r].attribute=Dn(r)),n[r].parse="parse"in n[r]?n[r].parse:typeof n[r].value!="string",n},{}):{}}function pn(e){return Object.keys(e).reduce((n,r)=>(n[r]=e[r].value,n),{})}function gn(e,t){const n=hn(t);return Object.keys(t).forEach(i=>{const s=n[i],u=e.getAttribute(s.attribute),o=e[i];u!=null&&(s.value=s.parse?xt(u):u),o!=null&&(s.value=Array.isArray(o)?o.slice(0):o),s.reflect&&_t(e,s.attribute,s.value,!!s.parse),Object.defineProperty(e,i,{get(){return s.value},set(A){const k=s.value;s.value=A,s.reflect&&_t(this,s.attribute,s.value,!!s.parse);for(let g=0,q=this.__propertyChangedCallbacks.length;g<q;g++)this.__propertyChangedCallbacks[g](i,A,k)},enumerable:!0,configurable:!0})}),n}function xt(e){if(e)try{return JSON.parse(e)}catch{return e}}function _t(e,t,n,r){if(n==null||n===!1)return e.removeAttribute(t);let i=r?JSON.stringify(n):n;e.__updating[t]=!0,i==="true"&&(i=""),e.setAttribute(t,i),Promise.resolve().then(()=>delete e.__updating[t])}function Dn(e){return e.replace(/\.?([A-Z]+)/g,(t,n)=>"-"+n.toLowerCase()).replace("_","-").replace(/^-/,"")}function St(e){return e!=null&&(typeof e=="object"||typeof e=="function")}function mn(e){return Object.prototype.toString.call(e)==="[object Function]"}function bn(e){return typeof e=="function"&&e.toString().indexOf("class")===0}let ct;function vn(e,t){const n=Object.keys(t);return class extends e{static get observedAttributes(){return n.map(i=>t[i].attribute)}constructor(){super(),this.__initialized=!1,this.__released=!1,this.__releaseCallbacks=[],this.__propertyChangedCallbacks=[],this.__updating={},this.props={}}connectedCallback(){if(this.__initialized)return;this.__releaseCallbacks=[],this.__propertyChangedCallbacks=[],this.__updating={},this.props=gn(this,t);const i=pn(this.props),s=this.Component,u=ct;try{ct=this,this.__initialized=!0,bn(s)?new s(i,{element:this}):s(i,{element:this})}finally{ct=u}}async disconnectedCallback(){if(await Promise.resolve(),this.isConnected)return;this.__propertyChangedCallbacks.length=0;let i=null;for(;i=this.__releaseCallbacks.pop();)i(this);delete this.__initialized,this.__released=!0}attributeChangedCallback(i,s,u){if(this.__initialized&&!this.__updating[i]&&(i=this.lookupProp(i),i in t)){if(u==null&&!this[i])return;this[i]=t[i].parse?xt(u):u}}lookupProp(i){if(t)return n.find(s=>i===s||i===t[s].attribute)}get renderRoot(){return this.shadowRoot||this.attachShadow({mode:"open"})}addReleaseCallback(i){this.__releaseCallbacks.push(i)}addPropertyChangedCallback(i){this.__propertyChangedCallbacks.push(i)}}}function Cn(e,t={},n={}){const{BaseElement:r=HTMLElement,extension:i,customElements:s=window.customElements}=n;return u=>{if(!e)throw new Error("tag is required to register a Component");let o=s.get(e);return o?(o.prototype.Component=u,o):(o=vn(r,fn(t)),o.prototype.Component=u,o.prototype.registeredTag=e,s.define(e,o,i),o)}}function wn(e){const t=Object.keys(e),n={};for(let r=0;r<t.length;r++){const[i,s]=w(e[t[r]]);Object.defineProperty(n,t[r],{get:i,set(u){s(()=>u)}})}return n}function An(e){if(e.assignedSlot&&e.assignedSlot._$owner)return e.assignedSlot._$owner;let t=e.parentNode;for(;t&&!t._$owner&&!(t.assignedSlot&&t.assignedSlot._$owner);)t=t.parentNode;return t&&t.assignedSlot?t.assignedSlot._$owner:e._$owner}function En(e){return(t,n)=>{const{element:r}=n;return tn(i=>{const s=wn(t);r.addPropertyChangedCallback((o,A)=>s[o]=A),r.addReleaseCallback(()=>{r.renderRoot.textContent="",i()});const u=e(s,n);return d(r.renderRoot,u)},An(r))}}function dt(e,t,n){return arguments.length===2&&(n=t,t={}),Cn(e,t)(En(n))}var Fn="٠١٢٣٤٥٦٧٨٩",yn="۰۱۲۳۴۵۶۷۸۹",$n="൦൧൨൩൪൫൬൭൮൯",kn="೦೧೨೩೪೫೬೭೮೯",Bn="໐໑໒໓໔໕໖໗໘໙",xn="୦୧୨୩୪୫୬୭୮୯",_n="០១២៣៤៥៦៧៨៩",Sn="߀߁߂߃߄߅߆߇߈߉",Tn="੦੧੨੩੪੫੬੭੮੯",On="૦૧૨૩૪૫૬૭૮૯",In="०१२३४५६७८९",Pn="၀၁၂၃၄၅၆၇၈၉",zn="௦௧௨௩௪௫௬௭௮௯",Mn="౦౧౨౩౪౫౬౭౮౯",Nn="๐๑๒๓๔๕๖๗๘๙",jn="༠༡༢༣༤༥༦༧༨༩",Tt={ar:Fn,fa:yn,ml:$n,kn,lo:Bn,or:xn,kh:_n,nqo:Sn,pa:Tn,gu:On,hi:In,my:Pn,ta:zn,te:Mn,th:Nn,bo:jn},Rn=["ru"],Ln=["id"],Un=["id"],qn=["ady-cyrl"],Jn=["aeb-arab"],Vn=["sq"],Gn=["ru"],Kn=["zh-hant"],Hn=["es"],Wn=["hi"],Zn=["es"],Yn=["ar"],Xn=["ar"],Qn=["ar"],er=["es"],tr=["fr"],nr=["ru"],rr=["fr","es","ru"],ir=["hi"],sr=["es"],ar=["fa"],ur=["ru"],or=["id"],lr=["de"],cr=["bbc-latn"],dr=["fa"],hr=["fa"],fr=["bho"],pr=["en"],gr=["id"],Dr=["fr"],mr=["bn"],br=["fa"],vr=["fr"],Cr=["id"],wr=["id"],Ar=["ru"],Er=["oc"],Fr=["nan","zh-hant"],yr=["ru"],$r=["it"],kr=["crh-latn"],Br=["sk"],xr=["pl"],_r=["ru"],Sr=["hsb","de"],Tr=["ms"],Or=["ne"],Ir=["it"],Pr=["it"],zr=["es"],Mr=["fr"],Nr=["fi"],jr=["fr"],Rr=["fr"],Lr=["de"],Ur=["it"],qr=["tr"],Jr=["gan-hant","zh-hant","zh-hans"],Vr=["fr"],Gr=["pt"],Kr=["fa"],Hr=["es"],Wr=["gom-deva"],Zr=["id"],Yr=["de"],Xr=["es"],Qr=["zh-hant"],ei=["hif-latn"],ti=["de"],ni=["dsb","de"],ri=["fr"],ii=["hy"],si=["zh-cn","zh-hans"],ai=["ru"],ui=["eo"],oi=["ike-cans"],li=["en"],ci=["da"],di=["id"],hi=["kk-latn","kk-cyrl"],fi=["fr"],pi=["kbd-cyrl"],gi=["fr"],Di=["ur"],mi=["tr"],bi=["my"],vi=["kk-cyrl"],Ci=["da"],wi=["ru"],Ai=["ru"],Ei=["fi"],Fi=["ks-arab"],yi=["de"],$i=["ku-latn"],ki=["ru"],Bi=["ru"],xi=["es"],_i=["de"],Si=["ru"],Ti=["ru","az"],Oi=["nl"],Ii=["it"],Pi=["et"],zi=["fa"],Mi=["it","rm","fur"],Ni=["pms","eml","lij","vec","it"],ji=["fr"],Ri=["fa"],Li=["lv"],Ui=["fa"],qi=["zh-hant"],Ji=["tr"],Vi=["id"],Gi=["hi"],Ki=["myv","ru"],Hi=["fr"],Wi=["mrj","ru"],Zi=["id"],Yi=["my"],Xi=["ro"],Qi=["mhr","ru"],es=["pt"],ts=["mdf","ru"],ns=["fa"],rs=["es"],is=["cdo","zh-hant"],ss=["it"],as=["nn"],us=["de"],os=["id"],ls=["nb"],cs=["fr"],ds=["ca","fr"],hs=["fi"],fs=["ru"],ps=["fr"],gs=["de"],Ds=["de"],ms=["de"],bs=["en"],vs=["it"],Cs=["el"],ws=["pt-br"],As=["qug","es"],Es=["qu","es"],Fs=["it"],ys=["ro"],$s=["uk","ru"],ks=["ro"],Bs=["ruq-latn","ro"],xs=["hi"],_s=["ru"],Ss=["it"],Ts=["en"],Os=["it"],Is=["cbk","fa"],Ps=["fr"],zs=["fr"],Ms=["lt"],Ns=["bs","sr-el","hr"],js=["fr"],Rs=["shy-latn"],Ls=["cs"],Us=["skr-arab"],qs=["de"],Js=["fi"],Vs=["sr-ec"],Gs=["nl"],Ks=["de"],Hs=["ru"],Ws=["id"],Zs=["pl"],Ys=["zh-tw","zh-hant","zh-hans"],Xs=["zh-tw","zh-hant","zh-hans"],Qs=["kn"],ea=["pt"],ta=["tg-cyrl"],na=["zh-tw","zh-hant","zh-hans"],ra=["tt-cyrl","ru"],ia=["fr"],sa=["ru"],aa=["ru"],ua=["ug-arab"],oa=["it"],la=["et"],ca=["nl"],da=["de"],ha=["fi"],fa=["et"],pa=["fr"],ga=["fr"],Da=["zh-hans"],ma=["ru"],ba=["ka"],va=["he"],Ca=["zh-hans"],wa=["nl"],Aa=["kab"],Ea=["zh-hans"],Ot={ab:Rn,abs:Ln,ace:Un,ady:qn,aeb:Jn,"aeb-arab":["ar"],aln:Vn,alt:Gn,ami:Kn,an:Hn,anp:Wn,arn:Zn,arq:Yn,ary:Xn,arz:Qn,ast:er,atj:tr,av:nr,avk:rr,awa:ir,ay:sr,azb:ar,ba:ur,ban:or,"ban-bali":["ban"],bar:lr,bbc:cr,"bbc-latn":["id"],bcc:dr,"be-tarask":["be"],bgn:hr,bh:fr,bi:pr,bjn:gr,bm:Dr,bpy:mr,bqi:br,br:vr,btm:Cr,bug:wr,bxr:Ar,ca:Er,"cbk-zam":["es"],cdo:Fr,ce:yr,co:$r,crh:kr,"crh-cyrl":["ru"],cs:Br,csb:xr,cv:_r,"de-at":["de"],"de-ch":["de"],"de-formal":["de"],dsb:Sr,dtp:Tr,dty:Or,egl:Ir,eml:Pr,"en-ca":["en"],"en-gb":["en"],"es-419":["es"],"es-formal":["es"],ext:zr,ff:Mr,fit:Nr,frc:jr,frp:Rr,frr:Lr,fur:Ur,gag:qr,gan:Jr,"gan-hans":["zh-hans"],"gan-hant":["zh-hant","zh-hans"],gcr:Vr,gl:Gr,glk:Kr,gn:Hr,gom:Wr,"gom-deva":["hi"],gor:Zr,gsw:Yr,guc:Xr,hak:Qr,hif:ei,hrx:ti,hsb:ni,ht:ri,"hu-formal":["hu"],hyw:ii,ii:si,inh:ai,io:ui,iu:oi,jam:li,jut:ci,jv:di,kaa:hi,kab:fi,kbd:pi,kbp:gi,khw:Di,kiu:mi,kjp:bi,kk:vi,"kk-arab":["kk-cyrl"],"kk-cn":["kk-arab","kk-cyrl"],"kk-kz":["kk-cyrl"],"kk-latn":["kk-cyrl"],"kk-tr":["kk-latn","kk-cyrl"],kl:Ci,"ko-kp":["ko"],koi:wi,krc:Ai,krl:Ei,ks:Fi,ksh:yi,ku:$i,"ku-arab":["ckb"],kum:ki,kv:Bi,lad:xi,lb:_i,lbe:Si,lez:Ti,li:Oi,lij:Ii,liv:Pi,lki:zi,lld:Mi,lmo:Ni,ln:ji,lrc:Ri,ltg:Li,luz:Ui,lzh:qi,lzz:Ji,mad:Vi,mai:Gi,"map-bms":["jv","id"],mdf:Ki,mg:Hi,mhr:Wi,min:Zi,mnw:Yi,mo:Xi,mrj:Qi,"ms-arab":["ms"],mwl:es,myv:ts,mzn:ns,nah:rs,nan:is,nap:ss,nb:as,nds:us,"nds-nl":["nl"],nia:os,"nl-informal":["nl"],nn:ls,nrm:cs,oc:ds,olo:hs,os:fs,pcd:ps,pdc:gs,pdt:Ds,pfl:ms,pih:bs,pms:vs,pnt:Cs,pt:ws,"pt-br":["pt"],qu:As,qug:Es,rgn:Fs,rmy:ys,"roa-tara":["it"],rue:$s,rup:ks,ruq:Bs,"ruq-cyrl":["mk"],"ruq-latn":["ro"],sa:xs,sah:_s,scn:Ss,sco:Ts,sdc:Os,sdh:Is,ses:Ps,sg:zs,sgs:Ms,sh:Ns,shi:js,shy:Rs,"shy-latn":["fr"],sk:Ls,skr:Us,"skr-arab":["ur","pnb"],sli:qs,smn:Js,sr:Vs,srn:Gs,stq:Ks,sty:Hs,su:Ws,szl:Zs,szy:Ys,tay:Xs,tcy:Qs,tet:ea,tg:ta,trv:na,tt:ra,"tt-cyrl":["ru"],ty:ia,tyv:sa,udm:aa,ug:ua,vec:oa,vep:la,vls:ca,vmf:da,vot:ha,vro:fa,wa:pa,wo:ga,wuu:Da,xal:ma,xmf:ba,yi:va,za:Ca,zea:wa,zgh:Aa,zh:Ea,"zh-cn":["zh-hans"],"zh-hant":["zh-hans"],"zh-hk":["zh-hant","zh-hans"],"zh-mo":["zh-hk","zh-hant","zh-hans"],"zh-my":["zh-sg","zh-hans"],"zh-sg":["zh-hans"],"zh-tw":["zh-hant","zh-hans"]};let De=class{constructor(e){this.locale=e}convertPlural(e,t){const n=/\d+=/i;if(!t||t.length===0)return"";for(let i=0;i<t.length;i++){const s=t[i];if(n.test(s)){if(parseInt(s.slice(0,s.indexOf("=")),10)===e)return s.slice(s.indexOf("=")+1);t[i]=void 0}}t=t.filter(i=>!!i);let r=this.getPluralForm(e,this.locale);return r=Math.min(r,t.length-1),t[r]}getPluralForm(e,t){const n=["zero","one","two","few","many","other"],r=new Intl.PluralRules(t),i=r.resolvedOptions().pluralCategories,s=r.select(e);return n.filter(u=>i.includes(u)).indexOf(s)}convertNumber(e,t=!1){let n=this.digitTransformTable(this.locale),r="";if(t){if(parseFloat(e,10)===e||!n)return e;const i=[];for(const u in n)i[n[u]]=u;n=i;const s=String(e);for(let u=0;u<s.length;u++)r+=n[s[u]]||s[u];return parseFloat(r,10)}if(Intl.NumberFormat){let i;const s=[...Ot[this.locale]||[],"en"];return Intl.NumberFormat.supportedLocalesOf(this.locale).length?i=[this.locale]:i=s,r=new Intl.NumberFormat(i).format(e),r==="NaN"&&(r=e),r}}convertGrammar(e){return e}gender(e,t){if(!t||t.length===0)return"";for(;t.length<2;)t.push(t[t.length-1]);return e==="male"?t[0]:e==="female"?t[1]:t.length===3?t[2]:t[0]}digitTransformTable(e){return Tt[e]?Tt[e].split(""):!1}},Fa=class extends De{convertGrammar(e,t){switch(t){case"prefixed":case"תחילית":e.slice(0,1)==="ו"&&e.slice(0,2)!=="וו"&&(e="ו"+e),e.slice(0,1)==="ה"&&(e=e.slice(1)),(e.slice(0,1)<"א"||e.slice(0,1)>"ת")&&(e="־"+e)}return e}},ya=class extends De{convertGrammar(t,n){switch(n){case"instrumental":t="s "+t;break;case"lokativ":t="o "+t;break}return t}},$a=class extends De{convertGrammar(e,t){switch(t){case"instrumental":e="z "+e;break;case"lokatiw":e="wo "+e;break}return e}},ka=class extends De{convertGrammar(e,t){switch(t){case"instrumental":e="z "+e;break;case"lokatiw":e="wo "+e;break}return e}},Ba=class extends De{convertGrammar(e,t){let n=e.match(/[aou][^äöy]*$/i);const r=e;switch(e.match(/wiki$/i)&&(n=!1),e.match(/[bcdfghjklmnpqrstvwxz]$/i)&&(e+="i"),t){case"genitive":e+="n";break;case"elative":e+=n?"sta":"stä";break;case"partitive":e+=n?"a":"ä";break;case"illative":e+=e.slice(-1)+"n";break;case"inessive":e+=n?"ssa":"ssä";break;default:e=r;break}return e}},xa=class extends De{convertGrammar(e,t){return t==="genitive"&&(e.slice(-1)==="ь"?e=e.slice(0,-1)+"я":e.slice(-2)==="ия"?e=e.slice(0,-2)+"ии":e.slice(-2)==="ка"?e=e.slice(0,-2)+"ки":e.slice(-2)==="ти"?e=e.slice(0,-2)+"тей":e.slice(-2)==="ды"?e=e.slice(0,-2)+"дов":e.slice(-3)==="ник"&&(e=e.slice(0,-3)+"ника")),e}};class _a extends De{convertGrammar(t,n){switch(n){case"mestnik":t="o "+t;break;case"orodnik":t="z "+t;break}return t}}let Sa=class extends De{convertGrammar(e,t){switch(t){case"genitive":e=e.replace(/u[ms]$/i,"i"),e=e.replace(/ommunia$/i,"ommunium"),e=e.replace(/a$/i,"ae"),e=e.replace(/libri$/i,"librorum"),e=e.replace(/nuntii$/i,"nuntiorum"),e=e.replace(/tio$/i,"tionis"),e=e.replace(/ns$/i,"ntis"),e=e.replace(/as$/i,"atis"),e=e.replace(/es$/i,"ei");break;case"accusative":e=e.replace(/u[ms]$/i,"um"),e=e.replace(/ommunia$/i,"am"),e=e.replace(/a$/i,"ommunia"),e=e.replace(/libri$/i,"libros"),e=e.replace(/nuntii$/i,"nuntios"),e=e.replace(/tio$/i,"tionem"),e=e.replace(/ns$/i,"ntem"),e=e.replace(/as$/i,"atem"),e=e.replace(/es$/i,"em");break;case"ablative":e=e.replace(/u[ms]$/i,"o"),e=e.replace(/ommunia$/i,"ommunibus"),e=e.replace(/a$/i,"a"),e=e.replace(/libri$/i,"libris"),e=e.replace(/nuntii$/i,"nuntiis"),e=e.replace(/tio$/i,"tione"),e=e.replace(/ns$/i,"nte"),e=e.replace(/as$/i,"ate"),e=e.replace(/es$/i,"e");break}return e}};class Ta extends De{convertGrammar(t,n){return n==="genitive"&&(t.slice(-1)==="ա"?t=t.slice(0,-1)+"այի":t.slice(-1)==="ո"?t=t.slice(0,-1)+"ոյի":t.slice(-4)==="գիրք"?t=t.slice(0,-4)+"գրքի":t=t+"ի"),t}}let Oa=class extends De{convertGrammar(e,t){if(t==="ainmlae")switch(e){case"an Domhnach":e="Dé Domhnaigh";break;case"an Luan":e="Dé Luain";break;case"an Mháirt":e="Dé Mháirt";break;case"an Chéadaoin":e="Dé Chéadaoin";break;case"an Déardaoin":e="Déardaoin";break;case"an Aoine":e="Dé hAoine";break;case"an Satharn":e="Dé Sathairn";break}return e}},Ia=class extends De{convertGrammar(e,t){switch(t){case"rol":e+="ról";break;case"ba":e+="ba";break;case"k":e+="k";break}return e}},Pa=class extends De{convertGrammar(e,t){let n,r,i,s;switch(n="мæ",r="",i="",s="",e.match(/тæ$/i)?(e=e.slice(0,-1),n="æм"):e.match(/[аæеёиоыэюя]$/i)?r="й":e.match(/у$/i)?e.slice(-2,-1).match(/[аæеёиоыэюя]$/i)||(r="й"):e.match(/[бвгджзйклмнопрстфхцчшщьъ]$/i)||(i="-"),t){case"genitive":s=i+r+"ы";break;case"dative":s=i+r+"æн";break;case"allative":s=i+n;break;case"ablative":r==="й"?s=i+r+"æ":s=i+r+"æй";break;case"superessive":s=i+r+"ыл";break;case"equative":s=i+r+"ау";break;case"comitative":s=i+"имæ";break}return e+s}};class za extends De{convertGrammar(t,n){switch(n){case"genitive":t.slice(-1)==="ь"?t=t.slice(0,-1)+"я":t.slice(-2)==="ія"?t=t.slice(0,-2)+"ії":t.slice(-2)==="ка"?t=t.slice(0,-2)+"ки":t.slice(-2)==="ти"?t=t.slice(0,-2)+"тей":t.slice(-2)==="ды"?t=t.slice(0,-2)+"дов":t.slice(-3)==="ник"&&(t=t.slice(0,-3)+"ника");break;case"accusative":t.slice(-2)==="ія"&&(t=t.slice(0,-2)+"ію");break}return t}}var It={bs:ya,default:De,dsb:$a,fi:Ba,ga:Oa,he:Fa,hsb:ka,hu:Ia,hy:Ta,la:Sa,os:Pa,ru:xa,sl:_a,uk:za};const Ma=new RegExp("(?:([A-Za-zªµºÀ-ÖØ-öø-ʸʻ-ˁːˑˠ-ˤˮͰ-ͳͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-҂Ҋ-ԯԱ-Ֆՙ-՟ա-և։ः-हऻऽ-ीॉ-ौॎ-ॐक़-ॡ।-ঀংঃঅ-ঌএঐও-নপ-রলশ-হঽ-ীেৈোৌৎৗড়ঢ়য়-ৡ০-ৱ৴-৺ਃਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਾ-ੀਖ਼-ੜਫ਼੦-੯ੲ-ੴઃઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽ-ીૉોૌૐૠૡ૦-૰ૹଂଃଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽାୀେୈୋୌୗଡ଼ଢ଼ୟ-ୡ୦-୷ஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹாிுூெ-ைொ-ௌௐௗ௦-௲ఁ-ఃఅ-ఌఎ-ఐఒ-నప-హఽు-ౄౘ-ౚౠౡ౦-౯౿ಂಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽ-ೄೆ-ೈೊೋೕೖೞೠೡ೦-೯ೱೲംഃഅ-ഌഎ-ഐഒ-ഺഽ-ീെ-ൈൊ-ൌൎൗൟ-ൡ൦-൵൹-ൿංඃඅ-ඖක-නඳ-රලව-ෆා-ෑෘ-ෟ෦-෯ෲ-෴ก-ะาำเ-ๆ๏-๛ກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆ໐-໙ໜ-ໟༀ-༗༚-༴༶༸༾-ཇཉ-ཬཿ྅ྈ-ྌ྾-࿅࿇-࿌࿎-࿚က-ာေးျြဿ-ၗၚ-ၝၡ-ၰၵ-ႁႃႄႇ-ႌႎ-ႜ႞-ჅჇჍა-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፠-፼ᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙿᚁ-ᚚᚠ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱ᜵᜶ᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳាើ-ៅះៈ។-៚ៜ០-៩᠐-᠙ᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᤣ-ᤦᤩ-ᤫᤰᤱᤳ-ᤸ᥆-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉ᧐-᧚ᨀ-ᨖᨙᨚ᨞-ᩕᩗᩡᩣᩤᩭ-ᩲ᪀-᪉᪐-᪙᪠-᪭ᬄ-ᬳᬵᬻᬽ-ᭁᭃ-ᭋ᭐-᭪᭴-᭼ᮂ-ᮡᮦᮧ᮪ᮮ-ᯥᯧᯪ-ᯬᯮ᯲᯳᯼-ᰫᰴᰵ᰻-᱉ᱍ-᱿᳀-᳇᳓᳡ᳩ-ᳬᳮ-ᳳᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎ⅏Ⅰ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵰ⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〮〯〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎ㆐-ㆺㇰ-㈜㈠-㉏㉠-㉻㉿-㊰㋀-㋋㋐-㋾㌀-㍶㍻-㏝㏠-㏾㐀-䶵一-鿕ꀀ-ꒌꓐ-ꘌꘐ-ꘫꙀ-ꙮꚀ-ꚝꚠ-ꛯ꛲-꛷Ꜣ-ꞇ꞉-ꞭꞰ-ꞷꟷ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠤꠧ꠰-꠷ꡀ-ꡳꢀ-ꣃ꣎-꣙ꣲ-ꣽ꤀-ꤥ꤮-ꥆꥒ꥓꥟-ꥼꦃ-ꦲꦴꦵꦺꦻꦽ-꧍ꧏ-꧙꧞-ꧤꧦ-ꧾꨀ-ꨨꨯꨰꨳꨴꩀ-ꩂꩄ-ꩋꩍ꩐-꩙꩜-ꩻꩽ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫫꫮ-ꫵꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭥꭰ-ꯤꯦꯧꯩ-꯬꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ-舘並-龎ff-stﬓ-ﬗA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]|\uD800[\uDC00-\uDC0B]|\uD800[\uDC0D-\uDC26]|\uD800[\uDC28-\uDC3A]|𐀼|𐀽|\uD800[\uDC3F-\uDC4D]|\uD800[\uDC50-\uDC5D]|\uD800[\uDC80-\uDCFA]|𐄀|𐄂|\uD800[\uDD07-\uDD33]|\uD800[\uDD37-\uDD3F]|\uD800[\uDDD0-\uDDFC]|\uD800[\uDE80-\uDE9C]|\uD800[\uDEA0-\uDED0]|\uD800[\uDF00-\uDF23]|\uD800[\uDF30-\uDF4A]|\uD800[\uDF50-\uDF75]|\uD800[\uDF80-\uDF9D]|\uD800[\uDF9F-\uDFC3]|\uD800[\uDFC8-\uDFD5]|\uD801[\uDC00-\uDC9D]|\uD801[\uDCA0-\uDCA9]|\uD801[\uDD00-\uDD27]|\uD801[\uDD30-\uDD63]|𐕯|\uD801[\uDE00-\uDF36]|\uD801[\uDF40-\uDF55]|\uD801[\uDF60-\uDF67]|𑀀|\uD804[\uDC02-\uDC37]|\uD804[\uDC47-\uDC4D]|\uD804[\uDC66-\uDC6F]|\uD804[\uDC82-\uDCB2]|𑂷|𑂸|\uD804[\uDCBB-\uDCC1]|\uD804[\uDCD0-\uDCE8]|\uD804[\uDCF0-\uDCF9]|\uD804[\uDD03-\uDD26]|𑄬|\uD804[\uDD36-\uDD43]|\uD804[\uDD50-\uDD72]|\uD804[\uDD74-\uDD76]|\uD804[\uDD82-\uDDB5]|\uD804[\uDDBF-\uDDC9]|𑇍|\uD804[\uDDD0-\uDDDF]|\uD804[\uDDE1-\uDDF4]|\uD804[\uDE00-\uDE11]|\uD804[\uDE13-\uDE2E]|𑈲|𑈳|𑈵|\uD804[\uDE38-\uDE3D]|\uD804[\uDE80-\uDE86]|𑊈|\uD804[\uDE8A-\uDE8D]|\uD804[\uDE8F-\uDE9D]|\uD804[\uDE9F-\uDEA9]|\uD804[\uDEB0-\uDEDE]|\uD804[\uDEE0-\uDEE2]|\uD804[\uDEF0-\uDEF9]|𑌂|𑌃|\uD804[\uDF05-\uDF0C]|𑌏|𑌐|\uD804[\uDF13-\uDF28]|\uD804[\uDF2A-\uDF30]|𑌲|𑌳|\uD804[\uDF35-\uDF39]|\uD804[\uDF3D-\uDF3F]|\uD804[\uDF41-\uDF44]|𑍇|𑍈|\uD804[\uDF4B-\uDF4D]|𑍐|𑍗|\uD804[\uDF5D-\uDF63]|\uD805[\uDC80-\uDCB2]|𑒹|\uD805[\uDCBB-\uDCBE]|𑓁|\uD805[\uDCC4-\uDCC7]|\uD805[\uDCD0-\uDCD9]|\uD805[\uDD80-\uDDB1]|\uD805[\uDDB8-\uDDBB]|𑖾|\uD805[\uDDC1-\uDDDB]|\uD805[\uDE00-\uDE32]|𑘻|𑘼|𑘾|\uD805[\uDE41-\uDE44]|\uD805[\uDE50-\uDE59]|\uD805[\uDE80-\uDEAA]|𑚬|𑚮|𑚯|𑚶|\uD805[\uDEC0-\uDEC9]|\uD805[\uDF00-\uDF19]|𑜠|𑜡|𑜦|\uD805[\uDF30-\uDF3F]|\uD806[\uDCA0-\uDCF2]|𑣿|\uD806[\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E]|\uD809[\uDC70-\uDC74]|\uD809[\uDC80-\uDD43]|\uD80C[\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38]|\uD81A[\uDE40-\uDE5E]|\uD81A[\uDE60-\uDE69]|𖩮|𖩯|\uD81A[\uDED0-\uDEED]|𖫵|\uD81A[\uDF00-\uDF2F]|\uD81A[\uDF37-\uDF45]|\uD81A[\uDF50-\uDF59]|\uD81A[\uDF5B-\uDF61]|\uD81A[\uDF63-\uDF77]|\uD81A[\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44]|\uD81B[\uDF50-\uDF7E]|\uD81B[\uDF93-\uDF9F]|𛀀|𛀁|\uD82F[\uDC00-\uDC6A]|\uD82F[\uDC70-\uDC7C]|\uD82F[\uDC80-\uDC88]|\uD82F[\uDC90-\uDC99]|𛲜|𛲟|\uD834[\uDC00-\uDCF5]|\uD834[\uDD00-\uDD26]|\uD834[\uDD29-\uDD66]|\uD834[\uDD6A-\uDD72]|𝆃|𝆄|\uD834[\uDD8C-\uDDA9]|\uD834[\uDDAE-\uDDE8]|\uD834[\uDF60-\uDF71]|\uD835[\uDC00-\uDC54]|\uD835[\uDC56-\uDC9C]|𝒞|𝒟|𝒢|𝒥|𝒦|\uD835[\uDCA9-\uDCAC]|\uD835[\uDCAE-\uDCB9]|𝒻|\uD835[\uDCBD-\uDCC3]|\uD835[\uDCC5-\uDD05]|\uD835[\uDD07-\uDD0A]|\uD835[\uDD0D-\uDD14]|\uD835[\uDD16-\uDD1C]|\uD835[\uDD1E-\uDD39]|\uD835[\uDD3B-\uDD3E]|\uD835[\uDD40-\uDD44]|𝕆|\uD835[\uDD4A-\uDD50]|\uD835[\uDD52-\uDEA5]|\uD835[\uDEA8-\uDEDA]|\uD835[\uDEDC-\uDF14]|\uD835[\uDF16-\uDF4E]|\uD835[\uDF50-\uDF88]|\uD835[\uDF8A-\uDFC2]|\uD835[\uDFC4-\uDFCB]|\uD836[\uDC00-\uDDFF]|\uD836[\uDE37-\uDE3A]|\uD836[\uDE6D-\uDE74]|\uD836[\uDE76-\uDE83]|\uD836[\uDE85-\uDE8B]|\uD83C[\uDD10-\uDD2E]|\uD83C[\uDD30-\uDD69]|\uD83C[\uDD70-\uDD9A]|\uD83C[\uDDE6-\uDE02]|\uD83C[\uDE10-\uDE3A]|\uD83C[\uDE40-\uDE48]|🉐|🉑|[\uD840-\uD868][\uDC00-\uDFFF]|\uD869[\uDC00-\uDED6]|\uD869[\uDF00-\uDFFF]|[\uD86A-\uD86C][\uDC00-\uDFFF]|\uD86D[\uDC00-\uDF34]|\uD86D[\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D]|\uD86E[\uDC20-\uDFFF]|[\uD86F-\uD872][\uDC00-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|[\uDB80-\uDBBE][\uDC00-\uDFFF]|\uDBBF[\uDC00-\uDFFD]|[\uDBC0-\uDBFE][\uDC00-\uDFFF]|\uDBFF[\uDC00-\uDFFD])|([־׀׃׆-߀-ߪߴߵߺ-ࠕࠚࠤࠨ-ࡘ-࢟יִײַ-ﬨשׁ-ﭏ؈؋؍؛-ي٭-ٯٱ-ەۥۦۮۯۺ-ܐܒ-ܯ-ޥޱ-ࢠ-ﭐ-ﴽ﵀-﷏ﷰ-﷼﷾﷿ﹰ-]|\uD802[\uDC00-\uDD1E]|\uD802[\uDD20-\uDE00]||\uD802[\uDE07-\uDE0B]|\uD802[\uDE10-\uDE37]|\uD802[\uDE3B-\uDE3E]|\uD802[\uDE40-\uDEE4]|\uD802[\uDEE7-\uDF38]|\uD802[\uDF40-\uDFFF]|\uD803[\uDC00-\uDE5F]|\uD803[\uDE7F-\uDFFF]|\uD83A[\uDC00-\uDCCF]|\uD83A[\uDCD7-\uDFFF]|\uD83B[\uDC00-\uDDFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDE00-\uDEEF]|\uD83B[\uDEF2-\uDEFF]))");let Pt=class{constructor(e){this.locale=Le(e),this.language=new(It[this.locale]||It.default)(this.locale)}emit(e,t){let n,r,i;switch(typeof e){case"string":case"number":n=e;break;case"object":if(r=e.slice(1).map(s=>this.emit(s,t)),i=e[0].toLowerCase(),typeof this[i]=="function")n=this[i](r,t);else throw new Error('unknown operation "'+i+'"');break;case"undefined":n="";break;default:throw new Error("unexpected type in AST: "+typeof e)}return n}concat(e){let t="";return e.forEach(n=>{t+=n}),t}replace(e,t){const n=parseInt(e[0],10);return n<t.length?t[n]:"$"+(n+1)}plural(e){const t=parseFloat(this.language.convertNumber(e[0],10)),n=e.slice(1);return n.length?this.language.convertPlural(t,n):""}gender(e){const t=e[0],n=e.slice(1);return this.language.gender(t,n)}grammar(e){const t=e[0],n=e[1];return n&&t&&this.language.convertGrammar(n,t)}wikilink(e){let t,n=e[0];n.charAt(0)===":"&&(n=n.slice(1));const r=`./${n}`;return e.length===1?t=n:t=e[1],`<a href="${r}" title="${n}">${t}</a>`}extlink(e){if(e.length!==2)throw new Error("Expected two items in the node");return`<a href="${e[0]}">${e[1]}</a>`}bidi(e){const t=Na(e[0]);return t==="ltr"?""+e[0]+"":t==="rtl"?""+e[0]+"":e[0]}formatnum(e){const t=!!e[1]&&e[1]==="R",n=e[0];return typeof n=="string"||typeof n=="number"?this.language.convertNumber(n,t):n}htmlattributes(e){const t={};for(let n=0,r=e.length;n<r;n+=2)t[e[n]]=e[n+1];return t}htmlelement(e){const t=e.shift(),n=e.shift();let r=e,i="";for(const u in n)i+=` ${u}="${n[u]}"`;Array.isArray(r)||(r=[r]);const s=r.join("");return`<${t}${i}>${s}</${t}>`}};function Le(e){return typeof e=="string"?e.toLowerCase():e}function Na(e){const t=e.match(Ma);return t?t[2]===void 0?"ltr":"rtl":null}function ja(e,{wikilinks:t=!1}={}){let n=0;function r(c){return()=>{for(let m=0;m<c.length;m++){const P=c[m]();if(P!==null)return P}return null}}function i(c){const m=n,P=[];for(let _=0;_<c.length;_++){const ne=c[_]();if(ne===null)return n=m,null;P.push(ne)}return P}function s(c,m){return()=>{const P=n,_=[];let ne=m();for(;ne!==null;)_.push(ne),ne=m();return _.length<c?(n=P,null):_}}function u(c){const m=c.length;return()=>{let P=null;return e.slice(n,n+m)===c&&(P=c,n+=m),P}}function o(c){return()=>{const m=e.slice(n).match(c);return m===null?null:(n+=m[0].length,m[0])}}const A=o(/^\s+/),k=u("|"),g=u(":"),q=u("\\"),Ae=o(/^./),we=u("$"),$e=o(/^\d+/),S=u('"'),re=u("'"),oe=o(t?/^[^{}[\]$<\\]/:/^[^{}$<\\]/),ke=o(t?/^[^{}[\]$\\|]/:/^[^{}$\\|]/),Fe=o(t?/^[^{}[\]$\s]/:/^[^{}$\s]/);function xe(c,m){return()=>{const P=c();return P===null?null:m(P)}}function B(){const c=s(1,ie)();return c===null?null:c.join("")}function le(){const c=s(1,se)();return c===null?null:c.join("")}const W=r([Y,Fe]);function me(){const c=s(1,W)();return c===null?null:c.join("")}function Y(){const c=i([q,Ae]);return c===null?null:c[1]}const ie=r([Y,ke]),se=r([Y,oe]);function ce(){const c=i([we,$e]);return c===null?null:["REPLACE",parseInt(c[1],10)-1]}const be=xe(o(/^[ !"$&'()*,./0-9;=?@A-Z^_`a-z~\x80-\xFF+-]+/),function(c){return c.toString()});function b(){const c=i([k,s(0,Z)]);if(c===null)return null;const m=c[1];return m.length>1?["CONCAT"].concat(m):m[0]}function $(){const c=i([be,g,ce]);return c===null?null:[c[0],c[2]]}function I(){const c=i([be,g,Z]);return c===null?null:[c[0],c[2]]}function z(){const c=i([be,g]);return c===null?null:[c[0],""]}const te=r([function(){const c=i([r([$,I,z]),s(0,b)]);return c===null?null:c[0].concat(c[1])},function(){const c=i([be,s(0,b)]);return c===null?null:[c[0]].concat(c[1])}]),Te=u("{{"),Oe=u("}}"),Me=u("[["),Ne=u("]]"),je=u("["),qe=u("]");function Ee(){const c=i([Te,te,Oe]);return c===null?null:c[1]}function Ie(){const c=i([s(1,Z),k,s(1,G)]);return c===null?null:[["CONCAT"].concat(c[0]),["CONCAT"].concat(c[2])]}function Pe(){const c=i([s(1,Z)]);return c===null?null:[["CONCAT"].concat(c[0])]}const E=r([Ie,Pe]);function C(){let c=null;const m=i([Me,E,Ne]);if(m!==null){const P=m[1];c=["WIKILINK"].concat(P)}return c}function x(){let c=null;const m=i([je,s(1,L),A,s(1,G),qe]);return m!==null&&(c=["EXTLINK",m[1].length===1?m[1][0]:["CONCAT"].concat(m[1]),["CONCAT"].concat(m[3])]),c}const U=o(/^[A-Za-z]+/);function h(c,m,P,_={allowedHtmlElements:["b","bdi","del","i","ins","u","font","big","small","sub","sup","h1","h2","h3","h4","h5","h6","cite","code","em","s","strike","strong","tt","var","div","center","blockquote","ol","ul","dl","table","caption","pre","ruby","rb","rp","rt","rtc","p","span","abbr","dfn","kbd","samp","data","time","mark","li","dt","dd"],allowedHtmlCommonAttributes:["id","class","style","lang","dir","title","aria-describedby","aria-flowto","aria-hidden","aria-label","aria-labelledby","aria-owns","role","about","property","resource","datatype","typeof","itemid","itemprop","itemref","itemscope","itemtype"],allowedHtmlAttributesByElement:{}}){if(c=c.toLowerCase(),m=m.toLowerCase(),c!==m||_.allowedHtmlElements.indexOf(c)===-1)return!1;const ne=/[\000-\010\013\016-\037\177]|expression|filter\s*:|accelerator\s*:|-o-link\s*:|-o-link-source\s*:|-o-replace\s*:|url\s*\(|image\s*\(|image-set\s*\(/i;for(let ae=0,de=P.length;ae<de;ae+=2){const ge=P[ae];if(_.allowedHtmlCommonAttributes.indexOf(ge)===-1&&(_.allowedHtmlAttributesByElement[c]||[]).indexOf(ge)===-1||ge==="style"&&P[ae+1].search(ne)!==-1)return!1}return!0}function T(){const c=o(/^[^"]*/),m=i([S,c,S]);return m===null?null:m[1]}function M(){const c=o(/^[^']*/),m=i([re,c,re]);return m===null?null:m[1]}function R(){const c=o(/^\s*=\s*/),m=i([A,U,c,r([T,M])]);return m===null?null:[m[1],m[3]]}function J(){const c=s(0,R)();return Array.prototype.concat.apply(["HTMLATTRIBUTES"],c)}function V(){let c=null;const m=n,P=u("<"),_=o(/^\/?/),ne=o(/^\s*>/),ae=i([P,U,J,_,ne]);if(ae===null)return null;const de=n,ge=ae[1],_e=s(0,G)(),mt=n,bt=u("</"),rt=i([bt,U,ne]);if(rt===null)return["CONCAT",e.slice(m,de)].concat(_e);const l=n,D=rt[1],F=ae[2],he=F.slice(1);if(h(ge,D,he))c=["HTMLELEMENT",ge,F].concat(_e);else{const ze=ve=>ve.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'");c=["CONCAT",ze(e.slice(m,de))].concat(_e,ze(e.slice(mt,l)))}return c}const L=r([Ee,ce,C,x,me]),G=r([Ee,ce,C,x,V,le]),Z=r([Ee,ce,B]);function pe(){const c=s(0,G)();return c===null?null:["CONCAT"].concat(c)}const K=pe();if(K===null||n!==e.length)throw new Error("Parse error at position "+n.toString()+" in input: "+e);return K}class zt{constructor(t,{wikilinks:n=!1}={}){this.locale=Le(t),this.wikilinks=n,this.emitter=new Pt(this.locale)}parse(t,n){if(t.includes("{{")||t.includes("<")||this.wikilinks&&t.includes("[")){const r=ja(t,{wikilinks:this.wikilinks});return this.emitter.emit(r,n)}else return this.simpleParse(t,n)}simpleParse(t,n){return t.replace(/\$(\d+)/g,(r,i)=>{const s=parseInt(i,10)-1;return n[s]!==void 0?n[s]:"$"+i})}}class Ra{constructor(){this.sourceMap=new Map}load(t,n){if(typeof t!="object")throw new Error("Invalid message source. Must be an object");if(n=Le(n),n){if(!/^[a-zA-Z0-9-]+$/.test(n))throw new Error(`Invalid locale ${n}`);for(const r in t)if(r.indexOf("@")!==0){if(typeof t[r]=="object")return this.load(t);if(typeof t[r]!="string")throw new Error(`Invalid message for message ${r} in ${n} locale.`);break}this.sourceMap.has(n)?this.sourceMap.set(n,Object.assign(this.sourceMap.get(n),t)):this.sourceMap.set(n,t)}else for(n in t)this.load(t[n],n)}getMessage(t,n){const r=this.sourceMap.get(Le(n));return r?r[t]:null}hasLocale(t){return this.sourceMap.has(t)}}class La{constructor(t,{finalFallback:n="en",messages:r=void 0,wikilinks:i=!1}={}){this.locale=Le(t),this.parser=new zt(this.locale,{wikilinks:i}),this.messageStore=new Ra,r&&this.load(r,this.locale),this.finalFallback=n,this.wikilinks=i}load(t,n){return this.messageStore.load(t,n||this.locale)}i18n(t,...n){return this.parser.parse(this.getMessage(t),n)}setLocale(t){this.locale=Le(t),this.parser=new zt(this.locale,{wikilinks:this.wikilinks})}getFallbackLocales(){return[...Ot[this.locale]||[],this.finalFallback]}getMessage(t){let n=this.locale,r=0;const i=this.getFallbackLocales(this.locale);for(;n;){const s=n.split("-");let u=s.length;do{const o=s.slice(0,u).join("-"),A=this.messageStore.getMessage(t,o);if(typeof A=="string")return A;u--}while(u);n=i[r],r++}return t}registerParserPlugin(t,n){Pt.prototype[t]=n}}const Mt={"@metadata":{authors:["Mason Payne"],"last-updated":"2024-01-08",locale:"en"},"sa-login":"Login","sa-username":"Email","sa-password":"Password","sa-use-password":"Use Password","sa-code":"Code","sa-signup":"Sign up","sa-signup-complete":"Sign up complete","sa-back":"Back","sa-error-creating-user":"Error creating user.","sa-remember":"Remember me","sa-forgot":"Forgot your password?","sa-register":"Register","sa-error.login":"Invalid email or password","sa-error.register":"Invalid email or password","sa-error.unknown":"Unknown error","sa-account-settings":"Account Settings","sa-webauthn-security-keys":"Your passkeys","sa-add-security-key":"Add passkey","webauthn-not-enrolled":"WebAuthn not enrolled","sa-webauthn-key-name":"Key Name","sa-cancel":"Cancel","sa-no-security-keys":"No passkeys","sa-webauthn-key-actions":"Actions","sa-remove":"Remove","not-authenticated":"Not authenticated","error-otp-registration":"Error registering OTP","sa-confirm-delete-key":"Are you sure you want to delete this key?","sa-add-mfa":"Manage MFA","sa-add-email":"Add Email","sa-email":"Email","sa-phone":"Phone","sa-add-sms":"Add SMS","sa-mfa":"MFA Registrations","error-otp-list":"Error listing OTPs","sa-type":"Type","sa-mfa-destination":"Destination","sa-mfa-validated":"Validated","sa-validate":"Validate","sa-mfa-action":"Action","sa-no":"No","sa-yes":"Yes","error-otp-remove":"Error removing MFA Registration","error-webauthn-remove":"Error removing WebAuthn Registration","sa-register-mfa":"Register MFA","sa-otp-required":"A one-time code is required.","sa-otp-choose":"Choose how to receive your code:","sa-otp-no-registrations":"No MFA methods registered.","sa-otp-send-code":"Send Code","sa-otp-verify":"Verify Code","sa-unknown-challenge":"Unknown challenge type.","sa-complete-invite":"Complete Your Invitation","sa-invite-otp":"Verification Code","sa-invite-otp-hint":"Enter the code from your invite email","sa-invite-password":"Choose a Password","sa-invite-password-hint":"Create a secure password for your account","sa-invite-submit":"Complete Registration","sa-invite-success":"Registration complete! Redirecting to login...","sa-invite-error-otp":"Invalid or expired verification code","sa-invite-error-expired":"This invite has expired. Please contact your administrator.","sa-invite-error-generic":"Unable to complete registration. Please try again.","sa-invite-completing":"Completing registration...","sa-forgot-password":"Forgot your password?","sa-reset-password":"Reset Password","sa-reset-email-sent":"If an account exists with that email, a reset code has been sent.","sa-new-password":"New Password","sa-reset-code":"Reset Code","sa-reset-submit":"Reset Password","sa-reset-success":"Password reset successfully! You can now log in.","sa-reset-error":"Unable to reset password. Please try again.","sa-reset-error-code":"Invalid or expired reset code","sa-or":"Or","sa-social-google":"Continue with Google","sa-social-github":"Continue with GitHub","sa-social-apple":"Continue with Apple","sa-social-oidc":"Continue with SSO","sa-loading":"Loading...","sa-social-error":"Error starting social login","sa-signup-mfa-title":"Verify Your Email","sa-signup-verify-prompt":"A verification code has been sent to your email. Enter it below to activate multi-factor authentication.","sa-signup-verify-error":"Invalid or expired verification code.","sa-signup-webauthn-prompt":"Your account is secure! Optionally, add a passkey for faster and easier logins.","sa-signup-webauthn-setup":"Set Up Passkey","sa-signup-webauthn-done":"Skip for now","sa-signup-webauthn-error":"Error setting up passkey. Please try again from your account settings."},Ua={en:Mt,fr:{"@metadata":{authors:["Mason Payne"],"last-updated":"2022-05-28",locale:"fr"},"sa-login":"Connexion","sa-username":"Adresse e-mail","sa-password":"Mot de passe","sa-use-password":"Utiliser le mot de passe","sa-code":"code à deux facteurs","sa-remember":"Souviens-toi de moi","sa-forgot":"Mot de passe oublié?","sa-register":"S'inscrire","sa-error.login":"E-mail ou mot de passe invalide","sa-error.register":"E-mail ou mot de passe invalide","sa-error.unknown":"Erreur inconnue","sa-otp-required":"Un code à usage unique est requis.","sa-otp-choose":"Choisissez comment recevoir votre code :","sa-otp-no-registrations":"Aucune méthode MFA enregistrée.","sa-otp-send-code":"Envoyer le code","sa-otp-verify":"Vérifier le code","sa-unknown-challenge":"Type de défi inconnu.","sa-complete-invite":"Complétez votre invitation","sa-invite-otp":"Code de vérification","sa-invite-otp-hint":"Entrez le code de votre email d'invitation","sa-invite-password":"Choisissez un mot de passe","sa-invite-password-hint":"Créez un mot de passe sécurisé pour votre compte","sa-invite-submit":"Terminer l'inscription","sa-invite-success":"Inscription terminée ! Redirection vers la connexion...","sa-invite-error-otp":"Code de vérification invalide ou expiré","sa-invite-error-expired":"Cette invitation a expiré. Veuillez contacter votre administrateur.","sa-invite-error-generic":"Impossible de terminer l'inscription. Veuillez réessayer.","sa-invite-completing":"Finalisation de l'inscription...","sa-forgot-password":"Mot de passe oublié ?","sa-reset-password":"Réinitialiser le mot de passe","sa-reset-email-sent":"Si un compte existe avec cet e-mail, un code de réinitialisation a été envoyé.","sa-new-password":"Nouveau mot de passe","sa-reset-code":"Code de réinitialisation","sa-reset-submit":"Réinitialiser le mot de passe","sa-reset-success":"Mot de passe réinitialisé avec succès ! Vous pouvez maintenant vous connecter.","sa-reset-error":"Impossible de réinitialiser le mot de passe. Veuillez réessayer.","sa-reset-error-code":"Code de réinitialisation invalide ou expiré","sa-or":"Ou","sa-social-google":"Continuer avec Google","sa-social-github":"Continuer avec GitHub","sa-social-apple":"Continuer avec Apple","sa-social-oidc":"Continuer avec SSO","sa-loading":"Chargement...","sa-social-error":"Erreur lors de la connexion sociale","sa-signup-mfa-title":"Vérifiez votre e-mail","sa-signup-verify-prompt":"Un code de vérification a été envoyé à votre e-mail. Entrez-le ci-dessous pour activer l'authentification multi-facteurs.","sa-signup-verify-error":"Code de vérification invalide ou expiré.","sa-signup-webauthn-prompt":"Votre compte est sécurisé ! Ajoutez optionnellement une clé d'accès pour des connexions plus rapides.","sa-signup-webauthn-setup":"Configurer la clé d'accès","sa-signup-webauthn-done":"Ignorer pour l'instant","sa-signup-webauthn-error":"Erreur lors de la configuration de la clé d'accès. Veuillez réessayer depuis les paramètres de votre compte."},es:{"@metadata":{authors:["Mason Payne"],"last-updated":"2022-05-28",locale:"es"},"sa-login":"Acceso","sa-username":"Correo electrónico","sa-password":"Clave","sa-use-password":"Usar contraseña","sa-code":"Código","sa-remember":"Acuérdate de mí","sa-forgot":"¿Olvidaste tu contraseña?","sa-register":"Registro","sa-error.login":"Correo electrónico o contraseña inválidos","sa-error.register":"Correo electrónico o contraseña inválidos","sa-error.unknown":"Error desconocido","sa-otp-required":"Se requiere un código de un solo uso.","sa-otp-choose":"Elige cómo recibir tu código:","sa-otp-no-registrations":"No hay métodos MFA registrados.","sa-unknown-challenge":"Tipo de desafío desconocido.","sa-complete-invite":"Completa tu invitación","sa-invite-otp":"Código de verificación","sa-invite-otp-hint":"Ingresa el código de tu correo de invitación","sa-invite-password":"Elige una contraseña","sa-invite-password-hint":"Crea una contraseña segura para tu cuenta","sa-invite-submit":"Completar registro","sa-invite-success":"¡Registro completo! Redirigiendo al inicio de sesión...","sa-invite-error-otp":"Código de verificación inválido o expirado","sa-invite-error-expired":"Esta invitación ha expirado. Por favor contacta a tu administrador.","sa-invite-error-generic":"No se pudo completar el registro. Por favor intenta de nuevo.","sa-invite-completing":"Completando registro...","sa-forgot-password":"¿Olvidaste tu contraseña?","sa-reset-password":"Restablecer contraseña","sa-reset-email-sent":"Si existe una cuenta con ese correo, se ha enviado un código de restablecimiento.","sa-new-password":"Nueva contraseña","sa-reset-code":"Código de restablecimiento","sa-reset-submit":"Restablecer contraseña","sa-reset-success":"¡Contraseña restablecida con éxito! Ya puedes iniciar sesión.","sa-reset-error":"No se pudo restablecer la contraseña. Por favor intenta de nuevo.","sa-reset-error-code":"Código de restablecimiento inválido o expirado","sa-or":"O","sa-social-google":"Continuar con Google","sa-social-github":"Continuar con GitHub","sa-social-apple":"Continuar con Apple","sa-social-oidc":"Continuar con SSO","sa-loading":"Cargando...","sa-social-error":"Error al iniciar sesión social","sa-signup-mfa-title":"Verifica tu correo electrónico","sa-signup-verify-prompt":"Se ha enviado un código de verificación a tu correo. Ingrésalo para activar la autenticación multifactor.","sa-signup-verify-error":"Código de verificación inválido o expirado.","sa-signup-webauthn-prompt":"¡Tu cuenta está protegida! Opcionalmente, agrega una clave de acceso para inicios de sesión más rápidos.","sa-signup-webauthn-setup":"Configurar clave de acceso","sa-signup-webauthn-done":"Omitir por ahora","sa-signup-webauthn-error":"Error al configurar la clave de acceso. Intenta de nuevo desde la configuración de tu cuenta."},ja:{"@metadata":{authors:["Mason Payne"],"last-updated":"2022-05-28",locale:"ja"},"sa-login":"ログイン","sa-username":"メールアドレス","sa-password":"パスワード","sa-use-password":"パスワードを使用する","sa-code":"コード","sa-remember":"私を覚えてますか","sa-forgot":"パスワードをお忘れですか?","sa-register":"登録","sa-error.login":"メールアドレスかパスワードが無効","sa-error.register":"メールアドレスかパスワードが無効","sa-error.unknown":"未知のエラー","sa-otp-required":"ワンタイムコードが必要です。","sa-otp-choose":"コードの受け取り方法を選択してください:","sa-otp-no-registrations":"MFA方法が登録されていません。","sa-otp-send-code":"コードを送信","sa-otp-verify":"コードを確認","sa-unknown-challenge":"不明なチャレンジタイプです。","sa-complete-invite":"招待を完了する","sa-invite-otp":"確認コード","sa-invite-otp-hint":"招待メールのコードを入力してください","sa-invite-password":"パスワードを選択","sa-invite-password-hint":"アカウント用の安全なパスワードを作成してください","sa-invite-submit":"登録を完了","sa-invite-success":"登録完了!ログインページへリダイレクト中...","sa-invite-error-otp":"無効または期限切れの確認コード","sa-invite-error-expired":"この招待は期限切れです。管理者にお問い合わせください。","sa-invite-error-generic":"登録を完了できませんでした。もう一度お試しください。","sa-invite-completing":"登録を完了しています...","sa-forgot-password":"パスワードをお忘れですか?","sa-reset-password":"パスワードをリセット","sa-reset-email-sent":"そのメールアドレスのアカウントが存在する場合、リセットコードが送信されました。","sa-new-password":"新しいパスワード","sa-reset-code":"リセットコード","sa-reset-submit":"パスワードをリセット","sa-reset-success":"パスワードが正常にリセットされました!ログインできます。","sa-reset-error":"パスワードをリセットできませんでした。もう一度お試しください。","sa-reset-error-code":"無効または期限切れのリセットコード","sa-or":"または","sa-social-google":"Googleで続ける","sa-social-github":"GitHubで続ける","sa-social-apple":"Appleで続ける","sa-social-oidc":"SSOで続ける","sa-loading":"読み込み中...","sa-social-error":"ソーシャルログイン開始エラー","sa-signup-mfa-title":"メールを確認してください","sa-signup-verify-prompt":"確認コードがメールに送信されました。多要素認証を有効にするために入力してください。","sa-signup-verify-error":"無効または期限切れの確認コードです。","sa-signup-webauthn-prompt":"アカウントが保護されました!パスキーを追加してより速く簡単にログインできます(任意)。","sa-signup-webauthn-setup":"パスキーを設定","sa-signup-webauthn-done":"今はスキップ","sa-signup-webauthn-error":"パスキーの設定中にエラーが発生しました。アカウント設定から再試行してください。"}};function ht(e){const t=new La("en",{messages:Mt});return e!=="en"&&(t.load(Ua[e],e),t.setLocale(e)),t}function Nt(e){const t="==".slice(0,(4-e.length%4)%4),n=e.replace(/-/g,"+").replace(/_/g,"/")+t,r=atob(n),i=new ArrayBuffer(r.length),s=new Uint8Array(i);for(let u=0;u<r.length;u++)s[u]=r.charCodeAt(u);return i}function jt(e){const t=new Uint8Array(e);let n="";for(const s of t)n+=String.fromCharCode(s);return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}var O="copy",Ce="convert";function Ue(e,t,n){if(t===O)return n;if(t===Ce)return e(n);if(t instanceof Array)return n.map(r=>Ue(e,t[0],r));if(t instanceof Object){const r={};for(const[i,s]of Object.entries(t)){if(s.derive){const u=s.derive(n);u!==void 0&&(n[i]=u)}if(!(i in n)){if(s.required)throw new Error(`Missing key: ${i}`);continue}if(n[i]==null){r[i]=null;continue}r[i]=Ue(e,s.schema,n[i])}return r}}function ft(e,t){return{required:!0,schema:e,derive:t}}function j(e){return{required:!0,schema:e}}function H(e){return{required:!1,schema:e}}var Rt={type:j(O),id:j(Ce),transports:H(O)},Lt={appid:H(O),appidExclude:H(O),credProps:H(O)},Ut={appid:H(O),appidExclude:H(O),credProps:H(O)},qa={publicKey:j({rp:j(O),user:j({id:j(Ce),name:j(O),displayName:j(O)}),challenge:j(Ce),pubKeyCredParams:j(O),timeout:H(O),excludeCredentials:H([Rt]),authenticatorSelection:H(O),attestation:H(O),extensions:H(Lt)}),signal:H(O)},Ja={type:j(O),id:j(O),rawId:j(Ce),authenticatorAttachment:H(O),response:j({clientDataJSON:j(Ce),attestationObject:j(Ce),transports:ft(O,e=>{var t;return((t=e.getTransports)==null?void 0:t.call(e))||[]})}),clientExtensionResults:ft(Ut,e=>e.getClientExtensionResults())},Va={mediation:H(O),publicKey:j({challenge:j(Ce),timeout:H(O),rpId:H(O),allowCredentials:H([Rt]),userVerification:H(O),extensions:H(Lt)}),signal:H(O)},Ga={type:j(O),id:j(O),rawId:j(Ce),authenticatorAttachment:H(O),response:j({clientDataJSON:j(Ce),authenticatorData:j(Ce),signature:j(Ce),userHandle:j(Ce)}),clientExtensionResults:ft(Ut,e=>e.getClientExtensionResults())};function qt(e){return Ue(Nt,qa,e)}function Ka(e){return Ue(jt,Ja,e)}function Ha(e){return Ue(Nt,Va,e)}function Wa(e){return Ue(jt,Ga,e)}async function Jt(e){const t=await navigator.credentials.create(e);return t.toJSON=()=>Ka(t),t}async function Za(e){const t=await navigator.credentials.get(e);return t.toJSON=()=>Wa(t),t}function pt(e){this.message=e}pt.prototype=new Error,pt.prototype.name="InvalidCharacterError";var Vt=typeof window<"u"&&window.atob&&window.atob.bind(window)||function(e){var t=String(e).replace(/=+$/,"");if(t.length%4==1)throw new pt("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,r,i=0,s=0,u="";r=t.charAt(s++);~r&&(n=i%4?64*n+r:r,i++%4)?u+=String.fromCharCode(255&n>>(-2*i&6)):0)r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(r);return u};function Ya(e){var t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw"Illegal base64url string!"}try{return function(n){return decodeURIComponent(Vt(n).replace(/(.)/g,function(r,i){var s=i.charCodeAt(0).toString(16).toUpperCase();return s.length<2&&(s="0"+s),"%"+s}))}(t)}catch{return Vt(t)}}function et(e){this.message=e}function Xa(e,t){if(typeof e!="string")throw new et("Invalid token specified");var n=(t=t||{}).header===!0?0:1;try{return JSON.parse(Ya(e.split(".")[n]))}catch(r){throw new et("Invalid token specified: "+r.message)}}et.prototype=new Error,et.prototype.name="InvalidTokenError";const tt="spartan-token";function Gt(){const e=localStorage.getItem(tt);let t=null;if(e)try{if(t=Xa(e),t.exp>eu())return t;localStorage.removeItem(tt)}catch(n){console.error("Error decoding token",n),localStorage.removeItem(tt)}return null}function Qa(){const e=localStorage.getItem(tt);return e||null}function eu(){return Math.round(new Date().getTime()/1e3)}var tu=v(`<div class=widget-root><form class=login-frame><style>.widget-root {
|
|
1
|
+
(function(Je){typeof define=="function"&&define.amd?define(Je):Je()})(function(){"use strict";var Vl=Object.defineProperty;var Jl=(Je,nt,Ge)=>nt in Je?Vl(Je,nt,{enumerable:!0,configurable:!0,writable:!0,value:Ge}):Je[nt]=Ge;var Pt=(Je,nt,Ge)=>Jl(Je,typeof nt!="symbol"?nt+"":nt,Ge);const Ge={equals:(e,t)=>e===t};let fn=Dn;const rt=1,Mt=2,pn={owned:null,cleanups:null,context:null,owner:null};var ie=null;let Jt=null,sr=null,oe=null,be=null,Ke=null,Ot=0;function ar(e,t){const n=oe,r=ie,i=e.length===0,o=t===void 0?r:t,s=i?pn:{owned:null,cleanups:null,context:o?o.context:null,owner:o},l=i?e:()=>e(()=>ut(()=>_t(s)));ie=s,oe=null;try{return Bt(l,!0)}finally{oe=n,ie=r}}function C(e,t){t=t?Object.assign({},Ge,t):Ge;const n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},r=i=>(typeof i=="function"&&(i=i(n.value)),mn(n,i));return[gn.bind(n),r]}function E(e,t,n){const r=Kt(e,t,!1,rt);xt(r)}function ur(e,t,n){fn=fr;const r=Kt(e,t,!1,rt);r.user=!0,Ke?Ke.push(r):xt(r)}function h(e,t,n){n=n?Object.assign({},Ge,n):Ge;const r=Kt(e,t,!0,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,xt(r),gn.bind(r)}function ut(e){if(oe===null)return e();const t=oe;oe=null;try{return e()}finally{oe=t}}function Gt(e){ur(()=>ut(e))}function lr(e){return ie===null||(ie.cleanups===null?ie.cleanups=[e]:ie.cleanups.push(e)),e}function cr(){return ie}function gn(){if(this.sources&&this.state)if(this.state===rt)xt(this);else{const e=be;be=null,Bt(()=>Rt(this),!1),be=e}if(oe){const e=this.observers?this.observers.length:0;oe.sources?(oe.sources.push(this),oe.sourceSlots.push(e)):(oe.sources=[this],oe.sourceSlots=[e]),this.observers?(this.observers.push(oe),this.observerSlots.push(oe.sources.length-1)):(this.observers=[oe],this.observerSlots=[oe.sources.length-1])}return this.value}function mn(e,t,n){let r=e.value;return(!e.comparator||!e.comparator(r,t))&&(e.value=t,e.observers&&e.observers.length&&Bt(()=>{for(let i=0;i<e.observers.length;i+=1){const o=e.observers[i],s=Jt&&Jt.running;s&&Jt.disposed.has(o),(s?!o.tState:!o.state)&&(o.pure?be.push(o):Ke.push(o),o.observers&&vn(o)),s||(o.state=rt)}if(be.length>1e6)throw be=[],new Error},!1)),t}function xt(e){if(!e.fn)return;_t(e);const t=Ot;dr(e,e.value,t)}function dr(e,t,n){let r;const i=ie,o=oe;oe=ie=e;try{r=e.fn(t)}catch(s){return e.pure&&(e.state=rt,e.owned&&e.owned.forEach(_t),e.owned=null),e.updatedAt=n+1,bn(s)}finally{oe=o,ie=i}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&"observers"in e?mn(e,r):e.value=r,e.updatedAt=n)}function Kt(e,t,n,r=rt,i){const o={fn:e,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:ie,context:ie?ie.context:null,pure:n};return ie===null||ie!==pn&&(ie.owned?ie.owned.push(o):ie.owned=[o]),o}function zt(e){if(e.state===0)return;if(e.state===Mt)return Rt(e);if(e.suspense&&ut(e.suspense.inFallback))return e.suspense.effects.push(e);const t=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<Ot);)e.state&&t.push(e);for(let n=t.length-1;n>=0;n--)if(e=t[n],e.state===rt)xt(e);else if(e.state===Mt){const r=be;be=null,Bt(()=>Rt(e,t[0]),!1),be=r}}function Bt(e,t){if(be)return e();let n=!1;t||(be=[]),Ke?n=!0:Ke=[],Ot++;try{const r=e();return hr(n),r}catch(r){n||(Ke=null),be=null,bn(r)}}function hr(e){if(be&&(Dn(be),be=null),e)return;const t=Ke;Ke=null,t.length&&Bt(()=>fn(t),!1)}function Dn(e){for(let t=0;t<e.length;t++)zt(e[t])}function fr(e){let t,n=0;for(t=0;t<e.length;t++){const r=e[t];r.user?e[n++]=r:zt(r)}for(t=0;t<n;t++)zt(e[t])}function Rt(e,t){e.state=0;for(let n=0;n<e.sources.length;n+=1){const r=e.sources[n];if(r.sources){const i=r.state;i===rt?r!==t&&(!r.updatedAt||r.updatedAt<Ot)&&zt(r):i===Mt&&Rt(r,t)}}}function vn(e){for(let t=0;t<e.observers.length;t+=1){const n=e.observers[t];n.state||(n.state=Mt,n.pure?be.push(n):Ke.push(n),n.observers&&vn(n))}}function _t(e){let t;if(e.sources)for(;e.sources.length;){const n=e.sources.pop(),r=e.sourceSlots.pop(),i=n.observers;if(i&&i.length){const o=i.pop(),s=n.observerSlots.pop();r<i.length&&(o.sourceSlots[s]=r,i[r]=o,n.observerSlots[r]=s)}}if(e.tOwned){for(t=e.tOwned.length-1;t>=0;t--)_t(e.tOwned[t]);delete e.tOwned}if(e.owned){for(t=e.owned.length-1;t>=0;t--)_t(e.owned[t]);e.owned=null}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null}e.state=0}function pr(e){return e instanceof Error?e:new Error(typeof e=="string"?e:"Unknown error",{cause:e})}function bn(e,t=ie){throw pr(e)}function gr(e,t){return ut(()=>e(t||{}))}const mr=e=>`Stale read from <${e}>.`;function Dr(e){const t=e.keyed,n=h(()=>e.when,void 0,void 0),r=t?n:h(n,void 0,{equals:(i,o)=>!i==!o});return h(()=>{const i=r();if(i){const o=e.children;return typeof o=="function"&&o.length>0?ut(()=>o(t?i:()=>{if(!ut(r))throw mr("Show");return n()})):o}return e.fallback},void 0,void 0)}function vr(e,t,n){let r=n.length,i=t.length,o=r,s=0,l=0,m=t[i-1].nextSibling,y=null;for(;s<i||l<o;){if(t[s]===n[l]){s++,l++;continue}for(;t[i-1]===n[o-1];)i--,o--;if(i===s){const p=o<r?l?n[l-1].nextSibling:n[o-l]:m;for(;l<o;)e.insertBefore(n[l++],p)}else if(o===l)for(;s<i;)(!y||!y.has(t[s]))&&t[s].remove(),s++;else if(t[s]===n[o-1]&&n[l]===t[i-1]){const p=t[--i].nextSibling;e.insertBefore(n[l++],t[s++].nextSibling),e.insertBefore(n[--o],p),t[i]=n[o]}else{if(!y){y=new Map;let $=l;for(;$<o;)y.set(n[$],$++)}const p=y.get(t[s]);if(p!=null)if(l<p&&p<o){let $=s,O=1,ee;for(;++$<i&&$<o&&!((ee=y.get(t[$]))==null||ee!==p+O);)O++;if(O>p-l){const fe=t[s];for(;l<p;)e.insertBefore(n[l++],fe)}else e.replaceChild(n[l++],t[s++])}else s++;else t[s++].remove()}}}const Cn="_$DX_DELEGATE";function b(e,t,n,r){let i;const o=()=>{const l=document.createElement("template");return l.innerHTML=e,l.content.firstChild},s=()=>(i||(i=o())).cloneNode(!0);return s.cloneNode=s,s}function Ht(e,t=window.document){const n=t[Cn]||(t[Cn]=new Set);for(let r=0,i=e.length;r<i;r++){const o=e[r];n.has(o)||(n.add(o),t.addEventListener(o,br))}}function Y(e,t,n){n==null?e.removeAttribute(t):e.setAttribute(t,n)}function wn(e,t,n){return ut(()=>e(t,n))}function c(e,t,n,r){if(n!==void 0&&!r&&(r=[]),typeof t!="function")return Nt(e,t,r,n);E(i=>Nt(e,t(),i,n),r)}function br(e){let t=e.target;const n=`$$${e.type}`,r=e.target,i=e.currentTarget,o=m=>Object.defineProperty(e,"target",{configurable:!0,value:m}),s=()=>{const m=t[n];if(m&&!t.disabled){const y=t[`${n}Data`];if(y!==void 0?m.call(t,y,e):m.call(t,e),e.cancelBubble)return}return t.host&&typeof t.host!="string"&&!t.host._$host&&t.contains(e.target)&&o(t.host),!0},l=()=>{for(;s()&&(t=t._$host||t.parentNode||t.host););};if(Object.defineProperty(e,"currentTarget",{configurable:!0,get(){return t||document}}),e.composedPath){const m=e.composedPath();o(m[0]);for(let y=0;y<m.length-2&&(t=m[y],!!s());y++){if(t._$host){t=t._$host,l();break}if(t.parentNode===i)break}}else l();o(r)}function Nt(e,t,n,r,i){for(;typeof n=="function";)n=n();if(t===n)return n;const o=typeof t,s=r!==void 0;if(e=s&&n[0]&&n[0].parentNode||e,o==="string"||o==="number"){if(o==="number"&&(t=t.toString(),t===n))return n;if(s){let l=n[0];l&&l.nodeType===3?l.data!==t&&(l.data=t):l=document.createTextNode(t),n=pt(e,n,r,l)}else n!==""&&typeof n=="string"?n=e.firstChild.data=t:n=e.textContent=t}else if(t==null||o==="boolean")n=pt(e,n,r);else{if(o==="function")return E(()=>{let l=t();for(;typeof l=="function";)l=l();n=Nt(e,l,n,r)}),()=>n;if(Array.isArray(t)){const l=[],m=n&&Array.isArray(n);if(Wt(l,t,n,i))return E(()=>n=Nt(e,l,n,r,!0)),()=>n;if(l.length===0){if(n=pt(e,n,r),s)return n}else m?n.length===0?yn(e,l,r):vr(e,n,l):(n&&pt(e),yn(e,l));n=l}else if(t.nodeType){if(Array.isArray(n)){if(s)return n=pt(e,n,r,t);pt(e,n,null,t)}else n==null||n===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}}return n}function Wt(e,t,n,r){let i=!1;for(let o=0,s=t.length;o<s;o++){let l=t[o],m=n&&n[e.length],y;if(!(l==null||l===!0||l===!1))if((y=typeof l)=="object"&&l.nodeType)e.push(l);else if(Array.isArray(l))i=Wt(e,l,m)||i;else if(y==="function")if(r){for(;typeof l=="function";)l=l();i=Wt(e,Array.isArray(l)?l:[l],Array.isArray(m)?m:[m])||i}else e.push(l),i=!0;else{const p=String(l);m&&m.nodeType===3&&m.data===p?e.push(m):e.push(document.createTextNode(p))}}return i}function yn(e,t,n=null){for(let r=0,i=t.length;r<i;r++)e.insertBefore(t[r],n)}function pt(e,t,n,r){if(n===void 0)return e.textContent="";const i=r||document.createTextNode("");if(t.length){let o=!1;for(let s=t.length-1;s>=0;s--){const l=t[s];if(i!==l){const m=l.parentNode===e;!o&&!s?m?e.replaceChild(i,l):e.insertBefore(i,n):m&&l.remove()}else o=!0}}else e.insertBefore(i,n);return[i]}function Cr(e){return Object.keys(e).reduce((n,r)=>{const i=e[r];return n[r]=Object.assign({},i),Fn(i.value)&&!Fr(i.value)&&!Array.isArray(i.value)&&(n[r].value=Object.assign({},i.value)),Array.isArray(i.value)&&(n[r].value=i.value.slice(0)),n},{})}function wr(e){return e?Object.keys(e).reduce((n,r)=>{const i=e[r];return n[r]=Fn(i)&&"value"in i?i:{value:i},n[r].attribute||(n[r].attribute=Er(r)),n[r].parse="parse"in n[r]?n[r].parse:typeof n[r].value!="string",n},{}):{}}function yr(e){return Object.keys(e).reduce((n,r)=>(n[r]=e[r].value,n),{})}function Ar(e,t){const n=Cr(t);return Object.keys(t).forEach(i=>{const o=n[i],s=e.getAttribute(o.attribute),l=e[i];s!=null&&(o.value=o.parse?An(s):s),l!=null&&(o.value=Array.isArray(l)?l.slice(0):l),o.reflect&&En(e,o.attribute,o.value,!!o.parse),Object.defineProperty(e,i,{get(){return o.value},set(m){const y=o.value;o.value=m,o.reflect&&En(this,o.attribute,o.value,!!o.parse);for(let p=0,$=this.__propertyChangedCallbacks.length;p<$;p++)this.__propertyChangedCallbacks[p](i,m,y)},enumerable:!0,configurable:!0})}),n}function An(e){if(e)try{return JSON.parse(e)}catch{return e}}function En(e,t,n,r){if(n==null||n===!1)return e.removeAttribute(t);let i=r?JSON.stringify(n):n;e.__updating[t]=!0,i==="true"&&(i=""),e.setAttribute(t,i),Promise.resolve().then(()=>delete e.__updating[t])}function Er(e){return e.replace(/\.?([A-Z]+)/g,(t,n)=>"-"+n.toLowerCase()).replace("_","-").replace(/^-/,"")}function Fn(e){return e!=null&&(typeof e=="object"||typeof e=="function")}function Fr(e){return Object.prototype.toString.call(e)==="[object Function]"}function $r(e){return typeof e=="function"&&e.toString().indexOf("class")===0}let Yt;function kr(e,t){const n=Object.keys(t);return class extends e{static get observedAttributes(){return n.map(i=>t[i].attribute)}constructor(){super(),this.__initialized=!1,this.__released=!1,this.__releaseCallbacks=[],this.__propertyChangedCallbacks=[],this.__updating={},this.props={}}connectedCallback(){if(this.__initialized)return;this.__releaseCallbacks=[],this.__propertyChangedCallbacks=[],this.__updating={},this.props=Ar(this,t);const i=yr(this.props),o=this.Component,s=Yt;try{Yt=this,this.__initialized=!0,$r(o)?new o(i,{element:this}):o(i,{element:this})}finally{Yt=s}}async disconnectedCallback(){if(await Promise.resolve(),this.isConnected)return;this.__propertyChangedCallbacks.length=0;let i=null;for(;i=this.__releaseCallbacks.pop();)i(this);delete this.__initialized,this.__released=!0}attributeChangedCallback(i,o,s){if(this.__initialized&&!this.__updating[i]&&(i=this.lookupProp(i),i in t)){if(s==null&&!this[i])return;this[i]=t[i].parse?An(s):s}}lookupProp(i){if(t)return n.find(o=>i===o||i===t[o].attribute)}get renderRoot(){return this.shadowRoot||this.attachShadow({mode:"open"})}addReleaseCallback(i){this.__releaseCallbacks.push(i)}addPropertyChangedCallback(i){this.__propertyChangedCallbacks.push(i)}}}function xr(e,t={},n={}){const{BaseElement:r=HTMLElement,extension:i,customElements:o=window.customElements}=n;return s=>{if(!e)throw new Error("tag is required to register a Component");let l=o.get(e);return l?(l.prototype.Component=s,l):(l=kr(r,wr(t)),l.prototype.Component=s,l.prototype.registeredTag=e,o.define(e,l,i),l)}}function Br(e){const t=Object.keys(e),n={};for(let r=0;r<t.length;r++){const[i,o]=C(e[t[r]]);Object.defineProperty(n,t[r],{get:i,set(s){o(()=>s)}})}return n}function _r(e){if(e.assignedSlot&&e.assignedSlot._$owner)return e.assignedSlot._$owner;let t=e.parentNode;for(;t&&!t._$owner&&!(t.assignedSlot&&t.assignedSlot._$owner);)t=t.parentNode;return t&&t.assignedSlot?t.assignedSlot._$owner:e._$owner}function Sr(e){return(t,n)=>{const{element:r}=n;return ar(i=>{const o=Br(t);r.addPropertyChangedCallback((l,m)=>o[l]=m),r.addReleaseCallback(()=>{r.renderRoot.textContent="",i()});const s=e(o,n);return c(r.renderRoot,s)},_r(r))}}function Zt(e,t,n){return arguments.length===2&&(n=t,t={}),xr(e,t)(Sr(n))}var Tr="٠١٢٣٤٥٦٧٨٩",Ir="۰۱۲۳۴۵۶۷۸۹",Pr="൦൧൨൩൪൫൬൭൮൯",Mr="೦೧೨೩೪೫೬೭೮೯",Or="໐໑໒໓໔໕໖໗໘໙",zr="୦୧୨୩୪୫୬୭୮୯",Rr="០១២៣៤៥៦៧៨៩",Nr="߀߁߂߃߄߅߆߇߈߉",jr="੦੧੨੩੪੫੬੭੮੯",Lr="૦૧૨૩૪૫૬૭૮૯",Ur="०१२३४५६७८९",qr="၀၁၂၃၄၅၆၇၈၉",Vr="௦௧௨௩௪௫௬௭௮௯",Jr="౦౧౨౩౪౫౬౭౮౯",Gr="๐๑๒๓๔๕๖๗๘๙",Kr="༠༡༢༣༤༥༦༧༨༩",$n={ar:Tr,fa:Ir,ml:Pr,kn:Mr,lo:Or,or:zr,kh:Rr,nqo:Nr,pa:jr,gu:Lr,hi:Ur,my:qr,ta:Vr,te:Jr,th:Gr,bo:Kr},Hr=["ru"],Wr=["id"],Yr=["id"],Zr=["ady-cyrl"],Xr=["aeb-arab"],Qr=["sq"],ei=["ru"],ti=["zh-hant"],ni=["es"],ri=["hi"],ii=["es"],oi=["ar"],si=["ar"],ai=["ar"],ui=["es"],li=["fr"],ci=["ru"],di=["fr","es","ru"],hi=["hi"],fi=["es"],pi=["fa"],gi=["ru"],mi=["id"],Di=["de"],vi=["bbc-latn"],bi=["fa"],Ci=["fa"],wi=["bho"],yi=["en"],Ai=["id"],Ei=["fr"],Fi=["bn"],$i=["fa"],ki=["fr"],xi=["id"],Bi=["id"],_i=["ru"],Si=["oc"],Ti=["nan","zh-hant"],Ii=["ru"],Pi=["it"],Mi=["crh-latn"],Oi=["sk"],zi=["pl"],Ri=["ru"],Ni=["hsb","de"],ji=["ms"],Li=["ne"],Ui=["it"],qi=["it"],Vi=["es"],Ji=["fr"],Gi=["fi"],Ki=["fr"],Hi=["fr"],Wi=["de"],Yi=["it"],Zi=["tr"],Xi=["gan-hant","zh-hant","zh-hans"],Qi=["fr"],eo=["pt"],to=["fa"],no=["es"],ro=["gom-deva"],io=["id"],oo=["de"],so=["es"],ao=["zh-hant"],uo=["hif-latn"],lo=["de"],co=["dsb","de"],ho=["fr"],fo=["hy"],po=["zh-cn","zh-hans"],go=["ru"],mo=["eo"],Do=["ike-cans"],vo=["en"],bo=["da"],Co=["id"],wo=["kk-latn","kk-cyrl"],yo=["fr"],Ao=["kbd-cyrl"],Eo=["fr"],Fo=["ur"],$o=["tr"],ko=["my"],xo=["kk-cyrl"],Bo=["da"],_o=["ru"],So=["ru"],To=["fi"],Io=["ks-arab"],Po=["de"],Mo=["ku-latn"],Oo=["ru"],zo=["ru"],Ro=["es"],No=["de"],jo=["ru"],Lo=["ru","az"],Uo=["nl"],qo=["it"],Vo=["et"],Jo=["fa"],Go=["it","rm","fur"],Ko=["pms","eml","lij","vec","it"],Ho=["fr"],Wo=["fa"],Yo=["lv"],Zo=["fa"],Xo=["zh-hant"],Qo=["tr"],es=["id"],ts=["hi"],ns=["myv","ru"],rs=["fr"],is=["mrj","ru"],os=["id"],ss=["my"],as=["ro"],us=["mhr","ru"],ls=["pt"],cs=["mdf","ru"],ds=["fa"],hs=["es"],fs=["cdo","zh-hant"],ps=["it"],gs=["nn"],ms=["de"],Ds=["id"],vs=["nb"],bs=["fr"],Cs=["ca","fr"],ws=["fi"],ys=["ru"],As=["fr"],Es=["de"],Fs=["de"],$s=["de"],ks=["en"],xs=["it"],Bs=["el"],_s=["pt-br"],Ss=["qug","es"],Ts=["qu","es"],Is=["it"],Ps=["ro"],Ms=["uk","ru"],Os=["ro"],zs=["ruq-latn","ro"],Rs=["hi"],Ns=["ru"],js=["it"],Ls=["en"],Us=["it"],qs=["cbk","fa"],Vs=["fr"],Js=["fr"],Gs=["lt"],Ks=["bs","sr-el","hr"],Hs=["fr"],Ws=["shy-latn"],Ys=["cs"],Zs=["skr-arab"],Xs=["de"],Qs=["fi"],ea=["sr-ec"],ta=["nl"],na=["de"],ra=["ru"],ia=["id"],oa=["pl"],sa=["zh-tw","zh-hant","zh-hans"],aa=["zh-tw","zh-hant","zh-hans"],ua=["kn"],la=["pt"],ca=["tg-cyrl"],da=["zh-tw","zh-hant","zh-hans"],ha=["tt-cyrl","ru"],fa=["fr"],pa=["ru"],ga=["ru"],ma=["ug-arab"],Da=["it"],va=["et"],ba=["nl"],Ca=["de"],wa=["fi"],ya=["et"],Aa=["fr"],Ea=["fr"],Fa=["zh-hans"],$a=["ru"],ka=["ka"],xa=["he"],Ba=["zh-hans"],_a=["nl"],Sa=["kab"],Ta=["zh-hans"],kn={ab:Hr,abs:Wr,ace:Yr,ady:Zr,aeb:Xr,"aeb-arab":["ar"],aln:Qr,alt:ei,ami:ti,an:ni,anp:ri,arn:ii,arq:oi,ary:si,arz:ai,ast:ui,atj:li,av:ci,avk:di,awa:hi,ay:fi,azb:pi,ba:gi,ban:mi,"ban-bali":["ban"],bar:Di,bbc:vi,"bbc-latn":["id"],bcc:bi,"be-tarask":["be"],bgn:Ci,bh:wi,bi:yi,bjn:Ai,bm:Ei,bpy:Fi,bqi:$i,br:ki,btm:xi,bug:Bi,bxr:_i,ca:Si,"cbk-zam":["es"],cdo:Ti,ce:Ii,co:Pi,crh:Mi,"crh-cyrl":["ru"],cs:Oi,csb:zi,cv:Ri,"de-at":["de"],"de-ch":["de"],"de-formal":["de"],dsb:Ni,dtp:ji,dty:Li,egl:Ui,eml:qi,"en-ca":["en"],"en-gb":["en"],"es-419":["es"],"es-formal":["es"],ext:Vi,ff:Ji,fit:Gi,frc:Ki,frp:Hi,frr:Wi,fur:Yi,gag:Zi,gan:Xi,"gan-hans":["zh-hans"],"gan-hant":["zh-hant","zh-hans"],gcr:Qi,gl:eo,glk:to,gn:no,gom:ro,"gom-deva":["hi"],gor:io,gsw:oo,guc:so,hak:ao,hif:uo,hrx:lo,hsb:co,ht:ho,"hu-formal":["hu"],hyw:fo,ii:po,inh:go,io:mo,iu:Do,jam:vo,jut:bo,jv:Co,kaa:wo,kab:yo,kbd:Ao,kbp:Eo,khw:Fo,kiu:$o,kjp:ko,kk:xo,"kk-arab":["kk-cyrl"],"kk-cn":["kk-arab","kk-cyrl"],"kk-kz":["kk-cyrl"],"kk-latn":["kk-cyrl"],"kk-tr":["kk-latn","kk-cyrl"],kl:Bo,"ko-kp":["ko"],koi:_o,krc:So,krl:To,ks:Io,ksh:Po,ku:Mo,"ku-arab":["ckb"],kum:Oo,kv:zo,lad:Ro,lb:No,lbe:jo,lez:Lo,li:Uo,lij:qo,liv:Vo,lki:Jo,lld:Go,lmo:Ko,ln:Ho,lrc:Wo,ltg:Yo,luz:Zo,lzh:Xo,lzz:Qo,mad:es,mai:ts,"map-bms":["jv","id"],mdf:ns,mg:rs,mhr:is,min:os,mnw:ss,mo:as,mrj:us,"ms-arab":["ms"],mwl:ls,myv:cs,mzn:ds,nah:hs,nan:fs,nap:ps,nb:gs,nds:ms,"nds-nl":["nl"],nia:Ds,"nl-informal":["nl"],nn:vs,nrm:bs,oc:Cs,olo:ws,os:ys,pcd:As,pdc:Es,pdt:Fs,pfl:$s,pih:ks,pms:xs,pnt:Bs,pt:_s,"pt-br":["pt"],qu:Ss,qug:Ts,rgn:Is,rmy:Ps,"roa-tara":["it"],rue:Ms,rup:Os,ruq:zs,"ruq-cyrl":["mk"],"ruq-latn":["ro"],sa:Rs,sah:Ns,scn:js,sco:Ls,sdc:Us,sdh:qs,ses:Vs,sg:Js,sgs:Gs,sh:Ks,shi:Hs,shy:Ws,"shy-latn":["fr"],sk:Ys,skr:Zs,"skr-arab":["ur","pnb"],sli:Xs,smn:Qs,sr:ea,srn:ta,stq:na,sty:ra,su:ia,szl:oa,szy:sa,tay:aa,tcy:ua,tet:la,tg:ca,trv:da,tt:ha,"tt-cyrl":["ru"],ty:fa,tyv:pa,udm:ga,ug:ma,vec:Da,vep:va,vls:ba,vmf:Ca,vot:wa,vro:ya,wa:Aa,wo:Ea,wuu:Fa,xal:$a,xmf:ka,yi:xa,za:Ba,zea:_a,zgh:Sa,zh:Ta,"zh-cn":["zh-hans"],"zh-hant":["zh-hans"],"zh-hk":["zh-hant","zh-hans"],"zh-mo":["zh-hk","zh-hant","zh-hans"],"zh-my":["zh-sg","zh-hans"],"zh-sg":["zh-hans"],"zh-tw":["zh-hant","zh-hans"]};let Ee=class{constructor(e){this.locale=e}convertPlural(e,t){const n=/\d+=/i;if(!t||t.length===0)return"";for(let i=0;i<t.length;i++){const o=t[i];if(n.test(o)){if(parseInt(o.slice(0,o.indexOf("=")),10)===e)return o.slice(o.indexOf("=")+1);t[i]=void 0}}t=t.filter(i=>!!i);let r=this.getPluralForm(e,this.locale);return r=Math.min(r,t.length-1),t[r]}getPluralForm(e,t){const n=["zero","one","two","few","many","other"],r=new Intl.PluralRules(t),i=r.resolvedOptions().pluralCategories,o=r.select(e);return n.filter(s=>i.includes(s)).indexOf(o)}convertNumber(e,t=!1){let n=this.digitTransformTable(this.locale),r="";if(t){if(parseFloat(e,10)===e||!n)return e;const i=[];for(const s in n)i[n[s]]=s;n=i;const o=String(e);for(let s=0;s<o.length;s++)r+=n[o[s]]||o[s];return parseFloat(r,10)}if(Intl.NumberFormat){let i;const o=[...kn[this.locale]||[],"en"];return Intl.NumberFormat.supportedLocalesOf(this.locale).length?i=[this.locale]:i=o,r=new Intl.NumberFormat(i).format(e),r==="NaN"&&(r=e),r}}convertGrammar(e){return e}gender(e,t){if(!t||t.length===0)return"";for(;t.length<2;)t.push(t[t.length-1]);return e==="male"?t[0]:e==="female"?t[1]:t.length===3?t[2]:t[0]}digitTransformTable(e){return $n[e]?$n[e].split(""):!1}},Ia=class extends Ee{convertGrammar(e,t){switch(t){case"prefixed":case"תחילית":e.slice(0,1)==="ו"&&e.slice(0,2)!=="וו"&&(e="ו"+e),e.slice(0,1)==="ה"&&(e=e.slice(1)),(e.slice(0,1)<"א"||e.slice(0,1)>"ת")&&(e="־"+e)}return e}},Pa=class extends Ee{convertGrammar(t,n){switch(n){case"instrumental":t="s "+t;break;case"lokativ":t="o "+t;break}return t}},Ma=class extends Ee{convertGrammar(e,t){switch(t){case"instrumental":e="z "+e;break;case"lokatiw":e="wo "+e;break}return e}},Oa=class extends Ee{convertGrammar(e,t){switch(t){case"instrumental":e="z "+e;break;case"lokatiw":e="wo "+e;break}return e}},za=class extends Ee{convertGrammar(e,t){let n=e.match(/[aou][^äöy]*$/i);const r=e;switch(e.match(/wiki$/i)&&(n=!1),e.match(/[bcdfghjklmnpqrstvwxz]$/i)&&(e+="i"),t){case"genitive":e+="n";break;case"elative":e+=n?"sta":"stä";break;case"partitive":e+=n?"a":"ä";break;case"illative":e+=e.slice(-1)+"n";break;case"inessive":e+=n?"ssa":"ssä";break;default:e=r;break}return e}},Ra=class extends Ee{convertGrammar(e,t){return t==="genitive"&&(e.slice(-1)==="ь"?e=e.slice(0,-1)+"я":e.slice(-2)==="ия"?e=e.slice(0,-2)+"ии":e.slice(-2)==="ка"?e=e.slice(0,-2)+"ки":e.slice(-2)==="ти"?e=e.slice(0,-2)+"тей":e.slice(-2)==="ды"?e=e.slice(0,-2)+"дов":e.slice(-3)==="ник"&&(e=e.slice(0,-3)+"ника")),e}};class Na extends Ee{convertGrammar(t,n){switch(n){case"mestnik":t="o "+t;break;case"orodnik":t="z "+t;break}return t}}let ja=class extends Ee{convertGrammar(e,t){switch(t){case"genitive":e=e.replace(/u[ms]$/i,"i"),e=e.replace(/ommunia$/i,"ommunium"),e=e.replace(/a$/i,"ae"),e=e.replace(/libri$/i,"librorum"),e=e.replace(/nuntii$/i,"nuntiorum"),e=e.replace(/tio$/i,"tionis"),e=e.replace(/ns$/i,"ntis"),e=e.replace(/as$/i,"atis"),e=e.replace(/es$/i,"ei");break;case"accusative":e=e.replace(/u[ms]$/i,"um"),e=e.replace(/ommunia$/i,"am"),e=e.replace(/a$/i,"ommunia"),e=e.replace(/libri$/i,"libros"),e=e.replace(/nuntii$/i,"nuntios"),e=e.replace(/tio$/i,"tionem"),e=e.replace(/ns$/i,"ntem"),e=e.replace(/as$/i,"atem"),e=e.replace(/es$/i,"em");break;case"ablative":e=e.replace(/u[ms]$/i,"o"),e=e.replace(/ommunia$/i,"ommunibus"),e=e.replace(/a$/i,"a"),e=e.replace(/libri$/i,"libris"),e=e.replace(/nuntii$/i,"nuntiis"),e=e.replace(/tio$/i,"tione"),e=e.replace(/ns$/i,"nte"),e=e.replace(/as$/i,"ate"),e=e.replace(/es$/i,"e");break}return e}};class La extends Ee{convertGrammar(t,n){return n==="genitive"&&(t.slice(-1)==="ա"?t=t.slice(0,-1)+"այի":t.slice(-1)==="ո"?t=t.slice(0,-1)+"ոյի":t.slice(-4)==="գիրք"?t=t.slice(0,-4)+"գրքի":t=t+"ի"),t}}let Ua=class extends Ee{convertGrammar(e,t){if(t==="ainmlae")switch(e){case"an Domhnach":e="Dé Domhnaigh";break;case"an Luan":e="Dé Luain";break;case"an Mháirt":e="Dé Mháirt";break;case"an Chéadaoin":e="Dé Chéadaoin";break;case"an Déardaoin":e="Déardaoin";break;case"an Aoine":e="Dé hAoine";break;case"an Satharn":e="Dé Sathairn";break}return e}},qa=class extends Ee{convertGrammar(e,t){switch(t){case"rol":e+="ról";break;case"ba":e+="ba";break;case"k":e+="k";break}return e}},Va=class extends Ee{convertGrammar(e,t){let n,r,i,o;switch(n="мæ",r="",i="",o="",e.match(/тæ$/i)?(e=e.slice(0,-1),n="æм"):e.match(/[аæеёиоыэюя]$/i)?r="й":e.match(/у$/i)?e.slice(-2,-1).match(/[аæеёиоыэюя]$/i)||(r="й"):e.match(/[бвгджзйклмнопрстфхцчшщьъ]$/i)||(i="-"),t){case"genitive":o=i+r+"ы";break;case"dative":o=i+r+"æн";break;case"allative":o=i+n;break;case"ablative":r==="й"?o=i+r+"æ":o=i+r+"æй";break;case"superessive":o=i+r+"ыл";break;case"equative":o=i+r+"ау";break;case"comitative":o=i+"имæ";break}return e+o}};class Ja extends Ee{convertGrammar(t,n){switch(n){case"genitive":t.slice(-1)==="ь"?t=t.slice(0,-1)+"я":t.slice(-2)==="ія"?t=t.slice(0,-2)+"ії":t.slice(-2)==="ка"?t=t.slice(0,-2)+"ки":t.slice(-2)==="ти"?t=t.slice(0,-2)+"тей":t.slice(-2)==="ды"?t=t.slice(0,-2)+"дов":t.slice(-3)==="ник"&&(t=t.slice(0,-3)+"ника");break;case"accusative":t.slice(-2)==="ія"&&(t=t.slice(0,-2)+"ію");break}return t}}var xn={bs:Pa,default:Ee,dsb:Ma,fi:za,ga:Ua,he:Ia,hsb:Oa,hu:qa,hy:La,la:ja,os:Va,ru:Ra,sl:Na,uk:Ja};const Ga=new RegExp("(?:([A-Za-zªµºÀ-ÖØ-öø-ʸʻ-ˁːˑˠ-ˤˮͰ-ͳͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-҂Ҋ-ԯԱ-Ֆՙ-՟ա-և։ः-हऻऽ-ीॉ-ौॎ-ॐक़-ॡ।-ঀংঃঅ-ঌএঐও-নপ-রলশ-হঽ-ীেৈোৌৎৗড়ঢ়য়-ৡ০-ৱ৴-৺ਃਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਾ-ੀਖ਼-ੜਫ਼੦-੯ੲ-ੴઃઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽ-ીૉોૌૐૠૡ૦-૰ૹଂଃଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽାୀେୈୋୌୗଡ଼ଢ଼ୟ-ୡ୦-୷ஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹாிுூெ-ைொ-ௌௐௗ௦-௲ఁ-ఃఅ-ఌఎ-ఐఒ-నప-హఽు-ౄౘ-ౚౠౡ౦-౯౿ಂಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽ-ೄೆ-ೈೊೋೕೖೞೠೡ೦-೯ೱೲംഃഅ-ഌഎ-ഐഒ-ഺഽ-ീെ-ൈൊ-ൌൎൗൟ-ൡ൦-൵൹-ൿංඃඅ-ඖක-නඳ-රලව-ෆා-ෑෘ-ෟ෦-෯ෲ-෴ก-ะาำเ-ๆ๏-๛ກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆ໐-໙ໜ-ໟༀ-༗༚-༴༶༸༾-ཇཉ-ཬཿ྅ྈ-ྌ྾-࿅࿇-࿌࿎-࿚က-ာေးျြဿ-ၗၚ-ၝၡ-ၰၵ-ႁႃႄႇ-ႌႎ-ႜ႞-ჅჇჍა-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፠-፼ᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙿᚁ-ᚚᚠ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱ᜵᜶ᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳាើ-ៅះៈ។-៚ៜ០-៩᠐-᠙ᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᤣ-ᤦᤩ-ᤫᤰᤱᤳ-ᤸ᥆-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉ᧐-᧚ᨀ-ᨖᨙᨚ᨞-ᩕᩗᩡᩣᩤᩭ-ᩲ᪀-᪉᪐-᪙᪠-᪭ᬄ-ᬳᬵᬻᬽ-ᭁᭃ-ᭋ᭐-᭪᭴-᭼ᮂ-ᮡᮦᮧ᮪ᮮ-ᯥᯧᯪ-ᯬᯮ᯲᯳᯼-ᰫᰴᰵ᰻-᱉ᱍ-᱿᳀-᳇᳓᳡ᳩ-ᳬᳮ-ᳳᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎ⅏Ⅰ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵰ⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〮〯〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎ㆐-ㆺㇰ-㈜㈠-㉏㉠-㉻㉿-㊰㋀-㋋㋐-㋾㌀-㍶㍻-㏝㏠-㏾㐀-䶵一-鿕ꀀ-ꒌꓐ-ꘌꘐ-ꘫꙀ-ꙮꚀ-ꚝꚠ-ꛯ꛲-꛷Ꜣ-ꞇ꞉-ꞭꞰ-ꞷꟷ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠤꠧ꠰-꠷ꡀ-ꡳꢀ-ꣃ꣎-꣙ꣲ-ꣽ꤀-ꤥ꤮-ꥆꥒ꥓꥟-ꥼꦃ-ꦲꦴꦵꦺꦻꦽ-꧍ꧏ-꧙꧞-ꧤꧦ-ꧾꨀ-ꨨꨯꨰꨳꨴꩀ-ꩂꩄ-ꩋꩍ꩐-꩙꩜-ꩻꩽ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫫꫮ-ꫵꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭥꭰ-ꯤꯦꯧꯩ-꯬꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ-舘並-龎ff-stﬓ-ﬗA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]|\uD800[\uDC00-\uDC0B]|\uD800[\uDC0D-\uDC26]|\uD800[\uDC28-\uDC3A]|𐀼|𐀽|\uD800[\uDC3F-\uDC4D]|\uD800[\uDC50-\uDC5D]|\uD800[\uDC80-\uDCFA]|𐄀|𐄂|\uD800[\uDD07-\uDD33]|\uD800[\uDD37-\uDD3F]|\uD800[\uDDD0-\uDDFC]|\uD800[\uDE80-\uDE9C]|\uD800[\uDEA0-\uDED0]|\uD800[\uDF00-\uDF23]|\uD800[\uDF30-\uDF4A]|\uD800[\uDF50-\uDF75]|\uD800[\uDF80-\uDF9D]|\uD800[\uDF9F-\uDFC3]|\uD800[\uDFC8-\uDFD5]|\uD801[\uDC00-\uDC9D]|\uD801[\uDCA0-\uDCA9]|\uD801[\uDD00-\uDD27]|\uD801[\uDD30-\uDD63]|𐕯|\uD801[\uDE00-\uDF36]|\uD801[\uDF40-\uDF55]|\uD801[\uDF60-\uDF67]|𑀀|\uD804[\uDC02-\uDC37]|\uD804[\uDC47-\uDC4D]|\uD804[\uDC66-\uDC6F]|\uD804[\uDC82-\uDCB2]|𑂷|𑂸|\uD804[\uDCBB-\uDCC1]|\uD804[\uDCD0-\uDCE8]|\uD804[\uDCF0-\uDCF9]|\uD804[\uDD03-\uDD26]|𑄬|\uD804[\uDD36-\uDD43]|\uD804[\uDD50-\uDD72]|\uD804[\uDD74-\uDD76]|\uD804[\uDD82-\uDDB5]|\uD804[\uDDBF-\uDDC9]|𑇍|\uD804[\uDDD0-\uDDDF]|\uD804[\uDDE1-\uDDF4]|\uD804[\uDE00-\uDE11]|\uD804[\uDE13-\uDE2E]|𑈲|𑈳|𑈵|\uD804[\uDE38-\uDE3D]|\uD804[\uDE80-\uDE86]|𑊈|\uD804[\uDE8A-\uDE8D]|\uD804[\uDE8F-\uDE9D]|\uD804[\uDE9F-\uDEA9]|\uD804[\uDEB0-\uDEDE]|\uD804[\uDEE0-\uDEE2]|\uD804[\uDEF0-\uDEF9]|𑌂|𑌃|\uD804[\uDF05-\uDF0C]|𑌏|𑌐|\uD804[\uDF13-\uDF28]|\uD804[\uDF2A-\uDF30]|𑌲|𑌳|\uD804[\uDF35-\uDF39]|\uD804[\uDF3D-\uDF3F]|\uD804[\uDF41-\uDF44]|𑍇|𑍈|\uD804[\uDF4B-\uDF4D]|𑍐|𑍗|\uD804[\uDF5D-\uDF63]|\uD805[\uDC80-\uDCB2]|𑒹|\uD805[\uDCBB-\uDCBE]|𑓁|\uD805[\uDCC4-\uDCC7]|\uD805[\uDCD0-\uDCD9]|\uD805[\uDD80-\uDDB1]|\uD805[\uDDB8-\uDDBB]|𑖾|\uD805[\uDDC1-\uDDDB]|\uD805[\uDE00-\uDE32]|𑘻|𑘼|𑘾|\uD805[\uDE41-\uDE44]|\uD805[\uDE50-\uDE59]|\uD805[\uDE80-\uDEAA]|𑚬|𑚮|𑚯|𑚶|\uD805[\uDEC0-\uDEC9]|\uD805[\uDF00-\uDF19]|𑜠|𑜡|𑜦|\uD805[\uDF30-\uDF3F]|\uD806[\uDCA0-\uDCF2]|𑣿|\uD806[\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E]|\uD809[\uDC70-\uDC74]|\uD809[\uDC80-\uDD43]|\uD80C[\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38]|\uD81A[\uDE40-\uDE5E]|\uD81A[\uDE60-\uDE69]|𖩮|𖩯|\uD81A[\uDED0-\uDEED]|𖫵|\uD81A[\uDF00-\uDF2F]|\uD81A[\uDF37-\uDF45]|\uD81A[\uDF50-\uDF59]|\uD81A[\uDF5B-\uDF61]|\uD81A[\uDF63-\uDF77]|\uD81A[\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44]|\uD81B[\uDF50-\uDF7E]|\uD81B[\uDF93-\uDF9F]|𛀀|𛀁|\uD82F[\uDC00-\uDC6A]|\uD82F[\uDC70-\uDC7C]|\uD82F[\uDC80-\uDC88]|\uD82F[\uDC90-\uDC99]|𛲜|𛲟|\uD834[\uDC00-\uDCF5]|\uD834[\uDD00-\uDD26]|\uD834[\uDD29-\uDD66]|\uD834[\uDD6A-\uDD72]|𝆃|𝆄|\uD834[\uDD8C-\uDDA9]|\uD834[\uDDAE-\uDDE8]|\uD834[\uDF60-\uDF71]|\uD835[\uDC00-\uDC54]|\uD835[\uDC56-\uDC9C]|𝒞|𝒟|𝒢|𝒥|𝒦|\uD835[\uDCA9-\uDCAC]|\uD835[\uDCAE-\uDCB9]|𝒻|\uD835[\uDCBD-\uDCC3]|\uD835[\uDCC5-\uDD05]|\uD835[\uDD07-\uDD0A]|\uD835[\uDD0D-\uDD14]|\uD835[\uDD16-\uDD1C]|\uD835[\uDD1E-\uDD39]|\uD835[\uDD3B-\uDD3E]|\uD835[\uDD40-\uDD44]|𝕆|\uD835[\uDD4A-\uDD50]|\uD835[\uDD52-\uDEA5]|\uD835[\uDEA8-\uDEDA]|\uD835[\uDEDC-\uDF14]|\uD835[\uDF16-\uDF4E]|\uD835[\uDF50-\uDF88]|\uD835[\uDF8A-\uDFC2]|\uD835[\uDFC4-\uDFCB]|\uD836[\uDC00-\uDDFF]|\uD836[\uDE37-\uDE3A]|\uD836[\uDE6D-\uDE74]|\uD836[\uDE76-\uDE83]|\uD836[\uDE85-\uDE8B]|\uD83C[\uDD10-\uDD2E]|\uD83C[\uDD30-\uDD69]|\uD83C[\uDD70-\uDD9A]|\uD83C[\uDDE6-\uDE02]|\uD83C[\uDE10-\uDE3A]|\uD83C[\uDE40-\uDE48]|🉐|🉑|[\uD840-\uD868][\uDC00-\uDFFF]|\uD869[\uDC00-\uDED6]|\uD869[\uDF00-\uDFFF]|[\uD86A-\uD86C][\uDC00-\uDFFF]|\uD86D[\uDC00-\uDF34]|\uD86D[\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D]|\uD86E[\uDC20-\uDFFF]|[\uD86F-\uD872][\uDC00-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|[\uDB80-\uDBBE][\uDC00-\uDFFF]|\uDBBF[\uDC00-\uDFFD]|[\uDBC0-\uDBFE][\uDC00-\uDFFF]|\uDBFF[\uDC00-\uDFFD])|([־׀׃׆-߀-ߪߴߵߺ-ࠕࠚࠤࠨ-ࡘ-࢟יִײַ-ﬨשׁ-ﭏ؈؋؍؛-ي٭-ٯٱ-ەۥۦۮۯۺ-ܐܒ-ܯ-ޥޱ-ࢠ-ﭐ-ﴽ﵀-﷏ﷰ-﷼﷾﷿ﹰ-]|\uD802[\uDC00-\uDD1E]|\uD802[\uDD20-\uDE00]||\uD802[\uDE07-\uDE0B]|\uD802[\uDE10-\uDE37]|\uD802[\uDE3B-\uDE3E]|\uD802[\uDE40-\uDEE4]|\uD802[\uDEE7-\uDF38]|\uD802[\uDF40-\uDFFF]|\uD803[\uDC00-\uDE5F]|\uD803[\uDE7F-\uDFFF]|\uD83A[\uDC00-\uDCCF]|\uD83A[\uDCD7-\uDFFF]|\uD83B[\uDC00-\uDDFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDE00-\uDEEF]|\uD83B[\uDEF2-\uDEFF]))");let Bn=class{constructor(e){this.locale=gt(e),this.language=new(xn[this.locale]||xn.default)(this.locale)}emit(e,t){let n,r,i;switch(typeof e){case"string":case"number":n=e;break;case"object":if(r=e.slice(1).map(o=>this.emit(o,t)),i=e[0].toLowerCase(),typeof this[i]=="function")n=this[i](r,t);else throw new Error('unknown operation "'+i+'"');break;case"undefined":n="";break;default:throw new Error("unexpected type in AST: "+typeof e)}return n}concat(e){let t="";return e.forEach(n=>{t+=n}),t}replace(e,t){const n=parseInt(e[0],10);return n<t.length?t[n]:"$"+(n+1)}plural(e){const t=parseFloat(this.language.convertNumber(e[0],10)),n=e.slice(1);return n.length?this.language.convertPlural(t,n):""}gender(e){const t=e[0],n=e.slice(1);return this.language.gender(t,n)}grammar(e){const t=e[0],n=e[1];return n&&t&&this.language.convertGrammar(n,t)}wikilink(e){let t,n=e[0];n.charAt(0)===":"&&(n=n.slice(1));const r=`./${n}`;return e.length===1?t=n:t=e[1],`<a href="${r}" title="${n}">${t}</a>`}extlink(e){if(e.length!==2)throw new Error("Expected two items in the node");return`<a href="${e[0]}">${e[1]}</a>`}bidi(e){const t=Ka(e[0]);return t==="ltr"?""+e[0]+"":t==="rtl"?""+e[0]+"":e[0]}formatnum(e){const t=!!e[1]&&e[1]==="R",n=e[0];return typeof n=="string"||typeof n=="number"?this.language.convertNumber(n,t):n}htmlattributes(e){const t={};for(let n=0,r=e.length;n<r;n+=2)t[e[n]]=e[n+1];return t}htmlelement(e){const t=e.shift(),n=e.shift();let r=e,i="";for(const s in n)i+=` ${s}="${n[s]}"`;Array.isArray(r)||(r=[r]);const o=r.join("");return`<${t}${i}>${o}</${t}>`}};function gt(e){return typeof e=="string"?e.toLowerCase():e}function Ka(e){const t=e.match(Ga);return t?t[2]===void 0?"ltr":"rtl":null}function Ha(e,{wikilinks:t=!1}={}){let n=0;function r(g){return()=>{for(let k=0;k<g.length;k++){const G=g[k]();if(G!==null)return G}return null}}function i(g){const k=n,G=[];for(let Z=0;Z<g.length;Z++){const ae=g[Z]();if(ae===null)return n=k,null;G.push(ae)}return G}function o(g,k){return()=>{const G=n,Z=[];let ae=k();for(;ae!==null;)Z.push(ae),ae=k();return Z.length<g?(n=G,null):Z}}function s(g){const k=g.length;return()=>{let G=null;return e.slice(n,n+k)===g&&(G=g,n+=k),G}}function l(g){return()=>{const k=e.slice(n).match(g);return k===null?null:(n+=k[0].length,k[0])}}const m=l(/^\s+/),y=s("|"),p=s(":"),$=s("\\"),O=l(/^./),ee=s("$"),fe=l(/^\d+/),U=s('"'),Pe=s("'"),Fe=l(t?/^[^{}[\]$<\\]/:/^[^{}$<\\]/),le=l(t?/^[^{}[\]$\\|]/:/^[^{}$\\|]/),ce=l(t?/^[^{}[\]$\s]/:/^[^{}$\s]/);function je(g,k){return()=>{const G=g();return G===null?null:k(G)}}function q(){const g=o(1,pe)();return g===null?null:g.join("")}function me(){const g=o(1,De)();return g===null?null:g.join("")}const H=r([te,ce]);function $e(){const g=o(1,H)();return g===null?null:g.join("")}function te(){const g=i([$,O]);return g===null?null:g[1]}const pe=r([te,le]),De=r([te,Fe]);function Ce(){const g=i([ee,fe]);return g===null?null:["REPLACE",parseInt(g[1],10)-1]}const ke=je(l(/^[ !"$&'()*,./0-9;=?@A-Z^_`a-z~\x80-\xFF+-]+/),function(g){return g.toString()});function ne(){const g=i([y,o(0,qe)]);if(g===null)return null;const k=g[1];return k.length>1?["CONCAT"].concat(k):k[0]}function I(){const g=i([ke,p,Ce]);return g===null?null:[g[0],g[2]]}function V(){const g=i([ke,p,qe]);return g===null?null:[g[0],g[2]]}function re(){const g=i([ke,p]);return g===null?null:[g[0],""]}const se=r([function(){const g=i([r([I,V,re]),o(0,ne)]);return g===null?null:g[0].concat(g[1])},function(){const g=i([ke,o(0,ne)]);return g===null?null:[g[0]].concat(g[1])}]),Me=s("{{"),ye=s("}}"),Le=s("[["),vt=s("]]"),it=s("["),dt=s("]");function Oe(){const g=i([Me,se,ye]);return g===null?null:g[1]}function bt(){const g=i([o(1,qe),y,o(1,v)]);return g===null?null:[["CONCAT"].concat(g[0]),["CONCAT"].concat(g[2])]}function Ye(){const g=i([o(1,qe)]);return g===null?null:[["CONCAT"].concat(g[0])]}const Ze=r([bt,Ye]);function Te(){let g=null;const k=i([Le,Ze,vt]);if(k!==null){const G=k[1];g=["WIKILINK"].concat(G)}return g}function ot(){let g=null;const k=i([it,o(1,Tt),m,o(1,v),dt]);return k!==null&&(g=["EXTLINK",k[1].length===1?k[1][0]:["CONCAT"].concat(k[1]),["CONCAT"].concat(k[3])]),g}const Ue=l(/^[A-Za-z]+/);function Ct(g,k,G,Z={allowedHtmlElements:["b","bdi","del","i","ins","u","font","big","small","sub","sup","h1","h2","h3","h4","h5","h6","cite","code","em","s","strike","strong","tt","var","div","center","blockquote","ol","ul","dl","table","caption","pre","ruby","rb","rp","rt","rtc","p","span","abbr","dfn","kbd","samp","data","time","mark","li","dt","dd"],allowedHtmlCommonAttributes:["id","class","style","lang","dir","title","aria-describedby","aria-flowto","aria-hidden","aria-label","aria-labelledby","aria-owns","role","about","property","resource","datatype","typeof","itemid","itemprop","itemref","itemscope","itemtype"],allowedHtmlAttributesByElement:{}}){if(g=g.toLowerCase(),k=k.toLowerCase(),g!==k||Z.allowedHtmlElements.indexOf(g)===-1)return!1;const ae=/[\000-\010\013\016-\037\177]|expression|filter\s*:|accelerator\s*:|-o-link\s*:|-o-link-source\s*:|-o-replace\s*:|url\s*\(|image\s*\(|image-set\s*\(/i;for(let Ae=0,Ve=G.length;Ae<Ve;Ae+=2){const ve=G[Ae];if(Z.allowedHtmlCommonAttributes.indexOf(ve)===-1&&(Z.allowedHtmlAttributesByElement[g]||[]).indexOf(ve)===-1||ve==="style"&&G[Ae+1].search(ae)!==-1)return!1}return!0}function st(){const g=l(/^[^"]*/),k=i([U,g,U]);return k===null?null:k[1]}function wt(){const g=l(/^[^']*/),k=i([Pe,g,Pe]);return k===null?null:k[1]}function ht(){const g=l(/^\s*=\s*/),k=i([m,Ue,g,r([st,wt])]);return k===null?null:[k[1],k[3]]}function yt(){const g=o(0,ht)();return Array.prototype.concat.apply(["HTMLATTRIBUTES"],g)}function At(){let g=null;const k=n,G=s("<"),Z=l(/^\/?/),ae=l(/^\s*>/),Ae=i([G,Ue,yt,Z,ae]);if(Ae===null)return null;const Ve=n,ve=Ae[1],Xe=o(0,v)(),f=n,xe=s("</"),Qe=i([xe,Ue,ae]);if(Qe===null)return["CONCAT",e.slice(k,Ve)].concat(Xe);const at=n,Ft=Qe[1],ze=Ae[2],Re=ze.slice(1);if(Ct(ve,Ft,Re))g=["HTMLELEMENT",ve,ze].concat(Xe);else{const $t=x=>x.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'");g=["CONCAT",$t(e.slice(k,Ve))].concat(Xe,$t(e.slice(f,at)))}return g}const Tt=r([Oe,Ce,Te,ot,$e]),v=r([Oe,Ce,Te,ot,At,me]),qe=r([Oe,Ce,q]);function Et(){const g=o(0,v)();return g===null?null:["CONCAT"].concat(g)}const ge=Et();if(ge===null||n!==e.length)throw new Error("Parse error at position "+n.toString()+" in input: "+e);return ge}class _n{constructor(t,{wikilinks:n=!1}={}){this.locale=gt(t),this.wikilinks=n,this.emitter=new Bn(this.locale)}parse(t,n){if(t.includes("{{")||t.includes("<")||this.wikilinks&&t.includes("[")){const r=Ha(t,{wikilinks:this.wikilinks});return this.emitter.emit(r,n)}else return this.simpleParse(t,n)}simpleParse(t,n){return t.replace(/\$(\d+)/g,(r,i)=>{const o=parseInt(i,10)-1;return n[o]!==void 0?n[o]:"$"+i})}}class Wa{constructor(){this.sourceMap=new Map}load(t,n){if(typeof t!="object")throw new Error("Invalid message source. Must be an object");if(n=gt(n),n){if(!/^[a-zA-Z0-9-]+$/.test(n))throw new Error(`Invalid locale ${n}`);for(const r in t)if(r.indexOf("@")!==0){if(typeof t[r]=="object")return this.load(t);if(typeof t[r]!="string")throw new Error(`Invalid message for message ${r} in ${n} locale.`);break}this.sourceMap.has(n)?this.sourceMap.set(n,Object.assign(this.sourceMap.get(n),t)):this.sourceMap.set(n,t)}else for(n in t)this.load(t[n],n)}getMessage(t,n){const r=this.sourceMap.get(gt(n));return r?r[t]:null}hasLocale(t){return this.sourceMap.has(t)}}class Ya{constructor(t,{finalFallback:n="en",messages:r=void 0,wikilinks:i=!1}={}){this.locale=gt(t),this.parser=new _n(this.locale,{wikilinks:i}),this.messageStore=new Wa,r&&this.load(r,this.locale),this.finalFallback=n,this.wikilinks=i}load(t,n){return this.messageStore.load(t,n||this.locale)}i18n(t,...n){return this.parser.parse(this.getMessage(t),n)}setLocale(t){this.locale=gt(t),this.parser=new _n(this.locale,{wikilinks:this.wikilinks})}getFallbackLocales(){return[...kn[this.locale]||[],this.finalFallback]}getMessage(t){let n=this.locale,r=0;const i=this.getFallbackLocales(this.locale);for(;n;){const o=n.split("-");let s=o.length;do{const l=o.slice(0,s).join("-"),m=this.messageStore.getMessage(t,l);if(typeof m=="string")return m;s--}while(s);n=i[r],r++}return t}registerParserPlugin(t,n){Bn.prototype[t]=n}}const Sn={"@metadata":{authors:["Mason Payne"],"last-updated":"2024-01-08",locale:"en"},"sa-login":"Login","sa-username":"Email","sa-password":"Password","sa-use-password":"Use Password","sa-code":"Code","sa-signup":"Sign up","sa-signup-complete":"Sign up complete","sa-back":"Back","sa-error-creating-user":"Error creating user.","sa-remember":"Remember me","sa-forgot":"Forgot your password?","sa-register":"Register","sa-error.login":"Invalid email or password","sa-error.register":"Invalid email or password","sa-error.unknown":"Unknown error","sa-account-settings":"Account Settings","sa-webauthn-security-keys":"Your passkeys","sa-add-security-key":"Add passkey","webauthn-not-enrolled":"WebAuthn not enrolled","sa-webauthn-key-name":"Key Name","sa-cancel":"Cancel","sa-no-security-keys":"No passkeys","sa-webauthn-key-actions":"Actions","sa-remove":"Remove","not-authenticated":"Not authenticated","error-otp-registration":"Error registering OTP","sa-confirm-delete-key":"Are you sure you want to delete this key?","sa-add-mfa":"Manage MFA","sa-add-email":"Add Email","sa-email":"Email","sa-phone":"Phone","sa-add-sms":"Add SMS","sa-mfa":"MFA Registrations","error-otp-list":"Error listing OTPs","sa-type":"Type","sa-mfa-destination":"Destination","sa-mfa-validated":"Validated","sa-validate":"Validate","sa-mfa-action":"Action","sa-no":"No","sa-yes":"Yes","error-otp-remove":"Error removing MFA Registration","error-webauthn-remove":"Error removing WebAuthn Registration","sa-register-mfa":"Register MFA","sa-otp-required":"A one-time code is required.","sa-otp-choose":"Choose how to receive your code:","sa-otp-no-registrations":"No MFA methods registered.","sa-otp-send-code":"Send Code","sa-otp-verify":"Verify Code","sa-unknown-challenge":"Unknown challenge type.","sa-complete-invite":"Complete Your Invitation","sa-invite-otp":"Verification Code","sa-invite-otp-hint":"Enter the code from your invite email","sa-invite-password":"Choose a Password","sa-invite-password-hint":"Create a secure password for your account","sa-invite-submit":"Complete Registration","sa-invite-success":"Registration complete! Redirecting to login...","sa-invite-error-otp":"Invalid or expired verification code","sa-invite-error-expired":"This invite has expired. Please contact your administrator.","sa-invite-error-generic":"Unable to complete registration. Please try again.","sa-invite-completing":"Completing registration...","sa-forgot-password":"Forgot your password?","sa-reset-password":"Reset Password","sa-reset-email-sent":"If an account exists with that email, a reset code has been sent.","sa-new-password":"New Password","sa-reset-code":"Reset Code","sa-reset-submit":"Reset Password","sa-reset-success":"Password reset successfully! You can now log in.","sa-reset-error":"Unable to reset password. Please try again.","sa-reset-error-code":"Invalid or expired reset code","sa-or":"Or","sa-social-google":"Continue with Google","sa-social-github":"Continue with GitHub","sa-social-apple":"Continue with Apple","sa-social-oidc":"Continue with SSO","sa-loading":"Loading...","sa-social-error":"Error starting social login","sa-signup-mfa-title":"Verify Your Email","sa-signup-verify-prompt":"A verification code has been sent to your email. Enter it below to activate multi-factor authentication.","sa-signup-verify-error":"Invalid or expired verification code.","sa-signup-webauthn-prompt":"Your account is secure! Optionally, add a passkey for faster and easier logins.","sa-signup-webauthn-setup":"Set Up Passkey","sa-signup-webauthn-done":"Skip for now","sa-signup-webauthn-error":"Error setting up passkey. Please try again from your account settings.","sa-totp-prompt":"Enter the 6-digit code from your authenticator app.","sa-totp-code":"Authenticator code","sa-totp-recovery":"Recovery code","sa-totp-recovery-hint":"Use a recovery code if you cannot open your authenticator app.","sa-totp-verify":"Verify code","sa-totp-invalid":"Invalid or expired verification code.","sa-totp-enroll-title":"Set up authenticator app","sa-totp-enroll-prompt":"Scan this QR code with your authenticator app, or type the secret.","sa-totp-secret":"Secret","sa-totp-enroll-verify":"Verify and save","sa-totp-enroll-error":"Could not set up the authenticator app.","sa-totp-recovery-title":"Save your recovery codes","sa-totp-recovery-prompt":"Save these codes somewhere safe. Each code works once, and they will not be shown again.","sa-totp-recovery-saved":"I have saved these codes","sa-mfa-choose":"Choose a sign-in method:","sa-enroll-choose":"Set up a second sign-in method:","sa-method-otp":"Email code","sa-method-totp":"Authenticator app","sa-method-webauthn":"Passkey","sa-continue":"Continue","sa-totp-title":"Authenticator app","sa-totp-add":"Add authenticator app","sa-totp-none":"No authenticator apps","sa-totp-name":"Authenticator name","sa-confirm-delete-totp":"Remove this authenticator app?","error-totp-remove":"Error removing authenticator app","error-totp-list":"Error listing authenticator apps","sa-totp-last-factor":"An administrator must turn off required MFA before you can remove your last sign-in method."},Za={en:Sn,fr:{"@metadata":{authors:["Mason Payne"],"last-updated":"2022-05-28",locale:"fr"},"sa-login":"Connexion","sa-username":"Adresse e-mail","sa-password":"Mot de passe","sa-use-password":"Utiliser le mot de passe","sa-code":"code à deux facteurs","sa-remember":"Souviens-toi de moi","sa-forgot":"Mot de passe oublié?","sa-register":"S'inscrire","sa-error.login":"E-mail ou mot de passe invalide","sa-error.register":"E-mail ou mot de passe invalide","sa-error.unknown":"Erreur inconnue","sa-otp-required":"Un code à usage unique est requis.","sa-otp-choose":"Choisissez comment recevoir votre code :","sa-otp-no-registrations":"Aucune méthode MFA enregistrée.","sa-otp-send-code":"Envoyer le code","sa-otp-verify":"Vérifier le code","sa-unknown-challenge":"Type de défi inconnu.","sa-complete-invite":"Complétez votre invitation","sa-invite-otp":"Code de vérification","sa-invite-otp-hint":"Entrez le code de votre email d'invitation","sa-invite-password":"Choisissez un mot de passe","sa-invite-password-hint":"Créez un mot de passe sécurisé pour votre compte","sa-invite-submit":"Terminer l'inscription","sa-invite-success":"Inscription terminée ! Redirection vers la connexion...","sa-invite-error-otp":"Code de vérification invalide ou expiré","sa-invite-error-expired":"Cette invitation a expiré. Veuillez contacter votre administrateur.","sa-invite-error-generic":"Impossible de terminer l'inscription. Veuillez réessayer.","sa-invite-completing":"Finalisation de l'inscription...","sa-forgot-password":"Mot de passe oublié ?","sa-reset-password":"Réinitialiser le mot de passe","sa-reset-email-sent":"Si un compte existe avec cet e-mail, un code de réinitialisation a été envoyé.","sa-new-password":"Nouveau mot de passe","sa-reset-code":"Code de réinitialisation","sa-reset-submit":"Réinitialiser le mot de passe","sa-reset-success":"Mot de passe réinitialisé avec succès ! Vous pouvez maintenant vous connecter.","sa-reset-error":"Impossible de réinitialiser le mot de passe. Veuillez réessayer.","sa-reset-error-code":"Code de réinitialisation invalide ou expiré","sa-or":"Ou","sa-social-google":"Continuer avec Google","sa-social-github":"Continuer avec GitHub","sa-social-apple":"Continuer avec Apple","sa-social-oidc":"Continuer avec SSO","sa-loading":"Chargement...","sa-social-error":"Erreur lors de la connexion sociale","sa-signup-mfa-title":"Vérifiez votre e-mail","sa-signup-verify-prompt":"Un code de vérification a été envoyé à votre e-mail. Entrez-le ci-dessous pour activer l'authentification multi-facteurs.","sa-signup-verify-error":"Code de vérification invalide ou expiré.","sa-signup-webauthn-prompt":"Votre compte est sécurisé ! Ajoutez optionnellement une clé d'accès pour des connexions plus rapides.","sa-signup-webauthn-setup":"Configurer la clé d'accès","sa-signup-webauthn-done":"Ignorer pour l'instant","sa-signup-webauthn-error":"Erreur lors de la configuration de la clé d'accès. Veuillez réessayer depuis les paramètres de votre compte.","sa-totp-prompt":"Saisissez le code à 6 chiffres de votre application d'authentification.","sa-totp-code":"Code d'authentification","sa-totp-recovery":"Code de récupération","sa-totp-recovery-hint":"Utilisez un code de récupération si vous ne pouvez pas ouvrir votre application d'authentification.","sa-totp-verify":"Vérifier le code","sa-totp-invalid":"Code de vérification invalide ou expiré.","sa-totp-enroll-title":"Configurer l'application d'authentification","sa-totp-enroll-prompt":"Scannez ce QR code avec votre application d'authentification, ou saisissez le secret.","sa-totp-secret":"Secret","sa-totp-enroll-verify":"Vérifier et enregistrer","sa-totp-enroll-error":"Impossible de configurer l'application d'authentification.","sa-totp-recovery-title":"Enregistrez vos codes de récupération","sa-totp-recovery-prompt":"Conservez ces codes en lieu sûr. Chaque code ne fonctionne qu'une fois et ne sera plus affiché.","sa-totp-recovery-saved":"J'ai enregistré ces codes","sa-mfa-choose":"Choisissez une méthode de connexion :","sa-enroll-choose":"Configurez une seconde méthode de connexion :","sa-method-otp":"Code par e-mail","sa-method-totp":"Application d'authentification","sa-method-webauthn":"Clé d'accès","sa-continue":"Continuer","sa-totp-title":"Application d'authentification","sa-totp-add":"Ajouter une application d'authentification","sa-totp-none":"Aucune application d'authentification","sa-totp-name":"Nom de l'authentificateur","sa-confirm-delete-totp":"Retirer cette application d'authentification ?","error-totp-remove":"Erreur lors du retrait de l'application d'authentification","error-totp-list":"Erreur lors de l'affichage des applications d'authentification","sa-totp-last-factor":"Un administrateur doit désactiver l'authentification multifacteur obligatoire avant que vous puissiez retirer votre dernière méthode de connexion."},es:{"@metadata":{authors:["Mason Payne"],"last-updated":"2022-05-28",locale:"es"},"sa-login":"Acceso","sa-username":"Correo electrónico","sa-password":"Clave","sa-use-password":"Usar contraseña","sa-code":"Código","sa-remember":"Acuérdate de mí","sa-forgot":"¿Olvidaste tu contraseña?","sa-register":"Registro","sa-error.login":"Correo electrónico o contraseña inválidos","sa-error.register":"Correo electrónico o contraseña inválidos","sa-error.unknown":"Error desconocido","sa-otp-required":"Se requiere un código de un solo uso.","sa-otp-choose":"Elige cómo recibir tu código:","sa-otp-no-registrations":"No hay métodos MFA registrados.","sa-unknown-challenge":"Tipo de desafío desconocido.","sa-complete-invite":"Completa tu invitación","sa-invite-otp":"Código de verificación","sa-invite-otp-hint":"Ingresa el código de tu correo de invitación","sa-invite-password":"Elige una contraseña","sa-invite-password-hint":"Crea una contraseña segura para tu cuenta","sa-invite-submit":"Completar registro","sa-invite-success":"¡Registro completo! Redirigiendo al inicio de sesión...","sa-invite-error-otp":"Código de verificación inválido o expirado","sa-invite-error-expired":"Esta invitación ha expirado. Por favor contacta a tu administrador.","sa-invite-error-generic":"No se pudo completar el registro. Por favor intenta de nuevo.","sa-invite-completing":"Completando registro...","sa-forgot-password":"¿Olvidaste tu contraseña?","sa-reset-password":"Restablecer contraseña","sa-reset-email-sent":"Si existe una cuenta con ese correo, se ha enviado un código de restablecimiento.","sa-new-password":"Nueva contraseña","sa-reset-code":"Código de restablecimiento","sa-reset-submit":"Restablecer contraseña","sa-reset-success":"¡Contraseña restablecida con éxito! Ya puedes iniciar sesión.","sa-reset-error":"No se pudo restablecer la contraseña. Por favor intenta de nuevo.","sa-reset-error-code":"Código de restablecimiento inválido o expirado","sa-or":"O","sa-social-google":"Continuar con Google","sa-social-github":"Continuar con GitHub","sa-social-apple":"Continuar con Apple","sa-social-oidc":"Continuar con SSO","sa-loading":"Cargando...","sa-social-error":"Error al iniciar sesión social","sa-signup-mfa-title":"Verifica tu correo electrónico","sa-signup-verify-prompt":"Se ha enviado un código de verificación a tu correo. Ingrésalo para activar la autenticación multifactor.","sa-signup-verify-error":"Código de verificación inválido o expirado.","sa-signup-webauthn-prompt":"¡Tu cuenta está protegida! Opcionalmente, agrega una clave de acceso para inicios de sesión más rápidos.","sa-signup-webauthn-setup":"Configurar clave de acceso","sa-signup-webauthn-done":"Omitir por ahora","sa-signup-webauthn-error":"Error al configurar la clave de acceso. Intenta de nuevo desde la configuración de tu cuenta.","sa-totp-prompt":"Introduce el código de 6 dígitos de tu aplicación de autenticación.","sa-totp-code":"Código del autenticador","sa-totp-recovery":"Código de recuperación","sa-totp-recovery-hint":"Usa un código de recuperación si no puedes abrir tu aplicación de autenticación.","sa-totp-verify":"Verificar código","sa-totp-invalid":"Código de verificación inválido o expirado.","sa-totp-enroll-title":"Configurar aplicación de autenticación","sa-totp-enroll-prompt":"Escanea este código QR con tu aplicación de autenticación o escribe el secreto.","sa-totp-secret":"Secreto","sa-totp-enroll-verify":"Verificar y guardar","sa-totp-enroll-error":"No se pudo configurar la aplicación de autenticación.","sa-totp-recovery-title":"Guarda tus códigos de recuperación","sa-totp-recovery-prompt":"Guarda estos códigos en un lugar seguro. Cada código funciona una vez y no se volverán a mostrar.","sa-totp-recovery-saved":"He guardado estos códigos","sa-mfa-choose":"Elige un método de inicio de sesión:","sa-enroll-choose":"Configura un segundo método de inicio de sesión:","sa-method-otp":"Código por correo","sa-method-totp":"Aplicación de autenticación","sa-method-webauthn":"Clave de acceso","sa-continue":"Continuar","sa-totp-title":"Aplicación de autenticación","sa-totp-add":"Agregar aplicación de autenticación","sa-totp-none":"No hay aplicaciones de autenticación","sa-totp-name":"Nombre del autenticador","sa-confirm-delete-totp":"¿Eliminar esta aplicación de autenticación?","error-totp-remove":"Error al eliminar la aplicación de autenticación","error-totp-list":"Error al listar las aplicaciones de autenticación","sa-totp-last-factor":"Un administrador debe desactivar la autenticación multifactor obligatoria antes de que puedas eliminar tu último método de inicio de sesión."},ja:{"@metadata":{authors:["Mason Payne"],"last-updated":"2022-05-28",locale:"ja"},"sa-login":"ログイン","sa-username":"メールアドレス","sa-password":"パスワード","sa-use-password":"パスワードを使用する","sa-code":"コード","sa-remember":"私を覚えてますか","sa-forgot":"パスワードをお忘れですか?","sa-register":"登録","sa-error.login":"メールアドレスかパスワードが無効","sa-error.register":"メールアドレスかパスワードが無効","sa-error.unknown":"未知のエラー","sa-otp-required":"ワンタイムコードが必要です。","sa-otp-choose":"コードの受け取り方法を選択してください:","sa-otp-no-registrations":"MFA方法が登録されていません。","sa-otp-send-code":"コードを送信","sa-otp-verify":"コードを確認","sa-unknown-challenge":"不明なチャレンジタイプです。","sa-complete-invite":"招待を完了する","sa-invite-otp":"確認コード","sa-invite-otp-hint":"招待メールのコードを入力してください","sa-invite-password":"パスワードを選択","sa-invite-password-hint":"アカウント用の安全なパスワードを作成してください","sa-invite-submit":"登録を完了","sa-invite-success":"登録完了!ログインページへリダイレクト中...","sa-invite-error-otp":"無効または期限切れの確認コード","sa-invite-error-expired":"この招待は期限切れです。管理者にお問い合わせください。","sa-invite-error-generic":"登録を完了できませんでした。もう一度お試しください。","sa-invite-completing":"登録を完了しています...","sa-forgot-password":"パスワードをお忘れですか?","sa-reset-password":"パスワードをリセット","sa-reset-email-sent":"そのメールアドレスのアカウントが存在する場合、リセットコードが送信されました。","sa-new-password":"新しいパスワード","sa-reset-code":"リセットコード","sa-reset-submit":"パスワードをリセット","sa-reset-success":"パスワードが正常にリセットされました!ログインできます。","sa-reset-error":"パスワードをリセットできませんでした。もう一度お試しください。","sa-reset-error-code":"無効または期限切れのリセットコード","sa-or":"または","sa-social-google":"Googleで続ける","sa-social-github":"GitHubで続ける","sa-social-apple":"Appleで続ける","sa-social-oidc":"SSOで続ける","sa-loading":"読み込み中...","sa-social-error":"ソーシャルログイン開始エラー","sa-signup-mfa-title":"メールを確認してください","sa-signup-verify-prompt":"確認コードがメールに送信されました。多要素認証を有効にするために入力してください。","sa-signup-verify-error":"無効または期限切れの確認コードです。","sa-signup-webauthn-prompt":"アカウントが保護されました!パスキーを追加してより速く簡単にログインできます(任意)。","sa-signup-webauthn-setup":"パスキーを設定","sa-signup-webauthn-done":"今はスキップ","sa-signup-webauthn-error":"パスキーの設定中にエラーが発生しました。アカウント設定から再試行してください。","sa-totp-prompt":"認証アプリの6桁のコードを入力してください。","sa-totp-code":"認証コード","sa-totp-recovery":"リカバリーコード","sa-totp-recovery-hint":"認証アプリを開けない場合はリカバリーコードを使ってください。","sa-totp-verify":"コードを確認","sa-totp-invalid":"確認コードが無効か、期限切れです。","sa-totp-enroll-title":"認証アプリを設定","sa-totp-enroll-prompt":"認証アプリでこのQRコードを読み取るか、シークレットを入力してください。","sa-totp-secret":"シークレット","sa-totp-enroll-verify":"確認して保存","sa-totp-enroll-error":"認証アプリを設定できませんでした。","sa-totp-recovery-title":"リカバリーコードを保存","sa-totp-recovery-prompt":"これらのコードを安全な場所に保存してください。各コードは一度だけ使え、再表示されません。","sa-totp-recovery-saved":"コードを保存しました","sa-mfa-choose":"ログイン方法を選択してください:","sa-enroll-choose":"第二のログイン方法を設定してください:","sa-method-otp":"メールコード","sa-method-totp":"認証アプリ","sa-method-webauthn":"パスキー","sa-continue":"続行","sa-totp-title":"認証アプリ","sa-totp-add":"認証アプリを追加","sa-totp-none":"認証アプリはありません","sa-totp-name":"認証アプリの名前","sa-confirm-delete-totp":"この認証アプリを削除しますか?","error-totp-remove":"認証アプリの削除中にエラーが発生しました","error-totp-list":"認証アプリの一覧取得中にエラーが発生しました","sa-totp-last-factor":"最後のログイン方法を削除する前に、管理者が必須の多要素認証をオフにする必要があります。"}};function Xt(e){const t=new Ya("en",{messages:Sn});return e!=="en"&&(t.load(Za[e],e),t.setLocale(e)),t}function Tn(e){const t="==".slice(0,(4-e.length%4)%4),n=e.replace(/-/g,"+").replace(/_/g,"/")+t,r=atob(n),i=new ArrayBuffer(r.length),o=new Uint8Array(i);for(let s=0;s<r.length;s++)o[s]=r.charCodeAt(s);return i}function In(e){const t=new Uint8Array(e);let n="";for(const o of t)n+=String.fromCharCode(o);return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}var J="copy",Be="convert";function mt(e,t,n){if(t===J)return n;if(t===Be)return e(n);if(t instanceof Array)return n.map(r=>mt(e,t[0],r));if(t instanceof Object){const r={};for(const[i,o]of Object.entries(t)){if(o.derive){const s=o.derive(n);s!==void 0&&(n[i]=s)}if(!(i in n)){if(o.required)throw new Error(`Missing key: ${i}`);continue}if(n[i]==null){r[i]=null;continue}r[i]=mt(e,o.schema,n[i])}return r}}function Qt(e,t){return{required:!0,schema:e,derive:t}}function K(e){return{required:!0,schema:e}}function Q(e){return{required:!1,schema:e}}var Pn={type:K(J),id:K(Be),transports:Q(J)},Mn={appid:Q(J),appidExclude:Q(J),credProps:Q(J)},On={appid:Q(J),appidExclude:Q(J),credProps:Q(J)},Xa={publicKey:K({rp:K(J),user:K({id:K(Be),name:K(J),displayName:K(J)}),challenge:K(Be),pubKeyCredParams:K(J),timeout:Q(J),excludeCredentials:Q([Pn]),authenticatorSelection:Q(J),attestation:Q(J),extensions:Q(Mn)}),signal:Q(J)},Qa={type:K(J),id:K(J),rawId:K(Be),authenticatorAttachment:Q(J),response:K({clientDataJSON:K(Be),attestationObject:K(Be),transports:Qt(J,e=>{var t;return((t=e.getTransports)==null?void 0:t.call(e))||[]})}),clientExtensionResults:Qt(On,e=>e.getClientExtensionResults())},eu={mediation:Q(J),publicKey:K({challenge:K(Be),timeout:Q(J),rpId:Q(J),allowCredentials:Q([Pn]),userVerification:Q(J),extensions:Q(Mn)}),signal:Q(J)},tu={type:K(J),id:K(J),rawId:K(Be),authenticatorAttachment:Q(J),response:K({clientDataJSON:K(Be),authenticatorData:K(Be),signature:K(Be),userHandle:K(Be)}),clientExtensionResults:Qt(On,e=>e.getClientExtensionResults())};function zn(e){return mt(Tn,Xa,e)}function nu(e){return mt(In,Qa,e)}function ru(e){return mt(Tn,eu,e)}function iu(e){return mt(In,tu,e)}async function Rn(e){const t=await navigator.credentials.create(e);return t.toJSON=()=>nu(t),t}async function ou(e){const t=await navigator.credentials.get(e);return t.toJSON=()=>iu(t),t}function en(e){this.message=e}en.prototype=new Error,en.prototype.name="InvalidCharacterError";var Nn=typeof window<"u"&&window.atob&&window.atob.bind(window)||function(e){var t=String(e).replace(/=+$/,"");if(t.length%4==1)throw new en("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,r,i=0,o=0,s="";r=t.charAt(o++);~r&&(n=i%4?64*n+r:r,i++%4)?s+=String.fromCharCode(255&n>>(-2*i&6)):0)r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(r);return s};function su(e){var t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw"Illegal base64url string!"}try{return function(n){return decodeURIComponent(Nn(n).replace(/(.)/g,function(r,i){var o=i.charCodeAt(0).toString(16).toUpperCase();return o.length<2&&(o="0"+o),"%"+o}))}(t)}catch{return Nn(t)}}function jt(e){this.message=e}function au(e,t){if(typeof e!="string")throw new jt("Invalid token specified");var n=(t=t||{}).header===!0?0:1;try{return JSON.parse(su(e.split(".")[n]))}catch(r){throw new jt("Invalid token specified: "+r.message)}}jt.prototype=new Error,jt.prototype.name="InvalidTokenError";const Lt="spartan-token";function tn(){const e=localStorage.getItem(Lt);let t=null;if(e)try{if(t=au(e),t.exp>lu())return t;localStorage.removeItem(Lt)}catch(n){console.error("Error decoding token",n),localStorage.removeItem(Lt)}return null}function uu(){const e=localStorage.getItem(Lt);return e||null}function lu(){return Math.round(new Date().getTime()/1e3)}var lt=(e=>(e[e.Border=-1]="Border",e[e.Data=0]="Data",e[e.Function=1]="Function",e[e.Position=2]="Position",e[e.Timing=3]="Timing",e[e.Alignment=4]="Alignment",e))(lt||{});const cu=[0,1],jn=[1,0],Ln=[2,3],Un=[3,2],du={L:cu,M:jn,Q:Ln,H:Un},hu=/^\d*$/,fu=/^[A-Z0-9 $%*+./:-]*$/,nn="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",rn=1,on=40,qn=3,pu=3,Ut=40,gu=10,Vn=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],Jn=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]];class mu{constructor(t,n,r,i){Pt(this,"size");Pt(this,"mask");Pt(this,"modules",[]);Pt(this,"types",[]);if(this.version=t,this.ecc=n,t<rn||t>on)throw new RangeError("Version value out of range");if(i<-1||i>7)throw new RangeError("Mask value out of range");this.size=t*4+17;const o=Array.from({length:this.size}).fill(!1);for(let l=0;l<this.size;l++)this.modules.push(o.slice()),this.types.push(o.map(()=>0));this.drawFunctionPatterns();const s=this.addEccAndInterleave(r);if(this.drawCodewords(s),i===-1){let l=1e9;for(let m=0;m<8;m++){this.applyMask(m),this.drawFormatBits(m);const y=this.getPenaltyScore();y<l&&(i=m,l=y),this.applyMask(m)}}this.mask=i,this.applyMask(i),this.drawFormatBits(i)}getModule(t,n){return t>=0&&t<this.size&&n>=0&&n<this.size&&this.modules[n][t]}drawFunctionPatterns(){for(let r=0;r<this.size;r++)this.setFunctionModule(6,r,r%2===0,lt.Timing),this.setFunctionModule(r,6,r%2===0,lt.Timing);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);const t=this.getAlignmentPatternPositions(),n=t.length;for(let r=0;r<n;r++)for(let i=0;i<n;i++)r===0&&i===0||r===0&&i===n-1||r===n-1&&i===0||this.drawAlignmentPattern(t[r],t[i]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(t){const n=this.ecc[1]<<3|t;let r=n;for(let o=0;o<10;o++)r=r<<1^(r>>>9)*1335;const i=(n<<10|r)^21522;for(let o=0;o<=5;o++)this.setFunctionModule(8,o,We(i,o));this.setFunctionModule(8,7,We(i,6)),this.setFunctionModule(8,8,We(i,7)),this.setFunctionModule(7,8,We(i,8));for(let o=9;o<15;o++)this.setFunctionModule(14-o,8,We(i,o));for(let o=0;o<8;o++)this.setFunctionModule(this.size-1-o,8,We(i,o));for(let o=8;o<15;o++)this.setFunctionModule(8,this.size-15+o,We(i,o));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let t=this.version;for(let r=0;r<12;r++)t=t<<1^(t>>>11)*7973;const n=this.version<<12|t;for(let r=0;r<18;r++){const i=We(n,r),o=this.size-11+r%3,s=Math.floor(r/3);this.setFunctionModule(o,s,i),this.setFunctionModule(s,o,i)}}drawFinderPattern(t,n){for(let r=-4;r<=4;r++)for(let i=-4;i<=4;i++){const o=Math.max(Math.abs(i),Math.abs(r)),s=t+i,l=n+r;s>=0&&s<this.size&&l>=0&&l<this.size&&this.setFunctionModule(s,l,o!==2&&o!==4,lt.Position)}}drawAlignmentPattern(t,n){for(let r=-2;r<=2;r++)for(let i=-2;i<=2;i++)this.setFunctionModule(t+i,n+r,Math.max(Math.abs(i),Math.abs(r))!==1,lt.Alignment)}setFunctionModule(t,n,r,i=lt.Function){this.modules[n][t]=r,this.types[n][t]=i}addEccAndInterleave(t){const n=this.version,r=this.ecc;if(t.length!==qt(n,r))throw new RangeError("Invalid argument");const i=Jn[r[0]][n],o=Vn[r[0]][n],s=Math.floor(an(n)/8),l=i-s%i,m=Math.floor(s/i),y=[],p=Fu(o);for(let O=0,ee=0;O<i;O++){const fe=t.slice(ee,ee+m-o+(O<l?0:1));ee+=fe.length;const U=$u(fe,p);O<l&&fe.push(0),y.push(fe.concat(U))}const $=[];for(let O=0;O<y[0].length;O++)y.forEach((ee,fe)=>{(O!==m-o||fe>=l)&&$.push(ee[O])});return $}drawCodewords(t){if(t.length!==Math.floor(an(this.version)/8))throw new RangeError("Invalid argument");let n=0;for(let r=this.size-1;r>=1;r-=2){r===6&&(r=5);for(let i=0;i<this.size;i++)for(let o=0;o<2;o++){const s=r-o,m=(r+1&2)===0?this.size-1-i:i;!this.types[m][s]&&n<t.length*8&&(this.modules[m][s]=We(t[n>>>3],7-(n&7)),n++)}}}applyMask(t){if(t<0||t>7)throw new RangeError("Mask value out of range");for(let n=0;n<this.size;n++)for(let r=0;r<this.size;r++){let i;switch(t){case 0:i=(r+n)%2===0;break;case 1:i=n%2===0;break;case 2:i=r%3===0;break;case 3:i=(r+n)%3===0;break;case 4:i=(Math.floor(r/3)+Math.floor(n/2))%2===0;break;case 5:i=r*n%2+r*n%3===0;break;case 6:i=(r*n%2+r*n%3)%2===0;break;case 7:i=((r+n)%2+r*n%3)%2===0;break;default:throw new Error("Unreachable")}!this.types[n][r]&&i&&(this.modules[n][r]=!this.modules[n][r])}}getPenaltyScore(){let t=0;for(let o=0;o<this.size;o++){let s=!1,l=0;const m=[0,0,0,0,0,0,0];for(let y=0;y<this.size;y++)this.modules[o][y]===s?(l++,l===5?t+=qn:l>5&&t++):(this.finderPenaltyAddHistory(l,m),s||(t+=this.finderPenaltyCountPatterns(m)*Ut),s=this.modules[o][y],l=1);t+=this.finderPenaltyTerminateAndCount(s,l,m)*Ut}for(let o=0;o<this.size;o++){let s=!1,l=0;const m=[0,0,0,0,0,0,0];for(let y=0;y<this.size;y++)this.modules[y][o]===s?(l++,l===5?t+=qn:l>5&&t++):(this.finderPenaltyAddHistory(l,m),s||(t+=this.finderPenaltyCountPatterns(m)*Ut),s=this.modules[y][o],l=1);t+=this.finderPenaltyTerminateAndCount(s,l,m)*Ut}for(let o=0;o<this.size-1;o++)for(let s=0;s<this.size-1;s++){const l=this.modules[o][s];l===this.modules[o][s+1]&&l===this.modules[o+1][s]&&l===this.modules[o+1][s+1]&&(t+=pu)}let n=0;for(const o of this.modules)n=o.reduce((s,l)=>s+(l?1:0),n);const r=this.size*this.size,i=Math.ceil(Math.abs(n*20-r*10)/r)-1;return t+=i*gu,t}getAlignmentPatternPositions(){if(this.version===1)return[];{const t=Math.floor(this.version/7)+2,n=this.version===32?26:Math.ceil((this.version*4+4)/(t*2-2))*2,r=[6];for(let i=this.size-7;r.length<t;i-=n)r.splice(1,0,i);return r}}finderPenaltyCountPatterns(t){const n=t[1],r=n>0&&t[2]===n&&t[3]===n*3&&t[4]===n&&t[5]===n;return(r&&t[0]>=n*4&&t[6]>=n?1:0)+(r&&t[6]>=n*4&&t[0]>=n?1:0)}finderPenaltyTerminateAndCount(t,n,r){return t&&(this.finderPenaltyAddHistory(n,r),n=0),n+=this.size,this.finderPenaltyAddHistory(n,r),this.finderPenaltyCountPatterns(r)}finderPenaltyAddHistory(t,n){n[0]===0&&(t+=this.size),n.pop(),n.unshift(t)}}function He(e,t,n){if(t<0||t>31||e>>>t)throw new RangeError("Value out of range");for(let r=t-1;r>=0;r--)n.push(e>>>r&1)}function We(e,t){return(e>>>t&1)!==0}class sn{constructor(t,n,r){if(this.mode=t,this.numChars=n,this.bitData=r,n<0)throw new RangeError("Invalid argument");this.bitData=r.slice()}getData(){return this.bitData.slice()}}const Du=[1,10,12,14],vu=[2,9,11,13],bu=[4,8,16,16];function Gn(e,t){return e[Math.floor((t+7)/17)+1]}function Kn(e){const t=[];for(const n of e)He(n,8,t);return new sn(bu,e.length,t)}function Cu(e){if(!Hn(e))throw new RangeError("String contains non-numeric characters");const t=[];for(let n=0;n<e.length;){const r=Math.min(e.length-n,3);He(Number.parseInt(e.substring(n,n+r),10),r*3+1,t),n+=r}return new sn(Du,e.length,t)}function wu(e){if(!Wn(e))throw new RangeError("String contains unencodable characters in alphanumeric mode");const t=[];let n;for(n=0;n+2<=e.length;n+=2){let r=nn.indexOf(e.charAt(n))*45;r+=nn.indexOf(e.charAt(n+1)),He(r,11,t)}return n<e.length&&He(nn.indexOf(e.charAt(n)),6,t),new sn(vu,e.length,t)}function yu(e){return e===""?[]:Hn(e)?[Cu(e)]:Wn(e)?[wu(e)]:[Kn(Eu(e))]}function Hn(e){return hu.test(e)}function Wn(e){return fu.test(e)}function Au(e,t){let n=0;for(const r of e){const i=Gn(r.mode,t);if(r.numChars>=1<<i)return Number.POSITIVE_INFINITY;n+=4+i+r.bitData.length}return n}function Eu(e){e=encodeURI(e);const t=[];for(let n=0;n<e.length;n++)e.charAt(n)!=="%"?t.push(e.charCodeAt(n)):(t.push(Number.parseInt(e.substring(n+1,n+3),16)),n+=2);return t}function an(e){if(e<rn||e>on)throw new RangeError("Version number out of range");let t=(16*e+128)*e+64;if(e>=2){const n=Math.floor(e/7)+2;t-=(25*n-10)*n-55,e>=7&&(t-=36)}return t}function qt(e,t){return Math.floor(an(e)/8)-Vn[t[0]][e]*Jn[t[0]][e]}function Fu(e){if(e<1||e>255)throw new RangeError("Degree out of range");const t=[];for(let r=0;r<e-1;r++)t.push(0);t.push(1);let n=1;for(let r=0;r<e;r++){for(let i=0;i<t.length;i++)t[i]=un(t[i],n),i+1<t.length&&(t[i]^=t[i+1]);n=un(n,2)}return t}function $u(e,t){const n=t.map(r=>0);for(const r of e){const i=r^n.shift();n.push(0),t.forEach((o,s)=>n[s]^=un(o,i))}return n}function un(e,t){if(e>>>8||t>>>8)throw new RangeError("Byte out of range");let n=0;for(let r=7;r>=0;r--)n=n<<1^(n>>>7)*285,n^=(t>>>r&1)*e;return n}function ku(e,t,n=1,r=40,i=-1,o=!0){if(!(rn<=n&&n<=r&&r<=on)||i<-1||i>7)throw new RangeError("Invalid value");let s,l;for(s=n;;s++){const $=qt(s,t)*8,O=Au(e,s);if(O<=$){l=O;break}if(s>=r)throw new RangeError("Data too long")}for(const $ of[jn,Ln,Un])o&&l<=qt(s,$)*8&&(t=$);const m=[];for(const $ of e){He($.mode[0],4,m),He($.numChars,Gn($.mode,s),m);for(const O of $.getData())m.push(O)}const y=qt(s,t)*8;He(0,Math.min(4,y-m.length),m),He(0,(8-m.length%8)%8,m);for(let $=236;m.length<y;$^=253)He($,8,m);const p=Array.from({length:Math.ceil(m.length/8)},()=>0);return m.forEach(($,O)=>p[O>>>3]|=$<<7-(O&7)),new mu(s,t,p,i)}function xu(e,t){var $;const{ecc:n="L",boostEcc:r=!1,minVersion:i=1,maxVersion:o=40,maskPattern:s=-1,border:l=1}=t||{},m=typeof e=="string"?yu(e):Array.isArray(e)?[Kn(e)]:void 0;if(!m)throw new Error(`uqr only supports encoding string and binary data, but got: ${typeof e}`);const y=ku(m,du[n],i,o,s,r),p=Bu({version:y.version,maskPattern:y.mask,size:y.size,data:y.modules,types:y.types},l);return t!=null&&t.invert&&(p.data=p.data.map(O=>O.map(ee=>!ee))),($=t==null?void 0:t.onEncoded)==null||$.call(t,p),p}function Bu(e,t=1){if(!t)return e;const{size:n}=e,r=n+t*2;e.size=r,e.data.forEach(o=>{for(let s=0;s<t;s++)o.unshift(!1),o.push(!1)});for(let o=0;o<t;o++)e.data.unshift(Array.from({length:r},s=>!1)),e.data.push(Array.from({length:r},s=>!1));const i=lt.Border;e.types.forEach(o=>{for(let s=0;s<t;s++)o.unshift(i),o.push(i)});for(let o=0;o<t;o++)e.types.unshift(Array.from({length:r},s=>i)),e.types.push(Array.from({length:r},s=>i));return e}function Yn(e){return e.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")}function _u(e,t={}){const n=xu(e,t),{pixelSize:r=10,whiteColor:i="white",blackColor:o="black"}=t,s=n.size*r,l=n.size*r;let m=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${l} ${s}">`;const y=[];for(let p=0;p<n.size;p++)for(let $=0;$<n.size;$++){const O=$*r,ee=p*r;n.data[p][$]&&y.push(`M${O},${ee}h${r}v${r}h-${r}z`)}return m+=`<rect fill="${Yn(i)}" width="${l}" height="${s}"/>`,m+=`<path fill="${Yn(o)}" d="${y.join("")}"/>`,m+="</svg>",m}function Zn(e){if(!e)return"";try{return _u(e,{ecc:"M",border:2,pixelSize:4})}catch{return""}}var Su=b(`<div class=widget-root><form class=login-frame><style>.widget-root {
|
|
2
2
|
display: block;
|
|
3
3
|
position: relative;
|
|
4
4
|
}
|
|
@@ -144,7 +144,35 @@
|
|
|
144
144
|
margin-bottom: 0;
|
|
145
145
|
display: block;
|
|
146
146
|
}
|
|
147
|
-
</style><style></style><h1>`),nu=v("<span class=error-message>"),gt=v("<span>"),ru=v("<input type=text autocomplete=one-time-code required>"),Kt=v("<span class=hint>"),iu=v("<input type=password autocomplete=new-password required>"),Ht=v("<button type=submit>"),su=v("<span class=info-message>"),au=v("<span class=success-message>"),uu=v("<input type=text autocomplete=username>"),ou=v("<input type=password autocomplete=current-password>"),Dt=v("<p>"),lu=v("<select>"),cu=v("<option> (<!>)"),du=v("<input type=text>"),Wt=v("<input type=text autocomplete=one-time-code>"),Zt=v("<input type=password autocomplete=new-password>"),hu=v("<span class=checkbox-wrapper><input type=checkbox><span> "),fu=v("<button type=button>"),nt=v("<a class=centered-text href=#>"),pu=v("<div class=social-divider><span>"),gu=v("<button type=button class=social-btn>"),Du=v('<svg width=18 height=18 viewBox="0 0 18 18"xmlns=http://www.w3.org/2000/svg><path d="M17.64 9.2c0-.637-.057-1.251-.164-1.84H9v3.481h4.844c-.209 1.125-.843 2.078-1.796 2.717v2.258h2.908c1.702-1.567 2.684-3.875 2.684-6.615z"fill=#4285F4></path><path d="M9 18c2.43 0 4.467-.806 5.956-2.184l-2.908-2.258c-.806.54-1.837.86-3.048.86-2.344 0-4.328-1.584-5.036-3.711H.957v2.332C2.438 15.983 5.482 18 9 18z"fill=#34A853></path><path d="M3.964 10.707c-.18-.54-.282-1.117-.282-1.707s.102-1.167.282-1.707V4.961H.957C.347 6.175 0 7.548 0 9s.348 2.825.957 4.039l3.007-2.332z"fill=#FBBC05></path><path d="M9 3.58c1.321 0 2.508.454 3.44 1.345l2.582-2.58C13.463.891 11.426 0 9 0 5.482 0 2.438 2.017.957 4.961L3.964 7.293C4.672 5.166 6.656 3.58 9 3.58z"fill=#EA4335>'),mu=v('<svg width=18 height=18 viewBox="0 0 16 16"xmlns=http://www.w3.org/2000/svg><path fill-rule=evenodd d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"fill=currentColor>'),bu=v('<svg width=18 height=18 viewBox="20 16 16 19"xmlns=http://www.w3.org/2000/svg><path d="M28.2226562,20.3846154 C29.0546875,20.3846154 30.0976562,19.8048315 30.71875,19.0317864 C31.28125,18.3312142 31.6914062,17.352829 31.6914062,16.3744437 C31.6914062,16.2415766 31.6796875,16.1087095 31.65625,16 C30.7304687,16.0362365 29.6171875,16.640178 28.9492187,17.4494596 C28.421875,18.06548 27.9414062,19.0317864 27.9414062,20.0222505 C27.9414062,20.1671964 27.9648438,20.3121424 27.9765625,20.3604577 C28.0351562,20.3725366 28.1289062,20.3846154 28.2226562,20.3846154 Z M25.2929688,35 C26.4296875,35 26.9335938,34.214876 28.3515625,34.214876 C29.7929688,34.214876 30.109375,34.9758423 31.375,34.9758423 C32.6171875,34.9758423 33.4492188,33.792117 34.234375,32.6325493 C35.1132812,31.3038779 35.4765625,29.9993643 35.5,29.9389701 C35.4179688,29.9148125 33.0390625,28.9122695 33.0390625,26.0979021 C33.0390625,23.6579784 34.9140625,22.5588048 35.0195312,22.474253 C33.7773438,20.6382708 31.890625,20.5899555 31.375,20.5899555 C29.9804688,20.5899555 28.84375,21.4596313 28.1289062,21.4596313 C27.3554688,21.4596313 26.3359375,20.6382708 25.1289062,20.6382708 C22.8320312,20.6382708 20.5,22.5950413 20.5,26.2911634 C20.5,28.5861411 21.3671875,31.013986 22.4335938,32.5842339 C23.3476562,33.9129053 24.1445312,35 25.2929688,35 Z"fill=currentColor fill-rule=nonzero>'),vu=v('<svg width=18 height=18 viewBox="0 0 24 24"xmlns=http://www.w3.org/2000/svg><path d="M12 1L3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4zm0 4a3 3 0 110 6 3 3 0 010-6zm0 14c-2.5 0-4.71-1.28-6-3.22.03-1.99 4-3.08 6-3.08s5.97 1.09 6 3.08c-1.29 1.94-3.5 3.22-6 3.22z"fill=currentColor>'),Cu=v("<div class=loading-overlay part=loading-overlay><slot name=loading>");dt("spartan-login",{domain:"http://127.0.0.1:11000",sector:"0ad5c3e5-0186-4557-8b32-4b36f247bf09",startMode:"password",styles:"",locale:"en",redirect:"",hideSocial:!1},e=>{const[t,n]=w((e.startMode||"password").toLowerCase()),[r,i]=w(""),[s,u]=w(""),[o,A]=w(""),[k,g]=w(""),[q]=w(e.redirect),[Ae,we]=w(!1),[$e,S]=w(!1),[re,oe]=w(!1),[ke,Fe]=w(""),[xe,B]=w(""),[le,W]=w([]),[me,Y]=w(""),[ie,se]=w([]),[ce,be]=w(""),[b,$]=w(!1),[I,z]=w(!1),[te,Te]=w(""),[Oe,Me]=w(""),[Ne,je]=w(""),[qe,Ee]=w(""),[Ie,Pe]=w(""),[E,C]=w(""),[x,U]=w(!1),h=ht(e.locale);let T,M=null,R;const J=()=>b()||!!ce();rn(()=>{M&&clearTimeout(M)});try{R=e.styles}catch{R=""}console.log(R),at(async()=>{const l=new URLSearchParams(window.location.search);if(l.get("error")){history.replaceState({},"",window.location.pathname);const ve=l.get("error_description");g(ve||h.i18n("sa-social-error")),V(),L();return}const F=l.get("code");if(F){history.replaceState({},"",window.location.pathname),$(!0);try{const ve=await fetch(`${e.domain}/api/v1/oauth/exchange`,{method:"POST",mode:"cors",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify({code:F})});if(!ve.ok)throw new Error(h.i18n("sa-social-error"));const X=await ve.json();localStorage.setItem("spartan-token",X.token);const a=T.getRootNode().host;e.redirect!==""?(a.dispatchEvent(new CustomEvent("spartan-login",{bubbles:!0,cancelable:!0,detail:{token:X.token}})),window.location.href=e.redirect):(M=setTimeout(()=>{M=null,$(!1),V(),L()},5e3),a.dispatchEvent(new CustomEvent("spartan-login",{bubbles:!0,cancelable:!0,detail:{token:X.token}})))}catch(ve){g(ve.message||h.i18n("sa-social-error")),$(!1),V(),L()}return}const he=l.get("sub");if(he){je(he);const ve=l.get("email");ve&&Ee(ve);const a=new URLSearchParams(window.location.hash.replace(/^#/,"")).get("otp");a&&Pe(a),n("invite");return}if(Gt()&&e.redirect!==""&&window.location.pathname!==e.redirect){window.location.href=e.redirect;return}V(),L()});function V(){fetch(`${e.domain}/api/v1/sectors/${e.sector}/publicsettings`,{method:"GET",mode:"cors",cache:"no-cache",headers:{"Content-Type":"application/json"}}).then(l=>{if(l.ok)return l.json();throw new Error("Network response was not ok.")}).then(l=>{console.log(l),we(l.SelfSignUpAllowed),z(l.MFARequired||!1)}).catch(l=>{console.log(l),g(l.message)})}function L(){e.hideSocial||fetch(`${e.domain}/api/v1/sectors/${e.sector}/oauth/providers`,{method:"GET",mode:"cors",cache:"no-cache"}).then(l=>{if(l.ok)return l.json();throw new Error("Failed to load social providers")}).then(l=>{const D=(l.providers||[]).filter(F=>F.enabled);se(D)}).catch(()=>{})}function G(l){if(ce())return;be(l),g("");const D=window.location.origin+window.location.pathname;fetch(`${e.domain}/api/v1/oauth/${l}/initiate`,{method:"POST",mode:"cors",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify({sectorID:e.sector,redirectURI:D})}).then(F=>{if(F.ok)return F.json();throw new Error(h.i18n("sa-social-error"))}).then(F=>{window.location.href=F.authURL}).catch(F=>{be(""),g(F.message)})}function Z(l,D){return g(""),Me(D),fetch(`${e.domain}/api/v1/signup/mfa/begin`,{method:"POST",mode:"cors",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:l,sectorID:e.sector,transactionId:D})}).then(F=>{if(!F.ok)throw new Error(h.i18n("sa-signup-verify-error"))}).then(()=>{n("signup-verify")}).catch(F=>{g(F.message)})}function pe(){return g(""),fetch(`${e.domain}/api/v1/signup/mfa/verify`,{method:"POST",mode:"cors",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:r(),code:o().toUpperCase().trim(),sectorID:e.sector,transactionId:Oe()})}).then(l=>{if(l.ok)return l.json();throw l.status===400?new Error(h.i18n("sa-signup-verify-error")):new Error(h.i18n("sa-signup-verify-error"))}).then(l=>{Te(l.token),localStorage.setItem("spartan-token",l.token),T.getRootNode().host.dispatchEvent(new CustomEvent("spartan-login",{bubbles:!0,cancelable:!0,detail:{token:l.token}})),A(""),n("signup-webauthn")}).catch(l=>{g(l.message)})}function K(){b()||($(!0),g(""),fetch(`${e.domain}/api/v1/webauthn/registration/begin`,{method:"POST",mode:"cors",cache:"no-cache",headers:{"Content-Type":"application/json",Authorization:`bearer ${te()}`},body:JSON.stringify({keyName:"Default",sectorID:e.sector})}).then(l=>{if(!l.ok)throw new Error(h.i18n("sa-signup-webauthn-error"));return l.json()}).then(l=>{const D=qt(l.Options);return Jt(D).then(F=>{let he=JSON.parse(JSON.stringify(F));return he.transactionID=l.TransactionID,he})}).then(l=>fetch(`${e.domain}/api/v1/webauthn/registration/finish`,{method:"POST",mode:"cors",cache:"no-cache",headers:{"Content-Type":"application/json",Authorization:`bearer ${te()}`},body:JSON.stringify(l)})).then(l=>{if(!l.ok)throw new Error(h.i18n("sa-signup-webauthn-error"));c()}).catch(l=>{g((l==null?void 0:l.message)||String(l))}).finally(()=>{$(!1)}))}function c(){n(e.startMode),e.redirect!==""&&(window.location.href=e.redirect)}function m(){return console.log("login"),g(""),t()==="password"?ne():t()==="webauthn"?_():t()==="otp-pick"?ge(me()):t()==="otp"?_e():t()==="reset-email"?mt():t()==="reset-code"?bt():Promise.resolve()}function P(){return console.log("signup"),g(""),S(!1),fetch(`${e.domain}/api/v1/users`,{method:"POST",mode:"cors",cache:"no-cache",body:JSON.stringify({username:r(),password:s(),sectorID:e.sector})}).then(l=>{if(l.ok)return l.json();throw new Error(h.i18n("sa-error-creating-user"))}).then(l=>{if(console.log(l),I())return Z(r(),l.enrollmentTransactionId||"");S(!0),n(e.startMode)}).catch(l=>{S(!1),g(l.message),console.log(l)})}function _(){return console.log("webauthnLogin"),fetch(`${e.domain}/api/v1/login/webauthn/begin`,{method:"POST",mode:"cors",cache:"no-cache",body:JSON.stringify({username:r(),sectorID:e.sector})}).then(l=>{if(l.ok)return l.json();throw l.status===401?(n("password"),g(h.i18n("webauthn-not-enrolled")),new Error(h.i18n("webauthn-not-enrolled"))):new Error(`${l.status} ${l.statusText}: Network response was not ok.`)}).then(l=>{console.log(l);const D=Ha(l.CredentialAssertion);return console.log("Parsed WebAuthn request options:",D),Za(D).then(F=>{const he=JSON.stringify(F);let ze=JSON.parse(he);return ze.transactionID=l.TransactionID,ze})}).then(l=>fetch(`${e.domain}/api/v1/login/webauthn/finish`,{method:"POST",mode:"cors",cache:"no-cache",body:JSON.stringify(l)})).then(ae).catch(l=>{g(l.message),console.log(l)})}function ne(){return console.log("password login"),fetch(e.domain+"/api/v1/login/password",{method:"post",mode:"cors",cache:"no-cache",body:JSON.stringify({username:r(),password:s(),sectorID:e.sector})}).then(ae)}function ae(l){return Promise.resolve(l).then(D=>{if(D.ok)return D.json();throw D}).then(D=>{if(console.log(D),localStorage.setItem("spartan-txid",D.transactionID),!D.token){if(D.challengeType==="email_enrollment")return Z(r(),D.transactionID||"");if(D.challengeType.indexOf("otp")!==-1)return de();D.challengeType.indexOf("webauthn")!==-1?(n("webauthn"),g(h.i18n("sa-webauthn-required"))):g(h.i18n("sa-unknown-challenge"));return}localStorage.setItem("spartan-token",D.token);const F=new CustomEvent("spartan-login",{bubbles:!0,cancelable:!0,detail:{token:D.token,transactionID:D.transactionID}});T.getRootNode().host.dispatchEvent(F),q()!==""&&(window.location.href=q())}).catch(D=>D.json().then(F=>{console.log(F.message),g(F.message)}).catch(F=>{console.log(F)}))}function de(){const l=localStorage.getItem("spartan-txid")||"";return fetch(e.domain+`/api/v1/otp/${encodeURIComponent(r())}?transactionID=${encodeURIComponent(l)}§orID=${encodeURIComponent(e.sector)}`,{method:"get",mode:"cors",cache:"no-cache"}).then(D=>{if(D.ok)return D.json();throw new Error(h.i18n("error-otp-list"))}).then(D=>{const F=D.registrations||[];if(F.length===0){g(h.i18n("sa-otp-no-registrations"));return}if(F.length===1)return ge(F[0].ID||"");W(F),Y(F[0].ID||""),n("otp-pick"),g("")}).catch(D=>{g(D.message),console.log(D)})}function ge(l){return console.log("begin OTP, registrationID:",l),fetch(e.domain+"/api/v1/login/otp/begin",{method:"post",mode:"cors",cache:"no-cache",body:JSON.stringify({username:r(),transactionID:localStorage.getItem("spartan-txid"),registrationID:l,sectorID:e.sector})}).then(D=>{if(D.ok)return D.json();throw new Error(`${D.status} ${D.statusText}`)}).then(D=>{console.log(D),D.transactionID&&localStorage.setItem("spartan-txid",D.transactionID),A(""),g(""),n("otp")}).catch(D=>{g(D.message),console.log(D)})}function _e(){return console.log("OTP login submit"),fetch(e.domain+"/api/v1/login/otp",{method:"post",mode:"cors",cache:"no-cache",body:JSON.stringify({username:r(),password:o(),transactionID:localStorage.getItem("spartan-txid"),sectorID:e.sector})}).then(ae)}function mt(){return console.log("begin password reset"),g(""),oe(!1),fetch(`${e.domain}/api/v1/password/reset/begin`,{method:"POST",mode:"cors",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:r(),sectorID:e.sector})}).then(l=>{if(l.ok)return l.json();throw new Error(h.i18n("sa-reset-error"))}).then(l=>{console.log(l),g(h.i18n("sa-reset-email-sent")),Fe(""),B(""),n("reset-code")}).catch(l=>{g(l.message),console.log(l)})}function bt(){return console.log("complete password reset"),g(""),fetch(`${e.domain}/api/v1/password/reset/complete`,{method:"POST",mode:"cors",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:r(),code:ke().toUpperCase().trim(),newPassword:xe(),sectorID:e.sector})}).then(l=>{if(l.ok)return l.json();throw l.status===400?new Error(h.i18n("sa-reset-error-code")):new Error(h.i18n("sa-reset-error"))}).then(l=>{console.log(l),oe(!0),Fe(""),B(""),u(""),n(e.startMode)}).catch(l=>{g(l.message),console.log(l)})}async function rt(){if(g(""),!Ie()||Ie().trim().length===0){g(h.i18n("sa-invite-error-otp"));return}if(!E()||E().length<8){g("Password must be at least 8 characters");return}const l=Ne();if(!l){g("Missing invitation information");return}const D=await fetch(`${e.domain}/api/v1/users/invite/complete`,{method:"POST",mode:"cors",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify({sub:l,otp:Ie().toUpperCase().trim(),password:E(),sectorID:e.sector})}).catch(()=>null);if(!D){g(h.i18n("sa-invite-error-generic"));return}if(D.ok){history.replaceState({},"",window.location.pathname);const F=await D.json().catch(()=>({})),he=T.getRootNode().host;F.token?(localStorage.setItem("spartan-token",F.token),he.dispatchEvent(new CustomEvent("spartan-login",{bubbles:!0,cancelable:!0,detail:{token:F.token}})),q()!==""?window.location.href=q():e.redirect!==""?window.location.href=e.redirect:(U(!1),je(""),Ee(""),Pe(""),C(""),n(e.startMode),V(),L())):(U(!0),he.dispatchEvent(new CustomEvent("spartan-invite-complete",{bubbles:!0,cancelable:!0,detail:{sub:l,success:!0}})),setTimeout(()=>{q()!==""?window.location.href=q():e.redirect!==""?window.location.href=e.redirect:(U(!1),je(""),Ee(""),Pe(""),C(""),n(e.startMode),V(),L())},2e3))}else{const F=await D.json().catch(()=>({}));D.status===400||String(F.message).includes("invalid OTP")?g(h.i18n("sa-invite-error-otp")):D.status===504||String(F.message).includes("expired")?g(h.i18n("sa-invite-error-expired")):g(F.message||h.i18n("sa-invite-error-generic"))}}return(()=>{var l=tu(),D=l.firstChild,F=D.firstChild,he=F.nextSibling,ze=he.nextSibling,ve=T;return typeof ve=="function"?kt(ve,D):T=D,D.addEventListener("submit",X=>{if(X.preventDefault(),b())return;$(!0),(t()==="sign-up"?P():t()==="signup-verify"?pe():t()==="invite"?Promise.resolve(rt()):m()).finally(()=>$(!1))}),d(he,R),d(ze,(()=>{var X=f(()=>t()==="reset-email"||t()==="reset-code");return()=>X()?h.i18n("sa-reset-password"):f(()=>t()==="signup-verify"||t()==="signup-webauthn")()?h.i18n("sa-signup-mfa-title"):f(()=>t()==="invite")()?h.i18n("sa-complete-invite"):h.i18n("sa-login")})()),d(D,k&&(()=>{var X=nu();return d(X,k),X})(),null),d(D,(()=>{var X=f(()=>!!$e());return()=>X()&&(()=>{var a=gt();return d(a,()=>h.i18n("sa-signup-complete")),a})()})(),null),d(D,(()=>{var X=f(()=>!!re());return()=>X()&&(()=>{var a=gt();return d(a,()=>h.i18n("sa-reset-success")),a})()})(),null),d(D,(()=>{var X=f(()=>t()==="invite");return()=>X()&&[f(()=>f(()=>!!qe())()&&(()=>{var a=su();return d(a,qe),a})()),f(()=>f(()=>!!x())()&&(()=>{var a=au();return d(a,()=>h.i18n("sa-invite-success")),a})()),(()=>{var a=ru();return a.$$input=p=>Pe(p.currentTarget.value),y(p=>{var N=h.i18n("sa-invite-otp"),ye=b()||x();return N!==p.e&&fe(a,"placeholder",p.e=N),ye!==p.t&&(a.disabled=p.t=ye),p},{e:void 0,t:void 0}),y(()=>a.value=Ie()),a})(),(()=>{var a=Kt();return d(a,()=>h.i18n("sa-invite-otp-hint")),a})(),(()=>{var a=iu();return a.$$input=p=>C(p.currentTarget.value),y(p=>{var N=h.i18n("sa-invite-password"),ye=b()||x();return N!==p.e&&fe(a,"placeholder",p.e=N),ye!==p.t&&(a.disabled=p.t=ye),p},{e:void 0,t:void 0}),y(()=>a.value=E()),a})(),(()=>{var a=Kt();return d(a,()=>h.i18n("sa-invite-password-hint")),a})(),(()=>{var a=Ht();return d(a,(()=>{var p=f(()=>!!b());return()=>p()?h.i18n("sa-invite-completing"):h.i18n("sa-invite-submit")})()),y(()=>a.disabled=b()||x()),a})()]})(),null),d(D,(()=>{var X=f(()=>t()!=="invite");return()=>X()&&[(()=>{var a=uu();return a.addEventListener("change",p=>i(p.currentTarget.value)),a.$$input=p=>i(p.currentTarget.value),y(p=>{var N=h.i18n("sa-username"),ye=t()==="otp"||t()==="otp-pick"||t()==="reset-code"||t()==="signup-verify"||t()==="signup-webauthn";return N!==p.e&&fe(a,"placeholder",p.e=N),ye!==p.t&&(a.disabled=p.t=ye),p},{e:void 0,t:void 0}),y(()=>a.value=r()),a})(),f(()=>f(()=>t()!=="sign-up"&&t()!=="signup-verify"&&t()!=="signup-webauthn")()&&[f(()=>f(()=>t()==="password")()&&(()=>{var a=ou();return a.addEventListener("change",p=>u(p.currentTarget.value)),a.$$input=p=>u(p.currentTarget.value),y(()=>fe(a,"placeholder",h.i18n("sa-password"))),y(()=>a.value=s()),a})()),f(()=>f(()=>t()==="webauthn")()&>()),f(()=>f(()=>t()==="otp-pick")()&&[(()=>{var a=Dt();return d(a,()=>h.i18n("sa-otp-choose")),a})(),(()=>{var a=lu();return a.addEventListener("change",p=>Y(p.currentTarget.value)),d(a,()=>le().map(p=>(()=>{var N=cu(),ye=N.firstChild,Qt=ye.nextSibling;return Qt.nextSibling,d(N,()=>p.DisplayName||p.ID,ye),d(N,()=>p.Type,Qt),y(()=>N.value=p.ID),N})())),y(()=>a.value=me()),a})()]),f(()=>f(()=>t()==="otp")()&&(()=>{var a=du();return a.$$input=p=>A(p.currentTarget.value),y(()=>fe(a,"placeholder",h.i18n("sa-code"))),y(()=>a.value=o()),a})()),f(()=>f(()=>t()==="reset-code")()&&[(()=>{var a=Wt();return a.$$input=p=>Fe(p.currentTarget.value),y(()=>fe(a,"placeholder",h.i18n("sa-reset-code"))),y(()=>a.value=ke()),a})(),(()=>{var a=Zt();return a.$$input=p=>B(p.currentTarget.value),y(()=>fe(a,"placeholder",h.i18n("sa-new-password"))),y(()=>a.value=xe()),a})()]),f(()=>f(()=>t()==="password"||t()==="webauthn")()&&(()=>{var a=hu(),p=a.firstChild,N=p.nextSibling;return N.firstChild,a.$$click=()=>n(t()==="password"?"webauthn":"password"),d(N,()=>h.i18n("sa-use-password"),null),y(()=>p.checked=t()==="password"),a})())]),f(()=>f(()=>t()==="sign-up")()&&(()=>{var a=Zt();return a.addEventListener("change",p=>u(p.currentTarget.value)),a.$$input=p=>u(p.currentTarget.value),y(()=>fe(a,"placeholder",h.i18n("sa-password"))),y(()=>a.value=s()),a})()),f(()=>f(()=>t()==="signup-verify")()&&[(()=>{var a=Dt();return d(a,()=>h.i18n("sa-signup-verify-prompt")),a})(),(()=>{var a=Wt();return a.$$input=p=>A(p.currentTarget.value),y(()=>fe(a,"placeholder",h.i18n("sa-code"))),y(()=>a.value=o()),a})()]),f(()=>f(()=>t()==="signup-webauthn")()&&(()=>{var a=Dt();return d(a,()=>h.i18n("sa-signup-webauthn-prompt")),a})()),f(()=>f(()=>t()!=="signup-webauthn")()&&(()=>{var a=Ht();return d(a,(()=>{var p=f(()=>!!b());return()=>p()?h.i18n("sa-loading"):f(()=>t()==="sign-up")()?h.i18n("sa-signup"):f(()=>t()==="otp-pick")()?h.i18n("sa-otp-send-code"):f(()=>t()==="otp")()?h.i18n("sa-otp-verify"):f(()=>t()==="reset-email")()?h.i18n("sa-otp-send-code"):f(()=>t()==="reset-code")()?h.i18n("sa-reset-submit"):f(()=>t()==="signup-verify")()?h.i18n("sa-otp-verify"):h.i18n("sa-login")})()),y(()=>a.disabled=b()),a})()),f(()=>f(()=>t()==="signup-webauthn")()&&[(()=>{var a=fu();return a.$$click=()=>K(),d(a,(()=>{var p=f(()=>!!b());return()=>p()?h.i18n("sa-loading"):h.i18n("sa-signup-webauthn-setup")})()),y(()=>a.disabled=b()),a})(),(()=>{var a=nt();return a.$$click=()=>c(),d(a,()=>h.i18n("sa-signup-webauthn-done")),a})()]),f(()=>f(()=>t()==="password")()&&(()=>{var a=nt();return a.$$click=()=>{g(""),oe(!1),n("reset-email")},d(a,()=>h.i18n("sa-forgot-password")),a})()),f(()=>f(()=>t()==="reset-email"||t()==="reset-code")()&&(()=>{var a=nt();return a.$$click=()=>{g(""),Fe(""),B(""),n(e.startMode)},d(a,()=>h.i18n("sa-back")),a})()),f(()=>f(()=>!!(Ae()&&t()!=="reset-email"&&t()!=="reset-code"&&t()!=="signup-verify"&&t()!=="signup-webauthn"))()&&(()=>{var a=nt();return a.$$click=()=>t()==="sign-up"?n(e.startMode):n("sign-up"),d(a,(()=>{var p=f(()=>t()==="sign-up");return()=>p()?h.i18n("sa-back"):h.i18n("sa-signup")})()),a})()),f(()=>f(()=>!e.hideSocial&&ie().length>0&&(t()==="password"||t()==="webauthn"||t()==="sign-up"))()&&[(()=>{var a=pu(),p=a.firstChild;return d(p,()=>h.i18n("sa-or")),a})(),f(()=>ie().map(a=>(()=>{var p=gu();return p.$$click=()=>G(a.provider),d(p,(()=>{var N=f(()=>a.provider==="google");return()=>N()&&Du()})(),null),d(p,(()=>{var N=f(()=>a.provider==="github");return()=>N()&&mu()})(),null),d(p,(()=>{var N=f(()=>a.provider==="apple");return()=>N()&&bu()})(),null),d(p,(()=>{var N=f(()=>a.provider==="oidc");return()=>N()&&vu()})(),null),d(p,(()=>{var N=f(()=>a.provider==="google");return()=>N()?h.i18n("sa-social-google"):f(()=>a.provider==="github")()?h.i18n("sa-social-github"):f(()=>a.provider==="apple")()?h.i18n("sa-social-apple"):h.i18n("sa-social-oidc")})(),null),y(()=>p.disabled=!!ce()||b()),p})()))])]})(),null),d(l,(()=>{var X=f(()=>!!J());return()=>X()&&(()=>{var a=Cu(),p=a.firstChild;return p._$owner=sn(),d(p,()=>h.i18n("sa-loading")),a})()})(),null),l})()}),ot(["input","click"]);var wu=v(`<div class=container><style>.container {
|
|
147
|
+
|
|
148
|
+
.login-frame .qr {
|
|
149
|
+
display: flex;
|
|
150
|
+
justify-content: center;
|
|
151
|
+
margin-top: 16px;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.login-frame .qr svg {
|
|
155
|
+
width: 180px;
|
|
156
|
+
height: 180px;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.login-frame .secret-field {
|
|
160
|
+
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
|
161
|
+
letter-spacing: 0.04em;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.login-frame .recovery-codes {
|
|
165
|
+
list-style: none;
|
|
166
|
+
padding: 0;
|
|
167
|
+
margin: 12px 0 0 0;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.login-frame .recovery-codes li {
|
|
171
|
+
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
|
172
|
+
padding: 4px 0;
|
|
173
|
+
text-align: left;
|
|
174
|
+
}
|
|
175
|
+
</style><style></style><h1>`),Tu=b("<span class=error-message>"),ln=b("<span>"),Iu=b("<input type=text autocomplete=one-time-code required>"),cn=b("<span class=hint>"),Pu=b("<input type=password autocomplete=new-password required>"),Xn=b("<button type=submit>"),Mu=b("<span class=info-message>"),Ou=b("<span class=success-message>"),zu=b("<input type=text autocomplete=username>"),Ru=b("<input type=password autocomplete=current-password>"),ct=b("<p>"),Nu=b("<select>"),ju=b("<option> (<!>)"),Lu=b("<input type=text>"),Uu=b("<select class=mfa-choice>"),qu=b("<option>"),Qn=b("<input type=text class=totp-code autocomplete=one-time-code inputmode=numeric>"),Vu=b("<input type=text class=totp-recovery autocomplete=off>"),Ju=b('<input type=text class="totp-secret secret-field"readonly>'),Gu=b("<div class=qr>"),Ku=b("<ul class=recovery-codes>"),Hu=b("<li><code>"),er=b("<input type=text autocomplete=one-time-code>"),tr=b("<input type=password autocomplete=new-password>"),Wu=b("<span class=checkbox-wrapper><input type=checkbox><span> "),Yu=b("<button type=button>"),St=b("<a class=centered-text href=#>"),Zu=b('<a class="centered-text totp-cancel"href=#>'),Xu=b("<div class=social-divider><span>"),Qu=b("<button type=button class=social-btn>"),el=b('<svg width=18 height=18 viewBox="0 0 18 18"xmlns=http://www.w3.org/2000/svg><path d="M17.64 9.2c0-.637-.057-1.251-.164-1.84H9v3.481h4.844c-.209 1.125-.843 2.078-1.796 2.717v2.258h2.908c1.702-1.567 2.684-3.875 2.684-6.615z"fill=#4285F4></path><path d="M9 18c2.43 0 4.467-.806 5.956-2.184l-2.908-2.258c-.806.54-1.837.86-3.048.86-2.344 0-4.328-1.584-5.036-3.711H.957v2.332C2.438 15.983 5.482 18 9 18z"fill=#34A853></path><path d="M3.964 10.707c-.18-.54-.282-1.117-.282-1.707s.102-1.167.282-1.707V4.961H.957C.347 6.175 0 7.548 0 9s.348 2.825.957 4.039l3.007-2.332z"fill=#FBBC05></path><path d="M9 3.58c1.321 0 2.508.454 3.44 1.345l2.582-2.58C13.463.891 11.426 0 9 0 5.482 0 2.438 2.017.957 4.961L3.964 7.293C4.672 5.166 6.656 3.58 9 3.58z"fill=#EA4335>'),tl=b('<svg width=18 height=18 viewBox="0 0 16 16"xmlns=http://www.w3.org/2000/svg><path fill-rule=evenodd d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"fill=currentColor>'),nl=b('<svg width=18 height=18 viewBox="20 16 16 19"xmlns=http://www.w3.org/2000/svg><path d="M28.2226562,20.3846154 C29.0546875,20.3846154 30.0976562,19.8048315 30.71875,19.0317864 C31.28125,18.3312142 31.6914062,17.352829 31.6914062,16.3744437 C31.6914062,16.2415766 31.6796875,16.1087095 31.65625,16 C30.7304687,16.0362365 29.6171875,16.640178 28.9492187,17.4494596 C28.421875,18.06548 27.9414062,19.0317864 27.9414062,20.0222505 C27.9414062,20.1671964 27.9648438,20.3121424 27.9765625,20.3604577 C28.0351562,20.3725366 28.1289062,20.3846154 28.2226562,20.3846154 Z M25.2929688,35 C26.4296875,35 26.9335938,34.214876 28.3515625,34.214876 C29.7929688,34.214876 30.109375,34.9758423 31.375,34.9758423 C32.6171875,34.9758423 33.4492188,33.792117 34.234375,32.6325493 C35.1132812,31.3038779 35.4765625,29.9993643 35.5,29.9389701 C35.4179688,29.9148125 33.0390625,28.9122695 33.0390625,26.0979021 C33.0390625,23.6579784 34.9140625,22.5588048 35.0195312,22.474253 C33.7773438,20.6382708 31.890625,20.5899555 31.375,20.5899555 C29.9804688,20.5899555 28.84375,21.4596313 28.1289062,21.4596313 C27.3554688,21.4596313 26.3359375,20.6382708 25.1289062,20.6382708 C22.8320312,20.6382708 20.5,22.5950413 20.5,26.2911634 C20.5,28.5861411 21.3671875,31.013986 22.4335938,32.5842339 C23.3476562,33.9129053 24.1445312,35 25.2929688,35 Z"fill=currentColor fill-rule=nonzero>'),rl=b('<svg width=18 height=18 viewBox="0 0 24 24"xmlns=http://www.w3.org/2000/svg><path d="M12 1L3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4zm0 4a3 3 0 110 6 3 3 0 010-6zm0 14c-2.5 0-4.71-1.28-6-3.22.03-1.99 4-3.08 6-3.08s5.97 1.09 6 3.08c-1.29 1.94-3.5 3.22-6 3.22z"fill=currentColor>'),il=b("<div class=loading-overlay part=loading-overlay><slot name=loading>");Zt("spartan-login",{domain:"http://127.0.0.1:11000",sector:"0ad5c3e5-0186-4557-8b32-4b36f247bf09",startMode:"password",styles:"",locale:"en",redirect:"",hideSocial:!1},e=>{const[t,n]=C((e.startMode||"password").toLowerCase()),[r,i]=C(""),[o,s]=C(""),[l,m]=C(""),[y,p]=C(""),[$]=C(e.redirect),[O,ee]=C(!1),[fe,U]=C(!1),[Pe,Fe]=C(!1),[le,ce]=C(""),[je,q]=C(""),[me,H]=C([]),[$e,te]=C(""),[pe,De]=C([]),[Ce,ke]=C(""),[ne,I]=C(!1),[V,re]=C(!1),[se,Me]=C(""),[ye,Le]=C(""),[vt,it]=C(!1),[dt,Oe]=C([]),[bt,Ye]=C(""),[Ze,Te]=C(""),[ot,Ue]=C(""),[Ct,st]=C(""),[wt,ht]=C(""),[yt,At]=C(""),[Tt,v]=C([]),[qe,Et]=C(""),[ge,g]=C(""),[k,G]=C(""),[Z,ae]=C(""),[Ae,Ve]=C(""),[ve,Xe]=C(!1),f=Xt(e.locale);let xe,Qe=null,at;const Ft=()=>ne()||!!Ce();lr(()=>{Qe&&clearTimeout(Qe)});try{at=e.styles}catch{at=""}console.log(at),Gt(async()=>{const u=new URLSearchParams(window.location.search);if(u.get("error")){history.replaceState({},"",window.location.pathname);const Ie=u.get("error_description");p(Ie||f.i18n("sa-social-error")),ze(),Re();return}const A=u.get("code");if(A){history.replaceState({},"",window.location.pathname),I(!0);try{const Ie=await fetch(`${e.domain}/api/v1/oauth/exchange`,{method:"POST",mode:"cors",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify({code:A})});if(!Ie.ok)throw new Error(f.i18n("sa-social-error"));const he=await Ie.json();localStorage.setItem("spartan-token",he.token);const a=xe.getRootNode().host;e.redirect!==""?(a.dispatchEvent(new CustomEvent("spartan-login",{bubbles:!0,cancelable:!0,detail:{token:he.token}})),window.location.href=e.redirect):(Qe=setTimeout(()=>{Qe=null,I(!1),ze(),Re()},5e3),a.dispatchEvent(new CustomEvent("spartan-login",{bubbles:!0,cancelable:!0,detail:{token:he.token}})))}catch(Ie){p(Ie.message||f.i18n("sa-social-error")),I(!1),ze(),Re()}return}const X=u.get("sub");if(X){g(X);const Ie=u.get("email");Ie&&G(Ie);const a=new URLSearchParams(window.location.hash.replace(/^#/,"")).get("otp");a&&ae(a),n("invite");return}if(tn()&&e.redirect!==""&&window.location.pathname!==e.redirect){window.location.href=e.redirect;return}ze(),Re()});function ze(){fetch(`${e.domain}/api/v1/sectors/${e.sector}/publicsettings`,{method:"GET",mode:"cors",cache:"no-cache",headers:{"Content-Type":"application/json"}}).then(u=>{if(u.ok)return u.json();throw new Error("Network response was not ok.")}).then(u=>{console.log(u),ee(u.SelfSignUpAllowed),re(u.MFARequired||!1)}).catch(u=>{console.log(u),p(u.message)})}function Re(){e.hideSocial||fetch(`${e.domain}/api/v1/sectors/${e.sector}/oauth/providers`,{method:"GET",mode:"cors",cache:"no-cache"}).then(u=>{if(u.ok)return u.json();throw new Error("Failed to load social providers")}).then(u=>{const d=(u.providers||[]).filter(A=>A.enabled);De(d)}).catch(()=>{})}function $t(u){if(Ce())return;ke(u),p("");const d=window.location.origin+window.location.pathname;fetch(`${e.domain}/api/v1/oauth/${u}/initiate`,{method:"POST",mode:"cors",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify({sectorID:e.sector,redirectURI:d})}).then(A=>{if(A.ok)return A.json();throw new Error(f.i18n("sa-social-error"))}).then(A=>{window.location.href=A.authURL}).catch(A=>{ke(""),p(A.message)})}function x(u,d){return p(""),Le(d),fetch(`${e.domain}/api/v1/signup/mfa/begin`,{method:"POST",mode:"cors",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:u,sectorID:e.sector,transactionId:d})}).then(A=>{if(!A.ok)throw new Error(f.i18n("sa-signup-verify-error"))}).then(()=>{n("signup-verify")}).catch(A=>{p(A.message)})}function w(){return p(""),fetch(`${e.domain}/api/v1/signup/mfa/verify`,{method:"POST",mode:"cors",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:r(),code:l().toUpperCase().trim(),sectorID:e.sector,transactionId:ye()})}).then(u=>{if(u.ok)return u.json();throw u.status===400?new Error(f.i18n("sa-signup-verify-error")):new Error(f.i18n("sa-signup-verify-error"))}).then(u=>{Me(u.token),localStorage.setItem("spartan-token",u.token),xe.getRootNode().host.dispatchEvent(new CustomEvent("spartan-login",{bubbles:!0,cancelable:!0,detail:{token:u.token}})),m(""),n("signup-webauthn")}).catch(u=>{p(u.message)})}function B(){ne()||(I(!0),p(""),fetch(`${e.domain}/api/v1/webauthn/registration/begin`,{method:"POST",mode:"cors",cache:"no-cache",headers:{"Content-Type":"application/json",Authorization:`bearer ${se()}`},body:JSON.stringify({keyName:"Default",sectorID:e.sector})}).then(u=>{if(!u.ok)throw new Error(f.i18n("sa-signup-webauthn-error"));return u.json()}).then(u=>{const d=zn(u.Options);return Rn(d).then(A=>{let X=JSON.parse(JSON.stringify(A));return X.transactionID=u.TransactionID,X})}).then(u=>fetch(`${e.domain}/api/v1/webauthn/registration/finish`,{method:"POST",mode:"cors",cache:"no-cache",headers:{"Content-Type":"application/json",Authorization:`bearer ${se()}`},body:JSON.stringify(u)})).then(u=>{if(!u.ok)throw new Error(f.i18n("sa-signup-webauthn-error"));W()}).catch(u=>{p((u==null?void 0:u.message)||String(u))}).finally(()=>{I(!1)}))}function W(){n(e.startMode),e.redirect!==""&&(window.location.href=e.redirect)}function F(u){return String(u||"").split(",").map(d=>d.trim()).filter(Boolean)}function S(u){return u==="otp"||u==="email_enrollment"?f.i18n("sa-method-otp"):u==="totp"||u==="totp_enrollment"?f.i18n("sa-method-totp"):u==="webauthn"?f.i18n("sa-method-webauthn"):u}function T(){st(""),ht(""),At(""),Te("")}function _(u,d){xe.getRootNode().host.dispatchEvent(new CustomEvent("spartan-login",{bubbles:!0,cancelable:!0,detail:{token:u,transactionID:d}}))}function L(u,d){localStorage.setItem("spartan-token",u),_(u,d),$()!==""&&(window.location.href=$())}function N(u){const d=u.filter(X=>X==="otp"||X==="totp"||X==="webauthn"),A=u.filter(X=>X==="email_enrollment"||X==="totp_enrollment");if(d.length===1&&d[0]==="otp")return rr();if(d.length===1&&d[0]==="totp"){Te(""),Ue(""),p(""),n("totp");return}if(d.length===1&&d[0]==="webauthn"){n("webauthn"),p(f.i18n("sa-webauthn-required"));return}if(d.length>1){Oe(d),Ye(d[0]),p(""),n("mfa-pick");return}if(A.length===1&&A[0]==="email_enrollment")return x(r(),ye()||localStorage.getItem("spartan-txid")||"");if(A.length===1&&A[0]==="totp_enrollment")return Oe(A),z();if(A.length>1){Oe(A),Ye(A[0]),p(""),n("enroll-pick");return}p(f.i18n("sa-unknown-challenge"))}function j(){const u=bt();return u==="otp"?rr():u==="totp"?(Te(""),Ue(""),p(""),n("totp"),Promise.resolve()):u==="webauthn"?kt():u==="email_enrollment"?x(r(),ye()||localStorage.getItem("spartan-txid")||""):u==="totp_enrollment"?z():(p(f.i18n("sa-unknown-challenge")),Promise.resolve())}function z(){p("");const u=ye()||localStorage.getItem("spartan-txid")||"";return fetch(`${e.domain}/api/v1/totp/begin`,{method:"POST",mode:"cors",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify({sectorID:e.sector,email:r(),transactionID:u,displayName:""})}).then(async d=>{if(!d.ok){const A=await d.json().catch(()=>({}));throw new Error(A.message||f.i18n("sa-totp-enroll-error"))}return d.json()}).then(d=>{d.transactionID&&(localStorage.setItem("spartan-txid",d.transactionID),Le(d.transactionID)),At(d.registrationID||""),st(d.secret||""),ht(d.otpauthURL||""),Te(""),n("totp-enroll")}).catch(d=>{p(d.message)})}function P(){p("");const u=Ze().replace(/\s+/g,"");return u?fetch(`${e.domain}/api/v1/totp/finish`,{method:"POST",mode:"cors",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify({sectorID:e.sector,email:r(),transactionID:ye()||localStorage.getItem("spartan-txid")||"",registrationID:yt(),code:u})}).then(async d=>{if(!d.ok){const A=await d.json().catch(()=>({}));throw new Error(A.message||f.i18n("sa-totp-invalid"))}return d.json()}).then(d=>{T();const A=Array.isArray(d.recoveryCodes)?d.recoveryCodes.filter(X=>!!X):[];if(A.length>0){v(A),Et(d.token||""),n("totp-recovery");return}if(d.token){M(d.token,d.transactionID||"");return}p(f.i18n("sa-totp-enroll-error"))}).catch(d=>{p(d.message)}):(p(f.i18n("sa-totp-invalid")),Promise.resolve())}function M(u,d){if(vt()){Me(u),localStorage.setItem("spartan-token",u),_(u,d),n("signup-webauthn");return}L(u,d)}function de(){const u=qe(),d=localStorage.getItem("spartan-txid")||"";if(v([]),Et(""),T(),!u){n(e.startMode);return}M(u,d)}function we(){if(T(),p(""),dt().indexOf("email_enrollment")!==-1||vt()){n("enroll-pick");return}n(e.startMode)}function Ne(){const d=ot().replace(/\s+/g,"")||Ze().replace(/\s+/g,"");return d?fetch(`${e.domain}/api/v1/login/totp`,{method:"POST",mode:"cors",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:r(),code:d,transactionID:localStorage.getItem("spartan-txid"),sectorID:e.sector})}).then(Vt):(p(f.i18n("sa-totp-invalid")),Promise.resolve())}function ue(){if(ne())return f.i18n("sa-loading");const u=t();return u==="sign-up"?f.i18n("sa-signup"):u==="otp-pick"?f.i18n("sa-otp-send-code"):u==="otp"||u==="signup-verify"?f.i18n("sa-otp-verify"):u==="reset-email"?f.i18n("sa-otp-send-code"):u==="reset-code"?f.i18n("sa-reset-submit"):u==="totp"?f.i18n("sa-totp-verify"):u==="totp-enroll"?f.i18n("sa-totp-enroll-verify"):u==="totp-recovery"?f.i18n("sa-totp-recovery-saved"):u==="mfa-pick"||u==="enroll-pick"?f.i18n("sa-continue"):f.i18n("sa-login")}function et(){const u=t();return u==="otp"||u==="otp-pick"||u==="reset-code"||u==="signup-verify"||u==="signup-webauthn"||u==="totp"||u==="totp-enroll"||u==="totp-recovery"||u==="mfa-pick"||u==="enroll-pick"}function tt(){const u=t();return u==="reset-email"||u==="reset-code"?f.i18n("sa-reset-password"):u==="signup-verify"||u==="signup-webauthn"?f.i18n("sa-signup-mfa-title"):u==="invite"?f.i18n("sa-complete-invite"):u==="totp-enroll"||u==="enroll-pick"?f.i18n("sa-totp-enroll-title"):u==="totp-recovery"?f.i18n("sa-totp-recovery-title"):u==="totp"?f.i18n("sa-method-totp"):f.i18n("sa-login")}function _e(){return console.log("login"),p(""),t()==="password"?Nl():t()==="webauthn"?kt():t()==="otp-pick"?ir($e()):t()==="otp"?jl():t()==="totp"?Ne():t()==="totp-enroll"?P():t()==="totp-recovery"?(de(),Promise.resolve()):t()==="mfa-pick"||t()==="enroll-pick"?j():t()==="reset-email"?Ll():t()==="reset-code"?Ul():Promise.resolve()}function ft(){return console.log("signup"),p(""),U(!1),it(!0),fetch(`${e.domain}/api/v1/users`,{method:"POST",mode:"cors",cache:"no-cache",body:JSON.stringify({username:r(),password:o(),sectorID:e.sector})}).then(u=>{if(u.ok)return u.json();throw new Error(f.i18n("sa-error-creating-user"))}).then(u=>{if(console.log(u),V()){const d=u.enrollmentTransactionId||"";Le(d),d&&localStorage.setItem("spartan-txid",d),Oe(["email_enrollment","totp_enrollment"]),Ye("email_enrollment"),n("enroll-pick");return}else U(!0),n(e.startMode)}).catch(u=>{U(!1),p(u.message),console.log(u)})}function kt(){return console.log("webauthnLogin"),fetch(`${e.domain}/api/v1/login/webauthn/begin`,{method:"POST",mode:"cors",cache:"no-cache",body:JSON.stringify({username:r(),sectorID:e.sector})}).then(u=>{if(u.ok)return u.json();throw u.status===401?(n("password"),p(f.i18n("webauthn-not-enrolled")),new Error(f.i18n("webauthn-not-enrolled"))):new Error(`${u.status} ${u.statusText}: Network response was not ok.`)}).then(u=>{console.log(u);const d=ru(u.CredentialAssertion);return console.log("Parsed WebAuthn request options:",d),ou(d).then(A=>{const X=JSON.stringify(A);let It=JSON.parse(X);return It.transactionID=u.TransactionID,It})}).then(u=>fetch(`${e.domain}/api/v1/login/webauthn/finish`,{method:"POST",mode:"cors",cache:"no-cache",body:JSON.stringify(u)})).then(Vt).catch(u=>{p(u.message),console.log(u)})}function Nl(){return console.log("password login"),it(!1),fetch(e.domain+"/api/v1/login/password",{method:"post",mode:"cors",cache:"no-cache",body:JSON.stringify({username:r(),password:o(),sectorID:e.sector})}).then(Vt)}function Vt(u){return Promise.resolve(u).then(d=>{if(d.ok)return d.json();throw d}).then(d=>{if(console.log(d),localStorage.setItem("spartan-txid",d.transactionID),d.transactionID&&Le(d.transactionID),!d.token)return N(F(d.challengeType));localStorage.setItem("spartan-token",d.token);const A=new CustomEvent("spartan-login",{bubbles:!0,cancelable:!0,detail:{token:d.token,transactionID:d.transactionID}});xe.getRootNode().host.dispatchEvent(A),$()!==""&&(window.location.href=$())}).catch(d=>d.json().then(A=>{console.log(A.message),p(A.message)}).catch(A=>{console.log(A)}))}function rr(){const u=localStorage.getItem("spartan-txid")||"";return fetch(e.domain+`/api/v1/otp/${encodeURIComponent(r())}?transactionID=${encodeURIComponent(u)}§orID=${encodeURIComponent(e.sector)}`,{method:"get",mode:"cors",cache:"no-cache"}).then(d=>{if(d.ok)return d.json();throw new Error(f.i18n("error-otp-list"))}).then(d=>{const A=d.registrations||[];if(A.length===0){p(f.i18n("sa-otp-no-registrations"));return}if(A.length===1)return ir(A[0].ID||"");H(A),te(A[0].ID||""),n("otp-pick"),p("")}).catch(d=>{p(d.message),console.log(d)})}function ir(u){return console.log("begin OTP, registrationID:",u),fetch(e.domain+"/api/v1/login/otp/begin",{method:"post",mode:"cors",cache:"no-cache",body:JSON.stringify({username:r(),transactionID:localStorage.getItem("spartan-txid"),registrationID:u,sectorID:e.sector})}).then(d=>{if(d.ok)return d.json();throw new Error(`${d.status} ${d.statusText}`)}).then(d=>{console.log(d),d.transactionID&&localStorage.setItem("spartan-txid",d.transactionID),m(""),p(""),n("otp")}).catch(d=>{p(d.message),console.log(d)})}function jl(){return console.log("OTP login submit"),fetch(e.domain+"/api/v1/login/otp",{method:"post",mode:"cors",cache:"no-cache",body:JSON.stringify({username:r(),password:l(),transactionID:localStorage.getItem("spartan-txid"),sectorID:e.sector})}).then(Vt)}function Ll(){return console.log("begin password reset"),p(""),Fe(!1),fetch(`${e.domain}/api/v1/password/reset/begin`,{method:"POST",mode:"cors",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:r(),sectorID:e.sector})}).then(u=>{if(u.ok)return u.json();throw new Error(f.i18n("sa-reset-error"))}).then(u=>{console.log(u),p(f.i18n("sa-reset-email-sent")),ce(""),q(""),n("reset-code")}).catch(u=>{p(u.message),console.log(u)})}function Ul(){return console.log("complete password reset"),p(""),fetch(`${e.domain}/api/v1/password/reset/complete`,{method:"POST",mode:"cors",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:r(),code:le().toUpperCase().trim(),newPassword:je(),sectorID:e.sector})}).then(u=>{if(u.ok)return u.json();throw u.status===400?new Error(f.i18n("sa-reset-error-code")):new Error(f.i18n("sa-reset-error"))}).then(u=>{console.log(u),Fe(!0),ce(""),q(""),s(""),n(e.startMode)}).catch(u=>{p(u.message),console.log(u)})}async function ql(){if(p(""),!Z()||Z().trim().length===0){p(f.i18n("sa-invite-error-otp"));return}if(!Ae()||Ae().length<8){p("Password must be at least 8 characters");return}const u=ge();if(!u){p("Missing invitation information");return}const d=await fetch(`${e.domain}/api/v1/users/invite/complete`,{method:"POST",mode:"cors",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify({sub:u,otp:Z().toUpperCase().trim(),password:Ae(),sectorID:e.sector})}).catch(()=>null);if(!d){p(f.i18n("sa-invite-error-generic"));return}if(d.ok){history.replaceState({},"",window.location.pathname);const A=await d.json().catch(()=>({})),X=xe.getRootNode().host;A.token?(localStorage.setItem("spartan-token",A.token),X.dispatchEvent(new CustomEvent("spartan-login",{bubbles:!0,cancelable:!0,detail:{token:A.token}})),$()!==""?window.location.href=$():e.redirect!==""?window.location.href=e.redirect:(Xe(!1),g(""),G(""),ae(""),Ve(""),n(e.startMode),ze(),Re())):(Xe(!0),X.dispatchEvent(new CustomEvent("spartan-invite-complete",{bubbles:!0,cancelable:!0,detail:{sub:u,success:!0}})),setTimeout(()=>{$()!==""?window.location.href=$():e.redirect!==""?window.location.href=e.redirect:(Xe(!1),g(""),G(""),ae(""),Ve(""),n(e.startMode),ze(),Re())},2e3))}else{const A=await d.json().catch(()=>({}));d.status===400||String(A.message).includes("invalid OTP")?p(f.i18n("sa-invite-error-otp")):d.status===504||String(A.message).includes("expired")?p(f.i18n("sa-invite-error-expired")):p(A.message||f.i18n("sa-invite-error-generic"))}}return(()=>{var u=Su(),d=u.firstChild,A=d.firstChild,X=A.nextSibling,It=X.nextSibling,Ie=xe;return typeof Ie=="function"?wn(Ie,d):xe=d,d.addEventListener("submit",he=>{if(he.preventDefault(),ne())return;I(!0),(t()==="sign-up"?ft():t()==="signup-verify"?w():t()==="invite"?Promise.resolve(ql()):_e()).finally(()=>I(!1))}),c(X,at),c(It,tt),c(d,y&&(()=>{var he=Tu();return c(he,y),he})(),null),c(d,(()=>{var he=h(()=>!!fe());return()=>he()&&(()=>{var a=ln();return c(a,()=>f.i18n("sa-signup-complete")),a})()})(),null),c(d,(()=>{var he=h(()=>!!Pe());return()=>he()&&(()=>{var a=ln();return c(a,()=>f.i18n("sa-reset-success")),a})()})(),null),c(d,(()=>{var he=h(()=>t()==="invite");return()=>he()&&[h(()=>h(()=>!!k())()&&(()=>{var a=Mu();return c(a,k),a})()),h(()=>h(()=>!!ve())()&&(()=>{var a=Ou();return c(a,()=>f.i18n("sa-invite-success")),a})()),(()=>{var a=Iu();return a.$$input=D=>ae(D.currentTarget.value),E(D=>{var R=f.i18n("sa-invite-otp"),Se=ne()||ve();return R!==D.e&&Y(a,"placeholder",D.e=R),Se!==D.t&&(a.disabled=D.t=Se),D},{e:void 0,t:void 0}),E(()=>a.value=Z()),a})(),(()=>{var a=cn();return c(a,()=>f.i18n("sa-invite-otp-hint")),a})(),(()=>{var a=Pu();return a.$$input=D=>Ve(D.currentTarget.value),E(D=>{var R=f.i18n("sa-invite-password"),Se=ne()||ve();return R!==D.e&&Y(a,"placeholder",D.e=R),Se!==D.t&&(a.disabled=D.t=Se),D},{e:void 0,t:void 0}),E(()=>a.value=Ae()),a})(),(()=>{var a=cn();return c(a,()=>f.i18n("sa-invite-password-hint")),a})(),(()=>{var a=Xn();return c(a,(()=>{var D=h(()=>!!ne());return()=>D()?f.i18n("sa-invite-completing"):f.i18n("sa-invite-submit")})()),E(()=>a.disabled=ne()||ve()),a})()]})(),null),c(d,(()=>{var he=h(()=>t()!=="invite");return()=>he()&&[(()=>{var a=zu();return a.addEventListener("change",D=>i(D.currentTarget.value)),a.$$input=D=>i(D.currentTarget.value),E(D=>{var R=f.i18n("sa-username"),Se=et();return R!==D.e&&Y(a,"placeholder",D.e=R),Se!==D.t&&(a.disabled=D.t=Se),D},{e:void 0,t:void 0}),E(()=>a.value=r()),a})(),h(()=>h(()=>t()!=="sign-up"&&t()!=="signup-verify"&&t()!=="signup-webauthn")()&&[h(()=>h(()=>t()==="password")()&&(()=>{var a=Ru();return a.addEventListener("change",D=>s(D.currentTarget.value)),a.$$input=D=>s(D.currentTarget.value),E(()=>Y(a,"placeholder",f.i18n("sa-password"))),E(()=>a.value=o()),a})()),h(()=>h(()=>t()==="webauthn")()&&ln()),h(()=>h(()=>t()==="otp-pick")()&&[(()=>{var a=ct();return c(a,()=>f.i18n("sa-otp-choose")),a})(),(()=>{var a=Nu();return a.addEventListener("change",D=>te(D.currentTarget.value)),c(a,()=>me().map(D=>(()=>{var R=ju(),Se=R.firstChild,or=Se.nextSibling;return or.nextSibling,c(R,()=>D.DisplayName||D.ID,Se),c(R,()=>D.Type,or),E(()=>R.value=D.ID),R})())),E(()=>a.value=$e()),a})()]),h(()=>h(()=>t()==="otp")()&&(()=>{var a=Lu();return a.$$input=D=>m(D.currentTarget.value),E(()=>Y(a,"placeholder",f.i18n("sa-code"))),E(()=>a.value=l()),a})()),h(()=>h(()=>t()==="mfa-pick"||t()==="enroll-pick")()&&[(()=>{var a=ct();return c(a,(()=>{var D=h(()=>t()==="mfa-pick");return()=>D()?f.i18n("sa-mfa-choose"):f.i18n("sa-enroll-choose")})()),a})(),(()=>{var a=Uu();return a.addEventListener("change",D=>Ye(D.currentTarget.value)),c(a,()=>dt().map(D=>(()=>{var R=qu();return R.value=D,c(R,()=>S(D)),R})())),E(()=>a.value=bt()),a})()]),h(()=>h(()=>t()==="totp")()&&[(()=>{var a=ct();return c(a,()=>f.i18n("sa-totp-prompt")),a})(),(()=>{var a=Qn();return a.$$input=D=>Te(D.currentTarget.value),E(()=>Y(a,"placeholder",f.i18n("sa-totp-code"))),E(()=>a.value=Ze()),a})(),(()=>{var a=Vu();return a.$$input=D=>Ue(D.currentTarget.value),E(()=>Y(a,"placeholder",f.i18n("sa-totp-recovery"))),E(()=>a.value=ot()),a})(),(()=>{var a=cn();return c(a,()=>f.i18n("sa-totp-recovery-hint")),a})()]),h(()=>h(()=>t()==="totp-enroll")()&&[(()=>{var a=ct();return c(a,()=>f.i18n("sa-totp-enroll-prompt")),a})(),h(()=>h(()=>!!wt())()&&(()=>{var a=Gu();return E(()=>a.innerHTML=Zn(wt())),a})()),(()=>{var a=Ju();return E(()=>Y(a,"aria-label",f.i18n("sa-totp-secret"))),E(()=>a.value=Ct()),a})(),(()=>{var a=Qn();return a.$$input=D=>Te(D.currentTarget.value),E(()=>Y(a,"placeholder",f.i18n("sa-totp-code"))),E(()=>a.value=Ze()),a})()]),h(()=>h(()=>t()==="totp-recovery")()&&[(()=>{var a=ct();return c(a,()=>f.i18n("sa-totp-recovery-prompt")),a})(),(()=>{var a=Ku();return c(a,()=>Tt().map(D=>(()=>{var R=Hu(),Se=R.firstChild;return c(Se,D),R})())),a})()]),h(()=>h(()=>t()==="reset-code")()&&[(()=>{var a=er();return a.$$input=D=>ce(D.currentTarget.value),E(()=>Y(a,"placeholder",f.i18n("sa-reset-code"))),E(()=>a.value=le()),a})(),(()=>{var a=tr();return a.$$input=D=>q(D.currentTarget.value),E(()=>Y(a,"placeholder",f.i18n("sa-new-password"))),E(()=>a.value=je()),a})()]),h(()=>h(()=>t()==="password"||t()==="webauthn")()&&(()=>{var a=Wu(),D=a.firstChild,R=D.nextSibling;return R.firstChild,a.$$click=()=>n(t()==="password"?"webauthn":"password"),c(R,()=>f.i18n("sa-use-password"),null),E(()=>D.checked=t()==="password"),a})())]),h(()=>h(()=>t()==="sign-up")()&&(()=>{var a=tr();return a.addEventListener("change",D=>s(D.currentTarget.value)),a.$$input=D=>s(D.currentTarget.value),E(()=>Y(a,"placeholder",f.i18n("sa-password"))),E(()=>a.value=o()),a})()),h(()=>h(()=>t()==="signup-verify")()&&[(()=>{var a=ct();return c(a,()=>f.i18n("sa-signup-verify-prompt")),a})(),(()=>{var a=er();return a.$$input=D=>m(D.currentTarget.value),E(()=>Y(a,"placeholder",f.i18n("sa-code"))),E(()=>a.value=l()),a})()]),h(()=>h(()=>t()==="signup-webauthn")()&&(()=>{var a=ct();return c(a,()=>f.i18n("sa-signup-webauthn-prompt")),a})()),h(()=>h(()=>t()!=="signup-webauthn")()&&(()=>{var a=Xn();return c(a,ue),E(()=>a.disabled=ne()),a})()),h(()=>h(()=>t()==="signup-webauthn")()&&[(()=>{var a=Yu();return a.$$click=()=>B(),c(a,(()=>{var D=h(()=>!!ne());return()=>D()?f.i18n("sa-loading"):f.i18n("sa-signup-webauthn-setup")})()),E(()=>a.disabled=ne()),a})(),(()=>{var a=St();return a.$$click=()=>W(),c(a,()=>f.i18n("sa-signup-webauthn-done")),a})()]),h(()=>h(()=>t()==="password")()&&(()=>{var a=St();return a.$$click=()=>{p(""),Fe(!1),n("reset-email")},c(a,()=>f.i18n("sa-forgot-password")),a})()),h(()=>h(()=>t()==="reset-email"||t()==="reset-code")()&&(()=>{var a=St();return a.$$click=()=>{p(""),ce(""),q(""),n(e.startMode)},c(a,()=>f.i18n("sa-back")),a})()),h(()=>h(()=>(t()==="totp"||t()==="otp"||t()==="otp-pick")&&dt().length>1)()&&(()=>{var a=St();return a.$$click=D=>{D.preventDefault(),p(""),n("mfa-pick")},c(a,()=>f.i18n("sa-back")),a})()),h(()=>h(()=>t()==="totp-enroll")()&&(()=>{var a=Zu();return a.$$click=D=>{D.preventDefault(),we()},c(a,()=>f.i18n("sa-cancel")),a})()),h(()=>h(()=>!!(O()&&t()!=="reset-email"&&t()!=="reset-code"&&t()!=="signup-verify"&&t()!=="signup-webauthn"&&t()!=="totp"&&t()!=="totp-enroll"&&t()!=="totp-recovery"&&t()!=="mfa-pick"&&t()!=="enroll-pick"))()&&(()=>{var a=St();return a.$$click=()=>t()==="sign-up"?n(e.startMode):n("sign-up"),c(a,(()=>{var D=h(()=>t()==="sign-up");return()=>D()?f.i18n("sa-back"):f.i18n("sa-signup")})()),a})()),h(()=>h(()=>!e.hideSocial&&pe().length>0&&(t()==="password"||t()==="webauthn"||t()==="sign-up"))()&&[(()=>{var a=Xu(),D=a.firstChild;return c(D,()=>f.i18n("sa-or")),a})(),h(()=>pe().map(a=>(()=>{var D=Qu();return D.$$click=()=>$t(a.provider),c(D,(()=>{var R=h(()=>a.provider==="google");return()=>R()&&el()})(),null),c(D,(()=>{var R=h(()=>a.provider==="github");return()=>R()&&tl()})(),null),c(D,(()=>{var R=h(()=>a.provider==="apple");return()=>R()&&nl()})(),null),c(D,(()=>{var R=h(()=>a.provider==="oidc");return()=>R()&&rl()})(),null),c(D,(()=>{var R=h(()=>a.provider==="google");return()=>R()?f.i18n("sa-social-google"):h(()=>a.provider==="github")()?f.i18n("sa-social-github"):h(()=>a.provider==="apple")()?f.i18n("sa-social-apple"):f.i18n("sa-social-oidc")})(),null),E(()=>D.disabled=!!Ce()||ne()),D})()))])]})(),null),c(u,(()=>{var he=h(()=>!!Ft());return()=>he()&&(()=>{var a=il(),D=a.firstChild;return D._$owner=cr(),c(D,()=>f.i18n("sa-loading")),a})()})(),null),u})()}),Ht(["input","click"]);var ol=b(`<div class=container><style>.container {
|
|
148
176
|
background-color: #ffffff;
|
|
149
177
|
border-radius: 10px;
|
|
150
178
|
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
|
|
@@ -322,7 +350,103 @@
|
|
|
322
350
|
.modal-content .btn.verify:hover {
|
|
323
351
|
background-color: #0056b3;
|
|
324
352
|
}
|
|
325
|
-
|
|
353
|
+
|
|
354
|
+
.modal-content.totp-modal {
|
|
355
|
+
width: 340px;
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
.qr {
|
|
359
|
+
display: flex;
|
|
360
|
+
justify-content: center;
|
|
361
|
+
margin: 10px 0;
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
.qr svg {
|
|
365
|
+
width: 180px;
|
|
366
|
+
height: 180px;
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
.secret-field {
|
|
370
|
+
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
|
371
|
+
letter-spacing: 0.04em;
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
.recovery-codes {
|
|
375
|
+
list-style: none;
|
|
376
|
+
padding: 0;
|
|
377
|
+
margin: 10px 0;
|
|
378
|
+
text-align: left;
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
.recovery-codes li {
|
|
382
|
+
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
|
383
|
+
padding: 4px 0;
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
.skeleton-group {
|
|
387
|
+
display: flex;
|
|
388
|
+
flex-direction: column;
|
|
389
|
+
gap: 10px;
|
|
390
|
+
margin-bottom: 20px;
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
.skeleton > .skeleton-block {
|
|
394
|
+
margin-bottom: 20px;
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
.skeleton-line,
|
|
398
|
+
.skeleton-block,
|
|
399
|
+
.skeleton-row {
|
|
400
|
+
--skeleton-base: #ececec;
|
|
401
|
+
--skeleton-shine: #f7f7f7;
|
|
402
|
+
border-radius: 6px;
|
|
403
|
+
background-color: var(--skeleton-base);
|
|
404
|
+
background-image: linear-gradient(90deg, var(--skeleton-base) 0%, var(--skeleton-shine) 50%, var(--skeleton-base) 100%);
|
|
405
|
+
background-size: 200% 100%;
|
|
406
|
+
animation: skeleton-shimmer 1.2s ease-in-out infinite;
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
.skeleton-line {
|
|
410
|
+
height: 16px;
|
|
411
|
+
width: 42%;
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
.skeleton-block {
|
|
415
|
+
height: 36px;
|
|
416
|
+
width: 100%;
|
|
417
|
+
border-radius: 5px;
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
.skeleton-row {
|
|
421
|
+
height: 42px;
|
|
422
|
+
width: 100%;
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
@keyframes skeleton-shimmer {
|
|
426
|
+
0% { background-position: 100% 0; }
|
|
427
|
+
100% { background-position: -100% 0; }
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
@media (prefers-reduced-motion: reduce) {
|
|
431
|
+
.skeleton-line,
|
|
432
|
+
.skeleton-block,
|
|
433
|
+
.skeleton-row {
|
|
434
|
+
animation: none;
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
.sr-only {
|
|
439
|
+
position: absolute;
|
|
440
|
+
width: 1px;
|
|
441
|
+
height: 1px;
|
|
442
|
+
padding: 0;
|
|
443
|
+
margin: -1px;
|
|
444
|
+
overflow: hidden;
|
|
445
|
+
clip: rect(0, 0, 0, 0);
|
|
446
|
+
white-space: nowrap;
|
|
447
|
+
border: 0;
|
|
448
|
+
}
|
|
449
|
+
</style><style></style><h1 class=header>`),dn=b("<span class=error-message>"),sl=b("<div class=skeleton role=status aria-busy=true><span class=sr-only></span><div class=skeleton-group><div class=skeleton-line></div><div class=skeleton-row></div><div class=skeleton-block>"),al=b("<div class=skeleton-block>"),ul=b("<div class=skeleton-group><div class=skeleton-line></div><div class=skeleton-row></div><div class=skeleton-block>"),ll=b("<div class=section><h2></h2><div class=security-keys>"),cl=b('<div class=key-item><span></span><button class="btn remove">'),hn=b("<span>"),dl=b("<div class=section><div class=security-keys>"),hl=b('<button class="btn add">+ '),fl=b('<div class=add-key-form><div class=add-key-item><label for=keyName style=display:none;></label><input id=keyName type=text><button class="btn remove"></button><button class="btn add">'),pl=b("<div class=section><h2></h2><table><thead><tr><th></th><th></th><th></th></tr></thead><tbody>"),gl=b('<tr class=mfa-list-item><td></td><td></td><td><button class="btn remove">'),ml=b('<span> <button class="btn validate">'),nr=b('<div class=section><div class=mfa-manage><button class="btn add">+ '),Dl=b('<div class=section><h2></h2><div class=mfa-manage><div class=mfa-item><label for=email></label><input id=email type=text><button class="btn add"></button></div><div class=mfa-item><label for=phone></label><input id=phone type=text><button class="btn add"></button></div><div class=mfa-item><button class="btn remove">'),vl=b("<div class=section><h2>"),bl=b("<table><thead><tr><th></th><th></th><th></th></tr></thead><tbody>"),Cl=b('<tr class=totp-list-item><td></td><td></td><td><button class="btn remove">'),wl=b('<div class=section><div class=add-key-form><div class=add-key-item><label for=totpName style=display:none;></label><input id=totpName type=text><button class="btn remove"></button><button class="btn add">'),yl=b('<div class=modal id=mfaModal><div class=modal-content><span class=close id=closeModal>×</span><h2>MFA Verification</h2><p>Please enter the verification code sent to your email or phone:</p><input type=text id=mfaCode placeholder="Enter verification code"><button class="btn verify"id=verifyMfa>Verify'),Al=b('<div class=modal><div class="modal-content totp-modal"><span class=close>×</span><h2></h2><p></p><input class=secret-field type=text readonly><input type=text autocomplete=one-time-code><button class="btn verify">'),El=b("<div class=qr>"),Fl=b('<div class=modal><div class="modal-content totp-modal"><h2></h2><p></p><ul class=recovery-codes></ul><button class="btn verify">'),$l=b("<li><code>");const kl={domain:"http://127.0.0.1:11000",sector:"0ad5c3e5-0186-4557-8b32-4b36f247bf09",styles:"",locale:"en",showWebAuthn:!0,showTotp:!0,showSkeleton:!1,redirect:"/",redirectOnUnauthenticated:!0};function Dt(e){return e!==!1&&e!=="false"&&e!=="0"}function xl(e){return e===!0||e==="true"||e==="1"}Zt("spartan-account-settings",kl,e=>{const[t,n]=C("");C("");const[r,i]=C(""),[o,s]=C(""),[l,m]=C(""),[y]=C(e.showWebAuthn),[p,$]=C(!1),[O,ee]=C(!1),[fe,U]=C(!1),[Pe,Fe]=C(!1),[le,ce]=C(!1),[je,q]=C([]),[me,H]=C([]),[$e,te]=C(""),[pe,De]=C(""),[Ce,ke]=C(""),[ne,I]=C(""),[V,re]=C([]),[se,Me]=C(!1),[ye,Le]=C(""),[vt,it]=C(!1),[dt,Oe]=C(!1),[bt,Ye]=C(""),[Ze,Te]=C(""),[ot,Ue]=C(""),[Ct,st]=C(""),[wt,ht]=C([]),yt=xl(e.showSkeleton),[At,Tt]=C(yt&&!!tn()),v=Xt(e.locale);let qe;try{qe=e.styles}catch{qe=""}Gt(async()=>{if(tn())ee(!0),s("");else{if(e.redirectOnUnauthenticated){window.location.href=e.redirect;return}ee(!1),s(v.i18n("not-authenticated"))}if(O())try{const w=await Et();w&&w.email&&n(w.email)}catch(w){console.error(w)}if(!yt){await Z(),ve().then(w=>{H(w.registrations)}),O()&&Dt(e.showTotp)&&await xe();return}try{const w=[Z(),ve().then(B=>{H((B==null?void 0:B.registrations)||[])})];O()&&Dt(e.showTotp)&&w.push(xe()),await Promise.all(w)}finally{Tt(!1)}});async function Et(){return await(await fetch(`${e.domain}/api/v1/users/self`,ge("get"))).json()}function ge(x="get"){return{method:x,mode:"cors",cache:"no-cache",headers:{"Content-Type":"application",Authorization:`bearer ${uu()}`}}}function g(){if(le())return;ce(!0);let x=ge("post");x.body=JSON.stringify({keyName:r(),sectorID:e.sector}),fetch(`${e.domain}/api/v1/webauthn/registration/begin`,x).then(w=>{if(w.status===200)return w.json();throw w}).then(w=>(console.log(w),k(w))).catch(w=>{w.json?w.json().then(B=>{s(B.message)}):s(w)}).finally(()=>{ce(!1)})}async function k(x){try{const w=zn(x.Options);console.log("Parsed WebAuthn creation options:",w);const B=await Rn(w),W=JSON.stringify(B);let F=JSON.parse(W);F.transactionID=x.TransactionID;let S=ge("post");S.body=JSON.stringify(F);const T=await fetch(`${e.domain}/api/v1/webauthn/registration/finish`,S);if(T.status!==200){const _=await T.json();s(_.message);return}$(!1),i(""),Z()}catch(w){console.error("WebAuthn registration error:",w),s((w==null?void 0:w.message)||String(w))}}async function G(x){let w=ge("delete");w.body=JSON.stringify({ID:x});try{if((await fetch(`${e.domain}/api/v1/webauthn/${x}`,w)).status!==200){s(v.i18n("error-webauthn-remove"));return}Z()}catch(B){console.error(B),s(v.i18n("error-webauthn-remove"));return}}async function Z(){let x=ge("get");try{const B=await(await fetch(`${e.domain}/api/v1/webauthn/registration/list`,x)).json();q(B.registrations||[])}catch(w){console.error(w),q([])}}function ae(x,w){le()||(ce(!0),Ae(x,w).then(B=>{if(B)return ve().then(W=>{H(W.registrations),te(B.transactionID),Fe(!0)})}).finally(()=>{ce(!1)}))}function Ae(x,w){let B=ge("post");return B.body=JSON.stringify({destination:x,OTPType:$t(w),sectorID:e.sector}),fetch(`${e.domain}/api/v1/otp/begin`,B).then(W=>{if(W.status!==200){s(v.i18n("error-otp-verification"));return}return W.json()}).catch(W=>{console.error(W),s(v.i18n("error-otp-registration"))})}function Ve(x,w){if(le())return;ce(!0);let B=ge("post");B.body=JSON.stringify({transactionID:x,password:w}),fetch(`${e.domain}/api/v1/otp/finish`,B).then(W=>{if(W.status!==200){m(v.i18n("error-otp-verification"));return}return Fe(!1),De(""),U(!1),I(""),ke(""),ve().then(F=>{H(F.registrations)}),W.json()}).catch(W=>{console.error(W),m(v.i18n("error-otp-registration"))}).finally(()=>{ce(!1)})}async function ve(){let x=ge("get");try{return await(await fetch(`${e.domain}/api/v1/otp/list`,x)).json()}catch(w){console.error(w),s(v.i18n("error-otp-list"));return}}async function Xe(x){let w=ge("delete");w.body=JSON.stringify({ID:x});try{if((await fetch(`${e.domain}/api/v1/otp/${x}`,w)).status!==200){s(v.i18n("error-otp-remove"));return}ve().then(W=>{H(W.registrations)})}catch(B){console.error(B),s(v.i18n("error-otp-remove"));return}}function f(){Ye(""),Te(""),Ue(""),st("")}async function xe(){const x=t()||"self";try{const w=await fetch(`${e.domain}/api/v1/totp/${encodeURIComponent(x)}?sectorID=${encodeURIComponent(e.sector)}`,ge("get"));if(!w.ok){s(v.i18n("error-totp-list")),re([]);return}const B=await w.json();re(B.registrations||[])}catch(w){console.error(w),s(v.i18n("error-totp-list")),re([])}}function Qe(){if(le()||ye().trim()==="")return;ce(!0),s(""),m("");const x=ge("post");x.body=JSON.stringify({sectorID:e.sector,email:t(),displayName:ye().trim()}),fetch(`${e.domain}/api/v1/totp/begin`,x).then(async w=>{if(w.status!==200){const W=await w.json().catch(()=>({}));s(W.message||v.i18n("sa-totp-enroll-error"));return}const B=await w.json();te(B.transactionID||""),Ue(B.registrationID||""),Ye(B.secret||""),Te(B.otpauthURL||""),st(""),Me(!1),it(!0)}).catch(w=>{console.error(w),s(v.i18n("sa-totp-enroll-error"))}).finally(()=>{ce(!1)})}function at(){if(le())return;const x=Ct().replace(/\s+/g,"");if(!x){m(v.i18n("sa-totp-invalid"));return}ce(!0),m("");const w=ge("post");w.body=JSON.stringify({sectorID:e.sector,email:t(),transactionID:$e(),registrationID:ot(),code:x}),fetch(`${e.domain}/api/v1/totp/finish`,w).then(async B=>{if(B.status!==200){const S=await B.json().catch(()=>({}));m(S.message||v.i18n("sa-totp-invalid"));return}const W=await B.json(),F=Array.isArray(W.recoveryCodes)?W.recoveryCodes.filter(S=>!!S):[];f(),it(!1),Le(""),await xe(),F.length>0&&(ht(F),Oe(!0))}).catch(B=>{console.error(B),m(v.i18n("sa-totp-invalid"))}).finally(()=>{ce(!1)})}function Ft(){const x=ot();f(),it(!1),m(""),x&&Re(x)}function ze(){ht([]),Oe(!1)}async function Re(x){const w=ge("delete");w.body=JSON.stringify({ID:x});try{const B=await fetch(`${e.domain}/api/v1/totp/${encodeURIComponent(x)}`,w);if(B.status!==200){B.status===403?s(v.i18n("sa-totp-last-factor")):s(v.i18n("error-totp-remove"));return}await xe()}catch(B){console.error(B),s(v.i18n("error-totp-remove"))}}function $t(x){return x==="EMAIL"?2:1}return(()=>{var x=ol(),w=x.firstChild,B=w.nextSibling,W=B.nextSibling;return c(B,qe),c(W,()=>v.i18n("sa-account-settings")),c(x,o&&(()=>{var F=dn();return c(F,o),F})(),null),c(x,gr(Dr,{get when(){return!At()},get fallback(){return(()=>{var F=sl(),S=F.firstChild,T=S.nextSibling;return c(S,()=>v.i18n("sa-loading")),c(F,(()=>{var _=h(()=>!!y());return()=>_()&&al()})(),T),c(F,(()=>{var _=h(()=>!!Dt(e.showTotp));return()=>_()&&ul()})(),null),F})()},get children(){return[h(()=>h(()=>!!(y()&&je().length))()&&(()=>{var F=ll(),S=F.firstChild,T=S.nextSibling;return c(S,()=>v.i18n("sa-webauthn-security-keys")),c(T,()=>je().map(_=>(()=>{var L=cl(),N=L.firstChild,j=N.nextSibling;return c(N,()=>_.keyName),j.$$click=()=>{confirm(v.i18n("sa-confirm-delete-key"))&&G(_.keyName)},c(j,()=>v.i18n("sa-remove")),L})()),null),c(T,(()=>{var _=h(()=>je().length<=0);return()=>_()&&(()=>{var L=hn();return c(L,()=>v.i18n("sa-no-security-keys")),L})()})(),null),F})()),h(()=>h(()=>!!y())()&&(()=>{var F=dl(),S=F.firstChild;return c(S,(()=>{var T=h(()=>!p());return()=>T()&&(()=>{var _=hl();return _.firstChild,_.$$click=()=>$(!0),c(_,()=>v.i18n("sa-add-security-key"),null),_})()})(),null),c(S,(()=>{var T=h(()=>!!p());return()=>T()&&(()=>{var _=fl(),L=_.firstChild,N=L.firstChild,j=N.nextSibling,z=j.nextSibling,P=z.nextSibling;return c(N,()=>v.i18n("sa-webauthn-key-name")),j.$$input=M=>i(M.currentTarget.value),z.$$click=()=>$(!1),c(z,()=>v.i18n("sa-cancel")),P.$$click=()=>r()!==""&&g(),c(P,()=>v.i18n("sa-register")),E(M=>{var de=v.i18n("sa-webauthn-key-name"),we=r()===""||le();return de!==M.e&&Y(j,"placeholder",M.e=de),we!==M.t&&(P.disabled=M.t=we),M},{e:void 0,t:void 0}),E(()=>j.value=r()),_})()})(),null),F})()),h(()=>h(()=>me().length>0)()&&(()=>{var F=pl(),S=F.firstChild,T=S.nextSibling,_=T.firstChild,L=_.firstChild,N=L.firstChild,j=N.nextSibling,z=j.nextSibling,P=_.nextSibling;return c(S,()=>v.i18n("sa-mfa")),c(N,()=>v.i18n("sa-mfa-destination")),c(j,()=>v.i18n("sa-mfa-validated")),c(z,()=>v.i18n("sa-mfa-action")),c(P,()=>me().map(M=>(()=>{var de=gl(),we=de.firstChild,Ne=we.nextSibling,ue=Ne.nextSibling,et=ue.firstChild;return c(we,()=>M.DisplayName),c(Ne,(()=>{var tt=h(()=>!!M.Validated);return()=>tt()?(()=>{var _e=hn();return c(_e,()=>v.i18n("sa-yes")),_e})():(()=>{var _e=ml(),ft=_e.firstChild,kt=ft.nextSibling;return c(_e,()=>v.i18n("sa-no"),ft),kt.$$click=()=>{ae(M.DisplayName,M.Type==="email"?"EMAIL":"SMS")},c(kt,()=>v.i18n("sa-validate")),E(()=>kt.disabled=le()),_e})()})()),et.$$click=()=>{confirm(v.i18n("sa-confirm-delete-key"))&&Xe(M.ID)},c(et,()=>v.i18n("sa-remove")),E(()=>Y(we,"title",M.DisplayName)),de})())),F})()),h(()=>h(()=>!fe())()&&(()=>{var F=nr(),S=F.firstChild,T=S.firstChild;return T.firstChild,T.$$click=()=>U(!0),c(T,()=>v.i18n("sa-register-mfa"),null),F})()),h(()=>h(()=>!!fe())()&&(()=>{var F=Dl(),S=F.firstChild,T=S.nextSibling,_=T.firstChild,L=_.firstChild,N=L.nextSibling,j=N.nextSibling,z=_.nextSibling,P=z.firstChild,M=P.nextSibling,de=M.nextSibling,we=z.nextSibling,Ne=we.firstChild;return c(S,()=>v.i18n("sa-add-mfa")),c(L,()=>v.i18n("sa-email")),N.$$input=ue=>ke(ue.currentTarget.value),j.$$click=()=>ae(Ce(),"EMAIL"),c(j,()=>v.i18n("sa-add-email")),c(P,()=>v.i18n("sa-phone")),M.$$input=ue=>I(ue.currentTarget.value),de.$$click=()=>ae(ne(),"SMS"),c(de,()=>v.i18n("sa-add-sms")),Ne.$$click=()=>U(!1),c(Ne,()=>v.i18n("sa-cancel")),E(ue=>{var et=v.i18n("sa-email"),tt=le(),_e=v.i18n("sa-phone"),ft=le();return et!==ue.e&&Y(N,"placeholder",ue.e=et),tt!==ue.t&&(j.disabled=ue.t=tt),_e!==ue.a&&Y(M,"placeholder",ue.a=_e),ft!==ue.o&&(de.disabled=ue.o=ft),ue},{e:void 0,t:void 0,a:void 0,o:void 0}),E(()=>N.value=Ce()),E(()=>M.value=ne()),F})()),h(()=>h(()=>!!Dt(e.showTotp))()&&(()=>{var F=vl(),S=F.firstChild;return c(S,()=>v.i18n("sa-totp-title")),c(F,(()=>{var T=h(()=>V().length===0);return()=>T()&&(()=>{var _=hn();return c(_,()=>v.i18n("sa-totp-none")),_})()})(),null),c(F,(()=>{var T=h(()=>V().length>0);return()=>T()&&(()=>{var _=bl(),L=_.firstChild,N=L.firstChild,j=N.firstChild,z=j.nextSibling,P=z.nextSibling,M=L.nextSibling;return c(j,()=>v.i18n("sa-totp-name")),c(z,()=>v.i18n("sa-mfa-validated")),c(P,()=>v.i18n("sa-mfa-action")),c(M,()=>V().map(de=>(()=>{var we=Cl(),Ne=we.firstChild,ue=Ne.nextSibling,et=ue.nextSibling,tt=et.firstChild;return c(Ne,()=>de.DisplayName),c(ue,(()=>{var _e=h(()=>!!de.Validated);return()=>_e()?v.i18n("sa-yes"):v.i18n("sa-no")})()),tt.$$click=()=>{confirm(v.i18n("sa-confirm-delete-totp"))&&Re(de.ID)},c(tt,()=>v.i18n("sa-remove")),E(()=>Y(Ne,"title",de.DisplayName)),we})())),_})()})(),null),F})()),h(()=>h(()=>!!(Dt(e.showTotp)&&!se()))()&&(()=>{var F=nr(),S=F.firstChild,T=S.firstChild;return T.firstChild,T.$$click=()=>Me(!0),c(T,()=>v.i18n("sa-totp-add"),null),F})()),h(()=>h(()=>!!(Dt(e.showTotp)&&se()))()&&(()=>{var F=wl(),S=F.firstChild,T=S.firstChild,_=T.firstChild,L=_.nextSibling,N=L.nextSibling,j=N.nextSibling;return c(_,()=>v.i18n("sa-totp-name")),L.$$input=z=>Le(z.currentTarget.value),N.$$click=()=>{Me(!1),Le("")},c(N,()=>v.i18n("sa-cancel")),j.$$click=()=>Qe(),c(j,()=>v.i18n("sa-register")),E(z=>{var P=v.i18n("sa-totp-name"),M=ye().trim()===""||le();return P!==z.e&&Y(L,"placeholder",z.e=P),M!==z.t&&(j.disabled=z.t=M),z},{e:void 0,t:void 0}),E(()=>L.value=ye()),F})()),h(()=>h(()=>!!Pe())()&&(()=>{var F=yl(),S=F.firstChild,T=S.firstChild,_=T.nextSibling,L=_.nextSibling,N=L.nextSibling,j=N.nextSibling;return F.$$click=()=>Fe(!1),S.$$click=z=>z.stopPropagation(),T.$$click=()=>Fe(!1),c(S,(()=>{var z=h(()=>!!l());return()=>z()&&(()=>{var P=dn();return c(P,l),P})()})(),L),N.$$input=z=>De(z.currentTarget.value),j.$$click=()=>Ve($e(),pe()),E(()=>j.disabled=le()),E(()=>N.value=pe()),F})()),h(()=>h(()=>!!vt())()&&(()=>{var F=Al(),S=F.firstChild,T=S.firstChild,_=T.nextSibling,L=_.nextSibling,N=L.nextSibling,j=N.nextSibling,z=j.nextSibling;return F.$$click=()=>Ft(),S.$$click=P=>P.stopPropagation(),T.$$click=()=>Ft(),c(_,()=>v.i18n("sa-totp-enroll-title")),c(S,(()=>{var P=h(()=>!!l());return()=>P()&&(()=>{var M=dn();return c(M,l),M})()})(),L),c(L,()=>v.i18n("sa-totp-enroll-prompt")),c(S,(()=>{var P=h(()=>!!Ze());return()=>P()&&(()=>{var M=El();return E(()=>M.innerHTML=Zn(Ze())),M})()})(),N),j.$$input=P=>st(P.currentTarget.value),z.$$click=()=>at(),c(z,()=>v.i18n("sa-totp-enroll-verify")),E(P=>{var M=v.i18n("sa-totp-secret"),de=v.i18n("sa-totp-code"),we=le();return M!==P.e&&Y(N,"aria-label",P.e=M),de!==P.t&&Y(j,"placeholder",P.t=de),we!==P.a&&(z.disabled=P.a=we),P},{e:void 0,t:void 0,a:void 0}),E(()=>N.value=bt()),E(()=>j.value=Ct()),F})()),h(()=>h(()=>!!dt())()&&(()=>{var F=Fl(),S=F.firstChild,T=S.firstChild,_=T.nextSibling,L=_.nextSibling,N=L.nextSibling;return c(T,()=>v.i18n("sa-totp-recovery-title")),c(_,()=>v.i18n("sa-totp-recovery-prompt")),c(L,()=>wt().map(j=>(()=>{var z=$l(),P=z.firstChild;return c(P,j),z})())),N.$$click=()=>ze(),c(N,()=>v.i18n("sa-totp-recovery-saved")),F})())]}}),null),x})()}),Ht(["click","input"]);var Bl=b(`<form class=invite-frame><style>.invite-frame {
|
|
326
450
|
display: flex;
|
|
327
451
|
flex-direction: column;
|
|
328
452
|
justify-content: center;
|
|
@@ -423,4 +547,4 @@
|
|
|
423
547
|
opacity: 0.6;
|
|
424
548
|
cursor: not-allowed;
|
|
425
549
|
}
|
|
426
|
-
</style><style></style><h1></h1><input type=text autocomplete=one-time-code required><span class=hint></span><input type=password autocomplete=new-password required minlength=8><span class=hint></span><button type=submit>`),
|
|
550
|
+
</style><style></style><h1></h1><input type=text autocomplete=one-time-code required><span class=hint></span><input type=password autocomplete=new-password required minlength=8><span class=hint></span><button type=submit>`),_l=b("<span class=info-message>"),Sl=b("<span class=error-message>"),Tl=b("<span class=success-message>"),Il=b("<div class=social-divider><span>"),Pl=b("<button type=button class=social-btn>"),Ml=b('<svg width=18 height=18 viewBox="0 0 18 18"xmlns=http://www.w3.org/2000/svg><path d="M17.64 9.2c0-.637-.057-1.251-.164-1.84H9v3.481h4.844c-.209 1.125-.843 2.078-1.796 2.717v2.258h2.908c1.702-1.567 2.684-3.875 2.684-6.615z"fill=#4285F4></path><path d="M9 18c2.43 0 4.467-.806 5.956-2.184l-2.908-2.258c-.806.54-1.837.86-3.048.86-2.344 0-4.328-1.584-5.036-3.711H.957v2.332C2.438 15.983 5.482 18 9 18z"fill=#34A853></path><path d="M3.964 10.707c-.18-.54-.282-1.117-.282-1.707s.102-1.167.282-1.707V4.961H.957C.347 6.175 0 7.548 0 9s.348 2.825.957 4.039l3.007-2.332z"fill=#FBBC05></path><path d="M9 3.58c1.321 0 2.508.454 3.44 1.345l2.582-2.58C13.463.891 11.426 0 9 0 5.482 0 2.438 2.017.957 4.961L3.964 7.293C4.672 5.166 6.656 3.58 9 3.58z"fill=#EA4335>'),Ol=b('<svg width=18 height=18 viewBox="0 0 16 16"xmlns=http://www.w3.org/2000/svg><path fill-rule=evenodd d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"fill=currentColor>'),zl=b('<svg width=18 height=18 viewBox="20 16 16 19"xmlns=http://www.w3.org/2000/svg><path d="M28.2226562,20.3846154 C29.0546875,20.3846154 30.0976562,19.8048315 30.71875,19.0317864 C31.28125,18.3312142 31.6914062,17.352829 31.6914062,16.3744437 C31.6914062,16.2415766 31.6796875,16.1087095 31.65625,16 C30.7304687,16.0362365 29.6171875,16.640178 28.9492187,17.4494596 C28.421875,18.06548 27.9414062,19.0317864 27.9414062,20.0222505 C27.9414062,20.1671964 27.9648438,20.3121424 27.9765625,20.3604577 C28.0351562,20.3725366 28.1289062,20.3846154 28.2226562,20.3846154 Z M25.2929688,35 C26.4296875,35 26.9335938,34.214876 28.3515625,34.214876 C29.7929688,34.214876 30.109375,34.9758423 31.375,34.9758423 C32.6171875,34.9758423 33.4492188,33.792117 34.234375,32.6325493 C35.1132812,31.3038779 35.4765625,29.9993643 35.5,29.9389701 C35.4179688,29.9148125 33.0390625,28.9122695 33.0390625,26.0979021 C33.0390625,23.6579784 34.9140625,22.5588048 35.0195312,22.474253 C33.7773438,20.6382708 31.890625,20.5899555 31.375,20.5899555 C29.9804688,20.5899555 28.84375,21.4596313 28.1289062,21.4596313 C27.3554688,21.4596313 26.3359375,20.6382708 25.1289062,20.6382708 C22.8320312,20.6382708 20.5,22.5950413 20.5,26.2911634 C20.5,28.5861411 21.3671875,31.013986 22.4335938,32.5842339 C23.3476562,33.9129053 24.1445312,35 25.2929688,35 Z"fill=currentColor fill-rule=nonzero>'),Rl=b('<svg width=18 height=18 viewBox="0 0 24 24"xmlns=http://www.w3.org/2000/svg><path d="M12 1L3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4zm0 4a3 3 0 110 6 3 3 0 010-6zm0 14c-2.5 0-4.71-1.28-6-3.22.03-1.99 4-3.08 6-3.08s5.97 1.09 6 3.08c-1.29 1.94-3.5 3.22-6 3.22z"fill=currentColor>');Zt("spartan-invite",{domain:"http://127.0.0.1:11000",sector:"0ad5c3e5-0186-4557-8b32-4b36f247bf09",sub:"",email:"",styles:"",locale:"en",redirect:"",hideSocial:!1},e=>{console.warn("[spartan-invite] <spartan-invite> is deprecated. Use <spartan-login> instead — it now handles invite links by detecting ?sub= URL params automatically.");const[t,n]=C(""),[r,i]=C(""),[o,s]=C(""),[l,m]=C(""),[y,p]=C(!1),[$,O]=C([]),[ee,fe]=C(""),U=Xt(e.locale);let Pe,Fe;try{Fe=e.styles}catch{Fe=""}Gt(async()=>{e.sub||new URLSearchParams(window.location.search).get("sub")||s("Missing invitation information. Please use the link from your invite email.");const me=new URLSearchParams(window.location.hash.replace("#","")).get("otp");me&&n(me),ce()});async function le(q){var $e,te;if(q.preventDefault(),s(""),m(""),p(!0),!t()||t().trim().length===0){s("Please enter your verification code"),p(!1);return}if(!r()||r().length<8){s("Password must be at least 8 characters"),p(!1);return}const me=new URLSearchParams(window.location.search),H=e.sub||me.get("sub")||"";if(!H){s("Missing invitation information"),p(!1);return}try{const pe=await fetch(`${e.domain}/api/v1/users/invite/complete`,{method:"POST",mode:"cors",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify({sub:H,otp:t().toUpperCase().trim(),password:r(),sectorID:e.sector})});if(pe.ok){const De=await pe.json();m(U.i18n("sa-invite-success"));const Ce=new CustomEvent("spartan-invite-complete",{bubbles:!0,cancelable:!0,detail:{sub:H,success:!0}});Pe&&Pe.getRootNode().host.dispatchEvent(Ce),setTimeout(()=>{e.redirect&&e.redirect!==""&&(window.location.href=e.redirect)},2e3)}else{const De=await pe.json().catch(()=>({}));pe.status===400||($e=De.message)!=null&&$e.includes("invalid OTP")?s(U.i18n("sa-invite-error-otp")):pe.status===504||(te=De.message)!=null&&te.includes("expired")?s(U.i18n("sa-invite-error-expired")):s(De.message||U.i18n("sa-invite-error-generic")),p(!1)}}catch(pe){console.error("Error completing invite:",pe),s(U.i18n("sa-invite-error-generic")),p(!1)}}function ce(){e.hideSocial||fetch(`${e.domain}/api/v1/sectors/${e.sector}/oauth/providers`,{method:"GET",mode:"cors",cache:"no-cache"}).then(q=>{if(q.ok)return q.json();throw new Error("Failed to load social providers")}).then(q=>{const me=(q.providers||[]).filter(H=>H.enabled);O(me)}).catch(()=>{})}function je(q){if(ee())return;fe(q),s("");const me=window.location.origin+window.location.pathname;fetch(`${e.domain}/api/v1/oauth/${q}/initiate`,{method:"POST",mode:"cors",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify({sectorID:e.sector,redirectURI:me})}).then(H=>{if(H.ok)return H.json();throw new Error(U.i18n("sa-social-error"))}).then(H=>{window.location.href=H.authURL}).catch(H=>{fe(""),s(H.message)})}return(()=>{var q=Bl(),me=q.firstChild,H=me.nextSibling,$e=H.nextSibling,te=$e.nextSibling,pe=te.nextSibling,De=pe.nextSibling,Ce=De.nextSibling,ke=Ce.nextSibling,ne=Pe;return typeof ne=="function"?wn(ne,q):Pe=q,q.addEventListener("submit",le),c(H,Fe),c($e,()=>U.i18n("sa-complete-invite")),c(q,(()=>{var I=h(()=>!!e.email);return()=>I()&&(()=>{var V=_l();return c(V,()=>e.email),V})()})(),te),c(q,(()=>{var I=h(()=>!!o());return()=>I()&&(()=>{var V=Sl();return c(V,o),V})()})(),te),c(q,(()=>{var I=h(()=>!!l());return()=>I()&&(()=>{var V=Tl();return c(V,l),V})()})(),te),te.$$input=I=>n(I.currentTarget.value),c(pe,()=>U.i18n("sa-invite-otp-hint")),De.$$input=I=>i(I.currentTarget.value),c(Ce,()=>U.i18n("sa-invite-password-hint")),c(ke,(()=>{var I=h(()=>!!y());return()=>I()?U.i18n("sa-invite-completing"):U.i18n("sa-invite-submit")})()),c(q,(()=>{var I=h(()=>!e.hideSocial&&$().length>0);return()=>I()&&[(()=>{var V=Il(),re=V.firstChild;return c(re,()=>U.i18n("sa-or")),V})(),h(()=>$().map(V=>(()=>{var re=Pl();return re.$$click=()=>je(V.provider),c(re,(()=>{var se=h(()=>V.provider==="google");return()=>se()&&Ml()})(),null),c(re,(()=>{var se=h(()=>V.provider==="github");return()=>se()&&Ol()})(),null),c(re,(()=>{var se=h(()=>V.provider==="apple");return()=>se()&&zl()})(),null),c(re,(()=>{var se=h(()=>V.provider==="oidc");return()=>se()&&Rl()})(),null),c(re,(()=>{var se=h(()=>V.provider==="google");return()=>se()?U.i18n("sa-social-google"):h(()=>V.provider==="github")()?U.i18n("sa-social-github"):h(()=>V.provider==="apple")()?U.i18n("sa-social-apple"):U.i18n("sa-social-oidc")})(),null),E(()=>re.disabled=!!ee()||y()),re})()))]})(),null),E(I=>{var V=U.i18n("sa-invite-otp"),re=y()||l()!=="",se=U.i18n("sa-invite-password"),Me=y()||l()!=="",ye=y()||l()!=="";return V!==I.e&&Y(te,"placeholder",I.e=V),re!==I.t&&(te.disabled=I.t=re),se!==I.a&&Y(De,"placeholder",I.a=se),Me!==I.o&&(De.disabled=I.o=Me),ye!==I.i&&(ke.disabled=I.i=ye),I},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),E(()=>te.value=t()),E(()=>De.value=r()),q})()}),Ht(["input","click"])});
|