diff --git a/css/password_policy-settings.css b/css/password_policy-settings.css index 6d48e100..d9b21ec7 100644 --- a/css/password_policy-settings.css +++ b/css/password_policy-settings.css @@ -18,4 +18,4 @@ * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see . * - */.material-design-icon[data-v-f51cf2d3]{display:flex;align-self:center;justify-self:center;align-items:center;justify-content:center}.settings-section[data-v-f51cf2d3]{display:block;margin-bottom:auto;padding:30px}.settings-section[data-v-f51cf2d3]:not(:last-child){border-bottom:1px solid var(--color-border)}.settings-section--limit-width>*[data-v-f51cf2d3]{max-width:900px}.settings-section__name[data-v-f51cf2d3]{display:inline-flex;align-items:center;justify-content:center;font-size:20px;font-weight:700;max-width:900px}.settings-section__info[data-v-f51cf2d3]{display:flex;align-items:center;justify-content:center;width:44px;height:44px;margin:-14px -14px -14px 0;color:var(--color-text-maxcontrast)}.settings-section__info[data-v-f51cf2d3]:hover,.settings-section__info[data-v-f51cf2d3]:focus,.settings-section__info[data-v-f51cf2d3]:active{color:var(--color-main-text)}.settings-section__desc[data-v-f51cf2d3]{margin-top:-.2em;margin-bottom:1em;color:var(--color-text-maxcontrast);max-width:900px}.password-policy__settings-list li input[type=number][data-v-8f810681]{width:75px}.password-policy__settings-list+.password-policy__settings-list[data-v-8f810681]{margin-top:8px}.havibeenpwned-hint[data-v-8f810681]{opacity:.7;padding-left:28px} + */.material-design-icon[data-v-f51cf2d3]{display:flex;align-self:center;justify-self:center;align-items:center;justify-content:center}.settings-section[data-v-f51cf2d3]{display:block;margin-bottom:auto;padding:30px}.settings-section[data-v-f51cf2d3]:not(:last-child){border-bottom:1px solid var(--color-border)}.settings-section--limit-width>*[data-v-f51cf2d3]{max-width:900px}.settings-section__name[data-v-f51cf2d3]{display:inline-flex;align-items:center;justify-content:center;font-size:20px;font-weight:700;max-width:900px}.settings-section__info[data-v-f51cf2d3]{display:flex;align-items:center;justify-content:center;width:44px;height:44px;margin:-14px -14px -14px 0;color:var(--color-text-maxcontrast)}.settings-section__info[data-v-f51cf2d3]:hover,.settings-section__info[data-v-f51cf2d3]:focus,.settings-section__info[data-v-f51cf2d3]:active{color:var(--color-main-text)}.settings-section__desc[data-v-f51cf2d3]{margin-top:-.2em;margin-bottom:1em;color:var(--color-text-maxcontrast);max-width:900px}.password-policy__settings-list li input[type=number][data-v-b3dc503b]{width:75px}.password-policy__settings-list+.password-policy__settings-list[data-v-b3dc503b]{margin-top:8px}.havibeenpwned-hint[data-v-b3dc503b]{opacity:.7;padding-left:28px} diff --git a/js/password_policy-settings.mjs b/js/password_policy-settings.mjs index 313fc99e..928908db 100644 --- a/js/password_policy-settings.mjs +++ b/js/password_policy-settings.mjs @@ -910,4 +910,4 @@ Language-Team: Zulu (South Africa) (https://app.transifex.com/nextcloud/teams/64 Content-Type: text/plain; charset=UTF-8 Language: zu_ZA Plural-Forms: nplurals=2; plural=(n != 1); -`]},Undo:{msgid:"Undo",comments:{reference:"lib/toast.ts:223"},msgstr:[""]}}}}}].map(e=>rl.addTranslation(e.locale,e.json));const bn=rl.build();bn.ngettext.bind(bn),bn.gettext.bind(bn);const Lc="off",Sc="polite",Nc="assertive";var Hs=(e=>(e[e.OFF=Lc]="OFF",e[e.POLITE=Sc]="POLITE",e[e.ASSERTIVE=Nc]="ASSERTIVE",e))(Hs||{});const Ac=7e3;function al(e,n){if(n=Object.assign({timeout:Ac,isHTML:!1,type:void 0,selector:void 0,onRemove:()=>{},onClick:void 0,close:!0},n),typeof e=="string"&&!n.isHTML){const l=document.createElement("div");l.innerHTML=e,e=l.innerText}let s=n.type??"";typeof n.onClick=="function"&&(s+=" toast-with-click ");const r=e instanceof Node;let a=Hs.POLITE;n.ariaLive?a=n.ariaLive:(n.type==="toast-error"||n.type==="toast-undo")&&(a=Hs.ASSERTIVE);const o=F0({[r?"node":"text"]:e,duration:n.timeout,callback:n.onRemove,onClick:n.onClick,close:n.close,gravity:"top",selector:n.selector,position:"right",backgroundColor:"",className:"dialogs "+s,escapeMarkup:!n.isHTML,ariaLive:a});return o.showToast(),o}function Ra(e,n){return al(e,{...n,type:"toast-error"})}function Dc(e,n){return al(e,{...n,type:"toast-success"})}function Uc(e,n,s){const r=document.querySelector(`#initial-state-${e}-${n}`);if(r===null){if(s!==void 0)return s;throw new Error(`Could not find initial state ${n} of ${e}`)}try{return JSON.parse(atob(r.value))}catch{throw new Error(`Could not parse initial state ${n} of ${e}`)}}function ve(e,n,s,r,a,o,l,i){var u=typeof e=="function"?e.options:e;n&&(u.render=n,u.staticRenderFns=s,u._compiled=!0),r&&(u.functional=!0),o&&(u._scopeId="data-v-"+o);var c;if(l?(c=function(v){v=v||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,!v&&typeof __VUE_SSR_CONTEXT__<"u"&&(v=__VUE_SSR_CONTEXT__),a&&a.call(this,v),v&&v._registeredComponents&&v._registeredComponents.add(l)},u._ssrRegister=c):a&&(c=i?function(){a.call(this,(u.functional?this.parent:this).$root.$options.shadowRoot)}:a),c)if(u.functional){u._injectStyles=c;var g=u.render;u.render=function(v,w){return c.call(w),g(v,w)}}else{var x=u.beforeCreate;u.beforeCreate=x?[].concat(x,c):[c]}return{exports:e,options:u}}const Bc={name:"NcLoadingIcon",props:{size:{type:Number,default:20},appearance:{type:String,validator(e){return["auto","light","dark"].includes(e)},default:"auto"},name:{type:String,default:""}},computed:{colors(){const e=["#777","#CCC"];return this.appearance==="light"?e:this.appearance==="dark"?e.reverse():["var(--color-loading-light)","var(--color-loading-dark)"]}}};var Pc=function(){var e=this,n=e._self._c;return n("span",{staticClass:"material-design-icon loading-icon",attrs:{"aria-label":e.name,role:"img"}},[n("svg",{attrs:{width:e.size,height:e.size,viewBox:"0 0 24 24"}},[n("path",{attrs:{fill:e.colors[0],d:"M12,4V2A10,10 0 1,0 22,12H20A8,8 0 1,1 12,4Z"}}),n("path",{attrs:{fill:e.colors[1],d:"M12,4V2A10,10 0 0,1 22,12H20A8,8 0 0,0 12,4Z"}},[e.name?n("title",[e._v(e._s(e.name))]):e._e()])])])},Mc=[],zc=ve(Bc,Pc,Mc,!1,null,"626664cd",null,null);const jc=zc.exports,Je=sl().detectLocale().build(),Oc=Je.ngettext.bind(Je),ol=Je.gettext.bind(Je),ll=(...e)=>{e.forEach(n=>{n.registered||(n.forEach(({l:s,t:r})=>{const a=Object.fromEntries(Object.entries(r).map(([o,l])=>[o,{msgid:o,msgid_plural:l.p,msgstr:l.v}]));Je.gt.catalogs[s]||(Je.gt.catalogs[s]={messages:{translations:{}}}),Je.gt.catalogs[s].messages.translations[""]={...Je.gt.catalogs[s].messages.translations[""],...a}}),n.registered=!0)})},Rc=[{l:"af",t:{"External documentation for {name}":{v:[""]}}},{l:"ar",t:{"External documentation for {name}":{v:["التوثيق الخارجي لـ {name}"]}}},{l:"ast",t:{"External documentation for {name}":{v:["Documentación esterna pa: {name}"]}}},{l:"az",t:{"External documentation for {name}":{v:[""]}}},{l:"be",t:{"External documentation for {name}":{v:[""]}}},{l:"bg",t:{"External documentation for {name}":{v:[""]}}},{l:"bn_BD",t:{"External documentation for {name}":{v:[""]}}},{l:"br",t:{"External documentation for {name}":{v:[""]}}},{l:"bs",t:{"External documentation for {name}":{v:[""]}}},{l:"ca",t:{"External documentation for {name}":{v:[""]}}},{l:"cs",t:{"External documentation for {name}":{v:["Externí dokumentace pro {name}"]}}},{l:"cs_CZ",t:{"External documentation for {name}":{v:["Externí dokumentace pro {name}"]}}},{l:"cy_GB",t:{"External documentation for {name}":{v:[""]}}},{l:"da",t:{"External documentation for {name}":{v:[""]}}},{l:"de",t:{"External documentation for {name}":{v:["Externe Dokumentation für {name}"]}}},{l:"de_DE",t:{"External documentation for {name}":{v:["Externe Dokumentation für {name}"]}}},{l:"el",t:{"External documentation for {name}":{v:[""]}}},{l:"en_GB",t:{"External documentation for {name}":{v:["External documentation for {name}"]}}},{l:"eo",t:{"External documentation for {name}":{v:[""]}}},{l:"es",t:{"External documentation for {name}":{v:["Documentación externa para {name}"]}}},{l:"es_419",t:{"External documentation for {name}":{v:[""]}}},{l:"es_AR",t:{"External documentation for {name}":{v:[""]}}},{l:"es_CL",t:{"External documentation for {name}":{v:[""]}}},{l:"es_CO",t:{"External documentation for {name}":{v:[""]}}},{l:"es_CR",t:{"External documentation for {name}":{v:[""]}}},{l:"es_DO",t:{"External documentation for {name}":{v:[""]}}},{l:"es_EC",t:{"External documentation for {name}":{v:["Documentación externa para {name}"]}}},{l:"es_GT",t:{"External documentation for {name}":{v:[""]}}},{l:"es_HN",t:{"External documentation for {name}":{v:[""]}}},{l:"es_MX",t:{"External documentation for {name}":{v:[""]}}},{l:"es_NI",t:{"External documentation for {name}":{v:[""]}}},{l:"es_PA",t:{"External documentation for {name}":{v:[""]}}},{l:"es_PE",t:{"External documentation for {name}":{v:[""]}}},{l:"es_PR",t:{"External documentation for {name}":{v:[""]}}},{l:"es_PY",t:{"External documentation for {name}":{v:[""]}}},{l:"es_SV",t:{"External documentation for {name}":{v:[""]}}},{l:"es_UY",t:{"External documentation for {name}":{v:[""]}}},{l:"et_EE",t:{"External documentation for {name}":{v:[""]}}},{l:"eu",t:{"External documentation for {name}":{v:["{name}-ren kanpoko dokumentazioa"]}}},{l:"fa",t:{"External documentation for {name}":{v:[""]}}},{l:"fi",t:{"External documentation for {name}":{v:[""]}}},{l:"fo",t:{"External documentation for {name}":{v:[""]}}},{l:"fr",t:{"External documentation for {name}":{v:["Documentation externe pour {name}"]}}},{l:"gd",t:{"External documentation for {name}":{v:[""]}}},{l:"gl",t:{"External documentation for {name}":{v:["Documentación externa para {name}"]}}},{l:"he",t:{"External documentation for {name}":{v:["תיעוד חיצוני עבור {name}"]}}},{l:"hi_IN",t:{"External documentation for {name}":{v:[""]}}},{l:"hr",t:{"External documentation for {name}":{v:[""]}}},{l:"hsb",t:{"External documentation for {name}":{v:[""]}}},{l:"hu",t:{"External documentation for {name}":{v:[""]}}},{l:"hy",t:{"External documentation for {name}":{v:[""]}}},{l:"ia",t:{"External documentation for {name}":{v:[""]}}},{l:"id",t:{"External documentation for {name}":{v:["Dokumentasi eksternal untuk {name}"]}}},{l:"ig",t:{"External documentation for {name}":{v:[""]}}},{l:"is",t:{"External documentation for {name}":{v:["Utanaðkomandi leiðbeiningar fyrir {name}"]}}},{l:"it",t:{"External documentation for {name}":{v:["Documentazione esterna per {name}"]}}},{l:"ja",t:{"External documentation for {name}":{v:[""]}}},{l:"ka",t:{"External documentation for {name}":{v:[""]}}},{l:"ka_GE",t:{"External documentation for {name}":{v:[""]}}},{l:"kab",t:{"External documentation for {name}":{v:[""]}}},{l:"kk",t:{"External documentation for {name}":{v:[""]}}},{l:"km",t:{"External documentation for {name}":{v:[""]}}},{l:"kn",t:{"External documentation for {name}":{v:[""]}}},{l:"ko",t:{"External documentation for {name}":{v:[""]}}},{l:"la",t:{"External documentation for {name}":{v:[""]}}},{l:"lb",t:{"External documentation for {name}":{v:[""]}}},{l:"lo",t:{"External documentation for {name}":{v:[""]}}},{l:"lt_LT",t:{"External documentation for {name}":{v:[""]}}},{l:"lv",t:{"External documentation for {name}":{v:[""]}}},{l:"mk",t:{"External documentation for {name}":{v:[""]}}},{l:"mn",t:{"External documentation for {name}":{v:[""]}}},{l:"mr",t:{"External documentation for {name}":{v:[""]}}},{l:"ms_MY",t:{"External documentation for {name}":{v:[""]}}},{l:"my",t:{"External documentation for {name}":{v:[""]}}},{l:"nb",t:{"External documentation for {name}":{v:[""]}}},{l:"ne",t:{"External documentation for {name}":{v:[""]}}},{l:"nl",t:{"External documentation for {name}":{v:["Externe documentatie voor {name}"]}}},{l:"nn_NO",t:{"External documentation for {name}":{v:[""]}}},{l:"oc",t:{"External documentation for {name}":{v:[""]}}},{l:"pl",t:{"External documentation for {name}":{v:["Dokumentacja zewnętrzna dla {name}"]}}},{l:"ps",t:{"External documentation for {name}":{v:[""]}}},{l:"pt_BR",t:{"External documentation for {name}":{v:["Documentação externa para {name}"]}}},{l:"pt_PT",t:{"External documentation for {name}":{v:["Documentação externa para {name}"]}}},{l:"ro",t:{"External documentation for {name}":{v:["Documentație externă pentru {name}"]}}},{l:"ru",t:{"External documentation for {name}":{v:["Внешняя документация для {name}"]}}},{l:"sc",t:{"External documentation for {name}":{v:[""]}}},{l:"si",t:{"External documentation for {name}":{v:[""]}}},{l:"sk",t:{"External documentation for {name}":{v:[""]}}},{l:"sl",t:{"External documentation for {name}":{v:[""]}}},{l:"sq",t:{"External documentation for {name}":{v:[""]}}},{l:"sr",t:{"External documentation for {name}":{v:["Спољна документација за {name}"]}}},{l:"sr@latin",t:{"External documentation for {name}":{v:[""]}}},{l:"sv",t:{"External documentation for {name}":{v:["Extern dokumentation för {name}"]}}},{l:"sw",t:{"External documentation for {name}":{v:[""]}}},{l:"ta",t:{"External documentation for {name}":{v:[""]}}},{l:"th",t:{"External documentation for {name}":{v:[""]}}},{l:"tk",t:{"External documentation for {name}":{v:[""]}}},{l:"tr",t:{"External documentation for {name}":{v:["{name} için dış belgeler"]}}},{l:"ug",t:{"External documentation for {name}":{v:[""]}}},{l:"uk",t:{"External documentation for {name}":{v:["Зовнішня документація для {name}"]}}},{l:"ur_PK",t:{"External documentation for {name}":{v:[""]}}},{l:"uz",t:{"External documentation for {name}":{v:[""]}}},{l:"vi",t:{"External documentation for {name}":{v:[""]}}},{l:"zh_CN",t:{"External documentation for {name}":{v:[""]}}},{l:"zh_HK",t:{"External documentation for {name}":{v:["{name} 的外部文件"]}}},{l:"zh_TW",t:{"External documentation for {name}":{v:["{name} 的外部文件"]}}},{l:"zu_ZA",t:{"External documentation for {name}":{v:[""]}}}];ll();const $c=e=>Math.random().toString(36).replace(/[^a-z]+/g,"").slice(0,e||5),Ic={name:"CheckboxBlankOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var Hc=function(){var e=this,n=e._self._c;return n("span",e._b({staticClass:"material-design-icon checkbox-blank-outline-icon",attrs:{"aria-hidden":e.title?null:!0,"aria-label":e.title,role:"img"},on:{click:function(s){return e.$emit("click",s)}}},"span",e.$attrs,!1),[n("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[n("path",{attrs:{d:"M19,3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3M19,5V19H5V5H19Z"}},[e.title?n("title",[e._v(e._s(e.title))]):e._e()])])])},Vc=[],Jc=ve(Ic,Hc,Vc,!1,null,null,null,null);const Gc=Jc.exports,Kc={name:"MinusBoxIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var qc=function(){var e=this,n=e._self._c;return n("span",e._b({staticClass:"material-design-icon minus-box-icon",attrs:{"aria-hidden":e.title?null:!0,"aria-label":e.title,role:"img"},on:{click:function(s){return e.$emit("click",s)}}},"span",e.$attrs,!1),[n("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[n("path",{attrs:{d:"M17,13H7V11H17M19,3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3Z"}},[e.title?n("title",[e._v(e._s(e.title))]):e._e()])])])},Wc=[],Zc=ve(Kc,qc,Wc,!1,null,null,null,null);const Yc=Zc.exports,Xc={name:"CheckboxMarkedIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var Qc=function(){var e=this,n=e._self._c;return n("span",e._b({staticClass:"material-design-icon checkbox-marked-icon",attrs:{"aria-hidden":e.title?null:!0,"aria-label":e.title,role:"img"},on:{click:function(s){return e.$emit("click",s)}}},"span",e.$attrs,!1),[n("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[n("path",{attrs:{d:"M10,17L5,12L6.41,10.58L10,14.17L17.59,6.58L19,8M19,3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3Z"}},[e.title?n("title",[e._v(e._s(e.title))]):e._e()])])])},ed=[],td=ve(Xc,Qc,ed,!1,null,null,null,null);const nd=td.exports,sd={name:"RadioboxMarkedIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var rd=function(){var e=this,n=e._self._c;return n("span",e._b({staticClass:"material-design-icon radiobox-marked-icon",attrs:{"aria-hidden":e.title?null:!0,"aria-label":e.title,role:"img"},on:{click:function(s){return e.$emit("click",s)}}},"span",e.$attrs,!1),[n("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[n("path",{attrs:{d:"M12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4A8,8 0 0,1 20,12A8,8 0 0,1 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M12,7A5,5 0 0,0 7,12A5,5 0 0,0 12,17A5,5 0 0,0 17,12A5,5 0 0,0 12,7Z"}},[e.title?n("title",[e._v(e._s(e.title))]):e._e()])])])},ad=[],od=ve(sd,rd,ad,!1,null,null,null,null);const ld=od.exports,id={name:"RadioboxBlankIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var ud=function(){var e=this,n=e._self._c;return n("span",e._b({staticClass:"material-design-icon radiobox-blank-icon",attrs:{"aria-hidden":e.title?null:!0,"aria-label":e.title,role:"img"},on:{click:function(s){return e.$emit("click",s)}}},"span",e.$attrs,!1),[n("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[n("path",{attrs:{d:"M12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4A8,8 0 0,1 20,12A8,8 0 0,1 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z"}},[e.title?n("title",[e._v(e._s(e.title))]):e._e()])])])},md=[],cd=ve(id,ud,md,!1,null,null,null,null);const dd=cd.exports,pd={name:"ToggleSwitchOffIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var gd=function(){var e=this,n=e._self._c;return n("span",e._b({staticClass:"material-design-icon toggle-switch-off-icon",attrs:{"aria-hidden":e.title?null:!0,"aria-label":e.title,role:"img"},on:{click:function(s){return e.$emit("click",s)}}},"span",e.$attrs,!1),[n("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[n("path",{attrs:{d:"M17,7H7A5,5 0 0,0 2,12A5,5 0 0,0 7,17H17A5,5 0 0,0 22,12A5,5 0 0,0 17,7M7,15A3,3 0 0,1 4,12A3,3 0 0,1 7,9A3,3 0 0,1 10,12A3,3 0 0,1 7,15Z"}},[e.title?n("title",[e._v(e._s(e.title))]):e._e()])])])},fd=[],hd=ve(pd,gd,fd,!1,null,null,null,null);const vd=hd.exports,xd={name:"ToggleSwitchIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var yd=function(){var e=this,n=e._self._c;return n("span",e._b({staticClass:"material-design-icon toggle-switch-icon",attrs:{"aria-hidden":e.title?null:!0,"aria-label":e.title,role:"img"},on:{click:function(s){return e.$emit("click",s)}}},"span",e.$attrs,!1),[n("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[n("path",{attrs:{d:"M17,7H7A5,5 0 0,0 2,12A5,5 0 0,0 7,17H17A5,5 0 0,0 22,12A5,5 0 0,0 17,7M17,15A3,3 0 0,1 14,12A3,3 0 0,1 17,9A3,3 0 0,1 20,12A3,3 0 0,1 17,15Z"}},[e.title?n("title",[e._v(e._s(e.title))]):e._e()])])])},Td=[],Cd=ve(xd,yd,Td,!1,null,null,null,null);const Fd=Cd.exports,Et="checkbox",Lt="radio",$e="switch",Zt="button",wd={name:"NcCheckboxContent",components:{NcLoadingIcon:jc},props:{id:{type:String,default:null},iconClass:{type:[String,Object],default:null},textClass:{type:[String,Object],default:null},type:{type:String,default:"checkbox",validator:e=>[Et,Lt,$e,Zt].includes(e)},buttonVariant:{type:Boolean,default:!1},isChecked:{type:Boolean,default:!1},indeterminate:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},size:{type:Number,default:24}},computed:{isButtonType(){return this.type===Zt},checkboxRadioIconElement(){return this.type===Lt?this.isChecked?ld:dd:this.type===$e?this.isChecked?Fd:vd:this.indeterminate?Yc:this.isChecked?nd:Gc}}};var Ed=function(){var e=this,n=e._self._c;return n("span",{staticClass:"checkbox-content",class:{["checkbox-content-"+e.type]:!0,"checkbox-content--button-variant":e.buttonVariant,"checkbox-content--has-text":!!e.$slots.default},attrs:{id:e.isButtonType?void 0:"".concat(e.id,"-label")}},[n("span",{class:{"checkbox-content__icon":!0,"checkbox-content__icon--checked":e.isChecked,[e.iconClass]:!0},attrs:{"aria-hidden":!0,inert:""}},[e._t("icon",function(){return[e.loading?n("NcLoadingIcon"):e.buttonVariant?e._e():n(e.checkboxRadioIconElement,{tag:"component",attrs:{size:e.size}})]},{checked:e.isChecked,loading:e.loading})],2),e.$slots.default?n("span",{class:["checkbox-content__text",e.textClass]},[e._t("default")],2):e._e()])},bd=[],_d=ve(wd,Ed,bd,!1,null,"2672ad1a",null,null);const kd=_d.exports,Ld={name:"NcCheckboxRadioSwitch",components:{NcCheckboxContent:kd},props:{id:{type:String,default:()=>"checkbox-radio-switch-"+$c(),validator:e=>e.trim()!==""},wrapperId:{type:String,default:null},name:{type:String,default:null},ariaLabel:{type:String,default:""},type:{type:String,default:"checkbox",validator:e=>[Et,Lt,$e,Zt].includes(e)},buttonVariant:{type:Boolean,default:!1},buttonVariantGrouped:{type:String,default:"no",validator:e=>["no","vertical","horizontal"].includes(e)},checked:{type:[Boolean,Array,String],default:!1},value:{type:String,default:null},disabled:{type:Boolean,default:!1},indeterminate:{type:Boolean,default:!1},required:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},wrapperElement:{type:String,default:null}},emits:["update:checked"],computed:{isButtonType(){return this.type===Zt},computedWrapperElement(){return this.isButtonType?"button":this.wrapperElement!==null?this.wrapperElement:"span"},listeners(){return this.isButtonType?{click:this.onToggle}:{change:this.onToggle}},size(){return this.type===$e?36:24},cssVars(){return{"--icon-size":this.size+"px","--icon-height":(this.type===$e?16:this.size)+"px"}},inputType(){return[Et,Lt,Zt].includes(this.type)?this.type:Et},isChecked(){return this.value!==null?Array.isArray(this.checked)?[...this.checked].indexOf(this.value)>-1:this.checked===this.value:this.checked===!0},hasIndeterminate(){return[Et,Lt].includes(this.inputType)}},mounted(){if(this.name&&this.type===Et&&!Array.isArray(this.checked))throw new Error("When using groups of checkboxes, the updated value will be an array.");if(this.name&&this.type===$e)throw new Error("Switches are not made to be used for data sets. Please use checkboxes instead.");if(typeof this.checked!="boolean"&&this.type===$e)throw new Error("Switches can only be used with boolean as checked prop.")},methods:{t:ol,n:Oc,onToggle(){if(this.disabled)return;if(this.type===Lt){this.$emit("update:checked",this.value);return}if(this.type===$e){this.$emit("update:checked",!this.isChecked);return}if(typeof this.checked=="boolean"){this.$emit("update:checked",!this.checked);return}const e=this.getInputsSet().filter(n=>n.checked).map(n=>n.value);e.includes(this.value)?this.$emit("update:checked",e.filter(n=>n!==this.value)):this.$emit("update:checked",[...e,this.value])},getInputsSet(){return[...document.getElementsByName(this.name)]}}};var Sd=function(){var e=this,n=e._self._c;return n(e.computedWrapperElement,e._g({tag:"component",staticClass:"checkbox-radio-switch",class:{["checkbox-radio-switch-"+e.type]:e.type,"checkbox-radio-switch--checked":e.isChecked,"checkbox-radio-switch--disabled":e.disabled,"checkbox-radio-switch--indeterminate":e.hasIndeterminate?e.indeterminate:!1,"checkbox-radio-switch--button-variant":e.buttonVariant,"checkbox-radio-switch--button-variant-v-grouped":e.buttonVariant&&e.buttonVariantGrouped==="vertical","checkbox-radio-switch--button-variant-h-grouped":e.buttonVariant&&e.buttonVariantGrouped==="horizontal","button-vue":e.isButtonType},style:e.cssVars,attrs:{id:e.wrapperId,"aria-label":e.isButtonType&&e.ariaLabel?e.ariaLabel:void 0,type:e.isButtonType?"button":null}},e.isButtonType?e.listeners:null),[e.isButtonType?e._e():n("input",e._g({staticClass:"checkbox-radio-switch__input",attrs:{id:e.id,"aria-labelledby":!e.isButtonType&&!e.ariaLabel?"".concat(e.id,"-label"):null,"aria-label":e.ariaLabel||void 0,disabled:e.disabled,type:e.inputType,required:e.required,name:e.name},domProps:{value:e.value,checked:e.isChecked,indeterminate:e.hasIndeterminate?e.indeterminate:null}},e.listeners)),n("NcCheckboxContent",{staticClass:"checkbox-radio-switch__content",attrs:{id:e.id,"icon-class":"checkbox-radio-switch__icon","text-class":"checkbox-radio-switch__text",type:e.type,indeterminate:e.hasIndeterminate?e.indeterminate:!1,"button-variant":e.buttonVariant,"is-checked":e.isChecked,loading:e.loading,size:e.size},nativeOn:{click:function(s){return e.onToggle.apply(null,arguments)}},scopedSlots:e._u([{key:"icon",fn:function(){return[e._t("icon")]},proxy:!0}],null,!0)},[e._t("default")],2)],1)},Nd=[],Ad=ve(Ld,Sd,Nd,!1,null,"2603be83",null,null);const Dd=Ad.exports;ll(Rc);const Ud={name:"HelpCircleIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var Bd=function(){var e=this,n=e._self._c;return n("span",e._b({staticClass:"material-design-icon help-circle-icon",attrs:{"aria-hidden":e.title?null:!0,"aria-label":e.title,role:"img"},on:{click:function(s){return e.$emit("click",s)}}},"span",e.$attrs,!1),[n("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[n("path",{attrs:{d:"M15.07,11.25L14.17,12.17C13.45,12.89 13,13.5 13,15H11V14.5C11,13.39 11.45,12.39 12.17,11.67L13.41,10.41C13.78,10.05 14,9.55 14,9C14,7.89 13.1,7 12,7A2,2 0 0,0 10,9H8A4,4 0 0,1 12,5A4,4 0 0,1 16,9C16,9.88 15.64,10.67 15.07,11.25M13,19H11V17H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12C22,6.47 17.5,2 12,2Z"}},[e.title?n("title",[e._v(e._s(e.title))]):e._e()])])])},Pd=[],Md=ve(Ud,Bd,Pd,!1,null,null,null,null);const zd=Md.exports,jd={name:"NcSettingsSection",components:{HelpCircle:zd},props:{name:{type:String,required:!0},description:{type:String,default:""},docUrl:{type:String,default:""},limitWidth:{type:Boolean,default:!0}},data(){return{docNameTranslated:ol("External documentation for {name}",{name:this.name})}},computed:{hasDescription(){return this.description.length>0},hasDocUrl(){return this.docUrl.length>0}}};var Od=function(){var e=this,n=e._self._c;return n("div",{staticClass:"settings-section",class:{"settings-section--limit-width":e.limitWidth}},[n("h2",{staticClass:"settings-section__name"},[e._v(" "+e._s(e.name)+" "),e.hasDocUrl?n("a",{staticClass:"settings-section__info",attrs:{href:e.docUrl,title:e.docNameTranslated,"aria-label":e.docNameTranslated,target:"_blank",rel:"noreferrer nofollow"}},[n("HelpCircle",{attrs:{size:20}})],1):e._e()]),e.hasDescription?n("p",{staticClass:"settings-section__desc"},[e._v(" "+e._s(e.description)+" ")]):e._e(),e._t("default")],2)},Rd=[],$d=ve(jd,Od,Rd,!1,null,"f51cf2d3",null,null);const Id=$d.exports;function Hd(e,n,s,r,a,o,l,i){var u=typeof e=="function"?e.options:e;n&&(u.render=n,u.staticRenderFns=s,u._compiled=!0),r&&(u.functional=!0),o&&(u._scopeId="data-v-"+o);var c;if(l?(c=function(v){v=v||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,!v&&typeof __VUE_SSR_CONTEXT__<"u"&&(v=__VUE_SSR_CONTEXT__),a&&a.call(this,v),v&&v._registeredComponents&&v._registeredComponents.add(l)},u._ssrRegister=c):a&&(c=i?function(){a.call(this,(u.functional?this.parent:this).$root.$options.shadowRoot)}:a),c)if(u.functional){u._injectStyles=c;var g=u.render;u.render=function(v,w){return c.call(w),g(v,w)}}else{var x=u.beforeCreate;u.beforeCreate=x?[].concat(x,c):[c]}return{exports:e,options:u}}const Vd={name:"AdminSettings",components:{NcCheckboxRadioSwitch:Dd,NcSettingsSection:Id},data(){return{config:Uc("password_policy","config")}},methods:{async updateBoolSetting(e){await this.setValue(e,this.config[e]?"1":"0")},async updateNumberSetting(e){if(!/^\d+$/.test(this.config[e])){let n=t("password_policy","Unknown error");switch(e){case"minLength":n=t("password_policy","Minimal length has to be a non negative number");break;case"historySize":n=t("password_policy","History size has to be a non negative number");break;case"expiration":n=t("password_policy","Expiration days have to be a non negative number");break;case"maximumLoginAttempts":n=t("password_policy","Maximum login attempts have to be a non negative number");break}Ra(n);return}await this.setValue(e,this.config[e])},async setValue(e,n){OCP.AppConfig.setValue("password_policy",e,n,{success:()=>Dc(t("password_policy","Settings saved")),error:()=>Ra(t("password_policy","Error while saving settings"))})}}};var Jd=function(){var e=this,n=e._self._c;return n("NcSettingsSection",{attrs:{name:e.t("password_policy","Password policy")}},[n("ul",{staticClass:"password-policy__settings-list"},[n("li",[n("input",{directives:[{name:"model",rawName:"v-model",value:e.config.minLength,expression:"config.minLength"}],attrs:{id:"password-policy__settings__min-length",min:"0",type:"number"},domProps:{value:e.config.minLength},on:{change:function(s){return e.updateNumberSetting("minLength")},input:function(s){s.target.composing||e.$set(e.config,"minLength",s.target.value)}}}),n("label",{attrs:{for:"password-policy__settings__min-length"}},[e._v(" "+e._s(e.t("password_policy","Minimum password length"))+" ")])]),n("li",[n("input",{directives:[{name:"model",rawName:"v-model",value:e.config.historySize,expression:"config.historySize"}],attrs:{id:"password-policy-history-size",min:"0",type:"number"},domProps:{value:e.config.historySize},on:{change:function(s){return e.updateNumberSetting("historySize")},input:function(s){s.target.composing||e.$set(e.config,"historySize",s.target.value)}}}),n("label",{attrs:{for:"password-policy-history-size"}},[e._v(" "+e._s(e.t("password_policy","User password history"))+" ")])]),n("li",[n("input",{directives:[{name:"model",rawName:"v-model",value:e.config.expiration,expression:"config.expiration"}],attrs:{id:"password-policy-expiration",min:"0",type:"number"},domProps:{value:e.config.expiration},on:{change:function(s){return e.updateNumberSetting("expiration")},input:function(s){s.target.composing||e.$set(e.config,"expiration",s.target.value)}}}),n("label",{attrs:{for:"password-policy-expiration"}},[e._v(" "+e._s(e.t("password_policy","Number of days until user password expires"))+" ")])]),n("li",[n("input",{directives:[{name:"model",rawName:"v-model",value:e.config.maximumLoginAttempts,expression:"config.maximumLoginAttempts"}],attrs:{id:"password-policy_failed-login",min:"0",type:"number"},domProps:{value:e.config.maximumLoginAttempts},on:{change:function(s){return e.updateNumberSetting("maximumLoginAttempts")},input:function(s){s.target.composing||e.$set(e.config,"maximumLoginAttempts",s.target.value)}}}),n("label",{attrs:{for:"password-policy_failed-login"}},[e._v(" "+e._s(e.t("password_policy","Number of login attempts before the user account will be disabled until manual action is taken. (0 for no limit)"))+" ")]),n("p",{staticClass:"havibeenpwned-hint"},[e._v(" "+e._s(e.t("password_policy","Please note, that this option is meant to protect attacked accounts. Disabled accounts have to be re-enabled manually by administration. Attackers that try to guess passwords of accounts will have their IP address blocked by the bruteforce protection independent from this setting."))+" ")])])]),n("ul",{staticClass:"password-policy__settings-list"},[n("li",[n("NcCheckboxRadioSwitch",{attrs:{checked:e.config.enforceNonCommonPassword,type:"switch"},on:{"update:checked":[function(s){return e.$set(e.config,"enforceNonCommonPassword",s)},function(s){return e.updateBoolSetting("enforceNonCommonPassword")}]}},[e._v(" "+e._s(e.t("password_policy","Forbid common passwords"))+" ")])],1),n("li",[n("NcCheckboxRadioSwitch",{attrs:{checked:e.config.enforceUpperLowerCase,type:"switch"},on:{"update:checked":[function(s){return e.$set(e.config,"enforceUpperLowerCase",s)},function(s){return e.updateBoolSetting("enforceUpperLowerCase")}]}},[e._v(" "+e._s(e.t("password_policy","Enforce upper and lower case characters"))+" ")])],1),n("li",[n("NcCheckboxRadioSwitch",{attrs:{checked:e.config.enforceNumericCharacters,type:"switch"},on:{"update:checked":[function(s){return e.$set(e.config,"enforceNumericCharacters",s)},function(s){return e.updateBoolSetting("enforceNumericCharacters")}]}},[e._v(" "+e._s(e.t("password_policy","Enforce numeric characters"))+" ")])],1),n("li",[n("NcCheckboxRadioSwitch",{attrs:{checked:e.config.enforceSpecialCharacters,type:"switch"},on:{"update:checked":[function(s){return e.$set(e.config,"enforceSpecialCharacters",s)},function(s){return e.updateBoolSetting("enforceSpecialCharacters")}]}},[e._v(" "+e._s(e.t("password_policy","Enforce special characters"))+" ")])],1),n("li",[n("NcCheckboxRadioSwitch",{attrs:{checked:e.config.enforceHaveIBeenPwned,type:"switch"},on:{"update:checked":[function(s){return e.$set(e.config,"enforceHaveIBeenPwned",s)},function(s){return e.updateBoolSetting("enforceHaveIBeenPwned")}]}},[e._v(" "+e._s(e.t("password_policy","Check password against the list of breached passwords from haveibeenpwned.com"))+" ")]),n("p",{staticClass:"havibeenpwned-hint"},[e._v(" "+e._s(e.t("password_policy","This check creates a hash of the password and sends the first 5 characters of this hash to the haveibeenpwned.com API to retrieve a list of all hashes that start with those. Then it checks on the Nextcloud instance if the password hash is in the result set."))+" ")])],1)])])},Gd=[],Kd=Hd(Vd,Jd,Gd,!1,null,"8f810681",null,null);const qd=Kd.exports;I.prototype.t=Kl,new I({el:"#password_policy-settings",name:"AdminSettings",render:e=>e(qd)}); +`]},Undo:{msgid:"Undo",comments:{reference:"lib/toast.ts:223"},msgstr:[""]}}}}}].map(e=>rl.addTranslation(e.locale,e.json));const bn=rl.build();bn.ngettext.bind(bn),bn.gettext.bind(bn);const Lc="off",Sc="polite",Nc="assertive";var Hs=(e=>(e[e.OFF=Lc]="OFF",e[e.POLITE=Sc]="POLITE",e[e.ASSERTIVE=Nc]="ASSERTIVE",e))(Hs||{});const Ac=7e3;function al(e,n){if(n=Object.assign({timeout:Ac,isHTML:!1,type:void 0,selector:void 0,onRemove:()=>{},onClick:void 0,close:!0},n),typeof e=="string"&&!n.isHTML){const l=document.createElement("div");l.innerHTML=e,e=l.innerText}let s=n.type??"";typeof n.onClick=="function"&&(s+=" toast-with-click ");const r=e instanceof Node;let a=Hs.POLITE;n.ariaLive?a=n.ariaLive:(n.type==="toast-error"||n.type==="toast-undo")&&(a=Hs.ASSERTIVE);const o=F0({[r?"node":"text"]:e,duration:n.timeout,callback:n.onRemove,onClick:n.onClick,close:n.close,gravity:"top",selector:n.selector,position:"right",backgroundColor:"",className:"dialogs "+s,escapeMarkup:!n.isHTML,ariaLive:a});return o.showToast(),o}function Ra(e,n){return al(e,{...n,type:"toast-error"})}function Dc(e,n){return al(e,{...n,type:"toast-success"})}function Uc(e,n,s){const r=document.querySelector(`#initial-state-${e}-${n}`);if(r===null){if(s!==void 0)return s;throw new Error(`Could not find initial state ${n} of ${e}`)}try{return JSON.parse(atob(r.value))}catch{throw new Error(`Could not parse initial state ${n} of ${e}`)}}function ve(e,n,s,r,a,o,l,i){var u=typeof e=="function"?e.options:e;n&&(u.render=n,u.staticRenderFns=s,u._compiled=!0),r&&(u.functional=!0),o&&(u._scopeId="data-v-"+o);var c;if(l?(c=function(v){v=v||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,!v&&typeof __VUE_SSR_CONTEXT__<"u"&&(v=__VUE_SSR_CONTEXT__),a&&a.call(this,v),v&&v._registeredComponents&&v._registeredComponents.add(l)},u._ssrRegister=c):a&&(c=i?function(){a.call(this,(u.functional?this.parent:this).$root.$options.shadowRoot)}:a),c)if(u.functional){u._injectStyles=c;var g=u.render;u.render=function(v,w){return c.call(w),g(v,w)}}else{var x=u.beforeCreate;u.beforeCreate=x?[].concat(x,c):[c]}return{exports:e,options:u}}const Bc={name:"NcLoadingIcon",props:{size:{type:Number,default:20},appearance:{type:String,validator(e){return["auto","light","dark"].includes(e)},default:"auto"},name:{type:String,default:""}},computed:{colors(){const e=["#777","#CCC"];return this.appearance==="light"?e:this.appearance==="dark"?e.reverse():["var(--color-loading-light)","var(--color-loading-dark)"]}}};var Pc=function(){var e=this,n=e._self._c;return n("span",{staticClass:"material-design-icon loading-icon",attrs:{"aria-label":e.name,role:"img"}},[n("svg",{attrs:{width:e.size,height:e.size,viewBox:"0 0 24 24"}},[n("path",{attrs:{fill:e.colors[0],d:"M12,4V2A10,10 0 1,0 22,12H20A8,8 0 1,1 12,4Z"}}),n("path",{attrs:{fill:e.colors[1],d:"M12,4V2A10,10 0 0,1 22,12H20A8,8 0 0,0 12,4Z"}},[e.name?n("title",[e._v(e._s(e.name))]):e._e()])])])},Mc=[],zc=ve(Bc,Pc,Mc,!1,null,"626664cd",null,null);const jc=zc.exports,Je=sl().detectLocale().build(),Oc=Je.ngettext.bind(Je),ol=Je.gettext.bind(Je),ll=(...e)=>{e.forEach(n=>{n.registered||(n.forEach(({l:s,t:r})=>{const a=Object.fromEntries(Object.entries(r).map(([o,l])=>[o,{msgid:o,msgid_plural:l.p,msgstr:l.v}]));Je.gt.catalogs[s]||(Je.gt.catalogs[s]={messages:{translations:{}}}),Je.gt.catalogs[s].messages.translations[""]={...Je.gt.catalogs[s].messages.translations[""],...a}}),n.registered=!0)})},Rc=[{l:"af",t:{"External documentation for {name}":{v:[""]}}},{l:"ar",t:{"External documentation for {name}":{v:["التوثيق الخارجي لـ {name}"]}}},{l:"ast",t:{"External documentation for {name}":{v:["Documentación esterna pa: {name}"]}}},{l:"az",t:{"External documentation for {name}":{v:[""]}}},{l:"be",t:{"External documentation for {name}":{v:[""]}}},{l:"bg",t:{"External documentation for {name}":{v:[""]}}},{l:"bn_BD",t:{"External documentation for {name}":{v:[""]}}},{l:"br",t:{"External documentation for {name}":{v:[""]}}},{l:"bs",t:{"External documentation for {name}":{v:[""]}}},{l:"ca",t:{"External documentation for {name}":{v:[""]}}},{l:"cs",t:{"External documentation for {name}":{v:["Externí dokumentace pro {name}"]}}},{l:"cs_CZ",t:{"External documentation for {name}":{v:["Externí dokumentace pro {name}"]}}},{l:"cy_GB",t:{"External documentation for {name}":{v:[""]}}},{l:"da",t:{"External documentation for {name}":{v:[""]}}},{l:"de",t:{"External documentation for {name}":{v:["Externe Dokumentation für {name}"]}}},{l:"de_DE",t:{"External documentation for {name}":{v:["Externe Dokumentation für {name}"]}}},{l:"el",t:{"External documentation for {name}":{v:[""]}}},{l:"en_GB",t:{"External documentation for {name}":{v:["External documentation for {name}"]}}},{l:"eo",t:{"External documentation for {name}":{v:[""]}}},{l:"es",t:{"External documentation for {name}":{v:["Documentación externa para {name}"]}}},{l:"es_419",t:{"External documentation for {name}":{v:[""]}}},{l:"es_AR",t:{"External documentation for {name}":{v:[""]}}},{l:"es_CL",t:{"External documentation for {name}":{v:[""]}}},{l:"es_CO",t:{"External documentation for {name}":{v:[""]}}},{l:"es_CR",t:{"External documentation for {name}":{v:[""]}}},{l:"es_DO",t:{"External documentation for {name}":{v:[""]}}},{l:"es_EC",t:{"External documentation for {name}":{v:["Documentación externa para {name}"]}}},{l:"es_GT",t:{"External documentation for {name}":{v:[""]}}},{l:"es_HN",t:{"External documentation for {name}":{v:[""]}}},{l:"es_MX",t:{"External documentation for {name}":{v:[""]}}},{l:"es_NI",t:{"External documentation for {name}":{v:[""]}}},{l:"es_PA",t:{"External documentation for {name}":{v:[""]}}},{l:"es_PE",t:{"External documentation for {name}":{v:[""]}}},{l:"es_PR",t:{"External documentation for {name}":{v:[""]}}},{l:"es_PY",t:{"External documentation for {name}":{v:[""]}}},{l:"es_SV",t:{"External documentation for {name}":{v:[""]}}},{l:"es_UY",t:{"External documentation for {name}":{v:[""]}}},{l:"et_EE",t:{"External documentation for {name}":{v:[""]}}},{l:"eu",t:{"External documentation for {name}":{v:["{name}-ren kanpoko dokumentazioa"]}}},{l:"fa",t:{"External documentation for {name}":{v:[""]}}},{l:"fi",t:{"External documentation for {name}":{v:[""]}}},{l:"fo",t:{"External documentation for {name}":{v:[""]}}},{l:"fr",t:{"External documentation for {name}":{v:["Documentation externe pour {name}"]}}},{l:"gd",t:{"External documentation for {name}":{v:[""]}}},{l:"gl",t:{"External documentation for {name}":{v:["Documentación externa para {name}"]}}},{l:"he",t:{"External documentation for {name}":{v:["תיעוד חיצוני עבור {name}"]}}},{l:"hi_IN",t:{"External documentation for {name}":{v:[""]}}},{l:"hr",t:{"External documentation for {name}":{v:[""]}}},{l:"hsb",t:{"External documentation for {name}":{v:[""]}}},{l:"hu",t:{"External documentation for {name}":{v:[""]}}},{l:"hy",t:{"External documentation for {name}":{v:[""]}}},{l:"ia",t:{"External documentation for {name}":{v:[""]}}},{l:"id",t:{"External documentation for {name}":{v:["Dokumentasi eksternal untuk {name}"]}}},{l:"ig",t:{"External documentation for {name}":{v:[""]}}},{l:"is",t:{"External documentation for {name}":{v:["Utanaðkomandi leiðbeiningar fyrir {name}"]}}},{l:"it",t:{"External documentation for {name}":{v:["Documentazione esterna per {name}"]}}},{l:"ja",t:{"External documentation for {name}":{v:[""]}}},{l:"ka",t:{"External documentation for {name}":{v:[""]}}},{l:"ka_GE",t:{"External documentation for {name}":{v:[""]}}},{l:"kab",t:{"External documentation for {name}":{v:[""]}}},{l:"kk",t:{"External documentation for {name}":{v:[""]}}},{l:"km",t:{"External documentation for {name}":{v:[""]}}},{l:"kn",t:{"External documentation for {name}":{v:[""]}}},{l:"ko",t:{"External documentation for {name}":{v:[""]}}},{l:"la",t:{"External documentation for {name}":{v:[""]}}},{l:"lb",t:{"External documentation for {name}":{v:[""]}}},{l:"lo",t:{"External documentation for {name}":{v:[""]}}},{l:"lt_LT",t:{"External documentation for {name}":{v:[""]}}},{l:"lv",t:{"External documentation for {name}":{v:[""]}}},{l:"mk",t:{"External documentation for {name}":{v:[""]}}},{l:"mn",t:{"External documentation for {name}":{v:[""]}}},{l:"mr",t:{"External documentation for {name}":{v:[""]}}},{l:"ms_MY",t:{"External documentation for {name}":{v:[""]}}},{l:"my",t:{"External documentation for {name}":{v:[""]}}},{l:"nb",t:{"External documentation for {name}":{v:[""]}}},{l:"ne",t:{"External documentation for {name}":{v:[""]}}},{l:"nl",t:{"External documentation for {name}":{v:["Externe documentatie voor {name}"]}}},{l:"nn_NO",t:{"External documentation for {name}":{v:[""]}}},{l:"oc",t:{"External documentation for {name}":{v:[""]}}},{l:"pl",t:{"External documentation for {name}":{v:["Dokumentacja zewnętrzna dla {name}"]}}},{l:"ps",t:{"External documentation for {name}":{v:[""]}}},{l:"pt_BR",t:{"External documentation for {name}":{v:["Documentação externa para {name}"]}}},{l:"pt_PT",t:{"External documentation for {name}":{v:["Documentação externa para {name}"]}}},{l:"ro",t:{"External documentation for {name}":{v:["Documentație externă pentru {name}"]}}},{l:"ru",t:{"External documentation for {name}":{v:["Внешняя документация для {name}"]}}},{l:"sc",t:{"External documentation for {name}":{v:[""]}}},{l:"si",t:{"External documentation for {name}":{v:[""]}}},{l:"sk",t:{"External documentation for {name}":{v:[""]}}},{l:"sl",t:{"External documentation for {name}":{v:[""]}}},{l:"sq",t:{"External documentation for {name}":{v:[""]}}},{l:"sr",t:{"External documentation for {name}":{v:["Спољна документација за {name}"]}}},{l:"sr@latin",t:{"External documentation for {name}":{v:[""]}}},{l:"sv",t:{"External documentation for {name}":{v:["Extern dokumentation för {name}"]}}},{l:"sw",t:{"External documentation for {name}":{v:[""]}}},{l:"ta",t:{"External documentation for {name}":{v:[""]}}},{l:"th",t:{"External documentation for {name}":{v:[""]}}},{l:"tk",t:{"External documentation for {name}":{v:[""]}}},{l:"tr",t:{"External documentation for {name}":{v:["{name} için dış belgeler"]}}},{l:"ug",t:{"External documentation for {name}":{v:[""]}}},{l:"uk",t:{"External documentation for {name}":{v:["Зовнішня документація для {name}"]}}},{l:"ur_PK",t:{"External documentation for {name}":{v:[""]}}},{l:"uz",t:{"External documentation for {name}":{v:[""]}}},{l:"vi",t:{"External documentation for {name}":{v:[""]}}},{l:"zh_CN",t:{"External documentation for {name}":{v:[""]}}},{l:"zh_HK",t:{"External documentation for {name}":{v:["{name} 的外部文件"]}}},{l:"zh_TW",t:{"External documentation for {name}":{v:["{name} 的外部文件"]}}},{l:"zu_ZA",t:{"External documentation for {name}":{v:[""]}}}];ll();const $c=e=>Math.random().toString(36).replace(/[^a-z]+/g,"").slice(0,e||5),Ic={name:"CheckboxBlankOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var Hc=function(){var e=this,n=e._self._c;return n("span",e._b({staticClass:"material-design-icon checkbox-blank-outline-icon",attrs:{"aria-hidden":e.title?null:!0,"aria-label":e.title,role:"img"},on:{click:function(s){return e.$emit("click",s)}}},"span",e.$attrs,!1),[n("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[n("path",{attrs:{d:"M19,3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3M19,5V19H5V5H19Z"}},[e.title?n("title",[e._v(e._s(e.title))]):e._e()])])])},Vc=[],Jc=ve(Ic,Hc,Vc,!1,null,null,null,null);const Gc=Jc.exports,Kc={name:"MinusBoxIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var qc=function(){var e=this,n=e._self._c;return n("span",e._b({staticClass:"material-design-icon minus-box-icon",attrs:{"aria-hidden":e.title?null:!0,"aria-label":e.title,role:"img"},on:{click:function(s){return e.$emit("click",s)}}},"span",e.$attrs,!1),[n("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[n("path",{attrs:{d:"M17,13H7V11H17M19,3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3Z"}},[e.title?n("title",[e._v(e._s(e.title))]):e._e()])])])},Wc=[],Zc=ve(Kc,qc,Wc,!1,null,null,null,null);const Yc=Zc.exports,Xc={name:"CheckboxMarkedIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var Qc=function(){var e=this,n=e._self._c;return n("span",e._b({staticClass:"material-design-icon checkbox-marked-icon",attrs:{"aria-hidden":e.title?null:!0,"aria-label":e.title,role:"img"},on:{click:function(s){return e.$emit("click",s)}}},"span",e.$attrs,!1),[n("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[n("path",{attrs:{d:"M10,17L5,12L6.41,10.58L10,14.17L17.59,6.58L19,8M19,3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3Z"}},[e.title?n("title",[e._v(e._s(e.title))]):e._e()])])])},ed=[],td=ve(Xc,Qc,ed,!1,null,null,null,null);const nd=td.exports,sd={name:"RadioboxMarkedIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var rd=function(){var e=this,n=e._self._c;return n("span",e._b({staticClass:"material-design-icon radiobox-marked-icon",attrs:{"aria-hidden":e.title?null:!0,"aria-label":e.title,role:"img"},on:{click:function(s){return e.$emit("click",s)}}},"span",e.$attrs,!1),[n("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[n("path",{attrs:{d:"M12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4A8,8 0 0,1 20,12A8,8 0 0,1 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M12,7A5,5 0 0,0 7,12A5,5 0 0,0 12,17A5,5 0 0,0 17,12A5,5 0 0,0 12,7Z"}},[e.title?n("title",[e._v(e._s(e.title))]):e._e()])])])},ad=[],od=ve(sd,rd,ad,!1,null,null,null,null);const ld=od.exports,id={name:"RadioboxBlankIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var ud=function(){var e=this,n=e._self._c;return n("span",e._b({staticClass:"material-design-icon radiobox-blank-icon",attrs:{"aria-hidden":e.title?null:!0,"aria-label":e.title,role:"img"},on:{click:function(s){return e.$emit("click",s)}}},"span",e.$attrs,!1),[n("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[n("path",{attrs:{d:"M12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4A8,8 0 0,1 20,12A8,8 0 0,1 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z"}},[e.title?n("title",[e._v(e._s(e.title))]):e._e()])])])},md=[],cd=ve(id,ud,md,!1,null,null,null,null);const dd=cd.exports,pd={name:"ToggleSwitchOffIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var gd=function(){var e=this,n=e._self._c;return n("span",e._b({staticClass:"material-design-icon toggle-switch-off-icon",attrs:{"aria-hidden":e.title?null:!0,"aria-label":e.title,role:"img"},on:{click:function(s){return e.$emit("click",s)}}},"span",e.$attrs,!1),[n("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[n("path",{attrs:{d:"M17,7H7A5,5 0 0,0 2,12A5,5 0 0,0 7,17H17A5,5 0 0,0 22,12A5,5 0 0,0 17,7M7,15A3,3 0 0,1 4,12A3,3 0 0,1 7,9A3,3 0 0,1 10,12A3,3 0 0,1 7,15Z"}},[e.title?n("title",[e._v(e._s(e.title))]):e._e()])])])},fd=[],hd=ve(pd,gd,fd,!1,null,null,null,null);const vd=hd.exports,xd={name:"ToggleSwitchIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var yd=function(){var e=this,n=e._self._c;return n("span",e._b({staticClass:"material-design-icon toggle-switch-icon",attrs:{"aria-hidden":e.title?null:!0,"aria-label":e.title,role:"img"},on:{click:function(s){return e.$emit("click",s)}}},"span",e.$attrs,!1),[n("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[n("path",{attrs:{d:"M17,7H7A5,5 0 0,0 2,12A5,5 0 0,0 7,17H17A5,5 0 0,0 22,12A5,5 0 0,0 17,7M17,15A3,3 0 0,1 14,12A3,3 0 0,1 17,9A3,3 0 0,1 20,12A3,3 0 0,1 17,15Z"}},[e.title?n("title",[e._v(e._s(e.title))]):e._e()])])])},Td=[],Cd=ve(xd,yd,Td,!1,null,null,null,null);const Fd=Cd.exports,Et="checkbox",Lt="radio",$e="switch",Zt="button",wd={name:"NcCheckboxContent",components:{NcLoadingIcon:jc},props:{id:{type:String,default:null},iconClass:{type:[String,Object],default:null},textClass:{type:[String,Object],default:null},type:{type:String,default:"checkbox",validator:e=>[Et,Lt,$e,Zt].includes(e)},buttonVariant:{type:Boolean,default:!1},isChecked:{type:Boolean,default:!1},indeterminate:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},size:{type:Number,default:24}},computed:{isButtonType(){return this.type===Zt},checkboxRadioIconElement(){return this.type===Lt?this.isChecked?ld:dd:this.type===$e?this.isChecked?Fd:vd:this.indeterminate?Yc:this.isChecked?nd:Gc}}};var Ed=function(){var e=this,n=e._self._c;return n("span",{staticClass:"checkbox-content",class:{["checkbox-content-"+e.type]:!0,"checkbox-content--button-variant":e.buttonVariant,"checkbox-content--has-text":!!e.$slots.default},attrs:{id:e.isButtonType?void 0:"".concat(e.id,"-label")}},[n("span",{class:{"checkbox-content__icon":!0,"checkbox-content__icon--checked":e.isChecked,[e.iconClass]:!0},attrs:{"aria-hidden":!0,inert:""}},[e._t("icon",function(){return[e.loading?n("NcLoadingIcon"):e.buttonVariant?e._e():n(e.checkboxRadioIconElement,{tag:"component",attrs:{size:e.size}})]},{checked:e.isChecked,loading:e.loading})],2),e.$slots.default?n("span",{class:["checkbox-content__text",e.textClass]},[e._t("default")],2):e._e()])},bd=[],_d=ve(wd,Ed,bd,!1,null,"2672ad1a",null,null);const kd=_d.exports,Ld={name:"NcCheckboxRadioSwitch",components:{NcCheckboxContent:kd},props:{id:{type:String,default:()=>"checkbox-radio-switch-"+$c(),validator:e=>e.trim()!==""},wrapperId:{type:String,default:null},name:{type:String,default:null},ariaLabel:{type:String,default:""},type:{type:String,default:"checkbox",validator:e=>[Et,Lt,$e,Zt].includes(e)},buttonVariant:{type:Boolean,default:!1},buttonVariantGrouped:{type:String,default:"no",validator:e=>["no","vertical","horizontal"].includes(e)},checked:{type:[Boolean,Array,String],default:!1},value:{type:String,default:null},disabled:{type:Boolean,default:!1},indeterminate:{type:Boolean,default:!1},required:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},wrapperElement:{type:String,default:null}},emits:["update:checked"],computed:{isButtonType(){return this.type===Zt},computedWrapperElement(){return this.isButtonType?"button":this.wrapperElement!==null?this.wrapperElement:"span"},listeners(){return this.isButtonType?{click:this.onToggle}:{change:this.onToggle}},size(){return this.type===$e?36:24},cssVars(){return{"--icon-size":this.size+"px","--icon-height":(this.type===$e?16:this.size)+"px"}},inputType(){return[Et,Lt,Zt].includes(this.type)?this.type:Et},isChecked(){return this.value!==null?Array.isArray(this.checked)?[...this.checked].indexOf(this.value)>-1:this.checked===this.value:this.checked===!0},hasIndeterminate(){return[Et,Lt].includes(this.inputType)}},mounted(){if(this.name&&this.type===Et&&!Array.isArray(this.checked))throw new Error("When using groups of checkboxes, the updated value will be an array.");if(this.name&&this.type===$e)throw new Error("Switches are not made to be used for data sets. Please use checkboxes instead.");if(typeof this.checked!="boolean"&&this.type===$e)throw new Error("Switches can only be used with boolean as checked prop.")},methods:{t:ol,n:Oc,onToggle(){if(this.disabled)return;if(this.type===Lt){this.$emit("update:checked",this.value);return}if(this.type===$e){this.$emit("update:checked",!this.isChecked);return}if(typeof this.checked=="boolean"){this.$emit("update:checked",!this.checked);return}const e=this.getInputsSet().filter(n=>n.checked).map(n=>n.value);e.includes(this.value)?this.$emit("update:checked",e.filter(n=>n!==this.value)):this.$emit("update:checked",[...e,this.value])},getInputsSet(){return[...document.getElementsByName(this.name)]}}};var Sd=function(){var e=this,n=e._self._c;return n(e.computedWrapperElement,e._g({tag:"component",staticClass:"checkbox-radio-switch",class:{["checkbox-radio-switch-"+e.type]:e.type,"checkbox-radio-switch--checked":e.isChecked,"checkbox-radio-switch--disabled":e.disabled,"checkbox-radio-switch--indeterminate":e.hasIndeterminate?e.indeterminate:!1,"checkbox-radio-switch--button-variant":e.buttonVariant,"checkbox-radio-switch--button-variant-v-grouped":e.buttonVariant&&e.buttonVariantGrouped==="vertical","checkbox-radio-switch--button-variant-h-grouped":e.buttonVariant&&e.buttonVariantGrouped==="horizontal","button-vue":e.isButtonType},style:e.cssVars,attrs:{id:e.wrapperId,"aria-label":e.isButtonType&&e.ariaLabel?e.ariaLabel:void 0,type:e.isButtonType?"button":null}},e.isButtonType?e.listeners:null),[e.isButtonType?e._e():n("input",e._g({staticClass:"checkbox-radio-switch__input",attrs:{id:e.id,"aria-labelledby":!e.isButtonType&&!e.ariaLabel?"".concat(e.id,"-label"):null,"aria-label":e.ariaLabel||void 0,disabled:e.disabled,type:e.inputType,required:e.required,name:e.name},domProps:{value:e.value,checked:e.isChecked,indeterminate:e.hasIndeterminate?e.indeterminate:null}},e.listeners)),n("NcCheckboxContent",{staticClass:"checkbox-radio-switch__content",attrs:{id:e.id,"icon-class":"checkbox-radio-switch__icon","text-class":"checkbox-radio-switch__text",type:e.type,indeterminate:e.hasIndeterminate?e.indeterminate:!1,"button-variant":e.buttonVariant,"is-checked":e.isChecked,loading:e.loading,size:e.size},nativeOn:{click:function(s){return e.onToggle.apply(null,arguments)}},scopedSlots:e._u([{key:"icon",fn:function(){return[e._t("icon")]},proxy:!0}],null,!0)},[e._t("default")],2)],1)},Nd=[],Ad=ve(Ld,Sd,Nd,!1,null,"2603be83",null,null);const Dd=Ad.exports;ll(Rc);const Ud={name:"HelpCircleIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var Bd=function(){var e=this,n=e._self._c;return n("span",e._b({staticClass:"material-design-icon help-circle-icon",attrs:{"aria-hidden":e.title?null:!0,"aria-label":e.title,role:"img"},on:{click:function(s){return e.$emit("click",s)}}},"span",e.$attrs,!1),[n("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[n("path",{attrs:{d:"M15.07,11.25L14.17,12.17C13.45,12.89 13,13.5 13,15H11V14.5C11,13.39 11.45,12.39 12.17,11.67L13.41,10.41C13.78,10.05 14,9.55 14,9C14,7.89 13.1,7 12,7A2,2 0 0,0 10,9H8A4,4 0 0,1 12,5A4,4 0 0,1 16,9C16,9.88 15.64,10.67 15.07,11.25M13,19H11V17H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12C22,6.47 17.5,2 12,2Z"}},[e.title?n("title",[e._v(e._s(e.title))]):e._e()])])])},Pd=[],Md=ve(Ud,Bd,Pd,!1,null,null,null,null);const zd=Md.exports,jd={name:"NcSettingsSection",components:{HelpCircle:zd},props:{name:{type:String,required:!0},description:{type:String,default:""},docUrl:{type:String,default:""},limitWidth:{type:Boolean,default:!0}},data(){return{docNameTranslated:ol("External documentation for {name}",{name:this.name})}},computed:{hasDescription(){return this.description.length>0},hasDocUrl(){return this.docUrl.length>0}}};var Od=function(){var e=this,n=e._self._c;return n("div",{staticClass:"settings-section",class:{"settings-section--limit-width":e.limitWidth}},[n("h2",{staticClass:"settings-section__name"},[e._v(" "+e._s(e.name)+" "),e.hasDocUrl?n("a",{staticClass:"settings-section__info",attrs:{href:e.docUrl,title:e.docNameTranslated,"aria-label":e.docNameTranslated,target:"_blank",rel:"noreferrer nofollow"}},[n("HelpCircle",{attrs:{size:20}})],1):e._e()]),e.hasDescription?n("p",{staticClass:"settings-section__desc"},[e._v(" "+e._s(e.description)+" ")]):e._e(),e._t("default")],2)},Rd=[],$d=ve(jd,Od,Rd,!1,null,"f51cf2d3",null,null);const Id=$d.exports;function Hd(e,n,s,r,a,o,l,i){var u=typeof e=="function"?e.options:e;n&&(u.render=n,u.staticRenderFns=s,u._compiled=!0),r&&(u.functional=!0),o&&(u._scopeId="data-v-"+o);var c;if(l?(c=function(v){v=v||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,!v&&typeof __VUE_SSR_CONTEXT__<"u"&&(v=__VUE_SSR_CONTEXT__),a&&a.call(this,v),v&&v._registeredComponents&&v._registeredComponents.add(l)},u._ssrRegister=c):a&&(c=i?function(){a.call(this,(u.functional?this.parent:this).$root.$options.shadowRoot)}:a),c)if(u.functional){u._injectStyles=c;var g=u.render;u.render=function(v,w){return c.call(w),g(v,w)}}else{var x=u.beforeCreate;u.beforeCreate=x?[].concat(x,c):[c]}return{exports:e,options:u}}const Vd={name:"AdminSettings",components:{NcCheckboxRadioSwitch:Dd,NcSettingsSection:Id},data(){return{config:Uc("password_policy","config")}},methods:{async updateBoolSetting(e){await this.setValue(e,this.config[e]?"1":"0")},async updateNumberSetting(e){if(!/^\d+$/.test(this.config[e])){let n=t("password_policy","Unknown error");switch(e){case"minLength":n=t("password_policy","Minimal length has to be a non negative number");break;case"historySize":n=t("password_policy","History size has to be a non negative number");break;case"expiration":n=t("password_policy","Expiration days have to be a non negative number");break;case"maximumLoginAttempts":n=t("password_policy","Maximum login attempts have to be a non negative number");break}Ra(n);return}await this.setValue(e,this.config[e])},async setValue(e,n){OCP.AppConfig.setValue("password_policy",e,n,{success:()=>Dc(t("password_policy","Settings saved")),error:()=>Ra(t("password_policy","Error while saving settings"))})}}};var Jd=function(){var e=this,n=e._self._c;return n("NcSettingsSection",{attrs:{name:e.t("password_policy","Password policy")}},[n("ul",{staticClass:"password-policy__settings-list"},[n("li",[n("input",{directives:[{name:"model",rawName:"v-model",value:e.config.minLength,expression:"config.minLength"}],attrs:{id:"password-policy__settings__min-length",min:"0",type:"number"},domProps:{value:e.config.minLength},on:{change:function(s){return e.updateNumberSetting("minLength")},input:function(s){s.target.composing||e.$set(e.config,"minLength",s.target.value)}}}),n("label",{attrs:{for:"password-policy__settings__min-length"}},[e._v(" "+e._s(e.t("password_policy","Minimum password length"))+" ")])]),n("li",[n("input",{directives:[{name:"model",rawName:"v-model",value:e.config.historySize,expression:"config.historySize"}],attrs:{id:"password-policy-history-size",min:"0",type:"number"},domProps:{value:e.config.historySize},on:{change:function(s){return e.updateNumberSetting("historySize")},input:function(s){s.target.composing||e.$set(e.config,"historySize",s.target.value)}}}),n("label",{attrs:{for:"password-policy-history-size"}},[e._v(" "+e._s(e.t("password_policy","User password history"))+" ")])]),n("li",[n("input",{directives:[{name:"model",rawName:"v-model",value:e.config.expiration,expression:"config.expiration"}],attrs:{id:"password-policy-expiration",min:"0",type:"number"},domProps:{value:e.config.expiration},on:{change:function(s){return e.updateNumberSetting("expiration")},input:function(s){s.target.composing||e.$set(e.config,"expiration",s.target.value)}}}),n("label",{attrs:{for:"password-policy-expiration"}},[e._v(" "+e._s(e.t("password_policy","Number of days until user password expires"))+" ")])]),n("li",[n("input",{directives:[{name:"model",rawName:"v-model",value:e.config.maximumLoginAttempts,expression:"config.maximumLoginAttempts"}],attrs:{id:"password-policy_failed-login",min:"0",type:"number"},domProps:{value:e.config.maximumLoginAttempts},on:{change:function(s){return e.updateNumberSetting("maximumLoginAttempts")},input:function(s){s.target.composing||e.$set(e.config,"maximumLoginAttempts",s.target.value)}}}),n("label",{attrs:{for:"password-policy_failed-login"}},[e._v(" "+e._s(e.t("password_policy","Number of login attempts before the user account will be disabled until manual action is taken. (0 for no limit)"))+" ")]),n("p",{staticClass:"havibeenpwned-hint"},[e._v(" "+e._s(e.t("password_policy","Please note, this option is meant to protect attacked accounts. Disabled accounts have to be re-enabled manually by administration. Attackers that try to guess passwords of accounts will have their IP address blocked by the bruteforce protection independent from this setting."))+" ")])])]),n("ul",{staticClass:"password-policy__settings-list"},[n("li",[n("NcCheckboxRadioSwitch",{attrs:{checked:e.config.enforceNonCommonPassword,type:"switch"},on:{"update:checked":[function(s){return e.$set(e.config,"enforceNonCommonPassword",s)},function(s){return e.updateBoolSetting("enforceNonCommonPassword")}]}},[e._v(" "+e._s(e.t("password_policy","Forbid common passwords"))+" ")])],1),n("li",[n("NcCheckboxRadioSwitch",{attrs:{checked:e.config.enforceUpperLowerCase,type:"switch"},on:{"update:checked":[function(s){return e.$set(e.config,"enforceUpperLowerCase",s)},function(s){return e.updateBoolSetting("enforceUpperLowerCase")}]}},[e._v(" "+e._s(e.t("password_policy","Enforce upper and lower case characters"))+" ")])],1),n("li",[n("NcCheckboxRadioSwitch",{attrs:{checked:e.config.enforceNumericCharacters,type:"switch"},on:{"update:checked":[function(s){return e.$set(e.config,"enforceNumericCharacters",s)},function(s){return e.updateBoolSetting("enforceNumericCharacters")}]}},[e._v(" "+e._s(e.t("password_policy","Enforce numeric characters"))+" ")])],1),n("li",[n("NcCheckboxRadioSwitch",{attrs:{checked:e.config.enforceSpecialCharacters,type:"switch"},on:{"update:checked":[function(s){return e.$set(e.config,"enforceSpecialCharacters",s)},function(s){return e.updateBoolSetting("enforceSpecialCharacters")}]}},[e._v(" "+e._s(e.t("password_policy","Enforce special characters"))+" ")])],1),n("li",[n("NcCheckboxRadioSwitch",{attrs:{checked:e.config.enforceHaveIBeenPwned,type:"switch"},on:{"update:checked":[function(s){return e.$set(e.config,"enforceHaveIBeenPwned",s)},function(s){return e.updateBoolSetting("enforceHaveIBeenPwned")}]}},[e._v(" "+e._s(e.t("password_policy","Check password against the list of breached passwords from haveibeenpwned.com"))+" ")]),n("p",{staticClass:"havibeenpwned-hint"},[e._v(" "+e._s(e.t("password_policy","This check creates a hash of the password and sends the first 5 characters of this hash to the haveibeenpwned.com API to retrieve a list of all hashes that start with those. Then it checks on the Nextcloud instance if the password hash is in the result set."))+" ")])],1)])])},Gd=[],Kd=Hd(Vd,Jd,Gd,!1,null,"b3dc503b",null,null);const qd=Kd.exports;I.prototype.t=Kl,new I({el:"#password_policy-settings",name:"AdminSettings",render:e=>e(qd)}); diff --git a/js/password_policy-settings.mjs.map b/js/password_policy-settings.mjs.map index 1a987162..d1c91142 100644 --- a/js/password_policy-settings.mjs.map +++ b/js/password_policy-settings.mjs.map @@ -1 +1 @@ -{"version":3,"file":"password_policy-settings.mjs","sources":["../node_modules/@nextcloud/router/dist/index.js","../node_modules/dompurify/dist/purify.es.js","../node_modules/escape-html/index.js","../node_modules/@nextcloud/l10n/dist/index.mjs","../node_modules/vite-plugin-node-polyfills/shims/global/dist/index.js","../node_modules/vue/dist/vue.runtime.esm.js","../node_modules/vite-plugin-node-polyfills/shims/process/dist/index.js","../node_modules/path-browserify/index.js","../node_modules/toastify-js/src/toastify.js","../node_modules/lodash.get/index.js","../node_modules/node-gettext/lib/plurals.js","../node_modules/node-gettext/lib/gettext.js","../node_modules/@nextcloud/l10n/dist/gettext.mjs","../node_modules/@nextcloud/dialogs/dist/chunks/toast-WB-IZBJw.mjs","../node_modules/@nextcloud/initial-state/dist/index.es.mjs","../node_modules/@nextcloud/vue/dist/chunks/_plugin-vue2_normalizer-Bj5bLKV4.mjs","../node_modules/@nextcloud/vue/dist/Components/NcLoadingIcon.mjs","../node_modules/@nextcloud/vue/dist/chunks/_l10n-CAwwH-o2.mjs","../node_modules/@nextcloud/vue/dist/chunks/NcCheckboxRadioSwitch.vue_vue_type_style_index_0_scoped_2603be83_lang-DMJGZndr.mjs","../node_modules/@nextcloud/vue/dist/chunks/GenRandomId-BW3iYFf9.mjs","../node_modules/@nextcloud/vue/dist/chunks/NcCheckboxRadioSwitch-DiNnRbJI.mjs","../node_modules/@nextcloud/vue/dist/chunks/NcSettingsSection-COSdi50c.mjs","../src/AdminSettings.vue","../src/settings.js"],"sourcesContent":["\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.linkTo = exports.imagePath = exports.getRootUrl = exports.generateUrl = exports.generateRemoteUrl = exports.generateOcsUrl = exports.generateFilePath = void 0;\n/**\n * Get an url with webroot to a file in an app\n *\n * @param {string} app the id of the app the file belongs to\n * @param {string} file the file path relative to the app folder\n * @return {string} URL with webroot to a file\n */\nconst linkTo = (app, file) => generateFilePath(app, '', file);\n\n/**\n * Creates a relative url for remote use\n *\n * @param {string} service id\n * @return {string} the url\n */\nexports.linkTo = linkTo;\nconst linkToRemoteBase = service => getRootUrl() + '/remote.php/' + service;\n\n/**\n * @brief Creates an absolute url for remote use\n * @param {string} service id\n * @return {string} the url\n */\nconst generateRemoteUrl = service => window.location.protocol + '//' + window.location.host + linkToRemoteBase(service);\n\n/**\n * Get the base path for the given OCS API service\n *\n * @param {string} url OCS API service url\n * @param {object} params parameters to be replaced into the service url\n * @param {UrlOptions} options options for the parameter replacement\n * @param {boolean} options.escape Set to false if parameters should not be URL encoded (default true)\n * @param {Number} options.ocsVersion OCS version to use (defaults to 2)\n * @return {string} Absolute path for the OCS URL\n */\nexports.generateRemoteUrl = generateRemoteUrl;\nconst generateOcsUrl = (url, params, options) => {\n const allOptions = Object.assign({\n ocsVersion: 2\n }, options || {});\n const version = allOptions.ocsVersion === 1 ? 1 : 2;\n return window.location.protocol + '//' + window.location.host + getRootUrl() + '/ocs/v' + version + '.php' + _generateUrlPath(url, params, options);\n};\nexports.generateOcsUrl = generateOcsUrl;\n/**\n * Generate a url path, which can contain parameters\n *\n * Parameters will be URL encoded automatically\n *\n * @param {string} url address (can contain placeholders e.g. /call/{token} would replace {token} with the value of params.token\n * @param {object} params parameters to be replaced into the address\n * @param {UrlOptions} options options for the parameter replacement\n * @return {string} Path part for the given URL\n */\nconst _generateUrlPath = (url, params, options) => {\n const allOptions = Object.assign({\n escape: true\n }, options || {});\n const _build = function (text, vars) {\n vars = vars || {};\n return text.replace(/{([^{}]*)}/g, function (a, b) {\n var r = vars[b];\n if (allOptions.escape) {\n return typeof r === 'string' || typeof r === 'number' ? encodeURIComponent(r.toString()) : encodeURIComponent(a);\n } else {\n return typeof r === 'string' || typeof r === 'number' ? r.toString() : a;\n }\n });\n };\n if (url.charAt(0) !== '/') {\n url = '/' + url;\n }\n return _build(url, params || {});\n};\n\n/**\n * Generate the url with webroot for the given relative url, which can contain parameters\n *\n * Parameters will be URL encoded automatically\n *\n * @param {string} url address (can contain placeholders e.g. /call/{token} would replace {token} with the value of params.token\n * @param {object} params parameters to be replaced into the url\n * @param {UrlOptions} options options for the parameter replacement\n * @param {boolean} options.noRewrite True if you want to force index.php being added\n * @param {boolean} options.escape Set to false if parameters should not be URL encoded (default true)\n * @return {string} URL with webroot for the given relative URL\n */\nconst generateUrl = (url, params, options) => {\n const allOptions = Object.assign({\n noRewrite: false\n }, options || {});\n if (window?.OC?.config?.modRewriteWorking === true && !allOptions.noRewrite) {\n return getRootUrl() + _generateUrlPath(url, params, options);\n }\n return getRootUrl() + '/index.php' + _generateUrlPath(url, params, options);\n};\n\n/**\n * Get the path with webroot to an image file\n * if no extension is given for the image, it will automatically decide\n * between .png and .svg based on what the browser supports\n *\n * @param {string} app the app id to which the image belongs\n * @param {string} file the name of the image file\n * @return {string}\n */\nexports.generateUrl = generateUrl;\nconst imagePath = (app, file) => {\n if (file.indexOf('.') === -1) {\n //if no extension is given, use svg\n return generateFilePath(app, 'img', file + '.svg');\n }\n return generateFilePath(app, 'img', file);\n};\n\n/**\n * Get the url with webroot for a file in an app\n *\n * @param {string} app the id of the app\n * @param {string} type the type of the file to link to (e.g. css,img,ajax.template)\n * @param {string} file the filename\n * @return {string} URL with webroot for a file in an app\n */\nexports.imagePath = imagePath;\nconst generateFilePath = (app, type, file) => {\n const isCore = window?.OC?.coreApps?.indexOf(app) !== -1;\n let link = getRootUrl();\n if (file.substring(file.length - 3) === 'php' && !isCore) {\n link += '/index.php/apps/' + app;\n if (file !== 'index.php') {\n link += '/';\n if (type) {\n link += encodeURI(type + '/');\n }\n link += file;\n }\n } else if (file.substring(file.length - 3) !== 'php' && !isCore) {\n link = window?.OC?.appswebroots?.[app];\n if (type) {\n link += '/' + type + '/';\n }\n if (link.substring(link.length - 1) !== '/') {\n link += '/';\n }\n link += file;\n } else {\n if ((app === 'settings' || app === 'core' || app === 'search') && type === 'ajax') {\n link += '/index.php/';\n } else {\n link += '/';\n }\n if (!isCore) {\n link += 'apps/';\n }\n if (app !== '') {\n app += '/';\n link += app;\n }\n if (type) {\n link += type + '/';\n }\n link += file;\n }\n return link;\n};\n\n/**\n * Return the web root path where this Nextcloud instance\n * is accessible, with a leading slash.\n * For example \"/nextcloud\".\n *\n * @return {string} web root path\n */\nexports.generateFilePath = generateFilePath;\nconst getRootUrl = () => window?.OC?.webroot || '';\nexports.getRootUrl = getRootUrl;\n//# sourceMappingURL=index.js.map","/*! @license DOMPurify 3.0.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.6/LICENSE */\n\nconst {\n entries,\n setPrototypeOf,\n isFrozen,\n getPrototypeOf,\n getOwnPropertyDescriptor\n} = Object;\nlet {\n freeze,\n seal,\n create\n} = Object; // eslint-disable-line import/no-mutable-exports\n\nlet {\n apply,\n construct\n} = typeof Reflect !== 'undefined' && Reflect;\n\nif (!freeze) {\n freeze = function freeze(x) {\n return x;\n };\n}\n\nif (!seal) {\n seal = function seal(x) {\n return x;\n };\n}\n\nif (!apply) {\n apply = function apply(fun, thisValue, args) {\n return fun.apply(thisValue, args);\n };\n}\n\nif (!construct) {\n construct = function construct(Func, args) {\n return new Func(...args);\n };\n}\n\nconst arrayForEach = unapply(Array.prototype.forEach);\nconst arrayPop = unapply(Array.prototype.pop);\nconst arrayPush = unapply(Array.prototype.push);\nconst stringToLowerCase = unapply(String.prototype.toLowerCase);\nconst stringToString = unapply(String.prototype.toString);\nconst stringMatch = unapply(String.prototype.match);\nconst stringReplace = unapply(String.prototype.replace);\nconst stringIndexOf = unapply(String.prototype.indexOf);\nconst stringTrim = unapply(String.prototype.trim);\nconst regExpTest = unapply(RegExp.prototype.test);\nconst typeErrorCreate = unconstruct(TypeError);\n/**\n * Creates a new function that calls the given function with a specified thisArg and arguments.\n *\n * @param {Function} func - The function to be wrapped and called.\n * @returns {Function} A new function that calls the given function with a specified thisArg and arguments.\n */\n\nfunction unapply(func) {\n return function (thisArg) {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n return apply(func, thisArg, args);\n };\n}\n/**\n * Creates a new function that constructs an instance of the given constructor function with the provided arguments.\n *\n * @param {Function} func - The constructor function to be wrapped and called.\n * @returns {Function} A new function that constructs an instance of the given constructor function with the provided arguments.\n */\n\n\nfunction unconstruct(func) {\n return function () {\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n return construct(func, args);\n };\n}\n/**\n * Add properties to a lookup table\n *\n * @param {Object} set - The set to which elements will be added.\n * @param {Array} array - The array containing elements to be added to the set.\n * @param {Function} transformCaseFunc - An optional function to transform the case of each element before adding to the set.\n * @returns {Object} The modified set with added elements.\n */\n\n\nfunction addToSet(set, array) {\n let transformCaseFunc = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : stringToLowerCase;\n\n if (setPrototypeOf) {\n // Make 'in' and truthy checks like Boolean(set.constructor)\n // independent of any properties defined on Object.prototype.\n // Prevent prototype setters from intercepting set as a this value.\n setPrototypeOf(set, null);\n }\n\n let l = array.length;\n\n while (l--) {\n let element = array[l];\n\n if (typeof element === 'string') {\n const lcElement = transformCaseFunc(element);\n\n if (lcElement !== element) {\n // Config presets (e.g. tags.js, attrs.js) are immutable.\n if (!isFrozen(array)) {\n array[l] = lcElement;\n }\n\n element = lcElement;\n }\n }\n\n set[element] = true;\n }\n\n return set;\n}\n/**\n * Shallow clone an object\n *\n * @param {Object} object - The object to be cloned.\n * @returns {Object} A new object that copies the original.\n */\n\n\nfunction clone(object) {\n const newObject = create(null);\n\n for (const [property, value] of entries(object)) {\n if (getOwnPropertyDescriptor(object, property) !== undefined) {\n newObject[property] = value;\n }\n }\n\n return newObject;\n}\n/**\n * This method automatically checks if the prop is function or getter and behaves accordingly.\n *\n * @param {Object} object - The object to look up the getter function in its prototype chain.\n * @param {String} prop - The property name for which to find the getter function.\n * @returns {Function} The getter function found in the prototype chain or a fallback function.\n */\n\nfunction lookupGetter(object, prop) {\n while (object !== null) {\n const desc = getOwnPropertyDescriptor(object, prop);\n\n if (desc) {\n if (desc.get) {\n return unapply(desc.get);\n }\n\n if (typeof desc.value === 'function') {\n return unapply(desc.value);\n }\n }\n\n object = getPrototypeOf(object);\n }\n\n function fallbackValue(element) {\n console.warn('fallback value for', element);\n return null;\n }\n\n return fallbackValue;\n}\n\nconst html$1 = freeze(['a', 'abbr', 'acronym', 'address', 'area', 'article', 'aside', 'audio', 'b', 'bdi', 'bdo', 'big', 'blink', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'center', 'cite', 'code', 'col', 'colgroup', 'content', 'data', 'datalist', 'dd', 'decorator', 'del', 'details', 'dfn', 'dialog', 'dir', 'div', 'dl', 'dt', 'element', 'em', 'fieldset', 'figcaption', 'figure', 'font', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'img', 'input', 'ins', 'kbd', 'label', 'legend', 'li', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meter', 'nav', 'nobr', 'ol', 'optgroup', 'option', 'output', 'p', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'section', 'select', 'shadow', 'small', 'source', 'spacer', 'span', 'strike', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'time', 'tr', 'track', 'tt', 'u', 'ul', 'var', 'video', 'wbr']); // SVG\n\nconst svg$1 = freeze(['svg', 'a', 'altglyph', 'altglyphdef', 'altglyphitem', 'animatecolor', 'animatemotion', 'animatetransform', 'circle', 'clippath', 'defs', 'desc', 'ellipse', 'filter', 'font', 'g', 'glyph', 'glyphref', 'hkern', 'image', 'line', 'lineargradient', 'marker', 'mask', 'metadata', 'mpath', 'path', 'pattern', 'polygon', 'polyline', 'radialgradient', 'rect', 'stop', 'style', 'switch', 'symbol', 'text', 'textpath', 'title', 'tref', 'tspan', 'view', 'vkern']);\nconst svgFilters = freeze(['feBlend', 'feColorMatrix', 'feComponentTransfer', 'feComposite', 'feConvolveMatrix', 'feDiffuseLighting', 'feDisplacementMap', 'feDistantLight', 'feDropShadow', 'feFlood', 'feFuncA', 'feFuncB', 'feFuncG', 'feFuncR', 'feGaussianBlur', 'feImage', 'feMerge', 'feMergeNode', 'feMorphology', 'feOffset', 'fePointLight', 'feSpecularLighting', 'feSpotLight', 'feTile', 'feTurbulence']); // List of SVG elements that are disallowed by default.\n// We still need to know them so that we can do namespace\n// checks properly in case one wants to add them to\n// allow-list.\n\nconst svgDisallowed = freeze(['animate', 'color-profile', 'cursor', 'discard', 'font-face', 'font-face-format', 'font-face-name', 'font-face-src', 'font-face-uri', 'foreignobject', 'hatch', 'hatchpath', 'mesh', 'meshgradient', 'meshpatch', 'meshrow', 'missing-glyph', 'script', 'set', 'solidcolor', 'unknown', 'use']);\nconst mathMl$1 = freeze(['math', 'menclose', 'merror', 'mfenced', 'mfrac', 'mglyph', 'mi', 'mlabeledtr', 'mmultiscripts', 'mn', 'mo', 'mover', 'mpadded', 'mphantom', 'mroot', 'mrow', 'ms', 'mspace', 'msqrt', 'mstyle', 'msub', 'msup', 'msubsup', 'mtable', 'mtd', 'mtext', 'mtr', 'munder', 'munderover', 'mprescripts']); // Similarly to SVG, we want to know all MathML elements,\n// even those that we disallow by default.\n\nconst mathMlDisallowed = freeze(['maction', 'maligngroup', 'malignmark', 'mlongdiv', 'mscarries', 'mscarry', 'msgroup', 'mstack', 'msline', 'msrow', 'semantics', 'annotation', 'annotation-xml', 'mprescripts', 'none']);\nconst text = freeze(['#text']);\n\nconst html = freeze(['accept', 'action', 'align', 'alt', 'autocapitalize', 'autocomplete', 'autopictureinpicture', 'autoplay', 'background', 'bgcolor', 'border', 'capture', 'cellpadding', 'cellspacing', 'checked', 'cite', 'class', 'clear', 'color', 'cols', 'colspan', 'controls', 'controlslist', 'coords', 'crossorigin', 'datetime', 'decoding', 'default', 'dir', 'disabled', 'disablepictureinpicture', 'disableremoteplayback', 'download', 'draggable', 'enctype', 'enterkeyhint', 'face', 'for', 'headers', 'height', 'hidden', 'high', 'href', 'hreflang', 'id', 'inputmode', 'integrity', 'ismap', 'kind', 'label', 'lang', 'list', 'loading', 'loop', 'low', 'max', 'maxlength', 'media', 'method', 'min', 'minlength', 'multiple', 'muted', 'name', 'nonce', 'noshade', 'novalidate', 'nowrap', 'open', 'optimum', 'pattern', 'placeholder', 'playsinline', 'poster', 'preload', 'pubdate', 'radiogroup', 'readonly', 'rel', 'required', 'rev', 'reversed', 'role', 'rows', 'rowspan', 'spellcheck', 'scope', 'selected', 'shape', 'size', 'sizes', 'span', 'srclang', 'start', 'src', 'srcset', 'step', 'style', 'summary', 'tabindex', 'title', 'translate', 'type', 'usemap', 'valign', 'value', 'width', 'xmlns', 'slot']);\nconst svg = freeze(['accent-height', 'accumulate', 'additive', 'alignment-baseline', 'ascent', 'attributename', 'attributetype', 'azimuth', 'basefrequency', 'baseline-shift', 'begin', 'bias', 'by', 'class', 'clip', 'clippathunits', 'clip-path', 'clip-rule', 'color', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'cx', 'cy', 'd', 'dx', 'dy', 'diffuseconstant', 'direction', 'display', 'divisor', 'dur', 'edgemode', 'elevation', 'end', 'fill', 'fill-opacity', 'fill-rule', 'filter', 'filterunits', 'flood-color', 'flood-opacity', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'fx', 'fy', 'g1', 'g2', 'glyph-name', 'glyphref', 'gradientunits', 'gradienttransform', 'height', 'href', 'id', 'image-rendering', 'in', 'in2', 'k', 'k1', 'k2', 'k3', 'k4', 'kerning', 'keypoints', 'keysplines', 'keytimes', 'lang', 'lengthadjust', 'letter-spacing', 'kernelmatrix', 'kernelunitlength', 'lighting-color', 'local', 'marker-end', 'marker-mid', 'marker-start', 'markerheight', 'markerunits', 'markerwidth', 'maskcontentunits', 'maskunits', 'max', 'mask', 'media', 'method', 'mode', 'min', 'name', 'numoctaves', 'offset', 'operator', 'opacity', 'order', 'orient', 'orientation', 'origin', 'overflow', 'paint-order', 'path', 'pathlength', 'patterncontentunits', 'patterntransform', 'patternunits', 'points', 'preservealpha', 'preserveaspectratio', 'primitiveunits', 'r', 'rx', 'ry', 'radius', 'refx', 'refy', 'repeatcount', 'repeatdur', 'restart', 'result', 'rotate', 'scale', 'seed', 'shape-rendering', 'specularconstant', 'specularexponent', 'spreadmethod', 'startoffset', 'stddeviation', 'stitchtiles', 'stop-color', 'stop-opacity', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke', 'stroke-width', 'style', 'surfacescale', 'systemlanguage', 'tabindex', 'targetx', 'targety', 'transform', 'transform-origin', 'text-anchor', 'text-decoration', 'text-rendering', 'textlength', 'type', 'u1', 'u2', 'unicode', 'values', 'viewbox', 'visibility', 'version', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'width', 'word-spacing', 'wrap', 'writing-mode', 'xchannelselector', 'ychannelselector', 'x', 'x1', 'x2', 'xmlns', 'y', 'y1', 'y2', 'z', 'zoomandpan']);\nconst mathMl = freeze(['accent', 'accentunder', 'align', 'bevelled', 'close', 'columnsalign', 'columnlines', 'columnspan', 'denomalign', 'depth', 'dir', 'display', 'displaystyle', 'encoding', 'fence', 'frame', 'height', 'href', 'id', 'largeop', 'length', 'linethickness', 'lspace', 'lquote', 'mathbackground', 'mathcolor', 'mathsize', 'mathvariant', 'maxsize', 'minsize', 'movablelimits', 'notation', 'numalign', 'open', 'rowalign', 'rowlines', 'rowspacing', 'rowspan', 'rspace', 'rquote', 'scriptlevel', 'scriptminsize', 'scriptsizemultiplier', 'selection', 'separator', 'separators', 'stretchy', 'subscriptshift', 'supscriptshift', 'symmetric', 'voffset', 'width', 'xmlns']);\nconst xml = freeze(['xlink:href', 'xml:id', 'xlink:title', 'xml:space', 'xmlns:xlink']);\n\nconst MUSTACHE_EXPR = seal(/\\{\\{[\\w\\W]*|[\\w\\W]*\\}\\}/gm); // Specify template detection regex for SAFE_FOR_TEMPLATES mode\n\nconst ERB_EXPR = seal(/<%[\\w\\W]*|[\\w\\W]*%>/gm);\nconst TMPLIT_EXPR = seal(/\\${[\\w\\W]*}/gm);\nconst DATA_ATTR = seal(/^data-[\\-\\w.\\u00B7-\\uFFFF]/); // eslint-disable-line no-useless-escape\n\nconst ARIA_ATTR = seal(/^aria-[\\-\\w]+$/); // eslint-disable-line no-useless-escape\n\nconst IS_ALLOWED_URI = seal(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\\-]+(?:[^a-z+.\\-:]|$))/i // eslint-disable-line no-useless-escape\n);\nconst IS_SCRIPT_OR_DATA = seal(/^(?:\\w+script|data):/i);\nconst ATTR_WHITESPACE = seal(/[\\u0000-\\u0020\\u00A0\\u1680\\u180E\\u2000-\\u2029\\u205F\\u3000]/g // eslint-disable-line no-control-regex\n);\nconst DOCTYPE_NAME = seal(/^html$/i);\n\nvar EXPRESSIONS = /*#__PURE__*/Object.freeze({\n __proto__: null,\n MUSTACHE_EXPR: MUSTACHE_EXPR,\n ERB_EXPR: ERB_EXPR,\n TMPLIT_EXPR: TMPLIT_EXPR,\n DATA_ATTR: DATA_ATTR,\n ARIA_ATTR: ARIA_ATTR,\n IS_ALLOWED_URI: IS_ALLOWED_URI,\n IS_SCRIPT_OR_DATA: IS_SCRIPT_OR_DATA,\n ATTR_WHITESPACE: ATTR_WHITESPACE,\n DOCTYPE_NAME: DOCTYPE_NAME\n});\n\nconst getGlobal = function getGlobal() {\n return typeof window === 'undefined' ? null : window;\n};\n/**\n * Creates a no-op policy for internal use only.\n * Don't export this function outside this module!\n * @param {?TrustedTypePolicyFactory} trustedTypes The policy factory.\n * @param {HTMLScriptElement} purifyHostElement The Script element used to load DOMPurify (to determine policy name suffix).\n * @return {?TrustedTypePolicy} The policy created (or null, if Trusted Types\n * are not supported or creating the policy failed).\n */\n\n\nconst _createTrustedTypesPolicy = function _createTrustedTypesPolicy(trustedTypes, purifyHostElement) {\n if (typeof trustedTypes !== 'object' || typeof trustedTypes.createPolicy !== 'function') {\n return null;\n } // Allow the callers to control the unique policy name\n // by adding a data-tt-policy-suffix to the script element with the DOMPurify.\n // Policy creation with duplicate names throws in Trusted Types.\n\n\n let suffix = null;\n const ATTR_NAME = 'data-tt-policy-suffix';\n\n if (purifyHostElement && purifyHostElement.hasAttribute(ATTR_NAME)) {\n suffix = purifyHostElement.getAttribute(ATTR_NAME);\n }\n\n const policyName = 'dompurify' + (suffix ? '#' + suffix : '');\n\n try {\n return trustedTypes.createPolicy(policyName, {\n createHTML(html) {\n return html;\n },\n\n createScriptURL(scriptUrl) {\n return scriptUrl;\n }\n\n });\n } catch (_) {\n // Policy creation failed (most likely another DOMPurify script has\n // already run). Skip creating the policy, as this will only cause errors\n // if TT are enforced.\n console.warn('TrustedTypes policy ' + policyName + ' could not be created.');\n return null;\n }\n};\n\nfunction createDOMPurify() {\n let window = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getGlobal();\n\n const DOMPurify = root => createDOMPurify(root);\n /**\n * Version label, exposed for easier checks\n * if DOMPurify is up to date or not\n */\n\n\n DOMPurify.version = '3.0.6';\n /**\n * Array of elements that DOMPurify removed during sanitation.\n * Empty if nothing was removed.\n */\n\n DOMPurify.removed = [];\n\n if (!window || !window.document || window.document.nodeType !== 9) {\n // Not running in a browser, provide a factory function\n // so that you can pass your own Window\n DOMPurify.isSupported = false;\n return DOMPurify;\n }\n\n let {\n document\n } = window;\n const originalDocument = document;\n const currentScript = originalDocument.currentScript;\n const {\n DocumentFragment,\n HTMLTemplateElement,\n Node,\n Element,\n NodeFilter,\n NamedNodeMap = window.NamedNodeMap || window.MozNamedAttrMap,\n HTMLFormElement,\n DOMParser,\n trustedTypes\n } = window;\n const ElementPrototype = Element.prototype;\n const cloneNode = lookupGetter(ElementPrototype, 'cloneNode');\n const getNextSibling = lookupGetter(ElementPrototype, 'nextSibling');\n const getChildNodes = lookupGetter(ElementPrototype, 'childNodes');\n const getParentNode = lookupGetter(ElementPrototype, 'parentNode'); // As per issue #47, the web-components registry is inherited by a\n // new document created via createHTMLDocument. As per the spec\n // (http://w3c.github.io/webcomponents/spec/custom/#creating-and-passing-registries)\n // a new empty registry is used when creating a template contents owner\n // document, so we use that as our parent document to ensure nothing\n // is inherited.\n\n if (typeof HTMLTemplateElement === 'function') {\n const template = document.createElement('template');\n\n if (template.content && template.content.ownerDocument) {\n document = template.content.ownerDocument;\n }\n }\n\n let trustedTypesPolicy;\n let emptyHTML = '';\n const {\n implementation,\n createNodeIterator,\n createDocumentFragment,\n getElementsByTagName\n } = document;\n const {\n importNode\n } = originalDocument;\n let hooks = {};\n /**\n * Expose whether this browser supports running the full DOMPurify.\n */\n\n DOMPurify.isSupported = typeof entries === 'function' && typeof getParentNode === 'function' && implementation && implementation.createHTMLDocument !== undefined;\n const {\n MUSTACHE_EXPR,\n ERB_EXPR,\n TMPLIT_EXPR,\n DATA_ATTR,\n ARIA_ATTR,\n IS_SCRIPT_OR_DATA,\n ATTR_WHITESPACE\n } = EXPRESSIONS;\n let {\n IS_ALLOWED_URI: IS_ALLOWED_URI$1\n } = EXPRESSIONS;\n /**\n * We consider the elements and attributes below to be safe. Ideally\n * don't add any new ones but feel free to remove unwanted ones.\n */\n\n /* allowed element names */\n\n let ALLOWED_TAGS = null;\n const DEFAULT_ALLOWED_TAGS = addToSet({}, [...html$1, ...svg$1, ...svgFilters, ...mathMl$1, ...text]);\n /* Allowed attribute names */\n\n let ALLOWED_ATTR = null;\n const DEFAULT_ALLOWED_ATTR = addToSet({}, [...html, ...svg, ...mathMl, ...xml]);\n /*\n * Configure how DOMPUrify should handle custom elements and their attributes as well as customized built-in elements.\n * @property {RegExp|Function|null} tagNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any custom elements)\n * @property {RegExp|Function|null} attributeNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any attributes not on the allow list)\n * @property {boolean} allowCustomizedBuiltInElements allow custom elements derived from built-ins if they pass CUSTOM_ELEMENT_HANDLING.tagNameCheck. Default: `false`.\n */\n\n let CUSTOM_ELEMENT_HANDLING = Object.seal(create(null, {\n tagNameCheck: {\n writable: true,\n configurable: false,\n enumerable: true,\n value: null\n },\n attributeNameCheck: {\n writable: true,\n configurable: false,\n enumerable: true,\n value: null\n },\n allowCustomizedBuiltInElements: {\n writable: true,\n configurable: false,\n enumerable: true,\n value: false\n }\n }));\n /* Explicitly forbidden tags (overrides ALLOWED_TAGS/ADD_TAGS) */\n\n let FORBID_TAGS = null;\n /* Explicitly forbidden attributes (overrides ALLOWED_ATTR/ADD_ATTR) */\n\n let FORBID_ATTR = null;\n /* Decide if ARIA attributes are okay */\n\n let ALLOW_ARIA_ATTR = true;\n /* Decide if custom data attributes are okay */\n\n let ALLOW_DATA_ATTR = true;\n /* Decide if unknown protocols are okay */\n\n let ALLOW_UNKNOWN_PROTOCOLS = false;\n /* Decide if self-closing tags in attributes are allowed.\n * Usually removed due to a mXSS issue in jQuery 3.0 */\n\n let ALLOW_SELF_CLOSE_IN_ATTR = true;\n /* Output should be safe for common template engines.\n * This means, DOMPurify removes data attributes, mustaches and ERB\n */\n\n let SAFE_FOR_TEMPLATES = false;\n /* Decide if document with ... should be returned */\n\n let WHOLE_DOCUMENT = false;\n /* Track whether config is already set on this instance of DOMPurify. */\n\n let SET_CONFIG = false;\n /* Decide if all elements (e.g. style, script) must be children of\n * document.body. By default, browsers might move them to document.head */\n\n let FORCE_BODY = false;\n /* Decide if a DOM `HTMLBodyElement` should be returned, instead of a html\n * string (or a TrustedHTML object if Trusted Types are supported).\n * If `WHOLE_DOCUMENT` is enabled a `HTMLHtmlElement` will be returned instead\n */\n\n let RETURN_DOM = false;\n /* Decide if a DOM `DocumentFragment` should be returned, instead of a html\n * string (or a TrustedHTML object if Trusted Types are supported) */\n\n let RETURN_DOM_FRAGMENT = false;\n /* Try to return a Trusted Type object instead of a string, return a string in\n * case Trusted Types are not supported */\n\n let RETURN_TRUSTED_TYPE = false;\n /* Output should be free from DOM clobbering attacks?\n * This sanitizes markups named with colliding, clobberable built-in DOM APIs.\n */\n\n let SANITIZE_DOM = true;\n /* Achieve full DOM Clobbering protection by isolating the namespace of named\n * properties and JS variables, mitigating attacks that abuse the HTML/DOM spec rules.\n *\n * HTML/DOM spec rules that enable DOM Clobbering:\n * - Named Access on Window (§7.3.3)\n * - DOM Tree Accessors (§3.1.5)\n * - Form Element Parent-Child Relations (§4.10.3)\n * - Iframe srcdoc / Nested WindowProxies (§4.8.5)\n * - HTMLCollection (§4.2.10.2)\n *\n * Namespace isolation is implemented by prefixing `id` and `name` attributes\n * with a constant string, i.e., `user-content-`\n */\n\n let SANITIZE_NAMED_PROPS = false;\n const SANITIZE_NAMED_PROPS_PREFIX = 'user-content-';\n /* Keep element content when removing element? */\n\n let KEEP_CONTENT = true;\n /* If a `Node` is passed to sanitize(), then performs sanitization in-place instead\n * of importing it into a new Document and returning a sanitized copy */\n\n let IN_PLACE = false;\n /* Allow usage of profiles like html, svg and mathMl */\n\n let USE_PROFILES = {};\n /* Tags to ignore content of when KEEP_CONTENT is true */\n\n let FORBID_CONTENTS = null;\n const DEFAULT_FORBID_CONTENTS = addToSet({}, ['annotation-xml', 'audio', 'colgroup', 'desc', 'foreignobject', 'head', 'iframe', 'math', 'mi', 'mn', 'mo', 'ms', 'mtext', 'noembed', 'noframes', 'noscript', 'plaintext', 'script', 'style', 'svg', 'template', 'thead', 'title', 'video', 'xmp']);\n /* Tags that are safe for data: URIs */\n\n let DATA_URI_TAGS = null;\n const DEFAULT_DATA_URI_TAGS = addToSet({}, ['audio', 'video', 'img', 'source', 'image', 'track']);\n /* Attributes safe for values like \"javascript:\" */\n\n let URI_SAFE_ATTRIBUTES = null;\n const DEFAULT_URI_SAFE_ATTRIBUTES = addToSet({}, ['alt', 'class', 'for', 'id', 'label', 'name', 'pattern', 'placeholder', 'role', 'summary', 'title', 'value', 'style', 'xmlns']);\n const MATHML_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';\n const SVG_NAMESPACE = 'http://www.w3.org/2000/svg';\n const HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';\n /* Document namespace */\n\n let NAMESPACE = HTML_NAMESPACE;\n let IS_EMPTY_INPUT = false;\n /* Allowed XHTML+XML namespaces */\n\n let ALLOWED_NAMESPACES = null;\n const DEFAULT_ALLOWED_NAMESPACES = addToSet({}, [MATHML_NAMESPACE, SVG_NAMESPACE, HTML_NAMESPACE], stringToString);\n /* Parsing of strict XHTML documents */\n\n let PARSER_MEDIA_TYPE = null;\n const SUPPORTED_PARSER_MEDIA_TYPES = ['application/xhtml+xml', 'text/html'];\n const DEFAULT_PARSER_MEDIA_TYPE = 'text/html';\n let transformCaseFunc = null;\n /* Keep a reference to config to pass to hooks */\n\n let CONFIG = null;\n /* Ideally, do not touch anything below this line */\n\n /* ______________________________________________ */\n\n const formElement = document.createElement('form');\n\n const isRegexOrFunction = function isRegexOrFunction(testValue) {\n return testValue instanceof RegExp || testValue instanceof Function;\n };\n /**\n * _parseConfig\n *\n * @param {Object} cfg optional config literal\n */\n // eslint-disable-next-line complexity\n\n\n const _parseConfig = function _parseConfig() {\n let cfg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n if (CONFIG && CONFIG === cfg) {\n return;\n }\n /* Shield configuration object from tampering */\n\n\n if (!cfg || typeof cfg !== 'object') {\n cfg = {};\n }\n /* Shield configuration object from prototype pollution */\n\n\n cfg = clone(cfg);\n PARSER_MEDIA_TYPE = // eslint-disable-next-line unicorn/prefer-includes\n SUPPORTED_PARSER_MEDIA_TYPES.indexOf(cfg.PARSER_MEDIA_TYPE) === -1 ? PARSER_MEDIA_TYPE = DEFAULT_PARSER_MEDIA_TYPE : PARSER_MEDIA_TYPE = cfg.PARSER_MEDIA_TYPE; // HTML tags and attributes are not case-sensitive, converting to lowercase. Keeping XHTML as is.\n\n transformCaseFunc = PARSER_MEDIA_TYPE === 'application/xhtml+xml' ? stringToString : stringToLowerCase;\n /* Set configuration parameters */\n\n ALLOWED_TAGS = 'ALLOWED_TAGS' in cfg ? addToSet({}, cfg.ALLOWED_TAGS, transformCaseFunc) : DEFAULT_ALLOWED_TAGS;\n ALLOWED_ATTR = 'ALLOWED_ATTR' in cfg ? addToSet({}, cfg.ALLOWED_ATTR, transformCaseFunc) : DEFAULT_ALLOWED_ATTR;\n ALLOWED_NAMESPACES = 'ALLOWED_NAMESPACES' in cfg ? addToSet({}, cfg.ALLOWED_NAMESPACES, stringToString) : DEFAULT_ALLOWED_NAMESPACES;\n URI_SAFE_ATTRIBUTES = 'ADD_URI_SAFE_ATTR' in cfg ? addToSet(clone(DEFAULT_URI_SAFE_ATTRIBUTES), // eslint-disable-line indent\n cfg.ADD_URI_SAFE_ATTR, // eslint-disable-line indent\n transformCaseFunc // eslint-disable-line indent\n ) // eslint-disable-line indent\n : DEFAULT_URI_SAFE_ATTRIBUTES;\n DATA_URI_TAGS = 'ADD_DATA_URI_TAGS' in cfg ? addToSet(clone(DEFAULT_DATA_URI_TAGS), // eslint-disable-line indent\n cfg.ADD_DATA_URI_TAGS, // eslint-disable-line indent\n transformCaseFunc // eslint-disable-line indent\n ) // eslint-disable-line indent\n : DEFAULT_DATA_URI_TAGS;\n FORBID_CONTENTS = 'FORBID_CONTENTS' in cfg ? addToSet({}, cfg.FORBID_CONTENTS, transformCaseFunc) : DEFAULT_FORBID_CONTENTS;\n FORBID_TAGS = 'FORBID_TAGS' in cfg ? addToSet({}, cfg.FORBID_TAGS, transformCaseFunc) : {};\n FORBID_ATTR = 'FORBID_ATTR' in cfg ? addToSet({}, cfg.FORBID_ATTR, transformCaseFunc) : {};\n USE_PROFILES = 'USE_PROFILES' in cfg ? cfg.USE_PROFILES : false;\n ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false; // Default true\n\n ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false; // Default true\n\n ALLOW_UNKNOWN_PROTOCOLS = cfg.ALLOW_UNKNOWN_PROTOCOLS || false; // Default false\n\n ALLOW_SELF_CLOSE_IN_ATTR = cfg.ALLOW_SELF_CLOSE_IN_ATTR !== false; // Default true\n\n SAFE_FOR_TEMPLATES = cfg.SAFE_FOR_TEMPLATES || false; // Default false\n\n WHOLE_DOCUMENT = cfg.WHOLE_DOCUMENT || false; // Default false\n\n RETURN_DOM = cfg.RETURN_DOM || false; // Default false\n\n RETURN_DOM_FRAGMENT = cfg.RETURN_DOM_FRAGMENT || false; // Default false\n\n RETURN_TRUSTED_TYPE = cfg.RETURN_TRUSTED_TYPE || false; // Default false\n\n FORCE_BODY = cfg.FORCE_BODY || false; // Default false\n\n SANITIZE_DOM = cfg.SANITIZE_DOM !== false; // Default true\n\n SANITIZE_NAMED_PROPS = cfg.SANITIZE_NAMED_PROPS || false; // Default false\n\n KEEP_CONTENT = cfg.KEEP_CONTENT !== false; // Default true\n\n IN_PLACE = cfg.IN_PLACE || false; // Default false\n\n IS_ALLOWED_URI$1 = cfg.ALLOWED_URI_REGEXP || IS_ALLOWED_URI;\n NAMESPACE = cfg.NAMESPACE || HTML_NAMESPACE;\n CUSTOM_ELEMENT_HANDLING = cfg.CUSTOM_ELEMENT_HANDLING || {};\n\n if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck)) {\n CUSTOM_ELEMENT_HANDLING.tagNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck;\n }\n\n if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)) {\n CUSTOM_ELEMENT_HANDLING.attributeNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck;\n }\n\n if (cfg.CUSTOM_ELEMENT_HANDLING && typeof cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements === 'boolean') {\n CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements = cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements;\n }\n\n if (SAFE_FOR_TEMPLATES) {\n ALLOW_DATA_ATTR = false;\n }\n\n if (RETURN_DOM_FRAGMENT) {\n RETURN_DOM = true;\n }\n /* Parse profile info */\n\n\n if (USE_PROFILES) {\n ALLOWED_TAGS = addToSet({}, [...text]);\n ALLOWED_ATTR = [];\n\n if (USE_PROFILES.html === true) {\n addToSet(ALLOWED_TAGS, html$1);\n addToSet(ALLOWED_ATTR, html);\n }\n\n if (USE_PROFILES.svg === true) {\n addToSet(ALLOWED_TAGS, svg$1);\n addToSet(ALLOWED_ATTR, svg);\n addToSet(ALLOWED_ATTR, xml);\n }\n\n if (USE_PROFILES.svgFilters === true) {\n addToSet(ALLOWED_TAGS, svgFilters);\n addToSet(ALLOWED_ATTR, svg);\n addToSet(ALLOWED_ATTR, xml);\n }\n\n if (USE_PROFILES.mathMl === true) {\n addToSet(ALLOWED_TAGS, mathMl$1);\n addToSet(ALLOWED_ATTR, mathMl);\n addToSet(ALLOWED_ATTR, xml);\n }\n }\n /* Merge configuration parameters */\n\n\n if (cfg.ADD_TAGS) {\n if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) {\n ALLOWED_TAGS = clone(ALLOWED_TAGS);\n }\n\n addToSet(ALLOWED_TAGS, cfg.ADD_TAGS, transformCaseFunc);\n }\n\n if (cfg.ADD_ATTR) {\n if (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) {\n ALLOWED_ATTR = clone(ALLOWED_ATTR);\n }\n\n addToSet(ALLOWED_ATTR, cfg.ADD_ATTR, transformCaseFunc);\n }\n\n if (cfg.ADD_URI_SAFE_ATTR) {\n addToSet(URI_SAFE_ATTRIBUTES, cfg.ADD_URI_SAFE_ATTR, transformCaseFunc);\n }\n\n if (cfg.FORBID_CONTENTS) {\n if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) {\n FORBID_CONTENTS = clone(FORBID_CONTENTS);\n }\n\n addToSet(FORBID_CONTENTS, cfg.FORBID_CONTENTS, transformCaseFunc);\n }\n /* Add #text in case KEEP_CONTENT is set to true */\n\n\n if (KEEP_CONTENT) {\n ALLOWED_TAGS['#text'] = true;\n }\n /* Add html, head and body to ALLOWED_TAGS in case WHOLE_DOCUMENT is true */\n\n\n if (WHOLE_DOCUMENT) {\n addToSet(ALLOWED_TAGS, ['html', 'head', 'body']);\n }\n /* Add tbody to ALLOWED_TAGS in case tables are permitted, see #286, #365 */\n\n\n if (ALLOWED_TAGS.table) {\n addToSet(ALLOWED_TAGS, ['tbody']);\n delete FORBID_TAGS.tbody;\n }\n\n if (cfg.TRUSTED_TYPES_POLICY) {\n if (typeof cfg.TRUSTED_TYPES_POLICY.createHTML !== 'function') {\n throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.');\n }\n\n if (typeof cfg.TRUSTED_TYPES_POLICY.createScriptURL !== 'function') {\n throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.');\n } // Overwrite existing TrustedTypes policy.\n\n\n trustedTypesPolicy = cfg.TRUSTED_TYPES_POLICY; // Sign local variables required by `sanitize`.\n\n emptyHTML = trustedTypesPolicy.createHTML('');\n } else {\n // Uninitialized policy, attempt to initialize the internal dompurify policy.\n if (trustedTypesPolicy === undefined) {\n trustedTypesPolicy = _createTrustedTypesPolicy(trustedTypes, currentScript);\n } // If creating the internal policy succeeded sign internal variables.\n\n\n if (trustedTypesPolicy !== null && typeof emptyHTML === 'string') {\n emptyHTML = trustedTypesPolicy.createHTML('');\n }\n } // Prevent further manipulation of configuration.\n // Not available in IE8, Safari 5, etc.\n\n\n if (freeze) {\n freeze(cfg);\n }\n\n CONFIG = cfg;\n };\n\n const MATHML_TEXT_INTEGRATION_POINTS = addToSet({}, ['mi', 'mo', 'mn', 'ms', 'mtext']);\n const HTML_INTEGRATION_POINTS = addToSet({}, ['foreignobject', 'desc', 'title', 'annotation-xml']); // Certain elements are allowed in both SVG and HTML\n // namespace. We need to specify them explicitly\n // so that they don't get erroneously deleted from\n // HTML namespace.\n\n const COMMON_SVG_AND_HTML_ELEMENTS = addToSet({}, ['title', 'style', 'font', 'a', 'script']);\n /* Keep track of all possible SVG and MathML tags\n * so that we can perform the namespace checks\n * correctly. */\n\n const ALL_SVG_TAGS = addToSet({}, svg$1);\n addToSet(ALL_SVG_TAGS, svgFilters);\n addToSet(ALL_SVG_TAGS, svgDisallowed);\n const ALL_MATHML_TAGS = addToSet({}, mathMl$1);\n addToSet(ALL_MATHML_TAGS, mathMlDisallowed);\n /**\n * @param {Element} element a DOM element whose namespace is being checked\n * @returns {boolean} Return false if the element has a\n * namespace that a spec-compliant parser would never\n * return. Return true otherwise.\n */\n\n const _checkValidNamespace = function _checkValidNamespace(element) {\n let parent = getParentNode(element); // In JSDOM, if we're inside shadow DOM, then parentNode\n // can be null. We just simulate parent in this case.\n\n if (!parent || !parent.tagName) {\n parent = {\n namespaceURI: NAMESPACE,\n tagName: 'template'\n };\n }\n\n const tagName = stringToLowerCase(element.tagName);\n const parentTagName = stringToLowerCase(parent.tagName);\n\n if (!ALLOWED_NAMESPACES[element.namespaceURI]) {\n return false;\n }\n\n if (element.namespaceURI === SVG_NAMESPACE) {\n // The only way to switch from HTML namespace to SVG\n // is via . If it happens via any other tag, then\n // it should be killed.\n if (parent.namespaceURI === HTML_NAMESPACE) {\n return tagName === 'svg';\n } // The only way to switch from MathML to SVG is via`\n // svg if parent is either or MathML\n // text integration points.\n\n\n if (parent.namespaceURI === MATHML_NAMESPACE) {\n return tagName === 'svg' && (parentTagName === 'annotation-xml' || MATHML_TEXT_INTEGRATION_POINTS[parentTagName]);\n } // We only allow elements that are defined in SVG\n // spec. All others are disallowed in SVG namespace.\n\n\n return Boolean(ALL_SVG_TAGS[tagName]);\n }\n\n if (element.namespaceURI === MATHML_NAMESPACE) {\n // The only way to switch from HTML namespace to MathML\n // is via . If it happens via any other tag, then\n // it should be killed.\n if (parent.namespaceURI === HTML_NAMESPACE) {\n return tagName === 'math';\n } // The only way to switch from SVG to MathML is via\n // and HTML integration points\n\n\n if (parent.namespaceURI === SVG_NAMESPACE) {\n return tagName === 'math' && HTML_INTEGRATION_POINTS[parentTagName];\n } // We only allow elements that are defined in MathML\n // spec. All others are disallowed in MathML namespace.\n\n\n return Boolean(ALL_MATHML_TAGS[tagName]);\n }\n\n if (element.namespaceURI === HTML_NAMESPACE) {\n // The only way to switch from SVG to HTML is via\n // HTML integration points, and from MathML to HTML\n // is via MathML text integration points\n if (parent.namespaceURI === SVG_NAMESPACE && !HTML_INTEGRATION_POINTS[parentTagName]) {\n return false;\n }\n\n if (parent.namespaceURI === MATHML_NAMESPACE && !MATHML_TEXT_INTEGRATION_POINTS[parentTagName]) {\n return false;\n } // We disallow tags that are specific for MathML\n // or SVG and should never appear in HTML namespace\n\n\n return !ALL_MATHML_TAGS[tagName] && (COMMON_SVG_AND_HTML_ELEMENTS[tagName] || !ALL_SVG_TAGS[tagName]);\n } // For XHTML and XML documents that support custom namespaces\n\n\n if (PARSER_MEDIA_TYPE === 'application/xhtml+xml' && ALLOWED_NAMESPACES[element.namespaceURI]) {\n return true;\n } // The code should never reach this place (this means\n // that the element somehow got namespace that is not\n // HTML, SVG, MathML or allowed via ALLOWED_NAMESPACES).\n // Return false just in case.\n\n\n return false;\n };\n /**\n * _forceRemove\n *\n * @param {Node} node a DOM node\n */\n\n\n const _forceRemove = function _forceRemove(node) {\n arrayPush(DOMPurify.removed, {\n element: node\n });\n\n try {\n // eslint-disable-next-line unicorn/prefer-dom-node-remove\n node.parentNode.removeChild(node);\n } catch (_) {\n node.remove();\n }\n };\n /**\n * _removeAttribute\n *\n * @param {String} name an Attribute name\n * @param {Node} node a DOM node\n */\n\n\n const _removeAttribute = function _removeAttribute(name, node) {\n try {\n arrayPush(DOMPurify.removed, {\n attribute: node.getAttributeNode(name),\n from: node\n });\n } catch (_) {\n arrayPush(DOMPurify.removed, {\n attribute: null,\n from: node\n });\n }\n\n node.removeAttribute(name); // We void attribute values for unremovable \"is\"\" attributes\n\n if (name === 'is' && !ALLOWED_ATTR[name]) {\n if (RETURN_DOM || RETURN_DOM_FRAGMENT) {\n try {\n _forceRemove(node);\n } catch (_) {}\n } else {\n try {\n node.setAttribute(name, '');\n } catch (_) {}\n }\n }\n };\n /**\n * _initDocument\n *\n * @param {String} dirty a string of dirty markup\n * @return {Document} a DOM, filled with the dirty markup\n */\n\n\n const _initDocument = function _initDocument(dirty) {\n /* Create a HTML document */\n let doc = null;\n let leadingWhitespace = null;\n\n if (FORCE_BODY) {\n dirty = '' + dirty;\n } else {\n /* If FORCE_BODY isn't used, leading whitespace needs to be preserved manually */\n const matches = stringMatch(dirty, /^[\\r\\n\\t ]+/);\n leadingWhitespace = matches && matches[0];\n }\n\n if (PARSER_MEDIA_TYPE === 'application/xhtml+xml' && NAMESPACE === HTML_NAMESPACE) {\n // Root of XHTML doc must contain xmlns declaration (see https://www.w3.org/TR/xhtml1/normative.html#strict)\n dirty = '' + dirty + '';\n }\n\n const dirtyPayload = trustedTypesPolicy ? trustedTypesPolicy.createHTML(dirty) : dirty;\n /*\n * Use the DOMParser API by default, fallback later if needs be\n * DOMParser not work for svg when has multiple root element.\n */\n\n if (NAMESPACE === HTML_NAMESPACE) {\n try {\n doc = new DOMParser().parseFromString(dirtyPayload, PARSER_MEDIA_TYPE);\n } catch (_) {}\n }\n /* Use createHTMLDocument in case DOMParser is not available */\n\n\n if (!doc || !doc.documentElement) {\n doc = implementation.createDocument(NAMESPACE, 'template', null);\n\n try {\n doc.documentElement.innerHTML = IS_EMPTY_INPUT ? emptyHTML : dirtyPayload;\n } catch (_) {// Syntax error if dirtyPayload is invalid xml\n }\n }\n\n const body = doc.body || doc.documentElement;\n\n if (dirty && leadingWhitespace) {\n body.insertBefore(document.createTextNode(leadingWhitespace), body.childNodes[0] || null);\n }\n /* Work on whole document or just its body */\n\n\n if (NAMESPACE === HTML_NAMESPACE) {\n return getElementsByTagName.call(doc, WHOLE_DOCUMENT ? 'html' : 'body')[0];\n }\n\n return WHOLE_DOCUMENT ? doc.documentElement : body;\n };\n /**\n * Creates a NodeIterator object that you can use to traverse filtered lists of nodes or elements in a document.\n *\n * @param {Node} root The root element or node to start traversing on.\n * @return {NodeIterator} The created NodeIterator\n */\n\n\n const _createNodeIterator = function _createNodeIterator(root) {\n return createNodeIterator.call(root.ownerDocument || root, root, // eslint-disable-next-line no-bitwise\n NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_TEXT, null);\n };\n /**\n * _isClobbered\n *\n * @param {Node} elm element to check for clobbering attacks\n * @return {Boolean} true if clobbered, false if safe\n */\n\n\n const _isClobbered = function _isClobbered(elm) {\n return elm instanceof HTMLFormElement && (typeof elm.nodeName !== 'string' || typeof elm.textContent !== 'string' || typeof elm.removeChild !== 'function' || !(elm.attributes instanceof NamedNodeMap) || typeof elm.removeAttribute !== 'function' || typeof elm.setAttribute !== 'function' || typeof elm.namespaceURI !== 'string' || typeof elm.insertBefore !== 'function' || typeof elm.hasChildNodes !== 'function');\n };\n /**\n * Checks whether the given object is a DOM node.\n *\n * @param {Node} object object to check whether it's a DOM node\n * @return {Boolean} true is object is a DOM node\n */\n\n\n const _isNode = function _isNode(object) {\n return typeof Node === 'function' && object instanceof Node;\n };\n /**\n * _executeHook\n * Execute user configurable hooks\n *\n * @param {String} entryPoint Name of the hook's entry point\n * @param {Node} currentNode node to work on with the hook\n * @param {Object} data additional hook parameters\n */\n\n\n const _executeHook = function _executeHook(entryPoint, currentNode, data) {\n if (!hooks[entryPoint]) {\n return;\n }\n\n arrayForEach(hooks[entryPoint], hook => {\n hook.call(DOMPurify, currentNode, data, CONFIG);\n });\n };\n /**\n * _sanitizeElements\n *\n * @protect nodeName\n * @protect textContent\n * @protect removeChild\n *\n * @param {Node} currentNode to check for permission to exist\n * @return {Boolean} true if node was killed, false if left alive\n */\n\n\n const _sanitizeElements = function _sanitizeElements(currentNode) {\n let content = null;\n /* Execute a hook if present */\n\n _executeHook('beforeSanitizeElements', currentNode, null);\n /* Check if element is clobbered or can clobber */\n\n\n if (_isClobbered(currentNode)) {\n _forceRemove(currentNode);\n\n return true;\n }\n /* Now let's check the element's type and name */\n\n\n const tagName = transformCaseFunc(currentNode.nodeName);\n /* Execute a hook if present */\n\n _executeHook('uponSanitizeElement', currentNode, {\n tagName,\n allowedTags: ALLOWED_TAGS\n });\n /* Detect mXSS attempts abusing namespace confusion */\n\n\n if (currentNode.hasChildNodes() && !_isNode(currentNode.firstElementChild) && regExpTest(/<[/\\w]/g, currentNode.innerHTML) && regExpTest(/<[/\\w]/g, currentNode.textContent)) {\n _forceRemove(currentNode);\n\n return true;\n }\n /* Remove element if anything forbids its presence */\n\n\n if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {\n /* Check if we have a custom element to handle */\n if (!FORBID_TAGS[tagName] && _isBasicCustomElement(tagName)) {\n if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, tagName)) {\n return false;\n }\n\n if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(tagName)) {\n return false;\n }\n }\n /* Keep content except for bad-listed elements */\n\n\n if (KEEP_CONTENT && !FORBID_CONTENTS[tagName]) {\n const parentNode = getParentNode(currentNode) || currentNode.parentNode;\n const childNodes = getChildNodes(currentNode) || currentNode.childNodes;\n\n if (childNodes && parentNode) {\n const childCount = childNodes.length;\n\n for (let i = childCount - 1; i >= 0; --i) {\n parentNode.insertBefore(cloneNode(childNodes[i], true), getNextSibling(currentNode));\n }\n }\n }\n\n _forceRemove(currentNode);\n\n return true;\n }\n /* Check whether element has a valid namespace */\n\n\n if (currentNode instanceof Element && !_checkValidNamespace(currentNode)) {\n _forceRemove(currentNode);\n\n return true;\n }\n /* Make sure that older browsers don't get fallback-tag mXSS */\n\n\n if ((tagName === 'noscript' || tagName === 'noembed' || tagName === 'noframes') && regExpTest(/<\\/no(script|embed|frames)/i, currentNode.innerHTML)) {\n _forceRemove(currentNode);\n\n return true;\n }\n /* Sanitize element content to be template-safe */\n\n\n if (SAFE_FOR_TEMPLATES && currentNode.nodeType === 3) {\n /* Get the element's text content */\n content = currentNode.textContent;\n arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], expr => {\n content = stringReplace(content, expr, ' ');\n });\n\n if (currentNode.textContent !== content) {\n arrayPush(DOMPurify.removed, {\n element: currentNode.cloneNode()\n });\n currentNode.textContent = content;\n }\n }\n /* Execute a hook if present */\n\n\n _executeHook('afterSanitizeElements', currentNode, null);\n\n return false;\n };\n /**\n * _isValidAttribute\n *\n * @param {string} lcTag Lowercase tag name of containing element.\n * @param {string} lcName Lowercase attribute name.\n * @param {string} value Attribute value.\n * @return {Boolean} Returns true if `value` is valid, otherwise false.\n */\n // eslint-disable-next-line complexity\n\n\n const _isValidAttribute = function _isValidAttribute(lcTag, lcName, value) {\n /* Make sure attribute cannot clobber */\n if (SANITIZE_DOM && (lcName === 'id' || lcName === 'name') && (value in document || value in formElement)) {\n return false;\n }\n /* Allow valid data-* attributes: At least one character after \"-\"\n (https://html.spec.whatwg.org/multipage/dom.html#embedding-custom-non-visible-data-with-the-data-*-attributes)\n XML-compatible (https://html.spec.whatwg.org/multipage/infrastructure.html#xml-compatible and http://www.w3.org/TR/xml/#d0e804)\n We don't need to check the value; it's always URI safe. */\n\n\n if (ALLOW_DATA_ATTR && !FORBID_ATTR[lcName] && regExpTest(DATA_ATTR, lcName)) ; else if (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR, lcName)) ; else if (!ALLOWED_ATTR[lcName] || FORBID_ATTR[lcName]) {\n if ( // First condition does a very basic check if a) it's basically a valid custom element tagname AND\n // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck\n // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck\n _isBasicCustomElement(lcTag) && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, lcTag) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(lcTag)) && (CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.attributeNameCheck, lcName) || CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.attributeNameCheck(lcName)) || // Alternative, second condition checks if it's an `is`-attribute, AND\n // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck\n lcName === 'is' && CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, value) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(value))) ; else {\n return false;\n }\n /* Check value is safe. First, is attr inert? If so, is safe */\n\n } else if (URI_SAFE_ATTRIBUTES[lcName]) ; else if (regExpTest(IS_ALLOWED_URI$1, stringReplace(value, ATTR_WHITESPACE, ''))) ; else if ((lcName === 'src' || lcName === 'xlink:href' || lcName === 'href') && lcTag !== 'script' && stringIndexOf(value, 'data:') === 0 && DATA_URI_TAGS[lcTag]) ; else if (ALLOW_UNKNOWN_PROTOCOLS && !regExpTest(IS_SCRIPT_OR_DATA, stringReplace(value, ATTR_WHITESPACE, ''))) ; else if (value) {\n return false;\n } else ;\n\n return true;\n };\n /**\n * _isBasicCustomElement\n * checks if at least one dash is included in tagName, and it's not the first char\n * for more sophisticated checking see https://github.com/sindresorhus/validate-element-name\n *\n * @param {string} tagName name of the tag of the node to sanitize\n * @returns {boolean} Returns true if the tag name meets the basic criteria for a custom element, otherwise false.\n */\n\n\n const _isBasicCustomElement = function _isBasicCustomElement(tagName) {\n return tagName.indexOf('-') > 0;\n };\n /**\n * _sanitizeAttributes\n *\n * @protect attributes\n * @protect nodeName\n * @protect removeAttribute\n * @protect setAttribute\n *\n * @param {Node} currentNode to sanitize\n */\n\n\n const _sanitizeAttributes = function _sanitizeAttributes(currentNode) {\n /* Execute a hook if present */\n _executeHook('beforeSanitizeAttributes', currentNode, null);\n\n const {\n attributes\n } = currentNode;\n /* Check if we have attributes; if not we might have a text node */\n\n if (!attributes) {\n return;\n }\n\n const hookEvent = {\n attrName: '',\n attrValue: '',\n keepAttr: true,\n allowedAttributes: ALLOWED_ATTR\n };\n let l = attributes.length;\n /* Go backwards over all attributes; safely remove bad ones */\n\n while (l--) {\n const attr = attributes[l];\n const {\n name,\n namespaceURI,\n value: attrValue\n } = attr;\n const lcName = transformCaseFunc(name);\n let value = name === 'value' ? attrValue : stringTrim(attrValue);\n /* Execute a hook if present */\n\n hookEvent.attrName = lcName;\n hookEvent.attrValue = value;\n hookEvent.keepAttr = true;\n hookEvent.forceKeepAttr = undefined; // Allows developers to see this is a property they can set\n\n _executeHook('uponSanitizeAttribute', currentNode, hookEvent);\n\n value = hookEvent.attrValue;\n /* Did the hooks approve of the attribute? */\n\n if (hookEvent.forceKeepAttr) {\n continue;\n }\n /* Remove attribute */\n\n\n _removeAttribute(name, currentNode);\n /* Did the hooks approve of the attribute? */\n\n\n if (!hookEvent.keepAttr) {\n continue;\n }\n /* Work around a security issue in jQuery 3.0 */\n\n\n if (!ALLOW_SELF_CLOSE_IN_ATTR && regExpTest(/\\/>/i, value)) {\n _removeAttribute(name, currentNode);\n\n continue;\n }\n /* Sanitize attribute content to be template-safe */\n\n\n if (SAFE_FOR_TEMPLATES) {\n arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], expr => {\n value = stringReplace(value, expr, ' ');\n });\n }\n /* Is `value` valid for this attribute? */\n\n\n const lcTag = transformCaseFunc(currentNode.nodeName);\n\n if (!_isValidAttribute(lcTag, lcName, value)) {\n continue;\n }\n /* Full DOM Clobbering protection via namespace isolation,\n * Prefix id and name attributes with `user-content-`\n */\n\n\n if (SANITIZE_NAMED_PROPS && (lcName === 'id' || lcName === 'name')) {\n // Remove the attribute with this value\n _removeAttribute(name, currentNode); // Prefix the value and later re-create the attribute with the sanitized value\n\n\n value = SANITIZE_NAMED_PROPS_PREFIX + value;\n }\n /* Handle attributes that require Trusted Types */\n\n\n if (trustedTypesPolicy && typeof trustedTypes === 'object' && typeof trustedTypes.getAttributeType === 'function') {\n if (namespaceURI) ; else {\n switch (trustedTypes.getAttributeType(lcTag, lcName)) {\n case 'TrustedHTML':\n {\n value = trustedTypesPolicy.createHTML(value);\n break;\n }\n\n case 'TrustedScriptURL':\n {\n value = trustedTypesPolicy.createScriptURL(value);\n break;\n }\n }\n }\n }\n /* Handle invalid data-* attribute set by try-catching it */\n\n\n try {\n if (namespaceURI) {\n currentNode.setAttributeNS(namespaceURI, name, value);\n } else {\n /* Fallback to setAttribute() for browser-unrecognized namespaces e.g. \"x-schema\". */\n currentNode.setAttribute(name, value);\n }\n\n arrayPop(DOMPurify.removed);\n } catch (_) {}\n }\n /* Execute a hook if present */\n\n\n _executeHook('afterSanitizeAttributes', currentNode, null);\n };\n /**\n * _sanitizeShadowDOM\n *\n * @param {DocumentFragment} fragment to iterate over recursively\n */\n\n\n const _sanitizeShadowDOM = function _sanitizeShadowDOM(fragment) {\n let shadowNode = null;\n\n const shadowIterator = _createNodeIterator(fragment);\n /* Execute a hook if present */\n\n\n _executeHook('beforeSanitizeShadowDOM', fragment, null);\n\n while (shadowNode = shadowIterator.nextNode()) {\n /* Execute a hook if present */\n _executeHook('uponSanitizeShadowNode', shadowNode, null);\n /* Sanitize tags and elements */\n\n\n if (_sanitizeElements(shadowNode)) {\n continue;\n }\n /* Deep shadow DOM detected */\n\n\n if (shadowNode.content instanceof DocumentFragment) {\n _sanitizeShadowDOM(shadowNode.content);\n }\n /* Check attributes, sanitize if necessary */\n\n\n _sanitizeAttributes(shadowNode);\n }\n /* Execute a hook if present */\n\n\n _executeHook('afterSanitizeShadowDOM', fragment, null);\n };\n /**\n * Sanitize\n * Public method providing core sanitation functionality\n *\n * @param {String|Node} dirty string or DOM node\n * @param {Object} cfg object\n */\n // eslint-disable-next-line complexity\n\n\n DOMPurify.sanitize = function (dirty) {\n let cfg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n let body = null;\n let importedNode = null;\n let currentNode = null;\n let returnNode = null;\n /* Make sure we have a string to sanitize.\n DO NOT return early, as this will return the wrong type if\n the user has requested a DOM object rather than a string */\n\n IS_EMPTY_INPUT = !dirty;\n\n if (IS_EMPTY_INPUT) {\n dirty = '';\n }\n /* Stringify, in case dirty is an object */\n\n\n if (typeof dirty !== 'string' && !_isNode(dirty)) {\n if (typeof dirty.toString === 'function') {\n dirty = dirty.toString();\n\n if (typeof dirty !== 'string') {\n throw typeErrorCreate('dirty is not a string, aborting');\n }\n } else {\n throw typeErrorCreate('toString is not a function');\n }\n }\n /* Return dirty HTML if DOMPurify cannot run */\n\n\n if (!DOMPurify.isSupported) {\n return dirty;\n }\n /* Assign config vars */\n\n\n if (!SET_CONFIG) {\n _parseConfig(cfg);\n }\n /* Clean up removed elements */\n\n\n DOMPurify.removed = [];\n /* Check if dirty is correctly typed for IN_PLACE */\n\n if (typeof dirty === 'string') {\n IN_PLACE = false;\n }\n\n if (IN_PLACE) {\n /* Do some early pre-sanitization to avoid unsafe root nodes */\n if (dirty.nodeName) {\n const tagName = transformCaseFunc(dirty.nodeName);\n\n if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {\n throw typeErrorCreate('root node is forbidden and cannot be sanitized in-place');\n }\n }\n } else if (dirty instanceof Node) {\n /* If dirty is a DOM element, append to an empty document to avoid\n elements being stripped by the parser */\n body = _initDocument('');\n importedNode = body.ownerDocument.importNode(dirty, true);\n\n if (importedNode.nodeType === 1 && importedNode.nodeName === 'BODY') {\n /* Node is already a body, use as is */\n body = importedNode;\n } else if (importedNode.nodeName === 'HTML') {\n body = importedNode;\n } else {\n // eslint-disable-next-line unicorn/prefer-dom-node-append\n body.appendChild(importedNode);\n }\n } else {\n /* Exit directly if we have nothing to do */\n if (!RETURN_DOM && !SAFE_FOR_TEMPLATES && !WHOLE_DOCUMENT && // eslint-disable-next-line unicorn/prefer-includes\n dirty.indexOf('<') === -1) {\n return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(dirty) : dirty;\n }\n /* Initialize the document to work on */\n\n\n body = _initDocument(dirty);\n /* Check we have a DOM node from the data */\n\n if (!body) {\n return RETURN_DOM ? null : RETURN_TRUSTED_TYPE ? emptyHTML : '';\n }\n }\n /* Remove first element node (ours) if FORCE_BODY is set */\n\n\n if (body && FORCE_BODY) {\n _forceRemove(body.firstChild);\n }\n /* Get node iterator */\n\n\n const nodeIterator = _createNodeIterator(IN_PLACE ? dirty : body);\n /* Now start iterating over the created document */\n\n\n while (currentNode = nodeIterator.nextNode()) {\n /* Sanitize tags and elements */\n if (_sanitizeElements(currentNode)) {\n continue;\n }\n /* Shadow DOM detected, sanitize it */\n\n\n if (currentNode.content instanceof DocumentFragment) {\n _sanitizeShadowDOM(currentNode.content);\n }\n /* Check attributes, sanitize if necessary */\n\n\n _sanitizeAttributes(currentNode);\n }\n /* If we sanitized `dirty` in-place, return it. */\n\n\n if (IN_PLACE) {\n return dirty;\n }\n /* Return sanitized string or DOM */\n\n\n if (RETURN_DOM) {\n if (RETURN_DOM_FRAGMENT) {\n returnNode = createDocumentFragment.call(body.ownerDocument);\n\n while (body.firstChild) {\n // eslint-disable-next-line unicorn/prefer-dom-node-append\n returnNode.appendChild(body.firstChild);\n }\n } else {\n returnNode = body;\n }\n\n if (ALLOWED_ATTR.shadowroot || ALLOWED_ATTR.shadowrootmode) {\n /*\n AdoptNode() is not used because internal state is not reset\n (e.g. the past names map of a HTMLFormElement), this is safe\n in theory but we would rather not risk another attack vector.\n The state that is cloned by importNode() is explicitly defined\n by the specs.\n */\n returnNode = importNode.call(originalDocument, returnNode, true);\n }\n\n return returnNode;\n }\n\n let serializedHTML = WHOLE_DOCUMENT ? body.outerHTML : body.innerHTML;\n /* Serialize doctype if allowed */\n\n if (WHOLE_DOCUMENT && ALLOWED_TAGS['!doctype'] && body.ownerDocument && body.ownerDocument.doctype && body.ownerDocument.doctype.name && regExpTest(DOCTYPE_NAME, body.ownerDocument.doctype.name)) {\n serializedHTML = '\\n' + serializedHTML;\n }\n /* Sanitize final string template-safe */\n\n\n if (SAFE_FOR_TEMPLATES) {\n arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], expr => {\n serializedHTML = stringReplace(serializedHTML, expr, ' ');\n });\n }\n\n return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(serializedHTML) : serializedHTML;\n };\n /**\n * Public method to set the configuration once\n * setConfig\n *\n * @param {Object} cfg configuration object\n */\n\n\n DOMPurify.setConfig = function () {\n let cfg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n _parseConfig(cfg);\n\n SET_CONFIG = true;\n };\n /**\n * Public method to remove the configuration\n * clearConfig\n *\n */\n\n\n DOMPurify.clearConfig = function () {\n CONFIG = null;\n SET_CONFIG = false;\n };\n /**\n * Public method to check if an attribute value is valid.\n * Uses last set config, if any. Otherwise, uses config defaults.\n * isValidAttribute\n *\n * @param {String} tag Tag name of containing element.\n * @param {String} attr Attribute name.\n * @param {String} value Attribute value.\n * @return {Boolean} Returns true if `value` is valid. Otherwise, returns false.\n */\n\n\n DOMPurify.isValidAttribute = function (tag, attr, value) {\n /* Initialize shared config vars if necessary. */\n if (!CONFIG) {\n _parseConfig({});\n }\n\n const lcTag = transformCaseFunc(tag);\n const lcName = transformCaseFunc(attr);\n return _isValidAttribute(lcTag, lcName, value);\n };\n /**\n * AddHook\n * Public method to add DOMPurify hooks\n *\n * @param {String} entryPoint entry point for the hook to add\n * @param {Function} hookFunction function to execute\n */\n\n\n DOMPurify.addHook = function (entryPoint, hookFunction) {\n if (typeof hookFunction !== 'function') {\n return;\n }\n\n hooks[entryPoint] = hooks[entryPoint] || [];\n arrayPush(hooks[entryPoint], hookFunction);\n };\n /**\n * RemoveHook\n * Public method to remove a DOMPurify hook at a given entryPoint\n * (pops it from the stack of hooks if more are present)\n *\n * @param {String} entryPoint entry point for the hook to remove\n * @return {Function} removed(popped) hook\n */\n\n\n DOMPurify.removeHook = function (entryPoint) {\n if (hooks[entryPoint]) {\n return arrayPop(hooks[entryPoint]);\n }\n };\n /**\n * RemoveHooks\n * Public method to remove all DOMPurify hooks at a given entryPoint\n *\n * @param {String} entryPoint entry point for the hooks to remove\n */\n\n\n DOMPurify.removeHooks = function (entryPoint) {\n if (hooks[entryPoint]) {\n hooks[entryPoint] = [];\n }\n };\n /**\n * RemoveAllHooks\n * Public method to remove all DOMPurify hooks\n */\n\n\n DOMPurify.removeAllHooks = function () {\n hooks = {};\n };\n\n return DOMPurify;\n}\n\nvar purify = createDOMPurify();\n\nexport { purify as default };\n//# sourceMappingURL=purify.es.js.map\n","/*!\n * escape-html\n * Copyright(c) 2012-2013 TJ Holowaychuk\n * Copyright(c) 2015 Andreas Lubbe\n * Copyright(c) 2015 Tiancheng \"Timothy\" Gu\n * MIT Licensed\n */\n\n'use strict';\n\n/**\n * Module variables.\n * @private\n */\n\nvar matchHtmlRegExp = /[\"'&<>]/;\n\n/**\n * Module exports.\n * @public\n */\n\nmodule.exports = escapeHtml;\n\n/**\n * Escape special characters in the given string of html.\n *\n * @param {string} string The string to escape for inserting into HTML\n * @return {string}\n * @public\n */\n\nfunction escapeHtml(string) {\n var str = '' + string;\n var match = matchHtmlRegExp.exec(str);\n\n if (!match) {\n return str;\n }\n\n var escape;\n var html = '';\n var index = 0;\n var lastIndex = 0;\n\n for (index = match.index; index < str.length; index++) {\n switch (str.charCodeAt(index)) {\n case 34: // \"\n escape = '"';\n break;\n case 38: // &\n escape = '&';\n break;\n case 39: // '\n escape = ''';\n break;\n case 60: // <\n escape = '<';\n break;\n case 62: // >\n escape = '>';\n break;\n default:\n continue;\n }\n\n if (lastIndex !== index) {\n html += str.substring(lastIndex, index);\n }\n\n lastIndex = index + 1;\n html += escape;\n }\n\n return lastIndex !== index\n ? html + str.substring(lastIndex, index)\n : html;\n}\n","import { generateFilePath } from '@nextcloud/router';\nimport DOMPurify from 'dompurify';\nimport escapeHTML from 'escape-html';\n\n/// \n/**\n * Get the first day of the week\n *\n * @return {number}\n */\nfunction getFirstDay() {\n if (typeof window.firstDay === 'undefined') {\n console.warn('No firstDay found');\n return 1;\n }\n return window.firstDay;\n}\n/**\n * Get a list of day names (full names)\n *\n * @return {string[]}\n */\nfunction getDayNames() {\n if (typeof window.dayNames === 'undefined') {\n console.warn('No dayNames found');\n return [\n 'Sunday',\n 'Monday',\n 'Tuesday',\n 'Wednesday',\n 'Thursday',\n 'Friday',\n 'Saturday',\n ];\n }\n return window.dayNames;\n}\n/**\n * Get a list of day names (short names)\n *\n * @return {string[]}\n */\nfunction getDayNamesShort() {\n if (typeof window.dayNamesShort === 'undefined') {\n console.warn('No dayNamesShort found');\n return ['Sun.', 'Mon.', 'Tue.', 'Wed.', 'Thu.', 'Fri.', 'Sat.'];\n }\n return window.dayNamesShort;\n}\n/**\n * Get a list of day names (minified names)\n *\n * @return {string[]}\n */\nfunction getDayNamesMin() {\n if (typeof window.dayNamesMin === 'undefined') {\n console.warn('No dayNamesMin found');\n return ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'];\n }\n return window.dayNamesMin;\n}\n/**\n * Get a list of month names (full names)\n *\n * @return {string[]}\n */\nfunction getMonthNames() {\n if (typeof window.monthNames === 'undefined') {\n console.warn('No monthNames found');\n return [\n 'January',\n 'February',\n 'March',\n 'April',\n 'May',\n 'June',\n 'July',\n 'August',\n 'September',\n 'October',\n 'November',\n 'December',\n ];\n }\n return window.monthNames;\n}\n/**\n * Get a list of month names (short names)\n *\n * @return {string[]}\n */\nfunction getMonthNamesShort() {\n if (typeof window.monthNamesShort === 'undefined') {\n console.warn('No monthNamesShort found');\n return [\n 'Jan.',\n 'Feb.',\n 'Mar.',\n 'Apr.',\n 'May.',\n 'Jun.',\n 'Jul.',\n 'Aug.',\n 'Sep.',\n 'Oct.',\n 'Nov.',\n 'Dec.',\n ];\n }\n return window.monthNamesShort;\n}\n\n/**\n * Returns the user's locale\n */\nfunction getLocale() {\n return document.documentElement.dataset.locale || 'en';\n}\n/**\n * Returns user's locale in canonical form\n * E.g. `en-US` instead of `en_US`\n */\nfunction getCanonicalLocale() {\n return getLocale().replace(/_/g, '-');\n}\n/**\n * Returns the user's language\n */\nfunction getLanguage() {\n return document.documentElement.lang || 'en';\n}\n/**\n * Check whether the current, or a given, language is read right-to-left\n *\n * @param language Language code to check, defaults to current language\n */\nfunction isRTL(language) {\n const languageCode = language || getLanguage();\n // Source: https://meta.wikimedia.org/wiki/Template:List_of_language_names_ordered_by_code\n const rtlLanguages = [\n /* eslint-disable no-multi-spaces */\n 'ae',\n 'ar',\n 'arc',\n 'arz',\n 'bcc',\n 'bqi',\n 'ckb',\n 'dv',\n 'fa',\n 'glk',\n 'ha',\n 'he',\n 'khw',\n 'ks',\n 'ku',\n 'mzn',\n 'nqo',\n 'pnb',\n 'ps',\n 'sd',\n 'ug',\n 'ur',\n 'uzs',\n 'yi', // 'ייִדיש', Yiddish\n /* eslint-enable no-multi-spaces */\n ];\n // special case for Uzbek Afghan\n if ((language || getCanonicalLocale()).startsWith('uz-AF')) {\n return true;\n }\n return rtlLanguages.includes(languageCode);\n}\n\n/// \n/**\n * Check if translations and plural function are set for given app\n *\n * @param {string} appId the app id\n * @return {boolean}\n */\nfunction hasAppTranslations(appId) {\n var _a, _b;\n return (((_a = window._oc_l10n_registry_translations) === null || _a === void 0 ? void 0 : _a[appId]) !== undefined\n && ((_b = window._oc_l10n_registry_plural_functions) === null || _b === void 0 ? void 0 : _b[appId]) !== undefined);\n}\n/**\n * Register new, or extend available, translations for an app\n *\n * @param {string} appId the app id\n * @param {object} translations the translations list\n * @param {Function} pluralFunction the plural function\n */\nfunction registerAppTranslations(appId, translations, pluralFunction) {\n var _a;\n window._oc_l10n_registry_translations = Object.assign(window._oc_l10n_registry_translations || {}, {\n [appId]: Object.assign(((_a = window._oc_l10n_registry_translations) === null || _a === void 0 ? void 0 : _a[appId]) || {}, translations),\n });\n window._oc_l10n_registry_plural_functions = Object.assign(window._oc_l10n_registry_plural_functions || {}, {\n [appId]: pluralFunction,\n });\n}\n/**\n * Unregister all translations and plural function for given app\n *\n * @param {string} appId the app id\n */\nfunction unregisterAppTranslations(appId) {\n var _a, _b;\n (_a = window._oc_l10n_registry_translations) === null || _a === void 0 ? true : delete _a[appId];\n (_b = window._oc_l10n_registry_plural_functions) === null || _b === void 0 ? true : delete _b[appId];\n}\n/**\n * Get translations bundle for given app and current locale\n *\n * @param {string} appId the app id\n * @return {object}\n */\nfunction getAppTranslations(appId) {\n var _a, _b, _c, _d;\n return {\n translations: (_b = (_a = window._oc_l10n_registry_translations) === null || _a === void 0 ? void 0 : _a[appId]) !== null && _b !== void 0 ? _b : {},\n pluralFunction: (_d = (_c = window._oc_l10n_registry_plural_functions) === null || _c === void 0 ? void 0 : _c[appId]) !== null && _d !== void 0 ? _d : ((number) => number),\n };\n}\n\n/**\n * Translate a string\n *\n * @param {string} app the id of the app for which to translate the string\n * @param {string} text the string to translate\n * @param {object} vars map of placeholder key to value\n * @param {number} number to replace %n with\n * @param {object} [options] options object\n * @return {string}\n */\nfunction translate(app, text, vars, number, options) {\n const defaultOptions = {\n escape: true,\n sanitize: true,\n };\n const allOptions = Object.assign({}, defaultOptions, options || {});\n const identity = (value) => value;\n const optSanitize = allOptions.sanitize ? DOMPurify.sanitize : identity;\n const optEscape = allOptions.escape ? escapeHTML : identity;\n // TODO: cache this function to avoid inline recreation\n // of the same function over and over again in case\n // translate() is used in a loop\n const _build = (text, vars, number) => {\n return text.replace(/%n/g, '' + number).replace(/{([^{}]*)}/g, (match, key) => {\n if (vars === undefined || !(key in vars)) {\n return optSanitize(match);\n }\n const r = vars[key];\n if (typeof r === 'string' || typeof r === 'number') {\n return optSanitize(optEscape(r));\n }\n else {\n return optSanitize(match);\n }\n });\n };\n const bundle = getAppTranslations(app);\n let translation = bundle.translations[text] || text;\n translation = Array.isArray(translation) ? translation[0] : translation;\n if (typeof vars === 'object' || number !== undefined) {\n return optSanitize(_build(translation, vars, number));\n }\n else {\n return optSanitize(translation);\n }\n}\n/**\n * Translate a string containing an object which possibly requires a plural form\n *\n * @param {string} app the id of the app for which to translate the string\n * @param {string} textSingular the string to translate for exactly one object\n * @param {string} textPlural the string to translate for n objects\n * @param {number} number number to determine whether to use singular or plural\n * @param {object} vars of placeholder key to value\n * @param {object} options options object\n */\nfunction translatePlural(app, textSingular, textPlural, number, vars, options) {\n const identifier = '_' + textSingular + '_::_' + textPlural + '_';\n const bundle = getAppTranslations(app);\n const value = bundle.translations[identifier];\n if (typeof value !== 'undefined') {\n const translation = value;\n if (Array.isArray(translation)) {\n const plural = bundle.pluralFunction(number);\n return translate(app, translation[plural], vars, number, options);\n }\n }\n if (number === 1) {\n return translate(app, textSingular, vars, number, options);\n }\n else {\n return translate(app, textPlural, vars, number, options);\n }\n}\n/**\n * Load an app's translation bundle if not loaded already.\n *\n * @param {string} appName name of the app\n * @param {Function} callback callback to be called when\n * the translations are loaded\n * @return {Promise} promise\n */\nfunction loadTranslations(appName, callback) {\n if (hasAppTranslations(appName) || getLocale() === 'en') {\n return Promise.resolve().then(callback);\n }\n const url = generateFilePath(appName, 'l10n', getLocale() + '.json');\n const promise = new Promise((resolve, reject) => {\n const request = new XMLHttpRequest();\n request.open('GET', url, true);\n request.onerror = () => {\n reject(new Error(request.statusText || 'Network error'));\n };\n request.onload = () => {\n if (request.status >= 200 && request.status < 300) {\n try {\n const bundle = JSON.parse(request.responseText);\n if (typeof bundle.translations === 'object')\n resolve(bundle);\n }\n catch (error) {\n // error is probably a SyntaxError due to invalid response text, this is handled by next line\n }\n reject(new Error('Invalid content of translation bundle'));\n }\n else {\n reject(new Error(request.statusText));\n }\n };\n request.send();\n });\n // load JSON translation bundle per AJAX\n return promise\n .then((result) => {\n register(appName, result.translations);\n return result;\n })\n .then(callback);\n}\n/**\n * Register an app's translation bundle.\n *\n * @param {string} appName name of the app\n * @param {Object} bundle translation bundle\n */\nfunction register(appName, bundle) {\n registerAppTranslations(appName, bundle, getPlural);\n}\n/**\n * Unregister all translations of an app\n *\n * @param appName name of the app\n * @since 2.1.0\n */\nfunction unregister(appName) {\n return unregisterAppTranslations(appName);\n}\n/**\n * Get array index of translations for a plural form\n *\n *\n * @param {number} number the number of elements\n * @return {number} 0 for the singular form(, 1 for the first plural form, ...)\n */\nfunction getPlural(number) {\n let language = getLanguage();\n if (language === 'pt-BR') {\n // temporary set a locale for brazilian\n language = 'xbr';\n }\n if (language.length > 3) {\n language = language.substring(0, language.lastIndexOf('-'));\n }\n /*\n * The plural rules are derived from code of the Zend Framework (2010-09-25),\n * which is subject to the new BSD license (http://framework.zend.com/license/new-bsd).\n * Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)\n */\n switch (language) {\n case 'az':\n case 'bo':\n case 'dz':\n case 'id':\n case 'ja':\n case 'jv':\n case 'ka':\n case 'km':\n case 'kn':\n case 'ko':\n case 'ms':\n case 'th':\n case 'tr':\n case 'vi':\n case 'zh':\n return 0;\n case 'af':\n case 'bn':\n case 'bg':\n case 'ca':\n case 'da':\n case 'de':\n case 'el':\n case 'en':\n case 'eo':\n case 'es':\n case 'et':\n case 'eu':\n case 'fa':\n case 'fi':\n case 'fo':\n case 'fur':\n case 'fy':\n case 'gl':\n case 'gu':\n case 'ha':\n case 'he':\n case 'hu':\n case 'is':\n case 'it':\n case 'ku':\n case 'lb':\n case 'ml':\n case 'mn':\n case 'mr':\n case 'nah':\n case 'nb':\n case 'ne':\n case 'nl':\n case 'nn':\n case 'no':\n case 'oc':\n case 'om':\n case 'or':\n case 'pa':\n case 'pap':\n case 'ps':\n case 'pt':\n case 'so':\n case 'sq':\n case 'sv':\n case 'sw':\n case 'ta':\n case 'te':\n case 'tk':\n case 'ur':\n case 'zu':\n return number === 1 ? 0 : 1;\n case 'am':\n case 'bh':\n case 'fil':\n case 'fr':\n case 'gun':\n case 'hi':\n case 'hy':\n case 'ln':\n case 'mg':\n case 'nso':\n case 'xbr':\n case 'ti':\n case 'wa':\n return number === 0 || number === 1 ? 0 : 1;\n case 'be':\n case 'bs':\n case 'hr':\n case 'ru':\n case 'sh':\n case 'sr':\n case 'uk':\n return number % 10 === 1 && number % 100 !== 11\n ? 0\n : number % 10 >= 2\n && number % 10 <= 4\n && (number % 100 < 10 || number % 100 >= 20)\n ? 1\n : 2;\n case 'cs':\n case 'sk':\n return number === 1 ? 0 : number >= 2 && number <= 4 ? 1 : 2;\n case 'ga':\n return number === 1 ? 0 : number === 2 ? 1 : 2;\n case 'lt':\n return number % 10 === 1 && number % 100 !== 11\n ? 0\n : number % 10 >= 2 && (number % 100 < 10 || number % 100 >= 20)\n ? 1\n : 2;\n case 'sl':\n return number % 100 === 1\n ? 0\n : number % 100 === 2\n ? 1\n : number % 100 === 3 || number % 100 === 4\n ? 2\n : 3;\n case 'mk':\n return number % 10 === 1 ? 0 : 1;\n case 'mt':\n return number === 1\n ? 0\n : number === 0 || (number % 100 > 1 && number % 100 < 11)\n ? 1\n : number % 100 > 10 && number % 100 < 20\n ? 2\n : 3;\n case 'lv':\n return number === 0\n ? 0\n : number % 10 === 1 && number % 100 !== 11\n ? 1\n : 2;\n case 'pl':\n return number === 1\n ? 0\n : number % 10 >= 2\n && number % 10 <= 4\n && (number % 100 < 12 || number % 100 > 14)\n ? 1\n : 2;\n case 'cy':\n return number === 1\n ? 0\n : number === 2\n ? 1\n : number === 8 || number === 11\n ? 2\n : 3;\n case 'ro':\n return number === 1\n ? 0\n : number === 0 || (number % 100 > 0 && number % 100 < 20)\n ? 1\n : 2;\n case 'ar':\n return number === 0\n ? 0\n : number === 1\n ? 1\n : number === 2\n ? 2\n : number % 100 >= 3 && number % 100 <= 10\n ? 3\n : number % 100 >= 11 && number % 100 <= 99\n ? 4\n : 5;\n default:\n return 0;\n }\n}\n\nexport { getCanonicalLocale, getDayNames, getDayNamesMin, getDayNamesShort, getFirstDay, getLanguage, getLocale, getMonthNames, getMonthNamesShort, getPlural, isRTL, loadTranslations, register, translate, translatePlural, unregister };\n","const global = globalThis || void 0 || self;\n\nexport { global as default, global };\n//# sourceMappingURL=index.js.map\n","/*!\n * Vue.js v2.7.16\n * (c) 2014-2023 Evan You\n * Released under the MIT License.\n */\nvar emptyObject = Object.freeze({});\nvar isArray = Array.isArray;\n// These helpers produce better VM code in JS engines due to their\n// explicitness and function inlining.\nfunction isUndef(v) {\n return v === undefined || v === null;\n}\nfunction isDef(v) {\n return v !== undefined && v !== null;\n}\nfunction isTrue(v) {\n return v === true;\n}\nfunction isFalse(v) {\n return v === false;\n}\n/**\n * Check if value is primitive.\n */\nfunction isPrimitive(value) {\n return (typeof value === 'string' ||\n typeof value === 'number' ||\n // $flow-disable-line\n typeof value === 'symbol' ||\n typeof value === 'boolean');\n}\nfunction isFunction(value) {\n return typeof value === 'function';\n}\n/**\n * Quick object check - this is primarily used to tell\n * objects from primitive values when we know the value\n * is a JSON-compliant type.\n */\nfunction isObject(obj) {\n return obj !== null && typeof obj === 'object';\n}\n/**\n * Get the raw type string of a value, e.g., [object Object].\n */\nvar _toString = Object.prototype.toString;\nfunction toRawType(value) {\n return _toString.call(value).slice(8, -1);\n}\n/**\n * Strict object type check. Only returns true\n * for plain JavaScript objects.\n */\nfunction isPlainObject(obj) {\n return _toString.call(obj) === '[object Object]';\n}\nfunction isRegExp(v) {\n return _toString.call(v) === '[object RegExp]';\n}\n/**\n * Check if val is a valid array index.\n */\nfunction isValidArrayIndex(val) {\n var n = parseFloat(String(val));\n return n >= 0 && Math.floor(n) === n && isFinite(val);\n}\nfunction isPromise(val) {\n return (isDef(val) &&\n typeof val.then === 'function' &&\n typeof val.catch === 'function');\n}\n/**\n * Convert a value to a string that is actually rendered.\n */\nfunction toString(val) {\n return val == null\n ? ''\n : Array.isArray(val) || (isPlainObject(val) && val.toString === _toString)\n ? JSON.stringify(val, replacer, 2)\n : String(val);\n}\nfunction replacer(_key, val) {\n // avoid circular deps from v3\n if (val && val.__v_isRef) {\n return val.value;\n }\n return val;\n}\n/**\n * Convert an input value to a number for persistence.\n * If the conversion fails, return original string.\n */\nfunction toNumber(val) {\n var n = parseFloat(val);\n return isNaN(n) ? val : n;\n}\n/**\n * Make a map and return a function for checking if a key\n * is in that map.\n */\nfunction makeMap(str, expectsLowerCase) {\n var map = Object.create(null);\n var list = str.split(',');\n for (var i = 0; i < list.length; i++) {\n map[list[i]] = true;\n }\n return expectsLowerCase ? function (val) { return map[val.toLowerCase()]; } : function (val) { return map[val]; };\n}\n/**\n * Check if a tag is a built-in tag.\n */\nvar isBuiltInTag = makeMap('slot,component', true);\n/**\n * Check if an attribute is a reserved attribute.\n */\nvar isReservedAttribute = makeMap('key,ref,slot,slot-scope,is');\n/**\n * Remove an item from an array.\n */\nfunction remove$2(arr, item) {\n var len = arr.length;\n if (len) {\n // fast path for the only / last item\n if (item === arr[len - 1]) {\n arr.length = len - 1;\n return;\n }\n var index = arr.indexOf(item);\n if (index > -1) {\n return arr.splice(index, 1);\n }\n }\n}\n/**\n * Check whether an object has the property.\n */\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nfunction hasOwn(obj, key) {\n return hasOwnProperty.call(obj, key);\n}\n/**\n * Create a cached version of a pure function.\n */\nfunction cached(fn) {\n var cache = Object.create(null);\n return function cachedFn(str) {\n var hit = cache[str];\n return hit || (cache[str] = fn(str));\n };\n}\n/**\n * Camelize a hyphen-delimited string.\n */\nvar camelizeRE = /-(\\w)/g;\nvar camelize = cached(function (str) {\n return str.replace(camelizeRE, function (_, c) { return (c ? c.toUpperCase() : ''); });\n});\n/**\n * Capitalize a string.\n */\nvar capitalize = cached(function (str) {\n return str.charAt(0).toUpperCase() + str.slice(1);\n});\n/**\n * Hyphenate a camelCase string.\n */\nvar hyphenateRE = /\\B([A-Z])/g;\nvar hyphenate = cached(function (str) {\n return str.replace(hyphenateRE, '-$1').toLowerCase();\n});\n/**\n * Simple bind polyfill for environments that do not support it,\n * e.g., PhantomJS 1.x. Technically, we don't need this anymore\n * since native bind is now performant enough in most browsers.\n * But removing it would mean breaking code that was able to run in\n * PhantomJS 1.x, so this must be kept for backward compatibility.\n */\n/* istanbul ignore next */\nfunction polyfillBind(fn, ctx) {\n function boundFn(a) {\n var l = arguments.length;\n return l\n ? l > 1\n ? fn.apply(ctx, arguments)\n : fn.call(ctx, a)\n : fn.call(ctx);\n }\n boundFn._length = fn.length;\n return boundFn;\n}\nfunction nativeBind(fn, ctx) {\n return fn.bind(ctx);\n}\n// @ts-expect-error bind cannot be `undefined`\nvar bind = Function.prototype.bind ? nativeBind : polyfillBind;\n/**\n * Convert an Array-like object to a real Array.\n */\nfunction toArray(list, start) {\n start = start || 0;\n var i = list.length - start;\n var ret = new Array(i);\n while (i--) {\n ret[i] = list[i + start];\n }\n return ret;\n}\n/**\n * Mix properties into target object.\n */\nfunction extend(to, _from) {\n for (var key in _from) {\n to[key] = _from[key];\n }\n return to;\n}\n/**\n * Merge an Array of Objects into a single Object.\n */\nfunction toObject(arr) {\n var res = {};\n for (var i = 0; i < arr.length; i++) {\n if (arr[i]) {\n extend(res, arr[i]);\n }\n }\n return res;\n}\n/* eslint-disable no-unused-vars */\n/**\n * Perform no operation.\n * Stubbing args to make Flow happy without leaving useless transpiled code\n * with ...rest (https://flow.org/blog/2017/05/07/Strict-Function-Call-Arity/).\n */\nfunction noop(a, b, c) { }\n/**\n * Always return false.\n */\nvar no = function (a, b, c) { return false; };\n/* eslint-enable no-unused-vars */\n/**\n * Return the same value.\n */\nvar identity = function (_) { return _; };\n/**\n * Check if two values are loosely equal - that is,\n * if they are plain objects, do they have the same shape?\n */\nfunction looseEqual(a, b) {\n if (a === b)\n return true;\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return (a.length === b.length &&\n a.every(function (e, i) {\n return looseEqual(e, b[i]);\n }));\n }\n else if (a instanceof Date && b instanceof Date) {\n return a.getTime() === b.getTime();\n }\n else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return (keysA.length === keysB.length &&\n keysA.every(function (key) {\n return looseEqual(a[key], b[key]);\n }));\n }\n else {\n /* istanbul ignore next */\n return false;\n }\n }\n catch (e) {\n /* istanbul ignore next */\n return false;\n }\n }\n else if (!isObjectA && !isObjectB) {\n return String(a) === String(b);\n }\n else {\n return false;\n }\n}\n/**\n * Return the first index at which a loosely equal value can be\n * found in the array (if value is a plain object, the array must\n * contain an object of the same shape), or -1 if it is not present.\n */\nfunction looseIndexOf(arr, val) {\n for (var i = 0; i < arr.length; i++) {\n if (looseEqual(arr[i], val))\n return i;\n }\n return -1;\n}\n/**\n * Ensure a function is called only once.\n */\nfunction once(fn) {\n var called = false;\n return function () {\n if (!called) {\n called = true;\n fn.apply(this, arguments);\n }\n };\n}\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is#polyfill\nfunction hasChanged(x, y) {\n if (x === y) {\n return x === 0 && 1 / x !== 1 / y;\n }\n else {\n return x === x || y === y;\n }\n}\n\nvar SSR_ATTR = 'data-server-rendered';\nvar ASSET_TYPES = ['component', 'directive', 'filter'];\nvar LIFECYCLE_HOOKS = [\n 'beforeCreate',\n 'created',\n 'beforeMount',\n 'mounted',\n 'beforeUpdate',\n 'updated',\n 'beforeDestroy',\n 'destroyed',\n 'activated',\n 'deactivated',\n 'errorCaptured',\n 'serverPrefetch',\n 'renderTracked',\n 'renderTriggered'\n];\n\nvar config = {\n /**\n * Option merge strategies (used in core/util/options)\n */\n // $flow-disable-line\n optionMergeStrategies: Object.create(null),\n /**\n * Whether to suppress warnings.\n */\n silent: false,\n /**\n * Show production mode tip message on boot?\n */\n productionTip: process.env.NODE_ENV !== 'production',\n /**\n * Whether to enable devtools\n */\n devtools: process.env.NODE_ENV !== 'production',\n /**\n * Whether to record perf\n */\n performance: false,\n /**\n * Error handler for watcher errors\n */\n errorHandler: null,\n /**\n * Warn handler for watcher warns\n */\n warnHandler: null,\n /**\n * Ignore certain custom elements\n */\n ignoredElements: [],\n /**\n * Custom user key aliases for v-on\n */\n // $flow-disable-line\n keyCodes: Object.create(null),\n /**\n * Check if a tag is reserved so that it cannot be registered as a\n * component. This is platform-dependent and may be overwritten.\n */\n isReservedTag: no,\n /**\n * Check if an attribute is reserved so that it cannot be used as a component\n * prop. This is platform-dependent and may be overwritten.\n */\n isReservedAttr: no,\n /**\n * Check if a tag is an unknown element.\n * Platform-dependent.\n */\n isUnknownElement: no,\n /**\n * Get the namespace of an element\n */\n getTagNamespace: noop,\n /**\n * Parse the real tag name for the specific platform.\n */\n parsePlatformTagName: identity,\n /**\n * Check if an attribute must be bound using property, e.g. value\n * Platform-dependent.\n */\n mustUseProp: no,\n /**\n * Perform updates asynchronously. Intended to be used by Vue Test Utils\n * This will significantly reduce performance if set to false.\n */\n async: true,\n /**\n * Exposed for legacy reasons\n */\n _lifecycleHooks: LIFECYCLE_HOOKS\n};\n\n/**\n * unicode letters used for parsing html tags, component names and property paths.\n * using https://www.w3.org/TR/html53/semantics-scripting.html#potentialcustomelementname\n * skipping \\u10000-\\uEFFFF due to it freezing up PhantomJS\n */\nvar unicodeRegExp = /a-zA-Z\\u00B7\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u203F-\\u2040\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD/;\n/**\n * Check if a string starts with $ or _\n */\nfunction isReserved(str) {\n var c = (str + '').charCodeAt(0);\n return c === 0x24 || c === 0x5f;\n}\n/**\n * Define a property.\n */\nfunction def(obj, key, val, enumerable) {\n Object.defineProperty(obj, key, {\n value: val,\n enumerable: !!enumerable,\n writable: true,\n configurable: true\n });\n}\n/**\n * Parse simple path.\n */\nvar bailRE = new RegExp(\"[^\".concat(unicodeRegExp.source, \".$_\\\\d]\"));\nfunction parsePath(path) {\n if (bailRE.test(path)) {\n return;\n }\n var segments = path.split('.');\n return function (obj) {\n for (var i = 0; i < segments.length; i++) {\n if (!obj)\n return;\n obj = obj[segments[i]];\n }\n return obj;\n };\n}\n\n// can we use __proto__?\nvar hasProto = '__proto__' in {};\n// Browser environment sniffing\nvar inBrowser = typeof window !== 'undefined';\nvar UA = inBrowser && window.navigator.userAgent.toLowerCase();\nvar isIE = UA && /msie|trident/.test(UA);\nvar isIE9 = UA && UA.indexOf('msie 9.0') > 0;\nvar isEdge = UA && UA.indexOf('edge/') > 0;\nUA && UA.indexOf('android') > 0;\nvar isIOS = UA && /iphone|ipad|ipod|ios/.test(UA);\nUA && /chrome\\/\\d+/.test(UA) && !isEdge;\nUA && /phantomjs/.test(UA);\nvar isFF = UA && UA.match(/firefox\\/(\\d+)/);\n// Firefox has a \"watch\" function on Object.prototype...\n// @ts-expect-error firebox support\nvar nativeWatch = {}.watch;\nvar supportsPassive = false;\nif (inBrowser) {\n try {\n var opts = {};\n Object.defineProperty(opts, 'passive', {\n get: function () {\n /* istanbul ignore next */\n supportsPassive = true;\n }\n }); // https://github.com/facebook/flow/issues/285\n window.addEventListener('test-passive', null, opts);\n }\n catch (e) { }\n}\n// this needs to be lazy-evaled because vue may be required before\n// vue-server-renderer can set VUE_ENV\nvar _isServer;\nvar isServerRendering = function () {\n if (_isServer === undefined) {\n /* istanbul ignore if */\n if (!inBrowser && typeof global !== 'undefined') {\n // detect presence of vue-server-renderer and avoid\n // Webpack shimming the process\n _isServer =\n global['process'] && global['process'].env.VUE_ENV === 'server';\n }\n else {\n _isServer = false;\n }\n }\n return _isServer;\n};\n// detect devtools\nvar devtools = inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__;\n/* istanbul ignore next */\nfunction isNative(Ctor) {\n return typeof Ctor === 'function' && /native code/.test(Ctor.toString());\n}\nvar hasSymbol = typeof Symbol !== 'undefined' &&\n isNative(Symbol) &&\n typeof Reflect !== 'undefined' &&\n isNative(Reflect.ownKeys);\nvar _Set; // $flow-disable-line\n/* istanbul ignore if */ if (typeof Set !== 'undefined' && isNative(Set)) {\n // use native Set when available.\n _Set = Set;\n}\nelse {\n // a non-standard Set polyfill that only works with primitive keys.\n _Set = /** @class */ (function () {\n function Set() {\n this.set = Object.create(null);\n }\n Set.prototype.has = function (key) {\n return this.set[key] === true;\n };\n Set.prototype.add = function (key) {\n this.set[key] = true;\n };\n Set.prototype.clear = function () {\n this.set = Object.create(null);\n };\n return Set;\n }());\n}\n\nvar currentInstance = null;\n/**\n * This is exposed for compatibility with v3 (e.g. some functions in VueUse\n * relies on it). Do not use this internally, just use `currentInstance`.\n *\n * @internal this function needs manual type declaration because it relies\n * on previously manually authored types from Vue 2\n */\nfunction getCurrentInstance() {\n return currentInstance && { proxy: currentInstance };\n}\n/**\n * @internal\n */\nfunction setCurrentInstance(vm) {\n if (vm === void 0) { vm = null; }\n if (!vm)\n currentInstance && currentInstance._scope.off();\n currentInstance = vm;\n vm && vm._scope.on();\n}\n\n/**\n * @internal\n */\nvar VNode = /** @class */ (function () {\n function VNode(tag, data, children, text, elm, context, componentOptions, asyncFactory) {\n this.tag = tag;\n this.data = data;\n this.children = children;\n this.text = text;\n this.elm = elm;\n this.ns = undefined;\n this.context = context;\n this.fnContext = undefined;\n this.fnOptions = undefined;\n this.fnScopeId = undefined;\n this.key = data && data.key;\n this.componentOptions = componentOptions;\n this.componentInstance = undefined;\n this.parent = undefined;\n this.raw = false;\n this.isStatic = false;\n this.isRootInsert = true;\n this.isComment = false;\n this.isCloned = false;\n this.isOnce = false;\n this.asyncFactory = asyncFactory;\n this.asyncMeta = undefined;\n this.isAsyncPlaceholder = false;\n }\n Object.defineProperty(VNode.prototype, \"child\", {\n // DEPRECATED: alias for componentInstance for backwards compat.\n /* istanbul ignore next */\n get: function () {\n return this.componentInstance;\n },\n enumerable: false,\n configurable: true\n });\n return VNode;\n}());\nvar createEmptyVNode = function (text) {\n if (text === void 0) { text = ''; }\n var node = new VNode();\n node.text = text;\n node.isComment = true;\n return node;\n};\nfunction createTextVNode(val) {\n return new VNode(undefined, undefined, undefined, String(val));\n}\n// optimized shallow clone\n// used for static nodes and slot nodes because they may be reused across\n// multiple renders, cloning them avoids errors when DOM manipulations rely\n// on their elm reference.\nfunction cloneVNode(vnode) {\n var cloned = new VNode(vnode.tag, vnode.data, \n // #7975\n // clone children array to avoid mutating original in case of cloning\n // a child.\n vnode.children && vnode.children.slice(), vnode.text, vnode.elm, vnode.context, vnode.componentOptions, vnode.asyncFactory);\n cloned.ns = vnode.ns;\n cloned.isStatic = vnode.isStatic;\n cloned.key = vnode.key;\n cloned.isComment = vnode.isComment;\n cloned.fnContext = vnode.fnContext;\n cloned.fnOptions = vnode.fnOptions;\n cloned.fnScopeId = vnode.fnScopeId;\n cloned.asyncMeta = vnode.asyncMeta;\n cloned.isCloned = true;\n return cloned;\n}\n\n/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n\r\nvar __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n };\r\n return __assign.apply(this, arguments);\r\n};\r\n\r\ntypeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\r\n var e = new Error(message);\r\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\r\n};\n\nvar uid$2 = 0;\nvar pendingCleanupDeps = [];\nvar cleanupDeps = function () {\n for (var i = 0; i < pendingCleanupDeps.length; i++) {\n var dep = pendingCleanupDeps[i];\n dep.subs = dep.subs.filter(function (s) { return s; });\n dep._pending = false;\n }\n pendingCleanupDeps.length = 0;\n};\n/**\n * A dep is an observable that can have multiple\n * directives subscribing to it.\n * @internal\n */\nvar Dep = /** @class */ (function () {\n function Dep() {\n // pending subs cleanup\n this._pending = false;\n this.id = uid$2++;\n this.subs = [];\n }\n Dep.prototype.addSub = function (sub) {\n this.subs.push(sub);\n };\n Dep.prototype.removeSub = function (sub) {\n // #12696 deps with massive amount of subscribers are extremely slow to\n // clean up in Chromium\n // to workaround this, we unset the sub for now, and clear them on\n // next scheduler flush.\n this.subs[this.subs.indexOf(sub)] = null;\n if (!this._pending) {\n this._pending = true;\n pendingCleanupDeps.push(this);\n }\n };\n Dep.prototype.depend = function (info) {\n if (Dep.target) {\n Dep.target.addDep(this);\n if (process.env.NODE_ENV !== 'production' && info && Dep.target.onTrack) {\n Dep.target.onTrack(__assign({ effect: Dep.target }, info));\n }\n }\n };\n Dep.prototype.notify = function (info) {\n // stabilize the subscriber list first\n var subs = this.subs.filter(function (s) { return s; });\n if (process.env.NODE_ENV !== 'production' && !config.async) {\n // subs aren't sorted in scheduler if not running async\n // we need to sort them now to make sure they fire in correct\n // order\n subs.sort(function (a, b) { return a.id - b.id; });\n }\n for (var i = 0, l = subs.length; i < l; i++) {\n var sub = subs[i];\n if (process.env.NODE_ENV !== 'production' && info) {\n sub.onTrigger &&\n sub.onTrigger(__assign({ effect: subs[i] }, info));\n }\n sub.update();\n }\n };\n return Dep;\n}());\n// The current target watcher being evaluated.\n// This is globally unique because only one watcher\n// can be evaluated at a time.\nDep.target = null;\nvar targetStack = [];\nfunction pushTarget(target) {\n targetStack.push(target);\n Dep.target = target;\n}\nfunction popTarget() {\n targetStack.pop();\n Dep.target = targetStack[targetStack.length - 1];\n}\n\n/*\n * not type checking this file because flow doesn't play well with\n * dynamically accessing methods on Array prototype\n */\nvar arrayProto = Array.prototype;\nvar arrayMethods = Object.create(arrayProto);\nvar methodsToPatch = [\n 'push',\n 'pop',\n 'shift',\n 'unshift',\n 'splice',\n 'sort',\n 'reverse'\n];\n/**\n * Intercept mutating methods and emit events\n */\nmethodsToPatch.forEach(function (method) {\n // cache original method\n var original = arrayProto[method];\n def(arrayMethods, method, function mutator() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var result = original.apply(this, args);\n var ob = this.__ob__;\n var inserted;\n switch (method) {\n case 'push':\n case 'unshift':\n inserted = args;\n break;\n case 'splice':\n inserted = args.slice(2);\n break;\n }\n if (inserted)\n ob.observeArray(inserted);\n // notify change\n if (process.env.NODE_ENV !== 'production') {\n ob.dep.notify({\n type: \"array mutation\" /* TriggerOpTypes.ARRAY_MUTATION */,\n target: this,\n key: method\n });\n }\n else {\n ob.dep.notify();\n }\n return result;\n });\n});\n\nvar arrayKeys = Object.getOwnPropertyNames(arrayMethods);\nvar NO_INITIAL_VALUE = {};\n/**\n * In some cases we may want to disable observation inside a component's\n * update computation.\n */\nvar shouldObserve = true;\nfunction toggleObserving(value) {\n shouldObserve = value;\n}\n// ssr mock dep\nvar mockDep = {\n notify: noop,\n depend: noop,\n addSub: noop,\n removeSub: noop\n};\n/**\n * Observer class that is attached to each observed\n * object. Once attached, the observer converts the target\n * object's property keys into getter/setters that\n * collect dependencies and dispatch updates.\n */\nvar Observer = /** @class */ (function () {\n function Observer(value, shallow, mock) {\n if (shallow === void 0) { shallow = false; }\n if (mock === void 0) { mock = false; }\n this.value = value;\n this.shallow = shallow;\n this.mock = mock;\n // this.value = value\n this.dep = mock ? mockDep : new Dep();\n this.vmCount = 0;\n def(value, '__ob__', this);\n if (isArray(value)) {\n if (!mock) {\n if (hasProto) {\n value.__proto__ = arrayMethods;\n /* eslint-enable no-proto */\n }\n else {\n for (var i = 0, l = arrayKeys.length; i < l; i++) {\n var key = arrayKeys[i];\n def(value, key, arrayMethods[key]);\n }\n }\n }\n if (!shallow) {\n this.observeArray(value);\n }\n }\n else {\n /**\n * Walk through all properties and convert them into\n * getter/setters. This method should only be called when\n * value type is Object.\n */\n var keys = Object.keys(value);\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n defineReactive(value, key, NO_INITIAL_VALUE, undefined, shallow, mock);\n }\n }\n }\n /**\n * Observe a list of Array items.\n */\n Observer.prototype.observeArray = function (value) {\n for (var i = 0, l = value.length; i < l; i++) {\n observe(value[i], false, this.mock);\n }\n };\n return Observer;\n}());\n// helpers\n/**\n * Attempt to create an observer instance for a value,\n * returns the new observer if successfully observed,\n * or the existing observer if the value already has one.\n */\nfunction observe(value, shallow, ssrMockReactivity) {\n if (value && hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {\n return value.__ob__;\n }\n if (shouldObserve &&\n (ssrMockReactivity || !isServerRendering()) &&\n (isArray(value) || isPlainObject(value)) &&\n Object.isExtensible(value) &&\n !value.__v_skip /* ReactiveFlags.SKIP */ &&\n !isRef(value) &&\n !(value instanceof VNode)) {\n return new Observer(value, shallow, ssrMockReactivity);\n }\n}\n/**\n * Define a reactive property on an Object.\n */\nfunction defineReactive(obj, key, val, customSetter, shallow, mock, observeEvenIfShallow) {\n if (observeEvenIfShallow === void 0) { observeEvenIfShallow = false; }\n var dep = new Dep();\n var property = Object.getOwnPropertyDescriptor(obj, key);\n if (property && property.configurable === false) {\n return;\n }\n // cater for pre-defined getter/setters\n var getter = property && property.get;\n var setter = property && property.set;\n if ((!getter || setter) &&\n (val === NO_INITIAL_VALUE || arguments.length === 2)) {\n val = obj[key];\n }\n var childOb = shallow ? val && val.__ob__ : observe(val, false, mock);\n Object.defineProperty(obj, key, {\n enumerable: true,\n configurable: true,\n get: function reactiveGetter() {\n var value = getter ? getter.call(obj) : val;\n if (Dep.target) {\n if (process.env.NODE_ENV !== 'production') {\n dep.depend({\n target: obj,\n type: \"get\" /* TrackOpTypes.GET */,\n key: key\n });\n }\n else {\n dep.depend();\n }\n if (childOb) {\n childOb.dep.depend();\n if (isArray(value)) {\n dependArray(value);\n }\n }\n }\n return isRef(value) && !shallow ? value.value : value;\n },\n set: function reactiveSetter(newVal) {\n var value = getter ? getter.call(obj) : val;\n if (!hasChanged(value, newVal)) {\n return;\n }\n if (process.env.NODE_ENV !== 'production' && customSetter) {\n customSetter();\n }\n if (setter) {\n setter.call(obj, newVal);\n }\n else if (getter) {\n // #7981: for accessor properties without setter\n return;\n }\n else if (!shallow && isRef(value) && !isRef(newVal)) {\n value.value = newVal;\n return;\n }\n else {\n val = newVal;\n }\n childOb = shallow ? newVal && newVal.__ob__ : observe(newVal, false, mock);\n if (process.env.NODE_ENV !== 'production') {\n dep.notify({\n type: \"set\" /* TriggerOpTypes.SET */,\n target: obj,\n key: key,\n newValue: newVal,\n oldValue: value\n });\n }\n else {\n dep.notify();\n }\n }\n });\n return dep;\n}\nfunction set(target, key, val) {\n if (process.env.NODE_ENV !== 'production' && (isUndef(target) || isPrimitive(target))) {\n warn(\"Cannot set reactive property on undefined, null, or primitive value: \".concat(target));\n }\n if (isReadonly(target)) {\n process.env.NODE_ENV !== 'production' && warn(\"Set operation on key \\\"\".concat(key, \"\\\" failed: target is readonly.\"));\n return;\n }\n var ob = target.__ob__;\n if (isArray(target) && isValidArrayIndex(key)) {\n target.length = Math.max(target.length, key);\n target.splice(key, 1, val);\n // when mocking for SSR, array methods are not hijacked\n if (ob && !ob.shallow && ob.mock) {\n observe(val, false, true);\n }\n return val;\n }\n if (key in target && !(key in Object.prototype)) {\n target[key] = val;\n return val;\n }\n if (target._isVue || (ob && ob.vmCount)) {\n process.env.NODE_ENV !== 'production' &&\n warn('Avoid adding reactive properties to a Vue instance or its root $data ' +\n 'at runtime - declare it upfront in the data option.');\n return val;\n }\n if (!ob) {\n target[key] = val;\n return val;\n }\n defineReactive(ob.value, key, val, undefined, ob.shallow, ob.mock);\n if (process.env.NODE_ENV !== 'production') {\n ob.dep.notify({\n type: \"add\" /* TriggerOpTypes.ADD */,\n target: target,\n key: key,\n newValue: val,\n oldValue: undefined\n });\n }\n else {\n ob.dep.notify();\n }\n return val;\n}\nfunction del(target, key) {\n if (process.env.NODE_ENV !== 'production' && (isUndef(target) || isPrimitive(target))) {\n warn(\"Cannot delete reactive property on undefined, null, or primitive value: \".concat(target));\n }\n if (isArray(target) && isValidArrayIndex(key)) {\n target.splice(key, 1);\n return;\n }\n var ob = target.__ob__;\n if (target._isVue || (ob && ob.vmCount)) {\n process.env.NODE_ENV !== 'production' &&\n warn('Avoid deleting properties on a Vue instance or its root $data ' +\n '- just set it to null.');\n return;\n }\n if (isReadonly(target)) {\n process.env.NODE_ENV !== 'production' &&\n warn(\"Delete operation on key \\\"\".concat(key, \"\\\" failed: target is readonly.\"));\n return;\n }\n if (!hasOwn(target, key)) {\n return;\n }\n delete target[key];\n if (!ob) {\n return;\n }\n if (process.env.NODE_ENV !== 'production') {\n ob.dep.notify({\n type: \"delete\" /* TriggerOpTypes.DELETE */,\n target: target,\n key: key\n });\n }\n else {\n ob.dep.notify();\n }\n}\n/**\n * Collect dependencies on array elements when the array is touched, since\n * we cannot intercept array element access like property getters.\n */\nfunction dependArray(value) {\n for (var e = void 0, i = 0, l = value.length; i < l; i++) {\n e = value[i];\n if (e && e.__ob__) {\n e.__ob__.dep.depend();\n }\n if (isArray(e)) {\n dependArray(e);\n }\n }\n}\n\nfunction reactive(target) {\n makeReactive(target, false);\n return target;\n}\n/**\n * Return a shallowly-reactive copy of the original object, where only the root\n * level properties are reactive. It also does not auto-unwrap refs (even at the\n * root level).\n */\nfunction shallowReactive(target) {\n makeReactive(target, true);\n def(target, \"__v_isShallow\" /* ReactiveFlags.IS_SHALLOW */, true);\n return target;\n}\nfunction makeReactive(target, shallow) {\n // if trying to observe a readonly proxy, return the readonly version.\n if (!isReadonly(target)) {\n if (process.env.NODE_ENV !== 'production') {\n if (isArray(target)) {\n warn(\"Avoid using Array as root value for \".concat(shallow ? \"shallowReactive()\" : \"reactive()\", \" as it cannot be tracked in watch() or watchEffect(). Use \").concat(shallow ? \"shallowRef()\" : \"ref()\", \" instead. This is a Vue-2-only limitation.\"));\n }\n var existingOb = target && target.__ob__;\n if (existingOb && existingOb.shallow !== shallow) {\n warn(\"Target is already a \".concat(existingOb.shallow ? \"\" : \"non-\", \"shallow reactive object, and cannot be converted to \").concat(shallow ? \"\" : \"non-\", \"shallow.\"));\n }\n }\n var ob = observe(target, shallow, isServerRendering() /* ssr mock reactivity */);\n if (process.env.NODE_ENV !== 'production' && !ob) {\n if (target == null || isPrimitive(target)) {\n warn(\"value cannot be made reactive: \".concat(String(target)));\n }\n if (isCollectionType(target)) {\n warn(\"Vue 2 does not support reactive collection types such as Map or Set.\");\n }\n }\n }\n}\nfunction isReactive(value) {\n if (isReadonly(value)) {\n return isReactive(value[\"__v_raw\" /* ReactiveFlags.RAW */]);\n }\n return !!(value && value.__ob__);\n}\nfunction isShallow(value) {\n return !!(value && value.__v_isShallow);\n}\nfunction isReadonly(value) {\n return !!(value && value.__v_isReadonly);\n}\nfunction isProxy(value) {\n return isReactive(value) || isReadonly(value);\n}\nfunction toRaw(observed) {\n var raw = observed && observed[\"__v_raw\" /* ReactiveFlags.RAW */];\n return raw ? toRaw(raw) : observed;\n}\nfunction markRaw(value) {\n // non-extensible objects won't be observed anyway\n if (Object.isExtensible(value)) {\n def(value, \"__v_skip\" /* ReactiveFlags.SKIP */, true);\n }\n return value;\n}\n/**\n * @internal\n */\nfunction isCollectionType(value) {\n var type = toRawType(value);\n return (type === 'Map' || type === 'WeakMap' || type === 'Set' || type === 'WeakSet');\n}\n\n/**\n * @internal\n */\nvar RefFlag = \"__v_isRef\";\nfunction isRef(r) {\n return !!(r && r.__v_isRef === true);\n}\nfunction ref$1(value) {\n return createRef(value, false);\n}\nfunction shallowRef(value) {\n return createRef(value, true);\n}\nfunction createRef(rawValue, shallow) {\n if (isRef(rawValue)) {\n return rawValue;\n }\n var ref = {};\n def(ref, RefFlag, true);\n def(ref, \"__v_isShallow\" /* ReactiveFlags.IS_SHALLOW */, shallow);\n def(ref, 'dep', defineReactive(ref, 'value', rawValue, null, shallow, isServerRendering()));\n return ref;\n}\nfunction triggerRef(ref) {\n if (process.env.NODE_ENV !== 'production' && !ref.dep) {\n warn(\"received object is not a triggerable ref.\");\n }\n if (process.env.NODE_ENV !== 'production') {\n ref.dep &&\n ref.dep.notify({\n type: \"set\" /* TriggerOpTypes.SET */,\n target: ref,\n key: 'value'\n });\n }\n else {\n ref.dep && ref.dep.notify();\n }\n}\nfunction unref(ref) {\n return isRef(ref) ? ref.value : ref;\n}\nfunction proxyRefs(objectWithRefs) {\n if (isReactive(objectWithRefs)) {\n return objectWithRefs;\n }\n var proxy = {};\n var keys = Object.keys(objectWithRefs);\n for (var i = 0; i < keys.length; i++) {\n proxyWithRefUnwrap(proxy, objectWithRefs, keys[i]);\n }\n return proxy;\n}\nfunction proxyWithRefUnwrap(target, source, key) {\n Object.defineProperty(target, key, {\n enumerable: true,\n configurable: true,\n get: function () {\n var val = source[key];\n if (isRef(val)) {\n return val.value;\n }\n else {\n var ob = val && val.__ob__;\n if (ob)\n ob.dep.depend();\n return val;\n }\n },\n set: function (value) {\n var oldValue = source[key];\n if (isRef(oldValue) && !isRef(value)) {\n oldValue.value = value;\n }\n else {\n source[key] = value;\n }\n }\n });\n}\nfunction customRef(factory) {\n var dep = new Dep();\n var _a = factory(function () {\n if (process.env.NODE_ENV !== 'production') {\n dep.depend({\n target: ref,\n type: \"get\" /* TrackOpTypes.GET */,\n key: 'value'\n });\n }\n else {\n dep.depend();\n }\n }, function () {\n if (process.env.NODE_ENV !== 'production') {\n dep.notify({\n target: ref,\n type: \"set\" /* TriggerOpTypes.SET */,\n key: 'value'\n });\n }\n else {\n dep.notify();\n }\n }), get = _a.get, set = _a.set;\n var ref = {\n get value() {\n return get();\n },\n set value(newVal) {\n set(newVal);\n }\n };\n def(ref, RefFlag, true);\n return ref;\n}\nfunction toRefs(object) {\n if (process.env.NODE_ENV !== 'production' && !isReactive(object)) {\n warn(\"toRefs() expects a reactive object but received a plain one.\");\n }\n var ret = isArray(object) ? new Array(object.length) : {};\n for (var key in object) {\n ret[key] = toRef(object, key);\n }\n return ret;\n}\nfunction toRef(object, key, defaultValue) {\n var val = object[key];\n if (isRef(val)) {\n return val;\n }\n var ref = {\n get value() {\n var val = object[key];\n return val === undefined ? defaultValue : val;\n },\n set value(newVal) {\n object[key] = newVal;\n }\n };\n def(ref, RefFlag, true);\n return ref;\n}\n\nvar rawToReadonlyFlag = \"__v_rawToReadonly\";\nvar rawToShallowReadonlyFlag = \"__v_rawToShallowReadonly\";\nfunction readonly(target) {\n return createReadonly(target, false);\n}\nfunction createReadonly(target, shallow) {\n if (!isPlainObject(target)) {\n if (process.env.NODE_ENV !== 'production') {\n if (isArray(target)) {\n warn(\"Vue 2 does not support readonly arrays.\");\n }\n else if (isCollectionType(target)) {\n warn(\"Vue 2 does not support readonly collection types such as Map or Set.\");\n }\n else {\n warn(\"value cannot be made readonly: \".concat(typeof target));\n }\n }\n return target;\n }\n if (process.env.NODE_ENV !== 'production' && !Object.isExtensible(target)) {\n warn(\"Vue 2 does not support creating readonly proxy for non-extensible object.\");\n }\n // already a readonly object\n if (isReadonly(target)) {\n return target;\n }\n // already has a readonly proxy\n var existingFlag = shallow ? rawToShallowReadonlyFlag : rawToReadonlyFlag;\n var existingProxy = target[existingFlag];\n if (existingProxy) {\n return existingProxy;\n }\n var proxy = Object.create(Object.getPrototypeOf(target));\n def(target, existingFlag, proxy);\n def(proxy, \"__v_isReadonly\" /* ReactiveFlags.IS_READONLY */, true);\n def(proxy, \"__v_raw\" /* ReactiveFlags.RAW */, target);\n if (isRef(target)) {\n def(proxy, RefFlag, true);\n }\n if (shallow || isShallow(target)) {\n def(proxy, \"__v_isShallow\" /* ReactiveFlags.IS_SHALLOW */, true);\n }\n var keys = Object.keys(target);\n for (var i = 0; i < keys.length; i++) {\n defineReadonlyProperty(proxy, target, keys[i], shallow);\n }\n return proxy;\n}\nfunction defineReadonlyProperty(proxy, target, key, shallow) {\n Object.defineProperty(proxy, key, {\n enumerable: true,\n configurable: true,\n get: function () {\n var val = target[key];\n return shallow || !isPlainObject(val) ? val : readonly(val);\n },\n set: function () {\n process.env.NODE_ENV !== 'production' &&\n warn(\"Set operation on key \\\"\".concat(key, \"\\\" failed: target is readonly.\"));\n }\n });\n}\n/**\n * Returns a reactive-copy of the original object, where only the root level\n * properties are readonly, and does NOT unwrap refs nor recursively convert\n * returned properties.\n * This is used for creating the props proxy object for stateful components.\n */\nfunction shallowReadonly(target) {\n return createReadonly(target, true);\n}\n\nfunction computed(getterOrOptions, debugOptions) {\n var getter;\n var setter;\n var onlyGetter = isFunction(getterOrOptions);\n if (onlyGetter) {\n getter = getterOrOptions;\n setter = process.env.NODE_ENV !== 'production'\n ? function () {\n warn('Write operation failed: computed value is readonly');\n }\n : noop;\n }\n else {\n getter = getterOrOptions.get;\n setter = getterOrOptions.set;\n }\n var watcher = isServerRendering()\n ? null\n : new Watcher(currentInstance, getter, noop, { lazy: true });\n if (process.env.NODE_ENV !== 'production' && watcher && debugOptions) {\n watcher.onTrack = debugOptions.onTrack;\n watcher.onTrigger = debugOptions.onTrigger;\n }\n var ref = {\n // some libs rely on the presence effect for checking computed refs\n // from normal refs, but the implementation doesn't matter\n effect: watcher,\n get value() {\n if (watcher) {\n if (watcher.dirty) {\n watcher.evaluate();\n }\n if (Dep.target) {\n if (process.env.NODE_ENV !== 'production' && Dep.target.onTrack) {\n Dep.target.onTrack({\n effect: Dep.target,\n target: ref,\n type: \"get\" /* TrackOpTypes.GET */,\n key: 'value'\n });\n }\n watcher.depend();\n }\n return watcher.value;\n }\n else {\n return getter();\n }\n },\n set value(newVal) {\n setter(newVal);\n }\n };\n def(ref, RefFlag, true);\n def(ref, \"__v_isReadonly\" /* ReactiveFlags.IS_READONLY */, onlyGetter);\n return ref;\n}\n\nvar WATCHER = \"watcher\";\nvar WATCHER_CB = \"\".concat(WATCHER, \" callback\");\nvar WATCHER_GETTER = \"\".concat(WATCHER, \" getter\");\nvar WATCHER_CLEANUP = \"\".concat(WATCHER, \" cleanup\");\n// Simple effect.\nfunction watchEffect(effect, options) {\n return doWatch(effect, null, options);\n}\nfunction watchPostEffect(effect, options) {\n return doWatch(effect, null, (process.env.NODE_ENV !== 'production'\n ? __assign(__assign({}, options), { flush: 'post' }) : { flush: 'post' }));\n}\nfunction watchSyncEffect(effect, options) {\n return doWatch(effect, null, (process.env.NODE_ENV !== 'production'\n ? __assign(__assign({}, options), { flush: 'sync' }) : { flush: 'sync' }));\n}\n// initial value for watchers to trigger on undefined initial values\nvar INITIAL_WATCHER_VALUE = {};\n// implementation\nfunction watch(source, cb, options) {\n if (process.env.NODE_ENV !== 'production' && typeof cb !== 'function') {\n warn(\"`watch(fn, options?)` signature has been moved to a separate API. \" +\n \"Use `watchEffect(fn, options?)` instead. `watch` now only \" +\n \"supports `watch(source, cb, options?) signature.\");\n }\n return doWatch(source, cb, options);\n}\nfunction doWatch(source, cb, _a) {\n var _b = _a === void 0 ? emptyObject : _a, immediate = _b.immediate, deep = _b.deep, _c = _b.flush, flush = _c === void 0 ? 'pre' : _c, onTrack = _b.onTrack, onTrigger = _b.onTrigger;\n if (process.env.NODE_ENV !== 'production' && !cb) {\n if (immediate !== undefined) {\n warn(\"watch() \\\"immediate\\\" option is only respected when using the \" +\n \"watch(source, callback, options?) signature.\");\n }\n if (deep !== undefined) {\n warn(\"watch() \\\"deep\\\" option is only respected when using the \" +\n \"watch(source, callback, options?) signature.\");\n }\n }\n var warnInvalidSource = function (s) {\n warn(\"Invalid watch source: \".concat(s, \". A watch source can only be a getter/effect \") +\n \"function, a ref, a reactive object, or an array of these types.\");\n };\n var instance = currentInstance;\n var call = function (fn, type, args) {\n if (args === void 0) { args = null; }\n var res = invokeWithErrorHandling(fn, null, args, instance, type);\n if (deep && res && res.__ob__)\n res.__ob__.dep.depend();\n return res;\n };\n var getter;\n var forceTrigger = false;\n var isMultiSource = false;\n if (isRef(source)) {\n getter = function () { return source.value; };\n forceTrigger = isShallow(source);\n }\n else if (isReactive(source)) {\n getter = function () {\n source.__ob__.dep.depend();\n return source;\n };\n deep = true;\n }\n else if (isArray(source)) {\n isMultiSource = true;\n forceTrigger = source.some(function (s) { return isReactive(s) || isShallow(s); });\n getter = function () {\n return source.map(function (s) {\n if (isRef(s)) {\n return s.value;\n }\n else if (isReactive(s)) {\n s.__ob__.dep.depend();\n return traverse(s);\n }\n else if (isFunction(s)) {\n return call(s, WATCHER_GETTER);\n }\n else {\n process.env.NODE_ENV !== 'production' && warnInvalidSource(s);\n }\n });\n };\n }\n else if (isFunction(source)) {\n if (cb) {\n // getter with cb\n getter = function () { return call(source, WATCHER_GETTER); };\n }\n else {\n // no cb -> simple effect\n getter = function () {\n if (instance && instance._isDestroyed) {\n return;\n }\n if (cleanup) {\n cleanup();\n }\n return call(source, WATCHER, [onCleanup]);\n };\n }\n }\n else {\n getter = noop;\n process.env.NODE_ENV !== 'production' && warnInvalidSource(source);\n }\n if (cb && deep) {\n var baseGetter_1 = getter;\n getter = function () { return traverse(baseGetter_1()); };\n }\n var cleanup;\n var onCleanup = function (fn) {\n cleanup = watcher.onStop = function () {\n call(fn, WATCHER_CLEANUP);\n };\n };\n // in SSR there is no need to setup an actual effect, and it should be noop\n // unless it's eager\n if (isServerRendering()) {\n // we will also not call the invalidate callback (+ runner is not set up)\n onCleanup = noop;\n if (!cb) {\n getter();\n }\n else if (immediate) {\n call(cb, WATCHER_CB, [\n getter(),\n isMultiSource ? [] : undefined,\n onCleanup\n ]);\n }\n return noop;\n }\n var watcher = new Watcher(currentInstance, getter, noop, {\n lazy: true\n });\n watcher.noRecurse = !cb;\n var oldValue = isMultiSource ? [] : INITIAL_WATCHER_VALUE;\n // overwrite default run\n watcher.run = function () {\n if (!watcher.active) {\n return;\n }\n if (cb) {\n // watch(source, cb)\n var newValue = watcher.get();\n if (deep ||\n forceTrigger ||\n (isMultiSource\n ? newValue.some(function (v, i) {\n return hasChanged(v, oldValue[i]);\n })\n : hasChanged(newValue, oldValue))) {\n // cleanup before running cb again\n if (cleanup) {\n cleanup();\n }\n call(cb, WATCHER_CB, [\n newValue,\n // pass undefined as the old value when it's changed for the first time\n oldValue === INITIAL_WATCHER_VALUE ? undefined : oldValue,\n onCleanup\n ]);\n oldValue = newValue;\n }\n }\n else {\n // watchEffect\n watcher.get();\n }\n };\n if (flush === 'sync') {\n watcher.update = watcher.run;\n }\n else if (flush === 'post') {\n watcher.post = true;\n watcher.update = function () { return queueWatcher(watcher); };\n }\n else {\n // pre\n watcher.update = function () {\n if (instance && instance === currentInstance && !instance._isMounted) {\n // pre-watcher triggered before\n var buffer = instance._preWatchers || (instance._preWatchers = []);\n if (buffer.indexOf(watcher) < 0)\n buffer.push(watcher);\n }\n else {\n queueWatcher(watcher);\n }\n };\n }\n if (process.env.NODE_ENV !== 'production') {\n watcher.onTrack = onTrack;\n watcher.onTrigger = onTrigger;\n }\n // initial run\n if (cb) {\n if (immediate) {\n watcher.run();\n }\n else {\n oldValue = watcher.get();\n }\n }\n else if (flush === 'post' && instance) {\n instance.$once('hook:mounted', function () { return watcher.get(); });\n }\n else {\n watcher.get();\n }\n return function () {\n watcher.teardown();\n };\n}\n\nvar activeEffectScope;\nvar EffectScope = /** @class */ (function () {\n function EffectScope(detached) {\n if (detached === void 0) { detached = false; }\n this.detached = detached;\n /**\n * @internal\n */\n this.active = true;\n /**\n * @internal\n */\n this.effects = [];\n /**\n * @internal\n */\n this.cleanups = [];\n this.parent = activeEffectScope;\n if (!detached && activeEffectScope) {\n this.index =\n (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push(this) - 1;\n }\n }\n EffectScope.prototype.run = function (fn) {\n if (this.active) {\n var currentEffectScope = activeEffectScope;\n try {\n activeEffectScope = this;\n return fn();\n }\n finally {\n activeEffectScope = currentEffectScope;\n }\n }\n else if (process.env.NODE_ENV !== 'production') {\n warn(\"cannot run an inactive effect scope.\");\n }\n };\n /**\n * This should only be called on non-detached scopes\n * @internal\n */\n EffectScope.prototype.on = function () {\n activeEffectScope = this;\n };\n /**\n * This should only be called on non-detached scopes\n * @internal\n */\n EffectScope.prototype.off = function () {\n activeEffectScope = this.parent;\n };\n EffectScope.prototype.stop = function (fromParent) {\n if (this.active) {\n var i = void 0, l = void 0;\n for (i = 0, l = this.effects.length; i < l; i++) {\n this.effects[i].teardown();\n }\n for (i = 0, l = this.cleanups.length; i < l; i++) {\n this.cleanups[i]();\n }\n if (this.scopes) {\n for (i = 0, l = this.scopes.length; i < l; i++) {\n this.scopes[i].stop(true);\n }\n }\n // nested scope, dereference from parent to avoid memory leaks\n if (!this.detached && this.parent && !fromParent) {\n // optimized O(1) removal\n var last = this.parent.scopes.pop();\n if (last && last !== this) {\n this.parent.scopes[this.index] = last;\n last.index = this.index;\n }\n }\n this.parent = undefined;\n this.active = false;\n }\n };\n return EffectScope;\n}());\nfunction effectScope(detached) {\n return new EffectScope(detached);\n}\n/**\n * @internal\n */\nfunction recordEffectScope(effect, scope) {\n if (scope === void 0) { scope = activeEffectScope; }\n if (scope && scope.active) {\n scope.effects.push(effect);\n }\n}\nfunction getCurrentScope() {\n return activeEffectScope;\n}\nfunction onScopeDispose(fn) {\n if (activeEffectScope) {\n activeEffectScope.cleanups.push(fn);\n }\n else if (process.env.NODE_ENV !== 'production') {\n warn(\"onScopeDispose() is called when there is no active effect scope\" +\n \" to be associated with.\");\n }\n}\n\nfunction provide(key, value) {\n if (!currentInstance) {\n if (process.env.NODE_ENV !== 'production') {\n warn(\"provide() can only be used inside setup().\");\n }\n }\n else {\n // TS doesn't allow symbol as index type\n resolveProvided(currentInstance)[key] = value;\n }\n}\nfunction resolveProvided(vm) {\n // by default an instance inherits its parent's provides object\n // but when it needs to provide values of its own, it creates its\n // own provides object using parent provides object as prototype.\n // this way in `inject` we can simply look up injections from direct\n // parent and let the prototype chain do the work.\n var existing = vm._provided;\n var parentProvides = vm.$parent && vm.$parent._provided;\n if (parentProvides === existing) {\n return (vm._provided = Object.create(parentProvides));\n }\n else {\n return existing;\n }\n}\nfunction inject(key, defaultValue, treatDefaultAsFactory) {\n if (treatDefaultAsFactory === void 0) { treatDefaultAsFactory = false; }\n // fallback to `currentRenderingInstance` so that this can be called in\n // a functional component\n var instance = currentInstance;\n if (instance) {\n // #2400\n // to support `app.use` plugins,\n // fallback to appContext's `provides` if the instance is at root\n var provides = instance.$parent && instance.$parent._provided;\n if (provides && key in provides) {\n // TS doesn't allow symbol as index type\n return provides[key];\n }\n else if (arguments.length > 1) {\n return treatDefaultAsFactory && isFunction(defaultValue)\n ? defaultValue.call(instance)\n : defaultValue;\n }\n else if (process.env.NODE_ENV !== 'production') {\n warn(\"injection \\\"\".concat(String(key), \"\\\" not found.\"));\n }\n }\n else if (process.env.NODE_ENV !== 'production') {\n warn(\"inject() can only be used inside setup() or functional components.\");\n }\n}\n\nvar normalizeEvent = cached(function (name) {\n var passive = name.charAt(0) === '&';\n name = passive ? name.slice(1) : name;\n var once = name.charAt(0) === '~'; // Prefixed last, checked first\n name = once ? name.slice(1) : name;\n var capture = name.charAt(0) === '!';\n name = capture ? name.slice(1) : name;\n return {\n name: name,\n once: once,\n capture: capture,\n passive: passive\n };\n});\nfunction createFnInvoker(fns, vm) {\n function invoker() {\n var fns = invoker.fns;\n if (isArray(fns)) {\n var cloned = fns.slice();\n for (var i = 0; i < cloned.length; i++) {\n invokeWithErrorHandling(cloned[i], null, arguments, vm, \"v-on handler\");\n }\n }\n else {\n // return handler return value for single handlers\n return invokeWithErrorHandling(fns, null, arguments, vm, \"v-on handler\");\n }\n }\n invoker.fns = fns;\n return invoker;\n}\nfunction updateListeners(on, oldOn, add, remove, createOnceHandler, vm) {\n var name, cur, old, event;\n for (name in on) {\n cur = on[name];\n old = oldOn[name];\n event = normalizeEvent(name);\n if (isUndef(cur)) {\n process.env.NODE_ENV !== 'production' &&\n warn(\"Invalid handler for event \\\"\".concat(event.name, \"\\\": got \") + String(cur), vm);\n }\n else if (isUndef(old)) {\n if (isUndef(cur.fns)) {\n cur = on[name] = createFnInvoker(cur, vm);\n }\n if (isTrue(event.once)) {\n cur = on[name] = createOnceHandler(event.name, cur, event.capture);\n }\n add(event.name, cur, event.capture, event.passive, event.params);\n }\n else if (cur !== old) {\n old.fns = cur;\n on[name] = old;\n }\n }\n for (name in oldOn) {\n if (isUndef(on[name])) {\n event = normalizeEvent(name);\n remove(event.name, oldOn[name], event.capture);\n }\n }\n}\n\nfunction mergeVNodeHook(def, hookKey, hook) {\n if (def instanceof VNode) {\n def = def.data.hook || (def.data.hook = {});\n }\n var invoker;\n var oldHook = def[hookKey];\n function wrappedHook() {\n hook.apply(this, arguments);\n // important: remove merged hook to ensure it's called only once\n // and prevent memory leak\n remove$2(invoker.fns, wrappedHook);\n }\n if (isUndef(oldHook)) {\n // no existing hook\n invoker = createFnInvoker([wrappedHook]);\n }\n else {\n /* istanbul ignore if */\n if (isDef(oldHook.fns) && isTrue(oldHook.merged)) {\n // already a merged invoker\n invoker = oldHook;\n invoker.fns.push(wrappedHook);\n }\n else {\n // existing plain hook\n invoker = createFnInvoker([oldHook, wrappedHook]);\n }\n }\n invoker.merged = true;\n def[hookKey] = invoker;\n}\n\nfunction extractPropsFromVNodeData(data, Ctor, tag) {\n // we are only extracting raw values here.\n // validation and default values are handled in the child\n // component itself.\n var propOptions = Ctor.options.props;\n if (isUndef(propOptions)) {\n return;\n }\n var res = {};\n var attrs = data.attrs, props = data.props;\n if (isDef(attrs) || isDef(props)) {\n for (var key in propOptions) {\n var altKey = hyphenate(key);\n if (process.env.NODE_ENV !== 'production') {\n var keyInLowerCase = key.toLowerCase();\n if (key !== keyInLowerCase && attrs && hasOwn(attrs, keyInLowerCase)) {\n tip(\"Prop \\\"\".concat(keyInLowerCase, \"\\\" is passed to component \") +\n \"\".concat(formatComponentName(\n // @ts-expect-error tag is string\n tag || Ctor), \", but the declared prop name is\") +\n \" \\\"\".concat(key, \"\\\". \") +\n \"Note that HTML attributes are case-insensitive and camelCased \" +\n \"props need to use their kebab-case equivalents when using in-DOM \" +\n \"templates. You should probably use \\\"\".concat(altKey, \"\\\" instead of \\\"\").concat(key, \"\\\".\"));\n }\n }\n checkProp(res, props, key, altKey, true) ||\n checkProp(res, attrs, key, altKey, false);\n }\n }\n return res;\n}\nfunction checkProp(res, hash, key, altKey, preserve) {\n if (isDef(hash)) {\n if (hasOwn(hash, key)) {\n res[key] = hash[key];\n if (!preserve) {\n delete hash[key];\n }\n return true;\n }\n else if (hasOwn(hash, altKey)) {\n res[key] = hash[altKey];\n if (!preserve) {\n delete hash[altKey];\n }\n return true;\n }\n }\n return false;\n}\n\n// The template compiler attempts to minimize the need for normalization by\n// statically analyzing the template at compile time.\n//\n// For plain HTML markup, normalization can be completely skipped because the\n// generated render function is guaranteed to return Array. There are\n// two cases where extra normalization is needed:\n// 1. When the children contains components - because a functional component\n// may return an Array instead of a single root. In this case, just a simple\n// normalization is needed - if any child is an Array, we flatten the whole\n// thing with Array.prototype.concat. It is guaranteed to be only 1-level deep\n// because functional components already normalize their own children.\nfunction simpleNormalizeChildren(children) {\n for (var i = 0; i < children.length; i++) {\n if (isArray(children[i])) {\n return Array.prototype.concat.apply([], children);\n }\n }\n return children;\n}\n// 2. When the children contains constructs that always generated nested Arrays,\n// e.g.