@pie-element/ebsr 14.2.0-next.19 → 14.2.0-next.28
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/configure/package.json +1 -1
- package/module/configure.js +1 -1
- package/module/element.js +1 -1
- package/module/manifest.json +2 -2
- package/module/print.js +1 -1
- package/package.json +3 -3
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.1/module/index.js";import{_dll_pie_lib__math_rendering as c}from"../../../@pie-lib/math-rendering-module@^5.0.6/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,P=e=>e&&e.indexOf("###")>-1?e.replace(R,"."):e,M=e=>!e||A(e),N=(e,t,n)=>{const r=A(t)?t.split("."):t;let o=0;for(;o<r.length-1;){if(M(e))return{};const t=P(r[o]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++o}return M(e)?{}:{obj:e,k:P(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={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};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,Pe=t;var Me="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?Me:Ne,r.state={status:o},r.nextCallback=null,r}Ce(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===Me?{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:Pe.findDOMNode(this);n&&Le(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Ne&&this.setState({status:Me})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,o=this.props.nodeRef?[r]:[Pe.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:Pe.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:Pe.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===Me)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=Me,$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()})`}}),Pt=(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 Mt 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(Pt,{ref:this.nodeRef},t))))}}(0,St.default)(Mt,"propTypes",{correctness:At.default.string}),we.default=Mt;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()),...e?{}:{"&:hover":{color:`${Zt.color.primaryLight()} !important`}},..."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.focusUncheckedBorder()}`,backgroundColor:Zt.color.focusUnchecked()},focusVisibleChecked:{outline:`2px solid ${Zt.color.focusCheckedBorder()}`,backgroundColor:Zt.color.focusChecked()}}},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")]},"&.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-checked":t.focusVisibleChecked}}}),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,P="horizontal"===c,M="initial"!==A?A:"initial";return wn.default.createElement("div",{className:x,key:t,style:{backgroundColor:M,...L},onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave},wn.default.createElement(On,{component:"div",noBorder:R,horizontalLayout:P},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;const jn=e,Ln=r,Rn=s,Pn=a,Mn=o,{Box:Nn}=n,In=i;var Tn=y.exports;Object.defineProperty(k,"__esModule",{value:!0}),k.default=k.MultipleChoice=void 0;var Bn=Tn(b.exports),$n=Tn(jn),Wn=Tn(Ln),Dn=Tn(Rn),zn=Tn(Pn),Fn=Mn,Un=Tn(Nn),Hn=In,Vn=Tn(be),qn=Tn(_e);const{translator:Kn}=Vn.default,Jn=(0,Fn.styled)(Un.default)({color:Hn.color.text(),backgroundColor:Hn.color.background(),"& *":{"-webkit-font-smoothing":"antialiased"},position:"relative","& legend":{border:"none !important"}}),Yn=(0,Fn.styled)("h2")(({theme:e})=>({display:"block",fontSize:"inherit",margin:"0",fontWeight:"normal",paddingBottom:e.spacing(2)})),Gn=(0,Fn.styled)(Un.default)(({theme:e})=>({marginBottom:e.spacing(2)})),Qn=(0,Fn.styled)(Un.default)({display:"flex",flexDirection:"row",flexWrap:"wrap"}),Zn=(0,Fn.styled)(Un.default)({display:"grid"}),Xn=(0,Fn.styled)("fieldset")({border:"0px",padding:"0.01em 0 0 0",margin:"0px",minWidth:"0px"}),er=(0,Fn.styled)("h3")({position:"absolute",left:"-10000px",top:"auto",width:"1px",height:"1px",overflow:"hidden"}),tr=(0,Fn.styled)("div")(({theme:e})=>({fontSize:e.typography.fontSize-2,color:e.palette.error.main,paddingTop:e.spacing(1)}));class nr extends $n.default.Component{constructor(e){super(e),(0,Bn.default)(this,"handleChange",e=>{const{value:t,checked:n}=e.target,{maxSelections:r,onChoiceChanged:o,session:i}=this.props;i.value&&i.value.length>=r&&(this.setState({maxSelectionsErrorState:n}),n)||o({value:t,selected:n,selector:"Mouse"})}),(0,Bn.default)(this,"onToggle",()=>{"evaluate"===this.props.mode&&this.setState({showCorrect:!this.state.showCorrect},()=>{this.props.onShowCorrectToggle&&this.props.onShowCorrectToggle()})}),(0,Bn.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=er.withComponent(`h${i}`),s="radio"===t?"Multiple Choice Question":"Multiple Select Question";return $n.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=$n.default.createElement(Hn.PreviewPrompt,{tagName:"div",className:"prompt",defaultClassName:"teacher-instructions",prompt:u}),j="grid"===this.props.choicesLayout?Zn:"horizontal"===this.props.choicesLayout?Qn:Un.default;return $n.default.createElement(Jn,{id:"main-container",className:(0,zn.default)(n,"multiple-choice")},a&&$n.default.createElement(Yn,{as:_?`h${Math.min(6,_+1)}`:"h2"},a),this.renderHeading(),u&&$n.default.createElement(Gn,null,d?A:$n.default.createElement(Hn.Collapsible,{labels:{hidden:"Show Teacher Instructions",visible:"Hide Teacher Instructions"}},A)),$n.default.createElement(Xn,{role:"radio"===o?"radiogroup":"group"},$n.default.createElement(Hn.PreviewPrompt,{className:"prompt",defaultClassName:"prompt",prompt:(L=s,L&&O?(0,Hn.transformDataHeadings)(L,O):L),tagName:"legend",autoplayAudioEnabled:v,customAudioButton:y}),!(b&&c)&&$n.default.createElement(Dn.default,{show:E,toggled:x,onToggle:this.onToggle.bind(this),language:p}),$n.default.createElement(j,{style:k},r.map((e,n)=>$n.default.createElement(qn.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&&$n.default.createElement(tr,null,h&&g?h===g?Kn.t("translation:multipleChoice:minmaxSelections_equal",{lng:p,minSelections:h}):Kn.t("translation:multipleChoice:minmaxSelections_range",{lng:p,minSelections:h,maxSelections:g}):h?Kn.t("translation:multipleChoice:minSelections",{lng:p,minSelections:h}):""),"checkbox"===o&&w&&$n.default.createElement(tr,null,Kn.t("translation:multipleChoice:maxSelections_"+(1===g?"one":"other"),{lng:p,maxSelections:g})));var L}}k.MultipleChoice=nr,(0,Bn.default)(nr,"propTypes",{className:Wn.default.string,mode:Wn.default.oneOf(["gather","view","evaluate"]),choiceMode:Wn.default.oneOf(["radio","checkbox"]),keyMode:Wn.default.oneOf(["numbers","letters","none"]),choices:Wn.default.array,partLabel:Wn.default.string,prompt:Wn.default.string,teacherInstructions:Wn.default.string,session:Wn.default.object,disabled:Wn.default.bool,onChoiceChanged:Wn.default.func,responseCorrect:Wn.default.bool,correctResponse:Wn.default.array,choicesLayout:Wn.default.oneOf(["vertical","grid","horizontal"]),gridColumns:Wn.default.string,alwaysShowCorrect:Wn.default.bool,animationsDisabled:Wn.default.bool,language:Wn.default.string,selectedAnswerBackgroundColor:Wn.default.string,selectedAnswerStrokeColor:Wn.default.string,selectedAnswerStrokeWidth:Wn.default.string,hoverAnswerBackgroundColor:Wn.default.string,hoverAnswerStrokeColor:Wn.default.string,hoverAnswerStrokeWidth:Wn.default.string,onShowCorrectToggle:Wn.default.func,isSelectionButtonBelow:Wn.default.bool,minSelections:Wn.default.number,maxSelections:Wn.default.number,autoplayAudioEnabled:Wn.default.bool,customAudioButton:{playImage:Wn.default.string,pauseImage:Wn.default.string},options:Wn.default.object,baseHeadingLevel:Wn.default.number,includeSrHeading:Wn.default.bool}),nr.defaultProps={session:{value:[]}},k.default=nr;const rr=e,or=r,ir=i;var ar=y.exports;Object.defineProperty(S,"__esModule",{value:!0}),S.default=void 0;var sr=ar(E.exports),lr=ar(b.exports),ur=ar(rr),cr=ar(or),dr=ir,pr=ar(k);class fr extends ur.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 ur.default.createElement(dr.PreviewLayout,{extraCSSRules:s,fontSizeFactor:l,classes:{}},ur.default.createElement(pr.default,(0,sr.default)({},e,{options:o,session:n,onChoiceChanged:t,onShowCorrectToggle:r,baseHeadingLevel:i,includeSrHeading:a})))}}(0,lr.default)(fr,"propTypes",{model:cr.default.object,session:cr.default.object,options:cr.default.object,onChoiceChanged:cr.default.func,onShowCorrectToggle:cr.default.func,extraCSSRules:cr.default.shape({names:cr.default.arrayOf(cr.default.string),rules:cr.default.string}),baseHeadingLevel:cr.default.number,includeSrHeading:cr.default.bool}),(0,lr.default)(fr,"defaultProps",{model:{},session:{}}),S.default=fr;var hr="object"==typeof global&&global&&global.Object===Object&&global,gr="object"==typeof self&&self&&self.Object===Object&&self,vr=hr||gr||Function("return this")(),mr=vr.Symbol,yr=Object.prototype,br=yr.hasOwnProperty,_r=yr.toString,xr=mr?mr.toStringTag:void 0;var wr=Object.prototype.toString;var Sr=mr?mr.toStringTag:void 0;function Er(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Sr&&Sr in Object(e)?function(e){var t=br.call(e,xr),n=e[xr];try{e[xr]=void 0;var r=!0}catch(e){}var o=_r.call(e);return r&&(t?e[xr]=n:delete e[xr]),o}(e):function(e){return wr.call(e)}(e)}function kr(e){return null!=e&&"object"==typeof e}function Cr(e){return"symbol"==typeof e||kr(e)&&"[object Symbol]"==Er(e)}function Or(e){return"number"==typeof e?e:Cr(e)?NaN:+e}function Ar(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 jr=Array.isArray,Lr=mr?mr.prototype:void 0,Rr=Lr?Lr.toString:void 0;function Pr(e){if("string"==typeof e)return e;if(jr(e))return Ar(e,Pr)+"";if(Cr(e))return Rr?Rr.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Mr(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=Pr(n),r=Pr(r)):(n=Or(n),r=Or(r)),o=e(n,r)}return o}}var Nr=Mr(function(e,t){return e+t},0),Ir=/\s/;function Tr(e){for(var t=e.length;t--&&Ir.test(e.charAt(t)););return t}var Br=/^\s+/;function $r(e){return e?e.slice(0,Tr(e)+1).replace(Br,""):e}function Wr(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}var Dr=/^[-+]0x[0-9a-f]+$/i,zr=/^0b[01]+$/i,Fr=/^0o[0-7]+$/i,Ur=parseInt;function Hr(e){if("number"==typeof e)return e;if(Cr(e))return NaN;if(Wr(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Wr(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=$r(e);var n=zr.test(e);return n||Fr.test(e)?Ur(e.slice(2),n?2:8):Dr.test(e)?NaN:+e}var Vr=1/0;function qr(e){return e?(e=Hr(e))===Vr||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function Kr(e){var t=qr(e),n=t%1;return t==t?n?t-n:t:0}function Jr(e,t){if("function"!=typeof t)throw new TypeError("Expected a function");return e=Kr(e),function(){if(--e<1)return t.apply(this,arguments)}}function Yr(e){return e}function Gr(e){if(!Wr(e))return!1;var t=Er(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}var Qr,Zr=vr["__core-js_shared__"],Xr=(Qr=/[^.]+$/.exec(Zr&&Zr.keys&&Zr.keys.IE_PROTO||""))?"Symbol(src)_1."+Qr:"";var eo=Function.prototype.toString;function to(e){if(null!=e){try{return eo.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var no=/^\[object .+?Constructor\]$/,ro=Function.prototype,oo=Object.prototype,io=ro.toString,ao=oo.hasOwnProperty,so=RegExp("^"+io.call(ao).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function lo(e){return!(!Wr(e)||function(e){return!!Xr&&Xr in e}(e))&&(Gr(e)?so:no).test(to(e))}function uo(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return lo(n)?n:void 0}var co=uo(vr,"WeakMap"),po=co&&new co,fo=po?function(e,t){return po.set(e,t),e}:Yr,ho=fo,go=Object.create,vo=function(){function e(){}return function(t){if(!Wr(t))return{};if(go)return go(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}(),mo=vo;function yo(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=mo(e.prototype),r=e.apply(n,t);return Wr(r)?r:n}}function bo(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 _o=Math.max;function xo(e,t,n,r){for(var o=-1,i=e.length,a=n.length,s=-1,l=t.length,u=_o(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 wo=Math.max;function So(e,t,n,r){for(var o=-1,i=e.length,a=-1,s=n.length,l=-1,u=t.length,c=wo(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 Eo(){}function ko(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function Co(){}ko.prototype=mo(Eo.prototype),ko.prototype.constructor=ko;var Oo=po?function(e){return po.get(e)}:Co,Ao=Oo,jo={},Lo=Object.prototype.hasOwnProperty;function Ro(e){for(var t=e.name+"",n=jo[t],r=Lo.call(jo,t)?n.length:0;r--;){var o=n[r],i=o.func;if(null==i||i==e)return o.name}return t}function Po(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}function Mo(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}function No(e){if(e instanceof ko)return e.clone();var t=new Po(e.__wrapped__,e.__chain__);return t.__actions__=Mo(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}Po.prototype=mo(Eo.prototype),Po.prototype.constructor=Po;var Io=Object.prototype.hasOwnProperty;function To(e){if(kr(e)&&!jr(e)&&!(e instanceof ko)){if(e instanceof Po)return e;if(Io.call(e,"__wrapped__"))return No(e)}return new Po(e)}function Bo(e){var t=Ro(e),n=To[t];if("function"!=typeof n||!(t in ko.prototype))return!1;if(e===n)return!0;var r=Ao(n);return!!r&&e===r[0]}To.prototype=Eo.prototype,To.prototype.constructor=To;var $o=Date.now;function Wo(e){var t=0,n=0;return function(){var r=$o(),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 Do=Wo(ho),zo=/\{\n\/\* \[wrapped with (.+)\] \*/,Fo=/,? & /;var Uo=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;function Ho(e){return function(){return e}}var Vo=function(){try{var e=uo(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),qo=Vo,Ko=qo?function(e,t){return qo(e,"toString",{configurable:!0,enumerable:!1,value:Ho(t),writable:!0})}:Yr,Jo=Wo(Ko);function Yo(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function Go(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 Qo(e){return e!=e}function Zo(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):Go(e,Qo,n)}function Xo(e,t){return!!(null==e?0:e.length)&&Zo(e,t,0)>-1}var ei=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]];function ti(e,t,n){var r=t+"";return Jo(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(Uo,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return Yo(ei,function(n){var r="_."+n[0];t&n[1]&&!Xo(e,r)&&e.push(r)}),e.sort()}(function(e){var t=e.match(zo);return t?t[1].split(Fo):[]}(r),n)))}function ni(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 Bo(e)&&Do(p,d),p.placeholder=r,ti(p,e,t)}function ri(e){return e.placeholder}var oi=/^(?:0|[1-9]\d*)$/;function ii(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&oi.test(e))&&e>-1&&e%1==0&&e<t}var ai=Math.min;var si="__lodash_placeholder__";function li(e,t){for(var n=-1,r=e.length,o=0,i=[];++n<r;){var a=e[n];a!==t&&a!==si||(e[n]=si,i[o++]=n)}return i}function ui(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:yo(e);return function v(){for(var m=arguments.length,y=Array(m),b=m;b--;)y[b]=arguments[b];if(f)var _=ri(v),x=function(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}(y,_);if(r&&(y=xo(y,r,o,f)),i&&(y=So(y,i,a,f)),m-=x,f&&m<u){var w=li(y,_);return ni(e,t,ui,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=ai(t.length,n),o=Mo(e);r--;){var i=t[r];e[r]=ii(i,n)?o[i]:void 0}return e}(y,s):h&&m>1&&y.reverse(),c&&l<m&&(y.length=l),this&&this!==vr&&this instanceof v&&(E=g||yo(E)),E.apply(S,y)}}var ci="__lodash_placeholder__",di=128,pi=Math.min;var fi=Math.max;function hi(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:fi(Kr(a),0),s=void 0===s?s:Kr(s),u-=o?o.length:0,64&t){var c=r,d=o;r=o=void 0}var p=l?void 0:Ao(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==di&&8==n||r==di&&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?xo(l,s,t[4]):s,e[4]=l?li(e[3],ci):t[4]}(s=t[5])&&(l=e[5],e[5]=l?So(l,s,t[6]):s,e[6]=l?li(e[5],ci):t[6]),(s=t[7])&&(e[7]=s),r&di&&(e[8]=null==e[8]?t[8]:pi(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:fi(f[9]-u,0))&&24&t&&(t&=-25),t&&1!=t)h=8==t||16==t?function(e,t,n){var r=yo(e);return function o(){for(var i=arguments.length,a=Array(i),s=i,l=ri(o);s--;)a[s]=arguments[s];var u=i<3&&a[0]!==l&&a[i-1]!==l?[]:li(a,l);return(i-=u.length)<n?ni(e,t,ui,o.placeholder,void 0,a,u,void 0,void 0,n-i):bo(this&&this!==vr&&this instanceof o?r:e,this,a)}}(e,t,s):32!=t&&33!=t||o.length?ui.apply(void 0,f):function(e,t,n,r){var o=1&t,i=yo(e);return function t(){for(var a=-1,s=arguments.length,l=-1,u=r.length,c=Array(u+s),d=this&&this!==vr&&this instanceof t?i:e;++l<u;)c[l]=r[l];for(;s--;)c[l++]=arguments[++a];return bo(d,o?n:this,c)}}(e,t,n,r);else var h=function(e,t,n){var r=1&t,o=yo(e);return function t(){return(this&&this!==vr&&this instanceof t?o:e).apply(r?n:this,arguments)}}(e,t,n);return ti((p?ho:Do)(h,f),e,t)}function gi(e,t,n){return t=n?void 0:t,hi(e,128,void 0,void 0,void 0,void 0,t=e&&null==t?e.length:t)}function vi(e,t,n){"__proto__"==t&&qo?qo(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function mi(e,t){return e===t||e!=e&&t!=t}var yi=Object.prototype.hasOwnProperty;function bi(e,t,n){var r=e[t];yi.call(e,t)&&mi(r,n)&&(void 0!==n||t in e)||vi(e,t,n)}function _i(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?vi(n,s,l):bi(n,s,l)}return n}var xi=Math.max;function wi(e,t,n){return t=xi(void 0===t?e.length-1:t,0),function(){for(var r=arguments,o=-1,i=xi(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),bo(e,this,s)}}function Si(e,t){return Jo(wi(e,t,Yr),e+"")}function Ei(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}function ki(e){return null!=e&&Ei(e.length)&&!Gr(e)}function Ci(e,t,n){if(!Wr(n))return!1;var r=typeof t;return!!("number"==r?ki(n)&&ii(t,n.length):"string"==r&&t in n)&&mi(n[t],e)}function Oi(e){return Si(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&&Ci(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 Ai=Object.prototype;function ji(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Ai)}function Li(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Ri(e){return kr(e)&&"[object Arguments]"==Er(e)}var Pi=Object.prototype,Mi=Pi.hasOwnProperty,Ni=Pi.propertyIsEnumerable,Ii=Ri(function(){return arguments}())?Ri:function(e){return kr(e)&&Mi.call(e,"callee")&&!Ni.call(e,"callee")};function Ti(){return!1}var Bi="object"==typeof exports&&exports&&!exports.nodeType&&exports,$i=Bi&&"object"==typeof module&&module&&!module.nodeType&&module,Wi=$i&&$i.exports===Bi?vr.Buffer:void 0,Di=(Wi?Wi.isBuffer:void 0)||Ti,zi={};function Fi(e){return function(t){return e(t)}}zi["[object Float32Array]"]=zi["[object Float64Array]"]=zi["[object Int8Array]"]=zi["[object Int16Array]"]=zi["[object Int32Array]"]=zi["[object Uint8Array]"]=zi["[object Uint8ClampedArray]"]=zi["[object Uint16Array]"]=zi["[object Uint32Array]"]=!0,zi["[object Arguments]"]=zi["[object Array]"]=zi["[object ArrayBuffer]"]=zi["[object Boolean]"]=zi["[object DataView]"]=zi["[object Date]"]=zi["[object Error]"]=zi["[object Function]"]=zi["[object Map]"]=zi["[object Number]"]=zi["[object Object]"]=zi["[object RegExp]"]=zi["[object Set]"]=zi["[object String]"]=zi["[object WeakMap]"]=!1;var Ui="object"==typeof exports&&exports&&!exports.nodeType&&exports,Hi=Ui&&"object"==typeof module&&module&&!module.nodeType&&module,Vi=Hi&&Hi.exports===Ui&&hr.process,qi=function(){try{var e=Hi&&Hi.require&&Hi.require("util").types;return e||Vi&&Vi.binding&&Vi.binding("util")}catch(e){}}(),Ki=qi&&qi.isTypedArray,Ji=Ki?Fi(Ki):function(e){return kr(e)&&Ei(e.length)&&!!zi[Er(e)]},Yi=Object.prototype.hasOwnProperty;function Gi(e,t){var n=jr(e),r=!n&&Ii(e),o=!n&&!r&&Di(e),i=!n&&!r&&!o&&Ji(e),a=n||r||o||i,s=a?Li(e.length,String):[],l=s.length;for(var u in e)!t&&!Yi.call(e,u)||a&&("length"==u||o&&("offset"==u||"parent"==u)||i&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||ii(u,l))||s.push(u);return s}function Qi(e,t){return function(n){return e(t(n))}}var Zi=Qi(Object.keys,Object),Xi=Object.prototype.hasOwnProperty;function ea(e){if(!ji(e))return Zi(e);var t=[];for(var n in Object(e))Xi.call(e,n)&&"constructor"!=n&&t.push(n);return t}function ta(e){return ki(e)?Gi(e):ea(e)}var na=Object.prototype.hasOwnProperty,ra=Oi(function(e,t){if(ji(t)||ki(t))_i(t,ta(t),e);else for(var n in t)na.call(t,n)&&bi(e,n,t[n])}),oa=ra;var ia=Object.prototype.hasOwnProperty;function aa(e){if(!Wr(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=ji(e),n=[];for(var r in e)("constructor"!=r||!t&&ia.call(e,r))&&n.push(r);return n}function sa(e){return ki(e)?Gi(e,!0):aa(e)}var la=Oi(function(e,t){_i(t,sa(t),e)}),ua=la,ca=Oi(function(e,t,n,r){_i(t,sa(t),e,r)}),da=ca,pa=Oi(function(e,t,n,r){_i(t,ta(t),e,r)}),fa=pa,ha=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ga=/^\w*$/;function va(e,t){if(jr(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!Cr(e))||(ga.test(e)||!ha.test(e)||null!=t&&e in Object(t))}var ma=uo(Object,"create");var ya=Object.prototype.hasOwnProperty;var ba=Object.prototype.hasOwnProperty;function _a(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 xa(e,t){for(var n=e.length;n--;)if(mi(e[n][0],t))return n;return-1}_a.prototype.clear=function(){this.__data__=ma?ma(null):{},this.size=0},_a.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},_a.prototype.get=function(e){var t=this.__data__;if(ma){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return ya.call(t,e)?t[e]:void 0},_a.prototype.has=function(e){var t=this.__data__;return ma?void 0!==t[e]:ba.call(t,e)},_a.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=ma&&void 0===t?"__lodash_hash_undefined__":t,this};var wa=Array.prototype.splice;function Sa(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])}}Sa.prototype.clear=function(){this.__data__=[],this.size=0},Sa.prototype.delete=function(e){var t=this.__data__,n=xa(t,e);return!(n<0)&&(n==t.length-1?t.pop():wa.call(t,n,1),--this.size,!0)},Sa.prototype.get=function(e){var t=this.__data__,n=xa(t,e);return n<0?void 0:t[n][1]},Sa.prototype.has=function(e){return xa(this.__data__,e)>-1},Sa.prototype.set=function(e,t){var n=this.__data__,r=xa(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};var Ea=uo(vr,"Map");function ka(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 Ca(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])}}Ca.prototype.clear=function(){this.size=0,this.__data__={hash:new _a,map:new(Ea||Sa),string:new _a}},Ca.prototype.delete=function(e){var t=ka(this,e).delete(e);return this.size-=t?1:0,t},Ca.prototype.get=function(e){return ka(this,e).get(e)},Ca.prototype.has=function(e){return ka(this,e).has(e)},Ca.prototype.set=function(e,t){var n=ka(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};function Oa(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(Oa.Cache||Ca),n}Oa.Cache=Ca;var Aa=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ja=/\\(\\)?/g,La=function(e){var t=Oa(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(Aa,function(e,n,r,o){t.push(r?o.replace(ja,"$1"):n||e)}),t}),Ra=La;function Pa(e){return null==e?"":Pr(e)}function Ma(e,t){return jr(e)?e:va(e,t)?[e]:Ra(Pa(e))}function Na(e){if("string"==typeof e||Cr(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Ia(e,t){for(var n=0,r=(t=Ma(t,e)).length;null!=e&&n<r;)e=e[Na(t[n++])];return n&&n==r?e:void 0}function Ta(e,t,n){var r=null==e?void 0:Ia(e,t);return void 0===r?n:r}function Ba(e,t){for(var n=-1,r=t.length,o=Array(r),i=null==e;++n<r;)o[n]=i?void 0:Ta(e,t[n]);return o}function $a(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}var Wa=mr?mr.isConcatSpreadable:void 0;function Da(e){return jr(e)||Ii(e)||!!(Wa&&e&&e[Wa])}function za(e,t,n,r,o){var i=-1,a=e.length;for(n||(n=Da),o||(o=[]);++i<a;){var s=e[i];t>0&&n(s)?t>1?za(s,t-1,n,r,o):$a(o,s):r||(o[o.length]=s)}return o}function Fa(e){return(null==e?0:e.length)?za(e,1):[]}function Ua(e){return Jo(wi(e,void 0,Fa),e+"")}var Ha=Ua(Ba),Va=Qi(Object.getPrototypeOf,Object),qa=Function.prototype,Ka=Object.prototype,Ja=qa.toString,Ya=Ka.hasOwnProperty,Ga=Ja.call(Object);function Qa(e){if(!kr(e)||"[object Object]"!=Er(e))return!1;var t=Va(e);if(null===t)return!0;var n=Ya.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Ja.call(n)==Ga}function Za(e){if(!kr(e))return!1;var t=Er(e);return"[object Error]"==t||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!Qa(e)}var Xa=Si(function(e,t){try{return bo(e,void 0,t)}catch(e){return Za(e)?e:new Error(e)}}),es=Xa;function ts(e,t){var n;if("function"!=typeof t)throw new TypeError("Expected a function");return e=Kr(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=void 0),n}}var ns=Si(function(e,t,n){var r=1;if(n.length){var o=li(n,ri(ns));r|=32}return hi(e,r,t,n,o)});ns.placeholder={};var rs=ns,os=Ua(function(e,t){return Yo(t,function(t){t=Na(t),vi(e,t,rs(e[t],e))}),e}),is=os,as=Si(function(e,t,n){var r=3;if(n.length){var o=li(n,ri(as));r|=32}return hi(t,r,e,n,o)});as.placeholder={};var ss=as;function ls(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 us(e,t,n){var r=e.length;return n=void 0===n?r:n,!t&&n>=r?e:ls(e,t,n)}var cs=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");function ds(e){return cs.test(e)}var ps="\\ud800-\\udfff",fs="["+ps+"]",hs="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",gs="\\ud83c[\\udffb-\\udfff]",vs="[^"+ps+"]",ms="(?:\\ud83c[\\udde6-\\uddff]){2}",ys="[\\ud800-\\udbff][\\udc00-\\udfff]",bs="(?:"+hs+"|"+gs+")"+"?",_s="[\\ufe0e\\ufe0f]?",xs=_s+bs+("(?:\\u200d(?:"+[vs,ms,ys].join("|")+")"+_s+bs+")*"),ws="(?:"+[vs+hs+"?",hs,ms,ys,fs].join("|")+")",Ss=RegExp(gs+"(?="+gs+")|"+ws+xs,"g");function Es(e){return ds(e)?function(e){return e.match(Ss)||[]}(e):function(e){return e.split("")}(e)}function ks(e){return function(t){var n=ds(t=Pa(t))?Es(t):void 0,r=n?n[0]:t.charAt(0),o=n?us(n,1).join(""):t.slice(1);return r[e]()+o}}var Cs=ks("toUpperCase");function Os(e){return Cs(Pa(e).toLowerCase())}function As(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 js(e){return function(t){return null==e?void 0:e[t]}}var Ls=js({"À":"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"}),Rs=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ps=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");function Ms(e){return(e=Pa(e))&&e.replace(Rs,Ls).replace(Ps,"")}var Ns=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;var Is=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;var Ts="\\ud800-\\udfff",Bs="\\u2700-\\u27bf",$s="a-z\\xdf-\\xf6\\xf8-\\xff",Ws="A-Z\\xc0-\\xd6\\xd8-\\xde",Ds="\\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",zs="["+Ds+"]",Fs="\\d+",Us="["+Bs+"]",Hs="["+$s+"]",Vs="[^"+Ts+Ds+Fs+Bs+$s+Ws+"]",qs="(?:\\ud83c[\\udde6-\\uddff]){2}",Ks="[\\ud800-\\udbff][\\udc00-\\udfff]",Js="["+Ws+"]",Ys="(?:"+Hs+"|"+Vs+")",Gs="(?:"+Js+"|"+Vs+")",Qs="(?:['’](?:d|ll|m|re|s|t|ve))?",Zs="(?:['’](?:D|LL|M|RE|S|T|VE))?",Xs="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",el="[\\ufe0e\\ufe0f]?",tl=el+Xs+("(?:\\u200d(?:"+["[^"+Ts+"]",qs,Ks].join("|")+")"+el+Xs+")*"),nl="(?:"+[Us,qs,Ks].join("|")+")"+tl,rl=RegExp([Js+"?"+Hs+"+"+Qs+"(?="+[zs,Js,"$"].join("|")+")",Gs+"+"+Zs+"(?="+[zs,Js+Ys,"$"].join("|")+")",Js+"?"+Ys+"+"+Qs,Js+"+"+Zs,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Fs,nl].join("|"),"g");function ol(e,t,n){return e=Pa(e),void 0===(t=n?void 0:t)?function(e){return Is.test(e)}(e)?function(e){return e.match(rl)||[]}(e):function(e){return e.match(Ns)||[]}(e):e.match(t)||[]}var il=RegExp("['’]","g");function al(e){return function(t){return As(ol(Ms(t).replace(il,"")),e,"")}}var sl=al(function(e,t,n){return t=t.toLowerCase(),e+(n?Os(t):t)}),ll=sl;function ul(){if(!arguments.length)return[];var e=arguments[0];return jr(e)?e:[e]}var cl=vr.isFinite,dl=Math.min;function pl(e){var t=Math[e];return function(e,n){if(e=Hr(e),(n=null==n?0:dl(Kr(n),292))&&cl(e)){var r=(Pa(e)+"e").split("e");return+((r=(Pa(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var fl=pl("ceil");function hl(e){var t=To(e);return t.__chain__=!0,t}var gl=Math.ceil,vl=Math.max;function ml(e,t,n){t=(n?Ci(e,t,n):void 0===t)?1:vl(Kr(t),0);var r=null==e?0:e.length;if(!r||t<1)return[];for(var o=0,i=0,a=Array(gl(r/t));o<r;)a[i++]=ls(e,o,o+=t);return a}function yl(e,t,n){return e==e&&(void 0!==n&&(e=e<=n?e:n),void 0!==t&&(e=e>=t?e:t)),e}function bl(e,t,n){return void 0===n&&(n=t,t=void 0),void 0!==n&&(n=(n=Hr(n))==n?n:0),void 0!==t&&(t=(t=Hr(t))==t?t:0),yl(Hr(e),t,n)}function _l(e){var t=this.__data__=new Sa(e);this.size=t.size}function xl(e,t){return e&&_i(t,ta(t),e)}_l.prototype.clear=function(){this.__data__=new Sa,this.size=0},_l.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},_l.prototype.get=function(e){return this.__data__.get(e)},_l.prototype.has=function(e){return this.__data__.has(e)},_l.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Sa){var r=n.__data__;if(!Ea||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Ca(r)}return n.set(e,t),this.size=n.size,this};var wl="object"==typeof exports&&exports&&!exports.nodeType&&exports,Sl=wl&&"object"==typeof module&&module&&!module.nodeType&&module,El=Sl&&Sl.exports===wl?vr.Buffer:void 0,kl=El?El.allocUnsafe:void 0;function Cl(e,t){if(t)return e.slice();var n=e.length,r=kl?kl(n):new e.constructor(n);return e.copy(r),r}function Ol(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 Al(){return[]}var jl=Object.prototype.propertyIsEnumerable,Ll=Object.getOwnPropertySymbols,Rl=Ll?function(e){return null==e?[]:(e=Object(e),Ol(Ll(e),function(t){return jl.call(e,t)}))}:Al,Pl=Rl;var Ml=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)$a(t,Pl(e)),e=Va(e);return t}:Al,Nl=Ml;function Il(e,t,n){var r=t(e);return jr(e)?r:$a(r,n(e))}function Tl(e){return Il(e,ta,Pl)}function Bl(e){return Il(e,sa,Nl)}var $l=uo(vr,"DataView"),Wl=uo(vr,"Promise"),Dl=uo(vr,"Set"),zl="[object Map]",Fl="[object Promise]",Ul="[object Set]",Hl="[object WeakMap]",Vl="[object DataView]",ql=to($l),Kl=to(Ea),Jl=to(Wl),Yl=to(Dl),Gl=to(co),Ql=Er;($l&&Ql(new $l(new ArrayBuffer(1)))!=Vl||Ea&&Ql(new Ea)!=zl||Wl&&Ql(Wl.resolve())!=Fl||Dl&&Ql(new Dl)!=Ul||co&&Ql(new co)!=Hl)&&(Ql=function(e){var t=Er(e),n="[object Object]"==t?e.constructor:void 0,r=n?to(n):"";if(r)switch(r){case ql:return Vl;case Kl:return zl;case Jl:return Fl;case Yl:return Ul;case Gl:return Hl}return t});var Zl=Ql,Xl=Object.prototype.hasOwnProperty;var eu=vr.Uint8Array;function tu(e){var t=new e.constructor(e.byteLength);return new eu(t).set(new eu(e)),t}var nu=/\w*$/;var ru=mr?mr.prototype:void 0,ou=ru?ru.valueOf:void 0;function iu(e,t){var n=t?tu(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function au(e,t,n){var r,o=e.constructor;switch(t){case"[object ArrayBuffer]":return tu(e);case"[object Boolean]":case"[object Date]":return new o(+e);case"[object DataView]":return function(e,t){var n=t?tu(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 iu(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,nu.exec(e));return t.lastIndex=e.lastIndex,t}(e);case"[object Symbol]":return r=e,ou?Object(ou.call(r)):{}}}function su(e){return"function"!=typeof e.constructor||ji(e)?{}:mo(Va(e))}var lu=qi&&qi.isMap,uu=lu?Fi(lu):function(e){return kr(e)&&"[object Map]"==Zl(e)};var cu=qi&&qi.isSet,du=cu?Fi(cu):function(e){return kr(e)&&"[object Set]"==Zl(e)},pu="[object Arguments]",fu="[object Function]",hu="[object Object]",gu={};function vu(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(!Wr(e))return e;var c=jr(e);if(c){if(a=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&Xl.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!s)return Mo(e,a)}else{var d=Zl(e),p=d==fu||"[object GeneratorFunction]"==d;if(Di(e))return Cl(e,s);if(d==hu||d==pu||p&&!o){if(a=l||p?{}:su(e),!s)return l?function(e,t){return _i(e,Nl(e),t)}(e,function(e,t){return e&&_i(t,sa(t),e)}(a,e)):function(e,t){return _i(e,Pl(e),t)}(e,xl(a,e))}else{if(!gu[d])return o?e:{};a=au(e,d,s)}}i||(i=new _l);var f=i.get(e);if(f)return f;i.set(e,a),du(e)?e.forEach(function(r){a.add(vu(r,t,n,r,e,i))}):uu(e)&&e.forEach(function(r,o){a.set(o,vu(r,t,n,o,e,i))});var h=c?void 0:(u?l?Bl:Tl:l?sa:ta)(e);return Yo(h||e,function(r,o){h&&(r=e[o=r]),bi(a,o,vu(r,t,n,o,e,i))}),a}gu[pu]=gu["[object Array]"]=gu["[object ArrayBuffer]"]=gu["[object DataView]"]=gu["[object Boolean]"]=gu["[object Date]"]=gu["[object Float32Array]"]=gu["[object Float64Array]"]=gu["[object Int8Array]"]=gu["[object Int16Array]"]=gu["[object Int32Array]"]=gu["[object Map]"]=gu["[object Number]"]=gu[hu]=gu["[object RegExp]"]=gu["[object Set]"]=gu["[object String]"]=gu["[object Symbol]"]=gu["[object Uint8Array]"]=gu["[object Uint8ClampedArray]"]=gu["[object Uint16Array]"]=gu["[object Uint32Array]"]=!0,gu["[object Error]"]=gu[fu]=gu["[object WeakMap]"]=!1;function mu(e){return vu(e,4)}function yu(e){return vu(e,5)}function bu(e,t){return vu(e,5,t="function"==typeof t?t:void 0)}function _u(e,t){return vu(e,4,t="function"==typeof t?t:void 0)}function xu(){return new Po(this.value(),this.__chain__)}function wu(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 Su(){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 $a(jr(n)?Mo(n):[n],za(t,1))}function Eu(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Ca;++t<n;)this.add(e[t])}function ku(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 Cu(e,t){return e.has(t)}Eu.prototype.add=Eu.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},Eu.prototype.has=function(e){return this.__data__.has(e)};function Ou(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 Eu: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(!ku(t,function(e,t){if(!Cu(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 Au(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function ju(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}var Lu=mr?mr.prototype:void 0,Ru=Lu?Lu.valueOf:void 0;var Pu=Object.prototype.hasOwnProperty;var Mu="[object Arguments]",Nu="[object Array]",Iu="[object Object]",Tu=Object.prototype.hasOwnProperty;function Bu(e,t,n,r,o,i){var a=jr(e),s=jr(t),l=a?Nu:Zl(e),u=s?Nu:Zl(t),c=(l=l==Mu?Iu:l)==Iu,d=(u=u==Mu?Iu:u)==Iu,p=l==u;if(p&&Di(e)){if(!Di(t))return!1;a=!0,c=!1}if(p&&!c)return i||(i=new _l),a||Ji(e)?Ou(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 eu(e),new eu(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return mi(+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=Au;case"[object Set]":var l=1&r;if(s||(s=ju),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=Ou(s(e),s(t),r,o,i,a);return a.delete(e),c;case"[object Symbol]":if(Ru)return Ru.call(e)==Ru.call(t)}return!1}(e,t,l,n,r,o,i);if(!(1&n)){var f=c&&Tu.call(e,"__wrapped__"),h=d&&Tu.call(t,"__wrapped__");if(f||h){var g=f?e.value():e,v=h?t.value():t;return i||(i=new _l),o(g,v,n,r,i)}}return!!p&&(i||(i=new _l),function(e,t,n,r,o,i){var a=1&n,s=Tl(e),l=s.length;if(l!=Tl(t).length&&!a)return!1;for(var u=l;u--;){var c=s[u];if(!(a?c in t:Pu.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 $u(e,t,n,r,o){return e===t||(null==e||null==t||!kr(e)&&!kr(t)?e!=e&&t!=t:Bu(e,t,n,r,$u,o))}function Wu(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 _l;if(r)var p=r(u,c,l,e,t,d);if(!(void 0===p?$u(c,u,3,r,d):p))return!1}}return!0}function Du(e){return e==e&&!Wr(e)}function zu(e){for(var t=ta(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,Du(o)]}return t}function Fu(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}function Uu(e){var t=zu(e);return 1==t.length&&t[0][2]?Fu(t[0][0],t[0][1]):function(n){return n===e||Wu(n,e,t)}}function Hu(e,t){return null!=e&&t in Object(e)}function Vu(e,t,n){for(var r=-1,o=(t=Ma(t,e)).length,i=!1;++r<o;){var a=Na(t[r]);if(!(i=null!=e&&n(e,a)))break;e=e[a]}return i||++r!=o?i:!!(o=null==e?0:e.length)&&Ei(o)&&ii(a,o)&&(jr(e)||Ii(e))}function qu(e,t){return null!=e&&Vu(e,t,Hu)}function Ku(e,t){return va(e)&&Du(t)?Fu(Na(e),t):function(n){var r=Ta(n,e);return void 0===r&&r===t?qu(n,e):$u(t,r,3)}}function Ju(e){return function(t){return null==t?void 0:t[e]}}function Yu(e){return va(e)?Ju(Na(e)):function(e){return function(t){return Ia(t,e)}}(e)}function Gu(e){return"function"==typeof e?e:null==e?Yr:"object"==typeof e?jr(e)?Ku(e[0],e[1]):Uu(e):Yu(e)}function Qu(e){var t=null==e?0:e.length,n=Gu;return e=t?Ar(e,function(e){if("function"!=typeof e[1])throw new TypeError("Expected a function");return[n(e[0]),e[1]]}):[],Si(function(n){for(var r=-1;++r<t;){var o=e[r];if(bo(o[0],this,n))return bo(o[1],this,n)}})}function Zu(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 Xu(e){return function(e){var t=ta(e);return function(n){return Zu(n,e,t)}}(vu(e,1))}function ec(e,t){return null==t||Zu(e,t,ta(t))}function tc(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 nc(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 rc=nc();function oc(e,t){return e&&rc(e,t,ta)}function ic(e,t){return function(n,r){if(null==n)return n;if(!ki(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 ac=ic(oc);function sc(e,t,n,r){return ac(e,function(e,o,i){t(r,e,n(e),i)}),r}function lc(e,t){return function(n,r){var o=jr(n)?tc:sc,i=t?t():{};return o(n,e,Gu(r),i)}}var uc=Object.prototype.hasOwnProperty,cc=lc(function(e,t,n){uc.call(e,n)?++e[n]:vi(e,n,1)}),dc=cc;function pc(e,t){var n=mo(e);return null==t?n:xl(n,t)}function fc(e,t,n){var r=hi(e,8,void 0,void 0,void 0,void 0,void 0,t=n?void 0:t);return r.placeholder=fc.placeholder,r}fc.placeholder={};function hc(e,t,n){var r=hi(e,16,void 0,void 0,void 0,void 0,void 0,t=n?void 0:t);return r.placeholder=hc.placeholder,r}hc.placeholder={};var gc=function(){return vr.Date.now()},vc=Math.max,mc=Math.min;function yc(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=gc();if(h(e))return v(e);s=setTimeout(g,function(e){var n=t-(e-l);return d?mc(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=gc(),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=Hr(t)||0,Wr(n)&&(c=!!n.leading,i=(d="maxWait"in n)?vc(Hr(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(gc())},m}function bc(e,t){return null==e||e!=e?t:e}var _c=Object.prototype,xc=_c.hasOwnProperty,wc=Si(function(e,t){e=Object(e);var n=-1,r=t.length,o=r>2?t[2]:void 0;for(o&&Ci(t[0],t[1],o)&&(r=1);++n<r;)for(var i=t[n],a=sa(i),s=-1,l=a.length;++s<l;){var u=a[s],c=e[u];(void 0===c||mi(c,_c[u])&&!xc.call(e,u))&&(e[u]=i[u])}return e}),Sc=wc;function Ec(e,t,n){(void 0!==n&&!mi(e[t],n)||void 0===n&&!(t in e))&&vi(e,t,n)}function kc(e){return kr(e)&&ki(e)}function Cc(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}function Oc(e){return _i(e,sa(e))}function Ac(e,t,n,r,o){e!==t&&rc(t,function(i,a){if(o||(o=new _l),Wr(i))!function(e,t,n,r,o,i,a){var s=Cc(e,n),l=Cc(t,n),u=a.get(l);if(u)Ec(e,n,u);else{var c=i?i(s,l,n+"",e,t,a):void 0,d=void 0===c;if(d){var p=jr(l),f=!p&&Di(l),h=!p&&!f&&Ji(l);c=l,p||f||h?jr(s)?c=s:kc(s)?c=Mo(s):f?(d=!1,c=Cl(l,!0)):h?(d=!1,c=iu(l,!0)):c=[]:Qa(l)||Ii(l)?(c=s,Ii(s)?c=Oc(s):Wr(s)&&!Gr(s)||(c=su(l))):d=!1}d&&(a.set(l,c),o(c,l,r,i,a),a.delete(l)),Ec(e,n,c)}}(e,t,a,n,Ac,r,o);else{var s=r?r(Cc(e,a),i,a+"",e,t,o):void 0;void 0===s&&(s=i),Ec(e,a,s)}},sa)}function jc(e,t,n,r,o,i){return Wr(e)&&Wr(t)&&(i.set(t,e),Ac(e,t,void 0,jc,i),i.delete(t)),e}var Lc=Oi(function(e,t,n,r){Ac(e,t,n,r)}),Rc=Lc,Pc=Si(function(e){return e.push(void 0,jc),bo(Rc,void 0,e)});function Mc(e,t,n){if("function"!=typeof e)throw new TypeError("Expected a function");return setTimeout(function(){e.apply(void 0,n)},t)}var Nc=Si(function(e,t){return Mc(e,1,t)}),Ic=Nc,Tc=Si(function(e,t,n){return Mc(e,Hr(t)||0,n)}),Bc=Tc;function $c(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 Wc(e,t,n,r){var o=-1,i=Xo,a=!0,s=e.length,l=[],u=t.length;if(!s)return l;n&&(t=Ar(t,Fi(n))),r?(i=$c,a=!1):t.length>=200&&(i=Cu,a=!1,t=new Eu(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 Dc=Si(function(e,t){return kc(e)?Wc(e,za(t,1,kc,!0)):[]}),zc=Dc;function Fc(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}var Uc=Si(function(e,t){var n=Fc(t);return kc(n)&&(n=void 0),kc(e)?Wc(e,za(t,1,kc,!0),Gu(n)):[]}),Hc=Uc,Vc=Si(function(e,t){var n=Fc(t);return kc(n)&&(n=void 0),kc(e)?Wc(e,za(t,1,kc,!0),void 0,n):[]}),qc=Vc,Kc=Mr(function(e,t){return e/t},1);function Jc(e,t,n){var r=null==e?0:e.length;return r?ls(e,(t=n||void 0===t?1:Kr(t))<0?0:t,r):[]}function Yc(e,t,n){var r=null==e?0:e.length;return r?ls(e,0,(t=r-(t=n||void 0===t?1:Kr(t)))<0?0:t):[]}function Gc(e,t,n,r){for(var o=e.length,i=r?o:-1;(r?i--:++i<o)&&t(e[i],i,e););return n?ls(e,r?0:i,r?i+1:o):ls(e,r?i+1:0,r?o:i)}function Qc(e,t){return e&&e.length?Gc(e,Gu(t),!0,!0):[]}function Zc(e,t){return e&&e.length?Gc(e,Gu(t),!0):[]}function Xc(e){return"function"==typeof e?e:Yr}function ed(e,t){return(jr(e)?Yo:ac)(e,Xc(t))}function td(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}var nd=nc(!0);function rd(e,t){return e&&nd(e,t,ta)}var od=ic(rd,!0);function id(e,t){return(jr(e)?td:od)(e,Xc(t))}function ad(e,t,n){e=Pa(e),t=Pr(t);var r=e.length,o=n=void 0===n?r:yl(Kr(n),0,r);return(n-=t.length)>=0&&e.slice(n,o)==t}function sd(e){return function(t){var n=Zl(t);return"[object Map]"==n?Au(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 Ar(t,function(t){return[t,e[t]]})}(t,e(t))}}var ld=sd(ta),ud=sd(sa),cd=js({"&":"&","<":"<",">":">",'"':""","'":"'"}),dd=/[&<>"']/g,pd=RegExp(dd.source);function fd(e){return(e=Pa(e))&&pd.test(e)?e.replace(dd,cd):e}var hd=/[\\^$.*+?()[\]{}|]/g,gd=RegExp(hd.source);function vd(e){return(e=Pa(e))&&gd.test(e)?e.replace(hd,"\\$&"):e}function md(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 yd(e,t){var n=!0;return ac(e,function(e,r,o){return n=!!t(e,r,o)}),n}function bd(e,t,n){var r=jr(e)?md:yd;return n&&Ci(e,t,n)&&(t=void 0),r(e,Gu(t))}function _d(e){return e?yl(Kr(e),0,4294967295):0}function xd(e,t,n,r){var o=null==e?0:e.length;return o?(n&&"number"!=typeof n&&Ci(e,t,n)&&(n=0,r=o),function(e,t,n,r){var o=e.length;for((n=Kr(n))<0&&(n=-n>o?0:o+n),(r=void 0===r||r>o?o:Kr(r))<0&&(r+=o),r=n>r?0:_d(r);n<r;)e[n++]=t;return e}(e,t,n,r)):[]}function wd(e,t){var n=[];return ac(e,function(e,r,o){t(e,r,o)&&n.push(e)}),n}function Sd(e,t){return(jr(e)?Ol:wd)(e,Gu(t))}function Ed(e){return function(t,n,r){var o=Object(t);if(!ki(t)){var i=Gu(n);t=ta(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 kd=Math.max;function Cd(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:Kr(n);return o<0&&(o=kd(r+o,0)),Go(e,Gu(t),o)}var Od=Ed(Cd);function Ad(e,t,n){var r;return n(e,function(e,n,o){if(t(e,n,o))return r=n,!1}),r}function jd(e,t){return Ad(e,Gu(t),oc)}var Ld=Math.max,Rd=Math.min;function Pd(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=r-1;return void 0!==n&&(o=Kr(n),o=n<0?Ld(r+o,0):Rd(o,r-1)),Go(e,Gu(t),o,!0)}var Md=Ed(Pd);function Nd(e,t){return Ad(e,Gu(t),rd)}function Id(e){return e&&e.length?e[0]:void 0}function Td(e,t){var n=-1,r=ki(e)?Array(e.length):[];return ac(e,function(e,o,i){r[++n]=t(e,o,i)}),r}function Bd(e,t){return(jr(e)?Ar:Td)(e,Gu(t))}function $d(e,t){return za(Bd(e,t),1)}var Wd=1/0;function Dd(e,t){return za(Bd(e,t),Wd)}function zd(e,t,n){return n=void 0===n?1:Kr(n),za(Bd(e,t),n)}var Fd=1/0;function Ud(e){return(null==e?0:e.length)?za(e,Fd):[]}function Hd(e,t){return(null==e?0:e.length)?za(e,t=void 0===t?1:Kr(t)):[]}function Vd(e){return hi(e,512)}var qd=pl("floor");function Kd(e){return Ua(function(t){var n=t.length,r=n,o=Po.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"==Ro(i))var a=new Po([],!0)}for(r=a?r:n;++r<n;){var s=Ro(i=t[r]),l="wrapper"==s?Ao(i):void 0;a=l&&Bo(l[0])&&424==l[1]&&!l[4].length&&1==l[9]?a[Ro(l[0])].apply(a,l[3]):1==i.length&&Bo(i)?a[s]():a.thru(i)}return function(){var e=arguments,r=e[0];if(a&&1==e.length&&jr(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 Jd=Kd(),Yd=Kd(!0);function Gd(e,t){return null==e?e:rc(e,Xc(t),sa)}function Qd(e,t){return null==e?e:nd(e,Xc(t),sa)}function Zd(e,t){return e&&oc(e,Xc(t))}function Xd(e,t){return e&&rd(e,Xc(t))}function ep(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 tp(e,t){return Ol(t,function(t){return Gr(e[t])})}function np(e){return null==e?[]:tp(e,ta(e))}function rp(e){return null==e?[]:tp(e,sa(e))}var op=Object.prototype.hasOwnProperty,ip=lc(function(e,t,n){op.call(e,n)?e[n].push(t):vi(e,n,[t])}),ap=ip;function sp(e,t){return e>t}function lp(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=Hr(t),n=Hr(n)),e(t,n)}}var up=lp(sp),cp=lp(function(e,t){return e>=t}),dp=Object.prototype.hasOwnProperty;function pp(e,t){return null!=e&&dp.call(e,t)}function fp(e,t){return null!=e&&Vu(e,t,pp)}var hp=Math.max,gp=Math.min;function vp(e,t,n){return t=qr(t),void 0===n?(n=t,t=0):n=qr(n),function(e,t,n){return e>=gp(t,n)&&e<hp(t,n)}(e=Hr(e),t,n)}function mp(e){return"string"==typeof e||!jr(e)&&kr(e)&&"[object String]"==Er(e)}function yp(e,t){return Ar(t,function(t){return e[t]})}function bp(e){return null==e?[]:yp(e,ta(e))}var _p=Math.max;function xp(e,t,n,r){e=ki(e)?e:bp(e),n=n&&!r?Kr(n):0;var o=e.length;return n<0&&(n=_p(o+n,0)),mp(e)?n<=o&&e.indexOf(t,n)>-1:!!o&&Zo(e,t,n)>-1}var wp=Math.max;function Sp(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:Kr(n);return o<0&&(o=wp(r+o,0)),Zo(e,t,o)}function Ep(e){return(null==e?0:e.length)?ls(e,0,-1):[]}var kp=Math.min;function Cp(e,t,n){for(var r=n?$c:Xo,o=e[0].length,i=e.length,a=i,s=Array(i),l=1/0,u=[];a--;){var c=e[a];a&&t&&(c=Ar(c,Fi(t))),l=kp(c.length,l),s[a]=!n&&(t||o>=120&&c.length>=120)?new Eu(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?Cu(p,h):r(u,h,n))){for(a=i;--a;){var g=s[a];if(!(g?Cu(g,h):r(e[a],h,n)))continue e}p&&p.push(h),u.push(f)}}return u}function Op(e){return kc(e)?e:[]}var Ap=Si(function(e){var t=Ar(e,Op);return t.length&&t[0]===e[0]?Cp(t):[]}),jp=Si(function(e){var t=Fc(e),n=Ar(e,Op);return t===Fc(n)?t=void 0:n.pop(),n.length&&n[0]===e[0]?Cp(n,Gu(t)):[]}),Lp=jp,Rp=Si(function(e){var t=Fc(e),n=Ar(e,Op);return(t="function"==typeof t?t:void 0)&&n.pop(),n.length&&n[0]===e[0]?Cp(n,void 0,t):[]});function Pp(e,t){return function(n,r){return function(e,t,n,r){return oc(e,function(e,o,i){t(r,n(e),o,i)}),r}(n,e,t(r),{})}}var Mp=Object.prototype.toString,Np=Pp(function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Mp.call(t)),e[t]=n},Ho(Yr)),Ip=Np,Tp=Object.prototype,Bp=Tp.hasOwnProperty,$p=Tp.toString,Wp=Pp(function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=$p.call(t)),Bp.call(e,t)?e[t].push(n):e[t]=[n]},Gu),Dp=Wp;function zp(e,t){return t.length<2?e:Ia(e,ls(t,0,-1))}function Fp(e,t,n){var r=null==(e=zp(e,t=Ma(t,e)))?e:e[Na(Fc(t))];return null==r?void 0:bo(r,e,n)}var Up=Si(Fp),Hp=Si(function(e,t,n){var r=-1,o="function"==typeof t,i=ki(e)?Array(e.length):[];return ac(e,function(e){i[++r]=o?bo(t,e,n):Fp(e,t,n)}),i}),Vp=Hp;var qp=qi&&qi.isArrayBuffer,Kp=qp?Fi(qp):function(e){return kr(e)&&"[object ArrayBuffer]"==Er(e)};function Jp(e){return!0===e||!1===e||kr(e)&&"[object Boolean]"==Er(e)}var Yp=qi&&qi.isDate,Gp=Yp?Fi(Yp):function(e){return kr(e)&&"[object Date]"==Er(e)};function Qp(e){return kr(e)&&1===e.nodeType&&!Qa(e)}var Zp=Object.prototype.hasOwnProperty;function Xp(e){if(null==e)return!0;if(ki(e)&&(jr(e)||"string"==typeof e||"function"==typeof e.splice||Di(e)||Ji(e)||Ii(e)))return!e.length;var t=Zl(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(ji(e))return!ea(e).length;for(var n in e)if(Zp.call(e,n))return!1;return!0}function ef(e,t){return $u(e,t)}function tf(e,t,n){var r=(n="function"==typeof n?n:void 0)?n(e,t):void 0;return void 0===r?$u(e,t,void 0,n):!!r}var nf=vr.isFinite;function rf(e){return"number"==typeof e&&nf(e)}function of(e){return"number"==typeof e&&e==Kr(e)}function af(e,t){return e===t||Wu(e,t,zu(t))}function sf(e,t,n){return n="function"==typeof n?n:void 0,Wu(e,t,zu(t),n)}function lf(e){return"number"==typeof e||kr(e)&&"[object Number]"==Er(e)}function uf(e){return lf(e)&&e!=+e}var cf=Zr?Gr:Ti;function df(e){if(cf(e))throw new Error("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return lo(e)}function pf(e){return null==e}function ff(e){return null===e}var hf=qi&&qi.isRegExp,gf=hf?Fi(hf):function(e){return kr(e)&&"[object RegExp]"==Er(e)},vf=9007199254740991;function mf(e){return of(e)&&e>=-9007199254740991&&e<=vf}function yf(e){return void 0===e}function bf(e){return kr(e)&&"[object WeakMap]"==Zl(e)}function _f(e){return kr(e)&&"[object WeakSet]"==Er(e)}function xf(e){return Gu("function"==typeof e?e:vu(e,1))}var wf=Array.prototype.join;function Sf(e,t){return null==e?"":wf.call(e,t)}var Ef=al(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()}),kf=Ef,Cf=lc(function(e,t,n){vi(e,n,t)}),Of=Cf;var Af=Math.max,jf=Math.min;function Lf(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=r;return void 0!==n&&(o=(o=Kr(n))<0?Af(r+o,0):jf(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):Go(e,Qo,o,!0)}var Rf=al(function(e,t,n){return e+(n?" ":"")+t.toLowerCase()}),Pf=Rf,Mf=ks("toLowerCase");function Nf(e,t){return e<t}var If=lp(Nf),Tf=lp(function(e,t){return e<=t});function Bf(e,t){var n={};return t=Gu(t),oc(e,function(e,r,o){vi(n,t(e,r,o),e)}),n}function $f(e,t){var n={};return t=Gu(t),oc(e,function(e,r,o){vi(n,r,t(e,r,o))}),n}function Wf(e){return Uu(vu(e,1))}function Df(e,t){return Ku(e,vu(t,1))}function zf(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&&!Cr(a):n(a,s)))var s=a,l=i}return l}function Ff(e){return e&&e.length?zf(e,Yr,sp):void 0}function Uf(e,t){return e&&e.length?zf(e,Gu(t),sp):void 0}function Hf(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 Vf(e,t){var n=null==e?0:e.length;return n?Hf(e,t)/n:NaN}function qf(e){return Vf(e,Yr)}function Kf(e,t){return Vf(e,Gu(t))}var Jf=Oi(function(e,t,n){Ac(e,t,n)}),Yf=Jf,Gf=Si(function(e,t){return function(n){return Fp(n,e,t)}}),Qf=Gf,Zf=Si(function(e,t){return function(n){return Fp(e,n,t)}}),Xf=Zf;function eh(e){return e&&e.length?zf(e,Yr,Nf):void 0}function th(e,t){return e&&e.length?zf(e,Gu(t),Nf):void 0}function nh(e,t,n){var r=ta(t),o=tp(t,r),i=!(Wr(n)&&"chain"in n&&!n.chain),a=Gr(e);return Yo(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__=Mo(this.__actions__)).push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,$a([this.value()],arguments))})}),e}var rh=Mr(function(e,t){return e*t},1);function oh(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 ih=mr?mr.iterator:void 0;function ah(e){if(!e)return[];if(ki(e))return mp(e)?Es(e):Mo(e);if(ih&&e[ih])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[ih]());var t=Zl(e);return("[object Map]"==t?Au:"[object Set]"==t?ju:bp)(e)}function sh(){void 0===this.__values__&&(this.__values__=ah(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?void 0:this.__values__[this.__index__++]}}function lh(e,t){var n=e.length;if(n)return ii(t+=t<0?n:0,n)?e[t]:void 0}function uh(e,t){return e&&e.length?lh(e,Kr(t)):void 0}function ch(e){return e=Kr(e),Si(function(t){return lh(t,e)})}var dh=Object.prototype.hasOwnProperty;function ph(e,t){var n=-1,r=(t=Ma(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&&!dh.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=zp(e,t);return null==a||delete a[Na(Fc(t))]}function fh(e){return Qa(e)?void 0:e}var hh=Ua(function(e,t){var n={};if(null==e)return n;var r=!1;t=Ar(t,function(t){return t=Ma(t,e),r||(r=t.length>1),t}),_i(e,Bl(e),n),r&&(n=vu(n,7,fh));for(var o=t.length;o--;)ph(n,t[o]);return n}),gh=hh;function vh(e,t,n,r){if(!Wr(e))return e;for(var o=-1,i=(t=Ma(t,e)).length,a=i-1,s=e;null!=s&&++o<i;){var l=Na(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=Wr(c)?c:ii(t[o+1])?[]:{})}bi(s,l,u),s=s[l]}return e}function mh(e,t,n){for(var r=-1,o=t.length,i={};++r<o;){var a=t[r],s=Ia(e,a);n(s,a)&&vh(i,Ma(a,e),s)}return i}function yh(e,t){if(null==e)return{};var n=Ar(Bl(e),function(e){return[e]});return t=Gu(t),mh(e,n,function(e,n){return t(e,n[0])})}function bh(e,t){return yh(e,oh(Gu(t)))}function _h(e){return ts(2,e)}function xh(e,t){if(e!==t){var n=void 0!==e,r=null===e,o=e==e,i=Cr(e),a=void 0!==t,s=null===t,l=t==t,u=Cr(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 wh(e,t,n){t=t.length?Ar(t,function(e){return jr(e)?function(t){return Ia(t,1===e.length?e[0]:e)}:e}):[Yr];var r=-1;t=Ar(t,Fi(Gu));var o=Td(e,function(e,n,o){var i=Ar(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=xh(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 Sh(e,t,n,r){return null==e?[]:(jr(t)||(t=null==t?[]:[t]),jr(n=r?void 0:n)||(n=null==n?[]:[n]),wh(e,t,n))}function Eh(e){return Ua(function(t){return t=Ar(t,Fi(Gu)),Si(function(n){var r=this;return e(t,function(e){return bo(e,r,n)})})})}var kh=Eh(Ar),Ch=Si,Oh=Math.min,Ah=Ch(function(e,t){var n=(t=1==t.length&&jr(t[0])?Ar(t[0],Fi(Gu)):Ar(za(t,1),Fi(Gu))).length;return Si(function(r){for(var o=-1,i=Oh(r.length,n);++o<i;)r[o]=t[o].call(this,r[o]);return bo(e,this,r)})}),jh=Ah,Lh=Eh(md),Rh=Eh(ku),Ph=Math.floor;function Mh(e,t){var n="";if(!e||t<1||t>9007199254740991)return n;do{t%2&&(n+=e),(t=Ph(t/2))&&(e+=e)}while(t);return n}var Nh=Ju("length"),Ih="\\ud800-\\udfff",Th="["+Ih+"]",Bh="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",$h="\\ud83c[\\udffb-\\udfff]",Wh="[^"+Ih+"]",Dh="(?:\\ud83c[\\udde6-\\uddff]){2}",zh="[\\ud800-\\udbff][\\udc00-\\udfff]",Fh="(?:"+Bh+"|"+$h+")"+"?",Uh="[\\ufe0e\\ufe0f]?",Hh=Uh+Fh+("(?:\\u200d(?:"+[Wh,Dh,zh].join("|")+")"+Uh+Fh+")*"),Vh="(?:"+[Wh+Bh+"?",Bh,Dh,zh,Th].join("|")+")",qh=RegExp($h+"(?="+$h+")|"+Vh+Hh,"g");function Kh(e){return ds(e)?function(e){for(var t=qh.lastIndex=0;qh.test(e);)++t;return t}(e):Nh(e)}var Jh=Math.ceil;function Yh(e,t){var n=(t=void 0===t?" ":Pr(t)).length;if(n<2)return n?Mh(t,e):t;var r=Mh(t,Jh(e/Kh(t)));return ds(t)?us(Es(r),0,e).join(""):r.slice(0,e)}var Gh=Math.ceil,Qh=Math.floor;function Zh(e,t,n){e=Pa(e);var r=(t=Kr(t))?Kh(e):0;if(!t||r>=t)return e;var o=(t-r)/2;return Yh(Qh(o),n)+e+Yh(Gh(o),n)}function Xh(e,t,n){e=Pa(e);var r=(t=Kr(t))?Kh(e):0;return t&&r<t?e+Yh(t-r,n):e}function eg(e,t,n){e=Pa(e);var r=(t=Kr(t))?Kh(e):0;return t&&r<t?Yh(t-r,n)+e:e}var tg=/^\s+/,ng=vr.parseInt;function rg(e,t,n){return n||null==t?t=0:t&&(t=+t),ng(Pa(e).replace(tg,""),t||0)}var og=Si(function(e,t){return hi(e,32,void 0,t,li(t,ri(og)))});og.placeholder={};var ig=og,ag=Si(function(e,t){return hi(e,64,void 0,t,li(t,ri(ag)))});ag.placeholder={};var sg=ag,lg=lc(function(e,t,n){e[n?0:1].push(t)},function(){return[[],[]]}),ug=lg;var cg=Ua(function(e,t){return null==e?{}:function(e,t){return mh(e,t,function(t,n){return qu(e,n)})}(e,t)}),dg=cg;function pg(e){for(var t,n=this;n instanceof Eo;){var r=No(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 fg(e){return function(t){return null==e?void 0:Ia(e,t)}}function hg(e,t,n,r){for(var o=n-1,i=e.length;++o<i;)if(r(e[o],t))return o;return-1}var gg=Array.prototype.splice;function vg(e,t,n,r){var o=r?hg:Zo,i=-1,a=t.length,s=e;for(e===t&&(t=Mo(t)),n&&(s=Ar(e,Fi(n)));++i<a;)for(var l=0,u=t[i],c=n?n(u):u;(l=o(s,c,l,r))>-1;)s!==e&&gg.call(s,l,1),gg.call(e,l,1);return e}function mg(e,t){return e&&e.length&&t&&t.length?vg(e,t):e}var yg=Si(mg);function bg(e,t,n){return e&&e.length&&t&&t.length?vg(e,t,Gu(n)):e}function _g(e,t,n){return e&&e.length&&t&&t.length?vg(e,t,void 0,n):e}var xg=Array.prototype.splice;function wg(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;ii(o)?xg.call(e,o,1):ph(e,o)}}return e}var Sg=Ua(function(e,t){var n=null==e?0:e.length,r=Ba(e,t);return wg(e,Ar(t,function(e){return ii(e,n)?+e:e}).sort(xh)),r}),Eg=Sg,kg=Math.floor,Cg=Math.random;function Og(e,t){return e+kg(Cg()*(t-e+1))}var Ag=parseFloat,jg=Math.min,Lg=Math.random;function Rg(e,t,n){if(n&&"boolean"!=typeof n&&Ci(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=qr(e),void 0===t?(t=e,e=0):t=qr(t)),e>t){var r=e;e=t,t=r}if(n||e%1||t%1){var o=Lg();return jg(e+o*(t-e+Ag("1e-"+((o+"").length-1))),t)}return Og(e,t)}var Pg=Math.ceil,Mg=Math.max;function Ng(e){return function(t,n,r){return r&&"number"!=typeof r&&Ci(t,n,r)&&(n=r=void 0),t=qr(t),void 0===n?(n=t,t=0):n=qr(n),function(e,t,n,r){for(var o=-1,i=Mg(Pg((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:qr(r),e)}}var Ig=Ng(),Tg=Ng(!0),Bg=Ua(function(e,t){return hi(e,256,void 0,void 0,void 0,t)}),$g=Bg;function Wg(e,t,n,r,o){return o(e,function(e,o,i){n=r?(r=!1,e):t(n,e,o,i)}),n}function Dg(e,t,n){var r=jr(e)?As:Wg,o=arguments.length<3;return r(e,Gu(t),n,o,ac)}function zg(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 Fg(e,t,n){var r=jr(e)?zg:Wg,o=arguments.length<3;return r(e,Gu(t),n,o,od)}function Ug(e,t){return(jr(e)?Ol:wd)(e,oh(Gu(t)))}function Hg(e,t){var n=[];if(!e||!e.length)return n;var r=-1,o=[],i=e.length;for(t=Gu(t);++r<i;){var a=e[r];t(a,r,e)&&(n.push(a),o.push(r))}return wg(e,o),n}function Vg(e,t,n){return t=(n?Ci(e,t,n):void 0===t)?1:Kr(t),Mh(Pa(e),t)}function qg(){var e=arguments,t=Pa(e[0]);return e.length<3?t:t.replace(e[1],e[2])}function Kg(e,t){if("function"!=typeof e)throw new TypeError("Expected a function");return Si(e,t=void 0===t?t:Kr(t))}function Jg(e,t,n){var r=-1,o=(t=Ma(t,e)).length;for(o||(o=1,e=void 0);++r<o;){var i=null==e?void 0:e[Na(t[r])];void 0===i&&(r=o,i=n),e=Gr(i)?i.call(e):i}return e}var Yg=Array.prototype.reverse;function Gg(e){return null==e?e:Yg.call(e)}var Qg=pl("round");function Zg(e){var t=e.length;return t?e[Og(0,t-1)]:void 0}function Xg(e){return Zg(bp(e))}function ev(e){return(jr(e)?Zg:Xg)(e)}function tv(e,t){var n=-1,r=e.length,o=r-1;for(t=void 0===t?r:t;++n<t;){var i=Og(n,o),a=e[i];e[i]=e[n],e[n]=a}return e.length=t,e}function nv(e,t){return tv(Mo(e),yl(t,0,e.length))}function rv(e,t){var n=bp(e);return tv(n,yl(t,0,n.length))}function ov(e,t,n){return t=(n?Ci(e,t,n):void 0===t)?1:Kr(t),(jr(e)?nv:rv)(e,t)}function iv(e,t,n){return null==e?e:vh(e,t,n)}function av(e,t,n,r){return r="function"==typeof r?r:void 0,null==e?e:vh(e,t,n,r)}function sv(e){return tv(Mo(e))}function lv(e){return tv(bp(e))}function uv(e){return(jr(e)?sv:lv)(e)}function cv(e){if(null==e)return 0;if(ki(e))return mp(e)?Kh(e):e.length;var t=Zl(e);return"[object Map]"==t||"[object Set]"==t?e.size:ea(e).length}function dv(e,t,n){var r=null==e?0:e.length;return r?(n&&"number"!=typeof n&&Ci(e,t,n)?(t=0,n=r):(t=null==t?0:Kr(t),n=void 0===n?r:Kr(n)),ls(e,t,n)):[]}var pv=al(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}),fv=pv;function hv(e,t){var n;return ac(e,function(e,r,o){return!(n=t(e,r,o))}),!!n}function gv(e,t,n){var r=jr(e)?ku:hv;return n&&Ci(e,t,n)&&(t=void 0),r(e,Gu(t))}var vv=Si(function(e,t){if(null==e)return[];var n=t.length;return n>1&&Ci(e,t[0],t[1])?t=[]:n>2&&Ci(t[0],t[1],t[2])&&(t=[t[0]]),wh(e,za(t,1),[])}),mv=vv,yv=Math.floor,bv=Math.min;function _v(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=Cr(t),u=void 0===t;o<i;){var c=yv((o+i)/2),d=n(e[c]),p=void 0!==d,f=null===d,h=d==d,g=Cr(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 bv(i,4294967294)}function xv(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&&!Cr(a)&&(n?a<=t:a<t)?r=i+1:o=i}return o}return _v(e,t,Yr,n)}function wv(e,t){return xv(e,t)}function Sv(e,t,n){return _v(e,t,Gu(n))}function Ev(e,t){var n=null==e?0:e.length;if(n){var r=xv(e,t);if(r<n&&mi(e[r],t))return r}return-1}function kv(e,t){return xv(e,t,!0)}function Cv(e,t,n){return _v(e,t,Gu(n),!0)}function Ov(e,t){if(null==e?0:e.length){var n=xv(e,t,!0)-1;if(mi(e[n],t))return n}return-1}function Av(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||!mi(s,l)){var l=s;i[o++]=0===a?0:a}}return i}function jv(e){return e&&e.length?Av(e):[]}function Lv(e,t){return e&&e.length?Av(e,Gu(t)):[]}function Rv(e,t,n){return n&&"number"!=typeof n&&Ci(e,t,n)&&(t=n=void 0),(n=void 0===n?4294967295:n>>>0)?(e=Pa(e))&&("string"==typeof t||null!=t&&!gf(t))&&!(t=Pr(t))&&ds(e)?us(Es(e),0,n):e.split(t,n):[]}var Pv=Math.max;function Mv(e,t){if("function"!=typeof e)throw new TypeError("Expected a function");return t=null==t?0:Pv(Kr(t),0),Si(function(n){var r=n[t],o=us(n,0,t);return r&&$a(o,r),bo(e,this,o)})}var Nv=al(function(e,t,n){return e+(n?" ":"")+Cs(t)}),Iv=Nv;function Tv(e,t,n){return e=Pa(e),n=null==n?0:yl(Kr(n),0,e.length),t=Pr(t),e.slice(n,n+t.length)==t}function Bv(){return{}}function $v(){return""}function Wv(){return!0}var Dv=Mr(function(e,t){return e-t},0);function zv(e){return e&&e.length?Hf(e,Yr):0}function Fv(e,t){return e&&e.length?Hf(e,Gu(t)):0}function Uv(e){var t=null==e?0:e.length;return t?ls(e,1,t):[]}function Hv(e,t,n){return e&&e.length?ls(e,0,(t=n||void 0===t?1:Kr(t))<0?0:t):[]}function Vv(e,t,n){var r=null==e?0:e.length;return r?ls(e,(t=r-(t=n||void 0===t?1:Kr(t)))<0?0:t,r):[]}function qv(e,t){return e&&e.length?Gc(e,Gu(t),!1,!0):[]}function Kv(e,t){return e&&e.length?Gc(e,Gu(t)):[]}function Jv(e,t){return t(e),e}var Yv=Object.prototype,Gv=Yv.hasOwnProperty;function Qv(e,t,n,r){return void 0===e||mi(e,Yv[n])&&!Gv.call(r,n)?t:e}var Zv={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"};function Xv(e){return"\\"+Zv[e]}var em=/<%=([\s\S]+?)%>/g,tm={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:em,variable:"",imports:{_:{escape:fd}}},nm=/\b__p \+= '';/g,rm=/\b(__p \+=) '' \+/g,om=/(__e\(.*?\)|\b__t\)) \+\n'';/g,im=/[()=,{}\[\]\/\s]/,am=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,sm=/($^)/,lm=/['\n\r\u2028\u2029\\]/g,um=Object.prototype.hasOwnProperty;function cm(e,t,n){var r=tm.imports._.templateSettings||tm;n&&Ci(e,t,n)&&(t=void 0),e=Pa(e),t=da({},t,r,Qv);var o,i,a=da({},t.imports,r.imports,Qv),s=ta(a),l=yp(a,s),u=0,c=t.interpolate||sm,d="__p += '",p=RegExp((t.escape||sm).source+"|"+c.source+"|"+(c===em?am:sm).source+"|"+(t.evaluate||sm).source+"|$","g"),f=um.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(lm,Xv),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=um.call(t,"variable")&&t.variable;if(h){if(im.test(h))throw new Error("Invalid `variable` option passed into `_.template`")}else d="with (obj) {\n"+d+"\n}\n";d=(i?d.replace(nm,""):d).replace(rm,"$1").replace(om,"$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=es(function(){return Function(s,f+"return "+d).apply(void 0,l)});if(g.source=d,Za(g))throw g;return g}function dm(e,t,n){var r=!0,o=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return Wr(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),yc(e,t,{leading:r,maxWait:t,trailing:o})}function pm(e,t){return t(e)}var fm=4294967295,hm=Math.min;function gm(e,t){if((e=Kr(e))<1||e>9007199254740991)return[];var n=fm,r=hm(e,fm);t=Xc(t),e-=fm;for(var o=Li(r,t);++n<e;)t(n);return o}function vm(){return this}function mm(e,t){var n=e;return n instanceof ko&&(n=n.value()),As(t,function(e,t){return t.func.apply(t.thisArg,$a([e],t.args))},n)}function ym(){return mm(this.__wrapped__,this.__actions__)}function bm(e){return Pa(e).toLowerCase()}function _m(e){return jr(e)?Ar(e,Na):Cr(e)?[e]:Mo(Ra(Pa(e)))}var xm=9007199254740991;function wm(e){return e?yl(Kr(e),-9007199254740991,xm):0===e?e:0}function Sm(e){return Pa(e).toUpperCase()}function Em(e,t,n){var r=jr(e),o=r||Di(e)||Ji(e);if(t=Gu(t),null==n){var i=e&&e.constructor;n=o?r?new i:[]:Wr(e)&&Gr(i)?mo(Va(e)):{}}return(o?Yo:oc)(e,function(e,r,o){return t(n,e,r,o)}),n}function km(e,t){for(var n=e.length;n--&&Zo(t,e[n],0)>-1;);return n}function Cm(e,t){for(var n=-1,r=e.length;++n<r&&Zo(t,e[n],0)>-1;);return n}function Om(e,t,n){if((e=Pa(e))&&(n||void 0===t))return $r(e);if(!e||!(t=Pr(t)))return e;var r=Es(e),o=Es(t);return us(r,Cm(r,o),km(r,o)+1).join("")}function Am(e,t,n){if((e=Pa(e))&&(n||void 0===t))return e.slice(0,Tr(e)+1);if(!e||!(t=Pr(t)))return e;var r=Es(e);return us(r,0,km(r,Es(t))+1).join("")}var jm=/^\s+/;function Lm(e,t,n){if((e=Pa(e))&&(n||void 0===t))return e.replace(jm,"");if(!e||!(t=Pr(t)))return e;var r=Es(e);return us(r,Cm(r,Es(t))).join("")}var Rm=/\w*$/;function Pm(e,t){var n=30,r="...";if(Wr(t)){var o="separator"in t?t.separator:o;n="length"in t?Kr(t.length):n,r="omission"in t?Pr(t.omission):r}var i=(e=Pa(e)).length;if(ds(e)){var a=Es(e);i=a.length}if(n>=i)return e;var s=n-Kh(r);if(s<1)return r;var l=a?us(a,0,s).join(""):e.slice(0,s);if(void 0===o)return l+r;if(a&&(s+=l.length-s),gf(o)){if(e.slice(s).search(o)){var u,c=l;for(o.global||(o=RegExp(o.source,Pa(Rm.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(Pr(o),s)!=s){var p=l.lastIndexOf(o);p>-1&&(l=l.slice(0,p))}return l+r}function Mm(e){return gi(e,1)}var Nm=js({"&":"&","<":"<",">":">",""":'"',"'":"'"}),Im=/&(?:amp|lt|gt|quot|#39);/g,Tm=RegExp(Im.source);function Bm(e){return(e=Pa(e))&&Tm.test(e)?e.replace(Im,Nm):e}var $m=Dl&&1/ju(new Dl([,-0]))[1]==1/0?function(e){return new Dl(e)}:Co,Wm=$m;function Dm(e,t,n){var r=-1,o=Xo,i=e.length,a=!0,s=[],l=s;if(n)a=!1,o=$c;else if(i>=200){var u=t?null:Wm(e);if(u)return ju(u);a=!1,o=Cu,l=new Eu}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 zm=Si(function(e){return Dm(za(e,1,kc,!0))}),Fm=Si(function(e){var t=Fc(e);return kc(t)&&(t=void 0),Dm(za(e,1,kc,!0),Gu(t))}),Um=Fm,Hm=Si(function(e){var t=Fc(e);return t="function"==typeof t?t:void 0,Dm(za(e,1,kc,!0),void 0,t)});function Vm(e){return e&&e.length?Dm(e):[]}function qm(e,t){return e&&e.length?Dm(e,Gu(t)):[]}function Km(e,t){return t="function"==typeof t?t:void 0,e&&e.length?Dm(e,void 0,t):[]}var Jm=0;function Ym(e){var t=++Jm;return Pa(e)+t}function Gm(e,t){return null==e||ph(e,t)}var Qm=Math.max;function Zm(e){if(!e||!e.length)return[];var t=0;return e=Ol(e,function(e){if(kc(e))return t=Qm(e.length,t),!0}),Li(t,function(t){return Ar(e,Ju(t))})}function Xm(e,t){if(!e||!e.length)return[];var n=Zm(e);return null==t?n:Ar(n,function(e){return bo(t,void 0,e)})}function ey(e,t,n,r){return vh(e,t,n(Ia(e,t)),r)}function ty(e,t,n){return null==e?e:ey(e,t,Xc(n))}function ny(e,t,n,r){return r="function"==typeof r?r:void 0,null==e?e:ey(e,t,Xc(n),r)}var ry=al(function(e,t,n){return e+(n?" ":"")+t.toUpperCase()}),oy=ry;function iy(e){return null==e?[]:yp(e,sa(e))}var ay=Si(function(e,t){return kc(e)?Wc(e,t):[]}),sy=ay;function ly(e,t){return ig(Xc(t),e)}var uy=Ua(function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,o=function(t){return Ba(t,e)};return!(t>1||this.__actions__.length)&&r instanceof ko&&ii(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:pm,args:[o],thisArg:void 0}),new Po(r,this.__chain__).thru(function(e){return t&&!e.length&&e.push(void 0),e})):this.thru(o)}),cy=uy;function dy(){return hl(this)}function py(){var e=this.__wrapped__;if(e instanceof ko){var t=e;return this.__actions__.length&&(t=new ko(this)),(t=t.reverse()).__actions__.push({func:pm,args:[Gg],thisArg:void 0}),new Po(t,this.__chain__)}return this.thru(Gg)}function fy(e,t,n){var r=e.length;if(r<2)return r?Dm(e[0]):[];for(var o=-1,i=Array(r);++o<r;)for(var a=e[o],s=-1;++s<r;)s!=o&&(i[o]=Wc(i[o]||a,e[s],t,n));return Dm(za(i,1),t,n)}var hy=Si(function(e){return fy(Ol(e,kc))}),gy=Si(function(e){var t=Fc(e);return kc(t)&&(t=void 0),fy(Ol(e,kc),Gu(t))}),vy=gy,my=Si(function(e){var t=Fc(e);return t="function"==typeof t?t:void 0,fy(Ol(e,kc),void 0,t)}),yy=Si(Zm);function by(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 _y(e,t){return by(e||[],t||[],bi)}function xy(e,t){return by(e||[],t||[],vh)}var wy=Si(function(e){var t=e.length,n=t>1?e[t-1]:void 0;return n="function"==typeof n?(e.pop(),n):void 0,Xm(e,n)}),Sy=wy,Ey={chunk:ml,compact:wu,concat:Su,difference:zc,differenceBy:Hc,differenceWith:qc,drop:Jc,dropRight:Yc,dropRightWhile:Qc,dropWhile:Zc,fill:xd,findIndex:Cd,findLastIndex:Pd,first:Id,flatten:Fa,flattenDeep:Ud,flattenDepth:Hd,fromPairs:ep,head:Id,indexOf:Sp,initial:Ep,intersection:Ap,intersectionBy:Lp,intersectionWith:Rp,join:Sf,last:Fc,lastIndexOf:Lf,nth:uh,pull:yg,pullAll:mg,pullAllBy:bg,pullAllWith:_g,pullAt:Eg,remove:Hg,reverse:Gg,slice:dv,sortedIndex:wv,sortedIndexBy:Sv,sortedIndexOf:Ev,sortedLastIndex:kv,sortedLastIndexBy:Cv,sortedLastIndexOf:Ov,sortedUniq:jv,sortedUniqBy:Lv,tail:Uv,take:Hv,takeRight:Vv,takeRightWhile:qv,takeWhile:Kv,union:zm,unionBy:Um,unionWith:Hm,uniq:Vm,uniqBy:qm,uniqWith:Km,unzip:Zm,unzipWith:Xm,without:sy,xor:hy,xorBy:vy,xorWith:my,zip:yy,zipObject:_y,zipObjectDeep:xy,zipWith:Sy},ky={countBy:dc,each:ed,eachRight:id,every:bd,filter:Sd,find:Od,findLast:Md,flatMap:$d,flatMapDeep:Dd,flatMapDepth:zd,forEach:ed,forEachRight:id,groupBy:ap,includes:xp,invokeMap:Vp,keyBy:Of,map:Bd,orderBy:Sh,partition:ug,reduce:Dg,reduceRight:Fg,reject:Ug,sample:ev,sampleSize:ov,shuffle:uv,size:cv,some:gv,sortBy:mv},Cy={now:gc},Oy={after:Jr,ary:gi,before:ts,bind:rs,bindKey:ss,curry:fc,curryRight:hc,debounce:yc,defer:Ic,delay:Bc,flip:Vd,memoize:Oa,negate:oh,once:_h,overArgs:jh,partial:ig,partialRight:sg,rearg:$g,rest:Kg,spread:Mv,throttle:dm,unary:Mm,wrap:ly},Ay={castArray:ul,clone:mu,cloneDeep:yu,cloneDeepWith:bu,cloneWith:_u,conformsTo:ec,eq:mi,gt:up,gte:cp,isArguments:Ii,isArray:jr,isArrayBuffer:Kp,isArrayLike:ki,isArrayLikeObject:kc,isBoolean:Jp,isBuffer:Di,isDate:Gp,isElement:Qp,isEmpty:Xp,isEqual:ef,isEqualWith:tf,isError:Za,isFinite:rf,isFunction:Gr,isInteger:of,isLength:Ei,isMap:uu,isMatch:af,isMatchWith:sf,isNaN:uf,isNative:df,isNil:pf,isNull:ff,isNumber:lf,isObject:Wr,isObjectLike:kr,isPlainObject:Qa,isRegExp:gf,isSafeInteger:mf,isSet:du,isString:mp,isSymbol:Cr,isTypedArray:Ji,isUndefined:yf,isWeakMap:bf,isWeakSet:_f,lt:If,lte:Tf,toArray:ah,toFinite:qr,toInteger:Kr,toLength:_d,toNumber:Hr,toPlainObject:Oc,toSafeInteger:wm,toString:Pa},jy={add:Nr,ceil:fl,divide:Kc,floor:qd,max:Ff,maxBy:Uf,mean:qf,meanBy:Kf,min:eh,minBy:th,multiply:rh,round:Qg,subtract:Dv,sum:zv,sumBy:Fv},Ly=bl,Ry=vp,Py=Rg,My={assign:oa,assignIn:ua,assignInWith:da,assignWith:fa,at:Ha,create:pc,defaults:Sc,defaultsDeep:Pc,entries:ld,entriesIn:ud,extend:ua,extendWith:da,findKey:jd,findLastKey:Nd,forIn:Gd,forInRight:Qd,forOwn:Zd,forOwnRight:Xd,functions:np,functionsIn:rp,get:Ta,has:fp,hasIn:qu,invert:Ip,invertBy:Dp,invoke:Up,keys:ta,keysIn:sa,mapKeys:Bf,mapValues:$f,merge:Yf,mergeWith:Rc,omit:gh,omitBy:bh,pick:dg,pickBy:yh,result:Jg,set:iv,setWith:av,toPairs:ld,toPairsIn:ud,transform:Em,unset:Gm,update:ty,updateWith:ny,values:bp,valuesIn:iy},Ny={at:cy,chain:hl,commit:xu,lodash:To,next:sh,plant:pg,reverse:py,tap:Jv,thru:pm,toIterator:vm,toJSON:ym,value:ym,valueOf:ym,wrapperChain:dy},Iy={camelCase:ll,capitalize:Os,deburr:Ms,endsWith:ad,escape:fd,escapeRegExp:vd,kebabCase:kf,lowerCase:Pf,lowerFirst:Mf,pad:Zh,padEnd:Xh,padStart:eg,parseInt:rg,repeat:Vg,replace:qg,snakeCase:fv,split:Rv,startCase:Iv,startsWith:Tv,template:cm,templateSettings:tm,toLower:bm,toUpper:Sm,trim:Om,trimEnd:Am,trimStart:Lm,truncate:Pm,unescape:Bm,upperCase:oy,upperFirst:Cs,words:ol},Ty={attempt:es,bindAll:is,cond:Qu,conforms:Xu,constant:Ho,defaultTo:bc,flow:Jd,flowRight:Yd,identity:Yr,iteratee:xf,matches:Wf,matchesProperty:Df,method:Qf,methodOf:Xf,mixin:nh,noop:Co,nthArg:ch,over:kh,overEvery:Lh,overSome:Rh,property:Yu,propertyOf:fg,range:Ig,rangeRight:Tg,stubArray:Al,stubFalse:Ti,stubObject:Bv,stubString:$v,stubTrue:Wv,times:gm,toPath:_m,uniqueId:Ym};var By=Math.max,$y=Math.min;var Wy=Math.min;var Dy,zy=4294967295,Fy=Array.prototype,Uy=Object.prototype.hasOwnProperty,Hy=mr?mr.iterator:void 0,Vy=Math.max,qy=Math.min,Ky=function(e){return function(t,n,r){if(null==r){var o=Wr(n),i=o&&ta(n),a=i&&i.length&&tp(n,i);(a?a.length:o)||(r=n,n=t,t=this)}return e(t,n,r)}}(nh);To.after=Oy.after,To.ary=Oy.ary,To.assign=My.assign,To.assignIn=My.assignIn,To.assignInWith=My.assignInWith,To.assignWith=My.assignWith,To.at=My.at,To.before=Oy.before,To.bind=Oy.bind,To.bindAll=Ty.bindAll,To.bindKey=Oy.bindKey,To.castArray=Ay.castArray,To.chain=Ny.chain,To.chunk=Ey.chunk,To.compact=Ey.compact,To.concat=Ey.concat,To.cond=Ty.cond,To.conforms=Ty.conforms,To.constant=Ty.constant,To.countBy=ky.countBy,To.create=My.create,To.curry=Oy.curry,To.curryRight=Oy.curryRight,To.debounce=Oy.debounce,To.defaults=My.defaults,To.defaultsDeep=My.defaultsDeep,To.defer=Oy.defer,To.delay=Oy.delay,To.difference=Ey.difference,To.differenceBy=Ey.differenceBy,To.differenceWith=Ey.differenceWith,To.drop=Ey.drop,To.dropRight=Ey.dropRight,To.dropRightWhile=Ey.dropRightWhile,To.dropWhile=Ey.dropWhile,To.fill=Ey.fill,To.filter=ky.filter,To.flatMap=ky.flatMap,To.flatMapDeep=ky.flatMapDeep,To.flatMapDepth=ky.flatMapDepth,To.flatten=Ey.flatten,To.flattenDeep=Ey.flattenDeep,To.flattenDepth=Ey.flattenDepth,To.flip=Oy.flip,To.flow=Ty.flow,To.flowRight=Ty.flowRight,To.fromPairs=Ey.fromPairs,To.functions=My.functions,To.functionsIn=My.functionsIn,To.groupBy=ky.groupBy,To.initial=Ey.initial,To.intersection=Ey.intersection,To.intersectionBy=Ey.intersectionBy,To.intersectionWith=Ey.intersectionWith,To.invert=My.invert,To.invertBy=My.invertBy,To.invokeMap=ky.invokeMap,To.iteratee=Ty.iteratee,To.keyBy=ky.keyBy,To.keys=ta,To.keysIn=My.keysIn,To.map=ky.map,To.mapKeys=My.mapKeys,To.mapValues=My.mapValues,To.matches=Ty.matches,To.matchesProperty=Ty.matchesProperty,To.memoize=Oy.memoize,To.merge=My.merge,To.mergeWith=My.mergeWith,To.method=Ty.method,To.methodOf=Ty.methodOf,To.mixin=Ky,To.negate=oh,To.nthArg=Ty.nthArg,To.omit=My.omit,To.omitBy=My.omitBy,To.once=Oy.once,To.orderBy=ky.orderBy,To.over=Ty.over,To.overArgs=Oy.overArgs,To.overEvery=Ty.overEvery,To.overSome=Ty.overSome,To.partial=Oy.partial,To.partialRight=Oy.partialRight,To.partition=ky.partition,To.pick=My.pick,To.pickBy=My.pickBy,To.property=Ty.property,To.propertyOf=Ty.propertyOf,To.pull=Ey.pull,To.pullAll=Ey.pullAll,To.pullAllBy=Ey.pullAllBy,To.pullAllWith=Ey.pullAllWith,To.pullAt=Ey.pullAt,To.range=Ty.range,To.rangeRight=Ty.rangeRight,To.rearg=Oy.rearg,To.reject=ky.reject,To.remove=Ey.remove,To.rest=Oy.rest,To.reverse=Ey.reverse,To.sampleSize=ky.sampleSize,To.set=My.set,To.setWith=My.setWith,To.shuffle=ky.shuffle,To.slice=Ey.slice,To.sortBy=ky.sortBy,To.sortedUniq=Ey.sortedUniq,To.sortedUniqBy=Ey.sortedUniqBy,To.split=Iy.split,To.spread=Oy.spread,To.tail=Ey.tail,To.take=Ey.take,To.takeRight=Ey.takeRight,To.takeRightWhile=Ey.takeRightWhile,To.takeWhile=Ey.takeWhile,To.tap=Ny.tap,To.throttle=Oy.throttle,To.thru=pm,To.toArray=Ay.toArray,To.toPairs=My.toPairs,To.toPairsIn=My.toPairsIn,To.toPath=Ty.toPath,To.toPlainObject=Ay.toPlainObject,To.transform=My.transform,To.unary=Oy.unary,To.union=Ey.union,To.unionBy=Ey.unionBy,To.unionWith=Ey.unionWith,To.uniq=Ey.uniq,To.uniqBy=Ey.uniqBy,To.uniqWith=Ey.uniqWith,To.unset=My.unset,To.unzip=Ey.unzip,To.unzipWith=Ey.unzipWith,To.update=My.update,To.updateWith=My.updateWith,To.values=My.values,To.valuesIn=My.valuesIn,To.without=Ey.without,To.words=Iy.words,To.wrap=Oy.wrap,To.xor=Ey.xor,To.xorBy=Ey.xorBy,To.xorWith=Ey.xorWith,To.zip=Ey.zip,To.zipObject=Ey.zipObject,To.zipObjectDeep=Ey.zipObjectDeep,To.zipWith=Ey.zipWith,To.entries=My.toPairs,To.entriesIn=My.toPairsIn,To.extend=My.assignIn,To.extendWith=My.assignInWith,Ky(To,To),To.add=jy.add,To.attempt=Ty.attempt,To.camelCase=Iy.camelCase,To.capitalize=Iy.capitalize,To.ceil=jy.ceil,To.clamp=Ly,To.clone=Ay.clone,To.cloneDeep=Ay.cloneDeep,To.cloneDeepWith=Ay.cloneDeepWith,To.cloneWith=Ay.cloneWith,To.conformsTo=Ay.conformsTo,To.deburr=Iy.deburr,To.defaultTo=Ty.defaultTo,To.divide=jy.divide,To.endsWith=Iy.endsWith,To.eq=Ay.eq,To.escape=Iy.escape,To.escapeRegExp=Iy.escapeRegExp,To.every=ky.every,To.find=ky.find,To.findIndex=Ey.findIndex,To.findKey=My.findKey,To.findLast=ky.findLast,To.findLastIndex=Ey.findLastIndex,To.findLastKey=My.findLastKey,To.floor=jy.floor,To.forEach=ky.forEach,To.forEachRight=ky.forEachRight,To.forIn=My.forIn,To.forInRight=My.forInRight,To.forOwn=My.forOwn,To.forOwnRight=My.forOwnRight,To.get=My.get,To.gt=Ay.gt,To.gte=Ay.gte,To.has=My.has,To.hasIn=My.hasIn,To.head=Ey.head,To.identity=Yr,To.includes=ky.includes,To.indexOf=Ey.indexOf,To.inRange=Ry,To.invoke=My.invoke,To.isArguments=Ay.isArguments,To.isArray=jr,To.isArrayBuffer=Ay.isArrayBuffer,To.isArrayLike=Ay.isArrayLike,To.isArrayLikeObject=Ay.isArrayLikeObject,To.isBoolean=Ay.isBoolean,To.isBuffer=Ay.isBuffer,To.isDate=Ay.isDate,To.isElement=Ay.isElement,To.isEmpty=Ay.isEmpty,To.isEqual=Ay.isEqual,To.isEqualWith=Ay.isEqualWith,To.isError=Ay.isError,To.isFinite=Ay.isFinite,To.isFunction=Ay.isFunction,To.isInteger=Ay.isInteger,To.isLength=Ay.isLength,To.isMap=Ay.isMap,To.isMatch=Ay.isMatch,To.isMatchWith=Ay.isMatchWith,To.isNaN=Ay.isNaN,To.isNative=Ay.isNative,To.isNil=Ay.isNil,To.isNull=Ay.isNull,To.isNumber=Ay.isNumber,To.isObject=Wr,To.isObjectLike=Ay.isObjectLike,To.isPlainObject=Ay.isPlainObject,To.isRegExp=Ay.isRegExp,To.isSafeInteger=Ay.isSafeInteger,To.isSet=Ay.isSet,To.isString=Ay.isString,To.isSymbol=Ay.isSymbol,To.isTypedArray=Ay.isTypedArray,To.isUndefined=Ay.isUndefined,To.isWeakMap=Ay.isWeakMap,To.isWeakSet=Ay.isWeakSet,To.join=Ey.join,To.kebabCase=Iy.kebabCase,To.last=Fc,To.lastIndexOf=Ey.lastIndexOf,To.lowerCase=Iy.lowerCase,To.lowerFirst=Iy.lowerFirst,To.lt=Ay.lt,To.lte=Ay.lte,To.max=jy.max,To.maxBy=jy.maxBy,To.mean=jy.mean,To.meanBy=jy.meanBy,To.min=jy.min,To.minBy=jy.minBy,To.stubArray=Ty.stubArray,To.stubFalse=Ty.stubFalse,To.stubObject=Ty.stubObject,To.stubString=Ty.stubString,To.stubTrue=Ty.stubTrue,To.multiply=jy.multiply,To.nth=Ey.nth,To.noop=Ty.noop,To.now=Cy.now,To.pad=Iy.pad,To.padEnd=Iy.padEnd,To.padStart=Iy.padStart,To.parseInt=Iy.parseInt,To.random=Py,To.reduce=ky.reduce,To.reduceRight=ky.reduceRight,To.repeat=Iy.repeat,To.replace=Iy.replace,To.result=My.result,To.round=jy.round,To.sample=ky.sample,To.size=ky.size,To.snakeCase=Iy.snakeCase,To.some=ky.some,To.sortedIndex=Ey.sortedIndex,To.sortedIndexBy=Ey.sortedIndexBy,To.sortedIndexOf=Ey.sortedIndexOf,To.sortedLastIndex=Ey.sortedLastIndex,To.sortedLastIndexBy=Ey.sortedLastIndexBy,To.sortedLastIndexOf=Ey.sortedLastIndexOf,To.startCase=Iy.startCase,To.startsWith=Iy.startsWith,To.subtract=jy.subtract,To.sum=jy.sum,To.sumBy=jy.sumBy,To.template=Iy.template,To.times=Ty.times,To.toFinite=Ay.toFinite,To.toInteger=Kr,To.toLength=Ay.toLength,To.toLower=Iy.toLower,To.toNumber=Ay.toNumber,To.toSafeInteger=Ay.toSafeInteger,To.toString=Ay.toString,To.toUpper=Iy.toUpper,To.trim=Iy.trim,To.trimEnd=Iy.trimEnd,To.trimStart=Iy.trimStart,To.truncate=Iy.truncate,To.unescape=Iy.unescape,To.uniqueId=Ty.uniqueId,To.upperCase=Iy.upperCase,To.upperFirst=Iy.upperFirst,To.each=ky.forEach,To.eachRight=ky.forEachRight,To.first=Ey.head,Ky(To,(Dy={},oc(To,function(e,t){Uy.call(To.prototype,t)||(Dy[t]=e)}),Dy),{chain:!1}),To.VERSION="4.17.23",(To.templateSettings=Iy.templateSettings).imports._=To,Yo(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){To[e].placeholder=To}),Yo(["drop","take"],function(e,t){ko.prototype[e]=function(n){n=void 0===n?1:Vy(Kr(n),0);var r=this.__filtered__&&!t?new ko(this):this.clone();return r.__filtered__?r.__takeCount__=qy(n,r.__takeCount__):r.__views__.push({size:qy(n,zy),type:e+(r.__dir__<0?"Right":"")}),r},ko.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}}),Yo(["filter","map","takeWhile"],function(e,t){var n=t+1,r=1==n||3==n;ko.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:Gu(e),type:n}),t.__filtered__=t.__filtered__||r,t}}),Yo(["head","last"],function(e,t){var n="take"+(t?"Right":"");ko.prototype[e]=function(){return this[n](1).value()[0]}}),Yo(["initial","tail"],function(e,t){var n="drop"+(t?"":"Right");ko.prototype[e]=function(){return this.__filtered__?new ko(this):this[n](1)}}),ko.prototype.compact=function(){return this.filter(Yr)},ko.prototype.find=function(e){return this.filter(e).head()},ko.prototype.findLast=function(e){return this.reverse().find(e)},ko.prototype.invokeMap=Si(function(e,t){return"function"==typeof e?new ko(this):this.map(function(n){return Fp(n,e,t)})}),ko.prototype.reject=function(e){return this.filter(oh(Gu(e)))},ko.prototype.slice=function(e,t){e=Kr(e);var n=this;return n.__filtered__&&(e>0||t<0)?new ko(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),void 0!==t&&(n=(t=Kr(t))<0?n.dropRight(-t):n.take(t-e)),n)},ko.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},ko.prototype.toArray=function(){return this.take(zy)},oc(ko.prototype,function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),o=To[r?"take"+("last"==t?"Right":""):t],i=r||/^find/.test(t);o&&(To.prototype[t]=function(){var t=this.__wrapped__,a=r?[1]:arguments,s=t instanceof ko,l=a[0],u=s||jr(t),c=function(e){var t=o.apply(To,$a([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 ko(this);var g=e.apply(t,a);return g.__actions__.push({func:pm,args:[c],thisArg:void 0}),new Po(g,d)}return f&&h?e.apply(this,a):(g=this.thru(c),f?r?g.value()[0]:g.value():g)})}),Yo(["pop","push","shift","sort","splice","unshift"],function(e){var t=Fy[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);To.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var o=this.value();return t.apply(jr(o)?o:[],e)}return this[n](function(n){return t.apply(jr(n)?n:[],e)})}}),oc(ko.prototype,function(e,t){var n=To[t];if(n){var r=n.name+"";Uy.call(jo,r)||(jo[r]=[]),jo[r].push({name:t,func:n})}}),jo[ui(void 0,2).name]=[{name:"wrapper",func:void 0}],ko.prototype.clone=function(){var e=new ko(this.__wrapped__);return e.__actions__=Mo(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Mo(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Mo(this.__views__),e},ko.prototype.reverse=function(){if(this.__filtered__){var e=new ko(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},ko.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=jr(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=$y(t,e+a);break;case"takeRight":e=By(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=Wy(l,this.__takeCount__);if(!n||!r&&o==l&&f==l)return mm(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},To.prototype.at=Ny.at,To.prototype.chain=Ny.wrapperChain,To.prototype.commit=Ny.commit,To.prototype.next=Ny.next,To.prototype.plant=Ny.plant,To.prototype.reverse=Ny.reverse,To.prototype.toJSON=To.prototype.valueOf=To.prototype.value=Ny.value,To.prototype.first=To.prototype.head,Hy&&(To.prototype[Hy]=Ny.toIterator);var Jy=p(Object.freeze({__proto__:null,add:Nr,after:Jr,ary:gi,assign:oa,assignIn:ua,assignInWith:da,assignWith:fa,at:Ha,attempt:es,before:ts,bind:rs,bindAll:is,bindKey:ss,camelCase:ll,capitalize:Os,castArray:ul,ceil:fl,chain:hl,chunk:ml,clamp:bl,clone:mu,cloneDeep:yu,cloneDeepWith:bu,cloneWith:_u,commit:xu,compact:wu,concat:Su,cond:Qu,conforms:Xu,conformsTo:ec,constant:Ho,countBy:dc,create:pc,curry:fc,curryRight:hc,debounce:yc,deburr:Ms,defaultTo:bc,defaults:Sc,defaultsDeep:Pc,defer:Ic,delay:Bc,difference:zc,differenceBy:Hc,differenceWith:qc,divide:Kc,drop:Jc,dropRight:Yc,dropRightWhile:Qc,dropWhile:Zc,each:ed,eachRight:id,endsWith:ad,entries:ld,entriesIn:ud,eq:mi,escape:fd,escapeRegExp:vd,every:bd,extend:ua,extendWith:da,fill:xd,filter:Sd,find:Od,findIndex:Cd,findKey:jd,findLast:Md,findLastIndex:Pd,findLastKey:Nd,first:Id,flatMap:$d,flatMapDeep:Dd,flatMapDepth:zd,flatten:Fa,flattenDeep:Ud,flattenDepth:Hd,flip:Vd,floor:qd,flow:Jd,flowRight:Yd,forEach:ed,forEachRight:id,forIn:Gd,forInRight:Qd,forOwn:Zd,forOwnRight:Xd,fromPairs:ep,functions:np,functionsIn:rp,get:Ta,groupBy:ap,gt:up,gte:cp,has:fp,hasIn:qu,head:Id,identity:Yr,inRange:vp,includes:xp,indexOf:Sp,initial:Ep,intersection:Ap,intersectionBy:Lp,intersectionWith:Rp,invert:Ip,invertBy:Dp,invoke:Up,invokeMap:Vp,isArguments:Ii,isArray:jr,isArrayBuffer:Kp,isArrayLike:ki,isArrayLikeObject:kc,isBoolean:Jp,isBuffer:Di,isDate:Gp,isElement:Qp,isEmpty:Xp,isEqual:ef,isEqualWith:tf,isError:Za,isFinite:rf,isFunction:Gr,isInteger:of,isLength:Ei,isMap:uu,isMatch:af,isMatchWith:sf,isNaN:uf,isNative:df,isNil:pf,isNull:ff,isNumber:lf,isObject:Wr,isObjectLike:kr,isPlainObject:Qa,isRegExp:gf,isSafeInteger:mf,isSet:du,isString:mp,isSymbol:Cr,isTypedArray:Ji,isUndefined:yf,isWeakMap:bf,isWeakSet:_f,iteratee:xf,join:Sf,kebabCase:kf,keyBy:Of,keys:ta,keysIn:sa,last:Fc,lastIndexOf:Lf,lodash:To,lowerCase:Pf,lowerFirst:Mf,lt:If,lte:Tf,map:Bd,mapKeys:Bf,mapValues:$f,matches:Wf,matchesProperty:Df,max:Ff,maxBy:Uf,mean:qf,meanBy:Kf,memoize:Oa,merge:Yf,mergeWith:Rc,method:Qf,methodOf:Xf,min:eh,minBy:th,mixin:nh,multiply:rh,negate:oh,next:sh,noop:Co,now:gc,nth:uh,nthArg:ch,omit:gh,omitBy:bh,once:_h,orderBy:Sh,over:kh,overArgs:jh,overEvery:Lh,overSome:Rh,pad:Zh,padEnd:Xh,padStart:eg,parseInt:rg,partial:ig,partialRight:sg,partition:ug,pick:dg,pickBy:yh,plant:pg,property:Yu,propertyOf:fg,pull:yg,pullAll:mg,pullAllBy:bg,pullAllWith:_g,pullAt:Eg,random:Rg,range:Ig,rangeRight:Tg,rearg:$g,reduce:Dg,reduceRight:Fg,reject:Ug,remove:Hg,repeat:Vg,replace:qg,rest:Kg,result:Jg,reverse:Gg,round:Qg,sample:ev,sampleSize:ov,set:iv,setWith:av,shuffle:uv,size:cv,slice:dv,snakeCase:fv,some:gv,sortBy:mv,sortedIndex:wv,sortedIndexBy:Sv,sortedIndexOf:Ev,sortedLastIndex:kv,sortedLastIndexBy:Cv,sortedLastIndexOf:Ov,sortedUniq:jv,sortedUniqBy:Lv,split:Rv,spread:Mv,startCase:Iv,startsWith:Tv,stubArray:Al,stubFalse:Ti,stubObject:Bv,stubString:$v,stubTrue:Wv,subtract:Dv,sum:zv,sumBy:Fv,tail:Uv,take:Hv,takeRight:Vv,takeRightWhile:qv,takeWhile:Kv,tap:Jv,template:cm,templateSettings:tm,throttle:dm,thru:pm,times:gm,toArray:ah,toFinite:qr,toInteger:Kr,toIterator:vm,toJSON:ym,toLength:_d,toLower:bm,toNumber:Hr,toPairs:ld,toPairsIn:ud,toPath:_m,toPlainObject:Oc,toSafeInteger:wm,toString:Pa,toUpper:Sm,transform:Em,trim:Om,trimEnd:Am,trimStart:Lm,truncate:Pm,unary:Mm,unescape:Bm,union:zm,unionBy:Um,unionWith:Hm,uniq:Vm,uniqBy:qm,uniqWith:Km,uniqueId:Ym,unset:Gm,unzip:Zm,unzipWith:Xm,update:ty,updateWith:ny,upperCase:oy,upperFirst:Cs,value:ym,valueOf:ym,values:bp,valuesIn:iy,without:sy,words:ol,wrap:ly,wrapperAt:cy,wrapperChain:dy,wrapperCommit:xu,wrapperLodash:To,wrapperNext:sh,wrapperPlant:pg,wrapperReverse:py,wrapperToIterator:vm,wrapperValue:ym,xor:hy,xorBy:vy,xorWith:my,zip:yy,zipObject:_y,zipObjectDeep:xy,zipWith:Sy,default:To})),Yy={};Object.defineProperty(Yy,"__esModule",{value:!0}),Yy.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)},Yy.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 Gy=e,Qy=u,Zy=l,Xy=i,eb=c;var tb=y.exports;Object.defineProperty(m,"__esModule",{value:!0}),m.isComplete=m.default=void 0;var nb=tb(b.exports),rb=tb(S),ob=tb(Gy),ib=Qy,ab=Jy,sb=tb(Zy),lb=f,ub=eb,cb=Xy,db=Yy;const pb=(0,sb.default)("pie-ui:multiple-choice"),fb=(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||u>l)};function hb(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=fb;class gb extends HTMLElement{constructor(){super(),(0,nb.default)(this,"_scheduleMathRender",()=>{this._mathRenderPending||(this._mathRenderPending=!0,requestAnimationFrame(()=>{this._mathObserver&&this._mathObserver.disconnect(),pb("render complete - render math"),(0,ub.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,ab.debounce)(()=>{if(this._model&&this._session){var e=ob.default.createElement(rb.default,{model:this._model,session:this._session,options:this._options,onChoiceChanged:this._onChange.bind(this),onShowCorrectToggle:this.onShowCorrectToggle.bind(this),...hb(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,ib.createRoot)(this)),this._root.render(e),!0!==this._model.keyboardEventsEnabled||this._keyboardEventsEnabled||this.enableKeyboardEvents()}else pb("skip")},50,{leading:!1,trailing:!0}),this._dispatchResponseChanged=(0,ab.debounce)(()=>{this.dispatchEvent(new lb.SessionChangedEvent(this.tagName.toLowerCase(),fb(this._session,this._model,this.audioComplete,this)))}),this._dispatchModelSet=(0,ab.debounce)(()=>{this.dispatchEvent(new lb.ModelSetEvent(this.tagName.toLowerCase(),fb(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,ub.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,db.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=cb.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,db.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,db.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()}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={value:o,selected:!r.includes(o),selector:"Keyboard"};this._onChange(i)}}var vb=m.default=gb;const mb=l;const yb=v.TYPE,bb="ebsr-multiple-choice",_b=mb("pie-elements:ebsr");class xb extends vb{}customElements.get(bb)||customElements.define(bb,xb);const wb=e=>Array.isArray(e)&&e.length>0,Sb=e=>{const t=Ta(e,"value.partA.value"),n=Ta(e,"value.partB.value");return wb(t)&&wb(n)};function Eb(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 kb extends HTMLElement{constructor(){super(),kb.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(bb).then(()=>{this.setPartModel(this.partA,"partA"),this.setPartModel(this.partB,"partB")})}set session(e){this._session=e,customElements.whenDefined(bb).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}=Eb(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},_b("[onSessionChanged] session: ",this._session);const n=Sb(this._session);this.dispatchEvent(new v(this.tagName.toLowerCase(),n))}get partA(){return this.querySelector(`${bb}#a`)}get partB(){return this.querySelector(`${bb}#b`)}connectedCallback(){this._render(),this._initPlayerObserver(),this.addEventListener(yb,this.onSessionUpdated)}disconnectedCallback(){this._disconnectPlayerObserver(),this.removeEventListener(yb,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}=Eb(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 <${bb} id="a"></${bb}>\n <${bb} id="b"></${bb}>\n `,customElements.get(bb)&&(this.setPartModel(this.partA,"partA"),this.setPartModel(this.partB,"partB"),this.setPartSession(this.partA,"partA"),this.setPartSession(this.partB,"partB"))}}export{kb as default,Sb 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@^5.2.2/module/index.js";import{_dll_pie_lib__math_rendering as c}from"../../../@pie-lib/math-rendering-module@^5.0.7/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,P=e=>e&&e.indexOf("###")>-1?e.replace(R,"."):e,M=e=>!e||A(e),N=(e,t,n)=>{const r=A(t)?t.split("."):t;let o=0;for(;o<r.length-1;){if(M(e))return{};const t=P(r[o]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++o}return M(e)?{}:{obj:e,k:P(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={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};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,Pe=t;var Me="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?Me:Ne,r.state={status:o},r.nextCallback=null,r}Ce(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===Me?{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:Pe.findDOMNode(this);n&&Le(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Ne&&this.setState({status:Me})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,o=this.props.nodeRef?[r]:[Pe.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:Pe.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:Pe.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===Me)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=Me,$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()})`}}),Pt=(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 Mt 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(Pt,{ref:this.nodeRef},t))))}}(0,St.default)(Mt,"propTypes",{correctness:At.default.string}),we.default=Mt;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()),...e?{}:{"&:hover":{color:`${Zt.color.primaryLight()} !important`}},..."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.focusUncheckedBorder()}`,backgroundColor:Zt.color.focusUnchecked()},focusVisibleChecked:{outline:`2px solid ${Zt.color.focusCheckedBorder()}`,backgroundColor:Zt.color.focusChecked()}}},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")]},"&.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-checked":t.focusVisibleChecked}}}),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,P="horizontal"===c,M="initial"!==A?A:"initial";return wn.default.createElement("div",{className:x,key:t,style:{backgroundColor:M,...L},onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave},wn.default.createElement(On,{component:"div",noBorder:R,horizontalLayout:P},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;const jn=e,Ln=r,Rn=s,Pn=a,Mn=o,{Box:Nn}=n,In=i;var Tn=y.exports;Object.defineProperty(k,"__esModule",{value:!0}),k.default=k.MultipleChoice=void 0;var Bn=Tn(b.exports),$n=Tn(jn),Wn=Tn(Ln),Dn=Tn(Rn),zn=Tn(Pn),Fn=Mn,Un=Tn(Nn),Hn=In,Vn=Tn(be),qn=Tn(_e);const{translator:Kn}=Vn.default,Jn=(0,Fn.styled)(Un.default)({color:Hn.color.text(),backgroundColor:Hn.color.background(),"& *":{"-webkit-font-smoothing":"antialiased"},position:"relative","& legend":{border:"none !important"}}),Yn=(0,Fn.styled)("h2")(({theme:e})=>({display:"block",fontSize:"inherit",margin:"0",fontWeight:"normal",paddingBottom:e.spacing(2)})),Gn=(0,Fn.styled)(Un.default)(({theme:e})=>({marginBottom:e.spacing(2)})),Qn=(0,Fn.styled)(Un.default)({display:"flex",flexDirection:"row",flexWrap:"wrap"}),Zn=(0,Fn.styled)(Un.default)({display:"grid"}),Xn=(0,Fn.styled)("fieldset")({border:"0px",padding:"0.01em 0 0 0",margin:"0px",minWidth:"0px"}),er=(0,Fn.styled)("h3")({position:"absolute",left:"-10000px",top:"auto",width:"1px",height:"1px",overflow:"hidden"}),tr=(0,Fn.styled)("div")(({theme:e})=>({fontSize:e.typography.fontSize-2,color:e.palette.error.main,paddingTop:e.spacing(1)}));class nr extends $n.default.Component{constructor(e){super(e),(0,Bn.default)(this,"handleChange",e=>{const{value:t,checked:n}=e.target,{maxSelections:r,onChoiceChanged:o,session:i}=this.props;i.value&&i.value.length>=r&&(this.setState({maxSelectionsErrorState:n}),n)||o({value:t,selected:n,selector:"Mouse"})}),(0,Bn.default)(this,"onToggle",()=>{"evaluate"===this.props.mode&&this.setState({showCorrect:!this.state.showCorrect},()=>{this.props.onShowCorrectToggle&&this.props.onShowCorrectToggle()})}),(0,Bn.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=er.withComponent(`h${i}`),s="radio"===t?"Multiple Choice Question":"Multiple Select Question";return $n.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=$n.default.createElement(Hn.PreviewPrompt,{tagName:"div",className:"prompt",defaultClassName:"teacher-instructions",prompt:u}),j="grid"===this.props.choicesLayout?Zn:"horizontal"===this.props.choicesLayout?Qn:Un.default;return $n.default.createElement(Jn,{id:"main-container",className:(0,zn.default)(n,"multiple-choice")},a&&$n.default.createElement(Yn,{as:_?`h${Math.min(6,_+1)}`:"h2"},a),this.renderHeading(),u&&$n.default.createElement(Gn,null,d?A:$n.default.createElement(Hn.Collapsible,{labels:{hidden:"Show Teacher Instructions",visible:"Hide Teacher Instructions"}},A)),$n.default.createElement(Xn,{role:"radio"===o?"radiogroup":"group"},$n.default.createElement(Hn.PreviewPrompt,{className:"prompt",defaultClassName:"prompt",prompt:(L=s,L&&O?(0,Hn.transformDataHeadings)(L,O):L),tagName:"legend",autoplayAudioEnabled:v,customAudioButton:y}),!(b&&c)&&$n.default.createElement(Dn.default,{show:E,toggled:x,onToggle:this.onToggle.bind(this),language:p}),$n.default.createElement(j,{style:k},r.map((e,n)=>$n.default.createElement(qn.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&&$n.default.createElement(tr,null,h&&g?h===g?Kn.t("translation:multipleChoice:minmaxSelections_equal",{lng:p,minSelections:h}):Kn.t("translation:multipleChoice:minmaxSelections_range",{lng:p,minSelections:h,maxSelections:g}):h?Kn.t("translation:multipleChoice:minSelections",{lng:p,minSelections:h}):""),"checkbox"===o&&w&&$n.default.createElement(tr,null,Kn.t("translation:multipleChoice:maxSelections_"+(1===g?"one":"other"),{lng:p,maxSelections:g})));var L}}k.MultipleChoice=nr,(0,Bn.default)(nr,"propTypes",{className:Wn.default.string,mode:Wn.default.oneOf(["gather","view","evaluate"]),choiceMode:Wn.default.oneOf(["radio","checkbox"]),keyMode:Wn.default.oneOf(["numbers","letters","none"]),choices:Wn.default.array,partLabel:Wn.default.string,prompt:Wn.default.string,teacherInstructions:Wn.default.string,session:Wn.default.object,disabled:Wn.default.bool,onChoiceChanged:Wn.default.func,responseCorrect:Wn.default.bool,correctResponse:Wn.default.array,choicesLayout:Wn.default.oneOf(["vertical","grid","horizontal"]),gridColumns:Wn.default.string,alwaysShowCorrect:Wn.default.bool,animationsDisabled:Wn.default.bool,language:Wn.default.string,selectedAnswerBackgroundColor:Wn.default.string,selectedAnswerStrokeColor:Wn.default.string,selectedAnswerStrokeWidth:Wn.default.string,hoverAnswerBackgroundColor:Wn.default.string,hoverAnswerStrokeColor:Wn.default.string,hoverAnswerStrokeWidth:Wn.default.string,onShowCorrectToggle:Wn.default.func,isSelectionButtonBelow:Wn.default.bool,minSelections:Wn.default.number,maxSelections:Wn.default.number,autoplayAudioEnabled:Wn.default.bool,customAudioButton:{playImage:Wn.default.string,pauseImage:Wn.default.string},options:Wn.default.object,baseHeadingLevel:Wn.default.number,includeSrHeading:Wn.default.bool}),nr.defaultProps={session:{value:[]}},k.default=nr;const rr=e,or=r,ir=i;var ar=y.exports;Object.defineProperty(S,"__esModule",{value:!0}),S.default=void 0;var sr=ar(E.exports),lr=ar(b.exports),ur=ar(rr),cr=ar(or),dr=ir,pr=ar(k);class fr extends ur.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 ur.default.createElement(dr.PreviewLayout,{extraCSSRules:s,fontSizeFactor:l,classes:{}},ur.default.createElement(pr.default,(0,sr.default)({},e,{options:o,session:n,onChoiceChanged:t,onShowCorrectToggle:r,baseHeadingLevel:i,includeSrHeading:a})))}}(0,lr.default)(fr,"propTypes",{model:cr.default.object,session:cr.default.object,options:cr.default.object,onChoiceChanged:cr.default.func,onShowCorrectToggle:cr.default.func,extraCSSRules:cr.default.shape({names:cr.default.arrayOf(cr.default.string),rules:cr.default.string}),baseHeadingLevel:cr.default.number,includeSrHeading:cr.default.bool}),(0,lr.default)(fr,"defaultProps",{model:{},session:{}}),S.default=fr;var hr="object"==typeof global&&global&&global.Object===Object&&global,gr="object"==typeof self&&self&&self.Object===Object&&self,vr=hr||gr||Function("return this")(),mr=vr.Symbol,yr=Object.prototype,br=yr.hasOwnProperty,_r=yr.toString,xr=mr?mr.toStringTag:void 0;var wr=Object.prototype.toString;var Sr=mr?mr.toStringTag:void 0;function Er(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Sr&&Sr in Object(e)?function(e){var t=br.call(e,xr),n=e[xr];try{e[xr]=void 0;var r=!0}catch(e){}var o=_r.call(e);return r&&(t?e[xr]=n:delete e[xr]),o}(e):function(e){return wr.call(e)}(e)}function kr(e){return null!=e&&"object"==typeof e}function Cr(e){return"symbol"==typeof e||kr(e)&&"[object Symbol]"==Er(e)}function Or(e){return"number"==typeof e?e:Cr(e)?NaN:+e}function Ar(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 jr=Array.isArray,Lr=mr?mr.prototype:void 0,Rr=Lr?Lr.toString:void 0;function Pr(e){if("string"==typeof e)return e;if(jr(e))return Ar(e,Pr)+"";if(Cr(e))return Rr?Rr.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Mr(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=Pr(n),r=Pr(r)):(n=Or(n),r=Or(r)),o=e(n,r)}return o}}var Nr=Mr(function(e,t){return e+t},0),Ir=/\s/;function Tr(e){for(var t=e.length;t--&&Ir.test(e.charAt(t)););return t}var Br=/^\s+/;function $r(e){return e?e.slice(0,Tr(e)+1).replace(Br,""):e}function Wr(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}var Dr=/^[-+]0x[0-9a-f]+$/i,zr=/^0b[01]+$/i,Fr=/^0o[0-7]+$/i,Ur=parseInt;function Hr(e){if("number"==typeof e)return e;if(Cr(e))return NaN;if(Wr(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Wr(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=$r(e);var n=zr.test(e);return n||Fr.test(e)?Ur(e.slice(2),n?2:8):Dr.test(e)?NaN:+e}var Vr=1/0;function qr(e){return e?(e=Hr(e))===Vr||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function Kr(e){var t=qr(e),n=t%1;return t==t?n?t-n:t:0}function Jr(e,t){if("function"!=typeof t)throw new TypeError("Expected a function");return e=Kr(e),function(){if(--e<1)return t.apply(this,arguments)}}function Yr(e){return e}function Gr(e){if(!Wr(e))return!1;var t=Er(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}var Qr,Zr=vr["__core-js_shared__"],Xr=(Qr=/[^.]+$/.exec(Zr&&Zr.keys&&Zr.keys.IE_PROTO||""))?"Symbol(src)_1."+Qr:"";var eo=Function.prototype.toString;function to(e){if(null!=e){try{return eo.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var no=/^\[object .+?Constructor\]$/,ro=Function.prototype,oo=Object.prototype,io=ro.toString,ao=oo.hasOwnProperty,so=RegExp("^"+io.call(ao).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function lo(e){return!(!Wr(e)||function(e){return!!Xr&&Xr in e}(e))&&(Gr(e)?so:no).test(to(e))}function uo(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return lo(n)?n:void 0}var co=uo(vr,"WeakMap"),po=co&&new co,fo=po?function(e,t){return po.set(e,t),e}:Yr,ho=fo,go=Object.create,vo=function(){function e(){}return function(t){if(!Wr(t))return{};if(go)return go(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}(),mo=vo;function yo(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=mo(e.prototype),r=e.apply(n,t);return Wr(r)?r:n}}function bo(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 _o=Math.max;function xo(e,t,n,r){for(var o=-1,i=e.length,a=n.length,s=-1,l=t.length,u=_o(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 wo=Math.max;function So(e,t,n,r){for(var o=-1,i=e.length,a=-1,s=n.length,l=-1,u=t.length,c=wo(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 Eo(){}function ko(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function Co(){}ko.prototype=mo(Eo.prototype),ko.prototype.constructor=ko;var Oo=po?function(e){return po.get(e)}:Co,Ao=Oo,jo={},Lo=Object.prototype.hasOwnProperty;function Ro(e){for(var t=e.name+"",n=jo[t],r=Lo.call(jo,t)?n.length:0;r--;){var o=n[r],i=o.func;if(null==i||i==e)return o.name}return t}function Po(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}function Mo(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}function No(e){if(e instanceof ko)return e.clone();var t=new Po(e.__wrapped__,e.__chain__);return t.__actions__=Mo(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}Po.prototype=mo(Eo.prototype),Po.prototype.constructor=Po;var Io=Object.prototype.hasOwnProperty;function To(e){if(kr(e)&&!jr(e)&&!(e instanceof ko)){if(e instanceof Po)return e;if(Io.call(e,"__wrapped__"))return No(e)}return new Po(e)}function Bo(e){var t=Ro(e),n=To[t];if("function"!=typeof n||!(t in ko.prototype))return!1;if(e===n)return!0;var r=Ao(n);return!!r&&e===r[0]}To.prototype=Eo.prototype,To.prototype.constructor=To;var $o=Date.now;function Wo(e){var t=0,n=0;return function(){var r=$o(),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 Do=Wo(ho),zo=/\{\n\/\* \[wrapped with (.+)\] \*/,Fo=/,? & /;var Uo=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;function Ho(e){return function(){return e}}var Vo=function(){try{var e=uo(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),qo=Vo,Ko=qo?function(e,t){return qo(e,"toString",{configurable:!0,enumerable:!1,value:Ho(t),writable:!0})}:Yr,Jo=Wo(Ko);function Yo(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function Go(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 Qo(e){return e!=e}function Zo(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):Go(e,Qo,n)}function Xo(e,t){return!!(null==e?0:e.length)&&Zo(e,t,0)>-1}var ei=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]];function ti(e,t,n){var r=t+"";return Jo(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(Uo,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return Yo(ei,function(n){var r="_."+n[0];t&n[1]&&!Xo(e,r)&&e.push(r)}),e.sort()}(function(e){var t=e.match(zo);return t?t[1].split(Fo):[]}(r),n)))}function ni(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 Bo(e)&&Do(p,d),p.placeholder=r,ti(p,e,t)}function ri(e){return e.placeholder}var oi=/^(?:0|[1-9]\d*)$/;function ii(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&oi.test(e))&&e>-1&&e%1==0&&e<t}var ai=Math.min;var si="__lodash_placeholder__";function li(e,t){for(var n=-1,r=e.length,o=0,i=[];++n<r;){var a=e[n];a!==t&&a!==si||(e[n]=si,i[o++]=n)}return i}function ui(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:yo(e);return function v(){for(var m=arguments.length,y=Array(m),b=m;b--;)y[b]=arguments[b];if(f)var _=ri(v),x=function(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}(y,_);if(r&&(y=xo(y,r,o,f)),i&&(y=So(y,i,a,f)),m-=x,f&&m<u){var w=li(y,_);return ni(e,t,ui,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=ai(t.length,n),o=Mo(e);r--;){var i=t[r];e[r]=ii(i,n)?o[i]:void 0}return e}(y,s):h&&m>1&&y.reverse(),c&&l<m&&(y.length=l),this&&this!==vr&&this instanceof v&&(E=g||yo(E)),E.apply(S,y)}}var ci="__lodash_placeholder__",di=128,pi=Math.min;var fi=Math.max;function hi(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:fi(Kr(a),0),s=void 0===s?s:Kr(s),u-=o?o.length:0,64&t){var c=r,d=o;r=o=void 0}var p=l?void 0:Ao(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==di&&8==n||r==di&&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?xo(l,s,t[4]):s,e[4]=l?li(e[3],ci):t[4]}(s=t[5])&&(l=e[5],e[5]=l?So(l,s,t[6]):s,e[6]=l?li(e[5],ci):t[6]),(s=t[7])&&(e[7]=s),r&di&&(e[8]=null==e[8]?t[8]:pi(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:fi(f[9]-u,0))&&24&t&&(t&=-25),t&&1!=t)h=8==t||16==t?function(e,t,n){var r=yo(e);return function o(){for(var i=arguments.length,a=Array(i),s=i,l=ri(o);s--;)a[s]=arguments[s];var u=i<3&&a[0]!==l&&a[i-1]!==l?[]:li(a,l);return(i-=u.length)<n?ni(e,t,ui,o.placeholder,void 0,a,u,void 0,void 0,n-i):bo(this&&this!==vr&&this instanceof o?r:e,this,a)}}(e,t,s):32!=t&&33!=t||o.length?ui.apply(void 0,f):function(e,t,n,r){var o=1&t,i=yo(e);return function t(){for(var a=-1,s=arguments.length,l=-1,u=r.length,c=Array(u+s),d=this&&this!==vr&&this instanceof t?i:e;++l<u;)c[l]=r[l];for(;s--;)c[l++]=arguments[++a];return bo(d,o?n:this,c)}}(e,t,n,r);else var h=function(e,t,n){var r=1&t,o=yo(e);return function t(){return(this&&this!==vr&&this instanceof t?o:e).apply(r?n:this,arguments)}}(e,t,n);return ti((p?ho:Do)(h,f),e,t)}function gi(e,t,n){return t=n?void 0:t,hi(e,128,void 0,void 0,void 0,void 0,t=e&&null==t?e.length:t)}function vi(e,t,n){"__proto__"==t&&qo?qo(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function mi(e,t){return e===t||e!=e&&t!=t}var yi=Object.prototype.hasOwnProperty;function bi(e,t,n){var r=e[t];yi.call(e,t)&&mi(r,n)&&(void 0!==n||t in e)||vi(e,t,n)}function _i(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?vi(n,s,l):bi(n,s,l)}return n}var xi=Math.max;function wi(e,t,n){return t=xi(void 0===t?e.length-1:t,0),function(){for(var r=arguments,o=-1,i=xi(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),bo(e,this,s)}}function Si(e,t){return Jo(wi(e,t,Yr),e+"")}function Ei(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}function ki(e){return null!=e&&Ei(e.length)&&!Gr(e)}function Ci(e,t,n){if(!Wr(n))return!1;var r=typeof t;return!!("number"==r?ki(n)&&ii(t,n.length):"string"==r&&t in n)&&mi(n[t],e)}function Oi(e){return Si(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&&Ci(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 Ai=Object.prototype;function ji(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Ai)}function Li(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Ri(e){return kr(e)&&"[object Arguments]"==Er(e)}var Pi=Object.prototype,Mi=Pi.hasOwnProperty,Ni=Pi.propertyIsEnumerable,Ii=Ri(function(){return arguments}())?Ri:function(e){return kr(e)&&Mi.call(e,"callee")&&!Ni.call(e,"callee")};function Ti(){return!1}var Bi="object"==typeof exports&&exports&&!exports.nodeType&&exports,$i=Bi&&"object"==typeof module&&module&&!module.nodeType&&module,Wi=$i&&$i.exports===Bi?vr.Buffer:void 0,Di=(Wi?Wi.isBuffer:void 0)||Ti,zi={};function Fi(e){return function(t){return e(t)}}zi["[object Float32Array]"]=zi["[object Float64Array]"]=zi["[object Int8Array]"]=zi["[object Int16Array]"]=zi["[object Int32Array]"]=zi["[object Uint8Array]"]=zi["[object Uint8ClampedArray]"]=zi["[object Uint16Array]"]=zi["[object Uint32Array]"]=!0,zi["[object Arguments]"]=zi["[object Array]"]=zi["[object ArrayBuffer]"]=zi["[object Boolean]"]=zi["[object DataView]"]=zi["[object Date]"]=zi["[object Error]"]=zi["[object Function]"]=zi["[object Map]"]=zi["[object Number]"]=zi["[object Object]"]=zi["[object RegExp]"]=zi["[object Set]"]=zi["[object String]"]=zi["[object WeakMap]"]=!1;var Ui="object"==typeof exports&&exports&&!exports.nodeType&&exports,Hi=Ui&&"object"==typeof module&&module&&!module.nodeType&&module,Vi=Hi&&Hi.exports===Ui&&hr.process,qi=function(){try{var e=Hi&&Hi.require&&Hi.require("util").types;return e||Vi&&Vi.binding&&Vi.binding("util")}catch(e){}}(),Ki=qi&&qi.isTypedArray,Ji=Ki?Fi(Ki):function(e){return kr(e)&&Ei(e.length)&&!!zi[Er(e)]},Yi=Object.prototype.hasOwnProperty;function Gi(e,t){var n=jr(e),r=!n&&Ii(e),o=!n&&!r&&Di(e),i=!n&&!r&&!o&&Ji(e),a=n||r||o||i,s=a?Li(e.length,String):[],l=s.length;for(var u in e)!t&&!Yi.call(e,u)||a&&("length"==u||o&&("offset"==u||"parent"==u)||i&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||ii(u,l))||s.push(u);return s}function Qi(e,t){return function(n){return e(t(n))}}var Zi=Qi(Object.keys,Object),Xi=Object.prototype.hasOwnProperty;function ea(e){if(!ji(e))return Zi(e);var t=[];for(var n in Object(e))Xi.call(e,n)&&"constructor"!=n&&t.push(n);return t}function ta(e){return ki(e)?Gi(e):ea(e)}var na=Object.prototype.hasOwnProperty,ra=Oi(function(e,t){if(ji(t)||ki(t))_i(t,ta(t),e);else for(var n in t)na.call(t,n)&&bi(e,n,t[n])}),oa=ra;var ia=Object.prototype.hasOwnProperty;function aa(e){if(!Wr(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=ji(e),n=[];for(var r in e)("constructor"!=r||!t&&ia.call(e,r))&&n.push(r);return n}function sa(e){return ki(e)?Gi(e,!0):aa(e)}var la=Oi(function(e,t){_i(t,sa(t),e)}),ua=la,ca=Oi(function(e,t,n,r){_i(t,sa(t),e,r)}),da=ca,pa=Oi(function(e,t,n,r){_i(t,ta(t),e,r)}),fa=pa,ha=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ga=/^\w*$/;function va(e,t){if(jr(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!Cr(e))||(ga.test(e)||!ha.test(e)||null!=t&&e in Object(t))}var ma=uo(Object,"create");var ya=Object.prototype.hasOwnProperty;var ba=Object.prototype.hasOwnProperty;function _a(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 xa(e,t){for(var n=e.length;n--;)if(mi(e[n][0],t))return n;return-1}_a.prototype.clear=function(){this.__data__=ma?ma(null):{},this.size=0},_a.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},_a.prototype.get=function(e){var t=this.__data__;if(ma){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return ya.call(t,e)?t[e]:void 0},_a.prototype.has=function(e){var t=this.__data__;return ma?void 0!==t[e]:ba.call(t,e)},_a.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=ma&&void 0===t?"__lodash_hash_undefined__":t,this};var wa=Array.prototype.splice;function Sa(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])}}Sa.prototype.clear=function(){this.__data__=[],this.size=0},Sa.prototype.delete=function(e){var t=this.__data__,n=xa(t,e);return!(n<0)&&(n==t.length-1?t.pop():wa.call(t,n,1),--this.size,!0)},Sa.prototype.get=function(e){var t=this.__data__,n=xa(t,e);return n<0?void 0:t[n][1]},Sa.prototype.has=function(e){return xa(this.__data__,e)>-1},Sa.prototype.set=function(e,t){var n=this.__data__,r=xa(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};var Ea=uo(vr,"Map");function ka(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 Ca(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])}}Ca.prototype.clear=function(){this.size=0,this.__data__={hash:new _a,map:new(Ea||Sa),string:new _a}},Ca.prototype.delete=function(e){var t=ka(this,e).delete(e);return this.size-=t?1:0,t},Ca.prototype.get=function(e){return ka(this,e).get(e)},Ca.prototype.has=function(e){return ka(this,e).has(e)},Ca.prototype.set=function(e,t){var n=ka(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};function Oa(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(Oa.Cache||Ca),n}Oa.Cache=Ca;var Aa=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ja=/\\(\\)?/g,La=function(e){var t=Oa(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(Aa,function(e,n,r,o){t.push(r?o.replace(ja,"$1"):n||e)}),t}),Ra=La;function Pa(e){return null==e?"":Pr(e)}function Ma(e,t){return jr(e)?e:va(e,t)?[e]:Ra(Pa(e))}function Na(e){if("string"==typeof e||Cr(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Ia(e,t){for(var n=0,r=(t=Ma(t,e)).length;null!=e&&n<r;)e=e[Na(t[n++])];return n&&n==r?e:void 0}function Ta(e,t,n){var r=null==e?void 0:Ia(e,t);return void 0===r?n:r}function Ba(e,t){for(var n=-1,r=t.length,o=Array(r),i=null==e;++n<r;)o[n]=i?void 0:Ta(e,t[n]);return o}function $a(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}var Wa=mr?mr.isConcatSpreadable:void 0;function Da(e){return jr(e)||Ii(e)||!!(Wa&&e&&e[Wa])}function za(e,t,n,r,o){var i=-1,a=e.length;for(n||(n=Da),o||(o=[]);++i<a;){var s=e[i];t>0&&n(s)?t>1?za(s,t-1,n,r,o):$a(o,s):r||(o[o.length]=s)}return o}function Fa(e){return(null==e?0:e.length)?za(e,1):[]}function Ua(e){return Jo(wi(e,void 0,Fa),e+"")}var Ha=Ua(Ba),Va=Qi(Object.getPrototypeOf,Object),qa=Function.prototype,Ka=Object.prototype,Ja=qa.toString,Ya=Ka.hasOwnProperty,Ga=Ja.call(Object);function Qa(e){if(!kr(e)||"[object Object]"!=Er(e))return!1;var t=Va(e);if(null===t)return!0;var n=Ya.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Ja.call(n)==Ga}function Za(e){if(!kr(e))return!1;var t=Er(e);return"[object Error]"==t||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!Qa(e)}var Xa=Si(function(e,t){try{return bo(e,void 0,t)}catch(e){return Za(e)?e:new Error(e)}}),es=Xa;function ts(e,t){var n;if("function"!=typeof t)throw new TypeError("Expected a function");return e=Kr(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=void 0),n}}var ns=Si(function(e,t,n){var r=1;if(n.length){var o=li(n,ri(ns));r|=32}return hi(e,r,t,n,o)});ns.placeholder={};var rs=ns,os=Ua(function(e,t){return Yo(t,function(t){t=Na(t),vi(e,t,rs(e[t],e))}),e}),is=os,as=Si(function(e,t,n){var r=3;if(n.length){var o=li(n,ri(as));r|=32}return hi(t,r,e,n,o)});as.placeholder={};var ss=as;function ls(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 us(e,t,n){var r=e.length;return n=void 0===n?r:n,!t&&n>=r?e:ls(e,t,n)}var cs=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");function ds(e){return cs.test(e)}var ps="\\ud800-\\udfff",fs="["+ps+"]",hs="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",gs="\\ud83c[\\udffb-\\udfff]",vs="[^"+ps+"]",ms="(?:\\ud83c[\\udde6-\\uddff]){2}",ys="[\\ud800-\\udbff][\\udc00-\\udfff]",bs="(?:"+hs+"|"+gs+")"+"?",_s="[\\ufe0e\\ufe0f]?",xs=_s+bs+("(?:\\u200d(?:"+[vs,ms,ys].join("|")+")"+_s+bs+")*"),ws="(?:"+[vs+hs+"?",hs,ms,ys,fs].join("|")+")",Ss=RegExp(gs+"(?="+gs+")|"+ws+xs,"g");function Es(e){return ds(e)?function(e){return e.match(Ss)||[]}(e):function(e){return e.split("")}(e)}function ks(e){return function(t){var n=ds(t=Pa(t))?Es(t):void 0,r=n?n[0]:t.charAt(0),o=n?us(n,1).join(""):t.slice(1);return r[e]()+o}}var Cs=ks("toUpperCase");function Os(e){return Cs(Pa(e).toLowerCase())}function As(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 js(e){return function(t){return null==e?void 0:e[t]}}var Ls=js({"À":"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"}),Rs=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ps=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");function Ms(e){return(e=Pa(e))&&e.replace(Rs,Ls).replace(Ps,"")}var Ns=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;var Is=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;var Ts="\\ud800-\\udfff",Bs="\\u2700-\\u27bf",$s="a-z\\xdf-\\xf6\\xf8-\\xff",Ws="A-Z\\xc0-\\xd6\\xd8-\\xde",Ds="\\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",zs="["+Ds+"]",Fs="\\d+",Us="["+Bs+"]",Hs="["+$s+"]",Vs="[^"+Ts+Ds+Fs+Bs+$s+Ws+"]",qs="(?:\\ud83c[\\udde6-\\uddff]){2}",Ks="[\\ud800-\\udbff][\\udc00-\\udfff]",Js="["+Ws+"]",Ys="(?:"+Hs+"|"+Vs+")",Gs="(?:"+Js+"|"+Vs+")",Qs="(?:['’](?:d|ll|m|re|s|t|ve))?",Zs="(?:['’](?:D|LL|M|RE|S|T|VE))?",Xs="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",el="[\\ufe0e\\ufe0f]?",tl=el+Xs+("(?:\\u200d(?:"+["[^"+Ts+"]",qs,Ks].join("|")+")"+el+Xs+")*"),nl="(?:"+[Us,qs,Ks].join("|")+")"+tl,rl=RegExp([Js+"?"+Hs+"+"+Qs+"(?="+[zs,Js,"$"].join("|")+")",Gs+"+"+Zs+"(?="+[zs,Js+Ys,"$"].join("|")+")",Js+"?"+Ys+"+"+Qs,Js+"+"+Zs,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Fs,nl].join("|"),"g");function ol(e,t,n){return e=Pa(e),void 0===(t=n?void 0:t)?function(e){return Is.test(e)}(e)?function(e){return e.match(rl)||[]}(e):function(e){return e.match(Ns)||[]}(e):e.match(t)||[]}var il=RegExp("['’]","g");function al(e){return function(t){return As(ol(Ms(t).replace(il,"")),e,"")}}var sl=al(function(e,t,n){return t=t.toLowerCase(),e+(n?Os(t):t)}),ll=sl;function ul(){if(!arguments.length)return[];var e=arguments[0];return jr(e)?e:[e]}var cl=vr.isFinite,dl=Math.min;function pl(e){var t=Math[e];return function(e,n){if(e=Hr(e),(n=null==n?0:dl(Kr(n),292))&&cl(e)){var r=(Pa(e)+"e").split("e");return+((r=(Pa(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var fl=pl("ceil");function hl(e){var t=To(e);return t.__chain__=!0,t}var gl=Math.ceil,vl=Math.max;function ml(e,t,n){t=(n?Ci(e,t,n):void 0===t)?1:vl(Kr(t),0);var r=null==e?0:e.length;if(!r||t<1)return[];for(var o=0,i=0,a=Array(gl(r/t));o<r;)a[i++]=ls(e,o,o+=t);return a}function yl(e,t,n){return e==e&&(void 0!==n&&(e=e<=n?e:n),void 0!==t&&(e=e>=t?e:t)),e}function bl(e,t,n){return void 0===n&&(n=t,t=void 0),void 0!==n&&(n=(n=Hr(n))==n?n:0),void 0!==t&&(t=(t=Hr(t))==t?t:0),yl(Hr(e),t,n)}function _l(e){var t=this.__data__=new Sa(e);this.size=t.size}function xl(e,t){return e&&_i(t,ta(t),e)}_l.prototype.clear=function(){this.__data__=new Sa,this.size=0},_l.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},_l.prototype.get=function(e){return this.__data__.get(e)},_l.prototype.has=function(e){return this.__data__.has(e)},_l.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Sa){var r=n.__data__;if(!Ea||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Ca(r)}return n.set(e,t),this.size=n.size,this};var wl="object"==typeof exports&&exports&&!exports.nodeType&&exports,Sl=wl&&"object"==typeof module&&module&&!module.nodeType&&module,El=Sl&&Sl.exports===wl?vr.Buffer:void 0,kl=El?El.allocUnsafe:void 0;function Cl(e,t){if(t)return e.slice();var n=e.length,r=kl?kl(n):new e.constructor(n);return e.copy(r),r}function Ol(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 Al(){return[]}var jl=Object.prototype.propertyIsEnumerable,Ll=Object.getOwnPropertySymbols,Rl=Ll?function(e){return null==e?[]:(e=Object(e),Ol(Ll(e),function(t){return jl.call(e,t)}))}:Al,Pl=Rl;var Ml=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)$a(t,Pl(e)),e=Va(e);return t}:Al,Nl=Ml;function Il(e,t,n){var r=t(e);return jr(e)?r:$a(r,n(e))}function Tl(e){return Il(e,ta,Pl)}function Bl(e){return Il(e,sa,Nl)}var $l=uo(vr,"DataView"),Wl=uo(vr,"Promise"),Dl=uo(vr,"Set"),zl="[object Map]",Fl="[object Promise]",Ul="[object Set]",Hl="[object WeakMap]",Vl="[object DataView]",ql=to($l),Kl=to(Ea),Jl=to(Wl),Yl=to(Dl),Gl=to(co),Ql=Er;($l&&Ql(new $l(new ArrayBuffer(1)))!=Vl||Ea&&Ql(new Ea)!=zl||Wl&&Ql(Wl.resolve())!=Fl||Dl&&Ql(new Dl)!=Ul||co&&Ql(new co)!=Hl)&&(Ql=function(e){var t=Er(e),n="[object Object]"==t?e.constructor:void 0,r=n?to(n):"";if(r)switch(r){case ql:return Vl;case Kl:return zl;case Jl:return Fl;case Yl:return Ul;case Gl:return Hl}return t});var Zl=Ql,Xl=Object.prototype.hasOwnProperty;var eu=vr.Uint8Array;function tu(e){var t=new e.constructor(e.byteLength);return new eu(t).set(new eu(e)),t}var nu=/\w*$/;var ru=mr?mr.prototype:void 0,ou=ru?ru.valueOf:void 0;function iu(e,t){var n=t?tu(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function au(e,t,n){var r,o=e.constructor;switch(t){case"[object ArrayBuffer]":return tu(e);case"[object Boolean]":case"[object Date]":return new o(+e);case"[object DataView]":return function(e,t){var n=t?tu(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 iu(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,nu.exec(e));return t.lastIndex=e.lastIndex,t}(e);case"[object Symbol]":return r=e,ou?Object(ou.call(r)):{}}}function su(e){return"function"!=typeof e.constructor||ji(e)?{}:mo(Va(e))}var lu=qi&&qi.isMap,uu=lu?Fi(lu):function(e){return kr(e)&&"[object Map]"==Zl(e)};var cu=qi&&qi.isSet,du=cu?Fi(cu):function(e){return kr(e)&&"[object Set]"==Zl(e)},pu="[object Arguments]",fu="[object Function]",hu="[object Object]",gu={};function vu(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(!Wr(e))return e;var c=jr(e);if(c){if(a=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&Xl.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!s)return Mo(e,a)}else{var d=Zl(e),p=d==fu||"[object GeneratorFunction]"==d;if(Di(e))return Cl(e,s);if(d==hu||d==pu||p&&!o){if(a=l||p?{}:su(e),!s)return l?function(e,t){return _i(e,Nl(e),t)}(e,function(e,t){return e&&_i(t,sa(t),e)}(a,e)):function(e,t){return _i(e,Pl(e),t)}(e,xl(a,e))}else{if(!gu[d])return o?e:{};a=au(e,d,s)}}i||(i=new _l);var f=i.get(e);if(f)return f;i.set(e,a),du(e)?e.forEach(function(r){a.add(vu(r,t,n,r,e,i))}):uu(e)&&e.forEach(function(r,o){a.set(o,vu(r,t,n,o,e,i))});var h=c?void 0:(u?l?Bl:Tl:l?sa:ta)(e);return Yo(h||e,function(r,o){h&&(r=e[o=r]),bi(a,o,vu(r,t,n,o,e,i))}),a}gu[pu]=gu["[object Array]"]=gu["[object ArrayBuffer]"]=gu["[object DataView]"]=gu["[object Boolean]"]=gu["[object Date]"]=gu["[object Float32Array]"]=gu["[object Float64Array]"]=gu["[object Int8Array]"]=gu["[object Int16Array]"]=gu["[object Int32Array]"]=gu["[object Map]"]=gu["[object Number]"]=gu[hu]=gu["[object RegExp]"]=gu["[object Set]"]=gu["[object String]"]=gu["[object Symbol]"]=gu["[object Uint8Array]"]=gu["[object Uint8ClampedArray]"]=gu["[object Uint16Array]"]=gu["[object Uint32Array]"]=!0,gu["[object Error]"]=gu[fu]=gu["[object WeakMap]"]=!1;function mu(e){return vu(e,4)}function yu(e){return vu(e,5)}function bu(e,t){return vu(e,5,t="function"==typeof t?t:void 0)}function _u(e,t){return vu(e,4,t="function"==typeof t?t:void 0)}function xu(){return new Po(this.value(),this.__chain__)}function wu(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 Su(){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 $a(jr(n)?Mo(n):[n],za(t,1))}function Eu(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Ca;++t<n;)this.add(e[t])}function ku(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 Cu(e,t){return e.has(t)}Eu.prototype.add=Eu.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},Eu.prototype.has=function(e){return this.__data__.has(e)};function Ou(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 Eu: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(!ku(t,function(e,t){if(!Cu(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 Au(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function ju(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}var Lu=mr?mr.prototype:void 0,Ru=Lu?Lu.valueOf:void 0;var Pu=Object.prototype.hasOwnProperty;var Mu="[object Arguments]",Nu="[object Array]",Iu="[object Object]",Tu=Object.prototype.hasOwnProperty;function Bu(e,t,n,r,o,i){var a=jr(e),s=jr(t),l=a?Nu:Zl(e),u=s?Nu:Zl(t),c=(l=l==Mu?Iu:l)==Iu,d=(u=u==Mu?Iu:u)==Iu,p=l==u;if(p&&Di(e)){if(!Di(t))return!1;a=!0,c=!1}if(p&&!c)return i||(i=new _l),a||Ji(e)?Ou(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 eu(e),new eu(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return mi(+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=Au;case"[object Set]":var l=1&r;if(s||(s=ju),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=Ou(s(e),s(t),r,o,i,a);return a.delete(e),c;case"[object Symbol]":if(Ru)return Ru.call(e)==Ru.call(t)}return!1}(e,t,l,n,r,o,i);if(!(1&n)){var f=c&&Tu.call(e,"__wrapped__"),h=d&&Tu.call(t,"__wrapped__");if(f||h){var g=f?e.value():e,v=h?t.value():t;return i||(i=new _l),o(g,v,n,r,i)}}return!!p&&(i||(i=new _l),function(e,t,n,r,o,i){var a=1&n,s=Tl(e),l=s.length;if(l!=Tl(t).length&&!a)return!1;for(var u=l;u--;){var c=s[u];if(!(a?c in t:Pu.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 $u(e,t,n,r,o){return e===t||(null==e||null==t||!kr(e)&&!kr(t)?e!=e&&t!=t:Bu(e,t,n,r,$u,o))}function Wu(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 _l;if(r)var p=r(u,c,l,e,t,d);if(!(void 0===p?$u(c,u,3,r,d):p))return!1}}return!0}function Du(e){return e==e&&!Wr(e)}function zu(e){for(var t=ta(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,Du(o)]}return t}function Fu(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}function Uu(e){var t=zu(e);return 1==t.length&&t[0][2]?Fu(t[0][0],t[0][1]):function(n){return n===e||Wu(n,e,t)}}function Hu(e,t){return null!=e&&t in Object(e)}function Vu(e,t,n){for(var r=-1,o=(t=Ma(t,e)).length,i=!1;++r<o;){var a=Na(t[r]);if(!(i=null!=e&&n(e,a)))break;e=e[a]}return i||++r!=o?i:!!(o=null==e?0:e.length)&&Ei(o)&&ii(a,o)&&(jr(e)||Ii(e))}function qu(e,t){return null!=e&&Vu(e,t,Hu)}function Ku(e,t){return va(e)&&Du(t)?Fu(Na(e),t):function(n){var r=Ta(n,e);return void 0===r&&r===t?qu(n,e):$u(t,r,3)}}function Ju(e){return function(t){return null==t?void 0:t[e]}}function Yu(e){return va(e)?Ju(Na(e)):function(e){return function(t){return Ia(t,e)}}(e)}function Gu(e){return"function"==typeof e?e:null==e?Yr:"object"==typeof e?jr(e)?Ku(e[0],e[1]):Uu(e):Yu(e)}function Qu(e){var t=null==e?0:e.length,n=Gu;return e=t?Ar(e,function(e){if("function"!=typeof e[1])throw new TypeError("Expected a function");return[n(e[0]),e[1]]}):[],Si(function(n){for(var r=-1;++r<t;){var o=e[r];if(bo(o[0],this,n))return bo(o[1],this,n)}})}function Zu(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 Xu(e){return function(e){var t=ta(e);return function(n){return Zu(n,e,t)}}(vu(e,1))}function ec(e,t){return null==t||Zu(e,t,ta(t))}function tc(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 nc(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 rc=nc();function oc(e,t){return e&&rc(e,t,ta)}function ic(e,t){return function(n,r){if(null==n)return n;if(!ki(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 ac=ic(oc);function sc(e,t,n,r){return ac(e,function(e,o,i){t(r,e,n(e),i)}),r}function lc(e,t){return function(n,r){var o=jr(n)?tc:sc,i=t?t():{};return o(n,e,Gu(r),i)}}var uc=Object.prototype.hasOwnProperty,cc=lc(function(e,t,n){uc.call(e,n)?++e[n]:vi(e,n,1)}),dc=cc;function pc(e,t){var n=mo(e);return null==t?n:xl(n,t)}function fc(e,t,n){var r=hi(e,8,void 0,void 0,void 0,void 0,void 0,t=n?void 0:t);return r.placeholder=fc.placeholder,r}fc.placeholder={};function hc(e,t,n){var r=hi(e,16,void 0,void 0,void 0,void 0,void 0,t=n?void 0:t);return r.placeholder=hc.placeholder,r}hc.placeholder={};var gc=function(){return vr.Date.now()},vc=Math.max,mc=Math.min;function yc(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=gc();if(h(e))return v(e);s=setTimeout(g,function(e){var n=t-(e-l);return d?mc(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=gc(),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=Hr(t)||0,Wr(n)&&(c=!!n.leading,i=(d="maxWait"in n)?vc(Hr(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(gc())},m}function bc(e,t){return null==e||e!=e?t:e}var _c=Object.prototype,xc=_c.hasOwnProperty,wc=Si(function(e,t){e=Object(e);var n=-1,r=t.length,o=r>2?t[2]:void 0;for(o&&Ci(t[0],t[1],o)&&(r=1);++n<r;)for(var i=t[n],a=sa(i),s=-1,l=a.length;++s<l;){var u=a[s],c=e[u];(void 0===c||mi(c,_c[u])&&!xc.call(e,u))&&(e[u]=i[u])}return e}),Sc=wc;function Ec(e,t,n){(void 0!==n&&!mi(e[t],n)||void 0===n&&!(t in e))&&vi(e,t,n)}function kc(e){return kr(e)&&ki(e)}function Cc(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}function Oc(e){return _i(e,sa(e))}function Ac(e,t,n,r,o){e!==t&&rc(t,function(i,a){if(o||(o=new _l),Wr(i))!function(e,t,n,r,o,i,a){var s=Cc(e,n),l=Cc(t,n),u=a.get(l);if(u)Ec(e,n,u);else{var c=i?i(s,l,n+"",e,t,a):void 0,d=void 0===c;if(d){var p=jr(l),f=!p&&Di(l),h=!p&&!f&&Ji(l);c=l,p||f||h?jr(s)?c=s:kc(s)?c=Mo(s):f?(d=!1,c=Cl(l,!0)):h?(d=!1,c=iu(l,!0)):c=[]:Qa(l)||Ii(l)?(c=s,Ii(s)?c=Oc(s):Wr(s)&&!Gr(s)||(c=su(l))):d=!1}d&&(a.set(l,c),o(c,l,r,i,a),a.delete(l)),Ec(e,n,c)}}(e,t,a,n,Ac,r,o);else{var s=r?r(Cc(e,a),i,a+"",e,t,o):void 0;void 0===s&&(s=i),Ec(e,a,s)}},sa)}function jc(e,t,n,r,o,i){return Wr(e)&&Wr(t)&&(i.set(t,e),Ac(e,t,void 0,jc,i),i.delete(t)),e}var Lc=Oi(function(e,t,n,r){Ac(e,t,n,r)}),Rc=Lc,Pc=Si(function(e){return e.push(void 0,jc),bo(Rc,void 0,e)});function Mc(e,t,n){if("function"!=typeof e)throw new TypeError("Expected a function");return setTimeout(function(){e.apply(void 0,n)},t)}var Nc=Si(function(e,t){return Mc(e,1,t)}),Ic=Nc,Tc=Si(function(e,t,n){return Mc(e,Hr(t)||0,n)}),Bc=Tc;function $c(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 Wc(e,t,n,r){var o=-1,i=Xo,a=!0,s=e.length,l=[],u=t.length;if(!s)return l;n&&(t=Ar(t,Fi(n))),r?(i=$c,a=!1):t.length>=200&&(i=Cu,a=!1,t=new Eu(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 Dc=Si(function(e,t){return kc(e)?Wc(e,za(t,1,kc,!0)):[]}),zc=Dc;function Fc(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}var Uc=Si(function(e,t){var n=Fc(t);return kc(n)&&(n=void 0),kc(e)?Wc(e,za(t,1,kc,!0),Gu(n)):[]}),Hc=Uc,Vc=Si(function(e,t){var n=Fc(t);return kc(n)&&(n=void 0),kc(e)?Wc(e,za(t,1,kc,!0),void 0,n):[]}),qc=Vc,Kc=Mr(function(e,t){return e/t},1);function Jc(e,t,n){var r=null==e?0:e.length;return r?ls(e,(t=n||void 0===t?1:Kr(t))<0?0:t,r):[]}function Yc(e,t,n){var r=null==e?0:e.length;return r?ls(e,0,(t=r-(t=n||void 0===t?1:Kr(t)))<0?0:t):[]}function Gc(e,t,n,r){for(var o=e.length,i=r?o:-1;(r?i--:++i<o)&&t(e[i],i,e););return n?ls(e,r?0:i,r?i+1:o):ls(e,r?i+1:0,r?o:i)}function Qc(e,t){return e&&e.length?Gc(e,Gu(t),!0,!0):[]}function Zc(e,t){return e&&e.length?Gc(e,Gu(t),!0):[]}function Xc(e){return"function"==typeof e?e:Yr}function ed(e,t){return(jr(e)?Yo:ac)(e,Xc(t))}function td(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}var nd=nc(!0);function rd(e,t){return e&&nd(e,t,ta)}var od=ic(rd,!0);function id(e,t){return(jr(e)?td:od)(e,Xc(t))}function ad(e,t,n){e=Pa(e),t=Pr(t);var r=e.length,o=n=void 0===n?r:yl(Kr(n),0,r);return(n-=t.length)>=0&&e.slice(n,o)==t}function sd(e){return function(t){var n=Zl(t);return"[object Map]"==n?Au(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 Ar(t,function(t){return[t,e[t]]})}(t,e(t))}}var ld=sd(ta),ud=sd(sa),cd=js({"&":"&","<":"<",">":">",'"':""","'":"'"}),dd=/[&<>"']/g,pd=RegExp(dd.source);function fd(e){return(e=Pa(e))&&pd.test(e)?e.replace(dd,cd):e}var hd=/[\\^$.*+?()[\]{}|]/g,gd=RegExp(hd.source);function vd(e){return(e=Pa(e))&&gd.test(e)?e.replace(hd,"\\$&"):e}function md(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 yd(e,t){var n=!0;return ac(e,function(e,r,o){return n=!!t(e,r,o)}),n}function bd(e,t,n){var r=jr(e)?md:yd;return n&&Ci(e,t,n)&&(t=void 0),r(e,Gu(t))}function _d(e){return e?yl(Kr(e),0,4294967295):0}function xd(e,t,n,r){var o=null==e?0:e.length;return o?(n&&"number"!=typeof n&&Ci(e,t,n)&&(n=0,r=o),function(e,t,n,r){var o=e.length;for((n=Kr(n))<0&&(n=-n>o?0:o+n),(r=void 0===r||r>o?o:Kr(r))<0&&(r+=o),r=n>r?0:_d(r);n<r;)e[n++]=t;return e}(e,t,n,r)):[]}function wd(e,t){var n=[];return ac(e,function(e,r,o){t(e,r,o)&&n.push(e)}),n}function Sd(e,t){return(jr(e)?Ol:wd)(e,Gu(t))}function Ed(e){return function(t,n,r){var o=Object(t);if(!ki(t)){var i=Gu(n);t=ta(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 kd=Math.max;function Cd(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:Kr(n);return o<0&&(o=kd(r+o,0)),Go(e,Gu(t),o)}var Od=Ed(Cd);function Ad(e,t,n){var r;return n(e,function(e,n,o){if(t(e,n,o))return r=n,!1}),r}function jd(e,t){return Ad(e,Gu(t),oc)}var Ld=Math.max,Rd=Math.min;function Pd(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=r-1;return void 0!==n&&(o=Kr(n),o=n<0?Ld(r+o,0):Rd(o,r-1)),Go(e,Gu(t),o,!0)}var Md=Ed(Pd);function Nd(e,t){return Ad(e,Gu(t),rd)}function Id(e){return e&&e.length?e[0]:void 0}function Td(e,t){var n=-1,r=ki(e)?Array(e.length):[];return ac(e,function(e,o,i){r[++n]=t(e,o,i)}),r}function Bd(e,t){return(jr(e)?Ar:Td)(e,Gu(t))}function $d(e,t){return za(Bd(e,t),1)}var Wd=1/0;function Dd(e,t){return za(Bd(e,t),Wd)}function zd(e,t,n){return n=void 0===n?1:Kr(n),za(Bd(e,t),n)}var Fd=1/0;function Ud(e){return(null==e?0:e.length)?za(e,Fd):[]}function Hd(e,t){return(null==e?0:e.length)?za(e,t=void 0===t?1:Kr(t)):[]}function Vd(e){return hi(e,512)}var qd=pl("floor");function Kd(e){return Ua(function(t){var n=t.length,r=n,o=Po.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"==Ro(i))var a=new Po([],!0)}for(r=a?r:n;++r<n;){var s=Ro(i=t[r]),l="wrapper"==s?Ao(i):void 0;a=l&&Bo(l[0])&&424==l[1]&&!l[4].length&&1==l[9]?a[Ro(l[0])].apply(a,l[3]):1==i.length&&Bo(i)?a[s]():a.thru(i)}return function(){var e=arguments,r=e[0];if(a&&1==e.length&&jr(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 Jd=Kd(),Yd=Kd(!0);function Gd(e,t){return null==e?e:rc(e,Xc(t),sa)}function Qd(e,t){return null==e?e:nd(e,Xc(t),sa)}function Zd(e,t){return e&&oc(e,Xc(t))}function Xd(e,t){return e&&rd(e,Xc(t))}function ep(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 tp(e,t){return Ol(t,function(t){return Gr(e[t])})}function np(e){return null==e?[]:tp(e,ta(e))}function rp(e){return null==e?[]:tp(e,sa(e))}var op=Object.prototype.hasOwnProperty,ip=lc(function(e,t,n){op.call(e,n)?e[n].push(t):vi(e,n,[t])}),ap=ip;function sp(e,t){return e>t}function lp(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=Hr(t),n=Hr(n)),e(t,n)}}var up=lp(sp),cp=lp(function(e,t){return e>=t}),dp=Object.prototype.hasOwnProperty;function pp(e,t){return null!=e&&dp.call(e,t)}function fp(e,t){return null!=e&&Vu(e,t,pp)}var hp=Math.max,gp=Math.min;function vp(e,t,n){return t=qr(t),void 0===n?(n=t,t=0):n=qr(n),function(e,t,n){return e>=gp(t,n)&&e<hp(t,n)}(e=Hr(e),t,n)}function mp(e){return"string"==typeof e||!jr(e)&&kr(e)&&"[object String]"==Er(e)}function yp(e,t){return Ar(t,function(t){return e[t]})}function bp(e){return null==e?[]:yp(e,ta(e))}var _p=Math.max;function xp(e,t,n,r){e=ki(e)?e:bp(e),n=n&&!r?Kr(n):0;var o=e.length;return n<0&&(n=_p(o+n,0)),mp(e)?n<=o&&e.indexOf(t,n)>-1:!!o&&Zo(e,t,n)>-1}var wp=Math.max;function Sp(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:Kr(n);return o<0&&(o=wp(r+o,0)),Zo(e,t,o)}function Ep(e){return(null==e?0:e.length)?ls(e,0,-1):[]}var kp=Math.min;function Cp(e,t,n){for(var r=n?$c:Xo,o=e[0].length,i=e.length,a=i,s=Array(i),l=1/0,u=[];a--;){var c=e[a];a&&t&&(c=Ar(c,Fi(t))),l=kp(c.length,l),s[a]=!n&&(t||o>=120&&c.length>=120)?new Eu(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?Cu(p,h):r(u,h,n))){for(a=i;--a;){var g=s[a];if(!(g?Cu(g,h):r(e[a],h,n)))continue e}p&&p.push(h),u.push(f)}}return u}function Op(e){return kc(e)?e:[]}var Ap=Si(function(e){var t=Ar(e,Op);return t.length&&t[0]===e[0]?Cp(t):[]}),jp=Si(function(e){var t=Fc(e),n=Ar(e,Op);return t===Fc(n)?t=void 0:n.pop(),n.length&&n[0]===e[0]?Cp(n,Gu(t)):[]}),Lp=jp,Rp=Si(function(e){var t=Fc(e),n=Ar(e,Op);return(t="function"==typeof t?t:void 0)&&n.pop(),n.length&&n[0]===e[0]?Cp(n,void 0,t):[]});function Pp(e,t){return function(n,r){return function(e,t,n,r){return oc(e,function(e,o,i){t(r,n(e),o,i)}),r}(n,e,t(r),{})}}var Mp=Object.prototype.toString,Np=Pp(function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Mp.call(t)),e[t]=n},Ho(Yr)),Ip=Np,Tp=Object.prototype,Bp=Tp.hasOwnProperty,$p=Tp.toString,Wp=Pp(function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=$p.call(t)),Bp.call(e,t)?e[t].push(n):e[t]=[n]},Gu),Dp=Wp;function zp(e,t){return t.length<2?e:Ia(e,ls(t,0,-1))}function Fp(e,t,n){var r=null==(e=zp(e,t=Ma(t,e)))?e:e[Na(Fc(t))];return null==r?void 0:bo(r,e,n)}var Up=Si(Fp),Hp=Si(function(e,t,n){var r=-1,o="function"==typeof t,i=ki(e)?Array(e.length):[];return ac(e,function(e){i[++r]=o?bo(t,e,n):Fp(e,t,n)}),i}),Vp=Hp;var qp=qi&&qi.isArrayBuffer,Kp=qp?Fi(qp):function(e){return kr(e)&&"[object ArrayBuffer]"==Er(e)};function Jp(e){return!0===e||!1===e||kr(e)&&"[object Boolean]"==Er(e)}var Yp=qi&&qi.isDate,Gp=Yp?Fi(Yp):function(e){return kr(e)&&"[object Date]"==Er(e)};function Qp(e){return kr(e)&&1===e.nodeType&&!Qa(e)}var Zp=Object.prototype.hasOwnProperty;function Xp(e){if(null==e)return!0;if(ki(e)&&(jr(e)||"string"==typeof e||"function"==typeof e.splice||Di(e)||Ji(e)||Ii(e)))return!e.length;var t=Zl(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(ji(e))return!ea(e).length;for(var n in e)if(Zp.call(e,n))return!1;return!0}function ef(e,t){return $u(e,t)}function tf(e,t,n){var r=(n="function"==typeof n?n:void 0)?n(e,t):void 0;return void 0===r?$u(e,t,void 0,n):!!r}var nf=vr.isFinite;function rf(e){return"number"==typeof e&&nf(e)}function of(e){return"number"==typeof e&&e==Kr(e)}function af(e,t){return e===t||Wu(e,t,zu(t))}function sf(e,t,n){return n="function"==typeof n?n:void 0,Wu(e,t,zu(t),n)}function lf(e){return"number"==typeof e||kr(e)&&"[object Number]"==Er(e)}function uf(e){return lf(e)&&e!=+e}var cf=Zr?Gr:Ti;function df(e){if(cf(e))throw new Error("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return lo(e)}function pf(e){return null==e}function ff(e){return null===e}var hf=qi&&qi.isRegExp,gf=hf?Fi(hf):function(e){return kr(e)&&"[object RegExp]"==Er(e)},vf=9007199254740991;function mf(e){return of(e)&&e>=-9007199254740991&&e<=vf}function yf(e){return void 0===e}function bf(e){return kr(e)&&"[object WeakMap]"==Zl(e)}function _f(e){return kr(e)&&"[object WeakSet]"==Er(e)}function xf(e){return Gu("function"==typeof e?e:vu(e,1))}var wf=Array.prototype.join;function Sf(e,t){return null==e?"":wf.call(e,t)}var Ef=al(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()}),kf=Ef,Cf=lc(function(e,t,n){vi(e,n,t)}),Of=Cf;var Af=Math.max,jf=Math.min;function Lf(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=r;return void 0!==n&&(o=(o=Kr(n))<0?Af(r+o,0):jf(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):Go(e,Qo,o,!0)}var Rf=al(function(e,t,n){return e+(n?" ":"")+t.toLowerCase()}),Pf=Rf,Mf=ks("toLowerCase");function Nf(e,t){return e<t}var If=lp(Nf),Tf=lp(function(e,t){return e<=t});function Bf(e,t){var n={};return t=Gu(t),oc(e,function(e,r,o){vi(n,t(e,r,o),e)}),n}function $f(e,t){var n={};return t=Gu(t),oc(e,function(e,r,o){vi(n,r,t(e,r,o))}),n}function Wf(e){return Uu(vu(e,1))}function Df(e,t){return Ku(e,vu(t,1))}function zf(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&&!Cr(a):n(a,s)))var s=a,l=i}return l}function Ff(e){return e&&e.length?zf(e,Yr,sp):void 0}function Uf(e,t){return e&&e.length?zf(e,Gu(t),sp):void 0}function Hf(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 Vf(e,t){var n=null==e?0:e.length;return n?Hf(e,t)/n:NaN}function qf(e){return Vf(e,Yr)}function Kf(e,t){return Vf(e,Gu(t))}var Jf=Oi(function(e,t,n){Ac(e,t,n)}),Yf=Jf,Gf=Si(function(e,t){return function(n){return Fp(n,e,t)}}),Qf=Gf,Zf=Si(function(e,t){return function(n){return Fp(e,n,t)}}),Xf=Zf;function eh(e){return e&&e.length?zf(e,Yr,Nf):void 0}function th(e,t){return e&&e.length?zf(e,Gu(t),Nf):void 0}function nh(e,t,n){var r=ta(t),o=tp(t,r),i=!(Wr(n)&&"chain"in n&&!n.chain),a=Gr(e);return Yo(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__=Mo(this.__actions__)).push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,$a([this.value()],arguments))})}),e}var rh=Mr(function(e,t){return e*t},1);function oh(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 ih=mr?mr.iterator:void 0;function ah(e){if(!e)return[];if(ki(e))return mp(e)?Es(e):Mo(e);if(ih&&e[ih])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[ih]());var t=Zl(e);return("[object Map]"==t?Au:"[object Set]"==t?ju:bp)(e)}function sh(){void 0===this.__values__&&(this.__values__=ah(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?void 0:this.__values__[this.__index__++]}}function lh(e,t){var n=e.length;if(n)return ii(t+=t<0?n:0,n)?e[t]:void 0}function uh(e,t){return e&&e.length?lh(e,Kr(t)):void 0}function ch(e){return e=Kr(e),Si(function(t){return lh(t,e)})}var dh=Object.prototype.hasOwnProperty;function ph(e,t){var n=-1,r=(t=Ma(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&&!dh.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=zp(e,t);return null==a||delete a[Na(Fc(t))]}function fh(e){return Qa(e)?void 0:e}var hh=Ua(function(e,t){var n={};if(null==e)return n;var r=!1;t=Ar(t,function(t){return t=Ma(t,e),r||(r=t.length>1),t}),_i(e,Bl(e),n),r&&(n=vu(n,7,fh));for(var o=t.length;o--;)ph(n,t[o]);return n}),gh=hh;function vh(e,t,n,r){if(!Wr(e))return e;for(var o=-1,i=(t=Ma(t,e)).length,a=i-1,s=e;null!=s&&++o<i;){var l=Na(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=Wr(c)?c:ii(t[o+1])?[]:{})}bi(s,l,u),s=s[l]}return e}function mh(e,t,n){for(var r=-1,o=t.length,i={};++r<o;){var a=t[r],s=Ia(e,a);n(s,a)&&vh(i,Ma(a,e),s)}return i}function yh(e,t){if(null==e)return{};var n=Ar(Bl(e),function(e){return[e]});return t=Gu(t),mh(e,n,function(e,n){return t(e,n[0])})}function bh(e,t){return yh(e,oh(Gu(t)))}function _h(e){return ts(2,e)}function xh(e,t){if(e!==t){var n=void 0!==e,r=null===e,o=e==e,i=Cr(e),a=void 0!==t,s=null===t,l=t==t,u=Cr(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 wh(e,t,n){t=t.length?Ar(t,function(e){return jr(e)?function(t){return Ia(t,1===e.length?e[0]:e)}:e}):[Yr];var r=-1;t=Ar(t,Fi(Gu));var o=Td(e,function(e,n,o){var i=Ar(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=xh(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 Sh(e,t,n,r){return null==e?[]:(jr(t)||(t=null==t?[]:[t]),jr(n=r?void 0:n)||(n=null==n?[]:[n]),wh(e,t,n))}function Eh(e){return Ua(function(t){return t=Ar(t,Fi(Gu)),Si(function(n){var r=this;return e(t,function(e){return bo(e,r,n)})})})}var kh=Eh(Ar),Ch=Si,Oh=Math.min,Ah=Ch(function(e,t){var n=(t=1==t.length&&jr(t[0])?Ar(t[0],Fi(Gu)):Ar(za(t,1),Fi(Gu))).length;return Si(function(r){for(var o=-1,i=Oh(r.length,n);++o<i;)r[o]=t[o].call(this,r[o]);return bo(e,this,r)})}),jh=Ah,Lh=Eh(md),Rh=Eh(ku),Ph=Math.floor;function Mh(e,t){var n="";if(!e||t<1||t>9007199254740991)return n;do{t%2&&(n+=e),(t=Ph(t/2))&&(e+=e)}while(t);return n}var Nh=Ju("length"),Ih="\\ud800-\\udfff",Th="["+Ih+"]",Bh="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",$h="\\ud83c[\\udffb-\\udfff]",Wh="[^"+Ih+"]",Dh="(?:\\ud83c[\\udde6-\\uddff]){2}",zh="[\\ud800-\\udbff][\\udc00-\\udfff]",Fh="(?:"+Bh+"|"+$h+")"+"?",Uh="[\\ufe0e\\ufe0f]?",Hh=Uh+Fh+("(?:\\u200d(?:"+[Wh,Dh,zh].join("|")+")"+Uh+Fh+")*"),Vh="(?:"+[Wh+Bh+"?",Bh,Dh,zh,Th].join("|")+")",qh=RegExp($h+"(?="+$h+")|"+Vh+Hh,"g");function Kh(e){return ds(e)?function(e){for(var t=qh.lastIndex=0;qh.test(e);)++t;return t}(e):Nh(e)}var Jh=Math.ceil;function Yh(e,t){var n=(t=void 0===t?" ":Pr(t)).length;if(n<2)return n?Mh(t,e):t;var r=Mh(t,Jh(e/Kh(t)));return ds(t)?us(Es(r),0,e).join(""):r.slice(0,e)}var Gh=Math.ceil,Qh=Math.floor;function Zh(e,t,n){e=Pa(e);var r=(t=Kr(t))?Kh(e):0;if(!t||r>=t)return e;var o=(t-r)/2;return Yh(Qh(o),n)+e+Yh(Gh(o),n)}function Xh(e,t,n){e=Pa(e);var r=(t=Kr(t))?Kh(e):0;return t&&r<t?e+Yh(t-r,n):e}function eg(e,t,n){e=Pa(e);var r=(t=Kr(t))?Kh(e):0;return t&&r<t?Yh(t-r,n)+e:e}var tg=/^\s+/,ng=vr.parseInt;function rg(e,t,n){return n||null==t?t=0:t&&(t=+t),ng(Pa(e).replace(tg,""),t||0)}var og=Si(function(e,t){return hi(e,32,void 0,t,li(t,ri(og)))});og.placeholder={};var ig=og,ag=Si(function(e,t){return hi(e,64,void 0,t,li(t,ri(ag)))});ag.placeholder={};var sg=ag,lg=lc(function(e,t,n){e[n?0:1].push(t)},function(){return[[],[]]}),ug=lg;var cg=Ua(function(e,t){return null==e?{}:function(e,t){return mh(e,t,function(t,n){return qu(e,n)})}(e,t)}),dg=cg;function pg(e){for(var t,n=this;n instanceof Eo;){var r=No(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 fg(e){return function(t){return null==e?void 0:Ia(e,t)}}function hg(e,t,n,r){for(var o=n-1,i=e.length;++o<i;)if(r(e[o],t))return o;return-1}var gg=Array.prototype.splice;function vg(e,t,n,r){var o=r?hg:Zo,i=-1,a=t.length,s=e;for(e===t&&(t=Mo(t)),n&&(s=Ar(e,Fi(n)));++i<a;)for(var l=0,u=t[i],c=n?n(u):u;(l=o(s,c,l,r))>-1;)s!==e&&gg.call(s,l,1),gg.call(e,l,1);return e}function mg(e,t){return e&&e.length&&t&&t.length?vg(e,t):e}var yg=Si(mg);function bg(e,t,n){return e&&e.length&&t&&t.length?vg(e,t,Gu(n)):e}function _g(e,t,n){return e&&e.length&&t&&t.length?vg(e,t,void 0,n):e}var xg=Array.prototype.splice;function wg(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;ii(o)?xg.call(e,o,1):ph(e,o)}}return e}var Sg=Ua(function(e,t){var n=null==e?0:e.length,r=Ba(e,t);return wg(e,Ar(t,function(e){return ii(e,n)?+e:e}).sort(xh)),r}),Eg=Sg,kg=Math.floor,Cg=Math.random;function Og(e,t){return e+kg(Cg()*(t-e+1))}var Ag=parseFloat,jg=Math.min,Lg=Math.random;function Rg(e,t,n){if(n&&"boolean"!=typeof n&&Ci(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=qr(e),void 0===t?(t=e,e=0):t=qr(t)),e>t){var r=e;e=t,t=r}if(n||e%1||t%1){var o=Lg();return jg(e+o*(t-e+Ag("1e-"+((o+"").length-1))),t)}return Og(e,t)}var Pg=Math.ceil,Mg=Math.max;function Ng(e){return function(t,n,r){return r&&"number"!=typeof r&&Ci(t,n,r)&&(n=r=void 0),t=qr(t),void 0===n?(n=t,t=0):n=qr(n),function(e,t,n,r){for(var o=-1,i=Mg(Pg((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:qr(r),e)}}var Ig=Ng(),Tg=Ng(!0),Bg=Ua(function(e,t){return hi(e,256,void 0,void 0,void 0,t)}),$g=Bg;function Wg(e,t,n,r,o){return o(e,function(e,o,i){n=r?(r=!1,e):t(n,e,o,i)}),n}function Dg(e,t,n){var r=jr(e)?As:Wg,o=arguments.length<3;return r(e,Gu(t),n,o,ac)}function zg(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 Fg(e,t,n){var r=jr(e)?zg:Wg,o=arguments.length<3;return r(e,Gu(t),n,o,od)}function Ug(e,t){return(jr(e)?Ol:wd)(e,oh(Gu(t)))}function Hg(e,t){var n=[];if(!e||!e.length)return n;var r=-1,o=[],i=e.length;for(t=Gu(t);++r<i;){var a=e[r];t(a,r,e)&&(n.push(a),o.push(r))}return wg(e,o),n}function Vg(e,t,n){return t=(n?Ci(e,t,n):void 0===t)?1:Kr(t),Mh(Pa(e),t)}function qg(){var e=arguments,t=Pa(e[0]);return e.length<3?t:t.replace(e[1],e[2])}function Kg(e,t){if("function"!=typeof e)throw new TypeError("Expected a function");return Si(e,t=void 0===t?t:Kr(t))}function Jg(e,t,n){var r=-1,o=(t=Ma(t,e)).length;for(o||(o=1,e=void 0);++r<o;){var i=null==e?void 0:e[Na(t[r])];void 0===i&&(r=o,i=n),e=Gr(i)?i.call(e):i}return e}var Yg=Array.prototype.reverse;function Gg(e){return null==e?e:Yg.call(e)}var Qg=pl("round");function Zg(e){var t=e.length;return t?e[Og(0,t-1)]:void 0}function Xg(e){return Zg(bp(e))}function ev(e){return(jr(e)?Zg:Xg)(e)}function tv(e,t){var n=-1,r=e.length,o=r-1;for(t=void 0===t?r:t;++n<t;){var i=Og(n,o),a=e[i];e[i]=e[n],e[n]=a}return e.length=t,e}function nv(e,t){return tv(Mo(e),yl(t,0,e.length))}function rv(e,t){var n=bp(e);return tv(n,yl(t,0,n.length))}function ov(e,t,n){return t=(n?Ci(e,t,n):void 0===t)?1:Kr(t),(jr(e)?nv:rv)(e,t)}function iv(e,t,n){return null==e?e:vh(e,t,n)}function av(e,t,n,r){return r="function"==typeof r?r:void 0,null==e?e:vh(e,t,n,r)}function sv(e){return tv(Mo(e))}function lv(e){return tv(bp(e))}function uv(e){return(jr(e)?sv:lv)(e)}function cv(e){if(null==e)return 0;if(ki(e))return mp(e)?Kh(e):e.length;var t=Zl(e);return"[object Map]"==t||"[object Set]"==t?e.size:ea(e).length}function dv(e,t,n){var r=null==e?0:e.length;return r?(n&&"number"!=typeof n&&Ci(e,t,n)?(t=0,n=r):(t=null==t?0:Kr(t),n=void 0===n?r:Kr(n)),ls(e,t,n)):[]}var pv=al(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}),fv=pv;function hv(e,t){var n;return ac(e,function(e,r,o){return!(n=t(e,r,o))}),!!n}function gv(e,t,n){var r=jr(e)?ku:hv;return n&&Ci(e,t,n)&&(t=void 0),r(e,Gu(t))}var vv=Si(function(e,t){if(null==e)return[];var n=t.length;return n>1&&Ci(e,t[0],t[1])?t=[]:n>2&&Ci(t[0],t[1],t[2])&&(t=[t[0]]),wh(e,za(t,1),[])}),mv=vv,yv=Math.floor,bv=Math.min;function _v(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=Cr(t),u=void 0===t;o<i;){var c=yv((o+i)/2),d=n(e[c]),p=void 0!==d,f=null===d,h=d==d,g=Cr(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 bv(i,4294967294)}function xv(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&&!Cr(a)&&(n?a<=t:a<t)?r=i+1:o=i}return o}return _v(e,t,Yr,n)}function wv(e,t){return xv(e,t)}function Sv(e,t,n){return _v(e,t,Gu(n))}function Ev(e,t){var n=null==e?0:e.length;if(n){var r=xv(e,t);if(r<n&&mi(e[r],t))return r}return-1}function kv(e,t){return xv(e,t,!0)}function Cv(e,t,n){return _v(e,t,Gu(n),!0)}function Ov(e,t){if(null==e?0:e.length){var n=xv(e,t,!0)-1;if(mi(e[n],t))return n}return-1}function Av(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||!mi(s,l)){var l=s;i[o++]=0===a?0:a}}return i}function jv(e){return e&&e.length?Av(e):[]}function Lv(e,t){return e&&e.length?Av(e,Gu(t)):[]}function Rv(e,t,n){return n&&"number"!=typeof n&&Ci(e,t,n)&&(t=n=void 0),(n=void 0===n?4294967295:n>>>0)?(e=Pa(e))&&("string"==typeof t||null!=t&&!gf(t))&&!(t=Pr(t))&&ds(e)?us(Es(e),0,n):e.split(t,n):[]}var Pv=Math.max;function Mv(e,t){if("function"!=typeof e)throw new TypeError("Expected a function");return t=null==t?0:Pv(Kr(t),0),Si(function(n){var r=n[t],o=us(n,0,t);return r&&$a(o,r),bo(e,this,o)})}var Nv=al(function(e,t,n){return e+(n?" ":"")+Cs(t)}),Iv=Nv;function Tv(e,t,n){return e=Pa(e),n=null==n?0:yl(Kr(n),0,e.length),t=Pr(t),e.slice(n,n+t.length)==t}function Bv(){return{}}function $v(){return""}function Wv(){return!0}var Dv=Mr(function(e,t){return e-t},0);function zv(e){return e&&e.length?Hf(e,Yr):0}function Fv(e,t){return e&&e.length?Hf(e,Gu(t)):0}function Uv(e){var t=null==e?0:e.length;return t?ls(e,1,t):[]}function Hv(e,t,n){return e&&e.length?ls(e,0,(t=n||void 0===t?1:Kr(t))<0?0:t):[]}function Vv(e,t,n){var r=null==e?0:e.length;return r?ls(e,(t=r-(t=n||void 0===t?1:Kr(t)))<0?0:t,r):[]}function qv(e,t){return e&&e.length?Gc(e,Gu(t),!1,!0):[]}function Kv(e,t){return e&&e.length?Gc(e,Gu(t)):[]}function Jv(e,t){return t(e),e}var Yv=Object.prototype,Gv=Yv.hasOwnProperty;function Qv(e,t,n,r){return void 0===e||mi(e,Yv[n])&&!Gv.call(r,n)?t:e}var Zv={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"};function Xv(e){return"\\"+Zv[e]}var em=/<%=([\s\S]+?)%>/g,tm={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:em,variable:"",imports:{_:{escape:fd}}},nm=/\b__p \+= '';/g,rm=/\b(__p \+=) '' \+/g,om=/(__e\(.*?\)|\b__t\)) \+\n'';/g,im=/[()=,{}\[\]\/\s]/,am=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,sm=/($^)/,lm=/['\n\r\u2028\u2029\\]/g,um=Object.prototype.hasOwnProperty;function cm(e,t,n){var r=tm.imports._.templateSettings||tm;n&&Ci(e,t,n)&&(t=void 0),e=Pa(e),t=da({},t,r,Qv);var o,i,a=da({},t.imports,r.imports,Qv),s=ta(a),l=yp(a,s),u=0,c=t.interpolate||sm,d="__p += '",p=RegExp((t.escape||sm).source+"|"+c.source+"|"+(c===em?am:sm).source+"|"+(t.evaluate||sm).source+"|$","g"),f=um.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(lm,Xv),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=um.call(t,"variable")&&t.variable;if(h){if(im.test(h))throw new Error("Invalid `variable` option passed into `_.template`")}else d="with (obj) {\n"+d+"\n}\n";d=(i?d.replace(nm,""):d).replace(rm,"$1").replace(om,"$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=es(function(){return Function(s,f+"return "+d).apply(void 0,l)});if(g.source=d,Za(g))throw g;return g}function dm(e,t,n){var r=!0,o=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return Wr(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),yc(e,t,{leading:r,maxWait:t,trailing:o})}function pm(e,t){return t(e)}var fm=4294967295,hm=Math.min;function gm(e,t){if((e=Kr(e))<1||e>9007199254740991)return[];var n=fm,r=hm(e,fm);t=Xc(t),e-=fm;for(var o=Li(r,t);++n<e;)t(n);return o}function vm(){return this}function mm(e,t){var n=e;return n instanceof ko&&(n=n.value()),As(t,function(e,t){return t.func.apply(t.thisArg,$a([e],t.args))},n)}function ym(){return mm(this.__wrapped__,this.__actions__)}function bm(e){return Pa(e).toLowerCase()}function _m(e){return jr(e)?Ar(e,Na):Cr(e)?[e]:Mo(Ra(Pa(e)))}var xm=9007199254740991;function wm(e){return e?yl(Kr(e),-9007199254740991,xm):0===e?e:0}function Sm(e){return Pa(e).toUpperCase()}function Em(e,t,n){var r=jr(e),o=r||Di(e)||Ji(e);if(t=Gu(t),null==n){var i=e&&e.constructor;n=o?r?new i:[]:Wr(e)&&Gr(i)?mo(Va(e)):{}}return(o?Yo:oc)(e,function(e,r,o){return t(n,e,r,o)}),n}function km(e,t){for(var n=e.length;n--&&Zo(t,e[n],0)>-1;);return n}function Cm(e,t){for(var n=-1,r=e.length;++n<r&&Zo(t,e[n],0)>-1;);return n}function Om(e,t,n){if((e=Pa(e))&&(n||void 0===t))return $r(e);if(!e||!(t=Pr(t)))return e;var r=Es(e),o=Es(t);return us(r,Cm(r,o),km(r,o)+1).join("")}function Am(e,t,n){if((e=Pa(e))&&(n||void 0===t))return e.slice(0,Tr(e)+1);if(!e||!(t=Pr(t)))return e;var r=Es(e);return us(r,0,km(r,Es(t))+1).join("")}var jm=/^\s+/;function Lm(e,t,n){if((e=Pa(e))&&(n||void 0===t))return e.replace(jm,"");if(!e||!(t=Pr(t)))return e;var r=Es(e);return us(r,Cm(r,Es(t))).join("")}var Rm=/\w*$/;function Pm(e,t){var n=30,r="...";if(Wr(t)){var o="separator"in t?t.separator:o;n="length"in t?Kr(t.length):n,r="omission"in t?Pr(t.omission):r}var i=(e=Pa(e)).length;if(ds(e)){var a=Es(e);i=a.length}if(n>=i)return e;var s=n-Kh(r);if(s<1)return r;var l=a?us(a,0,s).join(""):e.slice(0,s);if(void 0===o)return l+r;if(a&&(s+=l.length-s),gf(o)){if(e.slice(s).search(o)){var u,c=l;for(o.global||(o=RegExp(o.source,Pa(Rm.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(Pr(o),s)!=s){var p=l.lastIndexOf(o);p>-1&&(l=l.slice(0,p))}return l+r}function Mm(e){return gi(e,1)}var Nm=js({"&":"&","<":"<",">":">",""":'"',"'":"'"}),Im=/&(?:amp|lt|gt|quot|#39);/g,Tm=RegExp(Im.source);function Bm(e){return(e=Pa(e))&&Tm.test(e)?e.replace(Im,Nm):e}var $m=Dl&&1/ju(new Dl([,-0]))[1]==1/0?function(e){return new Dl(e)}:Co,Wm=$m;function Dm(e,t,n){var r=-1,o=Xo,i=e.length,a=!0,s=[],l=s;if(n)a=!1,o=$c;else if(i>=200){var u=t?null:Wm(e);if(u)return ju(u);a=!1,o=Cu,l=new Eu}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 zm=Si(function(e){return Dm(za(e,1,kc,!0))}),Fm=Si(function(e){var t=Fc(e);return kc(t)&&(t=void 0),Dm(za(e,1,kc,!0),Gu(t))}),Um=Fm,Hm=Si(function(e){var t=Fc(e);return t="function"==typeof t?t:void 0,Dm(za(e,1,kc,!0),void 0,t)});function Vm(e){return e&&e.length?Dm(e):[]}function qm(e,t){return e&&e.length?Dm(e,Gu(t)):[]}function Km(e,t){return t="function"==typeof t?t:void 0,e&&e.length?Dm(e,void 0,t):[]}var Jm=0;function Ym(e){var t=++Jm;return Pa(e)+t}function Gm(e,t){return null==e||ph(e,t)}var Qm=Math.max;function Zm(e){if(!e||!e.length)return[];var t=0;return e=Ol(e,function(e){if(kc(e))return t=Qm(e.length,t),!0}),Li(t,function(t){return Ar(e,Ju(t))})}function Xm(e,t){if(!e||!e.length)return[];var n=Zm(e);return null==t?n:Ar(n,function(e){return bo(t,void 0,e)})}function ey(e,t,n,r){return vh(e,t,n(Ia(e,t)),r)}function ty(e,t,n){return null==e?e:ey(e,t,Xc(n))}function ny(e,t,n,r){return r="function"==typeof r?r:void 0,null==e?e:ey(e,t,Xc(n),r)}var ry=al(function(e,t,n){return e+(n?" ":"")+t.toUpperCase()}),oy=ry;function iy(e){return null==e?[]:yp(e,sa(e))}var ay=Si(function(e,t){return kc(e)?Wc(e,t):[]}),sy=ay;function ly(e,t){return ig(Xc(t),e)}var uy=Ua(function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,o=function(t){return Ba(t,e)};return!(t>1||this.__actions__.length)&&r instanceof ko&&ii(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:pm,args:[o],thisArg:void 0}),new Po(r,this.__chain__).thru(function(e){return t&&!e.length&&e.push(void 0),e})):this.thru(o)}),cy=uy;function dy(){return hl(this)}function py(){var e=this.__wrapped__;if(e instanceof ko){var t=e;return this.__actions__.length&&(t=new ko(this)),(t=t.reverse()).__actions__.push({func:pm,args:[Gg],thisArg:void 0}),new Po(t,this.__chain__)}return this.thru(Gg)}function fy(e,t,n){var r=e.length;if(r<2)return r?Dm(e[0]):[];for(var o=-1,i=Array(r);++o<r;)for(var a=e[o],s=-1;++s<r;)s!=o&&(i[o]=Wc(i[o]||a,e[s],t,n));return Dm(za(i,1),t,n)}var hy=Si(function(e){return fy(Ol(e,kc))}),gy=Si(function(e){var t=Fc(e);return kc(t)&&(t=void 0),fy(Ol(e,kc),Gu(t))}),vy=gy,my=Si(function(e){var t=Fc(e);return t="function"==typeof t?t:void 0,fy(Ol(e,kc),void 0,t)}),yy=Si(Zm);function by(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 _y(e,t){return by(e||[],t||[],bi)}function xy(e,t){return by(e||[],t||[],vh)}var wy=Si(function(e){var t=e.length,n=t>1?e[t-1]:void 0;return n="function"==typeof n?(e.pop(),n):void 0,Xm(e,n)}),Sy=wy,Ey={chunk:ml,compact:wu,concat:Su,difference:zc,differenceBy:Hc,differenceWith:qc,drop:Jc,dropRight:Yc,dropRightWhile:Qc,dropWhile:Zc,fill:xd,findIndex:Cd,findLastIndex:Pd,first:Id,flatten:Fa,flattenDeep:Ud,flattenDepth:Hd,fromPairs:ep,head:Id,indexOf:Sp,initial:Ep,intersection:Ap,intersectionBy:Lp,intersectionWith:Rp,join:Sf,last:Fc,lastIndexOf:Lf,nth:uh,pull:yg,pullAll:mg,pullAllBy:bg,pullAllWith:_g,pullAt:Eg,remove:Hg,reverse:Gg,slice:dv,sortedIndex:wv,sortedIndexBy:Sv,sortedIndexOf:Ev,sortedLastIndex:kv,sortedLastIndexBy:Cv,sortedLastIndexOf:Ov,sortedUniq:jv,sortedUniqBy:Lv,tail:Uv,take:Hv,takeRight:Vv,takeRightWhile:qv,takeWhile:Kv,union:zm,unionBy:Um,unionWith:Hm,uniq:Vm,uniqBy:qm,uniqWith:Km,unzip:Zm,unzipWith:Xm,without:sy,xor:hy,xorBy:vy,xorWith:my,zip:yy,zipObject:_y,zipObjectDeep:xy,zipWith:Sy},ky={countBy:dc,each:ed,eachRight:id,every:bd,filter:Sd,find:Od,findLast:Md,flatMap:$d,flatMapDeep:Dd,flatMapDepth:zd,forEach:ed,forEachRight:id,groupBy:ap,includes:xp,invokeMap:Vp,keyBy:Of,map:Bd,orderBy:Sh,partition:ug,reduce:Dg,reduceRight:Fg,reject:Ug,sample:ev,sampleSize:ov,shuffle:uv,size:cv,some:gv,sortBy:mv},Cy={now:gc},Oy={after:Jr,ary:gi,before:ts,bind:rs,bindKey:ss,curry:fc,curryRight:hc,debounce:yc,defer:Ic,delay:Bc,flip:Vd,memoize:Oa,negate:oh,once:_h,overArgs:jh,partial:ig,partialRight:sg,rearg:$g,rest:Kg,spread:Mv,throttle:dm,unary:Mm,wrap:ly},Ay={castArray:ul,clone:mu,cloneDeep:yu,cloneDeepWith:bu,cloneWith:_u,conformsTo:ec,eq:mi,gt:up,gte:cp,isArguments:Ii,isArray:jr,isArrayBuffer:Kp,isArrayLike:ki,isArrayLikeObject:kc,isBoolean:Jp,isBuffer:Di,isDate:Gp,isElement:Qp,isEmpty:Xp,isEqual:ef,isEqualWith:tf,isError:Za,isFinite:rf,isFunction:Gr,isInteger:of,isLength:Ei,isMap:uu,isMatch:af,isMatchWith:sf,isNaN:uf,isNative:df,isNil:pf,isNull:ff,isNumber:lf,isObject:Wr,isObjectLike:kr,isPlainObject:Qa,isRegExp:gf,isSafeInteger:mf,isSet:du,isString:mp,isSymbol:Cr,isTypedArray:Ji,isUndefined:yf,isWeakMap:bf,isWeakSet:_f,lt:If,lte:Tf,toArray:ah,toFinite:qr,toInteger:Kr,toLength:_d,toNumber:Hr,toPlainObject:Oc,toSafeInteger:wm,toString:Pa},jy={add:Nr,ceil:fl,divide:Kc,floor:qd,max:Ff,maxBy:Uf,mean:qf,meanBy:Kf,min:eh,minBy:th,multiply:rh,round:Qg,subtract:Dv,sum:zv,sumBy:Fv},Ly=bl,Ry=vp,Py=Rg,My={assign:oa,assignIn:ua,assignInWith:da,assignWith:fa,at:Ha,create:pc,defaults:Sc,defaultsDeep:Pc,entries:ld,entriesIn:ud,extend:ua,extendWith:da,findKey:jd,findLastKey:Nd,forIn:Gd,forInRight:Qd,forOwn:Zd,forOwnRight:Xd,functions:np,functionsIn:rp,get:Ta,has:fp,hasIn:qu,invert:Ip,invertBy:Dp,invoke:Up,keys:ta,keysIn:sa,mapKeys:Bf,mapValues:$f,merge:Yf,mergeWith:Rc,omit:gh,omitBy:bh,pick:dg,pickBy:yh,result:Jg,set:iv,setWith:av,toPairs:ld,toPairsIn:ud,transform:Em,unset:Gm,update:ty,updateWith:ny,values:bp,valuesIn:iy},Ny={at:cy,chain:hl,commit:xu,lodash:To,next:sh,plant:pg,reverse:py,tap:Jv,thru:pm,toIterator:vm,toJSON:ym,value:ym,valueOf:ym,wrapperChain:dy},Iy={camelCase:ll,capitalize:Os,deburr:Ms,endsWith:ad,escape:fd,escapeRegExp:vd,kebabCase:kf,lowerCase:Pf,lowerFirst:Mf,pad:Zh,padEnd:Xh,padStart:eg,parseInt:rg,repeat:Vg,replace:qg,snakeCase:fv,split:Rv,startCase:Iv,startsWith:Tv,template:cm,templateSettings:tm,toLower:bm,toUpper:Sm,trim:Om,trimEnd:Am,trimStart:Lm,truncate:Pm,unescape:Bm,upperCase:oy,upperFirst:Cs,words:ol},Ty={attempt:es,bindAll:is,cond:Qu,conforms:Xu,constant:Ho,defaultTo:bc,flow:Jd,flowRight:Yd,identity:Yr,iteratee:xf,matches:Wf,matchesProperty:Df,method:Qf,methodOf:Xf,mixin:nh,noop:Co,nthArg:ch,over:kh,overEvery:Lh,overSome:Rh,property:Yu,propertyOf:fg,range:Ig,rangeRight:Tg,stubArray:Al,stubFalse:Ti,stubObject:Bv,stubString:$v,stubTrue:Wv,times:gm,toPath:_m,uniqueId:Ym};var By=Math.max,$y=Math.min;var Wy=Math.min;var Dy,zy=4294967295,Fy=Array.prototype,Uy=Object.prototype.hasOwnProperty,Hy=mr?mr.iterator:void 0,Vy=Math.max,qy=Math.min,Ky=function(e){return function(t,n,r){if(null==r){var o=Wr(n),i=o&&ta(n),a=i&&i.length&&tp(n,i);(a?a.length:o)||(r=n,n=t,t=this)}return e(t,n,r)}}(nh);To.after=Oy.after,To.ary=Oy.ary,To.assign=My.assign,To.assignIn=My.assignIn,To.assignInWith=My.assignInWith,To.assignWith=My.assignWith,To.at=My.at,To.before=Oy.before,To.bind=Oy.bind,To.bindAll=Ty.bindAll,To.bindKey=Oy.bindKey,To.castArray=Ay.castArray,To.chain=Ny.chain,To.chunk=Ey.chunk,To.compact=Ey.compact,To.concat=Ey.concat,To.cond=Ty.cond,To.conforms=Ty.conforms,To.constant=Ty.constant,To.countBy=ky.countBy,To.create=My.create,To.curry=Oy.curry,To.curryRight=Oy.curryRight,To.debounce=Oy.debounce,To.defaults=My.defaults,To.defaultsDeep=My.defaultsDeep,To.defer=Oy.defer,To.delay=Oy.delay,To.difference=Ey.difference,To.differenceBy=Ey.differenceBy,To.differenceWith=Ey.differenceWith,To.drop=Ey.drop,To.dropRight=Ey.dropRight,To.dropRightWhile=Ey.dropRightWhile,To.dropWhile=Ey.dropWhile,To.fill=Ey.fill,To.filter=ky.filter,To.flatMap=ky.flatMap,To.flatMapDeep=ky.flatMapDeep,To.flatMapDepth=ky.flatMapDepth,To.flatten=Ey.flatten,To.flattenDeep=Ey.flattenDeep,To.flattenDepth=Ey.flattenDepth,To.flip=Oy.flip,To.flow=Ty.flow,To.flowRight=Ty.flowRight,To.fromPairs=Ey.fromPairs,To.functions=My.functions,To.functionsIn=My.functionsIn,To.groupBy=ky.groupBy,To.initial=Ey.initial,To.intersection=Ey.intersection,To.intersectionBy=Ey.intersectionBy,To.intersectionWith=Ey.intersectionWith,To.invert=My.invert,To.invertBy=My.invertBy,To.invokeMap=ky.invokeMap,To.iteratee=Ty.iteratee,To.keyBy=ky.keyBy,To.keys=ta,To.keysIn=My.keysIn,To.map=ky.map,To.mapKeys=My.mapKeys,To.mapValues=My.mapValues,To.matches=Ty.matches,To.matchesProperty=Ty.matchesProperty,To.memoize=Oy.memoize,To.merge=My.merge,To.mergeWith=My.mergeWith,To.method=Ty.method,To.methodOf=Ty.methodOf,To.mixin=Ky,To.negate=oh,To.nthArg=Ty.nthArg,To.omit=My.omit,To.omitBy=My.omitBy,To.once=Oy.once,To.orderBy=ky.orderBy,To.over=Ty.over,To.overArgs=Oy.overArgs,To.overEvery=Ty.overEvery,To.overSome=Ty.overSome,To.partial=Oy.partial,To.partialRight=Oy.partialRight,To.partition=ky.partition,To.pick=My.pick,To.pickBy=My.pickBy,To.property=Ty.property,To.propertyOf=Ty.propertyOf,To.pull=Ey.pull,To.pullAll=Ey.pullAll,To.pullAllBy=Ey.pullAllBy,To.pullAllWith=Ey.pullAllWith,To.pullAt=Ey.pullAt,To.range=Ty.range,To.rangeRight=Ty.rangeRight,To.rearg=Oy.rearg,To.reject=ky.reject,To.remove=Ey.remove,To.rest=Oy.rest,To.reverse=Ey.reverse,To.sampleSize=ky.sampleSize,To.set=My.set,To.setWith=My.setWith,To.shuffle=ky.shuffle,To.slice=Ey.slice,To.sortBy=ky.sortBy,To.sortedUniq=Ey.sortedUniq,To.sortedUniqBy=Ey.sortedUniqBy,To.split=Iy.split,To.spread=Oy.spread,To.tail=Ey.tail,To.take=Ey.take,To.takeRight=Ey.takeRight,To.takeRightWhile=Ey.takeRightWhile,To.takeWhile=Ey.takeWhile,To.tap=Ny.tap,To.throttle=Oy.throttle,To.thru=pm,To.toArray=Ay.toArray,To.toPairs=My.toPairs,To.toPairsIn=My.toPairsIn,To.toPath=Ty.toPath,To.toPlainObject=Ay.toPlainObject,To.transform=My.transform,To.unary=Oy.unary,To.union=Ey.union,To.unionBy=Ey.unionBy,To.unionWith=Ey.unionWith,To.uniq=Ey.uniq,To.uniqBy=Ey.uniqBy,To.uniqWith=Ey.uniqWith,To.unset=My.unset,To.unzip=Ey.unzip,To.unzipWith=Ey.unzipWith,To.update=My.update,To.updateWith=My.updateWith,To.values=My.values,To.valuesIn=My.valuesIn,To.without=Ey.without,To.words=Iy.words,To.wrap=Oy.wrap,To.xor=Ey.xor,To.xorBy=Ey.xorBy,To.xorWith=Ey.xorWith,To.zip=Ey.zip,To.zipObject=Ey.zipObject,To.zipObjectDeep=Ey.zipObjectDeep,To.zipWith=Ey.zipWith,To.entries=My.toPairs,To.entriesIn=My.toPairsIn,To.extend=My.assignIn,To.extendWith=My.assignInWith,Ky(To,To),To.add=jy.add,To.attempt=Ty.attempt,To.camelCase=Iy.camelCase,To.capitalize=Iy.capitalize,To.ceil=jy.ceil,To.clamp=Ly,To.clone=Ay.clone,To.cloneDeep=Ay.cloneDeep,To.cloneDeepWith=Ay.cloneDeepWith,To.cloneWith=Ay.cloneWith,To.conformsTo=Ay.conformsTo,To.deburr=Iy.deburr,To.defaultTo=Ty.defaultTo,To.divide=jy.divide,To.endsWith=Iy.endsWith,To.eq=Ay.eq,To.escape=Iy.escape,To.escapeRegExp=Iy.escapeRegExp,To.every=ky.every,To.find=ky.find,To.findIndex=Ey.findIndex,To.findKey=My.findKey,To.findLast=ky.findLast,To.findLastIndex=Ey.findLastIndex,To.findLastKey=My.findLastKey,To.floor=jy.floor,To.forEach=ky.forEach,To.forEachRight=ky.forEachRight,To.forIn=My.forIn,To.forInRight=My.forInRight,To.forOwn=My.forOwn,To.forOwnRight=My.forOwnRight,To.get=My.get,To.gt=Ay.gt,To.gte=Ay.gte,To.has=My.has,To.hasIn=My.hasIn,To.head=Ey.head,To.identity=Yr,To.includes=ky.includes,To.indexOf=Ey.indexOf,To.inRange=Ry,To.invoke=My.invoke,To.isArguments=Ay.isArguments,To.isArray=jr,To.isArrayBuffer=Ay.isArrayBuffer,To.isArrayLike=Ay.isArrayLike,To.isArrayLikeObject=Ay.isArrayLikeObject,To.isBoolean=Ay.isBoolean,To.isBuffer=Ay.isBuffer,To.isDate=Ay.isDate,To.isElement=Ay.isElement,To.isEmpty=Ay.isEmpty,To.isEqual=Ay.isEqual,To.isEqualWith=Ay.isEqualWith,To.isError=Ay.isError,To.isFinite=Ay.isFinite,To.isFunction=Ay.isFunction,To.isInteger=Ay.isInteger,To.isLength=Ay.isLength,To.isMap=Ay.isMap,To.isMatch=Ay.isMatch,To.isMatchWith=Ay.isMatchWith,To.isNaN=Ay.isNaN,To.isNative=Ay.isNative,To.isNil=Ay.isNil,To.isNull=Ay.isNull,To.isNumber=Ay.isNumber,To.isObject=Wr,To.isObjectLike=Ay.isObjectLike,To.isPlainObject=Ay.isPlainObject,To.isRegExp=Ay.isRegExp,To.isSafeInteger=Ay.isSafeInteger,To.isSet=Ay.isSet,To.isString=Ay.isString,To.isSymbol=Ay.isSymbol,To.isTypedArray=Ay.isTypedArray,To.isUndefined=Ay.isUndefined,To.isWeakMap=Ay.isWeakMap,To.isWeakSet=Ay.isWeakSet,To.join=Ey.join,To.kebabCase=Iy.kebabCase,To.last=Fc,To.lastIndexOf=Ey.lastIndexOf,To.lowerCase=Iy.lowerCase,To.lowerFirst=Iy.lowerFirst,To.lt=Ay.lt,To.lte=Ay.lte,To.max=jy.max,To.maxBy=jy.maxBy,To.mean=jy.mean,To.meanBy=jy.meanBy,To.min=jy.min,To.minBy=jy.minBy,To.stubArray=Ty.stubArray,To.stubFalse=Ty.stubFalse,To.stubObject=Ty.stubObject,To.stubString=Ty.stubString,To.stubTrue=Ty.stubTrue,To.multiply=jy.multiply,To.nth=Ey.nth,To.noop=Ty.noop,To.now=Cy.now,To.pad=Iy.pad,To.padEnd=Iy.padEnd,To.padStart=Iy.padStart,To.parseInt=Iy.parseInt,To.random=Py,To.reduce=ky.reduce,To.reduceRight=ky.reduceRight,To.repeat=Iy.repeat,To.replace=Iy.replace,To.result=My.result,To.round=jy.round,To.sample=ky.sample,To.size=ky.size,To.snakeCase=Iy.snakeCase,To.some=ky.some,To.sortedIndex=Ey.sortedIndex,To.sortedIndexBy=Ey.sortedIndexBy,To.sortedIndexOf=Ey.sortedIndexOf,To.sortedLastIndex=Ey.sortedLastIndex,To.sortedLastIndexBy=Ey.sortedLastIndexBy,To.sortedLastIndexOf=Ey.sortedLastIndexOf,To.startCase=Iy.startCase,To.startsWith=Iy.startsWith,To.subtract=jy.subtract,To.sum=jy.sum,To.sumBy=jy.sumBy,To.template=Iy.template,To.times=Ty.times,To.toFinite=Ay.toFinite,To.toInteger=Kr,To.toLength=Ay.toLength,To.toLower=Iy.toLower,To.toNumber=Ay.toNumber,To.toSafeInteger=Ay.toSafeInteger,To.toString=Ay.toString,To.toUpper=Iy.toUpper,To.trim=Iy.trim,To.trimEnd=Iy.trimEnd,To.trimStart=Iy.trimStart,To.truncate=Iy.truncate,To.unescape=Iy.unescape,To.uniqueId=Ty.uniqueId,To.upperCase=Iy.upperCase,To.upperFirst=Iy.upperFirst,To.each=ky.forEach,To.eachRight=ky.forEachRight,To.first=Ey.head,Ky(To,(Dy={},oc(To,function(e,t){Uy.call(To.prototype,t)||(Dy[t]=e)}),Dy),{chain:!1}),To.VERSION="4.17.23",(To.templateSettings=Iy.templateSettings).imports._=To,Yo(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){To[e].placeholder=To}),Yo(["drop","take"],function(e,t){ko.prototype[e]=function(n){n=void 0===n?1:Vy(Kr(n),0);var r=this.__filtered__&&!t?new ko(this):this.clone();return r.__filtered__?r.__takeCount__=qy(n,r.__takeCount__):r.__views__.push({size:qy(n,zy),type:e+(r.__dir__<0?"Right":"")}),r},ko.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}}),Yo(["filter","map","takeWhile"],function(e,t){var n=t+1,r=1==n||3==n;ko.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:Gu(e),type:n}),t.__filtered__=t.__filtered__||r,t}}),Yo(["head","last"],function(e,t){var n="take"+(t?"Right":"");ko.prototype[e]=function(){return this[n](1).value()[0]}}),Yo(["initial","tail"],function(e,t){var n="drop"+(t?"":"Right");ko.prototype[e]=function(){return this.__filtered__?new ko(this):this[n](1)}}),ko.prototype.compact=function(){return this.filter(Yr)},ko.prototype.find=function(e){return this.filter(e).head()},ko.prototype.findLast=function(e){return this.reverse().find(e)},ko.prototype.invokeMap=Si(function(e,t){return"function"==typeof e?new ko(this):this.map(function(n){return Fp(n,e,t)})}),ko.prototype.reject=function(e){return this.filter(oh(Gu(e)))},ko.prototype.slice=function(e,t){e=Kr(e);var n=this;return n.__filtered__&&(e>0||t<0)?new ko(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),void 0!==t&&(n=(t=Kr(t))<0?n.dropRight(-t):n.take(t-e)),n)},ko.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},ko.prototype.toArray=function(){return this.take(zy)},oc(ko.prototype,function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),o=To[r?"take"+("last"==t?"Right":""):t],i=r||/^find/.test(t);o&&(To.prototype[t]=function(){var t=this.__wrapped__,a=r?[1]:arguments,s=t instanceof ko,l=a[0],u=s||jr(t),c=function(e){var t=o.apply(To,$a([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 ko(this);var g=e.apply(t,a);return g.__actions__.push({func:pm,args:[c],thisArg:void 0}),new Po(g,d)}return f&&h?e.apply(this,a):(g=this.thru(c),f?r?g.value()[0]:g.value():g)})}),Yo(["pop","push","shift","sort","splice","unshift"],function(e){var t=Fy[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);To.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var o=this.value();return t.apply(jr(o)?o:[],e)}return this[n](function(n){return t.apply(jr(n)?n:[],e)})}}),oc(ko.prototype,function(e,t){var n=To[t];if(n){var r=n.name+"";Uy.call(jo,r)||(jo[r]=[]),jo[r].push({name:t,func:n})}}),jo[ui(void 0,2).name]=[{name:"wrapper",func:void 0}],ko.prototype.clone=function(){var e=new ko(this.__wrapped__);return e.__actions__=Mo(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Mo(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Mo(this.__views__),e},ko.prototype.reverse=function(){if(this.__filtered__){var e=new ko(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},ko.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=jr(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=$y(t,e+a);break;case"takeRight":e=By(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=Wy(l,this.__takeCount__);if(!n||!r&&o==l&&f==l)return mm(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},To.prototype.at=Ny.at,To.prototype.chain=Ny.wrapperChain,To.prototype.commit=Ny.commit,To.prototype.next=Ny.next,To.prototype.plant=Ny.plant,To.prototype.reverse=Ny.reverse,To.prototype.toJSON=To.prototype.valueOf=To.prototype.value=Ny.value,To.prototype.first=To.prototype.head,Hy&&(To.prototype[Hy]=Ny.toIterator);var Jy=p(Object.freeze({__proto__:null,add:Nr,after:Jr,ary:gi,assign:oa,assignIn:ua,assignInWith:da,assignWith:fa,at:Ha,attempt:es,before:ts,bind:rs,bindAll:is,bindKey:ss,camelCase:ll,capitalize:Os,castArray:ul,ceil:fl,chain:hl,chunk:ml,clamp:bl,clone:mu,cloneDeep:yu,cloneDeepWith:bu,cloneWith:_u,commit:xu,compact:wu,concat:Su,cond:Qu,conforms:Xu,conformsTo:ec,constant:Ho,countBy:dc,create:pc,curry:fc,curryRight:hc,debounce:yc,deburr:Ms,defaultTo:bc,defaults:Sc,defaultsDeep:Pc,defer:Ic,delay:Bc,difference:zc,differenceBy:Hc,differenceWith:qc,divide:Kc,drop:Jc,dropRight:Yc,dropRightWhile:Qc,dropWhile:Zc,each:ed,eachRight:id,endsWith:ad,entries:ld,entriesIn:ud,eq:mi,escape:fd,escapeRegExp:vd,every:bd,extend:ua,extendWith:da,fill:xd,filter:Sd,find:Od,findIndex:Cd,findKey:jd,findLast:Md,findLastIndex:Pd,findLastKey:Nd,first:Id,flatMap:$d,flatMapDeep:Dd,flatMapDepth:zd,flatten:Fa,flattenDeep:Ud,flattenDepth:Hd,flip:Vd,floor:qd,flow:Jd,flowRight:Yd,forEach:ed,forEachRight:id,forIn:Gd,forInRight:Qd,forOwn:Zd,forOwnRight:Xd,fromPairs:ep,functions:np,functionsIn:rp,get:Ta,groupBy:ap,gt:up,gte:cp,has:fp,hasIn:qu,head:Id,identity:Yr,inRange:vp,includes:xp,indexOf:Sp,initial:Ep,intersection:Ap,intersectionBy:Lp,intersectionWith:Rp,invert:Ip,invertBy:Dp,invoke:Up,invokeMap:Vp,isArguments:Ii,isArray:jr,isArrayBuffer:Kp,isArrayLike:ki,isArrayLikeObject:kc,isBoolean:Jp,isBuffer:Di,isDate:Gp,isElement:Qp,isEmpty:Xp,isEqual:ef,isEqualWith:tf,isError:Za,isFinite:rf,isFunction:Gr,isInteger:of,isLength:Ei,isMap:uu,isMatch:af,isMatchWith:sf,isNaN:uf,isNative:df,isNil:pf,isNull:ff,isNumber:lf,isObject:Wr,isObjectLike:kr,isPlainObject:Qa,isRegExp:gf,isSafeInteger:mf,isSet:du,isString:mp,isSymbol:Cr,isTypedArray:Ji,isUndefined:yf,isWeakMap:bf,isWeakSet:_f,iteratee:xf,join:Sf,kebabCase:kf,keyBy:Of,keys:ta,keysIn:sa,last:Fc,lastIndexOf:Lf,lodash:To,lowerCase:Pf,lowerFirst:Mf,lt:If,lte:Tf,map:Bd,mapKeys:Bf,mapValues:$f,matches:Wf,matchesProperty:Df,max:Ff,maxBy:Uf,mean:qf,meanBy:Kf,memoize:Oa,merge:Yf,mergeWith:Rc,method:Qf,methodOf:Xf,min:eh,minBy:th,mixin:nh,multiply:rh,negate:oh,next:sh,noop:Co,now:gc,nth:uh,nthArg:ch,omit:gh,omitBy:bh,once:_h,orderBy:Sh,over:kh,overArgs:jh,overEvery:Lh,overSome:Rh,pad:Zh,padEnd:Xh,padStart:eg,parseInt:rg,partial:ig,partialRight:sg,partition:ug,pick:dg,pickBy:yh,plant:pg,property:Yu,propertyOf:fg,pull:yg,pullAll:mg,pullAllBy:bg,pullAllWith:_g,pullAt:Eg,random:Rg,range:Ig,rangeRight:Tg,rearg:$g,reduce:Dg,reduceRight:Fg,reject:Ug,remove:Hg,repeat:Vg,replace:qg,rest:Kg,result:Jg,reverse:Gg,round:Qg,sample:ev,sampleSize:ov,set:iv,setWith:av,shuffle:uv,size:cv,slice:dv,snakeCase:fv,some:gv,sortBy:mv,sortedIndex:wv,sortedIndexBy:Sv,sortedIndexOf:Ev,sortedLastIndex:kv,sortedLastIndexBy:Cv,sortedLastIndexOf:Ov,sortedUniq:jv,sortedUniqBy:Lv,split:Rv,spread:Mv,startCase:Iv,startsWith:Tv,stubArray:Al,stubFalse:Ti,stubObject:Bv,stubString:$v,stubTrue:Wv,subtract:Dv,sum:zv,sumBy:Fv,tail:Uv,take:Hv,takeRight:Vv,takeRightWhile:qv,takeWhile:Kv,tap:Jv,template:cm,templateSettings:tm,throttle:dm,thru:pm,times:gm,toArray:ah,toFinite:qr,toInteger:Kr,toIterator:vm,toJSON:ym,toLength:_d,toLower:bm,toNumber:Hr,toPairs:ld,toPairsIn:ud,toPath:_m,toPlainObject:Oc,toSafeInteger:wm,toString:Pa,toUpper:Sm,transform:Em,trim:Om,trimEnd:Am,trimStart:Lm,truncate:Pm,unary:Mm,unescape:Bm,union:zm,unionBy:Um,unionWith:Hm,uniq:Vm,uniqBy:qm,uniqWith:Km,uniqueId:Ym,unset:Gm,unzip:Zm,unzipWith:Xm,update:ty,updateWith:ny,upperCase:oy,upperFirst:Cs,value:ym,valueOf:ym,values:bp,valuesIn:iy,without:sy,words:ol,wrap:ly,wrapperAt:cy,wrapperChain:dy,wrapperCommit:xu,wrapperLodash:To,wrapperNext:sh,wrapperPlant:pg,wrapperReverse:py,wrapperToIterator:vm,wrapperValue:ym,xor:hy,xorBy:vy,xorWith:my,zip:yy,zipObject:_y,zipObjectDeep:xy,zipWith:Sy,default:To})),Yy={};Object.defineProperty(Yy,"__esModule",{value:!0}),Yy.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)},Yy.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 Gy=e,Qy=u,Zy=l,Xy=i,eb=c;var tb=y.exports;Object.defineProperty(m,"__esModule",{value:!0}),m.isComplete=m.default=void 0;var nb=tb(b.exports),rb=tb(S),ob=tb(Gy),ib=Qy,ab=Jy,sb=tb(Zy),lb=f,ub=eb,cb=Xy,db=Yy;const pb=(0,sb.default)("pie-ui:multiple-choice"),fb=(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||u>l)};function hb(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=fb;class gb extends HTMLElement{constructor(){super(),(0,nb.default)(this,"_scheduleMathRender",()=>{this._mathRenderPending||(this._mathRenderPending=!0,requestAnimationFrame(()=>{this._mathObserver&&this._mathObserver.disconnect(),pb("render complete - render math"),(0,ub.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,ab.debounce)(()=>{if(this._model&&this._session){var e=ob.default.createElement(rb.default,{model:this._model,session:this._session,options:this._options,onChoiceChanged:this._onChange.bind(this),onShowCorrectToggle:this.onShowCorrectToggle.bind(this),...hb(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,ib.createRoot)(this)),this._root.render(e),!0!==this._model.keyboardEventsEnabled||this._keyboardEventsEnabled||this.enableKeyboardEvents()}else pb("skip")},50,{leading:!1,trailing:!0}),this._dispatchResponseChanged=(0,ab.debounce)(()=>{this.dispatchEvent(new lb.SessionChangedEvent(this.tagName.toLowerCase(),fb(this._session,this._model,this.audioComplete,this)))}),this._dispatchModelSet=(0,ab.debounce)(()=>{this.dispatchEvent(new lb.ModelSetEvent(this.tagName.toLowerCase(),fb(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,ub.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,db.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=cb.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,db.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,db.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()}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={value:o,selected:!r.includes(o),selector:"Keyboard"};this._onChange(i)}}var vb=m.default=gb;const mb=l;const yb=v.TYPE,bb="ebsr-multiple-choice",_b=mb("pie-elements:ebsr");class xb extends vb{}customElements.get(bb)||customElements.define(bb,xb);const wb=e=>Array.isArray(e)&&e.length>0,Sb=e=>{const t=Ta(e,"value.partA.value"),n=Ta(e,"value.partB.value");return wb(t)&&wb(n)};function Eb(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 kb extends HTMLElement{constructor(){super(),kb.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(bb).then(()=>{this.setPartModel(this.partA,"partA"),this.setPartModel(this.partB,"partB")})}set session(e){this._session=e,customElements.whenDefined(bb).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}=Eb(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},_b("[onSessionChanged] session: ",this._session);const n=Sb(this._session);this.dispatchEvent(new v(this.tagName.toLowerCase(),n))}get partA(){return this.querySelector(`${bb}#a`)}get partB(){return this.querySelector(`${bb}#b`)}connectedCallback(){this._render(),this._initPlayerObserver(),this.addEventListener(yb,this.onSessionUpdated)}disconnectedCallback(){this._disconnectPlayerObserver(),this.removeEventListener(yb,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}=Eb(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 <${bb} id="a"></${bb}>\n <${bb} id="b"></${bb}>\n `,customElements.get(bb)&&(this.setPartModel(this.partA,"partA"),this.setPartModel(this.partB,"partB"),this.setPartSession(this.partA,"partA"),this.setPartSession(this.partB,"partB"))}}export{kb as default,Sb as isSessionComplete};
|