@pie-element/rubric 8.2.2 → 8.2.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 +8 -0
- package/configure/CHANGELOG.md +8 -0
- package/configure/package.json +5 -5
- package/module/element.js +1 -1
- package/module/index.html +1 -1
- package/module/manifest.json +1 -1
- package/module/print.html +1 -1
- package/module/print.js +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
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
|
+
## [8.2.4](https://github.com/pie-framework/pie-elements/compare/@pie-element/rubric@8.2.3...@pie-element/rubric@8.2.4) (2026-09-22)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @pie-element/rubric
|
|
9
|
+
|
|
10
|
+
## [8.2.3](https://github.com/pie-framework/pie-elements/compare/@pie-element/rubric@8.2.2...@pie-element/rubric@8.2.3) (2026-09-17)
|
|
11
|
+
|
|
12
|
+
**Note:** Version bump only for package @pie-element/rubric
|
|
13
|
+
|
|
6
14
|
## [8.2.2](https://github.com/pie-framework/pie-elements/compare/@pie-element/rubric@8.2.1...@pie-element/rubric@8.2.2) (2026-09-04)
|
|
7
15
|
|
|
8
16
|
### Bug Fixes
|
package/configure/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
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
|
+
## [7.2.4](https://github.com/pie-framework/pie-elements/compare/@pie-element/rubric-configure@7.2.3...@pie-element/rubric-configure@7.2.4) (2026-09-22)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @pie-element/rubric-configure
|
|
9
|
+
|
|
10
|
+
## [7.2.3](https://github.com/pie-framework/pie-elements/compare/@pie-element/rubric-configure@7.2.2...@pie-element/rubric-configure@7.2.3) (2026-09-17)
|
|
11
|
+
|
|
12
|
+
**Note:** Version bump only for package @pie-element/rubric-configure
|
|
13
|
+
|
|
6
14
|
## [7.2.2](https://github.com/pie-framework/pie-elements/compare/@pie-element/rubric-configure@7.2.1...@pie-element/rubric-configure@7.2.2) (2026-09-04)
|
|
7
15
|
|
|
8
16
|
### Bug Fixes
|
package/configure/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-element/rubric-configure",
|
|
3
3
|
"private": true,
|
|
4
|
-
"version": "7.2.
|
|
4
|
+
"version": "7.2.4",
|
|
5
5
|
"description": "Rubric authoring view",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"author": "Pie Framework Authors",
|
|
@@ -11,10 +11,10 @@
|
|
|
11
11
|
"@mui/icons-material": "^7.3.4",
|
|
12
12
|
"@mui/material": "^7.3.4",
|
|
13
13
|
"@pie-framework/pie-configure-events": "^1.3.0",
|
|
14
|
-
"@pie-lib/config-ui": "13.0.
|
|
15
|
-
"@pie-lib/editable-html-tip-tap": "2.1.
|
|
16
|
-
"@pie-lib/render-ui": "7.0.
|
|
17
|
-
"@pie-lib/rubric": "2.0.
|
|
14
|
+
"@pie-lib/config-ui": "13.0.21",
|
|
15
|
+
"@pie-lib/editable-html-tip-tap": "2.1.19",
|
|
16
|
+
"@pie-lib/render-ui": "7.0.3",
|
|
17
|
+
"@pie-lib/rubric": "2.0.21",
|
|
18
18
|
"debug": "^4.1.1",
|
|
19
19
|
"react": "18.3.1",
|
|
20
20
|
"react-dom": "18.3.1"
|
package/module/element.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 i,_dll_mui__material_colors as r,_dll_mui__material as s,_dll_debug as o,_dll_mui__material_collapse as l,_dll_react_dom_client as a}from"../../../@pie-lib/shared-module@6.0.0/module/index.js";import{_dll_pie_lib__math_rendering as c}from"../../../@pie-lib/math-rendering-module@6.0.0/module/index.js";const p=t,d=e,h=e=>"string"==typeof e?e:"number"==typeof e?`${e}px`:"30px",u=({size:e,children:t})=>{const n={height:e=h(e),width:e,display:"inline-block",position:"relative"};return p.createElement("div",{style:n},t)};u.propTypes={size:d.number,children:d.oneOfType([d.arrayOf(d.node),d.node]).isRequired};const m=t,f=e,E=({size:e,children:t,sx:n})=>m.createElement(u,{size:e},m.createElement("svg",{preserveAspectRatio:"xMinYMin meet",viewBox:"0 0 44 40",style:{enableBackground:"new 0 0 44 40",...n}},t));E.propTypes={size:f.oneOfType([f.string,f.number]),children:f.oneOfType([f.arrayOf(f.node),f.node]).isRequired,sx:f.object},f.string.isRequired;const g=({fill:e})=>m.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});g.propTypes={fill:f.string.isRequired};const y=({fill:e})=>m.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});y.propTypes={fill:f.string.isRequired};const b=({fill:e})=>m.createElement("circle",{transform:"translate(-3,0)",cx:"23",cy:"20.4",r:"16",fill:e});b.propTypes={fill:f.string.isRequired};const x=({fill:e})=>m.createElement("rect",{x:"3.6",y:"4.1",width:"32",height:"32",fill:e});x.propTypes={fill:f.string.isRequired};const v=e,C=t;var _=(e,t)=>{class n extends C.Component{static __initStatic(){this.propTypes={iconSet:v.oneOf(["emoji","check"]),shape:v.oneOf(["round","square"]),category:v.oneOf(["feedback",void 0]),open:v.bool,size:v.oneOfType([v.number,v.string]),fg:v.string,bg:v.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:i,category:r,open:s,size:o,fg:l,bg:a}=this.props,c="check"===n?C.createElement(e,{fill:l}):C.createElement(t,{fill:l}),p="check"===n?C.createElement(e,{fill:a}):C.createElement(t,{fill:a});return s?C.createElement(E,{size:o},p):C.createElement(E,{size:o},"feedback"===r?"round"===i?C.createElement(y,{fill:a}):C.createElement(g,{fill:a}):"round"===i?C.createElement(b,{fill:a}):C.createElement(x,{fill:a}),c)}}return n.__initStatic(),n.__initStatic2(),n};const R=e,k=t,O=({fill:e})=>k.createElement("g",{transform:"translate(1, 0)"},k.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}),k.createElement("rect",{x:"21.1",y:"13.1",width:"3.7",height:"4.7",fill:e}),k.createElement("rect",{x:"12.7",y:"13.1",width:"3.7",height:"4.7",fill:e}));O.propTypes={fill:R.string.isRequired};const S=({fill:e,x:t=0,y:n=0})=>k.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});S.propTypes={fill:R.string.isRequired,x:R.number,y:R.number};const T=_(S,O);T.propTypes={iconSet:R.oneOf(["emoji","check"]),shape:R.oneOf(["round","square"]),category:R.oneOf(["feedback",void 0]),open:R.bool,fg:R.string,bg:R.string,size:R.oneOfType([R.string,R.number])},T.defaultProps={iconSet:"check",shape:"round",category:void 0,open:!1,fg:"#4aaf46",bg:"#f8ffe2",size:30};const A=e,{styled:N}=n;A.string.isRequired,A.string.isRequired,A.string.isRequired,A.string.isRequired,A.string.isRequired,N("div")(({size:e})=>({width:e||"25px",height:e||"25px"})),A.bool,A.string;const M=e,D=t,B=({fill:e})=>D.createElement("g",{transform:"translate(0.5, 0.5)"},D.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}),D.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}));B.propTypes={fill:M.string.isRequired};const F=({fill:e})=>D.createElement("g",{transform:"translate(1,0)"},D.createElement("rect",{x:"21",y:"12.9",width:"3.7",height:"4.7",fill:e}),D.createElement("rect",{x:"12.7",y:"12.9",width:"3.7",height:"4.7",fill:e}),D.createElement("rect",{x:"12.2",y:"22.5",width:"13",height:"3.3",fill:e}));F.propTypes={fill:M.string.isRequired};const L=_(B,F);L.propTypes={iconSet:M.oneOf(["emoji","check"]),shape:M.oneOf(["round","square"]),category:M.oneOf(["feedback",void 0]),open:M.bool,fg:M.string,bg:M.string,size:M.oneOfType([M.string,M.number])},L.defaultProps={iconSet:"check",shape:"round",category:void 0,open:!1,fg:"#fcb733",bg:"#fbf2e3",size:30};const I=e,w=t,z=()=>{const e={fill:"none",stroke:"#BCE2FF",strokeWidth:2,strokeMiterlimit:10};return w.createElement("g",null,w.createElement("line",{style:e,x1:"-98",y1:"142",x2:"-114.6",y2:"142"}),w.createElement("line",{style:e,x1:"-98",y1:"146.3",x2:"-114.6",y2:"146.3"}),w.createElement("line",{style:e,x1:"-104",y1:"150.7",x2:"-114.6",y2:"150.7"}))},P=({children:e,size:t})=>w.createElement(u,{size:t},w.createElement("svg",{version:"1.1",viewBox:"-128 129 31 31",style:{enableBackground:"new -128 129 31 31"}},e));P.propTypes={children:I.oneOfType([I.arrayOf(I.node),I.node]).isRequired,size:I.number};const j=()=>w.createElement("g",null,w.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"}),w.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 "}),w.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"}),w.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 "}),w.createElement("rect",{x:"-125.5",y:"134",style:{fill:"#7FABC6"},width:"4.1",height:"4.1"}),w.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 "})),q=()=>w.createElement("g",null,w.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"}),w.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 "}),w.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"}),w.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 "}),w.createElement("rect",{x:"-125.5",y:"134",style:{fill:"#1A9CFF"},width:"4.1",height:"4.1"}),w.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 U extends w.Component{constructor(e){super(e)}render(){return!0===this.props.open?w.createElement(P,null,w.createElement(j,null),w.createElement(z,null)):w.createElement(P,null,w.createElement(q,null),w.createElement(z,null))}}U.propTypes={open:I.bool},U.defaultProps={open:!1};const Y=e,H=t,$=({fill:e})=>H.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"});$.propTypes={fill:Y.string};class W extends H.Component{static __initStatic(){this.propTypes={classes:Y.object.isRequired,size:Y.number}}render(){const{size:e}=this.props;return!0===this.props.open?H.createElement(u,{size:e},H.createElement("svg",{preserveAspectRatio:"xMinYMin meet",viewBox:"-135 129 16 32"},H.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"}),H.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"}),H.createElement($,{fill:"#1A9CFF"}))):H.createElement(u,{size:e},H.createElement("svg",{preserveAspectRatio:"xMinYMin meet",viewBox:"-135 129 16 31"},H.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"}),H.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"}),H.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"}),",",H.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"}),H.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"}),H.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"}),H.createElement($,{fill:"1A9CFF"})))}}W.__initStatic(),W.propTypes={open:Y.bool},W.defaultProps={open:!1};const G=e,K=t,J=({fill:e})=>K.createElement("g",null,K.createElement("rect",{x:"19.3",y:"10.3",width:"4.5",height:"12.7",fill:e}),K.createElement("rect",{x:"19.3",y:"26.2",width:"4.5",height:"4.5",fill:e}));J.propTypes={fill:G.string.isRequired};const V=({fill:e})=>K.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});V.propTypes={fill:G.string.isRequired};const X=({fill:e})=>K.createElement("g",null,K.createElement("rect",{x:"23.8",y:"15",width:"3.5",height:"4.4",fill:e}),K.createElement("rect",{x:"16",y:"15",width:"3.5",height:"4.4",fill:e}),K.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}));X.propTypes={fill:G.string.isRequired};class Z extends K.Component{constructor(e){super(e);const{fg:t="#464146",bg:n="white"}=this.props;this.icons={check:K.createElement(E,null,K.createElement(V,{fill:n}),K.createElement(J,{fill:t})),emoji:K.createElement(E,null,K.createElement(V,{fill:n}),K.createElement(X,{fill:t})),feedback:{check:K.createElement(E,null,K.createElement(V,{fill:n}),K.createElement(X,{fill:t})),emoji:K.createElement(E,null,K.createElement(V,{fill:n}),K.createElement(X,{fill:t})),square:{check:K.createElement(E,null,K.createElement(V,{fill:n}),K.createElement(J,{fill:t})),emoji:K.createElement(E,null,K.createElement(V,{fill:n}),K.createElement(X,{fill:t})),open:{check:K.createElement(E,null,K.createElement(J,{fill:n})),emoji:K.createElement(E,null,K.createElement(X,{fill:n}))}}}}}render(){const{iconSet:e,category:t,shape:n,open:i}=this.props;return void 0===t?this.icons[e]:void 0===n?this.icons.feedback[e]:!0===i?this.icons.feedback.square.open[e]:this.icons.feedback.square[e]}}Z.propTypes={iconSet:G.oneOf(["emoji","check",void 0]),shape:G.oneOf(["square",void 0]),category:G.oneOf(["feedback",void 0]),open:G.bool,fg:G.string,bg:G.string},Z.defaultProps={iconSet:"check",shape:void 0,category:void 0,open:!1,fg:"#464146",bg:"white"};const Q=e,ee=t,te=({fill:e})=>ee.createElement("g",{transform:"translate(0, 0)"},ee.createElement("polygon",{points:"27.5,13.4 23.9,11.4 15.9,25.8 19.1,28.6",fill:e}),ee.createElement("polygon",{points:"16.2,20.6 14.4,19.2 11.8,22.3 14.1,24.3",fill:e}));te.propTypes={fill:Q.string.isRequired};const ne=({fill:e})=>ee.createElement("g",{transform:"translate(2, 0)"},ee.createElement("rect",{x:"20.6",y:"11.8",width:"4",height:"5",fill:e}),ee.createElement("rect",{x:"11.5",y:"11.8",width:"4",height:"5",fill:e}),ee.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}));ne.propTypes={fill:Q.string.isRequired};const ie=_(te,ne);ie.propTypes={iconSet:Q.oneOf(["emoji","check"]),shape:Q.oneOf(["round","square"]),category:Q.oneOf(["feedback",void 0]),open:Q.bool,fg:Q.string,bg:Q.string,size:Q.oneOfType([Q.string,Q.number])},ie.defaultProps={iconSet:"check",shape:"round",category:void 0,open:!1,fg:"#4aaf46",bg:"#c1e1ac",size:30};const re=e,se=t,oe=({fill:e})=>se.createElement("g",null,se.createElement("rect",{x:"-115",y:"136.7",width:"3",height:"3",fill:e}),se.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}));oe.propTypes={fill:re.string.isRequired};const le=({fill:e})=>se.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});le.propTypes={fill:re.string.isRequired};const ae=({fill:e="#FFFFFF"})=>se.createElement("g",null,se.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"}),se.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"}),se.createElement("circle",{cx:"-113",cy:"144",r:"14",fill:e}));ae.propTypes={fill:re.string};const ce=({children:e,size:t})=>{const n=h(t),i={height:n,width:n,display:"inline-block",position:"relative"};return se.createElement("div",{style:i},se.createElement("svg",{preserveAspectRatio:"xMinYMin meet",viewBox:"-129 128 34 34"},e))};ce.propTypes={children:re.oneOfType([re.arrayOf(re.node),re.node]).isRequired,size:re.oneOfType([re.string,re.number])};class pe extends se.Component{render(){const{iconSet:e,open:t,fg:n="#1a9cff",bg:i="#bce2ff",border:r="#bbe3fd"}=this.props,s=se.createElement(oe,{fill:n}),o={check:se.createElement(ce,{size:this.props.size},se.createElement(ae,null),s,se.createElement(le,{fill:r})),emoji:se.createElement(ce,{size:this.props.size},se.createElement(ae,null),s,se.createElement(le,{fill:r})),open:{check:se.createElement(ce,{size:this.props.size},se.createElement("circle",{cx:"-113",cy:"144",r:"14",fill:"#FFFFFF"}),se.createElement(oe,{fill:i}),se.createElement(le,{fill:"#FFFFFF"})),emoji:se.createElement(ce,{size:this.props.size},se.createElement("circle",{cx:"-113",cy:"144",r:"14",fill:"#FFFFFF"}),se.createElement(oe,{fill:i}),se.createElement(le,{fill:r}))}};return!0===t?o.open[e]:o[e]}}function de(){return de=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},de.apply(null,arguments)}function he(e,t){if(null==e)return{};var n={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(-1!==t.indexOf(i))continue;n[i]=e[i]}return n}function ue(e,t){return ue=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ue(e,t)}function me(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,ue(e,t)}function fe(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}pe.propTypes={iconSet:re.oneOf(["emoji","check"]),open:re.bool,fg:re.string,bg:re.string,border:re.string,size:re.oneOfType([re.string,re.number])},pe.defaultProps={iconSet:"check",open:!1,fg:"#1a9cff",bg:"#bce2ff",border:"#bbe3fd",size:30};var Ee=!1;var ge=t.createContext(null),ye=function(e){return e.scrollTop};const be=t,xe=i;var ve="unmounted",Ce="exited",_e="entering",Re="entered",ke="exiting",Oe=function(e){function t(t,n){var i;i=e.call(this,t,n)||this;var r,s=n&&!n.isMounting?t.enter:t.appear;return i.appearStatus=null,t.in?s?(r=Ce,i.appearStatus=_e):r=Re:r=t.unmountOnExit||t.mountOnEnter?ve:Ce,i.state={status:r},i.nextCallback=null,i}me(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===ve?{status:Ce}: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!==_e&&n!==Re&&(t=_e):n!==_e&&n!==Re||(t=ke)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,i=this.props.timeout;return e=t=n=i,null!=i&&"number"!=typeof i&&(e=i.exit,t=i.enter,n=void 0!==i.appear?i.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===_e){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:xe.findDOMNode(this);n&&ye(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Ce&&this.setState({status:ve})},n.performEnter=function(e){var t=this,n=this.props.enter,i=this.context?this.context.isMounting:e,r=this.props.nodeRef?[i]:[xe.findDOMNode(this),i],s=r[0],o=r[1],l=this.getTimeouts(),a=i?l.appear:l.enter;!e&&!n||Ee?this.safeSetState({status:Re},function(){t.props.onEntered(s)}):(this.props.onEnter(s,o),this.safeSetState({status:_e},function(){t.props.onEntering(s,o),t.onTransitionEnd(a,function(){t.safeSetState({status:Re},function(){t.props.onEntered(s,o)})})}))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),i=this.props.nodeRef?void 0:xe.findDOMNode(this);t&&!Ee?(this.props.onExit(i),this.safeSetState({status:ke},function(){e.props.onExiting(i),e.onTransitionEnd(n.exit,function(){e.safeSetState({status:Ce},function(){e.props.onExited(i)})})})):this.safeSetState({status:Ce},function(){e.props.onExited(i)})},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(i){n&&(n=!1,t.nextCallback=null,e(i))},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:xe.findDOMNode(this),i=null==e&&!this.props.addEndListener;if(n&&!i){if(this.props.addEndListener){var r=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],s=r[0],o=r[1];this.props.addEndListener(s,o)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if(e===ve)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 i=he(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return be.createElement(ge.Provider,{value:null},"function"==typeof n?n(e,i):be.cloneElement(be.Children.only(n),i))},t}(be.Component);function Se(){}Oe.contextType=ge,Oe.propTypes={},Oe.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Se,onEntering:Se,onEntered:Se,onExit:Se,onExiting:Se,onExited:Se},Oe.UNMOUNTED=ve,Oe.EXITED=Ce,Oe.ENTERING=_e,Oe.ENTERED=Re,Oe.EXITING=ke;var Te=Oe;const Ae=t;var Ne=function(e,t){return e&&t&&t.split(" ").forEach(function(t){return i=t,void((n=e).classList?n.classList.add(i):function(e,t){return e.classList?!!t&&e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")}(n,i)||("string"==typeof n.className?n.className=n.className+" "+i:n.setAttribute("class",(n.className&&n.className.baseVal||"")+" "+i)));var n,i})},Me=function(e,t){return e&&t&&t.split(" ").forEach(function(t){return i=t,void((n=e).classList?n.classList.remove(i):"string"==typeof n.className?n.className=fe(n.className,i):n.setAttribute("class",fe(n.className&&n.className.baseVal||"",i)));var n,i})},De=function(e){function t(){for(var t,n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];return(t=e.call.apply(e,[this].concat(i))||this).appliedClasses={appear:{},enter:{},exit:{}},t.onEnter=function(e,n){var i=t.resolveArguments(e,n),r=i[0],s=i[1];t.removeClasses(r,"exit"),t.addClass(r,s?"appear":"enter","base"),t.props.onEnter&&t.props.onEnter(e,n)},t.onEntering=function(e,n){var i=t.resolveArguments(e,n),r=i[0],s=i[1]?"appear":"enter";t.addClass(r,s,"active"),t.props.onEntering&&t.props.onEntering(e,n)},t.onEntered=function(e,n){var i=t.resolveArguments(e,n),r=i[0],s=i[1]?"appear":"enter";t.removeClasses(r,s),t.addClass(r,s,"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,i="string"==typeof n,r=i?""+(i&&n?n+"-":"")+e:n[e];return{baseClassName:r,activeClassName:i?r+"-active":n[e+"Active"],doneClassName:i?r+"-done":n[e+"Done"]}},t}me(t,e);var n=t.prototype;return n.addClass=function(e,t,n){var i=this.getClassNames(t)[n+"ClassName"],r=this.getClassNames("enter").doneClassName;"appear"===t&&"done"===n&&r&&(i+=" "+r),"active"===n&&e&&ye(e),i&&(this.appliedClasses[t][n]=i,Ne(e,i))},n.removeClasses=function(e,t){var n=this.appliedClasses[t],i=n.base,r=n.active,s=n.done;this.appliedClasses[t]={},i&&Me(e,i),r&&Me(e,r),s&&Me(e,s)},n.render=function(){var e=this.props;e.classNames;var t=he(e,["classNames"]);return Ae.createElement(Te,de({},t,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(Ae.Component);De.defaultProps={classNames:""},De.propTypes={};var Be=De;const{Children:Fe}=t,{cloneElement:Le}=t,{isValidElement:Ie}=t;function we(e,t){var n=Object.create(null);return e&&Fe.map(e,function(e){return e}).forEach(function(e){n[e.key]=function(e){return t&&Ie(e)?t(e):e}(e)}),n}function ze(e,t,n){return null!=n[t]?n[t]:e.props[t]}function Pe(e,t,n){var i=we(e.children),r=function(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var i,r=Object.create(null),s=[];for(var o in e)o in t?s.length&&(r[o]=s,s=[]):s.push(o);var l={};for(var a in t){if(r[a])for(i=0;i<r[a].length;i++){var c=r[a][i];l[r[a][i]]=n(c)}l[a]=n(a)}for(i=0;i<s.length;i++)l[s[i]]=n(s[i]);return l}(t,i);return Object.keys(r).forEach(function(s){var o=r[s];if(Ie(o)){var l=s in t,a=s in i,c=t[s],p=Ie(c)&&!c.props.in;!a||l&&!p?a||!l||p?a&&l&&Ie(c)&&(r[s]=Le(o,{onExited:n.bind(null,o),in:c.props.in,exit:ze(o,"exit",e),enter:ze(o,"enter",e)})):r[s]=Le(o,{in:!1}):r[s]=Le(o,{onExited:n.bind(null,o),in:!0,exit:ze(o,"exit",e),enter:ze(o,"enter",e)})}}),r}const je=t;var qe=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},Ue=function(e){function t(t,n){var i,r=(i=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}(i));return i.state={contextValue:{isMounting:!0},handleExited:r,firstRender:!0},i}me(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,i,r=t.children,s=t.handleExited;return{children:t.firstRender?(n=e,i=s,we(n.children,function(e){return Le(e,{onExited:i.bind(null,e),in:!0,appear:ze(e,"appear",n),enter:ze(e,"enter",n),exit:ze(e,"exit",n)})})):Pe(e,r,s),firstRender:!1}},n.handleExited=function(e,t){var n=we(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState(function(t){var n=de({},t.children);return delete n[e.key],{children:n}}))},n.render=function(){var e=this.props,t=e.component,n=e.childFactory,i=he(e,["component","childFactory"]),r=this.state.contextValue,s=qe(this.state.children).map(n);return delete i.appear,delete i.enter,delete i.exit,null===t?je.createElement(ge.Provider,{value:r},s):je.createElement(ge.Provider,{value:r},je.createElement(t,i,s))},t}(je.Component);Ue.propTypes={},Ue.defaultProps={component:"div",childFactory:function(e){return e}};var Ye=Ue;const{green:He}=r,{indigo:$e}=r,{orange:We}=r,{pink:Ge}=r,{red:Ke}=r,Je={TEXT:"black",DISABLED:"grey",DISABLED_SECONDARY:"#ABABAB",CORRECT:He[500],CORRECT_SECONDARY:He[50],CORRECT_TERTIARY:"#0EA449",CORRECT_WITH_ICON:"#087D38",INCORRECT:We[500],INCORRECT_SECONDARY:Ke[50],INCORRECT_WITH_ICON:"#BF0D00",MISSING:Ke[700],MISSING_WITH_ICON:"#6A78A1",PRIMARY:$e[500],PRIMARY_LIGHT:$e[200],PRIMARY_DARK:$e[800],SECONDARY:Ge.A400,SECONDARY_LIGHT:Ge[200],SECONDARY_DARK:Ge[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(Je);const Ve=(Xe="pie",(...e)=>{const t=e.pop();return e.reduceRight((e,t)=>`var(--${Xe}-${t}, ${e})`,t)});var Xe;const Ze=()=>Ve("text",Je.TEXT),Qe=()=>Ve("table-stripe","background-dark",Je.TABLE_STRIPE),et=t,tt=e,{styled:nt}=n,it=nt("div")({transformOrigin:"0% 0px 0px",width:"100%",display:"block",overflow:"hidden","&.incorrect":{color:"#946202"}}),rt=nt("div")({WebkitFontSmoothing:"antialiased",backgroundColor:`var(--feedback-bg-color, ${Ve("disabled",Je.DISABLED)})`,borderRadius:"4px",lineHeight:"25px",margin:"0px",padding:"10px",verticalAlign:"middle",color:"var(--feedback-color, white)","&.correct":{backgroundColor:`var(--feedback-correct-bg-color, ${Ve("correct",Je.CORRECT)})`},"&.incorrect":{backgroundColor:`var(--feedback-incorrect-bg-color, ${Ve("incorrect",Je.INCORRECT)})`}}),st=nt("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 ot extends et.Component{constructor(...e){super(...e),ot.prototype.__init.call(this)}static __initStatic(){this.propTypes={correctness:tt.string,feedback:tt.string}}__init(){this.nodeRef=et.createRef()}renderFeedback(){const{correctness:e,feedback:t}=this.props;return e&&t?et.createElement(Be,{key:"hasFeedback",nodeRef:this.nodeRef,timeout:{enter:500,exit:200},classNames:"feedback"},et.createElement(st,{ref:this.nodeRef},et.createElement(it,null,et.createElement(rt,{className:e,dangerouslySetInnerHTML:{__html:t}})))):null}render(){return et.createElement("div",null,et.createElement(Ye,null,this.renderFeedback()))}}ot.__initStatic();const lt=t,at=e,{Popover:ct}=s,{styled:pt}=n,dt=o("pie-libs:render-ui:response-indicators"),ht=pt("div")(({hasFeedback:e})=>({cursor:e?"pointer":"default"})),ut=pt(ct)({cursor:"pointer"}),mt=pt("div")({padding:"0",borderRadius:"4px"}),ft=(e,t)=>{class n extends lt.Component{constructor(e){super(e),n.prototype.__init.call(this),n.prototype.__init2.call(this),this.state={}}__init(){this.handlePopoverOpen=e=>{dt("[handlePopoverOpen]",e.target),this.setState({anchorEl:e.target})}}__init2(){this.handlePopoverClose=()=>{this.setState({anchorEl:null})}}render(){const{feedback:n}=this.props,{anchorEl:i}=this.state;return lt.createElement(ht,{hasFeedback:!!n},lt.createElement("span",{ref:e=>this.icon=e,onClick:this.handlePopoverOpen},lt.createElement(e,null)),n&<.createElement(ut,{PaperComponent:mt,open:!!i,anchorEl:i,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},onClose:this.handlePopoverClose},lt.createElement(ot,{feedback:n,correctness:t})))}}return n.propTypes={feedback:at.string},n};ft(T,"correct"),ft(L,"incorrect"),ft(ie,"partially-correct"),ft(Z,"nothing-submitted");const Et=t,{styled:gt}=n,yt=l,bt=e,{renderMath:xt}=c,vt=gt("span")(({theme:e})=>({color:e.palette.primary.light,borderBottom:`1px dotted ${e.palette.primary.light}`,cursor:"pointer"})),Ct=gt(yt)(({theme:e})=>({paddingTop:e.spacing(2)}));class _t extends Et.Component{constructor(...e){super(...e),_t.prototype.__init.call(this),_t.prototype.__init2.call(this)}static __initStatic(){this.propTypes={className:bt.string,children:bt.object,labels:bt.shape({visible:bt.string,hidden:bt.string})}}static __initStatic2(){this.defaultProps={labels:{}}}__init(){this.state={expanded:!1}}__init2(){this.toggleExpanded=()=>{this.setState(e=>({expanded:!e.expanded}))}}componentDidMount(){xt(this.root)}componentDidUpdate(){xt(this.root)}render(){const{labels:e,children:t,className:n}=this.props,i=this.state.expanded?e.visible||"Hide":e.hidden||"Show";return Et.createElement("div",{className:n,ref:e=>this.root=e},Et.createElement("div",{onClick:this.toggleExpanded},Et.createElement(vt,null,i)),Et.createElement(Ct,{in:this.state.expanded,timeout:{enter:225,exit:195},unmountOnExit:!0},t))}}_t.__initStatic(),_t.__initStatic2();const{Button:Rt}=s,{styled:kt}=n;kt("div")({display:"flex",flexDirection:"column"}),kt("div")({display:"flex",alignItems:"center",justifyContent:"center"}),kt("div")(({theme:e})=>({width:"24px",height:"24px",color:"gray",marginRight:e.spacing(1),display:"flex",alignItems:"center"})),kt(Rt)(({theme:e})=>({display:"flex",alignItems:"center",marginLeft:e.spacing(3),marginRight:e.spacing(3)}));const Ot=t,{createTheme:St}=n,{styled:Tt}=n,{StyledEngineProvider:At}=n,{ThemeProvider:Nt}=n,Mt=e;const Dt=St({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"}}}}}}),Bt=Tt("div")({"& table, th, td":{fontSize:"inherit"}});class Ft extends Ot.Component{static __initStatic(){this.propTypes={className:Mt.string,children:Mt.array,extraCSSRules:Mt.shape({names:Mt.arrayOf(Mt.string),rules:Mt.string}),fontSizeFactor:Mt.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),i=t(document.body),r=Math.max(n,i),s=null!=e&&"number"==typeof e?e:1;return 1!==s?{fontSize:r*s+"px"}:null}render(){const{children:e,className:t,fontSizeFactor:n,...i}=this.props,{extraCSSRules:r,...s}=i,o=this.computeStyle(n);return Ot.createElement(At,{injectFirst:!0},Ot.createElement(Nt,{theme:Dt},function(e){let t,n=e[0],i=1;for(;i<e.length;){const r=e[i],s=e[i+1];if(i+=2,("optionalAccess"===r||"optionalCall"===r)&&null==n)return;"access"===r||"optionalAccess"===r?(t=n,n=s(n)):"call"!==r&&"optionalCall"!==r||(n=s((...e)=>n.call(t,...e)),t=void 0)}return n}([r,"optionalAccess",e=>e.rules])?Ot.createElement("style",{dangerouslySetInnerHTML:{__html:`.extraCSSRules { ${r.rules} }`}}):null,Ot.createElement(Bt,{className:`${t} extraCSSRules`,...s,...o&&{style:o}},e)))}}Ft.__initStatic(),Ft.__initStatic2();const Lt=t,{styled:It}=n,wt=e,zt=It(Ft)({display:"flex",flexDirection:"column",position:"relative"});class Pt extends Lt.Component{static __initStatic(){this.propTypes={ariaLabel:wt.string,children:wt.oneOfType([wt.arrayOf(wt.node),wt.node]).isRequired,role:wt.string,extraCSSRules:wt.shape({names:wt.arrayOf(wt.string),rules:wt.string}),fontSizeFactor:wt.number}}render(){const{children:e,ariaLabel:t,role:n,extraCSSRules:i,fontSizeFactor:r,classes:s}=this.props,o=t?{"aria-label":t,role:n}:{};return Lt.createElement(zt,{...o,extraCSSRules:i,fontSizeFactor:r,classes:s},e)}}Pt.__initStatic();const jt=t,qt=e;class Ut extends jt.Component{static __initStatic(){this.propTypes={tag:qt.string,className:qt.string,html:qt.string}}static __initStatic2(){this.defaultProps={tag:"div",html:""}}render(){const{tag:e,className:t,html:n}=this.props,i=e||"div";return jt.createElement(i,{ref:e=>this.node=e,className:t,dangerouslySetInnerHTML:{__html:n}})}}Ut.__initStatic(),Ut.__initStatic2();const{InputLabel:Yt}=s,{FormControl:Ht}=s,$t=e,{styled:Wt}=n;Wt(Ht)(({theme:e})=>({margin:0,padding:0,flex:"1 0 auto",minWidth:e.spacing(4)})),Wt(Yt)(()=>({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)"}})),$t.oneOfType([$t.string,$t.object]).isRequired,$t.string,$t.oneOfType([$t.arrayOf($t.node),$t.node]).isRequired;const Gt=t,{Component:Kt}=t,{styled:Jt}=n,Vt=e,{renderMath:Xt}=c,Zt=Jt("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:Ve("table-grid","text",Je.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:Qe()},'&:not(.MathJax) > table:not([role="presentation"]):has(tbody tr > td:first-child) tbody tr:nth-child(even) td':{backgroundColor:Qe()},'&: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:Ze()},"&.legend":{width:"100%",fontSize:"inherit !important"},"&.rationale":{paddingLeft:e.spacing(4),paddingBottom:e.spacing(1)},"&.prompt-label":{color:`${Ze()} !important`,display:"flex",flexDirection:"column",verticalAlign:"middle",cursor:"pointer","& > p":{margin:"0 0 0 0 !important"}}})),Qt=/\\embed\{newLine\}\[\]/g;class en extends Kt{constructor(...e){super(...e),en.prototype.__init.call(this),en.prototype.__init2.call(this)}static __initStatic(){this.propTypes={prompt:Vt.string,tagName:Vt.string,className:Vt.string,onClick:Vt.func,defaultClassName:Vt.string,autoplayAudioEnabled:Vt.bool,customAudioButton:{playImage:Vt.string,pauseImage:Vt.string}}}static __initStatic2(){this.defaultProps={onClick:()=>{}}}__init(){this.promptRef=Gt.createRef()}__init2(){this.parsedText=e=>{const{customAudioButton:t}=this.props,n=document.createElement("div");n.innerHTML=e;const i=n.querySelector("audio");if(i){const e=document.createElement("source");if(e.setAttribute("type","audio/mp3"),e.setAttribute("src",i.getAttribute("src")),i.removeAttribute("src"),i.setAttribute("id","pie-prompt-audio-player"),i.appendChild(e),t){i.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"}),i.parentNode.insertBefore(e,i)}}return n.innerHTML}}addCustomAudioButtonControls(){const{autoplayAudioEnabled:e,customAudioButton:t}=this.props,n=document.getElementById("play-audio-button"),i=document.getElementById("pie-prompt-audio-player");if(e&&i&&i.play().then(()=>{n&&t&&i.addEventListener("ended",s)}).catch(e=>{console.error("Error playing audio",e)}),!n||!i||!t)return;const r=()=>{i.paused&&(n.style.backgroundImage.includes(t.pauseImage)||i.play())},s=()=>{n.style.backgroundImage=`url(${t.playImage})`},o=()=>{Object.assign(n.style,{backgroundImage:`url(${t.pauseImage})`,border:"1px solid #ccc"})},l=()=>{Object.assign(n.style,{backgroundImage:`url(${t.playImage})`,border:"1px solid #326295"})};n.addEventListener("click",r),i.addEventListener("play",o),i.addEventListener("pause",l),i.addEventListener("ended",s),this._handlePlayClick=r,this._handleAudioPlay=o,this._handleAudioPause=l,this._handleAudioEnded=s}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 Xt&&Xt(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",i=e.parentElement;if("DIV"===i.tagName&&"flex"===i.style.display&&"100%"===i.style.width)i.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),i.replaceChild(t,e)}}}render(){const{prompt:e,tagName:t,className:n,onClick:i,defaultClassName:r}=this.props,s=`${n||""} ${r||""} ${"legend"===t?"legend":""} preview-prompt`.trim();return Gt.createElement(Zt,{as:t||"div",ref:this.promptRef,onClick:i,className:s,tagName:t,dangerouslySetInnerHTML:{__html:this.parsedText(e||"").replace(Qt,"\\newline ")}})}}en.__initStatic(),en.__initStatic2();const tn=e;tn.node,tn.bool;const nn=e;nn.node,nn.string,"undefined"!=typeof window&&new DOMParser,"undefined"!=typeof window&&new DOMParser;const rn=t,{styled:sn}=n,{ListItem:on}=s,{List:ln}=s,an=l,cn=e,pn=sn(Ft)({color:Ze(),backgroundColor:Ve("background",Je.BACKGROUND),"&:not(.MathJax) table":{borderCollapse:"collapse"},"&:not(.MathJax) table td, &:not(.MathJax) table th":{padding:"8px 12px",textAlign:"left"},"& ul p, & ol p":{marginBottom:0,marginTop:0,lineHeight:"normal"}}),dn=sn(on)({display:"flex",flexDirection:"column",alignItems:"flex-start",padding:"12px 0px"}),hn=sn("div")({color:Ze()}),un=sn("h3")({color:Ze(),fontSize:"16px",fontWeight:"700",margin:0,paddingBottom:"6px"}),mn=sn("h4")({color:Ze(),fontSize:"16px",fontWeight:"normal",margin:0,paddingBottom:"6px"}),fn=sn("h2")(({theme:e})=>({display:"flex",alignItems:"center",cursor:"pointer",userSelect:"none",fontSize:e.typography.fontSize,fontWeight:"500",color:Ve("tertiary",Je.TERTIARY),margin:0})),En=sn("span")({display:"inline-flex",transition:"transform 0.2s",marginLeft:2,alignSelf:"center"}),gn=sn("h2")({position:"absolute",width:"1px",height:"1px",padding:0,margin:"-1px",overflow:"hidden",clip:"rect(0,0,0,0)",border:0,whiteSpace:"nowrap"}),yn=cn.shape({excludeZero:cn.bool,points:cn.arrayOf(cn.string),sampleAnswers:cn.arrayOf(cn.string),animationsDisabled:cn.bool});class bn extends rn.Component{__init(){this.dudUrl="javascript:;"}constructor(e){super(e),bn.prototype.__init.call(this),bn.prototype.__init2.call(this),this.state={rubricOpen:!1,linkPrefix:"Show"},this.toggleRubric=this.toggleRubric.bind(this)}static __initStatic(){this.propTypes={model:cn.object.isRequired,animationsDisabled:cn.bool,value:yn}}toggleRubric(){this.setState({rubricOpen:!this.state.rubricOpen}),this.setState({linkPrefix:this.state.rubricOpen?"Show":"Hide"})}__init2(){this.shouldRenderPoint=(e,t)=>!t.excludeZero||0!==e}render(){const{model:e,value:t}=this.props;let{animationsDisabled:n}=this.props;if(n=n||t.animationsDisabled,t&&t.points){const{extraCSSRules:i}=e||{},{points:r,sampleAnswers:s}=t,o=rn.createElement(ln,{component:"nav"},r.slice(0).reverse().map((e,n)=>{n=r.length-n-1;const i=t.excludeZero?n+1:n;return rn.createElement(rn.Fragment,{key:n},rn.createElement(dn,{key:`P${n}`},rn.createElement(un,null,1===i?`${i} PT`:`${i} PTS`),rn.createElement(hn,{dangerouslySetInnerHTML:{__html:e}})),s&&s[n]&&rn.createElement(dn,{key:`S${n}`},rn.createElement(mn,null,"Sample Answer"),rn.createElement(hn,{dangerouslySetInnerHTML:{__html:s[n]}})))}));return rn.createElement(pn,{extraCSSRules:i},rn.createElement(gn,null,"Rubric"),n?o:rn.createElement(rn.Fragment,null,rn.createElement(fn,{id:"rubric-toggle",tabIndex:0,role:"button","aria-expanded":this.state.rubricOpen,onClick:this.toggleRubric,onKeyPress:e=>{"Enter"!==e.key&&" "!==e.key||this.toggleRubric()}},this.state.linkPrefix," Rubric",rn.createElement(En,{"aria-hidden":"true"},this.state.rubricOpen?rn.createElement("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},rn.createElement("polyline",{points:"18 15 12 9 6 15"})):rn.createElement("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},rn.createElement("polyline",{points:"6 9 12 15 18 9"})))),rn.createElement(an,{in:this.state.rubricOpen,timeout:{enter:225,exit:195}},o)))}return null}}bn.__initStatic();const xn=t,{createRoot:vn}=a,Cn=o,{renderMath:_n}=c;class Rn extends HTMLElement{constructor(){super(),Rn.prototype.__init.call(this),Cn.log("constructor called"),this.onModelChanged=this.onModelChanged.bind(this),this._root=null,this._mathObserver=null,this._mathRenderPending=!1}__init(){this._scheduleMathRender=()=>{this._mathRenderPending||(this._mathRenderPending=!0,requestAnimationFrame(()=>{this._mathObserver&&this._mathObserver.disconnect(),_n(this),this._mathRenderPending=!1,setTimeout(()=>{this._mathObserver&&this._mathObserver.observe(this,{childList:!0,subtree:!0})},50)}))}}_initMathObserver(){this._mathObserver||(this._mathObserver=new MutationObserver(this._scheduleMathRender),this._mathObserver.observe(this,{childList:!0,subtree:!0}))}_disconnectMathObserver(){this._mathObserver&&(this._mathObserver.disconnect(),this._mathObserver=null)}set model(e){this._model=e,this._render()}onModelChanged(e){this._model=e,this._render()}connectedCallback(){this._initMathObserver(),this._render()}_render(){if(this._model){this._initMathObserver();const e=xn.createElement(bn,{value:this._model});this._root||(this._root=vn(this)),this._root.render(e)}}disconnectedCallback(){this._disconnectMathObserver(),this._root&&this._root.unmount()}}export{Rn as default};
|
|
1
|
+
import{_dll_prop_types as e,_dll_react as t,_dll_mui__material_styles as n,_dll_react_dom as i,_dll_mui__material_colors as r,_dll_mui__material as o,_dll_debug as s,_dll_mui__material_collapse as l,_dll_react_dom_client as a}from"../../../@pie-lib/shared-module@6.0.0/module/index.js";import{_dll_pie_lib__math_rendering as c}from"../../../@pie-lib/math-rendering-module@6.0.0/module/index.js";const p=t,d=e,h=e=>"string"==typeof e?e:"number"==typeof e?`${e}px`:"30px",u=({size:e,children:t})=>{const n={height:e=h(e),width:e,display:"inline-block",position:"relative"};return p.createElement("div",{style:n},t)};u.propTypes={size:d.number,children:d.oneOfType([d.arrayOf(d.node),d.node]).isRequired};const m=t,f=e,E=({size:e,children:t,sx:n})=>m.createElement(u,{size:e},m.createElement("svg",{preserveAspectRatio:"xMinYMin meet",viewBox:"0 0 44 40",style:{enableBackground:"new 0 0 44 40",...n}},t));E.propTypes={size:f.oneOfType([f.string,f.number]),children:f.oneOfType([f.arrayOf(f.node),f.node]).isRequired,sx:f.object},f.string.isRequired;const g=({fill:e})=>m.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});g.propTypes={fill:f.string.isRequired};const y=({fill:e})=>m.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});y.propTypes={fill:f.string.isRequired};const b=({fill:e})=>m.createElement("circle",{transform:"translate(-3,0)",cx:"23",cy:"20.4",r:"16",fill:e});b.propTypes={fill:f.string.isRequired};const x=({fill:e})=>m.createElement("rect",{x:"3.6",y:"4.1",width:"32",height:"32",fill:e});x.propTypes={fill:f.string.isRequired};const v=e,C=t;var _=(e,t)=>{class n extends C.Component{static __initStatic(){this.propTypes={iconSet:v.oneOf(["emoji","check"]),shape:v.oneOf(["round","square"]),category:v.oneOf(["feedback",void 0]),open:v.bool,size:v.oneOfType([v.number,v.string]),fg:v.string,bg:v.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:i,category:r,open:o,size:s,fg:l,bg:a}=this.props,c="check"===n?C.createElement(e,{fill:l}):C.createElement(t,{fill:l}),p="check"===n?C.createElement(e,{fill:a}):C.createElement(t,{fill:a});return o?C.createElement(E,{size:s},p):C.createElement(E,{size:s},"feedback"===r?"round"===i?C.createElement(y,{fill:a}):C.createElement(g,{fill:a}):"round"===i?C.createElement(b,{fill:a}):C.createElement(x,{fill:a}),c)}}return n.__initStatic(),n.__initStatic2(),n};const R=e,k=t,O=({fill:e})=>k.createElement("g",{transform:"translate(1, 0)"},k.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}),k.createElement("rect",{x:"21.1",y:"13.1",width:"3.7",height:"4.7",fill:e}),k.createElement("rect",{x:"12.7",y:"13.1",width:"3.7",height:"4.7",fill:e}));O.propTypes={fill:R.string.isRequired};const S=({fill:e,x:t=0,y:n=0})=>k.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});S.propTypes={fill:R.string.isRequired,x:R.number,y:R.number};const T=_(S,O);T.propTypes={iconSet:R.oneOf(["emoji","check"]),shape:R.oneOf(["round","square"]),category:R.oneOf(["feedback",void 0]),open:R.bool,fg:R.string,bg:R.string,size:R.oneOfType([R.string,R.number])},T.defaultProps={iconSet:"check",shape:"round",category:void 0,open:!1,fg:"#4aaf46",bg:"#f8ffe2",size:30};const A=e,{styled:N}=n;A.string.isRequired,A.string.isRequired,A.string.isRequired,A.string.isRequired,A.string.isRequired,N("div")(({size:e})=>({width:e||"25px",height:e||"25px"})),A.bool,A.string;const M=e,D=t,B=({fill:e})=>D.createElement("g",{transform:"translate(0.5, 0.5)"},D.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}),D.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}));B.propTypes={fill:M.string.isRequired};const F=({fill:e})=>D.createElement("g",{transform:"translate(1,0)"},D.createElement("rect",{x:"21",y:"12.9",width:"3.7",height:"4.7",fill:e}),D.createElement("rect",{x:"12.7",y:"12.9",width:"3.7",height:"4.7",fill:e}),D.createElement("rect",{x:"12.2",y:"22.5",width:"13",height:"3.3",fill:e}));F.propTypes={fill:M.string.isRequired};const L=_(B,F);L.propTypes={iconSet:M.oneOf(["emoji","check"]),shape:M.oneOf(["round","square"]),category:M.oneOf(["feedback",void 0]),open:M.bool,fg:M.string,bg:M.string,size:M.oneOfType([M.string,M.number])},L.defaultProps={iconSet:"check",shape:"round",category:void 0,open:!1,fg:"#fcb733",bg:"#fbf2e3",size:30};const I=e,w=t,z=()=>{const e={fill:"none",stroke:"#BCE2FF",strokeWidth:2,strokeMiterlimit:10};return w.createElement("g",null,w.createElement("line",{style:e,x1:"-98",y1:"142",x2:"-114.6",y2:"142"}),w.createElement("line",{style:e,x1:"-98",y1:"146.3",x2:"-114.6",y2:"146.3"}),w.createElement("line",{style:e,x1:"-104",y1:"150.7",x2:"-114.6",y2:"150.7"}))},P=({children:e,size:t})=>w.createElement(u,{size:t},w.createElement("svg",{version:"1.1",viewBox:"-128 129 31 31",style:{enableBackground:"new -128 129 31 31"}},e));P.propTypes={children:I.oneOfType([I.arrayOf(I.node),I.node]).isRequired,size:I.number};const j=()=>w.createElement("g",null,w.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"}),w.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 "}),w.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"}),w.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 "}),w.createElement("rect",{x:"-125.5",y:"134",style:{fill:"#7FABC6"},width:"4.1",height:"4.1"}),w.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 "})),q=()=>w.createElement("g",null,w.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"}),w.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 "}),w.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"}),w.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 "}),w.createElement("rect",{x:"-125.5",y:"134",style:{fill:"#1A9CFF"},width:"4.1",height:"4.1"}),w.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 U extends w.Component{constructor(e){super(e)}render(){return!0===this.props.open?w.createElement(P,null,w.createElement(j,null),w.createElement(z,null)):w.createElement(P,null,w.createElement(q,null),w.createElement(z,null))}}U.propTypes={open:I.bool},U.defaultProps={open:!1};const Y=e,H=t,$=({fill:e})=>H.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"});$.propTypes={fill:Y.string};class W extends H.Component{static __initStatic(){this.propTypes={classes:Y.object.isRequired,size:Y.number}}render(){const{size:e}=this.props;return!0===this.props.open?H.createElement(u,{size:e},H.createElement("svg",{preserveAspectRatio:"xMinYMin meet",viewBox:"-135 129 16 32"},H.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"}),H.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"}),H.createElement($,{fill:"#1A9CFF"}))):H.createElement(u,{size:e},H.createElement("svg",{preserveAspectRatio:"xMinYMin meet",viewBox:"-135 129 16 31"},H.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"}),H.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"}),H.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"}),",",H.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"}),H.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"}),H.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"}),H.createElement($,{fill:"1A9CFF"})))}}W.__initStatic(),W.propTypes={open:Y.bool},W.defaultProps={open:!1};const G=e,K=t,J=({fill:e})=>K.createElement("g",null,K.createElement("rect",{x:"19.3",y:"10.3",width:"4.5",height:"12.7",fill:e}),K.createElement("rect",{x:"19.3",y:"26.2",width:"4.5",height:"4.5",fill:e}));J.propTypes={fill:G.string.isRequired};const V=({fill:e})=>K.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});V.propTypes={fill:G.string.isRequired};const X=({fill:e})=>K.createElement("g",null,K.createElement("rect",{x:"23.8",y:"15",width:"3.5",height:"4.4",fill:e}),K.createElement("rect",{x:"16",y:"15",width:"3.5",height:"4.4",fill:e}),K.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}));X.propTypes={fill:G.string.isRequired};class Z extends K.Component{constructor(e){super(e);const{fg:t="#464146",bg:n="white"}=this.props;this.icons={check:K.createElement(E,null,K.createElement(V,{fill:n}),K.createElement(J,{fill:t})),emoji:K.createElement(E,null,K.createElement(V,{fill:n}),K.createElement(X,{fill:t})),feedback:{check:K.createElement(E,null,K.createElement(V,{fill:n}),K.createElement(X,{fill:t})),emoji:K.createElement(E,null,K.createElement(V,{fill:n}),K.createElement(X,{fill:t})),square:{check:K.createElement(E,null,K.createElement(V,{fill:n}),K.createElement(J,{fill:t})),emoji:K.createElement(E,null,K.createElement(V,{fill:n}),K.createElement(X,{fill:t})),open:{check:K.createElement(E,null,K.createElement(J,{fill:n})),emoji:K.createElement(E,null,K.createElement(X,{fill:n}))}}}}}render(){const{iconSet:e,category:t,shape:n,open:i}=this.props;return void 0===t?this.icons[e]:void 0===n?this.icons.feedback[e]:!0===i?this.icons.feedback.square.open[e]:this.icons.feedback.square[e]}}Z.propTypes={iconSet:G.oneOf(["emoji","check",void 0]),shape:G.oneOf(["square",void 0]),category:G.oneOf(["feedback",void 0]),open:G.bool,fg:G.string,bg:G.string},Z.defaultProps={iconSet:"check",shape:void 0,category:void 0,open:!1,fg:"#464146",bg:"white"};const Q=e,ee=t,te=({fill:e})=>ee.createElement("g",{transform:"translate(0, 0)"},ee.createElement("polygon",{points:"27.5,13.4 23.9,11.4 15.9,25.8 19.1,28.6",fill:e}),ee.createElement("polygon",{points:"16.2,20.6 14.4,19.2 11.8,22.3 14.1,24.3",fill:e}));te.propTypes={fill:Q.string.isRequired};const ne=({fill:e})=>ee.createElement("g",{transform:"translate(2, 0)"},ee.createElement("rect",{x:"20.6",y:"11.8",width:"4",height:"5",fill:e}),ee.createElement("rect",{x:"11.5",y:"11.8",width:"4",height:"5",fill:e}),ee.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}));ne.propTypes={fill:Q.string.isRequired};const ie=_(te,ne);ie.propTypes={iconSet:Q.oneOf(["emoji","check"]),shape:Q.oneOf(["round","square"]),category:Q.oneOf(["feedback",void 0]),open:Q.bool,fg:Q.string,bg:Q.string,size:Q.oneOfType([Q.string,Q.number])},ie.defaultProps={iconSet:"check",shape:"round",category:void 0,open:!1,fg:"#4aaf46",bg:"#c1e1ac",size:30};const re=e,oe=t,se=({fill:e})=>oe.createElement("g",null,oe.createElement("rect",{x:"-115",y:"136.7",width:"3",height:"3",fill:e}),oe.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}));se.propTypes={fill:re.string.isRequired};const le=({fill:e})=>oe.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});le.propTypes={fill:re.string.isRequired};const ae=({fill:e="#FFFFFF"})=>oe.createElement("g",null,oe.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"}),oe.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"}),oe.createElement("circle",{cx:"-113",cy:"144",r:"14",fill:e}));ae.propTypes={fill:re.string};const ce=({children:e,size:t})=>{const n=h(t),i={height:n,width:n,display:"inline-block",position:"relative"};return oe.createElement("div",{style:i},oe.createElement("svg",{preserveAspectRatio:"xMinYMin meet",viewBox:"-129 128 34 34"},e))};ce.propTypes={children:re.oneOfType([re.arrayOf(re.node),re.node]).isRequired,size:re.oneOfType([re.string,re.number])};class pe extends oe.Component{render(){const{iconSet:e,open:t,fg:n="#1a9cff",bg:i="#bce2ff",border:r="#bbe3fd"}=this.props,o=oe.createElement(se,{fill:n}),s={check:oe.createElement(ce,{size:this.props.size},oe.createElement(ae,null),o,oe.createElement(le,{fill:r})),emoji:oe.createElement(ce,{size:this.props.size},oe.createElement(ae,null),o,oe.createElement(le,{fill:r})),open:{check:oe.createElement(ce,{size:this.props.size},oe.createElement("circle",{cx:"-113",cy:"144",r:"14",fill:"#FFFFFF"}),oe.createElement(se,{fill:i}),oe.createElement(le,{fill:"#FFFFFF"})),emoji:oe.createElement(ce,{size:this.props.size},oe.createElement("circle",{cx:"-113",cy:"144",r:"14",fill:"#FFFFFF"}),oe.createElement(se,{fill:i}),oe.createElement(le,{fill:r}))}};return!0===t?s.open[e]:s[e]}}function de(){return de=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},de.apply(null,arguments)}function he(e,t){if(null==e)return{};var n={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(-1!==t.indexOf(i))continue;n[i]=e[i]}return n}function ue(e,t){return ue=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ue(e,t)}function me(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,ue(e,t)}function fe(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}pe.propTypes={iconSet:re.oneOf(["emoji","check"]),open:re.bool,fg:re.string,bg:re.string,border:re.string,size:re.oneOfType([re.string,re.number])},pe.defaultProps={iconSet:"check",open:!1,fg:"#1a9cff",bg:"#bce2ff",border:"#bbe3fd",size:30};var Ee=!1;var ge=t.createContext(null),ye=function(e){return e.scrollTop};const be=t,xe=i;var ve="unmounted",Ce="exited",_e="entering",Re="entered",ke="exiting",Oe=function(e){function t(t,n){var i;i=e.call(this,t,n)||this;var r,o=n&&!n.isMounting?t.enter:t.appear;return i.appearStatus=null,t.in?o?(r=Ce,i.appearStatus=_e):r=Re:r=t.unmountOnExit||t.mountOnEnter?ve:Ce,i.state={status:r},i.nextCallback=null,i}me(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===ve?{status:Ce}: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!==_e&&n!==Re&&(t=_e):n!==_e&&n!==Re||(t=ke)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,i=this.props.timeout;return e=t=n=i,null!=i&&"number"!=typeof i&&(e=i.exit,t=i.enter,n=void 0!==i.appear?i.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===_e){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:xe.findDOMNode(this);n&&ye(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Ce&&this.setState({status:ve})},n.performEnter=function(e){var t=this,n=this.props.enter,i=this.context?this.context.isMounting:e,r=this.props.nodeRef?[i]:[xe.findDOMNode(this),i],o=r[0],s=r[1],l=this.getTimeouts(),a=i?l.appear:l.enter;!e&&!n||Ee?this.safeSetState({status:Re},function(){t.props.onEntered(o)}):(this.props.onEnter(o,s),this.safeSetState({status:_e},function(){t.props.onEntering(o,s),t.onTransitionEnd(a,function(){t.safeSetState({status:Re},function(){t.props.onEntered(o,s)})})}))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),i=this.props.nodeRef?void 0:xe.findDOMNode(this);t&&!Ee?(this.props.onExit(i),this.safeSetState({status:ke},function(){e.props.onExiting(i),e.onTransitionEnd(n.exit,function(){e.safeSetState({status:Ce},function(){e.props.onExited(i)})})})):this.safeSetState({status:Ce},function(){e.props.onExited(i)})},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(i){n&&(n=!1,t.nextCallback=null,e(i))},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:xe.findDOMNode(this),i=null==e&&!this.props.addEndListener;if(n&&!i){if(this.props.addEndListener){var r=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],o=r[0],s=r[1];this.props.addEndListener(o,s)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if(e===ve)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 i=he(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return be.createElement(ge.Provider,{value:null},"function"==typeof n?n(e,i):be.cloneElement(be.Children.only(n),i))},t}(be.Component);function Se(){}Oe.contextType=ge,Oe.propTypes={},Oe.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Se,onEntering:Se,onEntered:Se,onExit:Se,onExiting:Se,onExited:Se},Oe.UNMOUNTED=ve,Oe.EXITED=Ce,Oe.ENTERING=_e,Oe.ENTERED=Re,Oe.EXITING=ke;var Te=Oe;const Ae=t;var Ne=function(e,t){return e&&t&&t.split(" ").forEach(function(t){return i=t,void((n=e).classList?n.classList.add(i):function(e,t){return e.classList?!!t&&e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")}(n,i)||("string"==typeof n.className?n.className=n.className+" "+i:n.setAttribute("class",(n.className&&n.className.baseVal||"")+" "+i)));var n,i})},Me=function(e,t){return e&&t&&t.split(" ").forEach(function(t){return i=t,void((n=e).classList?n.classList.remove(i):"string"==typeof n.className?n.className=fe(n.className,i):n.setAttribute("class",fe(n.className&&n.className.baseVal||"",i)));var n,i})},De=function(e){function t(){for(var t,n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];return(t=e.call.apply(e,[this].concat(i))||this).appliedClasses={appear:{},enter:{},exit:{}},t.onEnter=function(e,n){var i=t.resolveArguments(e,n),r=i[0],o=i[1];t.removeClasses(r,"exit"),t.addClass(r,o?"appear":"enter","base"),t.props.onEnter&&t.props.onEnter(e,n)},t.onEntering=function(e,n){var i=t.resolveArguments(e,n),r=i[0],o=i[1]?"appear":"enter";t.addClass(r,o,"active"),t.props.onEntering&&t.props.onEntering(e,n)},t.onEntered=function(e,n){var i=t.resolveArguments(e,n),r=i[0],o=i[1]?"appear":"enter";t.removeClasses(r,o),t.addClass(r,o,"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,i="string"==typeof n,r=i?""+(i&&n?n+"-":"")+e:n[e];return{baseClassName:r,activeClassName:i?r+"-active":n[e+"Active"],doneClassName:i?r+"-done":n[e+"Done"]}},t}me(t,e);var n=t.prototype;return n.addClass=function(e,t,n){var i=this.getClassNames(t)[n+"ClassName"],r=this.getClassNames("enter").doneClassName;"appear"===t&&"done"===n&&r&&(i+=" "+r),"active"===n&&e&&ye(e),i&&(this.appliedClasses[t][n]=i,Ne(e,i))},n.removeClasses=function(e,t){var n=this.appliedClasses[t],i=n.base,r=n.active,o=n.done;this.appliedClasses[t]={},i&&Me(e,i),r&&Me(e,r),o&&Me(e,o)},n.render=function(){var e=this.props;e.classNames;var t=he(e,["classNames"]);return Ae.createElement(Te,de({},t,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(Ae.Component);De.defaultProps={classNames:""},De.propTypes={};var Be=De;const{Children:Fe}=t,{cloneElement:Le}=t,{isValidElement:Ie}=t;function we(e,t){var n=Object.create(null);return e&&Fe.map(e,function(e){return e}).forEach(function(e){n[e.key]=function(e){return t&&Ie(e)?t(e):e}(e)}),n}function ze(e,t,n){return null!=n[t]?n[t]:e.props[t]}function Pe(e,t,n){var i=we(e.children),r=function(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var i,r=Object.create(null),o=[];for(var s in e)s in t?o.length&&(r[s]=o,o=[]):o.push(s);var l={};for(var a in t){if(r[a])for(i=0;i<r[a].length;i++){var c=r[a][i];l[r[a][i]]=n(c)}l[a]=n(a)}for(i=0;i<o.length;i++)l[o[i]]=n(o[i]);return l}(t,i);return Object.keys(r).forEach(function(o){var s=r[o];if(Ie(s)){var l=o in t,a=o in i,c=t[o],p=Ie(c)&&!c.props.in;!a||l&&!p?a||!l||p?a&&l&&Ie(c)&&(r[o]=Le(s,{onExited:n.bind(null,s),in:c.props.in,exit:ze(s,"exit",e),enter:ze(s,"enter",e)})):r[o]=Le(s,{in:!1}):r[o]=Le(s,{onExited:n.bind(null,s),in:!0,exit:ze(s,"exit",e),enter:ze(s,"enter",e)})}}),r}const je=t;var qe=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},Ue=function(e){function t(t,n){var i,r=(i=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}(i));return i.state={contextValue:{isMounting:!0},handleExited:r,firstRender:!0},i}me(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,i,r=t.children,o=t.handleExited;return{children:t.firstRender?(n=e,i=o,we(n.children,function(e){return Le(e,{onExited:i.bind(null,e),in:!0,appear:ze(e,"appear",n),enter:ze(e,"enter",n),exit:ze(e,"exit",n)})})):Pe(e,r,o),firstRender:!1}},n.handleExited=function(e,t){var n=we(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState(function(t){var n=de({},t.children);return delete n[e.key],{children:n}}))},n.render=function(){var e=this.props,t=e.component,n=e.childFactory,i=he(e,["component","childFactory"]),r=this.state.contextValue,o=qe(this.state.children).map(n);return delete i.appear,delete i.enter,delete i.exit,null===t?je.createElement(ge.Provider,{value:r},o):je.createElement(ge.Provider,{value:r},je.createElement(t,i,o))},t}(je.Component);Ue.propTypes={},Ue.defaultProps={component:"div",childFactory:function(e){return e}};var Ye=Ue;const{green:He}=r,{indigo:$e}=r,{orange:We}=r,{pink:Ge}=r,{red:Ke}=r,Je={TEXT:"black",DISABLED:"grey",DISABLED_SECONDARY:"#ABABAB",CORRECT:He[500],CORRECT_SECONDARY:He[50],CORRECT_TERTIARY:"#0EA449",CORRECT_WITH_ICON:"#087D38",INCORRECT:We[500],INCORRECT_SECONDARY:Ke[50],INCORRECT_WITH_ICON:"#BF0D00",MISSING:Ke[700],MISSING_WITH_ICON:"#6A78A1",PRIMARY:$e[500],PRIMARY_LIGHT:$e[200],PRIMARY_DARK:$e[800],SECONDARY:Ge.A400,SECONDARY_LIGHT:Ge[200],SECONDARY_DARK:Ge[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(Je);const Ve=(Xe="pie",(...e)=>{const t=e.pop();return e.reduceRight((e,t)=>`var(--${Xe}-${t}, ${e})`,t)});var Xe;const Ze=()=>Ve("text",Je.TEXT),Qe=()=>Ve("table-stripe","background-dark",Je.TABLE_STRIPE),et=t,tt=e,{styled:nt}=n,it=nt("div")({transformOrigin:"0% 0px 0px",width:"100%",display:"block",overflow:"hidden","&.incorrect":{color:"#946202"}}),rt=nt("div")({WebkitFontSmoothing:"antialiased",backgroundColor:`var(--feedback-bg-color, ${Ve("disabled",Je.DISABLED)})`,borderRadius:"4px",lineHeight:"25px",margin:"0px",padding:"10px",verticalAlign:"middle",color:"var(--feedback-color, white)","&.correct":{backgroundColor:`var(--feedback-correct-bg-color, ${Ve("correct",Je.CORRECT)})`},"&.incorrect":{backgroundColor:`var(--feedback-incorrect-bg-color, ${Ve("incorrect",Je.INCORRECT)})`}}),ot=nt("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 st extends et.Component{constructor(...e){super(...e),st.prototype.__init.call(this)}static __initStatic(){this.propTypes={correctness:tt.string,feedback:tt.string}}__init(){this.nodeRef=et.createRef()}renderFeedback(){const{correctness:e,feedback:t}=this.props;return e&&t?et.createElement(Be,{key:"hasFeedback",nodeRef:this.nodeRef,timeout:{enter:500,exit:200},classNames:"feedback"},et.createElement(ot,{ref:this.nodeRef},et.createElement(it,null,et.createElement(rt,{className:e,dangerouslySetInnerHTML:{__html:t}})))):null}render(){return et.createElement("div",null,et.createElement(Ye,null,this.renderFeedback()))}}st.__initStatic();const lt=t,at=e,{Popover:ct}=o,{styled:pt}=n,dt=s("pie-libs:render-ui:response-indicators"),ht=pt("div")(({hasFeedback:e})=>({cursor:e?"pointer":"default"})),ut=pt(ct)({cursor:"pointer"}),mt=pt("div")({padding:"0",borderRadius:"4px"}),ft=(e,t)=>{class n extends lt.Component{constructor(e){super(e),n.prototype.__init.call(this),n.prototype.__init2.call(this),this.state={}}__init(){this.handlePopoverOpen=e=>{dt("[handlePopoverOpen]",e.target),this.setState({anchorEl:e.target})}}__init2(){this.handlePopoverClose=()=>{this.setState({anchorEl:null})}}render(){const{feedback:n}=this.props,{anchorEl:i}=this.state;return lt.createElement(ht,{hasFeedback:!!n},lt.createElement("span",{ref:e=>this.icon=e,onClick:this.handlePopoverOpen},lt.createElement(e,null)),n&<.createElement(ut,{PaperComponent:mt,open:!!i,anchorEl:i,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},onClose:this.handlePopoverClose},lt.createElement(st,{feedback:n,correctness:t})))}}return n.propTypes={feedback:at.string},n};ft(T,"correct"),ft(L,"incorrect"),ft(ie,"partially-correct"),ft(Z,"nothing-submitted");const Et=t,{styled:gt}=n,yt=l,bt=e,{renderMath:xt}=c,vt=gt("span")(({theme:e})=>({color:e.palette.primary.light,borderBottom:`1px dotted ${e.palette.primary.light}`,cursor:"pointer"})),Ct=gt(yt)(({theme:e})=>({paddingTop:e.spacing(2)}));class _t extends Et.Component{constructor(...e){super(...e),_t.prototype.__init.call(this),_t.prototype.__init2.call(this)}static __initStatic(){this.propTypes={className:bt.string,children:bt.object,labels:bt.shape({visible:bt.string,hidden:bt.string})}}static __initStatic2(){this.defaultProps={labels:{}}}__init(){this.state={expanded:!1}}__init2(){this.toggleExpanded=()=>{this.setState(e=>({expanded:!e.expanded}))}}componentDidMount(){xt(this.root)}componentDidUpdate(){xt(this.root)}render(){const{labels:e,children:t,className:n}=this.props,i=this.state.expanded?e.visible||"Hide":e.hidden||"Show";return Et.createElement("div",{className:n,ref:e=>this.root=e},Et.createElement("div",{onClick:this.toggleExpanded},Et.createElement(vt,null,i)),Et.createElement(Ct,{in:this.state.expanded,timeout:{enter:225,exit:195},unmountOnExit:!0},t))}}_t.__initStatic(),_t.__initStatic2();const{Button:Rt}=o,{styled:kt}=n;kt("div")({display:"flex",flexDirection:"column"}),kt("div")({display:"flex",alignItems:"center",justifyContent:"center"}),kt("div")(({theme:e})=>({width:"24px",height:"24px",color:"gray",marginRight:e.spacing(1),display:"flex",alignItems:"center"})),kt(Rt)(({theme:e})=>({display:"flex",alignItems:"center",marginLeft:e.spacing(3),marginRight:e.spacing(3)}));const Ot=t,{createTheme:St}=n,{styled:Tt}=n,{StyledEngineProvider:At}=n,{ThemeProvider:Nt}=n,Mt=e;const Dt=St({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"}}}}}}),Bt=Tt("div")({"& table, th, td":{fontSize:"inherit"}});class Ft extends Ot.Component{static __initStatic(){this.propTypes={className:Mt.string,children:Mt.array,extraCSSRules:Mt.shape({names:Mt.arrayOf(Mt.string),rules:Mt.string}),fontSizeFactor:Mt.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),i=t(document.body),r=Math.max(n,i),o=null!=e&&"number"==typeof e?e:1;return 1!==o?{fontSize:r*o+"px"}:null}render(){const{children:e,className:t,fontSizeFactor:n,...i}=this.props,{extraCSSRules:r,...o}=i,s=this.computeStyle(n);return Ot.createElement(At,{injectFirst:!0},Ot.createElement(Nt,{theme:Dt},function(e){let t,n=e[0],i=1;for(;i<e.length;){const r=e[i],o=e[i+1];if(i+=2,("optionalAccess"===r||"optionalCall"===r)&&null==n)return;"access"===r||"optionalAccess"===r?(t=n,n=o(n)):"call"!==r&&"optionalCall"!==r||(n=o((...e)=>n.call(t,...e)),t=void 0)}return n}([r,"optionalAccess",e=>e.rules])?Ot.createElement("style",{dangerouslySetInnerHTML:{__html:`.extraCSSRules { ${r.rules} }`}}):null,Ot.createElement(Bt,{className:`${t} extraCSSRules`,...o,...s&&{style:s}},e)))}}Ft.__initStatic(),Ft.__initStatic2();const Lt=t,{styled:It}=n,wt=e,zt=It(Ft)({display:"flex",flexDirection:"column",position:"relative"});class Pt extends Lt.Component{static __initStatic(){this.propTypes={ariaLabel:wt.string,children:wt.oneOfType([wt.arrayOf(wt.node),wt.node]).isRequired,role:wt.string,extraCSSRules:wt.shape({names:wt.arrayOf(wt.string),rules:wt.string}),fontSizeFactor:wt.number}}render(){const{children:e,ariaLabel:t,role:n,extraCSSRules:i,fontSizeFactor:r,classes:o}=this.props,s=t?{"aria-label":t,role:n}:{};return Lt.createElement(zt,{...s,extraCSSRules:i,fontSizeFactor:r,classes:o},e)}}Pt.__initStatic();const jt=t,qt=e;class Ut extends jt.Component{static __initStatic(){this.propTypes={tag:qt.string,className:qt.string,html:qt.string}}static __initStatic2(){this.defaultProps={tag:"div",html:""}}render(){const{tag:e,className:t,html:n}=this.props,i=e||"div";return jt.createElement(i,{ref:e=>this.node=e,className:t,dangerouslySetInnerHTML:{__html:n}})}}Ut.__initStatic(),Ut.__initStatic2();const{InputLabel:Yt}=o,{FormControl:Ht}=o,$t=e,{styled:Wt}=n;Wt(Ht)(({theme:e})=>({margin:0,padding:0,flex:"1 0 auto",minWidth:e.spacing(4)})),Wt(Yt)(()=>({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)"}})),$t.oneOfType([$t.string,$t.object]).isRequired,$t.string,$t.oneOfType([$t.arrayOf($t.node),$t.node]).isRequired;const Gt=t,{Component:Kt}=t,{styled:Jt}=n,Vt=e,{renderMath:Xt}=c,Zt=Jt("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:Ve("table-grid","text",Je.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:Qe()},'&:not(.MathJax) > table:not([role="presentation"]):has(tbody tr > td:first-child) tbody tr:nth-child(even) td':{backgroundColor:Qe()},'&: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:Ze()},"&.legend":{width:"100%",fontSize:"inherit !important"},"&.rationale":{paddingLeft:e.spacing(4),paddingBottom:e.spacing(1)},"&.prompt-label":{color:`${Ze()} !important`,display:"flex",flexDirection:"column",verticalAlign:"middle",cursor:"pointer","& > p":{margin:"0 0 0 0 !important"}}})),Qt=/\\embed\{newLine\}\[\]/g;class en extends Kt{constructor(...e){super(...e),en.prototype.__init.call(this),en.prototype.__init2.call(this)}static __initStatic(){this.propTypes={prompt:Vt.string,tagName:Vt.string,className:Vt.string,onClick:Vt.func,defaultClassName:Vt.string,autoplayAudioEnabled:Vt.bool,customAudioButton:{playImage:Vt.string,pauseImage:Vt.string}}}static __initStatic2(){this.defaultProps={onClick:()=>{}}}__init(){this.promptRef=Gt.createRef()}__init2(){this.parsedText=e=>{const{autoplayAudioEnabled:t,customAudioButton:n}=this.props,i=document.createElement("div");i.innerHTML=e;const r=i.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 i.innerHTML}}addCustomAudioButtonControls(){const{autoplayAudioEnabled:e,customAudioButton:t}=this.props,n=document.getElementById("play-audio-button"),i=document.getElementById("pie-prompt-audio-player");if(e&&i&&i.play().then(()=>{n&&t&&i.addEventListener("ended",o)}).catch(e=>{n&&t&&(n.style.backgroundImage=`url(${t.playImage})`),console.error("Error playing audio",e)}),!n||!i||!t)return;const r=()=>{i.paused&&i.play()},o=()=>{n.style.backgroundImage=`url(${t.playImage})`},s=()=>{Object.assign(n.style,{backgroundImage:`url(${t.pauseImage})`,border:"1px solid #ccc"})},l=()=>{Object.assign(n.style,{backgroundImage:`url(${t.playImage})`,border:"1px solid #326295"})};n.addEventListener("click",r),i.addEventListener("play",s),i.addEventListener("pause",l),i.addEventListener("ended",o),this._handlePlayClick=r,this._handleAudioPlay=s,this._handleAudioPause=l,this._handleAudioEnded=o}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 Xt&&Xt(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",i=e.parentElement;if("DIV"===i.tagName&&"flex"===i.style.display&&"100%"===i.style.width)i.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),i.replaceChild(t,e)}}}render(){const{prompt:e,tagName:t,className:n,onClick:i,defaultClassName:r}=this.props,o=`${n||""} ${r||""} ${"legend"===t?"legend":""} preview-prompt`.trim();return Gt.createElement(Zt,{as:t||"div",ref:this.promptRef,onClick:i,className:o,tagName:t,dangerouslySetInnerHTML:{__html:this.parsedText(e||"").replace(Qt,"\\newline ")}})}}en.__initStatic(),en.__initStatic2();const tn=e;tn.node,tn.bool;const nn=e;nn.node,nn.string,"undefined"!=typeof window&&new DOMParser,"undefined"!=typeof window&&new DOMParser;const rn=t,{styled:on}=n,{ListItem:sn}=o,{List:ln}=o,an=l,cn=e,pn=on(Ft)({color:Ze(),backgroundColor:Ve("background",Je.BACKGROUND),"&:not(.MathJax) table":{borderCollapse:"collapse"},"&:not(.MathJax) table td, &:not(.MathJax) table th":{padding:"8px 12px",textAlign:"left"},"& ul p, & ol p":{marginBottom:0,marginTop:0,lineHeight:"normal"}}),dn=on(sn)({display:"flex",flexDirection:"column",alignItems:"flex-start",padding:"12px 0px"}),hn=on("div")({color:Ze()}),un=on("h3")({color:Ze(),fontSize:"16px",fontWeight:"700",margin:0,paddingBottom:"6px"}),mn=on("h4")({color:Ze(),fontSize:"16px",fontWeight:"normal",margin:0,paddingBottom:"6px"}),fn=on("h2")(({theme:e})=>({display:"flex",alignItems:"center",cursor:"pointer",userSelect:"none",fontSize:e.typography.fontSize,fontWeight:"500",color:Ve("tertiary",Je.TERTIARY),margin:0})),En=on("span")({display:"inline-flex",transition:"transform 0.2s",marginLeft:2,alignSelf:"center"}),gn=on("h2")({position:"absolute",width:"1px",height:"1px",padding:0,margin:"-1px",overflow:"hidden",clip:"rect(0,0,0,0)",border:0,whiteSpace:"nowrap"}),yn=cn.shape({excludeZero:cn.bool,points:cn.arrayOf(cn.string),sampleAnswers:cn.arrayOf(cn.string),animationsDisabled:cn.bool});class bn extends rn.Component{__init(){this.dudUrl="javascript:;"}constructor(e){super(e),bn.prototype.__init.call(this),bn.prototype.__init2.call(this),this.state={rubricOpen:!1,linkPrefix:"Show"},this.toggleRubric=this.toggleRubric.bind(this)}static __initStatic(){this.propTypes={model:cn.object.isRequired,animationsDisabled:cn.bool,value:yn}}toggleRubric(){this.setState({rubricOpen:!this.state.rubricOpen}),this.setState({linkPrefix:this.state.rubricOpen?"Show":"Hide"})}__init2(){this.shouldRenderPoint=(e,t)=>!t.excludeZero||0!==e}render(){const{model:e,value:t}=this.props;let{animationsDisabled:n}=this.props;if(n=n||t.animationsDisabled,t&&t.points){const{extraCSSRules:i}=e||{},{points:r,sampleAnswers:o}=t,s=rn.createElement(ln,{component:"nav"},r.slice(0).reverse().map((e,n)=>{n=r.length-n-1;const i=t.excludeZero?n+1:n;return rn.createElement(rn.Fragment,{key:n},rn.createElement(dn,{key:`P${n}`},rn.createElement(un,null,1===i?`${i} PT`:`${i} PTS`),rn.createElement(hn,{dangerouslySetInnerHTML:{__html:e}})),o&&o[n]&&rn.createElement(dn,{key:`S${n}`},rn.createElement(mn,null,"Sample Answer"),rn.createElement(hn,{dangerouslySetInnerHTML:{__html:o[n]}})))}));return rn.createElement(pn,{extraCSSRules:i},rn.createElement(gn,null,"Rubric"),n?s:rn.createElement(rn.Fragment,null,rn.createElement(fn,{id:"rubric-toggle",tabIndex:0,role:"button","aria-expanded":this.state.rubricOpen,onClick:this.toggleRubric,onKeyPress:e=>{"Enter"!==e.key&&" "!==e.key||this.toggleRubric()}},this.state.linkPrefix," Rubric",rn.createElement(En,{"aria-hidden":"true"},this.state.rubricOpen?rn.createElement("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},rn.createElement("polyline",{points:"18 15 12 9 6 15"})):rn.createElement("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},rn.createElement("polyline",{points:"6 9 12 15 18 9"})))),rn.createElement(an,{in:this.state.rubricOpen,timeout:{enter:225,exit:195}},s)))}return null}}bn.__initStatic();const xn=t,{createRoot:vn}=a,Cn=s,{renderMath:_n}=c;class Rn extends HTMLElement{constructor(){super(),Rn.prototype.__init.call(this),Cn.log("constructor called"),this.onModelChanged=this.onModelChanged.bind(this),this._root=null,this._mathObserver=null,this._mathRenderPending=!1}__init(){this._scheduleMathRender=()=>{this._mathRenderPending||(this._mathRenderPending=!0,requestAnimationFrame(()=>{this._mathObserver&&this._mathObserver.disconnect(),_n(this),this._mathRenderPending=!1,setTimeout(()=>{this._mathObserver&&this._mathObserver.observe(this,{childList:!0,subtree:!0})},50)}))}}_initMathObserver(){this._mathObserver||(this._mathObserver=new MutationObserver(this._scheduleMathRender),this._mathObserver.observe(this,{childList:!0,subtree:!0}))}_disconnectMathObserver(){this._mathObserver&&(this._mathObserver.disconnect(),this._mathObserver=null)}set model(e){this._model=e,this._render()}onModelChanged(e){this._model=e,this._render()}connectedCallback(){this._initMathObserver(),this._render()}_render(){if(this._model){this._initMathObserver();const e=xn.createElement(bn,{value:this._model});this._root||(this._root=vn(this)),this._root.render(e)}}disconnectedCallback(){this._disconnectMathObserver(),this._root&&this._root.unmount()}}export{Rn as default};
|
package/module/index.html
CHANGED
package/module/manifest.json
CHANGED
package/module/print.html
CHANGED
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 r,_dll_mui__material_colors as i,_dll_mui__material as o,_dll_debug as s,_dll_mui__material_collapse as l,_dll_react_dom_client as a}from"../../../@pie-lib/shared-module@6.0.0/module/index.js";import{_dll_pie_lib__math_rendering as c}from"../../../@pie-lib/math-rendering-module@6.0.0/module/index.js";var p="object"==typeof global&&global&&global.Object===Object&&global,d="object"==typeof self&&self&&self.Object===Object&&self,u=p||d||Function("return this")(),h=u.Symbol,m=Object.prototype,f=m.hasOwnProperty,g=m.toString,E=h?h.toStringTag:void 0;var y=Object.prototype.toString;var b=h?h.toStringTag:void 0;function x(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":b&&b in Object(e)?function(e){var t=f.call(e,E),n=e[E];try{e[E]=void 0;var r=!0}catch(e){}var i=g.call(e);return r&&(t?e[E]=n:delete e[E]),i}(e):function(e){return y.call(e)}(e)}var v=/\s/;var C=/^\s+/;function _(e){return e?e.slice(0,function(e){for(var t=e.length;t--&&v.test(e.charAt(t)););return t}(e)+1).replace(C,""):e}function k(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}var R=/^[-+]0x[0-9a-f]+$/i,S=/^0b[01]+$/i,O=/^0o[0-7]+$/i,T=parseInt;function A(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return null!=e&&"object"==typeof e}(e)&&"[object Symbol]"==x(e)}(e))return NaN;if(k(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=k(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=_(e);var n=S.test(e);return n||O.test(e)?T(e.slice(2),n?2:8):R.test(e)?NaN:+e}var N=function(){return u.Date.now()},D=Math.max,M=Math.min;function B(e,t,n){var r,i,o,s,l,a,c=0,p=!1,d=!1,u=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function h(t){var n=r,o=i;return r=i=void 0,c=t,s=e.apply(o,n)}function m(e){var n=e-a;return void 0===a||n>=t||n<0||d&&e-c>=o}function f(){var e=N();if(m(e))return g(e);l=setTimeout(f,function(e){var n=t-(e-a);return d?M(n,o-(e-c)):n}(e))}function g(e){return l=void 0,u&&r?h(e):(r=i=void 0,s)}function E(){var e=N(),n=m(e);if(r=arguments,i=this,a=e,n){if(void 0===l)return function(e){return c=e,l=setTimeout(f,t),p?h(e):s}(a);if(d)return clearTimeout(l),l=setTimeout(f,t),h(a)}return void 0===l&&(l=setTimeout(f,t)),s}return t=A(t)||0,k(n)&&(p=!!n.leading,o=(d="maxWait"in n)?D(A(n.maxWait)||0,t):o,u="trailing"in n?!!n.trailing:u),E.cancel=function(){void 0!==l&&clearTimeout(l),c=0,r=a=i=l=void 0},E.flush=function(){return void 0===l?s:g(N())},E}const F=t,L=e,I=e=>"string"==typeof e?e:"number"==typeof e?`${e}px`:"30px",w=({size:e,children:t})=>{const n={height:e=I(e),width:e,display:"inline-block",position:"relative"};return F.createElement("div",{style:n},t)};w.propTypes={size:L.number,children:L.oneOfType([L.arrayOf(L.node),L.node]).isRequired};const z=t,P=e,j=({size:e,children:t,sx:n})=>z.createElement(w,{size:e},z.createElement("svg",{preserveAspectRatio:"xMinYMin meet",viewBox:"0 0 44 40",style:{enableBackground:"new 0 0 44 40",...n}},t));j.propTypes={size:P.oneOfType([P.string,P.number]),children:P.oneOfType([P.arrayOf(P.node),P.node]).isRequired,sx:P.object},P.string.isRequired;const q=({fill:e})=>z.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});q.propTypes={fill:P.string.isRequired};const U=({fill:e})=>z.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});U.propTypes={fill:P.string.isRequired};const Y=({fill:e})=>z.createElement("circle",{transform:"translate(-3,0)",cx:"23",cy:"20.4",r:"16",fill:e});Y.propTypes={fill:P.string.isRequired};const H=({fill:e})=>z.createElement("rect",{x:"3.6",y:"4.1",width:"32",height:"32",fill:e});H.propTypes={fill:P.string.isRequired};const $=e,W=t;var G=(e,t)=>{class n extends W.Component{static __initStatic(){this.propTypes={iconSet:$.oneOf(["emoji","check"]),shape:$.oneOf(["round","square"]),category:$.oneOf(["feedback",void 0]),open:$.bool,size:$.oneOfType([$.number,$.string]),fg:$.string,bg:$.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:r,category:i,open:o,size:s,fg:l,bg:a}=this.props,c="check"===n?W.createElement(e,{fill:l}):W.createElement(t,{fill:l}),p="check"===n?W.createElement(e,{fill:a}):W.createElement(t,{fill:a});return o?W.createElement(j,{size:s},p):W.createElement(j,{size:s},"feedback"===i?"round"===r?W.createElement(U,{fill:a}):W.createElement(q,{fill:a}):"round"===r?W.createElement(Y,{fill:a}):W.createElement(H,{fill:a}),c)}}return n.__initStatic(),n.__initStatic2(),n};const K=e,J=t,V=({fill:e})=>J.createElement("g",{transform:"translate(1, 0)"},J.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}),J.createElement("rect",{x:"21.1",y:"13.1",width:"3.7",height:"4.7",fill:e}),J.createElement("rect",{x:"12.7",y:"13.1",width:"3.7",height:"4.7",fill:e}));V.propTypes={fill:K.string.isRequired};const X=({fill:e,x:t=0,y:n=0})=>J.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});X.propTypes={fill:K.string.isRequired,x:K.number,y:K.number};const Z=G(X,V);Z.propTypes={iconSet:K.oneOf(["emoji","check"]),shape:K.oneOf(["round","square"]),category:K.oneOf(["feedback",void 0]),open:K.bool,fg:K.string,bg:K.string,size:K.oneOfType([K.string,K.number])},Z.defaultProps={iconSet:"check",shape:"round",category:void 0,open:!1,fg:"#4aaf46",bg:"#f8ffe2",size:30};const Q=e,{styled:ee}=n;Q.string.isRequired,Q.string.isRequired,Q.string.isRequired,Q.string.isRequired,Q.string.isRequired,ee("div")(({size:e})=>({width:e||"25px",height:e||"25px"})),Q.bool,Q.string;const te=e,ne=t,re=({fill:e})=>ne.createElement("g",{transform:"translate(0.5, 0.5)"},ne.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}),ne.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}));re.propTypes={fill:te.string.isRequired};const ie=({fill:e})=>ne.createElement("g",{transform:"translate(1,0)"},ne.createElement("rect",{x:"21",y:"12.9",width:"3.7",height:"4.7",fill:e}),ne.createElement("rect",{x:"12.7",y:"12.9",width:"3.7",height:"4.7",fill:e}),ne.createElement("rect",{x:"12.2",y:"22.5",width:"13",height:"3.3",fill:e}));ie.propTypes={fill:te.string.isRequired};const oe=G(re,ie);oe.propTypes={iconSet:te.oneOf(["emoji","check"]),shape:te.oneOf(["round","square"]),category:te.oneOf(["feedback",void 0]),open:te.bool,fg:te.string,bg:te.string,size:te.oneOfType([te.string,te.number])},oe.defaultProps={iconSet:"check",shape:"round",category:void 0,open:!1,fg:"#fcb733",bg:"#fbf2e3",size:30};const se=e,le=t,ae=()=>{const e={fill:"none",stroke:"#BCE2FF",strokeWidth:2,strokeMiterlimit:10};return le.createElement("g",null,le.createElement("line",{style:e,x1:"-98",y1:"142",x2:"-114.6",y2:"142"}),le.createElement("line",{style:e,x1:"-98",y1:"146.3",x2:"-114.6",y2:"146.3"}),le.createElement("line",{style:e,x1:"-104",y1:"150.7",x2:"-114.6",y2:"150.7"}))},ce=({children:e,size:t})=>le.createElement(w,{size:t},le.createElement("svg",{version:"1.1",viewBox:"-128 129 31 31",style:{enableBackground:"new -128 129 31 31"}},e));ce.propTypes={children:se.oneOfType([se.arrayOf(se.node),se.node]).isRequired,size:se.number};const pe=()=>le.createElement("g",null,le.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"}),le.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 "}),le.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"}),le.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 "}),le.createElement("rect",{x:"-125.5",y:"134",style:{fill:"#7FABC6"},width:"4.1",height:"4.1"}),le.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 "})),de=()=>le.createElement("g",null,le.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"}),le.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 "}),le.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"}),le.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 "}),le.createElement("rect",{x:"-125.5",y:"134",style:{fill:"#1A9CFF"},width:"4.1",height:"4.1"}),le.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 ue extends le.Component{constructor(e){super(e)}render(){return!0===this.props.open?le.createElement(ce,null,le.createElement(pe,null),le.createElement(ae,null)):le.createElement(ce,null,le.createElement(de,null),le.createElement(ae,null))}}ue.propTypes={open:se.bool},ue.defaultProps={open:!1};const he=e,me=t,fe=({fill:e})=>me.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"});fe.propTypes={fill:he.string};class ge extends me.Component{static __initStatic(){this.propTypes={classes:he.object.isRequired,size:he.number}}render(){const{size:e}=this.props;return!0===this.props.open?me.createElement(w,{size:e},me.createElement("svg",{preserveAspectRatio:"xMinYMin meet",viewBox:"-135 129 16 32"},me.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"}),me.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"}),me.createElement(fe,{fill:"#1A9CFF"}))):me.createElement(w,{size:e},me.createElement("svg",{preserveAspectRatio:"xMinYMin meet",viewBox:"-135 129 16 31"},me.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"}),me.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"}),me.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"}),",",me.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"}),me.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"}),me.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"}),me.createElement(fe,{fill:"1A9CFF"})))}}ge.__initStatic(),ge.propTypes={open:he.bool},ge.defaultProps={open:!1};const Ee=e,ye=t,be=({fill:e})=>ye.createElement("g",null,ye.createElement("rect",{x:"19.3",y:"10.3",width:"4.5",height:"12.7",fill:e}),ye.createElement("rect",{x:"19.3",y:"26.2",width:"4.5",height:"4.5",fill:e}));be.propTypes={fill:Ee.string.isRequired};const xe=({fill:e})=>ye.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});xe.propTypes={fill:Ee.string.isRequired};const ve=({fill:e})=>ye.createElement("g",null,ye.createElement("rect",{x:"23.8",y:"15",width:"3.5",height:"4.4",fill:e}),ye.createElement("rect",{x:"16",y:"15",width:"3.5",height:"4.4",fill:e}),ye.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}));ve.propTypes={fill:Ee.string.isRequired};class Ce extends ye.Component{constructor(e){super(e);const{fg:t="#464146",bg:n="white"}=this.props;this.icons={check:ye.createElement(j,null,ye.createElement(xe,{fill:n}),ye.createElement(be,{fill:t})),emoji:ye.createElement(j,null,ye.createElement(xe,{fill:n}),ye.createElement(ve,{fill:t})),feedback:{check:ye.createElement(j,null,ye.createElement(xe,{fill:n}),ye.createElement(ve,{fill:t})),emoji:ye.createElement(j,null,ye.createElement(xe,{fill:n}),ye.createElement(ve,{fill:t})),square:{check:ye.createElement(j,null,ye.createElement(xe,{fill:n}),ye.createElement(be,{fill:t})),emoji:ye.createElement(j,null,ye.createElement(xe,{fill:n}),ye.createElement(ve,{fill:t})),open:{check:ye.createElement(j,null,ye.createElement(be,{fill:n})),emoji:ye.createElement(j,null,ye.createElement(ve,{fill:n}))}}}}}render(){const{iconSet:e,category:t,shape:n,open:r}=this.props;return void 0===t?this.icons[e]:void 0===n?this.icons.feedback[e]:!0===r?this.icons.feedback.square.open[e]:this.icons.feedback.square[e]}}Ce.propTypes={iconSet:Ee.oneOf(["emoji","check",void 0]),shape:Ee.oneOf(["square",void 0]),category:Ee.oneOf(["feedback",void 0]),open:Ee.bool,fg:Ee.string,bg:Ee.string},Ce.defaultProps={iconSet:"check",shape:void 0,category:void 0,open:!1,fg:"#464146",bg:"white"};const _e=e,ke=t,Re=({fill:e})=>ke.createElement("g",{transform:"translate(0, 0)"},ke.createElement("polygon",{points:"27.5,13.4 23.9,11.4 15.9,25.8 19.1,28.6",fill:e}),ke.createElement("polygon",{points:"16.2,20.6 14.4,19.2 11.8,22.3 14.1,24.3",fill:e}));Re.propTypes={fill:_e.string.isRequired};const Se=({fill:e})=>ke.createElement("g",{transform:"translate(2, 0)"},ke.createElement("rect",{x:"20.6",y:"11.8",width:"4",height:"5",fill:e}),ke.createElement("rect",{x:"11.5",y:"11.8",width:"4",height:"5",fill:e}),ke.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}));Se.propTypes={fill:_e.string.isRequired};const Oe=G(Re,Se);Oe.propTypes={iconSet:_e.oneOf(["emoji","check"]),shape:_e.oneOf(["round","square"]),category:_e.oneOf(["feedback",void 0]),open:_e.bool,fg:_e.string,bg:_e.string,size:_e.oneOfType([_e.string,_e.number])},Oe.defaultProps={iconSet:"check",shape:"round",category:void 0,open:!1,fg:"#4aaf46",bg:"#c1e1ac",size:30};const Te=e,Ae=t,Ne=({fill:e})=>Ae.createElement("g",null,Ae.createElement("rect",{x:"-115",y:"136.7",width:"3",height:"3",fill:e}),Ae.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}));Ne.propTypes={fill:Te.string.isRequired};const De=({fill:e})=>Ae.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});De.propTypes={fill:Te.string.isRequired};const Me=({fill:e="#FFFFFF"})=>Ae.createElement("g",null,Ae.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"}),Ae.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"}),Ae.createElement("circle",{cx:"-113",cy:"144",r:"14",fill:e}));Me.propTypes={fill:Te.string};const Be=({children:e,size:t})=>{const n=I(t),r={height:n,width:n,display:"inline-block",position:"relative"};return Ae.createElement("div",{style:r},Ae.createElement("svg",{preserveAspectRatio:"xMinYMin meet",viewBox:"-129 128 34 34"},e))};Be.propTypes={children:Te.oneOfType([Te.arrayOf(Te.node),Te.node]).isRequired,size:Te.oneOfType([Te.string,Te.number])};class Fe extends Ae.Component{render(){const{iconSet:e,open:t,fg:n="#1a9cff",bg:r="#bce2ff",border:i="#bbe3fd"}=this.props,o=Ae.createElement(Ne,{fill:n}),s={check:Ae.createElement(Be,{size:this.props.size},Ae.createElement(Me,null),o,Ae.createElement(De,{fill:i})),emoji:Ae.createElement(Be,{size:this.props.size},Ae.createElement(Me,null),o,Ae.createElement(De,{fill:i})),open:{check:Ae.createElement(Be,{size:this.props.size},Ae.createElement("circle",{cx:"-113",cy:"144",r:"14",fill:"#FFFFFF"}),Ae.createElement(Ne,{fill:r}),Ae.createElement(De,{fill:"#FFFFFF"})),emoji:Ae.createElement(Be,{size:this.props.size},Ae.createElement("circle",{cx:"-113",cy:"144",r:"14",fill:"#FFFFFF"}),Ae.createElement(Ne,{fill:r}),Ae.createElement(De,{fill:i}))}};return!0===t?s.open[e]:s[e]}}function Le(){return Le=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Le.apply(null,arguments)}function Ie(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}function we(e,t){return we=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},we(e,t)}function ze(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,we(e,t)}function Pe(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}Fe.propTypes={iconSet:Te.oneOf(["emoji","check"]),open:Te.bool,fg:Te.string,bg:Te.string,border:Te.string,size:Te.oneOfType([Te.string,Te.number])},Fe.defaultProps={iconSet:"check",open:!1,fg:"#1a9cff",bg:"#bce2ff",border:"#bbe3fd",size:30};var je=!1;var qe=t.createContext(null),Ue=function(e){return e.scrollTop};const Ye=t,He=r;var $e="unmounted",We="exited",Ge="entering",Ke="entered",Je="exiting",Ve=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var i,o=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?o?(i=We,r.appearStatus=Ge):i=Ke:i=t.unmountOnExit||t.mountOnEnter?$e:We,r.state={status:i},r.nextCallback=null,r}ze(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===$e?{status:We}: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!==Ge&&n!==Ke&&(t=Ge):n!==Ge&&n!==Ke||(t=Je)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!=typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t)if(this.cancelNextCallback(),t===Ge){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:He.findDOMNode(this);n&&Ue(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===We&&this.setState({status:$e})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,i=this.props.nodeRef?[r]:[He.findDOMNode(this),r],o=i[0],s=i[1],l=this.getTimeouts(),a=r?l.appear:l.enter;!e&&!n||je?this.safeSetState({status:Ke},function(){t.props.onEntered(o)}):(this.props.onEnter(o,s),this.safeSetState({status:Ge},function(){t.props.onEntering(o,s),t.onTransitionEnd(a,function(){t.safeSetState({status:Ke},function(){t.props.onEntered(o,s)})})}))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:He.findDOMNode(this);t&&!je?(this.props.onExit(r),this.safeSetState({status:Je},function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,function(){e.safeSetState({status:We},function(){e.props.onExited(r)})})})):this.safeSetState({status:We},function(){e.props.onExited(r)})},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:He.findDOMNode(this),r=null==e&&!this.props.addEndListener;if(n&&!r){if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],o=i[0],s=i[1];this.props.addEndListener(o,s)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if(e===$e)return null;var t=this.props,n=t.children;t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef;var r=Ie(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return Ye.createElement(qe.Provider,{value:null},"function"==typeof n?n(e,r):Ye.cloneElement(Ye.Children.only(n),r))},t}(Ye.Component);function Xe(){}Ve.contextType=qe,Ve.propTypes={},Ve.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Xe,onEntering:Xe,onEntered:Xe,onExit:Xe,onExiting:Xe,onExited:Xe},Ve.UNMOUNTED=$e,Ve.EXITED=We,Ve.ENTERING=Ge,Ve.ENTERED=Ke,Ve.EXITING=Je;var Ze=Ve;const Qe=t;var et=function(e,t){return e&&t&&t.split(" ").forEach(function(t){return r=t,void((n=e).classList?n.classList.add(r):function(e,t){return e.classList?!!t&&e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")}(n,r)||("string"==typeof n.className?n.className=n.className+" "+r:n.setAttribute("class",(n.className&&n.className.baseVal||"")+" "+r)));var n,r})},tt=function(e,t){return e&&t&&t.split(" ").forEach(function(t){return r=t,void((n=e).classList?n.classList.remove(r):"string"==typeof n.className?n.className=Pe(n.className,r):n.setAttribute("class",Pe(n.className&&n.className.baseVal||"",r)));var n,r})},nt=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).appliedClasses={appear:{},enter:{},exit:{}},t.onEnter=function(e,n){var r=t.resolveArguments(e,n),i=r[0],o=r[1];t.removeClasses(i,"exit"),t.addClass(i,o?"appear":"enter","base"),t.props.onEnter&&t.props.onEnter(e,n)},t.onEntering=function(e,n){var r=t.resolveArguments(e,n),i=r[0],o=r[1]?"appear":"enter";t.addClass(i,o,"active"),t.props.onEntering&&t.props.onEntering(e,n)},t.onEntered=function(e,n){var r=t.resolveArguments(e,n),i=r[0],o=r[1]?"appear":"enter";t.removeClasses(i,o),t.addClass(i,o,"done"),t.props.onEntered&&t.props.onEntered(e,n)},t.onExit=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,"appear"),t.removeClasses(n,"enter"),t.addClass(n,"exit","base"),t.props.onExit&&t.props.onExit(e)},t.onExiting=function(e){var n=t.resolveArguments(e)[0];t.addClass(n,"exit","active"),t.props.onExiting&&t.props.onExiting(e)},t.onExited=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,"exit"),t.addClass(n,"exit","done"),t.props.onExited&&t.props.onExited(e)},t.resolveArguments=function(e,n){return t.props.nodeRef?[t.props.nodeRef.current,e]:[e,n]},t.getClassNames=function(e){var n=t.props.classNames,r="string"==typeof n,i=r?""+(r&&n?n+"-":"")+e:n[e];return{baseClassName:i,activeClassName:r?i+"-active":n[e+"Active"],doneClassName:r?i+"-done":n[e+"Done"]}},t}ze(t,e);var n=t.prototype;return n.addClass=function(e,t,n){var r=this.getClassNames(t)[n+"ClassName"],i=this.getClassNames("enter").doneClassName;"appear"===t&&"done"===n&&i&&(r+=" "+i),"active"===n&&e&&Ue(e),r&&(this.appliedClasses[t][n]=r,et(e,r))},n.removeClasses=function(e,t){var n=this.appliedClasses[t],r=n.base,i=n.active,o=n.done;this.appliedClasses[t]={},r&&tt(e,r),i&&tt(e,i),o&&tt(e,o)},n.render=function(){var e=this.props;e.classNames;var t=Ie(e,["classNames"]);return Qe.createElement(Ze,Le({},t,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(Qe.Component);nt.defaultProps={classNames:""},nt.propTypes={};var rt=nt;const{Children:it}=t,{cloneElement:ot}=t,{isValidElement:st}=t;function lt(e,t){var n=Object.create(null);return e&&it.map(e,function(e){return e}).forEach(function(e){n[e.key]=function(e){return t&&st(e)?t(e):e}(e)}),n}function at(e,t,n){return null!=n[t]?n[t]:e.props[t]}function ct(e,t,n){var r=lt(e.children),i=function(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,i=Object.create(null),o=[];for(var s in e)s in t?o.length&&(i[s]=o,o=[]):o.push(s);var l={};for(var a in t){if(i[a])for(r=0;r<i[a].length;r++){var c=i[a][r];l[i[a][r]]=n(c)}l[a]=n(a)}for(r=0;r<o.length;r++)l[o[r]]=n(o[r]);return l}(t,r);return Object.keys(i).forEach(function(o){var s=i[o];if(st(s)){var l=o in t,a=o in r,c=t[o],p=st(c)&&!c.props.in;!a||l&&!p?a||!l||p?a&&l&&st(c)&&(i[o]=ot(s,{onExited:n.bind(null,s),in:c.props.in,exit:at(s,"exit",e),enter:at(s,"enter",e)})):i[o]=ot(s,{in:!1}):i[o]=ot(s,{onExited:n.bind(null,s),in:!0,exit:at(s,"exit",e),enter:at(s,"enter",e)})}}),i}const pt=t;var dt=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},ut=function(e){function t(t,n){var r,i=(r=e.call(this,t,n)||this).handleExited.bind(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(r));return r.state={contextValue:{isMounting:!0},handleExited:i,firstRender:!0},r}ze(t,e);var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(e,t){var n,r,i=t.children,o=t.handleExited;return{children:t.firstRender?(n=e,r=o,lt(n.children,function(e){return ot(e,{onExited:r.bind(null,e),in:!0,appear:at(e,"appear",n),enter:at(e,"enter",n),exit:at(e,"exit",n)})})):ct(e,i,o),firstRender:!1}},n.handleExited=function(e,t){var n=lt(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState(function(t){var n=Le({},t.children);return delete n[e.key],{children:n}}))},n.render=function(){var e=this.props,t=e.component,n=e.childFactory,r=Ie(e,["component","childFactory"]),i=this.state.contextValue,o=dt(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,null===t?pt.createElement(qe.Provider,{value:i},o):pt.createElement(qe.Provider,{value:i},pt.createElement(t,r,o))},t}(pt.Component);ut.propTypes={},ut.defaultProps={component:"div",childFactory:function(e){return e}};var ht=ut;const{green:mt}=i,{indigo:ft}=i,{orange:gt}=i,{pink:Et}=i,{red:yt}=i,bt={TEXT:"black",DISABLED:"grey",DISABLED_SECONDARY:"#ABABAB",CORRECT:mt[500],CORRECT_SECONDARY:mt[50],CORRECT_TERTIARY:"#0EA449",CORRECT_WITH_ICON:"#087D38",INCORRECT:gt[500],INCORRECT_SECONDARY:yt[50],INCORRECT_WITH_ICON:"#BF0D00",MISSING:yt[700],MISSING_WITH_ICON:"#6A78A1",PRIMARY:ft[500],PRIMARY_LIGHT:ft[200],PRIMARY_DARK:ft[800],SECONDARY:Et.A400,SECONDARY_LIGHT:Et[200],SECONDARY_DARK:Et[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(bt);const xt=(vt="pie",(...e)=>{const t=e.pop();return e.reduceRight((e,t)=>`var(--${vt}-${t}, ${e})`,t)});var vt;const Ct=()=>xt("text",bt.TEXT),_t=()=>xt("table-stripe","background-dark",bt.TABLE_STRIPE),kt=t,Rt=e,{styled:St}=n,Ot=St("div")({transformOrigin:"0% 0px 0px",width:"100%",display:"block",overflow:"hidden","&.incorrect":{color:"#946202"}}),Tt=St("div")({WebkitFontSmoothing:"antialiased",backgroundColor:`var(--feedback-bg-color, ${xt("disabled",bt.DISABLED)})`,borderRadius:"4px",lineHeight:"25px",margin:"0px",padding:"10px",verticalAlign:"middle",color:"var(--feedback-color, white)","&.correct":{backgroundColor:`var(--feedback-correct-bg-color, ${xt("correct",bt.CORRECT)})`},"&.incorrect":{backgroundColor:`var(--feedback-incorrect-bg-color, ${xt("incorrect",bt.INCORRECT)})`}}),At=St("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 Nt extends kt.Component{constructor(...e){super(...e),Nt.prototype.__init.call(this)}static __initStatic(){this.propTypes={correctness:Rt.string,feedback:Rt.string}}__init(){this.nodeRef=kt.createRef()}renderFeedback(){const{correctness:e,feedback:t}=this.props;return e&&t?kt.createElement(rt,{key:"hasFeedback",nodeRef:this.nodeRef,timeout:{enter:500,exit:200},classNames:"feedback"},kt.createElement(At,{ref:this.nodeRef},kt.createElement(Ot,null,kt.createElement(Tt,{className:e,dangerouslySetInnerHTML:{__html:t}})))):null}render(){return kt.createElement("div",null,kt.createElement(ht,null,this.renderFeedback()))}}Nt.__initStatic();const Dt=t,Mt=e,{Popover:Bt}=o,{styled:Ft}=n,Lt=s("pie-libs:render-ui:response-indicators"),It=Ft("div")(({hasFeedback:e})=>({cursor:e?"pointer":"default"})),wt=Ft(Bt)({cursor:"pointer"}),zt=Ft("div")({padding:"0",borderRadius:"4px"}),Pt=(e,t)=>{class n extends Dt.Component{constructor(e){super(e),n.prototype.__init.call(this),n.prototype.__init2.call(this),this.state={}}__init(){this.handlePopoverOpen=e=>{Lt("[handlePopoverOpen]",e.target),this.setState({anchorEl:e.target})}}__init2(){this.handlePopoverClose=()=>{this.setState({anchorEl:null})}}render(){const{feedback:n}=this.props,{anchorEl:r}=this.state;return Dt.createElement(It,{hasFeedback:!!n},Dt.createElement("span",{ref:e=>this.icon=e,onClick:this.handlePopoverOpen},Dt.createElement(e,null)),n&&Dt.createElement(wt,{PaperComponent:zt,open:!!r,anchorEl:r,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},onClose:this.handlePopoverClose},Dt.createElement(Nt,{feedback:n,correctness:t})))}}return n.propTypes={feedback:Mt.string},n};Pt(Z,"correct"),Pt(oe,"incorrect"),Pt(Oe,"partially-correct"),Pt(Ce,"nothing-submitted");const jt=t,{styled:qt}=n,Ut=l,Yt=e,{renderMath:Ht}=c,$t=qt("span")(({theme:e})=>({color:e.palette.primary.light,borderBottom:`1px dotted ${e.palette.primary.light}`,cursor:"pointer"})),Wt=qt(Ut)(({theme:e})=>({paddingTop:e.spacing(2)}));class Gt extends jt.Component{constructor(...e){super(...e),Gt.prototype.__init.call(this),Gt.prototype.__init2.call(this)}static __initStatic(){this.propTypes={className:Yt.string,children:Yt.object,labels:Yt.shape({visible:Yt.string,hidden:Yt.string})}}static __initStatic2(){this.defaultProps={labels:{}}}__init(){this.state={expanded:!1}}__init2(){this.toggleExpanded=()=>{this.setState(e=>({expanded:!e.expanded}))}}componentDidMount(){Ht(this.root)}componentDidUpdate(){Ht(this.root)}render(){const{labels:e,children:t,className:n}=this.props,r=this.state.expanded?e.visible||"Hide":e.hidden||"Show";return jt.createElement("div",{className:n,ref:e=>this.root=e},jt.createElement("div",{onClick:this.toggleExpanded},jt.createElement($t,null,r)),jt.createElement(Wt,{in:this.state.expanded,timeout:{enter:225,exit:195},unmountOnExit:!0},t))}}Gt.__initStatic(),Gt.__initStatic2();const{Button:Kt}=o,{styled:Jt}=n;Jt("div")({display:"flex",flexDirection:"column"}),Jt("div")({display:"flex",alignItems:"center",justifyContent:"center"}),Jt("div")(({theme:e})=>({width:"24px",height:"24px",color:"gray",marginRight:e.spacing(1),display:"flex",alignItems:"center"})),Jt(Kt)(({theme:e})=>({display:"flex",alignItems:"center",marginLeft:e.spacing(3),marginRight:e.spacing(3)}));const Vt=t,{createTheme:Xt}=n,{styled:Zt}=n,{StyledEngineProvider:Qt}=n,{ThemeProvider:en}=n,tn=e;const nn=Xt({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"}}}}}}),rn=Zt("div")({"& table, th, td":{fontSize:"inherit"}});class on extends Vt.Component{static __initStatic(){this.propTypes={className:tn.string,children:tn.array,extraCSSRules:tn.shape({names:tn.arrayOf(tn.string),rules:tn.string}),fontSizeFactor:tn.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),r=t(document.body),i=Math.max(n,r),o=null!=e&&"number"==typeof e?e:1;return 1!==o?{fontSize:i*o+"px"}:null}render(){const{children:e,className:t,fontSizeFactor:n,...r}=this.props,{extraCSSRules:i,...o}=r,s=this.computeStyle(n);return Vt.createElement(Qt,{injectFirst:!0},Vt.createElement(en,{theme:nn},function(e){let t,n=e[0],r=1;for(;r<e.length;){const i=e[r],o=e[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(t=n,n=o(n)):"call"!==i&&"optionalCall"!==i||(n=o((...e)=>n.call(t,...e)),t=void 0)}return n}([i,"optionalAccess",e=>e.rules])?Vt.createElement("style",{dangerouslySetInnerHTML:{__html:`.extraCSSRules { ${i.rules} }`}}):null,Vt.createElement(rn,{className:`${t} extraCSSRules`,...o,...s&&{style:s}},e)))}}on.__initStatic(),on.__initStatic2();const sn=t,{styled:ln}=n,an=e,cn=ln(on)({display:"flex",flexDirection:"column",position:"relative"});class pn extends sn.Component{static __initStatic(){this.propTypes={ariaLabel:an.string,children:an.oneOfType([an.arrayOf(an.node),an.node]).isRequired,role:an.string,extraCSSRules:an.shape({names:an.arrayOf(an.string),rules:an.string}),fontSizeFactor:an.number}}render(){const{children:e,ariaLabel:t,role:n,extraCSSRules:r,fontSizeFactor:i,classes:o}=this.props,s=t?{"aria-label":t,role:n}:{};return sn.createElement(cn,{...s,extraCSSRules:r,fontSizeFactor:i,classes:o},e)}}pn.__initStatic();const dn=t,un=e;class hn extends dn.Component{static __initStatic(){this.propTypes={tag:un.string,className:un.string,html:un.string}}static __initStatic2(){this.defaultProps={tag:"div",html:""}}render(){const{tag:e,className:t,html:n}=this.props,r=e||"div";return dn.createElement(r,{ref:e=>this.node=e,className:t,dangerouslySetInnerHTML:{__html:n}})}}hn.__initStatic(),hn.__initStatic2();const{InputLabel:mn}=o,{FormControl:fn}=o,gn=e,{styled:En}=n;En(fn)(({theme:e})=>({margin:0,padding:0,flex:"1 0 auto",minWidth:e.spacing(4)})),En(mn)(()=>({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)"}})),gn.oneOfType([gn.string,gn.object]).isRequired,gn.string,gn.oneOfType([gn.arrayOf(gn.node),gn.node]).isRequired;const yn=t,{Component:bn}=t,{styled:xn}=n,vn=e,{renderMath:Cn}=c,_n=xn("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:xt("table-grid","text",bt.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:_t()},'&:not(.MathJax) > table:not([role="presentation"]):has(tbody tr > td:first-child) tbody tr:nth-child(even) td':{backgroundColor:_t()},'&: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:Ct()},"&.legend":{width:"100%",fontSize:"inherit !important"},"&.rationale":{paddingLeft:e.spacing(4),paddingBottom:e.spacing(1)},"&.prompt-label":{color:`${Ct()} !important`,display:"flex",flexDirection:"column",verticalAlign:"middle",cursor:"pointer","& > p":{margin:"0 0 0 0 !important"}}})),kn=/\\embed\{newLine\}\[\]/g;class Rn extends bn{constructor(...e){super(...e),Rn.prototype.__init.call(this),Rn.prototype.__init2.call(this)}static __initStatic(){this.propTypes={prompt:vn.string,tagName:vn.string,className:vn.string,onClick:vn.func,defaultClassName:vn.string,autoplayAudioEnabled:vn.bool,customAudioButton:{playImage:vn.string,pauseImage:vn.string}}}static __initStatic2(){this.defaultProps={onClick:()=>{}}}__init(){this.promptRef=yn.createRef()}__init2(){this.parsedText=e=>{const{customAudioButton:t}=this.props,n=document.createElement("div");n.innerHTML=e;const r=n.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),t){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.pauseImage})`,backgroundSize:"cover",borderRadius:"50%",border:"1px solid #326295"}),r.parentNode.insertBefore(e,r)}}return n.innerHTML}}addCustomAudioButtonControls(){const{autoplayAudioEnabled:e,customAudioButton:t}=this.props,n=document.getElementById("play-audio-button"),r=document.getElementById("pie-prompt-audio-player");if(e&&r&&r.play().then(()=>{n&&t&&r.addEventListener("ended",o)}).catch(e=>{console.error("Error playing audio",e)}),!n||!r||!t)return;const i=()=>{r.paused&&(n.style.backgroundImage.includes(t.pauseImage)||r.play())},o=()=>{n.style.backgroundImage=`url(${t.playImage})`},s=()=>{Object.assign(n.style,{backgroundImage:`url(${t.pauseImage})`,border:"1px solid #ccc"})},l=()=>{Object.assign(n.style,{backgroundImage:`url(${t.playImage})`,border:"1px solid #326295"})};n.addEventListener("click",i),r.addEventListener("play",s),r.addEventListener("pause",l),r.addEventListener("ended",o),this._handlePlayClick=i,this._handleAudioPlay=s,this._handleAudioPause=l,this._handleAudioEnded=o}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 Cn&&Cn(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",r=e.parentElement;if("DIV"===r.tagName&&"flex"===r.style.display&&"100%"===r.style.width)r.style.justifyContent=n;else{const t=document.createElement("div");t.style.display="flex",t.style.width="100%",t.style.justifyContent=n;const i=e.cloneNode(!0);t.appendChild(i),r.replaceChild(t,e)}}}render(){const{prompt:e,tagName:t,className:n,onClick:r,defaultClassName:i}=this.props,o=`${n||""} ${i||""} ${"legend"===t?"legend":""} preview-prompt`.trim();return yn.createElement(_n,{as:t||"div",ref:this.promptRef,onClick:r,className:o,tagName:t,dangerouslySetInnerHTML:{__html:this.parsedText(e||"").replace(kn,"\\newline ")}})}}Rn.__initStatic(),Rn.__initStatic2();const Sn=e;Sn.node,Sn.bool;const On=e;On.node,On.string,"undefined"!=typeof window&&new DOMParser,"undefined"!=typeof window&&new DOMParser;const Tn=t,{styled:An}=n,{ListItem:Nn}=o,{List:Dn}=o,Mn=l,Bn=e,Fn=An(on)({color:Ct(),backgroundColor:xt("background",bt.BACKGROUND),"&:not(.MathJax) table":{borderCollapse:"collapse"},"&:not(.MathJax) table td, &:not(.MathJax) table th":{padding:"8px 12px",textAlign:"left"},"& ul p, & ol p":{marginBottom:0,marginTop:0,lineHeight:"normal"}}),Ln=An(Nn)({display:"flex",flexDirection:"column",alignItems:"flex-start",padding:"12px 0px"}),In=An("div")({color:Ct()}),wn=An("h3")({color:Ct(),fontSize:"16px",fontWeight:"700",margin:0,paddingBottom:"6px"}),zn=An("h4")({color:Ct(),fontSize:"16px",fontWeight:"normal",margin:0,paddingBottom:"6px"}),Pn=An("h2")(({theme:e})=>({display:"flex",alignItems:"center",cursor:"pointer",userSelect:"none",fontSize:e.typography.fontSize,fontWeight:"500",color:xt("tertiary",bt.TERTIARY),margin:0})),jn=An("span")({display:"inline-flex",transition:"transform 0.2s",marginLeft:2,alignSelf:"center"}),qn=An("h2")({position:"absolute",width:"1px",height:"1px",padding:0,margin:"-1px",overflow:"hidden",clip:"rect(0,0,0,0)",border:0,whiteSpace:"nowrap"}),Un=Bn.shape({excludeZero:Bn.bool,points:Bn.arrayOf(Bn.string),sampleAnswers:Bn.arrayOf(Bn.string),animationsDisabled:Bn.bool});class Yn extends Tn.Component{__init(){this.dudUrl="javascript:;"}constructor(e){super(e),Yn.prototype.__init.call(this),Yn.prototype.__init2.call(this),this.state={rubricOpen:!1,linkPrefix:"Show"},this.toggleRubric=this.toggleRubric.bind(this)}static __initStatic(){this.propTypes={model:Bn.object.isRequired,animationsDisabled:Bn.bool,value:Un}}toggleRubric(){this.setState({rubricOpen:!this.state.rubricOpen}),this.setState({linkPrefix:this.state.rubricOpen?"Show":"Hide"})}__init2(){this.shouldRenderPoint=(e,t)=>!t.excludeZero||0!==e}render(){const{model:e,value:t}=this.props;let{animationsDisabled:n}=this.props;if(n=n||t.animationsDisabled,t&&t.points){const{extraCSSRules:r}=e||{},{points:i,sampleAnswers:o}=t,s=Tn.createElement(Dn,{component:"nav"},i.slice(0).reverse().map((e,n)=>{n=i.length-n-1;const r=t.excludeZero?n+1:n;return Tn.createElement(Tn.Fragment,{key:n},Tn.createElement(Ln,{key:`P${n}`},Tn.createElement(wn,null,1===r?`${r} PT`:`${r} PTS`),Tn.createElement(In,{dangerouslySetInnerHTML:{__html:e}})),o&&o[n]&&Tn.createElement(Ln,{key:`S${n}`},Tn.createElement(zn,null,"Sample Answer"),Tn.createElement(In,{dangerouslySetInnerHTML:{__html:o[n]}})))}));return Tn.createElement(Fn,{extraCSSRules:r},Tn.createElement(qn,null,"Rubric"),n?s:Tn.createElement(Tn.Fragment,null,Tn.createElement(Pn,{id:"rubric-toggle",tabIndex:0,role:"button","aria-expanded":this.state.rubricOpen,onClick:this.toggleRubric,onKeyPress:e=>{"Enter"!==e.key&&" "!==e.key||this.toggleRubric()}},this.state.linkPrefix," Rubric",Tn.createElement(jn,{"aria-hidden":"true"},this.state.rubricOpen?Tn.createElement("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},Tn.createElement("polyline",{points:"18 15 12 9 6 15"})):Tn.createElement("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},Tn.createElement("polyline",{points:"6 9 12 15 18 9"})))),Tn.createElement(Mn,{in:this.state.rubricOpen,timeout:{enter:225,exit:195}},s)))}return null}}Yn.__initStatic();const Hn=t,{createRoot:$n}=a,Wn=s,{renderMath:Gn}=c,Kn=Wn("pie-element:rubric:print");class Jn extends HTMLElement{constructor(){super(),this._options=null,this._model=null,this._session=[],this._root=null,this._rerender=B(()=>{if(this._model&&this._session){const t=(e=this._model,"instructor"===this._options.role?(e.value={...e},e.mode="evaluate",e.animationsDisabled=!0,e):{}),n=this._options&&Hn.createElement(Yn,{...t});this._root||(this._root=$n(this)),this._root.render(n),queueMicrotask(()=>{Kn("render complete - render math"),Gn(this)})}else Kn("skip");var e},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{Jn as default};
|
|
1
|
+
import{_dll_prop_types as e,_dll_react as t,_dll_mui__material_styles as n,_dll_react_dom as r,_dll_mui__material_colors as i,_dll_mui__material as o,_dll_debug as s,_dll_mui__material_collapse as l,_dll_react_dom_client as a}from"../../../@pie-lib/shared-module@6.0.0/module/index.js";import{_dll_pie_lib__math_rendering as c}from"../../../@pie-lib/math-rendering-module@6.0.0/module/index.js";var p="object"==typeof global&&global&&global.Object===Object&&global,d="object"==typeof self&&self&&self.Object===Object&&self,u=p||d||Function("return this")(),h=u.Symbol,m=Object.prototype,f=m.hasOwnProperty,g=m.toString,E=h?h.toStringTag:void 0;var y=Object.prototype.toString;var b=h?h.toStringTag:void 0;function x(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":b&&b in Object(e)?function(e){var t=f.call(e,E),n=e[E];try{e[E]=void 0;var r=!0}catch(e){}var i=g.call(e);return r&&(t?e[E]=n:delete e[E]),i}(e):function(e){return y.call(e)}(e)}var v=/\s/;var C=/^\s+/;function _(e){return e?e.slice(0,function(e){for(var t=e.length;t--&&v.test(e.charAt(t)););return t}(e)+1).replace(C,""):e}function k(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}var R=/^[-+]0x[0-9a-f]+$/i,S=/^0b[01]+$/i,O=/^0o[0-7]+$/i,T=parseInt;function A(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return null!=e&&"object"==typeof e}(e)&&"[object Symbol]"==x(e)}(e))return NaN;if(k(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=k(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=_(e);var n=S.test(e);return n||O.test(e)?T(e.slice(2),n?2:8):R.test(e)?NaN:+e}var N=function(){return u.Date.now()},D=Math.max,M=Math.min;function B(e,t,n){var r,i,o,s,l,a,c=0,p=!1,d=!1,u=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function h(t){var n=r,o=i;return r=i=void 0,c=t,s=e.apply(o,n)}function m(e){var n=e-a;return void 0===a||n>=t||n<0||d&&e-c>=o}function f(){var e=N();if(m(e))return g(e);l=setTimeout(f,function(e){var n=t-(e-a);return d?M(n,o-(e-c)):n}(e))}function g(e){return l=void 0,u&&r?h(e):(r=i=void 0,s)}function E(){var e=N(),n=m(e);if(r=arguments,i=this,a=e,n){if(void 0===l)return function(e){return c=e,l=setTimeout(f,t),p?h(e):s}(a);if(d)return clearTimeout(l),l=setTimeout(f,t),h(a)}return void 0===l&&(l=setTimeout(f,t)),s}return t=A(t)||0,k(n)&&(p=!!n.leading,o=(d="maxWait"in n)?D(A(n.maxWait)||0,t):o,u="trailing"in n?!!n.trailing:u),E.cancel=function(){void 0!==l&&clearTimeout(l),c=0,r=a=i=l=void 0},E.flush=function(){return void 0===l?s:g(N())},E}const F=t,L=e,I=e=>"string"==typeof e?e:"number"==typeof e?`${e}px`:"30px",w=({size:e,children:t})=>{const n={height:e=I(e),width:e,display:"inline-block",position:"relative"};return F.createElement("div",{style:n},t)};w.propTypes={size:L.number,children:L.oneOfType([L.arrayOf(L.node),L.node]).isRequired};const z=t,P=e,j=({size:e,children:t,sx:n})=>z.createElement(w,{size:e},z.createElement("svg",{preserveAspectRatio:"xMinYMin meet",viewBox:"0 0 44 40",style:{enableBackground:"new 0 0 44 40",...n}},t));j.propTypes={size:P.oneOfType([P.string,P.number]),children:P.oneOfType([P.arrayOf(P.node),P.node]).isRequired,sx:P.object},P.string.isRequired;const q=({fill:e})=>z.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});q.propTypes={fill:P.string.isRequired};const U=({fill:e})=>z.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});U.propTypes={fill:P.string.isRequired};const Y=({fill:e})=>z.createElement("circle",{transform:"translate(-3,0)",cx:"23",cy:"20.4",r:"16",fill:e});Y.propTypes={fill:P.string.isRequired};const $=({fill:e})=>z.createElement("rect",{x:"3.6",y:"4.1",width:"32",height:"32",fill:e});$.propTypes={fill:P.string.isRequired};const H=e,W=t;var G=(e,t)=>{class n extends W.Component{static __initStatic(){this.propTypes={iconSet:H.oneOf(["emoji","check"]),shape:H.oneOf(["round","square"]),category:H.oneOf(["feedback",void 0]),open:H.bool,size:H.oneOfType([H.number,H.string]),fg:H.string,bg:H.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:r,category:i,open:o,size:s,fg:l,bg:a}=this.props,c="check"===n?W.createElement(e,{fill:l}):W.createElement(t,{fill:l}),p="check"===n?W.createElement(e,{fill:a}):W.createElement(t,{fill:a});return o?W.createElement(j,{size:s},p):W.createElement(j,{size:s},"feedback"===i?"round"===r?W.createElement(U,{fill:a}):W.createElement(q,{fill:a}):"round"===r?W.createElement(Y,{fill:a}):W.createElement($,{fill:a}),c)}}return n.__initStatic(),n.__initStatic2(),n};const K=e,J=t,V=({fill:e})=>J.createElement("g",{transform:"translate(1, 0)"},J.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}),J.createElement("rect",{x:"21.1",y:"13.1",width:"3.7",height:"4.7",fill:e}),J.createElement("rect",{x:"12.7",y:"13.1",width:"3.7",height:"4.7",fill:e}));V.propTypes={fill:K.string.isRequired};const X=({fill:e,x:t=0,y:n=0})=>J.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});X.propTypes={fill:K.string.isRequired,x:K.number,y:K.number};const Z=G(X,V);Z.propTypes={iconSet:K.oneOf(["emoji","check"]),shape:K.oneOf(["round","square"]),category:K.oneOf(["feedback",void 0]),open:K.bool,fg:K.string,bg:K.string,size:K.oneOfType([K.string,K.number])},Z.defaultProps={iconSet:"check",shape:"round",category:void 0,open:!1,fg:"#4aaf46",bg:"#f8ffe2",size:30};const Q=e,{styled:ee}=n;Q.string.isRequired,Q.string.isRequired,Q.string.isRequired,Q.string.isRequired,Q.string.isRequired,ee("div")(({size:e})=>({width:e||"25px",height:e||"25px"})),Q.bool,Q.string;const te=e,ne=t,re=({fill:e})=>ne.createElement("g",{transform:"translate(0.5, 0.5)"},ne.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}),ne.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}));re.propTypes={fill:te.string.isRequired};const ie=({fill:e})=>ne.createElement("g",{transform:"translate(1,0)"},ne.createElement("rect",{x:"21",y:"12.9",width:"3.7",height:"4.7",fill:e}),ne.createElement("rect",{x:"12.7",y:"12.9",width:"3.7",height:"4.7",fill:e}),ne.createElement("rect",{x:"12.2",y:"22.5",width:"13",height:"3.3",fill:e}));ie.propTypes={fill:te.string.isRequired};const oe=G(re,ie);oe.propTypes={iconSet:te.oneOf(["emoji","check"]),shape:te.oneOf(["round","square"]),category:te.oneOf(["feedback",void 0]),open:te.bool,fg:te.string,bg:te.string,size:te.oneOfType([te.string,te.number])},oe.defaultProps={iconSet:"check",shape:"round",category:void 0,open:!1,fg:"#fcb733",bg:"#fbf2e3",size:30};const se=e,le=t,ae=()=>{const e={fill:"none",stroke:"#BCE2FF",strokeWidth:2,strokeMiterlimit:10};return le.createElement("g",null,le.createElement("line",{style:e,x1:"-98",y1:"142",x2:"-114.6",y2:"142"}),le.createElement("line",{style:e,x1:"-98",y1:"146.3",x2:"-114.6",y2:"146.3"}),le.createElement("line",{style:e,x1:"-104",y1:"150.7",x2:"-114.6",y2:"150.7"}))},ce=({children:e,size:t})=>le.createElement(w,{size:t},le.createElement("svg",{version:"1.1",viewBox:"-128 129 31 31",style:{enableBackground:"new -128 129 31 31"}},e));ce.propTypes={children:se.oneOfType([se.arrayOf(se.node),se.node]).isRequired,size:se.number};const pe=()=>le.createElement("g",null,le.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"}),le.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 "}),le.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"}),le.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 "}),le.createElement("rect",{x:"-125.5",y:"134",style:{fill:"#7FABC6"},width:"4.1",height:"4.1"}),le.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 "})),de=()=>le.createElement("g",null,le.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"}),le.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 "}),le.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"}),le.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 "}),le.createElement("rect",{x:"-125.5",y:"134",style:{fill:"#1A9CFF"},width:"4.1",height:"4.1"}),le.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 ue extends le.Component{constructor(e){super(e)}render(){return!0===this.props.open?le.createElement(ce,null,le.createElement(pe,null),le.createElement(ae,null)):le.createElement(ce,null,le.createElement(de,null),le.createElement(ae,null))}}ue.propTypes={open:se.bool},ue.defaultProps={open:!1};const he=e,me=t,fe=({fill:e})=>me.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"});fe.propTypes={fill:he.string};class ge extends me.Component{static __initStatic(){this.propTypes={classes:he.object.isRequired,size:he.number}}render(){const{size:e}=this.props;return!0===this.props.open?me.createElement(w,{size:e},me.createElement("svg",{preserveAspectRatio:"xMinYMin meet",viewBox:"-135 129 16 32"},me.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"}),me.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"}),me.createElement(fe,{fill:"#1A9CFF"}))):me.createElement(w,{size:e},me.createElement("svg",{preserveAspectRatio:"xMinYMin meet",viewBox:"-135 129 16 31"},me.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"}),me.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"}),me.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"}),",",me.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"}),me.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"}),me.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"}),me.createElement(fe,{fill:"1A9CFF"})))}}ge.__initStatic(),ge.propTypes={open:he.bool},ge.defaultProps={open:!1};const Ee=e,ye=t,be=({fill:e})=>ye.createElement("g",null,ye.createElement("rect",{x:"19.3",y:"10.3",width:"4.5",height:"12.7",fill:e}),ye.createElement("rect",{x:"19.3",y:"26.2",width:"4.5",height:"4.5",fill:e}));be.propTypes={fill:Ee.string.isRequired};const xe=({fill:e})=>ye.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});xe.propTypes={fill:Ee.string.isRequired};const ve=({fill:e})=>ye.createElement("g",null,ye.createElement("rect",{x:"23.8",y:"15",width:"3.5",height:"4.4",fill:e}),ye.createElement("rect",{x:"16",y:"15",width:"3.5",height:"4.4",fill:e}),ye.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}));ve.propTypes={fill:Ee.string.isRequired};class Ce extends ye.Component{constructor(e){super(e);const{fg:t="#464146",bg:n="white"}=this.props;this.icons={check:ye.createElement(j,null,ye.createElement(xe,{fill:n}),ye.createElement(be,{fill:t})),emoji:ye.createElement(j,null,ye.createElement(xe,{fill:n}),ye.createElement(ve,{fill:t})),feedback:{check:ye.createElement(j,null,ye.createElement(xe,{fill:n}),ye.createElement(ve,{fill:t})),emoji:ye.createElement(j,null,ye.createElement(xe,{fill:n}),ye.createElement(ve,{fill:t})),square:{check:ye.createElement(j,null,ye.createElement(xe,{fill:n}),ye.createElement(be,{fill:t})),emoji:ye.createElement(j,null,ye.createElement(xe,{fill:n}),ye.createElement(ve,{fill:t})),open:{check:ye.createElement(j,null,ye.createElement(be,{fill:n})),emoji:ye.createElement(j,null,ye.createElement(ve,{fill:n}))}}}}}render(){const{iconSet:e,category:t,shape:n,open:r}=this.props;return void 0===t?this.icons[e]:void 0===n?this.icons.feedback[e]:!0===r?this.icons.feedback.square.open[e]:this.icons.feedback.square[e]}}Ce.propTypes={iconSet:Ee.oneOf(["emoji","check",void 0]),shape:Ee.oneOf(["square",void 0]),category:Ee.oneOf(["feedback",void 0]),open:Ee.bool,fg:Ee.string,bg:Ee.string},Ce.defaultProps={iconSet:"check",shape:void 0,category:void 0,open:!1,fg:"#464146",bg:"white"};const _e=e,ke=t,Re=({fill:e})=>ke.createElement("g",{transform:"translate(0, 0)"},ke.createElement("polygon",{points:"27.5,13.4 23.9,11.4 15.9,25.8 19.1,28.6",fill:e}),ke.createElement("polygon",{points:"16.2,20.6 14.4,19.2 11.8,22.3 14.1,24.3",fill:e}));Re.propTypes={fill:_e.string.isRequired};const Se=({fill:e})=>ke.createElement("g",{transform:"translate(2, 0)"},ke.createElement("rect",{x:"20.6",y:"11.8",width:"4",height:"5",fill:e}),ke.createElement("rect",{x:"11.5",y:"11.8",width:"4",height:"5",fill:e}),ke.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}));Se.propTypes={fill:_e.string.isRequired};const Oe=G(Re,Se);Oe.propTypes={iconSet:_e.oneOf(["emoji","check"]),shape:_e.oneOf(["round","square"]),category:_e.oneOf(["feedback",void 0]),open:_e.bool,fg:_e.string,bg:_e.string,size:_e.oneOfType([_e.string,_e.number])},Oe.defaultProps={iconSet:"check",shape:"round",category:void 0,open:!1,fg:"#4aaf46",bg:"#c1e1ac",size:30};const Te=e,Ae=t,Ne=({fill:e})=>Ae.createElement("g",null,Ae.createElement("rect",{x:"-115",y:"136.7",width:"3",height:"3",fill:e}),Ae.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}));Ne.propTypes={fill:Te.string.isRequired};const De=({fill:e})=>Ae.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});De.propTypes={fill:Te.string.isRequired};const Me=({fill:e="#FFFFFF"})=>Ae.createElement("g",null,Ae.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"}),Ae.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"}),Ae.createElement("circle",{cx:"-113",cy:"144",r:"14",fill:e}));Me.propTypes={fill:Te.string};const Be=({children:e,size:t})=>{const n=I(t),r={height:n,width:n,display:"inline-block",position:"relative"};return Ae.createElement("div",{style:r},Ae.createElement("svg",{preserveAspectRatio:"xMinYMin meet",viewBox:"-129 128 34 34"},e))};Be.propTypes={children:Te.oneOfType([Te.arrayOf(Te.node),Te.node]).isRequired,size:Te.oneOfType([Te.string,Te.number])};class Fe extends Ae.Component{render(){const{iconSet:e,open:t,fg:n="#1a9cff",bg:r="#bce2ff",border:i="#bbe3fd"}=this.props,o=Ae.createElement(Ne,{fill:n}),s={check:Ae.createElement(Be,{size:this.props.size},Ae.createElement(Me,null),o,Ae.createElement(De,{fill:i})),emoji:Ae.createElement(Be,{size:this.props.size},Ae.createElement(Me,null),o,Ae.createElement(De,{fill:i})),open:{check:Ae.createElement(Be,{size:this.props.size},Ae.createElement("circle",{cx:"-113",cy:"144",r:"14",fill:"#FFFFFF"}),Ae.createElement(Ne,{fill:r}),Ae.createElement(De,{fill:"#FFFFFF"})),emoji:Ae.createElement(Be,{size:this.props.size},Ae.createElement("circle",{cx:"-113",cy:"144",r:"14",fill:"#FFFFFF"}),Ae.createElement(Ne,{fill:r}),Ae.createElement(De,{fill:i}))}};return!0===t?s.open[e]:s[e]}}function Le(){return Le=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Le.apply(null,arguments)}function Ie(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}function we(e,t){return we=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},we(e,t)}function ze(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,we(e,t)}function Pe(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}Fe.propTypes={iconSet:Te.oneOf(["emoji","check"]),open:Te.bool,fg:Te.string,bg:Te.string,border:Te.string,size:Te.oneOfType([Te.string,Te.number])},Fe.defaultProps={iconSet:"check",open:!1,fg:"#1a9cff",bg:"#bce2ff",border:"#bbe3fd",size:30};var je=!1;var qe=t.createContext(null),Ue=function(e){return e.scrollTop};const Ye=t,$e=r;var He="unmounted",We="exited",Ge="entering",Ke="entered",Je="exiting",Ve=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var i,o=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?o?(i=We,r.appearStatus=Ge):i=Ke:i=t.unmountOnExit||t.mountOnEnter?He:We,r.state={status:i},r.nextCallback=null,r}ze(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===He?{status:We}: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!==Ge&&n!==Ke&&(t=Ge):n!==Ge&&n!==Ke||(t=Je)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!=typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t)if(this.cancelNextCallback(),t===Ge){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:$e.findDOMNode(this);n&&Ue(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===We&&this.setState({status:He})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,i=this.props.nodeRef?[r]:[$e.findDOMNode(this),r],o=i[0],s=i[1],l=this.getTimeouts(),a=r?l.appear:l.enter;!e&&!n||je?this.safeSetState({status:Ke},function(){t.props.onEntered(o)}):(this.props.onEnter(o,s),this.safeSetState({status:Ge},function(){t.props.onEntering(o,s),t.onTransitionEnd(a,function(){t.safeSetState({status:Ke},function(){t.props.onEntered(o,s)})})}))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:$e.findDOMNode(this);t&&!je?(this.props.onExit(r),this.safeSetState({status:Je},function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,function(){e.safeSetState({status:We},function(){e.props.onExited(r)})})})):this.safeSetState({status:We},function(){e.props.onExited(r)})},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:$e.findDOMNode(this),r=null==e&&!this.props.addEndListener;if(n&&!r){if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],o=i[0],s=i[1];this.props.addEndListener(o,s)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if(e===He)return null;var t=this.props,n=t.children;t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef;var r=Ie(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return Ye.createElement(qe.Provider,{value:null},"function"==typeof n?n(e,r):Ye.cloneElement(Ye.Children.only(n),r))},t}(Ye.Component);function Xe(){}Ve.contextType=qe,Ve.propTypes={},Ve.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Xe,onEntering:Xe,onEntered:Xe,onExit:Xe,onExiting:Xe,onExited:Xe},Ve.UNMOUNTED=He,Ve.EXITED=We,Ve.ENTERING=Ge,Ve.ENTERED=Ke,Ve.EXITING=Je;var Ze=Ve;const Qe=t;var et=function(e,t){return e&&t&&t.split(" ").forEach(function(t){return r=t,void((n=e).classList?n.classList.add(r):function(e,t){return e.classList?!!t&&e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")}(n,r)||("string"==typeof n.className?n.className=n.className+" "+r:n.setAttribute("class",(n.className&&n.className.baseVal||"")+" "+r)));var n,r})},tt=function(e,t){return e&&t&&t.split(" ").forEach(function(t){return r=t,void((n=e).classList?n.classList.remove(r):"string"==typeof n.className?n.className=Pe(n.className,r):n.setAttribute("class",Pe(n.className&&n.className.baseVal||"",r)));var n,r})},nt=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).appliedClasses={appear:{},enter:{},exit:{}},t.onEnter=function(e,n){var r=t.resolveArguments(e,n),i=r[0],o=r[1];t.removeClasses(i,"exit"),t.addClass(i,o?"appear":"enter","base"),t.props.onEnter&&t.props.onEnter(e,n)},t.onEntering=function(e,n){var r=t.resolveArguments(e,n),i=r[0],o=r[1]?"appear":"enter";t.addClass(i,o,"active"),t.props.onEntering&&t.props.onEntering(e,n)},t.onEntered=function(e,n){var r=t.resolveArguments(e,n),i=r[0],o=r[1]?"appear":"enter";t.removeClasses(i,o),t.addClass(i,o,"done"),t.props.onEntered&&t.props.onEntered(e,n)},t.onExit=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,"appear"),t.removeClasses(n,"enter"),t.addClass(n,"exit","base"),t.props.onExit&&t.props.onExit(e)},t.onExiting=function(e){var n=t.resolveArguments(e)[0];t.addClass(n,"exit","active"),t.props.onExiting&&t.props.onExiting(e)},t.onExited=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,"exit"),t.addClass(n,"exit","done"),t.props.onExited&&t.props.onExited(e)},t.resolveArguments=function(e,n){return t.props.nodeRef?[t.props.nodeRef.current,e]:[e,n]},t.getClassNames=function(e){var n=t.props.classNames,r="string"==typeof n,i=r?""+(r&&n?n+"-":"")+e:n[e];return{baseClassName:i,activeClassName:r?i+"-active":n[e+"Active"],doneClassName:r?i+"-done":n[e+"Done"]}},t}ze(t,e);var n=t.prototype;return n.addClass=function(e,t,n){var r=this.getClassNames(t)[n+"ClassName"],i=this.getClassNames("enter").doneClassName;"appear"===t&&"done"===n&&i&&(r+=" "+i),"active"===n&&e&&Ue(e),r&&(this.appliedClasses[t][n]=r,et(e,r))},n.removeClasses=function(e,t){var n=this.appliedClasses[t],r=n.base,i=n.active,o=n.done;this.appliedClasses[t]={},r&&tt(e,r),i&&tt(e,i),o&&tt(e,o)},n.render=function(){var e=this.props;e.classNames;var t=Ie(e,["classNames"]);return Qe.createElement(Ze,Le({},t,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(Qe.Component);nt.defaultProps={classNames:""},nt.propTypes={};var rt=nt;const{Children:it}=t,{cloneElement:ot}=t,{isValidElement:st}=t;function lt(e,t){var n=Object.create(null);return e&&it.map(e,function(e){return e}).forEach(function(e){n[e.key]=function(e){return t&&st(e)?t(e):e}(e)}),n}function at(e,t,n){return null!=n[t]?n[t]:e.props[t]}function ct(e,t,n){var r=lt(e.children),i=function(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,i=Object.create(null),o=[];for(var s in e)s in t?o.length&&(i[s]=o,o=[]):o.push(s);var l={};for(var a in t){if(i[a])for(r=0;r<i[a].length;r++){var c=i[a][r];l[i[a][r]]=n(c)}l[a]=n(a)}for(r=0;r<o.length;r++)l[o[r]]=n(o[r]);return l}(t,r);return Object.keys(i).forEach(function(o){var s=i[o];if(st(s)){var l=o in t,a=o in r,c=t[o],p=st(c)&&!c.props.in;!a||l&&!p?a||!l||p?a&&l&&st(c)&&(i[o]=ot(s,{onExited:n.bind(null,s),in:c.props.in,exit:at(s,"exit",e),enter:at(s,"enter",e)})):i[o]=ot(s,{in:!1}):i[o]=ot(s,{onExited:n.bind(null,s),in:!0,exit:at(s,"exit",e),enter:at(s,"enter",e)})}}),i}const pt=t;var dt=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},ut=function(e){function t(t,n){var r,i=(r=e.call(this,t,n)||this).handleExited.bind(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(r));return r.state={contextValue:{isMounting:!0},handleExited:i,firstRender:!0},r}ze(t,e);var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(e,t){var n,r,i=t.children,o=t.handleExited;return{children:t.firstRender?(n=e,r=o,lt(n.children,function(e){return ot(e,{onExited:r.bind(null,e),in:!0,appear:at(e,"appear",n),enter:at(e,"enter",n),exit:at(e,"exit",n)})})):ct(e,i,o),firstRender:!1}},n.handleExited=function(e,t){var n=lt(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState(function(t){var n=Le({},t.children);return delete n[e.key],{children:n}}))},n.render=function(){var e=this.props,t=e.component,n=e.childFactory,r=Ie(e,["component","childFactory"]),i=this.state.contextValue,o=dt(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,null===t?pt.createElement(qe.Provider,{value:i},o):pt.createElement(qe.Provider,{value:i},pt.createElement(t,r,o))},t}(pt.Component);ut.propTypes={},ut.defaultProps={component:"div",childFactory:function(e){return e}};var ht=ut;const{green:mt}=i,{indigo:ft}=i,{orange:gt}=i,{pink:Et}=i,{red:yt}=i,bt={TEXT:"black",DISABLED:"grey",DISABLED_SECONDARY:"#ABABAB",CORRECT:mt[500],CORRECT_SECONDARY:mt[50],CORRECT_TERTIARY:"#0EA449",CORRECT_WITH_ICON:"#087D38",INCORRECT:gt[500],INCORRECT_SECONDARY:yt[50],INCORRECT_WITH_ICON:"#BF0D00",MISSING:yt[700],MISSING_WITH_ICON:"#6A78A1",PRIMARY:ft[500],PRIMARY_LIGHT:ft[200],PRIMARY_DARK:ft[800],SECONDARY:Et.A400,SECONDARY_LIGHT:Et[200],SECONDARY_DARK:Et[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(bt);const xt=(vt="pie",(...e)=>{const t=e.pop();return e.reduceRight((e,t)=>`var(--${vt}-${t}, ${e})`,t)});var vt;const Ct=()=>xt("text",bt.TEXT),_t=()=>xt("table-stripe","background-dark",bt.TABLE_STRIPE),kt=t,Rt=e,{styled:St}=n,Ot=St("div")({transformOrigin:"0% 0px 0px",width:"100%",display:"block",overflow:"hidden","&.incorrect":{color:"#946202"}}),Tt=St("div")({WebkitFontSmoothing:"antialiased",backgroundColor:`var(--feedback-bg-color, ${xt("disabled",bt.DISABLED)})`,borderRadius:"4px",lineHeight:"25px",margin:"0px",padding:"10px",verticalAlign:"middle",color:"var(--feedback-color, white)","&.correct":{backgroundColor:`var(--feedback-correct-bg-color, ${xt("correct",bt.CORRECT)})`},"&.incorrect":{backgroundColor:`var(--feedback-incorrect-bg-color, ${xt("incorrect",bt.INCORRECT)})`}}),At=St("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 Nt extends kt.Component{constructor(...e){super(...e),Nt.prototype.__init.call(this)}static __initStatic(){this.propTypes={correctness:Rt.string,feedback:Rt.string}}__init(){this.nodeRef=kt.createRef()}renderFeedback(){const{correctness:e,feedback:t}=this.props;return e&&t?kt.createElement(rt,{key:"hasFeedback",nodeRef:this.nodeRef,timeout:{enter:500,exit:200},classNames:"feedback"},kt.createElement(At,{ref:this.nodeRef},kt.createElement(Ot,null,kt.createElement(Tt,{className:e,dangerouslySetInnerHTML:{__html:t}})))):null}render(){return kt.createElement("div",null,kt.createElement(ht,null,this.renderFeedback()))}}Nt.__initStatic();const Dt=t,Mt=e,{Popover:Bt}=o,{styled:Ft}=n,Lt=s("pie-libs:render-ui:response-indicators"),It=Ft("div")(({hasFeedback:e})=>({cursor:e?"pointer":"default"})),wt=Ft(Bt)({cursor:"pointer"}),zt=Ft("div")({padding:"0",borderRadius:"4px"}),Pt=(e,t)=>{class n extends Dt.Component{constructor(e){super(e),n.prototype.__init.call(this),n.prototype.__init2.call(this),this.state={}}__init(){this.handlePopoverOpen=e=>{Lt("[handlePopoverOpen]",e.target),this.setState({anchorEl:e.target})}}__init2(){this.handlePopoverClose=()=>{this.setState({anchorEl:null})}}render(){const{feedback:n}=this.props,{anchorEl:r}=this.state;return Dt.createElement(It,{hasFeedback:!!n},Dt.createElement("span",{ref:e=>this.icon=e,onClick:this.handlePopoverOpen},Dt.createElement(e,null)),n&&Dt.createElement(wt,{PaperComponent:zt,open:!!r,anchorEl:r,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},onClose:this.handlePopoverClose},Dt.createElement(Nt,{feedback:n,correctness:t})))}}return n.propTypes={feedback:Mt.string},n};Pt(Z,"correct"),Pt(oe,"incorrect"),Pt(Oe,"partially-correct"),Pt(Ce,"nothing-submitted");const jt=t,{styled:qt}=n,Ut=l,Yt=e,{renderMath:$t}=c,Ht=qt("span")(({theme:e})=>({color:e.palette.primary.light,borderBottom:`1px dotted ${e.palette.primary.light}`,cursor:"pointer"})),Wt=qt(Ut)(({theme:e})=>({paddingTop:e.spacing(2)}));class Gt extends jt.Component{constructor(...e){super(...e),Gt.prototype.__init.call(this),Gt.prototype.__init2.call(this)}static __initStatic(){this.propTypes={className:Yt.string,children:Yt.object,labels:Yt.shape({visible:Yt.string,hidden:Yt.string})}}static __initStatic2(){this.defaultProps={labels:{}}}__init(){this.state={expanded:!1}}__init2(){this.toggleExpanded=()=>{this.setState(e=>({expanded:!e.expanded}))}}componentDidMount(){$t(this.root)}componentDidUpdate(){$t(this.root)}render(){const{labels:e,children:t,className:n}=this.props,r=this.state.expanded?e.visible||"Hide":e.hidden||"Show";return jt.createElement("div",{className:n,ref:e=>this.root=e},jt.createElement("div",{onClick:this.toggleExpanded},jt.createElement(Ht,null,r)),jt.createElement(Wt,{in:this.state.expanded,timeout:{enter:225,exit:195},unmountOnExit:!0},t))}}Gt.__initStatic(),Gt.__initStatic2();const{Button:Kt}=o,{styled:Jt}=n;Jt("div")({display:"flex",flexDirection:"column"}),Jt("div")({display:"flex",alignItems:"center",justifyContent:"center"}),Jt("div")(({theme:e})=>({width:"24px",height:"24px",color:"gray",marginRight:e.spacing(1),display:"flex",alignItems:"center"})),Jt(Kt)(({theme:e})=>({display:"flex",alignItems:"center",marginLeft:e.spacing(3),marginRight:e.spacing(3)}));const Vt=t,{createTheme:Xt}=n,{styled:Zt}=n,{StyledEngineProvider:Qt}=n,{ThemeProvider:en}=n,tn=e;const nn=Xt({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"}}}}}}),rn=Zt("div")({"& table, th, td":{fontSize:"inherit"}});class on extends Vt.Component{static __initStatic(){this.propTypes={className:tn.string,children:tn.array,extraCSSRules:tn.shape({names:tn.arrayOf(tn.string),rules:tn.string}),fontSizeFactor:tn.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),r=t(document.body),i=Math.max(n,r),o=null!=e&&"number"==typeof e?e:1;return 1!==o?{fontSize:i*o+"px"}:null}render(){const{children:e,className:t,fontSizeFactor:n,...r}=this.props,{extraCSSRules:i,...o}=r,s=this.computeStyle(n);return Vt.createElement(Qt,{injectFirst:!0},Vt.createElement(en,{theme:nn},function(e){let t,n=e[0],r=1;for(;r<e.length;){const i=e[r],o=e[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(t=n,n=o(n)):"call"!==i&&"optionalCall"!==i||(n=o((...e)=>n.call(t,...e)),t=void 0)}return n}([i,"optionalAccess",e=>e.rules])?Vt.createElement("style",{dangerouslySetInnerHTML:{__html:`.extraCSSRules { ${i.rules} }`}}):null,Vt.createElement(rn,{className:`${t} extraCSSRules`,...o,...s&&{style:s}},e)))}}on.__initStatic(),on.__initStatic2();const sn=t,{styled:ln}=n,an=e,cn=ln(on)({display:"flex",flexDirection:"column",position:"relative"});class pn extends sn.Component{static __initStatic(){this.propTypes={ariaLabel:an.string,children:an.oneOfType([an.arrayOf(an.node),an.node]).isRequired,role:an.string,extraCSSRules:an.shape({names:an.arrayOf(an.string),rules:an.string}),fontSizeFactor:an.number}}render(){const{children:e,ariaLabel:t,role:n,extraCSSRules:r,fontSizeFactor:i,classes:o}=this.props,s=t?{"aria-label":t,role:n}:{};return sn.createElement(cn,{...s,extraCSSRules:r,fontSizeFactor:i,classes:o},e)}}pn.__initStatic();const dn=t,un=e;class hn extends dn.Component{static __initStatic(){this.propTypes={tag:un.string,className:un.string,html:un.string}}static __initStatic2(){this.defaultProps={tag:"div",html:""}}render(){const{tag:e,className:t,html:n}=this.props,r=e||"div";return dn.createElement(r,{ref:e=>this.node=e,className:t,dangerouslySetInnerHTML:{__html:n}})}}hn.__initStatic(),hn.__initStatic2();const{InputLabel:mn}=o,{FormControl:fn}=o,gn=e,{styled:En}=n;En(fn)(({theme:e})=>({margin:0,padding:0,flex:"1 0 auto",minWidth:e.spacing(4)})),En(mn)(()=>({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)"}})),gn.oneOfType([gn.string,gn.object]).isRequired,gn.string,gn.oneOfType([gn.arrayOf(gn.node),gn.node]).isRequired;const yn=t,{Component:bn}=t,{styled:xn}=n,vn=e,{renderMath:Cn}=c,_n=xn("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:xt("table-grid","text",bt.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:_t()},'&:not(.MathJax) > table:not([role="presentation"]):has(tbody tr > td:first-child) tbody tr:nth-child(even) td':{backgroundColor:_t()},'&: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:Ct()},"&.legend":{width:"100%",fontSize:"inherit !important"},"&.rationale":{paddingLeft:e.spacing(4),paddingBottom:e.spacing(1)},"&.prompt-label":{color:`${Ct()} !important`,display:"flex",flexDirection:"column",verticalAlign:"middle",cursor:"pointer","& > p":{margin:"0 0 0 0 !important"}}})),kn=/\\embed\{newLine\}\[\]/g;class Rn extends bn{constructor(...e){super(...e),Rn.prototype.__init.call(this),Rn.prototype.__init2.call(this)}static __initStatic(){this.propTypes={prompt:vn.string,tagName:vn.string,className:vn.string,onClick:vn.func,defaultClassName:vn.string,autoplayAudioEnabled:vn.bool,customAudioButton:{playImage:vn.string,pauseImage:vn.string}}}static __initStatic2(){this.defaultProps={onClick:()=>{}}}__init(){this.promptRef=yn.createRef()}__init2(){this.parsedText=e=>{const{autoplayAudioEnabled:t,customAudioButton:n}=this.props,r=document.createElement("div");r.innerHTML=e;const i=r.querySelector("audio");if(i){const e=document.createElement("source");if(e.setAttribute("type","audio/mp3"),e.setAttribute("src",i.getAttribute("src")),i.removeAttribute("src"),i.setAttribute("id","pie-prompt-audio-player"),i.appendChild(e),n){i.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"}),i.parentNode.insertBefore(e,i)}}return r.innerHTML}}addCustomAudioButtonControls(){const{autoplayAudioEnabled:e,customAudioButton:t}=this.props,n=document.getElementById("play-audio-button"),r=document.getElementById("pie-prompt-audio-player");if(e&&r&&r.play().then(()=>{n&&t&&r.addEventListener("ended",o)}).catch(e=>{n&&t&&(n.style.backgroundImage=`url(${t.playImage})`),console.error("Error playing audio",e)}),!n||!r||!t)return;const i=()=>{r.paused&&r.play()},o=()=>{n.style.backgroundImage=`url(${t.playImage})`},s=()=>{Object.assign(n.style,{backgroundImage:`url(${t.pauseImage})`,border:"1px solid #ccc"})},l=()=>{Object.assign(n.style,{backgroundImage:`url(${t.playImage})`,border:"1px solid #326295"})};n.addEventListener("click",i),r.addEventListener("play",s),r.addEventListener("pause",l),r.addEventListener("ended",o),this._handlePlayClick=i,this._handleAudioPlay=s,this._handleAudioPause=l,this._handleAudioEnded=o}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 Cn&&Cn(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",r=e.parentElement;if("DIV"===r.tagName&&"flex"===r.style.display&&"100%"===r.style.width)r.style.justifyContent=n;else{const t=document.createElement("div");t.style.display="flex",t.style.width="100%",t.style.justifyContent=n;const i=e.cloneNode(!0);t.appendChild(i),r.replaceChild(t,e)}}}render(){const{prompt:e,tagName:t,className:n,onClick:r,defaultClassName:i}=this.props,o=`${n||""} ${i||""} ${"legend"===t?"legend":""} preview-prompt`.trim();return yn.createElement(_n,{as:t||"div",ref:this.promptRef,onClick:r,className:o,tagName:t,dangerouslySetInnerHTML:{__html:this.parsedText(e||"").replace(kn,"\\newline ")}})}}Rn.__initStatic(),Rn.__initStatic2();const Sn=e;Sn.node,Sn.bool;const On=e;On.node,On.string,"undefined"!=typeof window&&new DOMParser,"undefined"!=typeof window&&new DOMParser;const Tn=t,{styled:An}=n,{ListItem:Nn}=o,{List:Dn}=o,Mn=l,Bn=e,Fn=An(on)({color:Ct(),backgroundColor:xt("background",bt.BACKGROUND),"&:not(.MathJax) table":{borderCollapse:"collapse"},"&:not(.MathJax) table td, &:not(.MathJax) table th":{padding:"8px 12px",textAlign:"left"},"& ul p, & ol p":{marginBottom:0,marginTop:0,lineHeight:"normal"}}),Ln=An(Nn)({display:"flex",flexDirection:"column",alignItems:"flex-start",padding:"12px 0px"}),In=An("div")({color:Ct()}),wn=An("h3")({color:Ct(),fontSize:"16px",fontWeight:"700",margin:0,paddingBottom:"6px"}),zn=An("h4")({color:Ct(),fontSize:"16px",fontWeight:"normal",margin:0,paddingBottom:"6px"}),Pn=An("h2")(({theme:e})=>({display:"flex",alignItems:"center",cursor:"pointer",userSelect:"none",fontSize:e.typography.fontSize,fontWeight:"500",color:xt("tertiary",bt.TERTIARY),margin:0})),jn=An("span")({display:"inline-flex",transition:"transform 0.2s",marginLeft:2,alignSelf:"center"}),qn=An("h2")({position:"absolute",width:"1px",height:"1px",padding:0,margin:"-1px",overflow:"hidden",clip:"rect(0,0,0,0)",border:0,whiteSpace:"nowrap"}),Un=Bn.shape({excludeZero:Bn.bool,points:Bn.arrayOf(Bn.string),sampleAnswers:Bn.arrayOf(Bn.string),animationsDisabled:Bn.bool});class Yn extends Tn.Component{__init(){this.dudUrl="javascript:;"}constructor(e){super(e),Yn.prototype.__init.call(this),Yn.prototype.__init2.call(this),this.state={rubricOpen:!1,linkPrefix:"Show"},this.toggleRubric=this.toggleRubric.bind(this)}static __initStatic(){this.propTypes={model:Bn.object.isRequired,animationsDisabled:Bn.bool,value:Un}}toggleRubric(){this.setState({rubricOpen:!this.state.rubricOpen}),this.setState({linkPrefix:this.state.rubricOpen?"Show":"Hide"})}__init2(){this.shouldRenderPoint=(e,t)=>!t.excludeZero||0!==e}render(){const{model:e,value:t}=this.props;let{animationsDisabled:n}=this.props;if(n=n||t.animationsDisabled,t&&t.points){const{extraCSSRules:r}=e||{},{points:i,sampleAnswers:o}=t,s=Tn.createElement(Dn,{component:"nav"},i.slice(0).reverse().map((e,n)=>{n=i.length-n-1;const r=t.excludeZero?n+1:n;return Tn.createElement(Tn.Fragment,{key:n},Tn.createElement(Ln,{key:`P${n}`},Tn.createElement(wn,null,1===r?`${r} PT`:`${r} PTS`),Tn.createElement(In,{dangerouslySetInnerHTML:{__html:e}})),o&&o[n]&&Tn.createElement(Ln,{key:`S${n}`},Tn.createElement(zn,null,"Sample Answer"),Tn.createElement(In,{dangerouslySetInnerHTML:{__html:o[n]}})))}));return Tn.createElement(Fn,{extraCSSRules:r},Tn.createElement(qn,null,"Rubric"),n?s:Tn.createElement(Tn.Fragment,null,Tn.createElement(Pn,{id:"rubric-toggle",tabIndex:0,role:"button","aria-expanded":this.state.rubricOpen,onClick:this.toggleRubric,onKeyPress:e=>{"Enter"!==e.key&&" "!==e.key||this.toggleRubric()}},this.state.linkPrefix," Rubric",Tn.createElement(jn,{"aria-hidden":"true"},this.state.rubricOpen?Tn.createElement("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},Tn.createElement("polyline",{points:"18 15 12 9 6 15"})):Tn.createElement("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},Tn.createElement("polyline",{points:"6 9 12 15 18 9"})))),Tn.createElement(Mn,{in:this.state.rubricOpen,timeout:{enter:225,exit:195}},s)))}return null}}Yn.__initStatic();const $n=t,{createRoot:Hn}=a,Wn=s,{renderMath:Gn}=c,Kn=Wn("pie-element:rubric:print");class Jn extends HTMLElement{constructor(){super(),this._options=null,this._model=null,this._session=[],this._root=null,this._rerender=B(()=>{if(this._model&&this._session){const t=(e=this._model,"instructor"===this._options.role?(e.value={...e},e.mode="evaluate",e.animationsDisabled=!0,e):{}),n=this._options&&$n.createElement(Yn,{...t});this._root||(this._root=Hn(this)),this._root.render(n),queueMicrotask(()=>{Kn("render complete - render math"),Gn(this)})}else Kn("skip");var e},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{Jn as default};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-element/rubric",
|
|
3
3
|
"repository": "pie-framework/pie-elements",
|
|
4
|
-
"version": "8.2.
|
|
4
|
+
"version": "8.2.4",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "src/index.js",
|
|
7
7
|
"exports": {
|
|
@@ -25,12 +25,12 @@
|
|
|
25
25
|
"@mui/icons-material": "^7.3.4",
|
|
26
26
|
"@mui/material": "^7.3.4",
|
|
27
27
|
"@pie-lib/math-rendering": "5.1.0",
|
|
28
|
-
"@pie-lib/render-ui": "7.0.
|
|
28
|
+
"@pie-lib/render-ui": "7.0.3",
|
|
29
29
|
"prop-types": "^15.8.1"
|
|
30
30
|
},
|
|
31
31
|
"author": "pie framework developers",
|
|
32
32
|
"license": "ISC",
|
|
33
|
-
"gitHead": "
|
|
33
|
+
"gitHead": "cff9952eb98a94ae5b7357ac8f7069be05cacd10",
|
|
34
34
|
"scripts": {
|
|
35
35
|
"postpublish": "../../scripts/postpublish"
|
|
36
36
|
}
|