@pie-element/ebsr 14.2.11 → 14.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/module/element.js CHANGED
@@ -1 +1 @@
1
- import{_dll_react as e,_dll_react_dom as t,_dll_mui__material as n,_dll_prop_types as r,_dll_mui__material_styles as o,_dll_pie_lib__render_ui as i,_dll_classnames as a,_dll_pie_lib__correct_answer_toggle as s,_dll_debug as l,_dll_react_dom_client as u}from"../../../@pie-lib/shared-module@^5.2.14/module/index.js";import{_dll_pie_lib__math_rendering as c}from"../../../@pie-lib/math-rendering-module@^5.1.4/module/index.js";function d(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function p(e){if(e.__esModule)return e;var t=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(e).forEach(function(n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}),t}var f={};Object.defineProperty(f,"__esModule",{value:!0});class h extends CustomEvent{constructor(e,t,n){super(h.TYPE,{bubbles:!0,composed:!0,detail:{complete:t,component:e,hasModel:n}}),this.component=e,this.complete=t}}h.TYPE="model-set",f.ModelSetEvent=h;class g extends CustomEvent{constructor(e,t){super(g.TYPE,{bubbles:!0,composed:!0,detail:{complete:t,component:e}}),this.component=e,this.complete=t}}g.TYPE="session-changed";var v=f.SessionChangedEvent=g,m={},y={exports:{}};!function(e){e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports}(y),d(y.exports);var b={exports:{}},_={exports:{}},x={exports:{}};!function(e){function t(n){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(x),d(x.exports);var w={exports:{}};!function(e){var t=x.exports.default;e.exports=function(e,n){if("object"!=t(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,n||"default");if("object"!=t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports}(w),d(w.exports),function(e){var t=x.exports.default,n=w.exports;e.exports=function(e){var r=n(e,"string");return"symbol"==t(r)?r:r+""},e.exports.__esModule=!0,e.exports.default=e.exports}(_),d(_.exports),function(e){var t=_.exports;e.exports=function(e,n,r){return(n=t(n))in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e},e.exports.__esModule=!0,e.exports.default=e.exports}(b),d(b.exports);var S={},E={exports:{}};!function(e){function t(){return e.exports=t=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},e.exports.__esModule=!0,e.exports.default=e.exports,t.apply(null,arguments)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(E),d(E.exports);var k={};function C(e,t){return null!=e?e:t()}function O(e){let t,n=e[0],r=1;for(;r<e.length;){const o=e[r],i=e[r+1];if(r+=2,("optionalAccess"===o||"optionalCall"===o)&&null==n)return;"access"===o||"optionalAccess"===o?(t=n,n=i(n)):"call"!==o&&"optionalCall"!==o||(n=i((...e)=>n.call(t,...e)),t=void 0)}return n}const A=e=>"string"==typeof e,j=()=>{let e,t;const n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},L=e=>null==e?"":""+e,R=/###/g,M=e=>e&&e.indexOf("###")>-1?e.replace(R,"."):e,P=e=>!e||A(e),N=(e,t,n)=>{const r=A(t)?t.split("."):t;let o=0;for(;o<r.length-1;){if(P(e))return{};const t=M(r[o]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++o}return P(e)?{}:{obj:e,k:M(r[o])}},I=(e,t,n)=>{const{obj:r,k:o}=N(e,t,Object);if(void 0!==r||1===t.length)return void(r[o]=n);let i=t[t.length-1],a=t.slice(0,t.length-1),s=N(e,a,Object);for(;void 0===s.obj&&a.length;)i=`${a[a.length-1]}.${i}`,a=a.slice(0,a.length-1),s=N(e,a,Object),O([s,"optionalAccess",e=>e.obj])&&void 0!==s.obj[`${s.k}.${i}`]&&(s.obj=void 0);s.obj[`${s.k}.${i}`]=n},T=(e,t)=>{const{obj:n,k:r}=N(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},B=(e,t,n)=>{for(const r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?A(e[r])||e[r]instanceof String||A(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):B(e[r],t[r],n):e[r]=t[r]);return e},$=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var W={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const D=e=>A(e)?e.replace(/[&<>"'\/]/g,e=>W[e]):e;const z=[" ",",","?","!",";"],F=new class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(void 0!==t)return t;const n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}}(20),U=(e,t,n=".")=>{if(!e)return;if(e[t]){if(!Object.prototype.hasOwnProperty.call(e,t))return;return e[t]}const r=t.split(n);let o=e;for(let e=0;e<r.length;){if(!o||"object"!=typeof o)return;let t,i="";for(let a=e;a<r.length;++a)if(a!==e&&(i+=n),i+=r[a],t=o[i],void 0!==t){if(["string","number","boolean"].indexOf(typeof t)>-1&&a<r.length-1)continue;e+=a-e+1;break}o=t}return o},H=e=>O([e,"optionalAccess",e=>e.replace,"call",e=>e("_","-")]),V={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){O([console,"optionalAccess",t=>t[e],"optionalAccess",e=>e.apply,"optionalCall",e=>e(console,t)])}};class q{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||"i18next:",this.logger=e||V,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,"log","",!0)}warn(...e){return this.forward(e,"warn","",!0)}error(...e){return this.forward(e,"error","")}deprecate(...e){return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,n,r){return r&&!this.debug?null:(A(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new q(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new q(this.logger,e)}}var K=new q;class J{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(e=>{this.observers[e]||(this.observers[e]=new Map);const n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)}),this}off(e,t){this.observers[e]&&(t?this.observers[e].delete(t):delete this.observers[e])}emit(e,...t){if(this.observers[e]){Array.from(this.observers[e].entries()).forEach(([e,n])=>{for(let r=0;r<n;r++)e(...t)})}if(this.observers["*"]){Array.from(this.observers["*"].entries()).forEach(([n,r])=>{for(let o=0;o<r;o++)n.apply(n,[e,...t])})}}}class Y extends J{constructor(e,t={ns:["translation"],defaultNS:"translation"}){super(),this.data=e||{},this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n,r={}){const o=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,i=void 0!==r.ignoreJSONStructure?r.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;e.indexOf(".")>-1?a=e.split("."):(a=[e,t],n&&(Array.isArray(n)?a.push(...n):A(n)&&o?a.push(...n.split(o)):a.push(n)));const s=T(this.data,a);return!s&&!t&&!n&&e.indexOf(".")>-1&&(e=a[0],t=a[1],n=a.slice(2).join(".")),!s&&i&&A(n)?U(O([this,"access",e=>e.data,"optionalAccess",t=>t[e],"optionalAccess",e=>e[t]]),n,o):s}addResource(e,t,n,r,o={silent:!1}){const i=void 0!==o.keySeparator?o.keySeparator:this.options.keySeparator;let a=[e,t];n&&(a=a.concat(i?n.split(i):n)),e.indexOf(".")>-1&&(a=e.split("."),r=t,t=a[1]),this.addNamespaces(t),I(this.data,a,r),o.silent||this.emit("added",e,t,n,r)}addResources(e,t,n,r={silent:!1}){for(const r in n)(A(n[r])||Array.isArray(n[r]))&&this.addResource(e,t,r,n[r],{silent:!0});r.silent||this.emit("added",e,t,n)}addResourceBundle(e,t,n,r,o,i={silent:!1,skipCopy:!1}){let a=[e,t];e.indexOf(".")>-1&&(a=e.split("."),r=n,n=t,t=a[1]),this.addNamespaces(t);let s=T(this.data,a)||{};i.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?B(s,n,o):s={...s,...n},I(this.data,a,s),i.silent||this.emit("added",e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return void 0!==this.getResource(e,t)}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}}var G={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,o){return e.forEach(e=>{t=C(O([this,"access",e=>e.processors,"access",t=>t[e],"optionalAccess",e=>e.process,"call",e=>e(t,n,r,o)]),()=>t)}),t}};const Q=Symbol("i18next/PATH_KEY");function Z(e,t){const{[Q]:n}=e(function(){const e=[],t=Object.create(null);let n;return t.get=(r,o)=>(O([n,"optionalAccess",e=>e.revoke,"optionalCall",e=>e()]),o===Q?e:(e.push(o),n=Proxy.revocable(r,t),n.proxy)),Proxy.revocable(Object.create(null),t).proxy}());return n.join(C(O([t,"optionalAccess",e=>e.keySeparator]),()=>"."))}const X={},ee=e=>!A(e)&&"boolean"!=typeof e&&"number"!=typeof e;class te extends J{constructor(e,t={}){var n,r;super(),n=e,r=this,["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"].forEach(e=>{n[e]&&(r[e]=n[e])}),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=K.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){const n={...t};if(null==e)return!1;const r=this.resolve(e,n);if(void 0===O([r,"optionalAccess",e=>e.res]))return!1;const o=ee(r.res);return!1!==n.returnObjects||!o}extractFromKey(e,t){let n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");const r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator;let o=t.ns||this.options.defaultNS||[];const i=n&&e.indexOf(n)>-1,a=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||((e,t,n)=>{t=t||"",n=n||"";const r=z.filter(e=>t.indexOf(e)<0&&n.indexOf(e)<0);if(0===r.length)return!0;const o=F.getRegExp(`(${r.map(e=>"?"===e?"\\?":e).join("|")})`);let i=!o.test(e);if(!i){const t=e.indexOf(n);t>0&&!o.test(e.substring(0,t))&&(i=!0)}return i})(e,n,r));if(i&&!a){const t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:A(o)?[o]:o};const i=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(i[0])>-1)&&(o=i.shift()),e=i.join(r)}return{key:e,namespaces:A(o)?[o]:o}}translate(e,t,n){let r="object"==typeof t?{...t}:t;if("object"!=typeof r&&this.options.overloadTranslationOptionHandler&&(r=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof r&&(r={...r}),r||(r={}),null==e)return"";"function"==typeof e&&(e=Z(e,{...this.options,...r})),Array.isArray(e)||(e=[String(e)]);const o=void 0!==r.returnDetails?r.returnDetails:this.options.returnDetails,i=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,{key:a,namespaces:s}=this.extractFromKey(e[e.length-1],r),l=s[s.length-1];let u=void 0!==r.nsSeparator?r.nsSeparator:this.options.nsSeparator;void 0===u&&(u=":");const c=r.lng||this.language,d=r.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if("cimode"===O([c,"optionalAccess",e=>e.toLowerCase,"call",e=>e()]))return d?o?{res:`${l}${u}${a}`,usedKey:a,exactUsedKey:a,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(r)}:`${l}${u}${a}`:o?{res:a,usedKey:a,exactUsedKey:a,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(r)}:a;const p=this.resolve(e,r);let f=O([p,"optionalAccess",e=>e.res]);const h=O([p,"optionalAccess",e=>e.usedKey])||a,g=O([p,"optionalAccess",e=>e.exactUsedKey])||a,v=void 0!==r.joinArrays?r.joinArrays:this.options.joinArrays,m=!this.i18nFormat||this.i18nFormat.handleAsObject,y=void 0!==r.count&&!A(r.count),b=te.hasDefaultValue(r),_=y?this.pluralResolver.getSuffix(c,r.count,r):"",x=r.ordinal&&y?this.pluralResolver.getSuffix(c,r.count,{ordinal:!1}):"",w=y&&!r.ordinal&&0===r.count,S=w&&r[`defaultValue${this.options.pluralSeparator}zero`]||r[`defaultValue${_}`]||r[`defaultValue${x}`]||r.defaultValue;let E=f;m&&!f&&b&&(E=S);const k=ee(E),C=Object.prototype.toString.apply(E);if(!(m&&E&&k&&["[object Number]","[object Function]","[object RegExp]"].indexOf(C)<0)||A(v)&&Array.isArray(E))if(m&&A(v)&&Array.isArray(f))f=f.join(v),f&&(f=this.extendTranslation(f,e,r,n));else{let t=!1,o=!1;!this.isValidLookup(f)&&b&&(t=!0,f=S),this.isValidLookup(f)||(o=!0,f=a);const s=(r.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&o?void 0:f,d=b&&S!==f&&this.options.updateMissing;if(o||t||d){if(this.logger.log(d?"updateKey":"missingKey",c,l,a,d?S:f),i){const e=this.resolve(a,{...r,keySeparator:!1});e&&e.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let e=[];const t=this.languageUtils.getFallbackCodes(this.options.fallbackLng,r.lng||this.language);if("fallback"===this.options.saveMissingTo&&t&&t[0])for(let n=0;n<t.length;n++)e.push(t[n]);else"all"===this.options.saveMissingTo?e=this.languageUtils.toResolveHierarchy(r.lng||this.language):e.push(r.lng||this.language);const n=(e,t,n)=>{const o=b&&n!==f?n:s;this.options.missingKeyHandler?this.options.missingKeyHandler(e,l,t,o,d,r):O([this,"access",e=>e.backendConnector,"optionalAccess",e=>e.saveMissing])&&this.backendConnector.saveMissing(e,l,t,o,d,r),this.emit("missingKey",e,l,t,f)};this.options.saveMissing&&(this.options.saveMissingPlurals&&y?e.forEach(e=>{const t=this.pluralResolver.getSuffixes(e,r);w&&r[`defaultValue${this.options.pluralSeparator}zero`]&&t.indexOf(`${this.options.pluralSeparator}zero`)<0&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{n([e],a+t,r[`defaultValue${t}`]||S)})}):n(e,a,S))}f=this.extendTranslation(f,e,r,p,n),o&&f===a&&this.options.appendNamespaceToMissingKey&&(f=`${l}${u}${a}`),(o||t)&&this.options.parseMissingKeyHandler&&(f=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}${u}${a}`:a,t?f:void 0,r))}else{if(!r.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(h,E,{...r,ns:s}):`key '${a} (${this.language})' returned an object instead of string.`;return o?(p.res=e,p.usedParams=this.getUsedParamsDetails(r),p):e}if(i){const e=Array.isArray(E),t=e?[]:{},n=e?g:h;for(const e in E)if(Object.prototype.hasOwnProperty.call(E,e)){const o=`${n}${i}${e}`;t[e]=b&&!f?this.translate(o,{...r,defaultValue:ee(S)?S[e]:void 0,joinArrays:!1,ns:s}):this.translate(o,{...r,joinArrays:!1,ns:s}),t[e]===o&&(t[e]=E[e])}f=t}}return o?(p.res=f,p.usedParams=this.getUsedParamsDetails(r),p):f}extendTranslation(e,t,n,r,o){if(O([this,"access",e=>e.i18nFormat,"optionalAccess",e=>e.parse]))e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const i=A(e)&&(void 0!==O([n,"optionalAccess",e=>e.interpolation,"optionalAccess",e=>e.skipOnVariables])?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let a;if(i){const t=e.match(this.interpolator.nestingRegexp);a=t&&t.length}let s=n.replace&&!A(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),e=this.interpolator.interpolate(e,s,n.lng||this.language||r.usedLng,n),i){const t=e.match(this.interpolator.nestingRegexp);a<(t&&t.length)&&(n.nest=!1)}!n.lng&&r&&r.res&&(n.lng=this.language||r.usedLng),!1!==n.nest&&(e=this.interpolator.nest(e,(...e)=>O([o,"optionalAccess",e=>e[0]])!==e[0]||n.context?this.translate(...e,t):(this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`),null),n)),n.interpolation&&this.interpolator.reset()}const i=n.postProcess||this.options.postProcess,a=A(i)?[i]:i;return null!=e&&O([a,"optionalAccess",e=>e.length])&&!1!==n.applyPostProcessor&&(e=G.handle(a,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e,t={}){let n,r,o,i,a;return A(e)&&(e=[e]),e.forEach(e=>{if(this.isValidLookup(n))return;const s=this.extractFromKey(e,t),l=s.key;r=l;let u=s.namespaces;this.options.fallbackNS&&(u=u.concat(this.options.fallbackNS));const c=void 0!==t.count&&!A(t.count),d=c&&!t.ordinal&&0===t.count,p=void 0!==t.context&&(A(t.context)||"number"==typeof t.context)&&""!==t.context,f=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);u.forEach(e=>{this.isValidLookup(n)||(a=e,X[`${f[0]}-${e}`]||!O([this,"access",e=>e.utils,"optionalAccess",e=>e.hasLoadedNamespace])||O([this,"access",e=>e.utils,"optionalAccess",e=>e.hasLoadedNamespace,"call",e=>e(a)])||(X[`${f[0]}-${e}`]=!0,this.logger.warn(`key "${r}" for languages "${f.join(", ")}" won't get resolved as namespace "${a}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),f.forEach(r=>{if(this.isValidLookup(n))return;i=r;const a=[l];if(O([this,"access",e=>e.i18nFormat,"optionalAccess",e=>e.addLookupKeys]))this.i18nFormat.addLookupKeys(a,l,r,e,t);else{let e;c&&(e=this.pluralResolver.getSuffix(r,t.count,t));const n=`${this.options.pluralSeparator}zero`,o=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(c&&(t.ordinal&&0===e.indexOf(o)&&a.push(l+e.replace(o,this.options.pluralSeparator)),a.push(l+e),d&&a.push(l+n)),p){const r=`${l}${this.options.contextSeparator||"_"}${t.context}`;a.push(r),c&&(t.ordinal&&0===e.indexOf(o)&&a.push(r+e.replace(o,this.options.pluralSeparator)),a.push(r+e),d&&a.push(r+n))}}let s;for(;s=a.pop();)this.isValidLookup(n)||(o=s,n=this.getResource(r,e,s,t))}))})}),{res:n,usedKey:r,exactUsedKey:o,usedLng:i,usedNS:a}}isValidLookup(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}getResource(e,t,n,r={}){return O([this,"access",e=>e.i18nFormat,"optionalAccess",e=>e.getResource])?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}getUsedParamsDetails(e={}){const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=e.replace&&!A(e.replace);let r=n?e.replace:e;if(n&&void 0!==e.count&&(r.count=e.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!n){r={...r};for(const e of t)delete r[e]}return r}static hasDefaultValue(e){const t="defaultValue";for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,12)&&void 0!==e[n])return!0;return!1}}class ne{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=K.create("languageUtils")}getScriptPartFromCode(e){if(!(e=H(e))||e.indexOf("-")<0)return null;const t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}getLanguagePartFromCode(e){if(!(e=H(e))||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(A(e)&&e.indexOf("-")>-1){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch(e){}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(e=>{if(t)return;const n=this.formatLanguageCode(e);this.options.supportedLngs&&!this.isSupportedCode(n)||(t=n)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;const n=this.getScriptPartFromCode(e);if(this.isSupportedCode(n))return t=n;const r=this.getLanguagePartFromCode(e);if(this.isSupportedCode(r))return t=r;t=this.options.supportedLngs.find(e=>e===r?e:e.indexOf("-")<0&&r.indexOf("-")<0?void 0:e.indexOf("-")>0&&r.indexOf("-")<0&&e.substring(0,e.indexOf("-"))===r||0===e.indexOf(r)&&r.length>1?e:void 0)}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),A(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}toResolveHierarchy(e,t){const n=this.getFallbackCodes((!1===t?[]:t)||this.options.fallbackLng||[],e),r=[],o=e=>{e&&(this.isSupportedCode(e)?r.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return A(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?("languageOnly"!==this.options.load&&o(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&o(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&o(this.getLanguagePartFromCode(e))):A(e)&&o(this.formatLanguageCode(e)),n.forEach(e=>{r.indexOf(e)<0&&o(this.formatLanguageCode(e))}),r}}const re={zero:0,one:1,two:2,few:3,many:4,other:5},oe={select:e=>1===e?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class ie{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=K.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){const n=H("dev"===e?"en":e),r=t.ordinal?"ordinal":"cardinal",o=JSON.stringify({cleanedCode:n,type:r});if(o in this.pluralRulesCache)return this.pluralRulesCache[o];let i;try{i=new Intl.PluralRules(n,{type:r})}catch(n){if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),oe;if(!e.match(/-|_/))return oe;const r=this.languageUtils.getLanguagePartFromCode(e);i=this.getRule(r,t)}return this.pluralRulesCache[o]=i,i}needsPlural(e,t={}){let n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),O([n,"optionalAccess",e=>e.resolvedOptions,"call",e=>e(),"access",e=>e.pluralCategories,"access",e=>e.length])>1}getPluralFormsOfKey(e,t,n={}){return this.getSuffixes(e,n).map(e=>`${t}${e}`)}getSuffixes(e,t={}){let n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),n?n.resolvedOptions().pluralCategories.sort((e,t)=>re[e]-re[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${e}`):[]}getSuffix(e,t,n={}){const r=this.getRule(e,n);return r?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${r.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,n))}}const ae=(e,t,n,r=".",o=!0)=>{let i=((e,t,n)=>{const r=T(e,n);return void 0!==r?r:T(t,n)})(e,t,n);return!i&&o&&A(n)&&(i=U(e,n,r),void 0===i&&(i=U(t,n,r))),i},se=e=>e.replace(/\$/g,"$$$$");class le{constructor(e={}){this.logger=K.create("interpolator"),this.options=e,this.format=O([e,"optionalAccess",e=>e.interpolation,"optionalAccess",e=>e.format])||(e=>e),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:n,useRawValueToEscape:r,prefix:o,prefixEscaped:i,suffix:a,suffixEscaped:s,formatSeparator:l,unescapeSuffix:u,unescapePrefix:c,nestingPrefix:d,nestingPrefixEscaped:p,nestingSuffix:f,nestingSuffixEscaped:h,nestingOptionsSeparator:g,maxReplaces:v,alwaysFormat:m}=e.interpolation;this.escape=void 0!==t?t:D,this.escapeValue=void 0===n||n,this.useRawValueToEscape=void 0!==r&&r,this.prefix=o?$(o):i||"{{",this.suffix=a?$(a):s||"}}",this.formatSeparator=l||",",this.unescapePrefix=u?"":c||"-",this.unescapeSuffix=this.unescapePrefix?"":u||"",this.nestingPrefix=d?$(d):p||$("$t("),this.nestingSuffix=f?$(f):h||$(")"),this.nestingOptionsSeparator=g||",",this.maxReplaces=v||1e3,this.alwaysFormat=void 0!==m&&m,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(e,t)=>O([e,"optionalAccess",e=>e.source])===t?(e.lastIndex=0,e):new RegExp(t,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,n,r){let o,i,a;const s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},l=e=>{if(e.indexOf(this.formatSeparator)<0){const o=ae(t,s,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(o,void 0,n,{...r,...t,interpolationkey:e}):o}const o=e.split(this.formatSeparator),i=o.shift().trim(),a=o.join(this.formatSeparator).trim();return this.format(ae(t,s,i,this.options.keySeparator,this.options.ignoreJSONStructure),a,n,{...r,...t,interpolationkey:i})};this.resetRegExp();const u=O([r,"optionalAccess",e=>e.missingInterpolationHandler])||this.options.missingInterpolationHandler,c=void 0!==O([r,"optionalAccess",e=>e.interpolation,"optionalAccess",e=>e.skipOnVariables])?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>se(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?se(this.escape(e)):se(e)}].forEach(t=>{for(a=0;o=t.regex.exec(e);){const n=o[1].trim();if(i=l(n),void 0===i)if("function"==typeof u){const t=u(e,o,r);i=A(t)?t:""}else if(r&&Object.prototype.hasOwnProperty.call(r,n))i="";else{if(c){i=o[0];continue}this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),i=""}else A(i)||this.useRawValueToEscape||(i=L(i));const s=t.safeValue(i);if(e=e.replace(o[0],s),c?(t.regex.lastIndex+=i.length,t.regex.lastIndex-=o[0].length):t.regex.lastIndex=0,a++,a>=this.maxReplaces)break}}),e}nest(e,t,n={}){let r,o,i;const a=(e,t)=>{const n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;const r=e.split(new RegExp(`${n}[ ]*{`));let o=`{${r[1]}`;e=r[0],o=this.interpolate(o,i);const a=o.match(/'/g),s=o.match(/"/g);(C(O([a,"optionalAccess",e=>e.length]),()=>0)%2==0&&!s||s.length%2!=0)&&(o=o.replace(/'/g,'"'));try{i=JSON.parse(o),t&&(i={...t,...i})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${o}`}return i.defaultValue&&i.defaultValue.indexOf(this.prefix)>-1&&delete i.defaultValue,e};for(;r=this.nestingRegexp.exec(e);){let s=[];i={...n},i=i.replace&&!A(i.replace)?i.replace:i,i.applyPostProcessor=!1,delete i.defaultValue;const l=/{.*}/.test(r[1])?r[1].lastIndexOf("}")+1:r[1].indexOf(this.formatSeparator);if(-1!==l&&(s=r[1].slice(l).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),r[1]=r[1].slice(0,l)),o=t(a.call(this,r[1].trim(),i),i),o&&r[0]===e&&!A(o))return o;A(o)||(o=L(o)),o||(this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`),o=""),s.length&&(o=s.reduce((e,t)=>this.format(e,t,n.lng,{...n,interpolationkey:r[1].trim()}),o.trim())),e=e.replace(r[0],o),this.regexp.lastIndex=0}return e}}const ue=e=>{const t={};return(n,r,o)=>{let i=o;o&&o.interpolationkey&&o.formatParams&&o.formatParams[o.interpolationkey]&&o[o.interpolationkey]&&(i={...i,[o.interpolationkey]:void 0});const a=r+JSON.stringify(i);let s=t[a];return s||(s=e(H(r),o),t[a]=s),s(n)}},ce=e=>(t,n,r)=>e(H(n),r)(t);class de{constructor(e={}){this.logger=K.create("formatter"),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||",";const n=t.cacheInBuiltFormats?ue:ce;this.formats={number:n((e,t)=>{const n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)}),currency:n((e,t)=>{const n=new Intl.NumberFormat(e,{...t,style:"currency"});return e=>n.format(e)}),datetime:n((e,t)=>{const n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)}),relativetime:n((e,t)=>{const n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||"day")}),list:n((e,t)=>{const n=new Intl.ListFormat(e,{...t});return e=>n.format(e)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=ue(t)}format(e,t,n,r={}){const o=t.split(this.formatSeparator);if(o.length>1&&o[0].indexOf("(")>1&&o[0].indexOf(")")<0&&o.find(e=>e.indexOf(")")>-1)){const e=o.findIndex(e=>e.indexOf(")")>-1);o[0]=[o[0],...o.splice(1,e)].join(this.formatSeparator)}const i=o.reduce((e,t)=>{const{formatName:o,formatOptions:i}=(e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const o=r[1].substring(0,r[1].length-1);"currency"===t&&o.indexOf(":")<0?n.currency||(n.currency=o.trim()):"relativetime"===t&&o.indexOf(":")<0?n.range||(n.range=o.trim()):o.split(";").forEach(e=>{if(e){const[t,...r]=e.split(":"),o=r.join(":").trim().replace(/^'+|'+$/g,""),i=t.trim();n[i]||(n[i]=o),"false"===o&&(n[i]=!1),"true"===o&&(n[i]=!0),isNaN(o)||(n[i]=parseInt(o,10))}})}return{formatName:t,formatOptions:n}})(t);if(this.formats[o]){let t=e;try{const a=O([r,"optionalAccess",e=>e.formatParams,"optionalAccess",e=>e[r.interpolationkey]])||{},s=a.locale||a.lng||r.locale||r.lng||n;t=this.formats[o](e,s,{...i,...r,...a})}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${o}`),e},e);return i}}class pe extends J{constructor(e,t,n,r={}){super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=K.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],O([this,"access",e=>e.backend,"optionalAccess",e=>e.init,"optionalCall",e=>e(n,r.backend,r)])}queueLoad(e,t,n,r){const o={},i={},a={},s={};return e.forEach(e=>{let r=!0;t.forEach(t=>{const a=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[a]=2:this.state[a]<0||(1===this.state[a]?void 0===i[a]&&(i[a]=!0):(this.state[a]=1,r=!1,void 0===i[a]&&(i[a]=!0),void 0===o[a]&&(o[a]=!0),void 0===s[t]&&(s[t]=!0)))}),r||(a[e]=!0)}),(Object.keys(o).length||Object.keys(i).length)&&this.queue.push({pending:i,pendingCount:Object.keys(i).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(o),pending:Object.keys(i),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(s)}}loaded(e,t,n){const r=e.split("|"),o=r[0],i=r[1];t&&this.emit("failedLoading",o,i,t),!t&&n&&this.store.addResourceBundle(o,i,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);const a={};this.queue.forEach(n=>{((e,t,n)=>{const{obj:r,k:o}=N(e,t,Object);r[o]=r[o]||[],r[o].push(n)})(n.loaded,[o],i),((e,t)=>{void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)})(n,e),t&&n.errors.push(t),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach(e=>{a[e]||(a[e]={});const t=n.loaded[e];t.length&&t.forEach(t=>{void 0===a[e][t]&&(a[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(e=>!e.done)}read(e,t,n,r=0,o=this.retryTimeout,i){if(!e.length)return i(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:o,callback:i});this.readingCalls++;const a=(a,s)=>{if(this.readingCalls--,this.waitingReads.length>0){const e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}a&&s&&r<this.maxRetries?setTimeout(()=>{this.read.call(this,e,t,n,r+1,2*o,i)},o):i(a,s)},s=this.backend[n].bind(this.backend);if(2!==s.length)return s(e,t,a);try{const n=s(e,t);n&&"function"==typeof n.then?n.then(e=>a(null,e)).catch(a):a(null,n)}catch(e){a(e)}}prepareLoading(e,t,n={},r){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),r&&r();A(e)&&(e=this.languageUtils.toResolveHierarchy(e)),A(t)&&(t=[t]);const o=this.queueLoad(e,t,n,r);if(!o.toLoad.length)return o.pending.length||r(),null;o.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e,t=""){const n=e.split("|"),r=n[0],o=n[1];this.read(r,o,"read",void 0,void 0,(n,i)=>{n&&this.logger.warn(`${t}loading namespace ${o} for language ${r} failed`,n),!n&&i&&this.logger.log(`${t}loaded namespace ${o} for language ${r}`,i),this.loaded(e,n,i)})}saveMissing(e,t,n,r,o,i={},a=()=>{}){if(!O([this,"access",e=>e.services,"optionalAccess",e=>e.utils,"optionalAccess",e=>e.hasLoadedNamespace])||O([this,"access",e=>e.services,"optionalAccess",e=>e.utils,"optionalAccess",e=>e.hasLoadedNamespace,"call",e=>e(t)])){if(null!=n&&""!==n){if(O([this,"access",e=>e.backend,"optionalAccess",e=>e.create])){const s={...i,isUpdate:o},l=this.backend.create.bind(this.backend);if(l.length<6)try{let o;o=5===l.length?l(e,t,n,r,s):l(e,t,n,r),o&&"function"==typeof o.then?o.then(e=>a(null,e)).catch(a):a(null,o)}catch(e){a(e)}else l(e,t,n,r,a,s)}e&&e[0]&&this.store.addResource(e[0],t,n,r)}}else this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")}}const fe=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if("object"==typeof e[1]&&(t=e[1]),A(e[1])&&(t.defaultValue=e[1]),A(e[2])&&(t.tDescription=e[2]),"object"==typeof e[2]||"object"==typeof e[3]){const n=e[3]||e[2];Object.keys(n).forEach(e=>{t[e]=n[e]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),he=e=>(A(e.ns)&&(e.ns=[e.ns]),A(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),A(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),O([e,"access",e=>e.supportedLngs,"optionalAccess",e=>e.indexOf,"optionalCall",e=>e("cimode")])<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),"boolean"==typeof e.initImmediate&&(e.initAsync=e.initImmediate),e),ge=()=>{};class ve extends J{constructor(e={},t){var n;if(super(),this.options=he(e),this.services={},this.logger=K,this.modules={external:[]},n=this,Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach(e=>{"function"==typeof n[e]&&(n[e]=n[e].bind(n))}),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,"function"==typeof e&&(t=e,e={}),null==e.defaultNS&&e.ns&&(A(e.ns)?e.defaultNS=e.ns:e.ns.indexOf("translation")<0&&(e.defaultNS=e.ns[0]));const n=fe();var r;this.options={...n,...this.options,...he(e)},this.options.interpolation={...n.interpolation,...this.options.interpolation},void 0!==e.keySeparator&&(this.options.userDefinedKeySeparator=e.keySeparator),void 0!==e.nsSeparator&&(this.options.userDefinedNsSeparator=e.nsSeparator),"function"!=typeof this.options.overloadTranslationOptionHandler&&(this.options.overloadTranslationOptionHandler=n.overloadTranslationOptionHandler),!1===this.options.showSupportNotice||(O([r=this,"optionalAccess",e=>e.modules,"optionalAccess",e=>e.backend,"optionalAccess",e=>e.name,"optionalAccess",e=>e.indexOf,"call",e=>e("Locize")])>0||O([r,"optionalAccess",e=>e.modules,"optionalAccess",e=>e.backend,"optionalAccess",e=>e.constructor,"optionalAccess",e=>e.name,"optionalAccess",e=>e.indexOf,"call",e=>e("Locize")])>0||O([r,"optionalAccess",e=>e.options,"optionalAccess",e=>e.backend,"optionalAccess",e=>e.backends])&&r.options.backend.backends.some(e=>O([e,"optionalAccess",e=>e.name,"access",e=>e.indexOf,"call",e=>e("Locize")])>0||O([e,"optionalAccess",e=>e.constructor,"optionalAccess",e=>e.name,"access",e=>e.indexOf,"call",e=>e("Locize")])>0))||"undefined"!=typeof console&&void 0!==console.info&&console.info("🌐 i18next is maintained with support from locize.com — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙");const o=e=>e?"function"==typeof e?new e:e:null;if(!this.options.isClone){let e;this.modules.logger?K.init(o(this.modules.logger),this.options):K.init(null,this.options),e=this.modules.formatter?this.modules.formatter:de;const t=new ne(this.options);this.store=new Y(this.options.resources,this.options);const r=this.services;r.logger=K,r.resourceStore=this.store,r.languageUtils=t,r.pluralResolver=new ie(t,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix});this.options.interpolation.format&&this.options.interpolation.format!==n.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),!e||this.options.interpolation.format&&this.options.interpolation.format!==n.interpolation.format||(r.formatter=o(e),r.formatter.init&&r.formatter.init(r,this.options),this.options.interpolation.format=r.formatter.format.bind(r.formatter)),r.interpolator=new le(this.options),r.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},r.backendConnector=new pe(o(this.modules.backend),r.resourceStore,r,this.options),r.backendConnector.on("*",(e,...t)=>{this.emit(e,...t)}),this.modules.languageDetector&&(r.languageDetector=o(this.modules.languageDetector),r.languageDetector.init&&r.languageDetector.init(r,this.options.detection,this.options)),this.modules.i18nFormat&&(r.i18nFormat=o(this.modules.i18nFormat),r.i18nFormat.init&&r.i18nFormat.init(this)),this.translator=new te(this.services,this.options),this.translator.on("*",(e,...t)=>{this.emit(e,...t)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,t||(t=ge),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&"dev"!==e[0]&&(this.options.lng=e[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(e=>{this[e]=(...t)=>this.store[e](...t)});["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(e=>{this[e]=(...t)=>(this.store[e](...t),this)});const i=j(),a=()=>{const e=(e,n)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),i.resolve(n),t(e,n)};if(this.languages&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?a():setTimeout(a,0),i}loadResources(e,t=ge){let n=t;const r=A(e)?e:this.language;if("function"==typeof e&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if("cimode"===O([r,"optionalAccess",e=>e.toLowerCase,"call",e=>e()])&&(!this.options.preload||0===this.options.preload.length))return n();const e=[],t=t=>{if(!t)return;if("cimode"===t)return;this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{"cimode"!==t&&e.indexOf(t)<0&&e.push(t)})};if(r)t(r);else{this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e))}O([this,"access",e=>e.options,"access",e=>e.preload,"optionalAccess",e=>e.forEach,"optionalCall",e=>e(e=>t(e))]),this.services.backendConnector.load(e,this.options.ns,e=>{e||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),n(e)})}else n(null)}reloadResources(e,t,n){const r=j();return"function"==typeof e&&(n=e,e=void 0),"function"==typeof t&&(n=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),n||(n=ge),this.services.backendConnector.reload(e,t,e=>{r.resolve(),n(e)}),r}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&G.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}setResolvedLanguage(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1)){for(let e=0;e<this.languages.length;e++){const t=this.languages[e];if(!(["cimode","dev"].indexOf(t)>-1)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}!this.resolvedLanguage&&this.languages.indexOf(e)<0&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;const n=j();this.emit("languageChanging",e);const r=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},o=(o,i)=>{i?this.isLanguageChangingTo===e&&(r(i),this.translator.changeLanguage(i),this.isLanguageChangingTo=void 0,this.emit("languageChanged",i),this.logger.log("languageChanged",i)):this.isLanguageChangingTo=void 0,n.resolve((...e)=>this.t(...e)),t&&t(o,(...e)=>this.t(...e))},i=t=>{e||t||!this.services.languageDetector||(t=[]);const n=A(t)?t:t&&t[0],i=this.store.hasLanguageSomeTranslations(n)?n:this.services.languageUtils.getBestMatchFromCodes(A(t)?[t]:t);i&&(this.language||r(i),this.translator.language||this.translator.changeLanguage(i),O([this,"access",e=>e.services,"access",e=>e.languageDetector,"optionalAccess",e=>e.cacheUserLanguage,"optionalCall",e=>e(i)])),this.loadResources(i,e=>{o(e,i)})};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(i):this.services.languageDetector.detect(i):i(e):i(this.services.languageDetector.detect()),n}getFixedT(e,t,n){const r=(e,t,...o)=>{let i;i="object"!=typeof t?this.options.overloadTranslationOptionHandler([e,t].concat(o)):{...t},i.lng=i.lng||r.lng,i.lngs=i.lngs||r.lngs,i.ns=i.ns||r.ns,""!==i.keyPrefix&&(i.keyPrefix=i.keyPrefix||n||r.keyPrefix);const a=this.options.keySeparator||".";let s;return i.keyPrefix&&Array.isArray(e)?s=e.map(e=>("function"==typeof e&&(e=Z(e,{...this.options,...t})),`${i.keyPrefix}${a}${e}`)):("function"==typeof e&&(e=Z(e,{...this.options,...t})),s=i.keyPrefix?`${i.keyPrefix}${a}${e}`:e),this.t(s,i)};return A(e)?r.lng=e:r.lngs=e,r.ns=t,r.keyPrefix=n,r}t(...e){return O([this,"access",e=>e.translator,"optionalAccess",e=>e.translate,"call",t=>t(...e)])}exists(...e){return O([this,"access",e=>e.translator,"optionalAccess",e=>e.exists,"call",t=>t(...e)])}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=t.lng||this.resolvedLanguage||this.languages[0],r=!!this.options&&this.options.fallbackLng,o=this.languages[this.languages.length-1];if("cimode"===n.toLowerCase())return!0;const i=(e,t)=>{const n=this.services.backendConnector.state[`${e}|${t}`];return-1===n||0===n||2===n};if(t.precheck){const e=t.precheck(this,i);if(void 0!==e)return e}return!!this.hasResourceBundle(n,e)||(!(this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages))||!(!i(n,e)||r&&!i(o,e)))}loadNamespaces(e,t){const n=j();return this.options.ns?(A(e)&&(e=[e]),e.forEach(e=>{this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){const n=j();A(e)&&(e=[e]);const r=this.options.preload||[],o=e.filter(e=>r.indexOf(e)<0&&this.services.languageUtils.isSupportedCode(e));return o.length?(this.options.preload=r.concat(o),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(O([this,"access",e=>e.languages,"optionalAccess",e=>e.length])>0?this.languages[0]:this.language)),!e)return"rtl";try{const t=new Intl.Locale(e);if(t&&t.getTextInfo){const e=t.getTextInfo();if(e&&e.direction)return e.direction}}catch(e){}const t=O([this,"access",e=>e.services,"optionalAccess",e=>e.languageUtils])||new ne(fe());return e.toLowerCase().indexOf("-latn")>1?"ltr":["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(t.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},t){const n=new ve(e,t);return n.createInstance=ve.createInstance,n}cloneInstance(e={},t=ge){const n=e.forkResourceStore;n&&delete e.forkResourceStore;const r={...this.options,...e,isClone:!0},o=new ve(r);void 0===e.debug&&void 0===e.prefix||(o.logger=o.logger.clone(e));if(["store","services","language"].forEach(e=>{o[e]=this[e]}),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},n){const e=Object.keys(this.store.data).reduce((e,t)=>(e[t]={...this.store.data[t]},e[t]=Object.keys(e[t]).reduce((n,r)=>(n[r]={...e[t][r]},n),e[t]),e),{});o.store=new Y(e,r),o.services.resourceStore=o.store}if(e.interpolation){const t={...fe().interpolation,...this.options.interpolation,...e.interpolation},n={...r,interpolation:t};o.services.interpolator=new le(n)}return o.translator=new te(o.services,r),o.translator.on("*",(e,...t)=>{o.emit(e,...t)}),o.init(r,t),o.translator.options=r,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const me=ve.createInstance();me.createInstance,me.dir,me.init,me.loadResources,me.reloadResources,me.use,me.changeLanguage,me.getFixedT,me.t,me.exists,me.setDefaultNamespace,me.hasLoadedNamespace,me.loadNamespaces,me.loadLanguages;me.init({fallbackLng:"en",lng:"en",debug:!0,resources:{en:{translation:{categorize:{limitMaxChoicesPerCategory:"You've reached the limit of {{maxChoicesPerCategory}} responses per area. To add another response, one must first be removed.",maxChoicesPerCategoryRestriction:"To change this value to {{maxChoicesPerCategory}}, each category must have {{maxChoicesPerCategory}} or fewer answer choice[s]."},ebsr:{part:"Part {{index}}"},numberLine:{addElementLimit_one:"You can only add {{count}} element",addElementLimit_other:"You can only add {{count}} elements",clearAll:"Clear all"},imageClozeAssociation:{reachedLimit_one:"You’ve reached the limit of {{count}} response per area. To add another response, one must first be removed.",reachedLimit_other:"Full"},drawingResponse:{fillColor:"Fill color",outlineColor:"Outline color",noFill:"No fill",lightblue:"Light blue",lightyellow:"Light yellow",red:"Red",orange:"Orange",yellow:"Yellow",violet:"Violet",blue:"Blue",green:"Green",white:"White",black:"Black",onDoubleClick:"Double click to edit this text. Press Enter to submit."},charting:{addCategory:"Add category",actions:"Actions",add:"Add",delete:"Delete",newLabel:"New label",reachedLimit_other:"There can't be more than {{count}} categories.",keyLegend:{incorrectAnswer:"Student incorrect answer",correctAnswer:"Student correct answer",correctKeyAnswer:"Answer key correct"}},graphing:{point:"Point",circle:"Circle",line:"Line",parabola:"Parabola",absolute:"Absolute Value",exponential:"Exponential",polygon:"Polygon",ray:"Ray",segment:"Segment",sine:"Sine",vector:"Vector",label:"Label",redo:"Redo",reset:"Reset"},mathInline:{primaryCorrectWithAlternates:"Note: The answer shown above is the primary correct answer specified by the author for this item, but other answers may also be recognized as correct."},multipleChoice:{minSelections:"Select at least {{minSelections}}.",maxSelections_one:"Only {{maxSelections}} answer is allowed.",maxSelections_other:"Only {{maxSelections}} answers are allowed.",minmaxSelections_equal:"Select {{minSelections}}.",minmaxSelections_range:"Select between {{minSelections}} and {{maxSelections}}."},selectText:{correctAnswerSelected:"Correct",correctAnswerNotSelected:"Correct Answer Not Selected",incorrectSelection:"Incorrect Selection",key:"Key"}},common:{undo:"Undo",clearAll:"Clear all",correct:"Correct",incorrect:"Incorrect",showCorrectAnswer:"Show correct answer",hideCorrectAnswer:"Hide correct answer",commonCorrectAnswerWithAlternates:"Note: The answer shown above is the most common correct answer for this item. One or more additional correct answers are also defined, and will also be recognized as correct.",warning:"Warning",showNote:"Show Note",hideNote:"Hide Note",cancel:"Cancel"}},es:{translation:{categorize:{limitMaxChoicesPerCategory:"Has alcanzado el límite de {{maxChoicesPerCategory}} respuestas por área. Para agregar otra respuesta, primero se debe eliminar una respuesta.",maxChoicesPerCategoryRestriction:"Para cambiar este valor a {{maxChoicesPerCategory}}, cada categoría debe tener {{maxChoicesPerCategory}} o menos opciones de respuesta"},ebsr:{part:"Parte {{index}}"},numberLine:{addElementLimit_one:"Solo puedes agregar {{count}} elemento",addElementLimit_other:"Solo puedes agregar {{count}} elementos",clearAll:"Borrar todo"},imageClozeAssociation:{reachedLimit_one:"Has alcanzado el límite de {{count}} respuesta por área. Para agregar otra respuesta, primero se debe eliminar una respuesta.",reachedLimit_other:"Lleno"},drawingResponse:{fillColor:"Color de relleno",outlineColor:"Color del contorno",noFill:"Sin relleno",lightblue:"Azul claro",lightyellow:"Amarillo claro",red:"Rojo",orange:"Naranja",yellow:"Amarillo",violet:"Violeta",blue:"Azul",green:"Verde",white:"Blanco",black:"Negro",onDoubleClick:"Haz doble clic para revisar este texto. Presiona el botón de ingreso para enviar"},charting:{addCategory:"Añadir categoría",actions:"Acciones",add:"Añadir",delete:"Eliminar",newLabel:"Nueva etiqueta",reachedLimit_other:"No puede haber más de {{count}} categorías.",keyLegend:{incorrectAnswer:"Respuesta incorrecta del estudiante",correctAnswer:"Respuesta correcta del estudiante",correctKeyAnswer:"Clave de respuesta correcta"}},graphing:{point:"Punto",circle:"Circulo",line:"Línea",parabola:"Parábola",absolute:"Valor absoluto",exponential:"Exponencial",polygon:"Polígono",ray:"Semirrecta",segment:"Segmento ",sine:"Seno",vector:"Vector",label:"Etiqueta",redo:"Rehacer",reset:"Reiniciar"},mathInline:{primaryCorrectWithAlternates:"Nota: La respuesta que se muestra arriba es la respuesta correcta principal especificada por el autor para esta pregunta, pero también se pueden reconocer otras respuestas como correctas."},multipleChoice:{minSelections:"Seleccione al menos {{minSelections}}.",maxSelections_one:"Sólo se permite {{maxSelections}} respuesta.",maxSelections_other:"Sólo se permiten {{maxSelections}} respuestas.",minmaxSelections_equal:"Seleccione {{minSelections}}.",minmaxSelections_range:"Seleccione entre {{minSelections}} y {{maxSelections}}."},selectText:{correctAnswerSelected:"Respuesta Correcta",correctAnswerNotSelected:"Respuesta Correcta No Seleccionada",incorrectSelection:"Selección Incorrecta",key:"Clave"}},common:{undo:"Deshacer",clearAll:"Borrar todo",correct:"Correct",incorrect:"Incorrect",showCorrectAnswer:"Mostrar respuesta correcta",hideCorrectAnswer:"Ocultar respuesta correcta",commonCorrectAnswerWithAlternates:"Nota: La respuesta que se muestra arriba es la respuesta correcta más común para esta pregunta. También se definen una o más respuestas correctas adicionales, y también se reconocerán como correctas.",warning:"Advertencia",showNote:"Mostrar Nota",hideNote:"Ocultar Nota",cancel:"Cancelar"}}}});var ye={translator:{...me,t:(e,t)=>{const{lng:n}=t;switch(n){case"en_US":case"en-US":t.lng="en";break;case"es_ES":case"es-ES":case"es_MX":case"es-MX":t.lng="es"}return me.t(e,{lng:n,...t})}},languageOptions:[{value:"en_US",label:"English (US)"},{value:"es_ES",label:"Spanish"}]},be=p(Object.freeze({__proto__:null,default:ye})),_e={},xe={},we={};function Se(){return Se=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Se.apply(null,arguments)}function Ee(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}function ke(e,t){return ke=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ke(e,t)}function Ce(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,ke(e,t)}function Oe(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}var Ae={disabled:!1};var je=e.createContext(null),Le=function(e){return e.scrollTop};const Re=e,Me=t;var Pe="unmounted",Ne="exited",Ie="entering",Te="entered",Be="exiting",$e=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var o,i=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?i?(o=Ne,r.appearStatus=Ie):o=Te:o=t.unmountOnExit||t.mountOnEnter?Pe:Ne,r.state={status:o},r.nextCallback=null,r}Ce(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===Pe?{status:Ne}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==Ie&&n!==Te&&(t=Ie):n!==Ie&&n!==Te||(t=Be)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!=typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t)if(this.cancelNextCallback(),t===Ie){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:Me.findDOMNode(this);n&&Le(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Ne&&this.setState({status:Pe})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,o=this.props.nodeRef?[r]:[Me.findDOMNode(this),r],i=o[0],a=o[1],s=this.getTimeouts(),l=r?s.appear:s.enter;!e&&!n||Ae.disabled?this.safeSetState({status:Te},function(){t.props.onEntered(i)}):(this.props.onEnter(i,a),this.safeSetState({status:Ie},function(){t.props.onEntering(i,a),t.onTransitionEnd(l,function(){t.safeSetState({status:Te},function(){t.props.onEntered(i,a)})})}))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:Me.findDOMNode(this);t&&!Ae.disabled?(this.props.onExit(r),this.safeSetState({status:Be},function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,function(){e.safeSetState({status:Ne},function(){e.props.onExited(r)})})})):this.safeSetState({status:Ne},function(){e.props.onExited(r)})},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:Me.findDOMNode(this),r=null==e&&!this.props.addEndListener;if(n&&!r){if(this.props.addEndListener){var o=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],i=o[0],a=o[1];this.props.addEndListener(i,a)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if(e===Pe)return null;var t=this.props,n=t.children;t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef;var r=Ee(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return Re.createElement(je.Provider,{value:null},"function"==typeof n?n(e,r):Re.cloneElement(Re.Children.only(n),r))},t}(Re.Component);function We(){}$e.contextType=je,$e.propTypes={},$e.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:We,onEntering:We,onEntered:We,onExit:We,onExiting:We,onExited:We},$e.UNMOUNTED=Pe,$e.EXITED=Ne,$e.ENTERING=Ie,$e.ENTERED=Te,$e.EXITING=Be;var De=$e;const ze=e;var Fe=function(e,t){return e&&t&&t.split(" ").forEach(function(t){return r=t,void((n=e).classList?n.classList.add(r):function(e,t){return e.classList?!!t&&e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")}(n,r)||("string"==typeof n.className?n.className=n.className+" "+r:n.setAttribute("class",(n.className&&n.className.baseVal||"")+" "+r)));var n,r})},Ue=function(e,t){return e&&t&&t.split(" ").forEach(function(t){return r=t,void((n=e).classList?n.classList.remove(r):"string"==typeof n.className?n.className=Oe(n.className,r):n.setAttribute("class",Oe(n.className&&n.className.baseVal||"",r)));var n,r})},He=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).appliedClasses={appear:{},enter:{},exit:{}},t.onEnter=function(e,n){var r=t.resolveArguments(e,n),o=r[0],i=r[1];t.removeClasses(o,"exit"),t.addClass(o,i?"appear":"enter","base"),t.props.onEnter&&t.props.onEnter(e,n)},t.onEntering=function(e,n){var r=t.resolveArguments(e,n),o=r[0],i=r[1]?"appear":"enter";t.addClass(o,i,"active"),t.props.onEntering&&t.props.onEntering(e,n)},t.onEntered=function(e,n){var r=t.resolveArguments(e,n),o=r[0],i=r[1]?"appear":"enter";t.removeClasses(o,i),t.addClass(o,i,"done"),t.props.onEntered&&t.props.onEntered(e,n)},t.onExit=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,"appear"),t.removeClasses(n,"enter"),t.addClass(n,"exit","base"),t.props.onExit&&t.props.onExit(e)},t.onExiting=function(e){var n=t.resolveArguments(e)[0];t.addClass(n,"exit","active"),t.props.onExiting&&t.props.onExiting(e)},t.onExited=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,"exit"),t.addClass(n,"exit","done"),t.props.onExited&&t.props.onExited(e)},t.resolveArguments=function(e,n){return t.props.nodeRef?[t.props.nodeRef.current,e]:[e,n]},t.getClassNames=function(e){var n=t.props.classNames,r="string"==typeof n,o=r?""+(r&&n?n+"-":"")+e:n[e];return{baseClassName:o,activeClassName:r?o+"-active":n[e+"Active"],doneClassName:r?o+"-done":n[e+"Done"]}},t}Ce(t,e);var n=t.prototype;return n.addClass=function(e,t,n){var r=this.getClassNames(t)[n+"ClassName"],o=this.getClassNames("enter").doneClassName;"appear"===t&&"done"===n&&o&&(r+=" "+o),"active"===n&&e&&Le(e),r&&(this.appliedClasses[t][n]=r,Fe(e,r))},n.removeClasses=function(e,t){var n=this.appliedClasses[t],r=n.base,o=n.active,i=n.done;this.appliedClasses[t]={},r&&Ue(e,r),o&&Ue(e,o),i&&Ue(e,i)},n.render=function(){var e=this.props;e.classNames;var t=Ee(e,["classNames"]);return ze.createElement(De,Se({},t,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(ze.Component);He.defaultProps={classNames:""},He.propTypes={};var Ve=He;const{Children:qe}=e,{cloneElement:Ke}=e,{isValidElement:Je}=e;function Ye(e,t){var n=Object.create(null);return e&&qe.map(e,function(e){return e}).forEach(function(e){n[e.key]=function(e){return t&&Je(e)?t(e):e}(e)}),n}function Ge(e,t,n){return null!=n[t]?n[t]:e.props[t]}function Qe(e,t,n){var r=Ye(e.children),o=function(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,o=Object.create(null),i=[];for(var a in e)a in t?i.length&&(o[a]=i,i=[]):i.push(a);var s={};for(var l in t){if(o[l])for(r=0;r<o[l].length;r++){var u=o[l][r];s[o[l][r]]=n(u)}s[l]=n(l)}for(r=0;r<i.length;r++)s[i[r]]=n(i[r]);return s}(t,r);return Object.keys(o).forEach(function(i){var a=o[i];if(Je(a)){var s=i in t,l=i in r,u=t[i],c=Je(u)&&!u.props.in;!l||s&&!c?l||!s||c?l&&s&&Je(u)&&(o[i]=Ke(a,{onExited:n.bind(null,a),in:u.props.in,exit:Ge(a,"exit",e),enter:Ge(a,"enter",e)})):o[i]=Ke(a,{in:!1}):o[i]=Ke(a,{onExited:n.bind(null,a),in:!0,exit:Ge(a,"exit",e),enter:Ge(a,"enter",e)})}}),o}const Ze=e;var Xe=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},et=function(e){function t(t,n){var r,o=(r=e.call(this,t,n)||this).handleExited.bind(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(r));return r.state={contextValue:{isMounting:!0},handleExited:o,firstRender:!0},r}Ce(t,e);var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(e,t){var n,r,o=t.children,i=t.handleExited;return{children:t.firstRender?(n=e,r=i,Ye(n.children,function(e){return Ke(e,{onExited:r.bind(null,e),in:!0,appear:Ge(e,"appear",n),enter:Ge(e,"enter",n),exit:Ge(e,"exit",n)})})):Qe(e,o,i),firstRender:!1}},n.handleExited=function(e,t){var n=Ye(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState(function(t){var n=Se({},t.children);return delete n[e.key],{children:n}}))},n.render=function(){var e=this.props,t=e.component,n=e.childFactory,r=Ee(e,["component","childFactory"]),o=this.state.contextValue,i=Xe(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,null===t?Ze.createElement(je.Provider,{value:o},i):Ze.createElement(je.Provider,{value:o},Ze.createElement(t,r,i))},t}(Ze.Component);et.propTypes={},et.defaultProps={component:"div",childFactory:function(e){return e}};var tt=et;const nt=e,rt=t;var ot=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).handleEnter=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onEnter",0,n)},t.handleEntering=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onEntering",0,n)},t.handleEntered=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onEntered",0,n)},t.handleExit=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onExit",1,n)},t.handleExiting=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onExiting",1,n)},t.handleExited=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onExited",1,n)},t}Ce(t,e);var n=t.prototype;return n.handleLifecycle=function(e,t,n){var r,o=this.props.children,i=nt.Children.toArray(o)[t];if(i.props[e]&&(r=i.props)[e].apply(r,n),this.props[e]){var a=i.props.nodeRef?void 0:rt.findDOMNode(this);this.props[e](a)}},n.render=function(){var e=this.props,t=e.children,n=e.in,r=Ee(e,["children","in"]),o=nt.Children.toArray(t),i=o[0],a=o[1];return delete r.onEnter,delete r.onEntering,delete r.onEntered,delete r.onExit,delete r.onExiting,delete r.onExited,nt.createElement(tt,r,n?nt.cloneElement(i,{key:"first",onEnter:this.handleEnter,onEntering:this.handleEntering,onEntered:this.handleEntered}):nt.cloneElement(a,{key:"second",onEnter:this.handleExit,onEntering:this.handleExiting,onEntered:this.handleExited}))},t}(nt.Component);ot.propTypes={};var it=ot;const at=e;var st,lt;var ut="out-in",ct="in-out",dt=function(e,t,n){return function(){var r;e.props[t]&&(r=e.props)[t].apply(r,arguments),n()}},pt=((st={})[ut]=function(e){var t=e.current,n=e.changeState;return at.cloneElement(t,{in:!1,onExited:dt(t,"onExited",function(){n(Ie,null)})})},st[ct]=function(e){var t=e.current,n=e.changeState,r=e.children;return[t,at.cloneElement(r,{in:!0,onEntered:dt(r,"onEntered",function(){n(Ie)})})]},st),ft=((lt={})[ut]=function(e){var t=e.children,n=e.changeState;return at.cloneElement(t,{in:!0,onEntered:dt(t,"onEntered",function(){n(Te,at.cloneElement(t,{in:!0}))})})},lt[ct]=function(e){var t=e.current,n=e.children,r=e.changeState;return[at.cloneElement(t,{in:!1,onExited:dt(t,"onExited",function(){r(Te,at.cloneElement(n,{in:!0}))})}),at.cloneElement(n,{in:!0})]},lt),ht=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).state={status:Te,current:null},t.appeared=!1,t.changeState=function(e,n){void 0===n&&(n=t.state.current),t.setState({status:e,current:n})},t}Ce(t,e);var n=t.prototype;return n.componentDidMount=function(){this.appeared=!0},t.getDerivedStateFromProps=function(e,t){return null==e.children?{current:null}:t.status===Ie&&e.mode===ct?{status:Ie}:!t.current||(n=t.current,r=e.children,n===r||at.isValidElement(n)&&at.isValidElement(r)&&null!=n.key&&n.key===r.key)?{current:at.cloneElement(e.children,{in:!0})}:{status:Be};var n,r},n.render=function(){var e,t=this.props,n=t.children,r=t.mode,o=this.state,i=o.status,a=o.current,s={children:n,current:a,changeState:this.changeState,status:i};switch(i){case Ie:e=ft[r](s);break;case Be:e=pt[r](s);break;case Te:e=a}return at.createElement(je.Provider,{value:{isMounting:!this.appeared}},e)},t}(at.Component);ht.propTypes={},ht.defaultProps={mode:ut};var gt=ht,vt=p(Object.freeze({__proto__:null,CSSTransition:Ve,ReplaceTransition:it,SwitchTransition:gt,TransitionGroup:tt,Transition:De,config:Ae}));const mt=e,yt=o,{Box:bt}=n,_t=r,xt=i;var wt=y.exports;Object.defineProperty(we,"__esModule",{value:!0}),we.default=void 0;var St=wt(b.exports),Et=wt(mt),kt=vt,Ct=yt,Ot=wt(bt),At=wt(_t),jt=xt;const Lt=(0,Ct.styled)(Ot.default)({width:"33px",height:"33px","& svg":{position:"absolute",display:"inline-block",width:"33px",height:"33px",verticalAlign:"middle","& hide":{display:"none"}}}),Rt=(0,Ct.styled)("svg")({"& .incorrect-fill":{fill:`var(--feedback-incorrect-bg-color, ${jt.color.incorrect()})`},"& .correct-fill":{fill:`var(--feedback-correct-bg-color, ${jt.color.correct()})`}}),Mt=(0,Ct.styled)("div")({position:"relative","&.feedback-tick-enter":{opacity:"0",left:"-50px"},"&.feedback-tick-enter-active":{opacity:"1",left:"0px",transition:"left 500ms ease-in 200ms, opacity 500ms linear 200ms"},"&.feedback-tick-exit":{opacity:"1",left:"0px"},"&.feedback-tick-exit-active":{opacity:"0",left:"-50px",transition:"left 300ms ease-in, opacity 300ms"}});class Pt extends Et.default.Component{constructor(e){super(e),(0,St.default)(this,"getIncorrectIcon",()=>Et.default.createElement(Rt,{key:"1",preserveAspectRatio:"xMinYMin meet",x:"0px",y:"0px",viewBox:"0 0 44 40",style:{enableBackground:"new 0 0 44 40"}},Et.default.createElement("g",null,Et.default.createElement("rect",{x:"11",y:"17.3",transform:"matrix(0.7071 -0.7071 0.7071 0.7071 -7.852 19.2507)",className:"incorrect-fill",width:"16.6",height:"3.7"}),Et.default.createElement("rect",{x:"17.4",y:"10.7",transform:"matrix(0.7071 -0.7071 0.7071 0.7071 -7.8175 19.209)",className:"incorrect-fill",width:"3.7",height:"16.6"})))),(0,St.default)(this,"getCorrectIcon",()=>Et.default.createElement(Rt,{key:"2",preserveAspectRatio:"xMinYMin meet",version:"1.1",x:"0px",y:"0px",viewBox:"0 0 44 40",style:{enableBackground:"new 0 0 44 40"}},Et.default.createElement("polygon",{className:"correct-fill",points:"19.1,28.6 11.8,22.3 14.4,19.2 17.9,22.1 23.9,11.4 27.5,13.4"}))),this.nodeRef=Et.default.createRef()}render(){const{correctness:e}=this.props,t=(()=>"incorrect"===e?this.getIncorrectIcon():"correct"===e?this.getCorrectIcon():null)();return Et.default.createElement(Lt,null,Et.default.createElement(kt.TransitionGroup,null,e&&Et.default.createElement(kt.CSSTransition,{nodeRef:this.nodeRef,classNames:{enter:"feedback-tick-enter",enterActive:"feedback-tick-enter-active",exit:"feedback-tick-exit",exitActive:"feedback-tick-exit-active"},timeout:{enter:700,exit:300}},Et.default.createElement(Mt,{ref:this.nodeRef},t))))}}(0,St.default)(Pt,"propTypes",{correctness:At.default.string}),we.default=Pt;const{FormControlLabel:Nt}=n,{Box:It}=n,{Checkbox:Tt}=n,{Radio:Bt}=n,$t=e,Wt=r,Dt=o,zt=i,Ft=a;var Ut=y.exports;Object.defineProperty(xe,"__esModule",{value:!0}),xe.default=xe.StyledRadio=xe.StyledFormControlLabel=xe.StyledCheckbox=xe.ChoiceInput=void 0;var Ht=Ut(b.exports),Vt=Ut(E.exports),qt=Ut(Nt),Kt=Ut($t),Jt=Ut(Wt),Yt=Dt,Gt=Ut(It),Qt=Ut(Tt),Zt=zt,Xt=Ut(Bt),en=Ut(Ft),tn=Ut(we);const nn="multiple-choice-component",rn=(0,Yt.styled)(Gt.default)({display:"flex",alignItems:"center",backgroundColor:Zt.color.background()}),on=(0,Yt.styled)(Gt.default)({display:"flex",alignItems:"center",backgroundColor:Zt.color.background(),flex:1,"& .MuiFormControlLabel-root":{marginLeft:"-14px"},"& label":{color:Zt.color.text(),"& > span":{fontSize:"inherit"},"& > .MuiButtonBase-root":{padding:"12px"}}}),an=(0,Yt.styled)("span")(({theme:e})=>({display:"flex",alignItems:"center","& > span":{marginLeft:`-${e.spacing(1)}`}})),sn=(0,Yt.styled)("span")({position:"absolute",left:"-10000px",top:"auto",width:"1px",height:"1px",overflow:"hidden"}),ln=xe.StyledFormControlLabel=(0,Yt.styled)(qt.default)({"& .MuiFormControlLabel-label":{color:`${Zt.color.text()} !important`,backgroundColor:Zt.color.background(),letterSpacing:"normal"},"&.Mui-disabled *":{cursor:"not-allowed !important"}}),un=(e,t)=>({[`&.${nn}`]:{color:`var(--choice-input-${e}, ${t}) !important`}}),cn=e=>{const t=t=>e?`${e}-${t}`:t;return{[t("root")]:{...un("color",Zt.color.text()),..."correct"===e?un("correct-color",Zt.color.text()):{},..."incorrect"===e?un("incorrect-color",Zt.color.incorrect()):{}},[t("checked")]:{..."correct"===e?un("correct-selected-color",Zt.color.correct()):{},..."incorrect"===e?un("incorrect-checked",Zt.color.incorrect()):{},...e?{}:un("selected-color",Zt.color.primary())},[t("disabled")]:{...un("disabled-color",Zt.color.text()),..."correct"===e?un("correct-disabled-color",Zt.color.disabled()):{},..."incorrect"===e?un("incorrect-disabled-color",Zt.color.disabled()):{},opacity:.6,cursor:"not-allowed !important",pointerEvents:"initial !important"},focusVisibleUnchecked:{outline:`2px solid ${Zt.color.keyBoardFocusIndicator()}`,backgroundColor:"transparent"},focusVisibleChecked:{outline:`2px solid ${Zt.color.keyBoardFocusIndicator()}`,backgroundColor:"transparent"}}},dn=(0,Yt.styled)(Qt.default,{shouldForwardProp:e=>"correctness"!==e})(({correctness:e})=>{const t=cn(e),n=t=>e?`${e}-${t}`:t;return{[`&.${nn}`]:{...t[n("root")],"&.Mui-checked":t[n("checked")],"&.Mui-disabled":e?{}:t[n("disabled")],"&:hover:not(.Mui-disabled) svg":{boxShadow:`0px 0px 0px 2px ${Zt.color.keyBoardFocusIndicator()}`,borderRadius:"4px"}},"&.Mui-focusVisible":{"&:not(.Mui-checked)":t.focusVisibleUnchecked,"&.Mui-checked":t.focusVisibleChecked}}}),pn=e=>{const{correctness:t,checked:n,onChange:r,disabled:o,value:i,id:a,onKeyDown:s,inputRef:l}=e,u={checked:n,onChange:r,disabled:o,value:i};return Kt.default.createElement(dn,(0,Vt.default)({id:a,slotProps:{input:{ref:l}},onKeyDown:s,disableRipple:!0},u,{correctness:t,className:nn}))};xe.StyledCheckbox=pn;const fn=(0,Yt.styled)(Xt.default,{shouldForwardProp:e=>"correctness"!==e})(({correctness:e})=>{const t=cn(e),n=t=>e?`${e}-${t}`:t;return{[`&.${nn}`]:{...t[n("root")],"&.Mui-checked":t[n("checked")],"&.Mui-disabled":e?{}:t[n("disabled")],"&.Mui-focusVisible:not(.Mui-checked)":t.focusVisibleUnchecked,"&.Mui-focusVisible.Mui-checked":t.focusVisibleChecked,"&:hover:not(.Mui-disabled) svg":{boxShadow:`0px 0px 0px 2px ${Zt.color.keyBoardFocusIndicator()}`,borderRadius:"50%"}},"&.Mui-focusVisible":{"& input":{outline:0},"& .MuiTouchRipple-root":{display:"none"}}}}),hn=e=>{const{correctness:t,checked:n,onChange:r,disabled:o,value:i,id:a,tagName:s,inputRef:l}=e,u={checked:n,onChange:r,disabled:o,value:i};return Kt.default.createElement(fn,(0,Vt.default)({id:a,slotProps:{input:{ref:l}},disableRipple:!0},u,{correctness:t,className:nn,name:s}))};xe.StyledRadio=hn;class gn extends Kt.default.Component{constructor(e){super(e),(0,Ht.default)(this,"handleKeyDown",e=>{const{choiceMode:t}=this.props;if("checkbox"!==t)return;const n="ArrowDown"===e.key,r="ArrowUp"===e.key;if(!n&&!r)return;e.preventDefault();const o=document.getElementById(this.choiceId);if(!o)return;const i=o.closest("fieldset");if(!i)return;const a=Array.from(i.querySelectorAll('input[type="checkbox"]')),s=a.findIndex(e=>e===o);if(-1===s)return;const l=a[n?s+1:s-1];l&&l.focus()}),this.onToggleChoice=this.onToggleChoice.bind(this),this.choiceId=this.generateChoiceId(),this.descId=`${this.choiceId}-desc`}onToggleChoice(e){this.props.onChange(e)}generateChoiceId(){return"choice-"+(1e4*Math.random()).toFixed()}render(){const{choiceMode:e,disabled:t,displayKey:n,feedback:r,label:o,correctness:i,className:a,rationale:s,hideTick:l,isEvaluateMode:u,choicesLayout:c,value:d,checked:p,tagName:f,isSelectionButtonBelow:h}=this.props,g="checkbox"===e?pn:hn,v="checkbox"===e?"checkbox":"radio-button",m={..."horizontal"===c&&{[`& .${nn}`]:{padding:"8px",margin:"4px 0 4px 4px"}},...h&&"grid"!==c&&{"& > label":{alignItems:"flex-start"}},...h&&"grid"===c&&{justifyContent:"center","& > label":{alignItems:"center"}}},y="string"==typeof o&&(o.includes("<math")||o.includes("\\(")||o.includes("\\[")||o.includes("<img")||o.includes("data-latex")||o.includes("data-raw")||o.includes("<mjx-container")),b=n?Kt.default.createElement(sn,{id:this.descId},y?`Pick the answer below, ${n}`:n):null,_=Kt.default.createElement(Kt.default.Fragment,null,n&&!h?Kt.default.createElement(rn,{component:"span"},Kt.default.createElement("span",{"aria-hidden":"true"},n,"."," "),Kt.default.createElement(Zt.PreviewPrompt,{className:"prompt-label",prompt:o,tagName:"span"})):Kt.default.createElement(Zt.PreviewPrompt,{className:"prompt-label",prompt:o,tagName:"span"})),x={disabled:t,checked:p,correctness:i,tagName:f,value:d,id:this.choiceId,onChange:this.onToggleChoice,onKeyDown:this.handleKeyDown,...b?{"aria-describedby":this.descId}:{}},w=h?Kt.default.createElement(an,null,b,Kt.default.createElement(g,(0,Vt.default)({},x,{style:{padding:0}})),Kt.default.createElement("span",{"aria-hidden":"true"},n?`${n}.`:"")):Kt.default.createElement(Kt.default.Fragment,null,b,Kt.default.createElement(g,x));return Kt.default.createElement("div",{className:(0,en.default)(a,"corespring-"+v,"choice-input")},Kt.default.createElement(rn,null,!l&&u&&Kt.default.createElement(tn.default,{correctness:i}),Kt.default.createElement(on,{className:"checkbox-holder",sx:m},Kt.default.createElement(ln,{label:_,value:d,htmlFor:this.choiceId,labelPlacement:h?"top":void 0,control:w}))),s&&Kt.default.createElement(Zt.PreviewPrompt,{className:"rationale",defaultClassName:"rationale",prompt:s}),Kt.default.createElement(Zt.Feedback,{feedback:r,correctness:i}))}}xe.ChoiceInput=gn,(0,Ht.default)(gn,"propTypes",{choiceMode:Jt.default.oneOf(["radio","checkbox"]),displayKey:Jt.default.string,checked:Jt.default.bool.isRequired,correctness:Jt.default.string,disabled:Jt.default.bool.isRequired,feedback:Jt.default.string,label:Jt.default.string.isRequired,rationale:Jt.default.string,onChange:Jt.default.func.isRequired,value:Jt.default.string.isRequired,className:Jt.default.string,tagName:Jt.default.string,hideTick:Jt.default.bool,isEvaluateMode:Jt.default.bool,choicesLayout:Jt.default.oneOf(["vertical","grid","horizontal"]),isSelectionButtonBelow:Jt.default.bool}),(0,Ht.default)(gn,"defaultProps",{rationale:null,checked:!1,isEvaluateMode:!1}),xe.default=gn;const vn=e,mn=r,yn=o,{Box:bn}=n;var _n=y.exports;Object.defineProperty(_e,"__esModule",{value:!0}),_e.default=_e.Choice=void 0;var xn=_n(b.exports),wn=_n(vn),Sn=_n(mn),En=yn,kn=_n(bn),Cn=_n(xe);const On=(0,En.styled)(kn.default,{shouldForwardProp:e=>"noBorder"!==e&&"horizontalLayout"!==e})(({theme:e,noBorder:t,horizontalLayout:n})=>({paddingTop:e.spacing(2.5),paddingBottom:`calc(${e.spacing(1)} + 2px)`,paddingLeft:`calc(${e.spacing(1)} + 2px)`,paddingRight:`calc(${e.spacing(1)} + 2px)`,borderBottom:t?"none":`1px solid ${e.palette.grey[300]}`,...n&&{paddingRight:e.spacing(2.5),"& label":{marginRight:e.spacing(1)}}}));class An extends wn.default.Component{constructor(...e){super(...e),(0,xn.default)(this,"state",{isHovered:!1}),(0,xn.default)(this,"handleMouseEnter",()=>{const{disabled:e,checked:t}=this.props;e||t||this.setState({isHovered:!0})}),(0,xn.default)(this,"handleMouseLeave",()=>{this.setState({isHovered:!1})}),(0,xn.default)(this,"onChange",e=>{const{disabled:t,onChoiceChanged:n}=this.props;t||n(e)})}render(){const{choice:e,index:t,choicesLength:n,showCorrect:r,isEvaluateMode:o,choiceMode:i,disabled:a,checked:s,correctness:l,displayKey:u,choicesLayout:c,gridColumns:d,isSelectionButtonBelow:p,selectedAnswerBackgroundColor:f,selectedAnswerStrokeColor:h,selectedAnswerStrokeWidth:g,hoverAnswerBackgroundColor:v,hoverAnswerStrokeColor:m,hoverAnswerStrokeWidth:y,tagName:b}=this.props,{isHovered:_}=this.state,x="choice"+(t===n-1?" last":""),w=!o||r?"":e.feedback,S={...e,checked:s,choiceMode:i,disabled:a,feedback:w,correctness:l,displayKey:u,index:t,choicesLayout:c,gridColumns:d,onChange:this.onChange,isEvaluateMode:o,isSelectionButtonBelow:p,selectedAnswerStrokeColor:h,selectedAnswerStrokeWidth:g,tagName:b},E=h&&"initial"!==h,k=m&&"initial"!==m;let C="transparent",O="2px",A="initial";(E||k)&&(s&&E?(C=h,O=g):_&&!a&&k&&(C=m,O=y)),s&&f&&"initial"!==f?A=f:_&&!a&&v&&"initial"!==v&&(A=v);const j=E||k,L=j?{border:`${(e=>{if(!e)return"2px";const t=String(e).trim();return/^\d+(\.\d+)?$/.test(t)?`${t}px`:t})(O)} solid ${C}`,borderRadius:"8px"}:{},R=t===n-1||"vertical"!==c||j,M="horizontal"===c,P="initial"!==A?A:"initial";return wn.default.createElement("div",{className:x,key:t,style:{backgroundColor:P,...L},onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave},wn.default.createElement(On,{component:"div",noBorder:R,horizontalLayout:M},wn.default.createElement(Cn.default,S)))}}_e.Choice=An,(0,xn.default)(An,"propTypes",{}),An.propTypes={choiceMode:Sn.default.oneOf(["radio","checkbox"]),choice:Sn.default.object,disabled:Sn.default.bool.isRequired,onChoiceChanged:Sn.default.func,index:Sn.default.number,choicesLength:Sn.default.number,showCorrect:Sn.default.bool,isEvaluateMode:Sn.default.bool,checked:Sn.default.bool,correctness:Sn.default.string,displayKey:Sn.default.string,choicesLayout:Sn.default.oneOf(["vertical","grid","horizontal"]),gridColumns:Sn.default.string,selectedAnswerBackgroundColor:Sn.default.string,selectedAnswerStrokeColor:Sn.default.string,selectedAnswerStrokeWidth:Sn.default.string,hoverAnswerBackgroundColor:Sn.default.string,hoverAnswerStrokeColor:Sn.default.string,hoverAnswerStrokeWidth:Sn.default.string,tagName:Sn.default.string,isSelectionButtonBelow:Sn.default.bool},_e.default=An;var jn={};Object.defineProperty(jn,"__esModule",{value:!0}),jn.reachedMaxSelections=jn.exceedsMaxSelections=void 0;jn.reachedMaxSelections=(e,t)=>null!=t&&e>=t;jn.exceedsMaxSelections=(e,t)=>null!=t&&e>t;const Ln=e,Rn=r,Mn=s,Pn=a,Nn=o,{Box:In}=n,Tn=i;var Bn=y.exports;Object.defineProperty(k,"__esModule",{value:!0}),k.default=k.MultipleChoice=void 0;var $n=Bn(b.exports),Wn=Bn(Ln),Dn=Bn(Rn),zn=Bn(Mn),Fn=Bn(Pn),Un=Nn,Hn=Bn(In),Vn=Tn,qn=Bn(be),Kn=Bn(_e),Jn=jn;const{translator:Yn}=qn.default,Gn=(0,Un.styled)(Hn.default)({color:Vn.color.text(),backgroundColor:Vn.color.background(),"& *":{"-webkit-font-smoothing":"antialiased"},position:"relative","& legend":{border:"none !important"}}),Qn=(0,Un.styled)("h2")(({theme:e})=>({display:"block",fontSize:"inherit",margin:"0",fontWeight:"normal",paddingBottom:e.spacing(2)})),Zn=(0,Un.styled)(Hn.default)(({theme:e})=>({marginBottom:e.spacing(2)})),Xn=(0,Un.styled)(Hn.default)({display:"flex",flexDirection:"row",flexWrap:"wrap"}),er=(0,Un.styled)(Hn.default)({display:"grid"}),tr=(0,Un.styled)("fieldset")({border:"0px",padding:"0.01em 0 0 0",margin:"0px",minWidth:"0px"}),nr=(0,Un.styled)("h3")({position:"absolute",left:"-10000px",top:"auto",width:"1px",height:"1px",overflow:"hidden"}),rr=(0,Un.styled)("div")(({theme:e})=>({fontSize:e.typography.fontSize-2,color:e.palette.error.main,paddingTop:e.spacing(1)}));class or extends Wn.default.Component{constructor(e){super(e),(0,$n.default)(this,"handleChange",e=>{const{value:t,checked:n}=e.target,{choiceMode:r,maxSelections:o,onChoiceChanged:i,session:a}=this.props;"radio"!==r&&a.value&&(0,Jn.reachedMaxSelections)(a.value.length,o)&&(this.setState({maxSelectionsErrorState:n}),n)||i({value:t,selected:n,selector:"Mouse"})}),(0,$n.default)(this,"onToggle",()=>{"evaluate"===this.props.mode&&this.setState({showCorrect:!this.state.showCorrect},()=>{this.props.onShowCorrectToggle&&this.props.onShowCorrectToggle()})}),(0,$n.default)(this,"getCorrectness",(e={})=>{const t=e.correct,n=this.isSelected(e.value);return this.state.showCorrect?t?"correct":void 0:t?n?"correct":"incorrect":n?"incorrect":void 0}),this.state={showCorrect:this.props.options&&this.props.alwaysShowCorrect||!1,maxSelectionsErrorState:!1},this.onToggle=this.onToggle.bind(this),this.groupName=`mc-group-${Math.random().toString(36).slice(2,10)}`}isSelected(e){const t=this.props.session&&this.props.session.value;return t&&t.indexOf&&t.indexOf(e)>=0}UNSAFE_componentWillReceiveProps(e){e.correctResponse||!1===this.state.showCorrect||this.setState({showCorrect:!1},()=>{this.props.onShowCorrectToggle&&this.props.onShowCorrectToggle()}),e.options&&e.alwaysShowCorrect&&!0!==this.state.showCorrect&&this.setState({showCorrect:!0},()=>{this.props.onShowCorrectToggle&&this.props.onShowCorrectToggle()})}indexToSymbol(e){return"numbers"===this.props.keyMode?`${e+1}`:"letters"===this.props.keyMode?String.fromCharCode(97+e).toUpperCase():""}getChecked(e){if(this.props.options&&this.props.alwaysShowCorrect)return e.correct||!1;return this.state.showCorrect&&"evaluate"===this.props.mode?e.correct||!1:this.isSelected(e.value)}renderHeading(){const{mode:e,choiceMode:t,includeSrHeading:n,baseHeadingLevel:r,partLabel:o}=this.props;if(!(!o&&!1!==n)||"gather"!==e)return null;const i=r?Math.min(6,r):2,a=nr.withComponent(`h${i}`),s="radio"===t?"Multiple Choice Question":"Multiple Select Question";return Wn.default.createElement(a,null,s)}render(){const{mode:e,disabled:t,className:n,choices:r=[],choiceMode:o,gridColumns:i,partLabel:a,prompt:s,responseCorrect:l,teacherInstructions:u,alwaysShowCorrect:c,animationsDisabled:d,language:p,isSelectionButtonBelow:f,minSelections:h,maxSelections:g,autoplayAudioEnabled:v,session:m,customAudioButton:y,options:b,baseHeadingLevel:_}=this.props,{showCorrect:x,maxSelectionsErrorState:w}=this.state,S="evaluate"===e,E=S&&!l,k=i>1?{gridTemplateColumns:`repeat(${i}, 1fr)`}:void 0,C=m.value&&m.value.length||0,O=(()=>{if(!_)return;let e=1;return a&&(e+=1),Math.min(6,_+e)})(),A=Wn.default.createElement(Vn.PreviewPrompt,{tagName:"div",className:"prompt",defaultClassName:"teacher-instructions",prompt:u}),j="grid"===this.props.choicesLayout?er:"horizontal"===this.props.choicesLayout?Xn:Hn.default;return Wn.default.createElement(Gn,{id:"main-container",className:(0,Fn.default)(n,"multiple-choice")},a&&Wn.default.createElement(Qn,{as:_?`h${Math.min(6,_+1)}`:"h2"},a),this.renderHeading(),u&&Wn.default.createElement(Zn,null,d?A:Wn.default.createElement(Vn.Collapsible,{labels:{hidden:"Show Teacher Instructions",visible:"Hide Teacher Instructions"}},A)),Wn.default.createElement(tr,{role:"radio"===o?"radiogroup":"group"},Wn.default.createElement(Vn.PreviewPrompt,{className:"prompt",defaultClassName:"prompt",prompt:(L=s,L&&O?(0,Vn.transformDataHeadings)(L,O):L),tagName:"legend",autoplayAudioEnabled:v,customAudioButton:y}),!(b&&c)&&Wn.default.createElement(zn.default,{show:E,toggled:x,onToggle:this.onToggle.bind(this),language:p}),Wn.default.createElement(j,{style:k},r.map((e,n)=>Wn.default.createElement(Kn.default,{choicesLayout:this.props.choicesLayout,selectedAnswerBackgroundColor:this.props.selectedAnswerBackgroundColor,selectedAnswerStrokeColor:this.props.selectedAnswerStrokeColor,selectedAnswerStrokeWidth:this.props.selectedAnswerStrokeWidth,hoverAnswerBackgroundColor:this.props.hoverAnswerBackgroundColor,hoverAnswerStrokeColor:this.props.hoverAnswerStrokeColor,hoverAnswerStrokeWidth:this.props.hoverAnswerStrokeWidth,gridColumns:i,key:`choice-${n}`,choice:e,index:n,choicesLength:r.length,showCorrect:x,isEvaluateMode:S,choiceMode:o,disabled:t,tagName:this.groupName,onChoiceChanged:this.handleChange,hideTick:e.hideTick,checked:this.getChecked(e),correctness:S?this.getCorrectness(e):void 0,displayKey:this.indexToSymbol(n),isSelectionButtonBelow:f})))),"checkbox"===o&&C<h&&Wn.default.createElement(rr,null,h&&g?h===g?Yn.t("translation:multipleChoice:minmaxSelections_equal",{lng:p,minSelections:h}):Yn.t("translation:multipleChoice:minmaxSelections_range",{lng:p,minSelections:h,maxSelections:g}):h?Yn.t("translation:multipleChoice:minSelections",{lng:p,minSelections:h}):""),"checkbox"===o&&w&&Wn.default.createElement(rr,null,Yn.t("translation:multipleChoice:maxSelections_"+(1===g?"one":"other"),{lng:p,maxSelections:g})));var L}}k.MultipleChoice=or,(0,$n.default)(or,"propTypes",{className:Dn.default.string,mode:Dn.default.oneOf(["gather","view","evaluate"]),choiceMode:Dn.default.oneOf(["radio","checkbox"]),keyMode:Dn.default.oneOf(["numbers","letters","none"]),choices:Dn.default.array,partLabel:Dn.default.string,prompt:Dn.default.string,teacherInstructions:Dn.default.string,session:Dn.default.object,disabled:Dn.default.bool,onChoiceChanged:Dn.default.func,responseCorrect:Dn.default.bool,correctResponse:Dn.default.array,choicesLayout:Dn.default.oneOf(["vertical","grid","horizontal"]),gridColumns:Dn.default.string,alwaysShowCorrect:Dn.default.bool,animationsDisabled:Dn.default.bool,language:Dn.default.string,selectedAnswerBackgroundColor:Dn.default.string,selectedAnswerStrokeColor:Dn.default.string,selectedAnswerStrokeWidth:Dn.default.string,hoverAnswerBackgroundColor:Dn.default.string,hoverAnswerStrokeColor:Dn.default.string,hoverAnswerStrokeWidth:Dn.default.string,onShowCorrectToggle:Dn.default.func,isSelectionButtonBelow:Dn.default.bool,minSelections:Dn.default.number,maxSelections:Dn.default.number,autoplayAudioEnabled:Dn.default.bool,customAudioButton:{playImage:Dn.default.string,pauseImage:Dn.default.string},options:Dn.default.object,baseHeadingLevel:Dn.default.number,includeSrHeading:Dn.default.bool}),or.defaultProps={session:{value:[]}},k.default=or;const ir=e,ar=r,sr=i;var lr=y.exports;Object.defineProperty(S,"__esModule",{value:!0}),S.default=void 0;var ur=lr(E.exports),cr=lr(b.exports),dr=lr(ir),pr=lr(ar),fr=sr,hr=lr(k);class gr extends dr.default.Component{render(){const{model:e,onChoiceChanged:t,session:n,onShowCorrectToggle:r,options:o,baseHeadingLevel:i,includeSrHeading:a}=this.props,{extraCSSRules:s,fontSizeFactor:l}=e;return dr.default.createElement(fr.PreviewLayout,{extraCSSRules:s,fontSizeFactor:l,classes:{}},dr.default.createElement(hr.default,(0,ur.default)({},e,{options:o,session:n,onChoiceChanged:t,onShowCorrectToggle:r,baseHeadingLevel:i,includeSrHeading:a})))}}(0,cr.default)(gr,"propTypes",{model:pr.default.object,session:pr.default.object,options:pr.default.object,onChoiceChanged:pr.default.func,onShowCorrectToggle:pr.default.func,extraCSSRules:pr.default.shape({names:pr.default.arrayOf(pr.default.string),rules:pr.default.string}),baseHeadingLevel:pr.default.number,includeSrHeading:pr.default.bool}),(0,cr.default)(gr,"defaultProps",{model:{},session:{}}),S.default=gr;var vr="object"==typeof global&&global&&global.Object===Object&&global,mr="object"==typeof self&&self&&self.Object===Object&&self,yr=vr||mr||Function("return this")(),br=yr.Symbol,_r=Object.prototype,xr=_r.hasOwnProperty,wr=_r.toString,Sr=br?br.toStringTag:void 0;var Er=Object.prototype.toString;var kr=br?br.toStringTag:void 0;function Cr(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":kr&&kr in Object(e)?function(e){var t=xr.call(e,Sr),n=e[Sr];try{e[Sr]=void 0;var r=!0}catch(e){}var o=wr.call(e);return r&&(t?e[Sr]=n:delete e[Sr]),o}(e):function(e){return Er.call(e)}(e)}function Or(e){return null!=e&&"object"==typeof e}function Ar(e){return"symbol"==typeof e||Or(e)&&"[object Symbol]"==Cr(e)}function jr(e){return"number"==typeof e?e:Ar(e)?NaN:+e}function Lr(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}var Rr=Array.isArray,Mr=br?br.prototype:void 0,Pr=Mr?Mr.toString:void 0;function Nr(e){if("string"==typeof e)return e;if(Rr(e))return Lr(e,Nr)+"";if(Ar(e))return Pr?Pr.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Ir(e,t){return function(n,r){var o;if(void 0===n&&void 0===r)return t;if(void 0!==n&&(o=n),void 0!==r){if(void 0===o)return r;"string"==typeof n||"string"==typeof r?(n=Nr(n),r=Nr(r)):(n=jr(n),r=jr(r)),o=e(n,r)}return o}}var Tr=Ir(function(e,t){return e+t},0),Br=/\s/;function $r(e){for(var t=e.length;t--&&Br.test(e.charAt(t)););return t}var Wr=/^\s+/;function Dr(e){return e?e.slice(0,$r(e)+1).replace(Wr,""):e}function zr(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}var Fr=/^[-+]0x[0-9a-f]+$/i,Ur=/^0b[01]+$/i,Hr=/^0o[0-7]+$/i,Vr=parseInt;function qr(e){if("number"==typeof e)return e;if(Ar(e))return NaN;if(zr(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=zr(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Dr(e);var n=Ur.test(e);return n||Hr.test(e)?Vr(e.slice(2),n?2:8):Fr.test(e)?NaN:+e}var Kr=1/0;function Jr(e){return e?(e=qr(e))===Kr||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function Yr(e){var t=Jr(e),n=t%1;return t==t?n?t-n:t:0}function Gr(e,t){if("function"!=typeof t)throw new TypeError("Expected a function");return e=Yr(e),function(){if(--e<1)return t.apply(this,arguments)}}function Qr(e){return e}function Zr(e){if(!zr(e))return!1;var t=Cr(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}var Xr,eo=yr["__core-js_shared__"],to=(Xr=/[^.]+$/.exec(eo&&eo.keys&&eo.keys.IE_PROTO||""))?"Symbol(src)_1."+Xr:"";var no=Function.prototype.toString;function ro(e){if(null!=e){try{return no.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var oo=/^\[object .+?Constructor\]$/,io=Function.prototype,ao=Object.prototype,so=io.toString,lo=ao.hasOwnProperty,uo=RegExp("^"+so.call(lo).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function co(e){return!(!zr(e)||function(e){return!!to&&to in e}(e))&&(Zr(e)?uo:oo).test(ro(e))}function po(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return co(n)?n:void 0}var fo=po(yr,"WeakMap"),ho=fo&&new fo,go=ho?function(e,t){return ho.set(e,t),e}:Qr,vo=go,mo=Object.create,yo=function(){function e(){}return function(t){if(!zr(t))return{};if(mo)return mo(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}(),bo=yo;function _o(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=bo(e.prototype),r=e.apply(n,t);return zr(r)?r:n}}function xo(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var wo=Math.max;function So(e,t,n,r){for(var o=-1,i=e.length,a=n.length,s=-1,l=t.length,u=wo(i-a,0),c=Array(l+u),d=!r;++s<l;)c[s]=t[s];for(;++o<a;)(d||o<i)&&(c[n[o]]=e[o]);for(;u--;)c[s++]=e[o++];return c}var Eo=Math.max;function ko(e,t,n,r){for(var o=-1,i=e.length,a=-1,s=n.length,l=-1,u=t.length,c=Eo(i-s,0),d=Array(c+u),p=!r;++o<c;)d[o]=e[o];for(var f=o;++l<u;)d[f+l]=t[l];for(;++a<s;)(p||o<i)&&(d[f+n[a]]=e[o++]);return d}function Co(){}function Oo(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function Ao(){}Oo.prototype=bo(Co.prototype),Oo.prototype.constructor=Oo;var jo=ho?function(e){return ho.get(e)}:Ao,Lo=jo,Ro={},Mo=Object.prototype.hasOwnProperty;function Po(e){for(var t=e.name+"",n=Ro[t],r=Mo.call(Ro,t)?n.length:0;r--;){var o=n[r],i=o.func;if(null==i||i==e)return o.name}return t}function No(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}function Io(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}function To(e){if(e instanceof Oo)return e.clone();var t=new No(e.__wrapped__,e.__chain__);return t.__actions__=Io(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}No.prototype=bo(Co.prototype),No.prototype.constructor=No;var Bo=Object.prototype.hasOwnProperty;function $o(e){if(Or(e)&&!Rr(e)&&!(e instanceof Oo)){if(e instanceof No)return e;if(Bo.call(e,"__wrapped__"))return To(e)}return new No(e)}function Wo(e){var t=Po(e),n=$o[t];if("function"!=typeof n||!(t in Oo.prototype))return!1;if(e===n)return!0;var r=Lo(n);return!!r&&e===r[0]}$o.prototype=Co.prototype,$o.prototype.constructor=$o;var Do=Date.now;function zo(e){var t=0,n=0;return function(){var r=Do(),o=16-(r-n);if(n=r,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var Fo=zo(vo),Uo=/\{\n\/\* \[wrapped with (.+)\] \*/,Ho=/,? & /;var Vo=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;function qo(e){return function(){return e}}var Ko=function(){try{var e=po(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),Jo=Ko,Yo=Jo?function(e,t){return Jo(e,"toString",{configurable:!0,enumerable:!1,value:qo(t),writable:!0})}:Qr,Go=zo(Yo);function Qo(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function Zo(e,t,n,r){for(var o=e.length,i=n+(r?1:-1);r?i--:++i<o;)if(t(e[i],i,e))return i;return-1}function Xo(e){return e!=e}function ei(e,t,n){return t==t?function(e,t,n){for(var r=n-1,o=e.length;++r<o;)if(e[r]===t)return r;return-1}(e,t,n):Zo(e,Xo,n)}function ti(e,t){return!!(null==e?0:e.length)&&ei(e,t,0)>-1}var ni=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]];function ri(e,t,n){var r=t+"";return Go(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(Vo,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return Qo(ni,function(n){var r="_."+n[0];t&n[1]&&!ti(e,r)&&e.push(r)}),e.sort()}(function(e){var t=e.match(Uo);return t?t[1].split(Ho):[]}(r),n)))}function oi(e,t,n,r,o,i,a,s,l,u){var c=8&t;t|=c?32:64,4&(t&=~(c?64:32))||(t&=-4);var d=[e,t,o,c?i:void 0,c?a:void 0,c?void 0:i,c?void 0:a,s,l,u],p=n.apply(void 0,d);return Wo(e)&&Fo(p,d),p.placeholder=r,ri(p,e,t)}function ii(e){return e.placeholder}var ai=/^(?:0|[1-9]\d*)$/;function si(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&ai.test(e))&&e>-1&&e%1==0&&e<t}var li=Math.min;var ui="__lodash_placeholder__";function ci(e,t){for(var n=-1,r=e.length,o=0,i=[];++n<r;){var a=e[n];a!==t&&a!==ui||(e[n]=ui,i[o++]=n)}return i}function di(e,t,n,r,o,i,a,s,l,u){var c=128&t,d=1&t,p=2&t,f=24&t,h=512&t,g=p?void 0:_o(e);return function v(){for(var m=arguments.length,y=Array(m),b=m;b--;)y[b]=arguments[b];if(f)var _=ii(v),x=function(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}(y,_);if(r&&(y=So(y,r,o,f)),i&&(y=ko(y,i,a,f)),m-=x,f&&m<u){var w=ci(y,_);return oi(e,t,di,v.placeholder,n,y,w,s,l,u-m)}var S=d?n:this,E=p?S[e]:e;return m=y.length,s?y=function(e,t){for(var n=e.length,r=li(t.length,n),o=Io(e);r--;){var i=t[r];e[r]=si(i,n)?o[i]:void 0}return e}(y,s):h&&m>1&&y.reverse(),c&&l<m&&(y.length=l),this&&this!==yr&&this instanceof v&&(E=g||_o(E)),E.apply(S,y)}}var pi="__lodash_placeholder__",fi=128,hi=Math.min;var gi=Math.max;function vi(e,t,n,r,o,i,a,s){var l=2&t;if(!l&&"function"!=typeof e)throw new TypeError("Expected a function");var u=r?r.length:0;if(u||(t&=-97,r=o=void 0),a=void 0===a?a:gi(Yr(a),0),s=void 0===s?s:Yr(s),u-=o?o.length:0,64&t){var c=r,d=o;r=o=void 0}var p=l?void 0:Lo(e),f=[e,t,n,r,o,c,d,i,a,s];if(p&&function(e,t){var n=e[1],r=t[1],o=n|r,i=o<131,a=r==fi&&8==n||r==fi&&256==n&&e[7].length<=t[8]||384==r&&t[7].length<=t[8]&&8==n;if(!i&&!a)return e;1&r&&(e[2]=t[2],o|=1&n?0:4);var s=t[3];if(s){var l=e[3];e[3]=l?So(l,s,t[4]):s,e[4]=l?ci(e[3],pi):t[4]}(s=t[5])&&(l=e[5],e[5]=l?ko(l,s,t[6]):s,e[6]=l?ci(e[5],pi):t[6]),(s=t[7])&&(e[7]=s),r&fi&&(e[8]=null==e[8]?t[8]:hi(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=o}(f,p),e=f[0],t=f[1],n=f[2],r=f[3],o=f[4],!(s=f[9]=void 0===f[9]?l?0:e.length:gi(f[9]-u,0))&&24&t&&(t&=-25),t&&1!=t)h=8==t||16==t?function(e,t,n){var r=_o(e);return function o(){for(var i=arguments.length,a=Array(i),s=i,l=ii(o);s--;)a[s]=arguments[s];var u=i<3&&a[0]!==l&&a[i-1]!==l?[]:ci(a,l);return(i-=u.length)<n?oi(e,t,di,o.placeholder,void 0,a,u,void 0,void 0,n-i):xo(this&&this!==yr&&this instanceof o?r:e,this,a)}}(e,t,s):32!=t&&33!=t||o.length?di.apply(void 0,f):function(e,t,n,r){var o=1&t,i=_o(e);return function t(){for(var a=-1,s=arguments.length,l=-1,u=r.length,c=Array(u+s),d=this&&this!==yr&&this instanceof t?i:e;++l<u;)c[l]=r[l];for(;s--;)c[l++]=arguments[++a];return xo(d,o?n:this,c)}}(e,t,n,r);else var h=function(e,t,n){var r=1&t,o=_o(e);return function t(){return(this&&this!==yr&&this instanceof t?o:e).apply(r?n:this,arguments)}}(e,t,n);return ri((p?vo:Fo)(h,f),e,t)}function mi(e,t,n){return t=n?void 0:t,vi(e,128,void 0,void 0,void 0,void 0,t=e&&null==t?e.length:t)}function yi(e,t,n){"__proto__"==t&&Jo?Jo(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function bi(e,t){return e===t||e!=e&&t!=t}var _i=Object.prototype.hasOwnProperty;function xi(e,t,n){var r=e[t];_i.call(e,t)&&bi(r,n)&&(void 0!==n||t in e)||yi(e,t,n)}function wi(e,t,n,r){var o=!n;n||(n={});for(var i=-1,a=t.length;++i<a;){var s=t[i],l=r?r(n[s],e[s],s,n,e):void 0;void 0===l&&(l=e[s]),o?yi(n,s,l):xi(n,s,l)}return n}var Si=Math.max;function Ei(e,t,n){return t=Si(void 0===t?e.length-1:t,0),function(){for(var r=arguments,o=-1,i=Si(r.length-t,0),a=Array(i);++o<i;)a[o]=r[t+o];o=-1;for(var s=Array(t+1);++o<t;)s[o]=r[o];return s[t]=n(a),xo(e,this,s)}}function ki(e,t){return Go(Ei(e,t,Qr),e+"")}function Ci(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}function Oi(e){return null!=e&&Ci(e.length)&&!Zr(e)}function Ai(e,t,n){if(!zr(n))return!1;var r=typeof t;return!!("number"==r?Oi(n)&&si(t,n.length):"string"==r&&t in n)&&bi(n[t],e)}function ji(e){return ki(function(t,n){var r=-1,o=n.length,i=o>1?n[o-1]:void 0,a=o>2?n[2]:void 0;for(i=e.length>3&&"function"==typeof i?(o--,i):void 0,a&&Ai(n[0],n[1],a)&&(i=o<3?void 0:i,o=1),t=Object(t);++r<o;){var s=n[r];s&&e(t,s,r,i)}return t})}var Li=Object.prototype;function Ri(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Li)}function Mi(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Pi(e){return Or(e)&&"[object Arguments]"==Cr(e)}var Ni=Object.prototype,Ii=Ni.hasOwnProperty,Ti=Ni.propertyIsEnumerable,Bi=Pi(function(){return arguments}())?Pi:function(e){return Or(e)&&Ii.call(e,"callee")&&!Ti.call(e,"callee")};function $i(){return!1}var Wi="object"==typeof exports&&exports&&!exports.nodeType&&exports,Di=Wi&&"object"==typeof module&&module&&!module.nodeType&&module,zi=Di&&Di.exports===Wi?yr.Buffer:void 0,Fi=(zi?zi.isBuffer:void 0)||$i,Ui={};function Hi(e){return function(t){return e(t)}}Ui["[object Float32Array]"]=Ui["[object Float64Array]"]=Ui["[object Int8Array]"]=Ui["[object Int16Array]"]=Ui["[object Int32Array]"]=Ui["[object Uint8Array]"]=Ui["[object Uint8ClampedArray]"]=Ui["[object Uint16Array]"]=Ui["[object Uint32Array]"]=!0,Ui["[object Arguments]"]=Ui["[object Array]"]=Ui["[object ArrayBuffer]"]=Ui["[object Boolean]"]=Ui["[object DataView]"]=Ui["[object Date]"]=Ui["[object Error]"]=Ui["[object Function]"]=Ui["[object Map]"]=Ui["[object Number]"]=Ui["[object Object]"]=Ui["[object RegExp]"]=Ui["[object Set]"]=Ui["[object String]"]=Ui["[object WeakMap]"]=!1;var Vi="object"==typeof exports&&exports&&!exports.nodeType&&exports,qi=Vi&&"object"==typeof module&&module&&!module.nodeType&&module,Ki=qi&&qi.exports===Vi&&vr.process,Ji=function(){try{var e=qi&&qi.require&&qi.require("util").types;return e||Ki&&Ki.binding&&Ki.binding("util")}catch(e){}}(),Yi=Ji&&Ji.isTypedArray,Gi=Yi?Hi(Yi):function(e){return Or(e)&&Ci(e.length)&&!!Ui[Cr(e)]},Qi=Object.prototype.hasOwnProperty;function Zi(e,t){var n=Rr(e),r=!n&&Bi(e),o=!n&&!r&&Fi(e),i=!n&&!r&&!o&&Gi(e),a=n||r||o||i,s=a?Mi(e.length,String):[],l=s.length;for(var u in e)!t&&!Qi.call(e,u)||a&&("length"==u||o&&("offset"==u||"parent"==u)||i&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||si(u,l))||s.push(u);return s}function Xi(e,t){return function(n){return e(t(n))}}var ea=Xi(Object.keys,Object),ta=Object.prototype.hasOwnProperty;function na(e){if(!Ri(e))return ea(e);var t=[];for(var n in Object(e))ta.call(e,n)&&"constructor"!=n&&t.push(n);return t}function ra(e){return Oi(e)?Zi(e):na(e)}var oa=Object.prototype.hasOwnProperty,ia=ji(function(e,t){if(Ri(t)||Oi(t))wi(t,ra(t),e);else for(var n in t)oa.call(t,n)&&xi(e,n,t[n])}),aa=ia;var sa=Object.prototype.hasOwnProperty;function la(e){if(!zr(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=Ri(e),n=[];for(var r in e)("constructor"!=r||!t&&sa.call(e,r))&&n.push(r);return n}function ua(e){return Oi(e)?Zi(e,!0):la(e)}var ca=ji(function(e,t){wi(t,ua(t),e)}),da=ca,pa=ji(function(e,t,n,r){wi(t,ua(t),e,r)}),fa=pa,ha=ji(function(e,t,n,r){wi(t,ra(t),e,r)}),ga=ha,va=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ma=/^\w*$/;function ya(e,t){if(Rr(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!Ar(e))||(ma.test(e)||!va.test(e)||null!=t&&e in Object(t))}var ba=po(Object,"create");var _a=Object.prototype.hasOwnProperty;var xa=Object.prototype.hasOwnProperty;function wa(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Sa(e,t){for(var n=e.length;n--;)if(bi(e[n][0],t))return n;return-1}wa.prototype.clear=function(){this.__data__=ba?ba(null):{},this.size=0},wa.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},wa.prototype.get=function(e){var t=this.__data__;if(ba){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return _a.call(t,e)?t[e]:void 0},wa.prototype.has=function(e){var t=this.__data__;return ba?void 0!==t[e]:xa.call(t,e)},wa.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=ba&&void 0===t?"__lodash_hash_undefined__":t,this};var Ea=Array.prototype.splice;function ka(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}ka.prototype.clear=function(){this.__data__=[],this.size=0},ka.prototype.delete=function(e){var t=this.__data__,n=Sa(t,e);return!(n<0)&&(n==t.length-1?t.pop():Ea.call(t,n,1),--this.size,!0)},ka.prototype.get=function(e){var t=this.__data__,n=Sa(t,e);return n<0?void 0:t[n][1]},ka.prototype.has=function(e){return Sa(this.__data__,e)>-1},ka.prototype.set=function(e,t){var n=this.__data__,r=Sa(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};var Ca=po(yr,"Map");function Oa(e,t){var n,r,o=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map}function Aa(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Aa.prototype.clear=function(){this.size=0,this.__data__={hash:new wa,map:new(Ca||ka),string:new wa}},Aa.prototype.delete=function(e){var t=Oa(this,e).delete(e);return this.size-=t?1:0,t},Aa.prototype.get=function(e){return Oa(this,e).get(e)},Aa.prototype.has=function(e){return Oa(this,e).has(e)},Aa.prototype.set=function(e,t){var n=Oa(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};function ja(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(ja.Cache||Aa),n}ja.Cache=Aa;var La=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ra=/\\(\\)?/g,Ma=function(e){var t=ja(e,function(e){return 500===n.size&&n.clear(),e}),n=t.cache;return t}(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(La,function(e,n,r,o){t.push(r?o.replace(Ra,"$1"):n||e)}),t}),Pa=Ma;function Na(e){return null==e?"":Nr(e)}function Ia(e,t){return Rr(e)?e:ya(e,t)?[e]:Pa(Na(e))}function Ta(e){if("string"==typeof e||Ar(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Ba(e,t){for(var n=0,r=(t=Ia(t,e)).length;null!=e&&n<r;)e=e[Ta(t[n++])];return n&&n==r?e:void 0}function $a(e,t,n){var r=null==e?void 0:Ba(e,t);return void 0===r?n:r}function Wa(e,t){for(var n=-1,r=t.length,o=Array(r),i=null==e;++n<r;)o[n]=i?void 0:$a(e,t[n]);return o}function Da(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}var za=br?br.isConcatSpreadable:void 0;function Fa(e){return Rr(e)||Bi(e)||!!(za&&e&&e[za])}function Ua(e,t,n,r,o){var i=-1,a=e.length;for(n||(n=Fa),o||(o=[]);++i<a;){var s=e[i];t>0&&n(s)?t>1?Ua(s,t-1,n,r,o):Da(o,s):r||(o[o.length]=s)}return o}function Ha(e){return(null==e?0:e.length)?Ua(e,1):[]}function Va(e){return Go(Ei(e,void 0,Ha),e+"")}var qa=Va(Wa),Ka=Xi(Object.getPrototypeOf,Object),Ja=Function.prototype,Ya=Object.prototype,Ga=Ja.toString,Qa=Ya.hasOwnProperty,Za=Ga.call(Object);function Xa(e){if(!Or(e)||"[object Object]"!=Cr(e))return!1;var t=Ka(e);if(null===t)return!0;var n=Qa.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Ga.call(n)==Za}function es(e){if(!Or(e))return!1;var t=Cr(e);return"[object Error]"==t||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!Xa(e)}var ts=ki(function(e,t){try{return xo(e,void 0,t)}catch(e){return es(e)?e:new Error(e)}}),ns=ts;function rs(e,t){var n;if("function"!=typeof t)throw new TypeError("Expected a function");return e=Yr(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=void 0),n}}var os=ki(function(e,t,n){var r=1;if(n.length){var o=ci(n,ii(os));r|=32}return vi(e,r,t,n,o)});os.placeholder={};var is=os,as=Va(function(e,t){return Qo(t,function(t){t=Ta(t),yi(e,t,is(e[t],e))}),e}),ss=as,ls=ki(function(e,t,n){var r=3;if(n.length){var o=ci(n,ii(ls));r|=32}return vi(t,r,e,n,o)});ls.placeholder={};var us=ls;function cs(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(o);++r<o;)i[r]=e[r+t];return i}function ds(e,t,n){var r=e.length;return n=void 0===n?r:n,!t&&n>=r?e:cs(e,t,n)}var ps=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");function fs(e){return ps.test(e)}var hs="\\ud800-\\udfff",gs="["+hs+"]",vs="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",ms="\\ud83c[\\udffb-\\udfff]",ys="[^"+hs+"]",bs="(?:\\ud83c[\\udde6-\\uddff]){2}",_s="[\\ud800-\\udbff][\\udc00-\\udfff]",xs="(?:"+vs+"|"+ms+")"+"?",ws="[\\ufe0e\\ufe0f]?",Ss=ws+xs+("(?:\\u200d(?:"+[ys,bs,_s].join("|")+")"+ws+xs+")*"),Es="(?:"+[ys+vs+"?",vs,bs,_s,gs].join("|")+")",ks=RegExp(ms+"(?="+ms+")|"+Es+Ss,"g");function Cs(e){return fs(e)?function(e){return e.match(ks)||[]}(e):function(e){return e.split("")}(e)}function Os(e){return function(t){var n=fs(t=Na(t))?Cs(t):void 0,r=n?n[0]:t.charAt(0),o=n?ds(n,1).join(""):t.slice(1);return r[e]()+o}}var As=Os("toUpperCase");function js(e){return As(Na(e).toLowerCase())}function Ls(e,t,n,r){var o=-1,i=null==e?0:e.length;for(r&&i&&(n=e[++o]);++o<i;)n=t(n,e[o],o,e);return n}function Rs(e){return function(t){return null==e?void 0:e[t]}}var Ms=Rs({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),Ps=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ns=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");function Is(e){return(e=Na(e))&&e.replace(Ps,Ms).replace(Ns,"")}var Ts=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;var Bs=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;var $s="\\ud800-\\udfff",Ws="\\u2700-\\u27bf",Ds="a-z\\xdf-\\xf6\\xf8-\\xff",zs="A-Z\\xc0-\\xd6\\xd8-\\xde",Fs="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Us="["+Fs+"]",Hs="\\d+",Vs="["+Ws+"]",qs="["+Ds+"]",Ks="[^"+$s+Fs+Hs+Ws+Ds+zs+"]",Js="(?:\\ud83c[\\udde6-\\uddff]){2}",Ys="[\\ud800-\\udbff][\\udc00-\\udfff]",Gs="["+zs+"]",Qs="(?:"+qs+"|"+Ks+")",Zs="(?:"+Gs+"|"+Ks+")",Xs="(?:['’](?:d|ll|m|re|s|t|ve))?",el="(?:['’](?:D|LL|M|RE|S|T|VE))?",tl="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",nl="[\\ufe0e\\ufe0f]?",rl=nl+tl+("(?:\\u200d(?:"+["[^"+$s+"]",Js,Ys].join("|")+")"+nl+tl+")*"),ol="(?:"+[Vs,Js,Ys].join("|")+")"+rl,il=RegExp([Gs+"?"+qs+"+"+Xs+"(?="+[Us,Gs,"$"].join("|")+")",Zs+"+"+el+"(?="+[Us,Gs+Qs,"$"].join("|")+")",Gs+"?"+Qs+"+"+Xs,Gs+"+"+el,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Hs,ol].join("|"),"g");function al(e,t,n){return e=Na(e),void 0===(t=n?void 0:t)?function(e){return Bs.test(e)}(e)?function(e){return e.match(il)||[]}(e):function(e){return e.match(Ts)||[]}(e):e.match(t)||[]}var sl=RegExp("['’]","g");function ll(e){return function(t){return Ls(al(Is(t).replace(sl,"")),e,"")}}var ul=ll(function(e,t,n){return t=t.toLowerCase(),e+(n?js(t):t)}),cl=ul;function dl(){if(!arguments.length)return[];var e=arguments[0];return Rr(e)?e:[e]}var pl=yr.isFinite,fl=Math.min;function hl(e){var t=Math[e];return function(e,n){if(e=qr(e),(n=null==n?0:fl(Yr(n),292))&&pl(e)){var r=(Na(e)+"e").split("e");return+((r=(Na(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var gl=hl("ceil");function vl(e){var t=$o(e);return t.__chain__=!0,t}var ml=Math.ceil,yl=Math.max;function bl(e,t,n){t=(n?Ai(e,t,n):void 0===t)?1:yl(Yr(t),0);var r=null==e?0:e.length;if(!r||t<1)return[];for(var o=0,i=0,a=Array(ml(r/t));o<r;)a[i++]=cs(e,o,o+=t);return a}function _l(e,t,n){return e==e&&(void 0!==n&&(e=e<=n?e:n),void 0!==t&&(e=e>=t?e:t)),e}function xl(e,t,n){return void 0===n&&(n=t,t=void 0),void 0!==n&&(n=(n=qr(n))==n?n:0),void 0!==t&&(t=(t=qr(t))==t?t:0),_l(qr(e),t,n)}function wl(e){var t=this.__data__=new ka(e);this.size=t.size}function Sl(e,t){return e&&wi(t,ra(t),e)}wl.prototype.clear=function(){this.__data__=new ka,this.size=0},wl.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},wl.prototype.get=function(e){return this.__data__.get(e)},wl.prototype.has=function(e){return this.__data__.has(e)},wl.prototype.set=function(e,t){var n=this.__data__;if(n instanceof ka){var r=n.__data__;if(!Ca||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Aa(r)}return n.set(e,t),this.size=n.size,this};var El="object"==typeof exports&&exports&&!exports.nodeType&&exports,kl=El&&"object"==typeof module&&module&&!module.nodeType&&module,Cl=kl&&kl.exports===El?yr.Buffer:void 0,Ol=Cl?Cl.allocUnsafe:void 0;function Al(e,t){if(t)return e.slice();var n=e.length,r=Ol?Ol(n):new e.constructor(n);return e.copy(r),r}function jl(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i}function Ll(){return[]}var Rl=Object.prototype.propertyIsEnumerable,Ml=Object.getOwnPropertySymbols,Pl=Ml?function(e){return null==e?[]:(e=Object(e),jl(Ml(e),function(t){return Rl.call(e,t)}))}:Ll,Nl=Pl;var Il=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)Da(t,Nl(e)),e=Ka(e);return t}:Ll,Tl=Il;function Bl(e,t,n){var r=t(e);return Rr(e)?r:Da(r,n(e))}function $l(e){return Bl(e,ra,Nl)}function Wl(e){return Bl(e,ua,Tl)}var Dl=po(yr,"DataView"),zl=po(yr,"Promise"),Fl=po(yr,"Set"),Ul="[object Map]",Hl="[object Promise]",Vl="[object Set]",ql="[object WeakMap]",Kl="[object DataView]",Jl=ro(Dl),Yl=ro(Ca),Gl=ro(zl),Ql=ro(Fl),Zl=ro(fo),Xl=Cr;(Dl&&Xl(new Dl(new ArrayBuffer(1)))!=Kl||Ca&&Xl(new Ca)!=Ul||zl&&Xl(zl.resolve())!=Hl||Fl&&Xl(new Fl)!=Vl||fo&&Xl(new fo)!=ql)&&(Xl=function(e){var t=Cr(e),n="[object Object]"==t?e.constructor:void 0,r=n?ro(n):"";if(r)switch(r){case Jl:return Kl;case Yl:return Ul;case Gl:return Hl;case Ql:return Vl;case Zl:return ql}return t});var eu=Xl,tu=Object.prototype.hasOwnProperty;var nu=yr.Uint8Array;function ru(e){var t=new e.constructor(e.byteLength);return new nu(t).set(new nu(e)),t}var ou=/\w*$/;var iu=br?br.prototype:void 0,au=iu?iu.valueOf:void 0;function su(e,t){var n=t?ru(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function lu(e,t,n){var r,o=e.constructor;switch(t){case"[object ArrayBuffer]":return ru(e);case"[object Boolean]":case"[object Date]":return new o(+e);case"[object DataView]":return function(e,t){var n=t?ru(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return su(e,n);case"[object Map]":case"[object Set]":return new o;case"[object Number]":case"[object String]":return new o(e);case"[object RegExp]":return function(e){var t=new e.constructor(e.source,ou.exec(e));return t.lastIndex=e.lastIndex,t}(e);case"[object Symbol]":return r=e,au?Object(au.call(r)):{}}}function uu(e){return"function"!=typeof e.constructor||Ri(e)?{}:bo(Ka(e))}var cu=Ji&&Ji.isMap,du=cu?Hi(cu):function(e){return Or(e)&&"[object Map]"==eu(e)};var pu=Ji&&Ji.isSet,fu=pu?Hi(pu):function(e){return Or(e)&&"[object Set]"==eu(e)},hu="[object Arguments]",gu="[object Function]",vu="[object Object]",mu={};function yu(e,t,n,r,o,i){var a,s=1&t,l=2&t,u=4&t;if(n&&(a=o?n(e,r,o,i):n(e)),void 0!==a)return a;if(!zr(e))return e;var c=Rr(e);if(c){if(a=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&tu.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!s)return Io(e,a)}else{var d=eu(e),p=d==gu||"[object GeneratorFunction]"==d;if(Fi(e))return Al(e,s);if(d==vu||d==hu||p&&!o){if(a=l||p?{}:uu(e),!s)return l?function(e,t){return wi(e,Tl(e),t)}(e,function(e,t){return e&&wi(t,ua(t),e)}(a,e)):function(e,t){return wi(e,Nl(e),t)}(e,Sl(a,e))}else{if(!mu[d])return o?e:{};a=lu(e,d,s)}}i||(i=new wl);var f=i.get(e);if(f)return f;i.set(e,a),fu(e)?e.forEach(function(r){a.add(yu(r,t,n,r,e,i))}):du(e)&&e.forEach(function(r,o){a.set(o,yu(r,t,n,o,e,i))});var h=c?void 0:(u?l?Wl:$l:l?ua:ra)(e);return Qo(h||e,function(r,o){h&&(r=e[o=r]),xi(a,o,yu(r,t,n,o,e,i))}),a}mu[hu]=mu["[object Array]"]=mu["[object ArrayBuffer]"]=mu["[object DataView]"]=mu["[object Boolean]"]=mu["[object Date]"]=mu["[object Float32Array]"]=mu["[object Float64Array]"]=mu["[object Int8Array]"]=mu["[object Int16Array]"]=mu["[object Int32Array]"]=mu["[object Map]"]=mu["[object Number]"]=mu[vu]=mu["[object RegExp]"]=mu["[object Set]"]=mu["[object String]"]=mu["[object Symbol]"]=mu["[object Uint8Array]"]=mu["[object Uint8ClampedArray]"]=mu["[object Uint16Array]"]=mu["[object Uint32Array]"]=!0,mu["[object Error]"]=mu[gu]=mu["[object WeakMap]"]=!1;function bu(e){return yu(e,4)}function _u(e){return yu(e,5)}function xu(e,t){return yu(e,5,t="function"==typeof t?t:void 0)}function wu(e,t){return yu(e,4,t="function"==typeof t?t:void 0)}function Su(){return new No(this.value(),this.__chain__)}function Eu(e){for(var t=-1,n=null==e?0:e.length,r=0,o=[];++t<n;){var i=e[t];i&&(o[r++]=i)}return o}function ku(){var e=arguments.length;if(!e)return[];for(var t=Array(e-1),n=arguments[0],r=e;r--;)t[r-1]=arguments[r];return Da(Rr(n)?Io(n):[n],Ua(t,1))}function Cu(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Aa;++t<n;)this.add(e[t])}function Ou(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function Au(e,t){return e.has(t)}Cu.prototype.add=Cu.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},Cu.prototype.has=function(e){return this.__data__.has(e)};function ju(e,t,n,r,o,i){var a=1&n,s=e.length,l=t.length;if(s!=l&&!(a&&l>s))return!1;var u=i.get(e),c=i.get(t);if(u&&c)return u==t&&c==e;var d=-1,p=!0,f=2&n?new Cu:void 0;for(i.set(e,t),i.set(t,e);++d<s;){var h=e[d],g=t[d];if(r)var v=a?r(g,h,d,t,e,i):r(h,g,d,e,t,i);if(void 0!==v){if(v)continue;p=!1;break}if(f){if(!Ou(t,function(e,t){if(!Au(f,t)&&(h===e||o(h,e,n,r,i)))return f.push(t)})){p=!1;break}}else if(h!==g&&!o(h,g,n,r,i)){p=!1;break}}return i.delete(e),i.delete(t),p}function Lu(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function Ru(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}var Mu=br?br.prototype:void 0,Pu=Mu?Mu.valueOf:void 0;var Nu=Object.prototype.hasOwnProperty;var Iu="[object Arguments]",Tu="[object Array]",Bu="[object Object]",$u=Object.prototype.hasOwnProperty;function Wu(e,t,n,r,o,i){var a=Rr(e),s=Rr(t),l=a?Tu:eu(e),u=s?Tu:eu(t),c=(l=l==Iu?Bu:l)==Bu,d=(u=u==Iu?Bu:u)==Bu,p=l==u;if(p&&Fi(e)){if(!Fi(t))return!1;a=!0,c=!1}if(p&&!c)return i||(i=new wl),a||Gi(e)?ju(e,t,n,r,o,i):function(e,t,n,r,o,i,a){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!i(new nu(e),new nu(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return bi(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var s=Lu;case"[object Set]":var l=1&r;if(s||(s=Ru),e.size!=t.size&&!l)return!1;var u=a.get(e);if(u)return u==t;r|=2,a.set(e,t);var c=ju(s(e),s(t),r,o,i,a);return a.delete(e),c;case"[object Symbol]":if(Pu)return Pu.call(e)==Pu.call(t)}return!1}(e,t,l,n,r,o,i);if(!(1&n)){var f=c&&$u.call(e,"__wrapped__"),h=d&&$u.call(t,"__wrapped__");if(f||h){var g=f?e.value():e,v=h?t.value():t;return i||(i=new wl),o(g,v,n,r,i)}}return!!p&&(i||(i=new wl),function(e,t,n,r,o,i){var a=1&n,s=$l(e),l=s.length;if(l!=$l(t).length&&!a)return!1;for(var u=l;u--;){var c=s[u];if(!(a?c in t:Nu.call(t,c)))return!1}var d=i.get(e),p=i.get(t);if(d&&p)return d==t&&p==e;var f=!0;i.set(e,t),i.set(t,e);for(var h=a;++u<l;){var g=e[c=s[u]],v=t[c];if(r)var m=a?r(v,g,c,t,e,i):r(g,v,c,e,t,i);if(!(void 0===m?g===v||o(g,v,n,r,i):m)){f=!1;break}h||(h="constructor"==c)}if(f&&!h){var y=e.constructor,b=t.constructor;y==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof y&&y instanceof y&&"function"==typeof b&&b instanceof b||(f=!1)}return i.delete(e),i.delete(t),f}(e,t,n,r,o,i))}function Du(e,t,n,r,o){return e===t||(null==e||null==t||!Or(e)&&!Or(t)?e!=e&&t!=t:Wu(e,t,n,r,Du,o))}function zu(e,t,n,r){var o=n.length,i=o,a=!r;if(null==e)return!i;for(e=Object(e);o--;){var s=n[o];if(a&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++o<i;){var l=(s=n[o])[0],u=e[l],c=s[1];if(a&&s[2]){if(void 0===u&&!(l in e))return!1}else{var d=new wl;if(r)var p=r(u,c,l,e,t,d);if(!(void 0===p?Du(c,u,3,r,d):p))return!1}}return!0}function Fu(e){return e==e&&!zr(e)}function Uu(e){for(var t=ra(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,Fu(o)]}return t}function Hu(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}function Vu(e){var t=Uu(e);return 1==t.length&&t[0][2]?Hu(t[0][0],t[0][1]):function(n){return n===e||zu(n,e,t)}}function qu(e,t){return null!=e&&t in Object(e)}function Ku(e,t,n){for(var r=-1,o=(t=Ia(t,e)).length,i=!1;++r<o;){var a=Ta(t[r]);if(!(i=null!=e&&n(e,a)))break;e=e[a]}return i||++r!=o?i:!!(o=null==e?0:e.length)&&Ci(o)&&si(a,o)&&(Rr(e)||Bi(e))}function Ju(e,t){return null!=e&&Ku(e,t,qu)}function Yu(e,t){return ya(e)&&Fu(t)?Hu(Ta(e),t):function(n){var r=$a(n,e);return void 0===r&&r===t?Ju(n,e):Du(t,r,3)}}function Gu(e){return function(t){return null==t?void 0:t[e]}}function Qu(e){return ya(e)?Gu(Ta(e)):function(e){return function(t){return Ba(t,e)}}(e)}function Zu(e){return"function"==typeof e?e:null==e?Qr:"object"==typeof e?Rr(e)?Yu(e[0],e[1]):Vu(e):Qu(e)}function Xu(e){var t=null==e?0:e.length,n=Zu;return e=t?Lr(e,function(e){if("function"!=typeof e[1])throw new TypeError("Expected a function");return[n(e[0]),e[1]]}):[],ki(function(n){for(var r=-1;++r<t;){var o=e[r];if(xo(o[0],this,n))return xo(o[1],this,n)}})}function ec(e,t,n){var r=n.length;if(null==e)return!r;for(e=Object(e);r--;){var o=n[r],i=t[o],a=e[o];if(void 0===a&&!(o in e)||!i(a))return!1}return!0}function tc(e){return function(e){var t=ra(e);return function(n){return ec(n,e,t)}}(yu(e,1))}function nc(e,t){return null==t||ec(e,t,ra(t))}function rc(e,t,n,r){for(var o=-1,i=null==e?0:e.length;++o<i;){var a=e[o];t(r,a,n(a),e)}return r}function oc(e){return function(t,n,r){for(var o=-1,i=Object(t),a=r(t),s=a.length;s--;){var l=a[e?s:++o];if(!1===n(i[l],l,i))break}return t}}var ic=oc();function ac(e,t){return e&&ic(e,t,ra)}function sc(e,t){return function(n,r){if(null==n)return n;if(!Oi(n))return e(n,r);for(var o=n.length,i=t?o:-1,a=Object(n);(t?i--:++i<o)&&!1!==r(a[i],i,a););return n}}var lc=sc(ac);function uc(e,t,n,r){return lc(e,function(e,o,i){t(r,e,n(e),i)}),r}function cc(e,t){return function(n,r){var o=Rr(n)?rc:uc,i=t?t():{};return o(n,e,Zu(r),i)}}var dc=Object.prototype.hasOwnProperty,pc=cc(function(e,t,n){dc.call(e,n)?++e[n]:yi(e,n,1)}),fc=pc;function hc(e,t){var n=bo(e);return null==t?n:Sl(n,t)}function gc(e,t,n){var r=vi(e,8,void 0,void 0,void 0,void 0,void 0,t=n?void 0:t);return r.placeholder=gc.placeholder,r}gc.placeholder={};function vc(e,t,n){var r=vi(e,16,void 0,void 0,void 0,void 0,void 0,t=n?void 0:t);return r.placeholder=vc.placeholder,r}vc.placeholder={};var mc=function(){return yr.Date.now()},yc=Math.max,bc=Math.min;function _c(e,t,n){var r,o,i,a,s,l,u=0,c=!1,d=!1,p=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function f(t){var n=r,i=o;return r=o=void 0,u=t,a=e.apply(i,n)}function h(e){var n=e-l;return void 0===l||n>=t||n<0||d&&e-u>=i}function g(){var e=mc();if(h(e))return v(e);s=setTimeout(g,function(e){var n=t-(e-l);return d?bc(n,i-(e-u)):n}(e))}function v(e){return s=void 0,p&&r?f(e):(r=o=void 0,a)}function m(){var e=mc(),n=h(e);if(r=arguments,o=this,l=e,n){if(void 0===s)return function(e){return u=e,s=setTimeout(g,t),c?f(e):a}(l);if(d)return clearTimeout(s),s=setTimeout(g,t),f(l)}return void 0===s&&(s=setTimeout(g,t)),a}return t=qr(t)||0,zr(n)&&(c=!!n.leading,i=(d="maxWait"in n)?yc(qr(n.maxWait)||0,t):i,p="trailing"in n?!!n.trailing:p),m.cancel=function(){void 0!==s&&clearTimeout(s),u=0,r=l=o=s=void 0},m.flush=function(){return void 0===s?a:v(mc())},m}function xc(e,t){return null==e||e!=e?t:e}var wc=Object.prototype,Sc=wc.hasOwnProperty,Ec=ki(function(e,t){e=Object(e);var n=-1,r=t.length,o=r>2?t[2]:void 0;for(o&&Ai(t[0],t[1],o)&&(r=1);++n<r;)for(var i=t[n],a=ua(i),s=-1,l=a.length;++s<l;){var u=a[s],c=e[u];(void 0===c||bi(c,wc[u])&&!Sc.call(e,u))&&(e[u]=i[u])}return e}),kc=Ec;function Cc(e,t,n){(void 0!==n&&!bi(e[t],n)||void 0===n&&!(t in e))&&yi(e,t,n)}function Oc(e){return Or(e)&&Oi(e)}function Ac(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}function jc(e){return wi(e,ua(e))}function Lc(e,t,n,r,o){e!==t&&ic(t,function(i,a){if(o||(o=new wl),zr(i))!function(e,t,n,r,o,i,a){var s=Ac(e,n),l=Ac(t,n),u=a.get(l);if(u)Cc(e,n,u);else{var c=i?i(s,l,n+"",e,t,a):void 0,d=void 0===c;if(d){var p=Rr(l),f=!p&&Fi(l),h=!p&&!f&&Gi(l);c=l,p||f||h?Rr(s)?c=s:Oc(s)?c=Io(s):f?(d=!1,c=Al(l,!0)):h?(d=!1,c=su(l,!0)):c=[]:Xa(l)||Bi(l)?(c=s,Bi(s)?c=jc(s):zr(s)&&!Zr(s)||(c=uu(l))):d=!1}d&&(a.set(l,c),o(c,l,r,i,a),a.delete(l)),Cc(e,n,c)}}(e,t,a,n,Lc,r,o);else{var s=r?r(Ac(e,a),i,a+"",e,t,o):void 0;void 0===s&&(s=i),Cc(e,a,s)}},ua)}function Rc(e,t,n,r,o,i){return zr(e)&&zr(t)&&(i.set(t,e),Lc(e,t,void 0,Rc,i),i.delete(t)),e}var Mc=ji(function(e,t,n,r){Lc(e,t,n,r)}),Pc=Mc,Nc=ki(function(e){return e.push(void 0,Rc),xo(Pc,void 0,e)});function Ic(e,t,n){if("function"!=typeof e)throw new TypeError("Expected a function");return setTimeout(function(){e.apply(void 0,n)},t)}var Tc=ki(function(e,t){return Ic(e,1,t)}),Bc=Tc,$c=ki(function(e,t,n){return Ic(e,qr(t)||0,n)}),Wc=$c;function Dc(e,t,n){for(var r=-1,o=null==e?0:e.length;++r<o;)if(n(t,e[r]))return!0;return!1}function zc(e,t,n,r){var o=-1,i=ti,a=!0,s=e.length,l=[],u=t.length;if(!s)return l;n&&(t=Lr(t,Hi(n))),r?(i=Dc,a=!1):t.length>=200&&(i=Au,a=!1,t=new Cu(t));e:for(;++o<s;){var c=e[o],d=null==n?c:n(c);if(c=r||0!==c?c:0,a&&d==d){for(var p=u;p--;)if(t[p]===d)continue e;l.push(c)}else i(t,d,r)||l.push(c)}return l}var Fc=ki(function(e,t){return Oc(e)?zc(e,Ua(t,1,Oc,!0)):[]}),Uc=Fc;function Hc(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}var Vc=ki(function(e,t){var n=Hc(t);return Oc(n)&&(n=void 0),Oc(e)?zc(e,Ua(t,1,Oc,!0),Zu(n)):[]}),qc=Vc,Kc=ki(function(e,t){var n=Hc(t);return Oc(n)&&(n=void 0),Oc(e)?zc(e,Ua(t,1,Oc,!0),void 0,n):[]}),Jc=Kc,Yc=Ir(function(e,t){return e/t},1);function Gc(e,t,n){var r=null==e?0:e.length;return r?cs(e,(t=n||void 0===t?1:Yr(t))<0?0:t,r):[]}function Qc(e,t,n){var r=null==e?0:e.length;return r?cs(e,0,(t=r-(t=n||void 0===t?1:Yr(t)))<0?0:t):[]}function Zc(e,t,n,r){for(var o=e.length,i=r?o:-1;(r?i--:++i<o)&&t(e[i],i,e););return n?cs(e,r?0:i,r?i+1:o):cs(e,r?i+1:0,r?o:i)}function Xc(e,t){return e&&e.length?Zc(e,Zu(t),!0,!0):[]}function ed(e,t){return e&&e.length?Zc(e,Zu(t),!0):[]}function td(e){return"function"==typeof e?e:Qr}function nd(e,t){return(Rr(e)?Qo:lc)(e,td(t))}function rd(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}var od=oc(!0);function id(e,t){return e&&od(e,t,ra)}var ad=sc(id,!0);function sd(e,t){return(Rr(e)?rd:ad)(e,td(t))}function ld(e,t,n){e=Na(e),t=Nr(t);var r=e.length,o=n=void 0===n?r:_l(Yr(n),0,r);return(n-=t.length)>=0&&e.slice(n,o)==t}function ud(e){return function(t){var n=eu(t);return"[object Map]"==n?Lu(t):"[object Set]"==n?function(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=[e,e]}),n}(t):function(e,t){return Lr(t,function(t){return[t,e[t]]})}(t,e(t))}}var cd=ud(ra),dd=ud(ua),pd=Rs({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"}),fd=/[&<>"']/g,hd=RegExp(fd.source);function gd(e){return(e=Na(e))&&hd.test(e)?e.replace(fd,pd):e}var vd=/[\\^$.*+?()[\]{}|]/g,md=RegExp(vd.source);function yd(e){return(e=Na(e))&&md.test(e)?e.replace(vd,"\\$&"):e}function bd(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function _d(e,t){var n=!0;return lc(e,function(e,r,o){return n=!!t(e,r,o)}),n}function xd(e,t,n){var r=Rr(e)?bd:_d;return n&&Ai(e,t,n)&&(t=void 0),r(e,Zu(t))}function wd(e){return e?_l(Yr(e),0,4294967295):0}function Sd(e,t,n,r){var o=null==e?0:e.length;return o?(n&&"number"!=typeof n&&Ai(e,t,n)&&(n=0,r=o),function(e,t,n,r){var o=e.length;for((n=Yr(n))<0&&(n=-n>o?0:o+n),(r=void 0===r||r>o?o:Yr(r))<0&&(r+=o),r=n>r?0:wd(r);n<r;)e[n++]=t;return e}(e,t,n,r)):[]}function Ed(e,t){var n=[];return lc(e,function(e,r,o){t(e,r,o)&&n.push(e)}),n}function kd(e,t){return(Rr(e)?jl:Ed)(e,Zu(t))}function Cd(e){return function(t,n,r){var o=Object(t);if(!Oi(t)){var i=Zu(n);t=ra(t),n=function(e){return i(o[e],e,o)}}var a=e(t,n,r);return a>-1?o[i?t[a]:a]:void 0}}var Od=Math.max;function Ad(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:Yr(n);return o<0&&(o=Od(r+o,0)),Zo(e,Zu(t),o)}var jd=Cd(Ad);function Ld(e,t,n){var r;return n(e,function(e,n,o){if(t(e,n,o))return r=n,!1}),r}function Rd(e,t){return Ld(e,Zu(t),ac)}var Md=Math.max,Pd=Math.min;function Nd(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=r-1;return void 0!==n&&(o=Yr(n),o=n<0?Md(r+o,0):Pd(o,r-1)),Zo(e,Zu(t),o,!0)}var Id=Cd(Nd);function Td(e,t){return Ld(e,Zu(t),id)}function Bd(e){return e&&e.length?e[0]:void 0}function $d(e,t){var n=-1,r=Oi(e)?Array(e.length):[];return lc(e,function(e,o,i){r[++n]=t(e,o,i)}),r}function Wd(e,t){return(Rr(e)?Lr:$d)(e,Zu(t))}function Dd(e,t){return Ua(Wd(e,t),1)}var zd=1/0;function Fd(e,t){return Ua(Wd(e,t),zd)}function Ud(e,t,n){return n=void 0===n?1:Yr(n),Ua(Wd(e,t),n)}var Hd=1/0;function Vd(e){return(null==e?0:e.length)?Ua(e,Hd):[]}function qd(e,t){return(null==e?0:e.length)?Ua(e,t=void 0===t?1:Yr(t)):[]}function Kd(e){return vi(e,512)}var Jd=hl("floor");function Yd(e){return Va(function(t){var n=t.length,r=n,o=No.prototype.thru;for(e&&t.reverse();r--;){var i=t[r];if("function"!=typeof i)throw new TypeError("Expected a function");if(o&&!a&&"wrapper"==Po(i))var a=new No([],!0)}for(r=a?r:n;++r<n;){var s=Po(i=t[r]),l="wrapper"==s?Lo(i):void 0;a=l&&Wo(l[0])&&424==l[1]&&!l[4].length&&1==l[9]?a[Po(l[0])].apply(a,l[3]):1==i.length&&Wo(i)?a[s]():a.thru(i)}return function(){var e=arguments,r=e[0];if(a&&1==e.length&&Rr(r))return a.plant(r).value();for(var o=0,i=n?t[o].apply(this,e):r;++o<n;)i=t[o].call(this,i);return i}})}var Gd=Yd(),Qd=Yd(!0);function Zd(e,t){return null==e?e:ic(e,td(t),ua)}function Xd(e,t){return null==e?e:od(e,td(t),ua)}function ep(e,t){return e&&ac(e,td(t))}function tp(e,t){return e&&id(e,td(t))}function np(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var o=e[t];r[o[0]]=o[1]}return r}function rp(e,t){return jl(t,function(t){return Zr(e[t])})}function op(e){return null==e?[]:rp(e,ra(e))}function ip(e){return null==e?[]:rp(e,ua(e))}var ap=Object.prototype.hasOwnProperty,sp=cc(function(e,t,n){ap.call(e,n)?e[n].push(t):yi(e,n,[t])}),lp=sp;function up(e,t){return e>t}function cp(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=qr(t),n=qr(n)),e(t,n)}}var dp=cp(up),pp=cp(function(e,t){return e>=t}),fp=Object.prototype.hasOwnProperty;function hp(e,t){return null!=e&&fp.call(e,t)}function gp(e,t){return null!=e&&Ku(e,t,hp)}var vp=Math.max,mp=Math.min;function yp(e,t,n){return t=Jr(t),void 0===n?(n=t,t=0):n=Jr(n),function(e,t,n){return e>=mp(t,n)&&e<vp(t,n)}(e=qr(e),t,n)}function bp(e){return"string"==typeof e||!Rr(e)&&Or(e)&&"[object String]"==Cr(e)}function _p(e,t){return Lr(t,function(t){return e[t]})}function xp(e){return null==e?[]:_p(e,ra(e))}var wp=Math.max;function Sp(e,t,n,r){e=Oi(e)?e:xp(e),n=n&&!r?Yr(n):0;var o=e.length;return n<0&&(n=wp(o+n,0)),bp(e)?n<=o&&e.indexOf(t,n)>-1:!!o&&ei(e,t,n)>-1}var Ep=Math.max;function kp(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:Yr(n);return o<0&&(o=Ep(r+o,0)),ei(e,t,o)}function Cp(e){return(null==e?0:e.length)?cs(e,0,-1):[]}var Op=Math.min;function Ap(e,t,n){for(var r=n?Dc:ti,o=e[0].length,i=e.length,a=i,s=Array(i),l=1/0,u=[];a--;){var c=e[a];a&&t&&(c=Lr(c,Hi(t))),l=Op(c.length,l),s[a]=!n&&(t||o>=120&&c.length>=120)?new Cu(a&&c):void 0}c=e[0];var d=-1,p=s[0];e:for(;++d<o&&u.length<l;){var f=c[d],h=t?t(f):f;if(f=n||0!==f?f:0,!(p?Au(p,h):r(u,h,n))){for(a=i;--a;){var g=s[a];if(!(g?Au(g,h):r(e[a],h,n)))continue e}p&&p.push(h),u.push(f)}}return u}function jp(e){return Oc(e)?e:[]}var Lp=ki(function(e){var t=Lr(e,jp);return t.length&&t[0]===e[0]?Ap(t):[]}),Rp=ki(function(e){var t=Hc(e),n=Lr(e,jp);return t===Hc(n)?t=void 0:n.pop(),n.length&&n[0]===e[0]?Ap(n,Zu(t)):[]}),Mp=Rp,Pp=ki(function(e){var t=Hc(e),n=Lr(e,jp);return(t="function"==typeof t?t:void 0)&&n.pop(),n.length&&n[0]===e[0]?Ap(n,void 0,t):[]});function Np(e,t){return function(n,r){return function(e,t,n,r){return ac(e,function(e,o,i){t(r,n(e),o,i)}),r}(n,e,t(r),{})}}var Ip=Object.prototype.toString,Tp=Np(function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Ip.call(t)),e[t]=n},qo(Qr)),Bp=Tp,$p=Object.prototype,Wp=$p.hasOwnProperty,Dp=$p.toString,zp=Np(function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Dp.call(t)),Wp.call(e,t)?e[t].push(n):e[t]=[n]},Zu),Fp=zp;function Up(e,t){return t.length<2?e:Ba(e,cs(t,0,-1))}function Hp(e,t,n){var r=null==(e=Up(e,t=Ia(t,e)))?e:e[Ta(Hc(t))];return null==r?void 0:xo(r,e,n)}var Vp=ki(Hp),qp=ki(function(e,t,n){var r=-1,o="function"==typeof t,i=Oi(e)?Array(e.length):[];return lc(e,function(e){i[++r]=o?xo(t,e,n):Hp(e,t,n)}),i}),Kp=qp;var Jp=Ji&&Ji.isArrayBuffer,Yp=Jp?Hi(Jp):function(e){return Or(e)&&"[object ArrayBuffer]"==Cr(e)};function Gp(e){return!0===e||!1===e||Or(e)&&"[object Boolean]"==Cr(e)}var Qp=Ji&&Ji.isDate,Zp=Qp?Hi(Qp):function(e){return Or(e)&&"[object Date]"==Cr(e)};function Xp(e){return Or(e)&&1===e.nodeType&&!Xa(e)}var ef=Object.prototype.hasOwnProperty;function tf(e){if(null==e)return!0;if(Oi(e)&&(Rr(e)||"string"==typeof e||"function"==typeof e.splice||Fi(e)||Gi(e)||Bi(e)))return!e.length;var t=eu(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(Ri(e))return!na(e).length;for(var n in e)if(ef.call(e,n))return!1;return!0}function nf(e,t){return Du(e,t)}function rf(e,t,n){var r=(n="function"==typeof n?n:void 0)?n(e,t):void 0;return void 0===r?Du(e,t,void 0,n):!!r}var of=yr.isFinite;function af(e){return"number"==typeof e&&of(e)}function sf(e){return"number"==typeof e&&e==Yr(e)}function lf(e,t){return e===t||zu(e,t,Uu(t))}function uf(e,t,n){return n="function"==typeof n?n:void 0,zu(e,t,Uu(t),n)}function cf(e){return"number"==typeof e||Or(e)&&"[object Number]"==Cr(e)}function df(e){return cf(e)&&e!=+e}var pf=eo?Zr:$i;function ff(e){if(pf(e))throw new Error("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return co(e)}function hf(e){return null==e}function gf(e){return null===e}var vf=Ji&&Ji.isRegExp,mf=vf?Hi(vf):function(e){return Or(e)&&"[object RegExp]"==Cr(e)},yf=9007199254740991;function bf(e){return sf(e)&&e>=-9007199254740991&&e<=yf}function _f(e){return void 0===e}function xf(e){return Or(e)&&"[object WeakMap]"==eu(e)}function wf(e){return Or(e)&&"[object WeakSet]"==Cr(e)}function Sf(e){return Zu("function"==typeof e?e:yu(e,1))}var Ef=Array.prototype.join;function kf(e,t){return null==e?"":Ef.call(e,t)}var Cf=ll(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()}),Of=Cf,Af=cc(function(e,t,n){yi(e,n,t)}),jf=Af;var Lf=Math.max,Rf=Math.min;function Mf(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=r;return void 0!==n&&(o=(o=Yr(n))<0?Lf(r+o,0):Rf(o,r-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,o):Zo(e,Xo,o,!0)}var Pf=ll(function(e,t,n){return e+(n?" ":"")+t.toLowerCase()}),Nf=Pf,If=Os("toLowerCase");function Tf(e,t){return e<t}var Bf=cp(Tf),$f=cp(function(e,t){return e<=t});function Wf(e,t){var n={};return t=Zu(t),ac(e,function(e,r,o){yi(n,t(e,r,o),e)}),n}function Df(e,t){var n={};return t=Zu(t),ac(e,function(e,r,o){yi(n,r,t(e,r,o))}),n}function zf(e){return Vu(yu(e,1))}function Ff(e,t){return Yu(e,yu(t,1))}function Uf(e,t,n){for(var r=-1,o=e.length;++r<o;){var i=e[r],a=t(i);if(null!=a&&(void 0===s?a==a&&!Ar(a):n(a,s)))var s=a,l=i}return l}function Hf(e){return e&&e.length?Uf(e,Qr,up):void 0}function Vf(e,t){return e&&e.length?Uf(e,Zu(t),up):void 0}function qf(e,t){for(var n,r=-1,o=e.length;++r<o;){var i=t(e[r]);void 0!==i&&(n=void 0===n?i:n+i)}return n}function Kf(e,t){var n=null==e?0:e.length;return n?qf(e,t)/n:NaN}function Jf(e){return Kf(e,Qr)}function Yf(e,t){return Kf(e,Zu(t))}var Gf=ji(function(e,t,n){Lc(e,t,n)}),Qf=Gf,Zf=ki(function(e,t){return function(n){return Hp(n,e,t)}}),Xf=Zf,eh=ki(function(e,t){return function(n){return Hp(e,n,t)}}),th=eh;function nh(e){return e&&e.length?Uf(e,Qr,Tf):void 0}function rh(e,t){return e&&e.length?Uf(e,Zu(t),Tf):void 0}function oh(e,t,n){var r=ra(t),o=rp(t,r),i=!(zr(n)&&"chain"in n&&!n.chain),a=Zr(e);return Qo(o,function(n){var r=t[n];e[n]=r,a&&(e.prototype[n]=function(){var t=this.__chain__;if(i||t){var n=e(this.__wrapped__);return(n.__actions__=Io(this.__actions__)).push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,Da([this.value()],arguments))})}),e}var ih=Ir(function(e,t){return e*t},1);function ah(e){if("function"!=typeof e)throw new TypeError("Expected a function");return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}var sh=br?br.iterator:void 0;function lh(e){if(!e)return[];if(Oi(e))return bp(e)?Cs(e):Io(e);if(sh&&e[sh])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[sh]());var t=eu(e);return("[object Map]"==t?Lu:"[object Set]"==t?Ru:xp)(e)}function uh(){void 0===this.__values__&&(this.__values__=lh(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?void 0:this.__values__[this.__index__++]}}function ch(e,t){var n=e.length;if(n)return si(t+=t<0?n:0,n)?e[t]:void 0}function dh(e,t){return e&&e.length?ch(e,Yr(t)):void 0}function ph(e){return e=Yr(e),ki(function(t){return ch(t,e)})}var fh=Object.prototype.hasOwnProperty;function hh(e,t){var n=-1,r=(t=Ia(t,e)).length;if(!r)return!0;for(var o=null==e||"object"!=typeof e&&"function"!=typeof e;++n<r;){var i=t[n];if("string"==typeof i){if("__proto__"===i&&!fh.call(e,"__proto__"))return!1;if("constructor"===i&&n+1<r&&"string"==typeof t[n+1]&&"prototype"===t[n+1]){if(o&&0===n)continue;return!1}}}var a=Up(e,t);return null==a||delete a[Ta(Hc(t))]}function gh(e){return Xa(e)?void 0:e}var vh=Va(function(e,t){var n={};if(null==e)return n;var r=!1;t=Lr(t,function(t){return t=Ia(t,e),r||(r=t.length>1),t}),wi(e,Wl(e),n),r&&(n=yu(n,7,gh));for(var o=t.length;o--;)hh(n,t[o]);return n}),mh=vh;function yh(e,t,n,r){if(!zr(e))return e;for(var o=-1,i=(t=Ia(t,e)).length,a=i-1,s=e;null!=s&&++o<i;){var l=Ta(t[o]),u=n;if("__proto__"===l||"constructor"===l||"prototype"===l)return e;if(o!=a){var c=s[l];void 0===(u=r?r(c,l,s):void 0)&&(u=zr(c)?c:si(t[o+1])?[]:{})}xi(s,l,u),s=s[l]}return e}function bh(e,t,n){for(var r=-1,o=t.length,i={};++r<o;){var a=t[r],s=Ba(e,a);n(s,a)&&yh(i,Ia(a,e),s)}return i}function _h(e,t){if(null==e)return{};var n=Lr(Wl(e),function(e){return[e]});return t=Zu(t),bh(e,n,function(e,n){return t(e,n[0])})}function xh(e,t){return _h(e,ah(Zu(t)))}function wh(e){return rs(2,e)}function Sh(e,t){if(e!==t){var n=void 0!==e,r=null===e,o=e==e,i=Ar(e),a=void 0!==t,s=null===t,l=t==t,u=Ar(t);if(!s&&!u&&!i&&e>t||i&&a&&l&&!s&&!u||r&&a&&l||!n&&l||!o)return 1;if(!r&&!i&&!u&&e<t||u&&n&&o&&!r&&!i||s&&n&&o||!a&&o||!l)return-1}return 0}function Eh(e,t,n){t=t.length?Lr(t,function(e){return Rr(e)?function(t){return Ba(t,1===e.length?e[0]:e)}:e}):[Qr];var r=-1;t=Lr(t,Hi(Zu));var o=$d(e,function(e,n,o){var i=Lr(t,function(t){return t(e)});return{criteria:i,index:++r,value:e}});return function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}(o,function(e,t){return function(e,t,n){for(var r=-1,o=e.criteria,i=t.criteria,a=o.length,s=n.length;++r<a;){var l=Sh(o[r],i[r]);if(l)return r>=s?l:l*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)})}function kh(e,t,n,r){return null==e?[]:(Rr(t)||(t=null==t?[]:[t]),Rr(n=r?void 0:n)||(n=null==n?[]:[n]),Eh(e,t,n))}function Ch(e){return Va(function(t){return t=Lr(t,Hi(Zu)),ki(function(n){var r=this;return e(t,function(e){return xo(e,r,n)})})})}var Oh=Ch(Lr),Ah=ki,jh=Math.min,Lh=Ah(function(e,t){var n=(t=1==t.length&&Rr(t[0])?Lr(t[0],Hi(Zu)):Lr(Ua(t,1),Hi(Zu))).length;return ki(function(r){for(var o=-1,i=jh(r.length,n);++o<i;)r[o]=t[o].call(this,r[o]);return xo(e,this,r)})}),Rh=Lh,Mh=Ch(bd),Ph=Ch(Ou),Nh=Math.floor;function Ih(e,t){var n="";if(!e||t<1||t>9007199254740991)return n;do{t%2&&(n+=e),(t=Nh(t/2))&&(e+=e)}while(t);return n}var Th=Gu("length"),Bh="\\ud800-\\udfff",$h="["+Bh+"]",Wh="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",Dh="\\ud83c[\\udffb-\\udfff]",zh="[^"+Bh+"]",Fh="(?:\\ud83c[\\udde6-\\uddff]){2}",Uh="[\\ud800-\\udbff][\\udc00-\\udfff]",Hh="(?:"+Wh+"|"+Dh+")"+"?",Vh="[\\ufe0e\\ufe0f]?",qh=Vh+Hh+("(?:\\u200d(?:"+[zh,Fh,Uh].join("|")+")"+Vh+Hh+")*"),Kh="(?:"+[zh+Wh+"?",Wh,Fh,Uh,$h].join("|")+")",Jh=RegExp(Dh+"(?="+Dh+")|"+Kh+qh,"g");function Yh(e){return fs(e)?function(e){for(var t=Jh.lastIndex=0;Jh.test(e);)++t;return t}(e):Th(e)}var Gh=Math.ceil;function Qh(e,t){var n=(t=void 0===t?" ":Nr(t)).length;if(n<2)return n?Ih(t,e):t;var r=Ih(t,Gh(e/Yh(t)));return fs(t)?ds(Cs(r),0,e).join(""):r.slice(0,e)}var Zh=Math.ceil,Xh=Math.floor;function eg(e,t,n){e=Na(e);var r=(t=Yr(t))?Yh(e):0;if(!t||r>=t)return e;var o=(t-r)/2;return Qh(Xh(o),n)+e+Qh(Zh(o),n)}function tg(e,t,n){e=Na(e);var r=(t=Yr(t))?Yh(e):0;return t&&r<t?e+Qh(t-r,n):e}function ng(e,t,n){e=Na(e);var r=(t=Yr(t))?Yh(e):0;return t&&r<t?Qh(t-r,n)+e:e}var rg=/^\s+/,og=yr.parseInt;function ig(e,t,n){return n||null==t?t=0:t&&(t=+t),og(Na(e).replace(rg,""),t||0)}var ag=ki(function(e,t){return vi(e,32,void 0,t,ci(t,ii(ag)))});ag.placeholder={};var sg=ag,lg=ki(function(e,t){return vi(e,64,void 0,t,ci(t,ii(lg)))});lg.placeholder={};var ug=lg,cg=cc(function(e,t,n){e[n?0:1].push(t)},function(){return[[],[]]}),dg=cg;var pg=Va(function(e,t){return null==e?{}:function(e,t){return bh(e,t,function(t,n){return Ju(e,n)})}(e,t)}),fg=pg;function hg(e){for(var t,n=this;n instanceof Co;){var r=To(n);r.__index__=0,r.__values__=void 0,t?o.__wrapped__=r:t=r;var o=r;n=n.__wrapped__}return o.__wrapped__=e,t}function gg(e){return function(t){return null==e?void 0:Ba(e,t)}}function vg(e,t,n,r){for(var o=n-1,i=e.length;++o<i;)if(r(e[o],t))return o;return-1}var mg=Array.prototype.splice;function yg(e,t,n,r){var o=r?vg:ei,i=-1,a=t.length,s=e;for(e===t&&(t=Io(t)),n&&(s=Lr(e,Hi(n)));++i<a;)for(var l=0,u=t[i],c=n?n(u):u;(l=o(s,c,l,r))>-1;)s!==e&&mg.call(s,l,1),mg.call(e,l,1);return e}function bg(e,t){return e&&e.length&&t&&t.length?yg(e,t):e}var _g=ki(bg);function xg(e,t,n){return e&&e.length&&t&&t.length?yg(e,t,Zu(n)):e}function wg(e,t,n){return e&&e.length&&t&&t.length?yg(e,t,void 0,n):e}var Sg=Array.prototype.splice;function Eg(e,t){for(var n=e?t.length:0,r=n-1;n--;){var o=t[n];if(n==r||o!==i){var i=o;si(o)?Sg.call(e,o,1):hh(e,o)}}return e}var kg=Va(function(e,t){var n=null==e?0:e.length,r=Wa(e,t);return Eg(e,Lr(t,function(e){return si(e,n)?+e:e}).sort(Sh)),r}),Cg=kg,Og=Math.floor,Ag=Math.random;function jg(e,t){return e+Og(Ag()*(t-e+1))}var Lg=parseFloat,Rg=Math.min,Mg=Math.random;function Pg(e,t,n){if(n&&"boolean"!=typeof n&&Ai(e,t,n)&&(t=n=void 0),void 0===n&&("boolean"==typeof t?(n=t,t=void 0):"boolean"==typeof e&&(n=e,e=void 0)),void 0===e&&void 0===t?(e=0,t=1):(e=Jr(e),void 0===t?(t=e,e=0):t=Jr(t)),e>t){var r=e;e=t,t=r}if(n||e%1||t%1){var o=Mg();return Rg(e+o*(t-e+Lg("1e-"+((o+"").length-1))),t)}return jg(e,t)}var Ng=Math.ceil,Ig=Math.max;function Tg(e){return function(t,n,r){return r&&"number"!=typeof r&&Ai(t,n,r)&&(n=r=void 0),t=Jr(t),void 0===n?(n=t,t=0):n=Jr(n),function(e,t,n,r){for(var o=-1,i=Ig(Ng((t-e)/(n||1)),0),a=Array(i);i--;)a[r?i:++o]=e,e+=n;return a}(t,n,r=void 0===r?t<n?1:-1:Jr(r),e)}}var Bg=Tg(),$g=Tg(!0),Wg=Va(function(e,t){return vi(e,256,void 0,void 0,void 0,t)}),Dg=Wg;function zg(e,t,n,r,o){return o(e,function(e,o,i){n=r?(r=!1,e):t(n,e,o,i)}),n}function Fg(e,t,n){var r=Rr(e)?Ls:zg,o=arguments.length<3;return r(e,Zu(t),n,o,lc)}function Ug(e,t,n,r){var o=null==e?0:e.length;for(r&&o&&(n=e[--o]);o--;)n=t(n,e[o],o,e);return n}function Hg(e,t,n){var r=Rr(e)?Ug:zg,o=arguments.length<3;return r(e,Zu(t),n,o,ad)}function Vg(e,t){return(Rr(e)?jl:Ed)(e,ah(Zu(t)))}function qg(e,t){var n=[];if(!e||!e.length)return n;var r=-1,o=[],i=e.length;for(t=Zu(t);++r<i;){var a=e[r];t(a,r,e)&&(n.push(a),o.push(r))}return Eg(e,o),n}function Kg(e,t,n){return t=(n?Ai(e,t,n):void 0===t)?1:Yr(t),Ih(Na(e),t)}function Jg(){var e=arguments,t=Na(e[0]);return e.length<3?t:t.replace(e[1],e[2])}function Yg(e,t){if("function"!=typeof e)throw new TypeError("Expected a function");return ki(e,t=void 0===t?t:Yr(t))}function Gg(e,t,n){var r=-1,o=(t=Ia(t,e)).length;for(o||(o=1,e=void 0);++r<o;){var i=null==e?void 0:e[Ta(t[r])];void 0===i&&(r=o,i=n),e=Zr(i)?i.call(e):i}return e}var Qg=Array.prototype.reverse;function Zg(e){return null==e?e:Qg.call(e)}var Xg=hl("round");function ev(e){var t=e.length;return t?e[jg(0,t-1)]:void 0}function tv(e){return ev(xp(e))}function nv(e){return(Rr(e)?ev:tv)(e)}function rv(e,t){var n=-1,r=e.length,o=r-1;for(t=void 0===t?r:t;++n<t;){var i=jg(n,o),a=e[i];e[i]=e[n],e[n]=a}return e.length=t,e}function ov(e,t){return rv(Io(e),_l(t,0,e.length))}function iv(e,t){var n=xp(e);return rv(n,_l(t,0,n.length))}function av(e,t,n){return t=(n?Ai(e,t,n):void 0===t)?1:Yr(t),(Rr(e)?ov:iv)(e,t)}function sv(e,t,n){return null==e?e:yh(e,t,n)}function lv(e,t,n,r){return r="function"==typeof r?r:void 0,null==e?e:yh(e,t,n,r)}function uv(e){return rv(Io(e))}function cv(e){return rv(xp(e))}function dv(e){return(Rr(e)?uv:cv)(e)}function pv(e){if(null==e)return 0;if(Oi(e))return bp(e)?Yh(e):e.length;var t=eu(e);return"[object Map]"==t||"[object Set]"==t?e.size:na(e).length}function fv(e,t,n){var r=null==e?0:e.length;return r?(n&&"number"!=typeof n&&Ai(e,t,n)?(t=0,n=r):(t=null==t?0:Yr(t),n=void 0===n?r:Yr(n)),cs(e,t,n)):[]}var hv=ll(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}),gv=hv;function vv(e,t){var n;return lc(e,function(e,r,o){return!(n=t(e,r,o))}),!!n}function mv(e,t,n){var r=Rr(e)?Ou:vv;return n&&Ai(e,t,n)&&(t=void 0),r(e,Zu(t))}var yv=ki(function(e,t){if(null==e)return[];var n=t.length;return n>1&&Ai(e,t[0],t[1])?t=[]:n>2&&Ai(t[0],t[1],t[2])&&(t=[t[0]]),Eh(e,Ua(t,1),[])}),bv=yv,_v=Math.floor,xv=Math.min;function wv(e,t,n,r){var o=0,i=null==e?0:e.length;if(0===i)return 0;for(var a=(t=n(t))!=t,s=null===t,l=Ar(t),u=void 0===t;o<i;){var c=_v((o+i)/2),d=n(e[c]),p=void 0!==d,f=null===d,h=d==d,g=Ar(d);if(a)var v=r||h;else v=u?h&&(r||p):s?h&&p&&(r||!f):l?h&&p&&!f&&(r||!g):!f&&!g&&(r?d<=t:d<t);v?o=c+1:i=c}return xv(i,4294967294)}function Sv(e,t,n){var r=0,o=null==e?r:e.length;if("number"==typeof t&&t==t&&o<=2147483647){for(;r<o;){var i=r+o>>>1,a=e[i];null!==a&&!Ar(a)&&(n?a<=t:a<t)?r=i+1:o=i}return o}return wv(e,t,Qr,n)}function Ev(e,t){return Sv(e,t)}function kv(e,t,n){return wv(e,t,Zu(n))}function Cv(e,t){var n=null==e?0:e.length;if(n){var r=Sv(e,t);if(r<n&&bi(e[r],t))return r}return-1}function Ov(e,t){return Sv(e,t,!0)}function Av(e,t,n){return wv(e,t,Zu(n),!0)}function jv(e,t){if(null==e?0:e.length){var n=Sv(e,t,!0)-1;if(bi(e[n],t))return n}return-1}function Lv(e,t){for(var n=-1,r=e.length,o=0,i=[];++n<r;){var a=e[n],s=t?t(a):a;if(!n||!bi(s,l)){var l=s;i[o++]=0===a?0:a}}return i}function Rv(e){return e&&e.length?Lv(e):[]}function Mv(e,t){return e&&e.length?Lv(e,Zu(t)):[]}function Pv(e,t,n){return n&&"number"!=typeof n&&Ai(e,t,n)&&(t=n=void 0),(n=void 0===n?4294967295:n>>>0)?(e=Na(e))&&("string"==typeof t||null!=t&&!mf(t))&&!(t=Nr(t))&&fs(e)?ds(Cs(e),0,n):e.split(t,n):[]}var Nv=Math.max;function Iv(e,t){if("function"!=typeof e)throw new TypeError("Expected a function");return t=null==t?0:Nv(Yr(t),0),ki(function(n){var r=n[t],o=ds(n,0,t);return r&&Da(o,r),xo(e,this,o)})}var Tv=ll(function(e,t,n){return e+(n?" ":"")+As(t)}),Bv=Tv;function $v(e,t,n){return e=Na(e),n=null==n?0:_l(Yr(n),0,e.length),t=Nr(t),e.slice(n,n+t.length)==t}function Wv(){return{}}function Dv(){return""}function zv(){return!0}var Fv=Ir(function(e,t){return e-t},0);function Uv(e){return e&&e.length?qf(e,Qr):0}function Hv(e,t){return e&&e.length?qf(e,Zu(t)):0}function Vv(e){var t=null==e?0:e.length;return t?cs(e,1,t):[]}function qv(e,t,n){return e&&e.length?cs(e,0,(t=n||void 0===t?1:Yr(t))<0?0:t):[]}function Kv(e,t,n){var r=null==e?0:e.length;return r?cs(e,(t=r-(t=n||void 0===t?1:Yr(t)))<0?0:t,r):[]}function Jv(e,t){return e&&e.length?Zc(e,Zu(t),!1,!0):[]}function Yv(e,t){return e&&e.length?Zc(e,Zu(t)):[]}function Gv(e,t){return t(e),e}var Qv=Object.prototype,Zv=Qv.hasOwnProperty;function Xv(e,t,n,r){return void 0===e||bi(e,Qv[n])&&!Zv.call(r,n)?t:e}var em={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"};function tm(e){return"\\"+em[e]}var nm=/<%=([\s\S]+?)%>/g,rm={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:nm,variable:"",imports:{_:{escape:gd}}},om=/\b__p \+= '';/g,im=/\b(__p \+=) '' \+/g,am=/(__e\(.*?\)|\b__t\)) \+\n'';/g,sm=/[()=,{}\[\]\/\s]/,lm=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,um=/($^)/,cm=/['\n\r\u2028\u2029\\]/g,dm=Object.prototype.hasOwnProperty;function pm(e,t,n){var r=rm.imports._.templateSettings||rm;n&&Ai(e,t,n)&&(t=void 0),e=Na(e),t=fa({},t,r,Xv);var o,i,a=fa({},t.imports,r.imports,Xv),s=ra(a),l=_p(a,s),u=0,c=t.interpolate||um,d="__p += '",p=RegExp((t.escape||um).source+"|"+c.source+"|"+(c===nm?lm:um).source+"|"+(t.evaluate||um).source+"|$","g"),f=dm.call(t,"sourceURL")?"//# sourceURL="+(t.sourceURL+"").replace(/\s/g," ")+"\n":"";e.replace(p,function(t,n,r,a,s,l){return r||(r=a),d+=e.slice(u,l).replace(cm,tm),n&&(o=!0,d+="' +\n__e("+n+") +\n'"),s&&(i=!0,d+="';\n"+s+";\n__p += '"),r&&(d+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),u=l+t.length,t}),d+="';\n";var h=dm.call(t,"variable")&&t.variable;if(h){if(sm.test(h))throw new Error("Invalid `variable` option passed into `_.template`")}else d="with (obj) {\n"+d+"\n}\n";d=(i?d.replace(om,""):d).replace(im,"$1").replace(am,"$1;"),d="function("+(h||"obj")+") {\n"+(h?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(i?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var g=ns(function(){return Function(s,f+"return "+d).apply(void 0,l)});if(g.source=d,es(g))throw g;return g}function fm(e,t,n){var r=!0,o=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return zr(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),_c(e,t,{leading:r,maxWait:t,trailing:o})}function hm(e,t){return t(e)}var gm=4294967295,vm=Math.min;function mm(e,t){if((e=Yr(e))<1||e>9007199254740991)return[];var n=gm,r=vm(e,gm);t=td(t),e-=gm;for(var o=Mi(r,t);++n<e;)t(n);return o}function ym(){return this}function bm(e,t){var n=e;return n instanceof Oo&&(n=n.value()),Ls(t,function(e,t){return t.func.apply(t.thisArg,Da([e],t.args))},n)}function _m(){return bm(this.__wrapped__,this.__actions__)}function xm(e){return Na(e).toLowerCase()}function wm(e){return Rr(e)?Lr(e,Ta):Ar(e)?[e]:Io(Pa(Na(e)))}var Sm=9007199254740991;function Em(e){return e?_l(Yr(e),-9007199254740991,Sm):0===e?e:0}function km(e){return Na(e).toUpperCase()}function Cm(e,t,n){var r=Rr(e),o=r||Fi(e)||Gi(e);if(t=Zu(t),null==n){var i=e&&e.constructor;n=o?r?new i:[]:zr(e)&&Zr(i)?bo(Ka(e)):{}}return(o?Qo:ac)(e,function(e,r,o){return t(n,e,r,o)}),n}function Om(e,t){for(var n=e.length;n--&&ei(t,e[n],0)>-1;);return n}function Am(e,t){for(var n=-1,r=e.length;++n<r&&ei(t,e[n],0)>-1;);return n}function jm(e,t,n){if((e=Na(e))&&(n||void 0===t))return Dr(e);if(!e||!(t=Nr(t)))return e;var r=Cs(e),o=Cs(t);return ds(r,Am(r,o),Om(r,o)+1).join("")}function Lm(e,t,n){if((e=Na(e))&&(n||void 0===t))return e.slice(0,$r(e)+1);if(!e||!(t=Nr(t)))return e;var r=Cs(e);return ds(r,0,Om(r,Cs(t))+1).join("")}var Rm=/^\s+/;function Mm(e,t,n){if((e=Na(e))&&(n||void 0===t))return e.replace(Rm,"");if(!e||!(t=Nr(t)))return e;var r=Cs(e);return ds(r,Am(r,Cs(t))).join("")}var Pm=/\w*$/;function Nm(e,t){var n=30,r="...";if(zr(t)){var o="separator"in t?t.separator:o;n="length"in t?Yr(t.length):n,r="omission"in t?Nr(t.omission):r}var i=(e=Na(e)).length;if(fs(e)){var a=Cs(e);i=a.length}if(n>=i)return e;var s=n-Yh(r);if(s<1)return r;var l=a?ds(a,0,s).join(""):e.slice(0,s);if(void 0===o)return l+r;if(a&&(s+=l.length-s),mf(o)){if(e.slice(s).search(o)){var u,c=l;for(o.global||(o=RegExp(o.source,Na(Pm.exec(o))+"g")),o.lastIndex=0;u=o.exec(c);)var d=u.index;l=l.slice(0,void 0===d?s:d)}}else if(e.indexOf(Nr(o),s)!=s){var p=l.lastIndexOf(o);p>-1&&(l=l.slice(0,p))}return l+r}function Im(e){return mi(e,1)}var Tm=Rs({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),Bm=/&(?:amp|lt|gt|quot|#39);/g,$m=RegExp(Bm.source);function Wm(e){return(e=Na(e))&&$m.test(e)?e.replace(Bm,Tm):e}var Dm=Fl&&1/Ru(new Fl([,-0]))[1]==1/0?function(e){return new Fl(e)}:Ao,zm=Dm;function Fm(e,t,n){var r=-1,o=ti,i=e.length,a=!0,s=[],l=s;if(n)a=!1,o=Dc;else if(i>=200){var u=t?null:zm(e);if(u)return Ru(u);a=!1,o=Au,l=new Cu}else l=t?[]:s;e:for(;++r<i;){var c=e[r],d=t?t(c):c;if(c=n||0!==c?c:0,a&&d==d){for(var p=l.length;p--;)if(l[p]===d)continue e;t&&l.push(d),s.push(c)}else o(l,d,n)||(l!==s&&l.push(d),s.push(c))}return s}var Um=ki(function(e){return Fm(Ua(e,1,Oc,!0))}),Hm=ki(function(e){var t=Hc(e);return Oc(t)&&(t=void 0),Fm(Ua(e,1,Oc,!0),Zu(t))}),Vm=Hm,qm=ki(function(e){var t=Hc(e);return t="function"==typeof t?t:void 0,Fm(Ua(e,1,Oc,!0),void 0,t)});function Km(e){return e&&e.length?Fm(e):[]}function Jm(e,t){return e&&e.length?Fm(e,Zu(t)):[]}function Ym(e,t){return t="function"==typeof t?t:void 0,e&&e.length?Fm(e,void 0,t):[]}var Gm=0;function Qm(e){var t=++Gm;return Na(e)+t}function Zm(e,t){return null==e||hh(e,t)}var Xm=Math.max;function ey(e){if(!e||!e.length)return[];var t=0;return e=jl(e,function(e){if(Oc(e))return t=Xm(e.length,t),!0}),Mi(t,function(t){return Lr(e,Gu(t))})}function ty(e,t){if(!e||!e.length)return[];var n=ey(e);return null==t?n:Lr(n,function(e){return xo(t,void 0,e)})}function ny(e,t,n,r){return yh(e,t,n(Ba(e,t)),r)}function ry(e,t,n){return null==e?e:ny(e,t,td(n))}function oy(e,t,n,r){return r="function"==typeof r?r:void 0,null==e?e:ny(e,t,td(n),r)}var iy=ll(function(e,t,n){return e+(n?" ":"")+t.toUpperCase()}),ay=iy;function sy(e){return null==e?[]:_p(e,ua(e))}var ly=ki(function(e,t){return Oc(e)?zc(e,t):[]}),uy=ly;function cy(e,t){return sg(td(t),e)}var dy=Va(function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,o=function(t){return Wa(t,e)};return!(t>1||this.__actions__.length)&&r instanceof Oo&&si(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:hm,args:[o],thisArg:void 0}),new No(r,this.__chain__).thru(function(e){return t&&!e.length&&e.push(void 0),e})):this.thru(o)}),py=dy;function fy(){return vl(this)}function hy(){var e=this.__wrapped__;if(e instanceof Oo){var t=e;return this.__actions__.length&&(t=new Oo(this)),(t=t.reverse()).__actions__.push({func:hm,args:[Zg],thisArg:void 0}),new No(t,this.__chain__)}return this.thru(Zg)}function gy(e,t,n){var r=e.length;if(r<2)return r?Fm(e[0]):[];for(var o=-1,i=Array(r);++o<r;)for(var a=e[o],s=-1;++s<r;)s!=o&&(i[o]=zc(i[o]||a,e[s],t,n));return Fm(Ua(i,1),t,n)}var vy=ki(function(e){return gy(jl(e,Oc))}),my=ki(function(e){var t=Hc(e);return Oc(t)&&(t=void 0),gy(jl(e,Oc),Zu(t))}),yy=my,by=ki(function(e){var t=Hc(e);return t="function"==typeof t?t:void 0,gy(jl(e,Oc),void 0,t)}),_y=ki(ey);function xy(e,t,n){for(var r=-1,o=e.length,i=t.length,a={};++r<o;){var s=r<i?t[r]:void 0;n(a,e[r],s)}return a}function wy(e,t){return xy(e||[],t||[],xi)}function Sy(e,t){return xy(e||[],t||[],yh)}var Ey=ki(function(e){var t=e.length,n=t>1?e[t-1]:void 0;return n="function"==typeof n?(e.pop(),n):void 0,ty(e,n)}),ky=Ey,Cy={chunk:bl,compact:Eu,concat:ku,difference:Uc,differenceBy:qc,differenceWith:Jc,drop:Gc,dropRight:Qc,dropRightWhile:Xc,dropWhile:ed,fill:Sd,findIndex:Ad,findLastIndex:Nd,first:Bd,flatten:Ha,flattenDeep:Vd,flattenDepth:qd,fromPairs:np,head:Bd,indexOf:kp,initial:Cp,intersection:Lp,intersectionBy:Mp,intersectionWith:Pp,join:kf,last:Hc,lastIndexOf:Mf,nth:dh,pull:_g,pullAll:bg,pullAllBy:xg,pullAllWith:wg,pullAt:Cg,remove:qg,reverse:Zg,slice:fv,sortedIndex:Ev,sortedIndexBy:kv,sortedIndexOf:Cv,sortedLastIndex:Ov,sortedLastIndexBy:Av,sortedLastIndexOf:jv,sortedUniq:Rv,sortedUniqBy:Mv,tail:Vv,take:qv,takeRight:Kv,takeRightWhile:Jv,takeWhile:Yv,union:Um,unionBy:Vm,unionWith:qm,uniq:Km,uniqBy:Jm,uniqWith:Ym,unzip:ey,unzipWith:ty,without:uy,xor:vy,xorBy:yy,xorWith:by,zip:_y,zipObject:wy,zipObjectDeep:Sy,zipWith:ky},Oy={countBy:fc,each:nd,eachRight:sd,every:xd,filter:kd,find:jd,findLast:Id,flatMap:Dd,flatMapDeep:Fd,flatMapDepth:Ud,forEach:nd,forEachRight:sd,groupBy:lp,includes:Sp,invokeMap:Kp,keyBy:jf,map:Wd,orderBy:kh,partition:dg,reduce:Fg,reduceRight:Hg,reject:Vg,sample:nv,sampleSize:av,shuffle:dv,size:pv,some:mv,sortBy:bv},Ay={now:mc},jy={after:Gr,ary:mi,before:rs,bind:is,bindKey:us,curry:gc,curryRight:vc,debounce:_c,defer:Bc,delay:Wc,flip:Kd,memoize:ja,negate:ah,once:wh,overArgs:Rh,partial:sg,partialRight:ug,rearg:Dg,rest:Yg,spread:Iv,throttle:fm,unary:Im,wrap:cy},Ly={castArray:dl,clone:bu,cloneDeep:_u,cloneDeepWith:xu,cloneWith:wu,conformsTo:nc,eq:bi,gt:dp,gte:pp,isArguments:Bi,isArray:Rr,isArrayBuffer:Yp,isArrayLike:Oi,isArrayLikeObject:Oc,isBoolean:Gp,isBuffer:Fi,isDate:Zp,isElement:Xp,isEmpty:tf,isEqual:nf,isEqualWith:rf,isError:es,isFinite:af,isFunction:Zr,isInteger:sf,isLength:Ci,isMap:du,isMatch:lf,isMatchWith:uf,isNaN:df,isNative:ff,isNil:hf,isNull:gf,isNumber:cf,isObject:zr,isObjectLike:Or,isPlainObject:Xa,isRegExp:mf,isSafeInteger:bf,isSet:fu,isString:bp,isSymbol:Ar,isTypedArray:Gi,isUndefined:_f,isWeakMap:xf,isWeakSet:wf,lt:Bf,lte:$f,toArray:lh,toFinite:Jr,toInteger:Yr,toLength:wd,toNumber:qr,toPlainObject:jc,toSafeInteger:Em,toString:Na},Ry={add:Tr,ceil:gl,divide:Yc,floor:Jd,max:Hf,maxBy:Vf,mean:Jf,meanBy:Yf,min:nh,minBy:rh,multiply:ih,round:Xg,subtract:Fv,sum:Uv,sumBy:Hv},My=xl,Py=yp,Ny=Pg,Iy={assign:aa,assignIn:da,assignInWith:fa,assignWith:ga,at:qa,create:hc,defaults:kc,defaultsDeep:Nc,entries:cd,entriesIn:dd,extend:da,extendWith:fa,findKey:Rd,findLastKey:Td,forIn:Zd,forInRight:Xd,forOwn:ep,forOwnRight:tp,functions:op,functionsIn:ip,get:$a,has:gp,hasIn:Ju,invert:Bp,invertBy:Fp,invoke:Vp,keys:ra,keysIn:ua,mapKeys:Wf,mapValues:Df,merge:Qf,mergeWith:Pc,omit:mh,omitBy:xh,pick:fg,pickBy:_h,result:Gg,set:sv,setWith:lv,toPairs:cd,toPairsIn:dd,transform:Cm,unset:Zm,update:ry,updateWith:oy,values:xp,valuesIn:sy},Ty={at:py,chain:vl,commit:Su,lodash:$o,next:uh,plant:hg,reverse:hy,tap:Gv,thru:hm,toIterator:ym,toJSON:_m,value:_m,valueOf:_m,wrapperChain:fy},By={camelCase:cl,capitalize:js,deburr:Is,endsWith:ld,escape:gd,escapeRegExp:yd,kebabCase:Of,lowerCase:Nf,lowerFirst:If,pad:eg,padEnd:tg,padStart:ng,parseInt:ig,repeat:Kg,replace:Jg,snakeCase:gv,split:Pv,startCase:Bv,startsWith:$v,template:pm,templateSettings:rm,toLower:xm,toUpper:km,trim:jm,trimEnd:Lm,trimStart:Mm,truncate:Nm,unescape:Wm,upperCase:ay,upperFirst:As,words:al},$y={attempt:ns,bindAll:ss,cond:Xu,conforms:tc,constant:qo,defaultTo:xc,flow:Gd,flowRight:Qd,identity:Qr,iteratee:Sf,matches:zf,matchesProperty:Ff,method:Xf,methodOf:th,mixin:oh,noop:Ao,nthArg:ph,over:Oh,overEvery:Mh,overSome:Ph,property:Qu,propertyOf:gg,range:Bg,rangeRight:$g,stubArray:Ll,stubFalse:$i,stubObject:Wv,stubString:Dv,stubTrue:zv,times:mm,toPath:wm,uniqueId:Qm};var Wy=Math.max,Dy=Math.min;var zy=Math.min;var Fy,Uy=4294967295,Hy=Array.prototype,Vy=Object.prototype.hasOwnProperty,qy=br?br.iterator:void 0,Ky=Math.max,Jy=Math.min,Yy=function(e){return function(t,n,r){if(null==r){var o=zr(n),i=o&&ra(n),a=i&&i.length&&rp(n,i);(a?a.length:o)||(r=n,n=t,t=this)}return e(t,n,r)}}(oh);$o.after=jy.after,$o.ary=jy.ary,$o.assign=Iy.assign,$o.assignIn=Iy.assignIn,$o.assignInWith=Iy.assignInWith,$o.assignWith=Iy.assignWith,$o.at=Iy.at,$o.before=jy.before,$o.bind=jy.bind,$o.bindAll=$y.bindAll,$o.bindKey=jy.bindKey,$o.castArray=Ly.castArray,$o.chain=Ty.chain,$o.chunk=Cy.chunk,$o.compact=Cy.compact,$o.concat=Cy.concat,$o.cond=$y.cond,$o.conforms=$y.conforms,$o.constant=$y.constant,$o.countBy=Oy.countBy,$o.create=Iy.create,$o.curry=jy.curry,$o.curryRight=jy.curryRight,$o.debounce=jy.debounce,$o.defaults=Iy.defaults,$o.defaultsDeep=Iy.defaultsDeep,$o.defer=jy.defer,$o.delay=jy.delay,$o.difference=Cy.difference,$o.differenceBy=Cy.differenceBy,$o.differenceWith=Cy.differenceWith,$o.drop=Cy.drop,$o.dropRight=Cy.dropRight,$o.dropRightWhile=Cy.dropRightWhile,$o.dropWhile=Cy.dropWhile,$o.fill=Cy.fill,$o.filter=Oy.filter,$o.flatMap=Oy.flatMap,$o.flatMapDeep=Oy.flatMapDeep,$o.flatMapDepth=Oy.flatMapDepth,$o.flatten=Cy.flatten,$o.flattenDeep=Cy.flattenDeep,$o.flattenDepth=Cy.flattenDepth,$o.flip=jy.flip,$o.flow=$y.flow,$o.flowRight=$y.flowRight,$o.fromPairs=Cy.fromPairs,$o.functions=Iy.functions,$o.functionsIn=Iy.functionsIn,$o.groupBy=Oy.groupBy,$o.initial=Cy.initial,$o.intersection=Cy.intersection,$o.intersectionBy=Cy.intersectionBy,$o.intersectionWith=Cy.intersectionWith,$o.invert=Iy.invert,$o.invertBy=Iy.invertBy,$o.invokeMap=Oy.invokeMap,$o.iteratee=$y.iteratee,$o.keyBy=Oy.keyBy,$o.keys=ra,$o.keysIn=Iy.keysIn,$o.map=Oy.map,$o.mapKeys=Iy.mapKeys,$o.mapValues=Iy.mapValues,$o.matches=$y.matches,$o.matchesProperty=$y.matchesProperty,$o.memoize=jy.memoize,$o.merge=Iy.merge,$o.mergeWith=Iy.mergeWith,$o.method=$y.method,$o.methodOf=$y.methodOf,$o.mixin=Yy,$o.negate=ah,$o.nthArg=$y.nthArg,$o.omit=Iy.omit,$o.omitBy=Iy.omitBy,$o.once=jy.once,$o.orderBy=Oy.orderBy,$o.over=$y.over,$o.overArgs=jy.overArgs,$o.overEvery=$y.overEvery,$o.overSome=$y.overSome,$o.partial=jy.partial,$o.partialRight=jy.partialRight,$o.partition=Oy.partition,$o.pick=Iy.pick,$o.pickBy=Iy.pickBy,$o.property=$y.property,$o.propertyOf=$y.propertyOf,$o.pull=Cy.pull,$o.pullAll=Cy.pullAll,$o.pullAllBy=Cy.pullAllBy,$o.pullAllWith=Cy.pullAllWith,$o.pullAt=Cy.pullAt,$o.range=$y.range,$o.rangeRight=$y.rangeRight,$o.rearg=jy.rearg,$o.reject=Oy.reject,$o.remove=Cy.remove,$o.rest=jy.rest,$o.reverse=Cy.reverse,$o.sampleSize=Oy.sampleSize,$o.set=Iy.set,$o.setWith=Iy.setWith,$o.shuffle=Oy.shuffle,$o.slice=Cy.slice,$o.sortBy=Oy.sortBy,$o.sortedUniq=Cy.sortedUniq,$o.sortedUniqBy=Cy.sortedUniqBy,$o.split=By.split,$o.spread=jy.spread,$o.tail=Cy.tail,$o.take=Cy.take,$o.takeRight=Cy.takeRight,$o.takeRightWhile=Cy.takeRightWhile,$o.takeWhile=Cy.takeWhile,$o.tap=Ty.tap,$o.throttle=jy.throttle,$o.thru=hm,$o.toArray=Ly.toArray,$o.toPairs=Iy.toPairs,$o.toPairsIn=Iy.toPairsIn,$o.toPath=$y.toPath,$o.toPlainObject=Ly.toPlainObject,$o.transform=Iy.transform,$o.unary=jy.unary,$o.union=Cy.union,$o.unionBy=Cy.unionBy,$o.unionWith=Cy.unionWith,$o.uniq=Cy.uniq,$o.uniqBy=Cy.uniqBy,$o.uniqWith=Cy.uniqWith,$o.unset=Iy.unset,$o.unzip=Cy.unzip,$o.unzipWith=Cy.unzipWith,$o.update=Iy.update,$o.updateWith=Iy.updateWith,$o.values=Iy.values,$o.valuesIn=Iy.valuesIn,$o.without=Cy.without,$o.words=By.words,$o.wrap=jy.wrap,$o.xor=Cy.xor,$o.xorBy=Cy.xorBy,$o.xorWith=Cy.xorWith,$o.zip=Cy.zip,$o.zipObject=Cy.zipObject,$o.zipObjectDeep=Cy.zipObjectDeep,$o.zipWith=Cy.zipWith,$o.entries=Iy.toPairs,$o.entriesIn=Iy.toPairsIn,$o.extend=Iy.assignIn,$o.extendWith=Iy.assignInWith,Yy($o,$o),$o.add=Ry.add,$o.attempt=$y.attempt,$o.camelCase=By.camelCase,$o.capitalize=By.capitalize,$o.ceil=Ry.ceil,$o.clamp=My,$o.clone=Ly.clone,$o.cloneDeep=Ly.cloneDeep,$o.cloneDeepWith=Ly.cloneDeepWith,$o.cloneWith=Ly.cloneWith,$o.conformsTo=Ly.conformsTo,$o.deburr=By.deburr,$o.defaultTo=$y.defaultTo,$o.divide=Ry.divide,$o.endsWith=By.endsWith,$o.eq=Ly.eq,$o.escape=By.escape,$o.escapeRegExp=By.escapeRegExp,$o.every=Oy.every,$o.find=Oy.find,$o.findIndex=Cy.findIndex,$o.findKey=Iy.findKey,$o.findLast=Oy.findLast,$o.findLastIndex=Cy.findLastIndex,$o.findLastKey=Iy.findLastKey,$o.floor=Ry.floor,$o.forEach=Oy.forEach,$o.forEachRight=Oy.forEachRight,$o.forIn=Iy.forIn,$o.forInRight=Iy.forInRight,$o.forOwn=Iy.forOwn,$o.forOwnRight=Iy.forOwnRight,$o.get=Iy.get,$o.gt=Ly.gt,$o.gte=Ly.gte,$o.has=Iy.has,$o.hasIn=Iy.hasIn,$o.head=Cy.head,$o.identity=Qr,$o.includes=Oy.includes,$o.indexOf=Cy.indexOf,$o.inRange=Py,$o.invoke=Iy.invoke,$o.isArguments=Ly.isArguments,$o.isArray=Rr,$o.isArrayBuffer=Ly.isArrayBuffer,$o.isArrayLike=Ly.isArrayLike,$o.isArrayLikeObject=Ly.isArrayLikeObject,$o.isBoolean=Ly.isBoolean,$o.isBuffer=Ly.isBuffer,$o.isDate=Ly.isDate,$o.isElement=Ly.isElement,$o.isEmpty=Ly.isEmpty,$o.isEqual=Ly.isEqual,$o.isEqualWith=Ly.isEqualWith,$o.isError=Ly.isError,$o.isFinite=Ly.isFinite,$o.isFunction=Ly.isFunction,$o.isInteger=Ly.isInteger,$o.isLength=Ly.isLength,$o.isMap=Ly.isMap,$o.isMatch=Ly.isMatch,$o.isMatchWith=Ly.isMatchWith,$o.isNaN=Ly.isNaN,$o.isNative=Ly.isNative,$o.isNil=Ly.isNil,$o.isNull=Ly.isNull,$o.isNumber=Ly.isNumber,$o.isObject=zr,$o.isObjectLike=Ly.isObjectLike,$o.isPlainObject=Ly.isPlainObject,$o.isRegExp=Ly.isRegExp,$o.isSafeInteger=Ly.isSafeInteger,$o.isSet=Ly.isSet,$o.isString=Ly.isString,$o.isSymbol=Ly.isSymbol,$o.isTypedArray=Ly.isTypedArray,$o.isUndefined=Ly.isUndefined,$o.isWeakMap=Ly.isWeakMap,$o.isWeakSet=Ly.isWeakSet,$o.join=Cy.join,$o.kebabCase=By.kebabCase,$o.last=Hc,$o.lastIndexOf=Cy.lastIndexOf,$o.lowerCase=By.lowerCase,$o.lowerFirst=By.lowerFirst,$o.lt=Ly.lt,$o.lte=Ly.lte,$o.max=Ry.max,$o.maxBy=Ry.maxBy,$o.mean=Ry.mean,$o.meanBy=Ry.meanBy,$o.min=Ry.min,$o.minBy=Ry.minBy,$o.stubArray=$y.stubArray,$o.stubFalse=$y.stubFalse,$o.stubObject=$y.stubObject,$o.stubString=$y.stubString,$o.stubTrue=$y.stubTrue,$o.multiply=Ry.multiply,$o.nth=Cy.nth,$o.noop=$y.noop,$o.now=Ay.now,$o.pad=By.pad,$o.padEnd=By.padEnd,$o.padStart=By.padStart,$o.parseInt=By.parseInt,$o.random=Ny,$o.reduce=Oy.reduce,$o.reduceRight=Oy.reduceRight,$o.repeat=By.repeat,$o.replace=By.replace,$o.result=Iy.result,$o.round=Ry.round,$o.sample=Oy.sample,$o.size=Oy.size,$o.snakeCase=By.snakeCase,$o.some=Oy.some,$o.sortedIndex=Cy.sortedIndex,$o.sortedIndexBy=Cy.sortedIndexBy,$o.sortedIndexOf=Cy.sortedIndexOf,$o.sortedLastIndex=Cy.sortedLastIndex,$o.sortedLastIndexBy=Cy.sortedLastIndexBy,$o.sortedLastIndexOf=Cy.sortedLastIndexOf,$o.startCase=By.startCase,$o.startsWith=By.startsWith,$o.subtract=Ry.subtract,$o.sum=Ry.sum,$o.sumBy=Ry.sumBy,$o.template=By.template,$o.times=$y.times,$o.toFinite=Ly.toFinite,$o.toInteger=Yr,$o.toLength=Ly.toLength,$o.toLower=By.toLower,$o.toNumber=Ly.toNumber,$o.toSafeInteger=Ly.toSafeInteger,$o.toString=Ly.toString,$o.toUpper=By.toUpper,$o.trim=By.trim,$o.trimEnd=By.trimEnd,$o.trimStart=By.trimStart,$o.truncate=By.truncate,$o.unescape=By.unescape,$o.uniqueId=$y.uniqueId,$o.upperCase=By.upperCase,$o.upperFirst=By.upperFirst,$o.each=Oy.forEach,$o.eachRight=Oy.forEachRight,$o.first=Cy.head,Yy($o,(Fy={},ac($o,function(e,t){Vy.call($o.prototype,t)||(Fy[t]=e)}),Fy),{chain:!1}),$o.VERSION="4.17.23",($o.templateSettings=By.templateSettings).imports._=$o,Qo(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){$o[e].placeholder=$o}),Qo(["drop","take"],function(e,t){Oo.prototype[e]=function(n){n=void 0===n?1:Ky(Yr(n),0);var r=this.__filtered__&&!t?new Oo(this):this.clone();return r.__filtered__?r.__takeCount__=Jy(n,r.__takeCount__):r.__views__.push({size:Jy(n,Uy),type:e+(r.__dir__<0?"Right":"")}),r},Oo.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}}),Qo(["filter","map","takeWhile"],function(e,t){var n=t+1,r=1==n||3==n;Oo.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:Zu(e),type:n}),t.__filtered__=t.__filtered__||r,t}}),Qo(["head","last"],function(e,t){var n="take"+(t?"Right":"");Oo.prototype[e]=function(){return this[n](1).value()[0]}}),Qo(["initial","tail"],function(e,t){var n="drop"+(t?"":"Right");Oo.prototype[e]=function(){return this.__filtered__?new Oo(this):this[n](1)}}),Oo.prototype.compact=function(){return this.filter(Qr)},Oo.prototype.find=function(e){return this.filter(e).head()},Oo.prototype.findLast=function(e){return this.reverse().find(e)},Oo.prototype.invokeMap=ki(function(e,t){return"function"==typeof e?new Oo(this):this.map(function(n){return Hp(n,e,t)})}),Oo.prototype.reject=function(e){return this.filter(ah(Zu(e)))},Oo.prototype.slice=function(e,t){e=Yr(e);var n=this;return n.__filtered__&&(e>0||t<0)?new Oo(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),void 0!==t&&(n=(t=Yr(t))<0?n.dropRight(-t):n.take(t-e)),n)},Oo.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Oo.prototype.toArray=function(){return this.take(Uy)},ac(Oo.prototype,function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),o=$o[r?"take"+("last"==t?"Right":""):t],i=r||/^find/.test(t);o&&($o.prototype[t]=function(){var t=this.__wrapped__,a=r?[1]:arguments,s=t instanceof Oo,l=a[0],u=s||Rr(t),c=function(e){var t=o.apply($o,Da([e],a));return r&&d?t[0]:t};u&&n&&"function"==typeof l&&1!=l.length&&(s=u=!1);var d=this.__chain__,p=!!this.__actions__.length,f=i&&!d,h=s&&!p;if(!i&&u){t=h?t:new Oo(this);var g=e.apply(t,a);return g.__actions__.push({func:hm,args:[c],thisArg:void 0}),new No(g,d)}return f&&h?e.apply(this,a):(g=this.thru(c),f?r?g.value()[0]:g.value():g)})}),Qo(["pop","push","shift","sort","splice","unshift"],function(e){var t=Hy[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);$o.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var o=this.value();return t.apply(Rr(o)?o:[],e)}return this[n](function(n){return t.apply(Rr(n)?n:[],e)})}}),ac(Oo.prototype,function(e,t){var n=$o[t];if(n){var r=n.name+"";Vy.call(Ro,r)||(Ro[r]=[]),Ro[r].push({name:t,func:n})}}),Ro[di(void 0,2).name]=[{name:"wrapper",func:void 0}],Oo.prototype.clone=function(){var e=new Oo(this.__wrapped__);return e.__actions__=Io(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Io(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Io(this.__views__),e},Oo.prototype.reverse=function(){if(this.__filtered__){var e=new Oo(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Oo.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Rr(e),r=t<0,o=n?e.length:0,i=function(e,t,n){for(var r=-1,o=n.length;++r<o;){var i=n[r],a=i.size;switch(i.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=Dy(t,e+a);break;case"takeRight":e=Wy(e,t-a)}}return{start:e,end:t}}(0,o,this.__views__),a=i.start,s=i.end,l=s-a,u=r?s:a-1,c=this.__iteratees__,d=c.length,p=0,f=zy(l,this.__takeCount__);if(!n||!r&&o==l&&f==l)return bm(e,this.__actions__);var h=[];e:for(;l--&&p<f;){for(var g=-1,v=e[u+=t];++g<d;){var m=c[g],y=m.iteratee,b=m.type,_=y(v);if(2==b)v=_;else if(!_){if(1==b)continue e;break e}}h[p++]=v}return h},$o.prototype.at=Ty.at,$o.prototype.chain=Ty.wrapperChain,$o.prototype.commit=Ty.commit,$o.prototype.next=Ty.next,$o.prototype.plant=Ty.plant,$o.prototype.reverse=Ty.reverse,$o.prototype.toJSON=$o.prototype.valueOf=$o.prototype.value=Ty.value,$o.prototype.first=$o.prototype.head,qy&&($o.prototype[qy]=Ty.toIterator);var Gy=p(Object.freeze({__proto__:null,add:Tr,after:Gr,ary:mi,assign:aa,assignIn:da,assignInWith:fa,assignWith:ga,at:qa,attempt:ns,before:rs,bind:is,bindAll:ss,bindKey:us,camelCase:cl,capitalize:js,castArray:dl,ceil:gl,chain:vl,chunk:bl,clamp:xl,clone:bu,cloneDeep:_u,cloneDeepWith:xu,cloneWith:wu,commit:Su,compact:Eu,concat:ku,cond:Xu,conforms:tc,conformsTo:nc,constant:qo,countBy:fc,create:hc,curry:gc,curryRight:vc,debounce:_c,deburr:Is,defaultTo:xc,defaults:kc,defaultsDeep:Nc,defer:Bc,delay:Wc,difference:Uc,differenceBy:qc,differenceWith:Jc,divide:Yc,drop:Gc,dropRight:Qc,dropRightWhile:Xc,dropWhile:ed,each:nd,eachRight:sd,endsWith:ld,entries:cd,entriesIn:dd,eq:bi,escape:gd,escapeRegExp:yd,every:xd,extend:da,extendWith:fa,fill:Sd,filter:kd,find:jd,findIndex:Ad,findKey:Rd,findLast:Id,findLastIndex:Nd,findLastKey:Td,first:Bd,flatMap:Dd,flatMapDeep:Fd,flatMapDepth:Ud,flatten:Ha,flattenDeep:Vd,flattenDepth:qd,flip:Kd,floor:Jd,flow:Gd,flowRight:Qd,forEach:nd,forEachRight:sd,forIn:Zd,forInRight:Xd,forOwn:ep,forOwnRight:tp,fromPairs:np,functions:op,functionsIn:ip,get:$a,groupBy:lp,gt:dp,gte:pp,has:gp,hasIn:Ju,head:Bd,identity:Qr,inRange:yp,includes:Sp,indexOf:kp,initial:Cp,intersection:Lp,intersectionBy:Mp,intersectionWith:Pp,invert:Bp,invertBy:Fp,invoke:Vp,invokeMap:Kp,isArguments:Bi,isArray:Rr,isArrayBuffer:Yp,isArrayLike:Oi,isArrayLikeObject:Oc,isBoolean:Gp,isBuffer:Fi,isDate:Zp,isElement:Xp,isEmpty:tf,isEqual:nf,isEqualWith:rf,isError:es,isFinite:af,isFunction:Zr,isInteger:sf,isLength:Ci,isMap:du,isMatch:lf,isMatchWith:uf,isNaN:df,isNative:ff,isNil:hf,isNull:gf,isNumber:cf,isObject:zr,isObjectLike:Or,isPlainObject:Xa,isRegExp:mf,isSafeInteger:bf,isSet:fu,isString:bp,isSymbol:Ar,isTypedArray:Gi,isUndefined:_f,isWeakMap:xf,isWeakSet:wf,iteratee:Sf,join:kf,kebabCase:Of,keyBy:jf,keys:ra,keysIn:ua,last:Hc,lastIndexOf:Mf,lodash:$o,lowerCase:Nf,lowerFirst:If,lt:Bf,lte:$f,map:Wd,mapKeys:Wf,mapValues:Df,matches:zf,matchesProperty:Ff,max:Hf,maxBy:Vf,mean:Jf,meanBy:Yf,memoize:ja,merge:Qf,mergeWith:Pc,method:Xf,methodOf:th,min:nh,minBy:rh,mixin:oh,multiply:ih,negate:ah,next:uh,noop:Ao,now:mc,nth:dh,nthArg:ph,omit:mh,omitBy:xh,once:wh,orderBy:kh,over:Oh,overArgs:Rh,overEvery:Mh,overSome:Ph,pad:eg,padEnd:tg,padStart:ng,parseInt:ig,partial:sg,partialRight:ug,partition:dg,pick:fg,pickBy:_h,plant:hg,property:Qu,propertyOf:gg,pull:_g,pullAll:bg,pullAllBy:xg,pullAllWith:wg,pullAt:Cg,random:Pg,range:Bg,rangeRight:$g,rearg:Dg,reduce:Fg,reduceRight:Hg,reject:Vg,remove:qg,repeat:Kg,replace:Jg,rest:Yg,result:Gg,reverse:Zg,round:Xg,sample:nv,sampleSize:av,set:sv,setWith:lv,shuffle:dv,size:pv,slice:fv,snakeCase:gv,some:mv,sortBy:bv,sortedIndex:Ev,sortedIndexBy:kv,sortedIndexOf:Cv,sortedLastIndex:Ov,sortedLastIndexBy:Av,sortedLastIndexOf:jv,sortedUniq:Rv,sortedUniqBy:Mv,split:Pv,spread:Iv,startCase:Bv,startsWith:$v,stubArray:Ll,stubFalse:$i,stubObject:Wv,stubString:Dv,stubTrue:zv,subtract:Fv,sum:Uv,sumBy:Hv,tail:Vv,take:qv,takeRight:Kv,takeRightWhile:Jv,takeWhile:Yv,tap:Gv,template:pm,templateSettings:rm,throttle:fm,thru:hm,times:mm,toArray:lh,toFinite:Jr,toInteger:Yr,toIterator:ym,toJSON:_m,toLength:wd,toLower:xm,toNumber:qr,toPairs:cd,toPairsIn:dd,toPath:wm,toPlainObject:jc,toSafeInteger:Em,toString:Na,toUpper:km,transform:Cm,trim:jm,trimEnd:Lm,trimStart:Mm,truncate:Nm,unary:Im,unescape:Wm,union:Um,unionBy:Vm,unionWith:qm,uniq:Km,uniqBy:Jm,uniqWith:Ym,uniqueId:Qm,unset:Zm,unzip:ey,unzipWith:ty,update:ry,updateWith:oy,upperCase:ay,upperFirst:As,value:_m,valueOf:_m,values:xp,valuesIn:sy,without:uy,words:al,wrap:cy,wrapperAt:py,wrapperChain:fy,wrapperCommit:Su,wrapperLodash:$o,wrapperNext:uh,wrapperPlant:hg,wrapperReverse:hy,wrapperToIterator:ym,wrapperValue:_m,xor:vy,xorBy:yy,xorWith:by,zip:_y,zipObject:wy,zipObjectDeep:Sy,zipWith:ky,default:$o})),Qy={};Object.defineProperty(Qy,"__esModule",{value:!0}),Qy.updateSessionMetadata=function(e,t){e.audioStartTime=e.audioStartTime||t.audioStartTime,e.audioEndTime=e.audioEndTime||t.audioEndTime,!e.waitTime&&e.audioStartTime&&e.audioEndTime&&(e.waitTime=e.audioEndTime-e.audioStartTime)},Qy.updateSessionValue=function(e,t,n){e.value=e.value||[],"checkbox"===t&&(n.selected?e.value=Array.from(new Set([...e.value,n.value])):e.value=e.value.filter(e=>e!==n.value));"radio"===t&&(n.selected?e.value=[n.value]:e.value=[]);e.selector=n.selector};const Zy=e,Xy=u,eb=l,tb=i,nb=c;var rb=y.exports;Object.defineProperty(m,"__esModule",{value:!0}),m.isComplete=m.default=void 0;var ob=rb(b.exports),ib=rb(S),ab=rb(Zy),sb=Xy,lb=Gy,ub=rb(eb),cb=f,db=nb,pb=tb,fb=Qy,hb=jn;const gb=(0,ub.default)("pie-ui:multiple-choice"),vb=(e,t,n,r)=>{const{autoplayAudioEnabled:o,completeAudioEnabled:i}=t||{};if(o&&i&&!n&&r){const e=r.querySelector("audio"),t=e&&e.closest("#preview-prompt");if(e&&t)return!1}if(!e||!e.value)return!1;const{choiceMode:a,minSelections:s=1,maxSelections:l}=t||{},u=e.value.length||0;return"radio"===a?!!u:!(u<s||(0,hb.exceedsMaxSelections)(u,l))};function mb(e){const t=function(e){const t=e.closest("pie-player")||e.closest("pie-item-player");if(!t)return{baseHeadingLevel:void 0,includeSrHeading:!0};const n=(e,n,r)=>{let o=t[e];var i;return null==o&&(o=null!=(i=t.getAttribute(n))?i:(()=>t.getAttribute(r))()),o},r=n("baseHeadingLevel","base-heading-level","baseheadinglevel"),o=parseInt(r,10),i=Number.isFinite(o)&&o>=1&&o<=6?o:void 0,a=n("includeSrHeading","include-sr-heading","includesrheading");return{baseHeadingLevel:i,includeSrHeading:null==a||!1!==a&&"false"!==a}}(e);return{baseHeadingLevel:void 0!==e._baseHeadingLevel?e._baseHeadingLevel:t.baseHeadingLevel,includeSrHeading:void 0!==e._includeSrHeading?e._includeSrHeading:t.includeSrHeading}}m.isComplete=vb;class yb extends HTMLElement{constructor(){super(),(0,ob.default)(this,"_scheduleMathRender",()=>{this._mathRenderPending||(this._mathRenderPending=!0,requestAnimationFrame(()=>{this._mathObserver&&this._mathObserver.disconnect(),gb("render complete - render math"),(0,db.renderMath)(this),this._mathRenderPending=!1,setTimeout(()=>{this._mathObserver&&this._mathObserver.observe(this,{childList:!0,subtree:!0})},50)}))}),this._model=null,this._session=null,this._options=null,this.audioComplete=!1,this._boundHandleKeyDown=this.handleKeyDown.bind(this),this._keyboardEventsEnabled=!1,this._audioInitialized=!1,this._root=null,this._mathObserver=null,this._mathRenderPending=!1,this._rerender=(0,lb.debounce)(()=>{if(this._model&&this._session){var e=ab.default.createElement(ib.default,{model:this._model,session:this._session,options:this._options,onChoiceChanged:this._onChange.bind(this),onShowCorrectToggle:this.onShowCorrectToggle.bind(this),...mb(this)});this.setAttribute("aria-label","radio"===this._model.choiceMode?"Multiple Choice Question":"Multiple Correct Answer Question"),this.setAttribute("role","region"),this.setLangAttribute(),this._initMathObserver(),this._root||(this._root=(0,sb.createRoot)(this)),this._root.render(e),!0!==this._model.keyboardEventsEnabled||this._keyboardEventsEnabled||this.enableKeyboardEvents()}else gb("skip")},50,{leading:!1,trailing:!0}),this._dispatchResponseChanged=(0,lb.debounce)(()=>{this.dispatchEvent(new cb.SessionChangedEvent(this.tagName.toLowerCase(),vb(this._session,this._model,this.audioComplete,this)))}),this._dispatchModelSet=(0,lb.debounce)(()=>{this.dispatchEvent(new cb.ModelSetEvent(this.tagName.toLowerCase(),vb(this._session,this._model,this.audioComplete,this),void 0!==this._model))},50,{leading:!1,trailing:!0})}_initMathObserver(){this._mathObserver||(this._mathObserver=new MutationObserver(this._scheduleMathRender),this._mathObserver.observe(this,{childList:!0,subtree:!0}))}_disconnectMathObserver(){this._mathObserver&&(this._mathObserver.disconnect(),this._mathObserver=null)}onShowCorrectToggle(){(0,db.renderMath)(this)}setLangAttribute(){const e=this._model&&(this._model.language,1)?this._model.language:"",t=e?e.slice(0,2):"en";this.setAttribute("lang",t)}set model(e){this._model=e,this._rerender(),this._audioInitialized=!1,this._dispatchModelSet()}get session(){return this._session}get options(){return this._options}set options(e){this._options=e,this._rerender()}set baseHeadingLevel(e){this._baseHeadingLevel=e,this._rerender()}set includeSrHeading(e){this._includeSrHeading=e,this._rerender()}set session(e){this._session=e,this._rerender(),this._dispatchResponseChanged()}_onChange(e){(0,fb.updateSessionValue)(this._session,this._model.choiceMode,e),this._dispatchResponseChanged(),this._rerender()}_createAudioInfoToast(){const e=document.createElement("div");e.id="play-audio-info",Object.assign(e.style,{position:"absolute",top:0,width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",background:"white",zIndex:"1000",cursor:"pointer"});const t=document.createElement("img");return t.src=pb.EnableAudioAutoplayImage,t.alt="Click anywhere to enable audio autoplay",t.width=500,t.height=300,e.appendChild(t),e}connectedCallback(){this._initMathObserver(),this._initPlayerObserver(),this._rerender();new MutationObserver((e,t)=>{e.forEach(e=>{if("childList"===e.type){if(this._audioInitialized)return;const e=this.querySelector("audio"),n=e&&e.closest("#preview-prompt");if(!this._model)return;if(!this._model.autoplayAudioEnabled)return;if(e&&!n)return;if(!e)return;const r=this._createAudioInfoToast(),o=this.querySelector("#main-container"),i=()=>{this.querySelector("#play-audio-info")&&(e.play(),o.removeChild(r)),document.removeEventListener("click",i)};setTimeout(()=>{e.paused&&!this.querySelector("#play-audio-info")?(o.appendChild(r),document.addEventListener("click",i)):document.removeEventListener("click",i)},500);const a=()=>{(0,fb.updateSessionMetadata)(this._session,{audioStartTime:(new Date).getTime()});const t=this.querySelector("#play-audio-info");t&&o.removeChild(t),e.removeEventListener("playing",a)};e.addEventListener("playing",a);const s=()=>{(0,fb.updateSessionMetadata)(this._session,{audioEndTime:(new Date).getTime()}),this.audioComplete=!0,this._dispatchResponseChanged(),e.removeEventListener("ended",s)};e.addEventListener("ended",s),this._audio=e,this._handlePlaying=a,this._handleEnded=s,this._enableAudio=i,this._audioInitialized=!0,t.disconnect()}})}).observe(this,{childList:!0,subtree:!0})}enableKeyboardEvents(){this._keyboardEventsEnabled||(window.addEventListener("keydown",this._boundHandleKeyDown),this._keyboardEventsEnabled=!0)}_initPlayerObserver(){const e=this.closest("pie-player")||this.closest("pie-item-player");e&&(this._playerObserver=new MutationObserver(()=>{this._rerender()}),this._playerObserver.observe(e,{attributes:!0,attributeFilter:["base-heading-level","baseheadinglevel","include-sr-heading","includesrheading"]}))}_disconnectPlayerObserver(){this._playerObserver&&(this._playerObserver.disconnect(),this._playerObserver=null)}disconnectedCallback(){this._disconnectMathObserver(),this._disconnectPlayerObserver(),this._keyboardEventsEnabled&&(window.removeEventListener("keydown",this._boundHandleKeyDown),this._keyboardEventsEnabled=!1),document.removeEventListener("click",this._enableAudio),this._audio&&(this._audio.removeEventListener("playing",this._handlePlaying),this._audio.removeEventListener("ended",this._handleEnded),this._audio=null),this._root&&(this._root.unmount(),this._root=null)}handleKeyDown(e){if(!this._model||!this._session)return;const{mode:t}=this._model;if("gather"!==t)return;const n=(e=>{const t=e>="1"&&e<="9"?e-"1":"0"===e?9:-1,n=/^[a-jA-J]$/.test(e)?e.toLowerCase().charCodeAt(0)-"a".charCodeAt(0):-1;return t>=0?t:n})(e.key);if(void 0===n||n<=-1||n>=function(e){let t,n=e[0],r=1;for(;r<e.length;){const o=e[r],i=e[r+1];if(r+=2,("optionalAccess"===o||"optionalCall"===o)&&null==n)return;"access"===o||"optionalAccess"===o?(t=n,n=i(n)):"call"!==o&&"optionalCall"!==o||(n=i((...e)=>n.call(t,...e)),t=void 0)}return n}([this,"access",e=>e._model,"access",e=>e.choices,"optionalAccess",e=>e.length]))return;const r=this._session.value||[],o=this._model.choices[n].value,i=r.includes(o),a={value:o,selected:"radio"===this._model.choiceMode||!i,selector:"Keyboard"};this._onChange(a)}}var bb=m.default=yb;const _b=l;const xb=v.TYPE,wb="ebsr-multiple-choice",Sb=_b("pie-elements:ebsr");class Eb extends bb{}customElements.get(wb)||customElements.define(wb,Eb);const kb=e=>Array.isArray(e)&&e.length>0,Cb=e=>{const t=$a(e,"value.partA.value"),n=$a(e,"value.partB.value");return kb(t)&&kb(n)};function Ob(e){const t=e.closest("pie-player")||e.closest("pie-item-player");if(!t)return{baseHeadingLevel:void 0,includeSrHeading:!0};const n=(e,n,r)=>{let o=t[e];var i,a;return null==o&&(i=t.getAttribute(n),a=()=>t.getAttribute(r),o=null!=i?i:a()),o},r=n("baseHeadingLevel","base-heading-level","baseheadinglevel"),o=parseInt(r,10),i=Number.isFinite(o)&&o>=1&&o<=6?o:void 0,a=n("includeSrHeading","include-sr-heading","includesrheading");return{baseHeadingLevel:i,includeSrHeading:null==a||!1!==a&&"false"!==a}}class Ab extends HTMLElement{constructor(){super(),Ab.prototype.__init.call(this),this._model={},this._session={}}__init(){this.onSessionUpdated=e=>{if(e.target===this)return;e.preventDefault(),e.stopImmediatePropagation();const t=e.target.getAttribute("id");if(t){const n=`part${t.toUpperCase()}`;e.update&&(this._model[n]=e.update),this.dispatchSessionChanged(e.srcElement._session,n)}}}set model(e){this._model=e,customElements.whenDefined(wb).then(()=>{this.setPartModel(this.partA,"partA"),this.setPartModel(this.partB,"partB")})}set session(e){this._session=e,customElements.whenDefined(wb).then(()=>{this.setPartSession(this.partA,"partA"),this.setPartSession(this.partB,"partB")})}get session(){return this._session}setPartModel(e,t){if(this._model&&this._model[t]&&e){const{mode:n}=this._model;e.model={...this._model[t],mode:n,keyMode:this._model[t].choicePrefix};const{includeSrHeading:r,baseHeadingLevel:o}=Ob(this);e.includeSrHeading=r,e.baseHeadingLevel=o}}setPartSession(e,t){if(this._session&&this._model&&e){const{value:n}=this._session;e.session=n&&n[t]?n[t]:{id:t}}}dispatchSessionChanged(e,t){this._session.value={...this._session.value,[t]:e},Sb("[onSessionChanged] session: ",this._session);const n=Cb(this._session);this.dispatchEvent(new v(this.tagName.toLowerCase(),n))}get partA(){return this.querySelector(`${wb}#a`)}get partB(){return this.querySelector(`${wb}#b`)}connectedCallback(){this._render(),this._initPlayerObserver(),this.addEventListener(xb,this.onSessionUpdated)}disconnectedCallback(){this._disconnectPlayerObserver(),this.removeEventListener(xb,this.onSessionUpdated)}_initPlayerObserver(){const e=this.closest("pie-player")||this.closest("pie-item-player");e&&(this._playerObserver=new MutationObserver(()=>{this._render()}),this._playerObserver.observe(e,{attributes:!0,attributeFilter:["base-heading-level","baseheadinglevel","include-sr-heading","includesrheading"]}))}_disconnectPlayerObserver(){this._playerObserver&&(this._playerObserver.disconnect(),this._playerObserver=null)}_render(){this.ariaLabel="Two-Part Question",this.role="region";const{baseHeadingLevel:e,includeSrHeading:t}=Ob(this),n=e?`h${Math.min(6,e)}`:"h2",r=t?`<${n} class="srOnly">Two-Part Question</${n}>`:"";this.innerHTML=`\n <style>\n .srOnly {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n left: -10000px;\n top: auto;\n }\n ${function(e){let t,n=e[0],r=1;for(;r<e.length;){const o=e[r],i=e[r+1];if(r+=2,("optionalAccess"===o||"optionalCall"===o)&&null==n)return;"access"===o||"optionalAccess"===o?(t=n,n=i(n)):"call"!==o&&"optionalCall"!==o||(n=i((...e)=>n.call(t,...e)),t=void 0)}return n}([this,"access",e=>e._model,"optionalAccess",e=>e.extraCSSRules,"optionalAccess",e=>e.rules])}\n </style>\n ${r}\n <${wb} id="a"></${wb}>\n <${wb} id="b"></${wb}>\n `,customElements.get(wb)&&(this.setPartModel(this.partA,"partA"),this.setPartModel(this.partB,"partB"),this.setPartSession(this.partA,"partA"),this.setPartSession(this.partB,"partB"))}}export{Ab as default,Cb as isSessionComplete};
1
+ import{_dll_react as e,_dll_react_dom as t,_dll_mui__material as n,_dll_prop_types as r,_dll_mui__material_styles as o,_dll_pie_lib__render_ui as i,_dll_classnames as a,_dll_pie_lib__correct_answer_toggle as s,_dll_debug as l,_dll_react_dom_client as u}from"../../../@pie-lib/shared-module@6.0.0/module/index.js";import{_dll_pie_lib__math_rendering as c}from"../../../@pie-lib/math-rendering-module@6.0.0/module/index.js";function d(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function p(e){if(e.__esModule)return e;var t=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(e).forEach(function(n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}),t}var f={};Object.defineProperty(f,"__esModule",{value:!0});class h extends CustomEvent{constructor(e,t,n){super(h.TYPE,{bubbles:!0,composed:!0,detail:{complete:t,component:e,hasModel:n}}),this.component=e,this.complete=t}}h.TYPE="model-set",f.ModelSetEvent=h;class g extends CustomEvent{constructor(e,t){super(g.TYPE,{bubbles:!0,composed:!0,detail:{complete:t,component:e}}),this.component=e,this.complete=t}}g.TYPE="session-changed";var v=f.SessionChangedEvent=g,m={},y={exports:{}};!function(e){e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports}(y),d(y.exports);var b={exports:{}},_={exports:{}},x={exports:{}};!function(e){function t(n){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(x),d(x.exports);var w={exports:{}};!function(e){var t=x.exports.default;e.exports=function(e,n){if("object"!=t(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,n||"default");if("object"!=t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports}(w),d(w.exports),function(e){var t=x.exports.default,n=w.exports;e.exports=function(e){var r=n(e,"string");return"symbol"==t(r)?r:r+""},e.exports.__esModule=!0,e.exports.default=e.exports}(_),d(_.exports),function(e){var t=_.exports;e.exports=function(e,n,r){return(n=t(n))in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e},e.exports.__esModule=!0,e.exports.default=e.exports}(b),d(b.exports);var S={},E={exports:{}};!function(e){function t(){return e.exports=t=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},e.exports.__esModule=!0,e.exports.default=e.exports,t.apply(null,arguments)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(E),d(E.exports);var k={};function C(e,t){return null!=e?e:t()}function O(e){let t,n=e[0],r=1;for(;r<e.length;){const o=e[r],i=e[r+1];if(r+=2,("optionalAccess"===o||"optionalCall"===o)&&null==n)return;"access"===o||"optionalAccess"===o?(t=n,n=i(n)):"call"!==o&&"optionalCall"!==o||(n=i((...e)=>n.call(t,...e)),t=void 0)}return n}const A=e=>"string"==typeof e,j=()=>{let e,t;const n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},L=e=>null==e?"":""+e,R=/###/g,M=e=>e&&e.indexOf("###")>-1?e.replace(R,"."):e,P=e=>!e||A(e),N=(e,t,n)=>{const r=A(t)?t.split("."):t;let o=0;for(;o<r.length-1;){if(P(e))return{};const t=M(r[o]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++o}return P(e)?{}:{obj:e,k:M(r[o])}},I=(e,t,n)=>{const{obj:r,k:o}=N(e,t,Object);if(void 0!==r||1===t.length)return void(r[o]=n);let i=t[t.length-1],a=t.slice(0,t.length-1),s=N(e,a,Object);for(;void 0===s.obj&&a.length;)i=`${a[a.length-1]}.${i}`,a=a.slice(0,a.length-1),s=N(e,a,Object),O([s,"optionalAccess",e=>e.obj])&&void 0!==s.obj[`${s.k}.${i}`]&&(s.obj=void 0);s.obj[`${s.k}.${i}`]=n},T=(e,t)=>{const{obj:n,k:r}=N(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},B=(e,t,n)=>{for(const r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?A(e[r])||e[r]instanceof String||A(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):B(e[r],t[r],n):e[r]=t[r]);return e},$=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var W={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const D=e=>A(e)?e.replace(/[&<>"'\/]/g,e=>W[e]):e;const z=[" ",",","?","!",";"],F=new class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(void 0!==t)return t;const n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}}(20),U=(e,t,n=".")=>{if(!e)return;if(e[t]){if(!Object.prototype.hasOwnProperty.call(e,t))return;return e[t]}const r=t.split(n);let o=e;for(let e=0;e<r.length;){if(!o||"object"!=typeof o)return;let t,i="";for(let a=e;a<r.length;++a)if(a!==e&&(i+=n),i+=r[a],t=o[i],void 0!==t){if(["string","number","boolean"].indexOf(typeof t)>-1&&a<r.length-1)continue;e+=a-e+1;break}o=t}return o},H=e=>O([e,"optionalAccess",e=>e.replace,"call",e=>e("_","-")]),V={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){O([console,"optionalAccess",t=>t[e],"optionalAccess",e=>e.apply,"optionalCall",e=>e(console,t)])}};class q{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||"i18next:",this.logger=e||V,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,"log","",!0)}warn(...e){return this.forward(e,"warn","",!0)}error(...e){return this.forward(e,"error","")}deprecate(...e){return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,n,r){return r&&!this.debug?null:(A(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new q(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new q(this.logger,e)}}var K=new q;class J{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(e=>{this.observers[e]||(this.observers[e]=new Map);const n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)}),this}off(e,t){this.observers[e]&&(t?this.observers[e].delete(t):delete this.observers[e])}emit(e,...t){if(this.observers[e]){Array.from(this.observers[e].entries()).forEach(([e,n])=>{for(let r=0;r<n;r++)e(...t)})}if(this.observers["*"]){Array.from(this.observers["*"].entries()).forEach(([n,r])=>{for(let o=0;o<r;o++)n.apply(n,[e,...t])})}}}class Y extends J{constructor(e,t={ns:["translation"],defaultNS:"translation"}){super(),this.data=e||{},this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n,r={}){const o=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,i=void 0!==r.ignoreJSONStructure?r.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;e.indexOf(".")>-1?a=e.split("."):(a=[e,t],n&&(Array.isArray(n)?a.push(...n):A(n)&&o?a.push(...n.split(o)):a.push(n)));const s=T(this.data,a);return!s&&!t&&!n&&e.indexOf(".")>-1&&(e=a[0],t=a[1],n=a.slice(2).join(".")),!s&&i&&A(n)?U(O([this,"access",e=>e.data,"optionalAccess",t=>t[e],"optionalAccess",e=>e[t]]),n,o):s}addResource(e,t,n,r,o={silent:!1}){const i=void 0!==o.keySeparator?o.keySeparator:this.options.keySeparator;let a=[e,t];n&&(a=a.concat(i?n.split(i):n)),e.indexOf(".")>-1&&(a=e.split("."),r=t,t=a[1]),this.addNamespaces(t),I(this.data,a,r),o.silent||this.emit("added",e,t,n,r)}addResources(e,t,n,r={silent:!1}){for(const r in n)(A(n[r])||Array.isArray(n[r]))&&this.addResource(e,t,r,n[r],{silent:!0});r.silent||this.emit("added",e,t,n)}addResourceBundle(e,t,n,r,o,i={silent:!1,skipCopy:!1}){let a=[e,t];e.indexOf(".")>-1&&(a=e.split("."),r=n,n=t,t=a[1]),this.addNamespaces(t);let s=T(this.data,a)||{};i.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?B(s,n,o):s={...s,...n},I(this.data,a,s),i.silent||this.emit("added",e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return void 0!==this.getResource(e,t)}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}}var G={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,o){return e.forEach(e=>{t=C(O([this,"access",e=>e.processors,"access",t=>t[e],"optionalAccess",e=>e.process,"call",e=>e(t,n,r,o)]),()=>t)}),t}};const Q=Symbol("i18next/PATH_KEY");function Z(e,t){const{[Q]:n}=e(function(){const e=[],t=Object.create(null);let n;return t.get=(r,o)=>(O([n,"optionalAccess",e=>e.revoke,"optionalCall",e=>e()]),o===Q?e:(e.push(o),n=Proxy.revocable(r,t),n.proxy)),Proxy.revocable(Object.create(null),t).proxy}());return n.join(C(O([t,"optionalAccess",e=>e.keySeparator]),()=>"."))}const X={},ee=e=>!A(e)&&"boolean"!=typeof e&&"number"!=typeof e;class te extends J{constructor(e,t={}){var n,r;super(),n=e,r=this,["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"].forEach(e=>{n[e]&&(r[e]=n[e])}),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=K.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){const n={...t};if(null==e)return!1;const r=this.resolve(e,n);if(void 0===O([r,"optionalAccess",e=>e.res]))return!1;const o=ee(r.res);return!1!==n.returnObjects||!o}extractFromKey(e,t){let n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");const r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator;let o=t.ns||this.options.defaultNS||[];const i=n&&e.indexOf(n)>-1,a=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||((e,t,n)=>{t=t||"",n=n||"";const r=z.filter(e=>t.indexOf(e)<0&&n.indexOf(e)<0);if(0===r.length)return!0;const o=F.getRegExp(`(${r.map(e=>"?"===e?"\\?":e).join("|")})`);let i=!o.test(e);if(!i){const t=e.indexOf(n);t>0&&!o.test(e.substring(0,t))&&(i=!0)}return i})(e,n,r));if(i&&!a){const t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:A(o)?[o]:o};const i=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(i[0])>-1)&&(o=i.shift()),e=i.join(r)}return{key:e,namespaces:A(o)?[o]:o}}translate(e,t,n){let r="object"==typeof t?{...t}:t;if("object"!=typeof r&&this.options.overloadTranslationOptionHandler&&(r=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof r&&(r={...r}),r||(r={}),null==e)return"";"function"==typeof e&&(e=Z(e,{...this.options,...r})),Array.isArray(e)||(e=[String(e)]);const o=void 0!==r.returnDetails?r.returnDetails:this.options.returnDetails,i=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,{key:a,namespaces:s}=this.extractFromKey(e[e.length-1],r),l=s[s.length-1];let u=void 0!==r.nsSeparator?r.nsSeparator:this.options.nsSeparator;void 0===u&&(u=":");const c=r.lng||this.language,d=r.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if("cimode"===O([c,"optionalAccess",e=>e.toLowerCase,"call",e=>e()]))return d?o?{res:`${l}${u}${a}`,usedKey:a,exactUsedKey:a,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(r)}:`${l}${u}${a}`:o?{res:a,usedKey:a,exactUsedKey:a,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(r)}:a;const p=this.resolve(e,r);let f=O([p,"optionalAccess",e=>e.res]);const h=O([p,"optionalAccess",e=>e.usedKey])||a,g=O([p,"optionalAccess",e=>e.exactUsedKey])||a,v=void 0!==r.joinArrays?r.joinArrays:this.options.joinArrays,m=!this.i18nFormat||this.i18nFormat.handleAsObject,y=void 0!==r.count&&!A(r.count),b=te.hasDefaultValue(r),_=y?this.pluralResolver.getSuffix(c,r.count,r):"",x=r.ordinal&&y?this.pluralResolver.getSuffix(c,r.count,{ordinal:!1}):"",w=y&&!r.ordinal&&0===r.count,S=w&&r[`defaultValue${this.options.pluralSeparator}zero`]||r[`defaultValue${_}`]||r[`defaultValue${x}`]||r.defaultValue;let E=f;m&&!f&&b&&(E=S);const k=ee(E),C=Object.prototype.toString.apply(E);if(!(m&&E&&k&&["[object Number]","[object Function]","[object RegExp]"].indexOf(C)<0)||A(v)&&Array.isArray(E))if(m&&A(v)&&Array.isArray(f))f=f.join(v),f&&(f=this.extendTranslation(f,e,r,n));else{let t=!1,o=!1;!this.isValidLookup(f)&&b&&(t=!0,f=S),this.isValidLookup(f)||(o=!0,f=a);const s=(r.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&o?void 0:f,d=b&&S!==f&&this.options.updateMissing;if(o||t||d){if(this.logger.log(d?"updateKey":"missingKey",c,l,a,d?S:f),i){const e=this.resolve(a,{...r,keySeparator:!1});e&&e.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let e=[];const t=this.languageUtils.getFallbackCodes(this.options.fallbackLng,r.lng||this.language);if("fallback"===this.options.saveMissingTo&&t&&t[0])for(let n=0;n<t.length;n++)e.push(t[n]);else"all"===this.options.saveMissingTo?e=this.languageUtils.toResolveHierarchy(r.lng||this.language):e.push(r.lng||this.language);const n=(e,t,n)=>{const o=b&&n!==f?n:s;this.options.missingKeyHandler?this.options.missingKeyHandler(e,l,t,o,d,r):O([this,"access",e=>e.backendConnector,"optionalAccess",e=>e.saveMissing])&&this.backendConnector.saveMissing(e,l,t,o,d,r),this.emit("missingKey",e,l,t,f)};this.options.saveMissing&&(this.options.saveMissingPlurals&&y?e.forEach(e=>{const t=this.pluralResolver.getSuffixes(e,r);w&&r[`defaultValue${this.options.pluralSeparator}zero`]&&t.indexOf(`${this.options.pluralSeparator}zero`)<0&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{n([e],a+t,r[`defaultValue${t}`]||S)})}):n(e,a,S))}f=this.extendTranslation(f,e,r,p,n),o&&f===a&&this.options.appendNamespaceToMissingKey&&(f=`${l}${u}${a}`),(o||t)&&this.options.parseMissingKeyHandler&&(f=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}${u}${a}`:a,t?f:void 0,r))}else{if(!r.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(h,E,{...r,ns:s}):`key '${a} (${this.language})' returned an object instead of string.`;return o?(p.res=e,p.usedParams=this.getUsedParamsDetails(r),p):e}if(i){const e=Array.isArray(E),t=e?[]:{},n=e?g:h;for(const e in E)if(Object.prototype.hasOwnProperty.call(E,e)){const o=`${n}${i}${e}`;t[e]=b&&!f?this.translate(o,{...r,defaultValue:ee(S)?S[e]:void 0,joinArrays:!1,ns:s}):this.translate(o,{...r,joinArrays:!1,ns:s}),t[e]===o&&(t[e]=E[e])}f=t}}return o?(p.res=f,p.usedParams=this.getUsedParamsDetails(r),p):f}extendTranslation(e,t,n,r,o){if(O([this,"access",e=>e.i18nFormat,"optionalAccess",e=>e.parse]))e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const i=A(e)&&(void 0!==O([n,"optionalAccess",e=>e.interpolation,"optionalAccess",e=>e.skipOnVariables])?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let a;if(i){const t=e.match(this.interpolator.nestingRegexp);a=t&&t.length}let s=n.replace&&!A(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),e=this.interpolator.interpolate(e,s,n.lng||this.language||r.usedLng,n),i){const t=e.match(this.interpolator.nestingRegexp);a<(t&&t.length)&&(n.nest=!1)}!n.lng&&r&&r.res&&(n.lng=this.language||r.usedLng),!1!==n.nest&&(e=this.interpolator.nest(e,(...e)=>O([o,"optionalAccess",e=>e[0]])!==e[0]||n.context?this.translate(...e,t):(this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`),null),n)),n.interpolation&&this.interpolator.reset()}const i=n.postProcess||this.options.postProcess,a=A(i)?[i]:i;return null!=e&&O([a,"optionalAccess",e=>e.length])&&!1!==n.applyPostProcessor&&(e=G.handle(a,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e,t={}){let n,r,o,i,a;return A(e)&&(e=[e]),e.forEach(e=>{if(this.isValidLookup(n))return;const s=this.extractFromKey(e,t),l=s.key;r=l;let u=s.namespaces;this.options.fallbackNS&&(u=u.concat(this.options.fallbackNS));const c=void 0!==t.count&&!A(t.count),d=c&&!t.ordinal&&0===t.count,p=void 0!==t.context&&(A(t.context)||"number"==typeof t.context)&&""!==t.context,f=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);u.forEach(e=>{this.isValidLookup(n)||(a=e,X[`${f[0]}-${e}`]||!O([this,"access",e=>e.utils,"optionalAccess",e=>e.hasLoadedNamespace])||O([this,"access",e=>e.utils,"optionalAccess",e=>e.hasLoadedNamespace,"call",e=>e(a)])||(X[`${f[0]}-${e}`]=!0,this.logger.warn(`key "${r}" for languages "${f.join(", ")}" won't get resolved as namespace "${a}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),f.forEach(r=>{if(this.isValidLookup(n))return;i=r;const a=[l];if(O([this,"access",e=>e.i18nFormat,"optionalAccess",e=>e.addLookupKeys]))this.i18nFormat.addLookupKeys(a,l,r,e,t);else{let e;c&&(e=this.pluralResolver.getSuffix(r,t.count,t));const n=`${this.options.pluralSeparator}zero`,o=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(c&&(t.ordinal&&0===e.indexOf(o)&&a.push(l+e.replace(o,this.options.pluralSeparator)),a.push(l+e),d&&a.push(l+n)),p){const r=`${l}${this.options.contextSeparator||"_"}${t.context}`;a.push(r),c&&(t.ordinal&&0===e.indexOf(o)&&a.push(r+e.replace(o,this.options.pluralSeparator)),a.push(r+e),d&&a.push(r+n))}}let s;for(;s=a.pop();)this.isValidLookup(n)||(o=s,n=this.getResource(r,e,s,t))}))})}),{res:n,usedKey:r,exactUsedKey:o,usedLng:i,usedNS:a}}isValidLookup(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}getResource(e,t,n,r={}){return O([this,"access",e=>e.i18nFormat,"optionalAccess",e=>e.getResource])?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}getUsedParamsDetails(e={}){const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=e.replace&&!A(e.replace);let r=n?e.replace:e;if(n&&void 0!==e.count&&(r.count=e.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!n){r={...r};for(const e of t)delete r[e]}return r}static hasDefaultValue(e){const t="defaultValue";for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,12)&&void 0!==e[n])return!0;return!1}}class ne{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=K.create("languageUtils")}getScriptPartFromCode(e){if(!(e=H(e))||e.indexOf("-")<0)return null;const t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}getLanguagePartFromCode(e){if(!(e=H(e))||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(A(e)&&e.indexOf("-")>-1){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch(e){}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(e=>{if(t)return;const n=this.formatLanguageCode(e);this.options.supportedLngs&&!this.isSupportedCode(n)||(t=n)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;const n=this.getScriptPartFromCode(e);if(this.isSupportedCode(n))return t=n;const r=this.getLanguagePartFromCode(e);if(this.isSupportedCode(r))return t=r;t=this.options.supportedLngs.find(e=>e===r?e:e.indexOf("-")<0&&r.indexOf("-")<0?void 0:e.indexOf("-")>0&&r.indexOf("-")<0&&e.substring(0,e.indexOf("-"))===r||0===e.indexOf(r)&&r.length>1?e:void 0)}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),A(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}toResolveHierarchy(e,t){const n=this.getFallbackCodes((!1===t?[]:t)||this.options.fallbackLng||[],e),r=[],o=e=>{e&&(this.isSupportedCode(e)?r.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return A(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?("languageOnly"!==this.options.load&&o(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&o(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&o(this.getLanguagePartFromCode(e))):A(e)&&o(this.formatLanguageCode(e)),n.forEach(e=>{r.indexOf(e)<0&&o(this.formatLanguageCode(e))}),r}}const re={zero:0,one:1,two:2,few:3,many:4,other:5},oe={select:e=>1===e?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class ie{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=K.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){const n=H("dev"===e?"en":e),r=t.ordinal?"ordinal":"cardinal",o=JSON.stringify({cleanedCode:n,type:r});if(o in this.pluralRulesCache)return this.pluralRulesCache[o];let i;try{i=new Intl.PluralRules(n,{type:r})}catch(n){if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),oe;if(!e.match(/-|_/))return oe;const r=this.languageUtils.getLanguagePartFromCode(e);i=this.getRule(r,t)}return this.pluralRulesCache[o]=i,i}needsPlural(e,t={}){let n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),O([n,"optionalAccess",e=>e.resolvedOptions,"call",e=>e(),"access",e=>e.pluralCategories,"access",e=>e.length])>1}getPluralFormsOfKey(e,t,n={}){return this.getSuffixes(e,n).map(e=>`${t}${e}`)}getSuffixes(e,t={}){let n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),n?n.resolvedOptions().pluralCategories.sort((e,t)=>re[e]-re[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${e}`):[]}getSuffix(e,t,n={}){const r=this.getRule(e,n);return r?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${r.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,n))}}const ae=(e,t,n,r=".",o=!0)=>{let i=((e,t,n)=>{const r=T(e,n);return void 0!==r?r:T(t,n)})(e,t,n);return!i&&o&&A(n)&&(i=U(e,n,r),void 0===i&&(i=U(t,n,r))),i},se=e=>e.replace(/\$/g,"$$$$");class le{constructor(e={}){this.logger=K.create("interpolator"),this.options=e,this.format=O([e,"optionalAccess",e=>e.interpolation,"optionalAccess",e=>e.format])||(e=>e),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:n,useRawValueToEscape:r,prefix:o,prefixEscaped:i,suffix:a,suffixEscaped:s,formatSeparator:l,unescapeSuffix:u,unescapePrefix:c,nestingPrefix:d,nestingPrefixEscaped:p,nestingSuffix:f,nestingSuffixEscaped:h,nestingOptionsSeparator:g,maxReplaces:v,alwaysFormat:m}=e.interpolation;this.escape=void 0!==t?t:D,this.escapeValue=void 0===n||n,this.useRawValueToEscape=void 0!==r&&r,this.prefix=o?$(o):i||"{{",this.suffix=a?$(a):s||"}}",this.formatSeparator=l||",",this.unescapePrefix=u?"":c||"-",this.unescapeSuffix=this.unescapePrefix?"":u||"",this.nestingPrefix=d?$(d):p||$("$t("),this.nestingSuffix=f?$(f):h||$(")"),this.nestingOptionsSeparator=g||",",this.maxReplaces=v||1e3,this.alwaysFormat=void 0!==m&&m,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(e,t)=>O([e,"optionalAccess",e=>e.source])===t?(e.lastIndex=0,e):new RegExp(t,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,n,r){let o,i,a;const s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},l=e=>{if(e.indexOf(this.formatSeparator)<0){const o=ae(t,s,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(o,void 0,n,{...r,...t,interpolationkey:e}):o}const o=e.split(this.formatSeparator),i=o.shift().trim(),a=o.join(this.formatSeparator).trim();return this.format(ae(t,s,i,this.options.keySeparator,this.options.ignoreJSONStructure),a,n,{...r,...t,interpolationkey:i})};this.resetRegExp();const u=O([r,"optionalAccess",e=>e.missingInterpolationHandler])||this.options.missingInterpolationHandler,c=void 0!==O([r,"optionalAccess",e=>e.interpolation,"optionalAccess",e=>e.skipOnVariables])?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>se(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?se(this.escape(e)):se(e)}].forEach(t=>{for(a=0;o=t.regex.exec(e);){const n=o[1].trim();if(i=l(n),void 0===i)if("function"==typeof u){const t=u(e,o,r);i=A(t)?t:""}else if(r&&Object.prototype.hasOwnProperty.call(r,n))i="";else{if(c){i=o[0];continue}this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),i=""}else A(i)||this.useRawValueToEscape||(i=L(i));const s=t.safeValue(i);if(e=e.replace(o[0],s),c?(t.regex.lastIndex+=i.length,t.regex.lastIndex-=o[0].length):t.regex.lastIndex=0,a++,a>=this.maxReplaces)break}}),e}nest(e,t,n={}){let r,o,i;const a=(e,t)=>{const n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;const r=e.split(new RegExp(`${n}[ ]*{`));let o=`{${r[1]}`;e=r[0],o=this.interpolate(o,i);const a=o.match(/'/g),s=o.match(/"/g);(C(O([a,"optionalAccess",e=>e.length]),()=>0)%2==0&&!s||s.length%2!=0)&&(o=o.replace(/'/g,'"'));try{i=JSON.parse(o),t&&(i={...t,...i})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${o}`}return i.defaultValue&&i.defaultValue.indexOf(this.prefix)>-1&&delete i.defaultValue,e};for(;r=this.nestingRegexp.exec(e);){let s=[];i={...n},i=i.replace&&!A(i.replace)?i.replace:i,i.applyPostProcessor=!1,delete i.defaultValue;const l=/{.*}/.test(r[1])?r[1].lastIndexOf("}")+1:r[1].indexOf(this.formatSeparator);if(-1!==l&&(s=r[1].slice(l).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),r[1]=r[1].slice(0,l)),o=t(a.call(this,r[1].trim(),i),i),o&&r[0]===e&&!A(o))return o;A(o)||(o=L(o)),o||(this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`),o=""),s.length&&(o=s.reduce((e,t)=>this.format(e,t,n.lng,{...n,interpolationkey:r[1].trim()}),o.trim())),e=e.replace(r[0],o),this.regexp.lastIndex=0}return e}}const ue=e=>{const t={};return(n,r,o)=>{let i=o;o&&o.interpolationkey&&o.formatParams&&o.formatParams[o.interpolationkey]&&o[o.interpolationkey]&&(i={...i,[o.interpolationkey]:void 0});const a=r+JSON.stringify(i);let s=t[a];return s||(s=e(H(r),o),t[a]=s),s(n)}},ce=e=>(t,n,r)=>e(H(n),r)(t);class de{constructor(e={}){this.logger=K.create("formatter"),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||",";const n=t.cacheInBuiltFormats?ue:ce;this.formats={number:n((e,t)=>{const n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)}),currency:n((e,t)=>{const n=new Intl.NumberFormat(e,{...t,style:"currency"});return e=>n.format(e)}),datetime:n((e,t)=>{const n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)}),relativetime:n((e,t)=>{const n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||"day")}),list:n((e,t)=>{const n=new Intl.ListFormat(e,{...t});return e=>n.format(e)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=ue(t)}format(e,t,n,r={}){const o=t.split(this.formatSeparator);if(o.length>1&&o[0].indexOf("(")>1&&o[0].indexOf(")")<0&&o.find(e=>e.indexOf(")")>-1)){const e=o.findIndex(e=>e.indexOf(")")>-1);o[0]=[o[0],...o.splice(1,e)].join(this.formatSeparator)}const i=o.reduce((e,t)=>{const{formatName:o,formatOptions:i}=(e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const o=r[1].substring(0,r[1].length-1);"currency"===t&&o.indexOf(":")<0?n.currency||(n.currency=o.trim()):"relativetime"===t&&o.indexOf(":")<0?n.range||(n.range=o.trim()):o.split(";").forEach(e=>{if(e){const[t,...r]=e.split(":"),o=r.join(":").trim().replace(/^'+|'+$/g,""),i=t.trim();n[i]||(n[i]=o),"false"===o&&(n[i]=!1),"true"===o&&(n[i]=!0),isNaN(o)||(n[i]=parseInt(o,10))}})}return{formatName:t,formatOptions:n}})(t);if(this.formats[o]){let t=e;try{const a=O([r,"optionalAccess",e=>e.formatParams,"optionalAccess",e=>e[r.interpolationkey]])||{},s=a.locale||a.lng||r.locale||r.lng||n;t=this.formats[o](e,s,{...i,...r,...a})}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${o}`),e},e);return i}}class pe extends J{constructor(e,t,n,r={}){super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=K.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],O([this,"access",e=>e.backend,"optionalAccess",e=>e.init,"optionalCall",e=>e(n,r.backend,r)])}queueLoad(e,t,n,r){const o={},i={},a={},s={};return e.forEach(e=>{let r=!0;t.forEach(t=>{const a=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[a]=2:this.state[a]<0||(1===this.state[a]?void 0===i[a]&&(i[a]=!0):(this.state[a]=1,r=!1,void 0===i[a]&&(i[a]=!0),void 0===o[a]&&(o[a]=!0),void 0===s[t]&&(s[t]=!0)))}),r||(a[e]=!0)}),(Object.keys(o).length||Object.keys(i).length)&&this.queue.push({pending:i,pendingCount:Object.keys(i).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(o),pending:Object.keys(i),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(s)}}loaded(e,t,n){const r=e.split("|"),o=r[0],i=r[1];t&&this.emit("failedLoading",o,i,t),!t&&n&&this.store.addResourceBundle(o,i,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);const a={};this.queue.forEach(n=>{((e,t,n)=>{const{obj:r,k:o}=N(e,t,Object);r[o]=r[o]||[],r[o].push(n)})(n.loaded,[o],i),((e,t)=>{void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)})(n,e),t&&n.errors.push(t),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach(e=>{a[e]||(a[e]={});const t=n.loaded[e];t.length&&t.forEach(t=>{void 0===a[e][t]&&(a[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(e=>!e.done)}read(e,t,n,r=0,o=this.retryTimeout,i){if(!e.length)return i(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:o,callback:i});this.readingCalls++;const a=(a,s)=>{if(this.readingCalls--,this.waitingReads.length>0){const e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}a&&s&&r<this.maxRetries?setTimeout(()=>{this.read.call(this,e,t,n,r+1,2*o,i)},o):i(a,s)},s=this.backend[n].bind(this.backend);if(2!==s.length)return s(e,t,a);try{const n=s(e,t);n&&"function"==typeof n.then?n.then(e=>a(null,e)).catch(a):a(null,n)}catch(e){a(e)}}prepareLoading(e,t,n={},r){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),r&&r();A(e)&&(e=this.languageUtils.toResolveHierarchy(e)),A(t)&&(t=[t]);const o=this.queueLoad(e,t,n,r);if(!o.toLoad.length)return o.pending.length||r(),null;o.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e,t=""){const n=e.split("|"),r=n[0],o=n[1];this.read(r,o,"read",void 0,void 0,(n,i)=>{n&&this.logger.warn(`${t}loading namespace ${o} for language ${r} failed`,n),!n&&i&&this.logger.log(`${t}loaded namespace ${o} for language ${r}`,i),this.loaded(e,n,i)})}saveMissing(e,t,n,r,o,i={},a=()=>{}){if(!O([this,"access",e=>e.services,"optionalAccess",e=>e.utils,"optionalAccess",e=>e.hasLoadedNamespace])||O([this,"access",e=>e.services,"optionalAccess",e=>e.utils,"optionalAccess",e=>e.hasLoadedNamespace,"call",e=>e(t)])){if(null!=n&&""!==n){if(O([this,"access",e=>e.backend,"optionalAccess",e=>e.create])){const s={...i,isUpdate:o},l=this.backend.create.bind(this.backend);if(l.length<6)try{let o;o=5===l.length?l(e,t,n,r,s):l(e,t,n,r),o&&"function"==typeof o.then?o.then(e=>a(null,e)).catch(a):a(null,o)}catch(e){a(e)}else l(e,t,n,r,a,s)}e&&e[0]&&this.store.addResource(e[0],t,n,r)}}else this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")}}const fe=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if("object"==typeof e[1]&&(t=e[1]),A(e[1])&&(t.defaultValue=e[1]),A(e[2])&&(t.tDescription=e[2]),"object"==typeof e[2]||"object"==typeof e[3]){const n=e[3]||e[2];Object.keys(n).forEach(e=>{t[e]=n[e]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),he=e=>(A(e.ns)&&(e.ns=[e.ns]),A(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),A(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),O([e,"access",e=>e.supportedLngs,"optionalAccess",e=>e.indexOf,"optionalCall",e=>e("cimode")])<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),"boolean"==typeof e.initImmediate&&(e.initAsync=e.initImmediate),e),ge=()=>{};class ve extends J{constructor(e={},t){var n;if(super(),this.options=he(e),this.services={},this.logger=K,this.modules={external:[]},n=this,Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach(e=>{"function"==typeof n[e]&&(n[e]=n[e].bind(n))}),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,"function"==typeof e&&(t=e,e={}),null==e.defaultNS&&e.ns&&(A(e.ns)?e.defaultNS=e.ns:e.ns.indexOf("translation")<0&&(e.defaultNS=e.ns[0]));const n=fe();var r;this.options={...n,...this.options,...he(e)},this.options.interpolation={...n.interpolation,...this.options.interpolation},void 0!==e.keySeparator&&(this.options.userDefinedKeySeparator=e.keySeparator),void 0!==e.nsSeparator&&(this.options.userDefinedNsSeparator=e.nsSeparator),"function"!=typeof this.options.overloadTranslationOptionHandler&&(this.options.overloadTranslationOptionHandler=n.overloadTranslationOptionHandler),!1===this.options.showSupportNotice||(O([r=this,"optionalAccess",e=>e.modules,"optionalAccess",e=>e.backend,"optionalAccess",e=>e.name,"optionalAccess",e=>e.indexOf,"call",e=>e("Locize")])>0||O([r,"optionalAccess",e=>e.modules,"optionalAccess",e=>e.backend,"optionalAccess",e=>e.constructor,"optionalAccess",e=>e.name,"optionalAccess",e=>e.indexOf,"call",e=>e("Locize")])>0||O([r,"optionalAccess",e=>e.options,"optionalAccess",e=>e.backend,"optionalAccess",e=>e.backends])&&r.options.backend.backends.some(e=>O([e,"optionalAccess",e=>e.name,"access",e=>e.indexOf,"call",e=>e("Locize")])>0||O([e,"optionalAccess",e=>e.constructor,"optionalAccess",e=>e.name,"access",e=>e.indexOf,"call",e=>e("Locize")])>0))||"undefined"!=typeof console&&void 0!==console.info&&console.info("🌐 i18next is maintained with support from locize.com — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙");const o=e=>e?"function"==typeof e?new e:e:null;if(!this.options.isClone){let e;this.modules.logger?K.init(o(this.modules.logger),this.options):K.init(null,this.options),e=this.modules.formatter?this.modules.formatter:de;const t=new ne(this.options);this.store=new Y(this.options.resources,this.options);const r=this.services;r.logger=K,r.resourceStore=this.store,r.languageUtils=t,r.pluralResolver=new ie(t,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix});this.options.interpolation.format&&this.options.interpolation.format!==n.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),!e||this.options.interpolation.format&&this.options.interpolation.format!==n.interpolation.format||(r.formatter=o(e),r.formatter.init&&r.formatter.init(r,this.options),this.options.interpolation.format=r.formatter.format.bind(r.formatter)),r.interpolator=new le(this.options),r.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},r.backendConnector=new pe(o(this.modules.backend),r.resourceStore,r,this.options),r.backendConnector.on("*",(e,...t)=>{this.emit(e,...t)}),this.modules.languageDetector&&(r.languageDetector=o(this.modules.languageDetector),r.languageDetector.init&&r.languageDetector.init(r,this.options.detection,this.options)),this.modules.i18nFormat&&(r.i18nFormat=o(this.modules.i18nFormat),r.i18nFormat.init&&r.i18nFormat.init(this)),this.translator=new te(this.services,this.options),this.translator.on("*",(e,...t)=>{this.emit(e,...t)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,t||(t=ge),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&"dev"!==e[0]&&(this.options.lng=e[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(e=>{this[e]=(...t)=>this.store[e](...t)});["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(e=>{this[e]=(...t)=>(this.store[e](...t),this)});const i=j(),a=()=>{const e=(e,n)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),i.resolve(n),t(e,n)};if(this.languages&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?a():setTimeout(a,0),i}loadResources(e,t=ge){let n=t;const r=A(e)?e:this.language;if("function"==typeof e&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if("cimode"===O([r,"optionalAccess",e=>e.toLowerCase,"call",e=>e()])&&(!this.options.preload||0===this.options.preload.length))return n();const e=[],t=t=>{if(!t)return;if("cimode"===t)return;this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{"cimode"!==t&&e.indexOf(t)<0&&e.push(t)})};if(r)t(r);else{this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e))}O([this,"access",e=>e.options,"access",e=>e.preload,"optionalAccess",e=>e.forEach,"optionalCall",e=>e(e=>t(e))]),this.services.backendConnector.load(e,this.options.ns,e=>{e||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),n(e)})}else n(null)}reloadResources(e,t,n){const r=j();return"function"==typeof e&&(n=e,e=void 0),"function"==typeof t&&(n=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),n||(n=ge),this.services.backendConnector.reload(e,t,e=>{r.resolve(),n(e)}),r}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&G.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}setResolvedLanguage(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1)){for(let e=0;e<this.languages.length;e++){const t=this.languages[e];if(!(["cimode","dev"].indexOf(t)>-1)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}!this.resolvedLanguage&&this.languages.indexOf(e)<0&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;const n=j();this.emit("languageChanging",e);const r=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},o=(o,i)=>{i?this.isLanguageChangingTo===e&&(r(i),this.translator.changeLanguage(i),this.isLanguageChangingTo=void 0,this.emit("languageChanged",i),this.logger.log("languageChanged",i)):this.isLanguageChangingTo=void 0,n.resolve((...e)=>this.t(...e)),t&&t(o,(...e)=>this.t(...e))},i=t=>{e||t||!this.services.languageDetector||(t=[]);const n=A(t)?t:t&&t[0],i=this.store.hasLanguageSomeTranslations(n)?n:this.services.languageUtils.getBestMatchFromCodes(A(t)?[t]:t);i&&(this.language||r(i),this.translator.language||this.translator.changeLanguage(i),O([this,"access",e=>e.services,"access",e=>e.languageDetector,"optionalAccess",e=>e.cacheUserLanguage,"optionalCall",e=>e(i)])),this.loadResources(i,e=>{o(e,i)})};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(i):this.services.languageDetector.detect(i):i(e):i(this.services.languageDetector.detect()),n}getFixedT(e,t,n){const r=(e,t,...o)=>{let i;i="object"!=typeof t?this.options.overloadTranslationOptionHandler([e,t].concat(o)):{...t},i.lng=i.lng||r.lng,i.lngs=i.lngs||r.lngs,i.ns=i.ns||r.ns,""!==i.keyPrefix&&(i.keyPrefix=i.keyPrefix||n||r.keyPrefix);const a=this.options.keySeparator||".";let s;return i.keyPrefix&&Array.isArray(e)?s=e.map(e=>("function"==typeof e&&(e=Z(e,{...this.options,...t})),`${i.keyPrefix}${a}${e}`)):("function"==typeof e&&(e=Z(e,{...this.options,...t})),s=i.keyPrefix?`${i.keyPrefix}${a}${e}`:e),this.t(s,i)};return A(e)?r.lng=e:r.lngs=e,r.ns=t,r.keyPrefix=n,r}t(...e){return O([this,"access",e=>e.translator,"optionalAccess",e=>e.translate,"call",t=>t(...e)])}exists(...e){return O([this,"access",e=>e.translator,"optionalAccess",e=>e.exists,"call",t=>t(...e)])}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=t.lng||this.resolvedLanguage||this.languages[0],r=!!this.options&&this.options.fallbackLng,o=this.languages[this.languages.length-1];if("cimode"===n.toLowerCase())return!0;const i=(e,t)=>{const n=this.services.backendConnector.state[`${e}|${t}`];return-1===n||0===n||2===n};if(t.precheck){const e=t.precheck(this,i);if(void 0!==e)return e}return!!this.hasResourceBundle(n,e)||(!(this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages))||!(!i(n,e)||r&&!i(o,e)))}loadNamespaces(e,t){const n=j();return this.options.ns?(A(e)&&(e=[e]),e.forEach(e=>{this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){const n=j();A(e)&&(e=[e]);const r=this.options.preload||[],o=e.filter(e=>r.indexOf(e)<0&&this.services.languageUtils.isSupportedCode(e));return o.length?(this.options.preload=r.concat(o),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(O([this,"access",e=>e.languages,"optionalAccess",e=>e.length])>0?this.languages[0]:this.language)),!e)return"rtl";try{const t=new Intl.Locale(e);if(t&&t.getTextInfo){const e=t.getTextInfo();if(e&&e.direction)return e.direction}}catch(e){}const t=O([this,"access",e=>e.services,"optionalAccess",e=>e.languageUtils])||new ne(fe());return e.toLowerCase().indexOf("-latn")>1?"ltr":["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(t.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},t){const n=new ve(e,t);return n.createInstance=ve.createInstance,n}cloneInstance(e={},t=ge){const n=e.forkResourceStore;n&&delete e.forkResourceStore;const r={...this.options,...e,isClone:!0},o=new ve(r);void 0===e.debug&&void 0===e.prefix||(o.logger=o.logger.clone(e));if(["store","services","language"].forEach(e=>{o[e]=this[e]}),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},n){const e=Object.keys(this.store.data).reduce((e,t)=>(e[t]={...this.store.data[t]},e[t]=Object.keys(e[t]).reduce((n,r)=>(n[r]={...e[t][r]},n),e[t]),e),{});o.store=new Y(e,r),o.services.resourceStore=o.store}if(e.interpolation){const t={...fe().interpolation,...this.options.interpolation,...e.interpolation},n={...r,interpolation:t};o.services.interpolator=new le(n)}return o.translator=new te(o.services,r),o.translator.on("*",(e,...t)=>{o.emit(e,...t)}),o.init(r,t),o.translator.options=r,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const me=ve.createInstance();me.createInstance,me.dir,me.init,me.loadResources,me.reloadResources,me.use,me.changeLanguage,me.getFixedT,me.t,me.exists,me.setDefaultNamespace,me.hasLoadedNamespace,me.loadNamespaces,me.loadLanguages;me.init({fallbackLng:"en",lng:"en",debug:!0,resources:{en:{translation:{categorize:{limitMaxChoicesPerCategory:"You've reached the limit of {{maxChoicesPerCategory}} responses per area. To add another response, one must first be removed.",maxChoicesPerCategoryRestriction:"To change this value to {{maxChoicesPerCategory}}, each category must have {{maxChoicesPerCategory}} or fewer answer choice[s]."},ebsr:{part:"Part {{index}}"},numberLine:{addElementLimit_one:"You can only add {{count}} element",addElementLimit_other:"You can only add {{count}} elements",clearAll:"Clear all"},imageClozeAssociation:{reachedLimit_one:"You’ve reached the limit of {{count}} response per area. To add another response, one must first be removed.",reachedLimit_other:"Full"},drawingResponse:{fillColor:"Fill color",outlineColor:"Outline color",noFill:"No fill",lightblue:"Light blue",lightyellow:"Light yellow",red:"Red",orange:"Orange",yellow:"Yellow",violet:"Violet",blue:"Blue",green:"Green",white:"White",black:"Black",onDoubleClick:"Double click to edit this text. Press Enter to submit."},charting:{addCategory:"Add category",actions:"Actions",add:"Add",delete:"Delete",newLabel:"New label",reachedLimit_other:"There can't be more than {{count}} categories.",keyLegend:{incorrectAnswer:"Student incorrect answer",correctAnswer:"Student correct answer",correctKeyAnswer:"Answer key correct"}},graphing:{point:"Point",circle:"Circle",line:"Line",parabola:"Parabola",absolute:"Absolute Value",exponential:"Exponential",polygon:"Polygon",ray:"Ray",segment:"Segment",sine:"Sine",vector:"Vector",label:"Label",redo:"Redo",reset:"Reset"},mathInline:{primaryCorrectWithAlternates:"Note: The answer shown above is the primary correct answer specified by the author for this item, but other answers may also be recognized as correct."},multipleChoice:{minSelections:"Select at least {{minSelections}}.",maxSelections_one:"Only {{maxSelections}} answer is allowed.",maxSelections_other:"Only {{maxSelections}} answers are allowed.",minmaxSelections_equal:"Select {{minSelections}}.",minmaxSelections_range:"Select between {{minSelections}} and {{maxSelections}}."},selectText:{correctAnswerSelected:"Correct",correctAnswerNotSelected:"Correct Answer Not Selected",incorrectSelection:"Incorrect Selection",key:"Key"}},common:{undo:"Undo",clearAll:"Clear all",correct:"Correct",incorrect:"Incorrect",showCorrectAnswer:"Show correct answer",hideCorrectAnswer:"Hide correct answer",commonCorrectAnswerWithAlternates:"Note: The answer shown above is the most common correct answer for this item. One or more additional correct answers are also defined, and will also be recognized as correct.",warning:"Warning",showNote:"Show Note",hideNote:"Hide Note",cancel:"Cancel"}},es:{translation:{categorize:{limitMaxChoicesPerCategory:"Has alcanzado el límite de {{maxChoicesPerCategory}} respuestas por área. Para agregar otra respuesta, primero se debe eliminar una respuesta.",maxChoicesPerCategoryRestriction:"Para cambiar este valor a {{maxChoicesPerCategory}}, cada categoría debe tener {{maxChoicesPerCategory}} o menos opciones de respuesta"},ebsr:{part:"Parte {{index}}"},numberLine:{addElementLimit_one:"Solo puedes agregar {{count}} elemento",addElementLimit_other:"Solo puedes agregar {{count}} elementos",clearAll:"Borrar todo"},imageClozeAssociation:{reachedLimit_one:"Has alcanzado el límite de {{count}} respuesta por área. Para agregar otra respuesta, primero se debe eliminar una respuesta.",reachedLimit_other:"Lleno"},drawingResponse:{fillColor:"Color de relleno",outlineColor:"Color del contorno",noFill:"Sin relleno",lightblue:"Azul claro",lightyellow:"Amarillo claro",red:"Rojo",orange:"Naranja",yellow:"Amarillo",violet:"Violeta",blue:"Azul",green:"Verde",white:"Blanco",black:"Negro",onDoubleClick:"Haz doble clic para revisar este texto. Presiona el botón de ingreso para enviar"},charting:{addCategory:"Añadir categoría",actions:"Acciones",add:"Añadir",delete:"Eliminar",newLabel:"Nueva etiqueta",reachedLimit_other:"No puede haber más de {{count}} categorías.",keyLegend:{incorrectAnswer:"Respuesta incorrecta del estudiante",correctAnswer:"Respuesta correcta del estudiante",correctKeyAnswer:"Clave de respuesta correcta"}},graphing:{point:"Punto",circle:"Circulo",line:"Línea",parabola:"Parábola",absolute:"Valor absoluto",exponential:"Exponencial",polygon:"Polígono",ray:"Semirrecta",segment:"Segmento ",sine:"Seno",vector:"Vector",label:"Etiqueta",redo:"Rehacer",reset:"Reiniciar"},mathInline:{primaryCorrectWithAlternates:"Nota: La respuesta que se muestra arriba es la respuesta correcta principal especificada por el autor para esta pregunta, pero también se pueden reconocer otras respuestas como correctas."},multipleChoice:{minSelections:"Seleccione al menos {{minSelections}}.",maxSelections_one:"Sólo se permite {{maxSelections}} respuesta.",maxSelections_other:"Sólo se permiten {{maxSelections}} respuestas.",minmaxSelections_equal:"Seleccione {{minSelections}}.",minmaxSelections_range:"Seleccione entre {{minSelections}} y {{maxSelections}}."},selectText:{correctAnswerSelected:"Respuesta Correcta",correctAnswerNotSelected:"Respuesta Correcta No Seleccionada",incorrectSelection:"Selección Incorrecta",key:"Clave"}},common:{undo:"Deshacer",clearAll:"Borrar todo",correct:"Correct",incorrect:"Incorrect",showCorrectAnswer:"Mostrar respuesta correcta",hideCorrectAnswer:"Ocultar respuesta correcta",commonCorrectAnswerWithAlternates:"Nota: La respuesta que se muestra arriba es la respuesta correcta más común para esta pregunta. También se definen una o más respuestas correctas adicionales, y también se reconocerán como correctas.",warning:"Advertencia",showNote:"Mostrar Nota",hideNote:"Ocultar Nota",cancel:"Cancelar"}}}});var ye={translator:{...me,t:(e,t)=>{const{lng:n}=t;switch(n){case"en_US":case"en-US":t.lng="en";break;case"es_ES":case"es-ES":case"es_MX":case"es-MX":t.lng="es"}return me.t(e,{lng:n,...t})}},languageOptions:[{value:"en_US",label:"English (US)"},{value:"es_ES",label:"Spanish"}]},be=p(Object.freeze({__proto__:null,default:ye})),_e={},xe={},we={};function Se(){return Se=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Se.apply(null,arguments)}function Ee(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}function ke(e,t){return ke=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ke(e,t)}function Ce(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,ke(e,t)}function Oe(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}var Ae={disabled:!1};var je=e.createContext(null),Le=function(e){return e.scrollTop};const Re=e,Me=t;var Pe="unmounted",Ne="exited",Ie="entering",Te="entered",Be="exiting",$e=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var o,i=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?i?(o=Ne,r.appearStatus=Ie):o=Te:o=t.unmountOnExit||t.mountOnEnter?Pe:Ne,r.state={status:o},r.nextCallback=null,r}Ce(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===Pe?{status:Ne}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==Ie&&n!==Te&&(t=Ie):n!==Ie&&n!==Te||(t=Be)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!=typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t)if(this.cancelNextCallback(),t===Ie){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:Me.findDOMNode(this);n&&Le(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Ne&&this.setState({status:Pe})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,o=this.props.nodeRef?[r]:[Me.findDOMNode(this),r],i=o[0],a=o[1],s=this.getTimeouts(),l=r?s.appear:s.enter;!e&&!n||Ae.disabled?this.safeSetState({status:Te},function(){t.props.onEntered(i)}):(this.props.onEnter(i,a),this.safeSetState({status:Ie},function(){t.props.onEntering(i,a),t.onTransitionEnd(l,function(){t.safeSetState({status:Te},function(){t.props.onEntered(i,a)})})}))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:Me.findDOMNode(this);t&&!Ae.disabled?(this.props.onExit(r),this.safeSetState({status:Be},function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,function(){e.safeSetState({status:Ne},function(){e.props.onExited(r)})})})):this.safeSetState({status:Ne},function(){e.props.onExited(r)})},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:Me.findDOMNode(this),r=null==e&&!this.props.addEndListener;if(n&&!r){if(this.props.addEndListener){var o=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],i=o[0],a=o[1];this.props.addEndListener(i,a)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if(e===Pe)return null;var t=this.props,n=t.children;t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef;var r=Ee(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return Re.createElement(je.Provider,{value:null},"function"==typeof n?n(e,r):Re.cloneElement(Re.Children.only(n),r))},t}(Re.Component);function We(){}$e.contextType=je,$e.propTypes={},$e.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:We,onEntering:We,onEntered:We,onExit:We,onExiting:We,onExited:We},$e.UNMOUNTED=Pe,$e.EXITED=Ne,$e.ENTERING=Ie,$e.ENTERED=Te,$e.EXITING=Be;var De=$e;const ze=e;var Fe=function(e,t){return e&&t&&t.split(" ").forEach(function(t){return r=t,void((n=e).classList?n.classList.add(r):function(e,t){return e.classList?!!t&&e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")}(n,r)||("string"==typeof n.className?n.className=n.className+" "+r:n.setAttribute("class",(n.className&&n.className.baseVal||"")+" "+r)));var n,r})},Ue=function(e,t){return e&&t&&t.split(" ").forEach(function(t){return r=t,void((n=e).classList?n.classList.remove(r):"string"==typeof n.className?n.className=Oe(n.className,r):n.setAttribute("class",Oe(n.className&&n.className.baseVal||"",r)));var n,r})},He=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).appliedClasses={appear:{},enter:{},exit:{}},t.onEnter=function(e,n){var r=t.resolveArguments(e,n),o=r[0],i=r[1];t.removeClasses(o,"exit"),t.addClass(o,i?"appear":"enter","base"),t.props.onEnter&&t.props.onEnter(e,n)},t.onEntering=function(e,n){var r=t.resolveArguments(e,n),o=r[0],i=r[1]?"appear":"enter";t.addClass(o,i,"active"),t.props.onEntering&&t.props.onEntering(e,n)},t.onEntered=function(e,n){var r=t.resolveArguments(e,n),o=r[0],i=r[1]?"appear":"enter";t.removeClasses(o,i),t.addClass(o,i,"done"),t.props.onEntered&&t.props.onEntered(e,n)},t.onExit=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,"appear"),t.removeClasses(n,"enter"),t.addClass(n,"exit","base"),t.props.onExit&&t.props.onExit(e)},t.onExiting=function(e){var n=t.resolveArguments(e)[0];t.addClass(n,"exit","active"),t.props.onExiting&&t.props.onExiting(e)},t.onExited=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,"exit"),t.addClass(n,"exit","done"),t.props.onExited&&t.props.onExited(e)},t.resolveArguments=function(e,n){return t.props.nodeRef?[t.props.nodeRef.current,e]:[e,n]},t.getClassNames=function(e){var n=t.props.classNames,r="string"==typeof n,o=r?""+(r&&n?n+"-":"")+e:n[e];return{baseClassName:o,activeClassName:r?o+"-active":n[e+"Active"],doneClassName:r?o+"-done":n[e+"Done"]}},t}Ce(t,e);var n=t.prototype;return n.addClass=function(e,t,n){var r=this.getClassNames(t)[n+"ClassName"],o=this.getClassNames("enter").doneClassName;"appear"===t&&"done"===n&&o&&(r+=" "+o),"active"===n&&e&&Le(e),r&&(this.appliedClasses[t][n]=r,Fe(e,r))},n.removeClasses=function(e,t){var n=this.appliedClasses[t],r=n.base,o=n.active,i=n.done;this.appliedClasses[t]={},r&&Ue(e,r),o&&Ue(e,o),i&&Ue(e,i)},n.render=function(){var e=this.props;e.classNames;var t=Ee(e,["classNames"]);return ze.createElement(De,Se({},t,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(ze.Component);He.defaultProps={classNames:""},He.propTypes={};var Ve=He;const{Children:qe}=e,{cloneElement:Ke}=e,{isValidElement:Je}=e;function Ye(e,t){var n=Object.create(null);return e&&qe.map(e,function(e){return e}).forEach(function(e){n[e.key]=function(e){return t&&Je(e)?t(e):e}(e)}),n}function Ge(e,t,n){return null!=n[t]?n[t]:e.props[t]}function Qe(e,t,n){var r=Ye(e.children),o=function(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,o=Object.create(null),i=[];for(var a in e)a in t?i.length&&(o[a]=i,i=[]):i.push(a);var s={};for(var l in t){if(o[l])for(r=0;r<o[l].length;r++){var u=o[l][r];s[o[l][r]]=n(u)}s[l]=n(l)}for(r=0;r<i.length;r++)s[i[r]]=n(i[r]);return s}(t,r);return Object.keys(o).forEach(function(i){var a=o[i];if(Je(a)){var s=i in t,l=i in r,u=t[i],c=Je(u)&&!u.props.in;!l||s&&!c?l||!s||c?l&&s&&Je(u)&&(o[i]=Ke(a,{onExited:n.bind(null,a),in:u.props.in,exit:Ge(a,"exit",e),enter:Ge(a,"enter",e)})):o[i]=Ke(a,{in:!1}):o[i]=Ke(a,{onExited:n.bind(null,a),in:!0,exit:Ge(a,"exit",e),enter:Ge(a,"enter",e)})}}),o}const Ze=e;var Xe=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},et=function(e){function t(t,n){var r,o=(r=e.call(this,t,n)||this).handleExited.bind(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(r));return r.state={contextValue:{isMounting:!0},handleExited:o,firstRender:!0},r}Ce(t,e);var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(e,t){var n,r,o=t.children,i=t.handleExited;return{children:t.firstRender?(n=e,r=i,Ye(n.children,function(e){return Ke(e,{onExited:r.bind(null,e),in:!0,appear:Ge(e,"appear",n),enter:Ge(e,"enter",n),exit:Ge(e,"exit",n)})})):Qe(e,o,i),firstRender:!1}},n.handleExited=function(e,t){var n=Ye(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState(function(t){var n=Se({},t.children);return delete n[e.key],{children:n}}))},n.render=function(){var e=this.props,t=e.component,n=e.childFactory,r=Ee(e,["component","childFactory"]),o=this.state.contextValue,i=Xe(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,null===t?Ze.createElement(je.Provider,{value:o},i):Ze.createElement(je.Provider,{value:o},Ze.createElement(t,r,i))},t}(Ze.Component);et.propTypes={},et.defaultProps={component:"div",childFactory:function(e){return e}};var tt=et;const nt=e,rt=t;var ot=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).handleEnter=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onEnter",0,n)},t.handleEntering=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onEntering",0,n)},t.handleEntered=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onEntered",0,n)},t.handleExit=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onExit",1,n)},t.handleExiting=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onExiting",1,n)},t.handleExited=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onExited",1,n)},t}Ce(t,e);var n=t.prototype;return n.handleLifecycle=function(e,t,n){var r,o=this.props.children,i=nt.Children.toArray(o)[t];if(i.props[e]&&(r=i.props)[e].apply(r,n),this.props[e]){var a=i.props.nodeRef?void 0:rt.findDOMNode(this);this.props[e](a)}},n.render=function(){var e=this.props,t=e.children,n=e.in,r=Ee(e,["children","in"]),o=nt.Children.toArray(t),i=o[0],a=o[1];return delete r.onEnter,delete r.onEntering,delete r.onEntered,delete r.onExit,delete r.onExiting,delete r.onExited,nt.createElement(tt,r,n?nt.cloneElement(i,{key:"first",onEnter:this.handleEnter,onEntering:this.handleEntering,onEntered:this.handleEntered}):nt.cloneElement(a,{key:"second",onEnter:this.handleExit,onEntering:this.handleExiting,onEntered:this.handleExited}))},t}(nt.Component);ot.propTypes={};var it=ot;const at=e;var st,lt;var ut="out-in",ct="in-out",dt=function(e,t,n){return function(){var r;e.props[t]&&(r=e.props)[t].apply(r,arguments),n()}},pt=((st={})[ut]=function(e){var t=e.current,n=e.changeState;return at.cloneElement(t,{in:!1,onExited:dt(t,"onExited",function(){n(Ie,null)})})},st[ct]=function(e){var t=e.current,n=e.changeState,r=e.children;return[t,at.cloneElement(r,{in:!0,onEntered:dt(r,"onEntered",function(){n(Ie)})})]},st),ft=((lt={})[ut]=function(e){var t=e.children,n=e.changeState;return at.cloneElement(t,{in:!0,onEntered:dt(t,"onEntered",function(){n(Te,at.cloneElement(t,{in:!0}))})})},lt[ct]=function(e){var t=e.current,n=e.children,r=e.changeState;return[at.cloneElement(t,{in:!1,onExited:dt(t,"onExited",function(){r(Te,at.cloneElement(n,{in:!0}))})}),at.cloneElement(n,{in:!0})]},lt),ht=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).state={status:Te,current:null},t.appeared=!1,t.changeState=function(e,n){void 0===n&&(n=t.state.current),t.setState({status:e,current:n})},t}Ce(t,e);var n=t.prototype;return n.componentDidMount=function(){this.appeared=!0},t.getDerivedStateFromProps=function(e,t){return null==e.children?{current:null}:t.status===Ie&&e.mode===ct?{status:Ie}:!t.current||(n=t.current,r=e.children,n===r||at.isValidElement(n)&&at.isValidElement(r)&&null!=n.key&&n.key===r.key)?{current:at.cloneElement(e.children,{in:!0})}:{status:Be};var n,r},n.render=function(){var e,t=this.props,n=t.children,r=t.mode,o=this.state,i=o.status,a=o.current,s={children:n,current:a,changeState:this.changeState,status:i};switch(i){case Ie:e=ft[r](s);break;case Be:e=pt[r](s);break;case Te:e=a}return at.createElement(je.Provider,{value:{isMounting:!this.appeared}},e)},t}(at.Component);ht.propTypes={},ht.defaultProps={mode:ut};var gt=ht,vt=p(Object.freeze({__proto__:null,CSSTransition:Ve,ReplaceTransition:it,SwitchTransition:gt,TransitionGroup:tt,Transition:De,config:Ae}));const mt=e,yt=o,{Box:bt}=n,_t=r,xt=i;var wt=y.exports;Object.defineProperty(we,"__esModule",{value:!0}),we.default=void 0;var St=wt(b.exports),Et=wt(mt),kt=vt,Ct=yt,Ot=wt(bt),At=wt(_t),jt=xt;const Lt=(0,Ct.styled)(Ot.default)({width:"33px",height:"33px","& svg":{position:"absolute",display:"inline-block",width:"33px",height:"33px",verticalAlign:"middle","& hide":{display:"none"}}}),Rt=(0,Ct.styled)("svg")({"& .incorrect-fill":{fill:`var(--feedback-incorrect-bg-color, ${jt.color.incorrect()})`},"& .correct-fill":{fill:`var(--feedback-correct-bg-color, ${jt.color.correct()})`}}),Mt=(0,Ct.styled)("div")({position:"relative","&.feedback-tick-enter":{opacity:"0",left:"-50px"},"&.feedback-tick-enter-active":{opacity:"1",left:"0px",transition:"left 500ms ease-in 200ms, opacity 500ms linear 200ms"},"&.feedback-tick-exit":{opacity:"1",left:"0px"},"&.feedback-tick-exit-active":{opacity:"0",left:"-50px",transition:"left 300ms ease-in, opacity 300ms"}});class Pt extends Et.default.Component{constructor(e){super(e),(0,St.default)(this,"getIncorrectIcon",()=>Et.default.createElement(Rt,{key:"1",preserveAspectRatio:"xMinYMin meet",x:"0px",y:"0px",viewBox:"0 0 44 40",style:{enableBackground:"new 0 0 44 40"}},Et.default.createElement("g",null,Et.default.createElement("rect",{x:"11",y:"17.3",transform:"matrix(0.7071 -0.7071 0.7071 0.7071 -7.852 19.2507)",className:"incorrect-fill",width:"16.6",height:"3.7"}),Et.default.createElement("rect",{x:"17.4",y:"10.7",transform:"matrix(0.7071 -0.7071 0.7071 0.7071 -7.8175 19.209)",className:"incorrect-fill",width:"3.7",height:"16.6"})))),(0,St.default)(this,"getCorrectIcon",()=>Et.default.createElement(Rt,{key:"2",preserveAspectRatio:"xMinYMin meet",version:"1.1",x:"0px",y:"0px",viewBox:"0 0 44 40",style:{enableBackground:"new 0 0 44 40"}},Et.default.createElement("polygon",{className:"correct-fill",points:"19.1,28.6 11.8,22.3 14.4,19.2 17.9,22.1 23.9,11.4 27.5,13.4"}))),this.nodeRef=Et.default.createRef()}render(){const{correctness:e}=this.props,t=(()=>"incorrect"===e?this.getIncorrectIcon():"correct"===e?this.getCorrectIcon():null)();return Et.default.createElement(Lt,null,Et.default.createElement(kt.TransitionGroup,null,e&&Et.default.createElement(kt.CSSTransition,{nodeRef:this.nodeRef,classNames:{enter:"feedback-tick-enter",enterActive:"feedback-tick-enter-active",exit:"feedback-tick-exit",exitActive:"feedback-tick-exit-active"},timeout:{enter:700,exit:300}},Et.default.createElement(Mt,{ref:this.nodeRef},t))))}}(0,St.default)(Pt,"propTypes",{correctness:At.default.string}),we.default=Pt;const{FormControlLabel:Nt}=n,{Box:It}=n,{Checkbox:Tt}=n,{Radio:Bt}=n,$t=e,Wt=r,Dt=o,zt=i,Ft=a;var Ut=y.exports;Object.defineProperty(xe,"__esModule",{value:!0}),xe.default=xe.StyledRadio=xe.StyledFormControlLabel=xe.StyledCheckbox=xe.ChoiceInput=void 0;var Ht=Ut(b.exports),Vt=Ut(E.exports),qt=Ut(Nt),Kt=Ut($t),Jt=Ut(Wt),Yt=Dt,Gt=Ut(It),Qt=Ut(Tt),Zt=zt,Xt=Ut(Bt),en=Ut(Ft),tn=Ut(we);const nn="multiple-choice-component",rn=(0,Yt.styled)(Gt.default)({display:"flex",alignItems:"center",backgroundColor:Zt.color.background()}),on=(0,Yt.styled)(Gt.default)({display:"flex",alignItems:"center",backgroundColor:Zt.color.background(),flex:1,"& .MuiFormControlLabel-root":{marginLeft:"-14px"},"& label":{color:Zt.color.text(),"& > span":{fontSize:"inherit"},"& > .MuiButtonBase-root":{padding:"12px"}}}),an=(0,Yt.styled)("span")(({theme:e})=>({display:"flex",alignItems:"center","& > span":{marginLeft:`-${e.spacing(1)}`}})),sn=(0,Yt.styled)("span")({position:"absolute",left:"-10000px",top:"auto",width:"1px",height:"1px",overflow:"hidden"}),ln=xe.StyledFormControlLabel=(0,Yt.styled)(qt.default)({"& .MuiFormControlLabel-label":{color:`${Zt.color.text()} !important`,backgroundColor:Zt.color.background(),letterSpacing:"normal"},"&.Mui-disabled *":{cursor:"not-allowed !important"}}),un=(e,t)=>({[`&.${nn}`]:{color:`var(--choice-input-${e}, ${t}) !important`}}),cn=e=>{const t=t=>e?`${e}-${t}`:t;return{[t("root")]:{...un("color",Zt.color.text()),..."correct"===e?un("correct-color",Zt.color.text()):{},..."incorrect"===e?un("incorrect-color",Zt.color.incorrect()):{}},[t("checked")]:{..."correct"===e?un("correct-selected-color",Zt.color.correct()):{},..."incorrect"===e?un("incorrect-checked",Zt.color.incorrect()):{},...e?{}:un("selected-color",Zt.color.primary())},[t("disabled")]:{...un("disabled-color",Zt.color.text()),..."correct"===e?un("correct-disabled-color",Zt.color.disabled()):{},..."incorrect"===e?un("incorrect-disabled-color",Zt.color.disabled()):{},opacity:.6,cursor:"not-allowed !important",pointerEvents:"initial !important"},focusVisibleUnchecked:{outline:`2px solid ${Zt.color.keyBoardFocusIndicator()}`,backgroundColor:"transparent"},focusVisibleChecked:{outline:`2px solid ${Zt.color.keyBoardFocusIndicator()}`,backgroundColor:"transparent"}}},dn=(0,Yt.styled)(Qt.default,{shouldForwardProp:e=>"correctness"!==e})(({correctness:e})=>{const t=cn(e),n=t=>e?`${e}-${t}`:t;return{[`&.${nn}`]:{...t[n("root")],"&.Mui-checked":t[n("checked")],"&.Mui-disabled":e?{}:t[n("disabled")],"&:hover:not(.Mui-disabled) svg":{boxShadow:`0px 0px 0px 2px ${Zt.color.keyBoardFocusIndicator()}`,borderRadius:"4px"}},"&.Mui-focusVisible":{"&:not(.Mui-checked)":t.focusVisibleUnchecked,"&.Mui-checked":t.focusVisibleChecked}}}),pn=e=>{const{correctness:t,checked:n,onChange:r,disabled:o,value:i,id:a,onKeyDown:s,inputRef:l}=e,u={checked:n,onChange:r,disabled:o,value:i};return Kt.default.createElement(dn,(0,Vt.default)({id:a,slotProps:{input:{ref:l}},onKeyDown:s,disableRipple:!0},u,{correctness:t,className:nn}))};xe.StyledCheckbox=pn;const fn=(0,Yt.styled)(Xt.default,{shouldForwardProp:e=>"correctness"!==e})(({correctness:e})=>{const t=cn(e),n=t=>e?`${e}-${t}`:t;return{[`&.${nn}`]:{...t[n("root")],"&.Mui-checked":t[n("checked")],"&.Mui-disabled":e?{}:t[n("disabled")],"&.Mui-focusVisible:not(.Mui-checked)":t.focusVisibleUnchecked,"&.Mui-focusVisible.Mui-checked":t.focusVisibleChecked,"&:hover:not(.Mui-disabled) svg":{boxShadow:`0px 0px 0px 2px ${Zt.color.keyBoardFocusIndicator()}`,borderRadius:"50%"}},"&.Mui-focusVisible":{"& input":{outline:0},"& .MuiTouchRipple-root":{display:"none"}}}}),hn=e=>{const{correctness:t,checked:n,onChange:r,disabled:o,value:i,id:a,tagName:s,inputRef:l}=e,u={checked:n,onChange:r,disabled:o,value:i};return Kt.default.createElement(fn,(0,Vt.default)({id:a,slotProps:{input:{ref:l}},disableRipple:!0},u,{correctness:t,className:nn,name:s}))};xe.StyledRadio=hn;class gn extends Kt.default.Component{constructor(e){super(e),(0,Ht.default)(this,"handleKeyDown",e=>{const{choiceMode:t}=this.props;if("checkbox"!==t)return;const n="ArrowDown"===e.key,r="ArrowUp"===e.key;if(!n&&!r)return;e.preventDefault();const o=document.getElementById(this.choiceId);if(!o)return;const i=o.closest("fieldset");if(!i)return;const a=Array.from(i.querySelectorAll('input[type="checkbox"]')),s=a.findIndex(e=>e===o);if(-1===s)return;const l=a[n?s+1:s-1];l&&l.focus()}),this.onToggleChoice=this.onToggleChoice.bind(this),this.choiceId=this.generateChoiceId(),this.descId=`${this.choiceId}-desc`}onToggleChoice(e){this.props.onChange(e)}generateChoiceId(){return"choice-"+(1e4*Math.random()).toFixed()}render(){const{choiceMode:e,disabled:t,displayKey:n,feedback:r,label:o,correctness:i,className:a,rationale:s,hideTick:l,isEvaluateMode:u,choicesLayout:c,value:d,checked:p,tagName:f,isSelectionButtonBelow:h}=this.props,g="checkbox"===e?pn:hn,v="checkbox"===e?"checkbox":"radio-button",m={..."horizontal"===c&&{[`& .${nn}`]:{padding:"8px",margin:"4px 0 4px 4px"}},...h&&"grid"!==c&&{"& > label":{alignItems:"flex-start"}},...h&&"grid"===c&&{justifyContent:"center","& > label":{alignItems:"center"}}},y="string"==typeof o&&(o.includes("<math")||o.includes("\\(")||o.includes("\\[")||o.includes("<img")||o.includes("data-latex")||o.includes("data-raw")||o.includes("<mjx-container")),b=n?Kt.default.createElement(sn,{id:this.descId},y?`Pick the answer below, ${n}`:n):null,_=Kt.default.createElement(Kt.default.Fragment,null,n&&!h?Kt.default.createElement(rn,{component:"span"},Kt.default.createElement("span",{"aria-hidden":"true"},n,"."," "),Kt.default.createElement(Zt.PreviewPrompt,{className:"prompt-label",prompt:o,tagName:"span"})):Kt.default.createElement(Zt.PreviewPrompt,{className:"prompt-label",prompt:o,tagName:"span"})),x={disabled:t,checked:p,correctness:i,tagName:f,value:d,id:this.choiceId,onChange:this.onToggleChoice,onKeyDown:this.handleKeyDown,...b?{"aria-describedby":this.descId}:{}},w=h?Kt.default.createElement(an,null,b,Kt.default.createElement(g,(0,Vt.default)({},x,{style:{padding:0}})),Kt.default.createElement("span",{"aria-hidden":"true"},n?`${n}.`:"")):Kt.default.createElement(Kt.default.Fragment,null,b,Kt.default.createElement(g,x));return Kt.default.createElement("div",{className:(0,en.default)(a,"corespring-"+v,"choice-input")},Kt.default.createElement(rn,null,!l&&u&&Kt.default.createElement(tn.default,{correctness:i}),Kt.default.createElement(on,{className:"checkbox-holder",sx:m},Kt.default.createElement(ln,{label:_,value:d,htmlFor:this.choiceId,labelPlacement:h?"top":void 0,control:w}))),s&&Kt.default.createElement(Zt.PreviewPrompt,{className:"rationale",defaultClassName:"rationale",prompt:s}),Kt.default.createElement(Zt.Feedback,{feedback:r,correctness:i}))}}xe.ChoiceInput=gn,(0,Ht.default)(gn,"propTypes",{choiceMode:Jt.default.oneOf(["radio","checkbox"]),displayKey:Jt.default.string,checked:Jt.default.bool.isRequired,correctness:Jt.default.string,disabled:Jt.default.bool.isRequired,feedback:Jt.default.string,label:Jt.default.string.isRequired,rationale:Jt.default.string,onChange:Jt.default.func.isRequired,value:Jt.default.string.isRequired,className:Jt.default.string,tagName:Jt.default.string,hideTick:Jt.default.bool,isEvaluateMode:Jt.default.bool,choicesLayout:Jt.default.oneOf(["vertical","grid","horizontal"]),isSelectionButtonBelow:Jt.default.bool}),(0,Ht.default)(gn,"defaultProps",{rationale:null,checked:!1,isEvaluateMode:!1}),xe.default=gn;const vn=e,mn=r,yn=o,{Box:bn}=n,_n=i;var xn=y.exports;Object.defineProperty(_e,"__esModule",{value:!0}),_e.default=_e.Choice=void 0;var wn=xn(b.exports),Sn=xn(vn),En=xn(mn),kn=yn,Cn=xn(bn),On=_n,An=xn(xe);const jn=(0,kn.styled)(Cn.default,{shouldForwardProp:e=>"noBorder"!==e&&"horizontalLayout"!==e})(({theme:e,noBorder:t,horizontalLayout:n})=>({paddingTop:e.spacing(2.5),paddingBottom:`calc(${e.spacing(1)} + 2px)`,paddingLeft:`calc(${e.spacing(1)} + 2px)`,paddingRight:`calc(${e.spacing(1)} + 2px)`,borderBottom:t?"none":`1px solid ${On.color.border()}`,...n&&{paddingRight:e.spacing(2.5),"& label":{marginRight:e.spacing(1)}}}));class Ln extends Sn.default.Component{constructor(...e){super(...e),(0,wn.default)(this,"state",{isHovered:!1}),(0,wn.default)(this,"handleMouseEnter",()=>{const{disabled:e,checked:t}=this.props;e||t||this.setState({isHovered:!0})}),(0,wn.default)(this,"handleMouseLeave",()=>{this.setState({isHovered:!1})}),(0,wn.default)(this,"onChange",e=>{const{disabled:t,onChoiceChanged:n}=this.props;t||n(e)})}render(){const{choice:e,index:t,choicesLength:n,showCorrect:r,isEvaluateMode:o,choiceMode:i,disabled:a,checked:s,correctness:l,displayKey:u,choicesLayout:c,gridColumns:d,isSelectionButtonBelow:p,selectedAnswerBackgroundColor:f,selectedAnswerStrokeColor:h,selectedAnswerStrokeWidth:g,hoverAnswerBackgroundColor:v,hoverAnswerStrokeColor:m,hoverAnswerStrokeWidth:y,tagName:b}=this.props,{isHovered:_}=this.state,x="choice"+(t===n-1?" last":""),w=!o||r?"":e.feedback,S={...e,checked:s,choiceMode:i,disabled:a,feedback:w,correctness:l,displayKey:u,index:t,choicesLayout:c,gridColumns:d,onChange:this.onChange,isEvaluateMode:o,isSelectionButtonBelow:p,selectedAnswerStrokeColor:h,selectedAnswerStrokeWidth:g,tagName:b},E=h&&"initial"!==h,k=m&&"initial"!==m;let C="transparent",O="2px",A="initial";(E||k)&&(s&&E?(C=h,O=g):_&&!a&&k&&(C=m,O=y)),s&&f&&"initial"!==f?A=f:_&&!a&&v&&"initial"!==v&&(A=v);const j=E||k,L=j?{border:`${(e=>{if(!e)return"2px";const t=String(e).trim();return/^\d+(\.\d+)?$/.test(t)?`${t}px`:t})(O)} solid ${C}`,borderRadius:"8px"}:{},R=t===n-1||"vertical"!==c||j,M="horizontal"===c,P="initial"!==A?A:"initial";return Sn.default.createElement("div",{className:x,key:t,style:{backgroundColor:P,...L},onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave},Sn.default.createElement(jn,{component:"div",noBorder:R,horizontalLayout:M},Sn.default.createElement(An.default,S)))}}_e.Choice=Ln,(0,wn.default)(Ln,"propTypes",{}),Ln.propTypes={choiceMode:En.default.oneOf(["radio","checkbox"]),choice:En.default.object,disabled:En.default.bool.isRequired,onChoiceChanged:En.default.func,index:En.default.number,choicesLength:En.default.number,showCorrect:En.default.bool,isEvaluateMode:En.default.bool,checked:En.default.bool,correctness:En.default.string,displayKey:En.default.string,choicesLayout:En.default.oneOf(["vertical","grid","horizontal"]),gridColumns:En.default.string,selectedAnswerBackgroundColor:En.default.string,selectedAnswerStrokeColor:En.default.string,selectedAnswerStrokeWidth:En.default.string,hoverAnswerBackgroundColor:En.default.string,hoverAnswerStrokeColor:En.default.string,hoverAnswerStrokeWidth:En.default.string,tagName:En.default.string,isSelectionButtonBelow:En.default.bool},_e.default=Ln;var Rn={};Object.defineProperty(Rn,"__esModule",{value:!0}),Rn.reachedMaxSelections=Rn.exceedsMaxSelections=void 0;Rn.reachedMaxSelections=(e,t)=>null!=t&&e>=t;Rn.exceedsMaxSelections=(e,t)=>null!=t&&e>t;const Mn=e,Pn=r,Nn=s,In=a,Tn=o,{Box:Bn}=n,$n=i;var Wn=y.exports;Object.defineProperty(k,"__esModule",{value:!0}),k.default=k.MultipleChoice=void 0;var Dn=Wn(b.exports),zn=Wn(Mn),Fn=Wn(Pn),Un=Wn(Nn),Hn=Wn(In),Vn=Tn,qn=Wn(Bn),Kn=$n,Jn=Wn(be),Yn=Wn(_e),Gn=Rn;const{translator:Qn}=Jn.default,Zn=(0,Vn.styled)(qn.default)({color:Kn.color.text(),backgroundColor:Kn.color.background(),"& *":{"-webkit-font-smoothing":"antialiased"},position:"relative","& legend":{border:"none !important"}}),Xn=(0,Vn.styled)("h2")(({theme:e})=>({display:"block",fontSize:"inherit",margin:"0",fontWeight:"normal",paddingBottom:e.spacing(2)})),er=(0,Vn.styled)(qn.default)(({theme:e})=>({marginBottom:e.spacing(2)})),tr=(0,Vn.styled)(qn.default)({display:"flex",flexDirection:"row",flexWrap:"wrap"}),nr=(0,Vn.styled)(qn.default)({display:"grid"}),rr=(0,Vn.styled)("fieldset")({border:"0px",padding:"0.01em 0 0 0",margin:"0px",minWidth:"0px"}),or=(0,Vn.styled)("h3")({position:"absolute",left:"-10000px",top:"auto",width:"1px",height:"1px",overflow:"hidden"}),ir=(0,Vn.styled)("div")(({theme:e})=>({fontSize:e.typography.fontSize-2,color:e.palette.error.main,paddingTop:e.spacing(1)}));class ar extends zn.default.Component{constructor(e){super(e),(0,Dn.default)(this,"handleChange",e=>{const{value:t,checked:n}=e.target,{choiceMode:r,maxSelections:o,onChoiceChanged:i,session:a}=this.props;"radio"!==r&&a.value&&(0,Gn.reachedMaxSelections)(a.value.length,o)&&(this.setState({maxSelectionsErrorState:n}),n)||i({value:t,selected:n,selector:"Mouse"})}),(0,Dn.default)(this,"onToggle",()=>{"evaluate"===this.props.mode&&this.setState({showCorrect:!this.state.showCorrect},()=>{this.props.onShowCorrectToggle&&this.props.onShowCorrectToggle()})}),(0,Dn.default)(this,"getCorrectness",(e={})=>{const t=e.correct,n=this.isSelected(e.value);return this.state.showCorrect?t?"correct":void 0:t?n?"correct":"incorrect":n?"incorrect":void 0}),this.state={showCorrect:this.props.options&&this.props.alwaysShowCorrect||!1,maxSelectionsErrorState:!1},this.onToggle=this.onToggle.bind(this),this.groupName=`mc-group-${Math.random().toString(36).slice(2,10)}`}isSelected(e){const t=this.props.session&&this.props.session.value;return t&&t.indexOf&&t.indexOf(e)>=0}UNSAFE_componentWillReceiveProps(e){e.correctResponse||!1===this.state.showCorrect||this.setState({showCorrect:!1},()=>{this.props.onShowCorrectToggle&&this.props.onShowCorrectToggle()}),e.options&&e.alwaysShowCorrect&&!0!==this.state.showCorrect&&this.setState({showCorrect:!0},()=>{this.props.onShowCorrectToggle&&this.props.onShowCorrectToggle()})}indexToSymbol(e){return"numbers"===this.props.keyMode?`${e+1}`:"letters"===this.props.keyMode?String.fromCharCode(97+e).toUpperCase():""}getChecked(e){if(this.props.options&&this.props.alwaysShowCorrect)return e.correct||!1;return this.state.showCorrect&&"evaluate"===this.props.mode?e.correct||!1:this.isSelected(e.value)}renderHeading(){const{mode:e,choiceMode:t,includeSrHeading:n,baseHeadingLevel:r,partLabel:o}=this.props;if(!(!o&&!1!==n)||"gather"!==e)return null;const i=r?Math.min(6,r):2,a=or.withComponent(`h${i}`),s="radio"===t?"Multiple Choice Question":"Multiple Select Question";return zn.default.createElement(a,null,s)}render(){const{mode:e,disabled:t,className:n,choices:r=[],choiceMode:o,gridColumns:i,partLabel:a,prompt:s,responseCorrect:l,teacherInstructions:u,alwaysShowCorrect:c,animationsDisabled:d,language:p,isSelectionButtonBelow:f,minSelections:h,maxSelections:g,autoplayAudioEnabled:v,session:m,customAudioButton:y,options:b,baseHeadingLevel:_}=this.props,{showCorrect:x,maxSelectionsErrorState:w}=this.state,S="evaluate"===e,E=S&&!l,k=i>1?{gridTemplateColumns:`repeat(${i}, 1fr)`}:void 0,C=m.value&&m.value.length||0,O=(()=>{if(!_)return;let e=1;return a&&(e+=1),Math.min(6,_+e)})(),A=zn.default.createElement(Kn.PreviewPrompt,{tagName:"div",className:"prompt",defaultClassName:"teacher-instructions",prompt:u}),j="grid"===this.props.choicesLayout?nr:"horizontal"===this.props.choicesLayout?tr:qn.default;return zn.default.createElement(Zn,{id:"main-container",className:(0,Hn.default)(n,"multiple-choice")},a&&zn.default.createElement(Xn,{as:_?`h${Math.min(6,_+1)}`:"h2"},a),this.renderHeading(),u&&zn.default.createElement(er,null,d?A:zn.default.createElement(Kn.Collapsible,{labels:{hidden:"Show Teacher Instructions",visible:"Hide Teacher Instructions"}},A)),zn.default.createElement(rr,{role:"radio"===o?"radiogroup":"group"},zn.default.createElement(Kn.PreviewPrompt,{className:"prompt",defaultClassName:"prompt",prompt:(L=s,L&&O?(0,Kn.transformDataHeadings)(L,O):L),tagName:"legend",autoplayAudioEnabled:v,customAudioButton:y}),!(b&&c)&&zn.default.createElement(Un.default,{show:E,toggled:x,onToggle:this.onToggle.bind(this),language:p}),zn.default.createElement(j,{style:k},r.map((e,n)=>zn.default.createElement(Yn.default,{choicesLayout:this.props.choicesLayout,selectedAnswerBackgroundColor:this.props.selectedAnswerBackgroundColor,selectedAnswerStrokeColor:this.props.selectedAnswerStrokeColor,selectedAnswerStrokeWidth:this.props.selectedAnswerStrokeWidth,hoverAnswerBackgroundColor:this.props.hoverAnswerBackgroundColor,hoverAnswerStrokeColor:this.props.hoverAnswerStrokeColor,hoverAnswerStrokeWidth:this.props.hoverAnswerStrokeWidth,gridColumns:i,key:`choice-${n}`,choice:e,index:n,choicesLength:r.length,showCorrect:x,isEvaluateMode:S,choiceMode:o,disabled:t,tagName:this.groupName,onChoiceChanged:this.handleChange,hideTick:e.hideTick,checked:this.getChecked(e),correctness:S?this.getCorrectness(e):void 0,displayKey:this.indexToSymbol(n),isSelectionButtonBelow:f})))),"checkbox"===o&&C<h&&zn.default.createElement(ir,null,h&&g?h===g?Qn.t("translation:multipleChoice:minmaxSelections_equal",{lng:p,minSelections:h}):Qn.t("translation:multipleChoice:minmaxSelections_range",{lng:p,minSelections:h,maxSelections:g}):h?Qn.t("translation:multipleChoice:minSelections",{lng:p,minSelections:h}):""),"checkbox"===o&&w&&zn.default.createElement(ir,null,Qn.t("translation:multipleChoice:maxSelections_"+(1===g?"one":"other"),{lng:p,maxSelections:g})));var L}}k.MultipleChoice=ar,(0,Dn.default)(ar,"propTypes",{className:Fn.default.string,mode:Fn.default.oneOf(["gather","view","evaluate"]),choiceMode:Fn.default.oneOf(["radio","checkbox"]),keyMode:Fn.default.oneOf(["numbers","letters","none"]),choices:Fn.default.array,partLabel:Fn.default.string,prompt:Fn.default.string,teacherInstructions:Fn.default.string,session:Fn.default.object,disabled:Fn.default.bool,onChoiceChanged:Fn.default.func,responseCorrect:Fn.default.bool,correctResponse:Fn.default.array,choicesLayout:Fn.default.oneOf(["vertical","grid","horizontal"]),gridColumns:Fn.default.string,alwaysShowCorrect:Fn.default.bool,animationsDisabled:Fn.default.bool,language:Fn.default.string,selectedAnswerBackgroundColor:Fn.default.string,selectedAnswerStrokeColor:Fn.default.string,selectedAnswerStrokeWidth:Fn.default.string,hoverAnswerBackgroundColor:Fn.default.string,hoverAnswerStrokeColor:Fn.default.string,hoverAnswerStrokeWidth:Fn.default.string,onShowCorrectToggle:Fn.default.func,isSelectionButtonBelow:Fn.default.bool,minSelections:Fn.default.number,maxSelections:Fn.default.number,autoplayAudioEnabled:Fn.default.bool,customAudioButton:{playImage:Fn.default.string,pauseImage:Fn.default.string},options:Fn.default.object,baseHeadingLevel:Fn.default.number,includeSrHeading:Fn.default.bool}),ar.defaultProps={session:{value:[]}},k.default=ar;const sr=e,lr=r,ur=i;var cr=y.exports;Object.defineProperty(S,"__esModule",{value:!0}),S.default=void 0;var dr=cr(E.exports),pr=cr(b.exports),fr=cr(sr),hr=cr(lr),gr=ur,vr=cr(k);class mr extends fr.default.Component{render(){const{model:e,onChoiceChanged:t,session:n,onShowCorrectToggle:r,options:o,baseHeadingLevel:i,includeSrHeading:a}=this.props,{extraCSSRules:s,fontSizeFactor:l}=e;return fr.default.createElement(gr.PreviewLayout,{extraCSSRules:s,fontSizeFactor:l,classes:{}},fr.default.createElement(vr.default,(0,dr.default)({},e,{options:o,session:n,onChoiceChanged:t,onShowCorrectToggle:r,baseHeadingLevel:i,includeSrHeading:a})))}}(0,pr.default)(mr,"propTypes",{model:hr.default.object,session:hr.default.object,options:hr.default.object,onChoiceChanged:hr.default.func,onShowCorrectToggle:hr.default.func,extraCSSRules:hr.default.shape({names:hr.default.arrayOf(hr.default.string),rules:hr.default.string}),baseHeadingLevel:hr.default.number,includeSrHeading:hr.default.bool}),(0,pr.default)(mr,"defaultProps",{model:{},session:{}}),S.default=mr;var yr="object"==typeof global&&global&&global.Object===Object&&global,br="object"==typeof self&&self&&self.Object===Object&&self,_r=yr||br||Function("return this")(),xr=_r.Symbol,wr=Object.prototype,Sr=wr.hasOwnProperty,Er=wr.toString,kr=xr?xr.toStringTag:void 0;var Cr=Object.prototype.toString;var Or=xr?xr.toStringTag:void 0;function Ar(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Or&&Or in Object(e)?function(e){var t=Sr.call(e,kr),n=e[kr];try{e[kr]=void 0;var r=!0}catch(e){}var o=Er.call(e);return r&&(t?e[kr]=n:delete e[kr]),o}(e):function(e){return Cr.call(e)}(e)}function jr(e){return null!=e&&"object"==typeof e}function Lr(e){return"symbol"==typeof e||jr(e)&&"[object Symbol]"==Ar(e)}function Rr(e){return"number"==typeof e?e:Lr(e)?NaN:+e}function Mr(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}var Pr=Array.isArray,Nr=xr?xr.prototype:void 0,Ir=Nr?Nr.toString:void 0;function Tr(e){if("string"==typeof e)return e;if(Pr(e))return Mr(e,Tr)+"";if(Lr(e))return Ir?Ir.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Br(e,t){return function(n,r){var o;if(void 0===n&&void 0===r)return t;if(void 0!==n&&(o=n),void 0!==r){if(void 0===o)return r;"string"==typeof n||"string"==typeof r?(n=Tr(n),r=Tr(r)):(n=Rr(n),r=Rr(r)),o=e(n,r)}return o}}var $r=Br(function(e,t){return e+t},0),Wr=/\s/;function Dr(e){for(var t=e.length;t--&&Wr.test(e.charAt(t)););return t}var zr=/^\s+/;function Fr(e){return e?e.slice(0,Dr(e)+1).replace(zr,""):e}function Ur(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}var Hr=/^[-+]0x[0-9a-f]+$/i,Vr=/^0b[01]+$/i,qr=/^0o[0-7]+$/i,Kr=parseInt;function Jr(e){if("number"==typeof e)return e;if(Lr(e))return NaN;if(Ur(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Ur(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Fr(e);var n=Vr.test(e);return n||qr.test(e)?Kr(e.slice(2),n?2:8):Hr.test(e)?NaN:+e}var Yr=1/0;function Gr(e){return e?(e=Jr(e))===Yr||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function Qr(e){var t=Gr(e),n=t%1;return t==t?n?t-n:t:0}function Zr(e,t){if("function"!=typeof t)throw new TypeError("Expected a function");return e=Qr(e),function(){if(--e<1)return t.apply(this,arguments)}}function Xr(e){return e}function eo(e){if(!Ur(e))return!1;var t=Ar(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}var to,no=_r["__core-js_shared__"],ro=(to=/[^.]+$/.exec(no&&no.keys&&no.keys.IE_PROTO||""))?"Symbol(src)_1."+to:"";var oo=Function.prototype.toString;function io(e){if(null!=e){try{return oo.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var ao=/^\[object .+?Constructor\]$/,so=Function.prototype,lo=Object.prototype,uo=so.toString,co=lo.hasOwnProperty,po=RegExp("^"+uo.call(co).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function fo(e){return!(!Ur(e)||function(e){return!!ro&&ro in e}(e))&&(eo(e)?po:ao).test(io(e))}function ho(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return fo(n)?n:void 0}var go=ho(_r,"WeakMap"),vo=go&&new go,mo=vo?function(e,t){return vo.set(e,t),e}:Xr,yo=mo,bo=Object.create,_o=function(){function e(){}return function(t){if(!Ur(t))return{};if(bo)return bo(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}(),xo=_o;function wo(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=xo(e.prototype),r=e.apply(n,t);return Ur(r)?r:n}}function So(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var Eo=Math.max;function ko(e,t,n,r){for(var o=-1,i=e.length,a=n.length,s=-1,l=t.length,u=Eo(i-a,0),c=Array(l+u),d=!r;++s<l;)c[s]=t[s];for(;++o<a;)(d||o<i)&&(c[n[o]]=e[o]);for(;u--;)c[s++]=e[o++];return c}var Co=Math.max;function Oo(e,t,n,r){for(var o=-1,i=e.length,a=-1,s=n.length,l=-1,u=t.length,c=Co(i-s,0),d=Array(c+u),p=!r;++o<c;)d[o]=e[o];for(var f=o;++l<u;)d[f+l]=t[l];for(;++a<s;)(p||o<i)&&(d[f+n[a]]=e[o++]);return d}function Ao(){}function jo(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function Lo(){}jo.prototype=xo(Ao.prototype),jo.prototype.constructor=jo;var Ro=vo?function(e){return vo.get(e)}:Lo,Mo=Ro,Po={},No=Object.prototype.hasOwnProperty;function Io(e){for(var t=e.name+"",n=Po[t],r=No.call(Po,t)?n.length:0;r--;){var o=n[r],i=o.func;if(null==i||i==e)return o.name}return t}function To(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}function Bo(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}function $o(e){if(e instanceof jo)return e.clone();var t=new To(e.__wrapped__,e.__chain__);return t.__actions__=Bo(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}To.prototype=xo(Ao.prototype),To.prototype.constructor=To;var Wo=Object.prototype.hasOwnProperty;function Do(e){if(jr(e)&&!Pr(e)&&!(e instanceof jo)){if(e instanceof To)return e;if(Wo.call(e,"__wrapped__"))return $o(e)}return new To(e)}function zo(e){var t=Io(e),n=Do[t];if("function"!=typeof n||!(t in jo.prototype))return!1;if(e===n)return!0;var r=Mo(n);return!!r&&e===r[0]}Do.prototype=Ao.prototype,Do.prototype.constructor=Do;var Fo=Date.now;function Uo(e){var t=0,n=0;return function(){var r=Fo(),o=16-(r-n);if(n=r,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var Ho=Uo(yo),Vo=/\{\n\/\* \[wrapped with (.+)\] \*/,qo=/,? & /;var Ko=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;function Jo(e){return function(){return e}}var Yo=function(){try{var e=ho(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),Go=Yo,Qo=Go?function(e,t){return Go(e,"toString",{configurable:!0,enumerable:!1,value:Jo(t),writable:!0})}:Xr,Zo=Uo(Qo);function Xo(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function ei(e,t,n,r){for(var o=e.length,i=n+(r?1:-1);r?i--:++i<o;)if(t(e[i],i,e))return i;return-1}function ti(e){return e!=e}function ni(e,t,n){return t==t?function(e,t,n){for(var r=n-1,o=e.length;++r<o;)if(e[r]===t)return r;return-1}(e,t,n):ei(e,ti,n)}function ri(e,t){return!!(null==e?0:e.length)&&ni(e,t,0)>-1}var oi=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]];function ii(e,t,n){var r=t+"";return Zo(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(Ko,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return Xo(oi,function(n){var r="_."+n[0];t&n[1]&&!ri(e,r)&&e.push(r)}),e.sort()}(function(e){var t=e.match(Vo);return t?t[1].split(qo):[]}(r),n)))}function ai(e,t,n,r,o,i,a,s,l,u){var c=8&t;t|=c?32:64,4&(t&=~(c?64:32))||(t&=-4);var d=[e,t,o,c?i:void 0,c?a:void 0,c?void 0:i,c?void 0:a,s,l,u],p=n.apply(void 0,d);return zo(e)&&Ho(p,d),p.placeholder=r,ii(p,e,t)}function si(e){return e.placeholder}var li=/^(?:0|[1-9]\d*)$/;function ui(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&li.test(e))&&e>-1&&e%1==0&&e<t}var ci=Math.min;var di="__lodash_placeholder__";function pi(e,t){for(var n=-1,r=e.length,o=0,i=[];++n<r;){var a=e[n];a!==t&&a!==di||(e[n]=di,i[o++]=n)}return i}function fi(e,t,n,r,o,i,a,s,l,u){var c=128&t,d=1&t,p=2&t,f=24&t,h=512&t,g=p?void 0:wo(e);return function v(){for(var m=arguments.length,y=Array(m),b=m;b--;)y[b]=arguments[b];if(f)var _=si(v),x=function(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}(y,_);if(r&&(y=ko(y,r,o,f)),i&&(y=Oo(y,i,a,f)),m-=x,f&&m<u){var w=pi(y,_);return ai(e,t,fi,v.placeholder,n,y,w,s,l,u-m)}var S=d?n:this,E=p?S[e]:e;return m=y.length,s?y=function(e,t){for(var n=e.length,r=ci(t.length,n),o=Bo(e);r--;){var i=t[r];e[r]=ui(i,n)?o[i]:void 0}return e}(y,s):h&&m>1&&y.reverse(),c&&l<m&&(y.length=l),this&&this!==_r&&this instanceof v&&(E=g||wo(E)),E.apply(S,y)}}var hi="__lodash_placeholder__",gi=128,vi=Math.min;var mi=Math.max;function yi(e,t,n,r,o,i,a,s){var l=2&t;if(!l&&"function"!=typeof e)throw new TypeError("Expected a function");var u=r?r.length:0;if(u||(t&=-97,r=o=void 0),a=void 0===a?a:mi(Qr(a),0),s=void 0===s?s:Qr(s),u-=o?o.length:0,64&t){var c=r,d=o;r=o=void 0}var p=l?void 0:Mo(e),f=[e,t,n,r,o,c,d,i,a,s];if(p&&function(e,t){var n=e[1],r=t[1],o=n|r,i=o<131,a=r==gi&&8==n||r==gi&&256==n&&e[7].length<=t[8]||384==r&&t[7].length<=t[8]&&8==n;if(!i&&!a)return e;1&r&&(e[2]=t[2],o|=1&n?0:4);var s=t[3];if(s){var l=e[3];e[3]=l?ko(l,s,t[4]):s,e[4]=l?pi(e[3],hi):t[4]}(s=t[5])&&(l=e[5],e[5]=l?Oo(l,s,t[6]):s,e[6]=l?pi(e[5],hi):t[6]),(s=t[7])&&(e[7]=s),r&gi&&(e[8]=null==e[8]?t[8]:vi(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=o}(f,p),e=f[0],t=f[1],n=f[2],r=f[3],o=f[4],!(s=f[9]=void 0===f[9]?l?0:e.length:mi(f[9]-u,0))&&24&t&&(t&=-25),t&&1!=t)h=8==t||16==t?function(e,t,n){var r=wo(e);return function o(){for(var i=arguments.length,a=Array(i),s=i,l=si(o);s--;)a[s]=arguments[s];var u=i<3&&a[0]!==l&&a[i-1]!==l?[]:pi(a,l);return(i-=u.length)<n?ai(e,t,fi,o.placeholder,void 0,a,u,void 0,void 0,n-i):So(this&&this!==_r&&this instanceof o?r:e,this,a)}}(e,t,s):32!=t&&33!=t||o.length?fi.apply(void 0,f):function(e,t,n,r){var o=1&t,i=wo(e);return function t(){for(var a=-1,s=arguments.length,l=-1,u=r.length,c=Array(u+s),d=this&&this!==_r&&this instanceof t?i:e;++l<u;)c[l]=r[l];for(;s--;)c[l++]=arguments[++a];return So(d,o?n:this,c)}}(e,t,n,r);else var h=function(e,t,n){var r=1&t,o=wo(e);return function t(){return(this&&this!==_r&&this instanceof t?o:e).apply(r?n:this,arguments)}}(e,t,n);return ii((p?yo:Ho)(h,f),e,t)}function bi(e,t,n){return t=n?void 0:t,yi(e,128,void 0,void 0,void 0,void 0,t=e&&null==t?e.length:t)}function _i(e,t,n){"__proto__"==t&&Go?Go(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function xi(e,t){return e===t||e!=e&&t!=t}var wi=Object.prototype.hasOwnProperty;function Si(e,t,n){var r=e[t];wi.call(e,t)&&xi(r,n)&&(void 0!==n||t in e)||_i(e,t,n)}function Ei(e,t,n,r){var o=!n;n||(n={});for(var i=-1,a=t.length;++i<a;){var s=t[i],l=r?r(n[s],e[s],s,n,e):void 0;void 0===l&&(l=e[s]),o?_i(n,s,l):Si(n,s,l)}return n}var ki=Math.max;function Ci(e,t,n){return t=ki(void 0===t?e.length-1:t,0),function(){for(var r=arguments,o=-1,i=ki(r.length-t,0),a=Array(i);++o<i;)a[o]=r[t+o];o=-1;for(var s=Array(t+1);++o<t;)s[o]=r[o];return s[t]=n(a),So(e,this,s)}}function Oi(e,t){return Zo(Ci(e,t,Xr),e+"")}function Ai(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}function ji(e){return null!=e&&Ai(e.length)&&!eo(e)}function Li(e,t,n){if(!Ur(n))return!1;var r=typeof t;return!!("number"==r?ji(n)&&ui(t,n.length):"string"==r&&t in n)&&xi(n[t],e)}function Ri(e){return Oi(function(t,n){var r=-1,o=n.length,i=o>1?n[o-1]:void 0,a=o>2?n[2]:void 0;for(i=e.length>3&&"function"==typeof i?(o--,i):void 0,a&&Li(n[0],n[1],a)&&(i=o<3?void 0:i,o=1),t=Object(t);++r<o;){var s=n[r];s&&e(t,s,r,i)}return t})}var Mi=Object.prototype;function Pi(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Mi)}function Ni(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Ii(e){return jr(e)&&"[object Arguments]"==Ar(e)}var Ti=Object.prototype,Bi=Ti.hasOwnProperty,$i=Ti.propertyIsEnumerable,Wi=Ii(function(){return arguments}())?Ii:function(e){return jr(e)&&Bi.call(e,"callee")&&!$i.call(e,"callee")};function Di(){return!1}var zi="object"==typeof exports&&exports&&!exports.nodeType&&exports,Fi=zi&&"object"==typeof module&&module&&!module.nodeType&&module,Ui=Fi&&Fi.exports===zi?_r.Buffer:void 0,Hi=(Ui?Ui.isBuffer:void 0)||Di,Vi={};function qi(e){return function(t){return e(t)}}Vi["[object Float32Array]"]=Vi["[object Float64Array]"]=Vi["[object Int8Array]"]=Vi["[object Int16Array]"]=Vi["[object Int32Array]"]=Vi["[object Uint8Array]"]=Vi["[object Uint8ClampedArray]"]=Vi["[object Uint16Array]"]=Vi["[object Uint32Array]"]=!0,Vi["[object Arguments]"]=Vi["[object Array]"]=Vi["[object ArrayBuffer]"]=Vi["[object Boolean]"]=Vi["[object DataView]"]=Vi["[object Date]"]=Vi["[object Error]"]=Vi["[object Function]"]=Vi["[object Map]"]=Vi["[object Number]"]=Vi["[object Object]"]=Vi["[object RegExp]"]=Vi["[object Set]"]=Vi["[object String]"]=Vi["[object WeakMap]"]=!1;var Ki="object"==typeof exports&&exports&&!exports.nodeType&&exports,Ji=Ki&&"object"==typeof module&&module&&!module.nodeType&&module,Yi=Ji&&Ji.exports===Ki&&yr.process,Gi=function(){try{var e=Ji&&Ji.require&&Ji.require("util").types;return e||Yi&&Yi.binding&&Yi.binding("util")}catch(e){}}(),Qi=Gi&&Gi.isTypedArray,Zi=Qi?qi(Qi):function(e){return jr(e)&&Ai(e.length)&&!!Vi[Ar(e)]},Xi=Object.prototype.hasOwnProperty;function ea(e,t){var n=Pr(e),r=!n&&Wi(e),o=!n&&!r&&Hi(e),i=!n&&!r&&!o&&Zi(e),a=n||r||o||i,s=a?Ni(e.length,String):[],l=s.length;for(var u in e)!t&&!Xi.call(e,u)||a&&("length"==u||o&&("offset"==u||"parent"==u)||i&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||ui(u,l))||s.push(u);return s}function ta(e,t){return function(n){return e(t(n))}}var na=ta(Object.keys,Object),ra=Object.prototype.hasOwnProperty;function oa(e){if(!Pi(e))return na(e);var t=[];for(var n in Object(e))ra.call(e,n)&&"constructor"!=n&&t.push(n);return t}function ia(e){return ji(e)?ea(e):oa(e)}var aa=Object.prototype.hasOwnProperty,sa=Ri(function(e,t){if(Pi(t)||ji(t))Ei(t,ia(t),e);else for(var n in t)aa.call(t,n)&&Si(e,n,t[n])}),la=sa;var ua=Object.prototype.hasOwnProperty;function ca(e){if(!Ur(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=Pi(e),n=[];for(var r in e)("constructor"!=r||!t&&ua.call(e,r))&&n.push(r);return n}function da(e){return ji(e)?ea(e,!0):ca(e)}var pa=Ri(function(e,t){Ei(t,da(t),e)}),fa=pa,ha=Ri(function(e,t,n,r){Ei(t,da(t),e,r)}),ga=ha,va=Ri(function(e,t,n,r){Ei(t,ia(t),e,r)}),ma=va,ya=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ba=/^\w*$/;function _a(e,t){if(Pr(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!Lr(e))||(ba.test(e)||!ya.test(e)||null!=t&&e in Object(t))}var xa=ho(Object,"create");var wa=Object.prototype.hasOwnProperty;var Sa=Object.prototype.hasOwnProperty;function Ea(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function ka(e,t){for(var n=e.length;n--;)if(xi(e[n][0],t))return n;return-1}Ea.prototype.clear=function(){this.__data__=xa?xa(null):{},this.size=0},Ea.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Ea.prototype.get=function(e){var t=this.__data__;if(xa){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return wa.call(t,e)?t[e]:void 0},Ea.prototype.has=function(e){var t=this.__data__;return xa?void 0!==t[e]:Sa.call(t,e)},Ea.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=xa&&void 0===t?"__lodash_hash_undefined__":t,this};var Ca=Array.prototype.splice;function Oa(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Oa.prototype.clear=function(){this.__data__=[],this.size=0},Oa.prototype.delete=function(e){var t=this.__data__,n=ka(t,e);return!(n<0)&&(n==t.length-1?t.pop():Ca.call(t,n,1),--this.size,!0)},Oa.prototype.get=function(e){var t=this.__data__,n=ka(t,e);return n<0?void 0:t[n][1]},Oa.prototype.has=function(e){return ka(this.__data__,e)>-1},Oa.prototype.set=function(e,t){var n=this.__data__,r=ka(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};var Aa=ho(_r,"Map");function ja(e,t){var n,r,o=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map}function La(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}La.prototype.clear=function(){this.size=0,this.__data__={hash:new Ea,map:new(Aa||Oa),string:new Ea}},La.prototype.delete=function(e){var t=ja(this,e).delete(e);return this.size-=t?1:0,t},La.prototype.get=function(e){return ja(this,e).get(e)},La.prototype.has=function(e){return ja(this,e).has(e)},La.prototype.set=function(e,t){var n=ja(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};function Ra(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(Ra.Cache||La),n}Ra.Cache=La;var Ma=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Pa=/\\(\\)?/g,Na=function(e){var t=Ra(e,function(e){return 500===n.size&&n.clear(),e}),n=t.cache;return t}(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(Ma,function(e,n,r,o){t.push(r?o.replace(Pa,"$1"):n||e)}),t}),Ia=Na;function Ta(e){return null==e?"":Tr(e)}function Ba(e,t){return Pr(e)?e:_a(e,t)?[e]:Ia(Ta(e))}function $a(e){if("string"==typeof e||Lr(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Wa(e,t){for(var n=0,r=(t=Ba(t,e)).length;null!=e&&n<r;)e=e[$a(t[n++])];return n&&n==r?e:void 0}function Da(e,t,n){var r=null==e?void 0:Wa(e,t);return void 0===r?n:r}function za(e,t){for(var n=-1,r=t.length,o=Array(r),i=null==e;++n<r;)o[n]=i?void 0:Da(e,t[n]);return o}function Fa(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}var Ua=xr?xr.isConcatSpreadable:void 0;function Ha(e){return Pr(e)||Wi(e)||!!(Ua&&e&&e[Ua])}function Va(e,t,n,r,o){var i=-1,a=e.length;for(n||(n=Ha),o||(o=[]);++i<a;){var s=e[i];t>0&&n(s)?t>1?Va(s,t-1,n,r,o):Fa(o,s):r||(o[o.length]=s)}return o}function qa(e){return(null==e?0:e.length)?Va(e,1):[]}function Ka(e){return Zo(Ci(e,void 0,qa),e+"")}var Ja=Ka(za),Ya=ta(Object.getPrototypeOf,Object),Ga=Function.prototype,Qa=Object.prototype,Za=Ga.toString,Xa=Qa.hasOwnProperty,es=Za.call(Object);function ts(e){if(!jr(e)||"[object Object]"!=Ar(e))return!1;var t=Ya(e);if(null===t)return!0;var n=Xa.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Za.call(n)==es}function ns(e){if(!jr(e))return!1;var t=Ar(e);return"[object Error]"==t||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!ts(e)}var rs=Oi(function(e,t){try{return So(e,void 0,t)}catch(e){return ns(e)?e:new Error(e)}}),os=rs;function is(e,t){var n;if("function"!=typeof t)throw new TypeError("Expected a function");return e=Qr(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=void 0),n}}var as=Oi(function(e,t,n){var r=1;if(n.length){var o=pi(n,si(as));r|=32}return yi(e,r,t,n,o)});as.placeholder={};var ss=as,ls=Ka(function(e,t){return Xo(t,function(t){t=$a(t),_i(e,t,ss(e[t],e))}),e}),us=ls,cs=Oi(function(e,t,n){var r=3;if(n.length){var o=pi(n,si(cs));r|=32}return yi(t,r,e,n,o)});cs.placeholder={};var ds=cs;function ps(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(o);++r<o;)i[r]=e[r+t];return i}function fs(e,t,n){var r=e.length;return n=void 0===n?r:n,!t&&n>=r?e:ps(e,t,n)}var hs=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");function gs(e){return hs.test(e)}var vs="\\ud800-\\udfff",ms="["+vs+"]",ys="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",bs="\\ud83c[\\udffb-\\udfff]",_s="[^"+vs+"]",xs="(?:\\ud83c[\\udde6-\\uddff]){2}",ws="[\\ud800-\\udbff][\\udc00-\\udfff]",Ss="(?:"+ys+"|"+bs+")"+"?",Es="[\\ufe0e\\ufe0f]?",ks=Es+Ss+("(?:\\u200d(?:"+[_s,xs,ws].join("|")+")"+Es+Ss+")*"),Cs="(?:"+[_s+ys+"?",ys,xs,ws,ms].join("|")+")",Os=RegExp(bs+"(?="+bs+")|"+Cs+ks,"g");function As(e){return gs(e)?function(e){return e.match(Os)||[]}(e):function(e){return e.split("")}(e)}function js(e){return function(t){var n=gs(t=Ta(t))?As(t):void 0,r=n?n[0]:t.charAt(0),o=n?fs(n,1).join(""):t.slice(1);return r[e]()+o}}var Ls=js("toUpperCase");function Rs(e){return Ls(Ta(e).toLowerCase())}function Ms(e,t,n,r){var o=-1,i=null==e?0:e.length;for(r&&i&&(n=e[++o]);++o<i;)n=t(n,e[o],o,e);return n}function Ps(e){return function(t){return null==e?void 0:e[t]}}var Ns=Ps({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),Is=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ts=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");function Bs(e){return(e=Ta(e))&&e.replace(Is,Ns).replace(Ts,"")}var $s=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;var Ws=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;var Ds="\\ud800-\\udfff",zs="\\u2700-\\u27bf",Fs="a-z\\xdf-\\xf6\\xf8-\\xff",Us="A-Z\\xc0-\\xd6\\xd8-\\xde",Hs="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Vs="["+Hs+"]",qs="\\d+",Ks="["+zs+"]",Js="["+Fs+"]",Ys="[^"+Ds+Hs+qs+zs+Fs+Us+"]",Gs="(?:\\ud83c[\\udde6-\\uddff]){2}",Qs="[\\ud800-\\udbff][\\udc00-\\udfff]",Zs="["+Us+"]",Xs="(?:"+Js+"|"+Ys+")",el="(?:"+Zs+"|"+Ys+")",tl="(?:['’](?:d|ll|m|re|s|t|ve))?",nl="(?:['’](?:D|LL|M|RE|S|T|VE))?",rl="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",ol="[\\ufe0e\\ufe0f]?",il=ol+rl+("(?:\\u200d(?:"+["[^"+Ds+"]",Gs,Qs].join("|")+")"+ol+rl+")*"),al="(?:"+[Ks,Gs,Qs].join("|")+")"+il,sl=RegExp([Zs+"?"+Js+"+"+tl+"(?="+[Vs,Zs,"$"].join("|")+")",el+"+"+nl+"(?="+[Vs,Zs+Xs,"$"].join("|")+")",Zs+"?"+Xs+"+"+tl,Zs+"+"+nl,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",qs,al].join("|"),"g");function ll(e,t,n){return e=Ta(e),void 0===(t=n?void 0:t)?function(e){return Ws.test(e)}(e)?function(e){return e.match(sl)||[]}(e):function(e){return e.match($s)||[]}(e):e.match(t)||[]}var ul=RegExp("['’]","g");function cl(e){return function(t){return Ms(ll(Bs(t).replace(ul,"")),e,"")}}var dl=cl(function(e,t,n){return t=t.toLowerCase(),e+(n?Rs(t):t)}),pl=dl;function fl(){if(!arguments.length)return[];var e=arguments[0];return Pr(e)?e:[e]}var hl=_r.isFinite,gl=Math.min;function vl(e){var t=Math[e];return function(e,n){if(e=Jr(e),(n=null==n?0:gl(Qr(n),292))&&hl(e)){var r=(Ta(e)+"e").split("e");return+((r=(Ta(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var ml=vl("ceil");function yl(e){var t=Do(e);return t.__chain__=!0,t}var bl=Math.ceil,_l=Math.max;function xl(e,t,n){t=(n?Li(e,t,n):void 0===t)?1:_l(Qr(t),0);var r=null==e?0:e.length;if(!r||t<1)return[];for(var o=0,i=0,a=Array(bl(r/t));o<r;)a[i++]=ps(e,o,o+=t);return a}function wl(e,t,n){return e==e&&(void 0!==n&&(e=e<=n?e:n),void 0!==t&&(e=e>=t?e:t)),e}function Sl(e,t,n){return void 0===n&&(n=t,t=void 0),void 0!==n&&(n=(n=Jr(n))==n?n:0),void 0!==t&&(t=(t=Jr(t))==t?t:0),wl(Jr(e),t,n)}function El(e){var t=this.__data__=new Oa(e);this.size=t.size}function kl(e,t){return e&&Ei(t,ia(t),e)}El.prototype.clear=function(){this.__data__=new Oa,this.size=0},El.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},El.prototype.get=function(e){return this.__data__.get(e)},El.prototype.has=function(e){return this.__data__.has(e)},El.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Oa){var r=n.__data__;if(!Aa||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new La(r)}return n.set(e,t),this.size=n.size,this};var Cl="object"==typeof exports&&exports&&!exports.nodeType&&exports,Ol=Cl&&"object"==typeof module&&module&&!module.nodeType&&module,Al=Ol&&Ol.exports===Cl?_r.Buffer:void 0,jl=Al?Al.allocUnsafe:void 0;function Ll(e,t){if(t)return e.slice();var n=e.length,r=jl?jl(n):new e.constructor(n);return e.copy(r),r}function Rl(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i}function Ml(){return[]}var Pl=Object.prototype.propertyIsEnumerable,Nl=Object.getOwnPropertySymbols,Il=Nl?function(e){return null==e?[]:(e=Object(e),Rl(Nl(e),function(t){return Pl.call(e,t)}))}:Ml,Tl=Il;var Bl=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)Fa(t,Tl(e)),e=Ya(e);return t}:Ml,$l=Bl;function Wl(e,t,n){var r=t(e);return Pr(e)?r:Fa(r,n(e))}function Dl(e){return Wl(e,ia,Tl)}function zl(e){return Wl(e,da,$l)}var Fl=ho(_r,"DataView"),Ul=ho(_r,"Promise"),Hl=ho(_r,"Set"),Vl="[object Map]",ql="[object Promise]",Kl="[object Set]",Jl="[object WeakMap]",Yl="[object DataView]",Gl=io(Fl),Ql=io(Aa),Zl=io(Ul),Xl=io(Hl),eu=io(go),tu=Ar;(Fl&&tu(new Fl(new ArrayBuffer(1)))!=Yl||Aa&&tu(new Aa)!=Vl||Ul&&tu(Ul.resolve())!=ql||Hl&&tu(new Hl)!=Kl||go&&tu(new go)!=Jl)&&(tu=function(e){var t=Ar(e),n="[object Object]"==t?e.constructor:void 0,r=n?io(n):"";if(r)switch(r){case Gl:return Yl;case Ql:return Vl;case Zl:return ql;case Xl:return Kl;case eu:return Jl}return t});var nu=tu,ru=Object.prototype.hasOwnProperty;var ou=_r.Uint8Array;function iu(e){var t=new e.constructor(e.byteLength);return new ou(t).set(new ou(e)),t}var au=/\w*$/;var su=xr?xr.prototype:void 0,lu=su?su.valueOf:void 0;function uu(e,t){var n=t?iu(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function cu(e,t,n){var r,o=e.constructor;switch(t){case"[object ArrayBuffer]":return iu(e);case"[object Boolean]":case"[object Date]":return new o(+e);case"[object DataView]":return function(e,t){var n=t?iu(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return uu(e,n);case"[object Map]":case"[object Set]":return new o;case"[object Number]":case"[object String]":return new o(e);case"[object RegExp]":return function(e){var t=new e.constructor(e.source,au.exec(e));return t.lastIndex=e.lastIndex,t}(e);case"[object Symbol]":return r=e,lu?Object(lu.call(r)):{}}}function du(e){return"function"!=typeof e.constructor||Pi(e)?{}:xo(Ya(e))}var pu=Gi&&Gi.isMap,fu=pu?qi(pu):function(e){return jr(e)&&"[object Map]"==nu(e)};var hu=Gi&&Gi.isSet,gu=hu?qi(hu):function(e){return jr(e)&&"[object Set]"==nu(e)},vu="[object Arguments]",mu="[object Function]",yu="[object Object]",bu={};function _u(e,t,n,r,o,i){var a,s=1&t,l=2&t,u=4&t;if(n&&(a=o?n(e,r,o,i):n(e)),void 0!==a)return a;if(!Ur(e))return e;var c=Pr(e);if(c){if(a=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&ru.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!s)return Bo(e,a)}else{var d=nu(e),p=d==mu||"[object GeneratorFunction]"==d;if(Hi(e))return Ll(e,s);if(d==yu||d==vu||p&&!o){if(a=l||p?{}:du(e),!s)return l?function(e,t){return Ei(e,$l(e),t)}(e,function(e,t){return e&&Ei(t,da(t),e)}(a,e)):function(e,t){return Ei(e,Tl(e),t)}(e,kl(a,e))}else{if(!bu[d])return o?e:{};a=cu(e,d,s)}}i||(i=new El);var f=i.get(e);if(f)return f;i.set(e,a),gu(e)?e.forEach(function(r){a.add(_u(r,t,n,r,e,i))}):fu(e)&&e.forEach(function(r,o){a.set(o,_u(r,t,n,o,e,i))});var h=c?void 0:(u?l?zl:Dl:l?da:ia)(e);return Xo(h||e,function(r,o){h&&(r=e[o=r]),Si(a,o,_u(r,t,n,o,e,i))}),a}bu[vu]=bu["[object Array]"]=bu["[object ArrayBuffer]"]=bu["[object DataView]"]=bu["[object Boolean]"]=bu["[object Date]"]=bu["[object Float32Array]"]=bu["[object Float64Array]"]=bu["[object Int8Array]"]=bu["[object Int16Array]"]=bu["[object Int32Array]"]=bu["[object Map]"]=bu["[object Number]"]=bu[yu]=bu["[object RegExp]"]=bu["[object Set]"]=bu["[object String]"]=bu["[object Symbol]"]=bu["[object Uint8Array]"]=bu["[object Uint8ClampedArray]"]=bu["[object Uint16Array]"]=bu["[object Uint32Array]"]=!0,bu["[object Error]"]=bu[mu]=bu["[object WeakMap]"]=!1;function xu(e){return _u(e,4)}function wu(e){return _u(e,5)}function Su(e,t){return _u(e,5,t="function"==typeof t?t:void 0)}function Eu(e,t){return _u(e,4,t="function"==typeof t?t:void 0)}function ku(){return new To(this.value(),this.__chain__)}function Cu(e){for(var t=-1,n=null==e?0:e.length,r=0,o=[];++t<n;){var i=e[t];i&&(o[r++]=i)}return o}function Ou(){var e=arguments.length;if(!e)return[];for(var t=Array(e-1),n=arguments[0],r=e;r--;)t[r-1]=arguments[r];return Fa(Pr(n)?Bo(n):[n],Va(t,1))}function Au(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new La;++t<n;)this.add(e[t])}function ju(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function Lu(e,t){return e.has(t)}Au.prototype.add=Au.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},Au.prototype.has=function(e){return this.__data__.has(e)};function Ru(e,t,n,r,o,i){var a=1&n,s=e.length,l=t.length;if(s!=l&&!(a&&l>s))return!1;var u=i.get(e),c=i.get(t);if(u&&c)return u==t&&c==e;var d=-1,p=!0,f=2&n?new Au:void 0;for(i.set(e,t),i.set(t,e);++d<s;){var h=e[d],g=t[d];if(r)var v=a?r(g,h,d,t,e,i):r(h,g,d,e,t,i);if(void 0!==v){if(v)continue;p=!1;break}if(f){if(!ju(t,function(e,t){if(!Lu(f,t)&&(h===e||o(h,e,n,r,i)))return f.push(t)})){p=!1;break}}else if(h!==g&&!o(h,g,n,r,i)){p=!1;break}}return i.delete(e),i.delete(t),p}function Mu(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function Pu(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}var Nu=xr?xr.prototype:void 0,Iu=Nu?Nu.valueOf:void 0;var Tu=Object.prototype.hasOwnProperty;var Bu="[object Arguments]",$u="[object Array]",Wu="[object Object]",Du=Object.prototype.hasOwnProperty;function zu(e,t,n,r,o,i){var a=Pr(e),s=Pr(t),l=a?$u:nu(e),u=s?$u:nu(t),c=(l=l==Bu?Wu:l)==Wu,d=(u=u==Bu?Wu:u)==Wu,p=l==u;if(p&&Hi(e)){if(!Hi(t))return!1;a=!0,c=!1}if(p&&!c)return i||(i=new El),a||Zi(e)?Ru(e,t,n,r,o,i):function(e,t,n,r,o,i,a){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!i(new ou(e),new ou(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return xi(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var s=Mu;case"[object Set]":var l=1&r;if(s||(s=Pu),e.size!=t.size&&!l)return!1;var u=a.get(e);if(u)return u==t;r|=2,a.set(e,t);var c=Ru(s(e),s(t),r,o,i,a);return a.delete(e),c;case"[object Symbol]":if(Iu)return Iu.call(e)==Iu.call(t)}return!1}(e,t,l,n,r,o,i);if(!(1&n)){var f=c&&Du.call(e,"__wrapped__"),h=d&&Du.call(t,"__wrapped__");if(f||h){var g=f?e.value():e,v=h?t.value():t;return i||(i=new El),o(g,v,n,r,i)}}return!!p&&(i||(i=new El),function(e,t,n,r,o,i){var a=1&n,s=Dl(e),l=s.length;if(l!=Dl(t).length&&!a)return!1;for(var u=l;u--;){var c=s[u];if(!(a?c in t:Tu.call(t,c)))return!1}var d=i.get(e),p=i.get(t);if(d&&p)return d==t&&p==e;var f=!0;i.set(e,t),i.set(t,e);for(var h=a;++u<l;){var g=e[c=s[u]],v=t[c];if(r)var m=a?r(v,g,c,t,e,i):r(g,v,c,e,t,i);if(!(void 0===m?g===v||o(g,v,n,r,i):m)){f=!1;break}h||(h="constructor"==c)}if(f&&!h){var y=e.constructor,b=t.constructor;y==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof y&&y instanceof y&&"function"==typeof b&&b instanceof b||(f=!1)}return i.delete(e),i.delete(t),f}(e,t,n,r,o,i))}function Fu(e,t,n,r,o){return e===t||(null==e||null==t||!jr(e)&&!jr(t)?e!=e&&t!=t:zu(e,t,n,r,Fu,o))}function Uu(e,t,n,r){var o=n.length,i=o,a=!r;if(null==e)return!i;for(e=Object(e);o--;){var s=n[o];if(a&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++o<i;){var l=(s=n[o])[0],u=e[l],c=s[1];if(a&&s[2]){if(void 0===u&&!(l in e))return!1}else{var d=new El;if(r)var p=r(u,c,l,e,t,d);if(!(void 0===p?Fu(c,u,3,r,d):p))return!1}}return!0}function Hu(e){return e==e&&!Ur(e)}function Vu(e){for(var t=ia(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,Hu(o)]}return t}function qu(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}function Ku(e){var t=Vu(e);return 1==t.length&&t[0][2]?qu(t[0][0],t[0][1]):function(n){return n===e||Uu(n,e,t)}}function Ju(e,t){return null!=e&&t in Object(e)}function Yu(e,t,n){for(var r=-1,o=(t=Ba(t,e)).length,i=!1;++r<o;){var a=$a(t[r]);if(!(i=null!=e&&n(e,a)))break;e=e[a]}return i||++r!=o?i:!!(o=null==e?0:e.length)&&Ai(o)&&ui(a,o)&&(Pr(e)||Wi(e))}function Gu(e,t){return null!=e&&Yu(e,t,Ju)}function Qu(e,t){return _a(e)&&Hu(t)?qu($a(e),t):function(n){var r=Da(n,e);return void 0===r&&r===t?Gu(n,e):Fu(t,r,3)}}function Zu(e){return function(t){return null==t?void 0:t[e]}}function Xu(e){return _a(e)?Zu($a(e)):function(e){return function(t){return Wa(t,e)}}(e)}function ec(e){return"function"==typeof e?e:null==e?Xr:"object"==typeof e?Pr(e)?Qu(e[0],e[1]):Ku(e):Xu(e)}function tc(e){var t=null==e?0:e.length,n=ec;return e=t?Mr(e,function(e){if("function"!=typeof e[1])throw new TypeError("Expected a function");return[n(e[0]),e[1]]}):[],Oi(function(n){for(var r=-1;++r<t;){var o=e[r];if(So(o[0],this,n))return So(o[1],this,n)}})}function nc(e,t,n){var r=n.length;if(null==e)return!r;for(e=Object(e);r--;){var o=n[r],i=t[o],a=e[o];if(void 0===a&&!(o in e)||!i(a))return!1}return!0}function rc(e){return function(e){var t=ia(e);return function(n){return nc(n,e,t)}}(_u(e,1))}function oc(e,t){return null==t||nc(e,t,ia(t))}function ic(e,t,n,r){for(var o=-1,i=null==e?0:e.length;++o<i;){var a=e[o];t(r,a,n(a),e)}return r}function ac(e){return function(t,n,r){for(var o=-1,i=Object(t),a=r(t),s=a.length;s--;){var l=a[e?s:++o];if(!1===n(i[l],l,i))break}return t}}var sc=ac();function lc(e,t){return e&&sc(e,t,ia)}function uc(e,t){return function(n,r){if(null==n)return n;if(!ji(n))return e(n,r);for(var o=n.length,i=t?o:-1,a=Object(n);(t?i--:++i<o)&&!1!==r(a[i],i,a););return n}}var cc=uc(lc);function dc(e,t,n,r){return cc(e,function(e,o,i){t(r,e,n(e),i)}),r}function pc(e,t){return function(n,r){var o=Pr(n)?ic:dc,i=t?t():{};return o(n,e,ec(r),i)}}var fc=Object.prototype.hasOwnProperty,hc=pc(function(e,t,n){fc.call(e,n)?++e[n]:_i(e,n,1)}),gc=hc;function vc(e,t){var n=xo(e);return null==t?n:kl(n,t)}function mc(e,t,n){var r=yi(e,8,void 0,void 0,void 0,void 0,void 0,t=n?void 0:t);return r.placeholder=mc.placeholder,r}mc.placeholder={};function yc(e,t,n){var r=yi(e,16,void 0,void 0,void 0,void 0,void 0,t=n?void 0:t);return r.placeholder=yc.placeholder,r}yc.placeholder={};var bc=function(){return _r.Date.now()},_c=Math.max,xc=Math.min;function wc(e,t,n){var r,o,i,a,s,l,u=0,c=!1,d=!1,p=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function f(t){var n=r,i=o;return r=o=void 0,u=t,a=e.apply(i,n)}function h(e){var n=e-l;return void 0===l||n>=t||n<0||d&&e-u>=i}function g(){var e=bc();if(h(e))return v(e);s=setTimeout(g,function(e){var n=t-(e-l);return d?xc(n,i-(e-u)):n}(e))}function v(e){return s=void 0,p&&r?f(e):(r=o=void 0,a)}function m(){var e=bc(),n=h(e);if(r=arguments,o=this,l=e,n){if(void 0===s)return function(e){return u=e,s=setTimeout(g,t),c?f(e):a}(l);if(d)return clearTimeout(s),s=setTimeout(g,t),f(l)}return void 0===s&&(s=setTimeout(g,t)),a}return t=Jr(t)||0,Ur(n)&&(c=!!n.leading,i=(d="maxWait"in n)?_c(Jr(n.maxWait)||0,t):i,p="trailing"in n?!!n.trailing:p),m.cancel=function(){void 0!==s&&clearTimeout(s),u=0,r=l=o=s=void 0},m.flush=function(){return void 0===s?a:v(bc())},m}function Sc(e,t){return null==e||e!=e?t:e}var Ec=Object.prototype,kc=Ec.hasOwnProperty,Cc=Oi(function(e,t){e=Object(e);var n=-1,r=t.length,o=r>2?t[2]:void 0;for(o&&Li(t[0],t[1],o)&&(r=1);++n<r;)for(var i=t[n],a=da(i),s=-1,l=a.length;++s<l;){var u=a[s],c=e[u];(void 0===c||xi(c,Ec[u])&&!kc.call(e,u))&&(e[u]=i[u])}return e}),Oc=Cc;function Ac(e,t,n){(void 0!==n&&!xi(e[t],n)||void 0===n&&!(t in e))&&_i(e,t,n)}function jc(e){return jr(e)&&ji(e)}function Lc(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}function Rc(e){return Ei(e,da(e))}function Mc(e,t,n,r,o){e!==t&&sc(t,function(i,a){if(o||(o=new El),Ur(i))!function(e,t,n,r,o,i,a){var s=Lc(e,n),l=Lc(t,n),u=a.get(l);if(u)Ac(e,n,u);else{var c=i?i(s,l,n+"",e,t,a):void 0,d=void 0===c;if(d){var p=Pr(l),f=!p&&Hi(l),h=!p&&!f&&Zi(l);c=l,p||f||h?Pr(s)?c=s:jc(s)?c=Bo(s):f?(d=!1,c=Ll(l,!0)):h?(d=!1,c=uu(l,!0)):c=[]:ts(l)||Wi(l)?(c=s,Wi(s)?c=Rc(s):Ur(s)&&!eo(s)||(c=du(l))):d=!1}d&&(a.set(l,c),o(c,l,r,i,a),a.delete(l)),Ac(e,n,c)}}(e,t,a,n,Mc,r,o);else{var s=r?r(Lc(e,a),i,a+"",e,t,o):void 0;void 0===s&&(s=i),Ac(e,a,s)}},da)}function Pc(e,t,n,r,o,i){return Ur(e)&&Ur(t)&&(i.set(t,e),Mc(e,t,void 0,Pc,i),i.delete(t)),e}var Nc=Ri(function(e,t,n,r){Mc(e,t,n,r)}),Ic=Nc,Tc=Oi(function(e){return e.push(void 0,Pc),So(Ic,void 0,e)});function Bc(e,t,n){if("function"!=typeof e)throw new TypeError("Expected a function");return setTimeout(function(){e.apply(void 0,n)},t)}var $c=Oi(function(e,t){return Bc(e,1,t)}),Wc=$c,Dc=Oi(function(e,t,n){return Bc(e,Jr(t)||0,n)}),zc=Dc;function Fc(e,t,n){for(var r=-1,o=null==e?0:e.length;++r<o;)if(n(t,e[r]))return!0;return!1}function Uc(e,t,n,r){var o=-1,i=ri,a=!0,s=e.length,l=[],u=t.length;if(!s)return l;n&&(t=Mr(t,qi(n))),r?(i=Fc,a=!1):t.length>=200&&(i=Lu,a=!1,t=new Au(t));e:for(;++o<s;){var c=e[o],d=null==n?c:n(c);if(c=r||0!==c?c:0,a&&d==d){for(var p=u;p--;)if(t[p]===d)continue e;l.push(c)}else i(t,d,r)||l.push(c)}return l}var Hc=Oi(function(e,t){return jc(e)?Uc(e,Va(t,1,jc,!0)):[]}),Vc=Hc;function qc(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}var Kc=Oi(function(e,t){var n=qc(t);return jc(n)&&(n=void 0),jc(e)?Uc(e,Va(t,1,jc,!0),ec(n)):[]}),Jc=Kc,Yc=Oi(function(e,t){var n=qc(t);return jc(n)&&(n=void 0),jc(e)?Uc(e,Va(t,1,jc,!0),void 0,n):[]}),Gc=Yc,Qc=Br(function(e,t){return e/t},1);function Zc(e,t,n){var r=null==e?0:e.length;return r?ps(e,(t=n||void 0===t?1:Qr(t))<0?0:t,r):[]}function Xc(e,t,n){var r=null==e?0:e.length;return r?ps(e,0,(t=r-(t=n||void 0===t?1:Qr(t)))<0?0:t):[]}function ed(e,t,n,r){for(var o=e.length,i=r?o:-1;(r?i--:++i<o)&&t(e[i],i,e););return n?ps(e,r?0:i,r?i+1:o):ps(e,r?i+1:0,r?o:i)}function td(e,t){return e&&e.length?ed(e,ec(t),!0,!0):[]}function nd(e,t){return e&&e.length?ed(e,ec(t),!0):[]}function rd(e){return"function"==typeof e?e:Xr}function od(e,t){return(Pr(e)?Xo:cc)(e,rd(t))}function id(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}var ad=ac(!0);function sd(e,t){return e&&ad(e,t,ia)}var ld=uc(sd,!0);function ud(e,t){return(Pr(e)?id:ld)(e,rd(t))}function cd(e,t,n){e=Ta(e),t=Tr(t);var r=e.length,o=n=void 0===n?r:wl(Qr(n),0,r);return(n-=t.length)>=0&&e.slice(n,o)==t}function dd(e){return function(t){var n=nu(t);return"[object Map]"==n?Mu(t):"[object Set]"==n?function(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=[e,e]}),n}(t):function(e,t){return Mr(t,function(t){return[t,e[t]]})}(t,e(t))}}var pd=dd(ia),fd=dd(da),hd=Ps({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"}),gd=/[&<>"']/g,vd=RegExp(gd.source);function md(e){return(e=Ta(e))&&vd.test(e)?e.replace(gd,hd):e}var yd=/[\\^$.*+?()[\]{}|]/g,bd=RegExp(yd.source);function _d(e){return(e=Ta(e))&&bd.test(e)?e.replace(yd,"\\$&"):e}function xd(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function wd(e,t){var n=!0;return cc(e,function(e,r,o){return n=!!t(e,r,o)}),n}function Sd(e,t,n){var r=Pr(e)?xd:wd;return n&&Li(e,t,n)&&(t=void 0),r(e,ec(t))}function Ed(e){return e?wl(Qr(e),0,4294967295):0}function kd(e,t,n,r){var o=null==e?0:e.length;return o?(n&&"number"!=typeof n&&Li(e,t,n)&&(n=0,r=o),function(e,t,n,r){var o=e.length;for((n=Qr(n))<0&&(n=-n>o?0:o+n),(r=void 0===r||r>o?o:Qr(r))<0&&(r+=o),r=n>r?0:Ed(r);n<r;)e[n++]=t;return e}(e,t,n,r)):[]}function Cd(e,t){var n=[];return cc(e,function(e,r,o){t(e,r,o)&&n.push(e)}),n}function Od(e,t){return(Pr(e)?Rl:Cd)(e,ec(t))}function Ad(e){return function(t,n,r){var o=Object(t);if(!ji(t)){var i=ec(n);t=ia(t),n=function(e){return i(o[e],e,o)}}var a=e(t,n,r);return a>-1?o[i?t[a]:a]:void 0}}var jd=Math.max;function Ld(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:Qr(n);return o<0&&(o=jd(r+o,0)),ei(e,ec(t),o)}var Rd=Ad(Ld);function Md(e,t,n){var r;return n(e,function(e,n,o){if(t(e,n,o))return r=n,!1}),r}function Pd(e,t){return Md(e,ec(t),lc)}var Nd=Math.max,Id=Math.min;function Td(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=r-1;return void 0!==n&&(o=Qr(n),o=n<0?Nd(r+o,0):Id(o,r-1)),ei(e,ec(t),o,!0)}var Bd=Ad(Td);function $d(e,t){return Md(e,ec(t),sd)}function Wd(e){return e&&e.length?e[0]:void 0}function Dd(e,t){var n=-1,r=ji(e)?Array(e.length):[];return cc(e,function(e,o,i){r[++n]=t(e,o,i)}),r}function zd(e,t){return(Pr(e)?Mr:Dd)(e,ec(t))}function Fd(e,t){return Va(zd(e,t),1)}var Ud=1/0;function Hd(e,t){return Va(zd(e,t),Ud)}function Vd(e,t,n){return n=void 0===n?1:Qr(n),Va(zd(e,t),n)}var qd=1/0;function Kd(e){return(null==e?0:e.length)?Va(e,qd):[]}function Jd(e,t){return(null==e?0:e.length)?Va(e,t=void 0===t?1:Qr(t)):[]}function Yd(e){return yi(e,512)}var Gd=vl("floor");function Qd(e){return Ka(function(t){var n=t.length,r=n,o=To.prototype.thru;for(e&&t.reverse();r--;){var i=t[r];if("function"!=typeof i)throw new TypeError("Expected a function");if(o&&!a&&"wrapper"==Io(i))var a=new To([],!0)}for(r=a?r:n;++r<n;){var s=Io(i=t[r]),l="wrapper"==s?Mo(i):void 0;a=l&&zo(l[0])&&424==l[1]&&!l[4].length&&1==l[9]?a[Io(l[0])].apply(a,l[3]):1==i.length&&zo(i)?a[s]():a.thru(i)}return function(){var e=arguments,r=e[0];if(a&&1==e.length&&Pr(r))return a.plant(r).value();for(var o=0,i=n?t[o].apply(this,e):r;++o<n;)i=t[o].call(this,i);return i}})}var Zd=Qd(),Xd=Qd(!0);function ep(e,t){return null==e?e:sc(e,rd(t),da)}function tp(e,t){return null==e?e:ad(e,rd(t),da)}function np(e,t){return e&&lc(e,rd(t))}function rp(e,t){return e&&sd(e,rd(t))}function op(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var o=e[t];r[o[0]]=o[1]}return r}function ip(e,t){return Rl(t,function(t){return eo(e[t])})}function ap(e){return null==e?[]:ip(e,ia(e))}function sp(e){return null==e?[]:ip(e,da(e))}var lp=Object.prototype.hasOwnProperty,up=pc(function(e,t,n){lp.call(e,n)?e[n].push(t):_i(e,n,[t])}),cp=up;function dp(e,t){return e>t}function pp(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=Jr(t),n=Jr(n)),e(t,n)}}var fp=pp(dp),hp=pp(function(e,t){return e>=t}),gp=Object.prototype.hasOwnProperty;function vp(e,t){return null!=e&&gp.call(e,t)}function mp(e,t){return null!=e&&Yu(e,t,vp)}var yp=Math.max,bp=Math.min;function _p(e,t,n){return t=Gr(t),void 0===n?(n=t,t=0):n=Gr(n),function(e,t,n){return e>=bp(t,n)&&e<yp(t,n)}(e=Jr(e),t,n)}function xp(e){return"string"==typeof e||!Pr(e)&&jr(e)&&"[object String]"==Ar(e)}function wp(e,t){return Mr(t,function(t){return e[t]})}function Sp(e){return null==e?[]:wp(e,ia(e))}var Ep=Math.max;function kp(e,t,n,r){e=ji(e)?e:Sp(e),n=n&&!r?Qr(n):0;var o=e.length;return n<0&&(n=Ep(o+n,0)),xp(e)?n<=o&&e.indexOf(t,n)>-1:!!o&&ni(e,t,n)>-1}var Cp=Math.max;function Op(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:Qr(n);return o<0&&(o=Cp(r+o,0)),ni(e,t,o)}function Ap(e){return(null==e?0:e.length)?ps(e,0,-1):[]}var jp=Math.min;function Lp(e,t,n){for(var r=n?Fc:ri,o=e[0].length,i=e.length,a=i,s=Array(i),l=1/0,u=[];a--;){var c=e[a];a&&t&&(c=Mr(c,qi(t))),l=jp(c.length,l),s[a]=!n&&(t||o>=120&&c.length>=120)?new Au(a&&c):void 0}c=e[0];var d=-1,p=s[0];e:for(;++d<o&&u.length<l;){var f=c[d],h=t?t(f):f;if(f=n||0!==f?f:0,!(p?Lu(p,h):r(u,h,n))){for(a=i;--a;){var g=s[a];if(!(g?Lu(g,h):r(e[a],h,n)))continue e}p&&p.push(h),u.push(f)}}return u}function Rp(e){return jc(e)?e:[]}var Mp=Oi(function(e){var t=Mr(e,Rp);return t.length&&t[0]===e[0]?Lp(t):[]}),Pp=Oi(function(e){var t=qc(e),n=Mr(e,Rp);return t===qc(n)?t=void 0:n.pop(),n.length&&n[0]===e[0]?Lp(n,ec(t)):[]}),Np=Pp,Ip=Oi(function(e){var t=qc(e),n=Mr(e,Rp);return(t="function"==typeof t?t:void 0)&&n.pop(),n.length&&n[0]===e[0]?Lp(n,void 0,t):[]});function Tp(e,t){return function(n,r){return function(e,t,n,r){return lc(e,function(e,o,i){t(r,n(e),o,i)}),r}(n,e,t(r),{})}}var Bp=Object.prototype.toString,$p=Tp(function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Bp.call(t)),e[t]=n},Jo(Xr)),Wp=$p,Dp=Object.prototype,zp=Dp.hasOwnProperty,Fp=Dp.toString,Up=Tp(function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Fp.call(t)),zp.call(e,t)?e[t].push(n):e[t]=[n]},ec),Hp=Up;function Vp(e,t){return t.length<2?e:Wa(e,ps(t,0,-1))}function qp(e,t,n){var r=null==(e=Vp(e,t=Ba(t,e)))?e:e[$a(qc(t))];return null==r?void 0:So(r,e,n)}var Kp=Oi(qp),Jp=Oi(function(e,t,n){var r=-1,o="function"==typeof t,i=ji(e)?Array(e.length):[];return cc(e,function(e){i[++r]=o?So(t,e,n):qp(e,t,n)}),i}),Yp=Jp;var Gp=Gi&&Gi.isArrayBuffer,Qp=Gp?qi(Gp):function(e){return jr(e)&&"[object ArrayBuffer]"==Ar(e)};function Zp(e){return!0===e||!1===e||jr(e)&&"[object Boolean]"==Ar(e)}var Xp=Gi&&Gi.isDate,ef=Xp?qi(Xp):function(e){return jr(e)&&"[object Date]"==Ar(e)};function tf(e){return jr(e)&&1===e.nodeType&&!ts(e)}var nf=Object.prototype.hasOwnProperty;function rf(e){if(null==e)return!0;if(ji(e)&&(Pr(e)||"string"==typeof e||"function"==typeof e.splice||Hi(e)||Zi(e)||Wi(e)))return!e.length;var t=nu(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(Pi(e))return!oa(e).length;for(var n in e)if(nf.call(e,n))return!1;return!0}function of(e,t){return Fu(e,t)}function af(e,t,n){var r=(n="function"==typeof n?n:void 0)?n(e,t):void 0;return void 0===r?Fu(e,t,void 0,n):!!r}var sf=_r.isFinite;function lf(e){return"number"==typeof e&&sf(e)}function uf(e){return"number"==typeof e&&e==Qr(e)}function cf(e,t){return e===t||Uu(e,t,Vu(t))}function df(e,t,n){return n="function"==typeof n?n:void 0,Uu(e,t,Vu(t),n)}function pf(e){return"number"==typeof e||jr(e)&&"[object Number]"==Ar(e)}function ff(e){return pf(e)&&e!=+e}var hf=no?eo:Di;function gf(e){if(hf(e))throw new Error("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return fo(e)}function vf(e){return null==e}function mf(e){return null===e}var yf=Gi&&Gi.isRegExp,bf=yf?qi(yf):function(e){return jr(e)&&"[object RegExp]"==Ar(e)},_f=9007199254740991;function xf(e){return uf(e)&&e>=-9007199254740991&&e<=_f}function wf(e){return void 0===e}function Sf(e){return jr(e)&&"[object WeakMap]"==nu(e)}function Ef(e){return jr(e)&&"[object WeakSet]"==Ar(e)}function kf(e){return ec("function"==typeof e?e:_u(e,1))}var Cf=Array.prototype.join;function Of(e,t){return null==e?"":Cf.call(e,t)}var Af=cl(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()}),jf=Af,Lf=pc(function(e,t,n){_i(e,n,t)}),Rf=Lf;var Mf=Math.max,Pf=Math.min;function Nf(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=r;return void 0!==n&&(o=(o=Qr(n))<0?Mf(r+o,0):Pf(o,r-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,o):ei(e,ti,o,!0)}var If=cl(function(e,t,n){return e+(n?" ":"")+t.toLowerCase()}),Tf=If,Bf=js("toLowerCase");function $f(e,t){return e<t}var Wf=pp($f),Df=pp(function(e,t){return e<=t});function zf(e,t){var n={};return t=ec(t),lc(e,function(e,r,o){_i(n,t(e,r,o),e)}),n}function Ff(e,t){var n={};return t=ec(t),lc(e,function(e,r,o){_i(n,r,t(e,r,o))}),n}function Uf(e){return Ku(_u(e,1))}function Hf(e,t){return Qu(e,_u(t,1))}function Vf(e,t,n){for(var r=-1,o=e.length;++r<o;){var i=e[r],a=t(i);if(null!=a&&(void 0===s?a==a&&!Lr(a):n(a,s)))var s=a,l=i}return l}function qf(e){return e&&e.length?Vf(e,Xr,dp):void 0}function Kf(e,t){return e&&e.length?Vf(e,ec(t),dp):void 0}function Jf(e,t){for(var n,r=-1,o=e.length;++r<o;){var i=t(e[r]);void 0!==i&&(n=void 0===n?i:n+i)}return n}function Yf(e,t){var n=null==e?0:e.length;return n?Jf(e,t)/n:NaN}function Gf(e){return Yf(e,Xr)}function Qf(e,t){return Yf(e,ec(t))}var Zf=Ri(function(e,t,n){Mc(e,t,n)}),Xf=Zf,eh=Oi(function(e,t){return function(n){return qp(n,e,t)}}),th=eh,nh=Oi(function(e,t){return function(n){return qp(e,n,t)}}),rh=nh;function oh(e){return e&&e.length?Vf(e,Xr,$f):void 0}function ih(e,t){return e&&e.length?Vf(e,ec(t),$f):void 0}function ah(e,t,n){var r=ia(t),o=ip(t,r),i=!(Ur(n)&&"chain"in n&&!n.chain),a=eo(e);return Xo(o,function(n){var r=t[n];e[n]=r,a&&(e.prototype[n]=function(){var t=this.__chain__;if(i||t){var n=e(this.__wrapped__);return(n.__actions__=Bo(this.__actions__)).push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,Fa([this.value()],arguments))})}),e}var sh=Br(function(e,t){return e*t},1);function lh(e){if("function"!=typeof e)throw new TypeError("Expected a function");return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}var uh=xr?xr.iterator:void 0;function ch(e){if(!e)return[];if(ji(e))return xp(e)?As(e):Bo(e);if(uh&&e[uh])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[uh]());var t=nu(e);return("[object Map]"==t?Mu:"[object Set]"==t?Pu:Sp)(e)}function dh(){void 0===this.__values__&&(this.__values__=ch(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?void 0:this.__values__[this.__index__++]}}function ph(e,t){var n=e.length;if(n)return ui(t+=t<0?n:0,n)?e[t]:void 0}function fh(e,t){return e&&e.length?ph(e,Qr(t)):void 0}function hh(e){return e=Qr(e),Oi(function(t){return ph(t,e)})}var gh=Object.prototype.hasOwnProperty;function vh(e,t){var n=-1,r=(t=Ba(t,e)).length;if(!r)return!0;for(var o=null==e||"object"!=typeof e&&"function"!=typeof e;++n<r;){var i=t[n];if("string"==typeof i){if("__proto__"===i&&!gh.call(e,"__proto__"))return!1;if("constructor"===i&&n+1<r&&"string"==typeof t[n+1]&&"prototype"===t[n+1]){if(o&&0===n)continue;return!1}}}var a=Vp(e,t);return null==a||delete a[$a(qc(t))]}function mh(e){return ts(e)?void 0:e}var yh=Ka(function(e,t){var n={};if(null==e)return n;var r=!1;t=Mr(t,function(t){return t=Ba(t,e),r||(r=t.length>1),t}),Ei(e,zl(e),n),r&&(n=_u(n,7,mh));for(var o=t.length;o--;)vh(n,t[o]);return n}),bh=yh;function _h(e,t,n,r){if(!Ur(e))return e;for(var o=-1,i=(t=Ba(t,e)).length,a=i-1,s=e;null!=s&&++o<i;){var l=$a(t[o]),u=n;if("__proto__"===l||"constructor"===l||"prototype"===l)return e;if(o!=a){var c=s[l];void 0===(u=r?r(c,l,s):void 0)&&(u=Ur(c)?c:ui(t[o+1])?[]:{})}Si(s,l,u),s=s[l]}return e}function xh(e,t,n){for(var r=-1,o=t.length,i={};++r<o;){var a=t[r],s=Wa(e,a);n(s,a)&&_h(i,Ba(a,e),s)}return i}function wh(e,t){if(null==e)return{};var n=Mr(zl(e),function(e){return[e]});return t=ec(t),xh(e,n,function(e,n){return t(e,n[0])})}function Sh(e,t){return wh(e,lh(ec(t)))}function Eh(e){return is(2,e)}function kh(e,t){if(e!==t){var n=void 0!==e,r=null===e,o=e==e,i=Lr(e),a=void 0!==t,s=null===t,l=t==t,u=Lr(t);if(!s&&!u&&!i&&e>t||i&&a&&l&&!s&&!u||r&&a&&l||!n&&l||!o)return 1;if(!r&&!i&&!u&&e<t||u&&n&&o&&!r&&!i||s&&n&&o||!a&&o||!l)return-1}return 0}function Ch(e,t,n){t=t.length?Mr(t,function(e){return Pr(e)?function(t){return Wa(t,1===e.length?e[0]:e)}:e}):[Xr];var r=-1;t=Mr(t,qi(ec));var o=Dd(e,function(e,n,o){var i=Mr(t,function(t){return t(e)});return{criteria:i,index:++r,value:e}});return function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}(o,function(e,t){return function(e,t,n){for(var r=-1,o=e.criteria,i=t.criteria,a=o.length,s=n.length;++r<a;){var l=kh(o[r],i[r]);if(l)return r>=s?l:l*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)})}function Oh(e,t,n,r){return null==e?[]:(Pr(t)||(t=null==t?[]:[t]),Pr(n=r?void 0:n)||(n=null==n?[]:[n]),Ch(e,t,n))}function Ah(e){return Ka(function(t){return t=Mr(t,qi(ec)),Oi(function(n){var r=this;return e(t,function(e){return So(e,r,n)})})})}var jh=Ah(Mr),Lh=Oi,Rh=Math.min,Mh=Lh(function(e,t){var n=(t=1==t.length&&Pr(t[0])?Mr(t[0],qi(ec)):Mr(Va(t,1),qi(ec))).length;return Oi(function(r){for(var o=-1,i=Rh(r.length,n);++o<i;)r[o]=t[o].call(this,r[o]);return So(e,this,r)})}),Ph=Mh,Nh=Ah(xd),Ih=Ah(ju),Th=Math.floor;function Bh(e,t){var n="";if(!e||t<1||t>9007199254740991)return n;do{t%2&&(n+=e),(t=Th(t/2))&&(e+=e)}while(t);return n}var $h=Zu("length"),Wh="\\ud800-\\udfff",Dh="["+Wh+"]",zh="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",Fh="\\ud83c[\\udffb-\\udfff]",Uh="[^"+Wh+"]",Hh="(?:\\ud83c[\\udde6-\\uddff]){2}",Vh="[\\ud800-\\udbff][\\udc00-\\udfff]",qh="(?:"+zh+"|"+Fh+")"+"?",Kh="[\\ufe0e\\ufe0f]?",Jh=Kh+qh+("(?:\\u200d(?:"+[Uh,Hh,Vh].join("|")+")"+Kh+qh+")*"),Yh="(?:"+[Uh+zh+"?",zh,Hh,Vh,Dh].join("|")+")",Gh=RegExp(Fh+"(?="+Fh+")|"+Yh+Jh,"g");function Qh(e){return gs(e)?function(e){for(var t=Gh.lastIndex=0;Gh.test(e);)++t;return t}(e):$h(e)}var Zh=Math.ceil;function Xh(e,t){var n=(t=void 0===t?" ":Tr(t)).length;if(n<2)return n?Bh(t,e):t;var r=Bh(t,Zh(e/Qh(t)));return gs(t)?fs(As(r),0,e).join(""):r.slice(0,e)}var eg=Math.ceil,tg=Math.floor;function ng(e,t,n){e=Ta(e);var r=(t=Qr(t))?Qh(e):0;if(!t||r>=t)return e;var o=(t-r)/2;return Xh(tg(o),n)+e+Xh(eg(o),n)}function rg(e,t,n){e=Ta(e);var r=(t=Qr(t))?Qh(e):0;return t&&r<t?e+Xh(t-r,n):e}function og(e,t,n){e=Ta(e);var r=(t=Qr(t))?Qh(e):0;return t&&r<t?Xh(t-r,n)+e:e}var ig=/^\s+/,ag=_r.parseInt;function sg(e,t,n){return n||null==t?t=0:t&&(t=+t),ag(Ta(e).replace(ig,""),t||0)}var lg=Oi(function(e,t){return yi(e,32,void 0,t,pi(t,si(lg)))});lg.placeholder={};var ug=lg,cg=Oi(function(e,t){return yi(e,64,void 0,t,pi(t,si(cg)))});cg.placeholder={};var dg=cg,pg=pc(function(e,t,n){e[n?0:1].push(t)},function(){return[[],[]]}),fg=pg;var hg=Ka(function(e,t){return null==e?{}:function(e,t){return xh(e,t,function(t,n){return Gu(e,n)})}(e,t)}),gg=hg;function vg(e){for(var t,n=this;n instanceof Ao;){var r=$o(n);r.__index__=0,r.__values__=void 0,t?o.__wrapped__=r:t=r;var o=r;n=n.__wrapped__}return o.__wrapped__=e,t}function mg(e){return function(t){return null==e?void 0:Wa(e,t)}}function yg(e,t,n,r){for(var o=n-1,i=e.length;++o<i;)if(r(e[o],t))return o;return-1}var bg=Array.prototype.splice;function _g(e,t,n,r){var o=r?yg:ni,i=-1,a=t.length,s=e;for(e===t&&(t=Bo(t)),n&&(s=Mr(e,qi(n)));++i<a;)for(var l=0,u=t[i],c=n?n(u):u;(l=o(s,c,l,r))>-1;)s!==e&&bg.call(s,l,1),bg.call(e,l,1);return e}function xg(e,t){return e&&e.length&&t&&t.length?_g(e,t):e}var wg=Oi(xg);function Sg(e,t,n){return e&&e.length&&t&&t.length?_g(e,t,ec(n)):e}function Eg(e,t,n){return e&&e.length&&t&&t.length?_g(e,t,void 0,n):e}var kg=Array.prototype.splice;function Cg(e,t){for(var n=e?t.length:0,r=n-1;n--;){var o=t[n];if(n==r||o!==i){var i=o;ui(o)?kg.call(e,o,1):vh(e,o)}}return e}var Og=Ka(function(e,t){var n=null==e?0:e.length,r=za(e,t);return Cg(e,Mr(t,function(e){return ui(e,n)?+e:e}).sort(kh)),r}),Ag=Og,jg=Math.floor,Lg=Math.random;function Rg(e,t){return e+jg(Lg()*(t-e+1))}var Mg=parseFloat,Pg=Math.min,Ng=Math.random;function Ig(e,t,n){if(n&&"boolean"!=typeof n&&Li(e,t,n)&&(t=n=void 0),void 0===n&&("boolean"==typeof t?(n=t,t=void 0):"boolean"==typeof e&&(n=e,e=void 0)),void 0===e&&void 0===t?(e=0,t=1):(e=Gr(e),void 0===t?(t=e,e=0):t=Gr(t)),e>t){var r=e;e=t,t=r}if(n||e%1||t%1){var o=Ng();return Pg(e+o*(t-e+Mg("1e-"+((o+"").length-1))),t)}return Rg(e,t)}var Tg=Math.ceil,Bg=Math.max;function $g(e){return function(t,n,r){return r&&"number"!=typeof r&&Li(t,n,r)&&(n=r=void 0),t=Gr(t),void 0===n?(n=t,t=0):n=Gr(n),function(e,t,n,r){for(var o=-1,i=Bg(Tg((t-e)/(n||1)),0),a=Array(i);i--;)a[r?i:++o]=e,e+=n;return a}(t,n,r=void 0===r?t<n?1:-1:Gr(r),e)}}var Wg=$g(),Dg=$g(!0),zg=Ka(function(e,t){return yi(e,256,void 0,void 0,void 0,t)}),Fg=zg;function Ug(e,t,n,r,o){return o(e,function(e,o,i){n=r?(r=!1,e):t(n,e,o,i)}),n}function Hg(e,t,n){var r=Pr(e)?Ms:Ug,o=arguments.length<3;return r(e,ec(t),n,o,cc)}function Vg(e,t,n,r){var o=null==e?0:e.length;for(r&&o&&(n=e[--o]);o--;)n=t(n,e[o],o,e);return n}function qg(e,t,n){var r=Pr(e)?Vg:Ug,o=arguments.length<3;return r(e,ec(t),n,o,ld)}function Kg(e,t){return(Pr(e)?Rl:Cd)(e,lh(ec(t)))}function Jg(e,t){var n=[];if(!e||!e.length)return n;var r=-1,o=[],i=e.length;for(t=ec(t);++r<i;){var a=e[r];t(a,r,e)&&(n.push(a),o.push(r))}return Cg(e,o),n}function Yg(e,t,n){return t=(n?Li(e,t,n):void 0===t)?1:Qr(t),Bh(Ta(e),t)}function Gg(){var e=arguments,t=Ta(e[0]);return e.length<3?t:t.replace(e[1],e[2])}function Qg(e,t){if("function"!=typeof e)throw new TypeError("Expected a function");return Oi(e,t=void 0===t?t:Qr(t))}function Zg(e,t,n){var r=-1,o=(t=Ba(t,e)).length;for(o||(o=1,e=void 0);++r<o;){var i=null==e?void 0:e[$a(t[r])];void 0===i&&(r=o,i=n),e=eo(i)?i.call(e):i}return e}var Xg=Array.prototype.reverse;function ev(e){return null==e?e:Xg.call(e)}var tv=vl("round");function nv(e){var t=e.length;return t?e[Rg(0,t-1)]:void 0}function rv(e){return nv(Sp(e))}function ov(e){return(Pr(e)?nv:rv)(e)}function iv(e,t){var n=-1,r=e.length,o=r-1;for(t=void 0===t?r:t;++n<t;){var i=Rg(n,o),a=e[i];e[i]=e[n],e[n]=a}return e.length=t,e}function av(e,t){return iv(Bo(e),wl(t,0,e.length))}function sv(e,t){var n=Sp(e);return iv(n,wl(t,0,n.length))}function lv(e,t,n){return t=(n?Li(e,t,n):void 0===t)?1:Qr(t),(Pr(e)?av:sv)(e,t)}function uv(e,t,n){return null==e?e:_h(e,t,n)}function cv(e,t,n,r){return r="function"==typeof r?r:void 0,null==e?e:_h(e,t,n,r)}function dv(e){return iv(Bo(e))}function pv(e){return iv(Sp(e))}function fv(e){return(Pr(e)?dv:pv)(e)}function hv(e){if(null==e)return 0;if(ji(e))return xp(e)?Qh(e):e.length;var t=nu(e);return"[object Map]"==t||"[object Set]"==t?e.size:oa(e).length}function gv(e,t,n){var r=null==e?0:e.length;return r?(n&&"number"!=typeof n&&Li(e,t,n)?(t=0,n=r):(t=null==t?0:Qr(t),n=void 0===n?r:Qr(n)),ps(e,t,n)):[]}var vv=cl(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}),mv=vv;function yv(e,t){var n;return cc(e,function(e,r,o){return!(n=t(e,r,o))}),!!n}function bv(e,t,n){var r=Pr(e)?ju:yv;return n&&Li(e,t,n)&&(t=void 0),r(e,ec(t))}var _v=Oi(function(e,t){if(null==e)return[];var n=t.length;return n>1&&Li(e,t[0],t[1])?t=[]:n>2&&Li(t[0],t[1],t[2])&&(t=[t[0]]),Ch(e,Va(t,1),[])}),xv=_v,wv=Math.floor,Sv=Math.min;function Ev(e,t,n,r){var o=0,i=null==e?0:e.length;if(0===i)return 0;for(var a=(t=n(t))!=t,s=null===t,l=Lr(t),u=void 0===t;o<i;){var c=wv((o+i)/2),d=n(e[c]),p=void 0!==d,f=null===d,h=d==d,g=Lr(d);if(a)var v=r||h;else v=u?h&&(r||p):s?h&&p&&(r||!f):l?h&&p&&!f&&(r||!g):!f&&!g&&(r?d<=t:d<t);v?o=c+1:i=c}return Sv(i,4294967294)}function kv(e,t,n){var r=0,o=null==e?r:e.length;if("number"==typeof t&&t==t&&o<=2147483647){for(;r<o;){var i=r+o>>>1,a=e[i];null!==a&&!Lr(a)&&(n?a<=t:a<t)?r=i+1:o=i}return o}return Ev(e,t,Xr,n)}function Cv(e,t){return kv(e,t)}function Ov(e,t,n){return Ev(e,t,ec(n))}function Av(e,t){var n=null==e?0:e.length;if(n){var r=kv(e,t);if(r<n&&xi(e[r],t))return r}return-1}function jv(e,t){return kv(e,t,!0)}function Lv(e,t,n){return Ev(e,t,ec(n),!0)}function Rv(e,t){if(null==e?0:e.length){var n=kv(e,t,!0)-1;if(xi(e[n],t))return n}return-1}function Mv(e,t){for(var n=-1,r=e.length,o=0,i=[];++n<r;){var a=e[n],s=t?t(a):a;if(!n||!xi(s,l)){var l=s;i[o++]=0===a?0:a}}return i}function Pv(e){return e&&e.length?Mv(e):[]}function Nv(e,t){return e&&e.length?Mv(e,ec(t)):[]}function Iv(e,t,n){return n&&"number"!=typeof n&&Li(e,t,n)&&(t=n=void 0),(n=void 0===n?4294967295:n>>>0)?(e=Ta(e))&&("string"==typeof t||null!=t&&!bf(t))&&!(t=Tr(t))&&gs(e)?fs(As(e),0,n):e.split(t,n):[]}var Tv=Math.max;function Bv(e,t){if("function"!=typeof e)throw new TypeError("Expected a function");return t=null==t?0:Tv(Qr(t),0),Oi(function(n){var r=n[t],o=fs(n,0,t);return r&&Fa(o,r),So(e,this,o)})}var $v=cl(function(e,t,n){return e+(n?" ":"")+Ls(t)}),Wv=$v;function Dv(e,t,n){return e=Ta(e),n=null==n?0:wl(Qr(n),0,e.length),t=Tr(t),e.slice(n,n+t.length)==t}function zv(){return{}}function Fv(){return""}function Uv(){return!0}var Hv=Br(function(e,t){return e-t},0);function Vv(e){return e&&e.length?Jf(e,Xr):0}function qv(e,t){return e&&e.length?Jf(e,ec(t)):0}function Kv(e){var t=null==e?0:e.length;return t?ps(e,1,t):[]}function Jv(e,t,n){return e&&e.length?ps(e,0,(t=n||void 0===t?1:Qr(t))<0?0:t):[]}function Yv(e,t,n){var r=null==e?0:e.length;return r?ps(e,(t=r-(t=n||void 0===t?1:Qr(t)))<0?0:t,r):[]}function Gv(e,t){return e&&e.length?ed(e,ec(t),!1,!0):[]}function Qv(e,t){return e&&e.length?ed(e,ec(t)):[]}function Zv(e,t){return t(e),e}var Xv=Object.prototype,em=Xv.hasOwnProperty;function tm(e,t,n,r){return void 0===e||xi(e,Xv[n])&&!em.call(r,n)?t:e}var nm={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"};function rm(e){return"\\"+nm[e]}var om=/<%=([\s\S]+?)%>/g,im={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:om,variable:"",imports:{_:{escape:md}}},am=/\b__p \+= '';/g,sm=/\b(__p \+=) '' \+/g,lm=/(__e\(.*?\)|\b__t\)) \+\n'';/g,um=/[()=,{}\[\]\/\s]/,cm=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,dm=/($^)/,pm=/['\n\r\u2028\u2029\\]/g,fm=Object.prototype.hasOwnProperty;function hm(e,t,n){var r=im.imports._.templateSettings||im;n&&Li(e,t,n)&&(t=void 0),e=Ta(e),t=ga({},t,r,tm);var o,i,a=ga({},t.imports,r.imports,tm),s=ia(a),l=wp(a,s),u=0,c=t.interpolate||dm,d="__p += '",p=RegExp((t.escape||dm).source+"|"+c.source+"|"+(c===om?cm:dm).source+"|"+(t.evaluate||dm).source+"|$","g"),f=fm.call(t,"sourceURL")?"//# sourceURL="+(t.sourceURL+"").replace(/\s/g," ")+"\n":"";e.replace(p,function(t,n,r,a,s,l){return r||(r=a),d+=e.slice(u,l).replace(pm,rm),n&&(o=!0,d+="' +\n__e("+n+") +\n'"),s&&(i=!0,d+="';\n"+s+";\n__p += '"),r&&(d+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),u=l+t.length,t}),d+="';\n";var h=fm.call(t,"variable")&&t.variable;if(h){if(um.test(h))throw new Error("Invalid `variable` option passed into `_.template`")}else d="with (obj) {\n"+d+"\n}\n";d=(i?d.replace(am,""):d).replace(sm,"$1").replace(lm,"$1;"),d="function("+(h||"obj")+") {\n"+(h?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(i?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var g=os(function(){return Function(s,f+"return "+d).apply(void 0,l)});if(g.source=d,ns(g))throw g;return g}function gm(e,t,n){var r=!0,o=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return Ur(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),wc(e,t,{leading:r,maxWait:t,trailing:o})}function vm(e,t){return t(e)}var mm=4294967295,ym=Math.min;function bm(e,t){if((e=Qr(e))<1||e>9007199254740991)return[];var n=mm,r=ym(e,mm);t=rd(t),e-=mm;for(var o=Ni(r,t);++n<e;)t(n);return o}function _m(){return this}function xm(e,t){var n=e;return n instanceof jo&&(n=n.value()),Ms(t,function(e,t){return t.func.apply(t.thisArg,Fa([e],t.args))},n)}function wm(){return xm(this.__wrapped__,this.__actions__)}function Sm(e){return Ta(e).toLowerCase()}function Em(e){return Pr(e)?Mr(e,$a):Lr(e)?[e]:Bo(Ia(Ta(e)))}var km=9007199254740991;function Cm(e){return e?wl(Qr(e),-9007199254740991,km):0===e?e:0}function Om(e){return Ta(e).toUpperCase()}function Am(e,t,n){var r=Pr(e),o=r||Hi(e)||Zi(e);if(t=ec(t),null==n){var i=e&&e.constructor;n=o?r?new i:[]:Ur(e)&&eo(i)?xo(Ya(e)):{}}return(o?Xo:lc)(e,function(e,r,o){return t(n,e,r,o)}),n}function jm(e,t){for(var n=e.length;n--&&ni(t,e[n],0)>-1;);return n}function Lm(e,t){for(var n=-1,r=e.length;++n<r&&ni(t,e[n],0)>-1;);return n}function Rm(e,t,n){if((e=Ta(e))&&(n||void 0===t))return Fr(e);if(!e||!(t=Tr(t)))return e;var r=As(e),o=As(t);return fs(r,Lm(r,o),jm(r,o)+1).join("")}function Mm(e,t,n){if((e=Ta(e))&&(n||void 0===t))return e.slice(0,Dr(e)+1);if(!e||!(t=Tr(t)))return e;var r=As(e);return fs(r,0,jm(r,As(t))+1).join("")}var Pm=/^\s+/;function Nm(e,t,n){if((e=Ta(e))&&(n||void 0===t))return e.replace(Pm,"");if(!e||!(t=Tr(t)))return e;var r=As(e);return fs(r,Lm(r,As(t))).join("")}var Im=/\w*$/;function Tm(e,t){var n=30,r="...";if(Ur(t)){var o="separator"in t?t.separator:o;n="length"in t?Qr(t.length):n,r="omission"in t?Tr(t.omission):r}var i=(e=Ta(e)).length;if(gs(e)){var a=As(e);i=a.length}if(n>=i)return e;var s=n-Qh(r);if(s<1)return r;var l=a?fs(a,0,s).join(""):e.slice(0,s);if(void 0===o)return l+r;if(a&&(s+=l.length-s),bf(o)){if(e.slice(s).search(o)){var u,c=l;for(o.global||(o=RegExp(o.source,Ta(Im.exec(o))+"g")),o.lastIndex=0;u=o.exec(c);)var d=u.index;l=l.slice(0,void 0===d?s:d)}}else if(e.indexOf(Tr(o),s)!=s){var p=l.lastIndexOf(o);p>-1&&(l=l.slice(0,p))}return l+r}function Bm(e){return bi(e,1)}var $m=Ps({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),Wm=/&(?:amp|lt|gt|quot|#39);/g,Dm=RegExp(Wm.source);function zm(e){return(e=Ta(e))&&Dm.test(e)?e.replace(Wm,$m):e}var Fm=Hl&&1/Pu(new Hl([,-0]))[1]==1/0?function(e){return new Hl(e)}:Lo,Um=Fm;function Hm(e,t,n){var r=-1,o=ri,i=e.length,a=!0,s=[],l=s;if(n)a=!1,o=Fc;else if(i>=200){var u=t?null:Um(e);if(u)return Pu(u);a=!1,o=Lu,l=new Au}else l=t?[]:s;e:for(;++r<i;){var c=e[r],d=t?t(c):c;if(c=n||0!==c?c:0,a&&d==d){for(var p=l.length;p--;)if(l[p]===d)continue e;t&&l.push(d),s.push(c)}else o(l,d,n)||(l!==s&&l.push(d),s.push(c))}return s}var Vm=Oi(function(e){return Hm(Va(e,1,jc,!0))}),qm=Oi(function(e){var t=qc(e);return jc(t)&&(t=void 0),Hm(Va(e,1,jc,!0),ec(t))}),Km=qm,Jm=Oi(function(e){var t=qc(e);return t="function"==typeof t?t:void 0,Hm(Va(e,1,jc,!0),void 0,t)});function Ym(e){return e&&e.length?Hm(e):[]}function Gm(e,t){return e&&e.length?Hm(e,ec(t)):[]}function Qm(e,t){return t="function"==typeof t?t:void 0,e&&e.length?Hm(e,void 0,t):[]}var Zm=0;function Xm(e){var t=++Zm;return Ta(e)+t}function ey(e,t){return null==e||vh(e,t)}var ty=Math.max;function ny(e){if(!e||!e.length)return[];var t=0;return e=Rl(e,function(e){if(jc(e))return t=ty(e.length,t),!0}),Ni(t,function(t){return Mr(e,Zu(t))})}function ry(e,t){if(!e||!e.length)return[];var n=ny(e);return null==t?n:Mr(n,function(e){return So(t,void 0,e)})}function oy(e,t,n,r){return _h(e,t,n(Wa(e,t)),r)}function iy(e,t,n){return null==e?e:oy(e,t,rd(n))}function ay(e,t,n,r){return r="function"==typeof r?r:void 0,null==e?e:oy(e,t,rd(n),r)}var sy=cl(function(e,t,n){return e+(n?" ":"")+t.toUpperCase()}),ly=sy;function uy(e){return null==e?[]:wp(e,da(e))}var cy=Oi(function(e,t){return jc(e)?Uc(e,t):[]}),dy=cy;function py(e,t){return ug(rd(t),e)}var fy=Ka(function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,o=function(t){return za(t,e)};return!(t>1||this.__actions__.length)&&r instanceof jo&&ui(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:vm,args:[o],thisArg:void 0}),new To(r,this.__chain__).thru(function(e){return t&&!e.length&&e.push(void 0),e})):this.thru(o)}),hy=fy;function gy(){return yl(this)}function vy(){var e=this.__wrapped__;if(e instanceof jo){var t=e;return this.__actions__.length&&(t=new jo(this)),(t=t.reverse()).__actions__.push({func:vm,args:[ev],thisArg:void 0}),new To(t,this.__chain__)}return this.thru(ev)}function my(e,t,n){var r=e.length;if(r<2)return r?Hm(e[0]):[];for(var o=-1,i=Array(r);++o<r;)for(var a=e[o],s=-1;++s<r;)s!=o&&(i[o]=Uc(i[o]||a,e[s],t,n));return Hm(Va(i,1),t,n)}var yy=Oi(function(e){return my(Rl(e,jc))}),by=Oi(function(e){var t=qc(e);return jc(t)&&(t=void 0),my(Rl(e,jc),ec(t))}),_y=by,xy=Oi(function(e){var t=qc(e);return t="function"==typeof t?t:void 0,my(Rl(e,jc),void 0,t)}),wy=Oi(ny);function Sy(e,t,n){for(var r=-1,o=e.length,i=t.length,a={};++r<o;){var s=r<i?t[r]:void 0;n(a,e[r],s)}return a}function Ey(e,t){return Sy(e||[],t||[],Si)}function ky(e,t){return Sy(e||[],t||[],_h)}var Cy=Oi(function(e){var t=e.length,n=t>1?e[t-1]:void 0;return n="function"==typeof n?(e.pop(),n):void 0,ry(e,n)}),Oy=Cy,Ay={chunk:xl,compact:Cu,concat:Ou,difference:Vc,differenceBy:Jc,differenceWith:Gc,drop:Zc,dropRight:Xc,dropRightWhile:td,dropWhile:nd,fill:kd,findIndex:Ld,findLastIndex:Td,first:Wd,flatten:qa,flattenDeep:Kd,flattenDepth:Jd,fromPairs:op,head:Wd,indexOf:Op,initial:Ap,intersection:Mp,intersectionBy:Np,intersectionWith:Ip,join:Of,last:qc,lastIndexOf:Nf,nth:fh,pull:wg,pullAll:xg,pullAllBy:Sg,pullAllWith:Eg,pullAt:Ag,remove:Jg,reverse:ev,slice:gv,sortedIndex:Cv,sortedIndexBy:Ov,sortedIndexOf:Av,sortedLastIndex:jv,sortedLastIndexBy:Lv,sortedLastIndexOf:Rv,sortedUniq:Pv,sortedUniqBy:Nv,tail:Kv,take:Jv,takeRight:Yv,takeRightWhile:Gv,takeWhile:Qv,union:Vm,unionBy:Km,unionWith:Jm,uniq:Ym,uniqBy:Gm,uniqWith:Qm,unzip:ny,unzipWith:ry,without:dy,xor:yy,xorBy:_y,xorWith:xy,zip:wy,zipObject:Ey,zipObjectDeep:ky,zipWith:Oy},jy={countBy:gc,each:od,eachRight:ud,every:Sd,filter:Od,find:Rd,findLast:Bd,flatMap:Fd,flatMapDeep:Hd,flatMapDepth:Vd,forEach:od,forEachRight:ud,groupBy:cp,includes:kp,invokeMap:Yp,keyBy:Rf,map:zd,orderBy:Oh,partition:fg,reduce:Hg,reduceRight:qg,reject:Kg,sample:ov,sampleSize:lv,shuffle:fv,size:hv,some:bv,sortBy:xv},Ly={now:bc},Ry={after:Zr,ary:bi,before:is,bind:ss,bindKey:ds,curry:mc,curryRight:yc,debounce:wc,defer:Wc,delay:zc,flip:Yd,memoize:Ra,negate:lh,once:Eh,overArgs:Ph,partial:ug,partialRight:dg,rearg:Fg,rest:Qg,spread:Bv,throttle:gm,unary:Bm,wrap:py},My={castArray:fl,clone:xu,cloneDeep:wu,cloneDeepWith:Su,cloneWith:Eu,conformsTo:oc,eq:xi,gt:fp,gte:hp,isArguments:Wi,isArray:Pr,isArrayBuffer:Qp,isArrayLike:ji,isArrayLikeObject:jc,isBoolean:Zp,isBuffer:Hi,isDate:ef,isElement:tf,isEmpty:rf,isEqual:of,isEqualWith:af,isError:ns,isFinite:lf,isFunction:eo,isInteger:uf,isLength:Ai,isMap:fu,isMatch:cf,isMatchWith:df,isNaN:ff,isNative:gf,isNil:vf,isNull:mf,isNumber:pf,isObject:Ur,isObjectLike:jr,isPlainObject:ts,isRegExp:bf,isSafeInteger:xf,isSet:gu,isString:xp,isSymbol:Lr,isTypedArray:Zi,isUndefined:wf,isWeakMap:Sf,isWeakSet:Ef,lt:Wf,lte:Df,toArray:ch,toFinite:Gr,toInteger:Qr,toLength:Ed,toNumber:Jr,toPlainObject:Rc,toSafeInteger:Cm,toString:Ta},Py={add:$r,ceil:ml,divide:Qc,floor:Gd,max:qf,maxBy:Kf,mean:Gf,meanBy:Qf,min:oh,minBy:ih,multiply:sh,round:tv,subtract:Hv,sum:Vv,sumBy:qv},Ny=Sl,Iy=_p,Ty=Ig,By={assign:la,assignIn:fa,assignInWith:ga,assignWith:ma,at:Ja,create:vc,defaults:Oc,defaultsDeep:Tc,entries:pd,entriesIn:fd,extend:fa,extendWith:ga,findKey:Pd,findLastKey:$d,forIn:ep,forInRight:tp,forOwn:np,forOwnRight:rp,functions:ap,functionsIn:sp,get:Da,has:mp,hasIn:Gu,invert:Wp,invertBy:Hp,invoke:Kp,keys:ia,keysIn:da,mapKeys:zf,mapValues:Ff,merge:Xf,mergeWith:Ic,omit:bh,omitBy:Sh,pick:gg,pickBy:wh,result:Zg,set:uv,setWith:cv,toPairs:pd,toPairsIn:fd,transform:Am,unset:ey,update:iy,updateWith:ay,values:Sp,valuesIn:uy},$y={at:hy,chain:yl,commit:ku,lodash:Do,next:dh,plant:vg,reverse:vy,tap:Zv,thru:vm,toIterator:_m,toJSON:wm,value:wm,valueOf:wm,wrapperChain:gy},Wy={camelCase:pl,capitalize:Rs,deburr:Bs,endsWith:cd,escape:md,escapeRegExp:_d,kebabCase:jf,lowerCase:Tf,lowerFirst:Bf,pad:ng,padEnd:rg,padStart:og,parseInt:sg,repeat:Yg,replace:Gg,snakeCase:mv,split:Iv,startCase:Wv,startsWith:Dv,template:hm,templateSettings:im,toLower:Sm,toUpper:Om,trim:Rm,trimEnd:Mm,trimStart:Nm,truncate:Tm,unescape:zm,upperCase:ly,upperFirst:Ls,words:ll},Dy={attempt:os,bindAll:us,cond:tc,conforms:rc,constant:Jo,defaultTo:Sc,flow:Zd,flowRight:Xd,identity:Xr,iteratee:kf,matches:Uf,matchesProperty:Hf,method:th,methodOf:rh,mixin:ah,noop:Lo,nthArg:hh,over:jh,overEvery:Nh,overSome:Ih,property:Xu,propertyOf:mg,range:Wg,rangeRight:Dg,stubArray:Ml,stubFalse:Di,stubObject:zv,stubString:Fv,stubTrue:Uv,times:bm,toPath:Em,uniqueId:Xm};var zy=Math.max,Fy=Math.min;var Uy=Math.min;var Hy,Vy=4294967295,qy=Array.prototype,Ky=Object.prototype.hasOwnProperty,Jy=xr?xr.iterator:void 0,Yy=Math.max,Gy=Math.min,Qy=function(e){return function(t,n,r){if(null==r){var o=Ur(n),i=o&&ia(n),a=i&&i.length&&ip(n,i);(a?a.length:o)||(r=n,n=t,t=this)}return e(t,n,r)}}(ah);Do.after=Ry.after,Do.ary=Ry.ary,Do.assign=By.assign,Do.assignIn=By.assignIn,Do.assignInWith=By.assignInWith,Do.assignWith=By.assignWith,Do.at=By.at,Do.before=Ry.before,Do.bind=Ry.bind,Do.bindAll=Dy.bindAll,Do.bindKey=Ry.bindKey,Do.castArray=My.castArray,Do.chain=$y.chain,Do.chunk=Ay.chunk,Do.compact=Ay.compact,Do.concat=Ay.concat,Do.cond=Dy.cond,Do.conforms=Dy.conforms,Do.constant=Dy.constant,Do.countBy=jy.countBy,Do.create=By.create,Do.curry=Ry.curry,Do.curryRight=Ry.curryRight,Do.debounce=Ry.debounce,Do.defaults=By.defaults,Do.defaultsDeep=By.defaultsDeep,Do.defer=Ry.defer,Do.delay=Ry.delay,Do.difference=Ay.difference,Do.differenceBy=Ay.differenceBy,Do.differenceWith=Ay.differenceWith,Do.drop=Ay.drop,Do.dropRight=Ay.dropRight,Do.dropRightWhile=Ay.dropRightWhile,Do.dropWhile=Ay.dropWhile,Do.fill=Ay.fill,Do.filter=jy.filter,Do.flatMap=jy.flatMap,Do.flatMapDeep=jy.flatMapDeep,Do.flatMapDepth=jy.flatMapDepth,Do.flatten=Ay.flatten,Do.flattenDeep=Ay.flattenDeep,Do.flattenDepth=Ay.flattenDepth,Do.flip=Ry.flip,Do.flow=Dy.flow,Do.flowRight=Dy.flowRight,Do.fromPairs=Ay.fromPairs,Do.functions=By.functions,Do.functionsIn=By.functionsIn,Do.groupBy=jy.groupBy,Do.initial=Ay.initial,Do.intersection=Ay.intersection,Do.intersectionBy=Ay.intersectionBy,Do.intersectionWith=Ay.intersectionWith,Do.invert=By.invert,Do.invertBy=By.invertBy,Do.invokeMap=jy.invokeMap,Do.iteratee=Dy.iteratee,Do.keyBy=jy.keyBy,Do.keys=ia,Do.keysIn=By.keysIn,Do.map=jy.map,Do.mapKeys=By.mapKeys,Do.mapValues=By.mapValues,Do.matches=Dy.matches,Do.matchesProperty=Dy.matchesProperty,Do.memoize=Ry.memoize,Do.merge=By.merge,Do.mergeWith=By.mergeWith,Do.method=Dy.method,Do.methodOf=Dy.methodOf,Do.mixin=Qy,Do.negate=lh,Do.nthArg=Dy.nthArg,Do.omit=By.omit,Do.omitBy=By.omitBy,Do.once=Ry.once,Do.orderBy=jy.orderBy,Do.over=Dy.over,Do.overArgs=Ry.overArgs,Do.overEvery=Dy.overEvery,Do.overSome=Dy.overSome,Do.partial=Ry.partial,Do.partialRight=Ry.partialRight,Do.partition=jy.partition,Do.pick=By.pick,Do.pickBy=By.pickBy,Do.property=Dy.property,Do.propertyOf=Dy.propertyOf,Do.pull=Ay.pull,Do.pullAll=Ay.pullAll,Do.pullAllBy=Ay.pullAllBy,Do.pullAllWith=Ay.pullAllWith,Do.pullAt=Ay.pullAt,Do.range=Dy.range,Do.rangeRight=Dy.rangeRight,Do.rearg=Ry.rearg,Do.reject=jy.reject,Do.remove=Ay.remove,Do.rest=Ry.rest,Do.reverse=Ay.reverse,Do.sampleSize=jy.sampleSize,Do.set=By.set,Do.setWith=By.setWith,Do.shuffle=jy.shuffle,Do.slice=Ay.slice,Do.sortBy=jy.sortBy,Do.sortedUniq=Ay.sortedUniq,Do.sortedUniqBy=Ay.sortedUniqBy,Do.split=Wy.split,Do.spread=Ry.spread,Do.tail=Ay.tail,Do.take=Ay.take,Do.takeRight=Ay.takeRight,Do.takeRightWhile=Ay.takeRightWhile,Do.takeWhile=Ay.takeWhile,Do.tap=$y.tap,Do.throttle=Ry.throttle,Do.thru=vm,Do.toArray=My.toArray,Do.toPairs=By.toPairs,Do.toPairsIn=By.toPairsIn,Do.toPath=Dy.toPath,Do.toPlainObject=My.toPlainObject,Do.transform=By.transform,Do.unary=Ry.unary,Do.union=Ay.union,Do.unionBy=Ay.unionBy,Do.unionWith=Ay.unionWith,Do.uniq=Ay.uniq,Do.uniqBy=Ay.uniqBy,Do.uniqWith=Ay.uniqWith,Do.unset=By.unset,Do.unzip=Ay.unzip,Do.unzipWith=Ay.unzipWith,Do.update=By.update,Do.updateWith=By.updateWith,Do.values=By.values,Do.valuesIn=By.valuesIn,Do.without=Ay.without,Do.words=Wy.words,Do.wrap=Ry.wrap,Do.xor=Ay.xor,Do.xorBy=Ay.xorBy,Do.xorWith=Ay.xorWith,Do.zip=Ay.zip,Do.zipObject=Ay.zipObject,Do.zipObjectDeep=Ay.zipObjectDeep,Do.zipWith=Ay.zipWith,Do.entries=By.toPairs,Do.entriesIn=By.toPairsIn,Do.extend=By.assignIn,Do.extendWith=By.assignInWith,Qy(Do,Do),Do.add=Py.add,Do.attempt=Dy.attempt,Do.camelCase=Wy.camelCase,Do.capitalize=Wy.capitalize,Do.ceil=Py.ceil,Do.clamp=Ny,Do.clone=My.clone,Do.cloneDeep=My.cloneDeep,Do.cloneDeepWith=My.cloneDeepWith,Do.cloneWith=My.cloneWith,Do.conformsTo=My.conformsTo,Do.deburr=Wy.deburr,Do.defaultTo=Dy.defaultTo,Do.divide=Py.divide,Do.endsWith=Wy.endsWith,Do.eq=My.eq,Do.escape=Wy.escape,Do.escapeRegExp=Wy.escapeRegExp,Do.every=jy.every,Do.find=jy.find,Do.findIndex=Ay.findIndex,Do.findKey=By.findKey,Do.findLast=jy.findLast,Do.findLastIndex=Ay.findLastIndex,Do.findLastKey=By.findLastKey,Do.floor=Py.floor,Do.forEach=jy.forEach,Do.forEachRight=jy.forEachRight,Do.forIn=By.forIn,Do.forInRight=By.forInRight,Do.forOwn=By.forOwn,Do.forOwnRight=By.forOwnRight,Do.get=By.get,Do.gt=My.gt,Do.gte=My.gte,Do.has=By.has,Do.hasIn=By.hasIn,Do.head=Ay.head,Do.identity=Xr,Do.includes=jy.includes,Do.indexOf=Ay.indexOf,Do.inRange=Iy,Do.invoke=By.invoke,Do.isArguments=My.isArguments,Do.isArray=Pr,Do.isArrayBuffer=My.isArrayBuffer,Do.isArrayLike=My.isArrayLike,Do.isArrayLikeObject=My.isArrayLikeObject,Do.isBoolean=My.isBoolean,Do.isBuffer=My.isBuffer,Do.isDate=My.isDate,Do.isElement=My.isElement,Do.isEmpty=My.isEmpty,Do.isEqual=My.isEqual,Do.isEqualWith=My.isEqualWith,Do.isError=My.isError,Do.isFinite=My.isFinite,Do.isFunction=My.isFunction,Do.isInteger=My.isInteger,Do.isLength=My.isLength,Do.isMap=My.isMap,Do.isMatch=My.isMatch,Do.isMatchWith=My.isMatchWith,Do.isNaN=My.isNaN,Do.isNative=My.isNative,Do.isNil=My.isNil,Do.isNull=My.isNull,Do.isNumber=My.isNumber,Do.isObject=Ur,Do.isObjectLike=My.isObjectLike,Do.isPlainObject=My.isPlainObject,Do.isRegExp=My.isRegExp,Do.isSafeInteger=My.isSafeInteger,Do.isSet=My.isSet,Do.isString=My.isString,Do.isSymbol=My.isSymbol,Do.isTypedArray=My.isTypedArray,Do.isUndefined=My.isUndefined,Do.isWeakMap=My.isWeakMap,Do.isWeakSet=My.isWeakSet,Do.join=Ay.join,Do.kebabCase=Wy.kebabCase,Do.last=qc,Do.lastIndexOf=Ay.lastIndexOf,Do.lowerCase=Wy.lowerCase,Do.lowerFirst=Wy.lowerFirst,Do.lt=My.lt,Do.lte=My.lte,Do.max=Py.max,Do.maxBy=Py.maxBy,Do.mean=Py.mean,Do.meanBy=Py.meanBy,Do.min=Py.min,Do.minBy=Py.minBy,Do.stubArray=Dy.stubArray,Do.stubFalse=Dy.stubFalse,Do.stubObject=Dy.stubObject,Do.stubString=Dy.stubString,Do.stubTrue=Dy.stubTrue,Do.multiply=Py.multiply,Do.nth=Ay.nth,Do.noop=Dy.noop,Do.now=Ly.now,Do.pad=Wy.pad,Do.padEnd=Wy.padEnd,Do.padStart=Wy.padStart,Do.parseInt=Wy.parseInt,Do.random=Ty,Do.reduce=jy.reduce,Do.reduceRight=jy.reduceRight,Do.repeat=Wy.repeat,Do.replace=Wy.replace,Do.result=By.result,Do.round=Py.round,Do.sample=jy.sample,Do.size=jy.size,Do.snakeCase=Wy.snakeCase,Do.some=jy.some,Do.sortedIndex=Ay.sortedIndex,Do.sortedIndexBy=Ay.sortedIndexBy,Do.sortedIndexOf=Ay.sortedIndexOf,Do.sortedLastIndex=Ay.sortedLastIndex,Do.sortedLastIndexBy=Ay.sortedLastIndexBy,Do.sortedLastIndexOf=Ay.sortedLastIndexOf,Do.startCase=Wy.startCase,Do.startsWith=Wy.startsWith,Do.subtract=Py.subtract,Do.sum=Py.sum,Do.sumBy=Py.sumBy,Do.template=Wy.template,Do.times=Dy.times,Do.toFinite=My.toFinite,Do.toInteger=Qr,Do.toLength=My.toLength,Do.toLower=Wy.toLower,Do.toNumber=My.toNumber,Do.toSafeInteger=My.toSafeInteger,Do.toString=My.toString,Do.toUpper=Wy.toUpper,Do.trim=Wy.trim,Do.trimEnd=Wy.trimEnd,Do.trimStart=Wy.trimStart,Do.truncate=Wy.truncate,Do.unescape=Wy.unescape,Do.uniqueId=Dy.uniqueId,Do.upperCase=Wy.upperCase,Do.upperFirst=Wy.upperFirst,Do.each=jy.forEach,Do.eachRight=jy.forEachRight,Do.first=Ay.head,Qy(Do,(Hy={},lc(Do,function(e,t){Ky.call(Do.prototype,t)||(Hy[t]=e)}),Hy),{chain:!1}),Do.VERSION="4.17.23",(Do.templateSettings=Wy.templateSettings).imports._=Do,Xo(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){Do[e].placeholder=Do}),Xo(["drop","take"],function(e,t){jo.prototype[e]=function(n){n=void 0===n?1:Yy(Qr(n),0);var r=this.__filtered__&&!t?new jo(this):this.clone();return r.__filtered__?r.__takeCount__=Gy(n,r.__takeCount__):r.__views__.push({size:Gy(n,Vy),type:e+(r.__dir__<0?"Right":"")}),r},jo.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}}),Xo(["filter","map","takeWhile"],function(e,t){var n=t+1,r=1==n||3==n;jo.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:ec(e),type:n}),t.__filtered__=t.__filtered__||r,t}}),Xo(["head","last"],function(e,t){var n="take"+(t?"Right":"");jo.prototype[e]=function(){return this[n](1).value()[0]}}),Xo(["initial","tail"],function(e,t){var n="drop"+(t?"":"Right");jo.prototype[e]=function(){return this.__filtered__?new jo(this):this[n](1)}}),jo.prototype.compact=function(){return this.filter(Xr)},jo.prototype.find=function(e){return this.filter(e).head()},jo.prototype.findLast=function(e){return this.reverse().find(e)},jo.prototype.invokeMap=Oi(function(e,t){return"function"==typeof e?new jo(this):this.map(function(n){return qp(n,e,t)})}),jo.prototype.reject=function(e){return this.filter(lh(ec(e)))},jo.prototype.slice=function(e,t){e=Qr(e);var n=this;return n.__filtered__&&(e>0||t<0)?new jo(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),void 0!==t&&(n=(t=Qr(t))<0?n.dropRight(-t):n.take(t-e)),n)},jo.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},jo.prototype.toArray=function(){return this.take(Vy)},lc(jo.prototype,function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),o=Do[r?"take"+("last"==t?"Right":""):t],i=r||/^find/.test(t);o&&(Do.prototype[t]=function(){var t=this.__wrapped__,a=r?[1]:arguments,s=t instanceof jo,l=a[0],u=s||Pr(t),c=function(e){var t=o.apply(Do,Fa([e],a));return r&&d?t[0]:t};u&&n&&"function"==typeof l&&1!=l.length&&(s=u=!1);var d=this.__chain__,p=!!this.__actions__.length,f=i&&!d,h=s&&!p;if(!i&&u){t=h?t:new jo(this);var g=e.apply(t,a);return g.__actions__.push({func:vm,args:[c],thisArg:void 0}),new To(g,d)}return f&&h?e.apply(this,a):(g=this.thru(c),f?r?g.value()[0]:g.value():g)})}),Xo(["pop","push","shift","sort","splice","unshift"],function(e){var t=qy[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);Do.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var o=this.value();return t.apply(Pr(o)?o:[],e)}return this[n](function(n){return t.apply(Pr(n)?n:[],e)})}}),lc(jo.prototype,function(e,t){var n=Do[t];if(n){var r=n.name+"";Ky.call(Po,r)||(Po[r]=[]),Po[r].push({name:t,func:n})}}),Po[fi(void 0,2).name]=[{name:"wrapper",func:void 0}],jo.prototype.clone=function(){var e=new jo(this.__wrapped__);return e.__actions__=Bo(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Bo(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Bo(this.__views__),e},jo.prototype.reverse=function(){if(this.__filtered__){var e=new jo(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},jo.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Pr(e),r=t<0,o=n?e.length:0,i=function(e,t,n){for(var r=-1,o=n.length;++r<o;){var i=n[r],a=i.size;switch(i.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=Fy(t,e+a);break;case"takeRight":e=zy(e,t-a)}}return{start:e,end:t}}(0,o,this.__views__),a=i.start,s=i.end,l=s-a,u=r?s:a-1,c=this.__iteratees__,d=c.length,p=0,f=Uy(l,this.__takeCount__);if(!n||!r&&o==l&&f==l)return xm(e,this.__actions__);var h=[];e:for(;l--&&p<f;){for(var g=-1,v=e[u+=t];++g<d;){var m=c[g],y=m.iteratee,b=m.type,_=y(v);if(2==b)v=_;else if(!_){if(1==b)continue e;break e}}h[p++]=v}return h},Do.prototype.at=$y.at,Do.prototype.chain=$y.wrapperChain,Do.prototype.commit=$y.commit,Do.prototype.next=$y.next,Do.prototype.plant=$y.plant,Do.prototype.reverse=$y.reverse,Do.prototype.toJSON=Do.prototype.valueOf=Do.prototype.value=$y.value,Do.prototype.first=Do.prototype.head,Jy&&(Do.prototype[Jy]=$y.toIterator);var Zy=p(Object.freeze({__proto__:null,add:$r,after:Zr,ary:bi,assign:la,assignIn:fa,assignInWith:ga,assignWith:ma,at:Ja,attempt:os,before:is,bind:ss,bindAll:us,bindKey:ds,camelCase:pl,capitalize:Rs,castArray:fl,ceil:ml,chain:yl,chunk:xl,clamp:Sl,clone:xu,cloneDeep:wu,cloneDeepWith:Su,cloneWith:Eu,commit:ku,compact:Cu,concat:Ou,cond:tc,conforms:rc,conformsTo:oc,constant:Jo,countBy:gc,create:vc,curry:mc,curryRight:yc,debounce:wc,deburr:Bs,defaultTo:Sc,defaults:Oc,defaultsDeep:Tc,defer:Wc,delay:zc,difference:Vc,differenceBy:Jc,differenceWith:Gc,divide:Qc,drop:Zc,dropRight:Xc,dropRightWhile:td,dropWhile:nd,each:od,eachRight:ud,endsWith:cd,entries:pd,entriesIn:fd,eq:xi,escape:md,escapeRegExp:_d,every:Sd,extend:fa,extendWith:ga,fill:kd,filter:Od,find:Rd,findIndex:Ld,findKey:Pd,findLast:Bd,findLastIndex:Td,findLastKey:$d,first:Wd,flatMap:Fd,flatMapDeep:Hd,flatMapDepth:Vd,flatten:qa,flattenDeep:Kd,flattenDepth:Jd,flip:Yd,floor:Gd,flow:Zd,flowRight:Xd,forEach:od,forEachRight:ud,forIn:ep,forInRight:tp,forOwn:np,forOwnRight:rp,fromPairs:op,functions:ap,functionsIn:sp,get:Da,groupBy:cp,gt:fp,gte:hp,has:mp,hasIn:Gu,head:Wd,identity:Xr,inRange:_p,includes:kp,indexOf:Op,initial:Ap,intersection:Mp,intersectionBy:Np,intersectionWith:Ip,invert:Wp,invertBy:Hp,invoke:Kp,invokeMap:Yp,isArguments:Wi,isArray:Pr,isArrayBuffer:Qp,isArrayLike:ji,isArrayLikeObject:jc,isBoolean:Zp,isBuffer:Hi,isDate:ef,isElement:tf,isEmpty:rf,isEqual:of,isEqualWith:af,isError:ns,isFinite:lf,isFunction:eo,isInteger:uf,isLength:Ai,isMap:fu,isMatch:cf,isMatchWith:df,isNaN:ff,isNative:gf,isNil:vf,isNull:mf,isNumber:pf,isObject:Ur,isObjectLike:jr,isPlainObject:ts,isRegExp:bf,isSafeInteger:xf,isSet:gu,isString:xp,isSymbol:Lr,isTypedArray:Zi,isUndefined:wf,isWeakMap:Sf,isWeakSet:Ef,iteratee:kf,join:Of,kebabCase:jf,keyBy:Rf,keys:ia,keysIn:da,last:qc,lastIndexOf:Nf,lodash:Do,lowerCase:Tf,lowerFirst:Bf,lt:Wf,lte:Df,map:zd,mapKeys:zf,mapValues:Ff,matches:Uf,matchesProperty:Hf,max:qf,maxBy:Kf,mean:Gf,meanBy:Qf,memoize:Ra,merge:Xf,mergeWith:Ic,method:th,methodOf:rh,min:oh,minBy:ih,mixin:ah,multiply:sh,negate:lh,next:dh,noop:Lo,now:bc,nth:fh,nthArg:hh,omit:bh,omitBy:Sh,once:Eh,orderBy:Oh,over:jh,overArgs:Ph,overEvery:Nh,overSome:Ih,pad:ng,padEnd:rg,padStart:og,parseInt:sg,partial:ug,partialRight:dg,partition:fg,pick:gg,pickBy:wh,plant:vg,property:Xu,propertyOf:mg,pull:wg,pullAll:xg,pullAllBy:Sg,pullAllWith:Eg,pullAt:Ag,random:Ig,range:Wg,rangeRight:Dg,rearg:Fg,reduce:Hg,reduceRight:qg,reject:Kg,remove:Jg,repeat:Yg,replace:Gg,rest:Qg,result:Zg,reverse:ev,round:tv,sample:ov,sampleSize:lv,set:uv,setWith:cv,shuffle:fv,size:hv,slice:gv,snakeCase:mv,some:bv,sortBy:xv,sortedIndex:Cv,sortedIndexBy:Ov,sortedIndexOf:Av,sortedLastIndex:jv,sortedLastIndexBy:Lv,sortedLastIndexOf:Rv,sortedUniq:Pv,sortedUniqBy:Nv,split:Iv,spread:Bv,startCase:Wv,startsWith:Dv,stubArray:Ml,stubFalse:Di,stubObject:zv,stubString:Fv,stubTrue:Uv,subtract:Hv,sum:Vv,sumBy:qv,tail:Kv,take:Jv,takeRight:Yv,takeRightWhile:Gv,takeWhile:Qv,tap:Zv,template:hm,templateSettings:im,throttle:gm,thru:vm,times:bm,toArray:ch,toFinite:Gr,toInteger:Qr,toIterator:_m,toJSON:wm,toLength:Ed,toLower:Sm,toNumber:Jr,toPairs:pd,toPairsIn:fd,toPath:Em,toPlainObject:Rc,toSafeInteger:Cm,toString:Ta,toUpper:Om,transform:Am,trim:Rm,trimEnd:Mm,trimStart:Nm,truncate:Tm,unary:Bm,unescape:zm,union:Vm,unionBy:Km,unionWith:Jm,uniq:Ym,uniqBy:Gm,uniqWith:Qm,uniqueId:Xm,unset:ey,unzip:ny,unzipWith:ry,update:iy,updateWith:ay,upperCase:ly,upperFirst:Ls,value:wm,valueOf:wm,values:Sp,valuesIn:uy,without:dy,words:ll,wrap:py,wrapperAt:hy,wrapperChain:gy,wrapperCommit:ku,wrapperLodash:Do,wrapperNext:dh,wrapperPlant:vg,wrapperReverse:vy,wrapperToIterator:_m,wrapperValue:wm,xor:yy,xorBy:_y,xorWith:xy,zip:wy,zipObject:Ey,zipObjectDeep:ky,zipWith:Oy,default:Do})),Xy={};Object.defineProperty(Xy,"__esModule",{value:!0}),Xy.updateSessionMetadata=function(e,t){e.audioStartTime=e.audioStartTime||t.audioStartTime,e.audioEndTime=e.audioEndTime||t.audioEndTime,!e.waitTime&&e.audioStartTime&&e.audioEndTime&&(e.waitTime=e.audioEndTime-e.audioStartTime)},Xy.updateSessionValue=function(e,t,n){e.value=e.value||[],"checkbox"===t&&(n.selected?e.value=Array.from(new Set([...e.value,n.value])):e.value=e.value.filter(e=>e!==n.value));"radio"===t&&(n.selected?e.value=[n.value]:e.value=[]);e.selector=n.selector};const eb=e,tb=u,nb=l,rb=i,ob=c;var ib=y.exports;Object.defineProperty(m,"__esModule",{value:!0}),m.isComplete=m.default=void 0;var ab=ib(b.exports),sb=ib(S),lb=ib(eb),ub=tb,cb=Zy,db=ib(nb),pb=f,fb=ob,hb=rb,gb=Xy,vb=Rn;const mb=(0,db.default)("pie-ui:multiple-choice"),yb=(e,t,n,r)=>{const{autoplayAudioEnabled:o,completeAudioEnabled:i}=t||{};if(o&&i&&!n&&r){const e=r.querySelector("audio"),t=e&&e.closest(".preview-prompt");if(e&&t)return!1}if(!e||!e.value)return!1;const{choiceMode:a,minSelections:s=1,maxSelections:l}=t||{},u=e.value.length||0;return"radio"===a?!!u:!(u<s||(0,vb.exceedsMaxSelections)(u,l))};function bb(e){const t=function(e){const t=e.closest("pie-player")||e.closest("pie-item-player");if(!t)return{baseHeadingLevel:void 0,includeSrHeading:!0};const n=(e,n,r)=>{let o=t[e];var i;return null==o&&(o=null!=(i=t.getAttribute(n))?i:(()=>t.getAttribute(r))()),o},r=n("baseHeadingLevel","base-heading-level","baseheadinglevel"),o=parseInt(r,10),i=Number.isFinite(o)&&o>=1&&o<=6?o:void 0,a=n("includeSrHeading","include-sr-heading","includesrheading");return{baseHeadingLevel:i,includeSrHeading:null==a||!1!==a&&"false"!==a}}(e);return{baseHeadingLevel:void 0!==e._baseHeadingLevel?e._baseHeadingLevel:t.baseHeadingLevel,includeSrHeading:void 0!==e._includeSrHeading?e._includeSrHeading:t.includeSrHeading}}m.isComplete=yb;class _b extends HTMLElement{constructor(){super(),(0,ab.default)(this,"_scheduleMathRender",()=>{this._mathRenderPending||(this._mathRenderPending=!0,requestAnimationFrame(()=>{this._mathObserver&&this._mathObserver.disconnect(),mb("render complete - render math"),(0,fb.renderMath)(this),this._mathRenderPending=!1,setTimeout(()=>{this._mathObserver&&this._mathObserver.observe(this,{childList:!0,subtree:!0})},50)}))}),this._model=null,this._session=null,this._options=null,this.audioComplete=!1,this._boundHandleKeyDown=this.handleKeyDown.bind(this),this._keyboardEventsEnabled=!1,this._audioInitialized=!1,this._root=null,this._mathObserver=null,this._mathRenderPending=!1,this._rerender=(0,cb.debounce)(()=>{if(this._model&&this._session){var e=lb.default.createElement(sb.default,{model:this._model,session:this._session,options:this._options,onChoiceChanged:this._onChange.bind(this),onShowCorrectToggle:this.onShowCorrectToggle.bind(this),...bb(this)});this.setAttribute("aria-label","radio"===this._model.choiceMode?"Multiple Choice Question":"Multiple Correct Answer Question"),this.setAttribute("role","region"),this.setLangAttribute(),this._initMathObserver(),this._root||(this._root=(0,ub.createRoot)(this)),this._root.render(e),!0!==this._model.keyboardEventsEnabled||this._keyboardEventsEnabled||this.enableKeyboardEvents()}else mb("skip")},50,{leading:!1,trailing:!0}),this._dispatchResponseChanged=(0,cb.debounce)(()=>{this.dispatchEvent(new pb.SessionChangedEvent(this.tagName.toLowerCase(),yb(this._session,this._model,this.audioComplete,this)))}),this._dispatchModelSet=(0,cb.debounce)(()=>{this.dispatchEvent(new pb.ModelSetEvent(this.tagName.toLowerCase(),yb(this._session,this._model,this.audioComplete,this),void 0!==this._model))},50,{leading:!1,trailing:!0})}_initMathObserver(){this._mathObserver||(this._mathObserver=new MutationObserver(this._scheduleMathRender),this._mathObserver.observe(this,{childList:!0,subtree:!0}))}_disconnectMathObserver(){this._mathObserver&&(this._mathObserver.disconnect(),this._mathObserver=null)}onShowCorrectToggle(){(0,fb.renderMath)(this)}setLangAttribute(){const e=this._model&&(this._model.language,1)?this._model.language:"",t=e?e.slice(0,2):"en";this.setAttribute("lang",t)}set model(e){this._model=e,this._rerender(),this._audioInitialized=!1,this._dispatchModelSet()}get session(){return this._session}get options(){return this._options}set options(e){this._options=e,this._rerender()}set baseHeadingLevel(e){this._baseHeadingLevel=e,this._rerender()}set includeSrHeading(e){this._includeSrHeading=e,this._rerender()}set session(e){this._session=e,this._rerender(),this._dispatchResponseChanged()}_onChange(e){(0,gb.updateSessionValue)(this._session,this._model.choiceMode,e),this._dispatchResponseChanged(),this._rerender()}_createAudioInfoToast(){const e=document.createElement("div");e.id="play-audio-info",Object.assign(e.style,{position:"absolute",top:0,width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",background:"white",zIndex:"1000",cursor:"pointer"});const t=document.createElement("img");return t.src=hb.EnableAudioAutoplayImage,t.alt="Click anywhere to enable audio autoplay",t.width=500,t.height=300,e.appendChild(t),e}connectedCallback(){this._initMathObserver(),this._initPlayerObserver(),this._rerender();new MutationObserver((e,t)=>{e.forEach(e=>{if("childList"===e.type){if(this._audioInitialized)return;const e=this.querySelector("audio"),n=e&&e.closest(".preview-prompt");if(!this._model)return;if(!this._model.autoplayAudioEnabled)return;if(e&&!n)return;if(!e)return;const r=this._createAudioInfoToast(),o=this.querySelector("#main-container"),i=()=>{this.querySelector("#play-audio-info")&&(e.play(),o.removeChild(r)),document.removeEventListener("click",i)};setTimeout(()=>{e.paused&&!this.querySelector("#play-audio-info")?(o.appendChild(r),document.addEventListener("click",i)):document.removeEventListener("click",i)},500);const a=()=>{(0,gb.updateSessionMetadata)(this._session,{audioStartTime:(new Date).getTime()});const t=this.querySelector("#play-audio-info");t&&o.removeChild(t),e.removeEventListener("playing",a)};e.addEventListener("playing",a);const s=()=>{(0,gb.updateSessionMetadata)(this._session,{audioEndTime:(new Date).getTime()}),this.audioComplete=!0,this._dispatchResponseChanged(),e.removeEventListener("ended",s)};e.addEventListener("ended",s),this._audio=e,this._handlePlaying=a,this._handleEnded=s,this._enableAudio=i,this._audioInitialized=!0,t.disconnect()}})}).observe(this,{childList:!0,subtree:!0})}enableKeyboardEvents(){this._keyboardEventsEnabled||(window.addEventListener("keydown",this._boundHandleKeyDown),this._keyboardEventsEnabled=!0)}_initPlayerObserver(){const e=this.closest("pie-player")||this.closest("pie-item-player");e&&(this._playerObserver=new MutationObserver(()=>{this._rerender()}),this._playerObserver.observe(e,{attributes:!0,attributeFilter:["base-heading-level","baseheadinglevel","include-sr-heading","includesrheading"]}))}_disconnectPlayerObserver(){this._playerObserver&&(this._playerObserver.disconnect(),this._playerObserver=null)}disconnectedCallback(){this._disconnectMathObserver(),this._disconnectPlayerObserver(),this._keyboardEventsEnabled&&(window.removeEventListener("keydown",this._boundHandleKeyDown),this._keyboardEventsEnabled=!1),document.removeEventListener("click",this._enableAudio),this._audio&&(this._audio.removeEventListener("playing",this._handlePlaying),this._audio.removeEventListener("ended",this._handleEnded),this._audio=null),this._root&&(this._root.unmount(),this._root=null)}handleKeyDown(e){if(!this._model||!this._session)return;const{mode:t}=this._model;if("gather"!==t)return;const n=(e=>{const t=e>="1"&&e<="9"?e-"1":"0"===e?9:-1,n=/^[a-jA-J]$/.test(e)?e.toLowerCase().charCodeAt(0)-"a".charCodeAt(0):-1;return t>=0?t:n})(e.key);if(void 0===n||n<=-1||n>=function(e){let t,n=e[0],r=1;for(;r<e.length;){const o=e[r],i=e[r+1];if(r+=2,("optionalAccess"===o||"optionalCall"===o)&&null==n)return;"access"===o||"optionalAccess"===o?(t=n,n=i(n)):"call"!==o&&"optionalCall"!==o||(n=i((...e)=>n.call(t,...e)),t=void 0)}return n}([this,"access",e=>e._model,"access",e=>e.choices,"optionalAccess",e=>e.length]))return;const r=this._session.value||[],o=this._model.choices[n].value,i=r.includes(o),a={value:o,selected:"radio"===this._model.choiceMode||!i,selector:"Keyboard"};this._onChange(a)}}var xb=m.default=_b;const wb=l;const Sb=v.TYPE,Eb="ebsr-multiple-choice",kb=wb("pie-elements:ebsr");class Cb extends xb{}customElements.get(Eb)||customElements.define(Eb,Cb);const Ob=e=>Array.isArray(e)&&e.length>0,Ab=e=>{const t=Da(e,"value.partA.value"),n=Da(e,"value.partB.value");return Ob(t)&&Ob(n)};function jb(e){const t=e.closest("pie-player")||e.closest("pie-item-player");if(!t)return{baseHeadingLevel:void 0,includeSrHeading:!0};const n=(e,n,r)=>{let o=t[e];var i,a;return null==o&&(i=t.getAttribute(n),a=()=>t.getAttribute(r),o=null!=i?i:a()),o},r=n("baseHeadingLevel","base-heading-level","baseheadinglevel"),o=parseInt(r,10),i=Number.isFinite(o)&&o>=1&&o<=6?o:void 0,a=n("includeSrHeading","include-sr-heading","includesrheading");return{baseHeadingLevel:i,includeSrHeading:null==a||!1!==a&&"false"!==a}}class Lb extends HTMLElement{constructor(){super(),Lb.prototype.__init.call(this),this._model={},this._session={}}__init(){this.onSessionUpdated=e=>{if(e.target===this)return;e.preventDefault(),e.stopImmediatePropagation();const t=e.target.getAttribute("id");if(t){const n=`part${t.toUpperCase()}`;e.update&&(this._model[n]=e.update),this.dispatchSessionChanged(e.srcElement._session,n)}}}set model(e){this._model=e,customElements.whenDefined(Eb).then(()=>{this.setPartModel(this.partA,"partA"),this.setPartModel(this.partB,"partB")})}set session(e){this._session=e,customElements.whenDefined(Eb).then(()=>{this.setPartSession(this.partA,"partA"),this.setPartSession(this.partB,"partB")})}get session(){return this._session}setPartModel(e,t){if(this._model&&this._model[t]&&e){const{mode:n}=this._model;e.model={...this._model[t],mode:n,keyMode:this._model[t].choicePrefix};const{includeSrHeading:r,baseHeadingLevel:o}=jb(this);e.includeSrHeading=r,e.baseHeadingLevel=o}}setPartSession(e,t){if(this._session&&this._model&&e){const{value:n}=this._session;e.session=n&&n[t]?n[t]:{id:t}}}dispatchSessionChanged(e,t){this._session.value={...this._session.value,[t]:e},kb("[onSessionChanged] session: ",this._session);const n=Ab(this._session);this.dispatchEvent(new v(this.tagName.toLowerCase(),n))}get partA(){return this.querySelector(`${Eb}#a`)}get partB(){return this.querySelector(`${Eb}#b`)}connectedCallback(){this._render(),this._initPlayerObserver(),this.addEventListener(Sb,this.onSessionUpdated)}disconnectedCallback(){this._disconnectPlayerObserver(),this.removeEventListener(Sb,this.onSessionUpdated)}_initPlayerObserver(){const e=this.closest("pie-player")||this.closest("pie-item-player");e&&(this._playerObserver=new MutationObserver(()=>{this._render()}),this._playerObserver.observe(e,{attributes:!0,attributeFilter:["base-heading-level","baseheadinglevel","include-sr-heading","includesrheading"]}))}_disconnectPlayerObserver(){this._playerObserver&&(this._playerObserver.disconnect(),this._playerObserver=null)}_render(){this.ariaLabel="Two-Part Question",this.role="region";const{baseHeadingLevel:e,includeSrHeading:t}=jb(this),n=e?`h${Math.min(6,e)}`:"h2",r=t?`<${n} class="srOnly">Two-Part Question</${n}>`:"";this.innerHTML=`\n <style>\n .srOnly {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n left: -10000px;\n top: auto;\n }\n ${function(e){let t,n=e[0],r=1;for(;r<e.length;){const o=e[r],i=e[r+1];if(r+=2,("optionalAccess"===o||"optionalCall"===o)&&null==n)return;"access"===o||"optionalAccess"===o?(t=n,n=i(n)):"call"!==o&&"optionalCall"!==o||(n=i((...e)=>n.call(t,...e)),t=void 0)}return n}([this,"access",e=>e._model,"optionalAccess",e=>e.extraCSSRules,"optionalAccess",e=>e.rules])}\n </style>\n ${r}\n <${Eb} id="a"></${Eb}>\n <${Eb} id="b"></${Eb}>\n `,customElements.get(Eb)&&(this.setPartModel(this.partA,"partA"),this.setPartModel(this.partB,"partB"),this.setPartSession(this.partA,"partA"),this.setPartSession(this.partB,"partB"))}}export{Lb as default,Ab as isSessionComplete};