@pie-element/multiple-choice 13.4.3 → 13.4.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,10 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [13.4.4](https://github.com/pie-framework/pie-elements/compare/@pie-element/multiple-choice@13.4.3...@pie-element/multiple-choice@13.4.4) (2026-09-22)
7
+
8
+ **Note:** Version bump only for package @pie-element/multiple-choice
9
+
6
10
  ## [13.4.3](https://github.com/pie-framework/pie-elements/compare/@pie-element/multiple-choice@13.4.2...@pie-element/multiple-choice@13.4.3) (2026-09-17)
7
11
 
8
12
  **Note:** Version bump only for package @pie-element/multiple-choice
@@ -3,6 +3,10 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [10.2.4](https://github.com/pie-framework/pie-elements/compare/@pie-element/multiple-choice-configure@10.2.3...@pie-element/multiple-choice-configure@10.2.4) (2026-09-22)
7
+
8
+ **Note:** Version bump only for package @pie-element/multiple-choice-configure
9
+
6
10
  ## [10.2.3](https://github.com/pie-framework/pie-elements/compare/@pie-element/multiple-choice-configure@10.2.2...@pie-element/multiple-choice-configure@10.2.3) (2026-09-17)
7
11
 
8
12
  **Note:** Version bump only for package @pie-element/multiple-choice-configure
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pie-element/multiple-choice-configure",
3
- "version": "10.2.3",
3
+ "version": "10.2.4",
4
4
  "private": true,
5
5
  "main": "lib/index.js",
6
6
  "module": "src/index.js",
@@ -10,9 +10,9 @@
10
10
  "@mui/icons-material": "^7.3.4",
11
11
  "@mui/material": "^7.3.4",
12
12
  "@pie-framework/pie-configure-events": "^1.3.0",
13
- "@pie-lib/config-ui": "13.0.20",
14
- "@pie-lib/editable-html-tip-tap": "2.1.18",
15
- "@pie-lib/render-ui": "7.0.2",
13
+ "@pie-lib/config-ui": "13.0.21",
14
+ "@pie-lib/editable-html-tip-tap": "2.1.19",
15
+ "@pie-lib/render-ui": "7.0.3",
16
16
  "debug": "^4.1.1",
17
17
  "lodash-es": "^4.17.23",
18
18
  "prop-types": "^15.8.1",
package/module/index.html CHANGED
@@ -2,7 +2,7 @@
2
2
  <!doctype html>
3
3
  <html>
4
4
  <head>
5
- <title>@pie-element/multiple-choice@13.4.3</title>
5
+ <title>@pie-element/multiple-choice@13.4.4</title>
6
6
  <script
7
7
  type="module"
8
8
  src="https://cdn.jsdelivr.net/npm/@pslb/demo-el@^1.0.0/dist/demo-el/demo-el.esm.js"></script>
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pie-element/multiple-choice",
3
- "version": "13.4.3",
3
+ "version": "13.4.4",
4
4
  "modules": [
5
5
  {
6
6
  "name": "@pie-lib/shared-module",
package/module/print.html CHANGED
@@ -2,7 +2,7 @@
2
2
  <!doctype html>
3
3
  <html>
4
4
  <head>
5
- <title>@pie-element/multiple-choice@13.4.3</title>
5
+ <title>@pie-element/multiple-choice@13.4.4</title>
6
6
  <link
7
7
  href="https://fonts.googleapis.com/css?family=Roboto&display=swap"
8
8
  rel="stylesheet"
package/module/print.js CHANGED
@@ -1 +1 @@
1
- import{_dll_prop_types as e,_dll_react as t,_dll_mui__material_styles as n,_dll_react_dom as o,_dll_mui__material_colors as r,_dll_mui__material as i,_dll_debug as s,_dll_mui__material_collapse as a,_dll_classnames as l,_dll_react_dom_client as c}from"../../../@pie-lib/shared-module@6.0.0/module/index.js";import{_dll_pie_lib__math_rendering as p}from"../../../@pie-lib/math-rendering-module@6.0.0/module/index.js";var d="object"==typeof global&&global&&global.Object===Object&&global,u="object"==typeof self&&self&&self.Object===Object&&self,h=d||u||Function("return this")(),g=h.Symbol,f=Object.prototype,m=f.hasOwnProperty,y=f.toString,b=g?g.toStringTag:void 0;var v=Object.prototype.toString;var x=g?g.toStringTag:void 0;function E(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":x&&x in Object(e)?function(e){var t=m.call(e,b),n=e[b];try{e[b]=void 0;var o=!0}catch(e){}var r=y.call(e);return o&&(t?e[b]=n:delete e[b]),r}(e):function(e){return v.call(e)}(e)}function C(e){return null!=e&&"object"==typeof e}var S=Array.isArray,k=/\s/;var w=/^\s+/;function _(e){return e?e.slice(0,function(e){for(var t=e.length;t--&&k.test(e.charAt(t)););return t}(e)+1).replace(w,""):e}function A(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}var O=/^[-+]0x[0-9a-f]+$/i,R=/^0b[01]+$/i,L=/^0o[0-7]+$/i,j=parseInt;function N(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||C(e)&&"[object Symbol]"==E(e)}(e))return NaN;if(A(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=A(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=_(e);var n=R.test(e);return n||L.test(e)?j(e.slice(2),n?2:8):O.test(e)?NaN:+e}function T(e){if(!A(e))return!1;var t=E(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}var M,P=h["__core-js_shared__"],F=(M=/[^.]+$/.exec(P&&P.keys&&P.keys.IE_PROTO||""))?"Symbol(src)_1."+M:"";var I=Function.prototype.toString;function $(e){if(null!=e){try{return I.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var B=/^\[object .+?Constructor\]$/,D=Function.prototype,z=Object.prototype,U=D.toString,H=z.hasOwnProperty,V=RegExp("^"+U.call(H).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function q(e){return!(!A(e)||(t=e,F&&F in t))&&(T(e)?V:B).test($(e));var t}function K(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return q(n)?n:void 0}var W=K(h,"WeakMap"),Y=Object.create,G=function(){function e(){}return function(t){if(!A(t))return{};if(Y)return Y(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();var J=function(){try{var e=K(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();var Q=/^(?:0|[1-9]\d*)$/;function X(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&Q.test(e))&&e>-1&&e%1==0&&e<t}function Z(e,t,n){"__proto__"==t&&J?J(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function ee(e,t){return e===t||e!=e&&t!=t}var te=Object.prototype.hasOwnProperty;function ne(e,t,n){var o=e[t];te.call(e,t)&&ee(o,n)&&(void 0!==n||t in e)||Z(e,t,n)}function oe(e,t,n,o){var r=!n;n||(n={});for(var i=-1,s=t.length;++i<s;){var a=t[i],l=o?o(n[a],e[a],a,n,e):void 0;void 0===l&&(l=e[a]),r?Z(n,a,l):ne(n,a,l)}return n}function re(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}function ie(e){return null!=e&&re(e.length)&&!T(e)}var se=Object.prototype;function ae(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||se)}function le(e){return C(e)&&"[object Arguments]"==E(e)}var ce=Object.prototype,pe=ce.hasOwnProperty,de=ce.propertyIsEnumerable,ue=le(function(){return arguments}())?le:function(e){return C(e)&&pe.call(e,"callee")&&!de.call(e,"callee")};var he="object"==typeof exports&&exports&&!exports.nodeType&&exports,ge=he&&"object"==typeof module&&module&&!module.nodeType&&module,fe=ge&&ge.exports===he?h.Buffer:void 0,me=(fe?fe.isBuffer:void 0)||function(){return!1},ye={};function be(e){return function(t){return e(t)}}ye["[object Float32Array]"]=ye["[object Float64Array]"]=ye["[object Int8Array]"]=ye["[object Int16Array]"]=ye["[object Int32Array]"]=ye["[object Uint8Array]"]=ye["[object Uint8ClampedArray]"]=ye["[object Uint16Array]"]=ye["[object Uint32Array]"]=!0,ye["[object Arguments]"]=ye["[object Array]"]=ye["[object ArrayBuffer]"]=ye["[object Boolean]"]=ye["[object DataView]"]=ye["[object Date]"]=ye["[object Error]"]=ye["[object Function]"]=ye["[object Map]"]=ye["[object Number]"]=ye["[object Object]"]=ye["[object RegExp]"]=ye["[object Set]"]=ye["[object String]"]=ye["[object WeakMap]"]=!1;var ve="object"==typeof exports&&exports&&!exports.nodeType&&exports,xe=ve&&"object"==typeof module&&module&&!module.nodeType&&module,Ee=xe&&xe.exports===ve&&d.process,Ce=function(){try{var e=xe&&xe.require&&xe.require("util").types;return e||Ee&&Ee.binding&&Ee.binding("util")}catch(e){}}(),Se=Ce&&Ce.isTypedArray,ke=Se?be(Se):function(e){return C(e)&&re(e.length)&&!!ye[E(e)]},we=Object.prototype.hasOwnProperty;function _e(e,t){var n=S(e),o=!n&&ue(e),r=!n&&!o&&me(e),i=!n&&!o&&!r&&ke(e),s=n||o||r||i,a=s?function(e,t){for(var n=-1,o=Array(e);++n<e;)o[n]=t(n);return o}(e.length,String):[],l=a.length;for(var c in e)!t&&!we.call(e,c)||s&&("length"==c||r&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||X(c,l))||a.push(c);return a}function Ae(e,t){return function(n){return e(t(n))}}var Oe=Ae(Object.keys,Object),Re=Object.prototype.hasOwnProperty;function Le(e){return ie(e)?_e(e):function(e){if(!ae(e))return Oe(e);var t=[];for(var n in Object(e))Re.call(e,n)&&"constructor"!=n&&t.push(n);return t}(e)}var je=Object.prototype.hasOwnProperty;function Ne(e){if(!A(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=ae(e),n=[];for(var o in e)("constructor"!=o||!t&&je.call(e,o))&&n.push(o);return n}function Te(e){return ie(e)?_e(e,!0):Ne(e)}var Me=K(Object,"create");var Pe=Object.prototype.hasOwnProperty;var Fe=Object.prototype.hasOwnProperty;function Ie(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}function $e(e,t){for(var n=e.length;n--;)if(ee(e[n][0],t))return n;return-1}Ie.prototype.clear=function(){this.__data__=Me?Me(null):{},this.size=0},Ie.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Ie.prototype.get=function(e){var t=this.__data__;if(Me){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return Pe.call(t,e)?t[e]:void 0},Ie.prototype.has=function(e){var t=this.__data__;return Me?void 0!==t[e]:Fe.call(t,e)},Ie.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Me&&void 0===t?"__lodash_hash_undefined__":t,this};var Be=Array.prototype.splice;function De(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}De.prototype.clear=function(){this.__data__=[],this.size=0},De.prototype.delete=function(e){var t=this.__data__,n=$e(t,e);return!(n<0)&&(n==t.length-1?t.pop():Be.call(t,n,1),--this.size,!0)},De.prototype.get=function(e){var t=this.__data__,n=$e(t,e);return n<0?void 0:t[n][1]},De.prototype.has=function(e){return $e(this.__data__,e)>-1},De.prototype.set=function(e,t){var n=this.__data__,o=$e(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this};var ze=K(h,"Map");function Ue(e,t){var n,o,r=e.__data__;return("string"==(o=typeof(n=t))||"number"==o||"symbol"==o||"boolean"==o?"__proto__"!==n:null===n)?r["string"==typeof t?"string":"hash"]:r.map}function He(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}function Ve(e,t){for(var n=-1,o=t.length,r=e.length;++n<o;)e[r+n]=t[n];return e}He.prototype.clear=function(){this.size=0,this.__data__={hash:new Ie,map:new(ze||De),string:new Ie}},He.prototype.delete=function(e){var t=Ue(this,e).delete(e);return this.size-=t?1:0,t},He.prototype.get=function(e){return Ue(this,e).get(e)},He.prototype.has=function(e){return Ue(this,e).has(e)},He.prototype.set=function(e,t){var n=Ue(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this};var qe=Ae(Object.getPrototypeOf,Object);function Ke(e){var t=this.__data__=new De(e);this.size=t.size}Ke.prototype.clear=function(){this.__data__=new De,this.size=0},Ke.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Ke.prototype.get=function(e){return this.__data__.get(e)},Ke.prototype.has=function(e){return this.__data__.has(e)},Ke.prototype.set=function(e,t){var n=this.__data__;if(n instanceof De){var o=n.__data__;if(!ze||o.length<199)return o.push([e,t]),this.size=++n.size,this;n=this.__data__=new He(o)}return n.set(e,t),this.size=n.size,this};var We="object"==typeof exports&&exports&&!exports.nodeType&&exports,Ye=We&&"object"==typeof module&&module&&!module.nodeType&&module,Ge=Ye&&Ye.exports===We?h.Buffer:void 0,Je=Ge?Ge.allocUnsafe:void 0;function Qe(){return[]}var Xe=Object.prototype.propertyIsEnumerable,Ze=Object.getOwnPropertySymbols,et=Ze?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,o=null==e?0:e.length,r=0,i=[];++n<o;){var s=e[n];t(s,n,e)&&(i[r++]=s)}return i}(Ze(e),function(t){return Xe.call(e,t)}))}:Qe;var tt=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)Ve(t,et(e)),e=qe(e);return t}:Qe;function nt(e,t,n){var o=t(e);return S(e)?o:Ve(o,n(e))}function ot(e){return nt(e,Le,et)}function rt(e){return nt(e,Te,tt)}var it=K(h,"DataView"),st=K(h,"Promise"),at=K(h,"Set"),lt="[object Map]",ct="[object Promise]",pt="[object Set]",dt="[object WeakMap]",ut="[object DataView]",ht=$(it),gt=$(ze),ft=$(st),mt=$(at),yt=$(W),bt=E;(it&&bt(new it(new ArrayBuffer(1)))!=ut||ze&&bt(new ze)!=lt||st&&bt(st.resolve())!=ct||at&&bt(new at)!=pt||W&&bt(new W)!=dt)&&(bt=function(e){var t=E(e),n="[object Object]"==t?e.constructor:void 0,o=n?$(n):"";if(o)switch(o){case ht:return ut;case gt:return lt;case ft:return ct;case mt:return pt;case yt:return dt}return t});var vt=bt,xt=Object.prototype.hasOwnProperty;var Et=h.Uint8Array;function Ct(e){var t=new e.constructor(e.byteLength);return new Et(t).set(new Et(e)),t}var St=/\w*$/;var kt=g?g.prototype:void 0,wt=kt?kt.valueOf:void 0;function _t(e,t,n){var o,r,i,s=e.constructor;switch(t){case"[object ArrayBuffer]":return Ct(e);case"[object Boolean]":case"[object Date]":return new s(+e);case"[object DataView]":return function(e,t){var n=t?Ct(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 function(e,t){var n=t?Ct(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}(e,n);case"[object Map]":case"[object Set]":return new s;case"[object Number]":case"[object String]":return new s(e);case"[object RegExp]":return(i=new(r=e).constructor(r.source,St.exec(r))).lastIndex=r.lastIndex,i;case"[object Symbol]":return o=e,wt?Object(wt.call(o)):{}}}var At=Ce&&Ce.isMap,Ot=At?be(At):function(e){return C(e)&&"[object Map]"==vt(e)};var Rt=Ce&&Ce.isSet,Lt=Rt?be(Rt):function(e){return C(e)&&"[object Set]"==vt(e)},jt="[object Arguments]",Nt="[object Function]",Tt="[object Object]",Mt={};function Pt(e,t,n,o,r,i){var s,a=1&t,l=2&t,c=4&t;if(n&&(s=r?n(e,o,r,i):n(e)),void 0!==s)return s;if(!A(e))return e;var p=S(e);if(p){if(s=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&xt.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!a)return function(e,t){var n=-1,o=e.length;for(t||(t=Array(o));++n<o;)t[n]=e[n];return t}(e,s)}else{var d=vt(e),u=d==Nt||"[object GeneratorFunction]"==d;if(me(e))return function(e,t){if(t)return e.slice();var n=e.length,o=Je?Je(n):new e.constructor(n);return e.copy(o),o}(e,a);if(d==Tt||d==jt||u&&!r){if(s=l||u?{}:function(e){return"function"!=typeof e.constructor||ae(e)?{}:G(qe(e))}(e),!a)return l?function(e,t){return oe(e,tt(e),t)}(e,function(e,t){return e&&oe(t,Te(t),e)}(s,e)):function(e,t){return oe(e,et(e),t)}(e,function(e,t){return e&&oe(t,Le(t),e)}(s,e))}else{if(!Mt[d])return r?e:{};s=_t(e,d,a)}}i||(i=new Ke);var h=i.get(e);if(h)return h;i.set(e,s),Lt(e)?e.forEach(function(o){s.add(Pt(o,t,n,o,e,i))}):Ot(e)&&e.forEach(function(o,r){s.set(r,Pt(o,t,n,r,e,i))});var g=p?void 0:(c?l?rt:ot:l?Te:Le)(e);return function(e,t){for(var n=-1,o=null==e?0:e.length;++n<o&&!1!==t(e[n],n,e););}(g||e,function(o,r){g&&(o=e[r=o]),ne(s,r,Pt(o,t,n,r,e,i))}),s}Mt[jt]=Mt["[object Array]"]=Mt["[object ArrayBuffer]"]=Mt["[object DataView]"]=Mt["[object Boolean]"]=Mt["[object Date]"]=Mt["[object Float32Array]"]=Mt["[object Float64Array]"]=Mt["[object Int8Array]"]=Mt["[object Int16Array]"]=Mt["[object Int32Array]"]=Mt["[object Map]"]=Mt["[object Number]"]=Mt[Tt]=Mt["[object RegExp]"]=Mt["[object Set]"]=Mt["[object String]"]=Mt["[object Symbol]"]=Mt["[object Uint8Array]"]=Mt["[object Uint8ClampedArray]"]=Mt["[object Uint16Array]"]=Mt["[object Uint32Array]"]=!0,Mt["[object Error]"]=Mt[Nt]=Mt["[object WeakMap]"]=!1;var Ft=function(){return h.Date.now()},It=Math.max,$t=Math.min;function Bt(e,t,n){var o,r,i,s,a,l,c=0,p=!1,d=!1,u=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function h(t){var n=o,i=r;return o=r=void 0,c=t,s=e.apply(i,n)}function g(e){var n=e-l;return void 0===l||n>=t||n<0||d&&e-c>=i}function f(){var e=Ft();if(g(e))return m(e);a=setTimeout(f,function(e){var n=t-(e-l);return d?$t(n,i-(e-c)):n}(e))}function m(e){return a=void 0,u&&o?h(e):(o=r=void 0,s)}function y(){var e=Ft(),n=g(e);if(o=arguments,r=this,l=e,n){if(void 0===a)return function(e){return c=e,a=setTimeout(f,t),p?h(e):s}(l);if(d)return clearTimeout(a),a=setTimeout(f,t),h(l)}return void 0===a&&(a=setTimeout(f,t)),s}return t=N(t)||0,A(n)&&(p=!!n.leading,i=(d="maxWait"in n)?It(N(n.maxWait)||0,t):i,u="trailing"in n?!!n.trailing:u),y.cancel=function(){void 0!==a&&clearTimeout(a),c=0,o=l=r=a=void 0},y.flush=function(){return void 0===a?s:m(Ft())},y}const Dt=t,zt=e,Ut=e=>"string"==typeof e?e:"number"==typeof e?`${e}px`:"30px",Ht=({size:e,children:t})=>{const n={height:e=Ut(e),width:e,display:"inline-block",position:"relative"};return Dt.createElement("div",{style:n},t)};Ht.propTypes={size:zt.number,children:zt.oneOfType([zt.arrayOf(zt.node),zt.node]).isRequired};const Vt=t,qt=e,Kt=({size:e,children:t,sx:n})=>Vt.createElement(Ht,{size:e},Vt.createElement("svg",{preserveAspectRatio:"xMinYMin meet",viewBox:"0 0 44 40",style:{enableBackground:"new 0 0 44 40",...n}},t));Kt.propTypes={size:qt.oneOfType([qt.string,qt.number]),children:qt.oneOfType([qt.arrayOf(qt.node),qt.node]).isRequired,sx:qt.object},qt.string.isRequired;const Wt=({fill:e})=>Vt.createElement("polygon",{transform:"translate(2, 0)",points:"34.1,28.6 34.1,2.2 2,2.2 2,34.3 40.1,34.3",fill:e});Wt.propTypes={fill:qt.string.isRequired};const Yt=({fill:e})=>Vt.createElement("path",{transform:"translate(1, 0)",d:"M31.2,29.1v-0.3c2.2-2.8,3.6-6.3,3.6-10.1c0-8.9-7.2-16.1-16.1-16.1c-8.8,0.1-16,7.3-16,16.2 s7.2,16.1,16.1,16.1h18.5L31.2,29.1z",fill:e});Yt.propTypes={fill:qt.string.isRequired};const Gt=({fill:e})=>Vt.createElement("circle",{transform:"translate(-3,0)",cx:"23",cy:"20.4",r:"16",fill:e});Gt.propTypes={fill:qt.string.isRequired};const Jt=({fill:e})=>Vt.createElement("rect",{x:"3.6",y:"4.1",width:"32",height:"32",fill:e});Jt.propTypes={fill:qt.string.isRequired};const Qt=e,Xt=t;var Zt=(e,t)=>{class n extends Xt.Component{static __initStatic(){this.propTypes={iconSet:Qt.oneOf(["emoji","check"]),shape:Qt.oneOf(["round","square"]),category:Qt.oneOf(["feedback",void 0]),open:Qt.bool,size:Qt.oneOfType([Qt.number,Qt.string]),fg:Qt.string,bg:Qt.string}}static __initStatic2(){this.defaultProps={iconSet:"check",shape:"round",category:void 0,open:!1,size:30,fg:"#4aaf46",bg:"#f8ffe2"}}render(){const{iconSet:n,shape:o,category:r,open:i,size:s,fg:a,bg:l}=this.props,c="check"===n?Xt.createElement(e,{fill:a}):Xt.createElement(t,{fill:a}),p="check"===n?Xt.createElement(e,{fill:l}):Xt.createElement(t,{fill:l});return i?Xt.createElement(Kt,{size:s},p):Xt.createElement(Kt,{size:s},"feedback"===r?"round"===o?Xt.createElement(Yt,{fill:l}):Xt.createElement(Wt,{fill:l}):"round"===o?Xt.createElement(Gt,{fill:l}):Xt.createElement(Jt,{fill:l}),c)}}return n.__initStatic(),n.__initStatic2(),n};const en=e,tn=t,nn=({fill:e})=>tn.createElement("g",{transform:"translate(1, 0)"},tn.createElement("path",{d:"M24.7,22.1c-1.5,1.7-3.6,2.7-5.8,2.7s-4.5-1.1-5.8-2.7l-2.8,1.6c2,2.7,5.2,4.2,8.7,4.2 c3.4,0,6.6-1.6,8.7-4.2L24.7,22.1z",fill:e}),tn.createElement("rect",{x:"21.1",y:"13.1",width:"3.7",height:"4.7",fill:e}),tn.createElement("rect",{x:"12.7",y:"13.1",width:"3.7",height:"4.7",fill:e}));nn.propTypes={fill:en.string.isRequired};const on=({fill:e,x:t=0,y:n=0})=>tn.createElement("polygon",{transform:`translate(${t}, ${n})`,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",fill:e});on.propTypes={fill:en.string.isRequired,x:en.number,y:en.number};const rn=Zt(on,nn);rn.propTypes={iconSet:en.oneOf(["emoji","check"]),shape:en.oneOf(["round","square"]),category:en.oneOf(["feedback",void 0]),open:en.bool,fg:en.string,bg:en.string,size:en.oneOfType([en.string,en.number])},rn.defaultProps={iconSet:"check",shape:"round",category:void 0,open:!1,fg:"#4aaf46",bg:"#f8ffe2",size:30};const sn=e,an=t,{styled:ln}=n,cn=({bgFill:e,fgFill:t})=>an.createElement("svg",{preserveAspectRatio:"xMinYMin meet",version:"1.1",viewBox:"-283 359 34 35",style:{enableBackground:"new -283 359 34 35"}},an.createElement("circle",{cx:"-266",cy:"375.9",r:"14",fill:e}),an.createElement("path",{d:"M-280.5,375.9c0-8,6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5s-6.5,14.5-14.5,14.5S-280.5,383.9-280.5,375.9z M-279.5,375.9c0,7.4,6.1,13.5,13.5,13.5c7.4,0,13.5-6.1,13.5-13.5s-6.1-13.5-13.5-13.5C-273.4,362.4-279.5,368.5-279.5,375.9z",fill:e}),an.createElement("polygon",{points:"-265.4,383.1 -258.6,377.2 -261.2,374.2 -264.3,376.9 -268.9,368.7 -272.4,370.6",fill:t}));cn.propTypes={bgFill:sn.string.isRequired,fgFill:sn.string.isRequired};const pn=({bgFill:e,fgFill:t,borderFill:n})=>an.createElement("svg",{preserveAspectRatio:"xMinYMin meet",version:"1.1",viewBox:"-129.5 127 34 35",style:{enableBackground:"new -129.5 127 34 35"}},an.createElement("path",{style:{fill:"#D0CAC5",stroke:"#E6E3E0",strokeWidth:.75,strokeMiterlimit:10},d:"M-112.9,160.4c-8.5,0-15.5-6.9-15.5-15.5c0-8.5,6.9-15.5,15.5-15.5s15.5,6.9,15.5,15.5 C-97.4,153.5-104.3,160.4-112.9,160.4z"}),an.createElement("path",{style:{fill:"#B3ABA4",stroke:"#CDC7C2",strokeWidth:.5,strokeMiterlimit:10},d:"M-113.2,159c-8,0-14.5-6.5-14.5-14.5s6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5S-105.2,159-113.2,159z"}),an.createElement("circle",{cx:"-114.2",cy:"143.5",r:"14",fill:e}),an.createElement("path",{d:"M-114.2,158c-8,0-14.5-6.5-14.5-14.5s6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5S-106.2,158-114.2,158z M-114.2,130c-7.4,0-13.5,6.1-13.5,13.5s6.1,13.5,13.5,13.5s13.5-6.1,13.5-13.5S-106.8,130-114.2,130z",fill:n}),an.createElement("polygon",{points:"-114.8,150.7 -121.6,144.8 -119,141.8 -115.9,144.5 -111.3,136.3 -107.8,138.2",fill:t}));pn.propTypes={bgFill:sn.string.isRequired,fgFill:sn.string.isRequired,borderFill:sn.string.isRequired};const dn=ln("div")(({size:e})=>({width:e||"25px",height:e||"25px"})),un=({open:e,size:t})=>an.createElement(dn,{size:t},e?an.createElement(cn,{bgFill:"#bce2ff",fgFill:"#1a9cff"}):an.createElement(pn,{bgFill:"white",fgFill:"#1a9cff",borderFill:"#bce2ff"}));un.propTypes={open:sn.bool,size:sn.string},un.defaultProps={open:!1};const hn=e,gn=t,fn=({fill:e})=>gn.createElement("g",{transform:"translate(0.5, 0.5)"},gn.createElement("rect",{x:"11",y:"17.3",transform:"matrix(0.7071 -0.7071 0.7071 0.7071 -7.852 19.2507)",width:"16.6",height:"3.7",fill:e}),gn.createElement("rect",{x:"17.4",y:"10.7",transform:"matrix(0.7071 -0.7071 0.7071 0.7071 -7.8175 19.209)",width:"3.7",height:"16.6",fill:e}));fn.propTypes={fill:hn.string.isRequired};const mn=({fill:e})=>gn.createElement("g",{transform:"translate(1,0)"},gn.createElement("rect",{x:"21",y:"12.9",width:"3.7",height:"4.7",fill:e}),gn.createElement("rect",{x:"12.7",y:"12.9",width:"3.7",height:"4.7",fill:e}),gn.createElement("rect",{x:"12.2",y:"22.5",width:"13",height:"3.3",fill:e}));mn.propTypes={fill:hn.string.isRequired};const yn=Zt(fn,mn);yn.propTypes={iconSet:hn.oneOf(["emoji","check"]),shape:hn.oneOf(["round","square"]),category:hn.oneOf(["feedback",void 0]),open:hn.bool,fg:hn.string,bg:hn.string,size:hn.oneOfType([hn.string,hn.number])},yn.defaultProps={iconSet:"check",shape:"round",category:void 0,open:!1,fg:"#fcb733",bg:"#fbf2e3",size:30};const bn=e,vn=t,xn=()=>{const e={fill:"none",stroke:"#BCE2FF",strokeWidth:2,strokeMiterlimit:10};return vn.createElement("g",null,vn.createElement("line",{style:e,x1:"-98",y1:"142",x2:"-114.6",y2:"142"}),vn.createElement("line",{style:e,x1:"-98",y1:"146.3",x2:"-114.6",y2:"146.3"}),vn.createElement("line",{style:e,x1:"-104",y1:"150.7",x2:"-114.6",y2:"150.7"}))},En=({children:e,size:t})=>vn.createElement(Ht,{size:t},vn.createElement("svg",{version:"1.1",viewBox:"-128 129 31 31",style:{enableBackground:"new -128 129 31 31"}},e));En.propTypes={children:bn.oneOfType([bn.arrayOf(bn.node),bn.node]).isRequired,size:bn.number};const Cn=()=>vn.createElement("g",null,vn.createElement("rect",{x:"-123.9",y:"135.3",style:{fill:"#D0CAC5",stroke:"#E6E3E0",strokeWidth:.75,strokeLinejoin:"round",strokeMiterlimit:10},width:"4.1",height:"4.1"}),vn.createElement("polygon",{style:{fill:"#D0CAC5",stroke:"#E6E3E0",strokeWidth:.75,strokeLinejoin:"round",strokeMiterlimit:10},points:"-119.8,150.4 -119.8,142.2 -125,142.2 -125,144.9 -122.6,144.9 -122.6,150.4 -125.6,150.4 -125.6,153.2 -116.8,153.2 -116.8,150.4 "}),vn.createElement("rect",{x:"-124.7",y:"134.7",style:{fill:"#B3ABA4",stroke:"#CDC7C2",strokeWidth:.5,strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:10},width:"4.1",height:"4.1"}),vn.createElement("polygon",{style:{fill:"#B3ABA4",stroke:"#CDC7C2",strokeWidth:.5,strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:10},points:"-120.6,149.8 -120.6,141.5 -125.8,141.5 -125.8,144.3 -123.3,144.3 -123.3,149.8 -126.4,149.8 -126.4,152.5 -117.6,152.5 -117.6,149.8 "}),vn.createElement("rect",{x:"-125.5",y:"134",style:{fill:"#7FABC6"},width:"4.1",height:"4.1"}),vn.createElement("polygon",{style:{fill:"#7FABC6"},points:"-121.4,149.1 -121.4,140.9 -126.5,140.9 -126.5,143.6 -124.1,143.6 -124.1,149.1 -127.1,149.1 -127.1,151.9 -118.4,151.9 -118.4,149.1 "})),Sn=()=>vn.createElement("g",null,vn.createElement("rect",{x:"-123.9",y:"135.3",style:{fill:"#D0CAC5",stroke:"#E6E3E0",strokeWidth:.75,strokeLinejoin:"round",strokeMiterlimit:10},width:"4.1",height:"4.1"}),vn.createElement("polygon",{style:{fill:"#D0CAC5",stroke:"#E6E3E0",strokeWidth:.75,strokeLinejoin:"round",strokeMiterlimit:10},points:"-119.8,150.4 -119.8,142.2 -125,142.2 -125,144.9 -122.6,144.9 -122.6,150.4 -125.6,150.4 -125.6,153.2 -116.8,153.2 -116.8,150.4 "}),vn.createElement("rect",{x:"-124.7",y:"134.7",style:{fill:"#B3ABA4",stroke:"#CDC7C2",strokeWidth:.5,strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:10},width:"4.1",height:"4.1"}),vn.createElement("polygon",{style:{fill:"#B3ABA4",stroke:"#CDC7C2",strokeWidth:.5,strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:10},points:"-120.6,149.8 -120.6,141.5 -125.8,141.5 -125.8,144.3 -123.3,144.3 -123.3,149.8 -126.4,149.8 -126.4,152.5 -117.6,152.5 -117.6,149.8 "}),vn.createElement("rect",{x:"-125.5",y:"134",style:{fill:"#1A9CFF"},width:"4.1",height:"4.1"}),vn.createElement("polygon",{style:{fill:"#1A9CFF"},points:"-121.4,149.1 -121.4,140.9 -126.5,140.9 -126.5,143.6 -124.1,143.6 -124.1,149.1 -127.1,149.1 -127.1,151.9 -118.4,151.9 -118.4,149.1 "}));class kn extends vn.Component{constructor(e){super(e)}render(){return!0===this.props.open?vn.createElement(En,null,vn.createElement(Cn,null),vn.createElement(xn,null)):vn.createElement(En,null,vn.createElement(Sn,null),vn.createElement(xn,null))}}kn.propTypes={open:bn.bool},kn.defaultProps={open:!1};const wn=e,_n=t,An=({fill:e})=>_n.createElement("path",{fill:e,d:"M-130.4,142.1c0-2.1,1.7-3.9,3.9-3.9c0.3,0,0.5,0,0.8,0.1c-0.6-0.8-1.5-1.3-2.6-1.3c-1.8,0-3.3,1.5-3.3,3.3c0,1.1,0.5,2,1.3,2.6C-130.4,142.6-130.4,142.4-130.4,142.1z"});An.propTypes={fill:wn.string};class On extends _n.Component{static __initStatic(){this.propTypes={classes:wn.object.isRequired,size:wn.number}}render(){const{size:e}=this.props;return!0===this.props.open?_n.createElement(Ht,{size:e},_n.createElement("svg",{preserveAspectRatio:"xMinYMin meet",viewBox:"-135 129 16 32"},_n.createElement("path",{fill:"#BCE2FF",d:"M-122,141.1c0-3.7-3.3-6.6-7.1-5.8c-2.4,0.5-4.3,2.4-4.7,4.8c-0.4,2.3,0.6,4.4,2.2,5.7c0.4,0.3,0.6,0.8,0.6,1.3v1.9h6.1v-1.9c0-0.5,0.2-1,0.6-1.3C-122.8,144.7-122,143-122,141.1z"}),_n.createElement("path",{fill:"#BCE2FF",d:"M-125.7,153h-4.5c-0.4,0-0.8-0.4-0.8-0.8v-1.6h6.1v1.6C-124.9,152.7-125.2,153-125.7,153z"}),_n.createElement(An,{fill:"#1A9CFF"}))):_n.createElement(Ht,{size:e},_n.createElement("svg",{preserveAspectRatio:"xMinYMin meet",viewBox:"-135 129 16 31"},_n.createElement("path",{fill:"#D0CAC5",stroke:"#E6E3E0",className:"st0",d:"M-120.7,142.4c0-3.7-3.3-6.6-7.1-5.8c-2.4,0.5-4.3,2.4-4.7,4.8c-0.4,2.3,0.6,4.4,2.2,5.7c0.4,0.3,0.6,0.8,0.6,1.3v1.9h6.1v-1.9c0-0.5,0.2-1,0.6-1.3C-121.6,146-120.7,144.3-120.7,142.4z"}),_n.createElement("path",{fill:"#D0CAC5",stroke:"#E6E3E0",className:"st0",d:"M-124.4,154.3h-4.5c-0.4,0-0.8-0.4-0.8-0.8v-1.6h6.1v1.6C-123.6,153.9-123.9,154.3-124.4,154.3z"}),_n.createElement("path",{fill:"#B3ABA4",stroke:"#CDC7C2",className:"st1",d:"M-121.3,141.8c0-3.7-3.3-6.6-7.1-5.8c-2.4,0.5-4.3,2.4-4.7,4.8c-0.4,2.3,0.6,4.4,2.2,5.7c0.4,0.3,0.6,0.8,0.6,1.3v1.9h6.1v-1.9c0-0.5,0.2-1,0.6-1.3C-122.2,145.3-121.3,143.7-121.3,141.8z"}),",",_n.createElement("path",{fill:"#B3ABA4",stroke:"#CDC7C2",className:"st1",d:"M-125,153.7h-4.5c-0.4,0-0.8-0.4-0.8-0.8v-1.6h6.1v1.6C-124.2,153.3-124.6,153.7-125,153.7z"}),_n.createElement("path",{fill:"#1A9CFF",d:"M-122,141.1c0-3.7-3.3-6.6-7.1-5.8c-2.4,0.5-4.3,2.4-4.7,4.8c-0.4,2.3,0.6,4.4,2.2,5.7c0.4,0.3,0.6,0.8,0.6,1.3v1.9h6.1v-1.9c0-0.5,0.2-1,0.6-1.3C-122.8,144.7-122,143-122,141.1z"}),_n.createElement("path",{fill:"#1A9CFF",d:"M-125.7,153h-4.5c-0.4,0-0.8-0.4-0.8-0.8v-1.6h6.1v1.6C-124.9,152.7-125.2,153-125.7,153z"}),_n.createElement(An,{fill:"1A9CFF"})))}}On.__initStatic(),On.propTypes={open:wn.bool},On.defaultProps={open:!1};const Rn=e,Ln=t,jn=({fill:e})=>Ln.createElement("g",null,Ln.createElement("rect",{x:"19.3",y:"10.3",width:"4.5",height:"12.7",fill:e}),Ln.createElement("rect",{x:"19.3",y:"26.2",width:"4.5",height:"4.5",fill:e}));jn.propTypes={fill:Rn.string.isRequired};const Nn=({fill:e})=>Ln.createElement("polygon",{points:"14.8,4.5 5.6,13.8 5.6,27 14.8,36.5 28.1,36.5 37.6,27 37.6,13.8 28.1,4.5",fill:e});Nn.propTypes={fill:Rn.string.isRequired};const Tn=({fill:e})=>Ln.createElement("g",null,Ln.createElement("rect",{x:"23.8",y:"15",width:"3.5",height:"4.4",fill:e}),Ln.createElement("rect",{x:"16",y:"15",width:"3.5",height:"4.4",fill:e}),Ln.createElement("path",{d:"M24.2,27.1h-5.1c-0.8,0-1.5-0.7-1.5-1.5v0c0-0.8,0.7-1.5,1.5-1.5h5.1c0.8,0,1.5,0.7,1.5,1.5v0 C25.7,26.4,25,27.1,24.2,27.1z",fill:e}));Tn.propTypes={fill:Rn.string.isRequired};class Mn extends Ln.Component{constructor(e){super(e);const{fg:t="#464146",bg:n="white"}=this.props;this.icons={check:Ln.createElement(Kt,null,Ln.createElement(Nn,{fill:n}),Ln.createElement(jn,{fill:t})),emoji:Ln.createElement(Kt,null,Ln.createElement(Nn,{fill:n}),Ln.createElement(Tn,{fill:t})),feedback:{check:Ln.createElement(Kt,null,Ln.createElement(Nn,{fill:n}),Ln.createElement(Tn,{fill:t})),emoji:Ln.createElement(Kt,null,Ln.createElement(Nn,{fill:n}),Ln.createElement(Tn,{fill:t})),square:{check:Ln.createElement(Kt,null,Ln.createElement(Nn,{fill:n}),Ln.createElement(jn,{fill:t})),emoji:Ln.createElement(Kt,null,Ln.createElement(Nn,{fill:n}),Ln.createElement(Tn,{fill:t})),open:{check:Ln.createElement(Kt,null,Ln.createElement(jn,{fill:n})),emoji:Ln.createElement(Kt,null,Ln.createElement(Tn,{fill:n}))}}}}}render(){const{iconSet:e,category:t,shape:n,open:o}=this.props;return void 0===t?this.icons[e]:void 0===n?this.icons.feedback[e]:!0===o?this.icons.feedback.square.open[e]:this.icons.feedback.square[e]}}Mn.propTypes={iconSet:Rn.oneOf(["emoji","check",void 0]),shape:Rn.oneOf(["square",void 0]),category:Rn.oneOf(["feedback",void 0]),open:Rn.bool,fg:Rn.string,bg:Rn.string},Mn.defaultProps={iconSet:"check",shape:void 0,category:void 0,open:!1,fg:"#464146",bg:"white"};const Pn=e,Fn=t,In=({fill:e})=>Fn.createElement("g",{transform:"translate(0, 0)"},Fn.createElement("polygon",{points:"27.5,13.4 23.9,11.4 15.9,25.8 19.1,28.6",fill:e}),Fn.createElement("polygon",{points:"16.2,20.6 14.4,19.2 11.8,22.3 14.1,24.3",fill:e}));In.propTypes={fill:Pn.string.isRequired};const $n=({fill:e})=>Fn.createElement("g",{transform:"translate(2, 0)"},Fn.createElement("rect",{x:"20.6",y:"11.8",width:"4",height:"5",fill:e}),Fn.createElement("rect",{x:"11.5",y:"11.8",width:"4",height:"5",fill:e}),Fn.createElement("rect",{x:"10.9",y:"22.9",transform:"matrix(0.9794 -0.2019 0.2019 0.9794 -4.6237 4.1559)",width:"14.3",height:"3.7",fill:e}));$n.propTypes={fill:Pn.string.isRequired};const Bn=Zt(In,$n);Bn.propTypes={iconSet:Pn.oneOf(["emoji","check"]),shape:Pn.oneOf(["round","square"]),category:Pn.oneOf(["feedback",void 0]),open:Pn.bool,fg:Pn.string,bg:Pn.string,size:Pn.oneOfType([Pn.string,Pn.number])},Bn.defaultProps={iconSet:"check",shape:"round",category:void 0,open:!1,fg:"#4aaf46",bg:"#c1e1ac",size:30};const Dn=e,zn=t,Un=({fill:e})=>zn.createElement("g",null,zn.createElement("rect",{x:"-115",y:"136.7",width:"3",height:"3",fill:e}),zn.createElement("polygon",{points:"-112,147.7 -112,141.7 -115.8,141.7 -115.8,143.7 -114,143.7 -114,147.7 -116.2,147.7 -116.2,149.7 -109.8,149.7 -109.8,147.7",fill:e}));Un.propTypes={fill:Dn.string.isRequired};const Hn=({fill:e})=>zn.createElement("path",{d:"M-113,158.5c-8,0-14.5-6.5-14.5-14.5s6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5S-105,158.5-113,158.5z M-113,130.5c-7.4,0-13.5,6.1-13.5,13.5s6.1,13.5,13.5,13.5s13.5-6.1,13.5-13.5S-105.6,130.5-113,130.5z",fill:e});Hn.propTypes={fill:Dn.string.isRequired};const Vn=({fill:e="#FFFFFF"})=>zn.createElement("g",null,zn.createElement("path",{style:{fill:"#D0CAC5",stroke:"#E6E3E0",strokeWidth:.75,strokeMiterlimit:10},d:"M-111.7,160.9c-8.5,0-15.5-6.9-15.5-15.5c0-8.5,6.9-15.5,15.5-15.5s15.5,6.9,15.5,15.5C-96.2,154-103.1,160.9-111.7,160.9z"}),zn.createElement("path",{style:{fill:"#B3ABA4",stroke:"#CDC7C2",strokeWidth:.5,strokeMiterlimit:10},d:"M-112,159.5c-8,0-14.5-6.5-14.5-14.5s6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5S-104,159.5-112,159.5z"}),zn.createElement("circle",{cx:"-113",cy:"144",r:"14",fill:e}));Vn.propTypes={fill:Dn.string};const qn=({children:e,size:t})=>{const n=Ut(t),o={height:n,width:n,display:"inline-block",position:"relative"};return zn.createElement("div",{style:o},zn.createElement("svg",{preserveAspectRatio:"xMinYMin meet",viewBox:"-129 128 34 34"},e))};qn.propTypes={children:Dn.oneOfType([Dn.arrayOf(Dn.node),Dn.node]).isRequired,size:Dn.oneOfType([Dn.string,Dn.number])};class Kn extends zn.Component{render(){const{iconSet:e,open:t,fg:n="#1a9cff",bg:o="#bce2ff",border:r="#bbe3fd"}=this.props,i=zn.createElement(Un,{fill:n}),s={check:zn.createElement(qn,{size:this.props.size},zn.createElement(Vn,null),i,zn.createElement(Hn,{fill:r})),emoji:zn.createElement(qn,{size:this.props.size},zn.createElement(Vn,null),i,zn.createElement(Hn,{fill:r})),open:{check:zn.createElement(qn,{size:this.props.size},zn.createElement("circle",{cx:"-113",cy:"144",r:"14",fill:"#FFFFFF"}),zn.createElement(Un,{fill:o}),zn.createElement(Hn,{fill:"#FFFFFF"})),emoji:zn.createElement(qn,{size:this.props.size},zn.createElement("circle",{cx:"-113",cy:"144",r:"14",fill:"#FFFFFF"}),zn.createElement(Un,{fill:o}),zn.createElement(Hn,{fill:r}))}};return!0===t?s.open[e]:s[e]}}function Wn(){return Wn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Wn.apply(null,arguments)}function Yn(e,t){if(null==e)return{};var n={};for(var o in e)if({}.hasOwnProperty.call(e,o)){if(-1!==t.indexOf(o))continue;n[o]=e[o]}return n}function Gn(e,t){return Gn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Gn(e,t)}function Jn(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Gn(e,t)}function Qn(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}Kn.propTypes={iconSet:Dn.oneOf(["emoji","check"]),open:Dn.bool,fg:Dn.string,bg:Dn.string,border:Dn.string,size:Dn.oneOfType([Dn.string,Dn.number])},Kn.defaultProps={iconSet:"check",open:!1,fg:"#1a9cff",bg:"#bce2ff",border:"#bbe3fd",size:30};var Xn=!1;var Zn=t.createContext(null),eo=function(e){return e.scrollTop};const to=t,no=o;var oo="unmounted",ro="exited",io="entering",so="entered",ao="exiting",lo=function(e){function t(t,n){var o;o=e.call(this,t,n)||this;var r,i=n&&!n.isMounting?t.enter:t.appear;return o.appearStatus=null,t.in?i?(r=ro,o.appearStatus=io):r=so:r=t.unmountOnExit||t.mountOnEnter?oo:ro,o.state={status:r},o.nextCallback=null,o}Jn(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===oo?{status:ro}: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!==io&&n!==so&&(t=io):n!==io&&n!==so||(t=ao)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,o=this.props.timeout;return e=t=n=o,null!=o&&"number"!=typeof o&&(e=o.exit,t=o.enter,n=void 0!==o.appear?o.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===io){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:no.findDOMNode(this);n&&eo(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===ro&&this.setState({status:oo})},n.performEnter=function(e){var t=this,n=this.props.enter,o=this.context?this.context.isMounting:e,r=this.props.nodeRef?[o]:[no.findDOMNode(this),o],i=r[0],s=r[1],a=this.getTimeouts(),l=o?a.appear:a.enter;!e&&!n||Xn?this.safeSetState({status:so},function(){t.props.onEntered(i)}):(this.props.onEnter(i,s),this.safeSetState({status:io},function(){t.props.onEntering(i,s),t.onTransitionEnd(l,function(){t.safeSetState({status:so},function(){t.props.onEntered(i,s)})})}))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),o=this.props.nodeRef?void 0:no.findDOMNode(this);t&&!Xn?(this.props.onExit(o),this.safeSetState({status:ao},function(){e.props.onExiting(o),e.onTransitionEnd(n.exit,function(){e.safeSetState({status:ro},function(){e.props.onExited(o)})})})):this.safeSetState({status:ro},function(){e.props.onExited(o)})},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(o){n&&(n=!1,t.nextCallback=null,e(o))},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:no.findDOMNode(this),o=null==e&&!this.props.addEndListener;if(n&&!o){if(this.props.addEndListener){var r=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],i=r[0],s=r[1];this.props.addEndListener(i,s)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if(e===oo)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 o=Yn(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return to.createElement(Zn.Provider,{value:null},"function"==typeof n?n(e,o):to.cloneElement(to.Children.only(n),o))},t}(to.Component);function co(){}lo.contextType=Zn,lo.propTypes={},lo.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:co,onEntering:co,onEntered:co,onExit:co,onExiting:co,onExited:co},lo.UNMOUNTED=oo,lo.EXITED=ro,lo.ENTERING=io,lo.ENTERED=so,lo.EXITING=ao;var po=lo;const uo=t;var ho=function(e,t){return e&&t&&t.split(" ").forEach(function(t){return o=t,void((n=e).classList?n.classList.add(o):function(e,t){return e.classList?!!t&&e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")}(n,o)||("string"==typeof n.className?n.className=n.className+" "+o:n.setAttribute("class",(n.className&&n.className.baseVal||"")+" "+o)));var n,o})},go=function(e,t){return e&&t&&t.split(" ").forEach(function(t){return o=t,void((n=e).classList?n.classList.remove(o):"string"==typeof n.className?n.className=Qn(n.className,o):n.setAttribute("class",Qn(n.className&&n.className.baseVal||"",o)));var n,o})},fo=function(e){function t(){for(var t,n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];return(t=e.call.apply(e,[this].concat(o))||this).appliedClasses={appear:{},enter:{},exit:{}},t.onEnter=function(e,n){var o=t.resolveArguments(e,n),r=o[0],i=o[1];t.removeClasses(r,"exit"),t.addClass(r,i?"appear":"enter","base"),t.props.onEnter&&t.props.onEnter(e,n)},t.onEntering=function(e,n){var o=t.resolveArguments(e,n),r=o[0],i=o[1]?"appear":"enter";t.addClass(r,i,"active"),t.props.onEntering&&t.props.onEntering(e,n)},t.onEntered=function(e,n){var o=t.resolveArguments(e,n),r=o[0],i=o[1]?"appear":"enter";t.removeClasses(r,i),t.addClass(r,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,o="string"==typeof n,r=o?""+(o&&n?n+"-":"")+e:n[e];return{baseClassName:r,activeClassName:o?r+"-active":n[e+"Active"],doneClassName:o?r+"-done":n[e+"Done"]}},t}Jn(t,e);var n=t.prototype;return n.addClass=function(e,t,n){var o=this.getClassNames(t)[n+"ClassName"],r=this.getClassNames("enter").doneClassName;"appear"===t&&"done"===n&&r&&(o+=" "+r),"active"===n&&e&&eo(e),o&&(this.appliedClasses[t][n]=o,ho(e,o))},n.removeClasses=function(e,t){var n=this.appliedClasses[t],o=n.base,r=n.active,i=n.done;this.appliedClasses[t]={},o&&go(e,o),r&&go(e,r),i&&go(e,i)},n.render=function(){var e=this.props;e.classNames;var t=Yn(e,["classNames"]);return uo.createElement(po,Wn({},t,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(uo.Component);fo.defaultProps={classNames:""},fo.propTypes={};var mo=fo;const{Children:yo}=t,{cloneElement:bo}=t,{isValidElement:vo}=t;function xo(e,t){var n=Object.create(null);return e&&yo.map(e,function(e){return e}).forEach(function(e){n[e.key]=function(e){return t&&vo(e)?t(e):e}(e)}),n}function Eo(e,t,n){return null!=n[t]?n[t]:e.props[t]}function Co(e,t,n){var o=xo(e.children),r=function(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var o,r=Object.create(null),i=[];for(var s in e)s in t?i.length&&(r[s]=i,i=[]):i.push(s);var a={};for(var l in t){if(r[l])for(o=0;o<r[l].length;o++){var c=r[l][o];a[r[l][o]]=n(c)}a[l]=n(l)}for(o=0;o<i.length;o++)a[i[o]]=n(i[o]);return a}(t,o);return Object.keys(r).forEach(function(i){var s=r[i];if(vo(s)){var a=i in t,l=i in o,c=t[i],p=vo(c)&&!c.props.in;!l||a&&!p?l||!a||p?l&&a&&vo(c)&&(r[i]=bo(s,{onExited:n.bind(null,s),in:c.props.in,exit:Eo(s,"exit",e),enter:Eo(s,"enter",e)})):r[i]=bo(s,{in:!1}):r[i]=bo(s,{onExited:n.bind(null,s),in:!0,exit:Eo(s,"exit",e),enter:Eo(s,"enter",e)})}}),r}const So=t;var ko=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},wo=function(e){function t(t,n){var o,r=(o=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}(o));return o.state={contextValue:{isMounting:!0},handleExited:r,firstRender:!0},o}Jn(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,o,r=t.children,i=t.handleExited;return{children:t.firstRender?(n=e,o=i,xo(n.children,function(e){return bo(e,{onExited:o.bind(null,e),in:!0,appear:Eo(e,"appear",n),enter:Eo(e,"enter",n),exit:Eo(e,"exit",n)})})):Co(e,r,i),firstRender:!1}},n.handleExited=function(e,t){var n=xo(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState(function(t){var n=Wn({},t.children);return delete n[e.key],{children:n}}))},n.render=function(){var e=this.props,t=e.component,n=e.childFactory,o=Yn(e,["component","childFactory"]),r=this.state.contextValue,i=ko(this.state.children).map(n);return delete o.appear,delete o.enter,delete o.exit,null===t?So.createElement(Zn.Provider,{value:r},i):So.createElement(Zn.Provider,{value:r},So.createElement(t,o,i))},t}(So.Component);wo.propTypes={},wo.defaultProps={component:"div",childFactory:function(e){return e}};var _o=wo;const{green:Ao}=r,{indigo:Oo}=r,{orange:Ro}=r,{pink:Lo}=r,{red:jo}=r,No={TEXT:"black",DISABLED:"grey",DISABLED_SECONDARY:"#ABABAB",CORRECT:Ao[500],CORRECT_SECONDARY:Ao[50],CORRECT_TERTIARY:"#0EA449",CORRECT_WITH_ICON:"#087D38",INCORRECT:Ro[500],INCORRECT_SECONDARY:jo[50],INCORRECT_WITH_ICON:"#BF0D00",MISSING:jo[700],MISSING_WITH_ICON:"#6A78A1",PRIMARY:Oo[500],PRIMARY_LIGHT:Oo[200],PRIMARY_DARK:Oo[800],SECONDARY:Lo.A400,SECONDARY_LIGHT:Lo[200],SECONDARY_DARK:Lo[900],TERTIARY:"#146EB3",TERTIARY_LIGHT:"#D0E2F0",BACKGROUND:"rgba(255,255,255,0)",BACKGROUND_DARK:"#ECEDF1",DROPDOWN_BACKGROUND:"#E0E1E6",SECONDARY_BACKGROUND:"rgba(241,241,241,1)",BORDER:"#9A9A9A",BORDER_LIGHT:"#D1D1D1",BORDER_DARK:"#646464",BORDER_GRAY:"#7E8494",TABLE_GRID:"black",TABLE_GRID_LIGHT:"#dfe2e5",TABLE_STRIPE:"#f6f8fa",BLACK:"#000000",WHITE:"#ffffff",TRANSPARENT:"transparent",FOCUS_CHECKED:"#BBDEFB",FOCUS_CHECKED_BORDER:"#1565C0",FOCUS_UNCHECKED:"#E0E0E0",FOCUS_UNCHECKED_BORDER:"#757575",BUTTON_FOCUS_OUTLINE:"#3B82F6",BLUE_GREY100:"#F3F5F7",BLUE_GREY300:"#C0C3CF",BLUE_GREY600:"#7E8494",BLUE_GREY900:"#152452",FADED_PRIMARY:"#DCDAFB",KEYPAD_BUTTON:"rgb(188, 194, 229)",KEYPAD_BUTTON_OPERATOR:"rgb(255, 159, 192)",KEYPAD_EMPTY_PLACEHOLDER:"rgba(245, 0, 87, 0.4)",KEYPAD_BUTTON_HOVER:"rgb(214, 218, 239)",KEYPAD_BUTTON_OPERATOR_HOVER:"rgb(255, 197, 217)",KEY_BOARD_FOCUS_INDICATOR:"#2B87FF",BUTTON_BORDER:"rgba(0, 0, 0, 0.23)",BUTTON_HOVER_BG:"rgba(0, 0, 0, 0.08)"};Object.freeze(No);const To=(Mo="pie",(...e)=>{const t=e.pop();return e.reduceRight((e,t)=>`var(--${Mo}-${t}, ${e})`,t)});var Mo;const Po=()=>To("text",No.TEXT),Fo=()=>To("disabled",No.DISABLED),Io=()=>To("correct",No.CORRECT),$o=()=>To("incorrect",No.INCORRECT),Bo=()=>To("background",No.BACKGROUND),Do=()=>To("table-stripe","background-dark",No.TABLE_STRIPE),zo=()=>To("keyboard-focus-indicator",No.KEY_BOARD_FOCUS_INDICATOR),Uo=t,Ho=e,{styled:Vo}=n,qo=Vo("div")({transformOrigin:"0% 0px 0px",width:"100%",display:"block",overflow:"hidden","&.incorrect":{color:"#946202"}}),Ko=Vo("div")({WebkitFontSmoothing:"antialiased",backgroundColor:`var(--feedback-bg-color, ${Fo()})`,borderRadius:"4px",lineHeight:"25px",margin:"0px",padding:"10px",verticalAlign:"middle",color:"var(--feedback-color, white)","&.correct":{backgroundColor:`var(--feedback-correct-bg-color, ${Io()})`},"&.incorrect":{backgroundColor:`var(--feedback-incorrect-bg-color, ${$o()})`}}),Wo=Vo("div")({"&.feedback-enter":{height:"1px"},"&.feedback-enter-active":{height:"45px",transition:"height 500ms"},"&.feedback-exit":{height:"45px"},"&.feedback-exit-active":{height:"1px",transition:"height 200ms"}});class Yo extends Uo.Component{constructor(...e){super(...e),Yo.prototype.__init.call(this)}static __initStatic(){this.propTypes={correctness:Ho.string,feedback:Ho.string}}__init(){this.nodeRef=Uo.createRef()}renderFeedback(){const{correctness:e,feedback:t}=this.props;return e&&t?Uo.createElement(mo,{key:"hasFeedback",nodeRef:this.nodeRef,timeout:{enter:500,exit:200},classNames:"feedback"},Uo.createElement(Wo,{ref:this.nodeRef},Uo.createElement(qo,null,Uo.createElement(Ko,{className:e,dangerouslySetInnerHTML:{__html:t}})))):null}render(){return Uo.createElement("div",null,Uo.createElement(_o,null,this.renderFeedback()))}}Yo.__initStatic();const Go=t,Jo=e,{Popover:Qo}=i,{styled:Xo}=n,Zo=s("pie-libs:render-ui:response-indicators"),er=Xo("div")(({hasFeedback:e})=>({cursor:e?"pointer":"default"})),tr=Xo(Qo)({cursor:"pointer"}),nr=Xo("div")({padding:"0",borderRadius:"4px"}),or=(e,t)=>{class n extends Go.Component{constructor(e){super(e),n.prototype.__init.call(this),n.prototype.__init2.call(this),this.state={}}__init(){this.handlePopoverOpen=e=>{Zo("[handlePopoverOpen]",e.target),this.setState({anchorEl:e.target})}}__init2(){this.handlePopoverClose=()=>{this.setState({anchorEl:null})}}render(){const{feedback:n}=this.props,{anchorEl:o}=this.state;return Go.createElement(er,{hasFeedback:!!n},Go.createElement("span",{ref:e=>this.icon=e,onClick:this.handlePopoverOpen},Go.createElement(e,null)),n&&Go.createElement(tr,{PaperComponent:nr,open:!!o,anchorEl:o,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},onClose:this.handlePopoverClose},Go.createElement(Yo,{feedback:n,correctness:t})))}}return n.propTypes={feedback:Jo.string},n};or(rn,"correct"),or(yn,"incorrect"),or(Bn,"partially-correct"),or(Mn,"nothing-submitted");const rr=t,{styled:ir}=n,sr=a,ar=e,{renderMath:lr}=p,cr=ir("span")(({theme:e})=>({color:e.palette.primary.light,borderBottom:`1px dotted ${e.palette.primary.light}`,cursor:"pointer"})),pr=ir(sr)(({theme:e})=>({paddingTop:e.spacing(2)}));class dr extends rr.Component{constructor(...e){super(...e),dr.prototype.__init.call(this),dr.prototype.__init2.call(this)}static __initStatic(){this.propTypes={className:ar.string,children:ar.object,labels:ar.shape({visible:ar.string,hidden:ar.string})}}static __initStatic2(){this.defaultProps={labels:{}}}__init(){this.state={expanded:!1}}__init2(){this.toggleExpanded=()=>{this.setState(e=>({expanded:!e.expanded}))}}componentDidMount(){lr(this.root)}componentDidUpdate(){lr(this.root)}render(){const{labels:e,children:t,className:n}=this.props,o=this.state.expanded?e.visible||"Hide":e.hidden||"Show";return rr.createElement("div",{className:n,ref:e=>this.root=e},rr.createElement("div",{onClick:this.toggleExpanded},rr.createElement(cr,null,o)),rr.createElement(pr,{in:this.state.expanded,timeout:{enter:225,exit:195},unmountOnExit:!0},t))}}dr.__initStatic(),dr.__initStatic2();const{Button:ur}=i,{styled:hr}=n;hr("div")({display:"flex",flexDirection:"column"}),hr("div")({display:"flex",alignItems:"center",justifyContent:"center"}),hr("div")(({theme:e})=>({width:"24px",height:"24px",color:"gray",marginRight:e.spacing(1),display:"flex",alignItems:"center"})),hr(ur)(({theme:e})=>({display:"flex",alignItems:"center",marginLeft:e.spacing(3),marginRight:e.spacing(3)}));const gr=t,{createTheme:fr}=n,{styled:mr}=n,{StyledEngineProvider:yr}=n,{ThemeProvider:br}=n,vr=e;const xr=fr({typography:{fontFamily:"inherit"},palette:{action:{disabled:"rgba(0, 0, 0, 0.54);"}},components:{MuiTypography:{styleOverrides:{root:{fontFamily:"inherit"}}},MuiButton:{styleOverrides:{contained:{backgroundColor:"#e0e0e0",color:"#000000","&:hover":{backgroundColor:"#bdbdbd"}}}}}}),Er=mr("div")({"& table, th, td":{fontSize:"inherit"}});class Cr extends gr.Component{static __initStatic(){this.propTypes={className:vr.string,children:vr.array,extraCSSRules:vr.shape({names:vr.arrayOf(vr.string),rules:vr.string}),fontSizeFactor:vr.number}}static __initStatic2(){this.defaultProps={extraCSSRules:{},fontSizeFactor:1}}constructor(e){super(e),this.classesSheet=document.createElement("style")}computeStyle(e){const t=e=>parseFloat(getComputedStyle(e).fontSize),n=t(document.documentElement),o=t(document.body),r=Math.max(n,o),i=null!=e&&"number"==typeof e?e:1;return 1!==i?{fontSize:r*i+"px"}:null}render(){const{children:e,className:t,fontSizeFactor:n,...o}=this.props,{extraCSSRules:r,...i}=o,s=this.computeStyle(n);return gr.createElement(yr,{injectFirst:!0},gr.createElement(br,{theme:xr},function(e){let t,n=e[0],o=1;for(;o<e.length;){const r=e[o],i=e[o+1];if(o+=2,("optionalAccess"===r||"optionalCall"===r)&&null==n)return;"access"===r||"optionalAccess"===r?(t=n,n=i(n)):"call"!==r&&"optionalCall"!==r||(n=i((...e)=>n.call(t,...e)),t=void 0)}return n}([r,"optionalAccess",e=>e.rules])?gr.createElement("style",{dangerouslySetInnerHTML:{__html:`.extraCSSRules { ${r.rules} }`}}):null,gr.createElement(Er,{className:`${t} extraCSSRules`,...i,...s&&{style:s}},e)))}}Cr.__initStatic(),Cr.__initStatic2();const Sr=t,{styled:kr}=n,wr=e,_r=kr(Cr)({display:"flex",flexDirection:"column",position:"relative"});class Ar extends Sr.Component{static __initStatic(){this.propTypes={ariaLabel:wr.string,children:wr.oneOfType([wr.arrayOf(wr.node),wr.node]).isRequired,role:wr.string,extraCSSRules:wr.shape({names:wr.arrayOf(wr.string),rules:wr.string}),fontSizeFactor:wr.number}}render(){const{children:e,ariaLabel:t,role:n,extraCSSRules:o,fontSizeFactor:r,classes:i}=this.props,s=t?{"aria-label":t,role:n}:{};return Sr.createElement(_r,{...s,extraCSSRules:o,fontSizeFactor:r,classes:i},e)}}Ar.__initStatic();const Or=t,Rr=e;class Lr extends Or.Component{static __initStatic(){this.propTypes={tag:Rr.string,className:Rr.string,html:Rr.string}}static __initStatic2(){this.defaultProps={tag:"div",html:""}}render(){const{tag:e,className:t,html:n}=this.props,o=e||"div";return Or.createElement(o,{ref:e=>this.node=e,className:t,dangerouslySetInnerHTML:{__html:n}})}}Lr.__initStatic(),Lr.__initStatic2();const{InputLabel:jr}=i,{FormControl:Nr}=i,Tr=e,{styled:Mr}=n;Mr(Nr)(({theme:e})=>({margin:0,padding:0,flex:"1 0 auto",minWidth:e.spacing(4)})),Mr(jr)(()=>({fontSize:"inherit",whiteSpace:"nowrap",margin:0,padding:0,alignSelf:"flex-start",position:"absolute",top:0,left:0,transformOrigin:"top left",pointerEvents:"none","&.MuiInputLabel-shrink":{transform:"scale(0.75) translate(0, -0.75em)"},"&:not(.MuiInputLabel-shrink)":{transform:"translate(0, 0)"}})),Tr.oneOfType([Tr.string,Tr.object]).isRequired,Tr.string,Tr.oneOfType([Tr.arrayOf(Tr.node),Tr.node]).isRequired;const Pr=t,{Component:Fr}=t,{styled:Ir}=n,$r=e,{renderMath:Br}=p,Dr=Ir("div")(({theme:e,tagName:t})=>({'&:not(.MathJax) > table:not([role="presentation"])':{borderCollapse:"collapse"},'&:not(.MathJax) table[border]:not([role="presentation"]), &:not(.MathJax) table[border]:not([role="presentation"]) td, &:not(.MathJax) table[border]:not([role="presentation"]) th':{borderStyle:"solid",borderColor:To("table-grid","text",No.TABLE_GRID)},'&:not(.MathJax) > table:not([role="presentation"]):has(tbody tr > th:first-child):not(:has(tbody tr > td:first-child)) tbody td:nth-child(even)':{backgroundColor:Do()},'&:not(.MathJax) > table:not([role="presentation"]):has(tbody tr > td:first-child) tbody tr:nth-child(even) td':{backgroundColor:Do()},'&:not(.MathJax) table:not([role="presentation"]) td, &:not(.MathJax) table:not([role="presentation"]) th':{padding:".6em 1em",textAlign:"left"},"&:not(.MathJax) > table td > p.kds-indent":{textAlign:"initial"},"&.prompt":{verticalAlign:"middle",color:Po()},"&.legend":{width:"100%",fontSize:"inherit !important"},"&.rationale":{paddingLeft:e.spacing(4),paddingBottom:e.spacing(1)},"&.prompt-label":{color:`${Po()} !important`,display:"flex",flexDirection:"column",verticalAlign:"middle",cursor:"pointer","& > p":{margin:"0 0 0 0 !important"}}})),zr=/\\embed\{newLine\}\[\]/g;class Ur extends Fr{constructor(...e){super(...e),Ur.prototype.__init.call(this),Ur.prototype.__init2.call(this)}static __initStatic(){this.propTypes={prompt:$r.string,tagName:$r.string,className:$r.string,onClick:$r.func,defaultClassName:$r.string,autoplayAudioEnabled:$r.bool,customAudioButton:{playImage:$r.string,pauseImage:$r.string}}}static __initStatic2(){this.defaultProps={onClick:()=>{}}}__init(){this.promptRef=Pr.createRef()}__init2(){this.parsedText=e=>{const{customAudioButton:t}=this.props,n=document.createElement("div");n.innerHTML=e;const o=n.querySelector("audio");if(o){const e=document.createElement("source");if(e.setAttribute("type","audio/mp3"),e.setAttribute("src",o.getAttribute("src")),o.removeAttribute("src"),o.setAttribute("id","pie-prompt-audio-player"),o.appendChild(e),t){o.style.display="none";const e=document.createElement("div");e.id="play-audio-button",Object.assign(e.style,{cursor:"pointer",display:"block",width:"128px",height:"128px",backgroundImage:`url(${t.pauseImage})`,backgroundSize:"cover",borderRadius:"50%",border:"1px solid #326295"}),o.parentNode.insertBefore(e,o)}}return n.innerHTML}}addCustomAudioButtonControls(){const{autoplayAudioEnabled:e,customAudioButton:t}=this.props,n=document.getElementById("play-audio-button"),o=document.getElementById("pie-prompt-audio-player");if(e&&o&&o.play().then(()=>{n&&t&&o.addEventListener("ended",i)}).catch(e=>{console.error("Error playing audio",e)}),!n||!o||!t)return;const r=()=>{o.paused&&(n.style.backgroundImage.includes(t.pauseImage)||o.play())},i=()=>{n.style.backgroundImage=`url(${t.playImage})`},s=()=>{Object.assign(n.style,{backgroundImage:`url(${t.pauseImage})`,border:"1px solid #ccc"})},a=()=>{Object.assign(n.style,{backgroundImage:`url(${t.playImage})`,border:"1px solid #326295"})};n.addEventListener("click",r),o.addEventListener("play",s),o.addEventListener("pause",a),o.addEventListener("ended",i),this._handlePlayClick=r,this._handleAudioPlay=s,this._handleAudioPause=a,this._handleAudioEnded=i}removeCustomAudioButtonListeners(){const e=document.getElementById("play-audio-button"),t=document.querySelector("audio");e&&t&&(e.removeEventListener("click",this._handlePlayClick),t.removeEventListener("play",this._handleAudioPlay),t.removeEventListener("pause",this._handleAudioPause),t.removeEventListener("ended",this._handleAudioEnded))}componentDidMount(){this.alignImages(),this.addCustomAudioButtonControls(),this.setupMathRendering()}componentDidUpdate(e){this.alignImages(),e.prompt!==this.props.prompt&&this.renderMathContent()}componentWillUnmount(){this.removeCustomAudioButtonListeners()}setupMathRendering(){this.renderMathContent()}renderMathContent(){const e=this.promptRef.current;e&&"function"==typeof Br&&Br(e)}alignImages(){const e=this.promptRef.current;if(!e)return;const t=e.getElementsByTagName("img");if(t&&t.length)for(let e of t)if(e.attributes&&e.attributes.alignment&&e.attributes.alignment.value){const t=e.attributes.alignment.value,n="center"===t?"center":"right"===t?"flex-end":"flex-start",o=e.parentElement;if("DIV"===o.tagName&&"flex"===o.style.display&&"100%"===o.style.width)o.style.justifyContent=n;else{const t=document.createElement("div");t.style.display="flex",t.style.width="100%",t.style.justifyContent=n;const r=e.cloneNode(!0);t.appendChild(r),o.replaceChild(t,e)}}}render(){const{prompt:e,tagName:t,className:n,onClick:o,defaultClassName:r}=this.props,i=`${n||""} ${r||""} ${"legend"===t?"legend":""} preview-prompt`.trim();return Pr.createElement(Dr,{as:t||"div",ref:this.promptRef,onClick:o,className:i,tagName:t,dangerouslySetInnerHTML:{__html:this.parsedText(e||"").replace(zr,"\\newline ")}})}}Ur.__initStatic(),Ur.__initStatic2();const Hr=e,Vr=t,qr=e=>Vr.createElement(Vr.Fragment,null,Vr.Children.map(e.children,t=>Vr.cloneElement(t,{"data-pie-readable":void 0===e.false})));qr.propTypes={children:Hr.node,false:Hr.bool};const Kr=e;Kr.node,Kr.string,"undefined"!=typeof window&&new DOMParser,"undefined"!=typeof window&&new DOMParser;const Wr=t,{useRef:Yr}=t,Gr=e,{styled:Jr}=n,Qr="height ease-in 300ms, opacity ease-in 300ms",Xr=Jr("div")(()=>({position:"relative",height:0,overflow:"hidden",display:"flex",visibility:"hidden",width:0,"&.enter":{transition:Qr,opacity:1,height:"auto",width:"auto",visibility:"visible",minHeight:"25px"},"&.enter-done":{height:"auto",visibility:"visible",width:"auto",minHeight:"25px"},"&.exit":{transition:Qr,opacity:0,height:0,visibility:"visible",width:0},"&.exit-done":{opacity:0,visibility:"hidden",height:0,width:0}})),Zr=e=>{const{show:t,children:n,className:o}=e,r=Yr(null);return Wr.createElement(mo,{nodeRef:r,in:t,appear:!0,mountOnEnter:!1,timeout:300,classNames:{enter:"enter",enterDone:"enter-done",exit:"exit",exitDone:"exit-done"}},Wr.createElement(Xr,{ref:r,className:o},n))};function ei(e,t){return null!=e?e:t()}function ti(e){let t,n=e[0],o=1;for(;o<e.length;){const r=e[o],i=e[o+1];if(o+=2,("optionalAccess"===r||"optionalCall"===r)&&null==n)return;"access"===r||"optionalAccess"===r?(t=n,n=i(n)):"call"!==r&&"optionalCall"!==r||(n=i((...e)=>n.call(t,...e)),t=void 0)}return n}Zr.propTypes={show:Gr.bool.isRequired,className:Gr.string,children:Gr.oneOfType([Gr.arrayOf(Gr.node),Gr.node]).isRequired};const ni=e=>"string"==typeof e,oi=()=>{let e,t;const n=new Promise((n,o)=>{e=n,t=o});return n.resolve=e,n.reject=t,n},ri=e=>null==e?"":""+e,ii=/###/g,si=e=>e&&e.indexOf("###")>-1?e.replace(ii,"."):e,ai=e=>!e||ni(e),li=(e,t,n)=>{const o=ni(t)?t.split("."):t;let r=0;for(;r<o.length-1;){if(ai(e))return{};const t=si(o[r]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++r}return ai(e)?{}:{obj:e,k:si(o[r])}},ci=(e,t,n)=>{const{obj:o,k:r}=li(e,t,Object);if(void 0!==o||1===t.length)return void(o[r]=n);let i=t[t.length-1],s=t.slice(0,t.length-1),a=li(e,s,Object);for(;void 0===a.obj&&s.length;)i=`${s[s.length-1]}.${i}`,s=s.slice(0,s.length-1),a=li(e,s,Object),ti([a,"optionalAccess",e=>e.obj])&&void 0!==a.obj[`${a.k}.${i}`]&&(a.obj=void 0);a.obj[`${a.k}.${i}`]=n},pi=(e,t)=>{const{obj:n,k:o}=li(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,o))return n[o]},di=(e,t,n)=>{for(const o in t)"__proto__"!==o&&"constructor"!==o&&(o in e?ni(e[o])||e[o]instanceof String||ni(t[o])||t[o]instanceof String?n&&(e[o]=t[o]):di(e[o],t[o],n):e[o]=t[o]);return e},ui=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var hi={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const gi=e=>ni(e)?e.replace(/[&<>"'\/]/g,e=>hi[e]):e;const fi=[" ",",","?","!",";"],mi=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),yi=(e,t,n=".")=>{if(!e)return;if(e[t]){if(!Object.prototype.hasOwnProperty.call(e,t))return;return e[t]}const o=t.split(n);let r=e;for(let e=0;e<o.length;){if(!r||"object"!=typeof r)return;let t,i="";for(let s=e;s<o.length;++s)if(s!==e&&(i+=n),i+=o[s],t=r[i],void 0!==t){if(["string","number","boolean"].indexOf(typeof t)>-1&&s<o.length-1)continue;e+=s-e+1;break}r=t}return r},bi=e=>ti([e,"optionalAccess",e=>e.replace,"call",e=>e("_","-")]),vi={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){ti([console,"optionalAccess",t=>t[e],"optionalAccess",e=>e.apply,"optionalCall",e=>e(console,t)])}};class xi{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||"i18next:",this.logger=e||vi,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,o){return o&&!this.debug?null:(ni(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new xi(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new xi(this.logger,e)}}var Ei=new xi;class Ci{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 o=0;o<n;o++)e(...t)})}if(this.observers["*"]){Array.from(this.observers["*"].entries()).forEach(([n,o])=>{for(let r=0;r<o;r++)n.apply(n,[e,...t])})}}}class Si extends Ci{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,o={}){const r=void 0!==o.keySeparator?o.keySeparator:this.options.keySeparator,i=void 0!==o.ignoreJSONStructure?o.ignoreJSONStructure:this.options.ignoreJSONStructure;let s;e.indexOf(".")>-1?s=e.split("."):(s=[e,t],n&&(Array.isArray(n)?s.push(...n):ni(n)&&r?s.push(...n.split(r)):s.push(n)));const a=pi(this.data,s);return!a&&!t&&!n&&e.indexOf(".")>-1&&(e=s[0],t=s[1],n=s.slice(2).join(".")),!a&&i&&ni(n)?yi(ti([this,"access",e=>e.data,"optionalAccess",t=>t[e],"optionalAccess",e=>e[t]]),n,r):a}addResource(e,t,n,o,r={silent:!1}){const i=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator;let s=[e,t];n&&(s=s.concat(i?n.split(i):n)),e.indexOf(".")>-1&&(s=e.split("."),o=t,t=s[1]),this.addNamespaces(t),ci(this.data,s,o),r.silent||this.emit("added",e,t,n,o)}addResources(e,t,n,o={silent:!1}){for(const o in n)(ni(n[o])||Array.isArray(n[o]))&&this.addResource(e,t,o,n[o],{silent:!0});o.silent||this.emit("added",e,t,n)}addResourceBundle(e,t,n,o,r,i={silent:!1,skipCopy:!1}){let s=[e,t];e.indexOf(".")>-1&&(s=e.split("."),o=n,n=t,t=s[1]),this.addNamespaces(t);let a=pi(this.data,s)||{};i.skipCopy||(n=JSON.parse(JSON.stringify(n))),o?di(a,n,r):a={...a,...n},ci(this.data,s,a),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 ki={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,o,r){return e.forEach(e=>{t=ei(ti([this,"access",e=>e.processors,"access",t=>t[e],"optionalAccess",e=>e.process,"call",e=>e(t,n,o,r)]),()=>t)}),t}};const wi=Symbol("i18next/PATH_KEY");function _i(e,t){const{[wi]:n}=e(function(){const e=[],t=Object.create(null);let n;return t.get=(o,r)=>(ti([n,"optionalAccess",e=>e.revoke,"optionalCall",e=>e()]),r===wi?e:(e.push(r),n=Proxy.revocable(o,t),n.proxy)),Proxy.revocable(Object.create(null),t).proxy}());return n.join(ei(ti([t,"optionalAccess",e=>e.keySeparator]),()=>"."))}const Ai={},Oi=e=>!ni(e)&&"boolean"!=typeof e&&"number"!=typeof e;class Ri extends Ci{constructor(e,t={}){var n,o;super(),n=e,o=this,["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"].forEach(e=>{n[e]&&(o[e]=n[e])}),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=Ei.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){const n={...t};if(null==e)return!1;const o=this.resolve(e,n);if(void 0===ti([o,"optionalAccess",e=>e.res]))return!1;const r=Oi(o.res);return!1!==n.returnObjects||!r}extractFromKey(e,t){let n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");const o=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator;let r=t.ns||this.options.defaultNS||[];const i=n&&e.indexOf(n)>-1,s=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||((e,t,n)=>{t=t||"",n=n||"";const o=fi.filter(e=>t.indexOf(e)<0&&n.indexOf(e)<0);if(0===o.length)return!0;const r=mi.getRegExp(`(${o.map(e=>"?"===e?"\\?":e).join("|")})`);let i=!r.test(e);if(!i){const t=e.indexOf(n);t>0&&!r.test(e.substring(0,t))&&(i=!0)}return i})(e,n,o));if(i&&!s){const t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:ni(r)?[r]:r};const i=e.split(n);(n!==o||n===o&&this.options.ns.indexOf(i[0])>-1)&&(r=i.shift()),e=i.join(o)}return{key:e,namespaces:ni(r)?[r]:r}}translate(e,t,n){let o="object"==typeof t?{...t}:t;if("object"!=typeof o&&this.options.overloadTranslationOptionHandler&&(o=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof o&&(o={...o}),o||(o={}),null==e)return"";"function"==typeof e&&(e=_i(e,{...this.options,...o})),Array.isArray(e)||(e=[String(e)]);const r=void 0!==o.returnDetails?o.returnDetails:this.options.returnDetails,i=void 0!==o.keySeparator?o.keySeparator:this.options.keySeparator,{key:s,namespaces:a}=this.extractFromKey(e[e.length-1],o),l=a[a.length-1];let c=void 0!==o.nsSeparator?o.nsSeparator:this.options.nsSeparator;void 0===c&&(c=":");const p=o.lng||this.language,d=o.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if("cimode"===ti([p,"optionalAccess",e=>e.toLowerCase,"call",e=>e()]))return d?r?{res:`${l}${c}${s}`,usedKey:s,exactUsedKey:s,usedLng:p,usedNS:l,usedParams:this.getUsedParamsDetails(o)}:`${l}${c}${s}`:r?{res:s,usedKey:s,exactUsedKey:s,usedLng:p,usedNS:l,usedParams:this.getUsedParamsDetails(o)}:s;const u=this.resolve(e,o);let h=ti([u,"optionalAccess",e=>e.res]);const g=ti([u,"optionalAccess",e=>e.usedKey])||s,f=ti([u,"optionalAccess",e=>e.exactUsedKey])||s,m=void 0!==o.joinArrays?o.joinArrays:this.options.joinArrays,y=!this.i18nFormat||this.i18nFormat.handleAsObject,b=void 0!==o.count&&!ni(o.count),v=Ri.hasDefaultValue(o),x=b?this.pluralResolver.getSuffix(p,o.count,o):"",E=o.ordinal&&b?this.pluralResolver.getSuffix(p,o.count,{ordinal:!1}):"",C=b&&!o.ordinal&&0===o.count,S=C&&o[`defaultValue${this.options.pluralSeparator}zero`]||o[`defaultValue${x}`]||o[`defaultValue${E}`]||o.defaultValue;let k=h;y&&!h&&v&&(k=S);const w=Oi(k),_=Object.prototype.toString.apply(k);if(!(y&&k&&w&&["[object Number]","[object Function]","[object RegExp]"].indexOf(_)<0)||ni(m)&&Array.isArray(k))if(y&&ni(m)&&Array.isArray(h))h=h.join(m),h&&(h=this.extendTranslation(h,e,o,n));else{let t=!1,r=!1;!this.isValidLookup(h)&&v&&(t=!0,h=S),this.isValidLookup(h)||(r=!0,h=s);const a=(o.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&r?void 0:h,d=v&&S!==h&&this.options.updateMissing;if(r||t||d){if(this.logger.log(d?"updateKey":"missingKey",p,l,s,d?S:h),i){const e=this.resolve(s,{...o,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,o.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(o.lng||this.language):e.push(o.lng||this.language);const n=(e,t,n)=>{const r=v&&n!==h?n:a;this.options.missingKeyHandler?this.options.missingKeyHandler(e,l,t,r,d,o):ti([this,"access",e=>e.backendConnector,"optionalAccess",e=>e.saveMissing])&&this.backendConnector.saveMissing(e,l,t,r,d,o),this.emit("missingKey",e,l,t,h)};this.options.saveMissing&&(this.options.saveMissingPlurals&&b?e.forEach(e=>{const t=this.pluralResolver.getSuffixes(e,o);C&&o[`defaultValue${this.options.pluralSeparator}zero`]&&t.indexOf(`${this.options.pluralSeparator}zero`)<0&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{n([e],s+t,o[`defaultValue${t}`]||S)})}):n(e,s,S))}h=this.extendTranslation(h,e,o,u,n),r&&h===s&&this.options.appendNamespaceToMissingKey&&(h=`${l}${c}${s}`),(r||t)&&this.options.parseMissingKeyHandler&&(h=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}${c}${s}`:s,t?h:void 0,o))}else{if(!o.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(g,k,{...o,ns:a}):`key '${s} (${this.language})' returned an object instead of string.`;return r?(u.res=e,u.usedParams=this.getUsedParamsDetails(o),u):e}if(i){const e=Array.isArray(k),t=e?[]:{},n=e?f:g;for(const e in k)if(Object.prototype.hasOwnProperty.call(k,e)){const r=`${n}${i}${e}`;t[e]=v&&!h?this.translate(r,{...o,defaultValue:Oi(S)?S[e]:void 0,joinArrays:!1,ns:a}):this.translate(r,{...o,joinArrays:!1,ns:a}),t[e]===r&&(t[e]=k[e])}h=t}}return r?(u.res=h,u.usedParams=this.getUsedParamsDetails(o),u):h}extendTranslation(e,t,n,o,r){if(ti([this,"access",e=>e.i18nFormat,"optionalAccess",e=>e.parse]))e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||o.usedLng,o.usedNS,o.usedKey,{resolved:o});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const i=ni(e)&&(void 0!==ti([n,"optionalAccess",e=>e.interpolation,"optionalAccess",e=>e.skipOnVariables])?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let s;if(i){const t=e.match(this.interpolator.nestingRegexp);s=t&&t.length}let a=n.replace&&!ni(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(a={...this.options.interpolation.defaultVariables,...a}),e=this.interpolator.interpolate(e,a,n.lng||this.language||o.usedLng,n),i){const t=e.match(this.interpolator.nestingRegexp);s<(t&&t.length)&&(n.nest=!1)}!n.lng&&o&&o.res&&(n.lng=this.language||o.usedLng),!1!==n.nest&&(e=this.interpolator.nest(e,(...e)=>ti([r,"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,s=ni(i)?[i]:i;return null!=e&&ti([s,"optionalAccess",e=>e.length])&&!1!==n.applyPostProcessor&&(e=ki.handle(s,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...o,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e,t={}){let n,o,r,i,s;return ni(e)&&(e=[e]),e.forEach(e=>{if(this.isValidLookup(n))return;const a=this.extractFromKey(e,t),l=a.key;o=l;let c=a.namespaces;this.options.fallbackNS&&(c=c.concat(this.options.fallbackNS));const p=void 0!==t.count&&!ni(t.count),d=p&&!t.ordinal&&0===t.count,u=void 0!==t.context&&(ni(t.context)||"number"==typeof t.context)&&""!==t.context,h=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);c.forEach(e=>{this.isValidLookup(n)||(s=e,Ai[`${h[0]}-${e}`]||!ti([this,"access",e=>e.utils,"optionalAccess",e=>e.hasLoadedNamespace])||ti([this,"access",e=>e.utils,"optionalAccess",e=>e.hasLoadedNamespace,"call",e=>e(s)])||(Ai[`${h[0]}-${e}`]=!0,this.logger.warn(`key "${o}" for languages "${h.join(", ")}" won't get resolved as namespace "${s}" 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!!!")),h.forEach(o=>{if(this.isValidLookup(n))return;i=o;const s=[l];if(ti([this,"access",e=>e.i18nFormat,"optionalAccess",e=>e.addLookupKeys]))this.i18nFormat.addLookupKeys(s,l,o,e,t);else{let e;p&&(e=this.pluralResolver.getSuffix(o,t.count,t));const n=`${this.options.pluralSeparator}zero`,r=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(p&&(t.ordinal&&0===e.indexOf(r)&&s.push(l+e.replace(r,this.options.pluralSeparator)),s.push(l+e),d&&s.push(l+n)),u){const o=`${l}${this.options.contextSeparator||"_"}${t.context}`;s.push(o),p&&(t.ordinal&&0===e.indexOf(r)&&s.push(o+e.replace(r,this.options.pluralSeparator)),s.push(o+e),d&&s.push(o+n))}}let a;for(;a=s.pop();)this.isValidLookup(n)||(r=a,n=this.getResource(o,e,a,t))}))})}),{res:n,usedKey:o,exactUsedKey:r,usedLng:i,usedNS:s}}isValidLookup(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}getResource(e,t,n,o={}){return ti([this,"access",e=>e.i18nFormat,"optionalAccess",e=>e.getResource])?this.i18nFormat.getResource(e,t,n,o):this.resourceStore.getResource(e,t,n,o)}getUsedParamsDetails(e={}){const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=e.replace&&!ni(e.replace);let o=n?e.replace:e;if(n&&void 0!==e.count&&(o.count=e.count),this.options.interpolation.defaultVariables&&(o={...this.options.interpolation.defaultVariables,...o}),!n){o={...o};for(const e of t)delete o[e]}return o}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 Li{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Ei.create("languageUtils")}getScriptPartFromCode(e){if(!(e=bi(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=bi(e))||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(ni(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 o=this.getLanguagePartFromCode(e);if(this.isSupportedCode(o))return t=o;t=this.options.supportedLngs.find(e=>e===o?e:e.indexOf("-")<0&&o.indexOf("-")<0?void 0:e.indexOf("-")>0&&o.indexOf("-")<0&&e.substring(0,e.indexOf("-"))===o||0===e.indexOf(o)&&o.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)),ni(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),o=[],r=e=>{e&&(this.isSupportedCode(e)?o.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return ni(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?("languageOnly"!==this.options.load&&r(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&r(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&r(this.getLanguagePartFromCode(e))):ni(e)&&r(this.formatLanguageCode(e)),n.forEach(e=>{o.indexOf(e)<0&&r(this.formatLanguageCode(e))}),o}}const ji={zero:0,one:1,two:2,few:3,many:4,other:5},Ni={select:e=>1===e?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class Ti{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=Ei.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){const n=bi("dev"===e?"en":e),o=t.ordinal?"ordinal":"cardinal",r=JSON.stringify({cleanedCode:n,type:o});if(r in this.pluralRulesCache)return this.pluralRulesCache[r];let i;try{i=new Intl.PluralRules(n,{type:o})}catch(n){if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),Ni;if(!e.match(/-|_/))return Ni;const o=this.languageUtils.getLanguagePartFromCode(e);i=this.getRule(o,t)}return this.pluralRulesCache[r]=i,i}needsPlural(e,t={}){let n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),ti([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)=>ji[e]-ji[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${e}`):[]}getSuffix(e,t,n={}){const o=this.getRule(e,n);return o?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${o.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,n))}}const Mi=(e,t,n,o=".",r=!0)=>{let i=((e,t,n)=>{const o=pi(e,n);return void 0!==o?o:pi(t,n)})(e,t,n);return!i&&r&&ni(n)&&(i=yi(e,n,o),void 0===i&&(i=yi(t,n,o))),i},Pi=e=>e.replace(/\$/g,"$$$$");class Fi{constructor(e={}){this.logger=Ei.create("interpolator"),this.options=e,this.format=ti([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:o,prefix:r,prefixEscaped:i,suffix:s,suffixEscaped:a,formatSeparator:l,unescapeSuffix:c,unescapePrefix:p,nestingPrefix:d,nestingPrefixEscaped:u,nestingSuffix:h,nestingSuffixEscaped:g,nestingOptionsSeparator:f,maxReplaces:m,alwaysFormat:y}=e.interpolation;this.escape=void 0!==t?t:gi,this.escapeValue=void 0===n||n,this.useRawValueToEscape=void 0!==o&&o,this.prefix=r?ui(r):i||"{{",this.suffix=s?ui(s):a||"}}",this.formatSeparator=l||",",this.unescapePrefix=c?"":p||"-",this.unescapeSuffix=this.unescapePrefix?"":c||"",this.nestingPrefix=d?ui(d):u||ui("$t("),this.nestingSuffix=h?ui(h):g||ui(")"),this.nestingOptionsSeparator=f||",",this.maxReplaces=m||1e3,this.alwaysFormat=void 0!==y&&y,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(e,t)=>ti([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,o){let r,i,s;const a=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},l=e=>{if(e.indexOf(this.formatSeparator)<0){const r=Mi(t,a,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(r,void 0,n,{...o,...t,interpolationkey:e}):r}const r=e.split(this.formatSeparator),i=r.shift().trim(),s=r.join(this.formatSeparator).trim();return this.format(Mi(t,a,i,this.options.keySeparator,this.options.ignoreJSONStructure),s,n,{...o,...t,interpolationkey:i})};this.resetRegExp();const c=ti([o,"optionalAccess",e=>e.missingInterpolationHandler])||this.options.missingInterpolationHandler,p=void 0!==ti([o,"optionalAccess",e=>e.interpolation,"optionalAccess",e=>e.skipOnVariables])?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>Pi(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?Pi(this.escape(e)):Pi(e)}].forEach(t=>{for(s=0;r=t.regex.exec(e);){const n=r[1].trim();if(i=l(n),void 0===i)if("function"==typeof c){const t=c(e,r,o);i=ni(t)?t:""}else if(o&&Object.prototype.hasOwnProperty.call(o,n))i="";else{if(p){i=r[0];continue}this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),i=""}else ni(i)||this.useRawValueToEscape||(i=ri(i));const a=t.safeValue(i);if(e=e.replace(r[0],a),p?(t.regex.lastIndex+=i.length,t.regex.lastIndex-=r[0].length):t.regex.lastIndex=0,s++,s>=this.maxReplaces)break}}),e}nest(e,t,n={}){let o,r,i;const s=(e,t)=>{const n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;const o=e.split(new RegExp(`${n}[ ]*{`));let r=`{${o[1]}`;e=o[0],r=this.interpolate(r,i);const s=r.match(/'/g),a=r.match(/"/g);(ei(ti([s,"optionalAccess",e=>e.length]),()=>0)%2==0&&!a||a.length%2!=0)&&(r=r.replace(/'/g,'"'));try{i=JSON.parse(r),t&&(i={...t,...i})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${r}`}return i.defaultValue&&i.defaultValue.indexOf(this.prefix)>-1&&delete i.defaultValue,e};for(;o=this.nestingRegexp.exec(e);){let a=[];i={...n},i=i.replace&&!ni(i.replace)?i.replace:i,i.applyPostProcessor=!1,delete i.defaultValue;const l=/{.*}/.test(o[1])?o[1].lastIndexOf("}")+1:o[1].indexOf(this.formatSeparator);if(-1!==l&&(a=o[1].slice(l).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),o[1]=o[1].slice(0,l)),r=t(s.call(this,o[1].trim(),i),i),r&&o[0]===e&&!ni(r))return r;ni(r)||(r=ri(r)),r||(this.logger.warn(`missed to resolve ${o[1]} for nesting ${e}`),r=""),a.length&&(r=a.reduce((e,t)=>this.format(e,t,n.lng,{...n,interpolationkey:o[1].trim()}),r.trim())),e=e.replace(o[0],r),this.regexp.lastIndex=0}return e}}const Ii=e=>{const t={};return(n,o,r)=>{let i=r;r&&r.interpolationkey&&r.formatParams&&r.formatParams[r.interpolationkey]&&r[r.interpolationkey]&&(i={...i,[r.interpolationkey]:void 0});const s=o+JSON.stringify(i);let a=t[s];return a||(a=e(bi(o),r),t[s]=a),a(n)}},$i=e=>(t,n,o)=>e(bi(n),o)(t);class Bi{constructor(e={}){this.logger=Ei.create("formatter"),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||",";const n=t.cacheInBuiltFormats?Ii:$i;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()]=Ii(t)}format(e,t,n,o={}){const r=t.split(this.formatSeparator);if(r.length>1&&r[0].indexOf("(")>1&&r[0].indexOf(")")<0&&r.find(e=>e.indexOf(")")>-1)){const e=r.findIndex(e=>e.indexOf(")")>-1);r[0]=[r[0],...r.splice(1,e)].join(this.formatSeparator)}return r.reduce((e,t)=>{const{formatName:r,formatOptions:i}=(e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const o=e.split("(");t=o[0].toLowerCase().trim();const r=o[1].substring(0,o[1].length-1);"currency"===t&&r.indexOf(":")<0?n.currency||(n.currency=r.trim()):"relativetime"===t&&r.indexOf(":")<0?n.range||(n.range=r.trim()):r.split(";").forEach(e=>{if(e){const[t,...o]=e.split(":"),r=o.join(":").trim().replace(/^'+|'+$/g,""),i=t.trim();n[i]||(n[i]=r),"false"===r&&(n[i]=!1),"true"===r&&(n[i]=!0),isNaN(r)||(n[i]=parseInt(r,10))}})}return{formatName:t,formatOptions:n}})(t);if(this.formats[r]){let t=e;try{const s=ti([o,"optionalAccess",e=>e.formatParams,"optionalAccess",e=>e[o.interpolationkey]])||{},a=s.locale||s.lng||o.locale||o.lng||n;t=this.formats[r](e,a,{...i,...o,...s})}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${r}`),e},e)}}class Di extends Ci{constructor(e,t,n,o={}){super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=o,this.logger=Ei.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=o.maxParallelReads||10,this.readingCalls=0,this.maxRetries=o.maxRetries>=0?o.maxRetries:5,this.retryTimeout=o.retryTimeout>=1?o.retryTimeout:350,this.state={},this.queue=[],ti([this,"access",e=>e.backend,"optionalAccess",e=>e.init,"optionalCall",e=>e(n,o.backend,o)])}queueLoad(e,t,n,o){const r={},i={},s={},a={};return e.forEach(e=>{let o=!0;t.forEach(t=>{const s=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[s]=2:this.state[s]<0||(1===this.state[s]?void 0===i[s]&&(i[s]=!0):(this.state[s]=1,o=!1,void 0===i[s]&&(i[s]=!0),void 0===r[s]&&(r[s]=!0),void 0===a[t]&&(a[t]=!0)))}),o||(s[e]=!0)}),(Object.keys(r).length||Object.keys(i).length)&&this.queue.push({pending:i,pendingCount:Object.keys(i).length,loaded:{},errors:[],callback:o}),{toLoad:Object.keys(r),pending:Object.keys(i),toLoadLanguages:Object.keys(s),toLoadNamespaces:Object.keys(a)}}loaded(e,t,n){const o=e.split("|"),r=o[0],i=o[1];t&&this.emit("failedLoading",r,i,t),!t&&n&&this.store.addResourceBundle(r,i,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);const s={};this.queue.forEach(n=>{((e,t,n)=>{const{obj:o,k:r}=li(e,t,Object);o[r]=o[r]||[],o[r].push(n)})(n.loaded,[r],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=>{s[e]||(s[e]={});const t=n.loaded[e];t.length&&t.forEach(t=>{void 0===s[e][t]&&(s[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit("loaded",s),this.queue=this.queue.filter(e=>!e.done)}read(e,t,n,o=0,r=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:o,wait:r,callback:i});this.readingCalls++;const s=(s,a)=>{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)}s&&a&&o<this.maxRetries?setTimeout(()=>{this.read.call(this,e,t,n,o+1,2*r,i)},r):i(s,a)},a=this.backend[n].bind(this.backend);if(2!==a.length)return a(e,t,s);try{const n=a(e,t);n&&"function"==typeof n.then?n.then(e=>s(null,e)).catch(s):s(null,n)}catch(e){s(e)}}prepareLoading(e,t,n={},o){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();ni(e)&&(e=this.languageUtils.toResolveHierarchy(e)),ni(t)&&(t=[t]);const r=this.queueLoad(e,t,n,o);if(!r.toLoad.length)return r.pending.length||o(),null;r.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("|"),o=n[0],r=n[1];this.read(o,r,"read",void 0,void 0,(n,i)=>{n&&this.logger.warn(`${t}loading namespace ${r} for language ${o} failed`,n),!n&&i&&this.logger.log(`${t}loaded namespace ${r} for language ${o}`,i),this.loaded(e,n,i)})}saveMissing(e,t,n,o,r,i={},s=()=>{}){if(!ti([this,"access",e=>e.services,"optionalAccess",e=>e.utils,"optionalAccess",e=>e.hasLoadedNamespace])||ti([this,"access",e=>e.services,"optionalAccess",e=>e.utils,"optionalAccess",e=>e.hasLoadedNamespace,"call",e=>e(t)])){if(null!=n&&""!==n){if(ti([this,"access",e=>e.backend,"optionalAccess",e=>e.create])){const a={...i,isUpdate:r},l=this.backend.create.bind(this.backend);if(l.length<6)try{let r;r=5===l.length?l(e,t,n,o,a):l(e,t,n,o),r&&"function"==typeof r.then?r.then(e=>s(null,e)).catch(s):s(null,r)}catch(e){s(e)}else l(e,t,n,o,s,a)}e&&e[0]&&this.store.addResource(e[0],t,n,o)}}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 zi=()=>({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]),ni(e[1])&&(t.defaultValue=e[1]),ni(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}),Ui=e=>(ni(e.ns)&&(e.ns=[e.ns]),ni(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),ni(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),ti([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),Hi=()=>{};class Vi extends Ci{constructor(e={},t){var n;if(super(),this.options=Ui(e),this.services={},this.logger=Ei,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&&(ni(e.ns)?e.defaultNS=e.ns:e.ns.indexOf("translation")<0&&(e.defaultNS=e.ns[0]));const n=zi();var o;this.options={...n,...this.options,...Ui(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||(ti([o=this,"optionalAccess",e=>e.modules,"optionalAccess",e=>e.backend,"optionalAccess",e=>e.name,"optionalAccess",e=>e.indexOf,"call",e=>e("Locize")])>0||ti([o,"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||ti([o,"optionalAccess",e=>e.options,"optionalAccess",e=>e.backend,"optionalAccess",e=>e.backends])&&o.options.backend.backends.some(e=>ti([e,"optionalAccess",e=>e.name,"access",e=>e.indexOf,"call",e=>e("Locize")])>0||ti([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 r=e=>e?"function"==typeof e?new e:e:null;if(!this.options.isClone){let e;this.modules.logger?Ei.init(r(this.modules.logger),this.options):Ei.init(null,this.options),e=this.modules.formatter?this.modules.formatter:Bi;const t=new Li(this.options);this.store=new Si(this.options.resources,this.options);const o=this.services;o.logger=Ei,o.resourceStore=this.store,o.languageUtils=t,o.pluralResolver=new Ti(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||(o.formatter=r(e),o.formatter.init&&o.formatter.init(o,this.options),this.options.interpolation.format=o.formatter.format.bind(o.formatter)),o.interpolator=new Fi(this.options),o.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},o.backendConnector=new Di(r(this.modules.backend),o.resourceStore,o,this.options),o.backendConnector.on("*",(e,...t)=>{this.emit(e,...t)}),this.modules.languageDetector&&(o.languageDetector=r(this.modules.languageDetector),o.languageDetector.init&&o.languageDetector.init(o,this.options.detection,this.options)),this.modules.i18nFormat&&(o.i18nFormat=r(this.modules.i18nFormat),o.i18nFormat.init&&o.i18nFormat.init(this)),this.translator=new Ri(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=Hi),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=oi(),s=()=>{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?s():setTimeout(s,0),i}loadResources(e,t=Hi){let n=t;const o=ni(e)?e:this.language;if("function"==typeof e&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if("cimode"===ti([o,"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(o)t(o);else{this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e))}ti([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 o=oi();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=Hi),this.services.backendConnector.reload(e,t,e=>{o.resolve(),n(e)}),o}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&&ki.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=oi();this.emit("languageChanging",e);const o=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},r=(r,i)=>{i?this.isLanguageChangingTo===e&&(o(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(r,(...e)=>this.t(...e))},i=t=>{e||t||!this.services.languageDetector||(t=[]);const n=ni(t)?t:t&&t[0],i=this.store.hasLanguageSomeTranslations(n)?n:this.services.languageUtils.getBestMatchFromCodes(ni(t)?[t]:t);i&&(this.language||o(i),this.translator.language||this.translator.changeLanguage(i),ti([this,"access",e=>e.services,"access",e=>e.languageDetector,"optionalAccess",e=>e.cacheUserLanguage,"optionalCall",e=>e(i)])),this.loadResources(i,e=>{r(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 o=(e,t,...r)=>{let i;i="object"!=typeof t?this.options.overloadTranslationOptionHandler([e,t].concat(r)):{...t},i.lng=i.lng||o.lng,i.lngs=i.lngs||o.lngs,i.ns=i.ns||o.ns,""!==i.keyPrefix&&(i.keyPrefix=i.keyPrefix||n||o.keyPrefix);const s=this.options.keySeparator||".";let a;return i.keyPrefix&&Array.isArray(e)?a=e.map(e=>("function"==typeof e&&(e=_i(e,{...this.options,...t})),`${i.keyPrefix}${s}${e}`)):("function"==typeof e&&(e=_i(e,{...this.options,...t})),a=i.keyPrefix?`${i.keyPrefix}${s}${e}`:e),this.t(a,i)};return ni(e)?o.lng=e:o.lngs=e,o.ns=t,o.keyPrefix=n,o}t(...e){return ti([this,"access",e=>e.translator,"optionalAccess",e=>e.translate,"call",t=>t(...e)])}exists(...e){return ti([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],o=!!this.options&&this.options.fallbackLng,r=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)||o&&!i(r,e)))}loadNamespaces(e,t){const n=oi();return this.options.ns?(ni(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=oi();ni(e)&&(e=[e]);const o=this.options.preload||[],r=e.filter(e=>o.indexOf(e)<0&&this.services.languageUtils.isSupportedCode(e));return r.length?(this.options.preload=o.concat(r),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(ti([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=ti([this,"access",e=>e.services,"optionalAccess",e=>e.languageUtils])||new Li(zi());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 Vi(e,t);return n.createInstance=Vi.createInstance,n}cloneInstance(e={},t=Hi){const n=e.forkResourceStore;n&&delete e.forkResourceStore;const o={...this.options,...e,isClone:!0},r=new Vi(o);void 0===e.debug&&void 0===e.prefix||(r.logger=r.logger.clone(e));if(["store","services","language"].forEach(e=>{r[e]=this[e]}),r.services={...this.services},r.services.utils={hasLoadedNamespace:r.hasLoadedNamespace.bind(r)},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,o)=>(n[o]={...e[t][o]},n),e[t]),e),{});r.store=new Si(e,o),r.services.resourceStore=r.store}if(e.interpolation){const t={...zi().interpolation,...this.options.interpolation,...e.interpolation},n={...o,interpolation:t};r.services.interpolator=new Fi(n)}return r.translator=new Ri(r.services,o),r.translator.on("*",(e,...t)=>{r.emit(e,...t)}),r.init(o,t),r.translator.options=o,r.translator.backendConnector.services.utils={hasLoadedNamespace:r.hasLoadedNamespace.bind(r)},r}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const qi=Vi.createInstance();qi.createInstance,qi.dir,qi.init,qi.loadResources,qi.reloadResources,qi.use,qi.changeLanguage,qi.getFixedT,qi.t,qi.exists,qi.setDefaultNamespace,qi.hasLoadedNamespace,qi.loadNamespaces,qi.loadLanguages;qi.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 Ki={translator:{...qi,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 qi.t(e,{lng:n,...t})}},languageOptions:[{value:"en_US",label:"English (US)"},{value:"es_ES",label:"Spanish"}]};const{styled:Wi}=n,Yi=t,Gi=e;const{translator:Ji}=Ki,Qi={"-webkit-touchCcallout":"none","-webkit-user-select":"none","-khtml-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","user-select":"none"},Xi=Wi("div")(()=>({width:"100%",cursor:"pointer"})),Zi=Wi("div")(()=>({margin:"0 auto",textAlign:"center",display:"flex"})),es=Wi("div")(()=>({width:"fit-content",minWidth:"140px",alignSelf:"center",verticalAlign:"middle",color:`var(--correct-answer-toggle-label-color, ${Po()})`,fontWeight:"normal",...Qi})),ts=Wi("div")(()=>({position:"absolute",width:"25px","&.enter":{opacity:"0"},"&.enter-active":{opacity:"1",transition:"opacity 0.3s ease-in"},"&.exit":{opacity:"1"},"&.exit-active":{opacity:"0",transition:"opacity 0.3s ease-in"}})),ns=Wi("div")(()=>({width:"25px",marginRight:"5px",display:"flex",alignItems:"center"}));class os extends Yi.Component{static __initStatic(){this.propTypes={onToggle:Gi.func,toggled:Gi.bool,show:Gi.bool,hideMessage:Gi.string,showMessage:Gi.string,className:Gi.string,language:Gi.string}}static __initStatic2(){this.defaultProps={showMessage:"Show correct answer",hideMessage:"Hide correct answer",show:!1,toggled:!1}}constructor(e){super(e),this.state={show:e.show},this.openIconRef=Yi.createRef(),this.closedIconRef=Yi.createRef(),os.defaultProps={...os.defaultProps,showMessage:Ji.t("common:showCorrectAnswer",{lng:e.language}),hideMessage:Ji.t("common:hideCorrectAnswer",{lng:e.language})}}onClick(){this.props.onToggle(!this.props.toggled)}onTouch(e){e.preventDefault(),this.props.onToggle(!this.props.toggled)}UNSAFE_componentWillReceiveProps(e){this.setState({show:e.show}),e.language!==function(e){let t,n=e[0],o=1;for(;o<e.length;){const r=e[o],i=e[o+1];if(o+=2,("optionalAccess"===r||"optionalCall"===r)&&null==n)return;"access"===r||"optionalAccess"===r?(t=n,n=i(n)):"call"!==r&&"optionalCall"!==r||(n=i((...e)=>n.call(t,...e)),t=void 0)}return n}([this,"access",e=>e.props,"optionalAccess",e=>e.language])&&(os.defaultProps={...os.defaultProps,showMessage:Ji.t("common:showCorrectAnswer",{lng:e.language}),hideMessage:Ji.t("common:hideCorrectAnswer",{lng:e.language})})}render(){const{className:e,toggled:t,hideMessage:n,showMessage:o}=this.props;return Yi.createElement(Xi,{className:e},Yi.createElement(Zr,{show:this.state.show},Yi.createElement(Zi,{onClick:this.onClick.bind(this),onTouchEnd:this.onTouch.bind(this)},Yi.createElement(ns,null,Yi.createElement(mo,{nodeRef:this.openIconRef,timeout:400,in:t,exit:!t,classNames:{enter:"enter",enterActive:"enter-active",exit:"exit",exitActive:"exit-active"}},Yi.createElement(ts,{ref:this.openIconRef},Yi.createElement(un,{open:t,key:"correct-open"}))),Yi.createElement(mo,{nodeRef:this.closedIconRef,timeout:5e3,in:!t,exit:t,classNames:{enter:"enter",enterActive:"enter-active",exit:"exit",exitActive:"exit-active"}},Yi.createElement(ts,{ref:this.closedIconRef},Yi.createElement(un,{open:t,key:"correct-closed"})))),Yi.createElement(qr,{false:!0},Yi.createElement(es,{"aria-hidden":!this.state.show},t?n:o)))))}}os.__initStatic(),os.__initStatic2();const rs=t,{styled:is}=n,{Box:ss}=i,as=e,ls=is(ss)({width:"33px",height:"33px","& svg":{position:"absolute",display:"inline-block",width:"33px",height:"33px",verticalAlign:"middle","& hide":{display:"none"}}}),cs=is("svg")({"& .incorrect-fill":{fill:`var(--feedback-incorrect-bg-color, ${$o()})`},"& .correct-fill":{fill:`var(--feedback-correct-bg-color, ${Io()})`}}),ps=is("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 ds extends rs.Component{static __initStatic(){this.propTypes={correctness:as.string}}constructor(e){super(e),ds.prototype.__init.call(this),ds.prototype.__init2.call(this),this.nodeRef=rs.createRef()}__init(){this.getIncorrectIcon=()=>rs.createElement(cs,{key:"1",preserveAspectRatio:"xMinYMin meet",x:"0px",y:"0px",viewBox:"0 0 44 40",style:{enableBackground:"new 0 0 44 40"}},rs.createElement("g",null,rs.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"}),rs.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"})))}__init2(){this.getCorrectIcon=()=>rs.createElement(cs,{key:"2",preserveAspectRatio:"xMinYMin meet",version:"1.1",x:"0px",y:"0px",viewBox:"0 0 44 40",style:{enableBackground:"new 0 0 44 40"}},rs.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"}))}render(){const{correctness:e}=this.props,t=(()=>"incorrect"===e?this.getIncorrectIcon():"correct"===e?this.getCorrectIcon():null)();return rs.createElement(ls,null,rs.createElement(_o,null,e&&rs.createElement(mo,{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}},rs.createElement(ps,{ref:this.nodeRef},t))))}}ds.__initStatic();const{FormControlLabel:us}=i,{Box:hs}=i,{Checkbox:gs}=i,{Radio:fs}=i,ms=t,ys=e,{styled:bs}=n,vs=l,xs="multiple-choice-component",Es=bs(hs)({display:"flex",alignItems:"center",backgroundColor:Bo()}),Cs=bs(hs)({display:"flex",alignItems:"center",backgroundColor:Bo(),flex:1,"& .MuiFormControlLabel-root":{marginLeft:"-14px"},"& label":{color:Po(),"& > span":{fontSize:"inherit"},"& > .MuiButtonBase-root":{padding:"12px"}}}),Ss=bs("span")(({theme:e})=>({display:"flex",alignItems:"center","& > span":{marginLeft:`-${e.spacing(1)}`}})),ks=bs("span")({position:"absolute",left:"-10000px",top:"auto",width:"1px",height:"1px",overflow:"hidden"}),ws=bs(us)({"& .MuiFormControlLabel-label":{color:`${Po()} !important`,backgroundColor:Bo(),letterSpacing:"normal"},"&.Mui-disabled *":{cursor:"not-allowed !important"}}),_s=(e,t)=>({[`&.${xs}`]:{color:`var(--choice-input-${e}, ${t}) !important`}}),As=e=>{const t=t=>e?`${e}-${t}`:t;return{[t("root")]:{..._s("color",Po()),..."correct"===e?_s("correct-color",Po()):{},..."incorrect"===e?_s("incorrect-color",$o()):{}},[t("checked")]:{..."correct"===e?_s("correct-selected-color",Io()):{},..."incorrect"===e?_s("incorrect-checked",$o()):{},...e?{}:_s("selected-color",To("primary",No.PRIMARY))},[t("disabled")]:{..._s("disabled-color",Po()),..."correct"===e?_s("correct-disabled-color",Fo()):{},..."incorrect"===e?_s("incorrect-disabled-color",Fo()):{},opacity:.6,cursor:"not-allowed !important",pointerEvents:"initial !important"},focusVisibleUnchecked:{outline:`2px solid ${zo()}`,backgroundColor:"transparent"},focusVisibleChecked:{outline:`2px solid ${zo()}`,backgroundColor:"transparent"}}},Os=bs(gs,{shouldForwardProp:e=>"correctness"!==e})(({correctness:e})=>{const t=As(e),n=t=>e?`${e}-${t}`:t;return{[`&.${xs}`]:{...t[n("root")],"&.Mui-checked":t[n("checked")],"&.Mui-disabled":e?{}:t[n("disabled")],"&:hover:not(.Mui-disabled) svg":{boxShadow:`0px 0px 0px 2px ${zo()}`,borderRadius:"4px"}},"&.Mui-focusVisible":{"&:not(.Mui-checked)":t.focusVisibleUnchecked,"&.Mui-checked":t.focusVisibleChecked}}}),Rs=e=>{const{correctness:t,checked:n,onChange:o,disabled:r,value:i,id:s,onKeyDown:a,inputRef:l}=e,c={checked:n,onChange:o,disabled:r,value:i};return ms.createElement(Os,{id:s,slotProps:{input:{ref:l}},onKeyDown:a,disableRipple:!0,...c,correctness:t,className:xs})},Ls=bs(fs,{shouldForwardProp:e=>"correctness"!==e})(({correctness:e})=>{const t=As(e),n=t=>e?`${e}-${t}`:t;return{[`&.${xs}`]:{...t[n("root")],"&.Mui-checked":t[n("checked")],"&.Mui-disabled":e?{}:t[n("disabled")],"&.Mui-focusVisible:not(.Mui-checked)":t.focusVisibleUnchecked,"&.Mui-focusVisible.Mui-checked":t.focusVisibleChecked,"&:hover:not(.Mui-disabled) svg":{boxShadow:`0px 0px 0px 2px ${zo()}`,borderRadius:"50%"}},"&.Mui-focusVisible":{"& input":{outline:0},"& .MuiTouchRipple-root":{display:"none"}}}}),js=e=>{const{correctness:t,checked:n,onChange:o,disabled:r,value:i,id:s,tagName:a,inputRef:l}=e,c={checked:n,onChange:o,disabled:r,value:i};return ms.createElement(Ls,{id:s,slotProps:{input:{ref:l}},disableRipple:!0,...c,correctness:t,className:xs,name:a})};class Ns extends ms.Component{static __initStatic(){this.propTypes={choiceMode:ys.oneOf(["radio","checkbox"]),displayKey:ys.string,checked:ys.bool.isRequired,correctness:ys.string,disabled:ys.bool.isRequired,feedback:ys.string,label:ys.string.isRequired,rationale:ys.string,onChange:ys.func.isRequired,value:ys.string.isRequired,className:ys.string,tagName:ys.string,hideTick:ys.bool,isEvaluateMode:ys.bool,choicesLayout:ys.oneOf(["vertical","grid","horizontal"]),isSelectionButtonBelow:ys.bool}}static __initStatic2(){this.defaultProps={rationale:null,checked:!1,isEvaluateMode:!1}}constructor(e){super(e),Ns.prototype.__init.call(this),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()}__init(){this.handleKeyDown=e=>{const{choiceMode:t}=this.props;if("checkbox"!==t)return;const n="ArrowDown"===e.key,o="ArrowUp"===e.key;if(!n&&!o)return;e.preventDefault();const r=document.getElementById(this.choiceId);if(!r)return;const i=r.closest("fieldset");if(!i)return;const s=Array.from(i.querySelectorAll('input[type="checkbox"]')),a=s.findIndex(e=>e===r);if(-1===a)return;const l=s[n?a+1:a-1];l&&l.focus()}}render(){const{choiceMode:e,disabled:t,displayKey:n,feedback:o,label:r,correctness:i,className:s,rationale:a,hideTick:l,isEvaluateMode:c,choicesLayout:p,value:d,checked:u,tagName:h,isSelectionButtonBelow:g}=this.props,f="checkbox"===e?Rs:js,m="checkbox"===e?"checkbox":"radio-button",y={..."horizontal"===p&&{[`& .${xs}`]:{padding:"8px",margin:"4px 0 4px 4px"}},...g&&"grid"!==p&&{"& > label":{alignItems:"flex-start"}},...g&&"grid"===p&&{justifyContent:"center","& > label":{alignItems:"center"}}},b="string"==typeof r&&(r.includes("<math")||r.includes("\\(")||r.includes("\\[")||r.includes("<img")||r.includes("data-latex")||r.includes("data-raw")||r.includes("<mjx-container")),v=n?ms.createElement(ks,{id:this.descId},b?`Pick the answer below, ${n}`:n):null,x=ms.createElement(ms.Fragment,null,n&&!g?ms.createElement(Es,{component:"span"},ms.createElement("span",{"aria-hidden":"true"},n,"."," "),ms.createElement(Ur,{className:"prompt-label",prompt:r,tagName:"span"})):ms.createElement(Ur,{className:"prompt-label",prompt:r,tagName:"span"})),E={disabled:t,checked:u,correctness:i,tagName:h,value:d,id:this.choiceId,onChange:this.onToggleChoice,onKeyDown:this.handleKeyDown,...v?{"aria-describedby":this.descId}:{}},C=g?ms.createElement(Ss,null,v,ms.createElement(f,{...E,style:{padding:0}}),ms.createElement("span",{"aria-hidden":"true"},n?`${n}.`:"")):ms.createElement(ms.Fragment,null,v,ms.createElement(f,{...E}));return ms.createElement("div",{className:vs(s,"corespring-"+m,"choice-input")},ms.createElement(Es,null,!l&&c&&ms.createElement(ds,{correctness:i}),ms.createElement(Cs,{className:"checkbox-holder",sx:y},ms.createElement(ws,{label:x,value:d,htmlFor:this.choiceId,labelPlacement:g?"top":void 0,control:C}))),a&&ms.createElement(Ur,{className:"rationale",defaultClassName:"rationale",prompt:a}),ms.createElement(Yo,{feedback:o,correctness:i}))}}Ns.__initStatic(),Ns.__initStatic2();const Ts=t,Ms=e,{styled:Ps}=n,{Box:Fs}=i,Is=Ps(Fs,{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 ${To("border",No.BORDER)}`,...n&&{paddingRight:e.spacing(2.5),"& label":{marginRight:e.spacing(1)}}}));class $s extends Ts.Component{constructor(...e){super(...e),$s.prototype.__init.call(this),$s.prototype.__init2.call(this),$s.prototype.__init3.call(this),$s.prototype.__init4.call(this)}static __initStatic(){this.propTypes={}}__init(){this.state={isHovered:!1}}__init2(){this.handleMouseEnter=()=>{const{disabled:e,checked:t}=this.props;e||t||this.setState({isHovered:!0})}}__init3(){this.handleMouseLeave=()=>{this.setState({isHovered:!1})}}__init4(){this.onChange=e=>{const{disabled:t,onChoiceChanged:n}=this.props;t||n(e)}}render(){const{choice:e,index:t,choicesLength:n,showCorrect:o,isEvaluateMode:r,choiceMode:i,disabled:s,checked:a,correctness:l,displayKey:c,choicesLayout:p,gridColumns:d,isSelectionButtonBelow:u,selectedAnswerBackgroundColor:h,selectedAnswerStrokeColor:g,selectedAnswerStrokeWidth:f,hoverAnswerBackgroundColor:m,hoverAnswerStrokeColor:y,hoverAnswerStrokeWidth:b,tagName:v}=this.props,{isHovered:x}=this.state,E="choice"+(t===n-1?" last":""),C=!r||o?"":e.feedback,S={...e,checked:a,choiceMode:i,disabled:s,feedback:C,correctness:l,displayKey:c,index:t,choicesLayout:p,gridColumns:d,onChange:this.onChange,isEvaluateMode:r,isSelectionButtonBelow:u,selectedAnswerStrokeColor:g,selectedAnswerStrokeWidth:f,tagName:v},k=g&&"initial"!==g,w=y&&"initial"!==y;let _="transparent",A="2px",O="initial";(k||w)&&(a&&k?(_=g,A=f):x&&!s&&w&&(_=y,A=b)),a&&h&&"initial"!==h?O=h:x&&!s&&m&&"initial"!==m&&(O=m);const R=k||w,L=R?{border:`${(e=>{if(!e)return"2px";const t=String(e).trim();return/^\d+(\.\d+)?$/.test(t)?`${t}px`:t})(A)} solid ${_}`,borderRadius:"8px"}:{},j=t===n-1||"vertical"!==p||R,N="horizontal"===p,T="initial"!==O?O:"initial";return Ts.createElement("div",{className:E,key:t,style:{backgroundColor:T,...L},onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave},Ts.createElement(Is,{component:"div",noBorder:j,horizontalLayout:N},Ts.createElement(Ns,{...S})))}}$s.__initStatic(),$s.propTypes={choiceMode:Ms.oneOf(["radio","checkbox"]),choice:Ms.object,disabled:Ms.bool.isRequired,onChoiceChanged:Ms.func,index:Ms.number,choicesLength:Ms.number,showCorrect:Ms.bool,isEvaluateMode:Ms.bool,checked:Ms.bool,correctness:Ms.string,displayKey:Ms.string,choicesLayout:Ms.oneOf(["vertical","grid","horizontal"]),gridColumns:Ms.string,selectedAnswerBackgroundColor:Ms.string,selectedAnswerStrokeColor:Ms.string,selectedAnswerStrokeWidth:Ms.string,hoverAnswerBackgroundColor:Ms.string,hoverAnswerStrokeColor:Ms.string,hoverAnswerStrokeWidth:Ms.string,tagName:Ms.string,isSelectionButtonBelow:Ms.bool};const Bs=t,Ds=e,zs=l,{styled:Us}=n,{Box:Hs}=i,{translator:Vs}=Ki,qs=Us(Hs)({color:Po(),backgroundColor:Bo(),"& *":{"-webkit-font-smoothing":"antialiased"},position:"relative","& legend":{border:"none !important"}}),Ks=Us("h2")(({theme:e})=>({display:"block",fontSize:"inherit",margin:"0",fontWeight:"normal",paddingBottom:e.spacing(2)})),Ws=Us(Hs)(({theme:e})=>({marginBottom:e.spacing(2)})),Ys=Us(Hs)({display:"flex",flexDirection:"row",flexWrap:"wrap"}),Gs=Us(Hs)({display:"grid"}),Js=Us("fieldset")({border:"0px",padding:"0.01em 0 0 0",margin:"0px",minWidth:"0px"}),Qs=Us("h3")({position:"absolute",left:"-10000px",top:"auto",width:"1px",height:"1px",overflow:"hidden"}),Xs=Us("div")(({theme:e})=>({fontSize:e.typography.fontSize-2,color:e.palette.error.main,paddingTop:e.spacing(1)}));class Zs extends Bs.Component{static __initStatic(){this.propTypes={className:Ds.string,mode:Ds.oneOf(["gather","view","evaluate"]),choiceMode:Ds.oneOf(["radio","checkbox"]),keyMode:Ds.oneOf(["numbers","letters","none"]),choices:Ds.array,partLabel:Ds.string,prompt:Ds.string,teacherInstructions:Ds.string,session:Ds.object,disabled:Ds.bool,onChoiceChanged:Ds.func,responseCorrect:Ds.bool,correctResponse:Ds.array,choicesLayout:Ds.oneOf(["vertical","grid","horizontal"]),gridColumns:Ds.string,alwaysShowCorrect:Ds.bool,animationsDisabled:Ds.bool,language:Ds.string,selectedAnswerBackgroundColor:Ds.string,selectedAnswerStrokeColor:Ds.string,selectedAnswerStrokeWidth:Ds.string,hoverAnswerBackgroundColor:Ds.string,hoverAnswerStrokeColor:Ds.string,hoverAnswerStrokeWidth:Ds.string,onShowCorrectToggle:Ds.func,isSelectionButtonBelow:Ds.bool,minSelections:Ds.number,maxSelections:Ds.number,autoplayAudioEnabled:Ds.bool,customAudioButton:{playImage:Ds.string,pauseImage:Ds.string},options:Ds.object,baseHeadingLevel:Ds.number,includeSrHeading:Ds.bool}}constructor(e){super(e),Zs.prototype.__init.call(this),Zs.prototype.__init2.call(this),Zs.prototype.__init3.call(this),this.state={showCorrect:this.props.options&&this.props.alwaysShowCorrect||!1,maxSelectionsErrorState:!1},this.onToggle=this.onToggle.bind(this),this.groupName=`mc-group-${Math.random().toString(36).slice(2,10)}`}isSelected(e){const t=this.props.session&&this.props.session.value;return t&&t.indexOf&&t.indexOf(e)>=0}__init(){this.handleChange=e=>{const{value:t,checked:n}=e.target,{choiceMode:o,maxSelections:r,onChoiceChanged:i,session:s}=this.props;"radio"!==o&&s.value&&((e,t)=>null!=t&&e>=t)(s.value.length,r)&&(this.setState({maxSelectionsErrorState:n}),n)||i({value:t,selected:n,selector:"Mouse"})}}__init2(){this.onToggle=()=>{"evaluate"===this.props.mode&&this.setState({showCorrect:!this.state.showCorrect},()=>{this.props.onShowCorrectToggle&&this.props.onShowCorrectToggle()})}}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():""}__init3(){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}}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:o,partLabel:r}=this.props;if(!(!r&&!1!==n)||"gather"!==e)return null;const i=o?Math.min(6,o):2,s=Qs.withComponent(`h${i}`),a="radio"===t?"Multiple Choice Question":"Multiple Select Question";return Bs.createElement(s,null,a)}render(){const{mode:e,disabled:t,className:n,choices:o=[],choiceMode:r,gridColumns:i,partLabel:s,prompt:a,responseCorrect:l,teacherInstructions:c,alwaysShowCorrect:p,animationsDisabled:d,language:u,isSelectionButtonBelow:h,minSelections:g,maxSelections:f,autoplayAudioEnabled:m,session:y,customAudioButton:b,options:v,baseHeadingLevel:x}=this.props,{showCorrect:E,maxSelectionsErrorState:C}=this.state,S="evaluate"===e,k=S&&!l,w=i>1?{gridTemplateColumns:`repeat(${i}, 1fr)`}:void 0,_=y.value&&y.value.length||0,A=(()=>{if(!x)return;let e=1;return s&&(e+=1),Math.min(6,x+e)})(),O=Bs.createElement(Ur,{tagName:"div",className:"prompt",defaultClassName:"teacher-instructions",prompt:c}),R="grid"===this.props.choicesLayout?Gs:"horizontal"===this.props.choicesLayout?Ys:Hs;return Bs.createElement(qs,{id:"main-container",className:zs(n,"multiple-choice")},s&&Bs.createElement(Ks,{as:x?`h${Math.min(6,x+1)}`:"h2"},s),this.renderHeading(),c&&Bs.createElement(Ws,null,d?O:Bs.createElement(dr,{labels:{hidden:"Show Teacher Instructions",visible:"Hide Teacher Instructions"}},O)),Bs.createElement(Js,{role:"radio"===r?"radiogroup":"group"},Bs.createElement(Ur,{className:"prompt",defaultClassName:"prompt",prompt:(L=a,L&&A?function(e="",t=2){if(!e)return e;const n=(new DOMParser).parseFromString(e,"text/html");return n.body.querySelectorAll("[data-heading]").forEach(e=>{const o=e.getAttribute("data-heading")||"",r=parseInt(o.replace("heading",""),10);if(!Number.isFinite(r))return;const i=Math.min(6,Math.max(1,t+r-1)),s=n.createElement(`h${i}`);s.setAttribute("data-heading",o),Array.from(e.attributes).forEach(e=>{"data-heading"!==e.name&&s.setAttribute(e.name,e.value)}),s.innerHTML=e.innerHTML,e.replaceWith(s)}),n.body.innerHTML}(L,A):L),tagName:"legend",autoplayAudioEnabled:m,customAudioButton:b}),!(v&&p)&&Bs.createElement(os,{show:k,toggled:E,onToggle:this.onToggle.bind(this),language:u}),Bs.createElement(R,{style:w},o.map((e,n)=>Bs.createElement($s,{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:o.length,showCorrect:E,isEvaluateMode:S,choiceMode:r,disabled:t,tagName:this.groupName,onChoiceChanged:this.handleChange,hideTick:e.hideTick,checked:this.getChecked(e),correctness:S?this.getCorrectness(e):void 0,displayKey:this.indexToSymbol(n),isSelectionButtonBelow:h})))),"checkbox"===r&&_<g&&Bs.createElement(Xs,null,g&&f?g===f?Vs.t("translation:multipleChoice:minmaxSelections_equal",{lng:u,minSelections:g}):Vs.t("translation:multipleChoice:minmaxSelections_range",{lng:u,minSelections:g,maxSelections:f}):g?Vs.t("translation:multipleChoice:minSelections",{lng:u,minSelections:g}):""),"checkbox"===r&&C&&Bs.createElement(Xs,null,Vs.t("translation:multipleChoice:maxSelections_"+(1===f?"one":"other"),{lng:u,maxSelections:f})));var L}}Zs.__initStatic(),Zs.defaultProps={session:{value:[]}};const ea=t,ta=e;class na extends ea.Component{static __initStatic(){this.propTypes={model:ta.object,session:ta.object,options:ta.object,onChoiceChanged:ta.func,onShowCorrectToggle:ta.func,extraCSSRules:ta.shape({names:ta.arrayOf(ta.string),rules:ta.string}),baseHeadingLevel:ta.number,includeSrHeading:ta.bool}}static __initStatic2(){this.defaultProps={model:{},session:{}}}render(){const{model:e,onChoiceChanged:t,session:n,onShowCorrectToggle:o,options:r,baseHeadingLevel:i,includeSrHeading:s}=this.props,{extraCSSRules:a,fontSizeFactor:l}=e;return ea.createElement(Ar,{extraCSSRules:a,fontSizeFactor:l,classes:{}},ea.createElement(Zs,{...e,options:r,session:n,onChoiceChanged:t,onShowCorrectToggle:o,baseHeadingLevel:i,includeSrHeading:s}))}}na.__initStatic(),na.__initStatic2();const oa=t,{createRoot:ra}=c,ia=s,{renderMath:sa}=p,aa=ia("pie-element:multiple-choice:print"),la=(e,t)=>{const n="instructor"===t.role;e.prompt=!1!==e.promptEnabled?e.prompt:void 0,e.teacherInstructions=n&&!1!==e.teacherInstructionsEnabled?e.teacherInstructions:void 0,e.showTeacherInstructions=n,e.alwaysShowCorrect=n,e.mode=n?"evaluate":e.mode,e.disabled=!0,e.animationsDisabled=!0,e.lockChoiceOrder=!0,e.choicesLayout=e.choicesLayout||"vertical";const o=Pt(e.choices,5);return e.choices=o.map(t=>(t.rationale=n&&!1!==e.rationaleEnabled?t.rationale:void 0,t.hideTick=n,t.feedback=void 0,t)),e.keyMode=e.choicePrefix||"letters",e};class ca extends HTMLElement{constructor(){super(),this._options=null,this._model=null,this._session=[],this._root=null,this._rerender=Bt(()=>{if(this._model&&this._session){const e=la(this._model,this._options),t=this._options&&oa.createElement(na,{model:e,session:{},options:this._options});this._root||(this._root=ra(this)),this._root.render(t),requestAnimationFrame(()=>{requestAnimationFrame(()=>{aa("render complete - render math"),sa(this)})})}else aa("skip")},50,{leading:!1,trailing:!0})}set options(e){this._options=e}set model(e){this._model=e,this._rerender()}connectedCallback(){}disconnectedCallback(){this._root&&this._root.unmount()}}export{ca as default};
1
+ import{_dll_prop_types as e,_dll_react as t,_dll_mui__material_styles as n,_dll_react_dom as o,_dll_mui__material_colors as r,_dll_mui__material as i,_dll_debug as s,_dll_mui__material_collapse as a,_dll_classnames as l,_dll_react_dom_client as c}from"../../../@pie-lib/shared-module@6.0.0/module/index.js";import{_dll_pie_lib__math_rendering as p}from"../../../@pie-lib/math-rendering-module@6.0.0/module/index.js";var d="object"==typeof global&&global&&global.Object===Object&&global,u="object"==typeof self&&self&&self.Object===Object&&self,h=d||u||Function("return this")(),g=h.Symbol,f=Object.prototype,m=f.hasOwnProperty,y=f.toString,b=g?g.toStringTag:void 0;var v=Object.prototype.toString;var x=g?g.toStringTag:void 0;function E(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":x&&x in Object(e)?function(e){var t=m.call(e,b),n=e[b];try{e[b]=void 0;var o=!0}catch(e){}var r=y.call(e);return o&&(t?e[b]=n:delete e[b]),r}(e):function(e){return v.call(e)}(e)}function C(e){return null!=e&&"object"==typeof e}var S=Array.isArray,k=/\s/;var w=/^\s+/;function _(e){return e?e.slice(0,function(e){for(var t=e.length;t--&&k.test(e.charAt(t)););return t}(e)+1).replace(w,""):e}function A(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}var O=/^[-+]0x[0-9a-f]+$/i,R=/^0b[01]+$/i,L=/^0o[0-7]+$/i,j=parseInt;function N(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||C(e)&&"[object Symbol]"==E(e)}(e))return NaN;if(A(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=A(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=_(e);var n=R.test(e);return n||L.test(e)?j(e.slice(2),n?2:8):O.test(e)?NaN:+e}function T(e){if(!A(e))return!1;var t=E(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}var M,P=h["__core-js_shared__"],F=(M=/[^.]+$/.exec(P&&P.keys&&P.keys.IE_PROTO||""))?"Symbol(src)_1."+M:"";var I=Function.prototype.toString;function $(e){if(null!=e){try{return I.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var B=/^\[object .+?Constructor\]$/,D=Function.prototype,z=Object.prototype,U=D.toString,H=z.hasOwnProperty,V=RegExp("^"+U.call(H).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function q(e){return!(!A(e)||(t=e,F&&F in t))&&(T(e)?V:B).test($(e));var t}function K(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return q(n)?n:void 0}var W=K(h,"WeakMap"),Y=Object.create,G=function(){function e(){}return function(t){if(!A(t))return{};if(Y)return Y(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();var J=function(){try{var e=K(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();var Q=/^(?:0|[1-9]\d*)$/;function X(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&Q.test(e))&&e>-1&&e%1==0&&e<t}function Z(e,t,n){"__proto__"==t&&J?J(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function ee(e,t){return e===t||e!=e&&t!=t}var te=Object.prototype.hasOwnProperty;function ne(e,t,n){var o=e[t];te.call(e,t)&&ee(o,n)&&(void 0!==n||t in e)||Z(e,t,n)}function oe(e,t,n,o){var r=!n;n||(n={});for(var i=-1,s=t.length;++i<s;){var a=t[i],l=o?o(n[a],e[a],a,n,e):void 0;void 0===l&&(l=e[a]),r?Z(n,a,l):ne(n,a,l)}return n}function re(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}function ie(e){return null!=e&&re(e.length)&&!T(e)}var se=Object.prototype;function ae(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||se)}function le(e){return C(e)&&"[object Arguments]"==E(e)}var ce=Object.prototype,pe=ce.hasOwnProperty,de=ce.propertyIsEnumerable,ue=le(function(){return arguments}())?le:function(e){return C(e)&&pe.call(e,"callee")&&!de.call(e,"callee")};var he="object"==typeof exports&&exports&&!exports.nodeType&&exports,ge=he&&"object"==typeof module&&module&&!module.nodeType&&module,fe=ge&&ge.exports===he?h.Buffer:void 0,me=(fe?fe.isBuffer:void 0)||function(){return!1},ye={};function be(e){return function(t){return e(t)}}ye["[object Float32Array]"]=ye["[object Float64Array]"]=ye["[object Int8Array]"]=ye["[object Int16Array]"]=ye["[object Int32Array]"]=ye["[object Uint8Array]"]=ye["[object Uint8ClampedArray]"]=ye["[object Uint16Array]"]=ye["[object Uint32Array]"]=!0,ye["[object Arguments]"]=ye["[object Array]"]=ye["[object ArrayBuffer]"]=ye["[object Boolean]"]=ye["[object DataView]"]=ye["[object Date]"]=ye["[object Error]"]=ye["[object Function]"]=ye["[object Map]"]=ye["[object Number]"]=ye["[object Object]"]=ye["[object RegExp]"]=ye["[object Set]"]=ye["[object String]"]=ye["[object WeakMap]"]=!1;var ve="object"==typeof exports&&exports&&!exports.nodeType&&exports,xe=ve&&"object"==typeof module&&module&&!module.nodeType&&module,Ee=xe&&xe.exports===ve&&d.process,Ce=function(){try{var e=xe&&xe.require&&xe.require("util").types;return e||Ee&&Ee.binding&&Ee.binding("util")}catch(e){}}(),Se=Ce&&Ce.isTypedArray,ke=Se?be(Se):function(e){return C(e)&&re(e.length)&&!!ye[E(e)]},we=Object.prototype.hasOwnProperty;function _e(e,t){var n=S(e),o=!n&&ue(e),r=!n&&!o&&me(e),i=!n&&!o&&!r&&ke(e),s=n||o||r||i,a=s?function(e,t){for(var n=-1,o=Array(e);++n<e;)o[n]=t(n);return o}(e.length,String):[],l=a.length;for(var c in e)!t&&!we.call(e,c)||s&&("length"==c||r&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||X(c,l))||a.push(c);return a}function Ae(e,t){return function(n){return e(t(n))}}var Oe=Ae(Object.keys,Object),Re=Object.prototype.hasOwnProperty;function Le(e){return ie(e)?_e(e):function(e){if(!ae(e))return Oe(e);var t=[];for(var n in Object(e))Re.call(e,n)&&"constructor"!=n&&t.push(n);return t}(e)}var je=Object.prototype.hasOwnProperty;function Ne(e){if(!A(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=ae(e),n=[];for(var o in e)("constructor"!=o||!t&&je.call(e,o))&&n.push(o);return n}function Te(e){return ie(e)?_e(e,!0):Ne(e)}var Me=K(Object,"create");var Pe=Object.prototype.hasOwnProperty;var Fe=Object.prototype.hasOwnProperty;function Ie(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}function $e(e,t){for(var n=e.length;n--;)if(ee(e[n][0],t))return n;return-1}Ie.prototype.clear=function(){this.__data__=Me?Me(null):{},this.size=0},Ie.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Ie.prototype.get=function(e){var t=this.__data__;if(Me){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return Pe.call(t,e)?t[e]:void 0},Ie.prototype.has=function(e){var t=this.__data__;return Me?void 0!==t[e]:Fe.call(t,e)},Ie.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Me&&void 0===t?"__lodash_hash_undefined__":t,this};var Be=Array.prototype.splice;function De(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}De.prototype.clear=function(){this.__data__=[],this.size=0},De.prototype.delete=function(e){var t=this.__data__,n=$e(t,e);return!(n<0)&&(n==t.length-1?t.pop():Be.call(t,n,1),--this.size,!0)},De.prototype.get=function(e){var t=this.__data__,n=$e(t,e);return n<0?void 0:t[n][1]},De.prototype.has=function(e){return $e(this.__data__,e)>-1},De.prototype.set=function(e,t){var n=this.__data__,o=$e(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this};var ze=K(h,"Map");function Ue(e,t){var n,o,r=e.__data__;return("string"==(o=typeof(n=t))||"number"==o||"symbol"==o||"boolean"==o?"__proto__"!==n:null===n)?r["string"==typeof t?"string":"hash"]:r.map}function He(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}function Ve(e,t){for(var n=-1,o=t.length,r=e.length;++n<o;)e[r+n]=t[n];return e}He.prototype.clear=function(){this.size=0,this.__data__={hash:new Ie,map:new(ze||De),string:new Ie}},He.prototype.delete=function(e){var t=Ue(this,e).delete(e);return this.size-=t?1:0,t},He.prototype.get=function(e){return Ue(this,e).get(e)},He.prototype.has=function(e){return Ue(this,e).has(e)},He.prototype.set=function(e,t){var n=Ue(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this};var qe=Ae(Object.getPrototypeOf,Object);function Ke(e){var t=this.__data__=new De(e);this.size=t.size}Ke.prototype.clear=function(){this.__data__=new De,this.size=0},Ke.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Ke.prototype.get=function(e){return this.__data__.get(e)},Ke.prototype.has=function(e){return this.__data__.has(e)},Ke.prototype.set=function(e,t){var n=this.__data__;if(n instanceof De){var o=n.__data__;if(!ze||o.length<199)return o.push([e,t]),this.size=++n.size,this;n=this.__data__=new He(o)}return n.set(e,t),this.size=n.size,this};var We="object"==typeof exports&&exports&&!exports.nodeType&&exports,Ye=We&&"object"==typeof module&&module&&!module.nodeType&&module,Ge=Ye&&Ye.exports===We?h.Buffer:void 0,Je=Ge?Ge.allocUnsafe:void 0;function Qe(){return[]}var Xe=Object.prototype.propertyIsEnumerable,Ze=Object.getOwnPropertySymbols,et=Ze?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,o=null==e?0:e.length,r=0,i=[];++n<o;){var s=e[n];t(s,n,e)&&(i[r++]=s)}return i}(Ze(e),function(t){return Xe.call(e,t)}))}:Qe;var tt=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)Ve(t,et(e)),e=qe(e);return t}:Qe;function nt(e,t,n){var o=t(e);return S(e)?o:Ve(o,n(e))}function ot(e){return nt(e,Le,et)}function rt(e){return nt(e,Te,tt)}var it=K(h,"DataView"),st=K(h,"Promise"),at=K(h,"Set"),lt="[object Map]",ct="[object Promise]",pt="[object Set]",dt="[object WeakMap]",ut="[object DataView]",ht=$(it),gt=$(ze),ft=$(st),mt=$(at),yt=$(W),bt=E;(it&&bt(new it(new ArrayBuffer(1)))!=ut||ze&&bt(new ze)!=lt||st&&bt(st.resolve())!=ct||at&&bt(new at)!=pt||W&&bt(new W)!=dt)&&(bt=function(e){var t=E(e),n="[object Object]"==t?e.constructor:void 0,o=n?$(n):"";if(o)switch(o){case ht:return ut;case gt:return lt;case ft:return ct;case mt:return pt;case yt:return dt}return t});var vt=bt,xt=Object.prototype.hasOwnProperty;var Et=h.Uint8Array;function Ct(e){var t=new e.constructor(e.byteLength);return new Et(t).set(new Et(e)),t}var St=/\w*$/;var kt=g?g.prototype:void 0,wt=kt?kt.valueOf:void 0;function _t(e,t,n){var o,r,i,s=e.constructor;switch(t){case"[object ArrayBuffer]":return Ct(e);case"[object Boolean]":case"[object Date]":return new s(+e);case"[object DataView]":return function(e,t){var n=t?Ct(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 function(e,t){var n=t?Ct(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}(e,n);case"[object Map]":case"[object Set]":return new s;case"[object Number]":case"[object String]":return new s(e);case"[object RegExp]":return(i=new(r=e).constructor(r.source,St.exec(r))).lastIndex=r.lastIndex,i;case"[object Symbol]":return o=e,wt?Object(wt.call(o)):{}}}var At=Ce&&Ce.isMap,Ot=At?be(At):function(e){return C(e)&&"[object Map]"==vt(e)};var Rt=Ce&&Ce.isSet,Lt=Rt?be(Rt):function(e){return C(e)&&"[object Set]"==vt(e)},jt="[object Arguments]",Nt="[object Function]",Tt="[object Object]",Mt={};function Pt(e,t,n,o,r,i){var s,a=1&t,l=2&t,c=4&t;if(n&&(s=r?n(e,o,r,i):n(e)),void 0!==s)return s;if(!A(e))return e;var p=S(e);if(p){if(s=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&xt.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!a)return function(e,t){var n=-1,o=e.length;for(t||(t=Array(o));++n<o;)t[n]=e[n];return t}(e,s)}else{var d=vt(e),u=d==Nt||"[object GeneratorFunction]"==d;if(me(e))return function(e,t){if(t)return e.slice();var n=e.length,o=Je?Je(n):new e.constructor(n);return e.copy(o),o}(e,a);if(d==Tt||d==jt||u&&!r){if(s=l||u?{}:function(e){return"function"!=typeof e.constructor||ae(e)?{}:G(qe(e))}(e),!a)return l?function(e,t){return oe(e,tt(e),t)}(e,function(e,t){return e&&oe(t,Te(t),e)}(s,e)):function(e,t){return oe(e,et(e),t)}(e,function(e,t){return e&&oe(t,Le(t),e)}(s,e))}else{if(!Mt[d])return r?e:{};s=_t(e,d,a)}}i||(i=new Ke);var h=i.get(e);if(h)return h;i.set(e,s),Lt(e)?e.forEach(function(o){s.add(Pt(o,t,n,o,e,i))}):Ot(e)&&e.forEach(function(o,r){s.set(r,Pt(o,t,n,r,e,i))});var g=p?void 0:(c?l?rt:ot:l?Te:Le)(e);return function(e,t){for(var n=-1,o=null==e?0:e.length;++n<o&&!1!==t(e[n],n,e););}(g||e,function(o,r){g&&(o=e[r=o]),ne(s,r,Pt(o,t,n,r,e,i))}),s}Mt[jt]=Mt["[object Array]"]=Mt["[object ArrayBuffer]"]=Mt["[object DataView]"]=Mt["[object Boolean]"]=Mt["[object Date]"]=Mt["[object Float32Array]"]=Mt["[object Float64Array]"]=Mt["[object Int8Array]"]=Mt["[object Int16Array]"]=Mt["[object Int32Array]"]=Mt["[object Map]"]=Mt["[object Number]"]=Mt[Tt]=Mt["[object RegExp]"]=Mt["[object Set]"]=Mt["[object String]"]=Mt["[object Symbol]"]=Mt["[object Uint8Array]"]=Mt["[object Uint8ClampedArray]"]=Mt["[object Uint16Array]"]=Mt["[object Uint32Array]"]=!0,Mt["[object Error]"]=Mt[Nt]=Mt["[object WeakMap]"]=!1;var Ft=function(){return h.Date.now()},It=Math.max,$t=Math.min;function Bt(e,t,n){var o,r,i,s,a,l,c=0,p=!1,d=!1,u=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function h(t){var n=o,i=r;return o=r=void 0,c=t,s=e.apply(i,n)}function g(e){var n=e-l;return void 0===l||n>=t||n<0||d&&e-c>=i}function f(){var e=Ft();if(g(e))return m(e);a=setTimeout(f,function(e){var n=t-(e-l);return d?$t(n,i-(e-c)):n}(e))}function m(e){return a=void 0,u&&o?h(e):(o=r=void 0,s)}function y(){var e=Ft(),n=g(e);if(o=arguments,r=this,l=e,n){if(void 0===a)return function(e){return c=e,a=setTimeout(f,t),p?h(e):s}(l);if(d)return clearTimeout(a),a=setTimeout(f,t),h(l)}return void 0===a&&(a=setTimeout(f,t)),s}return t=N(t)||0,A(n)&&(p=!!n.leading,i=(d="maxWait"in n)?It(N(n.maxWait)||0,t):i,u="trailing"in n?!!n.trailing:u),y.cancel=function(){void 0!==a&&clearTimeout(a),c=0,o=l=r=a=void 0},y.flush=function(){return void 0===a?s:m(Ft())},y}const Dt=t,zt=e,Ut=e=>"string"==typeof e?e:"number"==typeof e?`${e}px`:"30px",Ht=({size:e,children:t})=>{const n={height:e=Ut(e),width:e,display:"inline-block",position:"relative"};return Dt.createElement("div",{style:n},t)};Ht.propTypes={size:zt.number,children:zt.oneOfType([zt.arrayOf(zt.node),zt.node]).isRequired};const Vt=t,qt=e,Kt=({size:e,children:t,sx:n})=>Vt.createElement(Ht,{size:e},Vt.createElement("svg",{preserveAspectRatio:"xMinYMin meet",viewBox:"0 0 44 40",style:{enableBackground:"new 0 0 44 40",...n}},t));Kt.propTypes={size:qt.oneOfType([qt.string,qt.number]),children:qt.oneOfType([qt.arrayOf(qt.node),qt.node]).isRequired,sx:qt.object},qt.string.isRequired;const Wt=({fill:e})=>Vt.createElement("polygon",{transform:"translate(2, 0)",points:"34.1,28.6 34.1,2.2 2,2.2 2,34.3 40.1,34.3",fill:e});Wt.propTypes={fill:qt.string.isRequired};const Yt=({fill:e})=>Vt.createElement("path",{transform:"translate(1, 0)",d:"M31.2,29.1v-0.3c2.2-2.8,3.6-6.3,3.6-10.1c0-8.9-7.2-16.1-16.1-16.1c-8.8,0.1-16,7.3-16,16.2 s7.2,16.1,16.1,16.1h18.5L31.2,29.1z",fill:e});Yt.propTypes={fill:qt.string.isRequired};const Gt=({fill:e})=>Vt.createElement("circle",{transform:"translate(-3,0)",cx:"23",cy:"20.4",r:"16",fill:e});Gt.propTypes={fill:qt.string.isRequired};const Jt=({fill:e})=>Vt.createElement("rect",{x:"3.6",y:"4.1",width:"32",height:"32",fill:e});Jt.propTypes={fill:qt.string.isRequired};const Qt=e,Xt=t;var Zt=(e,t)=>{class n extends Xt.Component{static __initStatic(){this.propTypes={iconSet:Qt.oneOf(["emoji","check"]),shape:Qt.oneOf(["round","square"]),category:Qt.oneOf(["feedback",void 0]),open:Qt.bool,size:Qt.oneOfType([Qt.number,Qt.string]),fg:Qt.string,bg:Qt.string}}static __initStatic2(){this.defaultProps={iconSet:"check",shape:"round",category:void 0,open:!1,size:30,fg:"#4aaf46",bg:"#f8ffe2"}}render(){const{iconSet:n,shape:o,category:r,open:i,size:s,fg:a,bg:l}=this.props,c="check"===n?Xt.createElement(e,{fill:a}):Xt.createElement(t,{fill:a}),p="check"===n?Xt.createElement(e,{fill:l}):Xt.createElement(t,{fill:l});return i?Xt.createElement(Kt,{size:s},p):Xt.createElement(Kt,{size:s},"feedback"===r?"round"===o?Xt.createElement(Yt,{fill:l}):Xt.createElement(Wt,{fill:l}):"round"===o?Xt.createElement(Gt,{fill:l}):Xt.createElement(Jt,{fill:l}),c)}}return n.__initStatic(),n.__initStatic2(),n};const en=e,tn=t,nn=({fill:e})=>tn.createElement("g",{transform:"translate(1, 0)"},tn.createElement("path",{d:"M24.7,22.1c-1.5,1.7-3.6,2.7-5.8,2.7s-4.5-1.1-5.8-2.7l-2.8,1.6c2,2.7,5.2,4.2,8.7,4.2 c3.4,0,6.6-1.6,8.7-4.2L24.7,22.1z",fill:e}),tn.createElement("rect",{x:"21.1",y:"13.1",width:"3.7",height:"4.7",fill:e}),tn.createElement("rect",{x:"12.7",y:"13.1",width:"3.7",height:"4.7",fill:e}));nn.propTypes={fill:en.string.isRequired};const on=({fill:e,x:t=0,y:n=0})=>tn.createElement("polygon",{transform:`translate(${t}, ${n})`,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",fill:e});on.propTypes={fill:en.string.isRequired,x:en.number,y:en.number};const rn=Zt(on,nn);rn.propTypes={iconSet:en.oneOf(["emoji","check"]),shape:en.oneOf(["round","square"]),category:en.oneOf(["feedback",void 0]),open:en.bool,fg:en.string,bg:en.string,size:en.oneOfType([en.string,en.number])},rn.defaultProps={iconSet:"check",shape:"round",category:void 0,open:!1,fg:"#4aaf46",bg:"#f8ffe2",size:30};const sn=e,an=t,{styled:ln}=n,cn=({bgFill:e,fgFill:t})=>an.createElement("svg",{preserveAspectRatio:"xMinYMin meet",version:"1.1",viewBox:"-283 359 34 35",style:{enableBackground:"new -283 359 34 35"}},an.createElement("circle",{cx:"-266",cy:"375.9",r:"14",fill:e}),an.createElement("path",{d:"M-280.5,375.9c0-8,6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5s-6.5,14.5-14.5,14.5S-280.5,383.9-280.5,375.9z M-279.5,375.9c0,7.4,6.1,13.5,13.5,13.5c7.4,0,13.5-6.1,13.5-13.5s-6.1-13.5-13.5-13.5C-273.4,362.4-279.5,368.5-279.5,375.9z",fill:e}),an.createElement("polygon",{points:"-265.4,383.1 -258.6,377.2 -261.2,374.2 -264.3,376.9 -268.9,368.7 -272.4,370.6",fill:t}));cn.propTypes={bgFill:sn.string.isRequired,fgFill:sn.string.isRequired};const pn=({bgFill:e,fgFill:t,borderFill:n})=>an.createElement("svg",{preserveAspectRatio:"xMinYMin meet",version:"1.1",viewBox:"-129.5 127 34 35",style:{enableBackground:"new -129.5 127 34 35"}},an.createElement("path",{style:{fill:"#D0CAC5",stroke:"#E6E3E0",strokeWidth:.75,strokeMiterlimit:10},d:"M-112.9,160.4c-8.5,0-15.5-6.9-15.5-15.5c0-8.5,6.9-15.5,15.5-15.5s15.5,6.9,15.5,15.5 C-97.4,153.5-104.3,160.4-112.9,160.4z"}),an.createElement("path",{style:{fill:"#B3ABA4",stroke:"#CDC7C2",strokeWidth:.5,strokeMiterlimit:10},d:"M-113.2,159c-8,0-14.5-6.5-14.5-14.5s6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5S-105.2,159-113.2,159z"}),an.createElement("circle",{cx:"-114.2",cy:"143.5",r:"14",fill:e}),an.createElement("path",{d:"M-114.2,158c-8,0-14.5-6.5-14.5-14.5s6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5S-106.2,158-114.2,158z M-114.2,130c-7.4,0-13.5,6.1-13.5,13.5s6.1,13.5,13.5,13.5s13.5-6.1,13.5-13.5S-106.8,130-114.2,130z",fill:n}),an.createElement("polygon",{points:"-114.8,150.7 -121.6,144.8 -119,141.8 -115.9,144.5 -111.3,136.3 -107.8,138.2",fill:t}));pn.propTypes={bgFill:sn.string.isRequired,fgFill:sn.string.isRequired,borderFill:sn.string.isRequired};const dn=ln("div")(({size:e})=>({width:e||"25px",height:e||"25px"})),un=({open:e,size:t})=>an.createElement(dn,{size:t},e?an.createElement(cn,{bgFill:"#bce2ff",fgFill:"#1a9cff"}):an.createElement(pn,{bgFill:"white",fgFill:"#1a9cff",borderFill:"#bce2ff"}));un.propTypes={open:sn.bool,size:sn.string},un.defaultProps={open:!1};const hn=e,gn=t,fn=({fill:e})=>gn.createElement("g",{transform:"translate(0.5, 0.5)"},gn.createElement("rect",{x:"11",y:"17.3",transform:"matrix(0.7071 -0.7071 0.7071 0.7071 -7.852 19.2507)",width:"16.6",height:"3.7",fill:e}),gn.createElement("rect",{x:"17.4",y:"10.7",transform:"matrix(0.7071 -0.7071 0.7071 0.7071 -7.8175 19.209)",width:"3.7",height:"16.6",fill:e}));fn.propTypes={fill:hn.string.isRequired};const mn=({fill:e})=>gn.createElement("g",{transform:"translate(1,0)"},gn.createElement("rect",{x:"21",y:"12.9",width:"3.7",height:"4.7",fill:e}),gn.createElement("rect",{x:"12.7",y:"12.9",width:"3.7",height:"4.7",fill:e}),gn.createElement("rect",{x:"12.2",y:"22.5",width:"13",height:"3.3",fill:e}));mn.propTypes={fill:hn.string.isRequired};const yn=Zt(fn,mn);yn.propTypes={iconSet:hn.oneOf(["emoji","check"]),shape:hn.oneOf(["round","square"]),category:hn.oneOf(["feedback",void 0]),open:hn.bool,fg:hn.string,bg:hn.string,size:hn.oneOfType([hn.string,hn.number])},yn.defaultProps={iconSet:"check",shape:"round",category:void 0,open:!1,fg:"#fcb733",bg:"#fbf2e3",size:30};const bn=e,vn=t,xn=()=>{const e={fill:"none",stroke:"#BCE2FF",strokeWidth:2,strokeMiterlimit:10};return vn.createElement("g",null,vn.createElement("line",{style:e,x1:"-98",y1:"142",x2:"-114.6",y2:"142"}),vn.createElement("line",{style:e,x1:"-98",y1:"146.3",x2:"-114.6",y2:"146.3"}),vn.createElement("line",{style:e,x1:"-104",y1:"150.7",x2:"-114.6",y2:"150.7"}))},En=({children:e,size:t})=>vn.createElement(Ht,{size:t},vn.createElement("svg",{version:"1.1",viewBox:"-128 129 31 31",style:{enableBackground:"new -128 129 31 31"}},e));En.propTypes={children:bn.oneOfType([bn.arrayOf(bn.node),bn.node]).isRequired,size:bn.number};const Cn=()=>vn.createElement("g",null,vn.createElement("rect",{x:"-123.9",y:"135.3",style:{fill:"#D0CAC5",stroke:"#E6E3E0",strokeWidth:.75,strokeLinejoin:"round",strokeMiterlimit:10},width:"4.1",height:"4.1"}),vn.createElement("polygon",{style:{fill:"#D0CAC5",stroke:"#E6E3E0",strokeWidth:.75,strokeLinejoin:"round",strokeMiterlimit:10},points:"-119.8,150.4 -119.8,142.2 -125,142.2 -125,144.9 -122.6,144.9 -122.6,150.4 -125.6,150.4 -125.6,153.2 -116.8,153.2 -116.8,150.4 "}),vn.createElement("rect",{x:"-124.7",y:"134.7",style:{fill:"#B3ABA4",stroke:"#CDC7C2",strokeWidth:.5,strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:10},width:"4.1",height:"4.1"}),vn.createElement("polygon",{style:{fill:"#B3ABA4",stroke:"#CDC7C2",strokeWidth:.5,strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:10},points:"-120.6,149.8 -120.6,141.5 -125.8,141.5 -125.8,144.3 -123.3,144.3 -123.3,149.8 -126.4,149.8 -126.4,152.5 -117.6,152.5 -117.6,149.8 "}),vn.createElement("rect",{x:"-125.5",y:"134",style:{fill:"#7FABC6"},width:"4.1",height:"4.1"}),vn.createElement("polygon",{style:{fill:"#7FABC6"},points:"-121.4,149.1 -121.4,140.9 -126.5,140.9 -126.5,143.6 -124.1,143.6 -124.1,149.1 -127.1,149.1 -127.1,151.9 -118.4,151.9 -118.4,149.1 "})),Sn=()=>vn.createElement("g",null,vn.createElement("rect",{x:"-123.9",y:"135.3",style:{fill:"#D0CAC5",stroke:"#E6E3E0",strokeWidth:.75,strokeLinejoin:"round",strokeMiterlimit:10},width:"4.1",height:"4.1"}),vn.createElement("polygon",{style:{fill:"#D0CAC5",stroke:"#E6E3E0",strokeWidth:.75,strokeLinejoin:"round",strokeMiterlimit:10},points:"-119.8,150.4 -119.8,142.2 -125,142.2 -125,144.9 -122.6,144.9 -122.6,150.4 -125.6,150.4 -125.6,153.2 -116.8,153.2 -116.8,150.4 "}),vn.createElement("rect",{x:"-124.7",y:"134.7",style:{fill:"#B3ABA4",stroke:"#CDC7C2",strokeWidth:.5,strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:10},width:"4.1",height:"4.1"}),vn.createElement("polygon",{style:{fill:"#B3ABA4",stroke:"#CDC7C2",strokeWidth:.5,strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:10},points:"-120.6,149.8 -120.6,141.5 -125.8,141.5 -125.8,144.3 -123.3,144.3 -123.3,149.8 -126.4,149.8 -126.4,152.5 -117.6,152.5 -117.6,149.8 "}),vn.createElement("rect",{x:"-125.5",y:"134",style:{fill:"#1A9CFF"},width:"4.1",height:"4.1"}),vn.createElement("polygon",{style:{fill:"#1A9CFF"},points:"-121.4,149.1 -121.4,140.9 -126.5,140.9 -126.5,143.6 -124.1,143.6 -124.1,149.1 -127.1,149.1 -127.1,151.9 -118.4,151.9 -118.4,149.1 "}));class kn extends vn.Component{constructor(e){super(e)}render(){return!0===this.props.open?vn.createElement(En,null,vn.createElement(Cn,null),vn.createElement(xn,null)):vn.createElement(En,null,vn.createElement(Sn,null),vn.createElement(xn,null))}}kn.propTypes={open:bn.bool},kn.defaultProps={open:!1};const wn=e,_n=t,An=({fill:e})=>_n.createElement("path",{fill:e,d:"M-130.4,142.1c0-2.1,1.7-3.9,3.9-3.9c0.3,0,0.5,0,0.8,0.1c-0.6-0.8-1.5-1.3-2.6-1.3c-1.8,0-3.3,1.5-3.3,3.3c0,1.1,0.5,2,1.3,2.6C-130.4,142.6-130.4,142.4-130.4,142.1z"});An.propTypes={fill:wn.string};class On extends _n.Component{static __initStatic(){this.propTypes={classes:wn.object.isRequired,size:wn.number}}render(){const{size:e}=this.props;return!0===this.props.open?_n.createElement(Ht,{size:e},_n.createElement("svg",{preserveAspectRatio:"xMinYMin meet",viewBox:"-135 129 16 32"},_n.createElement("path",{fill:"#BCE2FF",d:"M-122,141.1c0-3.7-3.3-6.6-7.1-5.8c-2.4,0.5-4.3,2.4-4.7,4.8c-0.4,2.3,0.6,4.4,2.2,5.7c0.4,0.3,0.6,0.8,0.6,1.3v1.9h6.1v-1.9c0-0.5,0.2-1,0.6-1.3C-122.8,144.7-122,143-122,141.1z"}),_n.createElement("path",{fill:"#BCE2FF",d:"M-125.7,153h-4.5c-0.4,0-0.8-0.4-0.8-0.8v-1.6h6.1v1.6C-124.9,152.7-125.2,153-125.7,153z"}),_n.createElement(An,{fill:"#1A9CFF"}))):_n.createElement(Ht,{size:e},_n.createElement("svg",{preserveAspectRatio:"xMinYMin meet",viewBox:"-135 129 16 31"},_n.createElement("path",{fill:"#D0CAC5",stroke:"#E6E3E0",className:"st0",d:"M-120.7,142.4c0-3.7-3.3-6.6-7.1-5.8c-2.4,0.5-4.3,2.4-4.7,4.8c-0.4,2.3,0.6,4.4,2.2,5.7c0.4,0.3,0.6,0.8,0.6,1.3v1.9h6.1v-1.9c0-0.5,0.2-1,0.6-1.3C-121.6,146-120.7,144.3-120.7,142.4z"}),_n.createElement("path",{fill:"#D0CAC5",stroke:"#E6E3E0",className:"st0",d:"M-124.4,154.3h-4.5c-0.4,0-0.8-0.4-0.8-0.8v-1.6h6.1v1.6C-123.6,153.9-123.9,154.3-124.4,154.3z"}),_n.createElement("path",{fill:"#B3ABA4",stroke:"#CDC7C2",className:"st1",d:"M-121.3,141.8c0-3.7-3.3-6.6-7.1-5.8c-2.4,0.5-4.3,2.4-4.7,4.8c-0.4,2.3,0.6,4.4,2.2,5.7c0.4,0.3,0.6,0.8,0.6,1.3v1.9h6.1v-1.9c0-0.5,0.2-1,0.6-1.3C-122.2,145.3-121.3,143.7-121.3,141.8z"}),",",_n.createElement("path",{fill:"#B3ABA4",stroke:"#CDC7C2",className:"st1",d:"M-125,153.7h-4.5c-0.4,0-0.8-0.4-0.8-0.8v-1.6h6.1v1.6C-124.2,153.3-124.6,153.7-125,153.7z"}),_n.createElement("path",{fill:"#1A9CFF",d:"M-122,141.1c0-3.7-3.3-6.6-7.1-5.8c-2.4,0.5-4.3,2.4-4.7,4.8c-0.4,2.3,0.6,4.4,2.2,5.7c0.4,0.3,0.6,0.8,0.6,1.3v1.9h6.1v-1.9c0-0.5,0.2-1,0.6-1.3C-122.8,144.7-122,143-122,141.1z"}),_n.createElement("path",{fill:"#1A9CFF",d:"M-125.7,153h-4.5c-0.4,0-0.8-0.4-0.8-0.8v-1.6h6.1v1.6C-124.9,152.7-125.2,153-125.7,153z"}),_n.createElement(An,{fill:"1A9CFF"})))}}On.__initStatic(),On.propTypes={open:wn.bool},On.defaultProps={open:!1};const Rn=e,Ln=t,jn=({fill:e})=>Ln.createElement("g",null,Ln.createElement("rect",{x:"19.3",y:"10.3",width:"4.5",height:"12.7",fill:e}),Ln.createElement("rect",{x:"19.3",y:"26.2",width:"4.5",height:"4.5",fill:e}));jn.propTypes={fill:Rn.string.isRequired};const Nn=({fill:e})=>Ln.createElement("polygon",{points:"14.8,4.5 5.6,13.8 5.6,27 14.8,36.5 28.1,36.5 37.6,27 37.6,13.8 28.1,4.5",fill:e});Nn.propTypes={fill:Rn.string.isRequired};const Tn=({fill:e})=>Ln.createElement("g",null,Ln.createElement("rect",{x:"23.8",y:"15",width:"3.5",height:"4.4",fill:e}),Ln.createElement("rect",{x:"16",y:"15",width:"3.5",height:"4.4",fill:e}),Ln.createElement("path",{d:"M24.2,27.1h-5.1c-0.8,0-1.5-0.7-1.5-1.5v0c0-0.8,0.7-1.5,1.5-1.5h5.1c0.8,0,1.5,0.7,1.5,1.5v0 C25.7,26.4,25,27.1,24.2,27.1z",fill:e}));Tn.propTypes={fill:Rn.string.isRequired};class Mn extends Ln.Component{constructor(e){super(e);const{fg:t="#464146",bg:n="white"}=this.props;this.icons={check:Ln.createElement(Kt,null,Ln.createElement(Nn,{fill:n}),Ln.createElement(jn,{fill:t})),emoji:Ln.createElement(Kt,null,Ln.createElement(Nn,{fill:n}),Ln.createElement(Tn,{fill:t})),feedback:{check:Ln.createElement(Kt,null,Ln.createElement(Nn,{fill:n}),Ln.createElement(Tn,{fill:t})),emoji:Ln.createElement(Kt,null,Ln.createElement(Nn,{fill:n}),Ln.createElement(Tn,{fill:t})),square:{check:Ln.createElement(Kt,null,Ln.createElement(Nn,{fill:n}),Ln.createElement(jn,{fill:t})),emoji:Ln.createElement(Kt,null,Ln.createElement(Nn,{fill:n}),Ln.createElement(Tn,{fill:t})),open:{check:Ln.createElement(Kt,null,Ln.createElement(jn,{fill:n})),emoji:Ln.createElement(Kt,null,Ln.createElement(Tn,{fill:n}))}}}}}render(){const{iconSet:e,category:t,shape:n,open:o}=this.props;return void 0===t?this.icons[e]:void 0===n?this.icons.feedback[e]:!0===o?this.icons.feedback.square.open[e]:this.icons.feedback.square[e]}}Mn.propTypes={iconSet:Rn.oneOf(["emoji","check",void 0]),shape:Rn.oneOf(["square",void 0]),category:Rn.oneOf(["feedback",void 0]),open:Rn.bool,fg:Rn.string,bg:Rn.string},Mn.defaultProps={iconSet:"check",shape:void 0,category:void 0,open:!1,fg:"#464146",bg:"white"};const Pn=e,Fn=t,In=({fill:e})=>Fn.createElement("g",{transform:"translate(0, 0)"},Fn.createElement("polygon",{points:"27.5,13.4 23.9,11.4 15.9,25.8 19.1,28.6",fill:e}),Fn.createElement("polygon",{points:"16.2,20.6 14.4,19.2 11.8,22.3 14.1,24.3",fill:e}));In.propTypes={fill:Pn.string.isRequired};const $n=({fill:e})=>Fn.createElement("g",{transform:"translate(2, 0)"},Fn.createElement("rect",{x:"20.6",y:"11.8",width:"4",height:"5",fill:e}),Fn.createElement("rect",{x:"11.5",y:"11.8",width:"4",height:"5",fill:e}),Fn.createElement("rect",{x:"10.9",y:"22.9",transform:"matrix(0.9794 -0.2019 0.2019 0.9794 -4.6237 4.1559)",width:"14.3",height:"3.7",fill:e}));$n.propTypes={fill:Pn.string.isRequired};const Bn=Zt(In,$n);Bn.propTypes={iconSet:Pn.oneOf(["emoji","check"]),shape:Pn.oneOf(["round","square"]),category:Pn.oneOf(["feedback",void 0]),open:Pn.bool,fg:Pn.string,bg:Pn.string,size:Pn.oneOfType([Pn.string,Pn.number])},Bn.defaultProps={iconSet:"check",shape:"round",category:void 0,open:!1,fg:"#4aaf46",bg:"#c1e1ac",size:30};const Dn=e,zn=t,Un=({fill:e})=>zn.createElement("g",null,zn.createElement("rect",{x:"-115",y:"136.7",width:"3",height:"3",fill:e}),zn.createElement("polygon",{points:"-112,147.7 -112,141.7 -115.8,141.7 -115.8,143.7 -114,143.7 -114,147.7 -116.2,147.7 -116.2,149.7 -109.8,149.7 -109.8,147.7",fill:e}));Un.propTypes={fill:Dn.string.isRequired};const Hn=({fill:e})=>zn.createElement("path",{d:"M-113,158.5c-8,0-14.5-6.5-14.5-14.5s6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5S-105,158.5-113,158.5z M-113,130.5c-7.4,0-13.5,6.1-13.5,13.5s6.1,13.5,13.5,13.5s13.5-6.1,13.5-13.5S-105.6,130.5-113,130.5z",fill:e});Hn.propTypes={fill:Dn.string.isRequired};const Vn=({fill:e="#FFFFFF"})=>zn.createElement("g",null,zn.createElement("path",{style:{fill:"#D0CAC5",stroke:"#E6E3E0",strokeWidth:.75,strokeMiterlimit:10},d:"M-111.7,160.9c-8.5,0-15.5-6.9-15.5-15.5c0-8.5,6.9-15.5,15.5-15.5s15.5,6.9,15.5,15.5C-96.2,154-103.1,160.9-111.7,160.9z"}),zn.createElement("path",{style:{fill:"#B3ABA4",stroke:"#CDC7C2",strokeWidth:.5,strokeMiterlimit:10},d:"M-112,159.5c-8,0-14.5-6.5-14.5-14.5s6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5S-104,159.5-112,159.5z"}),zn.createElement("circle",{cx:"-113",cy:"144",r:"14",fill:e}));Vn.propTypes={fill:Dn.string};const qn=({children:e,size:t})=>{const n=Ut(t),o={height:n,width:n,display:"inline-block",position:"relative"};return zn.createElement("div",{style:o},zn.createElement("svg",{preserveAspectRatio:"xMinYMin meet",viewBox:"-129 128 34 34"},e))};qn.propTypes={children:Dn.oneOfType([Dn.arrayOf(Dn.node),Dn.node]).isRequired,size:Dn.oneOfType([Dn.string,Dn.number])};class Kn extends zn.Component{render(){const{iconSet:e,open:t,fg:n="#1a9cff",bg:o="#bce2ff",border:r="#bbe3fd"}=this.props,i=zn.createElement(Un,{fill:n}),s={check:zn.createElement(qn,{size:this.props.size},zn.createElement(Vn,null),i,zn.createElement(Hn,{fill:r})),emoji:zn.createElement(qn,{size:this.props.size},zn.createElement(Vn,null),i,zn.createElement(Hn,{fill:r})),open:{check:zn.createElement(qn,{size:this.props.size},zn.createElement("circle",{cx:"-113",cy:"144",r:"14",fill:"#FFFFFF"}),zn.createElement(Un,{fill:o}),zn.createElement(Hn,{fill:"#FFFFFF"})),emoji:zn.createElement(qn,{size:this.props.size},zn.createElement("circle",{cx:"-113",cy:"144",r:"14",fill:"#FFFFFF"}),zn.createElement(Un,{fill:o}),zn.createElement(Hn,{fill:r}))}};return!0===t?s.open[e]:s[e]}}function Wn(){return Wn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Wn.apply(null,arguments)}function Yn(e,t){if(null==e)return{};var n={};for(var o in e)if({}.hasOwnProperty.call(e,o)){if(-1!==t.indexOf(o))continue;n[o]=e[o]}return n}function Gn(e,t){return Gn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Gn(e,t)}function Jn(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Gn(e,t)}function Qn(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}Kn.propTypes={iconSet:Dn.oneOf(["emoji","check"]),open:Dn.bool,fg:Dn.string,bg:Dn.string,border:Dn.string,size:Dn.oneOfType([Dn.string,Dn.number])},Kn.defaultProps={iconSet:"check",open:!1,fg:"#1a9cff",bg:"#bce2ff",border:"#bbe3fd",size:30};var Xn=!1;var Zn=t.createContext(null),eo=function(e){return e.scrollTop};const to=t,no=o;var oo="unmounted",ro="exited",io="entering",so="entered",ao="exiting",lo=function(e){function t(t,n){var o;o=e.call(this,t,n)||this;var r,i=n&&!n.isMounting?t.enter:t.appear;return o.appearStatus=null,t.in?i?(r=ro,o.appearStatus=io):r=so:r=t.unmountOnExit||t.mountOnEnter?oo:ro,o.state={status:r},o.nextCallback=null,o}Jn(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===oo?{status:ro}: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!==io&&n!==so&&(t=io):n!==io&&n!==so||(t=ao)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,o=this.props.timeout;return e=t=n=o,null!=o&&"number"!=typeof o&&(e=o.exit,t=o.enter,n=void 0!==o.appear?o.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===io){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:no.findDOMNode(this);n&&eo(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===ro&&this.setState({status:oo})},n.performEnter=function(e){var t=this,n=this.props.enter,o=this.context?this.context.isMounting:e,r=this.props.nodeRef?[o]:[no.findDOMNode(this),o],i=r[0],s=r[1],a=this.getTimeouts(),l=o?a.appear:a.enter;!e&&!n||Xn?this.safeSetState({status:so},function(){t.props.onEntered(i)}):(this.props.onEnter(i,s),this.safeSetState({status:io},function(){t.props.onEntering(i,s),t.onTransitionEnd(l,function(){t.safeSetState({status:so},function(){t.props.onEntered(i,s)})})}))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),o=this.props.nodeRef?void 0:no.findDOMNode(this);t&&!Xn?(this.props.onExit(o),this.safeSetState({status:ao},function(){e.props.onExiting(o),e.onTransitionEnd(n.exit,function(){e.safeSetState({status:ro},function(){e.props.onExited(o)})})})):this.safeSetState({status:ro},function(){e.props.onExited(o)})},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(o){n&&(n=!1,t.nextCallback=null,e(o))},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:no.findDOMNode(this),o=null==e&&!this.props.addEndListener;if(n&&!o){if(this.props.addEndListener){var r=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],i=r[0],s=r[1];this.props.addEndListener(i,s)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if(e===oo)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 o=Yn(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return to.createElement(Zn.Provider,{value:null},"function"==typeof n?n(e,o):to.cloneElement(to.Children.only(n),o))},t}(to.Component);function co(){}lo.contextType=Zn,lo.propTypes={},lo.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:co,onEntering:co,onEntered:co,onExit:co,onExiting:co,onExited:co},lo.UNMOUNTED=oo,lo.EXITED=ro,lo.ENTERING=io,lo.ENTERED=so,lo.EXITING=ao;var po=lo;const uo=t;var ho=function(e,t){return e&&t&&t.split(" ").forEach(function(t){return o=t,void((n=e).classList?n.classList.add(o):function(e,t){return e.classList?!!t&&e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")}(n,o)||("string"==typeof n.className?n.className=n.className+" "+o:n.setAttribute("class",(n.className&&n.className.baseVal||"")+" "+o)));var n,o})},go=function(e,t){return e&&t&&t.split(" ").forEach(function(t){return o=t,void((n=e).classList?n.classList.remove(o):"string"==typeof n.className?n.className=Qn(n.className,o):n.setAttribute("class",Qn(n.className&&n.className.baseVal||"",o)));var n,o})},fo=function(e){function t(){for(var t,n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];return(t=e.call.apply(e,[this].concat(o))||this).appliedClasses={appear:{},enter:{},exit:{}},t.onEnter=function(e,n){var o=t.resolveArguments(e,n),r=o[0],i=o[1];t.removeClasses(r,"exit"),t.addClass(r,i?"appear":"enter","base"),t.props.onEnter&&t.props.onEnter(e,n)},t.onEntering=function(e,n){var o=t.resolveArguments(e,n),r=o[0],i=o[1]?"appear":"enter";t.addClass(r,i,"active"),t.props.onEntering&&t.props.onEntering(e,n)},t.onEntered=function(e,n){var o=t.resolveArguments(e,n),r=o[0],i=o[1]?"appear":"enter";t.removeClasses(r,i),t.addClass(r,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,o="string"==typeof n,r=o?""+(o&&n?n+"-":"")+e:n[e];return{baseClassName:r,activeClassName:o?r+"-active":n[e+"Active"],doneClassName:o?r+"-done":n[e+"Done"]}},t}Jn(t,e);var n=t.prototype;return n.addClass=function(e,t,n){var o=this.getClassNames(t)[n+"ClassName"],r=this.getClassNames("enter").doneClassName;"appear"===t&&"done"===n&&r&&(o+=" "+r),"active"===n&&e&&eo(e),o&&(this.appliedClasses[t][n]=o,ho(e,o))},n.removeClasses=function(e,t){var n=this.appliedClasses[t],o=n.base,r=n.active,i=n.done;this.appliedClasses[t]={},o&&go(e,o),r&&go(e,r),i&&go(e,i)},n.render=function(){var e=this.props;e.classNames;var t=Yn(e,["classNames"]);return uo.createElement(po,Wn({},t,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(uo.Component);fo.defaultProps={classNames:""},fo.propTypes={};var mo=fo;const{Children:yo}=t,{cloneElement:bo}=t,{isValidElement:vo}=t;function xo(e,t){var n=Object.create(null);return e&&yo.map(e,function(e){return e}).forEach(function(e){n[e.key]=function(e){return t&&vo(e)?t(e):e}(e)}),n}function Eo(e,t,n){return null!=n[t]?n[t]:e.props[t]}function Co(e,t,n){var o=xo(e.children),r=function(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var o,r=Object.create(null),i=[];for(var s in e)s in t?i.length&&(r[s]=i,i=[]):i.push(s);var a={};for(var l in t){if(r[l])for(o=0;o<r[l].length;o++){var c=r[l][o];a[r[l][o]]=n(c)}a[l]=n(l)}for(o=0;o<i.length;o++)a[i[o]]=n(i[o]);return a}(t,o);return Object.keys(r).forEach(function(i){var s=r[i];if(vo(s)){var a=i in t,l=i in o,c=t[i],p=vo(c)&&!c.props.in;!l||a&&!p?l||!a||p?l&&a&&vo(c)&&(r[i]=bo(s,{onExited:n.bind(null,s),in:c.props.in,exit:Eo(s,"exit",e),enter:Eo(s,"enter",e)})):r[i]=bo(s,{in:!1}):r[i]=bo(s,{onExited:n.bind(null,s),in:!0,exit:Eo(s,"exit",e),enter:Eo(s,"enter",e)})}}),r}const So=t;var ko=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},wo=function(e){function t(t,n){var o,r=(o=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}(o));return o.state={contextValue:{isMounting:!0},handleExited:r,firstRender:!0},o}Jn(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,o,r=t.children,i=t.handleExited;return{children:t.firstRender?(n=e,o=i,xo(n.children,function(e){return bo(e,{onExited:o.bind(null,e),in:!0,appear:Eo(e,"appear",n),enter:Eo(e,"enter",n),exit:Eo(e,"exit",n)})})):Co(e,r,i),firstRender:!1}},n.handleExited=function(e,t){var n=xo(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState(function(t){var n=Wn({},t.children);return delete n[e.key],{children:n}}))},n.render=function(){var e=this.props,t=e.component,n=e.childFactory,o=Yn(e,["component","childFactory"]),r=this.state.contextValue,i=ko(this.state.children).map(n);return delete o.appear,delete o.enter,delete o.exit,null===t?So.createElement(Zn.Provider,{value:r},i):So.createElement(Zn.Provider,{value:r},So.createElement(t,o,i))},t}(So.Component);wo.propTypes={},wo.defaultProps={component:"div",childFactory:function(e){return e}};var _o=wo;const{green:Ao}=r,{indigo:Oo}=r,{orange:Ro}=r,{pink:Lo}=r,{red:jo}=r,No={TEXT:"black",DISABLED:"grey",DISABLED_SECONDARY:"#ABABAB",CORRECT:Ao[500],CORRECT_SECONDARY:Ao[50],CORRECT_TERTIARY:"#0EA449",CORRECT_WITH_ICON:"#087D38",INCORRECT:Ro[500],INCORRECT_SECONDARY:jo[50],INCORRECT_WITH_ICON:"#BF0D00",MISSING:jo[700],MISSING_WITH_ICON:"#6A78A1",PRIMARY:Oo[500],PRIMARY_LIGHT:Oo[200],PRIMARY_DARK:Oo[800],SECONDARY:Lo.A400,SECONDARY_LIGHT:Lo[200],SECONDARY_DARK:Lo[900],TERTIARY:"#146EB3",TERTIARY_LIGHT:"#D0E2F0",BACKGROUND:"rgba(255,255,255,0)",BACKGROUND_DARK:"#ECEDF1",DROPDOWN_BACKGROUND:"#E0E1E6",SECONDARY_BACKGROUND:"rgba(241,241,241,1)",BORDER:"#9A9A9A",BORDER_LIGHT:"#D1D1D1",BORDER_DARK:"#646464",BORDER_GRAY:"#7E8494",TABLE_GRID:"black",TABLE_GRID_LIGHT:"#dfe2e5",TABLE_STRIPE:"#f6f8fa",BLACK:"#000000",WHITE:"#ffffff",TRANSPARENT:"transparent",FOCUS_CHECKED:"#BBDEFB",FOCUS_CHECKED_BORDER:"#1565C0",FOCUS_UNCHECKED:"#E0E0E0",FOCUS_UNCHECKED_BORDER:"#757575",BUTTON_FOCUS_OUTLINE:"#3B82F6",BLUE_GREY100:"#F3F5F7",BLUE_GREY300:"#C0C3CF",BLUE_GREY600:"#7E8494",BLUE_GREY900:"#152452",FADED_PRIMARY:"#DCDAFB",KEYPAD_BUTTON:"rgb(188, 194, 229)",KEYPAD_BUTTON_OPERATOR:"rgb(255, 159, 192)",KEYPAD_EMPTY_PLACEHOLDER:"rgba(245, 0, 87, 0.4)",KEYPAD_BUTTON_HOVER:"rgb(214, 218, 239)",KEYPAD_BUTTON_OPERATOR_HOVER:"rgb(255, 197, 217)",KEY_BOARD_FOCUS_INDICATOR:"#2B87FF",BUTTON_BORDER:"rgba(0, 0, 0, 0.23)",BUTTON_HOVER_BG:"rgba(0, 0, 0, 0.08)"};Object.freeze(No);const To=(Mo="pie",(...e)=>{const t=e.pop();return e.reduceRight((e,t)=>`var(--${Mo}-${t}, ${e})`,t)});var Mo;const Po=()=>To("text",No.TEXT),Fo=()=>To("disabled",No.DISABLED),Io=()=>To("correct",No.CORRECT),$o=()=>To("incorrect",No.INCORRECT),Bo=()=>To("background",No.BACKGROUND),Do=()=>To("table-stripe","background-dark",No.TABLE_STRIPE),zo=()=>To("keyboard-focus-indicator",No.KEY_BOARD_FOCUS_INDICATOR),Uo=t,Ho=e,{styled:Vo}=n,qo=Vo("div")({transformOrigin:"0% 0px 0px",width:"100%",display:"block",overflow:"hidden","&.incorrect":{color:"#946202"}}),Ko=Vo("div")({WebkitFontSmoothing:"antialiased",backgroundColor:`var(--feedback-bg-color, ${Fo()})`,borderRadius:"4px",lineHeight:"25px",margin:"0px",padding:"10px",verticalAlign:"middle",color:"var(--feedback-color, white)","&.correct":{backgroundColor:`var(--feedback-correct-bg-color, ${Io()})`},"&.incorrect":{backgroundColor:`var(--feedback-incorrect-bg-color, ${$o()})`}}),Wo=Vo("div")({"&.feedback-enter":{height:"1px"},"&.feedback-enter-active":{height:"45px",transition:"height 500ms"},"&.feedback-exit":{height:"45px"},"&.feedback-exit-active":{height:"1px",transition:"height 200ms"}});class Yo extends Uo.Component{constructor(...e){super(...e),Yo.prototype.__init.call(this)}static __initStatic(){this.propTypes={correctness:Ho.string,feedback:Ho.string}}__init(){this.nodeRef=Uo.createRef()}renderFeedback(){const{correctness:e,feedback:t}=this.props;return e&&t?Uo.createElement(mo,{key:"hasFeedback",nodeRef:this.nodeRef,timeout:{enter:500,exit:200},classNames:"feedback"},Uo.createElement(Wo,{ref:this.nodeRef},Uo.createElement(qo,null,Uo.createElement(Ko,{className:e,dangerouslySetInnerHTML:{__html:t}})))):null}render(){return Uo.createElement("div",null,Uo.createElement(_o,null,this.renderFeedback()))}}Yo.__initStatic();const Go=t,Jo=e,{Popover:Qo}=i,{styled:Xo}=n,Zo=s("pie-libs:render-ui:response-indicators"),er=Xo("div")(({hasFeedback:e})=>({cursor:e?"pointer":"default"})),tr=Xo(Qo)({cursor:"pointer"}),nr=Xo("div")({padding:"0",borderRadius:"4px"}),or=(e,t)=>{class n extends Go.Component{constructor(e){super(e),n.prototype.__init.call(this),n.prototype.__init2.call(this),this.state={}}__init(){this.handlePopoverOpen=e=>{Zo("[handlePopoverOpen]",e.target),this.setState({anchorEl:e.target})}}__init2(){this.handlePopoverClose=()=>{this.setState({anchorEl:null})}}render(){const{feedback:n}=this.props,{anchorEl:o}=this.state;return Go.createElement(er,{hasFeedback:!!n},Go.createElement("span",{ref:e=>this.icon=e,onClick:this.handlePopoverOpen},Go.createElement(e,null)),n&&Go.createElement(tr,{PaperComponent:nr,open:!!o,anchorEl:o,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},onClose:this.handlePopoverClose},Go.createElement(Yo,{feedback:n,correctness:t})))}}return n.propTypes={feedback:Jo.string},n};or(rn,"correct"),or(yn,"incorrect"),or(Bn,"partially-correct"),or(Mn,"nothing-submitted");const rr=t,{styled:ir}=n,sr=a,ar=e,{renderMath:lr}=p,cr=ir("span")(({theme:e})=>({color:e.palette.primary.light,borderBottom:`1px dotted ${e.palette.primary.light}`,cursor:"pointer"})),pr=ir(sr)(({theme:e})=>({paddingTop:e.spacing(2)}));class dr extends rr.Component{constructor(...e){super(...e),dr.prototype.__init.call(this),dr.prototype.__init2.call(this)}static __initStatic(){this.propTypes={className:ar.string,children:ar.object,labels:ar.shape({visible:ar.string,hidden:ar.string})}}static __initStatic2(){this.defaultProps={labels:{}}}__init(){this.state={expanded:!1}}__init2(){this.toggleExpanded=()=>{this.setState(e=>({expanded:!e.expanded}))}}componentDidMount(){lr(this.root)}componentDidUpdate(){lr(this.root)}render(){const{labels:e,children:t,className:n}=this.props,o=this.state.expanded?e.visible||"Hide":e.hidden||"Show";return rr.createElement("div",{className:n,ref:e=>this.root=e},rr.createElement("div",{onClick:this.toggleExpanded},rr.createElement(cr,null,o)),rr.createElement(pr,{in:this.state.expanded,timeout:{enter:225,exit:195},unmountOnExit:!0},t))}}dr.__initStatic(),dr.__initStatic2();const{Button:ur}=i,{styled:hr}=n;hr("div")({display:"flex",flexDirection:"column"}),hr("div")({display:"flex",alignItems:"center",justifyContent:"center"}),hr("div")(({theme:e})=>({width:"24px",height:"24px",color:"gray",marginRight:e.spacing(1),display:"flex",alignItems:"center"})),hr(ur)(({theme:e})=>({display:"flex",alignItems:"center",marginLeft:e.spacing(3),marginRight:e.spacing(3)}));const gr=t,{createTheme:fr}=n,{styled:mr}=n,{StyledEngineProvider:yr}=n,{ThemeProvider:br}=n,vr=e;const xr=fr({typography:{fontFamily:"inherit"},palette:{action:{disabled:"rgba(0, 0, 0, 0.54);"}},components:{MuiTypography:{styleOverrides:{root:{fontFamily:"inherit"}}},MuiButton:{styleOverrides:{contained:{backgroundColor:"#e0e0e0",color:"#000000","&:hover":{backgroundColor:"#bdbdbd"}}}}}}),Er=mr("div")({"& table, th, td":{fontSize:"inherit"}});class Cr extends gr.Component{static __initStatic(){this.propTypes={className:vr.string,children:vr.array,extraCSSRules:vr.shape({names:vr.arrayOf(vr.string),rules:vr.string}),fontSizeFactor:vr.number}}static __initStatic2(){this.defaultProps={extraCSSRules:{},fontSizeFactor:1}}constructor(e){super(e),this.classesSheet=document.createElement("style")}computeStyle(e){const t=e=>parseFloat(getComputedStyle(e).fontSize),n=t(document.documentElement),o=t(document.body),r=Math.max(n,o),i=null!=e&&"number"==typeof e?e:1;return 1!==i?{fontSize:r*i+"px"}:null}render(){const{children:e,className:t,fontSizeFactor:n,...o}=this.props,{extraCSSRules:r,...i}=o,s=this.computeStyle(n);return gr.createElement(yr,{injectFirst:!0},gr.createElement(br,{theme:xr},function(e){let t,n=e[0],o=1;for(;o<e.length;){const r=e[o],i=e[o+1];if(o+=2,("optionalAccess"===r||"optionalCall"===r)&&null==n)return;"access"===r||"optionalAccess"===r?(t=n,n=i(n)):"call"!==r&&"optionalCall"!==r||(n=i((...e)=>n.call(t,...e)),t=void 0)}return n}([r,"optionalAccess",e=>e.rules])?gr.createElement("style",{dangerouslySetInnerHTML:{__html:`.extraCSSRules { ${r.rules} }`}}):null,gr.createElement(Er,{className:`${t} extraCSSRules`,...i,...s&&{style:s}},e)))}}Cr.__initStatic(),Cr.__initStatic2();const Sr=t,{styled:kr}=n,wr=e,_r=kr(Cr)({display:"flex",flexDirection:"column",position:"relative"});class Ar extends Sr.Component{static __initStatic(){this.propTypes={ariaLabel:wr.string,children:wr.oneOfType([wr.arrayOf(wr.node),wr.node]).isRequired,role:wr.string,extraCSSRules:wr.shape({names:wr.arrayOf(wr.string),rules:wr.string}),fontSizeFactor:wr.number}}render(){const{children:e,ariaLabel:t,role:n,extraCSSRules:o,fontSizeFactor:r,classes:i}=this.props,s=t?{"aria-label":t,role:n}:{};return Sr.createElement(_r,{...s,extraCSSRules:o,fontSizeFactor:r,classes:i},e)}}Ar.__initStatic();const Or=t,Rr=e;class Lr extends Or.Component{static __initStatic(){this.propTypes={tag:Rr.string,className:Rr.string,html:Rr.string}}static __initStatic2(){this.defaultProps={tag:"div",html:""}}render(){const{tag:e,className:t,html:n}=this.props,o=e||"div";return Or.createElement(o,{ref:e=>this.node=e,className:t,dangerouslySetInnerHTML:{__html:n}})}}Lr.__initStatic(),Lr.__initStatic2();const{InputLabel:jr}=i,{FormControl:Nr}=i,Tr=e,{styled:Mr}=n;Mr(Nr)(({theme:e})=>({margin:0,padding:0,flex:"1 0 auto",minWidth:e.spacing(4)})),Mr(jr)(()=>({fontSize:"inherit",whiteSpace:"nowrap",margin:0,padding:0,alignSelf:"flex-start",position:"absolute",top:0,left:0,transformOrigin:"top left",pointerEvents:"none","&.MuiInputLabel-shrink":{transform:"scale(0.75) translate(0, -0.75em)"},"&:not(.MuiInputLabel-shrink)":{transform:"translate(0, 0)"}})),Tr.oneOfType([Tr.string,Tr.object]).isRequired,Tr.string,Tr.oneOfType([Tr.arrayOf(Tr.node),Tr.node]).isRequired;const Pr=t,{Component:Fr}=t,{styled:Ir}=n,$r=e,{renderMath:Br}=p,Dr=Ir("div")(({theme:e,tagName:t})=>({'&:not(.MathJax) > table:not([role="presentation"])':{borderCollapse:"collapse"},'&:not(.MathJax) table[border]:not([role="presentation"]), &:not(.MathJax) table[border]:not([role="presentation"]) td, &:not(.MathJax) table[border]:not([role="presentation"]) th':{borderStyle:"solid",borderColor:To("table-grid","text",No.TABLE_GRID)},'&:not(.MathJax) > table:not([role="presentation"]):has(tbody tr > th:first-child):not(:has(tbody tr > td:first-child)) tbody td:nth-child(even)':{backgroundColor:Do()},'&:not(.MathJax) > table:not([role="presentation"]):has(tbody tr > td:first-child) tbody tr:nth-child(even) td':{backgroundColor:Do()},'&:not(.MathJax) table:not([role="presentation"]) td, &:not(.MathJax) table:not([role="presentation"]) th':{padding:".6em 1em",textAlign:"left"},"&:not(.MathJax) > table td > p.kds-indent":{textAlign:"initial"},"&.prompt":{verticalAlign:"middle",color:Po()},"&.legend":{width:"100%",fontSize:"inherit !important"},"&.rationale":{paddingLeft:e.spacing(4),paddingBottom:e.spacing(1)},"&.prompt-label":{color:`${Po()} !important`,display:"flex",flexDirection:"column",verticalAlign:"middle",cursor:"pointer","& > p":{margin:"0 0 0 0 !important"}}})),zr=/\\embed\{newLine\}\[\]/g;class Ur extends Fr{constructor(...e){super(...e),Ur.prototype.__init.call(this),Ur.prototype.__init2.call(this)}static __initStatic(){this.propTypes={prompt:$r.string,tagName:$r.string,className:$r.string,onClick:$r.func,defaultClassName:$r.string,autoplayAudioEnabled:$r.bool,customAudioButton:{playImage:$r.string,pauseImage:$r.string}}}static __initStatic2(){this.defaultProps={onClick:()=>{}}}__init(){this.promptRef=Pr.createRef()}__init2(){this.parsedText=e=>{const{autoplayAudioEnabled:t,customAudioButton:n}=this.props,o=document.createElement("div");o.innerHTML=e;const r=o.querySelector("audio");if(r){const e=document.createElement("source");if(e.setAttribute("type","audio/mp3"),e.setAttribute("src",r.getAttribute("src")),r.removeAttribute("src"),r.setAttribute("id","pie-prompt-audio-player"),r.appendChild(e),n){r.style.display="none";const e=document.createElement("div");e.id="play-audio-button",Object.assign(e.style,{cursor:"pointer",display:"block",width:"128px",height:"128px",backgroundImage:`url(${t?n.pauseImage:n.playImage})`,backgroundSize:"cover",borderRadius:"50%",border:"1px solid #326295"}),r.parentNode.insertBefore(e,r)}}return o.innerHTML}}addCustomAudioButtonControls(){const{autoplayAudioEnabled:e,customAudioButton:t}=this.props,n=document.getElementById("play-audio-button"),o=document.getElementById("pie-prompt-audio-player");if(e&&o&&o.play().then(()=>{n&&t&&o.addEventListener("ended",i)}).catch(e=>{n&&t&&(n.style.backgroundImage=`url(${t.playImage})`),console.error("Error playing audio",e)}),!n||!o||!t)return;const r=()=>{o.paused&&o.play()},i=()=>{n.style.backgroundImage=`url(${t.playImage})`},s=()=>{Object.assign(n.style,{backgroundImage:`url(${t.pauseImage})`,border:"1px solid #ccc"})},a=()=>{Object.assign(n.style,{backgroundImage:`url(${t.playImage})`,border:"1px solid #326295"})};n.addEventListener("click",r),o.addEventListener("play",s),o.addEventListener("pause",a),o.addEventListener("ended",i),this._handlePlayClick=r,this._handleAudioPlay=s,this._handleAudioPause=a,this._handleAudioEnded=i}removeCustomAudioButtonListeners(){const e=document.getElementById("play-audio-button"),t=document.querySelector("audio");e&&t&&(e.removeEventListener("click",this._handlePlayClick),t.removeEventListener("play",this._handleAudioPlay),t.removeEventListener("pause",this._handleAudioPause),t.removeEventListener("ended",this._handleAudioEnded))}componentDidMount(){this.alignImages(),this.addCustomAudioButtonControls(),this.setupMathRendering()}componentDidUpdate(e){this.alignImages(),e.prompt!==this.props.prompt&&this.renderMathContent()}componentWillUnmount(){this.removeCustomAudioButtonListeners()}setupMathRendering(){this.renderMathContent()}renderMathContent(){const e=this.promptRef.current;e&&"function"==typeof Br&&Br(e)}alignImages(){const e=this.promptRef.current;if(!e)return;const t=e.getElementsByTagName("img");if(t&&t.length)for(let e of t)if(e.attributes&&e.attributes.alignment&&e.attributes.alignment.value){const t=e.attributes.alignment.value,n="center"===t?"center":"right"===t?"flex-end":"flex-start",o=e.parentElement;if("DIV"===o.tagName&&"flex"===o.style.display&&"100%"===o.style.width)o.style.justifyContent=n;else{const t=document.createElement("div");t.style.display="flex",t.style.width="100%",t.style.justifyContent=n;const r=e.cloneNode(!0);t.appendChild(r),o.replaceChild(t,e)}}}render(){const{prompt:e,tagName:t,className:n,onClick:o,defaultClassName:r}=this.props,i=`${n||""} ${r||""} ${"legend"===t?"legend":""} preview-prompt`.trim();return Pr.createElement(Dr,{as:t||"div",ref:this.promptRef,onClick:o,className:i,tagName:t,dangerouslySetInnerHTML:{__html:this.parsedText(e||"").replace(zr,"\\newline ")}})}}Ur.__initStatic(),Ur.__initStatic2();const Hr=e,Vr=t,qr=e=>Vr.createElement(Vr.Fragment,null,Vr.Children.map(e.children,t=>Vr.cloneElement(t,{"data-pie-readable":void 0===e.false})));qr.propTypes={children:Hr.node,false:Hr.bool};const Kr=e;Kr.node,Kr.string,"undefined"!=typeof window&&new DOMParser,"undefined"!=typeof window&&new DOMParser;const Wr=t,{useRef:Yr}=t,Gr=e,{styled:Jr}=n,Qr="height ease-in 300ms, opacity ease-in 300ms",Xr=Jr("div")(()=>({position:"relative",height:0,overflow:"hidden",display:"flex",visibility:"hidden",width:0,"&.enter":{transition:Qr,opacity:1,height:"auto",width:"auto",visibility:"visible",minHeight:"25px"},"&.enter-done":{height:"auto",visibility:"visible",width:"auto",minHeight:"25px"},"&.exit":{transition:Qr,opacity:0,height:0,visibility:"visible",width:0},"&.exit-done":{opacity:0,visibility:"hidden",height:0,width:0}})),Zr=e=>{const{show:t,children:n,className:o}=e,r=Yr(null);return Wr.createElement(mo,{nodeRef:r,in:t,appear:!0,mountOnEnter:!1,timeout:300,classNames:{enter:"enter",enterDone:"enter-done",exit:"exit",exitDone:"exit-done"}},Wr.createElement(Xr,{ref:r,className:o},n))};function ei(e,t){return null!=e?e:t()}function ti(e){let t,n=e[0],o=1;for(;o<e.length;){const r=e[o],i=e[o+1];if(o+=2,("optionalAccess"===r||"optionalCall"===r)&&null==n)return;"access"===r||"optionalAccess"===r?(t=n,n=i(n)):"call"!==r&&"optionalCall"!==r||(n=i((...e)=>n.call(t,...e)),t=void 0)}return n}Zr.propTypes={show:Gr.bool.isRequired,className:Gr.string,children:Gr.oneOfType([Gr.arrayOf(Gr.node),Gr.node]).isRequired};const ni=e=>"string"==typeof e,oi=()=>{let e,t;const n=new Promise((n,o)=>{e=n,t=o});return n.resolve=e,n.reject=t,n},ri=e=>null==e?"":""+e,ii=/###/g,si=e=>e&&e.indexOf("###")>-1?e.replace(ii,"."):e,ai=e=>!e||ni(e),li=(e,t,n)=>{const o=ni(t)?t.split("."):t;let r=0;for(;r<o.length-1;){if(ai(e))return{};const t=si(o[r]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++r}return ai(e)?{}:{obj:e,k:si(o[r])}},ci=(e,t,n)=>{const{obj:o,k:r}=li(e,t,Object);if(void 0!==o||1===t.length)return void(o[r]=n);let i=t[t.length-1],s=t.slice(0,t.length-1),a=li(e,s,Object);for(;void 0===a.obj&&s.length;)i=`${s[s.length-1]}.${i}`,s=s.slice(0,s.length-1),a=li(e,s,Object),ti([a,"optionalAccess",e=>e.obj])&&void 0!==a.obj[`${a.k}.${i}`]&&(a.obj=void 0);a.obj[`${a.k}.${i}`]=n},pi=(e,t)=>{const{obj:n,k:o}=li(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,o))return n[o]},di=(e,t,n)=>{for(const o in t)"__proto__"!==o&&"constructor"!==o&&(o in e?ni(e[o])||e[o]instanceof String||ni(t[o])||t[o]instanceof String?n&&(e[o]=t[o]):di(e[o],t[o],n):e[o]=t[o]);return e},ui=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var hi={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const gi=e=>ni(e)?e.replace(/[&<>"'\/]/g,e=>hi[e]):e;const fi=[" ",",","?","!",";"],mi=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),yi=(e,t,n=".")=>{if(!e)return;if(e[t]){if(!Object.prototype.hasOwnProperty.call(e,t))return;return e[t]}const o=t.split(n);let r=e;for(let e=0;e<o.length;){if(!r||"object"!=typeof r)return;let t,i="";for(let s=e;s<o.length;++s)if(s!==e&&(i+=n),i+=o[s],t=r[i],void 0!==t){if(["string","number","boolean"].indexOf(typeof t)>-1&&s<o.length-1)continue;e+=s-e+1;break}r=t}return r},bi=e=>ti([e,"optionalAccess",e=>e.replace,"call",e=>e("_","-")]),vi={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){ti([console,"optionalAccess",t=>t[e],"optionalAccess",e=>e.apply,"optionalCall",e=>e(console,t)])}};class xi{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||"i18next:",this.logger=e||vi,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,o){return o&&!this.debug?null:(ni(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new xi(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new xi(this.logger,e)}}var Ei=new xi;class Ci{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 o=0;o<n;o++)e(...t)})}if(this.observers["*"]){Array.from(this.observers["*"].entries()).forEach(([n,o])=>{for(let r=0;r<o;r++)n.apply(n,[e,...t])})}}}class Si extends Ci{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,o={}){const r=void 0!==o.keySeparator?o.keySeparator:this.options.keySeparator,i=void 0!==o.ignoreJSONStructure?o.ignoreJSONStructure:this.options.ignoreJSONStructure;let s;e.indexOf(".")>-1?s=e.split("."):(s=[e,t],n&&(Array.isArray(n)?s.push(...n):ni(n)&&r?s.push(...n.split(r)):s.push(n)));const a=pi(this.data,s);return!a&&!t&&!n&&e.indexOf(".")>-1&&(e=s[0],t=s[1],n=s.slice(2).join(".")),!a&&i&&ni(n)?yi(ti([this,"access",e=>e.data,"optionalAccess",t=>t[e],"optionalAccess",e=>e[t]]),n,r):a}addResource(e,t,n,o,r={silent:!1}){const i=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator;let s=[e,t];n&&(s=s.concat(i?n.split(i):n)),e.indexOf(".")>-1&&(s=e.split("."),o=t,t=s[1]),this.addNamespaces(t),ci(this.data,s,o),r.silent||this.emit("added",e,t,n,o)}addResources(e,t,n,o={silent:!1}){for(const o in n)(ni(n[o])||Array.isArray(n[o]))&&this.addResource(e,t,o,n[o],{silent:!0});o.silent||this.emit("added",e,t,n)}addResourceBundle(e,t,n,o,r,i={silent:!1,skipCopy:!1}){let s=[e,t];e.indexOf(".")>-1&&(s=e.split("."),o=n,n=t,t=s[1]),this.addNamespaces(t);let a=pi(this.data,s)||{};i.skipCopy||(n=JSON.parse(JSON.stringify(n))),o?di(a,n,r):a={...a,...n},ci(this.data,s,a),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 ki={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,o,r){return e.forEach(e=>{t=ei(ti([this,"access",e=>e.processors,"access",t=>t[e],"optionalAccess",e=>e.process,"call",e=>e(t,n,o,r)]),()=>t)}),t}};const wi=Symbol("i18next/PATH_KEY");function _i(e,t){const{[wi]:n}=e(function(){const e=[],t=Object.create(null);let n;return t.get=(o,r)=>(ti([n,"optionalAccess",e=>e.revoke,"optionalCall",e=>e()]),r===wi?e:(e.push(r),n=Proxy.revocable(o,t),n.proxy)),Proxy.revocable(Object.create(null),t).proxy}());return n.join(ei(ti([t,"optionalAccess",e=>e.keySeparator]),()=>"."))}const Ai={},Oi=e=>!ni(e)&&"boolean"!=typeof e&&"number"!=typeof e;class Ri extends Ci{constructor(e,t={}){var n,o;super(),n=e,o=this,["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"].forEach(e=>{n[e]&&(o[e]=n[e])}),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=Ei.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){const n={...t};if(null==e)return!1;const o=this.resolve(e,n);if(void 0===ti([o,"optionalAccess",e=>e.res]))return!1;const r=Oi(o.res);return!1!==n.returnObjects||!r}extractFromKey(e,t){let n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");const o=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator;let r=t.ns||this.options.defaultNS||[];const i=n&&e.indexOf(n)>-1,s=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||((e,t,n)=>{t=t||"",n=n||"";const o=fi.filter(e=>t.indexOf(e)<0&&n.indexOf(e)<0);if(0===o.length)return!0;const r=mi.getRegExp(`(${o.map(e=>"?"===e?"\\?":e).join("|")})`);let i=!r.test(e);if(!i){const t=e.indexOf(n);t>0&&!r.test(e.substring(0,t))&&(i=!0)}return i})(e,n,o));if(i&&!s){const t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:ni(r)?[r]:r};const i=e.split(n);(n!==o||n===o&&this.options.ns.indexOf(i[0])>-1)&&(r=i.shift()),e=i.join(o)}return{key:e,namespaces:ni(r)?[r]:r}}translate(e,t,n){let o="object"==typeof t?{...t}:t;if("object"!=typeof o&&this.options.overloadTranslationOptionHandler&&(o=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof o&&(o={...o}),o||(o={}),null==e)return"";"function"==typeof e&&(e=_i(e,{...this.options,...o})),Array.isArray(e)||(e=[String(e)]);const r=void 0!==o.returnDetails?o.returnDetails:this.options.returnDetails,i=void 0!==o.keySeparator?o.keySeparator:this.options.keySeparator,{key:s,namespaces:a}=this.extractFromKey(e[e.length-1],o),l=a[a.length-1];let c=void 0!==o.nsSeparator?o.nsSeparator:this.options.nsSeparator;void 0===c&&(c=":");const p=o.lng||this.language,d=o.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if("cimode"===ti([p,"optionalAccess",e=>e.toLowerCase,"call",e=>e()]))return d?r?{res:`${l}${c}${s}`,usedKey:s,exactUsedKey:s,usedLng:p,usedNS:l,usedParams:this.getUsedParamsDetails(o)}:`${l}${c}${s}`:r?{res:s,usedKey:s,exactUsedKey:s,usedLng:p,usedNS:l,usedParams:this.getUsedParamsDetails(o)}:s;const u=this.resolve(e,o);let h=ti([u,"optionalAccess",e=>e.res]);const g=ti([u,"optionalAccess",e=>e.usedKey])||s,f=ti([u,"optionalAccess",e=>e.exactUsedKey])||s,m=void 0!==o.joinArrays?o.joinArrays:this.options.joinArrays,y=!this.i18nFormat||this.i18nFormat.handleAsObject,b=void 0!==o.count&&!ni(o.count),v=Ri.hasDefaultValue(o),x=b?this.pluralResolver.getSuffix(p,o.count,o):"",E=o.ordinal&&b?this.pluralResolver.getSuffix(p,o.count,{ordinal:!1}):"",C=b&&!o.ordinal&&0===o.count,S=C&&o[`defaultValue${this.options.pluralSeparator}zero`]||o[`defaultValue${x}`]||o[`defaultValue${E}`]||o.defaultValue;let k=h;y&&!h&&v&&(k=S);const w=Oi(k),_=Object.prototype.toString.apply(k);if(!(y&&k&&w&&["[object Number]","[object Function]","[object RegExp]"].indexOf(_)<0)||ni(m)&&Array.isArray(k))if(y&&ni(m)&&Array.isArray(h))h=h.join(m),h&&(h=this.extendTranslation(h,e,o,n));else{let t=!1,r=!1;!this.isValidLookup(h)&&v&&(t=!0,h=S),this.isValidLookup(h)||(r=!0,h=s);const a=(o.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&r?void 0:h,d=v&&S!==h&&this.options.updateMissing;if(r||t||d){if(this.logger.log(d?"updateKey":"missingKey",p,l,s,d?S:h),i){const e=this.resolve(s,{...o,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,o.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(o.lng||this.language):e.push(o.lng||this.language);const n=(e,t,n)=>{const r=v&&n!==h?n:a;this.options.missingKeyHandler?this.options.missingKeyHandler(e,l,t,r,d,o):ti([this,"access",e=>e.backendConnector,"optionalAccess",e=>e.saveMissing])&&this.backendConnector.saveMissing(e,l,t,r,d,o),this.emit("missingKey",e,l,t,h)};this.options.saveMissing&&(this.options.saveMissingPlurals&&b?e.forEach(e=>{const t=this.pluralResolver.getSuffixes(e,o);C&&o[`defaultValue${this.options.pluralSeparator}zero`]&&t.indexOf(`${this.options.pluralSeparator}zero`)<0&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{n([e],s+t,o[`defaultValue${t}`]||S)})}):n(e,s,S))}h=this.extendTranslation(h,e,o,u,n),r&&h===s&&this.options.appendNamespaceToMissingKey&&(h=`${l}${c}${s}`),(r||t)&&this.options.parseMissingKeyHandler&&(h=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}${c}${s}`:s,t?h:void 0,o))}else{if(!o.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(g,k,{...o,ns:a}):`key '${s} (${this.language})' returned an object instead of string.`;return r?(u.res=e,u.usedParams=this.getUsedParamsDetails(o),u):e}if(i){const e=Array.isArray(k),t=e?[]:{},n=e?f:g;for(const e in k)if(Object.prototype.hasOwnProperty.call(k,e)){const r=`${n}${i}${e}`;t[e]=v&&!h?this.translate(r,{...o,defaultValue:Oi(S)?S[e]:void 0,joinArrays:!1,ns:a}):this.translate(r,{...o,joinArrays:!1,ns:a}),t[e]===r&&(t[e]=k[e])}h=t}}return r?(u.res=h,u.usedParams=this.getUsedParamsDetails(o),u):h}extendTranslation(e,t,n,o,r){if(ti([this,"access",e=>e.i18nFormat,"optionalAccess",e=>e.parse]))e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||o.usedLng,o.usedNS,o.usedKey,{resolved:o});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const i=ni(e)&&(void 0!==ti([n,"optionalAccess",e=>e.interpolation,"optionalAccess",e=>e.skipOnVariables])?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let s;if(i){const t=e.match(this.interpolator.nestingRegexp);s=t&&t.length}let a=n.replace&&!ni(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(a={...this.options.interpolation.defaultVariables,...a}),e=this.interpolator.interpolate(e,a,n.lng||this.language||o.usedLng,n),i){const t=e.match(this.interpolator.nestingRegexp);s<(t&&t.length)&&(n.nest=!1)}!n.lng&&o&&o.res&&(n.lng=this.language||o.usedLng),!1!==n.nest&&(e=this.interpolator.nest(e,(...e)=>ti([r,"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,s=ni(i)?[i]:i;return null!=e&&ti([s,"optionalAccess",e=>e.length])&&!1!==n.applyPostProcessor&&(e=ki.handle(s,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...o,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e,t={}){let n,o,r,i,s;return ni(e)&&(e=[e]),e.forEach(e=>{if(this.isValidLookup(n))return;const a=this.extractFromKey(e,t),l=a.key;o=l;let c=a.namespaces;this.options.fallbackNS&&(c=c.concat(this.options.fallbackNS));const p=void 0!==t.count&&!ni(t.count),d=p&&!t.ordinal&&0===t.count,u=void 0!==t.context&&(ni(t.context)||"number"==typeof t.context)&&""!==t.context,h=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);c.forEach(e=>{this.isValidLookup(n)||(s=e,Ai[`${h[0]}-${e}`]||!ti([this,"access",e=>e.utils,"optionalAccess",e=>e.hasLoadedNamespace])||ti([this,"access",e=>e.utils,"optionalAccess",e=>e.hasLoadedNamespace,"call",e=>e(s)])||(Ai[`${h[0]}-${e}`]=!0,this.logger.warn(`key "${o}" for languages "${h.join(", ")}" won't get resolved as namespace "${s}" 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!!!")),h.forEach(o=>{if(this.isValidLookup(n))return;i=o;const s=[l];if(ti([this,"access",e=>e.i18nFormat,"optionalAccess",e=>e.addLookupKeys]))this.i18nFormat.addLookupKeys(s,l,o,e,t);else{let e;p&&(e=this.pluralResolver.getSuffix(o,t.count,t));const n=`${this.options.pluralSeparator}zero`,r=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(p&&(t.ordinal&&0===e.indexOf(r)&&s.push(l+e.replace(r,this.options.pluralSeparator)),s.push(l+e),d&&s.push(l+n)),u){const o=`${l}${this.options.contextSeparator||"_"}${t.context}`;s.push(o),p&&(t.ordinal&&0===e.indexOf(r)&&s.push(o+e.replace(r,this.options.pluralSeparator)),s.push(o+e),d&&s.push(o+n))}}let a;for(;a=s.pop();)this.isValidLookup(n)||(r=a,n=this.getResource(o,e,a,t))}))})}),{res:n,usedKey:o,exactUsedKey:r,usedLng:i,usedNS:s}}isValidLookup(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}getResource(e,t,n,o={}){return ti([this,"access",e=>e.i18nFormat,"optionalAccess",e=>e.getResource])?this.i18nFormat.getResource(e,t,n,o):this.resourceStore.getResource(e,t,n,o)}getUsedParamsDetails(e={}){const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=e.replace&&!ni(e.replace);let o=n?e.replace:e;if(n&&void 0!==e.count&&(o.count=e.count),this.options.interpolation.defaultVariables&&(o={...this.options.interpolation.defaultVariables,...o}),!n){o={...o};for(const e of t)delete o[e]}return o}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 Li{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Ei.create("languageUtils")}getScriptPartFromCode(e){if(!(e=bi(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=bi(e))||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(ni(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 o=this.getLanguagePartFromCode(e);if(this.isSupportedCode(o))return t=o;t=this.options.supportedLngs.find(e=>e===o?e:e.indexOf("-")<0&&o.indexOf("-")<0?void 0:e.indexOf("-")>0&&o.indexOf("-")<0&&e.substring(0,e.indexOf("-"))===o||0===e.indexOf(o)&&o.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)),ni(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),o=[],r=e=>{e&&(this.isSupportedCode(e)?o.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return ni(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?("languageOnly"!==this.options.load&&r(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&r(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&r(this.getLanguagePartFromCode(e))):ni(e)&&r(this.formatLanguageCode(e)),n.forEach(e=>{o.indexOf(e)<0&&r(this.formatLanguageCode(e))}),o}}const ji={zero:0,one:1,two:2,few:3,many:4,other:5},Ni={select:e=>1===e?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class Ti{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=Ei.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){const n=bi("dev"===e?"en":e),o=t.ordinal?"ordinal":"cardinal",r=JSON.stringify({cleanedCode:n,type:o});if(r in this.pluralRulesCache)return this.pluralRulesCache[r];let i;try{i=new Intl.PluralRules(n,{type:o})}catch(n){if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),Ni;if(!e.match(/-|_/))return Ni;const o=this.languageUtils.getLanguagePartFromCode(e);i=this.getRule(o,t)}return this.pluralRulesCache[r]=i,i}needsPlural(e,t={}){let n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),ti([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)=>ji[e]-ji[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${e}`):[]}getSuffix(e,t,n={}){const o=this.getRule(e,n);return o?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${o.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,n))}}const Mi=(e,t,n,o=".",r=!0)=>{let i=((e,t,n)=>{const o=pi(e,n);return void 0!==o?o:pi(t,n)})(e,t,n);return!i&&r&&ni(n)&&(i=yi(e,n,o),void 0===i&&(i=yi(t,n,o))),i},Pi=e=>e.replace(/\$/g,"$$$$");class Fi{constructor(e={}){this.logger=Ei.create("interpolator"),this.options=e,this.format=ti([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:o,prefix:r,prefixEscaped:i,suffix:s,suffixEscaped:a,formatSeparator:l,unescapeSuffix:c,unescapePrefix:p,nestingPrefix:d,nestingPrefixEscaped:u,nestingSuffix:h,nestingSuffixEscaped:g,nestingOptionsSeparator:f,maxReplaces:m,alwaysFormat:y}=e.interpolation;this.escape=void 0!==t?t:gi,this.escapeValue=void 0===n||n,this.useRawValueToEscape=void 0!==o&&o,this.prefix=r?ui(r):i||"{{",this.suffix=s?ui(s):a||"}}",this.formatSeparator=l||",",this.unescapePrefix=c?"":p||"-",this.unescapeSuffix=this.unescapePrefix?"":c||"",this.nestingPrefix=d?ui(d):u||ui("$t("),this.nestingSuffix=h?ui(h):g||ui(")"),this.nestingOptionsSeparator=f||",",this.maxReplaces=m||1e3,this.alwaysFormat=void 0!==y&&y,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(e,t)=>ti([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,o){let r,i,s;const a=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},l=e=>{if(e.indexOf(this.formatSeparator)<0){const r=Mi(t,a,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(r,void 0,n,{...o,...t,interpolationkey:e}):r}const r=e.split(this.formatSeparator),i=r.shift().trim(),s=r.join(this.formatSeparator).trim();return this.format(Mi(t,a,i,this.options.keySeparator,this.options.ignoreJSONStructure),s,n,{...o,...t,interpolationkey:i})};this.resetRegExp();const c=ti([o,"optionalAccess",e=>e.missingInterpolationHandler])||this.options.missingInterpolationHandler,p=void 0!==ti([o,"optionalAccess",e=>e.interpolation,"optionalAccess",e=>e.skipOnVariables])?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>Pi(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?Pi(this.escape(e)):Pi(e)}].forEach(t=>{for(s=0;r=t.regex.exec(e);){const n=r[1].trim();if(i=l(n),void 0===i)if("function"==typeof c){const t=c(e,r,o);i=ni(t)?t:""}else if(o&&Object.prototype.hasOwnProperty.call(o,n))i="";else{if(p){i=r[0];continue}this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),i=""}else ni(i)||this.useRawValueToEscape||(i=ri(i));const a=t.safeValue(i);if(e=e.replace(r[0],a),p?(t.regex.lastIndex+=i.length,t.regex.lastIndex-=r[0].length):t.regex.lastIndex=0,s++,s>=this.maxReplaces)break}}),e}nest(e,t,n={}){let o,r,i;const s=(e,t)=>{const n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;const o=e.split(new RegExp(`${n}[ ]*{`));let r=`{${o[1]}`;e=o[0],r=this.interpolate(r,i);const s=r.match(/'/g),a=r.match(/"/g);(ei(ti([s,"optionalAccess",e=>e.length]),()=>0)%2==0&&!a||a.length%2!=0)&&(r=r.replace(/'/g,'"'));try{i=JSON.parse(r),t&&(i={...t,...i})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${r}`}return i.defaultValue&&i.defaultValue.indexOf(this.prefix)>-1&&delete i.defaultValue,e};for(;o=this.nestingRegexp.exec(e);){let a=[];i={...n},i=i.replace&&!ni(i.replace)?i.replace:i,i.applyPostProcessor=!1,delete i.defaultValue;const l=/{.*}/.test(o[1])?o[1].lastIndexOf("}")+1:o[1].indexOf(this.formatSeparator);if(-1!==l&&(a=o[1].slice(l).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),o[1]=o[1].slice(0,l)),r=t(s.call(this,o[1].trim(),i),i),r&&o[0]===e&&!ni(r))return r;ni(r)||(r=ri(r)),r||(this.logger.warn(`missed to resolve ${o[1]} for nesting ${e}`),r=""),a.length&&(r=a.reduce((e,t)=>this.format(e,t,n.lng,{...n,interpolationkey:o[1].trim()}),r.trim())),e=e.replace(o[0],r),this.regexp.lastIndex=0}return e}}const Ii=e=>{const t={};return(n,o,r)=>{let i=r;r&&r.interpolationkey&&r.formatParams&&r.formatParams[r.interpolationkey]&&r[r.interpolationkey]&&(i={...i,[r.interpolationkey]:void 0});const s=o+JSON.stringify(i);let a=t[s];return a||(a=e(bi(o),r),t[s]=a),a(n)}},$i=e=>(t,n,o)=>e(bi(n),o)(t);class Bi{constructor(e={}){this.logger=Ei.create("formatter"),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||",";const n=t.cacheInBuiltFormats?Ii:$i;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()]=Ii(t)}format(e,t,n,o={}){const r=t.split(this.formatSeparator);if(r.length>1&&r[0].indexOf("(")>1&&r[0].indexOf(")")<0&&r.find(e=>e.indexOf(")")>-1)){const e=r.findIndex(e=>e.indexOf(")")>-1);r[0]=[r[0],...r.splice(1,e)].join(this.formatSeparator)}return r.reduce((e,t)=>{const{formatName:r,formatOptions:i}=(e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const o=e.split("(");t=o[0].toLowerCase().trim();const r=o[1].substring(0,o[1].length-1);"currency"===t&&r.indexOf(":")<0?n.currency||(n.currency=r.trim()):"relativetime"===t&&r.indexOf(":")<0?n.range||(n.range=r.trim()):r.split(";").forEach(e=>{if(e){const[t,...o]=e.split(":"),r=o.join(":").trim().replace(/^'+|'+$/g,""),i=t.trim();n[i]||(n[i]=r),"false"===r&&(n[i]=!1),"true"===r&&(n[i]=!0),isNaN(r)||(n[i]=parseInt(r,10))}})}return{formatName:t,formatOptions:n}})(t);if(this.formats[r]){let t=e;try{const s=ti([o,"optionalAccess",e=>e.formatParams,"optionalAccess",e=>e[o.interpolationkey]])||{},a=s.locale||s.lng||o.locale||o.lng||n;t=this.formats[r](e,a,{...i,...o,...s})}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${r}`),e},e)}}class Di extends Ci{constructor(e,t,n,o={}){super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=o,this.logger=Ei.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=o.maxParallelReads||10,this.readingCalls=0,this.maxRetries=o.maxRetries>=0?o.maxRetries:5,this.retryTimeout=o.retryTimeout>=1?o.retryTimeout:350,this.state={},this.queue=[],ti([this,"access",e=>e.backend,"optionalAccess",e=>e.init,"optionalCall",e=>e(n,o.backend,o)])}queueLoad(e,t,n,o){const r={},i={},s={},a={};return e.forEach(e=>{let o=!0;t.forEach(t=>{const s=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[s]=2:this.state[s]<0||(1===this.state[s]?void 0===i[s]&&(i[s]=!0):(this.state[s]=1,o=!1,void 0===i[s]&&(i[s]=!0),void 0===r[s]&&(r[s]=!0),void 0===a[t]&&(a[t]=!0)))}),o||(s[e]=!0)}),(Object.keys(r).length||Object.keys(i).length)&&this.queue.push({pending:i,pendingCount:Object.keys(i).length,loaded:{},errors:[],callback:o}),{toLoad:Object.keys(r),pending:Object.keys(i),toLoadLanguages:Object.keys(s),toLoadNamespaces:Object.keys(a)}}loaded(e,t,n){const o=e.split("|"),r=o[0],i=o[1];t&&this.emit("failedLoading",r,i,t),!t&&n&&this.store.addResourceBundle(r,i,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);const s={};this.queue.forEach(n=>{((e,t,n)=>{const{obj:o,k:r}=li(e,t,Object);o[r]=o[r]||[],o[r].push(n)})(n.loaded,[r],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=>{s[e]||(s[e]={});const t=n.loaded[e];t.length&&t.forEach(t=>{void 0===s[e][t]&&(s[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit("loaded",s),this.queue=this.queue.filter(e=>!e.done)}read(e,t,n,o=0,r=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:o,wait:r,callback:i});this.readingCalls++;const s=(s,a)=>{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)}s&&a&&o<this.maxRetries?setTimeout(()=>{this.read.call(this,e,t,n,o+1,2*r,i)},r):i(s,a)},a=this.backend[n].bind(this.backend);if(2!==a.length)return a(e,t,s);try{const n=a(e,t);n&&"function"==typeof n.then?n.then(e=>s(null,e)).catch(s):s(null,n)}catch(e){s(e)}}prepareLoading(e,t,n={},o){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();ni(e)&&(e=this.languageUtils.toResolveHierarchy(e)),ni(t)&&(t=[t]);const r=this.queueLoad(e,t,n,o);if(!r.toLoad.length)return r.pending.length||o(),null;r.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("|"),o=n[0],r=n[1];this.read(o,r,"read",void 0,void 0,(n,i)=>{n&&this.logger.warn(`${t}loading namespace ${r} for language ${o} failed`,n),!n&&i&&this.logger.log(`${t}loaded namespace ${r} for language ${o}`,i),this.loaded(e,n,i)})}saveMissing(e,t,n,o,r,i={},s=()=>{}){if(!ti([this,"access",e=>e.services,"optionalAccess",e=>e.utils,"optionalAccess",e=>e.hasLoadedNamespace])||ti([this,"access",e=>e.services,"optionalAccess",e=>e.utils,"optionalAccess",e=>e.hasLoadedNamespace,"call",e=>e(t)])){if(null!=n&&""!==n){if(ti([this,"access",e=>e.backend,"optionalAccess",e=>e.create])){const a={...i,isUpdate:r},l=this.backend.create.bind(this.backend);if(l.length<6)try{let r;r=5===l.length?l(e,t,n,o,a):l(e,t,n,o),r&&"function"==typeof r.then?r.then(e=>s(null,e)).catch(s):s(null,r)}catch(e){s(e)}else l(e,t,n,o,s,a)}e&&e[0]&&this.store.addResource(e[0],t,n,o)}}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 zi=()=>({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]),ni(e[1])&&(t.defaultValue=e[1]),ni(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}),Ui=e=>(ni(e.ns)&&(e.ns=[e.ns]),ni(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),ni(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),ti([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),Hi=()=>{};class Vi extends Ci{constructor(e={},t){var n;if(super(),this.options=Ui(e),this.services={},this.logger=Ei,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&&(ni(e.ns)?e.defaultNS=e.ns:e.ns.indexOf("translation")<0&&(e.defaultNS=e.ns[0]));const n=zi();var o;this.options={...n,...this.options,...Ui(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||(ti([o=this,"optionalAccess",e=>e.modules,"optionalAccess",e=>e.backend,"optionalAccess",e=>e.name,"optionalAccess",e=>e.indexOf,"call",e=>e("Locize")])>0||ti([o,"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||ti([o,"optionalAccess",e=>e.options,"optionalAccess",e=>e.backend,"optionalAccess",e=>e.backends])&&o.options.backend.backends.some(e=>ti([e,"optionalAccess",e=>e.name,"access",e=>e.indexOf,"call",e=>e("Locize")])>0||ti([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 r=e=>e?"function"==typeof e?new e:e:null;if(!this.options.isClone){let e;this.modules.logger?Ei.init(r(this.modules.logger),this.options):Ei.init(null,this.options),e=this.modules.formatter?this.modules.formatter:Bi;const t=new Li(this.options);this.store=new Si(this.options.resources,this.options);const o=this.services;o.logger=Ei,o.resourceStore=this.store,o.languageUtils=t,o.pluralResolver=new Ti(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||(o.formatter=r(e),o.formatter.init&&o.formatter.init(o,this.options),this.options.interpolation.format=o.formatter.format.bind(o.formatter)),o.interpolator=new Fi(this.options),o.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},o.backendConnector=new Di(r(this.modules.backend),o.resourceStore,o,this.options),o.backendConnector.on("*",(e,...t)=>{this.emit(e,...t)}),this.modules.languageDetector&&(o.languageDetector=r(this.modules.languageDetector),o.languageDetector.init&&o.languageDetector.init(o,this.options.detection,this.options)),this.modules.i18nFormat&&(o.i18nFormat=r(this.modules.i18nFormat),o.i18nFormat.init&&o.i18nFormat.init(this)),this.translator=new Ri(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=Hi),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=oi(),s=()=>{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?s():setTimeout(s,0),i}loadResources(e,t=Hi){let n=t;const o=ni(e)?e:this.language;if("function"==typeof e&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if("cimode"===ti([o,"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(o)t(o);else{this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e))}ti([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 o=oi();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=Hi),this.services.backendConnector.reload(e,t,e=>{o.resolve(),n(e)}),o}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&&ki.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=oi();this.emit("languageChanging",e);const o=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},r=(r,i)=>{i?this.isLanguageChangingTo===e&&(o(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(r,(...e)=>this.t(...e))},i=t=>{e||t||!this.services.languageDetector||(t=[]);const n=ni(t)?t:t&&t[0],i=this.store.hasLanguageSomeTranslations(n)?n:this.services.languageUtils.getBestMatchFromCodes(ni(t)?[t]:t);i&&(this.language||o(i),this.translator.language||this.translator.changeLanguage(i),ti([this,"access",e=>e.services,"access",e=>e.languageDetector,"optionalAccess",e=>e.cacheUserLanguage,"optionalCall",e=>e(i)])),this.loadResources(i,e=>{r(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 o=(e,t,...r)=>{let i;i="object"!=typeof t?this.options.overloadTranslationOptionHandler([e,t].concat(r)):{...t},i.lng=i.lng||o.lng,i.lngs=i.lngs||o.lngs,i.ns=i.ns||o.ns,""!==i.keyPrefix&&(i.keyPrefix=i.keyPrefix||n||o.keyPrefix);const s=this.options.keySeparator||".";let a;return i.keyPrefix&&Array.isArray(e)?a=e.map(e=>("function"==typeof e&&(e=_i(e,{...this.options,...t})),`${i.keyPrefix}${s}${e}`)):("function"==typeof e&&(e=_i(e,{...this.options,...t})),a=i.keyPrefix?`${i.keyPrefix}${s}${e}`:e),this.t(a,i)};return ni(e)?o.lng=e:o.lngs=e,o.ns=t,o.keyPrefix=n,o}t(...e){return ti([this,"access",e=>e.translator,"optionalAccess",e=>e.translate,"call",t=>t(...e)])}exists(...e){return ti([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],o=!!this.options&&this.options.fallbackLng,r=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)||o&&!i(r,e)))}loadNamespaces(e,t){const n=oi();return this.options.ns?(ni(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=oi();ni(e)&&(e=[e]);const o=this.options.preload||[],r=e.filter(e=>o.indexOf(e)<0&&this.services.languageUtils.isSupportedCode(e));return r.length?(this.options.preload=o.concat(r),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(ti([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=ti([this,"access",e=>e.services,"optionalAccess",e=>e.languageUtils])||new Li(zi());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 Vi(e,t);return n.createInstance=Vi.createInstance,n}cloneInstance(e={},t=Hi){const n=e.forkResourceStore;n&&delete e.forkResourceStore;const o={...this.options,...e,isClone:!0},r=new Vi(o);void 0===e.debug&&void 0===e.prefix||(r.logger=r.logger.clone(e));if(["store","services","language"].forEach(e=>{r[e]=this[e]}),r.services={...this.services},r.services.utils={hasLoadedNamespace:r.hasLoadedNamespace.bind(r)},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,o)=>(n[o]={...e[t][o]},n),e[t]),e),{});r.store=new Si(e,o),r.services.resourceStore=r.store}if(e.interpolation){const t={...zi().interpolation,...this.options.interpolation,...e.interpolation},n={...o,interpolation:t};r.services.interpolator=new Fi(n)}return r.translator=new Ri(r.services,o),r.translator.on("*",(e,...t)=>{r.emit(e,...t)}),r.init(o,t),r.translator.options=o,r.translator.backendConnector.services.utils={hasLoadedNamespace:r.hasLoadedNamespace.bind(r)},r}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const qi=Vi.createInstance();qi.createInstance,qi.dir,qi.init,qi.loadResources,qi.reloadResources,qi.use,qi.changeLanguage,qi.getFixedT,qi.t,qi.exists,qi.setDefaultNamespace,qi.hasLoadedNamespace,qi.loadNamespaces,qi.loadLanguages;qi.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 Ki={translator:{...qi,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 qi.t(e,{lng:n,...t})}},languageOptions:[{value:"en_US",label:"English (US)"},{value:"es_ES",label:"Spanish"}]};const{styled:Wi}=n,Yi=t,Gi=e;const{translator:Ji}=Ki,Qi={"-webkit-touchCcallout":"none","-webkit-user-select":"none","-khtml-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","user-select":"none"},Xi=Wi("div")(()=>({width:"100%",cursor:"pointer"})),Zi=Wi("div")(()=>({margin:"0 auto",textAlign:"center",display:"flex"})),es=Wi("div")(()=>({width:"fit-content",minWidth:"140px",alignSelf:"center",verticalAlign:"middle",color:`var(--correct-answer-toggle-label-color, ${Po()})`,fontWeight:"normal",...Qi})),ts=Wi("div")(()=>({position:"absolute",width:"25px","&.enter":{opacity:"0"},"&.enter-active":{opacity:"1",transition:"opacity 0.3s ease-in"},"&.exit":{opacity:"1"},"&.exit-active":{opacity:"0",transition:"opacity 0.3s ease-in"}})),ns=Wi("div")(()=>({width:"25px",marginRight:"5px",display:"flex",alignItems:"center"}));class os extends Yi.Component{static __initStatic(){this.propTypes={onToggle:Gi.func,toggled:Gi.bool,show:Gi.bool,hideMessage:Gi.string,showMessage:Gi.string,className:Gi.string,language:Gi.string}}static __initStatic2(){this.defaultProps={showMessage:"Show correct answer",hideMessage:"Hide correct answer",show:!1,toggled:!1}}constructor(e){super(e),this.state={show:e.show},this.openIconRef=Yi.createRef(),this.closedIconRef=Yi.createRef(),os.defaultProps={...os.defaultProps,showMessage:Ji.t("common:showCorrectAnswer",{lng:e.language}),hideMessage:Ji.t("common:hideCorrectAnswer",{lng:e.language})}}onClick(){this.props.onToggle(!this.props.toggled)}onTouch(e){e.preventDefault(),this.props.onToggle(!this.props.toggled)}UNSAFE_componentWillReceiveProps(e){this.setState({show:e.show}),e.language!==function(e){let t,n=e[0],o=1;for(;o<e.length;){const r=e[o],i=e[o+1];if(o+=2,("optionalAccess"===r||"optionalCall"===r)&&null==n)return;"access"===r||"optionalAccess"===r?(t=n,n=i(n)):"call"!==r&&"optionalCall"!==r||(n=i((...e)=>n.call(t,...e)),t=void 0)}return n}([this,"access",e=>e.props,"optionalAccess",e=>e.language])&&(os.defaultProps={...os.defaultProps,showMessage:Ji.t("common:showCorrectAnswer",{lng:e.language}),hideMessage:Ji.t("common:hideCorrectAnswer",{lng:e.language})})}render(){const{className:e,toggled:t,hideMessage:n,showMessage:o}=this.props;return Yi.createElement(Xi,{className:e},Yi.createElement(Zr,{show:this.state.show},Yi.createElement(Zi,{onClick:this.onClick.bind(this),onTouchEnd:this.onTouch.bind(this)},Yi.createElement(ns,null,Yi.createElement(mo,{nodeRef:this.openIconRef,timeout:400,in:t,exit:!t,classNames:{enter:"enter",enterActive:"enter-active",exit:"exit",exitActive:"exit-active"}},Yi.createElement(ts,{ref:this.openIconRef},Yi.createElement(un,{open:t,key:"correct-open"}))),Yi.createElement(mo,{nodeRef:this.closedIconRef,timeout:5e3,in:!t,exit:t,classNames:{enter:"enter",enterActive:"enter-active",exit:"exit",exitActive:"exit-active"}},Yi.createElement(ts,{ref:this.closedIconRef},Yi.createElement(un,{open:t,key:"correct-closed"})))),Yi.createElement(qr,{false:!0},Yi.createElement(es,{"aria-hidden":!this.state.show},t?n:o)))))}}os.__initStatic(),os.__initStatic2();const rs=t,{styled:is}=n,{Box:ss}=i,as=e,ls=is(ss)({width:"33px",height:"33px","& svg":{position:"absolute",display:"inline-block",width:"33px",height:"33px",verticalAlign:"middle","& hide":{display:"none"}}}),cs=is("svg")({"& .incorrect-fill":{fill:`var(--feedback-incorrect-bg-color, ${$o()})`},"& .correct-fill":{fill:`var(--feedback-correct-bg-color, ${Io()})`}}),ps=is("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 ds extends rs.Component{static __initStatic(){this.propTypes={correctness:as.string}}constructor(e){super(e),ds.prototype.__init.call(this),ds.prototype.__init2.call(this),this.nodeRef=rs.createRef()}__init(){this.getIncorrectIcon=()=>rs.createElement(cs,{key:"1",preserveAspectRatio:"xMinYMin meet",x:"0px",y:"0px",viewBox:"0 0 44 40",style:{enableBackground:"new 0 0 44 40"}},rs.createElement("g",null,rs.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"}),rs.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"})))}__init2(){this.getCorrectIcon=()=>rs.createElement(cs,{key:"2",preserveAspectRatio:"xMinYMin meet",version:"1.1",x:"0px",y:"0px",viewBox:"0 0 44 40",style:{enableBackground:"new 0 0 44 40"}},rs.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"}))}render(){const{correctness:e}=this.props,t=(()=>"incorrect"===e?this.getIncorrectIcon():"correct"===e?this.getCorrectIcon():null)();return rs.createElement(ls,null,rs.createElement(_o,null,e&&rs.createElement(mo,{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}},rs.createElement(ps,{ref:this.nodeRef},t))))}}ds.__initStatic();const{FormControlLabel:us}=i,{Box:hs}=i,{Checkbox:gs}=i,{Radio:fs}=i,ms=t,ys=e,{styled:bs}=n,vs=l,xs="multiple-choice-component",Es=bs(hs)({display:"flex",alignItems:"center",backgroundColor:Bo()}),Cs=bs(hs)({display:"flex",alignItems:"center",backgroundColor:Bo(),flex:1,"& .MuiFormControlLabel-root":{marginLeft:"-14px"},"& label":{color:Po(),"& > span":{fontSize:"inherit"},"& > .MuiButtonBase-root":{padding:"12px"}}}),Ss=bs("span")(({theme:e})=>({display:"flex",alignItems:"center","& > span":{marginLeft:`-${e.spacing(1)}`}})),ks=bs("span")({position:"absolute",left:"-10000px",top:"auto",width:"1px",height:"1px",overflow:"hidden"}),ws=bs(us)({"& .MuiFormControlLabel-label":{color:`${Po()} !important`,backgroundColor:Bo(),letterSpacing:"normal"},"&.Mui-disabled *":{cursor:"not-allowed !important"}}),_s=(e,t)=>({[`&.${xs}`]:{color:`var(--choice-input-${e}, ${t}) !important`}}),As=e=>{const t=t=>e?`${e}-${t}`:t;return{[t("root")]:{..._s("color",Po()),..."correct"===e?_s("correct-color",Po()):{},..."incorrect"===e?_s("incorrect-color",$o()):{}},[t("checked")]:{..."correct"===e?_s("correct-selected-color",Io()):{},..."incorrect"===e?_s("incorrect-checked",$o()):{},...e?{}:_s("selected-color",To("primary",No.PRIMARY))},[t("disabled")]:{..._s("disabled-color",Po()),..."correct"===e?_s("correct-disabled-color",Fo()):{},..."incorrect"===e?_s("incorrect-disabled-color",Fo()):{},opacity:.6,cursor:"not-allowed !important",pointerEvents:"initial !important"},focusVisibleUnchecked:{outline:`2px solid ${zo()}`,backgroundColor:"transparent"},focusVisibleChecked:{outline:`2px solid ${zo()}`,backgroundColor:"transparent"}}},Os=bs(gs,{shouldForwardProp:e=>"correctness"!==e})(({correctness:e})=>{const t=As(e),n=t=>e?`${e}-${t}`:t;return{[`&.${xs}`]:{...t[n("root")],"&.Mui-checked":t[n("checked")],"&.Mui-disabled":e?{}:t[n("disabled")],"&:hover:not(.Mui-disabled) svg":{boxShadow:`0px 0px 0px 2px ${zo()}`,borderRadius:"4px"}},"&.Mui-focusVisible":{"&:not(.Mui-checked)":t.focusVisibleUnchecked,"&.Mui-checked":t.focusVisibleChecked}}}),Rs=e=>{const{correctness:t,checked:n,onChange:o,disabled:r,value:i,id:s,onKeyDown:a,inputRef:l}=e,c={checked:n,onChange:o,disabled:r,value:i};return ms.createElement(Os,{id:s,slotProps:{input:{ref:l}},onKeyDown:a,disableRipple:!0,...c,correctness:t,className:xs})},Ls=bs(fs,{shouldForwardProp:e=>"correctness"!==e})(({correctness:e})=>{const t=As(e),n=t=>e?`${e}-${t}`:t;return{[`&.${xs}`]:{...t[n("root")],"&.Mui-checked":t[n("checked")],"&.Mui-disabled":e?{}:t[n("disabled")],"&.Mui-focusVisible:not(.Mui-checked)":t.focusVisibleUnchecked,"&.Mui-focusVisible.Mui-checked":t.focusVisibleChecked,"&:hover:not(.Mui-disabled) svg":{boxShadow:`0px 0px 0px 2px ${zo()}`,borderRadius:"50%"}},"&.Mui-focusVisible":{"& input":{outline:0},"& .MuiTouchRipple-root":{display:"none"}}}}),js=e=>{const{correctness:t,checked:n,onChange:o,disabled:r,value:i,id:s,tagName:a,inputRef:l}=e,c={checked:n,onChange:o,disabled:r,value:i};return ms.createElement(Ls,{id:s,slotProps:{input:{ref:l}},disableRipple:!0,...c,correctness:t,className:xs,name:a})};class Ns extends ms.Component{static __initStatic(){this.propTypes={choiceMode:ys.oneOf(["radio","checkbox"]),displayKey:ys.string,checked:ys.bool.isRequired,correctness:ys.string,disabled:ys.bool.isRequired,feedback:ys.string,label:ys.string.isRequired,rationale:ys.string,onChange:ys.func.isRequired,value:ys.string.isRequired,className:ys.string,tagName:ys.string,hideTick:ys.bool,isEvaluateMode:ys.bool,choicesLayout:ys.oneOf(["vertical","grid","horizontal"]),isSelectionButtonBelow:ys.bool}}static __initStatic2(){this.defaultProps={rationale:null,checked:!1,isEvaluateMode:!1}}constructor(e){super(e),Ns.prototype.__init.call(this),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()}__init(){this.handleKeyDown=e=>{const{choiceMode:t}=this.props;if("checkbox"!==t)return;const n="ArrowDown"===e.key,o="ArrowUp"===e.key;if(!n&&!o)return;e.preventDefault();const r=document.getElementById(this.choiceId);if(!r)return;const i=r.closest("fieldset");if(!i)return;const s=Array.from(i.querySelectorAll('input[type="checkbox"]')),a=s.findIndex(e=>e===r);if(-1===a)return;const l=s[n?a+1:a-1];l&&l.focus()}}render(){const{choiceMode:e,disabled:t,displayKey:n,feedback:o,label:r,correctness:i,className:s,rationale:a,hideTick:l,isEvaluateMode:c,choicesLayout:p,value:d,checked:u,tagName:h,isSelectionButtonBelow:g}=this.props,f="checkbox"===e?Rs:js,m="checkbox"===e?"checkbox":"radio-button",y={..."horizontal"===p&&{[`& .${xs}`]:{padding:"8px",margin:"4px 0 4px 4px"}},...g&&"grid"!==p&&{"& > label":{alignItems:"flex-start"}},...g&&"grid"===p&&{justifyContent:"center","& > label":{alignItems:"center"}}},b="string"==typeof r&&(r.includes("<math")||r.includes("\\(")||r.includes("\\[")||r.includes("<img")||r.includes("data-latex")||r.includes("data-raw")||r.includes("<mjx-container")),v=n?ms.createElement(ks,{id:this.descId},b?`Pick the answer below, ${n}`:n):null,x=ms.createElement(ms.Fragment,null,n&&!g?ms.createElement(Es,{component:"span"},ms.createElement("span",{"aria-hidden":"true"},n,"."," "),ms.createElement(Ur,{className:"prompt-label",prompt:r,tagName:"span"})):ms.createElement(Ur,{className:"prompt-label",prompt:r,tagName:"span"})),E={disabled:t,checked:u,correctness:i,tagName:h,value:d,id:this.choiceId,onChange:this.onToggleChoice,onKeyDown:this.handleKeyDown,...v?{"aria-describedby":this.descId}:{}},C=g?ms.createElement(Ss,null,v,ms.createElement(f,{...E,style:{padding:0}}),ms.createElement("span",{"aria-hidden":"true"},n?`${n}.`:"")):ms.createElement(ms.Fragment,null,v,ms.createElement(f,{...E}));return ms.createElement("div",{className:vs(s,"corespring-"+m,"choice-input")},ms.createElement(Es,null,!l&&c&&ms.createElement(ds,{correctness:i}),ms.createElement(Cs,{className:"checkbox-holder",sx:y},ms.createElement(ws,{label:x,value:d,htmlFor:this.choiceId,labelPlacement:g?"top":void 0,control:C}))),a&&ms.createElement(Ur,{className:"rationale",defaultClassName:"rationale",prompt:a}),ms.createElement(Yo,{feedback:o,correctness:i}))}}Ns.__initStatic(),Ns.__initStatic2();const Ts=t,Ms=e,{styled:Ps}=n,{Box:Fs}=i,Is=Ps(Fs,{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 ${To("border",No.BORDER)}`,...n&&{paddingRight:e.spacing(2.5),"& label":{marginRight:e.spacing(1)}}}));class $s extends Ts.Component{constructor(...e){super(...e),$s.prototype.__init.call(this),$s.prototype.__init2.call(this),$s.prototype.__init3.call(this),$s.prototype.__init4.call(this)}static __initStatic(){this.propTypes={}}__init(){this.state={isHovered:!1}}__init2(){this.handleMouseEnter=()=>{const{disabled:e,checked:t}=this.props;e||t||this.setState({isHovered:!0})}}__init3(){this.handleMouseLeave=()=>{this.setState({isHovered:!1})}}__init4(){this.onChange=e=>{const{disabled:t,onChoiceChanged:n}=this.props;t||n(e)}}render(){const{choice:e,index:t,choicesLength:n,showCorrect:o,isEvaluateMode:r,choiceMode:i,disabled:s,checked:a,correctness:l,displayKey:c,choicesLayout:p,gridColumns:d,isSelectionButtonBelow:u,selectedAnswerBackgroundColor:h,selectedAnswerStrokeColor:g,selectedAnswerStrokeWidth:f,hoverAnswerBackgroundColor:m,hoverAnswerStrokeColor:y,hoverAnswerStrokeWidth:b,tagName:v}=this.props,{isHovered:x}=this.state,E="choice"+(t===n-1?" last":""),C=!r||o?"":e.feedback,S={...e,checked:a,choiceMode:i,disabled:s,feedback:C,correctness:l,displayKey:c,index:t,choicesLayout:p,gridColumns:d,onChange:this.onChange,isEvaluateMode:r,isSelectionButtonBelow:u,selectedAnswerStrokeColor:g,selectedAnswerStrokeWidth:f,tagName:v},k=g&&"initial"!==g,w=y&&"initial"!==y;let _="transparent",A="2px",O="initial";(k||w)&&(a&&k?(_=g,A=f):x&&!s&&w&&(_=y,A=b)),a&&h&&"initial"!==h?O=h:x&&!s&&m&&"initial"!==m&&(O=m);const R=k||w,L=R?{border:`${(e=>{if(!e)return"2px";const t=String(e).trim();return/^\d+(\.\d+)?$/.test(t)?`${t}px`:t})(A)} solid ${_}`,borderRadius:"8px"}:{},j=t===n-1||"vertical"!==p||R,N="horizontal"===p,T="initial"!==O?O:"initial";return Ts.createElement("div",{className:E,key:t,style:{backgroundColor:T,...L},onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave},Ts.createElement(Is,{component:"div",noBorder:j,horizontalLayout:N},Ts.createElement(Ns,{...S})))}}$s.__initStatic(),$s.propTypes={choiceMode:Ms.oneOf(["radio","checkbox"]),choice:Ms.object,disabled:Ms.bool.isRequired,onChoiceChanged:Ms.func,index:Ms.number,choicesLength:Ms.number,showCorrect:Ms.bool,isEvaluateMode:Ms.bool,checked:Ms.bool,correctness:Ms.string,displayKey:Ms.string,choicesLayout:Ms.oneOf(["vertical","grid","horizontal"]),gridColumns:Ms.string,selectedAnswerBackgroundColor:Ms.string,selectedAnswerStrokeColor:Ms.string,selectedAnswerStrokeWidth:Ms.string,hoverAnswerBackgroundColor:Ms.string,hoverAnswerStrokeColor:Ms.string,hoverAnswerStrokeWidth:Ms.string,tagName:Ms.string,isSelectionButtonBelow:Ms.bool};const Bs=t,Ds=e,zs=l,{styled:Us}=n,{Box:Hs}=i,{translator:Vs}=Ki,qs=Us(Hs)({color:Po(),backgroundColor:Bo(),"& *":{"-webkit-font-smoothing":"antialiased"},position:"relative","& legend":{border:"none !important"}}),Ks=Us("h2")(({theme:e})=>({display:"block",fontSize:"inherit",margin:"0",fontWeight:"normal",paddingBottom:e.spacing(2)})),Ws=Us(Hs)(({theme:e})=>({marginBottom:e.spacing(2)})),Ys=Us(Hs)({display:"flex",flexDirection:"row",flexWrap:"wrap"}),Gs=Us(Hs)({display:"grid"}),Js=Us("fieldset")({border:"0px",padding:"0.01em 0 0 0",margin:"0px",minWidth:"0px"}),Qs=Us("h3")({position:"absolute",left:"-10000px",top:"auto",width:"1px",height:"1px",overflow:"hidden"}),Xs=Us("div")(({theme:e})=>({fontSize:e.typography.fontSize-2,color:e.palette.error.main,paddingTop:e.spacing(1)}));class Zs extends Bs.Component{static __initStatic(){this.propTypes={className:Ds.string,mode:Ds.oneOf(["gather","view","evaluate"]),choiceMode:Ds.oneOf(["radio","checkbox"]),keyMode:Ds.oneOf(["numbers","letters","none"]),choices:Ds.array,partLabel:Ds.string,prompt:Ds.string,teacherInstructions:Ds.string,session:Ds.object,disabled:Ds.bool,onChoiceChanged:Ds.func,responseCorrect:Ds.bool,correctResponse:Ds.array,choicesLayout:Ds.oneOf(["vertical","grid","horizontal"]),gridColumns:Ds.string,alwaysShowCorrect:Ds.bool,animationsDisabled:Ds.bool,language:Ds.string,selectedAnswerBackgroundColor:Ds.string,selectedAnswerStrokeColor:Ds.string,selectedAnswerStrokeWidth:Ds.string,hoverAnswerBackgroundColor:Ds.string,hoverAnswerStrokeColor:Ds.string,hoverAnswerStrokeWidth:Ds.string,onShowCorrectToggle:Ds.func,isSelectionButtonBelow:Ds.bool,minSelections:Ds.number,maxSelections:Ds.number,autoplayAudioEnabled:Ds.bool,customAudioButton:{playImage:Ds.string,pauseImage:Ds.string},options:Ds.object,baseHeadingLevel:Ds.number,includeSrHeading:Ds.bool}}constructor(e){super(e),Zs.prototype.__init.call(this),Zs.prototype.__init2.call(this),Zs.prototype.__init3.call(this),this.state={showCorrect:this.props.options&&this.props.alwaysShowCorrect||!1,maxSelectionsErrorState:!1},this.onToggle=this.onToggle.bind(this),this.groupName=`mc-group-${Math.random().toString(36).slice(2,10)}`}isSelected(e){const t=this.props.session&&this.props.session.value;return t&&t.indexOf&&t.indexOf(e)>=0}__init(){this.handleChange=e=>{const{value:t,checked:n}=e.target,{choiceMode:o,maxSelections:r,onChoiceChanged:i,session:s}=this.props;"radio"!==o&&s.value&&((e,t)=>null!=t&&e>=t)(s.value.length,r)&&(this.setState({maxSelectionsErrorState:n}),n)||i({value:t,selected:n,selector:"Mouse"})}}__init2(){this.onToggle=()=>{"evaluate"===this.props.mode&&this.setState({showCorrect:!this.state.showCorrect},()=>{this.props.onShowCorrectToggle&&this.props.onShowCorrectToggle()})}}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():""}__init3(){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}}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:o,partLabel:r}=this.props;if(!(!r&&!1!==n)||"gather"!==e)return null;const i=o?Math.min(6,o):2,s=Qs.withComponent(`h${i}`),a="radio"===t?"Multiple Choice Question":"Multiple Select Question";return Bs.createElement(s,null,a)}render(){const{mode:e,disabled:t,className:n,choices:o=[],choiceMode:r,gridColumns:i,partLabel:s,prompt:a,responseCorrect:l,teacherInstructions:c,alwaysShowCorrect:p,animationsDisabled:d,language:u,isSelectionButtonBelow:h,minSelections:g,maxSelections:f,autoplayAudioEnabled:m,session:y,customAudioButton:b,options:v,baseHeadingLevel:x}=this.props,{showCorrect:E,maxSelectionsErrorState:C}=this.state,S="evaluate"===e,k=S&&!l,w=i>1?{gridTemplateColumns:`repeat(${i}, 1fr)`}:void 0,_=y.value&&y.value.length||0,A=(()=>{if(!x)return;let e=1;return s&&(e+=1),Math.min(6,x+e)})(),O=Bs.createElement(Ur,{tagName:"div",className:"prompt",defaultClassName:"teacher-instructions",prompt:c}),R="grid"===this.props.choicesLayout?Gs:"horizontal"===this.props.choicesLayout?Ys:Hs;return Bs.createElement(qs,{id:"main-container",className:zs(n,"multiple-choice")},s&&Bs.createElement(Ks,{as:x?`h${Math.min(6,x+1)}`:"h2"},s),this.renderHeading(),c&&Bs.createElement(Ws,null,d?O:Bs.createElement(dr,{labels:{hidden:"Show Teacher Instructions",visible:"Hide Teacher Instructions"}},O)),Bs.createElement(Js,{role:"radio"===r?"radiogroup":"group"},Bs.createElement(Ur,{className:"prompt",defaultClassName:"prompt",prompt:(L=a,L&&A?function(e="",t=2){if(!e)return e;const n=(new DOMParser).parseFromString(e,"text/html");return n.body.querySelectorAll("[data-heading]").forEach(e=>{const o=e.getAttribute("data-heading")||"",r=parseInt(o.replace("heading",""),10);if(!Number.isFinite(r))return;const i=Math.min(6,Math.max(1,t+r-1)),s=n.createElement(`h${i}`);s.setAttribute("data-heading",o),Array.from(e.attributes).forEach(e=>{"data-heading"!==e.name&&s.setAttribute(e.name,e.value)}),s.innerHTML=e.innerHTML,e.replaceWith(s)}),n.body.innerHTML}(L,A):L),tagName:"legend",autoplayAudioEnabled:m,customAudioButton:b}),!(v&&p)&&Bs.createElement(os,{show:k,toggled:E,onToggle:this.onToggle.bind(this),language:u}),Bs.createElement(R,{style:w},o.map((e,n)=>Bs.createElement($s,{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:o.length,showCorrect:E,isEvaluateMode:S,choiceMode:r,disabled:t,tagName:this.groupName,onChoiceChanged:this.handleChange,hideTick:e.hideTick,checked:this.getChecked(e),correctness:S?this.getCorrectness(e):void 0,displayKey:this.indexToSymbol(n),isSelectionButtonBelow:h})))),"checkbox"===r&&_<g&&Bs.createElement(Xs,null,g&&f?g===f?Vs.t("translation:multipleChoice:minmaxSelections_equal",{lng:u,minSelections:g}):Vs.t("translation:multipleChoice:minmaxSelections_range",{lng:u,minSelections:g,maxSelections:f}):g?Vs.t("translation:multipleChoice:minSelections",{lng:u,minSelections:g}):""),"checkbox"===r&&C&&Bs.createElement(Xs,null,Vs.t("translation:multipleChoice:maxSelections_"+(1===f?"one":"other"),{lng:u,maxSelections:f})));var L}}Zs.__initStatic(),Zs.defaultProps={session:{value:[]}};const ea=t,ta=e;class na extends ea.Component{static __initStatic(){this.propTypes={model:ta.object,session:ta.object,options:ta.object,onChoiceChanged:ta.func,onShowCorrectToggle:ta.func,extraCSSRules:ta.shape({names:ta.arrayOf(ta.string),rules:ta.string}),baseHeadingLevel:ta.number,includeSrHeading:ta.bool}}static __initStatic2(){this.defaultProps={model:{},session:{}}}render(){const{model:e,onChoiceChanged:t,session:n,onShowCorrectToggle:o,options:r,baseHeadingLevel:i,includeSrHeading:s}=this.props,{extraCSSRules:a,fontSizeFactor:l}=e;return ea.createElement(Ar,{extraCSSRules:a,fontSizeFactor:l,classes:{}},ea.createElement(Zs,{...e,options:r,session:n,onChoiceChanged:t,onShowCorrectToggle:o,baseHeadingLevel:i,includeSrHeading:s}))}}na.__initStatic(),na.__initStatic2();const oa=t,{createRoot:ra}=c,ia=s,{renderMath:sa}=p,aa=ia("pie-element:multiple-choice:print"),la=(e,t)=>{const n="instructor"===t.role;e.prompt=!1!==e.promptEnabled?e.prompt:void 0,e.teacherInstructions=n&&!1!==e.teacherInstructionsEnabled?e.teacherInstructions:void 0,e.showTeacherInstructions=n,e.alwaysShowCorrect=n,e.mode=n?"evaluate":e.mode,e.disabled=!0,e.animationsDisabled=!0,e.lockChoiceOrder=!0,e.choicesLayout=e.choicesLayout||"vertical";const o=Pt(e.choices,5);return e.choices=o.map(t=>(t.rationale=n&&!1!==e.rationaleEnabled?t.rationale:void 0,t.hideTick=n,t.feedback=void 0,t)),e.keyMode=e.choicePrefix||"letters",e};class ca extends HTMLElement{constructor(){super(),this._options=null,this._model=null,this._session=[],this._root=null,this._rerender=Bt(()=>{if(this._model&&this._session){const e=la(this._model,this._options),t=this._options&&oa.createElement(na,{model:e,session:{},options:this._options});this._root||(this._root=ra(this)),this._root.render(t),requestAnimationFrame(()=>{requestAnimationFrame(()=>{aa("render complete - render math"),sa(this)})})}else aa("skip")},50,{leading:!1,trailing:!0})}set options(e){this._options=e}set model(e){this._model=e,this._rerender()}connectedCallback(){}disconnectedCallback(){this._root&&this._root.unmount()}}export{ca as default};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pie-element/multiple-choice",
3
3
  "repository": "pie-framework/pie-elements",
4
- "version": "13.4.3",
4
+ "version": "13.4.4",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -11,9 +11,9 @@
11
11
  "@mui/icons-material": "^7.3.4",
12
12
  "@mui/material": "^7.3.4",
13
13
  "@pie-framework/pie-player-events": "^0.1.0",
14
- "@pie-lib/correct-answer-toggle": "4.0.8",
14
+ "@pie-lib/correct-answer-toggle": "4.0.9",
15
15
  "@pie-lib/math-rendering": "5.1.0",
16
- "@pie-lib/render-ui": "7.0.2",
16
+ "@pie-lib/render-ui": "7.0.3",
17
17
  "@pie-lib/translator": "4.0.2",
18
18
  "classnames": "^2.2.6",
19
19
  "debug": "^4.1.1",
@@ -23,7 +23,7 @@
23
23
  "react-dom": "18.3.1",
24
24
  "react-transition-group": "^4.4.5"
25
25
  },
26
- "gitHead": "bd790474fe017b02ae4eaa21d4d18959fa1a0bb3",
26
+ "gitHead": "cff9952eb98a94ae5b7357ac8f7069be05cacd10",
27
27
  "scripts": {
28
28
  "postpublish": "../../scripts/postpublish"
29
29
  },