@pie-element/multiple-choice 13.3.3 → 13.3.5
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/CHANGELOG.md +13 -0
- package/configure/CHANGELOG.md +10 -0
- package/configure/package.json +3 -3
- package/controller/CHANGELOG.md +6 -0
- package/controller/lib/index.js +10 -0
- package/controller/lib/index.js.map +1 -1
- package/controller/package.json +1 -1
- package/lib/index.js +4 -2
- package/lib/index.js.map +1 -1
- package/lib/multiple-choice.js +3 -1
- package/lib/multiple-choice.js.map +1 -1
- package/lib/utils.js +14 -0
- package/lib/utils.js.map +1 -0
- package/module/configure.js +1 -1
- package/module/controller.js +8 -0
- package/module/element.js +1 -1
- package/module/index.html +1 -1
- package/module/manifest.json +3 -3
- package/module/print.html +1 -1
- package/module/print.js +1 -1
- package/package.json +2 -2
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.10/module/index.js";import{_dll_pie_lib__math_rendering as c}from"../../../@pie-lib/math-rendering-module@^5.1.0/module/index.js";function d(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function p(e){if(e.__esModule)return e;var t=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(e).forEach(function(n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}),t}var f={},h={exports:{}};!function(e){e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports}(h),d(h.exports);var g={exports:{}},v={exports:{}},m={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}(m),d(m.exports);var y={exports:{}};!function(e){var t=m.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}(y),d(y.exports),function(e){var t=m.exports.default,n=y.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}(v),d(v.exports),function(e){var t=v.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}(g),d(g.exports);var b={},x={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}(x),d(x.exports);var _={};function w(e,t){return null!=e?e:t()}function S(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 E=e=>"string"==typeof e,k=()=>{let e,t;const n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},C=e=>null==e?"":""+e,O=/###/g,A=e=>e&&e.indexOf("###")>-1?e.replace(O,"."):e,j=e=>!e||E(e),L=(e,t,n)=>{const r=E(t)?t.split("."):t;let o=0;for(;o<r.length-1;){if(j(e))return{};const t=A(r[o]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++o}return j(e)?{}:{obj:e,k:A(r[o])}},R=(e,t,n)=>{const{obj:r,k:o}=L(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=L(e,a,Object);for(;void 0===s.obj&&a.length;)i=`${a[a.length-1]}.${i}`,a=a.slice(0,a.length-1),s=L(e,a,Object),S([s,"optionalAccess",e=>e.obj])&&void 0!==s.obj[`${s.k}.${i}`]&&(s.obj=void 0);s.obj[`${s.k}.${i}`]=n},M=(e,t)=>{const{obj:n,k:r}=L(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},P=(e,t,n)=>{for(const r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?E(e[r])||e[r]instanceof String||E(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):P(e[r],t[r],n):e[r]=t[r]);return e},N=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var I={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const T=e=>E(e)?e.replace(/[&<>"'\/]/g,e=>I[e]):e;const B=[" ",",","?","!",";"],$=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),W=(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},D=e=>S([e,"optionalAccess",e=>e.replace,"call",e=>e("_","-")]),z={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){S([console,"optionalAccess",t=>t[e],"optionalAccess",e=>e.apply,"optionalCall",e=>e(console,t)])}};class F{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||"i18next:",this.logger=e||z,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:(E(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new F(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new F(this.logger,e)}}var U=new F;class V{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 H extends V{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):E(n)&&o?a.push(...n.split(o)):a.push(n)));const s=M(this.data,a);return!s&&!t&&!n&&e.indexOf(".")>-1&&(e=a[0],t=a[1],n=a.slice(2).join(".")),!s&&i&&E(n)?W(S([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),R(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)(E(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=M(this.data,a)||{};i.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?P(s,n,o):s={...s,...n},R(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 K={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,o){return e.forEach(e=>{t=w(S([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 J(e,t){const{[q]:n}=e(function(){const e=[],t=Object.create(null);let n;return t.get=(r,o)=>(S([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(w(S([t,"optionalAccess",e=>e.keySeparator]),()=>"."))}const Y={},G=e=>!E(e)&&"boolean"!=typeof e&&"number"!=typeof e;class Z extends V{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=U.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===S([r,"optionalAccess",e=>e.res]))return!1;const o=G(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=B.filter(e=>t.indexOf(e)<0&&n.indexOf(e)<0);if(0===r.length)return!0;const o=$.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:E(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:E(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=J(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"===S([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=S([p,"optionalAccess",e=>e.res]);const h=S([p,"optionalAccess",e=>e.usedKey])||a,g=S([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&&!E(r.count),b=Z.hasDefaultValue(r),x=y?this.pluralResolver.getSuffix(c,r.count,r):"",_=r.ordinal&&y?this.pluralResolver.getSuffix(c,r.count,{ordinal:!1}):"",w=y&&!r.ordinal&&0===r.count,k=w&&r[`defaultValue${this.options.pluralSeparator}zero`]||r[`defaultValue${x}`]||r[`defaultValue${_}`]||r.defaultValue;let C=f;m&&!f&&b&&(C=k);const O=G(C),A=Object.prototype.toString.apply(C);if(!(m&&C&&O&&["[object Number]","[object Function]","[object RegExp]"].indexOf(A)<0)||E(v)&&Array.isArray(C))if(m&&E(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=k),this.isValidLookup(f)||(o=!0,f=a);const s=(r.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&o?void 0:f,d=b&&k!==f&&this.options.updateMissing;if(o||t||d){if(this.logger.log(d?"updateKey":"missingKey",c,l,a,d?k: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):S([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}`]||k)})}):n(e,a,k))}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,C,{...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(C),t=e?[]:{},n=e?g:h;for(const e in C)if(Object.prototype.hasOwnProperty.call(C,e)){const o=`${n}${i}${e}`;t[e]=b&&!f?this.translate(o,{...r,defaultValue:G(k)?k[e]:void 0,joinArrays:!1,ns:s}):this.translate(o,{...r,joinArrays:!1,ns:s}),t[e]===o&&(t[e]=C[e])}f=t}}return o?(p.res=f,p.usedParams=this.getUsedParamsDetails(r),p):f}extendTranslation(e,t,n,r,o){if(S([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=E(e)&&(void 0!==S([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&&!E(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)=>S([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=E(i)?[i]:i;return null!=e&&S([a,"optionalAccess",e=>e.length])&&!1!==n.applyPostProcessor&&(e=K.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 E(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&&!E(t.count),d=c&&!t.ordinal&&0===t.count,p=void 0!==t.context&&(E(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,Y[`${f[0]}-${e}`]||!S([this,"access",e=>e.utils,"optionalAccess",e=>e.hasLoadedNamespace])||S([this,"access",e=>e.utils,"optionalAccess",e=>e.hasLoadedNamespace,"call",e=>e(a)])||(Y[`${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(S([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 S([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&&!E(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 Q{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=U.create("languageUtils")}getScriptPartFromCode(e){if(!(e=D(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=D(e))||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(E(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)),E(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 E(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))):E(e)&&o(this.formatLanguageCode(e)),n.forEach(e=>{r.indexOf(e)<0&&o(this.formatLanguageCode(e))}),r}}const X={zero:0,one:1,two:2,few:3,many:4,other:5},ee={select:e=>1===e?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class te{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=U.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){const n=D("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!"),ee;if(!e.match(/-|_/))return ee;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)),S([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)=>X[e]-X[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 ne=(e,t,n,r=".",o=!0)=>{let i=((e,t,n)=>{const r=M(e,n);return void 0!==r?r:M(t,n)})(e,t,n);return!i&&o&&E(n)&&(i=W(e,n,r),void 0===i&&(i=W(t,n,r))),i},re=e=>e.replace(/\$/g,"$$$$");class oe{constructor(e={}){this.logger=U.create("interpolator"),this.options=e,this.format=S([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:T,this.escapeValue=void 0===n||n,this.useRawValueToEscape=void 0!==r&&r,this.prefix=o?N(o):i||"{{",this.suffix=a?N(a):s||"}}",this.formatSeparator=l||",",this.unescapePrefix=u?"":c||"-",this.unescapeSuffix=this.unescapePrefix?"":u||"",this.nestingPrefix=d?N(d):p||N("$t("),this.nestingSuffix=f?N(f):h||N(")"),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)=>S([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=ne(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(ne(t,s,i,this.options.keySeparator,this.options.ignoreJSONStructure),a,n,{...r,...t,interpolationkey:i})};this.resetRegExp();const u=S([r,"optionalAccess",e=>e.missingInterpolationHandler])||this.options.missingInterpolationHandler,c=void 0!==S([r,"optionalAccess",e=>e.interpolation,"optionalAccess",e=>e.skipOnVariables])?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>re(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?re(this.escape(e)):re(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=E(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 E(i)||this.useRawValueToEscape||(i=C(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);(w(S([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&&!E(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&&!E(o))return o;E(o)||(o=C(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 ie=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(D(r),o),t[a]=s),s(n)}},ae=e=>(t,n,r)=>e(D(n),r)(t);class se{constructor(e={}){this.logger=U.create("formatter"),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||",";const n=t.cacheInBuiltFormats?ie:ae;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()]=ie(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=S([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 le extends V{constructor(e,t,n,r={}){super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=U.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=[],S([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}=L(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();E(e)&&(e=this.languageUtils.toResolveHierarchy(e)),E(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(!S([this,"access",e=>e.services,"optionalAccess",e=>e.utils,"optionalAccess",e=>e.hasLoadedNamespace])||S([this,"access",e=>e.services,"optionalAccess",e=>e.utils,"optionalAccess",e=>e.hasLoadedNamespace,"call",e=>e(t)])){if(null!=n&&""!==n){if(S([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 ue=()=>({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]),E(e[1])&&(t.defaultValue=e[1]),E(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}),ce=e=>(E(e.ns)&&(e.ns=[e.ns]),E(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),E(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),S([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),de=()=>{};class pe extends V{constructor(e={},t){var n;if(super(),this.options=ce(e),this.services={},this.logger=U,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&&(E(e.ns)?e.defaultNS=e.ns:e.ns.indexOf("translation")<0&&(e.defaultNS=e.ns[0]));const n=ue();var r;this.options={...n,...this.options,...ce(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||(S([r=this,"optionalAccess",e=>e.modules,"optionalAccess",e=>e.backend,"optionalAccess",e=>e.name,"optionalAccess",e=>e.indexOf,"call",e=>e("Locize")])>0||S([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||S([r,"optionalAccess",e=>e.options,"optionalAccess",e=>e.backend,"optionalAccess",e=>e.backends])&&r.options.backend.backends.some(e=>S([e,"optionalAccess",e=>e.name,"access",e=>e.indexOf,"call",e=>e("Locize")])>0||S([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?U.init(o(this.modules.logger),this.options):U.init(null,this.options),e=this.modules.formatter?this.modules.formatter:se;const t=new Q(this.options);this.store=new H(this.options.resources,this.options);const r=this.services;r.logger=U,r.resourceStore=this.store,r.languageUtils=t,r.pluralResolver=new te(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 oe(this.options),r.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},r.backendConnector=new le(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 Z(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=de),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=k(),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=de){let n=t;const r=E(e)?e:this.language;if("function"==typeof e&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if("cimode"===S([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))}S([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=k();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=de),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&&K.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=k();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=E(t)?t:t&&t[0],i=this.store.hasLanguageSomeTranslations(n)?n:this.services.languageUtils.getBestMatchFromCodes(E(t)?[t]:t);i&&(this.language||r(i),this.translator.language||this.translator.changeLanguage(i),S([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=J(e,{...this.options,...t})),`${i.keyPrefix}${a}${e}`)):("function"==typeof e&&(e=J(e,{...this.options,...t})),s=i.keyPrefix?`${i.keyPrefix}${a}${e}`:e),this.t(s,i)};return E(e)?r.lng=e:r.lngs=e,r.ns=t,r.keyPrefix=n,r}t(...e){return S([this,"access",e=>e.translator,"optionalAccess",e=>e.translate,"call",t=>t(...e)])}exists(...e){return S([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=k();return this.options.ns?(E(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=k();E(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||(S([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=S([this,"access",e=>e.services,"optionalAccess",e=>e.languageUtils])||new Q(ue());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 pe(e,t);return n.createInstance=pe.createInstance,n}cloneInstance(e={},t=de){const n=e.forkResourceStore;n&&delete e.forkResourceStore;const r={...this.options,...e,isClone:!0},o=new pe(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 H(e,r),o.services.resourceStore=o.store}if(e.interpolation){const t={...ue().interpolation,...this.options.interpolation,...e.interpolation},n={...r,interpolation:t};o.services.interpolator=new oe(n)}return o.translator=new Z(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 fe=pe.createInstance();fe.createInstance,fe.dir,fe.init,fe.loadResources,fe.reloadResources,fe.use,fe.changeLanguage,fe.getFixedT,fe.t,fe.exists,fe.setDefaultNamespace,fe.hasLoadedNamespace,fe.loadNamespaces,fe.loadLanguages;fe.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 he={translator:{...fe,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 fe.t(e,{lng:n,...t})}},languageOptions:[{value:"en_US",label:"English (US)"},{value:"es_ES",label:"Spanish"}]},ge=p(Object.freeze({__proto__:null,default:he})),ve={},me={},ye={};function be(){return be=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},be.apply(null,arguments)}function xe(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 _e(e,t){return _e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},_e(e,t)}function we(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,_e(e,t)}function Se(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}var Ee={disabled:!1};var ke=e.createContext(null),Ce=function(e){return e.scrollTop};const Oe=e,Ae=t;var je="unmounted",Le="exited",Re="entering",Me="entered",Pe="exiting",Ne=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=Le,r.appearStatus=Re):o=Me:o=t.unmountOnExit||t.mountOnEnter?je:Le,r.state={status:o},r.nextCallback=null,r}we(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===je?{status:Le}: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!==Re&&n!==Me&&(t=Re):n!==Re&&n!==Me||(t=Pe)}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===Re){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:Ae.findDOMNode(this);n&&Ce(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Le&&this.setState({status:je})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,o=this.props.nodeRef?[r]:[Ae.findDOMNode(this),r],i=o[0],a=o[1],s=this.getTimeouts(),l=r?s.appear:s.enter;!e&&!n||Ee.disabled?this.safeSetState({status:Me},function(){t.props.onEntered(i)}):(this.props.onEnter(i,a),this.safeSetState({status:Re},function(){t.props.onEntering(i,a),t.onTransitionEnd(l,function(){t.safeSetState({status:Me},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:Ae.findDOMNode(this);t&&!Ee.disabled?(this.props.onExit(r),this.safeSetState({status:Pe},function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,function(){e.safeSetState({status:Le},function(){e.props.onExited(r)})})})):this.safeSetState({status:Le},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:Ae.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===je)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=xe(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return Oe.createElement(ke.Provider,{value:null},"function"==typeof n?n(e,r):Oe.cloneElement(Oe.Children.only(n),r))},t}(Oe.Component);function Ie(){}Ne.contextType=ke,Ne.propTypes={},Ne.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Ie,onEntering:Ie,onEntered:Ie,onExit:Ie,onExiting:Ie,onExited:Ie},Ne.UNMOUNTED=je,Ne.EXITED=Le,Ne.ENTERING=Re,Ne.ENTERED=Me,Ne.EXITING=Pe;var Te=Ne;const Be=e;var $e=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})},We=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=Se(n.className,r):n.setAttribute("class",Se(n.className&&n.className.baseVal||"",r)));var n,r})},De=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}we(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&&Ce(e),r&&(this.appliedClasses[t][n]=r,$e(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&&We(e,r),o&&We(e,o),i&&We(e,i)},n.render=function(){var e=this.props;e.classNames;var t=xe(e,["classNames"]);return Be.createElement(Te,be({},t,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(Be.Component);De.defaultProps={classNames:""},De.propTypes={};var ze=De;const{Children:Fe}=e,{cloneElement:Ue}=e,{isValidElement:Ve}=e;function He(e,t){var n=Object.create(null);return e&&Fe.map(e,function(e){return e}).forEach(function(e){n[e.key]=function(e){return t&&Ve(e)?t(e):e}(e)}),n}function Ke(e,t,n){return null!=n[t]?n[t]:e.props[t]}function qe(e,t,n){var r=He(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(Ve(a)){var s=i in t,l=i in r,u=t[i],c=Ve(u)&&!u.props.in;!l||s&&!c?l||!s||c?l&&s&&Ve(u)&&(o[i]=Ue(a,{onExited:n.bind(null,a),in:u.props.in,exit:Ke(a,"exit",e),enter:Ke(a,"enter",e)})):o[i]=Ue(a,{in:!1}):o[i]=Ue(a,{onExited:n.bind(null,a),in:!0,exit:Ke(a,"exit",e),enter:Ke(a,"enter",e)})}}),o}const Je=e;var Ye=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},Ge=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}we(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,He(n.children,function(e){return Ue(e,{onExited:r.bind(null,e),in:!0,appear:Ke(e,"appear",n),enter:Ke(e,"enter",n),exit:Ke(e,"exit",n)})})):qe(e,o,i),firstRender:!1}},n.handleExited=function(e,t){var n=He(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState(function(t){var n=be({},t.children);return delete n[e.key],{children:n}}))},n.render=function(){var e=this.props,t=e.component,n=e.childFactory,r=xe(e,["component","childFactory"]),o=this.state.contextValue,i=Ye(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,null===t?Je.createElement(ke.Provider,{value:o},i):Je.createElement(ke.Provider,{value:o},Je.createElement(t,r,i))},t}(Je.Component);Ge.propTypes={},Ge.defaultProps={component:"div",childFactory:function(e){return e}};var Ze=Ge;const Qe=e,Xe=t;var et=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}we(t,e);var n=t.prototype;return n.handleLifecycle=function(e,t,n){var r,o=this.props.children,i=Qe.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:Xe.findDOMNode(this);this.props[e](a)}},n.render=function(){var e=this.props,t=e.children,n=e.in,r=xe(e,["children","in"]),o=Qe.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,Qe.createElement(Ze,r,n?Qe.cloneElement(i,{key:"first",onEnter:this.handleEnter,onEntering:this.handleEntering,onEntered:this.handleEntered}):Qe.cloneElement(a,{key:"second",onEnter:this.handleExit,onEntering:this.handleExiting,onEntered:this.handleExited}))},t}(Qe.Component);et.propTypes={};var tt=et;const nt=e;var rt,ot;var it="out-in",at="in-out",st=function(e,t,n){return function(){var r;e.props[t]&&(r=e.props)[t].apply(r,arguments),n()}},lt=((rt={})[it]=function(e){var t=e.current,n=e.changeState;return nt.cloneElement(t,{in:!1,onExited:st(t,"onExited",function(){n(Re,null)})})},rt[at]=function(e){var t=e.current,n=e.changeState,r=e.children;return[t,nt.cloneElement(r,{in:!0,onEntered:st(r,"onEntered",function(){n(Re)})})]},rt),ut=((ot={})[it]=function(e){var t=e.children,n=e.changeState;return nt.cloneElement(t,{in:!0,onEntered:st(t,"onEntered",function(){n(Me,nt.cloneElement(t,{in:!0}))})})},ot[at]=function(e){var t=e.current,n=e.children,r=e.changeState;return[nt.cloneElement(t,{in:!1,onExited:st(t,"onExited",function(){r(Me,nt.cloneElement(n,{in:!0}))})}),nt.cloneElement(n,{in:!0})]},ot),ct=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:Me,current:null},t.appeared=!1,t.changeState=function(e,n){void 0===n&&(n=t.state.current),t.setState({status:e,current:n})},t}we(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===Re&&e.mode===at?{status:Re}:!t.current||(n=t.current,r=e.children,n===r||nt.isValidElement(n)&&nt.isValidElement(r)&&null!=n.key&&n.key===r.key)?{current:nt.cloneElement(e.children,{in:!0})}:{status:Pe};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 Re:e=ut[r](s);break;case Pe:e=lt[r](s);break;case Me:e=a}return nt.createElement(ke.Provider,{value:{isMounting:!this.appeared}},e)},t}(nt.Component);ct.propTypes={},ct.defaultProps={mode:it};var dt=ct,pt=p(Object.freeze({__proto__:null,CSSTransition:ze,ReplaceTransition:tt,SwitchTransition:dt,TransitionGroup:Ze,Transition:Te,config:Ee}));const ft=e,ht=o,{Box:gt}=n,vt=r,mt=i;var yt=h.exports;Object.defineProperty(ye,"__esModule",{value:!0}),ye.default=void 0;var bt=yt(g.exports),xt=yt(ft),_t=pt,wt=ht,St=yt(gt),Et=yt(vt),kt=mt;const Ct=(0,wt.styled)(St.default)({width:"33px",height:"33px","& svg":{position:"absolute",display:"inline-block",width:"33px",height:"33px",verticalAlign:"middle","& hide":{display:"none"}}}),Ot=(0,wt.styled)("svg")({"& .incorrect-fill":{fill:`var(--feedback-incorrect-bg-color, ${kt.color.incorrect()})`},"& .correct-fill":{fill:`var(--feedback-correct-bg-color, ${kt.color.correct()})`}}),At=(0,wt.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 jt extends xt.default.Component{constructor(e){super(e),(0,bt.default)(this,"getIncorrectIcon",()=>xt.default.createElement(Ot,{key:"1",preserveAspectRatio:"xMinYMin meet",x:"0px",y:"0px",viewBox:"0 0 44 40",style:{enableBackground:"new 0 0 44 40"}},xt.default.createElement("g",null,xt.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"}),xt.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,bt.default)(this,"getCorrectIcon",()=>xt.default.createElement(Ot,{key:"2",preserveAspectRatio:"xMinYMin meet",version:"1.1",x:"0px",y:"0px",viewBox:"0 0 44 40",style:{enableBackground:"new 0 0 44 40"}},xt.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=xt.default.createRef()}render(){const{correctness:e}=this.props,t=(()=>"incorrect"===e?this.getIncorrectIcon():"correct"===e?this.getCorrectIcon():null)();return xt.default.createElement(Ct,null,xt.default.createElement(_t.TransitionGroup,null,e&&xt.default.createElement(_t.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}},xt.default.createElement(At,{ref:this.nodeRef},t))))}}(0,bt.default)(jt,"propTypes",{correctness:Et.default.string}),ye.default=jt;const{FormControlLabel:Lt}=n,{Box:Rt}=n,{Checkbox:Mt}=n,{Radio:Pt}=n,Nt=e,It=r,Tt=o,Bt=i,$t=a;var Wt=h.exports;Object.defineProperty(me,"__esModule",{value:!0}),me.default=me.StyledRadio=me.StyledFormControlLabel=me.StyledCheckbox=me.ChoiceInput=void 0;var Dt=Wt(g.exports),zt=Wt(x.exports),Ft=Wt(Lt),Ut=Wt(Nt),Vt=Wt(It),Ht=Tt,Kt=Wt(Rt),qt=Wt(Mt),Jt=Bt,Yt=Wt(Pt),Gt=Wt($t),Zt=Wt(ye);const Qt="multiple-choice-component",Xt=(0,Ht.styled)(Kt.default)({display:"flex",alignItems:"center",backgroundColor:Jt.color.background()}),en=(0,Ht.styled)(Kt.default)({display:"flex",alignItems:"center",backgroundColor:Jt.color.background(),flex:1,"& .MuiFormControlLabel-root":{marginLeft:"-14px"},"& label":{color:Jt.color.text(),"& > span":{fontSize:"inherit"},"& > .MuiButtonBase-root":{padding:"12px"}}}),tn=(0,Ht.styled)("span")(({theme:e})=>({display:"flex",alignItems:"center","& > span":{marginLeft:`-${e.spacing(1)}`}})),nn=(0,Ht.styled)("span")({position:"absolute",left:"-10000px",top:"auto",width:"1px",height:"1px",overflow:"hidden"}),rn=me.StyledFormControlLabel=(0,Ht.styled)(Ft.default)({"& .MuiFormControlLabel-label":{color:`${Jt.color.text()} !important`,backgroundColor:Jt.color.background(),letterSpacing:"normal"},"&.Mui-disabled *":{cursor:"not-allowed !important"}}),on=(e,t)=>({[`&.${Qt}`]:{color:`var(--choice-input-${e}, ${t}) !important`}}),an=e=>{const t=t=>e?`${e}-${t}`:t;return{[t("root")]:{...on("color",Jt.color.text()),..."correct"===e?on("correct-color",Jt.color.text()):{},..."incorrect"===e?on("incorrect-color",Jt.color.incorrect()):{}},[t("checked")]:{..."correct"===e?on("correct-selected-color",Jt.color.correct()):{},..."incorrect"===e?on("incorrect-checked",Jt.color.incorrect()):{},...e?{}:on("selected-color",Jt.color.primary())},[t("disabled")]:{...on("disabled-color",Jt.color.text()),..."correct"===e?on("correct-disabled-color",Jt.color.disabled()):{},..."incorrect"===e?on("incorrect-disabled-color",Jt.color.disabled()):{},opacity:.6,cursor:"not-allowed !important",pointerEvents:"initial !important"},focusVisibleUnchecked:{outline:`2px solid ${Jt.color.keyBoardFocusIndicator()}`,backgroundColor:"transparent"},focusVisibleChecked:{outline:`2px solid ${Jt.color.keyBoardFocusIndicator()}`,backgroundColor:"transparent"}}},sn=(0,Ht.styled)(qt.default,{shouldForwardProp:e=>"correctness"!==e})(({correctness:e})=>{const t=an(e),n=t=>e?`${e}-${t}`:t;return{[`&.${Qt}`]:{...t[n("root")],"&.Mui-checked":t[n("checked")],"&.Mui-disabled":e?{}:t[n("disabled")],"&:hover:not(.Mui-disabled) svg":{boxShadow:`0px 0px 0px 2px ${Jt.color.keyBoardFocusIndicator()}`,borderRadius:"4px"}},"&.Mui-focusVisible":{"&:not(.Mui-checked)":t.focusVisibleUnchecked,"&.Mui-checked":t.focusVisibleChecked}}}),ln=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 Ut.default.createElement(sn,(0,zt.default)({id:a,slotProps:{input:{ref:l}},onKeyDown:s,disableRipple:!0},u,{correctness:t,className:Qt}))};me.StyledCheckbox=ln;const un=(0,Ht.styled)(Yt.default,{shouldForwardProp:e=>"correctness"!==e})(({correctness:e})=>{const t=an(e),n=t=>e?`${e}-${t}`:t;return{[`&.${Qt}`]:{...t[n("root")],"&.Mui-checked":t[n("checked")],"&.Mui-disabled":e?{}:t[n("disabled")],"&.Mui-focusVisible:not(.Mui-checked)":t.focusVisibleUnchecked,"&.Mui-focusVisible.Mui-checked":t.focusVisibleChecked,"&:hover:not(.Mui-disabled) svg":{boxShadow:`0px 0px 0px 2px ${Jt.color.keyBoardFocusIndicator()}`,borderRadius:"50%"}},"&.Mui-focusVisible":{"& input":{outline:0},"& .MuiTouchRipple-root":{display:"none"}}}}),cn=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 Ut.default.createElement(un,(0,zt.default)({id:a,slotProps:{input:{ref:l}},disableRipple:!0},u,{correctness:t,className:Qt,name:s}))};me.StyledRadio=cn;class dn extends Ut.default.Component{constructor(e){super(e),(0,Dt.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?ln:cn,v="checkbox"===e?"checkbox":"radio-button",m={..."horizontal"===c&&{[`& .${Qt}`]:{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?Ut.default.createElement(nn,{id:this.descId},y?`Pick the answer below, ${n}`:n):null,x=Ut.default.createElement(Ut.default.Fragment,null,n&&!h?Ut.default.createElement(Xt,{component:"span"},Ut.default.createElement("span",{"aria-hidden":"true"},n,"."," "),Ut.default.createElement(Jt.PreviewPrompt,{className:"prompt-label",prompt:o,tagName:"span"})):Ut.default.createElement(Jt.PreviewPrompt,{className:"prompt-label",prompt:o,tagName:"span"})),_={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?Ut.default.createElement(tn,null,b,Ut.default.createElement(g,(0,zt.default)({},_,{style:{padding:0}})),Ut.default.createElement("span",{"aria-hidden":"true"},n?`${n}.`:"")):Ut.default.createElement(Ut.default.Fragment,null,b,Ut.default.createElement(g,_));return Ut.default.createElement("div",{className:(0,Gt.default)(a,"corespring-"+v,"choice-input")},Ut.default.createElement(Xt,null,!l&&u&&Ut.default.createElement(Zt.default,{correctness:i}),Ut.default.createElement(en,{className:"checkbox-holder",sx:m},Ut.default.createElement(rn,{label:x,value:d,htmlFor:this.choiceId,labelPlacement:h?"top":void 0,control:w}))),s&&Ut.default.createElement(Jt.PreviewPrompt,{className:"rationale",defaultClassName:"rationale",prompt:s}),Ut.default.createElement(Jt.Feedback,{feedback:r,correctness:i}))}}me.ChoiceInput=dn,(0,Dt.default)(dn,"propTypes",{choiceMode:Vt.default.oneOf(["radio","checkbox"]),displayKey:Vt.default.string,checked:Vt.default.bool.isRequired,correctness:Vt.default.string,disabled:Vt.default.bool.isRequired,feedback:Vt.default.string,label:Vt.default.string.isRequired,rationale:Vt.default.string,onChange:Vt.default.func.isRequired,value:Vt.default.string.isRequired,className:Vt.default.string,tagName:Vt.default.string,hideTick:Vt.default.bool,isEvaluateMode:Vt.default.bool,choicesLayout:Vt.default.oneOf(["vertical","grid","horizontal"]),isSelectionButtonBelow:Vt.default.bool}),(0,Dt.default)(dn,"defaultProps",{rationale:null,checked:!1,isEvaluateMode:!1}),me.default=dn;const pn=e,fn=r,hn=o,{Box:gn}=n;var vn=h.exports;Object.defineProperty(ve,"__esModule",{value:!0}),ve.default=ve.Choice=void 0;var mn=vn(g.exports),yn=vn(pn),bn=vn(fn),xn=hn,_n=vn(gn),wn=vn(me);const Sn=(0,xn.styled)(_n.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 En extends yn.default.Component{constructor(...e){super(...e),(0,mn.default)(this,"state",{isHovered:!1}),(0,mn.default)(this,"handleMouseEnter",()=>{const{disabled:e,checked:t}=this.props;e||t||this.setState({isHovered:!0})}),(0,mn.default)(this,"handleMouseLeave",()=>{this.setState({isHovered:!1})}),(0,mn.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:x}=this.state,_="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):x&&!a&&k&&(C=m,O=y)),s&&f&&"initial"!==f?A=f:x&&!a&&v&&"initial"!==v&&(A=v);const j=E||k,L=j?{border:`${(e=>{if(!e)return"2px";const t=String(e).trim();return/^\d+(\.\d+)?$/.test(t)?`${t}px`:t})(O)} solid ${C}`,borderRadius:"8px"}:{},R=t===n-1||"vertical"!==c||j,M="horizontal"===c,P="initial"!==A?A:"initial";return yn.default.createElement("div",{className:_,key:t,style:{backgroundColor:P,...L},onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave},yn.default.createElement(Sn,{component:"div",noBorder:R,horizontalLayout:M},yn.default.createElement(wn.default,S)))}}ve.Choice=En,(0,mn.default)(En,"propTypes",{}),En.propTypes={choiceMode:bn.default.oneOf(["radio","checkbox"]),choice:bn.default.object,disabled:bn.default.bool.isRequired,onChoiceChanged:bn.default.func,index:bn.default.number,choicesLength:bn.default.number,showCorrect:bn.default.bool,isEvaluateMode:bn.default.bool,checked:bn.default.bool,correctness:bn.default.string,displayKey:bn.default.string,choicesLayout:bn.default.oneOf(["vertical","grid","horizontal"]),gridColumns:bn.default.string,selectedAnswerBackgroundColor:bn.default.string,selectedAnswerStrokeColor:bn.default.string,selectedAnswerStrokeWidth:bn.default.string,hoverAnswerBackgroundColor:bn.default.string,hoverAnswerStrokeColor:bn.default.string,hoverAnswerStrokeWidth:bn.default.string,tagName:bn.default.string,isSelectionButtonBelow:bn.default.bool},ve.default=En;const kn=e,Cn=r,On=s,An=a,jn=o,{Box:Ln}=n,Rn=i;var Mn=h.exports;Object.defineProperty(_,"__esModule",{value:!0}),_.default=_.MultipleChoice=void 0;var Pn=Mn(g.exports),Nn=Mn(kn),In=Mn(Cn),Tn=Mn(On),Bn=Mn(An),$n=jn,Wn=Mn(Ln),Dn=Rn,zn=Mn(ge),Fn=Mn(ve);const{translator:Un}=zn.default,Vn=(0,$n.styled)(Wn.default)({color:Dn.color.text(),backgroundColor:Dn.color.background(),"& *":{"-webkit-font-smoothing":"antialiased"},position:"relative","& legend":{border:"none !important"}}),Hn=(0,$n.styled)("h2")(({theme:e})=>({display:"block",fontSize:"inherit",margin:"0",fontWeight:"normal",paddingBottom:e.spacing(2)})),Kn=(0,$n.styled)(Wn.default)(({theme:e})=>({marginBottom:e.spacing(2)})),qn=(0,$n.styled)(Wn.default)({display:"flex",flexDirection:"row",flexWrap:"wrap"}),Jn=(0,$n.styled)(Wn.default)({display:"grid"}),Yn=(0,$n.styled)("fieldset")({border:"0px",padding:"0.01em 0 0 0",margin:"0px",minWidth:"0px"}),Gn=(0,$n.styled)("h3")({position:"absolute",left:"-10000px",top:"auto",width:"1px",height:"1px",overflow:"hidden"}),Zn=(0,$n.styled)("div")(({theme:e})=>({fontSize:e.typography.fontSize-2,color:e.palette.error.main,paddingTop:e.spacing(1)}));class Qn extends Nn.default.Component{constructor(e){super(e),(0,Pn.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,Pn.default)(this,"onToggle",()=>{"evaluate"===this.props.mode&&this.setState({showCorrect:!this.state.showCorrect},()=>{this.props.onShowCorrectToggle&&this.props.onShowCorrectToggle()})}),(0,Pn.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=Gn.withComponent(`h${i}`),s="radio"===t?"Multiple Choice Question":"Multiple Select Question";return Nn.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:x}=this.props,{showCorrect:_,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(!x)return;let e=1;return a&&(e+=1),Math.min(6,x+e)})(),A=Nn.default.createElement(Dn.PreviewPrompt,{tagName:"div",className:"prompt",defaultClassName:"teacher-instructions",prompt:u}),j="grid"===this.props.choicesLayout?Jn:"horizontal"===this.props.choicesLayout?qn:Wn.default;return Nn.default.createElement(Vn,{id:"main-container",className:(0,Bn.default)(n,"multiple-choice")},a&&Nn.default.createElement(Hn,{as:x?`h${Math.min(6,x+1)}`:"h2"},a),this.renderHeading(),u&&Nn.default.createElement(Kn,null,d?A:Nn.default.createElement(Dn.Collapsible,{labels:{hidden:"Show Teacher Instructions",visible:"Hide Teacher Instructions"}},A)),Nn.default.createElement(Yn,{role:"radio"===o?"radiogroup":"group"},Nn.default.createElement(Dn.PreviewPrompt,{className:"prompt",defaultClassName:"prompt",prompt:(L=s,L&&O?(0,Dn.transformDataHeadings)(L,O):L),tagName:"legend",autoplayAudioEnabled:v,customAudioButton:y}),!(b&&c)&&Nn.default.createElement(Tn.default,{show:E,toggled:_,onToggle:this.onToggle.bind(this),language:p}),Nn.default.createElement(j,{style:k},r.map((e,n)=>Nn.default.createElement(Fn.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:_,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&&Nn.default.createElement(Zn,null,h&&g?h===g?Un.t("translation:multipleChoice:minmaxSelections_equal",{lng:p,minSelections:h}):Un.t("translation:multipleChoice:minmaxSelections_range",{lng:p,minSelections:h,maxSelections:g}):h?Un.t("translation:multipleChoice:minSelections",{lng:p,minSelections:h}):""),"checkbox"===o&&w&&Nn.default.createElement(Zn,null,Un.t("translation:multipleChoice:maxSelections_"+(1===g?"one":"other"),{lng:p,maxSelections:g})));var L}}_.MultipleChoice=Qn,(0,Pn.default)(Qn,"propTypes",{className:In.default.string,mode:In.default.oneOf(["gather","view","evaluate"]),choiceMode:In.default.oneOf(["radio","checkbox"]),keyMode:In.default.oneOf(["numbers","letters","none"]),choices:In.default.array,partLabel:In.default.string,prompt:In.default.string,teacherInstructions:In.default.string,session:In.default.object,disabled:In.default.bool,onChoiceChanged:In.default.func,responseCorrect:In.default.bool,correctResponse:In.default.array,choicesLayout:In.default.oneOf(["vertical","grid","horizontal"]),gridColumns:In.default.string,alwaysShowCorrect:In.default.bool,animationsDisabled:In.default.bool,language:In.default.string,selectedAnswerBackgroundColor:In.default.string,selectedAnswerStrokeColor:In.default.string,selectedAnswerStrokeWidth:In.default.string,hoverAnswerBackgroundColor:In.default.string,hoverAnswerStrokeColor:In.default.string,hoverAnswerStrokeWidth:In.default.string,onShowCorrectToggle:In.default.func,isSelectionButtonBelow:In.default.bool,minSelections:In.default.number,maxSelections:In.default.number,autoplayAudioEnabled:In.default.bool,customAudioButton:{playImage:In.default.string,pauseImage:In.default.string},options:In.default.object,baseHeadingLevel:In.default.number,includeSrHeading:In.default.bool}),Qn.defaultProps={session:{value:[]}},_.default=Qn;const Xn=e,er=r,tr=i;var nr=h.exports;Object.defineProperty(b,"__esModule",{value:!0}),b.default=void 0;var rr=nr(x.exports),or=nr(g.exports),ir=nr(Xn),ar=nr(er),sr=tr,lr=nr(_);class ur extends ir.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 ir.default.createElement(sr.PreviewLayout,{extraCSSRules:s,fontSizeFactor:l,classes:{}},ir.default.createElement(lr.default,(0,rr.default)({},e,{options:o,session:n,onChoiceChanged:t,onShowCorrectToggle:r,baseHeadingLevel:i,includeSrHeading:a})))}}(0,or.default)(ur,"propTypes",{model:ar.default.object,session:ar.default.object,options:ar.default.object,onChoiceChanged:ar.default.func,onShowCorrectToggle:ar.default.func,extraCSSRules:ar.default.shape({names:ar.default.arrayOf(ar.default.string),rules:ar.default.string}),baseHeadingLevel:ar.default.number,includeSrHeading:ar.default.bool}),(0,or.default)(ur,"defaultProps",{model:{},session:{}}),b.default=ur;var cr="object"==typeof global&&global&&global.Object===Object&&global,dr="object"==typeof self&&self&&self.Object===Object&&self,pr=cr||dr||Function("return this")(),fr=pr.Symbol,hr=Object.prototype,gr=hr.hasOwnProperty,vr=hr.toString,mr=fr?fr.toStringTag:void 0;var yr=Object.prototype.toString;var br=fr?fr.toStringTag:void 0;function xr(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":br&&br in Object(e)?function(e){var t=gr.call(e,mr),n=e[mr];try{e[mr]=void 0;var r=!0}catch(e){}var o=vr.call(e);return r&&(t?e[mr]=n:delete e[mr]),o}(e):function(e){return yr.call(e)}(e)}function _r(e){return null!=e&&"object"==typeof e}function wr(e){return"symbol"==typeof e||_r(e)&&"[object Symbol]"==xr(e)}function Sr(e){return"number"==typeof e?e:wr(e)?NaN:+e}function Er(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 kr=Array.isArray,Cr=fr?fr.prototype:void 0,Or=Cr?Cr.toString:void 0;function Ar(e){if("string"==typeof e)return e;if(kr(e))return Er(e,Ar)+"";if(wr(e))return Or?Or.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function jr(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=Ar(n),r=Ar(r)):(n=Sr(n),r=Sr(r)),o=e(n,r)}return o}}var Lr=jr(function(e,t){return e+t},0),Rr=/\s/;function Mr(e){for(var t=e.length;t--&&Rr.test(e.charAt(t)););return t}var Pr=/^\s+/;function Nr(e){return e?e.slice(0,Mr(e)+1).replace(Pr,""):e}function Ir(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}var Tr=/^[-+]0x[0-9a-f]+$/i,Br=/^0b[01]+$/i,$r=/^0o[0-7]+$/i,Wr=parseInt;function Dr(e){if("number"==typeof e)return e;if(wr(e))return NaN;if(Ir(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Ir(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Nr(e);var n=Br.test(e);return n||$r.test(e)?Wr(e.slice(2),n?2:8):Tr.test(e)?NaN:+e}var zr=1/0;function Fr(e){return e?(e=Dr(e))===zr||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function Ur(e){var t=Fr(e),n=t%1;return t==t?n?t-n:t:0}function Vr(e,t){if("function"!=typeof t)throw new TypeError("Expected a function");return e=Ur(e),function(){if(--e<1)return t.apply(this,arguments)}}function Hr(e){return e}function Kr(e){if(!Ir(e))return!1;var t=xr(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}var qr,Jr=pr["__core-js_shared__"],Yr=(qr=/[^.]+$/.exec(Jr&&Jr.keys&&Jr.keys.IE_PROTO||""))?"Symbol(src)_1."+qr:"";var Gr=Function.prototype.toString;function Zr(e){if(null!=e){try{return Gr.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var Qr=/^\[object .+?Constructor\]$/,Xr=Function.prototype,eo=Object.prototype,to=Xr.toString,no=eo.hasOwnProperty,ro=RegExp("^"+to.call(no).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function oo(e){return!(!Ir(e)||function(e){return!!Yr&&Yr in e}(e))&&(Kr(e)?ro:Qr).test(Zr(e))}function io(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return oo(n)?n:void 0}var ao=io(pr,"WeakMap"),so=ao&&new ao,lo=so?function(e,t){return so.set(e,t),e}:Hr,uo=lo,co=Object.create,po=function(){function e(){}return function(t){if(!Ir(t))return{};if(co)return co(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}(),fo=po;function ho(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=fo(e.prototype),r=e.apply(n,t);return Ir(r)?r:n}}function go(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 vo=Math.max;function mo(e,t,n,r){for(var o=-1,i=e.length,a=n.length,s=-1,l=t.length,u=vo(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 yo=Math.max;function bo(e,t,n,r){for(var o=-1,i=e.length,a=-1,s=n.length,l=-1,u=t.length,c=yo(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 xo(){}function _o(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function wo(){}_o.prototype=fo(xo.prototype),_o.prototype.constructor=_o;var So=so?function(e){return so.get(e)}:wo,Eo=So,ko={},Co=Object.prototype.hasOwnProperty;function Oo(e){for(var t=e.name+"",n=ko[t],r=Co.call(ko,t)?n.length:0;r--;){var o=n[r],i=o.func;if(null==i||i==e)return o.name}return t}function Ao(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}function jo(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}function Lo(e){if(e instanceof _o)return e.clone();var t=new Ao(e.__wrapped__,e.__chain__);return t.__actions__=jo(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}Ao.prototype=fo(xo.prototype),Ao.prototype.constructor=Ao;var Ro=Object.prototype.hasOwnProperty;function Mo(e){if(_r(e)&&!kr(e)&&!(e instanceof _o)){if(e instanceof Ao)return e;if(Ro.call(e,"__wrapped__"))return Lo(e)}return new Ao(e)}function Po(e){var t=Oo(e),n=Mo[t];if("function"!=typeof n||!(t in _o.prototype))return!1;if(e===n)return!0;var r=Eo(n);return!!r&&e===r[0]}Mo.prototype=xo.prototype,Mo.prototype.constructor=Mo;var No=Date.now;function Io(e){var t=0,n=0;return function(){var r=No(),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 To=Io(uo),Bo=/\{\n\/\* \[wrapped with (.+)\] \*/,$o=/,? & /;var Wo=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;function Do(e){return function(){return e}}var zo=function(){try{var e=io(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),Fo=zo,Uo=Fo?function(e,t){return Fo(e,"toString",{configurable:!0,enumerable:!1,value:Do(t),writable:!0})}:Hr,Vo=Io(Uo);function Ho(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function Ko(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 Jo(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):Ko(e,qo,n)}function Yo(e,t){return!!(null==e?0:e.length)&&Jo(e,t,0)>-1}var Go=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]];function Zo(e,t,n){var r=t+"";return Vo(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(Wo,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return Ho(Go,function(n){var r="_."+n[0];t&n[1]&&!Yo(e,r)&&e.push(r)}),e.sort()}(function(e){var t=e.match(Bo);return t?t[1].split($o):[]}(r),n)))}function Qo(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 Po(e)&&To(p,d),p.placeholder=r,Zo(p,e,t)}function Xo(e){return e.placeholder}var ei=/^(?:0|[1-9]\d*)$/;function ti(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&ei.test(e))&&e>-1&&e%1==0&&e<t}var ni=Math.min;var ri="__lodash_placeholder__";function oi(e,t){for(var n=-1,r=e.length,o=0,i=[];++n<r;){var a=e[n];a!==t&&a!==ri||(e[n]=ri,i[o++]=n)}return i}function ii(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:ho(e);return function v(){for(var m=arguments.length,y=Array(m),b=m;b--;)y[b]=arguments[b];if(f)var x=Xo(v),_=function(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}(y,x);if(r&&(y=mo(y,r,o,f)),i&&(y=bo(y,i,a,f)),m-=_,f&&m<u){var w=oi(y,x);return Qo(e,t,ii,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=ni(t.length,n),o=jo(e);r--;){var i=t[r];e[r]=ti(i,n)?o[i]:void 0}return e}(y,s):h&&m>1&&y.reverse(),c&&l<m&&(y.length=l),this&&this!==pr&&this instanceof v&&(E=g||ho(E)),E.apply(S,y)}}var ai="__lodash_placeholder__",si=128,li=Math.min;var ui=Math.max;function ci(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:ui(Ur(a),0),s=void 0===s?s:Ur(s),u-=o?o.length:0,64&t){var c=r,d=o;r=o=void 0}var p=l?void 0:Eo(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==si&&8==n||r==si&&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?mo(l,s,t[4]):s,e[4]=l?oi(e[3],ai):t[4]}(s=t[5])&&(l=e[5],e[5]=l?bo(l,s,t[6]):s,e[6]=l?oi(e[5],ai):t[6]),(s=t[7])&&(e[7]=s),r&si&&(e[8]=null==e[8]?t[8]:li(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:ui(f[9]-u,0))&&24&t&&(t&=-25),t&&1!=t)h=8==t||16==t?function(e,t,n){var r=ho(e);return function o(){for(var i=arguments.length,a=Array(i),s=i,l=Xo(o);s--;)a[s]=arguments[s];var u=i<3&&a[0]!==l&&a[i-1]!==l?[]:oi(a,l);return(i-=u.length)<n?Qo(e,t,ii,o.placeholder,void 0,a,u,void 0,void 0,n-i):go(this&&this!==pr&&this instanceof o?r:e,this,a)}}(e,t,s):32!=t&&33!=t||o.length?ii.apply(void 0,f):function(e,t,n,r){var o=1&t,i=ho(e);return function t(){for(var a=-1,s=arguments.length,l=-1,u=r.length,c=Array(u+s),d=this&&this!==pr&&this instanceof t?i:e;++l<u;)c[l]=r[l];for(;s--;)c[l++]=arguments[++a];return go(d,o?n:this,c)}}(e,t,n,r);else var h=function(e,t,n){var r=1&t,o=ho(e);return function t(){return(this&&this!==pr&&this instanceof t?o:e).apply(r?n:this,arguments)}}(e,t,n);return Zo((p?uo:To)(h,f),e,t)}function di(e,t,n){return t=n?void 0:t,ci(e,128,void 0,void 0,void 0,void 0,t=e&&null==t?e.length:t)}function pi(e,t,n){"__proto__"==t&&Fo?Fo(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function fi(e,t){return e===t||e!=e&&t!=t}var hi=Object.prototype.hasOwnProperty;function gi(e,t,n){var r=e[t];hi.call(e,t)&&fi(r,n)&&(void 0!==n||t in e)||pi(e,t,n)}function vi(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?pi(n,s,l):gi(n,s,l)}return n}var mi=Math.max;function yi(e,t,n){return t=mi(void 0===t?e.length-1:t,0),function(){for(var r=arguments,o=-1,i=mi(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),go(e,this,s)}}function bi(e,t){return Vo(yi(e,t,Hr),e+"")}function xi(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}function _i(e){return null!=e&&xi(e.length)&&!Kr(e)}function wi(e,t,n){if(!Ir(n))return!1;var r=typeof t;return!!("number"==r?_i(n)&&ti(t,n.length):"string"==r&&t in n)&&fi(n[t],e)}function Si(e){return bi(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&&wi(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 Ei=Object.prototype;function ki(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Ei)}function Ci(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Oi(e){return _r(e)&&"[object Arguments]"==xr(e)}var Ai=Object.prototype,ji=Ai.hasOwnProperty,Li=Ai.propertyIsEnumerable,Ri=Oi(function(){return arguments}())?Oi:function(e){return _r(e)&&ji.call(e,"callee")&&!Li.call(e,"callee")};function Mi(){return!1}var Pi="object"==typeof exports&&exports&&!exports.nodeType&&exports,Ni=Pi&&"object"==typeof module&&module&&!module.nodeType&&module,Ii=Ni&&Ni.exports===Pi?pr.Buffer:void 0,Ti=(Ii?Ii.isBuffer:void 0)||Mi,Bi={};function $i(e){return function(t){return e(t)}}Bi["[object Float32Array]"]=Bi["[object Float64Array]"]=Bi["[object Int8Array]"]=Bi["[object Int16Array]"]=Bi["[object Int32Array]"]=Bi["[object Uint8Array]"]=Bi["[object Uint8ClampedArray]"]=Bi["[object Uint16Array]"]=Bi["[object Uint32Array]"]=!0,Bi["[object Arguments]"]=Bi["[object Array]"]=Bi["[object ArrayBuffer]"]=Bi["[object Boolean]"]=Bi["[object DataView]"]=Bi["[object Date]"]=Bi["[object Error]"]=Bi["[object Function]"]=Bi["[object Map]"]=Bi["[object Number]"]=Bi["[object Object]"]=Bi["[object RegExp]"]=Bi["[object Set]"]=Bi["[object String]"]=Bi["[object WeakMap]"]=!1;var Wi="object"==typeof exports&&exports&&!exports.nodeType&&exports,Di=Wi&&"object"==typeof module&&module&&!module.nodeType&&module,zi=Di&&Di.exports===Wi&&cr.process,Fi=function(){try{var e=Di&&Di.require&&Di.require("util").types;return e||zi&&zi.binding&&zi.binding("util")}catch(e){}}(),Ui=Fi&&Fi.isTypedArray,Vi=Ui?$i(Ui):function(e){return _r(e)&&xi(e.length)&&!!Bi[xr(e)]},Hi=Object.prototype.hasOwnProperty;function Ki(e,t){var n=kr(e),r=!n&&Ri(e),o=!n&&!r&&Ti(e),i=!n&&!r&&!o&&Vi(e),a=n||r||o||i,s=a?Ci(e.length,String):[],l=s.length;for(var u in e)!t&&!Hi.call(e,u)||a&&("length"==u||o&&("offset"==u||"parent"==u)||i&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||ti(u,l))||s.push(u);return s}function qi(e,t){return function(n){return e(t(n))}}var Ji=qi(Object.keys,Object),Yi=Object.prototype.hasOwnProperty;function Gi(e){if(!ki(e))return Ji(e);var t=[];for(var n in Object(e))Yi.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Zi(e){return _i(e)?Ki(e):Gi(e)}var Qi=Object.prototype.hasOwnProperty,Xi=Si(function(e,t){if(ki(t)||_i(t))vi(t,Zi(t),e);else for(var n in t)Qi.call(t,n)&&gi(e,n,t[n])}),ea=Xi;var ta=Object.prototype.hasOwnProperty;function na(e){if(!Ir(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=ki(e),n=[];for(var r in e)("constructor"!=r||!t&&ta.call(e,r))&&n.push(r);return n}function ra(e){return _i(e)?Ki(e,!0):na(e)}var oa=Si(function(e,t){vi(t,ra(t),e)}),ia=oa,aa=Si(function(e,t,n,r){vi(t,ra(t),e,r)}),sa=aa,la=Si(function(e,t,n,r){vi(t,Zi(t),e,r)}),ua=la,ca=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,da=/^\w*$/;function pa(e,t){if(kr(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!wr(e))||(da.test(e)||!ca.test(e)||null!=t&&e in Object(t))}var fa=io(Object,"create");var ha=Object.prototype.hasOwnProperty;var ga=Object.prototype.hasOwnProperty;function va(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 ma(e,t){for(var n=e.length;n--;)if(fi(e[n][0],t))return n;return-1}va.prototype.clear=function(){this.__data__=fa?fa(null):{},this.size=0},va.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},va.prototype.get=function(e){var t=this.__data__;if(fa){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return ha.call(t,e)?t[e]:void 0},va.prototype.has=function(e){var t=this.__data__;return fa?void 0!==t[e]:ga.call(t,e)},va.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=fa&&void 0===t?"__lodash_hash_undefined__":t,this};var ya=Array.prototype.splice;function ba(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])}}ba.prototype.clear=function(){this.__data__=[],this.size=0},ba.prototype.delete=function(e){var t=this.__data__,n=ma(t,e);return!(n<0)&&(n==t.length-1?t.pop():ya.call(t,n,1),--this.size,!0)},ba.prototype.get=function(e){var t=this.__data__,n=ma(t,e);return n<0?void 0:t[n][1]},ba.prototype.has=function(e){return ma(this.__data__,e)>-1},ba.prototype.set=function(e,t){var n=this.__data__,r=ma(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};var xa=io(pr,"Map");function _a(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 wa(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}wa.prototype.clear=function(){this.size=0,this.__data__={hash:new va,map:new(xa||ba),string:new va}},wa.prototype.delete=function(e){var t=_a(this,e).delete(e);return this.size-=t?1:0,t},wa.prototype.get=function(e){return _a(this,e).get(e)},wa.prototype.has=function(e){return _a(this,e).has(e)},wa.prototype.set=function(e,t){var n=_a(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};function Sa(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(Sa.Cache||wa),n}Sa.Cache=wa;var Ea=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ka=/\\(\\)?/g,Ca=function(e){var t=Sa(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(Ea,function(e,n,r,o){t.push(r?o.replace(ka,"$1"):n||e)}),t}),Oa=Ca;function Aa(e){return null==e?"":Ar(e)}function ja(e,t){return kr(e)?e:pa(e,t)?[e]:Oa(Aa(e))}function La(e){if("string"==typeof e||wr(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Ra(e,t){for(var n=0,r=(t=ja(t,e)).length;null!=e&&n<r;)e=e[La(t[n++])];return n&&n==r?e:void 0}function Ma(e,t,n){var r=null==e?void 0:Ra(e,t);return void 0===r?n:r}function Pa(e,t){for(var n=-1,r=t.length,o=Array(r),i=null==e;++n<r;)o[n]=i?void 0:Ma(e,t[n]);return o}function Na(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}var Ia=fr?fr.isConcatSpreadable:void 0;function Ta(e){return kr(e)||Ri(e)||!!(Ia&&e&&e[Ia])}function Ba(e,t,n,r,o){var i=-1,a=e.length;for(n||(n=Ta),o||(o=[]);++i<a;){var s=e[i];t>0&&n(s)?t>1?Ba(s,t-1,n,r,o):Na(o,s):r||(o[o.length]=s)}return o}function $a(e){return(null==e?0:e.length)?Ba(e,1):[]}function Wa(e){return Vo(yi(e,void 0,$a),e+"")}var Da=Wa(Pa),za=qi(Object.getPrototypeOf,Object),Fa=Function.prototype,Ua=Object.prototype,Va=Fa.toString,Ha=Ua.hasOwnProperty,Ka=Va.call(Object);function qa(e){if(!_r(e)||"[object Object]"!=xr(e))return!1;var t=za(e);if(null===t)return!0;var n=Ha.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Va.call(n)==Ka}function Ja(e){if(!_r(e))return!1;var t=xr(e);return"[object Error]"==t||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!qa(e)}var Ya=bi(function(e,t){try{return go(e,void 0,t)}catch(e){return Ja(e)?e:new Error(e)}}),Ga=Ya;function Za(e,t){var n;if("function"!=typeof t)throw new TypeError("Expected a function");return e=Ur(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=void 0),n}}var Qa=bi(function(e,t,n){var r=1;if(n.length){var o=oi(n,Xo(Qa));r|=32}return ci(e,r,t,n,o)});Qa.placeholder={};var Xa=Qa,es=Wa(function(e,t){return Ho(t,function(t){t=La(t),pi(e,t,Xa(e[t],e))}),e}),ts=es,ns=bi(function(e,t,n){var r=3;if(n.length){var o=oi(n,Xo(ns));r|=32}return ci(t,r,e,n,o)});ns.placeholder={};var rs=ns;function os(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 is(e,t,n){var r=e.length;return n=void 0===n?r:n,!t&&n>=r?e:os(e,t,n)}var as=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");function ss(e){return as.test(e)}var ls="\\ud800-\\udfff",us="["+ls+"]",cs="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",ds="\\ud83c[\\udffb-\\udfff]",ps="[^"+ls+"]",fs="(?:\\ud83c[\\udde6-\\uddff]){2}",hs="[\\ud800-\\udbff][\\udc00-\\udfff]",gs="(?:"+cs+"|"+ds+")"+"?",vs="[\\ufe0e\\ufe0f]?",ms=vs+gs+("(?:\\u200d(?:"+[ps,fs,hs].join("|")+")"+vs+gs+")*"),ys="(?:"+[ps+cs+"?",cs,fs,hs,us].join("|")+")",bs=RegExp(ds+"(?="+ds+")|"+ys+ms,"g");function xs(e){return ss(e)?function(e){return e.match(bs)||[]}(e):function(e){return e.split("")}(e)}function _s(e){return function(t){var n=ss(t=Aa(t))?xs(t):void 0,r=n?n[0]:t.charAt(0),o=n?is(n,1).join(""):t.slice(1);return r[e]()+o}}var ws=_s("toUpperCase");function Ss(e){return ws(Aa(e).toLowerCase())}function Es(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 ks(e){return function(t){return null==e?void 0:e[t]}}var Cs=ks({"À":"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"}),Os=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,As=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");function js(e){return(e=Aa(e))&&e.replace(Os,Cs).replace(As,"")}var Ls=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;var Rs=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;var Ms="\\ud800-\\udfff",Ps="\\u2700-\\u27bf",Ns="a-z\\xdf-\\xf6\\xf8-\\xff",Is="A-Z\\xc0-\\xd6\\xd8-\\xde",Ts="\\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",Bs="["+Ts+"]",$s="\\d+",Ws="["+Ps+"]",Ds="["+Ns+"]",zs="[^"+Ms+Ts+$s+Ps+Ns+Is+"]",Fs="(?:\\ud83c[\\udde6-\\uddff]){2}",Us="[\\ud800-\\udbff][\\udc00-\\udfff]",Vs="["+Is+"]",Hs="(?:"+Ds+"|"+zs+")",Ks="(?:"+Vs+"|"+zs+")",qs="(?:['’](?:d|ll|m|re|s|t|ve))?",Js="(?:['’](?:D|LL|M|RE|S|T|VE))?",Ys="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",Gs="[\\ufe0e\\ufe0f]?",Zs=Gs+Ys+("(?:\\u200d(?:"+["[^"+Ms+"]",Fs,Us].join("|")+")"+Gs+Ys+")*"),Qs="(?:"+[Ws,Fs,Us].join("|")+")"+Zs,Xs=RegExp([Vs+"?"+Ds+"+"+qs+"(?="+[Bs,Vs,"$"].join("|")+")",Ks+"+"+Js+"(?="+[Bs,Vs+Hs,"$"].join("|")+")",Vs+"?"+Hs+"+"+qs,Vs+"+"+Js,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",$s,Qs].join("|"),"g");function el(e,t,n){return e=Aa(e),void 0===(t=n?void 0:t)?function(e){return Rs.test(e)}(e)?function(e){return e.match(Xs)||[]}(e):function(e){return e.match(Ls)||[]}(e):e.match(t)||[]}var tl=RegExp("['’]","g");function nl(e){return function(t){return Es(el(js(t).replace(tl,"")),e,"")}}var rl=nl(function(e,t,n){return t=t.toLowerCase(),e+(n?Ss(t):t)}),ol=rl;function il(){if(!arguments.length)return[];var e=arguments[0];return kr(e)?e:[e]}var al=pr.isFinite,sl=Math.min;function ll(e){var t=Math[e];return function(e,n){if(e=Dr(e),(n=null==n?0:sl(Ur(n),292))&&al(e)){var r=(Aa(e)+"e").split("e");return+((r=(Aa(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var ul=ll("ceil");function cl(e){var t=Mo(e);return t.__chain__=!0,t}var dl=Math.ceil,pl=Math.max;function fl(e,t,n){t=(n?wi(e,t,n):void 0===t)?1:pl(Ur(t),0);var r=null==e?0:e.length;if(!r||t<1)return[];for(var o=0,i=0,a=Array(dl(r/t));o<r;)a[i++]=os(e,o,o+=t);return a}function hl(e,t,n){return e==e&&(void 0!==n&&(e=e<=n?e:n),void 0!==t&&(e=e>=t?e:t)),e}function gl(e,t,n){return void 0===n&&(n=t,t=void 0),void 0!==n&&(n=(n=Dr(n))==n?n:0),void 0!==t&&(t=(t=Dr(t))==t?t:0),hl(Dr(e),t,n)}function vl(e){var t=this.__data__=new ba(e);this.size=t.size}function ml(e,t){return e&&vi(t,Zi(t),e)}vl.prototype.clear=function(){this.__data__=new ba,this.size=0},vl.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},vl.prototype.get=function(e){return this.__data__.get(e)},vl.prototype.has=function(e){return this.__data__.has(e)},vl.prototype.set=function(e,t){var n=this.__data__;if(n instanceof ba){var r=n.__data__;if(!xa||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new wa(r)}return n.set(e,t),this.size=n.size,this};var yl="object"==typeof exports&&exports&&!exports.nodeType&&exports,bl=yl&&"object"==typeof module&&module&&!module.nodeType&&module,xl=bl&&bl.exports===yl?pr.Buffer:void 0,_l=xl?xl.allocUnsafe:void 0;function wl(e,t){if(t)return e.slice();var n=e.length,r=_l?_l(n):new e.constructor(n);return e.copy(r),r}function Sl(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 El(){return[]}var kl=Object.prototype.propertyIsEnumerable,Cl=Object.getOwnPropertySymbols,Ol=Cl?function(e){return null==e?[]:(e=Object(e),Sl(Cl(e),function(t){return kl.call(e,t)}))}:El,Al=Ol;var jl=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)Na(t,Al(e)),e=za(e);return t}:El,Ll=jl;function Rl(e,t,n){var r=t(e);return kr(e)?r:Na(r,n(e))}function Ml(e){return Rl(e,Zi,Al)}function Pl(e){return Rl(e,ra,Ll)}var Nl=io(pr,"DataView"),Il=io(pr,"Promise"),Tl=io(pr,"Set"),Bl="[object Map]",$l="[object Promise]",Wl="[object Set]",Dl="[object WeakMap]",zl="[object DataView]",Fl=Zr(Nl),Ul=Zr(xa),Vl=Zr(Il),Hl=Zr(Tl),Kl=Zr(ao),ql=xr;(Nl&&ql(new Nl(new ArrayBuffer(1)))!=zl||xa&&ql(new xa)!=Bl||Il&&ql(Il.resolve())!=$l||Tl&&ql(new Tl)!=Wl||ao&&ql(new ao)!=Dl)&&(ql=function(e){var t=xr(e),n="[object Object]"==t?e.constructor:void 0,r=n?Zr(n):"";if(r)switch(r){case Fl:return zl;case Ul:return Bl;case Vl:return $l;case Hl:return Wl;case Kl:return Dl}return t});var Jl=ql,Yl=Object.prototype.hasOwnProperty;var Gl=pr.Uint8Array;function Zl(e){var t=new e.constructor(e.byteLength);return new Gl(t).set(new Gl(e)),t}var Ql=/\w*$/;var Xl=fr?fr.prototype:void 0,eu=Xl?Xl.valueOf:void 0;function tu(e,t){var n=t?Zl(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function nu(e,t,n){var r,o=e.constructor;switch(t){case"[object ArrayBuffer]":return Zl(e);case"[object Boolean]":case"[object Date]":return new o(+e);case"[object DataView]":return function(e,t){var n=t?Zl(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 tu(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,Ql.exec(e));return t.lastIndex=e.lastIndex,t}(e);case"[object Symbol]":return r=e,eu?Object(eu.call(r)):{}}}function ru(e){return"function"!=typeof e.constructor||ki(e)?{}:fo(za(e))}var ou=Fi&&Fi.isMap,iu=ou?$i(ou):function(e){return _r(e)&&"[object Map]"==Jl(e)};var au=Fi&&Fi.isSet,su=au?$i(au):function(e){return _r(e)&&"[object Set]"==Jl(e)},lu="[object Arguments]",uu="[object Function]",cu="[object Object]",du={};function pu(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(!Ir(e))return e;var c=kr(e);if(c){if(a=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&Yl.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!s)return jo(e,a)}else{var d=Jl(e),p=d==uu||"[object GeneratorFunction]"==d;if(Ti(e))return wl(e,s);if(d==cu||d==lu||p&&!o){if(a=l||p?{}:ru(e),!s)return l?function(e,t){return vi(e,Ll(e),t)}(e,function(e,t){return e&&vi(t,ra(t),e)}(a,e)):function(e,t){return vi(e,Al(e),t)}(e,ml(a,e))}else{if(!du[d])return o?e:{};a=nu(e,d,s)}}i||(i=new vl);var f=i.get(e);if(f)return f;i.set(e,a),su(e)?e.forEach(function(r){a.add(pu(r,t,n,r,e,i))}):iu(e)&&e.forEach(function(r,o){a.set(o,pu(r,t,n,o,e,i))});var h=c?void 0:(u?l?Pl:Ml:l?ra:Zi)(e);return Ho(h||e,function(r,o){h&&(r=e[o=r]),gi(a,o,pu(r,t,n,o,e,i))}),a}du[lu]=du["[object Array]"]=du["[object ArrayBuffer]"]=du["[object DataView]"]=du["[object Boolean]"]=du["[object Date]"]=du["[object Float32Array]"]=du["[object Float64Array]"]=du["[object Int8Array]"]=du["[object Int16Array]"]=du["[object Int32Array]"]=du["[object Map]"]=du["[object Number]"]=du[cu]=du["[object RegExp]"]=du["[object Set]"]=du["[object String]"]=du["[object Symbol]"]=du["[object Uint8Array]"]=du["[object Uint8ClampedArray]"]=du["[object Uint16Array]"]=du["[object Uint32Array]"]=!0,du["[object Error]"]=du[uu]=du["[object WeakMap]"]=!1;function fu(e){return pu(e,4)}function hu(e){return pu(e,5)}function gu(e,t){return pu(e,5,t="function"==typeof t?t:void 0)}function vu(e,t){return pu(e,4,t="function"==typeof t?t:void 0)}function mu(){return new Ao(this.value(),this.__chain__)}function yu(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 bu(){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 Na(kr(n)?jo(n):[n],Ba(t,1))}function xu(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new wa;++t<n;)this.add(e[t])}function _u(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 wu(e,t){return e.has(t)}xu.prototype.add=xu.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},xu.prototype.has=function(e){return this.__data__.has(e)};function Su(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 xu: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(!_u(t,function(e,t){if(!wu(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 Eu(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function ku(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}var Cu=fr?fr.prototype:void 0,Ou=Cu?Cu.valueOf:void 0;var Au=Object.prototype.hasOwnProperty;var ju="[object Arguments]",Lu="[object Array]",Ru="[object Object]",Mu=Object.prototype.hasOwnProperty;function Pu(e,t,n,r,o,i){var a=kr(e),s=kr(t),l=a?Lu:Jl(e),u=s?Lu:Jl(t),c=(l=l==ju?Ru:l)==Ru,d=(u=u==ju?Ru:u)==Ru,p=l==u;if(p&&Ti(e)){if(!Ti(t))return!1;a=!0,c=!1}if(p&&!c)return i||(i=new vl),a||Vi(e)?Su(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 Gl(e),new Gl(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return fi(+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=Eu;case"[object Set]":var l=1&r;if(s||(s=ku),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=Su(s(e),s(t),r,o,i,a);return a.delete(e),c;case"[object Symbol]":if(Ou)return Ou.call(e)==Ou.call(t)}return!1}(e,t,l,n,r,o,i);if(!(1&n)){var f=c&&Mu.call(e,"__wrapped__"),h=d&&Mu.call(t,"__wrapped__");if(f||h){var g=f?e.value():e,v=h?t.value():t;return i||(i=new vl),o(g,v,n,r,i)}}return!!p&&(i||(i=new vl),function(e,t,n,r,o,i){var a=1&n,s=Ml(e),l=s.length;if(l!=Ml(t).length&&!a)return!1;for(var u=l;u--;){var c=s[u];if(!(a?c in t:Au.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 Nu(e,t,n,r,o){return e===t||(null==e||null==t||!_r(e)&&!_r(t)?e!=e&&t!=t:Pu(e,t,n,r,Nu,o))}function Iu(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 vl;if(r)var p=r(u,c,l,e,t,d);if(!(void 0===p?Nu(c,u,3,r,d):p))return!1}}return!0}function Tu(e){return e==e&&!Ir(e)}function Bu(e){for(var t=Zi(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,Tu(o)]}return t}function $u(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}function Wu(e){var t=Bu(e);return 1==t.length&&t[0][2]?$u(t[0][0],t[0][1]):function(n){return n===e||Iu(n,e,t)}}function Du(e,t){return null!=e&&t in Object(e)}function zu(e,t,n){for(var r=-1,o=(t=ja(t,e)).length,i=!1;++r<o;){var a=La(t[r]);if(!(i=null!=e&&n(e,a)))break;e=e[a]}return i||++r!=o?i:!!(o=null==e?0:e.length)&&xi(o)&&ti(a,o)&&(kr(e)||Ri(e))}function Fu(e,t){return null!=e&&zu(e,t,Du)}function Uu(e,t){return pa(e)&&Tu(t)?$u(La(e),t):function(n){var r=Ma(n,e);return void 0===r&&r===t?Fu(n,e):Nu(t,r,3)}}function Vu(e){return function(t){return null==t?void 0:t[e]}}function Hu(e){return pa(e)?Vu(La(e)):function(e){return function(t){return Ra(t,e)}}(e)}function Ku(e){return"function"==typeof e?e:null==e?Hr:"object"==typeof e?kr(e)?Uu(e[0],e[1]):Wu(e):Hu(e)}function qu(e){var t=null==e?0:e.length,n=Ku;return e=t?Er(e,function(e){if("function"!=typeof e[1])throw new TypeError("Expected a function");return[n(e[0]),e[1]]}):[],bi(function(n){for(var r=-1;++r<t;){var o=e[r];if(go(o[0],this,n))return go(o[1],this,n)}})}function Ju(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 Yu(e){return function(e){var t=Zi(e);return function(n){return Ju(n,e,t)}}(pu(e,1))}function Gu(e,t){return null==t||Ju(e,t,Zi(t))}function Zu(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 Qu(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 Xu=Qu();function ec(e,t){return e&&Xu(e,t,Zi)}function tc(e,t){return function(n,r){if(null==n)return n;if(!_i(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 nc=tc(ec);function rc(e,t,n,r){return nc(e,function(e,o,i){t(r,e,n(e),i)}),r}function oc(e,t){return function(n,r){var o=kr(n)?Zu:rc,i=t?t():{};return o(n,e,Ku(r),i)}}var ic=Object.prototype.hasOwnProperty,ac=oc(function(e,t,n){ic.call(e,n)?++e[n]:pi(e,n,1)}),sc=ac;function lc(e,t){var n=fo(e);return null==t?n:ml(n,t)}function uc(e,t,n){var r=ci(e,8,void 0,void 0,void 0,void 0,void 0,t=n?void 0:t);return r.placeholder=uc.placeholder,r}uc.placeholder={};function cc(e,t,n){var r=ci(e,16,void 0,void 0,void 0,void 0,void 0,t=n?void 0:t);return r.placeholder=cc.placeholder,r}cc.placeholder={};var dc=function(){return pr.Date.now()},pc=Math.max,fc=Math.min;function hc(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=dc();if(h(e))return v(e);s=setTimeout(g,function(e){var n=t-(e-l);return d?fc(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=dc(),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=Dr(t)||0,Ir(n)&&(c=!!n.leading,i=(d="maxWait"in n)?pc(Dr(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(dc())},m}function gc(e,t){return null==e||e!=e?t:e}var vc=Object.prototype,mc=vc.hasOwnProperty,yc=bi(function(e,t){e=Object(e);var n=-1,r=t.length,o=r>2?t[2]:void 0;for(o&&wi(t[0],t[1],o)&&(r=1);++n<r;)for(var i=t[n],a=ra(i),s=-1,l=a.length;++s<l;){var u=a[s],c=e[u];(void 0===c||fi(c,vc[u])&&!mc.call(e,u))&&(e[u]=i[u])}return e}),bc=yc;function xc(e,t,n){(void 0!==n&&!fi(e[t],n)||void 0===n&&!(t in e))&&pi(e,t,n)}function _c(e){return _r(e)&&_i(e)}function wc(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}function Sc(e){return vi(e,ra(e))}function Ec(e,t,n,r,o){e!==t&&Xu(t,function(i,a){if(o||(o=new vl),Ir(i))!function(e,t,n,r,o,i,a){var s=wc(e,n),l=wc(t,n),u=a.get(l);if(u)xc(e,n,u);else{var c=i?i(s,l,n+"",e,t,a):void 0,d=void 0===c;if(d){var p=kr(l),f=!p&&Ti(l),h=!p&&!f&&Vi(l);c=l,p||f||h?kr(s)?c=s:_c(s)?c=jo(s):f?(d=!1,c=wl(l,!0)):h?(d=!1,c=tu(l,!0)):c=[]:qa(l)||Ri(l)?(c=s,Ri(s)?c=Sc(s):Ir(s)&&!Kr(s)||(c=ru(l))):d=!1}d&&(a.set(l,c),o(c,l,r,i,a),a.delete(l)),xc(e,n,c)}}(e,t,a,n,Ec,r,o);else{var s=r?r(wc(e,a),i,a+"",e,t,o):void 0;void 0===s&&(s=i),xc(e,a,s)}},ra)}function kc(e,t,n,r,o,i){return Ir(e)&&Ir(t)&&(i.set(t,e),Ec(e,t,void 0,kc,i),i.delete(t)),e}var Cc=Si(function(e,t,n,r){Ec(e,t,n,r)}),Oc=Cc,Ac=bi(function(e){return e.push(void 0,kc),go(Oc,void 0,e)});function jc(e,t,n){if("function"!=typeof e)throw new TypeError("Expected a function");return setTimeout(function(){e.apply(void 0,n)},t)}var Lc=bi(function(e,t){return jc(e,1,t)}),Rc=Lc,Mc=bi(function(e,t,n){return jc(e,Dr(t)||0,n)}),Pc=Mc;function Nc(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 Ic(e,t,n,r){var o=-1,i=Yo,a=!0,s=e.length,l=[],u=t.length;if(!s)return l;n&&(t=Er(t,$i(n))),r?(i=Nc,a=!1):t.length>=200&&(i=wu,a=!1,t=new xu(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 Tc=bi(function(e,t){return _c(e)?Ic(e,Ba(t,1,_c,!0)):[]}),Bc=Tc;function $c(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}var Wc=bi(function(e,t){var n=$c(t);return _c(n)&&(n=void 0),_c(e)?Ic(e,Ba(t,1,_c,!0),Ku(n)):[]}),Dc=Wc,zc=bi(function(e,t){var n=$c(t);return _c(n)&&(n=void 0),_c(e)?Ic(e,Ba(t,1,_c,!0),void 0,n):[]}),Fc=zc,Uc=jr(function(e,t){return e/t},1);function Vc(e,t,n){var r=null==e?0:e.length;return r?os(e,(t=n||void 0===t?1:Ur(t))<0?0:t,r):[]}function Hc(e,t,n){var r=null==e?0:e.length;return r?os(e,0,(t=r-(t=n||void 0===t?1:Ur(t)))<0?0:t):[]}function Kc(e,t,n,r){for(var o=e.length,i=r?o:-1;(r?i--:++i<o)&&t(e[i],i,e););return n?os(e,r?0:i,r?i+1:o):os(e,r?i+1:0,r?o:i)}function qc(e,t){return e&&e.length?Kc(e,Ku(t),!0,!0):[]}function Jc(e,t){return e&&e.length?Kc(e,Ku(t),!0):[]}function Yc(e){return"function"==typeof e?e:Hr}function Gc(e,t){return(kr(e)?Ho:nc)(e,Yc(t))}function Zc(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}var Qc=Qu(!0);function Xc(e,t){return e&&Qc(e,t,Zi)}var ed=tc(Xc,!0);function td(e,t){return(kr(e)?Zc:ed)(e,Yc(t))}function nd(e,t,n){e=Aa(e),t=Ar(t);var r=e.length,o=n=void 0===n?r:hl(Ur(n),0,r);return(n-=t.length)>=0&&e.slice(n,o)==t}function rd(e){return function(t){var n=Jl(t);return"[object Map]"==n?Eu(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 Er(t,function(t){return[t,e[t]]})}(t,e(t))}}var od=rd(Zi),id=rd(ra),ad=ks({"&":"&","<":"<",">":">",'"':""","'":"'"}),sd=/[&<>"']/g,ld=RegExp(sd.source);function ud(e){return(e=Aa(e))&&ld.test(e)?e.replace(sd,ad):e}var cd=/[\\^$.*+?()[\]{}|]/g,dd=RegExp(cd.source);function pd(e){return(e=Aa(e))&&dd.test(e)?e.replace(cd,"\\$&"):e}function fd(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 hd(e,t){var n=!0;return nc(e,function(e,r,o){return n=!!t(e,r,o)}),n}function gd(e,t,n){var r=kr(e)?fd:hd;return n&&wi(e,t,n)&&(t=void 0),r(e,Ku(t))}function vd(e){return e?hl(Ur(e),0,4294967295):0}function md(e,t,n,r){var o=null==e?0:e.length;return o?(n&&"number"!=typeof n&&wi(e,t,n)&&(n=0,r=o),function(e,t,n,r){var o=e.length;for((n=Ur(n))<0&&(n=-n>o?0:o+n),(r=void 0===r||r>o?o:Ur(r))<0&&(r+=o),r=n>r?0:vd(r);n<r;)e[n++]=t;return e}(e,t,n,r)):[]}function yd(e,t){var n=[];return nc(e,function(e,r,o){t(e,r,o)&&n.push(e)}),n}function bd(e,t){return(kr(e)?Sl:yd)(e,Ku(t))}function xd(e){return function(t,n,r){var o=Object(t);if(!_i(t)){var i=Ku(n);t=Zi(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 _d=Math.max;function wd(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:Ur(n);return o<0&&(o=_d(r+o,0)),Ko(e,Ku(t),o)}var Sd=xd(wd);function Ed(e,t,n){var r;return n(e,function(e,n,o){if(t(e,n,o))return r=n,!1}),r}function kd(e,t){return Ed(e,Ku(t),ec)}var Cd=Math.max,Od=Math.min;function Ad(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=r-1;return void 0!==n&&(o=Ur(n),o=n<0?Cd(r+o,0):Od(o,r-1)),Ko(e,Ku(t),o,!0)}var jd=xd(Ad);function Ld(e,t){return Ed(e,Ku(t),Xc)}function Rd(e){return e&&e.length?e[0]:void 0}function Md(e,t){var n=-1,r=_i(e)?Array(e.length):[];return nc(e,function(e,o,i){r[++n]=t(e,o,i)}),r}function Pd(e,t){return(kr(e)?Er:Md)(e,Ku(t))}function Nd(e,t){return Ba(Pd(e,t),1)}var Id=1/0;function Td(e,t){return Ba(Pd(e,t),Id)}function Bd(e,t,n){return n=void 0===n?1:Ur(n),Ba(Pd(e,t),n)}var $d=1/0;function Wd(e){return(null==e?0:e.length)?Ba(e,$d):[]}function Dd(e,t){return(null==e?0:e.length)?Ba(e,t=void 0===t?1:Ur(t)):[]}function zd(e){return ci(e,512)}var Fd=ll("floor");function Ud(e){return Wa(function(t){var n=t.length,r=n,o=Ao.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"==Oo(i))var a=new Ao([],!0)}for(r=a?r:n;++r<n;){var s=Oo(i=t[r]),l="wrapper"==s?Eo(i):void 0;a=l&&Po(l[0])&&424==l[1]&&!l[4].length&&1==l[9]?a[Oo(l[0])].apply(a,l[3]):1==i.length&&Po(i)?a[s]():a.thru(i)}return function(){var e=arguments,r=e[0];if(a&&1==e.length&&kr(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 Vd=Ud(),Hd=Ud(!0);function Kd(e,t){return null==e?e:Xu(e,Yc(t),ra)}function qd(e,t){return null==e?e:Qc(e,Yc(t),ra)}function Jd(e,t){return e&&ec(e,Yc(t))}function Yd(e,t){return e&&Xc(e,Yc(t))}function Gd(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 Zd(e,t){return Sl(t,function(t){return Kr(e[t])})}function Qd(e){return null==e?[]:Zd(e,Zi(e))}function Xd(e){return null==e?[]:Zd(e,ra(e))}var ep=Object.prototype.hasOwnProperty,tp=oc(function(e,t,n){ep.call(e,n)?e[n].push(t):pi(e,n,[t])}),np=tp;function rp(e,t){return e>t}function op(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=Dr(t),n=Dr(n)),e(t,n)}}var ip=op(rp),ap=op(function(e,t){return e>=t}),sp=Object.prototype.hasOwnProperty;function lp(e,t){return null!=e&&sp.call(e,t)}function up(e,t){return null!=e&&zu(e,t,lp)}var cp=Math.max,dp=Math.min;function pp(e,t,n){return t=Fr(t),void 0===n?(n=t,t=0):n=Fr(n),function(e,t,n){return e>=dp(t,n)&&e<cp(t,n)}(e=Dr(e),t,n)}function fp(e){return"string"==typeof e||!kr(e)&&_r(e)&&"[object String]"==xr(e)}function hp(e,t){return Er(t,function(t){return e[t]})}function gp(e){return null==e?[]:hp(e,Zi(e))}var vp=Math.max;function mp(e,t,n,r){e=_i(e)?e:gp(e),n=n&&!r?Ur(n):0;var o=e.length;return n<0&&(n=vp(o+n,0)),fp(e)?n<=o&&e.indexOf(t,n)>-1:!!o&&Jo(e,t,n)>-1}var yp=Math.max;function bp(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:Ur(n);return o<0&&(o=yp(r+o,0)),Jo(e,t,o)}function xp(e){return(null==e?0:e.length)?os(e,0,-1):[]}var _p=Math.min;function wp(e,t,n){for(var r=n?Nc:Yo,o=e[0].length,i=e.length,a=i,s=Array(i),l=1/0,u=[];a--;){var c=e[a];a&&t&&(c=Er(c,$i(t))),l=_p(c.length,l),s[a]=!n&&(t||o>=120&&c.length>=120)?new xu(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?wu(p,h):r(u,h,n))){for(a=i;--a;){var g=s[a];if(!(g?wu(g,h):r(e[a],h,n)))continue e}p&&p.push(h),u.push(f)}}return u}function Sp(e){return _c(e)?e:[]}var Ep=bi(function(e){var t=Er(e,Sp);return t.length&&t[0]===e[0]?wp(t):[]}),kp=bi(function(e){var t=$c(e),n=Er(e,Sp);return t===$c(n)?t=void 0:n.pop(),n.length&&n[0]===e[0]?wp(n,Ku(t)):[]}),Cp=kp,Op=bi(function(e){var t=$c(e),n=Er(e,Sp);return(t="function"==typeof t?t:void 0)&&n.pop(),n.length&&n[0]===e[0]?wp(n,void 0,t):[]});function Ap(e,t){return function(n,r){return function(e,t,n,r){return ec(e,function(e,o,i){t(r,n(e),o,i)}),r}(n,e,t(r),{})}}var jp=Object.prototype.toString,Lp=Ap(function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=jp.call(t)),e[t]=n},Do(Hr)),Rp=Lp,Mp=Object.prototype,Pp=Mp.hasOwnProperty,Np=Mp.toString,Ip=Ap(function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Np.call(t)),Pp.call(e,t)?e[t].push(n):e[t]=[n]},Ku),Tp=Ip;function Bp(e,t){return t.length<2?e:Ra(e,os(t,0,-1))}function $p(e,t,n){var r=null==(e=Bp(e,t=ja(t,e)))?e:e[La($c(t))];return null==r?void 0:go(r,e,n)}var Wp=bi($p),Dp=bi(function(e,t,n){var r=-1,o="function"==typeof t,i=_i(e)?Array(e.length):[];return nc(e,function(e){i[++r]=o?go(t,e,n):$p(e,t,n)}),i}),zp=Dp;var Fp=Fi&&Fi.isArrayBuffer,Up=Fp?$i(Fp):function(e){return _r(e)&&"[object ArrayBuffer]"==xr(e)};function Vp(e){return!0===e||!1===e||_r(e)&&"[object Boolean]"==xr(e)}var Hp=Fi&&Fi.isDate,Kp=Hp?$i(Hp):function(e){return _r(e)&&"[object Date]"==xr(e)};function qp(e){return _r(e)&&1===e.nodeType&&!qa(e)}var Jp=Object.prototype.hasOwnProperty;function Yp(e){if(null==e)return!0;if(_i(e)&&(kr(e)||"string"==typeof e||"function"==typeof e.splice||Ti(e)||Vi(e)||Ri(e)))return!e.length;var t=Jl(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(ki(e))return!Gi(e).length;for(var n in e)if(Jp.call(e,n))return!1;return!0}function Gp(e,t){return Nu(e,t)}function Zp(e,t,n){var r=(n="function"==typeof n?n:void 0)?n(e,t):void 0;return void 0===r?Nu(e,t,void 0,n):!!r}var Qp=pr.isFinite;function Xp(e){return"number"==typeof e&&Qp(e)}function ef(e){return"number"==typeof e&&e==Ur(e)}function tf(e,t){return e===t||Iu(e,t,Bu(t))}function nf(e,t,n){return n="function"==typeof n?n:void 0,Iu(e,t,Bu(t),n)}function rf(e){return"number"==typeof e||_r(e)&&"[object Number]"==xr(e)}function of(e){return rf(e)&&e!=+e}var af=Jr?Kr:Mi;function sf(e){if(af(e))throw new Error("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return oo(e)}function lf(e){return null==e}function uf(e){return null===e}var cf=Fi&&Fi.isRegExp,df=cf?$i(cf):function(e){return _r(e)&&"[object RegExp]"==xr(e)},pf=9007199254740991;function ff(e){return ef(e)&&e>=-9007199254740991&&e<=pf}function hf(e){return void 0===e}function gf(e){return _r(e)&&"[object WeakMap]"==Jl(e)}function vf(e){return _r(e)&&"[object WeakSet]"==xr(e)}function mf(e){return Ku("function"==typeof e?e:pu(e,1))}var yf=Array.prototype.join;function bf(e,t){return null==e?"":yf.call(e,t)}var xf=nl(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()}),_f=xf,wf=oc(function(e,t,n){pi(e,n,t)}),Sf=wf;var Ef=Math.max,kf=Math.min;function Cf(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=r;return void 0!==n&&(o=(o=Ur(n))<0?Ef(r+o,0):kf(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):Ko(e,qo,o,!0)}var Of=nl(function(e,t,n){return e+(n?" ":"")+t.toLowerCase()}),Af=Of,jf=_s("toLowerCase");function Lf(e,t){return e<t}var Rf=op(Lf),Mf=op(function(e,t){return e<=t});function Pf(e,t){var n={};return t=Ku(t),ec(e,function(e,r,o){pi(n,t(e,r,o),e)}),n}function Nf(e,t){var n={};return t=Ku(t),ec(e,function(e,r,o){pi(n,r,t(e,r,o))}),n}function If(e){return Wu(pu(e,1))}function Tf(e,t){return Uu(e,pu(t,1))}function Bf(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&&!wr(a):n(a,s)))var s=a,l=i}return l}function $f(e){return e&&e.length?Bf(e,Hr,rp):void 0}function Wf(e,t){return e&&e.length?Bf(e,Ku(t),rp):void 0}function Df(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 zf(e,t){var n=null==e?0:e.length;return n?Df(e,t)/n:NaN}function Ff(e){return zf(e,Hr)}function Uf(e,t){return zf(e,Ku(t))}var Vf=Si(function(e,t,n){Ec(e,t,n)}),Hf=Vf,Kf=bi(function(e,t){return function(n){return $p(n,e,t)}}),qf=Kf,Jf=bi(function(e,t){return function(n){return $p(e,n,t)}}),Yf=Jf;function Gf(e){return e&&e.length?Bf(e,Hr,Lf):void 0}function Zf(e,t){return e&&e.length?Bf(e,Ku(t),Lf):void 0}function Qf(e,t,n){var r=Zi(t),o=Zd(t,r),i=!(Ir(n)&&"chain"in n&&!n.chain),a=Kr(e);return Ho(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__=jo(this.__actions__)).push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,Na([this.value()],arguments))})}),e}var Xf=jr(function(e,t){return e*t},1);function eh(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 th=fr?fr.iterator:void 0;function nh(e){if(!e)return[];if(_i(e))return fp(e)?xs(e):jo(e);if(th&&e[th])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[th]());var t=Jl(e);return("[object Map]"==t?Eu:"[object Set]"==t?ku:gp)(e)}function rh(){void 0===this.__values__&&(this.__values__=nh(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?void 0:this.__values__[this.__index__++]}}function oh(e,t){var n=e.length;if(n)return ti(t+=t<0?n:0,n)?e[t]:void 0}function ih(e,t){return e&&e.length?oh(e,Ur(t)):void 0}function ah(e){return e=Ur(e),bi(function(t){return oh(t,e)})}var sh=Object.prototype.hasOwnProperty;function lh(e,t){var n=-1,r=(t=ja(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&&!sh.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=Bp(e,t);return null==a||delete a[La($c(t))]}function uh(e){return qa(e)?void 0:e}var ch=Wa(function(e,t){var n={};if(null==e)return n;var r=!1;t=Er(t,function(t){return t=ja(t,e),r||(r=t.length>1),t}),vi(e,Pl(e),n),r&&(n=pu(n,7,uh));for(var o=t.length;o--;)lh(n,t[o]);return n}),dh=ch;function ph(e,t,n,r){if(!Ir(e))return e;for(var o=-1,i=(t=ja(t,e)).length,a=i-1,s=e;null!=s&&++o<i;){var l=La(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=Ir(c)?c:ti(t[o+1])?[]:{})}gi(s,l,u),s=s[l]}return e}function fh(e,t,n){for(var r=-1,o=t.length,i={};++r<o;){var a=t[r],s=Ra(e,a);n(s,a)&&ph(i,ja(a,e),s)}return i}function hh(e,t){if(null==e)return{};var n=Er(Pl(e),function(e){return[e]});return t=Ku(t),fh(e,n,function(e,n){return t(e,n[0])})}function gh(e,t){return hh(e,eh(Ku(t)))}function vh(e){return Za(2,e)}function mh(e,t){if(e!==t){var n=void 0!==e,r=null===e,o=e==e,i=wr(e),a=void 0!==t,s=null===t,l=t==t,u=wr(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 yh(e,t,n){t=t.length?Er(t,function(e){return kr(e)?function(t){return Ra(t,1===e.length?e[0]:e)}:e}):[Hr];var r=-1;t=Er(t,$i(Ku));var o=Md(e,function(e,n,o){var i=Er(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=mh(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 bh(e,t,n,r){return null==e?[]:(kr(t)||(t=null==t?[]:[t]),kr(n=r?void 0:n)||(n=null==n?[]:[n]),yh(e,t,n))}function xh(e){return Wa(function(t){return t=Er(t,$i(Ku)),bi(function(n){var r=this;return e(t,function(e){return go(e,r,n)})})})}var _h=xh(Er),wh=bi,Sh=Math.min,Eh=wh(function(e,t){var n=(t=1==t.length&&kr(t[0])?Er(t[0],$i(Ku)):Er(Ba(t,1),$i(Ku))).length;return bi(function(r){for(var o=-1,i=Sh(r.length,n);++o<i;)r[o]=t[o].call(this,r[o]);return go(e,this,r)})}),kh=Eh,Ch=xh(fd),Oh=xh(_u),Ah=Math.floor;function jh(e,t){var n="";if(!e||t<1||t>9007199254740991)return n;do{t%2&&(n+=e),(t=Ah(t/2))&&(e+=e)}while(t);return n}var Lh=Vu("length"),Rh="\\ud800-\\udfff",Mh="["+Rh+"]",Ph="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",Nh="\\ud83c[\\udffb-\\udfff]",Ih="[^"+Rh+"]",Th="(?:\\ud83c[\\udde6-\\uddff]){2}",Bh="[\\ud800-\\udbff][\\udc00-\\udfff]",$h="(?:"+Ph+"|"+Nh+")"+"?",Wh="[\\ufe0e\\ufe0f]?",Dh=Wh+$h+("(?:\\u200d(?:"+[Ih,Th,Bh].join("|")+")"+Wh+$h+")*"),zh="(?:"+[Ih+Ph+"?",Ph,Th,Bh,Mh].join("|")+")",Fh=RegExp(Nh+"(?="+Nh+")|"+zh+Dh,"g");function Uh(e){return ss(e)?function(e){for(var t=Fh.lastIndex=0;Fh.test(e);)++t;return t}(e):Lh(e)}var Vh=Math.ceil;function Hh(e,t){var n=(t=void 0===t?" ":Ar(t)).length;if(n<2)return n?jh(t,e):t;var r=jh(t,Vh(e/Uh(t)));return ss(t)?is(xs(r),0,e).join(""):r.slice(0,e)}var Kh=Math.ceil,qh=Math.floor;function Jh(e,t,n){e=Aa(e);var r=(t=Ur(t))?Uh(e):0;if(!t||r>=t)return e;var o=(t-r)/2;return Hh(qh(o),n)+e+Hh(Kh(o),n)}function Yh(e,t,n){e=Aa(e);var r=(t=Ur(t))?Uh(e):0;return t&&r<t?e+Hh(t-r,n):e}function Gh(e,t,n){e=Aa(e);var r=(t=Ur(t))?Uh(e):0;return t&&r<t?Hh(t-r,n)+e:e}var Zh=/^\s+/,Qh=pr.parseInt;function Xh(e,t,n){return n||null==t?t=0:t&&(t=+t),Qh(Aa(e).replace(Zh,""),t||0)}var eg=bi(function(e,t){return ci(e,32,void 0,t,oi(t,Xo(eg)))});eg.placeholder={};var tg=eg,ng=bi(function(e,t){return ci(e,64,void 0,t,oi(t,Xo(ng)))});ng.placeholder={};var rg=ng,og=oc(function(e,t,n){e[n?0:1].push(t)},function(){return[[],[]]}),ig=og;var ag=Wa(function(e,t){return null==e?{}:function(e,t){return fh(e,t,function(t,n){return Fu(e,n)})}(e,t)}),sg=ag;function lg(e){for(var t,n=this;n instanceof xo;){var r=Lo(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 ug(e){return function(t){return null==e?void 0:Ra(e,t)}}function cg(e,t,n,r){for(var o=n-1,i=e.length;++o<i;)if(r(e[o],t))return o;return-1}var dg=Array.prototype.splice;function pg(e,t,n,r){var o=r?cg:Jo,i=-1,a=t.length,s=e;for(e===t&&(t=jo(t)),n&&(s=Er(e,$i(n)));++i<a;)for(var l=0,u=t[i],c=n?n(u):u;(l=o(s,c,l,r))>-1;)s!==e&&dg.call(s,l,1),dg.call(e,l,1);return e}function fg(e,t){return e&&e.length&&t&&t.length?pg(e,t):e}var hg=bi(fg);function gg(e,t,n){return e&&e.length&&t&&t.length?pg(e,t,Ku(n)):e}function vg(e,t,n){return e&&e.length&&t&&t.length?pg(e,t,void 0,n):e}var mg=Array.prototype.splice;function yg(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;ti(o)?mg.call(e,o,1):lh(e,o)}}return e}var bg=Wa(function(e,t){var n=null==e?0:e.length,r=Pa(e,t);return yg(e,Er(t,function(e){return ti(e,n)?+e:e}).sort(mh)),r}),xg=bg,_g=Math.floor,wg=Math.random;function Sg(e,t){return e+_g(wg()*(t-e+1))}var Eg=parseFloat,kg=Math.min,Cg=Math.random;function Og(e,t,n){if(n&&"boolean"!=typeof n&&wi(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=Fr(e),void 0===t?(t=e,e=0):t=Fr(t)),e>t){var r=e;e=t,t=r}if(n||e%1||t%1){var o=Cg();return kg(e+o*(t-e+Eg("1e-"+((o+"").length-1))),t)}return Sg(e,t)}var Ag=Math.ceil,jg=Math.max;function Lg(e){return function(t,n,r){return r&&"number"!=typeof r&&wi(t,n,r)&&(n=r=void 0),t=Fr(t),void 0===n?(n=t,t=0):n=Fr(n),function(e,t,n,r){for(var o=-1,i=jg(Ag((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:Fr(r),e)}}var Rg=Lg(),Mg=Lg(!0),Pg=Wa(function(e,t){return ci(e,256,void 0,void 0,void 0,t)}),Ng=Pg;function Ig(e,t,n,r,o){return o(e,function(e,o,i){n=r?(r=!1,e):t(n,e,o,i)}),n}function Tg(e,t,n){var r=kr(e)?Es:Ig,o=arguments.length<3;return r(e,Ku(t),n,o,nc)}function Bg(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 $g(e,t,n){var r=kr(e)?Bg:Ig,o=arguments.length<3;return r(e,Ku(t),n,o,ed)}function Wg(e,t){return(kr(e)?Sl:yd)(e,eh(Ku(t)))}function Dg(e,t){var n=[];if(!e||!e.length)return n;var r=-1,o=[],i=e.length;for(t=Ku(t);++r<i;){var a=e[r];t(a,r,e)&&(n.push(a),o.push(r))}return yg(e,o),n}function zg(e,t,n){return t=(n?wi(e,t,n):void 0===t)?1:Ur(t),jh(Aa(e),t)}function Fg(){var e=arguments,t=Aa(e[0]);return e.length<3?t:t.replace(e[1],e[2])}function Ug(e,t){if("function"!=typeof e)throw new TypeError("Expected a function");return bi(e,t=void 0===t?t:Ur(t))}function Vg(e,t,n){var r=-1,o=(t=ja(t,e)).length;for(o||(o=1,e=void 0);++r<o;){var i=null==e?void 0:e[La(t[r])];void 0===i&&(r=o,i=n),e=Kr(i)?i.call(e):i}return e}var Hg=Array.prototype.reverse;function Kg(e){return null==e?e:Hg.call(e)}var qg=ll("round");function Jg(e){var t=e.length;return t?e[Sg(0,t-1)]:void 0}function Yg(e){return Jg(gp(e))}function Gg(e){return(kr(e)?Jg:Yg)(e)}function Zg(e,t){var n=-1,r=e.length,o=r-1;for(t=void 0===t?r:t;++n<t;){var i=Sg(n,o),a=e[i];e[i]=e[n],e[n]=a}return e.length=t,e}function Qg(e,t){return Zg(jo(e),hl(t,0,e.length))}function Xg(e,t){var n=gp(e);return Zg(n,hl(t,0,n.length))}function ev(e,t,n){return t=(n?wi(e,t,n):void 0===t)?1:Ur(t),(kr(e)?Qg:Xg)(e,t)}function tv(e,t,n){return null==e?e:ph(e,t,n)}function nv(e,t,n,r){return r="function"==typeof r?r:void 0,null==e?e:ph(e,t,n,r)}function rv(e){return Zg(jo(e))}function ov(e){return Zg(gp(e))}function iv(e){return(kr(e)?rv:ov)(e)}function av(e){if(null==e)return 0;if(_i(e))return fp(e)?Uh(e):e.length;var t=Jl(e);return"[object Map]"==t||"[object Set]"==t?e.size:Gi(e).length}function sv(e,t,n){var r=null==e?0:e.length;return r?(n&&"number"!=typeof n&&wi(e,t,n)?(t=0,n=r):(t=null==t?0:Ur(t),n=void 0===n?r:Ur(n)),os(e,t,n)):[]}var lv=nl(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}),uv=lv;function cv(e,t){var n;return nc(e,function(e,r,o){return!(n=t(e,r,o))}),!!n}function dv(e,t,n){var r=kr(e)?_u:cv;return n&&wi(e,t,n)&&(t=void 0),r(e,Ku(t))}var pv=bi(function(e,t){if(null==e)return[];var n=t.length;return n>1&&wi(e,t[0],t[1])?t=[]:n>2&&wi(t[0],t[1],t[2])&&(t=[t[0]]),yh(e,Ba(t,1),[])}),fv=pv,hv=Math.floor,gv=Math.min;function vv(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=wr(t),u=void 0===t;o<i;){var c=hv((o+i)/2),d=n(e[c]),p=void 0!==d,f=null===d,h=d==d,g=wr(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 gv(i,4294967294)}function mv(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&&!wr(a)&&(n?a<=t:a<t)?r=i+1:o=i}return o}return vv(e,t,Hr,n)}function yv(e,t){return mv(e,t)}function bv(e,t,n){return vv(e,t,Ku(n))}function xv(e,t){var n=null==e?0:e.length;if(n){var r=mv(e,t);if(r<n&&fi(e[r],t))return r}return-1}function _v(e,t){return mv(e,t,!0)}function wv(e,t,n){return vv(e,t,Ku(n),!0)}function Sv(e,t){if(null==e?0:e.length){var n=mv(e,t,!0)-1;if(fi(e[n],t))return n}return-1}function Ev(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||!fi(s,l)){var l=s;i[o++]=0===a?0:a}}return i}function kv(e){return e&&e.length?Ev(e):[]}function Cv(e,t){return e&&e.length?Ev(e,Ku(t)):[]}function Ov(e,t,n){return n&&"number"!=typeof n&&wi(e,t,n)&&(t=n=void 0),(n=void 0===n?4294967295:n>>>0)?(e=Aa(e))&&("string"==typeof t||null!=t&&!df(t))&&!(t=Ar(t))&&ss(e)?is(xs(e),0,n):e.split(t,n):[]}var Av=Math.max;function jv(e,t){if("function"!=typeof e)throw new TypeError("Expected a function");return t=null==t?0:Av(Ur(t),0),bi(function(n){var r=n[t],o=is(n,0,t);return r&&Na(o,r),go(e,this,o)})}var Lv=nl(function(e,t,n){return e+(n?" ":"")+ws(t)}),Rv=Lv;function Mv(e,t,n){return e=Aa(e),n=null==n?0:hl(Ur(n),0,e.length),t=Ar(t),e.slice(n,n+t.length)==t}function Pv(){return{}}function Nv(){return""}function Iv(){return!0}var Tv=jr(function(e,t){return e-t},0);function Bv(e){return e&&e.length?Df(e,Hr):0}function $v(e,t){return e&&e.length?Df(e,Ku(t)):0}function Wv(e){var t=null==e?0:e.length;return t?os(e,1,t):[]}function Dv(e,t,n){return e&&e.length?os(e,0,(t=n||void 0===t?1:Ur(t))<0?0:t):[]}function zv(e,t,n){var r=null==e?0:e.length;return r?os(e,(t=r-(t=n||void 0===t?1:Ur(t)))<0?0:t,r):[]}function Fv(e,t){return e&&e.length?Kc(e,Ku(t),!1,!0):[]}function Uv(e,t){return e&&e.length?Kc(e,Ku(t)):[]}function Vv(e,t){return t(e),e}var Hv=Object.prototype,Kv=Hv.hasOwnProperty;function qv(e,t,n,r){return void 0===e||fi(e,Hv[n])&&!Kv.call(r,n)?t:e}var Jv={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"};function Yv(e){return"\\"+Jv[e]}var Gv=/<%=([\s\S]+?)%>/g,Zv={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:Gv,variable:"",imports:{_:{escape:ud}}},Qv=/\b__p \+= '';/g,Xv=/\b(__p \+=) '' \+/g,em=/(__e\(.*?\)|\b__t\)) \+\n'';/g,tm=/[()=,{}\[\]\/\s]/,nm=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,rm=/($^)/,om=/['\n\r\u2028\u2029\\]/g,im=Object.prototype.hasOwnProperty;function am(e,t,n){var r=Zv.imports._.templateSettings||Zv;n&&wi(e,t,n)&&(t=void 0),e=Aa(e),t=sa({},t,r,qv);var o,i,a=sa({},t.imports,r.imports,qv),s=Zi(a),l=hp(a,s),u=0,c=t.interpolate||rm,d="__p += '",p=RegExp((t.escape||rm).source+"|"+c.source+"|"+(c===Gv?nm:rm).source+"|"+(t.evaluate||rm).source+"|$","g"),f=im.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(om,Yv),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=im.call(t,"variable")&&t.variable;if(h){if(tm.test(h))throw new Error("Invalid `variable` option passed into `_.template`")}else d="with (obj) {\n"+d+"\n}\n";d=(i?d.replace(Qv,""):d).replace(Xv,"$1").replace(em,"$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=Ga(function(){return Function(s,f+"return "+d).apply(void 0,l)});if(g.source=d,Ja(g))throw g;return g}function sm(e,t,n){var r=!0,o=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return Ir(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),hc(e,t,{leading:r,maxWait:t,trailing:o})}function lm(e,t){return t(e)}var um=4294967295,cm=Math.min;function dm(e,t){if((e=Ur(e))<1||e>9007199254740991)return[];var n=um,r=cm(e,um);t=Yc(t),e-=um;for(var o=Ci(r,t);++n<e;)t(n);return o}function pm(){return this}function fm(e,t){var n=e;return n instanceof _o&&(n=n.value()),Es(t,function(e,t){return t.func.apply(t.thisArg,Na([e],t.args))},n)}function hm(){return fm(this.__wrapped__,this.__actions__)}function gm(e){return Aa(e).toLowerCase()}function vm(e){return kr(e)?Er(e,La):wr(e)?[e]:jo(Oa(Aa(e)))}var mm=9007199254740991;function ym(e){return e?hl(Ur(e),-9007199254740991,mm):0===e?e:0}function bm(e){return Aa(e).toUpperCase()}function xm(e,t,n){var r=kr(e),o=r||Ti(e)||Vi(e);if(t=Ku(t),null==n){var i=e&&e.constructor;n=o?r?new i:[]:Ir(e)&&Kr(i)?fo(za(e)):{}}return(o?Ho:ec)(e,function(e,r,o){return t(n,e,r,o)}),n}function _m(e,t){for(var n=e.length;n--&&Jo(t,e[n],0)>-1;);return n}function wm(e,t){for(var n=-1,r=e.length;++n<r&&Jo(t,e[n],0)>-1;);return n}function Sm(e,t,n){if((e=Aa(e))&&(n||void 0===t))return Nr(e);if(!e||!(t=Ar(t)))return e;var r=xs(e),o=xs(t);return is(r,wm(r,o),_m(r,o)+1).join("")}function Em(e,t,n){if((e=Aa(e))&&(n||void 0===t))return e.slice(0,Mr(e)+1);if(!e||!(t=Ar(t)))return e;var r=xs(e);return is(r,0,_m(r,xs(t))+1).join("")}var km=/^\s+/;function Cm(e,t,n){if((e=Aa(e))&&(n||void 0===t))return e.replace(km,"");if(!e||!(t=Ar(t)))return e;var r=xs(e);return is(r,wm(r,xs(t))).join("")}var Om=/\w*$/;function Am(e,t){var n=30,r="...";if(Ir(t)){var o="separator"in t?t.separator:o;n="length"in t?Ur(t.length):n,r="omission"in t?Ar(t.omission):r}var i=(e=Aa(e)).length;if(ss(e)){var a=xs(e);i=a.length}if(n>=i)return e;var s=n-Uh(r);if(s<1)return r;var l=a?is(a,0,s).join(""):e.slice(0,s);if(void 0===o)return l+r;if(a&&(s+=l.length-s),df(o)){if(e.slice(s).search(o)){var u,c=l;for(o.global||(o=RegExp(o.source,Aa(Om.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(Ar(o),s)!=s){var p=l.lastIndexOf(o);p>-1&&(l=l.slice(0,p))}return l+r}function jm(e){return di(e,1)}var Lm=ks({"&":"&","<":"<",">":">",""":'"',"'":"'"}),Rm=/&(?:amp|lt|gt|quot|#39);/g,Mm=RegExp(Rm.source);function Pm(e){return(e=Aa(e))&&Mm.test(e)?e.replace(Rm,Lm):e}var Nm=Tl&&1/ku(new Tl([,-0]))[1]==1/0?function(e){return new Tl(e)}:wo,Im=Nm;function Tm(e,t,n){var r=-1,o=Yo,i=e.length,a=!0,s=[],l=s;if(n)a=!1,o=Nc;else if(i>=200){var u=t?null:Im(e);if(u)return ku(u);a=!1,o=wu,l=new xu}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 Bm=bi(function(e){return Tm(Ba(e,1,_c,!0))}),$m=bi(function(e){var t=$c(e);return _c(t)&&(t=void 0),Tm(Ba(e,1,_c,!0),Ku(t))}),Wm=$m,Dm=bi(function(e){var t=$c(e);return t="function"==typeof t?t:void 0,Tm(Ba(e,1,_c,!0),void 0,t)});function zm(e){return e&&e.length?Tm(e):[]}function Fm(e,t){return e&&e.length?Tm(e,Ku(t)):[]}function Um(e,t){return t="function"==typeof t?t:void 0,e&&e.length?Tm(e,void 0,t):[]}var Vm=0;function Hm(e){var t=++Vm;return Aa(e)+t}function Km(e,t){return null==e||lh(e,t)}var qm=Math.max;function Jm(e){if(!e||!e.length)return[];var t=0;return e=Sl(e,function(e){if(_c(e))return t=qm(e.length,t),!0}),Ci(t,function(t){return Er(e,Vu(t))})}function Ym(e,t){if(!e||!e.length)return[];var n=Jm(e);return null==t?n:Er(n,function(e){return go(t,void 0,e)})}function Gm(e,t,n,r){return ph(e,t,n(Ra(e,t)),r)}function Zm(e,t,n){return null==e?e:Gm(e,t,Yc(n))}function Qm(e,t,n,r){return r="function"==typeof r?r:void 0,null==e?e:Gm(e,t,Yc(n),r)}var Xm=nl(function(e,t,n){return e+(n?" ":"")+t.toUpperCase()}),ey=Xm;function ty(e){return null==e?[]:hp(e,ra(e))}var ny=bi(function(e,t){return _c(e)?Ic(e,t):[]}),ry=ny;function oy(e,t){return tg(Yc(t),e)}var iy=Wa(function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,o=function(t){return Pa(t,e)};return!(t>1||this.__actions__.length)&&r instanceof _o&&ti(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:lm,args:[o],thisArg:void 0}),new Ao(r,this.__chain__).thru(function(e){return t&&!e.length&&e.push(void 0),e})):this.thru(o)}),ay=iy;function sy(){return cl(this)}function ly(){var e=this.__wrapped__;if(e instanceof _o){var t=e;return this.__actions__.length&&(t=new _o(this)),(t=t.reverse()).__actions__.push({func:lm,args:[Kg],thisArg:void 0}),new Ao(t,this.__chain__)}return this.thru(Kg)}function uy(e,t,n){var r=e.length;if(r<2)return r?Tm(e[0]):[];for(var o=-1,i=Array(r);++o<r;)for(var a=e[o],s=-1;++s<r;)s!=o&&(i[o]=Ic(i[o]||a,e[s],t,n));return Tm(Ba(i,1),t,n)}var cy=bi(function(e){return uy(Sl(e,_c))}),dy=bi(function(e){var t=$c(e);return _c(t)&&(t=void 0),uy(Sl(e,_c),Ku(t))}),py=dy,fy=bi(function(e){var t=$c(e);return t="function"==typeof t?t:void 0,uy(Sl(e,_c),void 0,t)}),hy=bi(Jm);function gy(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 vy(e,t){return gy(e||[],t||[],gi)}function my(e,t){return gy(e||[],t||[],ph)}var yy=bi(function(e){var t=e.length,n=t>1?e[t-1]:void 0;return n="function"==typeof n?(e.pop(),n):void 0,Ym(e,n)}),by=yy,xy={chunk:fl,compact:yu,concat:bu,difference:Bc,differenceBy:Dc,differenceWith:Fc,drop:Vc,dropRight:Hc,dropRightWhile:qc,dropWhile:Jc,fill:md,findIndex:wd,findLastIndex:Ad,first:Rd,flatten:$a,flattenDeep:Wd,flattenDepth:Dd,fromPairs:Gd,head:Rd,indexOf:bp,initial:xp,intersection:Ep,intersectionBy:Cp,intersectionWith:Op,join:bf,last:$c,lastIndexOf:Cf,nth:ih,pull:hg,pullAll:fg,pullAllBy:gg,pullAllWith:vg,pullAt:xg,remove:Dg,reverse:Kg,slice:sv,sortedIndex:yv,sortedIndexBy:bv,sortedIndexOf:xv,sortedLastIndex:_v,sortedLastIndexBy:wv,sortedLastIndexOf:Sv,sortedUniq:kv,sortedUniqBy:Cv,tail:Wv,take:Dv,takeRight:zv,takeRightWhile:Fv,takeWhile:Uv,union:Bm,unionBy:Wm,unionWith:Dm,uniq:zm,uniqBy:Fm,uniqWith:Um,unzip:Jm,unzipWith:Ym,without:ry,xor:cy,xorBy:py,xorWith:fy,zip:hy,zipObject:vy,zipObjectDeep:my,zipWith:by},_y={countBy:sc,each:Gc,eachRight:td,every:gd,filter:bd,find:Sd,findLast:jd,flatMap:Nd,flatMapDeep:Td,flatMapDepth:Bd,forEach:Gc,forEachRight:td,groupBy:np,includes:mp,invokeMap:zp,keyBy:Sf,map:Pd,orderBy:bh,partition:ig,reduce:Tg,reduceRight:$g,reject:Wg,sample:Gg,sampleSize:ev,shuffle:iv,size:av,some:dv,sortBy:fv},wy={now:dc},Sy={after:Vr,ary:di,before:Za,bind:Xa,bindKey:rs,curry:uc,curryRight:cc,debounce:hc,defer:Rc,delay:Pc,flip:zd,memoize:Sa,negate:eh,once:vh,overArgs:kh,partial:tg,partialRight:rg,rearg:Ng,rest:Ug,spread:jv,throttle:sm,unary:jm,wrap:oy},Ey={castArray:il,clone:fu,cloneDeep:hu,cloneDeepWith:gu,cloneWith:vu,conformsTo:Gu,eq:fi,gt:ip,gte:ap,isArguments:Ri,isArray:kr,isArrayBuffer:Up,isArrayLike:_i,isArrayLikeObject:_c,isBoolean:Vp,isBuffer:Ti,isDate:Kp,isElement:qp,isEmpty:Yp,isEqual:Gp,isEqualWith:Zp,isError:Ja,isFinite:Xp,isFunction:Kr,isInteger:ef,isLength:xi,isMap:iu,isMatch:tf,isMatchWith:nf,isNaN:of,isNative:sf,isNil:lf,isNull:uf,isNumber:rf,isObject:Ir,isObjectLike:_r,isPlainObject:qa,isRegExp:df,isSafeInteger:ff,isSet:su,isString:fp,isSymbol:wr,isTypedArray:Vi,isUndefined:hf,isWeakMap:gf,isWeakSet:vf,lt:Rf,lte:Mf,toArray:nh,toFinite:Fr,toInteger:Ur,toLength:vd,toNumber:Dr,toPlainObject:Sc,toSafeInteger:ym,toString:Aa},ky={add:Lr,ceil:ul,divide:Uc,floor:Fd,max:$f,maxBy:Wf,mean:Ff,meanBy:Uf,min:Gf,minBy:Zf,multiply:Xf,round:qg,subtract:Tv,sum:Bv,sumBy:$v},Cy=gl,Oy=pp,Ay=Og,jy={assign:ea,assignIn:ia,assignInWith:sa,assignWith:ua,at:Da,create:lc,defaults:bc,defaultsDeep:Ac,entries:od,entriesIn:id,extend:ia,extendWith:sa,findKey:kd,findLastKey:Ld,forIn:Kd,forInRight:qd,forOwn:Jd,forOwnRight:Yd,functions:Qd,functionsIn:Xd,get:Ma,has:up,hasIn:Fu,invert:Rp,invertBy:Tp,invoke:Wp,keys:Zi,keysIn:ra,mapKeys:Pf,mapValues:Nf,merge:Hf,mergeWith:Oc,omit:dh,omitBy:gh,pick:sg,pickBy:hh,result:Vg,set:tv,setWith:nv,toPairs:od,toPairsIn:id,transform:xm,unset:Km,update:Zm,updateWith:Qm,values:gp,valuesIn:ty},Ly={at:ay,chain:cl,commit:mu,lodash:Mo,next:rh,plant:lg,reverse:ly,tap:Vv,thru:lm,toIterator:pm,toJSON:hm,value:hm,valueOf:hm,wrapperChain:sy},Ry={camelCase:ol,capitalize:Ss,deburr:js,endsWith:nd,escape:ud,escapeRegExp:pd,kebabCase:_f,lowerCase:Af,lowerFirst:jf,pad:Jh,padEnd:Yh,padStart:Gh,parseInt:Xh,repeat:zg,replace:Fg,snakeCase:uv,split:Ov,startCase:Rv,startsWith:Mv,template:am,templateSettings:Zv,toLower:gm,toUpper:bm,trim:Sm,trimEnd:Em,trimStart:Cm,truncate:Am,unescape:Pm,upperCase:ey,upperFirst:ws,words:el},My={attempt:Ga,bindAll:ts,cond:qu,conforms:Yu,constant:Do,defaultTo:gc,flow:Vd,flowRight:Hd,identity:Hr,iteratee:mf,matches:If,matchesProperty:Tf,method:qf,methodOf:Yf,mixin:Qf,noop:wo,nthArg:ah,over:_h,overEvery:Ch,overSome:Oh,property:Hu,propertyOf:ug,range:Rg,rangeRight:Mg,stubArray:El,stubFalse:Mi,stubObject:Pv,stubString:Nv,stubTrue:Iv,times:dm,toPath:vm,uniqueId:Hm};var Py=Math.max,Ny=Math.min;var Iy=Math.min;var Ty,By=4294967295,$y=Array.prototype,Wy=Object.prototype.hasOwnProperty,Dy=fr?fr.iterator:void 0,zy=Math.max,Fy=Math.min,Uy=function(e){return function(t,n,r){if(null==r){var o=Ir(n),i=o&&Zi(n),a=i&&i.length&&Zd(n,i);(a?a.length:o)||(r=n,n=t,t=this)}return e(t,n,r)}}(Qf);Mo.after=Sy.after,Mo.ary=Sy.ary,Mo.assign=jy.assign,Mo.assignIn=jy.assignIn,Mo.assignInWith=jy.assignInWith,Mo.assignWith=jy.assignWith,Mo.at=jy.at,Mo.before=Sy.before,Mo.bind=Sy.bind,Mo.bindAll=My.bindAll,Mo.bindKey=Sy.bindKey,Mo.castArray=Ey.castArray,Mo.chain=Ly.chain,Mo.chunk=xy.chunk,Mo.compact=xy.compact,Mo.concat=xy.concat,Mo.cond=My.cond,Mo.conforms=My.conforms,Mo.constant=My.constant,Mo.countBy=_y.countBy,Mo.create=jy.create,Mo.curry=Sy.curry,Mo.curryRight=Sy.curryRight,Mo.debounce=Sy.debounce,Mo.defaults=jy.defaults,Mo.defaultsDeep=jy.defaultsDeep,Mo.defer=Sy.defer,Mo.delay=Sy.delay,Mo.difference=xy.difference,Mo.differenceBy=xy.differenceBy,Mo.differenceWith=xy.differenceWith,Mo.drop=xy.drop,Mo.dropRight=xy.dropRight,Mo.dropRightWhile=xy.dropRightWhile,Mo.dropWhile=xy.dropWhile,Mo.fill=xy.fill,Mo.filter=_y.filter,Mo.flatMap=_y.flatMap,Mo.flatMapDeep=_y.flatMapDeep,Mo.flatMapDepth=_y.flatMapDepth,Mo.flatten=xy.flatten,Mo.flattenDeep=xy.flattenDeep,Mo.flattenDepth=xy.flattenDepth,Mo.flip=Sy.flip,Mo.flow=My.flow,Mo.flowRight=My.flowRight,Mo.fromPairs=xy.fromPairs,Mo.functions=jy.functions,Mo.functionsIn=jy.functionsIn,Mo.groupBy=_y.groupBy,Mo.initial=xy.initial,Mo.intersection=xy.intersection,Mo.intersectionBy=xy.intersectionBy,Mo.intersectionWith=xy.intersectionWith,Mo.invert=jy.invert,Mo.invertBy=jy.invertBy,Mo.invokeMap=_y.invokeMap,Mo.iteratee=My.iteratee,Mo.keyBy=_y.keyBy,Mo.keys=Zi,Mo.keysIn=jy.keysIn,Mo.map=_y.map,Mo.mapKeys=jy.mapKeys,Mo.mapValues=jy.mapValues,Mo.matches=My.matches,Mo.matchesProperty=My.matchesProperty,Mo.memoize=Sy.memoize,Mo.merge=jy.merge,Mo.mergeWith=jy.mergeWith,Mo.method=My.method,Mo.methodOf=My.methodOf,Mo.mixin=Uy,Mo.negate=eh,Mo.nthArg=My.nthArg,Mo.omit=jy.omit,Mo.omitBy=jy.omitBy,Mo.once=Sy.once,Mo.orderBy=_y.orderBy,Mo.over=My.over,Mo.overArgs=Sy.overArgs,Mo.overEvery=My.overEvery,Mo.overSome=My.overSome,Mo.partial=Sy.partial,Mo.partialRight=Sy.partialRight,Mo.partition=_y.partition,Mo.pick=jy.pick,Mo.pickBy=jy.pickBy,Mo.property=My.property,Mo.propertyOf=My.propertyOf,Mo.pull=xy.pull,Mo.pullAll=xy.pullAll,Mo.pullAllBy=xy.pullAllBy,Mo.pullAllWith=xy.pullAllWith,Mo.pullAt=xy.pullAt,Mo.range=My.range,Mo.rangeRight=My.rangeRight,Mo.rearg=Sy.rearg,Mo.reject=_y.reject,Mo.remove=xy.remove,Mo.rest=Sy.rest,Mo.reverse=xy.reverse,Mo.sampleSize=_y.sampleSize,Mo.set=jy.set,Mo.setWith=jy.setWith,Mo.shuffle=_y.shuffle,Mo.slice=xy.slice,Mo.sortBy=_y.sortBy,Mo.sortedUniq=xy.sortedUniq,Mo.sortedUniqBy=xy.sortedUniqBy,Mo.split=Ry.split,Mo.spread=Sy.spread,Mo.tail=xy.tail,Mo.take=xy.take,Mo.takeRight=xy.takeRight,Mo.takeRightWhile=xy.takeRightWhile,Mo.takeWhile=xy.takeWhile,Mo.tap=Ly.tap,Mo.throttle=Sy.throttle,Mo.thru=lm,Mo.toArray=Ey.toArray,Mo.toPairs=jy.toPairs,Mo.toPairsIn=jy.toPairsIn,Mo.toPath=My.toPath,Mo.toPlainObject=Ey.toPlainObject,Mo.transform=jy.transform,Mo.unary=Sy.unary,Mo.union=xy.union,Mo.unionBy=xy.unionBy,Mo.unionWith=xy.unionWith,Mo.uniq=xy.uniq,Mo.uniqBy=xy.uniqBy,Mo.uniqWith=xy.uniqWith,Mo.unset=jy.unset,Mo.unzip=xy.unzip,Mo.unzipWith=xy.unzipWith,Mo.update=jy.update,Mo.updateWith=jy.updateWith,Mo.values=jy.values,Mo.valuesIn=jy.valuesIn,Mo.without=xy.without,Mo.words=Ry.words,Mo.wrap=Sy.wrap,Mo.xor=xy.xor,Mo.xorBy=xy.xorBy,Mo.xorWith=xy.xorWith,Mo.zip=xy.zip,Mo.zipObject=xy.zipObject,Mo.zipObjectDeep=xy.zipObjectDeep,Mo.zipWith=xy.zipWith,Mo.entries=jy.toPairs,Mo.entriesIn=jy.toPairsIn,Mo.extend=jy.assignIn,Mo.extendWith=jy.assignInWith,Uy(Mo,Mo),Mo.add=ky.add,Mo.attempt=My.attempt,Mo.camelCase=Ry.camelCase,Mo.capitalize=Ry.capitalize,Mo.ceil=ky.ceil,Mo.clamp=Cy,Mo.clone=Ey.clone,Mo.cloneDeep=Ey.cloneDeep,Mo.cloneDeepWith=Ey.cloneDeepWith,Mo.cloneWith=Ey.cloneWith,Mo.conformsTo=Ey.conformsTo,Mo.deburr=Ry.deburr,Mo.defaultTo=My.defaultTo,Mo.divide=ky.divide,Mo.endsWith=Ry.endsWith,Mo.eq=Ey.eq,Mo.escape=Ry.escape,Mo.escapeRegExp=Ry.escapeRegExp,Mo.every=_y.every,Mo.find=_y.find,Mo.findIndex=xy.findIndex,Mo.findKey=jy.findKey,Mo.findLast=_y.findLast,Mo.findLastIndex=xy.findLastIndex,Mo.findLastKey=jy.findLastKey,Mo.floor=ky.floor,Mo.forEach=_y.forEach,Mo.forEachRight=_y.forEachRight,Mo.forIn=jy.forIn,Mo.forInRight=jy.forInRight,Mo.forOwn=jy.forOwn,Mo.forOwnRight=jy.forOwnRight,Mo.get=jy.get,Mo.gt=Ey.gt,Mo.gte=Ey.gte,Mo.has=jy.has,Mo.hasIn=jy.hasIn,Mo.head=xy.head,Mo.identity=Hr,Mo.includes=_y.includes,Mo.indexOf=xy.indexOf,Mo.inRange=Oy,Mo.invoke=jy.invoke,Mo.isArguments=Ey.isArguments,Mo.isArray=kr,Mo.isArrayBuffer=Ey.isArrayBuffer,Mo.isArrayLike=Ey.isArrayLike,Mo.isArrayLikeObject=Ey.isArrayLikeObject,Mo.isBoolean=Ey.isBoolean,Mo.isBuffer=Ey.isBuffer,Mo.isDate=Ey.isDate,Mo.isElement=Ey.isElement,Mo.isEmpty=Ey.isEmpty,Mo.isEqual=Ey.isEqual,Mo.isEqualWith=Ey.isEqualWith,Mo.isError=Ey.isError,Mo.isFinite=Ey.isFinite,Mo.isFunction=Ey.isFunction,Mo.isInteger=Ey.isInteger,Mo.isLength=Ey.isLength,Mo.isMap=Ey.isMap,Mo.isMatch=Ey.isMatch,Mo.isMatchWith=Ey.isMatchWith,Mo.isNaN=Ey.isNaN,Mo.isNative=Ey.isNative,Mo.isNil=Ey.isNil,Mo.isNull=Ey.isNull,Mo.isNumber=Ey.isNumber,Mo.isObject=Ir,Mo.isObjectLike=Ey.isObjectLike,Mo.isPlainObject=Ey.isPlainObject,Mo.isRegExp=Ey.isRegExp,Mo.isSafeInteger=Ey.isSafeInteger,Mo.isSet=Ey.isSet,Mo.isString=Ey.isString,Mo.isSymbol=Ey.isSymbol,Mo.isTypedArray=Ey.isTypedArray,Mo.isUndefined=Ey.isUndefined,Mo.isWeakMap=Ey.isWeakMap,Mo.isWeakSet=Ey.isWeakSet,Mo.join=xy.join,Mo.kebabCase=Ry.kebabCase,Mo.last=$c,Mo.lastIndexOf=xy.lastIndexOf,Mo.lowerCase=Ry.lowerCase,Mo.lowerFirst=Ry.lowerFirst,Mo.lt=Ey.lt,Mo.lte=Ey.lte,Mo.max=ky.max,Mo.maxBy=ky.maxBy,Mo.mean=ky.mean,Mo.meanBy=ky.meanBy,Mo.min=ky.min,Mo.minBy=ky.minBy,Mo.stubArray=My.stubArray,Mo.stubFalse=My.stubFalse,Mo.stubObject=My.stubObject,Mo.stubString=My.stubString,Mo.stubTrue=My.stubTrue,Mo.multiply=ky.multiply,Mo.nth=xy.nth,Mo.noop=My.noop,Mo.now=wy.now,Mo.pad=Ry.pad,Mo.padEnd=Ry.padEnd,Mo.padStart=Ry.padStart,Mo.parseInt=Ry.parseInt,Mo.random=Ay,Mo.reduce=_y.reduce,Mo.reduceRight=_y.reduceRight,Mo.repeat=Ry.repeat,Mo.replace=Ry.replace,Mo.result=jy.result,Mo.round=ky.round,Mo.sample=_y.sample,Mo.size=_y.size,Mo.snakeCase=Ry.snakeCase,Mo.some=_y.some,Mo.sortedIndex=xy.sortedIndex,Mo.sortedIndexBy=xy.sortedIndexBy,Mo.sortedIndexOf=xy.sortedIndexOf,Mo.sortedLastIndex=xy.sortedLastIndex,Mo.sortedLastIndexBy=xy.sortedLastIndexBy,Mo.sortedLastIndexOf=xy.sortedLastIndexOf,Mo.startCase=Ry.startCase,Mo.startsWith=Ry.startsWith,Mo.subtract=ky.subtract,Mo.sum=ky.sum,Mo.sumBy=ky.sumBy,Mo.template=Ry.template,Mo.times=My.times,Mo.toFinite=Ey.toFinite,Mo.toInteger=Ur,Mo.toLength=Ey.toLength,Mo.toLower=Ry.toLower,Mo.toNumber=Ey.toNumber,Mo.toSafeInteger=Ey.toSafeInteger,Mo.toString=Ey.toString,Mo.toUpper=Ry.toUpper,Mo.trim=Ry.trim,Mo.trimEnd=Ry.trimEnd,Mo.trimStart=Ry.trimStart,Mo.truncate=Ry.truncate,Mo.unescape=Ry.unescape,Mo.uniqueId=My.uniqueId,Mo.upperCase=Ry.upperCase,Mo.upperFirst=Ry.upperFirst,Mo.each=_y.forEach,Mo.eachRight=_y.forEachRight,Mo.first=xy.head,Uy(Mo,(Ty={},ec(Mo,function(e,t){Wy.call(Mo.prototype,t)||(Ty[t]=e)}),Ty),{chain:!1}),Mo.VERSION="4.17.23",(Mo.templateSettings=Ry.templateSettings).imports._=Mo,Ho(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){Mo[e].placeholder=Mo}),Ho(["drop","take"],function(e,t){_o.prototype[e]=function(n){n=void 0===n?1:zy(Ur(n),0);var r=this.__filtered__&&!t?new _o(this):this.clone();return r.__filtered__?r.__takeCount__=Fy(n,r.__takeCount__):r.__views__.push({size:Fy(n,By),type:e+(r.__dir__<0?"Right":"")}),r},_o.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}}),Ho(["filter","map","takeWhile"],function(e,t){var n=t+1,r=1==n||3==n;_o.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:Ku(e),type:n}),t.__filtered__=t.__filtered__||r,t}}),Ho(["head","last"],function(e,t){var n="take"+(t?"Right":"");_o.prototype[e]=function(){return this[n](1).value()[0]}}),Ho(["initial","tail"],function(e,t){var n="drop"+(t?"":"Right");_o.prototype[e]=function(){return this.__filtered__?new _o(this):this[n](1)}}),_o.prototype.compact=function(){return this.filter(Hr)},_o.prototype.find=function(e){return this.filter(e).head()},_o.prototype.findLast=function(e){return this.reverse().find(e)},_o.prototype.invokeMap=bi(function(e,t){return"function"==typeof e?new _o(this):this.map(function(n){return $p(n,e,t)})}),_o.prototype.reject=function(e){return this.filter(eh(Ku(e)))},_o.prototype.slice=function(e,t){e=Ur(e);var n=this;return n.__filtered__&&(e>0||t<0)?new _o(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),void 0!==t&&(n=(t=Ur(t))<0?n.dropRight(-t):n.take(t-e)),n)},_o.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},_o.prototype.toArray=function(){return this.take(By)},ec(_o.prototype,function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),o=Mo[r?"take"+("last"==t?"Right":""):t],i=r||/^find/.test(t);o&&(Mo.prototype[t]=function(){var t=this.__wrapped__,a=r?[1]:arguments,s=t instanceof _o,l=a[0],u=s||kr(t),c=function(e){var t=o.apply(Mo,Na([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 _o(this);var g=e.apply(t,a);return g.__actions__.push({func:lm,args:[c],thisArg:void 0}),new Ao(g,d)}return f&&h?e.apply(this,a):(g=this.thru(c),f?r?g.value()[0]:g.value():g)})}),Ho(["pop","push","shift","sort","splice","unshift"],function(e){var t=$y[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);Mo.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var o=this.value();return t.apply(kr(o)?o:[],e)}return this[n](function(n){return t.apply(kr(n)?n:[],e)})}}),ec(_o.prototype,function(e,t){var n=Mo[t];if(n){var r=n.name+"";Wy.call(ko,r)||(ko[r]=[]),ko[r].push({name:t,func:n})}}),ko[ii(void 0,2).name]=[{name:"wrapper",func:void 0}],_o.prototype.clone=function(){var e=new _o(this.__wrapped__);return e.__actions__=jo(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=jo(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=jo(this.__views__),e},_o.prototype.reverse=function(){if(this.__filtered__){var e=new _o(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},_o.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=kr(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=Ny(t,e+a);break;case"takeRight":e=Py(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=Iy(l,this.__takeCount__);if(!n||!r&&o==l&&f==l)return fm(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,x=y(v);if(2==b)v=x;else if(!x){if(1==b)continue e;break e}}h[p++]=v}return h},Mo.prototype.at=Ly.at,Mo.prototype.chain=Ly.wrapperChain,Mo.prototype.commit=Ly.commit,Mo.prototype.next=Ly.next,Mo.prototype.plant=Ly.plant,Mo.prototype.reverse=Ly.reverse,Mo.prototype.toJSON=Mo.prototype.valueOf=Mo.prototype.value=Ly.value,Mo.prototype.first=Mo.prototype.head,Dy&&(Mo.prototype[Dy]=Ly.toIterator);var Vy=p(Object.freeze({__proto__:null,add:Lr,after:Vr,ary:di,assign:ea,assignIn:ia,assignInWith:sa,assignWith:ua,at:Da,attempt:Ga,before:Za,bind:Xa,bindAll:ts,bindKey:rs,camelCase:ol,capitalize:Ss,castArray:il,ceil:ul,chain:cl,chunk:fl,clamp:gl,clone:fu,cloneDeep:hu,cloneDeepWith:gu,cloneWith:vu,commit:mu,compact:yu,concat:bu,cond:qu,conforms:Yu,conformsTo:Gu,constant:Do,countBy:sc,create:lc,curry:uc,curryRight:cc,debounce:hc,deburr:js,defaultTo:gc,defaults:bc,defaultsDeep:Ac,defer:Rc,delay:Pc,difference:Bc,differenceBy:Dc,differenceWith:Fc,divide:Uc,drop:Vc,dropRight:Hc,dropRightWhile:qc,dropWhile:Jc,each:Gc,eachRight:td,endsWith:nd,entries:od,entriesIn:id,eq:fi,escape:ud,escapeRegExp:pd,every:gd,extend:ia,extendWith:sa,fill:md,filter:bd,find:Sd,findIndex:wd,findKey:kd,findLast:jd,findLastIndex:Ad,findLastKey:Ld,first:Rd,flatMap:Nd,flatMapDeep:Td,flatMapDepth:Bd,flatten:$a,flattenDeep:Wd,flattenDepth:Dd,flip:zd,floor:Fd,flow:Vd,flowRight:Hd,forEach:Gc,forEachRight:td,forIn:Kd,forInRight:qd,forOwn:Jd,forOwnRight:Yd,fromPairs:Gd,functions:Qd,functionsIn:Xd,get:Ma,groupBy:np,gt:ip,gte:ap,has:up,hasIn:Fu,head:Rd,identity:Hr,inRange:pp,includes:mp,indexOf:bp,initial:xp,intersection:Ep,intersectionBy:Cp,intersectionWith:Op,invert:Rp,invertBy:Tp,invoke:Wp,invokeMap:zp,isArguments:Ri,isArray:kr,isArrayBuffer:Up,isArrayLike:_i,isArrayLikeObject:_c,isBoolean:Vp,isBuffer:Ti,isDate:Kp,isElement:qp,isEmpty:Yp,isEqual:Gp,isEqualWith:Zp,isError:Ja,isFinite:Xp,isFunction:Kr,isInteger:ef,isLength:xi,isMap:iu,isMatch:tf,isMatchWith:nf,isNaN:of,isNative:sf,isNil:lf,isNull:uf,isNumber:rf,isObject:Ir,isObjectLike:_r,isPlainObject:qa,isRegExp:df,isSafeInteger:ff,isSet:su,isString:fp,isSymbol:wr,isTypedArray:Vi,isUndefined:hf,isWeakMap:gf,isWeakSet:vf,iteratee:mf,join:bf,kebabCase:_f,keyBy:Sf,keys:Zi,keysIn:ra,last:$c,lastIndexOf:Cf,lodash:Mo,lowerCase:Af,lowerFirst:jf,lt:Rf,lte:Mf,map:Pd,mapKeys:Pf,mapValues:Nf,matches:If,matchesProperty:Tf,max:$f,maxBy:Wf,mean:Ff,meanBy:Uf,memoize:Sa,merge:Hf,mergeWith:Oc,method:qf,methodOf:Yf,min:Gf,minBy:Zf,mixin:Qf,multiply:Xf,negate:eh,next:rh,noop:wo,now:dc,nth:ih,nthArg:ah,omit:dh,omitBy:gh,once:vh,orderBy:bh,over:_h,overArgs:kh,overEvery:Ch,overSome:Oh,pad:Jh,padEnd:Yh,padStart:Gh,parseInt:Xh,partial:tg,partialRight:rg,partition:ig,pick:sg,pickBy:hh,plant:lg,property:Hu,propertyOf:ug,pull:hg,pullAll:fg,pullAllBy:gg,pullAllWith:vg,pullAt:xg,random:Og,range:Rg,rangeRight:Mg,rearg:Ng,reduce:Tg,reduceRight:$g,reject:Wg,remove:Dg,repeat:zg,replace:Fg,rest:Ug,result:Vg,reverse:Kg,round:qg,sample:Gg,sampleSize:ev,set:tv,setWith:nv,shuffle:iv,size:av,slice:sv,snakeCase:uv,some:dv,sortBy:fv,sortedIndex:yv,sortedIndexBy:bv,sortedIndexOf:xv,sortedLastIndex:_v,sortedLastIndexBy:wv,sortedLastIndexOf:Sv,sortedUniq:kv,sortedUniqBy:Cv,split:Ov,spread:jv,startCase:Rv,startsWith:Mv,stubArray:El,stubFalse:Mi,stubObject:Pv,stubString:Nv,stubTrue:Iv,subtract:Tv,sum:Bv,sumBy:$v,tail:Wv,take:Dv,takeRight:zv,takeRightWhile:Fv,takeWhile:Uv,tap:Vv,template:am,templateSettings:Zv,throttle:sm,thru:lm,times:dm,toArray:nh,toFinite:Fr,toInteger:Ur,toIterator:pm,toJSON:hm,toLength:vd,toLower:gm,toNumber:Dr,toPairs:od,toPairsIn:id,toPath:vm,toPlainObject:Sc,toSafeInteger:ym,toString:Aa,toUpper:bm,transform:xm,trim:Sm,trimEnd:Em,trimStart:Cm,truncate:Am,unary:jm,unescape:Pm,union:Bm,unionBy:Wm,unionWith:Dm,uniq:zm,uniqBy:Fm,uniqWith:Um,uniqueId:Hm,unset:Km,unzip:Jm,unzipWith:Ym,update:Zm,updateWith:Qm,upperCase:ey,upperFirst:ws,value:hm,valueOf:hm,values:gp,valuesIn:ty,without:ry,words:el,wrap:oy,wrapperAt:ay,wrapperChain:sy,wrapperCommit:mu,wrapperLodash:Mo,wrapperNext:rh,wrapperPlant:lg,wrapperReverse:ly,wrapperToIterator:pm,wrapperValue:hm,xor:cy,xorBy:py,xorWith:fy,zip:hy,zipObject:vy,zipObjectDeep:my,zipWith:by,default:Mo})),Hy={};Object.defineProperty(Hy,"__esModule",{value:!0});class Ky extends CustomEvent{constructor(e,t,n){super(Ky.TYPE,{bubbles:!0,composed:!0,detail:{complete:t,component:e,hasModel:n}}),this.component=e,this.complete=t}}Ky.TYPE="model-set",Hy.ModelSetEvent=Ky;class qy extends CustomEvent{constructor(e,t){super(qy.TYPE,{bubbles:!0,composed:!0,detail:{complete:t,component:e}}),this.component=e,this.complete=t}}qy.TYPE="session-changed",Hy.SessionChangedEvent=qy;var Jy={};Object.defineProperty(Jy,"__esModule",{value:!0}),Jy.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)},Jy.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 Yy=e,Gy=u,Zy=l,Qy=i,Xy=c;var eb=h.exports;Object.defineProperty(f,"__esModule",{value:!0});var tb=f.isComplete=f.default=void 0,nb=eb(g.exports),rb=eb(b),ob=eb(Yy),ib=Gy,ab=Vy,sb=eb(Zy),lb=Hy,ub=Xy,cb=Qy,db=Jy;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}}tb=f.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(),this._root=null)}handleKeyDown(e){if(!this._model||!this._session)return;const{mode:t}=this._model;if("gather"!==t)return;const n=(e=>{const t=e>="1"&&e<="9"?e-"1":"0"===e?9:-1,n=/^[a-jA-J]$/.test(e)?e.toLowerCase().charCodeAt(0)-"a".charCodeAt(0):-1;return t>=0?t:n})(e.key);if(void 0===n||n<=-1||n>=function(e){let t,n=e[0],r=1;for(;r<e.length;){const o=e[r],i=e[r+1];if(r+=2,("optionalAccess"===o||"optionalCall"===o)&&null==n)return;"access"===o||"optionalAccess"===o?(t=n,n=i(n)):"call"!==o&&"optionalCall"!==o||(n=i((...e)=>n.call(t,...e)),t=void 0)}return n}([this,"access",e=>e._model,"access",e=>e.choices,"optionalAccess",e=>e.length]))return;const r=this._session.value||[],o=this._model.choices[n].value,i={value:o,selected:!r.includes(o),selector:"Keyboard"};this._onChange(i)}}var vb=f.default=gb;export{vb as default,tb as isComplete};
|
|
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.12/module/index.js";import{_dll_pie_lib__math_rendering as c}from"../../../@pie-lib/math-rendering-module@^5.1.2/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={},h={exports:{}};!function(e){e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports}(h),d(h.exports);var g={exports:{}},v={exports:{}},m={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}(m),d(m.exports);var y={exports:{}};!function(e){var t=m.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}(y),d(y.exports),function(e){var t=m.exports.default,n=y.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}(v),d(v.exports),function(e){var t=v.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}(g),d(g.exports);var b={},x={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}(x),d(x.exports);var _={};function w(e,t){return null!=e?e:t()}function S(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 E=e=>"string"==typeof e,k=()=>{let e,t;const n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},C=e=>null==e?"":""+e,O=/###/g,j=e=>e&&e.indexOf("###")>-1?e.replace(O,"."):e,A=e=>!e||E(e),L=(e,t,n)=>{const r=E(t)?t.split("."):t;let o=0;for(;o<r.length-1;){if(A(e))return{};const t=j(r[o]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++o}return A(e)?{}:{obj:e,k:j(r[o])}},R=(e,t,n)=>{const{obj:r,k:o}=L(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=L(e,a,Object);for(;void 0===s.obj&&a.length;)i=`${a[a.length-1]}.${i}`,a=a.slice(0,a.length-1),s=L(e,a,Object),S([s,"optionalAccess",e=>e.obj])&&void 0!==s.obj[`${s.k}.${i}`]&&(s.obj=void 0);s.obj[`${s.k}.${i}`]=n},M=(e,t)=>{const{obj:n,k:r}=L(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},P=(e,t,n)=>{for(const r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?E(e[r])||e[r]instanceof String||E(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):P(e[r],t[r],n):e[r]=t[r]);return e},N=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var I={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const T=e=>E(e)?e.replace(/[&<>"'\/]/g,e=>I[e]):e;const B=[" ",",","?","!",";"],$=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),W=(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},D=e=>S([e,"optionalAccess",e=>e.replace,"call",e=>e("_","-")]),z={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){S([console,"optionalAccess",t=>t[e],"optionalAccess",e=>e.apply,"optionalCall",e=>e(console,t)])}};class F{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||"i18next:",this.logger=e||z,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:(E(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new F(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new F(this.logger,e)}}var U=new F;class V{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 H extends V{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):E(n)&&o?a.push(...n.split(o)):a.push(n)));const s=M(this.data,a);return!s&&!t&&!n&&e.indexOf(".")>-1&&(e=a[0],t=a[1],n=a.slice(2).join(".")),!s&&i&&E(n)?W(S([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),R(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)(E(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=M(this.data,a)||{};i.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?P(s,n,o):s={...s,...n},R(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 K={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,o){return e.forEach(e=>{t=w(S([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 J(e,t){const{[q]:n}=e(function(){const e=[],t=Object.create(null);let n;return t.get=(r,o)=>(S([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(w(S([t,"optionalAccess",e=>e.keySeparator]),()=>"."))}const Y={},G=e=>!E(e)&&"boolean"!=typeof e&&"number"!=typeof e;class Z extends V{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=U.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===S([r,"optionalAccess",e=>e.res]))return!1;const o=G(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=B.filter(e=>t.indexOf(e)<0&&n.indexOf(e)<0);if(0===r.length)return!0;const o=$.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:E(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:E(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=J(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"===S([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=S([p,"optionalAccess",e=>e.res]);const h=S([p,"optionalAccess",e=>e.usedKey])||a,g=S([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&&!E(r.count),b=Z.hasDefaultValue(r),x=y?this.pluralResolver.getSuffix(c,r.count,r):"",_=r.ordinal&&y?this.pluralResolver.getSuffix(c,r.count,{ordinal:!1}):"",w=y&&!r.ordinal&&0===r.count,k=w&&r[`defaultValue${this.options.pluralSeparator}zero`]||r[`defaultValue${x}`]||r[`defaultValue${_}`]||r.defaultValue;let C=f;m&&!f&&b&&(C=k);const O=G(C),j=Object.prototype.toString.apply(C);if(!(m&&C&&O&&["[object Number]","[object Function]","[object RegExp]"].indexOf(j)<0)||E(v)&&Array.isArray(C))if(m&&E(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=k),this.isValidLookup(f)||(o=!0,f=a);const s=(r.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&o?void 0:f,d=b&&k!==f&&this.options.updateMissing;if(o||t||d){if(this.logger.log(d?"updateKey":"missingKey",c,l,a,d?k: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):S([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}`]||k)})}):n(e,a,k))}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,C,{...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(C),t=e?[]:{},n=e?g:h;for(const e in C)if(Object.prototype.hasOwnProperty.call(C,e)){const o=`${n}${i}${e}`;t[e]=b&&!f?this.translate(o,{...r,defaultValue:G(k)?k[e]:void 0,joinArrays:!1,ns:s}):this.translate(o,{...r,joinArrays:!1,ns:s}),t[e]===o&&(t[e]=C[e])}f=t}}return o?(p.res=f,p.usedParams=this.getUsedParamsDetails(r),p):f}extendTranslation(e,t,n,r,o){if(S([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=E(e)&&(void 0!==S([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&&!E(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)=>S([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=E(i)?[i]:i;return null!=e&&S([a,"optionalAccess",e=>e.length])&&!1!==n.applyPostProcessor&&(e=K.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 E(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&&!E(t.count),d=c&&!t.ordinal&&0===t.count,p=void 0!==t.context&&(E(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,Y[`${f[0]}-${e}`]||!S([this,"access",e=>e.utils,"optionalAccess",e=>e.hasLoadedNamespace])||S([this,"access",e=>e.utils,"optionalAccess",e=>e.hasLoadedNamespace,"call",e=>e(a)])||(Y[`${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(S([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 S([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&&!E(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 Q{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=U.create("languageUtils")}getScriptPartFromCode(e){if(!(e=D(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=D(e))||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(E(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)),E(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 E(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))):E(e)&&o(this.formatLanguageCode(e)),n.forEach(e=>{r.indexOf(e)<0&&o(this.formatLanguageCode(e))}),r}}const X={zero:0,one:1,two:2,few:3,many:4,other:5},ee={select:e=>1===e?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class te{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=U.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){const n=D("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!"),ee;if(!e.match(/-|_/))return ee;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)),S([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)=>X[e]-X[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 ne=(e,t,n,r=".",o=!0)=>{let i=((e,t,n)=>{const r=M(e,n);return void 0!==r?r:M(t,n)})(e,t,n);return!i&&o&&E(n)&&(i=W(e,n,r),void 0===i&&(i=W(t,n,r))),i},re=e=>e.replace(/\$/g,"$$$$");class oe{constructor(e={}){this.logger=U.create("interpolator"),this.options=e,this.format=S([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:T,this.escapeValue=void 0===n||n,this.useRawValueToEscape=void 0!==r&&r,this.prefix=o?N(o):i||"{{",this.suffix=a?N(a):s||"}}",this.formatSeparator=l||",",this.unescapePrefix=u?"":c||"-",this.unescapeSuffix=this.unescapePrefix?"":u||"",this.nestingPrefix=d?N(d):p||N("$t("),this.nestingSuffix=f?N(f):h||N(")"),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)=>S([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=ne(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(ne(t,s,i,this.options.keySeparator,this.options.ignoreJSONStructure),a,n,{...r,...t,interpolationkey:i})};this.resetRegExp();const u=S([r,"optionalAccess",e=>e.missingInterpolationHandler])||this.options.missingInterpolationHandler,c=void 0!==S([r,"optionalAccess",e=>e.interpolation,"optionalAccess",e=>e.skipOnVariables])?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>re(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?re(this.escape(e)):re(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=E(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 E(i)||this.useRawValueToEscape||(i=C(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);(w(S([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&&!E(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&&!E(o))return o;E(o)||(o=C(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 ie=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(D(r),o),t[a]=s),s(n)}},ae=e=>(t,n,r)=>e(D(n),r)(t);class se{constructor(e={}){this.logger=U.create("formatter"),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||",";const n=t.cacheInBuiltFormats?ie:ae;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()]=ie(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=S([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 le extends V{constructor(e,t,n,r={}){super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=U.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=[],S([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}=L(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();E(e)&&(e=this.languageUtils.toResolveHierarchy(e)),E(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(!S([this,"access",e=>e.services,"optionalAccess",e=>e.utils,"optionalAccess",e=>e.hasLoadedNamespace])||S([this,"access",e=>e.services,"optionalAccess",e=>e.utils,"optionalAccess",e=>e.hasLoadedNamespace,"call",e=>e(t)])){if(null!=n&&""!==n){if(S([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 ue=()=>({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]),E(e[1])&&(t.defaultValue=e[1]),E(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}),ce=e=>(E(e.ns)&&(e.ns=[e.ns]),E(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),E(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),S([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),de=()=>{};class pe extends V{constructor(e={},t){var n;if(super(),this.options=ce(e),this.services={},this.logger=U,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&&(E(e.ns)?e.defaultNS=e.ns:e.ns.indexOf("translation")<0&&(e.defaultNS=e.ns[0]));const n=ue();var r;this.options={...n,...this.options,...ce(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||(S([r=this,"optionalAccess",e=>e.modules,"optionalAccess",e=>e.backend,"optionalAccess",e=>e.name,"optionalAccess",e=>e.indexOf,"call",e=>e("Locize")])>0||S([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||S([r,"optionalAccess",e=>e.options,"optionalAccess",e=>e.backend,"optionalAccess",e=>e.backends])&&r.options.backend.backends.some(e=>S([e,"optionalAccess",e=>e.name,"access",e=>e.indexOf,"call",e=>e("Locize")])>0||S([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?U.init(o(this.modules.logger),this.options):U.init(null,this.options),e=this.modules.formatter?this.modules.formatter:se;const t=new Q(this.options);this.store=new H(this.options.resources,this.options);const r=this.services;r.logger=U,r.resourceStore=this.store,r.languageUtils=t,r.pluralResolver=new te(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 oe(this.options),r.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},r.backendConnector=new le(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 Z(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=de),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=k(),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=de){let n=t;const r=E(e)?e:this.language;if("function"==typeof e&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if("cimode"===S([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))}S([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=k();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=de),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&&K.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=k();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=E(t)?t:t&&t[0],i=this.store.hasLanguageSomeTranslations(n)?n:this.services.languageUtils.getBestMatchFromCodes(E(t)?[t]:t);i&&(this.language||r(i),this.translator.language||this.translator.changeLanguage(i),S([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=J(e,{...this.options,...t})),`${i.keyPrefix}${a}${e}`)):("function"==typeof e&&(e=J(e,{...this.options,...t})),s=i.keyPrefix?`${i.keyPrefix}${a}${e}`:e),this.t(s,i)};return E(e)?r.lng=e:r.lngs=e,r.ns=t,r.keyPrefix=n,r}t(...e){return S([this,"access",e=>e.translator,"optionalAccess",e=>e.translate,"call",t=>t(...e)])}exists(...e){return S([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=k();return this.options.ns?(E(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=k();E(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||(S([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=S([this,"access",e=>e.services,"optionalAccess",e=>e.languageUtils])||new Q(ue());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 pe(e,t);return n.createInstance=pe.createInstance,n}cloneInstance(e={},t=de){const n=e.forkResourceStore;n&&delete e.forkResourceStore;const r={...this.options,...e,isClone:!0},o=new pe(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 H(e,r),o.services.resourceStore=o.store}if(e.interpolation){const t={...ue().interpolation,...this.options.interpolation,...e.interpolation},n={...r,interpolation:t};o.services.interpolator=new oe(n)}return o.translator=new Z(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 fe=pe.createInstance();fe.createInstance,fe.dir,fe.init,fe.loadResources,fe.reloadResources,fe.use,fe.changeLanguage,fe.getFixedT,fe.t,fe.exists,fe.setDefaultNamespace,fe.hasLoadedNamespace,fe.loadNamespaces,fe.loadLanguages;fe.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 he={translator:{...fe,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 fe.t(e,{lng:n,...t})}},languageOptions:[{value:"en_US",label:"English (US)"},{value:"es_ES",label:"Spanish"}]},ge=p(Object.freeze({__proto__:null,default:he})),ve={},me={},ye={};function be(){return be=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},be.apply(null,arguments)}function xe(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 _e(e,t){return _e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},_e(e,t)}function we(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,_e(e,t)}function Se(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}var Ee={disabled:!1};var ke=e.createContext(null),Ce=function(e){return e.scrollTop};const Oe=e,je=t;var Ae="unmounted",Le="exited",Re="entering",Me="entered",Pe="exiting",Ne=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=Le,r.appearStatus=Re):o=Me:o=t.unmountOnExit||t.mountOnEnter?Ae:Le,r.state={status:o},r.nextCallback=null,r}we(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===Ae?{status:Le}: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!==Re&&n!==Me&&(t=Re):n!==Re&&n!==Me||(t=Pe)}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===Re){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:je.findDOMNode(this);n&&Ce(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Le&&this.setState({status:Ae})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,o=this.props.nodeRef?[r]:[je.findDOMNode(this),r],i=o[0],a=o[1],s=this.getTimeouts(),l=r?s.appear:s.enter;!e&&!n||Ee.disabled?this.safeSetState({status:Me},function(){t.props.onEntered(i)}):(this.props.onEnter(i,a),this.safeSetState({status:Re},function(){t.props.onEntering(i,a),t.onTransitionEnd(l,function(){t.safeSetState({status:Me},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:je.findDOMNode(this);t&&!Ee.disabled?(this.props.onExit(r),this.safeSetState({status:Pe},function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,function(){e.safeSetState({status:Le},function(){e.props.onExited(r)})})})):this.safeSetState({status:Le},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:je.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===Ae)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=xe(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return Oe.createElement(ke.Provider,{value:null},"function"==typeof n?n(e,r):Oe.cloneElement(Oe.Children.only(n),r))},t}(Oe.Component);function Ie(){}Ne.contextType=ke,Ne.propTypes={},Ne.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Ie,onEntering:Ie,onEntered:Ie,onExit:Ie,onExiting:Ie,onExited:Ie},Ne.UNMOUNTED=Ae,Ne.EXITED=Le,Ne.ENTERING=Re,Ne.ENTERED=Me,Ne.EXITING=Pe;var Te=Ne;const Be=e;var $e=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})},We=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=Se(n.className,r):n.setAttribute("class",Se(n.className&&n.className.baseVal||"",r)));var n,r})},De=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}we(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&&Ce(e),r&&(this.appliedClasses[t][n]=r,$e(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&&We(e,r),o&&We(e,o),i&&We(e,i)},n.render=function(){var e=this.props;e.classNames;var t=xe(e,["classNames"]);return Be.createElement(Te,be({},t,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(Be.Component);De.defaultProps={classNames:""},De.propTypes={};var ze=De;const{Children:Fe}=e,{cloneElement:Ue}=e,{isValidElement:Ve}=e;function He(e,t){var n=Object.create(null);return e&&Fe.map(e,function(e){return e}).forEach(function(e){n[e.key]=function(e){return t&&Ve(e)?t(e):e}(e)}),n}function Ke(e,t,n){return null!=n[t]?n[t]:e.props[t]}function qe(e,t,n){var r=He(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(Ve(a)){var s=i in t,l=i in r,u=t[i],c=Ve(u)&&!u.props.in;!l||s&&!c?l||!s||c?l&&s&&Ve(u)&&(o[i]=Ue(a,{onExited:n.bind(null,a),in:u.props.in,exit:Ke(a,"exit",e),enter:Ke(a,"enter",e)})):o[i]=Ue(a,{in:!1}):o[i]=Ue(a,{onExited:n.bind(null,a),in:!0,exit:Ke(a,"exit",e),enter:Ke(a,"enter",e)})}}),o}const Je=e;var Ye=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},Ge=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}we(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,He(n.children,function(e){return Ue(e,{onExited:r.bind(null,e),in:!0,appear:Ke(e,"appear",n),enter:Ke(e,"enter",n),exit:Ke(e,"exit",n)})})):qe(e,o,i),firstRender:!1}},n.handleExited=function(e,t){var n=He(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState(function(t){var n=be({},t.children);return delete n[e.key],{children:n}}))},n.render=function(){var e=this.props,t=e.component,n=e.childFactory,r=xe(e,["component","childFactory"]),o=this.state.contextValue,i=Ye(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,null===t?Je.createElement(ke.Provider,{value:o},i):Je.createElement(ke.Provider,{value:o},Je.createElement(t,r,i))},t}(Je.Component);Ge.propTypes={},Ge.defaultProps={component:"div",childFactory:function(e){return e}};var Ze=Ge;const Qe=e,Xe=t;var et=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}we(t,e);var n=t.prototype;return n.handleLifecycle=function(e,t,n){var r,o=this.props.children,i=Qe.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:Xe.findDOMNode(this);this.props[e](a)}},n.render=function(){var e=this.props,t=e.children,n=e.in,r=xe(e,["children","in"]),o=Qe.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,Qe.createElement(Ze,r,n?Qe.cloneElement(i,{key:"first",onEnter:this.handleEnter,onEntering:this.handleEntering,onEntered:this.handleEntered}):Qe.cloneElement(a,{key:"second",onEnter:this.handleExit,onEntering:this.handleExiting,onEntered:this.handleExited}))},t}(Qe.Component);et.propTypes={};var tt=et;const nt=e;var rt,ot;var it="out-in",at="in-out",st=function(e,t,n){return function(){var r;e.props[t]&&(r=e.props)[t].apply(r,arguments),n()}},lt=((rt={})[it]=function(e){var t=e.current,n=e.changeState;return nt.cloneElement(t,{in:!1,onExited:st(t,"onExited",function(){n(Re,null)})})},rt[at]=function(e){var t=e.current,n=e.changeState,r=e.children;return[t,nt.cloneElement(r,{in:!0,onEntered:st(r,"onEntered",function(){n(Re)})})]},rt),ut=((ot={})[it]=function(e){var t=e.children,n=e.changeState;return nt.cloneElement(t,{in:!0,onEntered:st(t,"onEntered",function(){n(Me,nt.cloneElement(t,{in:!0}))})})},ot[at]=function(e){var t=e.current,n=e.children,r=e.changeState;return[nt.cloneElement(t,{in:!1,onExited:st(t,"onExited",function(){r(Me,nt.cloneElement(n,{in:!0}))})}),nt.cloneElement(n,{in:!0})]},ot),ct=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:Me,current:null},t.appeared=!1,t.changeState=function(e,n){void 0===n&&(n=t.state.current),t.setState({status:e,current:n})},t}we(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===Re&&e.mode===at?{status:Re}:!t.current||(n=t.current,r=e.children,n===r||nt.isValidElement(n)&&nt.isValidElement(r)&&null!=n.key&&n.key===r.key)?{current:nt.cloneElement(e.children,{in:!0})}:{status:Pe};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 Re:e=ut[r](s);break;case Pe:e=lt[r](s);break;case Me:e=a}return nt.createElement(ke.Provider,{value:{isMounting:!this.appeared}},e)},t}(nt.Component);ct.propTypes={},ct.defaultProps={mode:it};var dt=ct,pt=p(Object.freeze({__proto__:null,CSSTransition:ze,ReplaceTransition:tt,SwitchTransition:dt,TransitionGroup:Ze,Transition:Te,config:Ee}));const ft=e,ht=o,{Box:gt}=n,vt=r,mt=i;var yt=h.exports;Object.defineProperty(ye,"__esModule",{value:!0}),ye.default=void 0;var bt=yt(g.exports),xt=yt(ft),_t=pt,wt=ht,St=yt(gt),Et=yt(vt),kt=mt;const Ct=(0,wt.styled)(St.default)({width:"33px",height:"33px","& svg":{position:"absolute",display:"inline-block",width:"33px",height:"33px",verticalAlign:"middle","& hide":{display:"none"}}}),Ot=(0,wt.styled)("svg")({"& .incorrect-fill":{fill:`var(--feedback-incorrect-bg-color, ${kt.color.incorrect()})`},"& .correct-fill":{fill:`var(--feedback-correct-bg-color, ${kt.color.correct()})`}}),jt=(0,wt.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 At extends xt.default.Component{constructor(e){super(e),(0,bt.default)(this,"getIncorrectIcon",()=>xt.default.createElement(Ot,{key:"1",preserveAspectRatio:"xMinYMin meet",x:"0px",y:"0px",viewBox:"0 0 44 40",style:{enableBackground:"new 0 0 44 40"}},xt.default.createElement("g",null,xt.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"}),xt.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,bt.default)(this,"getCorrectIcon",()=>xt.default.createElement(Ot,{key:"2",preserveAspectRatio:"xMinYMin meet",version:"1.1",x:"0px",y:"0px",viewBox:"0 0 44 40",style:{enableBackground:"new 0 0 44 40"}},xt.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=xt.default.createRef()}render(){const{correctness:e}=this.props,t=(()=>"incorrect"===e?this.getIncorrectIcon():"correct"===e?this.getCorrectIcon():null)();return xt.default.createElement(Ct,null,xt.default.createElement(_t.TransitionGroup,null,e&&xt.default.createElement(_t.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}},xt.default.createElement(jt,{ref:this.nodeRef},t))))}}(0,bt.default)(At,"propTypes",{correctness:Et.default.string}),ye.default=At;const{FormControlLabel:Lt}=n,{Box:Rt}=n,{Checkbox:Mt}=n,{Radio:Pt}=n,Nt=e,It=r,Tt=o,Bt=i,$t=a;var Wt=h.exports;Object.defineProperty(me,"__esModule",{value:!0}),me.default=me.StyledRadio=me.StyledFormControlLabel=me.StyledCheckbox=me.ChoiceInput=void 0;var Dt=Wt(g.exports),zt=Wt(x.exports),Ft=Wt(Lt),Ut=Wt(Nt),Vt=Wt(It),Ht=Tt,Kt=Wt(Rt),qt=Wt(Mt),Jt=Bt,Yt=Wt(Pt),Gt=Wt($t),Zt=Wt(ye);const Qt="multiple-choice-component",Xt=(0,Ht.styled)(Kt.default)({display:"flex",alignItems:"center",backgroundColor:Jt.color.background()}),en=(0,Ht.styled)(Kt.default)({display:"flex",alignItems:"center",backgroundColor:Jt.color.background(),flex:1,"& .MuiFormControlLabel-root":{marginLeft:"-14px"},"& label":{color:Jt.color.text(),"& > span":{fontSize:"inherit"},"& > .MuiButtonBase-root":{padding:"12px"}}}),tn=(0,Ht.styled)("span")(({theme:e})=>({display:"flex",alignItems:"center","& > span":{marginLeft:`-${e.spacing(1)}`}})),nn=(0,Ht.styled)("span")({position:"absolute",left:"-10000px",top:"auto",width:"1px",height:"1px",overflow:"hidden"}),rn=me.StyledFormControlLabel=(0,Ht.styled)(Ft.default)({"& .MuiFormControlLabel-label":{color:`${Jt.color.text()} !important`,backgroundColor:Jt.color.background(),letterSpacing:"normal"},"&.Mui-disabled *":{cursor:"not-allowed !important"}}),on=(e,t)=>({[`&.${Qt}`]:{color:`var(--choice-input-${e}, ${t}) !important`}}),an=e=>{const t=t=>e?`${e}-${t}`:t;return{[t("root")]:{...on("color",Jt.color.text()),..."correct"===e?on("correct-color",Jt.color.text()):{},..."incorrect"===e?on("incorrect-color",Jt.color.incorrect()):{}},[t("checked")]:{..."correct"===e?on("correct-selected-color",Jt.color.correct()):{},..."incorrect"===e?on("incorrect-checked",Jt.color.incorrect()):{},...e?{}:on("selected-color",Jt.color.primary())},[t("disabled")]:{...on("disabled-color",Jt.color.text()),..."correct"===e?on("correct-disabled-color",Jt.color.disabled()):{},..."incorrect"===e?on("incorrect-disabled-color",Jt.color.disabled()):{},opacity:.6,cursor:"not-allowed !important",pointerEvents:"initial !important"},focusVisibleUnchecked:{outline:`2px solid ${Jt.color.keyBoardFocusIndicator()}`,backgroundColor:"transparent"},focusVisibleChecked:{outline:`2px solid ${Jt.color.keyBoardFocusIndicator()}`,backgroundColor:"transparent"}}},sn=(0,Ht.styled)(qt.default,{shouldForwardProp:e=>"correctness"!==e})(({correctness:e})=>{const t=an(e),n=t=>e?`${e}-${t}`:t;return{[`&.${Qt}`]:{...t[n("root")],"&.Mui-checked":t[n("checked")],"&.Mui-disabled":e?{}:t[n("disabled")],"&:hover:not(.Mui-disabled) svg":{boxShadow:`0px 0px 0px 2px ${Jt.color.keyBoardFocusIndicator()}`,borderRadius:"4px"}},"&.Mui-focusVisible":{"&:not(.Mui-checked)":t.focusVisibleUnchecked,"&.Mui-checked":t.focusVisibleChecked}}}),ln=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 Ut.default.createElement(sn,(0,zt.default)({id:a,slotProps:{input:{ref:l}},onKeyDown:s,disableRipple:!0},u,{correctness:t,className:Qt}))};me.StyledCheckbox=ln;const un=(0,Ht.styled)(Yt.default,{shouldForwardProp:e=>"correctness"!==e})(({correctness:e})=>{const t=an(e),n=t=>e?`${e}-${t}`:t;return{[`&.${Qt}`]:{...t[n("root")],"&.Mui-checked":t[n("checked")],"&.Mui-disabled":e?{}:t[n("disabled")],"&.Mui-focusVisible:not(.Mui-checked)":t.focusVisibleUnchecked,"&.Mui-focusVisible.Mui-checked":t.focusVisibleChecked,"&:hover:not(.Mui-disabled) svg":{boxShadow:`0px 0px 0px 2px ${Jt.color.keyBoardFocusIndicator()}`,borderRadius:"50%"}},"&.Mui-focusVisible":{"& input":{outline:0},"& .MuiTouchRipple-root":{display:"none"}}}}),cn=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 Ut.default.createElement(un,(0,zt.default)({id:a,slotProps:{input:{ref:l}},disableRipple:!0},u,{correctness:t,className:Qt,name:s}))};me.StyledRadio=cn;class dn extends Ut.default.Component{constructor(e){super(e),(0,Dt.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?ln:cn,v="checkbox"===e?"checkbox":"radio-button",m={..."horizontal"===c&&{[`& .${Qt}`]:{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?Ut.default.createElement(nn,{id:this.descId},y?`Pick the answer below, ${n}`:n):null,x=Ut.default.createElement(Ut.default.Fragment,null,n&&!h?Ut.default.createElement(Xt,{component:"span"},Ut.default.createElement("span",{"aria-hidden":"true"},n,"."," "),Ut.default.createElement(Jt.PreviewPrompt,{className:"prompt-label",prompt:o,tagName:"span"})):Ut.default.createElement(Jt.PreviewPrompt,{className:"prompt-label",prompt:o,tagName:"span"})),_={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?Ut.default.createElement(tn,null,b,Ut.default.createElement(g,(0,zt.default)({},_,{style:{padding:0}})),Ut.default.createElement("span",{"aria-hidden":"true"},n?`${n}.`:"")):Ut.default.createElement(Ut.default.Fragment,null,b,Ut.default.createElement(g,_));return Ut.default.createElement("div",{className:(0,Gt.default)(a,"corespring-"+v,"choice-input")},Ut.default.createElement(Xt,null,!l&&u&&Ut.default.createElement(Zt.default,{correctness:i}),Ut.default.createElement(en,{className:"checkbox-holder",sx:m},Ut.default.createElement(rn,{label:x,value:d,htmlFor:this.choiceId,labelPlacement:h?"top":void 0,control:w}))),s&&Ut.default.createElement(Jt.PreviewPrompt,{className:"rationale",defaultClassName:"rationale",prompt:s}),Ut.default.createElement(Jt.Feedback,{feedback:r,correctness:i}))}}me.ChoiceInput=dn,(0,Dt.default)(dn,"propTypes",{choiceMode:Vt.default.oneOf(["radio","checkbox"]),displayKey:Vt.default.string,checked:Vt.default.bool.isRequired,correctness:Vt.default.string,disabled:Vt.default.bool.isRequired,feedback:Vt.default.string,label:Vt.default.string.isRequired,rationale:Vt.default.string,onChange:Vt.default.func.isRequired,value:Vt.default.string.isRequired,className:Vt.default.string,tagName:Vt.default.string,hideTick:Vt.default.bool,isEvaluateMode:Vt.default.bool,choicesLayout:Vt.default.oneOf(["vertical","grid","horizontal"]),isSelectionButtonBelow:Vt.default.bool}),(0,Dt.default)(dn,"defaultProps",{rationale:null,checked:!1,isEvaluateMode:!1}),me.default=dn;const pn=e,fn=r,hn=o,{Box:gn}=n;var vn=h.exports;Object.defineProperty(ve,"__esModule",{value:!0}),ve.default=ve.Choice=void 0;var mn=vn(g.exports),yn=vn(pn),bn=vn(fn),xn=hn,_n=vn(gn),wn=vn(me);const Sn=(0,xn.styled)(_n.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 En extends yn.default.Component{constructor(...e){super(...e),(0,mn.default)(this,"state",{isHovered:!1}),(0,mn.default)(this,"handleMouseEnter",()=>{const{disabled:e,checked:t}=this.props;e||t||this.setState({isHovered:!0})}),(0,mn.default)(this,"handleMouseLeave",()=>{this.setState({isHovered:!1})}),(0,mn.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:x}=this.state,_="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",j="initial";(E||k)&&(s&&E?(C=h,O=g):x&&!a&&k&&(C=m,O=y)),s&&f&&"initial"!==f?j=f:x&&!a&&v&&"initial"!==v&&(j=v);const A=E||k,L=A?{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||A,M="horizontal"===c,P="initial"!==j?j:"initial";return yn.default.createElement("div",{className:_,key:t,style:{backgroundColor:P,...L},onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave},yn.default.createElement(Sn,{component:"div",noBorder:R,horizontalLayout:M},yn.default.createElement(wn.default,S)))}}ve.Choice=En,(0,mn.default)(En,"propTypes",{}),En.propTypes={choiceMode:bn.default.oneOf(["radio","checkbox"]),choice:bn.default.object,disabled:bn.default.bool.isRequired,onChoiceChanged:bn.default.func,index:bn.default.number,choicesLength:bn.default.number,showCorrect:bn.default.bool,isEvaluateMode:bn.default.bool,checked:bn.default.bool,correctness:bn.default.string,displayKey:bn.default.string,choicesLayout:bn.default.oneOf(["vertical","grid","horizontal"]),gridColumns:bn.default.string,selectedAnswerBackgroundColor:bn.default.string,selectedAnswerStrokeColor:bn.default.string,selectedAnswerStrokeWidth:bn.default.string,hoverAnswerBackgroundColor:bn.default.string,hoverAnswerStrokeColor:bn.default.string,hoverAnswerStrokeWidth:bn.default.string,tagName:bn.default.string,isSelectionButtonBelow:bn.default.bool},ve.default=En;var kn={};Object.defineProperty(kn,"__esModule",{value:!0}),kn.reachedMaxSelections=kn.exceedsMaxSelections=void 0;kn.reachedMaxSelections=(e,t)=>null!=t&&e>=t;kn.exceedsMaxSelections=(e,t)=>null!=t&&e>t;const Cn=e,On=r,jn=s,An=a,Ln=o,{Box:Rn}=n,Mn=i;var Pn=h.exports;Object.defineProperty(_,"__esModule",{value:!0}),_.default=_.MultipleChoice=void 0;var Nn=Pn(g.exports),In=Pn(Cn),Tn=Pn(On),Bn=Pn(jn),$n=Pn(An),Wn=Ln,Dn=Pn(Rn),zn=Mn,Fn=Pn(ge),Un=Pn(ve),Vn=kn;const{translator:Hn}=Fn.default,Kn=(0,Wn.styled)(Dn.default)({color:zn.color.text(),backgroundColor:zn.color.background(),"& *":{"-webkit-font-smoothing":"antialiased"},position:"relative","& legend":{border:"none !important"}}),qn=(0,Wn.styled)("h2")(({theme:e})=>({display:"block",fontSize:"inherit",margin:"0",fontWeight:"normal",paddingBottom:e.spacing(2)})),Jn=(0,Wn.styled)(Dn.default)(({theme:e})=>({marginBottom:e.spacing(2)})),Yn=(0,Wn.styled)(Dn.default)({display:"flex",flexDirection:"row",flexWrap:"wrap"}),Gn=(0,Wn.styled)(Dn.default)({display:"grid"}),Zn=(0,Wn.styled)("fieldset")({border:"0px",padding:"0.01em 0 0 0",margin:"0px",minWidth:"0px"}),Qn=(0,Wn.styled)("h3")({position:"absolute",left:"-10000px",top:"auto",width:"1px",height:"1px",overflow:"hidden"}),Xn=(0,Wn.styled)("div")(({theme:e})=>({fontSize:e.typography.fontSize-2,color:e.palette.error.main,paddingTop:e.spacing(1)}));class er extends In.default.Component{constructor(e){super(e),(0,Nn.default)(this,"handleChange",e=>{const{value:t,checked:n}=e.target,{choiceMode:r,maxSelections:o,onChoiceChanged:i,session:a}=this.props;"radio"!==r&&a.value&&(0,Vn.reachedMaxSelections)(a.value.length,o)&&(this.setState({maxSelectionsErrorState:n}),n)||i({value:t,selected:n,selector:"Mouse"})}),(0,Nn.default)(this,"onToggle",()=>{"evaluate"===this.props.mode&&this.setState({showCorrect:!this.state.showCorrect},()=>{this.props.onShowCorrectToggle&&this.props.onShowCorrectToggle()})}),(0,Nn.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=Qn.withComponent(`h${i}`),s="radio"===t?"Multiple Choice Question":"Multiple Select Question";return In.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:x}=this.props,{showCorrect:_,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(!x)return;let e=1;return a&&(e+=1),Math.min(6,x+e)})(),j=In.default.createElement(zn.PreviewPrompt,{tagName:"div",className:"prompt",defaultClassName:"teacher-instructions",prompt:u}),A="grid"===this.props.choicesLayout?Gn:"horizontal"===this.props.choicesLayout?Yn:Dn.default;return In.default.createElement(Kn,{id:"main-container",className:(0,$n.default)(n,"multiple-choice")},a&&In.default.createElement(qn,{as:x?`h${Math.min(6,x+1)}`:"h2"},a),this.renderHeading(),u&&In.default.createElement(Jn,null,d?j:In.default.createElement(zn.Collapsible,{labels:{hidden:"Show Teacher Instructions",visible:"Hide Teacher Instructions"}},j)),In.default.createElement(Zn,{role:"radio"===o?"radiogroup":"group"},In.default.createElement(zn.PreviewPrompt,{className:"prompt",defaultClassName:"prompt",prompt:(L=s,L&&O?(0,zn.transformDataHeadings)(L,O):L),tagName:"legend",autoplayAudioEnabled:v,customAudioButton:y}),!(b&&c)&&In.default.createElement(Bn.default,{show:E,toggled:_,onToggle:this.onToggle.bind(this),language:p}),In.default.createElement(A,{style:k},r.map((e,n)=>In.default.createElement(Un.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:_,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&&In.default.createElement(Xn,null,h&&g?h===g?Hn.t("translation:multipleChoice:minmaxSelections_equal",{lng:p,minSelections:h}):Hn.t("translation:multipleChoice:minmaxSelections_range",{lng:p,minSelections:h,maxSelections:g}):h?Hn.t("translation:multipleChoice:minSelections",{lng:p,minSelections:h}):""),"checkbox"===o&&w&&In.default.createElement(Xn,null,Hn.t("translation:multipleChoice:maxSelections_"+(1===g?"one":"other"),{lng:p,maxSelections:g})));var L}}_.MultipleChoice=er,(0,Nn.default)(er,"propTypes",{className:Tn.default.string,mode:Tn.default.oneOf(["gather","view","evaluate"]),choiceMode:Tn.default.oneOf(["radio","checkbox"]),keyMode:Tn.default.oneOf(["numbers","letters","none"]),choices:Tn.default.array,partLabel:Tn.default.string,prompt:Tn.default.string,teacherInstructions:Tn.default.string,session:Tn.default.object,disabled:Tn.default.bool,onChoiceChanged:Tn.default.func,responseCorrect:Tn.default.bool,correctResponse:Tn.default.array,choicesLayout:Tn.default.oneOf(["vertical","grid","horizontal"]),gridColumns:Tn.default.string,alwaysShowCorrect:Tn.default.bool,animationsDisabled:Tn.default.bool,language:Tn.default.string,selectedAnswerBackgroundColor:Tn.default.string,selectedAnswerStrokeColor:Tn.default.string,selectedAnswerStrokeWidth:Tn.default.string,hoverAnswerBackgroundColor:Tn.default.string,hoverAnswerStrokeColor:Tn.default.string,hoverAnswerStrokeWidth:Tn.default.string,onShowCorrectToggle:Tn.default.func,isSelectionButtonBelow:Tn.default.bool,minSelections:Tn.default.number,maxSelections:Tn.default.number,autoplayAudioEnabled:Tn.default.bool,customAudioButton:{playImage:Tn.default.string,pauseImage:Tn.default.string},options:Tn.default.object,baseHeadingLevel:Tn.default.number,includeSrHeading:Tn.default.bool}),er.defaultProps={session:{value:[]}},_.default=er;const tr=e,nr=r,rr=i;var or=h.exports;Object.defineProperty(b,"__esModule",{value:!0}),b.default=void 0;var ir=or(x.exports),ar=or(g.exports),sr=or(tr),lr=or(nr),ur=rr,cr=or(_);class dr extends sr.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 sr.default.createElement(ur.PreviewLayout,{extraCSSRules:s,fontSizeFactor:l,classes:{}},sr.default.createElement(cr.default,(0,ir.default)({},e,{options:o,session:n,onChoiceChanged:t,onShowCorrectToggle:r,baseHeadingLevel:i,includeSrHeading:a})))}}(0,ar.default)(dr,"propTypes",{model:lr.default.object,session:lr.default.object,options:lr.default.object,onChoiceChanged:lr.default.func,onShowCorrectToggle:lr.default.func,extraCSSRules:lr.default.shape({names:lr.default.arrayOf(lr.default.string),rules:lr.default.string}),baseHeadingLevel:lr.default.number,includeSrHeading:lr.default.bool}),(0,ar.default)(dr,"defaultProps",{model:{},session:{}}),b.default=dr;var pr="object"==typeof global&&global&&global.Object===Object&&global,fr="object"==typeof self&&self&&self.Object===Object&&self,hr=pr||fr||Function("return this")(),gr=hr.Symbol,vr=Object.prototype,mr=vr.hasOwnProperty,yr=vr.toString,br=gr?gr.toStringTag:void 0;var xr=Object.prototype.toString;var _r=gr?gr.toStringTag:void 0;function wr(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":_r&&_r in Object(e)?function(e){var t=mr.call(e,br),n=e[br];try{e[br]=void 0;var r=!0}catch(e){}var o=yr.call(e);return r&&(t?e[br]=n:delete e[br]),o}(e):function(e){return xr.call(e)}(e)}function Sr(e){return null!=e&&"object"==typeof e}function Er(e){return"symbol"==typeof e||Sr(e)&&"[object Symbol]"==wr(e)}function kr(e){return"number"==typeof e?e:Er(e)?NaN:+e}function Cr(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 Or=Array.isArray,jr=gr?gr.prototype:void 0,Ar=jr?jr.toString:void 0;function Lr(e){if("string"==typeof e)return e;if(Or(e))return Cr(e,Lr)+"";if(Er(e))return Ar?Ar.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Rr(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=Lr(n),r=Lr(r)):(n=kr(n),r=kr(r)),o=e(n,r)}return o}}var Mr=Rr(function(e,t){return e+t},0),Pr=/\s/;function Nr(e){for(var t=e.length;t--&&Pr.test(e.charAt(t)););return t}var Ir=/^\s+/;function Tr(e){return e?e.slice(0,Nr(e)+1).replace(Ir,""):e}function Br(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}var $r=/^[-+]0x[0-9a-f]+$/i,Wr=/^0b[01]+$/i,Dr=/^0o[0-7]+$/i,zr=parseInt;function Fr(e){if("number"==typeof e)return e;if(Er(e))return NaN;if(Br(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Br(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Tr(e);var n=Wr.test(e);return n||Dr.test(e)?zr(e.slice(2),n?2:8):$r.test(e)?NaN:+e}var Ur=1/0;function Vr(e){return e?(e=Fr(e))===Ur||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function Hr(e){var t=Vr(e),n=t%1;return t==t?n?t-n:t:0}function Kr(e,t){if("function"!=typeof t)throw new TypeError("Expected a function");return e=Hr(e),function(){if(--e<1)return t.apply(this,arguments)}}function qr(e){return e}function Jr(e){if(!Br(e))return!1;var t=wr(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}var Yr,Gr=hr["__core-js_shared__"],Zr=(Yr=/[^.]+$/.exec(Gr&&Gr.keys&&Gr.keys.IE_PROTO||""))?"Symbol(src)_1."+Yr:"";var Qr=Function.prototype.toString;function Xr(e){if(null!=e){try{return Qr.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var eo=/^\[object .+?Constructor\]$/,to=Function.prototype,no=Object.prototype,ro=to.toString,oo=no.hasOwnProperty,io=RegExp("^"+ro.call(oo).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function ao(e){return!(!Br(e)||function(e){return!!Zr&&Zr in e}(e))&&(Jr(e)?io:eo).test(Xr(e))}function so(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return ao(n)?n:void 0}var lo=so(hr,"WeakMap"),uo=lo&&new lo,co=uo?function(e,t){return uo.set(e,t),e}:qr,po=co,fo=Object.create,ho=function(){function e(){}return function(t){if(!Br(t))return{};if(fo)return fo(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}(),go=ho;function vo(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=go(e.prototype),r=e.apply(n,t);return Br(r)?r:n}}function mo(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 yo=Math.max;function bo(e,t,n,r){for(var o=-1,i=e.length,a=n.length,s=-1,l=t.length,u=yo(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 xo=Math.max;function _o(e,t,n,r){for(var o=-1,i=e.length,a=-1,s=n.length,l=-1,u=t.length,c=xo(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 wo(){}function So(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function Eo(){}So.prototype=go(wo.prototype),So.prototype.constructor=So;var ko=uo?function(e){return uo.get(e)}:Eo,Co=ko,Oo={},jo=Object.prototype.hasOwnProperty;function Ao(e){for(var t=e.name+"",n=Oo[t],r=jo.call(Oo,t)?n.length:0;r--;){var o=n[r],i=o.func;if(null==i||i==e)return o.name}return t}function Lo(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}function Ro(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}function Mo(e){if(e instanceof So)return e.clone();var t=new Lo(e.__wrapped__,e.__chain__);return t.__actions__=Ro(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}Lo.prototype=go(wo.prototype),Lo.prototype.constructor=Lo;var Po=Object.prototype.hasOwnProperty;function No(e){if(Sr(e)&&!Or(e)&&!(e instanceof So)){if(e instanceof Lo)return e;if(Po.call(e,"__wrapped__"))return Mo(e)}return new Lo(e)}function Io(e){var t=Ao(e),n=No[t];if("function"!=typeof n||!(t in So.prototype))return!1;if(e===n)return!0;var r=Co(n);return!!r&&e===r[0]}No.prototype=wo.prototype,No.prototype.constructor=No;var To=Date.now;function Bo(e){var t=0,n=0;return function(){var r=To(),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 $o=Bo(po),Wo=/\{\n\/\* \[wrapped with (.+)\] \*/,Do=/,? & /;var zo=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;function Fo(e){return function(){return e}}var Uo=function(){try{var e=so(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),Vo=Uo,Ho=Vo?function(e,t){return Vo(e,"toString",{configurable:!0,enumerable:!1,value:Fo(t),writable:!0})}:qr,Ko=Bo(Ho);function qo(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function Jo(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 Yo(e){return e!=e}function Go(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):Jo(e,Yo,n)}function Zo(e,t){return!!(null==e?0:e.length)&&Go(e,t,0)>-1}var Qo=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]];function Xo(e,t,n){var r=t+"";return Ko(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(zo,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return qo(Qo,function(n){var r="_."+n[0];t&n[1]&&!Zo(e,r)&&e.push(r)}),e.sort()}(function(e){var t=e.match(Wo);return t?t[1].split(Do):[]}(r),n)))}function ei(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 Io(e)&&$o(p,d),p.placeholder=r,Xo(p,e,t)}function ti(e){return e.placeholder}var ni=/^(?:0|[1-9]\d*)$/;function ri(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&ni.test(e))&&e>-1&&e%1==0&&e<t}var oi=Math.min;var ii="__lodash_placeholder__";function ai(e,t){for(var n=-1,r=e.length,o=0,i=[];++n<r;){var a=e[n];a!==t&&a!==ii||(e[n]=ii,i[o++]=n)}return i}function si(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:vo(e);return function v(){for(var m=arguments.length,y=Array(m),b=m;b--;)y[b]=arguments[b];if(f)var x=ti(v),_=function(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}(y,x);if(r&&(y=bo(y,r,o,f)),i&&(y=_o(y,i,a,f)),m-=_,f&&m<u){var w=ai(y,x);return ei(e,t,si,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=oi(t.length,n),o=Ro(e);r--;){var i=t[r];e[r]=ri(i,n)?o[i]:void 0}return e}(y,s):h&&m>1&&y.reverse(),c&&l<m&&(y.length=l),this&&this!==hr&&this instanceof v&&(E=g||vo(E)),E.apply(S,y)}}var li="__lodash_placeholder__",ui=128,ci=Math.min;var di=Math.max;function pi(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:di(Hr(a),0),s=void 0===s?s:Hr(s),u-=o?o.length:0,64&t){var c=r,d=o;r=o=void 0}var p=l?void 0:Co(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==ui&&8==n||r==ui&&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?bo(l,s,t[4]):s,e[4]=l?ai(e[3],li):t[4]}(s=t[5])&&(l=e[5],e[5]=l?_o(l,s,t[6]):s,e[6]=l?ai(e[5],li):t[6]),(s=t[7])&&(e[7]=s),r&ui&&(e[8]=null==e[8]?t[8]:ci(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:di(f[9]-u,0))&&24&t&&(t&=-25),t&&1!=t)h=8==t||16==t?function(e,t,n){var r=vo(e);return function o(){for(var i=arguments.length,a=Array(i),s=i,l=ti(o);s--;)a[s]=arguments[s];var u=i<3&&a[0]!==l&&a[i-1]!==l?[]:ai(a,l);return(i-=u.length)<n?ei(e,t,si,o.placeholder,void 0,a,u,void 0,void 0,n-i):mo(this&&this!==hr&&this instanceof o?r:e,this,a)}}(e,t,s):32!=t&&33!=t||o.length?si.apply(void 0,f):function(e,t,n,r){var o=1&t,i=vo(e);return function t(){for(var a=-1,s=arguments.length,l=-1,u=r.length,c=Array(u+s),d=this&&this!==hr&&this instanceof t?i:e;++l<u;)c[l]=r[l];for(;s--;)c[l++]=arguments[++a];return mo(d,o?n:this,c)}}(e,t,n,r);else var h=function(e,t,n){var r=1&t,o=vo(e);return function t(){return(this&&this!==hr&&this instanceof t?o:e).apply(r?n:this,arguments)}}(e,t,n);return Xo((p?po:$o)(h,f),e,t)}function fi(e,t,n){return t=n?void 0:t,pi(e,128,void 0,void 0,void 0,void 0,t=e&&null==t?e.length:t)}function hi(e,t,n){"__proto__"==t&&Vo?Vo(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function gi(e,t){return e===t||e!=e&&t!=t}var vi=Object.prototype.hasOwnProperty;function mi(e,t,n){var r=e[t];vi.call(e,t)&&gi(r,n)&&(void 0!==n||t in e)||hi(e,t,n)}function yi(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?hi(n,s,l):mi(n,s,l)}return n}var bi=Math.max;function xi(e,t,n){return t=bi(void 0===t?e.length-1:t,0),function(){for(var r=arguments,o=-1,i=bi(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),mo(e,this,s)}}function _i(e,t){return Ko(xi(e,t,qr),e+"")}function wi(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}function Si(e){return null!=e&&wi(e.length)&&!Jr(e)}function Ei(e,t,n){if(!Br(n))return!1;var r=typeof t;return!!("number"==r?Si(n)&&ri(t,n.length):"string"==r&&t in n)&&gi(n[t],e)}function ki(e){return _i(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&&Ei(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 Ci=Object.prototype;function Oi(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Ci)}function ji(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Ai(e){return Sr(e)&&"[object Arguments]"==wr(e)}var Li=Object.prototype,Ri=Li.hasOwnProperty,Mi=Li.propertyIsEnumerable,Pi=Ai(function(){return arguments}())?Ai:function(e){return Sr(e)&&Ri.call(e,"callee")&&!Mi.call(e,"callee")};function Ni(){return!1}var Ii="object"==typeof exports&&exports&&!exports.nodeType&&exports,Ti=Ii&&"object"==typeof module&&module&&!module.nodeType&&module,Bi=Ti&&Ti.exports===Ii?hr.Buffer:void 0,$i=(Bi?Bi.isBuffer:void 0)||Ni,Wi={};function Di(e){return function(t){return e(t)}}Wi["[object Float32Array]"]=Wi["[object Float64Array]"]=Wi["[object Int8Array]"]=Wi["[object Int16Array]"]=Wi["[object Int32Array]"]=Wi["[object Uint8Array]"]=Wi["[object Uint8ClampedArray]"]=Wi["[object Uint16Array]"]=Wi["[object Uint32Array]"]=!0,Wi["[object Arguments]"]=Wi["[object Array]"]=Wi["[object ArrayBuffer]"]=Wi["[object Boolean]"]=Wi["[object DataView]"]=Wi["[object Date]"]=Wi["[object Error]"]=Wi["[object Function]"]=Wi["[object Map]"]=Wi["[object Number]"]=Wi["[object Object]"]=Wi["[object RegExp]"]=Wi["[object Set]"]=Wi["[object String]"]=Wi["[object WeakMap]"]=!1;var zi="object"==typeof exports&&exports&&!exports.nodeType&&exports,Fi=zi&&"object"==typeof module&&module&&!module.nodeType&&module,Ui=Fi&&Fi.exports===zi&&pr.process,Vi=function(){try{var e=Fi&&Fi.require&&Fi.require("util").types;return e||Ui&&Ui.binding&&Ui.binding("util")}catch(e){}}(),Hi=Vi&&Vi.isTypedArray,Ki=Hi?Di(Hi):function(e){return Sr(e)&&wi(e.length)&&!!Wi[wr(e)]},qi=Object.prototype.hasOwnProperty;function Ji(e,t){var n=Or(e),r=!n&&Pi(e),o=!n&&!r&&$i(e),i=!n&&!r&&!o&&Ki(e),a=n||r||o||i,s=a?ji(e.length,String):[],l=s.length;for(var u in e)!t&&!qi.call(e,u)||a&&("length"==u||o&&("offset"==u||"parent"==u)||i&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||ri(u,l))||s.push(u);return s}function Yi(e,t){return function(n){return e(t(n))}}var Gi=Yi(Object.keys,Object),Zi=Object.prototype.hasOwnProperty;function Qi(e){if(!Oi(e))return Gi(e);var t=[];for(var n in Object(e))Zi.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Xi(e){return Si(e)?Ji(e):Qi(e)}var ea=Object.prototype.hasOwnProperty,ta=ki(function(e,t){if(Oi(t)||Si(t))yi(t,Xi(t),e);else for(var n in t)ea.call(t,n)&&mi(e,n,t[n])}),na=ta;var ra=Object.prototype.hasOwnProperty;function oa(e){if(!Br(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=Oi(e),n=[];for(var r in e)("constructor"!=r||!t&&ra.call(e,r))&&n.push(r);return n}function ia(e){return Si(e)?Ji(e,!0):oa(e)}var aa=ki(function(e,t){yi(t,ia(t),e)}),sa=aa,la=ki(function(e,t,n,r){yi(t,ia(t),e,r)}),ua=la,ca=ki(function(e,t,n,r){yi(t,Xi(t),e,r)}),da=ca,pa=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,fa=/^\w*$/;function ha(e,t){if(Or(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!Er(e))||(fa.test(e)||!pa.test(e)||null!=t&&e in Object(t))}var ga=so(Object,"create");var va=Object.prototype.hasOwnProperty;var ma=Object.prototype.hasOwnProperty;function ya(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 ba(e,t){for(var n=e.length;n--;)if(gi(e[n][0],t))return n;return-1}ya.prototype.clear=function(){this.__data__=ga?ga(null):{},this.size=0},ya.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},ya.prototype.get=function(e){var t=this.__data__;if(ga){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return va.call(t,e)?t[e]:void 0},ya.prototype.has=function(e){var t=this.__data__;return ga?void 0!==t[e]:ma.call(t,e)},ya.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=ga&&void 0===t?"__lodash_hash_undefined__":t,this};var xa=Array.prototype.splice;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])}}_a.prototype.clear=function(){this.__data__=[],this.size=0},_a.prototype.delete=function(e){var t=this.__data__,n=ba(t,e);return!(n<0)&&(n==t.length-1?t.pop():xa.call(t,n,1),--this.size,!0)},_a.prototype.get=function(e){var t=this.__data__,n=ba(t,e);return n<0?void 0:t[n][1]},_a.prototype.has=function(e){return ba(this.__data__,e)>-1},_a.prototype.set=function(e,t){var n=this.__data__,r=ba(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};var wa=so(hr,"Map");function Sa(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 Ea(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Ea.prototype.clear=function(){this.size=0,this.__data__={hash:new ya,map:new(wa||_a),string:new ya}},Ea.prototype.delete=function(e){var t=Sa(this,e).delete(e);return this.size-=t?1:0,t},Ea.prototype.get=function(e){return Sa(this,e).get(e)},Ea.prototype.has=function(e){return Sa(this,e).has(e)},Ea.prototype.set=function(e,t){var n=Sa(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};function ka(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(ka.Cache||Ea),n}ka.Cache=Ea;var Ca=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Oa=/\\(\\)?/g,ja=function(e){var t=ka(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(Ca,function(e,n,r,o){t.push(r?o.replace(Oa,"$1"):n||e)}),t}),Aa=ja;function La(e){return null==e?"":Lr(e)}function Ra(e,t){return Or(e)?e:ha(e,t)?[e]:Aa(La(e))}function Ma(e){if("string"==typeof e||Er(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Pa(e,t){for(var n=0,r=(t=Ra(t,e)).length;null!=e&&n<r;)e=e[Ma(t[n++])];return n&&n==r?e:void 0}function Na(e,t,n){var r=null==e?void 0:Pa(e,t);return void 0===r?n:r}function Ia(e,t){for(var n=-1,r=t.length,o=Array(r),i=null==e;++n<r;)o[n]=i?void 0:Na(e,t[n]);return o}function Ta(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}var Ba=gr?gr.isConcatSpreadable:void 0;function $a(e){return Or(e)||Pi(e)||!!(Ba&&e&&e[Ba])}function Wa(e,t,n,r,o){var i=-1,a=e.length;for(n||(n=$a),o||(o=[]);++i<a;){var s=e[i];t>0&&n(s)?t>1?Wa(s,t-1,n,r,o):Ta(o,s):r||(o[o.length]=s)}return o}function Da(e){return(null==e?0:e.length)?Wa(e,1):[]}function za(e){return Ko(xi(e,void 0,Da),e+"")}var Fa=za(Ia),Ua=Yi(Object.getPrototypeOf,Object),Va=Function.prototype,Ha=Object.prototype,Ka=Va.toString,qa=Ha.hasOwnProperty,Ja=Ka.call(Object);function Ya(e){if(!Sr(e)||"[object Object]"!=wr(e))return!1;var t=Ua(e);if(null===t)return!0;var n=qa.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Ka.call(n)==Ja}function Ga(e){if(!Sr(e))return!1;var t=wr(e);return"[object Error]"==t||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!Ya(e)}var Za=_i(function(e,t){try{return mo(e,void 0,t)}catch(e){return Ga(e)?e:new Error(e)}}),Qa=Za;function Xa(e,t){var n;if("function"!=typeof t)throw new TypeError("Expected a function");return e=Hr(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=void 0),n}}var es=_i(function(e,t,n){var r=1;if(n.length){var o=ai(n,ti(es));r|=32}return pi(e,r,t,n,o)});es.placeholder={};var ts=es,ns=za(function(e,t){return qo(t,function(t){t=Ma(t),hi(e,t,ts(e[t],e))}),e}),rs=ns,os=_i(function(e,t,n){var r=3;if(n.length){var o=ai(n,ti(os));r|=32}return pi(t,r,e,n,o)});os.placeholder={};var is=os;function as(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 ss(e,t,n){var r=e.length;return n=void 0===n?r:n,!t&&n>=r?e:as(e,t,n)}var ls=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");function us(e){return ls.test(e)}var cs="\\ud800-\\udfff",ds="["+cs+"]",ps="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",fs="\\ud83c[\\udffb-\\udfff]",hs="[^"+cs+"]",gs="(?:\\ud83c[\\udde6-\\uddff]){2}",vs="[\\ud800-\\udbff][\\udc00-\\udfff]",ms="(?:"+ps+"|"+fs+")"+"?",ys="[\\ufe0e\\ufe0f]?",bs=ys+ms+("(?:\\u200d(?:"+[hs,gs,vs].join("|")+")"+ys+ms+")*"),xs="(?:"+[hs+ps+"?",ps,gs,vs,ds].join("|")+")",_s=RegExp(fs+"(?="+fs+")|"+xs+bs,"g");function ws(e){return us(e)?function(e){return e.match(_s)||[]}(e):function(e){return e.split("")}(e)}function Ss(e){return function(t){var n=us(t=La(t))?ws(t):void 0,r=n?n[0]:t.charAt(0),o=n?ss(n,1).join(""):t.slice(1);return r[e]()+o}}var Es=Ss("toUpperCase");function ks(e){return Es(La(e).toLowerCase())}function Cs(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 Os(e){return function(t){return null==e?void 0:e[t]}}var js=Os({"À":"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"}),As=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ls=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");function Rs(e){return(e=La(e))&&e.replace(As,js).replace(Ls,"")}var Ms=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;var Ps=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;var Ns="\\ud800-\\udfff",Is="\\u2700-\\u27bf",Ts="a-z\\xdf-\\xf6\\xf8-\\xff",Bs="A-Z\\xc0-\\xd6\\xd8-\\xde",$s="\\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",Ws="["+$s+"]",Ds="\\d+",zs="["+Is+"]",Fs="["+Ts+"]",Us="[^"+Ns+$s+Ds+Is+Ts+Bs+"]",Vs="(?:\\ud83c[\\udde6-\\uddff]){2}",Hs="[\\ud800-\\udbff][\\udc00-\\udfff]",Ks="["+Bs+"]",qs="(?:"+Fs+"|"+Us+")",Js="(?:"+Ks+"|"+Us+")",Ys="(?:['’](?:d|ll|m|re|s|t|ve))?",Gs="(?:['’](?:D|LL|M|RE|S|T|VE))?",Zs="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",Qs="[\\ufe0e\\ufe0f]?",Xs=Qs+Zs+("(?:\\u200d(?:"+["[^"+Ns+"]",Vs,Hs].join("|")+")"+Qs+Zs+")*"),el="(?:"+[zs,Vs,Hs].join("|")+")"+Xs,tl=RegExp([Ks+"?"+Fs+"+"+Ys+"(?="+[Ws,Ks,"$"].join("|")+")",Js+"+"+Gs+"(?="+[Ws,Ks+qs,"$"].join("|")+")",Ks+"?"+qs+"+"+Ys,Ks+"+"+Gs,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ds,el].join("|"),"g");function nl(e,t,n){return e=La(e),void 0===(t=n?void 0:t)?function(e){return Ps.test(e)}(e)?function(e){return e.match(tl)||[]}(e):function(e){return e.match(Ms)||[]}(e):e.match(t)||[]}var rl=RegExp("['’]","g");function ol(e){return function(t){return Cs(nl(Rs(t).replace(rl,"")),e,"")}}var il=ol(function(e,t,n){return t=t.toLowerCase(),e+(n?ks(t):t)}),al=il;function sl(){if(!arguments.length)return[];var e=arguments[0];return Or(e)?e:[e]}var ll=hr.isFinite,ul=Math.min;function cl(e){var t=Math[e];return function(e,n){if(e=Fr(e),(n=null==n?0:ul(Hr(n),292))&&ll(e)){var r=(La(e)+"e").split("e");return+((r=(La(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var dl=cl("ceil");function pl(e){var t=No(e);return t.__chain__=!0,t}var fl=Math.ceil,hl=Math.max;function gl(e,t,n){t=(n?Ei(e,t,n):void 0===t)?1:hl(Hr(t),0);var r=null==e?0:e.length;if(!r||t<1)return[];for(var o=0,i=0,a=Array(fl(r/t));o<r;)a[i++]=as(e,o,o+=t);return a}function vl(e,t,n){return e==e&&(void 0!==n&&(e=e<=n?e:n),void 0!==t&&(e=e>=t?e:t)),e}function ml(e,t,n){return void 0===n&&(n=t,t=void 0),void 0!==n&&(n=(n=Fr(n))==n?n:0),void 0!==t&&(t=(t=Fr(t))==t?t:0),vl(Fr(e),t,n)}function yl(e){var t=this.__data__=new _a(e);this.size=t.size}function bl(e,t){return e&&yi(t,Xi(t),e)}yl.prototype.clear=function(){this.__data__=new _a,this.size=0},yl.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},yl.prototype.get=function(e){return this.__data__.get(e)},yl.prototype.has=function(e){return this.__data__.has(e)},yl.prototype.set=function(e,t){var n=this.__data__;if(n instanceof _a){var r=n.__data__;if(!wa||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Ea(r)}return n.set(e,t),this.size=n.size,this};var xl="object"==typeof exports&&exports&&!exports.nodeType&&exports,_l=xl&&"object"==typeof module&&module&&!module.nodeType&&module,wl=_l&&_l.exports===xl?hr.Buffer:void 0,Sl=wl?wl.allocUnsafe:void 0;function El(e,t){if(t)return e.slice();var n=e.length,r=Sl?Sl(n):new e.constructor(n);return e.copy(r),r}function kl(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 Cl(){return[]}var Ol=Object.prototype.propertyIsEnumerable,jl=Object.getOwnPropertySymbols,Al=jl?function(e){return null==e?[]:(e=Object(e),kl(jl(e),function(t){return Ol.call(e,t)}))}:Cl,Ll=Al;var Rl=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)Ta(t,Ll(e)),e=Ua(e);return t}:Cl,Ml=Rl;function Pl(e,t,n){var r=t(e);return Or(e)?r:Ta(r,n(e))}function Nl(e){return Pl(e,Xi,Ll)}function Il(e){return Pl(e,ia,Ml)}var Tl=so(hr,"DataView"),Bl=so(hr,"Promise"),$l=so(hr,"Set"),Wl="[object Map]",Dl="[object Promise]",zl="[object Set]",Fl="[object WeakMap]",Ul="[object DataView]",Vl=Xr(Tl),Hl=Xr(wa),Kl=Xr(Bl),ql=Xr($l),Jl=Xr(lo),Yl=wr;(Tl&&Yl(new Tl(new ArrayBuffer(1)))!=Ul||wa&&Yl(new wa)!=Wl||Bl&&Yl(Bl.resolve())!=Dl||$l&&Yl(new $l)!=zl||lo&&Yl(new lo)!=Fl)&&(Yl=function(e){var t=wr(e),n="[object Object]"==t?e.constructor:void 0,r=n?Xr(n):"";if(r)switch(r){case Vl:return Ul;case Hl:return Wl;case Kl:return Dl;case ql:return zl;case Jl:return Fl}return t});var Gl=Yl,Zl=Object.prototype.hasOwnProperty;var Ql=hr.Uint8Array;function Xl(e){var t=new e.constructor(e.byteLength);return new Ql(t).set(new Ql(e)),t}var eu=/\w*$/;var tu=gr?gr.prototype:void 0,nu=tu?tu.valueOf:void 0;function ru(e,t){var n=t?Xl(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function ou(e,t,n){var r,o=e.constructor;switch(t){case"[object ArrayBuffer]":return Xl(e);case"[object Boolean]":case"[object Date]":return new o(+e);case"[object DataView]":return function(e,t){var n=t?Xl(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 ru(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,eu.exec(e));return t.lastIndex=e.lastIndex,t}(e);case"[object Symbol]":return r=e,nu?Object(nu.call(r)):{}}}function iu(e){return"function"!=typeof e.constructor||Oi(e)?{}:go(Ua(e))}var au=Vi&&Vi.isMap,su=au?Di(au):function(e){return Sr(e)&&"[object Map]"==Gl(e)};var lu=Vi&&Vi.isSet,uu=lu?Di(lu):function(e){return Sr(e)&&"[object Set]"==Gl(e)},cu="[object Arguments]",du="[object Function]",pu="[object Object]",fu={};function hu(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(!Br(e))return e;var c=Or(e);if(c){if(a=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&Zl.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!s)return Ro(e,a)}else{var d=Gl(e),p=d==du||"[object GeneratorFunction]"==d;if($i(e))return El(e,s);if(d==pu||d==cu||p&&!o){if(a=l||p?{}:iu(e),!s)return l?function(e,t){return yi(e,Ml(e),t)}(e,function(e,t){return e&&yi(t,ia(t),e)}(a,e)):function(e,t){return yi(e,Ll(e),t)}(e,bl(a,e))}else{if(!fu[d])return o?e:{};a=ou(e,d,s)}}i||(i=new yl);var f=i.get(e);if(f)return f;i.set(e,a),uu(e)?e.forEach(function(r){a.add(hu(r,t,n,r,e,i))}):su(e)&&e.forEach(function(r,o){a.set(o,hu(r,t,n,o,e,i))});var h=c?void 0:(u?l?Il:Nl:l?ia:Xi)(e);return qo(h||e,function(r,o){h&&(r=e[o=r]),mi(a,o,hu(r,t,n,o,e,i))}),a}fu[cu]=fu["[object Array]"]=fu["[object ArrayBuffer]"]=fu["[object DataView]"]=fu["[object Boolean]"]=fu["[object Date]"]=fu["[object Float32Array]"]=fu["[object Float64Array]"]=fu["[object Int8Array]"]=fu["[object Int16Array]"]=fu["[object Int32Array]"]=fu["[object Map]"]=fu["[object Number]"]=fu[pu]=fu["[object RegExp]"]=fu["[object Set]"]=fu["[object String]"]=fu["[object Symbol]"]=fu["[object Uint8Array]"]=fu["[object Uint8ClampedArray]"]=fu["[object Uint16Array]"]=fu["[object Uint32Array]"]=!0,fu["[object Error]"]=fu[du]=fu["[object WeakMap]"]=!1;function gu(e){return hu(e,4)}function vu(e){return hu(e,5)}function mu(e,t){return hu(e,5,t="function"==typeof t?t:void 0)}function yu(e,t){return hu(e,4,t="function"==typeof t?t:void 0)}function bu(){return new Lo(this.value(),this.__chain__)}function xu(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 _u(){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 Ta(Or(n)?Ro(n):[n],Wa(t,1))}function wu(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Ea;++t<n;)this.add(e[t])}function Su(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 Eu(e,t){return e.has(t)}wu.prototype.add=wu.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},wu.prototype.has=function(e){return this.__data__.has(e)};function ku(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 wu: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(!Su(t,function(e,t){if(!Eu(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 Cu(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function Ou(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}var ju=gr?gr.prototype:void 0,Au=ju?ju.valueOf:void 0;var Lu=Object.prototype.hasOwnProperty;var Ru="[object Arguments]",Mu="[object Array]",Pu="[object Object]",Nu=Object.prototype.hasOwnProperty;function Iu(e,t,n,r,o,i){var a=Or(e),s=Or(t),l=a?Mu:Gl(e),u=s?Mu:Gl(t),c=(l=l==Ru?Pu:l)==Pu,d=(u=u==Ru?Pu:u)==Pu,p=l==u;if(p&&$i(e)){if(!$i(t))return!1;a=!0,c=!1}if(p&&!c)return i||(i=new yl),a||Ki(e)?ku(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 Ql(e),new Ql(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return gi(+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=Cu;case"[object Set]":var l=1&r;if(s||(s=Ou),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=ku(s(e),s(t),r,o,i,a);return a.delete(e),c;case"[object Symbol]":if(Au)return Au.call(e)==Au.call(t)}return!1}(e,t,l,n,r,o,i);if(!(1&n)){var f=c&&Nu.call(e,"__wrapped__"),h=d&&Nu.call(t,"__wrapped__");if(f||h){var g=f?e.value():e,v=h?t.value():t;return i||(i=new yl),o(g,v,n,r,i)}}return!!p&&(i||(i=new yl),function(e,t,n,r,o,i){var a=1&n,s=Nl(e),l=s.length;if(l!=Nl(t).length&&!a)return!1;for(var u=l;u--;){var c=s[u];if(!(a?c in t:Lu.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 Tu(e,t,n,r,o){return e===t||(null==e||null==t||!Sr(e)&&!Sr(t)?e!=e&&t!=t:Iu(e,t,n,r,Tu,o))}function Bu(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 yl;if(r)var p=r(u,c,l,e,t,d);if(!(void 0===p?Tu(c,u,3,r,d):p))return!1}}return!0}function $u(e){return e==e&&!Br(e)}function Wu(e){for(var t=Xi(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,$u(o)]}return t}function Du(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}function zu(e){var t=Wu(e);return 1==t.length&&t[0][2]?Du(t[0][0],t[0][1]):function(n){return n===e||Bu(n,e,t)}}function Fu(e,t){return null!=e&&t in Object(e)}function Uu(e,t,n){for(var r=-1,o=(t=Ra(t,e)).length,i=!1;++r<o;){var a=Ma(t[r]);if(!(i=null!=e&&n(e,a)))break;e=e[a]}return i||++r!=o?i:!!(o=null==e?0:e.length)&&wi(o)&&ri(a,o)&&(Or(e)||Pi(e))}function Vu(e,t){return null!=e&&Uu(e,t,Fu)}function Hu(e,t){return ha(e)&&$u(t)?Du(Ma(e),t):function(n){var r=Na(n,e);return void 0===r&&r===t?Vu(n,e):Tu(t,r,3)}}function Ku(e){return function(t){return null==t?void 0:t[e]}}function qu(e){return ha(e)?Ku(Ma(e)):function(e){return function(t){return Pa(t,e)}}(e)}function Ju(e){return"function"==typeof e?e:null==e?qr:"object"==typeof e?Or(e)?Hu(e[0],e[1]):zu(e):qu(e)}function Yu(e){var t=null==e?0:e.length,n=Ju;return e=t?Cr(e,function(e){if("function"!=typeof e[1])throw new TypeError("Expected a function");return[n(e[0]),e[1]]}):[],_i(function(n){for(var r=-1;++r<t;){var o=e[r];if(mo(o[0],this,n))return mo(o[1],this,n)}})}function Gu(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 Zu(e){return function(e){var t=Xi(e);return function(n){return Gu(n,e,t)}}(hu(e,1))}function Qu(e,t){return null==t||Gu(e,t,Xi(t))}function Xu(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 ec(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 tc=ec();function nc(e,t){return e&&tc(e,t,Xi)}function rc(e,t){return function(n,r){if(null==n)return n;if(!Si(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 oc=rc(nc);function ic(e,t,n,r){return oc(e,function(e,o,i){t(r,e,n(e),i)}),r}function ac(e,t){return function(n,r){var o=Or(n)?Xu:ic,i=t?t():{};return o(n,e,Ju(r),i)}}var sc=Object.prototype.hasOwnProperty,lc=ac(function(e,t,n){sc.call(e,n)?++e[n]:hi(e,n,1)}),uc=lc;function cc(e,t){var n=go(e);return null==t?n:bl(n,t)}function dc(e,t,n){var r=pi(e,8,void 0,void 0,void 0,void 0,void 0,t=n?void 0:t);return r.placeholder=dc.placeholder,r}dc.placeholder={};function pc(e,t,n){var r=pi(e,16,void 0,void 0,void 0,void 0,void 0,t=n?void 0:t);return r.placeholder=pc.placeholder,r}pc.placeholder={};var fc=function(){return hr.Date.now()},hc=Math.max,gc=Math.min;function vc(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=fc();if(h(e))return v(e);s=setTimeout(g,function(e){var n=t-(e-l);return d?gc(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=fc(),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=Fr(t)||0,Br(n)&&(c=!!n.leading,i=(d="maxWait"in n)?hc(Fr(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(fc())},m}function mc(e,t){return null==e||e!=e?t:e}var yc=Object.prototype,bc=yc.hasOwnProperty,xc=_i(function(e,t){e=Object(e);var n=-1,r=t.length,o=r>2?t[2]:void 0;for(o&&Ei(t[0],t[1],o)&&(r=1);++n<r;)for(var i=t[n],a=ia(i),s=-1,l=a.length;++s<l;){var u=a[s],c=e[u];(void 0===c||gi(c,yc[u])&&!bc.call(e,u))&&(e[u]=i[u])}return e}),_c=xc;function wc(e,t,n){(void 0!==n&&!gi(e[t],n)||void 0===n&&!(t in e))&&hi(e,t,n)}function Sc(e){return Sr(e)&&Si(e)}function Ec(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}function kc(e){return yi(e,ia(e))}function Cc(e,t,n,r,o){e!==t&&tc(t,function(i,a){if(o||(o=new yl),Br(i))!function(e,t,n,r,o,i,a){var s=Ec(e,n),l=Ec(t,n),u=a.get(l);if(u)wc(e,n,u);else{var c=i?i(s,l,n+"",e,t,a):void 0,d=void 0===c;if(d){var p=Or(l),f=!p&&$i(l),h=!p&&!f&&Ki(l);c=l,p||f||h?Or(s)?c=s:Sc(s)?c=Ro(s):f?(d=!1,c=El(l,!0)):h?(d=!1,c=ru(l,!0)):c=[]:Ya(l)||Pi(l)?(c=s,Pi(s)?c=kc(s):Br(s)&&!Jr(s)||(c=iu(l))):d=!1}d&&(a.set(l,c),o(c,l,r,i,a),a.delete(l)),wc(e,n,c)}}(e,t,a,n,Cc,r,o);else{var s=r?r(Ec(e,a),i,a+"",e,t,o):void 0;void 0===s&&(s=i),wc(e,a,s)}},ia)}function Oc(e,t,n,r,o,i){return Br(e)&&Br(t)&&(i.set(t,e),Cc(e,t,void 0,Oc,i),i.delete(t)),e}var jc=ki(function(e,t,n,r){Cc(e,t,n,r)}),Ac=jc,Lc=_i(function(e){return e.push(void 0,Oc),mo(Ac,void 0,e)});function Rc(e,t,n){if("function"!=typeof e)throw new TypeError("Expected a function");return setTimeout(function(){e.apply(void 0,n)},t)}var Mc=_i(function(e,t){return Rc(e,1,t)}),Pc=Mc,Nc=_i(function(e,t,n){return Rc(e,Fr(t)||0,n)}),Ic=Nc;function Tc(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 Bc(e,t,n,r){var o=-1,i=Zo,a=!0,s=e.length,l=[],u=t.length;if(!s)return l;n&&(t=Cr(t,Di(n))),r?(i=Tc,a=!1):t.length>=200&&(i=Eu,a=!1,t=new wu(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 $c=_i(function(e,t){return Sc(e)?Bc(e,Wa(t,1,Sc,!0)):[]}),Wc=$c;function Dc(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}var zc=_i(function(e,t){var n=Dc(t);return Sc(n)&&(n=void 0),Sc(e)?Bc(e,Wa(t,1,Sc,!0),Ju(n)):[]}),Fc=zc,Uc=_i(function(e,t){var n=Dc(t);return Sc(n)&&(n=void 0),Sc(e)?Bc(e,Wa(t,1,Sc,!0),void 0,n):[]}),Vc=Uc,Hc=Rr(function(e,t){return e/t},1);function Kc(e,t,n){var r=null==e?0:e.length;return r?as(e,(t=n||void 0===t?1:Hr(t))<0?0:t,r):[]}function qc(e,t,n){var r=null==e?0:e.length;return r?as(e,0,(t=r-(t=n||void 0===t?1:Hr(t)))<0?0:t):[]}function Jc(e,t,n,r){for(var o=e.length,i=r?o:-1;(r?i--:++i<o)&&t(e[i],i,e););return n?as(e,r?0:i,r?i+1:o):as(e,r?i+1:0,r?o:i)}function Yc(e,t){return e&&e.length?Jc(e,Ju(t),!0,!0):[]}function Gc(e,t){return e&&e.length?Jc(e,Ju(t),!0):[]}function Zc(e){return"function"==typeof e?e:qr}function Qc(e,t){return(Or(e)?qo:oc)(e,Zc(t))}function Xc(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}var ed=ec(!0);function td(e,t){return e&&ed(e,t,Xi)}var nd=rc(td,!0);function rd(e,t){return(Or(e)?Xc:nd)(e,Zc(t))}function od(e,t,n){e=La(e),t=Lr(t);var r=e.length,o=n=void 0===n?r:vl(Hr(n),0,r);return(n-=t.length)>=0&&e.slice(n,o)==t}function id(e){return function(t){var n=Gl(t);return"[object Map]"==n?Cu(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 Cr(t,function(t){return[t,e[t]]})}(t,e(t))}}var ad=id(Xi),sd=id(ia),ld=Os({"&":"&","<":"<",">":">",'"':""","'":"'"}),ud=/[&<>"']/g,cd=RegExp(ud.source);function dd(e){return(e=La(e))&&cd.test(e)?e.replace(ud,ld):e}var pd=/[\\^$.*+?()[\]{}|]/g,fd=RegExp(pd.source);function hd(e){return(e=La(e))&&fd.test(e)?e.replace(pd,"\\$&"):e}function gd(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 vd(e,t){var n=!0;return oc(e,function(e,r,o){return n=!!t(e,r,o)}),n}function md(e,t,n){var r=Or(e)?gd:vd;return n&&Ei(e,t,n)&&(t=void 0),r(e,Ju(t))}function yd(e){return e?vl(Hr(e),0,4294967295):0}function bd(e,t,n,r){var o=null==e?0:e.length;return o?(n&&"number"!=typeof n&&Ei(e,t,n)&&(n=0,r=o),function(e,t,n,r){var o=e.length;for((n=Hr(n))<0&&(n=-n>o?0:o+n),(r=void 0===r||r>o?o:Hr(r))<0&&(r+=o),r=n>r?0:yd(r);n<r;)e[n++]=t;return e}(e,t,n,r)):[]}function xd(e,t){var n=[];return oc(e,function(e,r,o){t(e,r,o)&&n.push(e)}),n}function _d(e,t){return(Or(e)?kl:xd)(e,Ju(t))}function wd(e){return function(t,n,r){var o=Object(t);if(!Si(t)){var i=Ju(n);t=Xi(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 Sd=Math.max;function Ed(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:Hr(n);return o<0&&(o=Sd(r+o,0)),Jo(e,Ju(t),o)}var kd=wd(Ed);function Cd(e,t,n){var r;return n(e,function(e,n,o){if(t(e,n,o))return r=n,!1}),r}function Od(e,t){return Cd(e,Ju(t),nc)}var jd=Math.max,Ad=Math.min;function Ld(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=r-1;return void 0!==n&&(o=Hr(n),o=n<0?jd(r+o,0):Ad(o,r-1)),Jo(e,Ju(t),o,!0)}var Rd=wd(Ld);function Md(e,t){return Cd(e,Ju(t),td)}function Pd(e){return e&&e.length?e[0]:void 0}function Nd(e,t){var n=-1,r=Si(e)?Array(e.length):[];return oc(e,function(e,o,i){r[++n]=t(e,o,i)}),r}function Id(e,t){return(Or(e)?Cr:Nd)(e,Ju(t))}function Td(e,t){return Wa(Id(e,t),1)}var Bd=1/0;function $d(e,t){return Wa(Id(e,t),Bd)}function Wd(e,t,n){return n=void 0===n?1:Hr(n),Wa(Id(e,t),n)}var Dd=1/0;function zd(e){return(null==e?0:e.length)?Wa(e,Dd):[]}function Fd(e,t){return(null==e?0:e.length)?Wa(e,t=void 0===t?1:Hr(t)):[]}function Ud(e){return pi(e,512)}var Vd=cl("floor");function Hd(e){return za(function(t){var n=t.length,r=n,o=Lo.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"==Ao(i))var a=new Lo([],!0)}for(r=a?r:n;++r<n;){var s=Ao(i=t[r]),l="wrapper"==s?Co(i):void 0;a=l&&Io(l[0])&&424==l[1]&&!l[4].length&&1==l[9]?a[Ao(l[0])].apply(a,l[3]):1==i.length&&Io(i)?a[s]():a.thru(i)}return function(){var e=arguments,r=e[0];if(a&&1==e.length&&Or(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 Kd=Hd(),qd=Hd(!0);function Jd(e,t){return null==e?e:tc(e,Zc(t),ia)}function Yd(e,t){return null==e?e:ed(e,Zc(t),ia)}function Gd(e,t){return e&&nc(e,Zc(t))}function Zd(e,t){return e&&td(e,Zc(t))}function Qd(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 Xd(e,t){return kl(t,function(t){return Jr(e[t])})}function ep(e){return null==e?[]:Xd(e,Xi(e))}function tp(e){return null==e?[]:Xd(e,ia(e))}var np=Object.prototype.hasOwnProperty,rp=ac(function(e,t,n){np.call(e,n)?e[n].push(t):hi(e,n,[t])}),op=rp;function ip(e,t){return e>t}function ap(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=Fr(t),n=Fr(n)),e(t,n)}}var sp=ap(ip),lp=ap(function(e,t){return e>=t}),up=Object.prototype.hasOwnProperty;function cp(e,t){return null!=e&&up.call(e,t)}function dp(e,t){return null!=e&&Uu(e,t,cp)}var pp=Math.max,fp=Math.min;function hp(e,t,n){return t=Vr(t),void 0===n?(n=t,t=0):n=Vr(n),function(e,t,n){return e>=fp(t,n)&&e<pp(t,n)}(e=Fr(e),t,n)}function gp(e){return"string"==typeof e||!Or(e)&&Sr(e)&&"[object String]"==wr(e)}function vp(e,t){return Cr(t,function(t){return e[t]})}function mp(e){return null==e?[]:vp(e,Xi(e))}var yp=Math.max;function bp(e,t,n,r){e=Si(e)?e:mp(e),n=n&&!r?Hr(n):0;var o=e.length;return n<0&&(n=yp(o+n,0)),gp(e)?n<=o&&e.indexOf(t,n)>-1:!!o&&Go(e,t,n)>-1}var xp=Math.max;function _p(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:Hr(n);return o<0&&(o=xp(r+o,0)),Go(e,t,o)}function wp(e){return(null==e?0:e.length)?as(e,0,-1):[]}var Sp=Math.min;function Ep(e,t,n){for(var r=n?Tc:Zo,o=e[0].length,i=e.length,a=i,s=Array(i),l=1/0,u=[];a--;){var c=e[a];a&&t&&(c=Cr(c,Di(t))),l=Sp(c.length,l),s[a]=!n&&(t||o>=120&&c.length>=120)?new wu(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?Eu(p,h):r(u,h,n))){for(a=i;--a;){var g=s[a];if(!(g?Eu(g,h):r(e[a],h,n)))continue e}p&&p.push(h),u.push(f)}}return u}function kp(e){return Sc(e)?e:[]}var Cp=_i(function(e){var t=Cr(e,kp);return t.length&&t[0]===e[0]?Ep(t):[]}),Op=_i(function(e){var t=Dc(e),n=Cr(e,kp);return t===Dc(n)?t=void 0:n.pop(),n.length&&n[0]===e[0]?Ep(n,Ju(t)):[]}),jp=Op,Ap=_i(function(e){var t=Dc(e),n=Cr(e,kp);return(t="function"==typeof t?t:void 0)&&n.pop(),n.length&&n[0]===e[0]?Ep(n,void 0,t):[]});function Lp(e,t){return function(n,r){return function(e,t,n,r){return nc(e,function(e,o,i){t(r,n(e),o,i)}),r}(n,e,t(r),{})}}var Rp=Object.prototype.toString,Mp=Lp(function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Rp.call(t)),e[t]=n},Fo(qr)),Pp=Mp,Np=Object.prototype,Ip=Np.hasOwnProperty,Tp=Np.toString,Bp=Lp(function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Tp.call(t)),Ip.call(e,t)?e[t].push(n):e[t]=[n]},Ju),$p=Bp;function Wp(e,t){return t.length<2?e:Pa(e,as(t,0,-1))}function Dp(e,t,n){var r=null==(e=Wp(e,t=Ra(t,e)))?e:e[Ma(Dc(t))];return null==r?void 0:mo(r,e,n)}var zp=_i(Dp),Fp=_i(function(e,t,n){var r=-1,o="function"==typeof t,i=Si(e)?Array(e.length):[];return oc(e,function(e){i[++r]=o?mo(t,e,n):Dp(e,t,n)}),i}),Up=Fp;var Vp=Vi&&Vi.isArrayBuffer,Hp=Vp?Di(Vp):function(e){return Sr(e)&&"[object ArrayBuffer]"==wr(e)};function Kp(e){return!0===e||!1===e||Sr(e)&&"[object Boolean]"==wr(e)}var qp=Vi&&Vi.isDate,Jp=qp?Di(qp):function(e){return Sr(e)&&"[object Date]"==wr(e)};function Yp(e){return Sr(e)&&1===e.nodeType&&!Ya(e)}var Gp=Object.prototype.hasOwnProperty;function Zp(e){if(null==e)return!0;if(Si(e)&&(Or(e)||"string"==typeof e||"function"==typeof e.splice||$i(e)||Ki(e)||Pi(e)))return!e.length;var t=Gl(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(Oi(e))return!Qi(e).length;for(var n in e)if(Gp.call(e,n))return!1;return!0}function Qp(e,t){return Tu(e,t)}function Xp(e,t,n){var r=(n="function"==typeof n?n:void 0)?n(e,t):void 0;return void 0===r?Tu(e,t,void 0,n):!!r}var ef=hr.isFinite;function tf(e){return"number"==typeof e&&ef(e)}function nf(e){return"number"==typeof e&&e==Hr(e)}function rf(e,t){return e===t||Bu(e,t,Wu(t))}function of(e,t,n){return n="function"==typeof n?n:void 0,Bu(e,t,Wu(t),n)}function af(e){return"number"==typeof e||Sr(e)&&"[object Number]"==wr(e)}function sf(e){return af(e)&&e!=+e}var lf=Gr?Jr:Ni;function uf(e){if(lf(e))throw new Error("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return ao(e)}function cf(e){return null==e}function df(e){return null===e}var pf=Vi&&Vi.isRegExp,ff=pf?Di(pf):function(e){return Sr(e)&&"[object RegExp]"==wr(e)},hf=9007199254740991;function gf(e){return nf(e)&&e>=-9007199254740991&&e<=hf}function vf(e){return void 0===e}function mf(e){return Sr(e)&&"[object WeakMap]"==Gl(e)}function yf(e){return Sr(e)&&"[object WeakSet]"==wr(e)}function bf(e){return Ju("function"==typeof e?e:hu(e,1))}var xf=Array.prototype.join;function _f(e,t){return null==e?"":xf.call(e,t)}var wf=ol(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()}),Sf=wf,Ef=ac(function(e,t,n){hi(e,n,t)}),kf=Ef;var Cf=Math.max,Of=Math.min;function jf(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=r;return void 0!==n&&(o=(o=Hr(n))<0?Cf(r+o,0):Of(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):Jo(e,Yo,o,!0)}var Af=ol(function(e,t,n){return e+(n?" ":"")+t.toLowerCase()}),Lf=Af,Rf=Ss("toLowerCase");function Mf(e,t){return e<t}var Pf=ap(Mf),Nf=ap(function(e,t){return e<=t});function If(e,t){var n={};return t=Ju(t),nc(e,function(e,r,o){hi(n,t(e,r,o),e)}),n}function Tf(e,t){var n={};return t=Ju(t),nc(e,function(e,r,o){hi(n,r,t(e,r,o))}),n}function Bf(e){return zu(hu(e,1))}function $f(e,t){return Hu(e,hu(t,1))}function Wf(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&&!Er(a):n(a,s)))var s=a,l=i}return l}function Df(e){return e&&e.length?Wf(e,qr,ip):void 0}function zf(e,t){return e&&e.length?Wf(e,Ju(t),ip):void 0}function Ff(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 Uf(e,t){var n=null==e?0:e.length;return n?Ff(e,t)/n:NaN}function Vf(e){return Uf(e,qr)}function Hf(e,t){return Uf(e,Ju(t))}var Kf=ki(function(e,t,n){Cc(e,t,n)}),qf=Kf,Jf=_i(function(e,t){return function(n){return Dp(n,e,t)}}),Yf=Jf,Gf=_i(function(e,t){return function(n){return Dp(e,n,t)}}),Zf=Gf;function Qf(e){return e&&e.length?Wf(e,qr,Mf):void 0}function Xf(e,t){return e&&e.length?Wf(e,Ju(t),Mf):void 0}function eh(e,t,n){var r=Xi(t),o=Xd(t,r),i=!(Br(n)&&"chain"in n&&!n.chain),a=Jr(e);return qo(o,function(n){var r=t[n];e[n]=r,a&&(e.prototype[n]=function(){var t=this.__chain__;if(i||t){var n=e(this.__wrapped__);return(n.__actions__=Ro(this.__actions__)).push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,Ta([this.value()],arguments))})}),e}var th=Rr(function(e,t){return e*t},1);function nh(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 rh=gr?gr.iterator:void 0;function oh(e){if(!e)return[];if(Si(e))return gp(e)?ws(e):Ro(e);if(rh&&e[rh])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[rh]());var t=Gl(e);return("[object Map]"==t?Cu:"[object Set]"==t?Ou:mp)(e)}function ih(){void 0===this.__values__&&(this.__values__=oh(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?void 0:this.__values__[this.__index__++]}}function ah(e,t){var n=e.length;if(n)return ri(t+=t<0?n:0,n)?e[t]:void 0}function sh(e,t){return e&&e.length?ah(e,Hr(t)):void 0}function lh(e){return e=Hr(e),_i(function(t){return ah(t,e)})}var uh=Object.prototype.hasOwnProperty;function ch(e,t){var n=-1,r=(t=Ra(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&&!uh.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=Wp(e,t);return null==a||delete a[Ma(Dc(t))]}function dh(e){return Ya(e)?void 0:e}var ph=za(function(e,t){var n={};if(null==e)return n;var r=!1;t=Cr(t,function(t){return t=Ra(t,e),r||(r=t.length>1),t}),yi(e,Il(e),n),r&&(n=hu(n,7,dh));for(var o=t.length;o--;)ch(n,t[o]);return n}),fh=ph;function hh(e,t,n,r){if(!Br(e))return e;for(var o=-1,i=(t=Ra(t,e)).length,a=i-1,s=e;null!=s&&++o<i;){var l=Ma(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=Br(c)?c:ri(t[o+1])?[]:{})}mi(s,l,u),s=s[l]}return e}function gh(e,t,n){for(var r=-1,o=t.length,i={};++r<o;){var a=t[r],s=Pa(e,a);n(s,a)&&hh(i,Ra(a,e),s)}return i}function vh(e,t){if(null==e)return{};var n=Cr(Il(e),function(e){return[e]});return t=Ju(t),gh(e,n,function(e,n){return t(e,n[0])})}function mh(e,t){return vh(e,nh(Ju(t)))}function yh(e){return Xa(2,e)}function bh(e,t){if(e!==t){var n=void 0!==e,r=null===e,o=e==e,i=Er(e),a=void 0!==t,s=null===t,l=t==t,u=Er(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 xh(e,t,n){t=t.length?Cr(t,function(e){return Or(e)?function(t){return Pa(t,1===e.length?e[0]:e)}:e}):[qr];var r=-1;t=Cr(t,Di(Ju));var o=Nd(e,function(e,n,o){var i=Cr(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=bh(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 _h(e,t,n,r){return null==e?[]:(Or(t)||(t=null==t?[]:[t]),Or(n=r?void 0:n)||(n=null==n?[]:[n]),xh(e,t,n))}function wh(e){return za(function(t){return t=Cr(t,Di(Ju)),_i(function(n){var r=this;return e(t,function(e){return mo(e,r,n)})})})}var Sh=wh(Cr),Eh=_i,kh=Math.min,Ch=Eh(function(e,t){var n=(t=1==t.length&&Or(t[0])?Cr(t[0],Di(Ju)):Cr(Wa(t,1),Di(Ju))).length;return _i(function(r){for(var o=-1,i=kh(r.length,n);++o<i;)r[o]=t[o].call(this,r[o]);return mo(e,this,r)})}),Oh=Ch,jh=wh(gd),Ah=wh(Su),Lh=Math.floor;function Rh(e,t){var n="";if(!e||t<1||t>9007199254740991)return n;do{t%2&&(n+=e),(t=Lh(t/2))&&(e+=e)}while(t);return n}var Mh=Ku("length"),Ph="\\ud800-\\udfff",Nh="["+Ph+"]",Ih="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",Th="\\ud83c[\\udffb-\\udfff]",Bh="[^"+Ph+"]",$h="(?:\\ud83c[\\udde6-\\uddff]){2}",Wh="[\\ud800-\\udbff][\\udc00-\\udfff]",Dh="(?:"+Ih+"|"+Th+")"+"?",zh="[\\ufe0e\\ufe0f]?",Fh=zh+Dh+("(?:\\u200d(?:"+[Bh,$h,Wh].join("|")+")"+zh+Dh+")*"),Uh="(?:"+[Bh+Ih+"?",Ih,$h,Wh,Nh].join("|")+")",Vh=RegExp(Th+"(?="+Th+")|"+Uh+Fh,"g");function Hh(e){return us(e)?function(e){for(var t=Vh.lastIndex=0;Vh.test(e);)++t;return t}(e):Mh(e)}var Kh=Math.ceil;function qh(e,t){var n=(t=void 0===t?" ":Lr(t)).length;if(n<2)return n?Rh(t,e):t;var r=Rh(t,Kh(e/Hh(t)));return us(t)?ss(ws(r),0,e).join(""):r.slice(0,e)}var Jh=Math.ceil,Yh=Math.floor;function Gh(e,t,n){e=La(e);var r=(t=Hr(t))?Hh(e):0;if(!t||r>=t)return e;var o=(t-r)/2;return qh(Yh(o),n)+e+qh(Jh(o),n)}function Zh(e,t,n){e=La(e);var r=(t=Hr(t))?Hh(e):0;return t&&r<t?e+qh(t-r,n):e}function Qh(e,t,n){e=La(e);var r=(t=Hr(t))?Hh(e):0;return t&&r<t?qh(t-r,n)+e:e}var Xh=/^\s+/,eg=hr.parseInt;function tg(e,t,n){return n||null==t?t=0:t&&(t=+t),eg(La(e).replace(Xh,""),t||0)}var ng=_i(function(e,t){return pi(e,32,void 0,t,ai(t,ti(ng)))});ng.placeholder={};var rg=ng,og=_i(function(e,t){return pi(e,64,void 0,t,ai(t,ti(og)))});og.placeholder={};var ig=og,ag=ac(function(e,t,n){e[n?0:1].push(t)},function(){return[[],[]]}),sg=ag;var lg=za(function(e,t){return null==e?{}:function(e,t){return gh(e,t,function(t,n){return Vu(e,n)})}(e,t)}),ug=lg;function cg(e){for(var t,n=this;n instanceof wo;){var r=Mo(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 dg(e){return function(t){return null==e?void 0:Pa(e,t)}}function pg(e,t,n,r){for(var o=n-1,i=e.length;++o<i;)if(r(e[o],t))return o;return-1}var fg=Array.prototype.splice;function hg(e,t,n,r){var o=r?pg:Go,i=-1,a=t.length,s=e;for(e===t&&(t=Ro(t)),n&&(s=Cr(e,Di(n)));++i<a;)for(var l=0,u=t[i],c=n?n(u):u;(l=o(s,c,l,r))>-1;)s!==e&&fg.call(s,l,1),fg.call(e,l,1);return e}function gg(e,t){return e&&e.length&&t&&t.length?hg(e,t):e}var vg=_i(gg);function mg(e,t,n){return e&&e.length&&t&&t.length?hg(e,t,Ju(n)):e}function yg(e,t,n){return e&&e.length&&t&&t.length?hg(e,t,void 0,n):e}var bg=Array.prototype.splice;function xg(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;ri(o)?bg.call(e,o,1):ch(e,o)}}return e}var _g=za(function(e,t){var n=null==e?0:e.length,r=Ia(e,t);return xg(e,Cr(t,function(e){return ri(e,n)?+e:e}).sort(bh)),r}),wg=_g,Sg=Math.floor,Eg=Math.random;function kg(e,t){return e+Sg(Eg()*(t-e+1))}var Cg=parseFloat,Og=Math.min,jg=Math.random;function Ag(e,t,n){if(n&&"boolean"!=typeof n&&Ei(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=Vr(e),void 0===t?(t=e,e=0):t=Vr(t)),e>t){var r=e;e=t,t=r}if(n||e%1||t%1){var o=jg();return Og(e+o*(t-e+Cg("1e-"+((o+"").length-1))),t)}return kg(e,t)}var Lg=Math.ceil,Rg=Math.max;function Mg(e){return function(t,n,r){return r&&"number"!=typeof r&&Ei(t,n,r)&&(n=r=void 0),t=Vr(t),void 0===n?(n=t,t=0):n=Vr(n),function(e,t,n,r){for(var o=-1,i=Rg(Lg((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:Vr(r),e)}}var Pg=Mg(),Ng=Mg(!0),Ig=za(function(e,t){return pi(e,256,void 0,void 0,void 0,t)}),Tg=Ig;function Bg(e,t,n,r,o){return o(e,function(e,o,i){n=r?(r=!1,e):t(n,e,o,i)}),n}function $g(e,t,n){var r=Or(e)?Cs:Bg,o=arguments.length<3;return r(e,Ju(t),n,o,oc)}function Wg(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 Dg(e,t,n){var r=Or(e)?Wg:Bg,o=arguments.length<3;return r(e,Ju(t),n,o,nd)}function zg(e,t){return(Or(e)?kl:xd)(e,nh(Ju(t)))}function Fg(e,t){var n=[];if(!e||!e.length)return n;var r=-1,o=[],i=e.length;for(t=Ju(t);++r<i;){var a=e[r];t(a,r,e)&&(n.push(a),o.push(r))}return xg(e,o),n}function Ug(e,t,n){return t=(n?Ei(e,t,n):void 0===t)?1:Hr(t),Rh(La(e),t)}function Vg(){var e=arguments,t=La(e[0]);return e.length<3?t:t.replace(e[1],e[2])}function Hg(e,t){if("function"!=typeof e)throw new TypeError("Expected a function");return _i(e,t=void 0===t?t:Hr(t))}function Kg(e,t,n){var r=-1,o=(t=Ra(t,e)).length;for(o||(o=1,e=void 0);++r<o;){var i=null==e?void 0:e[Ma(t[r])];void 0===i&&(r=o,i=n),e=Jr(i)?i.call(e):i}return e}var qg=Array.prototype.reverse;function Jg(e){return null==e?e:qg.call(e)}var Yg=cl("round");function Gg(e){var t=e.length;return t?e[kg(0,t-1)]:void 0}function Zg(e){return Gg(mp(e))}function Qg(e){return(Or(e)?Gg:Zg)(e)}function Xg(e,t){var n=-1,r=e.length,o=r-1;for(t=void 0===t?r:t;++n<t;){var i=kg(n,o),a=e[i];e[i]=e[n],e[n]=a}return e.length=t,e}function ev(e,t){return Xg(Ro(e),vl(t,0,e.length))}function tv(e,t){var n=mp(e);return Xg(n,vl(t,0,n.length))}function nv(e,t,n){return t=(n?Ei(e,t,n):void 0===t)?1:Hr(t),(Or(e)?ev:tv)(e,t)}function rv(e,t,n){return null==e?e:hh(e,t,n)}function ov(e,t,n,r){return r="function"==typeof r?r:void 0,null==e?e:hh(e,t,n,r)}function iv(e){return Xg(Ro(e))}function av(e){return Xg(mp(e))}function sv(e){return(Or(e)?iv:av)(e)}function lv(e){if(null==e)return 0;if(Si(e))return gp(e)?Hh(e):e.length;var t=Gl(e);return"[object Map]"==t||"[object Set]"==t?e.size:Qi(e).length}function uv(e,t,n){var r=null==e?0:e.length;return r?(n&&"number"!=typeof n&&Ei(e,t,n)?(t=0,n=r):(t=null==t?0:Hr(t),n=void 0===n?r:Hr(n)),as(e,t,n)):[]}var cv=ol(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}),dv=cv;function pv(e,t){var n;return oc(e,function(e,r,o){return!(n=t(e,r,o))}),!!n}function fv(e,t,n){var r=Or(e)?Su:pv;return n&&Ei(e,t,n)&&(t=void 0),r(e,Ju(t))}var hv=_i(function(e,t){if(null==e)return[];var n=t.length;return n>1&&Ei(e,t[0],t[1])?t=[]:n>2&&Ei(t[0],t[1],t[2])&&(t=[t[0]]),xh(e,Wa(t,1),[])}),gv=hv,vv=Math.floor,mv=Math.min;function yv(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=Er(t),u=void 0===t;o<i;){var c=vv((o+i)/2),d=n(e[c]),p=void 0!==d,f=null===d,h=d==d,g=Er(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 mv(i,4294967294)}function bv(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&&!Er(a)&&(n?a<=t:a<t)?r=i+1:o=i}return o}return yv(e,t,qr,n)}function xv(e,t){return bv(e,t)}function _v(e,t,n){return yv(e,t,Ju(n))}function wv(e,t){var n=null==e?0:e.length;if(n){var r=bv(e,t);if(r<n&&gi(e[r],t))return r}return-1}function Sv(e,t){return bv(e,t,!0)}function Ev(e,t,n){return yv(e,t,Ju(n),!0)}function kv(e,t){if(null==e?0:e.length){var n=bv(e,t,!0)-1;if(gi(e[n],t))return n}return-1}function Cv(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||!gi(s,l)){var l=s;i[o++]=0===a?0:a}}return i}function Ov(e){return e&&e.length?Cv(e):[]}function jv(e,t){return e&&e.length?Cv(e,Ju(t)):[]}function Av(e,t,n){return n&&"number"!=typeof n&&Ei(e,t,n)&&(t=n=void 0),(n=void 0===n?4294967295:n>>>0)?(e=La(e))&&("string"==typeof t||null!=t&&!ff(t))&&!(t=Lr(t))&&us(e)?ss(ws(e),0,n):e.split(t,n):[]}var Lv=Math.max;function Rv(e,t){if("function"!=typeof e)throw new TypeError("Expected a function");return t=null==t?0:Lv(Hr(t),0),_i(function(n){var r=n[t],o=ss(n,0,t);return r&&Ta(o,r),mo(e,this,o)})}var Mv=ol(function(e,t,n){return e+(n?" ":"")+Es(t)}),Pv=Mv;function Nv(e,t,n){return e=La(e),n=null==n?0:vl(Hr(n),0,e.length),t=Lr(t),e.slice(n,n+t.length)==t}function Iv(){return{}}function Tv(){return""}function Bv(){return!0}var $v=Rr(function(e,t){return e-t},0);function Wv(e){return e&&e.length?Ff(e,qr):0}function Dv(e,t){return e&&e.length?Ff(e,Ju(t)):0}function zv(e){var t=null==e?0:e.length;return t?as(e,1,t):[]}function Fv(e,t,n){return e&&e.length?as(e,0,(t=n||void 0===t?1:Hr(t))<0?0:t):[]}function Uv(e,t,n){var r=null==e?0:e.length;return r?as(e,(t=r-(t=n||void 0===t?1:Hr(t)))<0?0:t,r):[]}function Vv(e,t){return e&&e.length?Jc(e,Ju(t),!1,!0):[]}function Hv(e,t){return e&&e.length?Jc(e,Ju(t)):[]}function Kv(e,t){return t(e),e}var qv=Object.prototype,Jv=qv.hasOwnProperty;function Yv(e,t,n,r){return void 0===e||gi(e,qv[n])&&!Jv.call(r,n)?t:e}var Gv={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"};function Zv(e){return"\\"+Gv[e]}var Qv=/<%=([\s\S]+?)%>/g,Xv={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:Qv,variable:"",imports:{_:{escape:dd}}},em=/\b__p \+= '';/g,tm=/\b(__p \+=) '' \+/g,nm=/(__e\(.*?\)|\b__t\)) \+\n'';/g,rm=/[()=,{}\[\]\/\s]/,om=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,im=/($^)/,am=/['\n\r\u2028\u2029\\]/g,sm=Object.prototype.hasOwnProperty;function lm(e,t,n){var r=Xv.imports._.templateSettings||Xv;n&&Ei(e,t,n)&&(t=void 0),e=La(e),t=ua({},t,r,Yv);var o,i,a=ua({},t.imports,r.imports,Yv),s=Xi(a),l=vp(a,s),u=0,c=t.interpolate||im,d="__p += '",p=RegExp((t.escape||im).source+"|"+c.source+"|"+(c===Qv?om:im).source+"|"+(t.evaluate||im).source+"|$","g"),f=sm.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(am,Zv),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=sm.call(t,"variable")&&t.variable;if(h){if(rm.test(h))throw new Error("Invalid `variable` option passed into `_.template`")}else d="with (obj) {\n"+d+"\n}\n";d=(i?d.replace(em,""):d).replace(tm,"$1").replace(nm,"$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=Qa(function(){return Function(s,f+"return "+d).apply(void 0,l)});if(g.source=d,Ga(g))throw g;return g}function um(e,t,n){var r=!0,o=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return Br(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),vc(e,t,{leading:r,maxWait:t,trailing:o})}function cm(e,t){return t(e)}var dm=4294967295,pm=Math.min;function fm(e,t){if((e=Hr(e))<1||e>9007199254740991)return[];var n=dm,r=pm(e,dm);t=Zc(t),e-=dm;for(var o=ji(r,t);++n<e;)t(n);return o}function hm(){return this}function gm(e,t){var n=e;return n instanceof So&&(n=n.value()),Cs(t,function(e,t){return t.func.apply(t.thisArg,Ta([e],t.args))},n)}function vm(){return gm(this.__wrapped__,this.__actions__)}function mm(e){return La(e).toLowerCase()}function ym(e){return Or(e)?Cr(e,Ma):Er(e)?[e]:Ro(Aa(La(e)))}var bm=9007199254740991;function xm(e){return e?vl(Hr(e),-9007199254740991,bm):0===e?e:0}function _m(e){return La(e).toUpperCase()}function wm(e,t,n){var r=Or(e),o=r||$i(e)||Ki(e);if(t=Ju(t),null==n){var i=e&&e.constructor;n=o?r?new i:[]:Br(e)&&Jr(i)?go(Ua(e)):{}}return(o?qo:nc)(e,function(e,r,o){return t(n,e,r,o)}),n}function Sm(e,t){for(var n=e.length;n--&&Go(t,e[n],0)>-1;);return n}function Em(e,t){for(var n=-1,r=e.length;++n<r&&Go(t,e[n],0)>-1;);return n}function km(e,t,n){if((e=La(e))&&(n||void 0===t))return Tr(e);if(!e||!(t=Lr(t)))return e;var r=ws(e),o=ws(t);return ss(r,Em(r,o),Sm(r,o)+1).join("")}function Cm(e,t,n){if((e=La(e))&&(n||void 0===t))return e.slice(0,Nr(e)+1);if(!e||!(t=Lr(t)))return e;var r=ws(e);return ss(r,0,Sm(r,ws(t))+1).join("")}var Om=/^\s+/;function jm(e,t,n){if((e=La(e))&&(n||void 0===t))return e.replace(Om,"");if(!e||!(t=Lr(t)))return e;var r=ws(e);return ss(r,Em(r,ws(t))).join("")}var Am=/\w*$/;function Lm(e,t){var n=30,r="...";if(Br(t)){var o="separator"in t?t.separator:o;n="length"in t?Hr(t.length):n,r="omission"in t?Lr(t.omission):r}var i=(e=La(e)).length;if(us(e)){var a=ws(e);i=a.length}if(n>=i)return e;var s=n-Hh(r);if(s<1)return r;var l=a?ss(a,0,s).join(""):e.slice(0,s);if(void 0===o)return l+r;if(a&&(s+=l.length-s),ff(o)){if(e.slice(s).search(o)){var u,c=l;for(o.global||(o=RegExp(o.source,La(Am.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(Lr(o),s)!=s){var p=l.lastIndexOf(o);p>-1&&(l=l.slice(0,p))}return l+r}function Rm(e){return fi(e,1)}var Mm=Os({"&":"&","<":"<",">":">",""":'"',"'":"'"}),Pm=/&(?:amp|lt|gt|quot|#39);/g,Nm=RegExp(Pm.source);function Im(e){return(e=La(e))&&Nm.test(e)?e.replace(Pm,Mm):e}var Tm=$l&&1/Ou(new $l([,-0]))[1]==1/0?function(e){return new $l(e)}:Eo,Bm=Tm;function $m(e,t,n){var r=-1,o=Zo,i=e.length,a=!0,s=[],l=s;if(n)a=!1,o=Tc;else if(i>=200){var u=t?null:Bm(e);if(u)return Ou(u);a=!1,o=Eu,l=new wu}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 Wm=_i(function(e){return $m(Wa(e,1,Sc,!0))}),Dm=_i(function(e){var t=Dc(e);return Sc(t)&&(t=void 0),$m(Wa(e,1,Sc,!0),Ju(t))}),zm=Dm,Fm=_i(function(e){var t=Dc(e);return t="function"==typeof t?t:void 0,$m(Wa(e,1,Sc,!0),void 0,t)});function Um(e){return e&&e.length?$m(e):[]}function Vm(e,t){return e&&e.length?$m(e,Ju(t)):[]}function Hm(e,t){return t="function"==typeof t?t:void 0,e&&e.length?$m(e,void 0,t):[]}var Km=0;function qm(e){var t=++Km;return La(e)+t}function Jm(e,t){return null==e||ch(e,t)}var Ym=Math.max;function Gm(e){if(!e||!e.length)return[];var t=0;return e=kl(e,function(e){if(Sc(e))return t=Ym(e.length,t),!0}),ji(t,function(t){return Cr(e,Ku(t))})}function Zm(e,t){if(!e||!e.length)return[];var n=Gm(e);return null==t?n:Cr(n,function(e){return mo(t,void 0,e)})}function Qm(e,t,n,r){return hh(e,t,n(Pa(e,t)),r)}function Xm(e,t,n){return null==e?e:Qm(e,t,Zc(n))}function ey(e,t,n,r){return r="function"==typeof r?r:void 0,null==e?e:Qm(e,t,Zc(n),r)}var ty=ol(function(e,t,n){return e+(n?" ":"")+t.toUpperCase()}),ny=ty;function ry(e){return null==e?[]:vp(e,ia(e))}var oy=_i(function(e,t){return Sc(e)?Bc(e,t):[]}),iy=oy;function ay(e,t){return rg(Zc(t),e)}var sy=za(function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,o=function(t){return Ia(t,e)};return!(t>1||this.__actions__.length)&&r instanceof So&&ri(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:cm,args:[o],thisArg:void 0}),new Lo(r,this.__chain__).thru(function(e){return t&&!e.length&&e.push(void 0),e})):this.thru(o)}),ly=sy;function uy(){return pl(this)}function cy(){var e=this.__wrapped__;if(e instanceof So){var t=e;return this.__actions__.length&&(t=new So(this)),(t=t.reverse()).__actions__.push({func:cm,args:[Jg],thisArg:void 0}),new Lo(t,this.__chain__)}return this.thru(Jg)}function dy(e,t,n){var r=e.length;if(r<2)return r?$m(e[0]):[];for(var o=-1,i=Array(r);++o<r;)for(var a=e[o],s=-1;++s<r;)s!=o&&(i[o]=Bc(i[o]||a,e[s],t,n));return $m(Wa(i,1),t,n)}var py=_i(function(e){return dy(kl(e,Sc))}),fy=_i(function(e){var t=Dc(e);return Sc(t)&&(t=void 0),dy(kl(e,Sc),Ju(t))}),hy=fy,gy=_i(function(e){var t=Dc(e);return t="function"==typeof t?t:void 0,dy(kl(e,Sc),void 0,t)}),vy=_i(Gm);function my(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 yy(e,t){return my(e||[],t||[],mi)}function by(e,t){return my(e||[],t||[],hh)}var xy=_i(function(e){var t=e.length,n=t>1?e[t-1]:void 0;return n="function"==typeof n?(e.pop(),n):void 0,Zm(e,n)}),_y=xy,wy={chunk:gl,compact:xu,concat:_u,difference:Wc,differenceBy:Fc,differenceWith:Vc,drop:Kc,dropRight:qc,dropRightWhile:Yc,dropWhile:Gc,fill:bd,findIndex:Ed,findLastIndex:Ld,first:Pd,flatten:Da,flattenDeep:zd,flattenDepth:Fd,fromPairs:Qd,head:Pd,indexOf:_p,initial:wp,intersection:Cp,intersectionBy:jp,intersectionWith:Ap,join:_f,last:Dc,lastIndexOf:jf,nth:sh,pull:vg,pullAll:gg,pullAllBy:mg,pullAllWith:yg,pullAt:wg,remove:Fg,reverse:Jg,slice:uv,sortedIndex:xv,sortedIndexBy:_v,sortedIndexOf:wv,sortedLastIndex:Sv,sortedLastIndexBy:Ev,sortedLastIndexOf:kv,sortedUniq:Ov,sortedUniqBy:jv,tail:zv,take:Fv,takeRight:Uv,takeRightWhile:Vv,takeWhile:Hv,union:Wm,unionBy:zm,unionWith:Fm,uniq:Um,uniqBy:Vm,uniqWith:Hm,unzip:Gm,unzipWith:Zm,without:iy,xor:py,xorBy:hy,xorWith:gy,zip:vy,zipObject:yy,zipObjectDeep:by,zipWith:_y},Sy={countBy:uc,each:Qc,eachRight:rd,every:md,filter:_d,find:kd,findLast:Rd,flatMap:Td,flatMapDeep:$d,flatMapDepth:Wd,forEach:Qc,forEachRight:rd,groupBy:op,includes:bp,invokeMap:Up,keyBy:kf,map:Id,orderBy:_h,partition:sg,reduce:$g,reduceRight:Dg,reject:zg,sample:Qg,sampleSize:nv,shuffle:sv,size:lv,some:fv,sortBy:gv},Ey={now:fc},ky={after:Kr,ary:fi,before:Xa,bind:ts,bindKey:is,curry:dc,curryRight:pc,debounce:vc,defer:Pc,delay:Ic,flip:Ud,memoize:ka,negate:nh,once:yh,overArgs:Oh,partial:rg,partialRight:ig,rearg:Tg,rest:Hg,spread:Rv,throttle:um,unary:Rm,wrap:ay},Cy={castArray:sl,clone:gu,cloneDeep:vu,cloneDeepWith:mu,cloneWith:yu,conformsTo:Qu,eq:gi,gt:sp,gte:lp,isArguments:Pi,isArray:Or,isArrayBuffer:Hp,isArrayLike:Si,isArrayLikeObject:Sc,isBoolean:Kp,isBuffer:$i,isDate:Jp,isElement:Yp,isEmpty:Zp,isEqual:Qp,isEqualWith:Xp,isError:Ga,isFinite:tf,isFunction:Jr,isInteger:nf,isLength:wi,isMap:su,isMatch:rf,isMatchWith:of,isNaN:sf,isNative:uf,isNil:cf,isNull:df,isNumber:af,isObject:Br,isObjectLike:Sr,isPlainObject:Ya,isRegExp:ff,isSafeInteger:gf,isSet:uu,isString:gp,isSymbol:Er,isTypedArray:Ki,isUndefined:vf,isWeakMap:mf,isWeakSet:yf,lt:Pf,lte:Nf,toArray:oh,toFinite:Vr,toInteger:Hr,toLength:yd,toNumber:Fr,toPlainObject:kc,toSafeInteger:xm,toString:La},Oy={add:Mr,ceil:dl,divide:Hc,floor:Vd,max:Df,maxBy:zf,mean:Vf,meanBy:Hf,min:Qf,minBy:Xf,multiply:th,round:Yg,subtract:$v,sum:Wv,sumBy:Dv},jy=ml,Ay=hp,Ly=Ag,Ry={assign:na,assignIn:sa,assignInWith:ua,assignWith:da,at:Fa,create:cc,defaults:_c,defaultsDeep:Lc,entries:ad,entriesIn:sd,extend:sa,extendWith:ua,findKey:Od,findLastKey:Md,forIn:Jd,forInRight:Yd,forOwn:Gd,forOwnRight:Zd,functions:ep,functionsIn:tp,get:Na,has:dp,hasIn:Vu,invert:Pp,invertBy:$p,invoke:zp,keys:Xi,keysIn:ia,mapKeys:If,mapValues:Tf,merge:qf,mergeWith:Ac,omit:fh,omitBy:mh,pick:ug,pickBy:vh,result:Kg,set:rv,setWith:ov,toPairs:ad,toPairsIn:sd,transform:wm,unset:Jm,update:Xm,updateWith:ey,values:mp,valuesIn:ry},My={at:ly,chain:pl,commit:bu,lodash:No,next:ih,plant:cg,reverse:cy,tap:Kv,thru:cm,toIterator:hm,toJSON:vm,value:vm,valueOf:vm,wrapperChain:uy},Py={camelCase:al,capitalize:ks,deburr:Rs,endsWith:od,escape:dd,escapeRegExp:hd,kebabCase:Sf,lowerCase:Lf,lowerFirst:Rf,pad:Gh,padEnd:Zh,padStart:Qh,parseInt:tg,repeat:Ug,replace:Vg,snakeCase:dv,split:Av,startCase:Pv,startsWith:Nv,template:lm,templateSettings:Xv,toLower:mm,toUpper:_m,trim:km,trimEnd:Cm,trimStart:jm,truncate:Lm,unescape:Im,upperCase:ny,upperFirst:Es,words:nl},Ny={attempt:Qa,bindAll:rs,cond:Yu,conforms:Zu,constant:Fo,defaultTo:mc,flow:Kd,flowRight:qd,identity:qr,iteratee:bf,matches:Bf,matchesProperty:$f,method:Yf,methodOf:Zf,mixin:eh,noop:Eo,nthArg:lh,over:Sh,overEvery:jh,overSome:Ah,property:qu,propertyOf:dg,range:Pg,rangeRight:Ng,stubArray:Cl,stubFalse:Ni,stubObject:Iv,stubString:Tv,stubTrue:Bv,times:fm,toPath:ym,uniqueId:qm};var Iy=Math.max,Ty=Math.min;var By=Math.min;var $y,Wy=4294967295,Dy=Array.prototype,zy=Object.prototype.hasOwnProperty,Fy=gr?gr.iterator:void 0,Uy=Math.max,Vy=Math.min,Hy=function(e){return function(t,n,r){if(null==r){var o=Br(n),i=o&&Xi(n),a=i&&i.length&&Xd(n,i);(a?a.length:o)||(r=n,n=t,t=this)}return e(t,n,r)}}(eh);No.after=ky.after,No.ary=ky.ary,No.assign=Ry.assign,No.assignIn=Ry.assignIn,No.assignInWith=Ry.assignInWith,No.assignWith=Ry.assignWith,No.at=Ry.at,No.before=ky.before,No.bind=ky.bind,No.bindAll=Ny.bindAll,No.bindKey=ky.bindKey,No.castArray=Cy.castArray,No.chain=My.chain,No.chunk=wy.chunk,No.compact=wy.compact,No.concat=wy.concat,No.cond=Ny.cond,No.conforms=Ny.conforms,No.constant=Ny.constant,No.countBy=Sy.countBy,No.create=Ry.create,No.curry=ky.curry,No.curryRight=ky.curryRight,No.debounce=ky.debounce,No.defaults=Ry.defaults,No.defaultsDeep=Ry.defaultsDeep,No.defer=ky.defer,No.delay=ky.delay,No.difference=wy.difference,No.differenceBy=wy.differenceBy,No.differenceWith=wy.differenceWith,No.drop=wy.drop,No.dropRight=wy.dropRight,No.dropRightWhile=wy.dropRightWhile,No.dropWhile=wy.dropWhile,No.fill=wy.fill,No.filter=Sy.filter,No.flatMap=Sy.flatMap,No.flatMapDeep=Sy.flatMapDeep,No.flatMapDepth=Sy.flatMapDepth,No.flatten=wy.flatten,No.flattenDeep=wy.flattenDeep,No.flattenDepth=wy.flattenDepth,No.flip=ky.flip,No.flow=Ny.flow,No.flowRight=Ny.flowRight,No.fromPairs=wy.fromPairs,No.functions=Ry.functions,No.functionsIn=Ry.functionsIn,No.groupBy=Sy.groupBy,No.initial=wy.initial,No.intersection=wy.intersection,No.intersectionBy=wy.intersectionBy,No.intersectionWith=wy.intersectionWith,No.invert=Ry.invert,No.invertBy=Ry.invertBy,No.invokeMap=Sy.invokeMap,No.iteratee=Ny.iteratee,No.keyBy=Sy.keyBy,No.keys=Xi,No.keysIn=Ry.keysIn,No.map=Sy.map,No.mapKeys=Ry.mapKeys,No.mapValues=Ry.mapValues,No.matches=Ny.matches,No.matchesProperty=Ny.matchesProperty,No.memoize=ky.memoize,No.merge=Ry.merge,No.mergeWith=Ry.mergeWith,No.method=Ny.method,No.methodOf=Ny.methodOf,No.mixin=Hy,No.negate=nh,No.nthArg=Ny.nthArg,No.omit=Ry.omit,No.omitBy=Ry.omitBy,No.once=ky.once,No.orderBy=Sy.orderBy,No.over=Ny.over,No.overArgs=ky.overArgs,No.overEvery=Ny.overEvery,No.overSome=Ny.overSome,No.partial=ky.partial,No.partialRight=ky.partialRight,No.partition=Sy.partition,No.pick=Ry.pick,No.pickBy=Ry.pickBy,No.property=Ny.property,No.propertyOf=Ny.propertyOf,No.pull=wy.pull,No.pullAll=wy.pullAll,No.pullAllBy=wy.pullAllBy,No.pullAllWith=wy.pullAllWith,No.pullAt=wy.pullAt,No.range=Ny.range,No.rangeRight=Ny.rangeRight,No.rearg=ky.rearg,No.reject=Sy.reject,No.remove=wy.remove,No.rest=ky.rest,No.reverse=wy.reverse,No.sampleSize=Sy.sampleSize,No.set=Ry.set,No.setWith=Ry.setWith,No.shuffle=Sy.shuffle,No.slice=wy.slice,No.sortBy=Sy.sortBy,No.sortedUniq=wy.sortedUniq,No.sortedUniqBy=wy.sortedUniqBy,No.split=Py.split,No.spread=ky.spread,No.tail=wy.tail,No.take=wy.take,No.takeRight=wy.takeRight,No.takeRightWhile=wy.takeRightWhile,No.takeWhile=wy.takeWhile,No.tap=My.tap,No.throttle=ky.throttle,No.thru=cm,No.toArray=Cy.toArray,No.toPairs=Ry.toPairs,No.toPairsIn=Ry.toPairsIn,No.toPath=Ny.toPath,No.toPlainObject=Cy.toPlainObject,No.transform=Ry.transform,No.unary=ky.unary,No.union=wy.union,No.unionBy=wy.unionBy,No.unionWith=wy.unionWith,No.uniq=wy.uniq,No.uniqBy=wy.uniqBy,No.uniqWith=wy.uniqWith,No.unset=Ry.unset,No.unzip=wy.unzip,No.unzipWith=wy.unzipWith,No.update=Ry.update,No.updateWith=Ry.updateWith,No.values=Ry.values,No.valuesIn=Ry.valuesIn,No.without=wy.without,No.words=Py.words,No.wrap=ky.wrap,No.xor=wy.xor,No.xorBy=wy.xorBy,No.xorWith=wy.xorWith,No.zip=wy.zip,No.zipObject=wy.zipObject,No.zipObjectDeep=wy.zipObjectDeep,No.zipWith=wy.zipWith,No.entries=Ry.toPairs,No.entriesIn=Ry.toPairsIn,No.extend=Ry.assignIn,No.extendWith=Ry.assignInWith,Hy(No,No),No.add=Oy.add,No.attempt=Ny.attempt,No.camelCase=Py.camelCase,No.capitalize=Py.capitalize,No.ceil=Oy.ceil,No.clamp=jy,No.clone=Cy.clone,No.cloneDeep=Cy.cloneDeep,No.cloneDeepWith=Cy.cloneDeepWith,No.cloneWith=Cy.cloneWith,No.conformsTo=Cy.conformsTo,No.deburr=Py.deburr,No.defaultTo=Ny.defaultTo,No.divide=Oy.divide,No.endsWith=Py.endsWith,No.eq=Cy.eq,No.escape=Py.escape,No.escapeRegExp=Py.escapeRegExp,No.every=Sy.every,No.find=Sy.find,No.findIndex=wy.findIndex,No.findKey=Ry.findKey,No.findLast=Sy.findLast,No.findLastIndex=wy.findLastIndex,No.findLastKey=Ry.findLastKey,No.floor=Oy.floor,No.forEach=Sy.forEach,No.forEachRight=Sy.forEachRight,No.forIn=Ry.forIn,No.forInRight=Ry.forInRight,No.forOwn=Ry.forOwn,No.forOwnRight=Ry.forOwnRight,No.get=Ry.get,No.gt=Cy.gt,No.gte=Cy.gte,No.has=Ry.has,No.hasIn=Ry.hasIn,No.head=wy.head,No.identity=qr,No.includes=Sy.includes,No.indexOf=wy.indexOf,No.inRange=Ay,No.invoke=Ry.invoke,No.isArguments=Cy.isArguments,No.isArray=Or,No.isArrayBuffer=Cy.isArrayBuffer,No.isArrayLike=Cy.isArrayLike,No.isArrayLikeObject=Cy.isArrayLikeObject,No.isBoolean=Cy.isBoolean,No.isBuffer=Cy.isBuffer,No.isDate=Cy.isDate,No.isElement=Cy.isElement,No.isEmpty=Cy.isEmpty,No.isEqual=Cy.isEqual,No.isEqualWith=Cy.isEqualWith,No.isError=Cy.isError,No.isFinite=Cy.isFinite,No.isFunction=Cy.isFunction,No.isInteger=Cy.isInteger,No.isLength=Cy.isLength,No.isMap=Cy.isMap,No.isMatch=Cy.isMatch,No.isMatchWith=Cy.isMatchWith,No.isNaN=Cy.isNaN,No.isNative=Cy.isNative,No.isNil=Cy.isNil,No.isNull=Cy.isNull,No.isNumber=Cy.isNumber,No.isObject=Br,No.isObjectLike=Cy.isObjectLike,No.isPlainObject=Cy.isPlainObject,No.isRegExp=Cy.isRegExp,No.isSafeInteger=Cy.isSafeInteger,No.isSet=Cy.isSet,No.isString=Cy.isString,No.isSymbol=Cy.isSymbol,No.isTypedArray=Cy.isTypedArray,No.isUndefined=Cy.isUndefined,No.isWeakMap=Cy.isWeakMap,No.isWeakSet=Cy.isWeakSet,No.join=wy.join,No.kebabCase=Py.kebabCase,No.last=Dc,No.lastIndexOf=wy.lastIndexOf,No.lowerCase=Py.lowerCase,No.lowerFirst=Py.lowerFirst,No.lt=Cy.lt,No.lte=Cy.lte,No.max=Oy.max,No.maxBy=Oy.maxBy,No.mean=Oy.mean,No.meanBy=Oy.meanBy,No.min=Oy.min,No.minBy=Oy.minBy,No.stubArray=Ny.stubArray,No.stubFalse=Ny.stubFalse,No.stubObject=Ny.stubObject,No.stubString=Ny.stubString,No.stubTrue=Ny.stubTrue,No.multiply=Oy.multiply,No.nth=wy.nth,No.noop=Ny.noop,No.now=Ey.now,No.pad=Py.pad,No.padEnd=Py.padEnd,No.padStart=Py.padStart,No.parseInt=Py.parseInt,No.random=Ly,No.reduce=Sy.reduce,No.reduceRight=Sy.reduceRight,No.repeat=Py.repeat,No.replace=Py.replace,No.result=Ry.result,No.round=Oy.round,No.sample=Sy.sample,No.size=Sy.size,No.snakeCase=Py.snakeCase,No.some=Sy.some,No.sortedIndex=wy.sortedIndex,No.sortedIndexBy=wy.sortedIndexBy,No.sortedIndexOf=wy.sortedIndexOf,No.sortedLastIndex=wy.sortedLastIndex,No.sortedLastIndexBy=wy.sortedLastIndexBy,No.sortedLastIndexOf=wy.sortedLastIndexOf,No.startCase=Py.startCase,No.startsWith=Py.startsWith,No.subtract=Oy.subtract,No.sum=Oy.sum,No.sumBy=Oy.sumBy,No.template=Py.template,No.times=Ny.times,No.toFinite=Cy.toFinite,No.toInteger=Hr,No.toLength=Cy.toLength,No.toLower=Py.toLower,No.toNumber=Cy.toNumber,No.toSafeInteger=Cy.toSafeInteger,No.toString=Cy.toString,No.toUpper=Py.toUpper,No.trim=Py.trim,No.trimEnd=Py.trimEnd,No.trimStart=Py.trimStart,No.truncate=Py.truncate,No.unescape=Py.unescape,No.uniqueId=Ny.uniqueId,No.upperCase=Py.upperCase,No.upperFirst=Py.upperFirst,No.each=Sy.forEach,No.eachRight=Sy.forEachRight,No.first=wy.head,Hy(No,($y={},nc(No,function(e,t){zy.call(No.prototype,t)||($y[t]=e)}),$y),{chain:!1}),No.VERSION="4.17.23",(No.templateSettings=Py.templateSettings).imports._=No,qo(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){No[e].placeholder=No}),qo(["drop","take"],function(e,t){So.prototype[e]=function(n){n=void 0===n?1:Uy(Hr(n),0);var r=this.__filtered__&&!t?new So(this):this.clone();return r.__filtered__?r.__takeCount__=Vy(n,r.__takeCount__):r.__views__.push({size:Vy(n,Wy),type:e+(r.__dir__<0?"Right":"")}),r},So.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}}),qo(["filter","map","takeWhile"],function(e,t){var n=t+1,r=1==n||3==n;So.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:Ju(e),type:n}),t.__filtered__=t.__filtered__||r,t}}),qo(["head","last"],function(e,t){var n="take"+(t?"Right":"");So.prototype[e]=function(){return this[n](1).value()[0]}}),qo(["initial","tail"],function(e,t){var n="drop"+(t?"":"Right");So.prototype[e]=function(){return this.__filtered__?new So(this):this[n](1)}}),So.prototype.compact=function(){return this.filter(qr)},So.prototype.find=function(e){return this.filter(e).head()},So.prototype.findLast=function(e){return this.reverse().find(e)},So.prototype.invokeMap=_i(function(e,t){return"function"==typeof e?new So(this):this.map(function(n){return Dp(n,e,t)})}),So.prototype.reject=function(e){return this.filter(nh(Ju(e)))},So.prototype.slice=function(e,t){e=Hr(e);var n=this;return n.__filtered__&&(e>0||t<0)?new So(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),void 0!==t&&(n=(t=Hr(t))<0?n.dropRight(-t):n.take(t-e)),n)},So.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},So.prototype.toArray=function(){return this.take(Wy)},nc(So.prototype,function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),o=No[r?"take"+("last"==t?"Right":""):t],i=r||/^find/.test(t);o&&(No.prototype[t]=function(){var t=this.__wrapped__,a=r?[1]:arguments,s=t instanceof So,l=a[0],u=s||Or(t),c=function(e){var t=o.apply(No,Ta([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 So(this);var g=e.apply(t,a);return g.__actions__.push({func:cm,args:[c],thisArg:void 0}),new Lo(g,d)}return f&&h?e.apply(this,a):(g=this.thru(c),f?r?g.value()[0]:g.value():g)})}),qo(["pop","push","shift","sort","splice","unshift"],function(e){var t=Dy[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);No.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var o=this.value();return t.apply(Or(o)?o:[],e)}return this[n](function(n){return t.apply(Or(n)?n:[],e)})}}),nc(So.prototype,function(e,t){var n=No[t];if(n){var r=n.name+"";zy.call(Oo,r)||(Oo[r]=[]),Oo[r].push({name:t,func:n})}}),Oo[si(void 0,2).name]=[{name:"wrapper",func:void 0}],So.prototype.clone=function(){var e=new So(this.__wrapped__);return e.__actions__=Ro(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Ro(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Ro(this.__views__),e},So.prototype.reverse=function(){if(this.__filtered__){var e=new So(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},So.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Or(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=Ty(t,e+a);break;case"takeRight":e=Iy(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=By(l,this.__takeCount__);if(!n||!r&&o==l&&f==l)return gm(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,x=y(v);if(2==b)v=x;else if(!x){if(1==b)continue e;break e}}h[p++]=v}return h},No.prototype.at=My.at,No.prototype.chain=My.wrapperChain,No.prototype.commit=My.commit,No.prototype.next=My.next,No.prototype.plant=My.plant,No.prototype.reverse=My.reverse,No.prototype.toJSON=No.prototype.valueOf=No.prototype.value=My.value,No.prototype.first=No.prototype.head,Fy&&(No.prototype[Fy]=My.toIterator);var Ky=p(Object.freeze({__proto__:null,add:Mr,after:Kr,ary:fi,assign:na,assignIn:sa,assignInWith:ua,assignWith:da,at:Fa,attempt:Qa,before:Xa,bind:ts,bindAll:rs,bindKey:is,camelCase:al,capitalize:ks,castArray:sl,ceil:dl,chain:pl,chunk:gl,clamp:ml,clone:gu,cloneDeep:vu,cloneDeepWith:mu,cloneWith:yu,commit:bu,compact:xu,concat:_u,cond:Yu,conforms:Zu,conformsTo:Qu,constant:Fo,countBy:uc,create:cc,curry:dc,curryRight:pc,debounce:vc,deburr:Rs,defaultTo:mc,defaults:_c,defaultsDeep:Lc,defer:Pc,delay:Ic,difference:Wc,differenceBy:Fc,differenceWith:Vc,divide:Hc,drop:Kc,dropRight:qc,dropRightWhile:Yc,dropWhile:Gc,each:Qc,eachRight:rd,endsWith:od,entries:ad,entriesIn:sd,eq:gi,escape:dd,escapeRegExp:hd,every:md,extend:sa,extendWith:ua,fill:bd,filter:_d,find:kd,findIndex:Ed,findKey:Od,findLast:Rd,findLastIndex:Ld,findLastKey:Md,first:Pd,flatMap:Td,flatMapDeep:$d,flatMapDepth:Wd,flatten:Da,flattenDeep:zd,flattenDepth:Fd,flip:Ud,floor:Vd,flow:Kd,flowRight:qd,forEach:Qc,forEachRight:rd,forIn:Jd,forInRight:Yd,forOwn:Gd,forOwnRight:Zd,fromPairs:Qd,functions:ep,functionsIn:tp,get:Na,groupBy:op,gt:sp,gte:lp,has:dp,hasIn:Vu,head:Pd,identity:qr,inRange:hp,includes:bp,indexOf:_p,initial:wp,intersection:Cp,intersectionBy:jp,intersectionWith:Ap,invert:Pp,invertBy:$p,invoke:zp,invokeMap:Up,isArguments:Pi,isArray:Or,isArrayBuffer:Hp,isArrayLike:Si,isArrayLikeObject:Sc,isBoolean:Kp,isBuffer:$i,isDate:Jp,isElement:Yp,isEmpty:Zp,isEqual:Qp,isEqualWith:Xp,isError:Ga,isFinite:tf,isFunction:Jr,isInteger:nf,isLength:wi,isMap:su,isMatch:rf,isMatchWith:of,isNaN:sf,isNative:uf,isNil:cf,isNull:df,isNumber:af,isObject:Br,isObjectLike:Sr,isPlainObject:Ya,isRegExp:ff,isSafeInteger:gf,isSet:uu,isString:gp,isSymbol:Er,isTypedArray:Ki,isUndefined:vf,isWeakMap:mf,isWeakSet:yf,iteratee:bf,join:_f,kebabCase:Sf,keyBy:kf,keys:Xi,keysIn:ia,last:Dc,lastIndexOf:jf,lodash:No,lowerCase:Lf,lowerFirst:Rf,lt:Pf,lte:Nf,map:Id,mapKeys:If,mapValues:Tf,matches:Bf,matchesProperty:$f,max:Df,maxBy:zf,mean:Vf,meanBy:Hf,memoize:ka,merge:qf,mergeWith:Ac,method:Yf,methodOf:Zf,min:Qf,minBy:Xf,mixin:eh,multiply:th,negate:nh,next:ih,noop:Eo,now:fc,nth:sh,nthArg:lh,omit:fh,omitBy:mh,once:yh,orderBy:_h,over:Sh,overArgs:Oh,overEvery:jh,overSome:Ah,pad:Gh,padEnd:Zh,padStart:Qh,parseInt:tg,partial:rg,partialRight:ig,partition:sg,pick:ug,pickBy:vh,plant:cg,property:qu,propertyOf:dg,pull:vg,pullAll:gg,pullAllBy:mg,pullAllWith:yg,pullAt:wg,random:Ag,range:Pg,rangeRight:Ng,rearg:Tg,reduce:$g,reduceRight:Dg,reject:zg,remove:Fg,repeat:Ug,replace:Vg,rest:Hg,result:Kg,reverse:Jg,round:Yg,sample:Qg,sampleSize:nv,set:rv,setWith:ov,shuffle:sv,size:lv,slice:uv,snakeCase:dv,some:fv,sortBy:gv,sortedIndex:xv,sortedIndexBy:_v,sortedIndexOf:wv,sortedLastIndex:Sv,sortedLastIndexBy:Ev,sortedLastIndexOf:kv,sortedUniq:Ov,sortedUniqBy:jv,split:Av,spread:Rv,startCase:Pv,startsWith:Nv,stubArray:Cl,stubFalse:Ni,stubObject:Iv,stubString:Tv,stubTrue:Bv,subtract:$v,sum:Wv,sumBy:Dv,tail:zv,take:Fv,takeRight:Uv,takeRightWhile:Vv,takeWhile:Hv,tap:Kv,template:lm,templateSettings:Xv,throttle:um,thru:cm,times:fm,toArray:oh,toFinite:Vr,toInteger:Hr,toIterator:hm,toJSON:vm,toLength:yd,toLower:mm,toNumber:Fr,toPairs:ad,toPairsIn:sd,toPath:ym,toPlainObject:kc,toSafeInteger:xm,toString:La,toUpper:_m,transform:wm,trim:km,trimEnd:Cm,trimStart:jm,truncate:Lm,unary:Rm,unescape:Im,union:Wm,unionBy:zm,unionWith:Fm,uniq:Um,uniqBy:Vm,uniqWith:Hm,uniqueId:qm,unset:Jm,unzip:Gm,unzipWith:Zm,update:Xm,updateWith:ey,upperCase:ny,upperFirst:Es,value:vm,valueOf:vm,values:mp,valuesIn:ry,without:iy,words:nl,wrap:ay,wrapperAt:ly,wrapperChain:uy,wrapperCommit:bu,wrapperLodash:No,wrapperNext:ih,wrapperPlant:cg,wrapperReverse:cy,wrapperToIterator:hm,wrapperValue:vm,xor:py,xorBy:hy,xorWith:gy,zip:vy,zipObject:yy,zipObjectDeep:by,zipWith:_y,default:No})),qy={};Object.defineProperty(qy,"__esModule",{value:!0});class Jy extends CustomEvent{constructor(e,t,n){super(Jy.TYPE,{bubbles:!0,composed:!0,detail:{complete:t,component:e,hasModel:n}}),this.component=e,this.complete=t}}Jy.TYPE="model-set",qy.ModelSetEvent=Jy;class Yy extends CustomEvent{constructor(e,t){super(Yy.TYPE,{bubbles:!0,composed:!0,detail:{complete:t,component:e}}),this.component=e,this.complete=t}}Yy.TYPE="session-changed",qy.SessionChangedEvent=Yy;var Gy={};Object.defineProperty(Gy,"__esModule",{value:!0}),Gy.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)},Gy.updateSessionValue=function(e,t,n){e.value=e.value||[],"checkbox"===t&&(n.selected?e.value=Array.from(new Set([...e.value,n.value])):e.value=e.value.filter(e=>e!==n.value));"radio"===t&&(n.selected?e.value=[n.value]:e.value=[]);e.selector=n.selector};const Zy=e,Qy=u,Xy=l,eb=i,tb=c;var nb=h.exports;Object.defineProperty(f,"__esModule",{value:!0});var rb=f.isComplete=f.default=void 0,ob=nb(g.exports),ib=nb(b),ab=nb(Zy),sb=Qy,lb=Ky,ub=nb(Xy),cb=qy,db=tb,pb=eb,fb=Gy,hb=kn;const gb=(0,ub.default)("pie-ui:multiple-choice"),vb=(e,t,n,r)=>{const{autoplayAudioEnabled:o,completeAudioEnabled:i}=t||{};if(o&&i&&!n&&r){const e=r.querySelector("audio"),t=e&&e.closest("#preview-prompt");if(e&&t)return!1}if(!e||!e.value)return!1;const{choiceMode:a,minSelections:s=1,maxSelections:l}=t||{},u=e.value.length||0;return"radio"===a?!!u:!(u<s||(0,hb.exceedsMaxSelections)(u,l))};function mb(e){const t=function(e){const t=e.closest("pie-player")||e.closest("pie-item-player");if(!t)return{baseHeadingLevel:void 0,includeSrHeading:!0};const n=(e,n,r)=>{let o=t[e];var i;return null==o&&(o=null!=(i=t.getAttribute(n))?i:(()=>t.getAttribute(r))()),o},r=n("baseHeadingLevel","base-heading-level","baseheadinglevel"),o=parseInt(r,10),i=Number.isFinite(o)&&o>=1&&o<=6?o:void 0,a=n("includeSrHeading","include-sr-heading","includesrheading");return{baseHeadingLevel:i,includeSrHeading:null==a||!1!==a&&"false"!==a}}(e);return{baseHeadingLevel:void 0!==e._baseHeadingLevel?e._baseHeadingLevel:t.baseHeadingLevel,includeSrHeading:void 0!==e._includeSrHeading?e._includeSrHeading:t.includeSrHeading}}rb=f.isComplete=vb;class yb extends HTMLElement{constructor(){super(),(0,ob.default)(this,"_scheduleMathRender",()=>{this._mathRenderPending||(this._mathRenderPending=!0,requestAnimationFrame(()=>{this._mathObserver&&this._mathObserver.disconnect(),gb("render complete - render math"),(0,db.renderMath)(this),this._mathRenderPending=!1,setTimeout(()=>{this._mathObserver&&this._mathObserver.observe(this,{childList:!0,subtree:!0})},50)}))}),this._model=null,this._session=null,this._options=null,this.audioComplete=!1,this._boundHandleKeyDown=this.handleKeyDown.bind(this),this._keyboardEventsEnabled=!1,this._audioInitialized=!1,this._root=null,this._mathObserver=null,this._mathRenderPending=!1,this._rerender=(0,lb.debounce)(()=>{if(this._model&&this._session){var e=ab.default.createElement(ib.default,{model:this._model,session:this._session,options:this._options,onChoiceChanged:this._onChange.bind(this),onShowCorrectToggle:this.onShowCorrectToggle.bind(this),...mb(this)});this.setAttribute("aria-label","radio"===this._model.choiceMode?"Multiple Choice Question":"Multiple Correct Answer Question"),this.setAttribute("role","region"),this.setLangAttribute(),this._initMathObserver(),this._root||(this._root=(0,sb.createRoot)(this)),this._root.render(e),!0!==this._model.keyboardEventsEnabled||this._keyboardEventsEnabled||this.enableKeyboardEvents()}else gb("skip")},50,{leading:!1,trailing:!0}),this._dispatchResponseChanged=(0,lb.debounce)(()=>{this.dispatchEvent(new cb.SessionChangedEvent(this.tagName.toLowerCase(),vb(this._session,this._model,this.audioComplete,this)))}),this._dispatchModelSet=(0,lb.debounce)(()=>{this.dispatchEvent(new cb.ModelSetEvent(this.tagName.toLowerCase(),vb(this._session,this._model,this.audioComplete,this),void 0!==this._model))},50,{leading:!1,trailing:!0})}_initMathObserver(){this._mathObserver||(this._mathObserver=new MutationObserver(this._scheduleMathRender),this._mathObserver.observe(this,{childList:!0,subtree:!0}))}_disconnectMathObserver(){this._mathObserver&&(this._mathObserver.disconnect(),this._mathObserver=null)}onShowCorrectToggle(){(0,db.renderMath)(this)}setLangAttribute(){const e=this._model&&(this._model.language,1)?this._model.language:"",t=e?e.slice(0,2):"en";this.setAttribute("lang",t)}set model(e){this._model=e,this._rerender(),this._audioInitialized=!1,this._dispatchModelSet()}get session(){return this._session}get options(){return this._options}set options(e){this._options=e,this._rerender()}set baseHeadingLevel(e){this._baseHeadingLevel=e,this._rerender()}set includeSrHeading(e){this._includeSrHeading=e,this._rerender()}set session(e){this._session=e,this._rerender(),this._dispatchResponseChanged()}_onChange(e){(0,fb.updateSessionValue)(this._session,this._model.choiceMode,e),this._dispatchResponseChanged(),this._rerender()}_createAudioInfoToast(){const e=document.createElement("div");e.id="play-audio-info",Object.assign(e.style,{position:"absolute",top:0,width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",background:"white",zIndex:"1000",cursor:"pointer"});const t=document.createElement("img");return t.src=pb.EnableAudioAutoplayImage,t.alt="Click anywhere to enable audio autoplay",t.width=500,t.height=300,e.appendChild(t),e}connectedCallback(){this._initMathObserver(),this._initPlayerObserver(),this._rerender();new MutationObserver((e,t)=>{e.forEach(e=>{if("childList"===e.type){if(this._audioInitialized)return;const e=this.querySelector("audio"),n=e&&e.closest("#preview-prompt");if(!this._model)return;if(!this._model.autoplayAudioEnabled)return;if(e&&!n)return;if(!e)return;const r=this._createAudioInfoToast(),o=this.querySelector("#main-container"),i=()=>{this.querySelector("#play-audio-info")&&(e.play(),o.removeChild(r)),document.removeEventListener("click",i)};setTimeout(()=>{e.paused&&!this.querySelector("#play-audio-info")?(o.appendChild(r),document.addEventListener("click",i)):document.removeEventListener("click",i)},500);const a=()=>{(0,fb.updateSessionMetadata)(this._session,{audioStartTime:(new Date).getTime()});const t=this.querySelector("#play-audio-info");t&&o.removeChild(t),e.removeEventListener("playing",a)};e.addEventListener("playing",a);const s=()=>{(0,fb.updateSessionMetadata)(this._session,{audioEndTime:(new Date).getTime()}),this.audioComplete=!0,this._dispatchResponseChanged(),e.removeEventListener("ended",s)};e.addEventListener("ended",s),this._audio=e,this._handlePlaying=a,this._handleEnded=s,this._enableAudio=i,this._audioInitialized=!0,t.disconnect()}})}).observe(this,{childList:!0,subtree:!0})}enableKeyboardEvents(){this._keyboardEventsEnabled||(window.addEventListener("keydown",this._boundHandleKeyDown),this._keyboardEventsEnabled=!0)}_initPlayerObserver(){const e=this.closest("pie-player")||this.closest("pie-item-player");e&&(this._playerObserver=new MutationObserver(()=>{this._rerender()}),this._playerObserver.observe(e,{attributes:!0,attributeFilter:["base-heading-level","baseheadinglevel","include-sr-heading","includesrheading"]}))}_disconnectPlayerObserver(){this._playerObserver&&(this._playerObserver.disconnect(),this._playerObserver=null)}disconnectedCallback(){this._disconnectMathObserver(),this._disconnectPlayerObserver(),this._keyboardEventsEnabled&&(window.removeEventListener("keydown",this._boundHandleKeyDown),this._keyboardEventsEnabled=!1),document.removeEventListener("click",this._enableAudio),this._audio&&(this._audio.removeEventListener("playing",this._handlePlaying),this._audio.removeEventListener("ended",this._handleEnded),this._audio=null),this._root&&(this._root.unmount(),this._root=null)}handleKeyDown(e){if(!this._model||!this._session)return;const{mode:t}=this._model;if("gather"!==t)return;const n=(e=>{const t=e>="1"&&e<="9"?e-"1":"0"===e?9:-1,n=/^[a-jA-J]$/.test(e)?e.toLowerCase().charCodeAt(0)-"a".charCodeAt(0):-1;return t>=0?t:n})(e.key);if(void 0===n||n<=-1||n>=function(e){let t,n=e[0],r=1;for(;r<e.length;){const o=e[r],i=e[r+1];if(r+=2,("optionalAccess"===o||"optionalCall"===o)&&null==n)return;"access"===o||"optionalAccess"===o?(t=n,n=i(n)):"call"!==o&&"optionalCall"!==o||(n=i((...e)=>n.call(t,...e)),t=void 0)}return n}([this,"access",e=>e._model,"access",e=>e.choices,"optionalAccess",e=>e.length]))return;const r=this._session.value||[],o=this._model.choices[n].value,i=r.includes(o),a={value:o,selected:"radio"===this._model.choiceMode||!i,selector:"Keyboard"};this._onChange(a)}}var bb=f.default=yb;export{bb as default,rb as isComplete};
|