@pie-element/multiple-choice 13.1.0 → 13.2.0-next.0

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