@pie-element/rubric 7.0.0-beta.1 → 7.0.0-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/configure/lib/defaults.js +3 -0
- package/configure/lib/defaults.js.map +1 -1
- package/configure/package.json +6 -7
- package/configure/src/defaults.js +1 -0
- package/controller/package.json +1 -1
- package/lib/print.js +2 -2
- package/lib/print.js.map +1 -1
- package/module/configure.js +1 -0
- package/module/controller.js +73 -0
- package/module/demo.js +33 -0
- package/module/element.js +1 -0
- package/module/index.html +21 -0
- package/module/manifest.json +14 -0
- package/module/print-demo.js +71 -0
- package/module/print.html +18 -0
- package/module/print.js +1 -0
- package/package.json +9 -5
- package/src/print.js +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaults.js","names":["model","points","sampleAnswers","maxPoints","excludeZero","excludeZeroEnabled","maxPointsEnabled","configuration","baseInputConfiguration","
|
|
1
|
+
{"version":3,"file":"defaults.js","names":["model","points","sampleAnswers","maxPoints","excludeZero","excludeZeroEnabled","maxPointsEnabled","configuration","baseInputConfiguration","h3","disabled","audio","video","image","textAlign","showParagraphs","separateParagraphs","rubriclessInstruction","inputConfiguration","showExcludeZero","settings","label","showMaxPoint","settingsPanelDisabled","mathMlOptions","mmlOutput","mmlEditing","maxMaxPoints"],"sources":["../src/defaults.js"],"sourcesContent":["export default {\n model: {\n points: ['', '', '', ''],\n sampleAnswers: [null, null, null, null],\n maxPoints: 3,\n excludeZero: false,\n excludeZeroEnabled: true,\n maxPointsEnabled: true,\n },\n configuration: {\n baseInputConfiguration: {\n h3: { disabled: true },\n audio: { disabled: false },\n video: { disabled: false },\n image: { disabled: false },\n textAlign: { disabled: true },\n showParagraphs: { disabled: false },\n separateParagraphs: { disabled: true },\n },\n rubriclessInstruction: {\n inputConfiguration: {\n audio: { disabled: false },\n video: { disabled: false },\n image: { disabled: false },\n },\n },\n showExcludeZero: {\n settings: true,\n label: 'Ability to exclude zero',\n },\n showMaxPoint: {\n settings: true,\n label: 'Show max points dropdown',\n },\n settingsPanelDisabled: false,\n // width: '500px'\n mathMlOptions: {\n mmlOutput: false,\n mmlEditing: false,\n },\n maxMaxPoints: 9,\n },\n};\n"],"mappings":";;;;;;iCAAe;EACbA,KAAK,EAAE;IACLC,MAAM,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC;IACxBC,aAAa,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;IACvCC,SAAS,EAAE,CAAC;IACZC,WAAW,EAAE,KAAK;IAClBC,kBAAkB,EAAE,IAAI;IACxBC,gBAAgB,EAAE;EACpB,CAAC;EACDC,aAAa,EAAE;IACbC,sBAAsB,EAAE;MACtBC,EAAE,EAAE;QAAEC,QAAQ,EAAE;MAAK,CAAC;MACtBC,KAAK,EAAE;QAAED,QAAQ,EAAE;MAAM,CAAC;MAC1BE,KAAK,EAAE;QAAEF,QAAQ,EAAE;MAAM,CAAC;MAC1BG,KAAK,EAAE;QAAEH,QAAQ,EAAE;MAAM,CAAC;MAC1BI,SAAS,EAAE;QAAEJ,QAAQ,EAAE;MAAK,CAAC;MAC7BK,cAAc,EAAE;QAAEL,QAAQ,EAAE;MAAM,CAAC;MACnCM,kBAAkB,EAAE;QAAEN,QAAQ,EAAE;MAAK;IACvC,CAAC;IACDO,qBAAqB,EAAE;MACrBC,kBAAkB,EAAE;QAClBP,KAAK,EAAE;UAAED,QAAQ,EAAE;QAAM,CAAC;QAC1BE,KAAK,EAAE;UAAEF,QAAQ,EAAE;QAAM,CAAC;QAC1BG,KAAK,EAAE;UAAEH,QAAQ,EAAE;QAAM;MAC3B;IACF,CAAC;IACDS,eAAe,EAAE;MACfC,QAAQ,EAAE,IAAI;MACdC,KAAK,EAAE;IACT,CAAC;IACDC,YAAY,EAAE;MACZF,QAAQ,EAAE,IAAI;MACdC,KAAK,EAAE;IACT,CAAC;IACDE,qBAAqB,EAAE,KAAK;IAC5B;IACAC,aAAa,EAAE;MACbC,SAAS,EAAE,KAAK;MAChBC,UAAU,EAAE;IACd,CAAC;IACDC,YAAY,EAAE;EAChB;AACF,CAAC","ignoreList":[]}
|
package/configure/package.json
CHANGED
|
@@ -11,14 +11,13 @@
|
|
|
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": "12.1.
|
|
15
|
-
"@pie-lib/editable-html-tip-tap": "1.1.
|
|
16
|
-
"@pie-lib/render-ui": "5.1.
|
|
17
|
-
"@pie-lib/rubric": "1.1.
|
|
14
|
+
"@pie-lib/config-ui": "12.1.1-next.3",
|
|
15
|
+
"@pie-lib/editable-html-tip-tap": "1.1.1-next.3",
|
|
16
|
+
"@pie-lib/render-ui": "5.1.1-next.1",
|
|
17
|
+
"@pie-lib/rubric": "1.1.1-next.1",
|
|
18
18
|
"debug": "^4.1.1",
|
|
19
|
-
"react": "18.
|
|
20
|
-
"react-
|
|
21
|
-
"react-dom": "18.2.0"
|
|
19
|
+
"react": "18.3.1",
|
|
20
|
+
"react-dom": "18.3.1"
|
|
22
21
|
},
|
|
23
22
|
"license": "ISC"
|
|
24
23
|
}
|
package/controller/package.json
CHANGED
package/lib/print.js
CHANGED
|
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.default = void 0;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _client = require("react-dom/client");
|
|
10
|
-
var
|
|
10
|
+
var _lodashEs = require("lodash-es");
|
|
11
11
|
var _main = _interopRequireDefault(require("./main"));
|
|
12
12
|
var _mathRendering = require("@pie-lib/math-rendering");
|
|
13
13
|
var _debug = _interopRequireDefault(require("debug"));
|
|
@@ -31,7 +31,7 @@ class RubricPrint extends HTMLElement {
|
|
|
31
31
|
this._model = null;
|
|
32
32
|
this._session = [];
|
|
33
33
|
this._root = null;
|
|
34
|
-
this._rerender = (0,
|
|
34
|
+
this._rerender = (0, _lodashEs.debounce)(() => {
|
|
35
35
|
if (this._model && this._session) {
|
|
36
36
|
const printModel = preparePrintModel(this._model, this._options);
|
|
37
37
|
const element = this._options && /*#__PURE__*/_react.default.createElement(_main.default, {
|
package/lib/print.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"print.js","names":["_react","_interopRequireDefault","require","_client","
|
|
1
|
+
{"version":3,"file":"print.js","names":["_react","_interopRequireDefault","require","_client","_lodashEs","_main","_mathRendering","_debug","log","debug","preparePrintModel","model","opts","instr","role","value","mode","animationsDisabled","RubricPrint","HTMLElement","constructor","_options","_model","_session","_root","_rerender","debounce","printModel","element","React","createElement","Main","createRoot","render","queueMicrotask","renderMath","leading","trailing","options","o","s","connectedCallback","disconnectedCallback","unmount","exports","default"],"sources":["../src/print.js"],"sourcesContent":["import React from 'react';\nimport { createRoot } from 'react-dom/client';\nimport { debounce } from 'lodash-es';\nimport Main from './main';\nimport { renderMath } from '@pie-lib/math-rendering';\nimport debug from 'debug';\n\nconst log = debug('pie-element:rubric:print');\n\nconst preparePrintModel = (model, opts) => {\n const instr = opts.role === 'instructor';\n\n if (!instr) {\n return {};\n }\n\n model.value = { ...model };\n model.mode = 'evaluate';\n model.animationsDisabled = true;\n\n return model;\n};\n\nexport default class RubricPrint extends HTMLElement {\n constructor() {\n super();\n this._options = null;\n this._model = null;\n this._session = [];\n this._root = null;\n this._rerender = debounce(\n () => {\n if (this._model && this._session) {\n const printModel = preparePrintModel(this._model, this._options);\n\n const element =\n this._options &&\n React.createElement(Main, {\n ...printModel,\n });\n\n if (!this._root) {\n this._root = createRoot(this);\n }\n this._root.render(element);\n queueMicrotask(() => {\n log('render complete - render math');\n renderMath(this);\n });\n } else {\n log('skip');\n }\n },\n 50,\n { leading: false, trailing: true },\n );\n }\n set options(o) {\n this._options = o;\n }\n\n set model(s) {\n this._model = s;\n this._rerender();\n }\n\n connectedCallback() {}\n\n disconnectedCallback() {\n if (this._root) {\n this._root.unmount();\n }\n }\n}\n"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,cAAA,GAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAN,sBAAA,CAAAC,OAAA;AAEA,MAAMM,GAAG,GAAG,IAAAC,cAAK,EAAC,0BAA0B,CAAC;AAE7C,MAAMC,iBAAiB,GAAGA,CAACC,KAAK,EAAEC,IAAI,KAAK;EACzC,MAAMC,KAAK,GAAGD,IAAI,CAACE,IAAI,KAAK,YAAY;EAExC,IAAI,CAACD,KAAK,EAAE;IACV,OAAO,CAAC,CAAC;EACX;EAEAF,KAAK,CAACI,KAAK,GAAG;IAAE,GAAGJ;EAAM,CAAC;EAC1BA,KAAK,CAACK,IAAI,GAAG,UAAU;EACvBL,KAAK,CAACM,kBAAkB,GAAG,IAAI;EAE/B,OAAON,KAAK;AACd,CAAC;AAEc,MAAMO,WAAW,SAASC,WAAW,CAAC;EACnDC,WAAWA,CAAA,EAAG;IACZ,KAAK,CAAC,CAAC;IACP,IAAI,CAACC,QAAQ,GAAG,IAAI;IACpB,IAAI,CAACC,MAAM,GAAG,IAAI;IAClB,IAAI,CAACC,QAAQ,GAAG,EAAE;IAClB,IAAI,CAACC,KAAK,GAAG,IAAI;IACjB,IAAI,CAACC,SAAS,GAAG,IAAAC,kBAAQ,EACvB,MAAM;MACJ,IAAI,IAAI,CAACJ,MAAM,IAAI,IAAI,CAACC,QAAQ,EAAE;QAChC,MAAMI,UAAU,GAAGjB,iBAAiB,CAAC,IAAI,CAACY,MAAM,EAAE,IAAI,CAACD,QAAQ,CAAC;QAEhE,MAAMO,OAAO,GACX,IAAI,CAACP,QAAQ,iBACbQ,cAAK,CAACC,aAAa,CAACC,aAAI,EAAE;UACxB,GAAGJ;QACL,CAAC,CAAC;QAEJ,IAAI,CAAC,IAAI,CAACH,KAAK,EAAE;UACf,IAAI,CAACA,KAAK,GAAG,IAAAQ,kBAAU,EAAC,IAAI,CAAC;QAC/B;QACA,IAAI,CAACR,KAAK,CAACS,MAAM,CAACL,OAAO,CAAC;QAC1BM,cAAc,CAAC,MAAM;UACnB1B,GAAG,CAAC,+BAA+B,CAAC;UACpC,IAAA2B,yBAAU,EAAC,IAAI,CAAC;QAClB,CAAC,CAAC;MACJ,CAAC,MAAM;QACL3B,GAAG,CAAC,MAAM,CAAC;MACb;IACF,CAAC,EACD,EAAE,EACF;MAAE4B,OAAO,EAAE,KAAK;MAAEC,QAAQ,EAAE;IAAK,CACnC,CAAC;EACH;EACA,IAAIC,OAAOA,CAACC,CAAC,EAAE;IACb,IAAI,CAAClB,QAAQ,GAAGkB,CAAC;EACnB;EAEA,IAAI5B,KAAKA,CAAC6B,CAAC,EAAE;IACX,IAAI,CAAClB,MAAM,GAAGkB,CAAC;IACf,IAAI,CAACf,SAAS,CAAC,CAAC;EAClB;EAEAgB,iBAAiBA,CAAA,EAAG,CAAC;EAErBC,oBAAoBA,CAAA,EAAG;IACrB,IAAI,IAAI,CAAClB,KAAK,EAAE;MACd,IAAI,CAACA,KAAK,CAACmB,OAAO,CAAC,CAAC;IACtB;EACF;AACF;AAACC,OAAA,CAAAC,OAAA,GAAA3B,WAAA","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_dll_react as e,_dll_react_dom as t,_dll_mui__material as n,_dll_mui__icons_material as r,_dll_prop_types as o,_dll_mui__material_styles as i,_dll_debug as a}from"../../../@pie-lib/shared-module@^4.0.1/module/index.js";import{_dll_pie_lib__config_ui as s}from"../../../@pie-lib/config-module@^3.0.1/module/index.js";import{_dll_pie_lib__editable_html_tip_tap as l}from"../../../@pie-lib/editable-html-module@^6.1.2/module/index.js";function c(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var d,u={},p={exports:{}};(d=p).exports=function(e){return e&&e.__esModule?e:{default:e}},d.exports.__esModule=!0,d.exports.default=d.exports,c(p.exports);var g={exports:{}},f={exports:{}},m={exports:{}};!function(e){function t(n){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(m),c(m.exports);var b={exports:{}};!function(e){var t=m.exports.default;e.exports=function(e,n){if("object"!=t(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,n||"default");if("object"!=t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports}(b),c(b.exports),function(e){var t=m.exports.default,n=b.exports;e.exports=function(e){var r=n(e,"string");return"symbol"==t(r)?r:r+""},e.exports.__esModule=!0,e.exports.default=e.exports}(f),c(f.exports),function(e){var t=f.exports;e.exports=function(e,n,r){return(n=t(n))in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e},e.exports.__esModule=!0,e.exports.default=e.exports}(g),c(g.exports);var h={};Object.defineProperty(h,"__esModule",{value:!0});class v extends CustomEvent{constructor(e,t=!1){super(v.TYPE,{bubbles:!0,detail:{update:e,reset:t}}),this.update=e,this.reset=t}}v.TYPE="model.updated",h.ModelUpdatedEvent=v;class y extends CustomEvent{constructor(e,t){super(y.TYPE,{bubbles:!0,detail:{src:e,done:t}}),this.src=e,this.done=t}}y.TYPE="delete.image",h.DeleteImageEvent=y;class x extends CustomEvent{constructor(e){super(x.TYPE,{bubbles:!0,detail:e}),this.handler=e}}x.TYPE="insert.image",h.InsertImageEvent=x;class I extends CustomEvent{constructor(e,t){super(I.TYPE,{bubbles:!0,detail:{src:e,done:t}}),this.src=e,this.done=t}}I.TYPE="delete.sound",h.DeleteSoundEvent=I;class E extends CustomEvent{constructor(e){super(E.TYPE,{bubbles:!0,detail:e}),this.handler=e}}E.TYPE="insert.sound",h.InsertSoundEvent=E;var D={},w="object"==typeof global&&global&&global.Object===Object&&global,C="object"==typeof self&&self&&self.Object===Object&&self,S=(w||C||Function("return this")()).Symbol,A=Object.prototype,P=A.hasOwnProperty,O=A.toString,N=S?S.toStringTag:void 0,R=Object.prototype.toString,_=S?S.toStringTag:void 0;function B(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":_&&_ in Object(e)?function(e){var t=P.call(e,N),n=e[N];try{e[N]=void 0;var r=!0}catch(e){}var o=O.call(e);return r&&(t?e[N]=n:delete e[N]),o}(e):function(e){return R.call(e)}(e)}var T=/\s/,M=/^\s+/;function L(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}var G=/^[-+]0x[0-9a-f]+$/i,F=/^0b[01]+$/i,j=/^0o[0-7]+$/i,k=parseInt;function $(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]"==B(e)}(e))return NaN;if(L(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=L(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=function(e){return e?e.slice(0,function(e){for(var t=e.length;t--&&T.test(e.charAt(t)););return t}(e)+1).replace(M,""):e}(e);var n=F.test(e);return n||j.test(e)?k(e.slice(2),n?2:8):G.test(e)?NaN:+e}var W=1/0;function U(e){return e?(e=$(e))===W||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function H(e){var t=U(e),n=t%1;return t==t?n?t-n:t:0}function q(e){return e}var V=/^(?:0|[1-9]\d*)$/;function z(e,t,n){if(!L(n))return!1;var r=typeof t;return!!("number"==r?function(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}(e.length)&&!function(e){if(!L(e))return!1;var t=B(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}(e)}(n)&&function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&V.test(e))&&e>-1&&e%1==0&&e<t}(t,n.length):"string"==r&&t in n)&&function(e,t){return e===t||e!=e&&t!=t}(n[t],e)}var Y=Math.ceil,Z=Math.max,J=function(e,t,n){return n&&"number"!=typeof n&&z(e,t,n)&&(t=n=void 0),e=U(e),void 0===t?(t=e,e=0):t=U(t),function(e,t,n){for(var r=-1,o=Z(Y((t-e)/(n||1)),0),i=Array(o);o--;)i[++r]=e,e+=n;return i}(e,t,n=void 0===n?e<t?1:-1:U(n))};function X(e,t,n){var r=null==e?0:e.length;return r?function(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(o);++r<o;)i[r]=e[r+t];return i}(e,(t=r-(t=n||void 0===t?1:H(t)))<0?0:t,r):[]}var K=4294967295,Q=Math.min;function ee(e,t){if((e=H(e))<1||e>9007199254740991)return[];var n,r=K,o=Q(e,K);e-=K;for(var i=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(o,t="function"==typeof(n=t)?n:q);++r<e;)t(r);return i}function te(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var ne="function"==typeof Symbol&&Symbol.observable||"@@observable",re=()=>Math.random().toString(36).substring(7).split("").join("."),oe={INIT:`@@redux/INIT${re()}`,REPLACE:`@@redux/REPLACE${re()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${re()}`};function ie(e,t,n){if("function"!=typeof e)throw new Error(te(2));if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(te(0));if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error(te(1));return n(ie)(e,t)}let r=e,o=t,i=new Map,a=i,s=0,l=!1;function c(){a===i&&(a=new Map,i.forEach((e,t)=>{a.set(t,e)}))}function d(){if(l)throw new Error(te(3));return o}function u(e){if("function"!=typeof e)throw new Error(te(4));if(l)throw new Error(te(5));let t=!0;c();const n=s++;return a.set(n,e),function(){if(t){if(l)throw new Error(te(6));t=!1,c(),a.delete(n),i=null}}}function p(e){if(!function(e){if("object"!=typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||null===Object.getPrototypeOf(e)}(e))throw new Error(te(7));if(void 0===e.type)throw new Error(te(8));if("string"!=typeof e.type)throw new Error(te(17));if(l)throw new Error(te(9));try{l=!0,o=r(o,e)}finally{l=!1}return(i=a).forEach(e=>{e()}),e}return p({type:oe.INIT}),{dispatch:p,subscribe:u,getState:d,replaceReducer:function(e){if("function"!=typeof e)throw new Error(te(10));r=e,p({type:oe.REPLACE})},[ne]:function(){const e=u;return{subscribe(t){if("object"!=typeof t||null===t)throw new Error(te(11));function n(){const e=t;e.next&&e.next(d())}return n(),{unsubscribe:e(n)}},[ne](){return this}}}}}function ae(e,t){return function(...n){return t(e.apply(this,n))}}function se(e,t){if("function"==typeof e)return ae(e,t);if("object"!=typeof e||null===e)throw new Error(te(16));const n={};for(const r in e){const o=e[r];"function"==typeof o&&(n[r]=ae(o,t))}return n}function le(...e){return 0===e.length?e=>e:1===e.length?e[0]:e.reduce((e,t)=>(...n)=>e(t(...n)))}var ce={exports:{}},de={},ue=e,pe="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},ge=ue.useSyncExternalStore,fe=ue.useRef,me=ue.useEffect,be=ue.useMemo,he=ue.useDebugValue;de.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var i=fe(null);if(null===i.current){var a={hasValue:!1,value:null};i.current=a}else a=i.current;i=be(function(){function e(e){if(!l){if(l=!0,i=e,e=r(e),void 0!==o&&a.hasValue){var t=a.value;if(o(t,e))return s=t}return s=e}if(t=s,pe(i,e))return t;var n=r(e);return void 0!==o&&o(t,n)?(i=e,t):(i=e,s=n)}var i,s,l=!1,c=void 0===n?null:n;return[function(){return e(t())},null===c?void 0:function(){return e(c())}]},[t,n,r,o]);var s=ge(e,i[0],i[1]);return me(function(){a.hasValue=!0,a.value=s},[s]),he(s),s},ce.exports=de;const ve=e;var ye=ve.version.startsWith("19"),xe=Symbol.for(ye?"react.transitional.element":"react.element"),Ie=Symbol.for("react.portal"),Ee=Symbol.for("react.fragment"),De=Symbol.for("react.strict_mode"),we=Symbol.for("react.profiler"),Ce=Symbol.for("react.consumer"),Se=Symbol.for("react.context"),Ae=Symbol.for("react.forward_ref"),Pe=Symbol.for("react.suspense"),Oe=Symbol.for("react.suspense_list"),Ne=Symbol.for("react.memo"),Re=Symbol.for("react.lazy"),_e=Ae,Be=Ne;function Te(e){return function(t){const n=e(t);function r(){return n}return r.dependsOnOwnProps=!1,r}}function Me(e){return e.dependsOnOwnProps?Boolean(e.dependsOnOwnProps):1!==e.length}function Le(e,t){return function(t,{displayName:n}){const r=function(e,t){return r.dependsOnOwnProps?r.mapToProps(e,t):r.mapToProps(e,void 0)};return r.dependsOnOwnProps=!0,r.mapToProps=function(t,n){r.mapToProps=e,r.dependsOnOwnProps=Me(e);let o=r(t,n);return"function"==typeof o&&(r.mapToProps=o,r.dependsOnOwnProps=Me(o),o=r(t,n)),o},r}}function Ge(e,t){return(n,r)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${r.wrappedComponentName}.`)}}function Fe(e,t,n){return{...n,...e,...t}}var je={notify(){},get:()=>[]};function ke(e,t){let n,r=je,o=0,i=!1;function a(){c.onStateChange&&c.onStateChange()}function s(){o++,n||(n=t?t.addNestedSub(a):e.subscribe(a),r=function(){let e=null,t=null;return{clear(){e=null,t=null},notify(){(()=>{let t=e;for(;t;)t.callback(),t=t.next})()},get(){const t=[];let n=e;for(;n;)t.push(n),n=n.next;return t},subscribe(n){let r=!0;const o=t={callback:n,next:null,prev:t};return o.prev?o.prev.next=o:e=o,function(){r&&null!==e&&(r=!1,o.next?o.next.prev=o.prev:t=o.prev,o.prev?o.prev.next=o.next:e=o.next)}}}}())}function l(){o--,n&&0===o&&(n(),n=void 0,r.clear(),r=je)}const c={addNestedSub:function(e){s();const t=r.subscribe(e);let n=!1;return()=>{n||(n=!0,t(),l())}},notifyNestedSubs:function(){r.notify()},handleChangeWrapper:a,isSubscribed:function(){return i},trySubscribe:function(){i||(i=!0,s())},tryUnsubscribe:function(){i&&(i=!1,l())},getListeners:()=>r};return c}var $e=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),We="undefined"!=typeof navigator&&"ReactNative"===navigator.product,Ue=$e||We?ve.useLayoutEffect:ve.useEffect;function He(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function qe(e,t){if(He(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r=0;r<n.length;r++)if(!Object.prototype.hasOwnProperty.call(t,n[r])||!He(e[n[r]],t[n[r]]))return!1;return!0}var Ve={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},ze={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Ye={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Ze={[_e]:{$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},[Be]:Ye};function Je(e){return function(e){return function(e){if("object"==typeof e&&null!==e){const{$$typeof:t}=e;switch(t){case xe:switch(e=e.type){case Ee:case we:case De:case Pe:case Oe:return e;default:switch(e=e&&e.$$typeof){case Se:case Ae:case Re:case Ne:case Ce:return e;default:return t}}case Ie:return t}}}(e)===Ne}(e)?Ye:Ze[e.$$typeof]||Ve}var Xe=Object.defineProperty,Ke=Object.getOwnPropertyNames,Qe=Object.getOwnPropertySymbols,et=Object.getOwnPropertyDescriptor,tt=Object.getPrototypeOf,nt=Object.prototype;function rt(e,t){if("string"!=typeof t){if(nt){const n=tt(t);n&&n!==nt&&rt(e,n)}let n=Ke(t);Qe&&(n=n.concat(Qe(t)));const r=Je(e),o=Je(t);for(let i=0;i<n.length;++i){const a=n[i];if(!(ze[a]||o&&o[a]||r&&r[a])){const n=et(t,a);try{Xe(e,a,n)}catch(e){}}}}return e}var ot=Symbol.for("react-redux-context"),it="undefined"!=typeof globalThis?globalThis:{},at=function(){if(!ve.createContext)return{};const e=it[ot]??=new Map;let t=e.get(ve.createContext);return t||(t=ve.createContext(null),e.set(ve.createContext,t)),t}(),st=[null,null];function lt(e,t,n,r,o,i){e.current=r,n.current=!1,o.current&&(o.current=null,i())}function ct(e,t){return e===t}var dt=function(e,t,n,{pure:r,areStatesEqual:o=ct,areOwnPropsEqual:i=qe,areStatePropsEqual:a=qe,areMergedPropsEqual:s=qe,forwardRef:l=!1,context:c=at}={}){const d=c,u=function(e){return e?"function"==typeof e?Le(e):Ge(e,"mapStateToProps"):Te(()=>({}))}(e),p=function(e){return e&&"object"==typeof e?Te(t=>function(e,t){const n={};for(const r in e){const o=e[r];"function"==typeof o&&(n[r]=(...e)=>t(o(...e)))}return n}(e,t)):e?"function"==typeof e?Le(e):Ge(e,"mapDispatchToProps"):Te(e=>({dispatch:e}))}(t),g=function(e){return e?"function"==typeof e?function(e){return function(t,{displayName:n,areMergedPropsEqual:r}){let o,i=!1;return function(t,n,a){const s=e(t,n,a);return i?r(s,o)||(o=s):(i=!0,o=s),o}}}(e):Ge(e,"mergeProps"):()=>Fe}(n),f=Boolean(e);return e=>{const t=e.displayName||e.name||"Component",n=`Connect(${t})`,r={shouldHandleStateChanges:f,displayName:n,wrappedComponentName:t,WrappedComponent:e,initMapStateToProps:u,initMapDispatchToProps:p,initMergeProps:g,areStatesEqual:o,areStatePropsEqual:a,areOwnPropsEqual:i,areMergedPropsEqual:s};function c(t){const[n,o,i]=ve.useMemo(()=>{const{reactReduxForwardedRef:e,...n}=t;return[t.context,e,n]},[t]),a=ve.useMemo(()=>{let e=d;return function(e){let t,n=e[0],r=1;for(;r<e.length;){const o=e[r],i=e[r+1];if(r+=2,("optionalAccess"===o||"optionalCall"===o)&&null==n)return;"access"===o||"optionalAccess"===o?(t=n,n=i(n)):"call"!==o&&"optionalCall"!==o||(n=i((...e)=>n.call(t,...e)),t=void 0)}}([n,"optionalAccess",e=>e.Consumer]),e},[n,d]),s=ve.useContext(a),l=Boolean(t.store)&&Boolean(t.store.getState)&&Boolean(t.store.dispatch),c=Boolean(s)&&Boolean(s.store),u=l?t.store:s.store,p=c?s.getServerState:u.getState,g=ve.useMemo(()=>function(e,{initMapStateToProps:t,initMapDispatchToProps:n,initMergeProps:r,...o}){return function(e,t,n,r,{areStatesEqual:o,areOwnPropsEqual:i,areStatePropsEqual:a}){let s,l,c,d,u,p=!1;function g(p,g){const f=!i(g,l),m=!o(p,s,g,l);return s=p,l=g,f&&m?(c=e(s,l),t.dependsOnOwnProps&&(d=t(r,l)),u=n(c,d,l),u):f?(e.dependsOnOwnProps&&(c=e(s,l)),t.dependsOnOwnProps&&(d=t(r,l)),u=n(c,d,l),u):m?function(){const t=e(s,l),r=!a(t,c);return c=t,r&&(u=n(c,d,l)),u}():u}return function(o,i){return p?g(o,i):(s=o,l=i,c=e(s,l),d=t(r,l),u=n(c,d,l),p=!0,u)}}(t(e,o),n(e,o),r(e,o),e,o)}(u.dispatch,r),[u]),[m,b]=ve.useMemo(()=>{if(!f)return st;const e=ke(u,l?void 0:s.subscription),t=e.notifyNestedSubs.bind(e);return[e,t]},[u,l,s]),h=ve.useMemo(()=>l?s:{...s,subscription:m},[l,s,m]),v=ve.useRef(void 0),y=ve.useRef(i),x=ve.useRef(void 0),I=ve.useRef(!1),E=ve.useRef(!1),D=ve.useRef(void 0);Ue(()=>(E.current=!0,()=>{E.current=!1}),[]);const w=ve.useMemo(()=>()=>x.current&&i===y.current?x.current:g(u.getState(),i),[u,i]),C=ve.useMemo(()=>e=>m?function(e,t,n,r,o,i,a,s,l,c,d){if(!e)return()=>{};let u=!1,p=null;const g=()=>{if(u||!s.current)return;const e=t.getState();let n,g;try{n=r(e,o.current)}catch(e){g=e,p=e}g||(p=null),n===i.current?a.current||c():(i.current=n,l.current=n,a.current=!0,d())};return n.onStateChange=g,n.trySubscribe(),g(),()=>{if(u=!0,n.tryUnsubscribe(),n.onStateChange=null,p)throw p}}(f,u,m,g,y,v,I,E,x,b,e):()=>{},[m]);var S,A;let P;S=lt,A=[y,v,I,i,x,b],Ue(()=>S(...A),undefined);try{P=ve.useSyncExternalStore(C,w,p?()=>g(p(),i):w)}catch(e){throw D.current&&(e.message+=`\nThe error may be correlated with this previous error:\n${D.current.stack}\n\n`),e}Ue(()=>{D.current=void 0,x.current=void 0,v.current=P});const O=ve.useMemo(()=>ve.createElement(e,{...P,ref:o}),[o,e,P]);return ve.useMemo(()=>f?ve.createElement(a.Provider,{value:h},O):O,[a,O,h])}const m=ve.memo(c);if(m.WrappedComponent=e,m.displayName=c.displayName=n,l){const t=ve.forwardRef(function(e,t){return ve.createElement(m,{...e,reactReduxForwardedRef:t})});return t.displayName=n,t.WrappedComponent=e,rt(t,e)}return rt(m,e)}},ut=function(e){const{children:t,context:n,serverState:r,store:o}=e,i=ve.useMemo(()=>{const e=ke(o);return{store:o,subscription:e,getServerState:r?()=>r:void 0}},[o,r]),a=ve.useMemo(()=>o.getState(),[o]);Ue(()=>{const{subscription:e}=i;return e.onStateChange=e.notifyNestedSubs,e.trySubscribe(),a!==o.getState()&&e.notifyNestedSubs(),()=>{e.tryUnsubscribe(),e.onStateChange=void 0}},[i,a]);const s=n||at;return ve.createElement(s.Provider,{value:i},t)};function pt(e=at){return function(){return ve.useContext(e)}}var gt=pt();function ft(e=at){const t=e===at?gt:pt(e),n=()=>{const{store:e}=t();return e};return Object.assign(n,{withTypes:()=>n}),n}var mt=ft();!function(e=at){const t=e===at?mt:ft(e),n=()=>t().dispatch;Object.assign(n,{withTypes:()=>n})}();var bt=(e,t)=>e===t;!function(e=at){const t=e===at?gt:pt(e),n=(e,n={})=>{const{equalityFn:r=bt}="function"==typeof n?{equalityFn:n}:n,o=t(),{store:i,subscription:a,getServerState:s}=o;ve.useRef(!0);const l=ve.useCallback({[e.name]:t=>e(t)}[e.name],[e]),c=ce.exports.useSyncExternalStoreWithSelector(a.addNestedSub,i.getState,s||i.getState,l,r);return ve.useDebugValue(c),c};Object.assign(n,{withTypes:()=>n})}();var ht=function(e){var t=e.top,n=e.right,r=e.bottom,o=e.left;return{top:t,right:n,bottom:r,left:o,width:n-o,height:r-t,x:o,y:t,center:{x:(n+o)/2,y:(r+t)/2}}},vt=function(e,t){return{top:e.top-t.top,left:e.left-t.left,bottom:e.bottom+t.bottom,right:e.right+t.right}},yt=function(e,t){return{top:e.top+t.top,left:e.left+t.left,bottom:e.bottom-t.bottom,right:e.right-t.right}},xt={top:0,right:0,bottom:0,left:0},It=function(e){var t=e.borderBox,n=e.margin,r=void 0===n?xt:n,o=e.border,i=void 0===o?xt:o,a=e.padding,s=void 0===a?xt:a,l=ht(vt(t,r)),c=ht(yt(t,i)),d=ht(yt(c,s));return{marginBox:l,borderBox:ht(t),paddingBox:c,contentBox:d,margin:r,border:i,padding:s}},Et=function(e){var t=e.slice(0,-2);if("px"!==e.slice(-2))return 0;var n=Number(t);return isNaN(n)&&function(){throw new Error("Invariant failed")}(),n},Dt=function(e,t){var n,r,o=e.borderBox,i=e.border,a=e.margin,s=e.padding,l=(r=t,{top:(n=o).top+r.y,left:n.left+r.x,bottom:n.bottom+r.y,right:n.right+r.x});return It({borderBox:l,border:i,margin:a,padding:s})},wt=function(e,t){return void 0===t&&(t={x:window.pageXOffset,y:window.pageYOffset}),Dt(e,t)},Ct=function(e,t){var n={top:Et(t.marginTop),right:Et(t.marginRight),bottom:Et(t.marginBottom),left:Et(t.marginLeft)},r={top:Et(t.paddingTop),right:Et(t.paddingRight),bottom:Et(t.paddingBottom),left:Et(t.paddingLeft)},o={top:Et(t.borderTopWidth),right:Et(t.borderRightWidth),bottom:Et(t.borderBottomWidth),left:Et(t.borderLeftWidth)};return It({borderBox:e,margin:n,padding:r,border:o})},St=function(e){var t=e.getBoundingClientRect(),n=window.getComputedStyle(e);return Ct(t,n)},At=function(e){var t=[],n=null,r=function(){for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];t=o,n||(n=requestAnimationFrame(function(){n=null,e.apply(void 0,t)}))};return r.cancel=function(){n&&(cancelAnimationFrame(n),n=null)},r};function Pt(){return Pt=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},Pt.apply(null,arguments)}const Ot=e,{useState:Nt}=e,{useRef:Rt}=e,{useEffect:_t}=e,{useLayoutEffect:Bt}=e,{useContext:Tt}=e,Mt=t,{flushSync:Lt}=t;function Gt(e,t){}function Ft(){}function jt(e,t,n){const r=t.map(t=>{const r=(o=n,i=t.options,{...o,...i});var o,i;return e.addEventListener(t.eventName,t.fn,r),function(){e.removeEventListener(t.eventName,t.fn,r)}});return function(){r.forEach(e=>{e()})}}Gt.bind(null,"warn"),Gt.bind(null,"error");class kt extends Error{}function $t(e,t){throw new kt("Invariant failed")}kt.prototype.toString=function(){return this.message};class Wt extends Ot.Component{constructor(...e){super(...e),this.callbacks=null,this.unbind=Ft,this.onWindowError=e=>{const t=this.getCallbacks();t.isDragging()&&t.tryAbort(),e.error instanceof kt&&e.preventDefault()},this.getCallbacks=()=>{if(!this.callbacks)throw new Error("Unable to find AppCallbacks in <ErrorBoundary/>");return this.callbacks},this.setCallbacks=e=>{this.callbacks=e}}componentDidMount(){this.unbind=jt(window,[{eventName:"error",fn:this.onWindowError}])}componentDidCatch(e){if(!(e instanceof kt))throw e;this.setState({})}componentWillUnmount(){this.unbind()}render(){return this.props.children(this.setCallbacks)}}const Ut=e=>e+1,Ht=(e,t)=>{const n=e.droppableId===t.droppableId,r=Ut(e.index),o=Ut(t.index);return n?`\n You have moved the item from position ${r}\n to position ${o}\n `:`\n You have moved the item from position ${r}\n in list ${e.droppableId}\n to list ${t.droppableId}\n in position ${o}\n `},qt=(e,t,n)=>t.droppableId===n.droppableId?`\n The item ${e}\n has been combined with ${n.draggableId}`:`\n The item ${e}\n in list ${t.droppableId}\n has been combined with ${n.draggableId}\n in list ${n.droppableId}\n `,Vt=e=>`\n The item has returned to its starting position\n of ${Ut(e.index)}\n`,zt="\n Press space bar to start a drag.\n When dragging you can use the arrow keys to move the item around and escape to cancel.\n Some screen readers may require you to be in focus mode or to use your pass through key\n",Yt=e=>`\n You have lifted an item in position ${Ut(e.source.index)}\n`,Zt=e=>{const t=e.destination;if(t)return Ht(e.source,t);const n=e.combine;return n?qt(e.draggableId,e.source,n):"You are over an area that cannot be dropped on"},Jt=e=>{if("CANCEL"===e.reason)return`\n Movement cancelled.\n ${Vt(e.source)}\n `;const t=e.destination,n=e.combine;return t?`\n You have dropped the item.\n ${Ht(e.source,t)}\n `:n?`\n You have dropped the item.\n ${qt(e.draggableId,e.source,n)}\n `:`\n The item has been dropped while not over a drop area.\n ${Vt(e.source)}\n `};function Xt(e,t){return e===t||!(!Number.isNaN(e)||!Number.isNaN(t))}function Kt(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!Xt(e[n],t[n]))return!1;return!0}function Qt(e,t){const n=Nt(()=>({inputs:t,result:e()}))[0],r=Rt(!0),o=Rt(n),i=r.current||Boolean(t&&o.current.inputs&&Kt(t,o.current.inputs))?o.current:{inputs:t,result:e()};return _t(()=>{r.current=!1,o.current=i},[i]),i.result}function en(e,t){return Qt(()=>e,t)}const tn={x:0,y:0},nn=(e,t)=>({x:e.x+t.x,y:e.y+t.y}),rn=(e,t)=>({x:e.x-t.x,y:e.y-t.y}),on=(e,t)=>e.x===t.x&&e.y===t.y,an=e=>({x:0!==e.x?-e.x:0,y:0!==e.y?-e.y:0}),sn=(e,t,n=0)=>"x"===e?{x:t,y:n}:{x:n,y:t},ln=(e,t)=>Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2),cn=(e,t)=>Math.min(...t.map(t=>ln(e,t))),dn=e=>t=>({x:e(t.x),y:e(t.y)}),un=(e,t)=>({top:e.top+t.y,left:e.left+t.x,bottom:e.bottom+t.y,right:e.right+t.x}),pn=e=>[{x:e.left,y:e.top},{x:e.right,y:e.top},{x:e.left,y:e.bottom},{x:e.right,y:e.bottom}],gn=(e,t)=>t&&t.shouldClipSubject?((e,t)=>{const n=ht({top:Math.max(t.top,e.top),right:Math.min(t.right,e.right),bottom:Math.min(t.bottom,e.bottom),left:Math.max(t.left,e.left)});return n.width<=0||n.height<=0?null:n})(t.pageMarginBox,e):ht(e);var fn=({page:e,withPlaceholder:t,axis:n,frame:r})=>{const o=((e,t)=>t?un(e,t.scroll.diff.displacement):e)(e.marginBox,r),i=((e,t,n)=>n&&n.increasedBy?{...e,[t.end]:e[t.end]+n.increasedBy[t.line]}:e)(o,n,t);return{page:e,withPlaceholder:t,active:gn(i,r)}},mn=(e,t)=>{e.frame||$t();const n=e.frame,r=rn(t,n.scroll.initial),o=an(r),i={...n,scroll:{initial:n.scroll.initial,current:t,diff:{value:r,displacement:o},max:n.scroll.max}},a=fn({page:e.subject.page,withPlaceholder:e.subject.withPlaceholder,axis:e.axis,frame:i});return{...e,frame:i,subject:a}};function bn(e,t=Kt){let n=null;function r(...r){if(n&&n.lastThis===this&&t(r,n.lastArgs))return n.lastResult;const o=e.apply(this,r);return n={lastResult:o,lastArgs:r,lastThis:this},o}return r.clear=function(){n=null},r}const hn=bn(e=>e.reduce((e,t)=>(e[t.descriptor.id]=t,e),{})),vn=bn(e=>e.reduce((e,t)=>(e[t.descriptor.id]=t,e),{})),yn=bn(e=>Object.values(e)),xn=bn(e=>Object.values(e));var In=bn((e,t)=>xn(t).filter(t=>e===t.descriptor.droppableId).sort((e,t)=>e.descriptor.index-t.descriptor.index));function En(e){return e.at&&"REORDER"===e.at.type?e.at.destination:null}function Dn(e){return e.at&&"COMBINE"===e.at.type?e.at.combine:null}var wn=bn((e,t)=>t.filter(t=>t.descriptor.id!==e.descriptor.id)),Cn=(e,t)=>e.descriptor.droppableId===t.descriptor.id;const Sn={point:tn,value:0},An={invisible:{},visible:{},all:[]},Pn={displaced:An,displacedBy:Sn,at:null};var On=(e,t)=>n=>e<=n&&n<=t,Nn=e=>{const t=On(e.top,e.bottom),n=On(e.left,e.right);return r=>{if(t(r.top)&&t(r.bottom)&&n(r.left)&&n(r.right))return!0;const o=t(r.top)||t(r.bottom),i=n(r.left)||n(r.right);if(o&&i)return!0;const a=r.top<e.top&&r.bottom>e.bottom,s=r.left<e.left&&r.right>e.right;return!(!a||!s)||(a&&i||s&&o)}},Rn=e=>{const t=On(e.top,e.bottom),n=On(e.left,e.right);return e=>t(e.top)&&t(e.bottom)&&n(e.left)&&n(e.right)};const _n={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},Bn={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"},Tn=({target:e,destination:t,viewport:n,withDroppableDisplacement:r,isVisibleThroughFrameFn:o})=>{const i=r?((e,t)=>{const n=t.frame?t.frame.scroll.diff.displacement:tn;return un(e,n)})(e,t):e;return((e,t,n)=>!!t.subject.active&&n(t.subject.active)(e))(i,t,o)&&((e,t,n)=>n(t)(e))(i,n,o)},Mn=e=>Tn({...e,isVisibleThroughFrameFn:Rn});function Ln({afterDragging:e,destination:t,displacedBy:n,viewport:r,forceShouldAnimate:o,last:i}){return e.reduce(function(e,a){const s=function(e,t){const n=e.page.marginBox,r={top:t.point.y,right:0,bottom:0,left:t.point.x};return ht(vt(n,r))}(a,n),l=a.descriptor.id;var c;if(e.all.push(l),c={target:s,destination:t,viewport:r,withDroppableDisplacement:!0},!Tn({...c,isVisibleThroughFrameFn:Nn}))return e.invisible[a.descriptor.id]=!0,e;const d=((e,t,n)=>{if("boolean"==typeof n)return n;if(!t)return!0;const{invisible:r,visible:o}=t;if(r[e])return!1;const i=o[e];return!i||i.shouldAnimate})(l,i,o),u={draggableId:l,shouldAnimate:d};return e.visible[l]=u,e},{all:[],visible:{},invisible:{}})}function Gn({insideDestination:e,inHomeList:t,displacedBy:n,destination:r}){const o=function(e,t){if(!e.length)return 0;const n=e[e.length-1].descriptor.index;return t.inHomeList?n:n+1}(e,{inHomeList:t});return{displaced:An,displacedBy:n,at:{type:"REORDER",destination:{droppableId:r.descriptor.id,index:o}}}}function Fn({draggable:e,insideDestination:t,destination:n,viewport:r,displacedBy:o,last:i,index:a,forceShouldAnimate:s}){const l=Cn(e,n);if(null==a)return Gn({insideDestination:t,inHomeList:l,displacedBy:o,destination:n});const c=t.find(e=>e.descriptor.index===a);if(!c)return Gn({insideDestination:t,inHomeList:l,displacedBy:o,destination:n});const d=wn(e,t),u=t.indexOf(c);return{displaced:Ln({afterDragging:d.slice(u),destination:n,displacedBy:o,last:i,viewport:r.frame,forceShouldAnimate:s}),displacedBy:o,at:{type:"REORDER",destination:{droppableId:n.descriptor.id,index:a}}}}function jn(e,t){return Boolean(t.effected[e])}const kn=(e,t)=>t.margin[e.start]+t.borderBox[e.size]/2,$n=(e,t,n)=>t[e.crossAxisStart]+n.margin[e.crossAxisStart]+n.borderBox[e.crossAxisSize]/2,Wn=({axis:e,moveRelativeTo:t,isMoving:n})=>sn(e.line,t.marginBox[e.end]+kn(e,n),$n(e,t.marginBox,n)),Un=({axis:e,moveRelativeTo:t,isMoving:n})=>sn(e.line,t.marginBox[e.start]-((e,t)=>t.margin[e.end]+t.borderBox[e.size]/2)(e,n),$n(e,t.marginBox,n));var Hn=(e,t)=>{const n=e.frame;return n?nn(t,n.scroll.diff.displacement):t},qn=e=>{const t=(({impact:e,draggable:t,droppable:n,draggables:r,afterCritical:o})=>{const i=t.page.borderBox.center,a=e.at;return n&&a?"REORDER"===a.type?(({impact:e,draggable:t,draggables:n,droppable:r,afterCritical:o})=>{const i=In(r.descriptor.id,n),a=t.page,s=r.axis;if(!i.length)return(({axis:e,moveInto:t,isMoving:n})=>sn(e.line,t.contentBox[e.start]+kn(e,n),$n(e,t.contentBox,n)))({axis:s,moveInto:r.page,isMoving:a});const{displaced:l,displacedBy:c}=e,d=l.all[0];if(d){const e=n[d];if(jn(d,o))return Un({axis:s,moveRelativeTo:e.page,isMoving:a});const t=Dt(e.page,c.point);return Un({axis:s,moveRelativeTo:t,isMoving:a})}const u=i[i.length-1];if(u.descriptor.id===t.descriptor.id)return a.borderBox.center;if(jn(u.descriptor.id,o)){const e=Dt(u.page,an(o.displacedBy.point));return Wn({axis:s,moveRelativeTo:e,isMoving:a})}return Wn({axis:s,moveRelativeTo:u.page,isMoving:a})})({impact:e,draggable:t,draggables:r,droppable:n,afterCritical:o}):(({afterCritical:e,impact:t,draggables:n})=>{const r=Dn(t);r||$t();const o=r.draggableId,i=n[o].page.borderBox.center,a=(({displaced:e,afterCritical:t,combineWith:n,displacedBy:r})=>{const o=Boolean(e.visible[n]||e.invisible[n]);return jn(n,t)?o?tn:an(r.point):o?r.point:tn})({displaced:t.displaced,afterCritical:e,combineWith:o,displacedBy:t.displacedBy});return nn(i,a)})({impact:e,draggables:r,afterCritical:o}):i})(e),n=e.droppable;return n?Hn(n,t):t},Vn=(e,t)=>{const n=rn(t,e.scroll.initial),r=an(n);return{frame:ht({top:t.y,bottom:t.y+e.frame.height,left:t.x,right:t.x+e.frame.width}),scroll:{initial:e.scroll.initial,max:e.scroll.max,current:t,diff:{value:n,displacement:r}}}};function zn(e,t){return e.map(e=>t[e])}var Yn=({pageBorderBoxCenter:e,draggable:t,viewport:n})=>{const r=((e,t)=>nn(e.scroll.diff.displacement,t))(n,e),o=rn(r,t.page.borderBox.center);return nn(t.client.borderBox.center,o)},Zn=({draggable:e,destination:t,newPageBorderBoxCenter:n,viewport:r,withDroppableDisplacement:o,onlyOnMainAxis:i=!1})=>{const a=rn(n,e.page.borderBox.center),s={target:un(e.page.borderBox,a),destination:t,withDroppableDisplacement:o,viewport:r};return i?(e=>{return Tn({...e,isVisibleThroughFrameFn:(t=e.destination.axis,e=>{const n=On(e.top,e.bottom),r=On(e.left,e.right);return e=>t===_n?n(e.top)&&n(e.bottom):r(e.left)&&r(e.right)})});var t})(s):Mn(s)},Jn=({isMovingForward:e,draggable:t,destination:n,draggables:r,previousImpact:o,viewport:i,previousPageBorderBoxCenter:a,previousClientSelection:s,afterCritical:l})=>{if(!n.isEnabled)return null;const c=In(n.descriptor.id,r),d=Cn(t,n),u=(({isMovingForward:e,draggable:t,destination:n,insideDestination:r,previousImpact:o})=>{if(!n.isCombineEnabled)return null;if(!En(o))return null;function i(e){const t={type:"COMBINE",combine:{draggableId:e,droppableId:n.descriptor.id}};return{...o,at:t}}const a=o.displaced.all,s=a.length?a[0]:null;if(e)return s?i(s):null;const l=wn(t,r);if(!s)return l.length?i(l[l.length-1].descriptor.id):null;const c=l.findIndex(e=>e.descriptor.id===s);-1===c&&$t();const d=c-1;return d<0?null:i(l[d].descriptor.id)})({isMovingForward:e,draggable:t,destination:n,insideDestination:c,previousImpact:o})||(({isMovingForward:e,isInHomeList:t,draggable:n,draggables:r,destination:o,insideDestination:i,previousImpact:a,viewport:s,afterCritical:l})=>{const c=a.at;if(c||$t(),"REORDER"===c.type){const r=(({isMovingForward:e,isInHomeList:t,insideDestination:n,location:r})=>{if(!n.length)return null;const o=r.index,i=e?o+1:o-1,a=n[0].descriptor.index,s=n[n.length-1].descriptor.index;return i<a||i>(t?s:s+1)?null:i})({isMovingForward:e,isInHomeList:t,location:c.destination,insideDestination:i});return null==r?null:Fn({draggable:n,insideDestination:i,destination:o,viewport:s,last:a.displaced,displacedBy:a.displacedBy,index:r})}const d=(({isMovingForward:e,destination:t,draggables:n,combine:r,afterCritical:o})=>{if(!t.isCombineEnabled)return null;const i=r.draggableId,a=n[i].descriptor.index;return jn(i,o)?e?a:a-1:e?a+1:a})({isMovingForward:e,destination:o,displaced:a.displaced,draggables:r,combine:c.combine,afterCritical:l});return null==d?null:Fn({draggable:n,insideDestination:i,destination:o,viewport:s,last:a.displaced,displacedBy:a.displacedBy,index:d})})({isMovingForward:e,isInHomeList:d,draggable:t,draggables:r,destination:n,insideDestination:c,previousImpact:o,viewport:i,afterCritical:l});if(!u)return null;const p=qn({impact:u,draggable:t,droppable:n,draggables:r,afterCritical:l});if(Zn({draggable:t,destination:n,newPageBorderBoxCenter:p,viewport:i.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0}))return{clientSelection:Yn({pageBorderBoxCenter:p,draggable:t,viewport:i}),impact:u,scrollJumpRequest:null};const g=rn(p,a),f=(({impact:e,viewport:t,destination:n,draggables:r,maxScrollChange:o})=>{const i=Vn(t,nn(t.scroll.current,o)),a=n.frame?mn(n,nn(n.frame.scroll.current,o)):n,s=e.displaced,l=Ln({afterDragging:zn(s.all,r),destination:n,displacedBy:e.displacedBy,viewport:i.frame,last:s,forceShouldAnimate:!1}),c=Ln({afterDragging:zn(s.all,r),destination:a,displacedBy:e.displacedBy,viewport:t.frame,last:s,forceShouldAnimate:!1}),d={},u={},p=[s,l,c];return s.all.forEach(e=>{const t=function(e,t){for(let n=0;n<t.length;n++){const r=t[n].visible[e];if(r)return r}return null}(e,p);t?u[e]=t:d[e]=!0}),{...e,displaced:{all:s.all,invisible:d,visible:u}}})({impact:u,viewport:i,destination:n,draggables:r,maxScrollChange:g});return{clientSelection:s,impact:f,scrollJumpRequest:g}};const Xn=e=>{const t=e.subject.active;return t||$t(),t},Kn=(e,t)=>{const n=e.page.borderBox.center;return jn(e.descriptor.id,t)?rn(n,t.displacedBy.point):n},Qn=(e,t)=>{const n=e.page.borderBox;return jn(e.descriptor.id,t)?un(n,an(t.displacedBy.point)):n};var er=bn(function(e,t){const n=t[e.line];return{value:n,point:sn(e.line,n)}});const tr=(e,t)=>({...e,scroll:{...e.scroll,max:t}}),nr=(e,t,n)=>{const r=e.frame;Cn(t,e)&&$t(),e.subject.withPlaceholder&&$t();const o=er(e.axis,t.displaceBy).point,i=((e,t,n)=>{const r=e.axis;if("virtual"===e.descriptor.mode)return sn(r.line,t[r.line]);const o=e.subject.page.contentBox[r.size],i=In(e.descriptor.id,n).reduce((e,t)=>e+t.client.marginBox[r.size],0)+t[r.line]-o;return i<=0?null:sn(r.line,i)})(e,o,n),a={placeholderSize:o,increasedBy:i,oldFrameMaxScroll:e.frame?e.frame.scroll.max:null};if(!r){const t=fn({page:e.subject.page,withPlaceholder:a,axis:e.axis,frame:e.frame});return{...e,subject:t}}const s=i?nn(r.scroll.max,i):r.scroll.max,l=tr(r,s),c=fn({page:e.subject.page,withPlaceholder:a,axis:e.axis,frame:l});return{...e,subject:c,frame:l}};var rr=e=>{const t=e.at;return t?"REORDER"===t.type?t.destination.droppableId:t.combine.droppableId:null},or=({state:e,type:t})=>{const n=((e,t)=>{const n=rr(e);return n?t[n]:null})(e.impact,e.dimensions.droppables),r=Boolean(n),o=e.dimensions.droppables[e.critical.droppable.id],i=n||o,a=i.axis.direction,s="vertical"===a&&("MOVE_UP"===t||"MOVE_DOWN"===t)||"horizontal"===a&&("MOVE_LEFT"===t||"MOVE_RIGHT"===t);if(s&&!r)return null;const l="MOVE_DOWN"===t||"MOVE_RIGHT"===t,c=e.dimensions.draggables[e.critical.draggable.id],d=e.current.page.borderBoxCenter,{draggables:u,droppables:p}=e.dimensions;return s?Jn({isMovingForward:l,previousPageBorderBoxCenter:d,draggable:c,destination:i,draggables:u,viewport:e.viewport,previousClientSelection:e.current.client.selection,previousImpact:e.impact,afterCritical:e.afterCritical}):(({isMovingForward:e,previousPageBorderBoxCenter:t,draggable:n,isOver:r,draggables:o,droppables:i,viewport:a,afterCritical:s})=>{const l=(({isMovingForward:e,pageBorderBoxCenter:t,source:n,droppables:r,viewport:o})=>{const i=n.subject.active;if(!i)return null;const a=n.axis,s=On(i[a.start],i[a.end]),l=yn(r).filter(e=>e!==n).filter(e=>e.isEnabled).filter(e=>Boolean(e.subject.active)).filter(e=>Nn(o.frame)(Xn(e))).filter(t=>{const n=Xn(t);return e?i[a.crossAxisEnd]<n[a.crossAxisEnd]:n[a.crossAxisStart]<i[a.crossAxisStart]}).filter(e=>{const t=Xn(e),n=On(t[a.start],t[a.end]);return s(t[a.start])||s(t[a.end])||n(i[a.start])||n(i[a.end])}).sort((t,n)=>{const r=Xn(t)[a.crossAxisStart],o=Xn(n)[a.crossAxisStart];return e?r-o:o-r}).filter((e,t,n)=>Xn(e)[a.crossAxisStart]===Xn(n[0])[a.crossAxisStart]);if(!l.length)return null;if(1===l.length)return l[0];const c=l.filter(e=>On(Xn(e)[a.start],Xn(e)[a.end])(t[a.line]));return 1===c.length?c[0]:c.length>1?c.sort((e,t)=>Xn(e)[a.start]-Xn(t)[a.start])[0]:l.sort((e,n)=>{const r=cn(t,pn(Xn(e))),o=cn(t,pn(Xn(n)));return r!==o?r-o:Xn(e)[a.start]-Xn(n)[a.start]})[0]})({isMovingForward:e,pageBorderBoxCenter:t,source:r,droppables:i,viewport:a});if(!l)return null;const c=In(l.descriptor.id,o),d=(({pageBorderBoxCenter:e,viewport:t,destination:n,insideDestination:r,afterCritical:o})=>{const i=r.filter(e=>Mn({target:Qn(e,o),destination:n,viewport:t.frame,withDroppableDisplacement:!0})).sort((t,r)=>{const i=ln(e,Hn(n,Kn(t,o))),a=ln(e,Hn(n,Kn(r,o)));return i<a?-1:a<i?1:t.descriptor.index-r.descriptor.index});return i[0]||null})({pageBorderBoxCenter:t,viewport:a,destination:l,insideDestination:c,afterCritical:s}),u=(({previousPageBorderBoxCenter:e,moveRelativeTo:t,insideDestination:n,draggable:r,draggables:o,destination:i,viewport:a,afterCritical:s})=>{if(!t){if(n.length)return null;const e={displaced:An,displacedBy:Sn,at:{type:"REORDER",destination:{droppableId:i.descriptor.id,index:0}}},t=qn({impact:e,draggable:r,droppable:i,draggables:o,afterCritical:s}),l=Cn(r,i)?i:nr(i,r,o);return Zn({draggable:r,destination:l,newPageBorderBoxCenter:t,viewport:a.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0})?e:null}const l=Boolean(e[i.axis.line]<=t.page.borderBox.center[i.axis.line]),c=(()=>{const e=t.descriptor.index;return t.descriptor.id===r.descriptor.id||l?e:e+1})(),d=er(i.axis,r.displaceBy);return Fn({draggable:r,insideDestination:n,destination:i,viewport:a,displacedBy:d,last:An,index:c})})({previousPageBorderBoxCenter:t,destination:l,draggable:n,draggables:o,moveRelativeTo:d,insideDestination:c,viewport:a,afterCritical:s});if(!u)return null;const p=qn({impact:u,draggable:n,droppable:l,draggables:o,afterCritical:s});return{clientSelection:Yn({pageBorderBoxCenter:p,draggable:n,viewport:a}),impact:u,scrollJumpRequest:null}})({isMovingForward:l,previousPageBorderBoxCenter:d,draggable:c,isOver:i,draggables:u,droppables:p,viewport:e.viewport,afterCritical:e.afterCritical})};function ir(e){return"DRAGGING"===e.phase||"COLLECTING"===e.phase}function ar(e){const t=On(e.top,e.bottom),n=On(e.left,e.right);return function(e){return t(e.y)&&n(e.x)}}const sr=(e,t)=>ht(un(e,t));function lr({displaced:e,id:t}){return Boolean(e.visible[t]||e.invisible[t])}var cr=({pageOffset:e,draggable:t,draggables:n,droppables:r,previousImpact:o,viewport:i,afterCritical:a})=>{const s=sr(t.page.borderBox,e),l=function({pageBorderBox:e,draggable:t,droppables:n}){const r=yn(n).filter(t=>{if(!t.isEnabled)return!1;const n=t.subject.active;if(!n)return!1;if(o=n,!((r=e).left<o.right&&r.right>o.left&&r.top<o.bottom&&r.bottom>o.top))return!1;var r,o;if(ar(n)(e.center))return!0;const i=t.axis,a=n.center[i.crossAxisLine],s=e[i.crossAxisStart],l=e[i.crossAxisEnd],c=On(n[i.crossAxisStart],n[i.crossAxisEnd]),d=c(s),u=c(l);return!d&&!u||(d?s<a:l>a)});return r.length?1===r.length?r[0].descriptor.id:function({pageBorderBox:e,draggable:t,candidates:n}){const r=t.page.borderBox.center,o=n.map(t=>{const n=t.axis,o=sn(t.axis.line,e.center[n.line],t.page.borderBox.center[n.crossAxisLine]);return{id:t.descriptor.id,distance:ln(r,o)}}).sort((e,t)=>t.distance-e.distance);return o[0]?o[0].id:null}({pageBorderBox:e,draggable:t,candidates:r}):null}({pageBorderBox:s,draggable:t,droppables:r});if(!l)return Pn;const c=r[l],d=In(c.descriptor.id,n),u=((e,t)=>{const n=e.frame;return n?sr(t,n.scroll.diff.value):t})(c,s);return(({draggable:e,pageBorderBoxWithDroppableScroll:t,previousImpact:n,destination:r,insideDestination:o,afterCritical:i})=>{if(!r.isCombineEnabled)return null;const a=r.axis,s=er(r.axis,e.displaceBy),l=s.value,c=t[a.start],d=t[a.end],u=wn(e,o).find(e=>{const t=e.descriptor.id,r=e.page.borderBox,o=r[a.size]/4,s=jn(t,i),u=lr({displaced:n.displaced,id:t});return s?u?d>r[a.start]+o&&d<r[a.end]-o:c>r[a.start]-l+o&&c<r[a.end]-l-o:u?d>r[a.start]+l+o&&d<r[a.end]+l-o:c>r[a.start]+o&&c<r[a.end]-o});return u?{displacedBy:s,displaced:n.displaced,at:{type:"COMBINE",combine:{draggableId:u.descriptor.id,droppableId:r.descriptor.id}}}:null})({pageBorderBoxWithDroppableScroll:u,draggable:t,previousImpact:o,destination:c,insideDestination:d,afterCritical:a})||(({pageBorderBoxWithDroppableScroll:e,draggable:t,destination:n,insideDestination:r,last:o,viewport:i,afterCritical:a})=>{const s=n.axis,l=er(n.axis,t.displaceBy),c=l.value,d=e[s.start],u=e[s.end],p=function({draggable:e,closest:t,inHomeList:n}){return t?n&&t.descriptor.index>e.descriptor.index?t.descriptor.index-1:t.descriptor.index:null}({draggable:t,closest:wn(t,r).find(e=>{const t=e.descriptor.id,n=e.page.borderBox.center[s.line],r=jn(t,a),i=lr({displaced:o,id:t});return r?i?u<=n:d<n-c:i?u<=n+c:d<n})||null,inHomeList:Cn(t,n)});return Fn({draggable:t,insideDestination:r,destination:n,viewport:i,last:o,displacedBy:l,index:p})})({pageBorderBoxWithDroppableScroll:u,draggable:t,destination:c,insideDestination:d,last:o.displaced,viewport:i,afterCritical:a})},dr=(e,t)=>({...e,[t.descriptor.id]:t});var ur=({state:e,clientSelection:t,dimensions:n,viewport:r,impact:o,scrollJumpRequest:i})=>{const a=r||e.viewport,s=n||e.dimensions,l=t||e.current.client.selection,c=rn(l,e.initial.client.selection),d={offset:c,selection:l,borderBoxCenter:nn(e.initial.client.borderBoxCenter,c)},u={selection:nn(d.selection,a.scroll.current),borderBoxCenter:nn(d.borderBoxCenter,a.scroll.current),offset:nn(d.offset,a.scroll.diff.value)},p={client:d,page:u};if("COLLECTING"===e.phase)return{...e,dimensions:s,viewport:a,current:p};const g=s.draggables[e.critical.draggable.id],f=o||cr({pageOffset:u.offset,draggable:g,draggables:s.draggables,droppables:s.droppables,previousImpact:e.impact,viewport:a,afterCritical:e.afterCritical}),m=(({draggable:e,draggables:t,droppables:n,previousImpact:r,impact:o})=>{const i=(({previousImpact:e,impact:t,droppables:n})=>{const r=rr(e),o=rr(t);if(!r)return n;if(r===o)return n;const i=n[r];if(!i.subject.withPlaceholder)return n;const a=(e=>{const t=e.subject.withPlaceholder;t||$t();const n=e.frame;if(!n){const t=fn({page:e.subject.page,axis:e.axis,frame:null,withPlaceholder:null});return{...e,subject:t}}const r=t.oldFrameMaxScroll;r||$t();const o=tr(n,r),i=fn({page:e.subject.page,axis:e.axis,frame:o,withPlaceholder:null});return{...e,subject:i,frame:o}})(i);return dr(n,a)})({previousImpact:r,impact:o,droppables:n}),a=rr(o);if(!a)return i;const s=n[a];if(Cn(e,s))return i;if(s.subject.withPlaceholder)return i;const l=nr(s,e,t);return dr(i,l)})({draggable:g,impact:f,previousImpact:e.impact,draggables:s.draggables,droppables:s.droppables});return{...e,current:p,dimensions:{draggables:s.draggables,droppables:m},impact:f,viewport:a,scrollJumpRequest:i||null,forceShouldAnimate:!i&&null}},pr=({impact:e,viewport:t,draggables:n,destination:r,forceShouldAnimate:o})=>{const i=e.displaced,a=function(e,t){return e.map(e=>t[e])}(i.all,n),s=Ln({afterDragging:a,destination:r,displacedBy:e.displacedBy,viewport:t.frame,forceShouldAnimate:o,last:i});return{...e,displaced:s}},gr=({impact:e,draggable:t,droppable:n,draggables:r,viewport:o,afterCritical:i})=>{const a=qn({impact:e,draggable:t,draggables:r,droppable:n,afterCritical:i});return Yn({pageBorderBoxCenter:a,draggable:t,viewport:o})},fr=({state:e,dimensions:t,viewport:n})=>{"SNAP"!==e.movementMode&&$t();const r=e.impact,o=n||e.viewport,i=t||e.dimensions,{draggables:a,droppables:s}=i,l=a[e.critical.draggable.id],c=rr(r);c||$t();const d=s[c],u=pr({impact:r,viewport:o,destination:d,draggables:a}),p=gr({impact:u,draggable:l,droppable:d,draggables:a,viewport:o,afterCritical:e.afterCritical});return ur({impact:u,clientSelection:p,state:e,dimensions:i,viewport:o})},mr=({draggable:e,home:t,draggables:n,viewport:r})=>{const o=er(t.axis,e.displaceBy),i=In(t.descriptor.id,n),a=i.indexOf(e);-1===a&&$t();const s=i.slice(a+1),l=s.reduce((e,t)=>(e[t.descriptor.id]=!0,e),{}),c={inVirtualList:"virtual"===t.descriptor.mode,displacedBy:o,effected:l};var d;return{impact:{displaced:Ln({afterDragging:s,destination:t,displacedBy:o,last:null,viewport:r.frame,forceShouldAnimate:!1}),displacedBy:o,at:{type:"REORDER",destination:(d=e.descriptor,{index:d.index,droppableId:d.droppableId})}},afterCritical:c}};const br=e=>"SNAP"===e.movementMode,hr=(e,t,n)=>{const r=((e,t)=>({draggables:e.draggables,droppables:dr(e.droppables,t)}))(e.dimensions,t);return!br(e)||n?ur({state:e,dimensions:r}):fr({state:e,dimensions:r})};function vr(e){return e.isDragging&&"SNAP"===e.movementMode?{...e,scrollJumpRequest:null}:e}const yr={phase:"IDLE",completed:null,shouldFlush:!1};var xr=(e=yr,t)=>{if("FLUSH"===t.type)return{...yr,shouldFlush:!0};if("INITIAL_PUBLISH"===t.type){"IDLE"!==e.phase&&$t();const{critical:n,clientSelection:r,viewport:o,dimensions:i,movementMode:a}=t.payload,s=i.draggables[n.draggable.id],l=i.droppables[n.droppable.id],c={selection:r,borderBoxCenter:s.client.borderBox.center,offset:tn},d={client:c,page:{selection:nn(c.selection,o.scroll.initial),borderBoxCenter:nn(c.selection,o.scroll.initial),offset:nn(c.selection,o.scroll.diff.value)}},u=yn(i.droppables).every(e=>!e.isFixedOnPage),{impact:p,afterCritical:g}=mr({draggable:s,home:l,draggables:i.draggables,viewport:o});return{phase:"DRAGGING",isDragging:!0,critical:n,movementMode:a,dimensions:i,initial:d,current:d,isWindowScrollAllowed:u,impact:p,afterCritical:g,onLiftImpact:p,viewport:o,scrollJumpRequest:null,forceShouldAnimate:null}}if("COLLECTION_STARTING"===t.type)return"COLLECTING"===e.phase||"DROP_PENDING"===e.phase?e:("DRAGGING"!==e.phase&&$t(),{...e,phase:"COLLECTING"});if("PUBLISH_WHILE_DRAGGING"===t.type)return"COLLECTING"!==e.phase&&"DROP_PENDING"!==e.phase&&$t(),(({state:e,published:t})=>{const n=t.modified.map(t=>{const n=e.dimensions.droppables[t.droppableId];return mn(n,t.scroll)}),r={...e.dimensions.droppables,...hn(n)},o=vn((({additions:e,updatedDroppables:t,viewport:n})=>{const r=n.scroll.diff.value;return e.map(e=>{const o=e.descriptor.droppableId,i=(e=>{const t=e.frame;return t||$t(),t})(t[o]),a=i.scroll.diff.value,s=(({draggable:e,offset:t,initialWindowScroll:n})=>{const r=Dt(e.client,t),o=wt(r,n);return{...e,placeholder:{...e.placeholder,client:r},client:r,page:o}})({draggable:e,offset:nn(r,a),initialWindowScroll:n.scroll.initial});return s})})({additions:t.additions,updatedDroppables:r,viewport:e.viewport})),i={...e.dimensions.draggables,...o};t.removals.forEach(e=>{delete i[e]});const a={droppables:r,draggables:i},s=rr(e.impact),l=s?a.droppables[s]:null,c=a.draggables[e.critical.draggable.id],d=a.droppables[e.critical.droppable.id],{impact:u,afterCritical:p}=mr({draggable:c,home:d,draggables:i,viewport:e.viewport}),g=l&&l.isCombineEnabled?e.impact:u,f=cr({pageOffset:e.current.page.offset,draggable:a.draggables[e.critical.draggable.id],draggables:a.draggables,droppables:a.droppables,previousImpact:g,viewport:e.viewport,afterCritical:p}),m={...e,phase:"DRAGGING",impact:f,onLiftImpact:u,dimensions:a,afterCritical:p,forceShouldAnimate:!1};return"COLLECTING"===e.phase?m:{...m,phase:"DROP_PENDING",reason:e.reason,isWaiting:!1}})({state:e,published:t.payload});if("MOVE"===t.type){if("DROP_PENDING"===e.phase)return e;ir(e)||$t();const{client:n}=t.payload;return on(n,e.current.client.selection)?e:ur({state:e,clientSelection:n,impact:br(e)?e.impact:null})}if("UPDATE_DROPPABLE_SCROLL"===t.type){if("DROP_PENDING"===e.phase)return vr(e);if("COLLECTING"===e.phase)return vr(e);ir(e)||$t();const{id:n,newScroll:r}=t.payload,o=e.dimensions.droppables[n];if(!o)return e;const i=mn(o,r);return hr(e,i,!1)}if("UPDATE_DROPPABLE_IS_ENABLED"===t.type){if("DROP_PENDING"===e.phase)return e;ir(e)||$t();const{id:n,isEnabled:r}=t.payload,o=e.dimensions.droppables[n];o||$t(),o.isEnabled===r&&$t();const i={...o,isEnabled:r};return hr(e,i,!0)}if("UPDATE_DROPPABLE_IS_COMBINE_ENABLED"===t.type){if("DROP_PENDING"===e.phase)return e;ir(e)||$t();const{id:n,isCombineEnabled:r}=t.payload,o=e.dimensions.droppables[n];o||$t(),o.isCombineEnabled===r&&$t();const i={...o,isCombineEnabled:r};return hr(e,i,!0)}if("MOVE_BY_WINDOW_SCROLL"===t.type){if("DROP_PENDING"===e.phase||"DROP_ANIMATING"===e.phase)return e;ir(e)||$t(),e.isWindowScrollAllowed||$t();const n=t.payload.newScroll;if(on(e.viewport.scroll.current,n))return vr(e);const r=Vn(e.viewport,n);return br(e)?fr({state:e,viewport:r}):ur({state:e,viewport:r})}if("UPDATE_VIEWPORT_MAX_SCROLL"===t.type){if(!ir(e))return e;const n=t.payload.maxScroll;if(on(n,e.viewport.scroll.max))return e;const r={...e.viewport,scroll:{...e.viewport.scroll,max:n}};return{...e,viewport:r}}if("MOVE_UP"===t.type||"MOVE_DOWN"===t.type||"MOVE_LEFT"===t.type||"MOVE_RIGHT"===t.type){if("COLLECTING"===e.phase||"DROP_PENDING"===e.phase)return e;"DRAGGING"!==e.phase&&$t();const n=or({state:e,type:t.type});return n?ur({state:e,impact:n.impact,clientSelection:n.clientSelection,scrollJumpRequest:n.scrollJumpRequest}):e}if("DROP_PENDING"===t.type){const n=t.payload.reason;return"COLLECTING"!==e.phase&&$t(),{...e,phase:"DROP_PENDING",isWaiting:!0,reason:n}}if("DROP_ANIMATE"===t.type){const{completed:n,dropDuration:r,newHomeClientOffset:o}=t.payload;return"DRAGGING"!==e.phase&&"DROP_PENDING"!==e.phase&&$t(),{phase:"DROP_ANIMATING",completed:n,dropDuration:r,newHomeClientOffset:o,dimensions:e.dimensions}}if("DROP_COMPLETE"===t.type){const{completed:e}=t.payload;return{phase:"IDLE",completed:e,shouldFlush:!1}}return e};function Ir(e,t){return e instanceof Object&&"type"in e&&e.type===t}const Er=e=>({type:"PUBLISH_WHILE_DRAGGING",payload:e}),Dr=()=>({type:"COLLECTION_STARTING",payload:null}),wr=e=>({type:"UPDATE_DROPPABLE_SCROLL",payload:e}),Cr=e=>({type:"UPDATE_DROPPABLE_IS_ENABLED",payload:e}),Sr=e=>({type:"UPDATE_DROPPABLE_IS_COMBINE_ENABLED",payload:e}),Ar=e=>({type:"MOVE",payload:e}),Pr=()=>({type:"MOVE_UP",payload:null}),Or=()=>({type:"MOVE_DOWN",payload:null}),Nr=()=>({type:"MOVE_RIGHT",payload:null}),Rr=()=>({type:"MOVE_LEFT",payload:null}),_r=e=>({type:"DROP_COMPLETE",payload:e}),Br=e=>({type:"DROP",payload:e}),Tr="cubic-bezier(.2,1,.1,1)",Mr=0,Lr=.7,Gr=.75,Fr={outOfTheWay:.2,minDropTime:.33,maxDropTime:.55},jr=`${Fr.outOfTheWay}s cubic-bezier(0.2, 0, 0, 1)`,kr={fluid:`opacity ${jr}`,snap:`transform ${jr}, opacity ${jr}`,drop:e=>{const t=`${e}s ${Tr}`;return`transform ${t}, opacity ${t}`},outOfTheWay:`transform ${jr}`,placeholder:`height ${jr}, width ${jr}, margin ${jr}`},$r=e=>on(e,tn)?void 0:`translate(${e.x}px, ${e.y}px)`,Wr=$r,{minDropTime:Ur,maxDropTime:Hr}=Fr,qr=Hr-Ur,Vr=({getState:e,dispatch:t})=>n=>r=>{if(!Ir(r,"DROP"))return void n(r);const o=e(),i=r.payload.reason;if("COLLECTING"===o.phase)return void t((e=>({type:"DROP_PENDING",payload:e}))({reason:i}));if("IDLE"===o.phase)return;"DROP_PENDING"===o.phase&&o.isWaiting&&$t(),"DRAGGING"!==o.phase&&"DROP_PENDING"!==o.phase&&$t();const a=o.critical,s=o.dimensions,l=s.draggables[o.critical.draggable.id],{impact:c,didDropInsideDroppable:d}=(({draggables:e,reason:t,lastImpact:n,home:r,viewport:o,onLiftImpact:i})=>n.at&&"DROP"===t?"REORDER"===n.at.type?{impact:n,didDropInsideDroppable:!0}:{impact:{...n,displaced:An},didDropInsideDroppable:!0}:{impact:pr({draggables:e,impact:i,destination:r,viewport:o,forceShouldAnimate:!0}),didDropInsideDroppable:!1})({reason:i,lastImpact:o.impact,afterCritical:o.afterCritical,onLiftImpact:o.onLiftImpact,home:o.dimensions.droppables[o.critical.droppable.id],viewport:o.viewport,draggables:o.dimensions.draggables}),u=d?En(c):null,p=d?Dn(c):null,g={index:a.draggable.index,droppableId:a.droppable.id},f={draggableId:l.descriptor.id,type:l.descriptor.type,source:g,reason:i,mode:o.movementMode,destination:u,combine:p},m=(({impact:e,draggable:t,dimensions:n,viewport:r,afterCritical:o})=>{const{draggables:i,droppables:a}=n,s=rr(e),l=s?a[s]:null,c=a[t.descriptor.droppableId],d=gr({impact:e,draggable:t,draggables:i,afterCritical:o,droppable:l||c,viewport:r});return rn(d,t.client.borderBox.center)})({impact:c,draggable:l,dimensions:s,viewport:o.viewport,afterCritical:o.afterCritical}),b={critical:o.critical,afterCritical:o.afterCritical,result:f,impact:c};if(on(o.current.client.offset,m)&&!Boolean(f.combine))return void t(_r({completed:b}));const h=(({current:e,destination:t,reason:n})=>{const r=ln(e,t);if(r<=0)return Ur;if(r>=1500)return Hr;const o=Ur+qr*(r/1500);return Number(("CANCEL"===n?.6*o:o).toFixed(2))})({current:o.current.client.offset,destination:m,reason:i});t((e=>({type:"DROP_ANIMATE",payload:e}))({newHomeClientOffset:m,dropDuration:h,completed:b}))};var zr=()=>({x:window.pageXOffset,y:window.pageYOffset});const Yr=e=>{const t=function({onWindowScroll:e}){const t=At(function(){e(zr())}),n=function(e){return{eventName:"scroll",options:{passive:!0,capture:!1},fn:t=>{t.target!==window&&t.target!==window.document||e()}}}(t);let r=Ft;function o(){return r!==Ft}return{start:function(){o()&&$t(),r=jt(window,[n])},stop:function(){o()||$t(),t.cancel(),r(),r=Ft},isActive:o}}({onWindowScroll:t=>{e.dispatch({type:"MOVE_BY_WINDOW_SCROLL",payload:{newScroll:t}})}});return e=>n=>{!t.isActive()&&Ir(n,"INITIAL_PUBLISH")&&t.start(),t.isActive()&&(e=>Ir(e,"DROP_COMPLETE")||Ir(e,"DROP_ANIMATE")||Ir(e,"FLUSH"))(n)&&t.stop(),e(n)}};const Zr=(e,t)=>{t()},Jr=(e,t)=>({draggableId:e.draggable.id,type:e.droppable.type,source:{droppableId:e.droppable.id,index:e.draggable.index},mode:t});function Xr(e,t,n,r){if(!e)return void n(r(t));const o=(e=>{let t=!1,n=!1;const r=setTimeout(()=>{n=!0}),o=o=>{t||n||(t=!0,e(o),clearTimeout(r))};return o.wasCalled=()=>t,o})(n);e(t,{announce:o}),o.wasCalled()||n(r(t))}var Kr=(e,t)=>{const n=((e,t)=>{const n=(()=>{const e=[];return{add:t=>{const n=setTimeout(()=>(t=>{const n=e.findIndex(e=>e.timerId===t);-1===n&&$t();const[r]=e.splice(n,1);r.callback()})(n)),r={timerId:n,callback:t};e.push(r)},flush:()=>{if(!e.length)return;const t=[...e];e.length=0,t.forEach(e=>{clearTimeout(e.timerId),e.callback()})}}})();let r=null;const o=n=>{r||$t(),r=null,Zr(0,()=>Xr(e().onDragEnd,n,t,Jt))};return{beforeCapture:(t,n)=>{r&&$t(),Zr(0,()=>{const r=e().onBeforeCapture;r&&r({draggableId:t,mode:n})})},beforeStart:(t,n)=>{r&&$t(),Zr(0,()=>{const r=e().onBeforeDragStart;r&&r(Jr(t,n))})},start:(o,i)=>{r&&$t();const a=Jr(o,i);r={mode:i,lastCritical:o,lastLocation:a.source,lastCombine:null},n.add(()=>{Zr(0,()=>Xr(e().onDragStart,a,t,Yt))})},update:(o,i)=>{const a=En(i),s=Dn(i);r||$t();const l=!((e,t)=>{if(e===t)return!0;const n=e.draggable.id===t.draggable.id&&e.draggable.droppableId===t.draggable.droppableId&&e.draggable.type===t.draggable.type&&e.draggable.index===t.draggable.index,r=e.droppable.id===t.droppable.id&&e.droppable.type===t.droppable.type;return n&&r})(o,r.lastCritical);l&&(r.lastCritical=o);const c=(u=a,!(null==(d=r.lastLocation)&&null==u||null!=d&&null!=u&&d.droppableId===u.droppableId&&d.index===u.index));var d,u;c&&(r.lastLocation=a);const p=!((e,t)=>null==e&&null==t||null!=e&&null!=t&&e.draggableId===t.draggableId&&e.droppableId===t.droppableId)(r.lastCombine,s);if(p&&(r.lastCombine=s),!l&&!c&&!p)return;const g={...Jr(o,r.mode),combine:s,destination:a};n.add(()=>{Zr(0,()=>Xr(e().onDragUpdate,g,t,Zt))})},flush:()=>{r||$t(),n.flush()},drop:o,abort:()=>{if(!r)return;const e={...Jr(r.lastCritical,r.mode),combine:null,destination:null,reason:"CANCEL"};o(e)}}})(e,t);return e=>t=>r=>{if(Ir(r,"BEFORE_INITIAL_CAPTURE"))return void n.beforeCapture(r.payload.draggableId,r.payload.movementMode);if(Ir(r,"INITIAL_PUBLISH")){const e=r.payload.critical;return n.beforeStart(e,r.payload.movementMode),t(r),void n.start(e,r.payload.movementMode)}if(Ir(r,"DROP_COMPLETE")){const e=r.payload.completed.result;return n.flush(),t(r),void n.drop(e)}if(t(r),Ir(r,"FLUSH"))return void n.abort();const o=e.getState();"DRAGGING"===o.phase&&n.update(o.critical,o.impact)}};const Qr=e=>t=>n=>{if(!Ir(n,"DROP_ANIMATION_FINISHED"))return void t(n);const r=e.getState();"DROP_ANIMATING"!==r.phase&&$t(),e.dispatch(_r({completed:r.completed}))},eo=e=>{let t=null,n=null;return r=>o=>{if((Ir(o,"FLUSH")||Ir(o,"DROP_COMPLETE")||Ir(o,"DROP_ANIMATION_FINISHED"))&&(n&&(cancelAnimationFrame(n),n=null),t&&(t(),t=null)),r(o),!Ir(o,"DROP_ANIMATE"))return;const i={eventName:"scroll",options:{capture:!0,passive:!1,once:!0},fn:function(){"DROP_ANIMATING"===e.getState().phase&&e.dispatch({type:"DROP_ANIMATION_FINISHED",payload:null})}};n=requestAnimationFrame(()=>{n=null,t=jt(window,[i])})}};const to=e=>t=>n=>{if(t(n),!Ir(n,"PUBLISH_WHILE_DRAGGING"))return;const r=e.getState();"DROP_PENDING"===r.phase&&(r.isWaiting||e.dispatch(Br({reason:r.reason})))},no=le;var ro=({dimensionMarshal:e,focusMarshal:t,styleMarshal:n,getResponders:r,announce:o,autoScroller:i})=>{return ie(xr,no(function(...e){return t=>(n,r)=>{const o=t(n,r);let i=()=>{throw new Error(te(15))};const a={getState:o.getState,dispatch:(e,...t)=>i(e,...t)},s=e.map(e=>e(a));return i=le(...s)(o.dispatch),{...o,dispatch:i}}}((a=n,()=>e=>t=>{Ir(t,"INITIAL_PUBLISH")&&a.dragging(),Ir(t,"DROP_ANIMATE")&&a.dropping(t.payload.completed.result.reason),(Ir(t,"FLUSH")||Ir(t,"DROP_COMPLETE"))&&a.resting(),e(t)}),(e=>()=>t=>n=>{(Ir(n,"DROP_COMPLETE")||Ir(n,"FLUSH")||Ir(n,"DROP_ANIMATE"))&&e.stopPublishing(),t(n)})(e),(e=>({getState:t,dispatch:n})=>r=>o=>{if(!Ir(o,"LIFT"))return void r(o);const{id:i,clientSelection:a,movementMode:s}=o.payload,l=t();"DROP_ANIMATING"===l.phase&&n(_r({completed:l.completed})),"IDLE"!==t().phase&&$t(),n({type:"FLUSH",payload:null}),n({type:"BEFORE_INITIAL_CAPTURE",payload:{draggableId:i,movementMode:s}});const c={draggableId:i,scrollOptions:{shouldPublishImmediately:"SNAP"===s}},{critical:d,dimensions:u,viewport:p}=e.startPublishing(c);n({type:"INITIAL_PUBLISH",payload:{critical:d,dimensions:u,clientSelection:a,movementMode:s,viewport:p}})})(e),Vr,Qr,eo,to,(e=>t=>n=>r=>{if((e=>Ir(e,"DROP_COMPLETE")||Ir(e,"DROP_ANIMATE")||Ir(e,"FLUSH"))(r))return e.stop(),void n(r);if(Ir(r,"INITIAL_PUBLISH")){n(r);const o=t.getState();return"DRAGGING"!==o.phase&&$t(),void e.start(o)}n(r),e.scroll(t.getState())})(i),Yr,(e=>{let t=!1;return()=>n=>r=>{if(Ir(r,"INITIAL_PUBLISH"))return t=!0,e.tryRecordFocus(r.payload.critical.draggable.id),n(r),void e.tryRestoreFocusRecorded();if(n(r),t){if(Ir(r,"FLUSH"))return t=!1,void e.tryRestoreFocusRecorded();if(Ir(r,"DROP_COMPLETE")){t=!1;const n=r.payload.completed.result;n.combine&&e.tryShiftRecord(n.draggableId,n.combine.draggableId),e.tryRestoreFocusRecorded()}}}})(t),Kr(r,o))));var a},oo=({scrollHeight:e,scrollWidth:t,height:n,width:r})=>{const o=rn({x:t,y:e},{x:r,y:n});return{x:Math.max(0,o.x),y:Math.max(0,o.y)}},io=()=>{const e=document.documentElement;return e||$t(),e},ao=()=>{const e=io();return oo({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,width:e.clientWidth,height:e.clientHeight})};function so(e,t,n){return n.descriptor.id!==t.id&&(n.descriptor.type===t.type&&"virtual"===e.droppable.getById(n.descriptor.droppableId).descriptor.mode)}var lo=(e,t)=>{let n=null;const r=function({registry:e,callbacks:t}){let n={additions:{},removals:{},modified:{}},r=null;const o=()=>{r||(t.collectionStarting(),r=requestAnimationFrame(()=>{r=null;const{additions:o,removals:i,modified:a}=n,s=Object.keys(o).map(t=>e.draggable.getById(t).getDimension(tn)).sort((e,t)=>e.descriptor.index-t.descriptor.index),l=Object.keys(a).map(t=>({droppableId:t,scroll:e.droppable.getById(t).callbacks.getScrollWhileDragging()})),c={additions:s,removals:Object.keys(i),modified:l};n={additions:{},removals:{},modified:{}},t.publish(c)}))};return{add:e=>{const t=e.descriptor.id;n.additions[t]=e,n.modified[e.descriptor.droppableId]=!0,n.removals[t]&&delete n.removals[t],o()},remove:e=>{const t=e.descriptor;n.removals[t.id]=!0,n.modified[t.droppableId]=!0,n.additions[t.id]&&delete n.additions[t.id],o()},stop:()=>{r&&(cancelAnimationFrame(r),r=null,n={additions:{},removals:{},modified:{}})}}}({callbacks:{publish:t.publishWhileDragging,collectionStarting:t.collectionStarting},registry:e}),o=t=>{n||$t();const o=n.critical.draggable;"ADDITION"===t.type&&so(e,o,t.value)&&r.add(t.value),"REMOVAL"===t.type&&so(e,o,t.value)&&r.remove(t.value)},i={updateDroppableIsEnabled:(r,o)=>{e.droppable.exists(r)||$t(),n&&t.updateDroppableIsEnabled({id:r,isEnabled:o})},updateDroppableIsCombineEnabled:(r,o)=>{n&&(e.droppable.exists(r)||$t(),t.updateDroppableIsCombineEnabled({id:r,isCombineEnabled:o}))},scrollDroppable:(t,r)=>{n&&e.droppable.getById(t).callbacks.scroll(r)},updateDroppableScroll:(r,o)=>{n&&(e.droppable.exists(r)||$t(),t.updateDroppableScroll({id:r,newScroll:o}))},startPublishing:t=>{n&&$t();const r=e.draggable.getById(t.draggableId),i=e.droppable.getById(r.descriptor.droppableId),a={draggable:r.descriptor,droppable:i.descriptor},s=e.subscribe(o);return n={critical:a,unsubscribe:s},(({critical:e,scrollOptions:t,registry:n})=>{const r=(()=>{const e=zr(),t=ao(),n=e.y,r=e.x,o=io(),i=o.clientWidth,a=o.clientHeight;return{frame:ht({top:n,left:r,right:r+i,bottom:n+a}),scroll:{initial:e,current:e,max:t,diff:{value:tn,displacement:tn}}}})(),o=r.scroll.current,i=e.droppable,a=n.droppable.getAllByType(i.type).map(e=>e.callbacks.getDimensionAndWatchScroll(o,t)),s=n.draggable.getAllByType(e.draggable.type).map(e=>e.getDimension(o));return{dimensions:{draggables:vn(s),droppables:hn(a)},critical:e,viewport:r}})({critical:a,registry:e,scrollOptions:t.scrollOptions})},stopPublishing:()=>{if(!n)return;r.stop();const t=n.critical.droppable;e.droppable.getAllByType(t.type).forEach(e=>e.callbacks.dragStopped()),n.unsubscribe(),n=null}};return i},co=(e,t)=>"IDLE"===e.phase||"DROP_ANIMATING"===e.phase&&e.completed.result.draggableId!==t&&"DROP"===e.completed.result.reason,uo=e=>{window.scrollBy(e.x,e.y)};const po=bn(e=>yn(e).filter(e=>!!e.isEnabled&&!!e.frame));const go={startFromPercentage:.25,maxScrollAtPercentage:.05,maxPixelScroll:28,ease:e=>e**2,durationDampening:{stopDampeningAt:1200,accelerateAt:360},disabled:!1};var fo=({startOfRange:e,endOfRange:t,current:n})=>{const r=t-e;return 0===r?0:(n-e)/r},mo=({distanceToEdge:e,thresholds:t,dragStartTime:n,shouldUseTimeDampening:r,getAutoScrollerOptions:o})=>{const i=((e,t,n=()=>go)=>{const r=n();if(e>t.startScrollingFrom)return 0;if(e<=t.maxScrollValueAt)return r.maxPixelScroll;if(e===t.startScrollingFrom)return 1;const o=1-fo({startOfRange:t.maxScrollValueAt,endOfRange:t.startScrollingFrom,current:e}),i=r.maxPixelScroll*r.ease(o);return Math.ceil(i)})(e,t,o);return 0===i?0:r?Math.max(((e,t,n)=>{const r=n(),o=r.durationDampening.accelerateAt,i=r.durationDampening.stopDampeningAt,a=t,s=i,l=Date.now()-a;if(l>=i)return e;if(l<o)return 1;const c=fo({startOfRange:o,endOfRange:s,current:l}),d=e*r.ease(c);return Math.ceil(d)})(i,n,o),1):i},bo=({container:e,distanceToEdges:t,dragStartTime:n,axis:r,shouldUseTimeDampening:o,getAutoScrollerOptions:i})=>{const a=((e,t,n=()=>go)=>{const r=n();return{startScrollingFrom:e[t.size]*r.startFromPercentage,maxScrollValueAt:e[t.size]*r.maxScrollAtPercentage}})(e,r,i);return t[r.end]<t[r.start]?mo({distanceToEdge:t[r.end],thresholds:a,dragStartTime:n,shouldUseTimeDampening:o,getAutoScrollerOptions:i}):-1*mo({distanceToEdge:t[r.start],thresholds:a,dragStartTime:n,shouldUseTimeDampening:o,getAutoScrollerOptions:i})};const ho=dn(e=>0===e?0:e);var vo=({dragStartTime:e,container:t,subject:n,center:r,shouldUseTimeDampening:o,getAutoScrollerOptions:i})=>{const a={top:r.y-t.top,right:t.right-r.x,bottom:t.bottom-r.y,left:r.x-t.left},s=bo({container:t,distanceToEdges:a,dragStartTime:e,axis:_n,shouldUseTimeDampening:o,getAutoScrollerOptions:i}),l=bo({container:t,distanceToEdges:a,dragStartTime:e,axis:Bn,shouldUseTimeDampening:o,getAutoScrollerOptions:i}),c=ho({x:l,y:s});if(on(c,tn))return null;const d=(({container:e,subject:t,proposedScroll:n})=>{const r=t.height>e.height,o=t.width>e.width;return o||r?o&&r?null:{x:o?0:n.x,y:r?0:n.y}:n})({container:t,subject:n,proposedScroll:c});return d?on(d,tn)?null:d:null};const yo=dn(e=>0===e?0:e>0?1:-1),xo=(()=>{const e=(e,t)=>e<0?e:e>t?e-t:0;return({current:t,max:n,change:r})=>{const o=nn(t,r),i={x:e(o.x,n.x),y:e(o.y,n.y)};return on(i,tn)?null:i}})(),Io=({max:e,current:t,change:n})=>{const r={x:Math.max(t.x,e.x),y:Math.max(t.y,e.y)},o=yo(n),i=xo({max:r,current:t,change:o});return!i||0!==o.x&&0===i.x||0!==o.y&&0===i.y},Eo=(e,t)=>Io({current:e.scroll.current,max:e.scroll.max,change:t}),Do=(e,t)=>{const n=e.frame;return!!n&&Io({current:n.scroll.current,max:n.scroll.max,change:t})};var wo=({state:e,dragStartTime:t,shouldUseTimeDampening:n,scrollWindow:r,scrollDroppable:o,getAutoScrollerOptions:i})=>{const a=e.current.page.borderBoxCenter,s=e.dimensions.draggables[e.critical.draggable.id].page.marginBox;if(e.isWindowScrollAllowed){const o=(({viewport:e,subject:t,center:n,dragStartTime:r,shouldUseTimeDampening:o,getAutoScrollerOptions:i})=>{const a=vo({dragStartTime:r,container:e.frame,subject:t,center:n,shouldUseTimeDampening:o,getAutoScrollerOptions:i});return a&&Eo(e,a)?a:null})({dragStartTime:t,viewport:e.viewport,subject:s,center:a,shouldUseTimeDampening:n,getAutoScrollerOptions:i});if(o)return void r(o)}const l=(({center:e,destination:t,droppables:n})=>{if(t){const e=n[t];return e.frame?e:null}const r=((e,t)=>po(t).find(t=>(t.frame||$t(),ar(t.frame.pageMarginBox)(e)))||null)(e,n);return r})({center:a,destination:rr(e.impact),droppables:e.dimensions.droppables});if(!l)return;const c=(({droppable:e,subject:t,center:n,dragStartTime:r,shouldUseTimeDampening:o,getAutoScrollerOptions:i})=>{const a=e.frame;if(!a)return null;const s=vo({dragStartTime:r,container:a.pageMarginBox,subject:t,center:n,shouldUseTimeDampening:o,getAutoScrollerOptions:i});return s&&Do(e,s)?s:null})({dragStartTime:t,droppable:l,subject:s,center:a,shouldUseTimeDampening:n,getAutoScrollerOptions:i});c&&o(l.descriptor.id,c)};const Co="data-rfd",So=(()=>{const e=`${Co}-drag-handle`;return{base:e,draggableId:`${e}-draggable-id`,contextId:`${e}-context-id`}})(),Ao=(()=>{const e=`${Co}-draggable`;return{base:e,contextId:`${e}-context-id`,id:`${e}-id`}})(),Po=(()=>{const e=`${Co}-droppable`;return{base:e,contextId:`${e}-context-id`,id:`${e}-id`}})(),Oo={contextId:`${Co}-scroll-container-context-id`},No=(e,t)=>e.map(e=>{const n=e.styles[t];return n?`${e.selector} { ${n} }`:""}).join(" "),Ro="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?Bt:_t,_o=()=>{const e=document.querySelector("head");return e||$t(),e},Bo=e=>{const t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.type="text/css",t};function To(e,t){return Array.from(e.querySelectorAll(t))}var Mo=e=>e&&e.ownerDocument&&e.ownerDocument.defaultView?e.ownerDocument.defaultView:window;function Lo(e){return e instanceof Mo(e).HTMLElement}function Go(){const e={draggables:{},droppables:{}},t=[];function n(e){t.length&&t.forEach(t=>t(e))}function r(t){return e.draggables[t]||null}function o(t){return e.droppables[t]||null}return{draggable:{register:t=>{e.draggables[t.descriptor.id]=t,n({type:"ADDITION",value:t})},update:(t,n)=>{const r=e.draggables[n.descriptor.id];r&&r.uniqueId===t.uniqueId&&(delete e.draggables[n.descriptor.id],e.draggables[t.descriptor.id]=t)},unregister:t=>{const o=t.descriptor.id,i=r(o);i&&t.uniqueId===i.uniqueId&&(delete e.draggables[o],e.droppables[t.descriptor.droppableId]&&n({type:"REMOVAL",value:t}))},getById:function(e){const t=r(e);return t||$t(),t},findById:r,exists:e=>Boolean(r(e)),getAllByType:t=>Object.values(e.draggables).filter(e=>e.descriptor.type===t)},droppable:{register:t=>{e.droppables[t.descriptor.id]=t},unregister:t=>{const n=o(t.descriptor.id);n&&t.uniqueId===n.uniqueId&&delete e.droppables[t.descriptor.id]},getById:function(e){const t=o(e);return t||$t(),t},findById:o,exists:e=>Boolean(o(e)),getAllByType:t=>Object.values(e.droppables).filter(e=>e.descriptor.type===t)},subscribe:function(e){return t.push(e),function(){const n=t.indexOf(e);-1!==n&&t.splice(n,1)}},clean:function(){e.draggables={},e.droppables={},t.length=0}}}var Fo=Ot.createContext(null),jo=()=>{const e=document.body;return e||$t(),e};const ko={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"},$o={separator:"::"};function Wo(e,t=$o){const n=Ot.useId();return Qt(()=>`${e}${t.separator}${n}`,[t.separator,e,n])}var Uo=Ot.createContext(null);function Ho(e){const t=Rt(e);return _t(()=>{t.current=e}),t}function qo(e){return"IDLE"!==e.phase&&"DROP_ANIMATING"!==e.phase&&e.isDragging}const Vo=9,zo=13,Yo=33,Zo=34,Jo=35,Xo=36,Ko={[zo]:!0,[Vo]:!0};var Qo=e=>{Ko[e.keyCode]&&e.preventDefault()};const ei=(()=>{const e="visibilitychange";return"undefined"==typeof document?e:[e,`ms${e}`,`webkit${e}`,`moz${e}`,`o${e}`].find(e=>`on${e}`in document)||e})(),ti={type:"IDLE"};function ni(){}const ri={[Zo]:!0,[Yo]:!0,[Xo]:!0,[Jo]:!0};const oi={type:"IDLE"},ii=["input","button","textarea","select","option","optgroup","video","audio"];function ai(e,t){if(null==t)return!1;if(ii.includes(t.tagName.toLowerCase()))return!0;const n=t.getAttribute("contenteditable");return"true"===n||""===n||t!==e&&ai(e,t.parentElement)}function si(e,t){const n=t.target;return!!Lo(n)&&ai(e,n)}var li=e=>ht(e.getBoundingClientRect()).center;const ci=(()=>{const e="matches";return"undefined"==typeof document?e:[e,"msMatchesSelector","webkitMatchesSelector"].find(e=>e in Element.prototype)||e})();function di(e,t){return null==e?null:e[ci](t)?e:di(e.parentElement,t)}function ui(e,t){return e.closest?e.closest(t):di(e,t)}function pi(e){e.preventDefault()}function gi({expected:e,phase:t,isLockActive:n,shouldWarn:r}){return!!n()&&e===t}function fi({lockAPI:e,store:t,registry:n,draggableId:r}){if(e.isClaimed())return!1;const o=n.draggable.findById(r);return!!o&&!!o.options.isEnabled&&!!co(t.getState(),r)}const mi=[function(e){const t=Rt(ti),n=Rt(Ft),r=Qt(()=>({eventName:"mousedown",fn:function(t){if(t.defaultPrevented)return;if(0!==t.button)return;if(t.ctrlKey||t.metaKey||t.shiftKey||t.altKey)return;const r=e.findClosestDraggableId(t);if(!r)return;const o=e.tryGetLock(r,a,{sourceEvent:t});if(!o)return;t.preventDefault();const i={x:t.clientX,y:t.clientY};n.current(),c(o,i)}}),[e]),o=Qt(()=>({eventName:"webkitmouseforcewillbegin",fn:t=>{if(t.defaultPrevented)return;const n=e.findClosestDraggableId(t);if(!n)return;const r=e.findOptionsForDraggable(n);r&&(r.shouldRespectForcePress||e.canGetLock(n)&&t.preventDefault())}}),[e]),i=en(function(){n.current=jt(window,[o,r],{passive:!1,capture:!0})},[o,r]),a=en(()=>{"IDLE"!==t.current.type&&(t.current=ti,n.current(),i())},[i]),s=en(()=>{const e=t.current;a(),"DRAGGING"===e.type&&e.actions.cancel({shouldBlockNextClick:!0}),"PENDING"===e.type&&e.actions.abort()},[a]),l=en(function(){const e=function({cancel:e,completed:t,getPhase:n,setPhase:r}){return[{eventName:"mousemove",fn:e=>{const{button:t,clientX:o,clientY:i}=e;if(0!==t)return;const a={x:o,y:i},s=n();if("DRAGGING"===s.type)return e.preventDefault(),void s.actions.move(a);if("PENDING"!==s.type&&$t(),l=s.point,c=a,!(Math.abs(c.x-l.x)>=5||Math.abs(c.y-l.y)>=5))return;var l,c;e.preventDefault();const d=s.actions.fluidLift(a);r({type:"DRAGGING",actions:d})}},{eventName:"mouseup",fn:r=>{const o=n();"DRAGGING"===o.type?(r.preventDefault(),o.actions.drop({shouldBlockNextClick:!0}),t()):e()}},{eventName:"mousedown",fn:t=>{"DRAGGING"===n().type&&t.preventDefault(),e()}},{eventName:"keydown",fn:t=>{if("PENDING"!==n().type)return 27===t.keyCode?(t.preventDefault(),void e()):void Qo(t);e()}},{eventName:"resize",fn:e},{eventName:"scroll",options:{passive:!0,capture:!1},fn:()=>{"PENDING"===n().type&&e()}},{eventName:"webkitmouseforcedown",fn:t=>{const r=n();"IDLE"===r.type&&$t(),r.actions.shouldRespectForcePress()?e():t.preventDefault()}},{eventName:ei,fn:e}]}({cancel:s,completed:a,getPhase:()=>t.current,setPhase:e=>{t.current=e}});n.current=jt(window,e,{capture:!0,passive:!1})},[s,a]),c=en(function(e,n){"IDLE"!==t.current.type&&$t(),t.current={type:"PENDING",point:n,actions:e},l()},[l]);Ro(function(){return i(),function(){n.current()}},[i])},function(e){const t=Rt(ni),n=Qt(()=>({eventName:"keydown",fn:function(n){if(n.defaultPrevented)return;if(32!==n.keyCode)return;const o=e.findClosestDraggableId(n);if(!o)return;const i=e.tryGetLock(o,l,{sourceEvent:n});if(!i)return;n.preventDefault();let a=!0;const s=i.snapLift();function l(){a||$t(),a=!1,t.current(),r()}t.current(),t.current=jt(window,function(e,t){function n(){t(),e.cancel()}return[{eventName:"keydown",fn:r=>27===r.keyCode?(r.preventDefault(),void n()):32===r.keyCode?(r.preventDefault(),t(),void e.drop()):40===r.keyCode?(r.preventDefault(),void e.moveDown()):38===r.keyCode?(r.preventDefault(),void e.moveUp()):39===r.keyCode?(r.preventDefault(),void e.moveRight()):37===r.keyCode?(r.preventDefault(),void e.moveLeft()):void(ri[r.keyCode]?r.preventDefault():Qo(r))},{eventName:"mousedown",fn:n},{eventName:"mouseup",fn:n},{eventName:"click",fn:n},{eventName:"touchstart",fn:n},{eventName:"resize",fn:n},{eventName:"wheel",fn:n,options:{passive:!0}},{eventName:ei,fn:n}]}(s,l),{capture:!0,passive:!1})}}),[e]),r=en(function(){t.current=jt(window,[n],{passive:!1,capture:!0})},[n]);Ro(function(){return r(),function(){t.current()}},[r])},function(e){const t=Rt(oi),n=Rt(Ft),r=en(function(){return t.current},[]),o=en(function(e){t.current=e},[]),i=Qt(()=>({eventName:"touchstart",fn:function(t){if(t.defaultPrevented)return;const r=e.findClosestDraggableId(t);if(!r)return;const o=e.tryGetLock(r,s,{sourceEvent:t});if(!o)return;const i=t.touches[0],{clientX:a,clientY:l}=i,c={x:a,y:l};n.current(),u(o,c)}}),[e]),a=en(function(){n.current=jt(window,[i],{capture:!0,passive:!1})},[i]),s=en(()=>{const e=t.current;"IDLE"!==e.type&&("PENDING"===e.type&&clearTimeout(e.longPressTimerId),o(oi),n.current(),a())},[a,o]),l=en(()=>{const e=t.current;s(),"DRAGGING"===e.type&&e.actions.cancel({shouldBlockNextClick:!0}),"PENDING"===e.type&&e.actions.abort()},[s]),c=en(function(){const e={capture:!0,passive:!1},t={cancel:l,completed:s,getPhase:r},o=jt(window,function({cancel:e,completed:t,getPhase:n}){return[{eventName:"touchmove",options:{capture:!1},fn:t=>{const r=n();if("DRAGGING"!==r.type)return void e();r.hasMoved=!0;const{clientX:o,clientY:i}=t.touches[0],a={x:o,y:i};t.preventDefault(),r.actions.move(a)}},{eventName:"touchend",fn:r=>{const o=n();"DRAGGING"===o.type?(r.preventDefault(),o.actions.drop({shouldBlockNextClick:!0}),t()):e()}},{eventName:"touchcancel",fn:t=>{"DRAGGING"===n().type?(t.preventDefault(),e()):e()}},{eventName:"touchforcechange",fn:t=>{const r=n();"IDLE"===r.type&&$t();const o=t.touches[0];if(!o)return;if(!(o.force>=.15))return;const i=r.actions.shouldRespectForcePress();if("PENDING"!==r.type)return i?r.hasMoved?void t.preventDefault():void e():void t.preventDefault();i&&e()}},{eventName:ei,fn:e}]}(t),e),i=jt(window,function({cancel:e,getPhase:t}){return[{eventName:"orientationchange",fn:e},{eventName:"resize",fn:e},{eventName:"contextmenu",fn:e=>{e.preventDefault()}},{eventName:"keydown",fn:n=>{"DRAGGING"===t().type?(27===n.keyCode&&n.preventDefault(),e()):e()}},{eventName:ei,fn:e}]}(t),e);n.current=function(){o(),i()}},[l,r,s]),d=en(function(){const e=r();"PENDING"!==e.type&&$t();const t=e.actions.fluidLift(e.point);o({type:"DRAGGING",actions:t,hasMoved:!1})},[r,o]),u=en(function(e,t){"IDLE"!==r().type&&$t();const n=setTimeout(d,120);o({type:"PENDING",point:t,actions:e,longPressTimerId:n}),c()},[c,r,o,d]);Ro(function(){return a(),function(){n.current();const e=r();"PENDING"===e.type&&(clearTimeout(e.longPressTimerId),o(oi))}},[r,a,o]),Ro(function(){return jt(window,[{eventName:"touchmove",fn:()=>{},options:{capture:!1,passive:!1}}])},[])}];function bi({contextId:e,store:t,registry:n,customSensors:r,enableDefaultSensors:o}){const i=[...o?mi:[],...r||[]],a=Nt(()=>function(){let e=null;function t(){e||$t(),e=null}return{isClaimed:function(){return Boolean(e)},isActive:function(t){return t===e},claim:function(t){e&&$t();const n={abandon:t};return e=n,n},release:t,tryAbandon:function(){e&&(e.abandon(),t())}}}())[0],s=en(function(e,t){qo(e)&&!qo(t)&&a.tryAbandon()},[a]);Ro(function(){let e=t.getState();return t.subscribe(()=>{const n=t.getState();s(e,n),e=n})},[a,t,s]),Ro(()=>a.tryAbandon,[a.tryAbandon]);const l=en(e=>fi({lockAPI:a,registry:n,store:t,draggableId:e}),[a,n,t]),c=en((r,o,i)=>function({lockAPI:e,contextId:t,store:n,registry:r,draggableId:o,forceSensorStop:i,sourceEvent:a}){if(!fi({lockAPI:e,store:n,registry:r,draggableId:o}))return null;const s=r.draggable.getById(o),l=function(e,t){const n=`[${Ao.contextId}="${e}"]`,r=To(document,n).find(e=>e.getAttribute(Ao.id)===t);return r&&Lo(r)?r:null}(t,s.descriptor.id);if(!l)return null;if(a&&!s.options.canDragInteractiveElements&&si(l,a))return null;const c=e.claim(i||Ft);let d="PRE_DRAG";function u(){return s.options.shouldRespectForcePress}function p(){return e.isActive(c)}const g=function(e,t){gi({expected:e,phase:d,isLockActive:p,shouldWarn:!0})&&n.dispatch(t())}.bind(null,"DRAGGING");function f(t){function r(){e.release(),d="COMPLETED"}function o(e,o={shouldBlockNextClick:!1}){if(t.cleanup(),o.shouldBlockNextClick){const e=jt(window,[{eventName:"click",fn:pi,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(e)}r(),n.dispatch(Br({reason:e}))}return"PRE_DRAG"!==d&&(r(),$t()),n.dispatch((e=>({type:"LIFT",payload:e}))(t.liftActionArgs)),d="DRAGGING",{isActive:()=>gi({expected:"DRAGGING",phase:d,isLockActive:p,shouldWarn:!1}),shouldRespectForcePress:u,drop:e=>o("DROP",e),cancel:e=>o("CANCEL",e),...t.actions}}return{isActive:()=>gi({expected:"PRE_DRAG",phase:d,isLockActive:p,shouldWarn:!1}),shouldRespectForcePress:u,fluidLift:function(e){const t=At(e=>{g(()=>Ar({client:e}))});return{...f({liftActionArgs:{id:o,clientSelection:e,movementMode:"FLUID"},cleanup:()=>t.cancel(),actions:{move:t}}),move:t}},snapLift:function(){const e={moveUp:()=>g(Pr),moveRight:()=>g(Nr),moveDown:()=>g(Or),moveLeft:()=>g(Rr)};return f({liftActionArgs:{id:o,clientSelection:li(l),movementMode:"SNAP"},cleanup:Ft,actions:e})},abort:function(){gi({expected:"PRE_DRAG",phase:d,isLockActive:p,shouldWarn:!0})&&e.release()}}}({lockAPI:a,registry:n,contextId:e,store:t,draggableId:r,forceSensorStop:o||null,sourceEvent:i&&i.sourceEvent?i.sourceEvent:null}),[e,a,n,t]),d=en(t=>function(e,t){const n=function(e,t){const n=t.target;if(!((r=n)instanceof Mo(r).Element))return null;var r;const o=function(e){return`[${So.contextId}="${e}"]`}(e),i=ui(n,o);return i&&Lo(i)?i:null}(e,t);return n?n.getAttribute(So.draggableId):null}(e,t),[e]),u=en(e=>{const t=n.draggable.findById(e);return t?t.options:null},[n.draggable]),p=en(function(){a.isClaimed()&&(a.tryAbandon(),"IDLE"!==t.getState().phase&&t.dispatch({type:"FLUSH",payload:null}))},[a,t]),g=en(()=>a.isClaimed(),[a]),f=Qt(()=>({canGetLock:l,tryGetLock:c,findClosestDraggableId:d,findOptionsForDraggable:u,tryReleaseLock:p,isLockClaimed:g}),[l,c,d,u,p,g]);for(let e=0;e<i.length;e++)i[e](f)}function hi(e){return e.current||$t(),e.current}function vi(e){const{contextId:t,setCallbacks:n,sensors:r,nonce:o,dragHandleUsageInstructions:i}=e,a=Rt(null),s=Ho(e),l=en(()=>(e=>({onBeforeCapture:t=>{Lt(()=>{e.onBeforeCapture&&e.onBeforeCapture(t)})},onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragEnd:e.onDragEnd,onDragUpdate:e.onDragUpdate}))(s.current),[s]),c=en(()=>(e=>({...go,...e.autoScrollerOptions,durationDampening:{...go.durationDampening,...e.autoScrollerOptions}}))(s.current),[s]),d=function(e){const t=Qt(()=>(e=>`rfd-announcement-${e}`)(e),[e]),n=Rt(null);return _t(function(){const e=document.createElement("div");return n.current=e,e.id=t,e.setAttribute("aria-live","assertive"),e.setAttribute("aria-atomic","true"),Pt(e.style,ko),jo().appendChild(e),function(){setTimeout(function(){const t=jo();t.contains(e)&&t.removeChild(e),e===n.current&&(n.current=null)})}},[t]),en(e=>{const t=n.current;t&&(t.textContent=e)},[])}(t),u=function({contextId:e,text:t}){const n=Wo("hidden-text",{separator:"-"}),r=Qt(()=>function({contextId:e,uniqueId:t}){return`rfd-hidden-text-${e}-${t}`}({contextId:e,uniqueId:n}),[n,e]);return _t(function(){const e=document.createElement("div");return e.id=r,e.textContent=t,e.style.display="none",jo().appendChild(e),function(){const t=jo();t.contains(e)&&t.removeChild(e)}},[r,t]),r}({contextId:t,text:i}),p=function(e,t){const n=Qt(()=>(e=>{const t=(n=e,e=>`[${e}="${n}"]`);var n;const r=(()=>{const e="\n cursor: -webkit-grab;\n cursor: grab;\n ";return{selector:t(So.contextId),styles:{always:"\n -webkit-touch-callout: none;\n -webkit-tap-highlight-color: rgba(0,0,0,0);\n touch-action: manipulation;\n ",resting:e,dragging:"pointer-events: none;",dropAnimating:e}}})(),o=[(()=>{const e=`\n transition: ${kr.outOfTheWay};\n `;return{selector:t(Ao.contextId),styles:{dragging:e,dropAnimating:e,userCancel:e}}})(),r,{selector:t(Po.contextId),styles:{always:"overflow-anchor: none;"}},{selector:"body",styles:{dragging:"\n cursor: grabbing;\n cursor: -webkit-grabbing;\n user-select: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n overflow-anchor: none;\n "}}];return{always:No(o,"always"),resting:No(o,"resting"),dragging:No(o,"dragging"),dropAnimating:No(o,"dropAnimating"),userCancel:No(o,"userCancel")}})(e),[e]),r=Rt(null),o=Rt(null),i=en(bn(e=>{const t=o.current;t||$t(),t.textContent=e}),[]),a=en(e=>{const t=r.current;t||$t(),t.textContent=e},[]);Ro(()=>{(r.current||o.current)&&$t();const s=Bo(t),l=Bo(t);return r.current=s,o.current=l,s.setAttribute(`${Co}-always`,e),l.setAttribute(`${Co}-dynamic`,e),_o().appendChild(s),_o().appendChild(l),a(n.always),i(n.resting),()=>{const e=e=>{const t=e.current;t||$t(),_o().removeChild(t),e.current=null};e(r),e(o)}},[t,a,i,n.always,n.resting,e]);const s=en(()=>i(n.dragging),[i,n.dragging]),l=en(e=>{i("DROP"!==e?n.userCancel:n.dropAnimating)},[i,n.dropAnimating,n.userCancel]),c=en(()=>{o.current&&i(n.resting)},[i,n.resting]);return Qt(()=>({dragging:s,dropping:l,resting:c}),[s,l,c])}(t,o),g=en(e=>{hi(a).dispatch(e)},[]),f=Qt(()=>se({publishWhileDragging:Er,updateDroppableScroll:wr,updateDroppableIsEnabled:Cr,updateDroppableIsCombineEnabled:Sr,collectionStarting:Dr},g),[g]),m=function(){const e=Qt(Go,[]);return _t(()=>function(){e.clean()},[e]),e}(),b=Qt(()=>lo(m,f),[m,f]),h=Qt(()=>(({scrollDroppable:e,scrollWindow:t,move:n,getAutoScrollerOptions:r})=>{const o=(({scrollWindow:e,scrollDroppable:t,getAutoScrollerOptions:n=()=>go})=>{const r=At(e),o=At(t);let i=null;const a=e=>{i||$t();const{shouldUseTimeDampening:t,dragStartTime:a}=i;wo({state:e,scrollWindow:r,scrollDroppable:o,dragStartTime:a,shouldUseTimeDampening:t,getAutoScrollerOptions:n})};return{start:e=>{i&&$t();const t=Date.now();let r=!1;const o=()=>{r=!0};wo({state:e,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:o,scrollDroppable:o,getAutoScrollerOptions:n}),i={dragStartTime:t,shouldUseTimeDampening:r},r&&a(e)},stop:()=>{i&&(r.cancel(),o.cancel(),i=null)},scroll:a}})({scrollWindow:t,scrollDroppable:e,getAutoScrollerOptions:r}),i=(({move:e,scrollDroppable:t,scrollWindow:n})=>{const r=(e,n)=>{if(!Do(e,n))return n;const r=((e,t)=>{const n=e.frame;return n&&Do(e,t)?xo({current:n.scroll.current,max:n.scroll.max,change:t}):null})(e,n);if(!r)return t(e.descriptor.id,n),null;const o=rn(n,r);return t(e.descriptor.id,o),rn(n,o)},o=(e,t,r)=>{if(!e)return r;if(!Eo(t,r))return r;const o=((e,t)=>{if(!Eo(e,t))return null;const n=e.scroll.max,r=e.scroll.current;return xo({current:r,max:n,change:t})})(t,r);if(!o)return n(r),null;const i=rn(r,o);return n(i),rn(r,i)};return t=>{const n=t.scrollJumpRequest;if(!n)return;const i=rr(t.impact);i||$t();const a=r(t.dimensions.droppables[i],n);if(!a)return;const s=t.viewport,l=o(t.isWindowScrollAllowed,s,a);l&&((t,n)=>{const r=nn(t.current.client.selection,n);e({client:r})})(t,l)}})({move:n,scrollWindow:t,scrollDroppable:e});return{scroll:e=>{r().disabled||"DRAGGING"!==e.phase||("FLUID"!==e.movementMode?e.scrollJumpRequest&&i(e):o.scroll(e))},start:o.start,stop:o.stop}})({scrollWindow:uo,scrollDroppable:b.scrollDroppable,getAutoScrollerOptions:c,...se({move:Ar},g)}),[b.scrollDroppable,g,c]),v=function(e){const t=Rt({}),n=Rt(null),r=Rt(null),o=Rt(!1),i=en(function(e,n){const r={id:e,focus:n};return t.current[e]=r,function(){const n=t.current;n[e]!==r&&delete n[e]}},[]),a=en(function(t){const n=function(e,t){const n=`[${So.contextId}="${e}"]`,r=To(document,n);if(!r.length)return null;const o=r.find(e=>e.getAttribute(So.draggableId)===t);return o&&Lo(o)?o:null}(e,t);n&&n!==document.activeElement&&n.focus()},[e]),s=en(function(e,t){n.current===e&&(n.current=t)},[]),l=en(function(){r.current||o.current&&(r.current=requestAnimationFrame(()=>{r.current=null;const e=n.current;e&&a(e)}))},[a]),c=en(function(e){n.current=null;const t=document.activeElement;t&&t.getAttribute(So.draggableId)===e&&(n.current=e)},[]);return Ro(()=>(o.current=!0,function(){o.current=!1;const e=r.current;e&&cancelAnimationFrame(e)}),[]),Qt(()=>({register:i,tryRecordFocus:c,tryRestoreFocusRecorded:l,tryShiftRecord:s}),[i,c,l,s])}(t),y=Qt(()=>ro({announce:d,autoScroller:h,dimensionMarshal:b,focusMarshal:v,getResponders:l,styleMarshal:p}),[d,h,b,v,l,p]);a.current=y;const x=en(()=>{const e=hi(a);"IDLE"!==e.getState().phase&&e.dispatch({type:"FLUSH",payload:null})},[]),I=en(()=>{const e=hi(a).getState();return"DROP_ANIMATING"===e.phase||"IDLE"!==e.phase&&e.isDragging},[]);n(Qt(()=>({isDragging:I,tryAbort:x}),[I,x]));const E=en(e=>co(hi(a).getState(),e),[]),D=en(()=>ir(hi(a).getState()),[]),w=Qt(()=>({marshal:b,focus:v,contextId:t,canLift:E,isMovementAllowed:D,dragHandleUsageInstructionsId:u,registry:m}),[t,b,u,v,E,D,m]);return bi({contextId:t,store:y,registry:m,customSensors:r||null,enableDefaultSensors:!1!==e.enableDefaultSensors}),_t(()=>x,[x]),Ot.createElement(Uo.Provider,{value:w},Ot.createElement(ut,{context:Fo,store:y},e.children))}function yi(e){const t=Ot.useId(),n=e.dragHandleUsageInstructions||zt;return Ot.createElement(Wt,null,r=>Ot.createElement(vi,{nonce:e.nonce,contextId:t,setCallbacks:r,dragHandleUsageInstructions:n,enableDefaultSensors:e.enableDefaultSensors,sensors:e.sensors,onBeforeCapture:e.onBeforeCapture,onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragUpdate:e.onDragUpdate,onDragEnd:e.onDragEnd,autoScrollerOptions:e.autoScrollerOptions},e.children))}const xi=(e,t)=>t?kr.drop(t.duration):e?kr.snap:kr.fluid,Ii=(e,t)=>{if(e)return t?Mr:Lr};function Ei(e){return"DRAGGING"===e.type?function(e){const t=e.dimension.client,{offset:n,combineWith:r,dropping:o}=e,i=Boolean(r),a=(e=>null!=e.forceShouldAnimate?e.forceShouldAnimate:"SNAP"===e.mode)(e),s=Boolean(o),l=s?((e,t)=>{const n=$r(e);if(n)return t?`${n} scale(${Gr})`:n})(n,i):Wr(n);return{position:"fixed",top:t.marginBox.top,left:t.marginBox.left,boxSizing:"border-box",width:t.borderBox.width,height:t.borderBox.height,transition:xi(a,o),transform:l,opacity:Ii(i,s),zIndex:s?4500:5e3,pointerEvents:"none"}}(e):{transform:Wr((t=e).offset),transition:t.shouldAnimateDisplacement?void 0:"none"};var t}var Di=Ot.createContext(null);function wi(e){const t=Tt(e);return t||$t(),t}function Ci(e){e.preventDefault()}var Si=(e,t)=>e===t,Ai=e=>{const{combine:t,destination:n}=e;return n?n.droppableId:t?t.droppableId:null};function Pi(e=null){return{isDragging:!1,isDropAnimating:!1,isClone:!1,dropAnimation:null,mode:null,draggingOver:null,combineTargetFor:e,combineWith:null}}const Oi={mapped:{type:"SECONDARY",offset:tn,combineTargetFor:null,shouldAnimateDisplacement:!0,snapshot:Pi(null)}},Ni=dt(()=>{const e=function(){const e=bn((e,t)=>({x:e,y:t})),t=bn((e,t,n=null,r=null,o=null)=>({isDragging:!0,isClone:t,isDropAnimating:Boolean(o),dropAnimation:o,mode:e,draggingOver:n,combineWith:r,combineTargetFor:null})),n=bn((e,n,r,o,i=null,a=null,s=null)=>({mapped:{type:"DRAGGING",dropping:null,draggingOver:i,combineWith:a,mode:n,offset:e,dimension:r,forceShouldAnimate:s,snapshot:t(n,o,i,a,null)}}));return(r,o)=>{if(qo(r)){if(r.critical.draggable.id!==o.draggableId)return null;const t=r.current.client.offset,a=r.dimensions.draggables[o.draggableId],s=rr(r.impact),l=(i=r.impact).at&&"COMBINE"===i.at.type?i.at.combine.draggableId:null,c=r.forceShouldAnimate;return n(e(t.x,t.y),r.movementMode,a,o.isClone,s,l,c)}var i;if("DROP_ANIMATING"===r.phase){const e=r.completed;if(e.result.draggableId!==o.draggableId)return null;const n=o.isClone,i=r.dimensions.draggables[o.draggableId],a=e.result,s=a.mode,l=Ai(a),c=(e=>e.combine?e.combine.draggableId:null)(a),d={duration:r.dropDuration,curve:Tr,moveTo:r.newHomeClientOffset,opacity:c?Mr:null,scale:c?Gr:null};return{mapped:{type:"DRAGGING",offset:r.newHomeClientOffset,dimension:i,dropping:d,draggingOver:l,combineWith:c,mode:s,forceShouldAnimate:null,snapshot:t(s,n,l,c,d)}}}return null}}(),t=function(){const e=bn((e,t)=>({x:e,y:t})),t=bn(Pi),n=bn((e,n=null,r)=>({mapped:{type:"SECONDARY",offset:e,combineTargetFor:n,shouldAnimateDisplacement:r,snapshot:t(n)}})),r=e=>e?n(tn,e,!0):null,o=(t,o,i,a)=>{const s=i.displaced.visible[t],l=Boolean(a.inVirtualList&&a.effected[t]),c=Dn(i),d=c&&c.draggableId===t?o:null;if(!s){if(!l)return r(d);if(i.displaced.invisible[t])return null;const o=an(a.displacedBy.point),s=e(o.x,o.y);return n(s,d,!0)}if(l)return r(d);const u=i.displacedBy.point,p=e(u.x,u.y);return n(p,d,s.shouldAnimate)};return(e,t)=>{if(qo(e))return e.critical.draggable.id===t.draggableId?null:o(t.draggableId,e.critical.draggable.id,e.impact,e.afterCritical);if("DROP_ANIMATING"===e.phase){const n=e.completed;return n.result.draggableId===t.draggableId?null:o(t.draggableId,n.result.draggableId,n.impact,n.afterCritical)}return null}}();return(n,r)=>e(n,r)||t(n,r)||Oi},{dropAnimationFinished:()=>({type:"DROP_ANIMATION_FINISHED",payload:null})},null,{context:Fo,areStatePropsEqual:Si})(e=>{const t=Rt(null),n=en((e=null)=>{t.current=e},[]),r=en(()=>t.current,[]),{contextId:o,dragHandleUsageInstructionsId:i,registry:a}=wi(Uo),{type:s,droppableId:l}=wi(Di),c=Qt(()=>({id:e.draggableId,index:e.index,type:s,droppableId:l}),[e.draggableId,e.index,s,l]),{children:d,draggableId:u,isEnabled:p,shouldRespectForcePress:g,canDragInteractiveElements:f,isClone:m,mapped:b,dropAnimationFinished:h}=e;m||function(e){const t=Wo("draggable"),{descriptor:n,registry:r,getDraggableRef:o,canDragInteractiveElements:i,shouldRespectForcePress:a,isEnabled:s}=e,l=Qt(()=>({canDragInteractiveElements:i,shouldRespectForcePress:a,isEnabled:s}),[i,s,a]),c=en(e=>{const t=o();return t||$t(),function(e,t,n=tn){const r=window.getComputedStyle(t),o=t.getBoundingClientRect(),i=Ct(o,r),a=wt(i,n);return{descriptor:e,placeholder:{client:i,tagName:t.tagName.toLowerCase(),display:r.display},displaceBy:{x:i.marginBox.width,y:i.marginBox.height},client:i,page:a}}(n,t,e)},[n,o]),d=Qt(()=>({uniqueId:t,descriptor:n,options:l,getDimension:c}),[n,c,l,t]),u=Rt(d),p=Rt(!0);Ro(()=>(r.draggable.register(u.current),()=>r.draggable.unregister(u.current)),[r.draggable]),Ro(()=>{if(p.current)return void(p.current=!1);const e=u.current;u.current=d,r.draggable.update(d,e)},[d,r.draggable])}(Qt(()=>({descriptor:c,registry:a,getDraggableRef:r,canDragInteractiveElements:f,shouldRespectForcePress:g,isEnabled:p}),[c,a,r,f,g,p]));const v=Qt(()=>p?{tabIndex:0,role:"button","aria-describedby":i,"data-rfd-drag-handle-draggable-id":u,"data-rfd-drag-handle-context-id":o,draggable:!1,onDragStart:Ci}:null,[o,i,u,p]),y=en(e=>{"DRAGGING"===b.type&&b.dropping&&"transform"===e.propertyName&&Lt(h)},[h,b]),x=Qt(()=>{const e=Ei(b),t="DRAGGING"===b.type&&b.dropping?y:void 0;return{innerRef:n,draggableProps:{"data-rfd-draggable-context-id":o,"data-rfd-draggable-id":u,style:e,onTransitionEnd:t},dragHandleProps:v}},[o,v,u,b,y,n]),I=Qt(()=>({draggableId:c.id,type:c.type,source:{index:c.index,droppableId:c.droppableId}}),[c.droppableId,c.id,c.index,c.type]);return Ot.createElement(Ot.Fragment,null,d(x,b.snapshot,I))});function Ri(e){return wi(Di).isUsingCloneFor!==e.draggableId||e.isClone?Ot.createElement(Ni,e):null}function _i(e){const t="boolean"!=typeof e.isDragDisabled||!e.isDragDisabled,n=Boolean(e.disableInteractiveElementBlocking),r=Boolean(e.shouldRespectForcePress);return Ot.createElement(Ri,Pt({},e,{isClone:!1,isEnabled:t,canDragInteractiveElements:n,shouldRespectForcePress:r}))}const Bi=e=>t=>e===t,Ti=Bi("scroll"),Mi=Bi("auto"),Li=(e,t)=>t(e.overflowX)||t(e.overflowY),Gi=e=>null==e||e===document.body||e===document.documentElement?null:(e=>{const t=window.getComputedStyle(e),n={overflowX:t.overflowX,overflowY:t.overflowY};return Li(n,Ti)||Li(n,Mi)})(e)?e:Gi(e.parentElement);var Fi=e=>({x:e.scrollLeft,y:e.scrollTop});const ji=e=>!!e&&("fixed"===window.getComputedStyle(e).position||ji(e.parentElement));const ki={passive:!1},$i={passive:!0};var Wi=e=>e.shouldPublishImmediately?ki:$i;const Ui=e=>e&&e.env.closestScrollable||null;function Hi(e){const t=Rt(null),n=wi(Uo),r=Wo("droppable"),{registry:o,marshal:i}=n,a=Ho(e),s=Qt(()=>({id:e.droppableId,type:e.type,mode:e.mode}),[e.droppableId,e.mode,e.type]),l=Rt(s),c=Qt(()=>bn((e,n)=>{t.current||$t();const r={x:e,y:n};i.updateDroppableScroll(s.id,r)}),[s.id,i]),d=en(()=>{const e=t.current;return e&&e.env.closestScrollable?Fi(e.env.closestScrollable):tn},[]),u=en(()=>{const e=d();c(e.x,e.y)},[d,c]),p=Qt(()=>At(u),[u]),g=en(()=>{const e=t.current,n=Ui(e);e&&n||$t(),e.scrollOptions.shouldPublishImmediately?u():p()},[p,u]),f=en((e,r)=>{t.current&&$t();const o=a.current,i=o.getDroppableRef();i||$t();const l={closestScrollable:Gi(c=i),isFixedOnPage:ji(c)};var c;const d={ref:i,descriptor:s,env:l,scrollOptions:r};t.current=d;const u=(({ref:e,descriptor:t,env:n,windowScroll:r,direction:o,isDropDisabled:i,isCombineEnabled:a,shouldClipSubject:s})=>{const l=n.closestScrollable,c=((e,t)=>{const n=St(e);if(!t)return n;if(e!==t)return n;const r=n.paddingBox.top-t.scrollTop,o=n.paddingBox.left-t.scrollLeft,i=r+t.scrollHeight,a=o+t.scrollWidth,s=vt({top:r,right:a,bottom:i,left:o},n.border);return It({borderBox:s,margin:n.margin,border:n.border,padding:n.padding})})(e,l),d=wt(c,r),u=(()=>{if(!l)return null;const e=St(l),t={scrollHeight:l.scrollHeight,scrollWidth:l.scrollWidth};return{client:e,page:wt(e,r),scroll:Fi(l),scrollSize:t,shouldClipSubject:s}})(),p=(({descriptor:e,isEnabled:t,isCombineEnabled:n,isFixedOnPage:r,direction:o,client:i,page:a,closest:s})=>{const l=(()=>{if(!s)return null;const{scrollSize:e,client:t}=s,n=oo({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,height:t.paddingBox.height,width:t.paddingBox.width});return{pageMarginBox:s.page.marginBox,frameClient:t,scrollSize:e,shouldClipSubject:s.shouldClipSubject,scroll:{initial:s.scroll,current:s.scroll,max:n,diff:{value:tn,displacement:tn}}}})(),c="vertical"===o?_n:Bn;return{descriptor:e,isCombineEnabled:n,isFixedOnPage:r,axis:c,isEnabled:t,client:i,page:a,frame:l,subject:fn({page:a,withPlaceholder:null,axis:c,frame:l})}})({descriptor:t,isEnabled:!i,isCombineEnabled:a,isFixedOnPage:n.isFixedOnPage,direction:o,client:c,page:d,closest:u});return p})({ref:i,descriptor:s,env:l,windowScroll:e,direction:o.direction,isDropDisabled:o.isDropDisabled,isCombineEnabled:o.isCombineEnabled,shouldClipSubject:!o.ignoreContainerClipping}),p=l.closestScrollable;return p&&(p.setAttribute(Oo.contextId,n.contextId),p.addEventListener("scroll",g,Wi(d.scrollOptions))),u},[n.contextId,s,g,a]),m=en(()=>{const e=t.current,n=Ui(e);return e&&n||$t(),Fi(n)},[]),b=en(()=>{const e=t.current;e||$t();const n=Ui(e);t.current=null,n&&(p.cancel(),n.removeAttribute(Oo.contextId),n.removeEventListener("scroll",g,Wi(e.scrollOptions)))},[g,p]),h=en(e=>{const n=t.current;n||$t();const r=Ui(n);r||$t(),r.scrollTop+=e.y,r.scrollLeft+=e.x},[]),v=Qt(()=>({getDimensionAndWatchScroll:f,getScrollWhileDragging:m,dragStopped:b,scroll:h}),[b,f,m,h]),y=Qt(()=>({uniqueId:r,descriptor:s,callbacks:v}),[v,s,r]);Ro(()=>(l.current=y.descriptor,o.droppable.register(y),()=>{t.current&&b(),o.droppable.unregister(y)}),[v,s,b,y,i,o.droppable]),Ro(()=>{t.current&&i.updateDroppableIsEnabled(l.current.id,!e.isDropDisabled)},[e.isDropDisabled,i]),Ro(()=>{t.current&&i.updateDroppableIsCombineEnabled(l.current.id,e.isCombineEnabled)},[e.isCombineEnabled,i])}function qi(){}const Vi={width:0,height:0,margin:{top:0,right:0,bottom:0,left:0}};var zi=Ot.memo(e=>{const t=Rt(null),n=en(()=>{t.current&&(clearTimeout(t.current),t.current=null)},[]),{animate:r,onTransitionEnd:o,onClose:i,contextId:a}=e,[s,l]=Nt("open"===e.animate);_t(()=>s?"open"!==r?(n(),l(!1),qi):t.current?qi:(t.current=setTimeout(()=>{t.current=null,l(!1)}),n):qi,[r,s,n]);const c=en(e=>{"height"===e.propertyName&&(o(),"close"===r&&i())},[r,i,o]),d=(({isAnimatingOpenOnMount:e,placeholder:t,animate:n})=>{const r=(({isAnimatingOpenOnMount:e,placeholder:t,animate:n})=>e||"close"===n?Vi:{height:t.client.borderBox.height,width:t.client.borderBox.width,margin:t.client.margin})({isAnimatingOpenOnMount:e,placeholder:t,animate:n});return{display:t.display,boxSizing:"border-box",width:r.width,height:r.height,marginTop:r.margin.top,marginRight:r.margin.right,marginBottom:r.margin.bottom,marginLeft:r.margin.left,flexShrink:"0",flexGrow:"0",pointerEvents:"none",transition:"none"!==n?kr.placeholder:null}})({isAnimatingOpenOnMount:s,animate:e.animate,placeholder:e.placeholder});return Ot.createElement(e.placeholder.tagName,{style:d,"data-rfd-placeholder-context-id":a,onTransitionEnd:c,ref:e.innerRef})});class Yi extends Ot.PureComponent{constructor(...e){super(...e),this.state={isVisible:Boolean(this.props.on),data:this.props.on,animate:this.props.shouldAnimate&&this.props.on?"open":"none"},this.onClose=()=>{"close"===this.state.animate&&this.setState({isVisible:!1})}}static getDerivedStateFromProps(e,t){return e.shouldAnimate?e.on?{isVisible:!0,data:e.on,animate:"open"}:t.isVisible?{isVisible:!0,data:t.data,animate:"close"}:{isVisible:!1,animate:"close",data:null}:{isVisible:Boolean(e.on),data:e.on,animate:"none"}}render(){if(!this.state.isVisible)return null;const e={onClose:this.onClose,data:this.state.data,animate:this.state.animate};return this.props.children(e)}}const Zi={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:function(){return document.body||$t(),document.body}},Ji=e=>{let t,n={...e};for(t in Zi)void 0===e[t]&&(n={...n,[t]:Zi[t]});return n},Xi=(e,t)=>e===t.droppable.type,Ki=(e,t)=>t.draggables[e.draggable.id],Qi=dt(()=>{const e={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},t={...e,shouldAnimatePlaceholder:!1},n=bn(e=>({draggableId:e.id,type:e.type,source:{index:e.index,droppableId:e.droppableId}})),r=bn((r,o,i,a,s,l)=>{const c=s.descriptor.id;if(s.descriptor.droppableId===r){const e=l?{render:l,dragging:n(s.descriptor)}:null,t={isDraggingOver:i,draggingOverWith:i?c:null,draggingFromThisWith:c,isUsingPlaceholder:!0};return{placeholder:s.placeholder,shouldAnimatePlaceholder:!1,snapshot:t,useClone:e}}if(!o)return t;if(!a)return e;const d={isDraggingOver:i,draggingOverWith:c,draggingFromThisWith:null,isUsingPlaceholder:!0};return{placeholder:s.placeholder,shouldAnimatePlaceholder:!0,snapshot:d,useClone:null}});return(n,o)=>{const i=Ji(o),a=i.droppableId,s=i.type,l=!i.isDropDisabled,c=i.renderClone;if(qo(n)){const e=n.critical;if(!Xi(s,e))return t;const o=Ki(e,n.dimensions),i=rr(n.impact)===a;return r(a,l,i,i,o,c)}if("DROP_ANIMATING"===n.phase){const e=n.completed;if(!Xi(s,e.critical))return t;const o=Ki(e.critical,n.dimensions);return r(a,l,Ai(e.result)===a,rr(e.impact)===a,o,c)}if("IDLE"===n.phase&&n.completed&&!n.shouldFlush){const r=n.completed;if(!Xi(s,r.critical))return t;const o=rr(r.impact)===a,i=Boolean(r.impact.at&&"COMBINE"===r.impact.at.type),l=r.critical.droppable.id===a;return o?i?e:t:l?e:t}return t}},{updateViewportMaxScroll:e=>({type:"UPDATE_VIEWPORT_MAX_SCROLL",payload:e})},(e,t,n)=>({...Ji(n),...e,...t}),{context:Fo,areStatePropsEqual:Si})(e=>{const t=Tt(Uo);t||$t();const{contextId:n,isMovementAllowed:r}=t,o=Rt(null),i=Rt(null),{children:a,droppableId:s,type:l,mode:c,direction:d,ignoreContainerClipping:u,isDropDisabled:p,isCombineEnabled:g,snapshot:f,useClone:m,updateViewportMaxScroll:b,getContainerForClone:h}=e,v=en(()=>o.current,[]),y=en((e=null)=>{o.current=e},[]);en(()=>i.current,[]);const x=en((e=null)=>{i.current=e},[]),I=en(()=>{r()&&b({maxScroll:ao()})},[r,b]);Hi({droppableId:s,type:l,mode:c,direction:d,isDropDisabled:p,isCombineEnabled:g,ignoreContainerClipping:u,getDroppableRef:v});const E=Qt(()=>Ot.createElement(Yi,{on:e.placeholder,shouldAnimate:e.shouldAnimatePlaceholder},({onClose:e,data:t,animate:r})=>Ot.createElement(zi,{placeholder:t,onClose:e,innerRef:x,animate:r,contextId:n,onTransitionEnd:I})),[n,I,e.placeholder,e.shouldAnimatePlaceholder,x]),D=Qt(()=>({innerRef:y,placeholder:E,droppableProps:{"data-rfd-droppable-id":s,"data-rfd-droppable-context-id":n}}),[n,s,E,y]),w=m?m.dragging.draggableId:null,C=Qt(()=>({droppableId:s,type:l,isUsingCloneFor:w}),[s,w,l]);return Ot.createElement(Di.Provider,{value:C},a(D,f),function(){if(!m)return null;const{dragging:e,render:t}=m,n=Ot.createElement(Ri,{draggableId:e.draggableId,index:e.source.index,isClone:!0,isEnabled:!0,shouldRespectForcePress:!1,canDragInteractiveElements:!0},(n,r)=>t(n,r,e));return Mt.createPortal(n,h())}())}),{Menu:ea}=n,{MenuItem:ta}=n,{IconButton:na}=n,{MoreVert:ra}=r,{MoreHoriz:oa}=r,ia=o,aa=e;class sa extends aa.Component{static __initStatic(){this.propTypes={opts:ia.object,onClick:ia.func.isRequired}}constructor(e){super(e),sa.prototype.__init.call(this),sa.prototype.__init2.call(this),this.state={anchorEl:void 0,open:!1}}__init(){this.handleClick=e=>this.setState({open:!0,anchorEl:e.currentTarget})}__init2(){this.handleRequestClose=()=>this.setState({open:!1})}render(){const{opts:e,onClick:t}=this.props,{open:n,anchorEl:r}=this.state,o=Object.keys(e)||[],i=e=>()=>{t(e),this.handleRequestClose()},a=n?"inherit":"disabled";return aa.createElement("div",null,aa.createElement("div",{onClick:this.handleClick},aa.createElement(na,{size:"large"},n?aa.createElement(ra,{color:a}):aa.createElement(oa,{color:a}))),aa.createElement(ea,{id:"point-menu",anchorEl:r,open:n,onClose:this.handleRequestClose,style:{transform:"translate(-15px, -15px)"},transformOrigin:{vertical:"center",horizontal:"right"}},o.map((t,n)=>aa.createElement(ta,{key:n,onClick:i(t)},e[t]))))}}sa.__initStatic();class la extends aa.Component{static __initStatic2(){this.propTypes={onChange:ia.func.isRequired,showSampleAnswer:ia.bool.isRequired}}render(){const{onChange:e,showSampleAnswer:t}=this.props,n=t?"Provide Sample Response":"Remove Sample Response";return aa.createElement(sa,{onClick:t=>e(t),opts:{sample:n}})}}la.__initStatic2();var ca="#eeeeee",da="#e0e0e0",ua="#9e9e9e";const pa=e,ga=o,{styled:fa}=i,{InputLabel:ma}=n,{OutlinedInput:ba}=n,{Select:ha}=n,{FormControl:va}=n,{MenuItem:ya}=n,{Checkbox:xa}=n,{FormGroup:Ia}=n,{FormControlLabel:Ea}=n,{Typography:Da}=n,{DragIndicator:wa}=r,Ca=a,Sa=l,{InputContainer:Aa}=s,Pa=Ca("pie-lib:rubric:authoring"),Oa=(e,t,n)=>{const r=Array.from(e),[o]=r.splice(t,1);return r.splice(n,0,o),r},Na=ga.shape({excludeZero:ga.bool,points:ga.arrayOf(ga.string),sampleAnswers:ga.arrayOf(ga.string),maxPoints:ga.number,rubriclessInstruction:ga.string}),Ra=e=>{const{value:t,onChange:n,max:r}=e,o="max-points-label";return pa.createElement(va,{sx:{minWidth:120,m:1},variant:"outlined"},pa.createElement(ma,{id:o},"Max Points"),pa.createElement(ha,{labelId:o,label:"Max Points",value:t,onChange:e=>n(e.target.value),input:pa.createElement(ba,{label:"Max Points"}),MenuProps:{transitionDuration:{enter:225,exit:195}}},J(1,r+1).map(e=>pa.createElement(ya,{key:`${e}`,value:e},e))))},_a=e=>null===e||"null"===e,Ba=fa("div")(()=>({display:"flex",width:"100%",position:"relative"})),Ta=fa("div")(({theme:e})=>({width:"100%",backgroundColor:`${e.palette.common.white}`})),Ma=fa(wa)(({theme:e})=>({paddingTop:e.spacing(1),color:ua})),La=fa(Da)(({theme:e})=>({color:ua,paddingBottom:e.spacing(1),textTransform:"uppercase"})),Ga=fa("div")(({theme:e})=>({paddingLeft:e.spacing(3)})),Fa=fa("div")(({theme:e})=>({fontSize:e.typography.fontSize-2,color:e.palette.error.main,paddingLeft:e.spacing(3),paddingTop:e.spacing(1)})),ja=fa("div")(()=>({position:"absolute",right:0})),ka=e=>{const{points:t,content:n,sampleAnswer:r,mathMlOptions:o={},error:i,pluginOpts:a={}}=e,s=`${t} ${t<=1?"pt":"pts"}`,l=_a(r);return pa.createElement("div",null,pa.createElement(La,{variant:"overline"},s),pa.createElement(Ba,null,pa.createElement(Ma,null),pa.createElement(Ta,null,pa.createElement(Sa,{error:i,pluginProps:a,markup:n,onChange:e.onChange,mathMlOptions:o})),pa.createElement(ja,null,pa.createElement(la,{showSampleAnswer:l,onChange:e.onMenuChange}))),i&&pa.createElement(Fa,null,i),!l&&pa.createElement(Ga,null,pa.createElement(Ma,{as:Da,variant:"overline"},"Sample Response"),pa.createElement(Ta,null,pa.createElement(Sa,{markup:r,pluginProps:a,onChange:e.onSampleChange,mathMlOptions:o}))))},$a=fa("div")(({theme:e})=>({backgroundColor:ca,borderWidth:1,borderStyle:"solid",borderColor:da,padding:e.spacing(2),margin:e.spacing(1)})),Wa=fa("div")(({theme:e})=>({width:"100%",paddingTop:e.spacing(2),marginBottom:e.spacing(2),"& MuiFormControl-root":{width:"100%"}})),Ua=fa("div")(()=>({display:"none"})),Ha=fa("div")(({theme:e})=>({paddingTop:e.spacing(1),paddingBottom:e.spacing(1)})),qa=fa(Da)(({theme:e})=>({paddingLeft:e.spacing(1),margin:e.spacing(1)}));class Va extends pa.Component{constructor(...e){super(...e),Va.prototype.__init.call(this),Va.prototype.__init2.call(this),Va.prototype.__init3.call(this),Va.prototype.__init4.call(this),Va.prototype.__init5.call(this),Va.prototype.__init6.call(this),Va.prototype.__init7.call(this)}static __initStatic(){this.propTypes={value:Na,config:ga.object,pluginOpts:ga.object,rubricless:ga.bool,onChange:ga.func}}static __initStatic2(){this.defaultProps={}}__init(){this.dragEnd=e=>{if(!e.destination)return;const{value:t,onChange:n}=this.props,r=Oa(t.points,e.source.index,e.destination.index),o=Oa(t.sampleAnswers,e.source.index,e.destination.index);n({...t,points:r,sampleAnswers:o})}}__init2(){this.changeRubriclessInstruction=e=>{const{value:t,onChange:n}=this.props;n({...t,rubriclessInstruction:e})}}__init3(){this.changeMaxPoints=e=>{const{value:t,onChange:n,rubricless:r}=this.props,o=t.points.length-1;let i,a;Pa("current",o,"new: ",e),e>o&&(i=ee(e-o).map(()=>"").concat(t.points),a=ee(e-o).map(()=>null).concat(t.sampleAnswers)),e<o&&(Pa("less than"),i=X(t.points,e+1),a=X(t.sampleAnswers,e+1)),n(i&&!r?{...t,points:i,sampleAnswers:a,maxPoints:e}:{...t,maxPoints:e})}}__init4(){this.changeContent=(e,t,n)=>{if(Pa(`changeModel[${n}]:`,e,t),"points"!==n&&"sampleAnswers"!==n)return;const{value:r,onChange:o}=this.props,i=r[n]&&Array.from(r[n]);i.splice(e,1,t),Pa(`changeModel[${n}]:`,i),o({...r,[n]:i})}}__init5(){this.excludeZeros=()=>{const{value:e,onChange:t}=this.props;t({...e,excludeZero:!e.excludeZero})}}__init6(){this.shouldRenderPoint=(e,t)=>!t.excludeZero||e<t.points.length-1||e!==t.points.length-1}__init7(){this.onPointMenuChange=(e,t)=>{if("sample"===t){const{value:t}=this.props,n=Array.from(t.sampleAnswers||[]);_a(n[e])?this.changeContent(e,"","sampleAnswers"):this.changeContent(e,null,"sampleAnswers")}}}render(){const{value:e,mathMlOptions:t={},config:n={},rubricless:r=!1,pluginOpts:o={}}=this.props;let{excludeZeroEnabled:i=!0,maxPointsEnabled:a=!0,errors:s={},rubriclessInstructionEnabled:l=!1,maxPoints:c=10}=e||{};const{rubriclessInstruction:d={},maxMaxPoints:u=10}=n||{},{pointsDescriptorsErrors:p}=s||{};e&&Number.isFinite(e.maxPoints)&&console.warn("maxPoints is deprecated - remove from model");const g=r?c:e.points.length-1;return pa.createElement("div",null,pa.createElement(qa,{variant:"h5"},"Rubric"),pa.createElement(Ia,{row:!0},a&&pa.createElement(Ra,{max:u<100?u:100,value:g,onChange:this.changeMaxPoints,pluginOpts:o}),i&&pa.createElement(Ea,{label:"Exclude zeros",control:pa.createElement(xa,{checked:e.excludeZero,onChange:this.excludeZeros})})),l&&r&&pa.createElement(Wa,null,pa.createElement(Aa,{label:d.label},pa.createElement(Sa,{markup:e.rubriclessInstruction||"",onChange:this.changeRubriclessInstruction,pluginProps:o,nonEmpty:!1,disableUnderline:!0,languageCharactersProps:[{language:"spanish"},{language:"special"}],mathMlOptions:t}))),pa.createElement("div",null,r?pa.createElement(Ua,null):pa.createElement($a,null,pa.createElement(yi,{onDragEnd:this.dragEnd},pa.createElement(Qi,{droppableId:"droppable"},n=>pa.createElement("div",{...n.droppableProps,ref:n.innerRef},e.points.map((n,r)=>this.shouldRenderPoint(r,e)&&pa.createElement(_i,{key:`${n.points}-${r}`,index:r,draggableId:r.toString()},i=>pa.createElement(Ha,{ref:i.innerRef,...i.draggableProps,...i.dragHandleProps},pa.createElement(ka,{points:e.points.length-1-r,content:n,error:p&&p[e.points.length-1-r],sampleAnswer:e.sampleAnswers&&e.sampleAnswers[r],onChange:e=>this.changeContent(r,e,"points"),onSampleChange:e=>this.changeContent(r,e,"sampleAnswers"),onMenuChange:e=>this.onPointMenuChange(r,e),mathMlOptions:t,pluginOpts:o})))),n.placeholder))))))}}Va.__initStatic(),Va.__initStatic2();const za=e=>{const{rubricless:t=!1,config:n={},pluginOpts:r={}}=e||{},o=Array.from(e.value.points||[]).reverse();let i=Array.from(e.value.sampleAnswers||[]).reverse();o.length>i.length&&(i=ee(o.length-i.length).map(()=>null).concat(i));const a={...e.value,points:o,sampleAnswers:i};return pa.createElement(Va,{value:a,config:n,onChange:t=>{e.onChange({...t,points:Array.from(t.points||[]).reverse(),sampleAnswers:Array.from(t.sampleAnswers||[]).reverse()})},rubricless:t,pluginOpts:r})};za.propTypes={value:Na,config:ga.object,pluginOpts:ga.object,rubricless:ga.bool,getIndex:ga.func,onChange:ga.func};var Ya=function(e){if(e.__esModule)return e;var t=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(e).forEach(function(n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}),t}(Object.freeze({__proto__:null,Authoring:za,RUBRIC_TYPES:{SIMPLE_RUBRIC:"simpleRubric",MULTI_TRAIT_RUBRIC:"multiTraitRubric",RUBRICLESS:"rubricless"}}));const Za=e,Ja=i,Xa=s;function Ka(e){let t,n=e[0],r=1;for(;r<e.length;){const o=e[r],i=e[r+1];if(r+=2,("optionalAccess"===o||"optionalCall"===o)&&null==n)return;"access"===o||"optionalAccess"===o?(t=n,n=i(n)):"call"!==o&&"optionalCall"!==o||(n=i((...e)=>n.call(t,...e)),t=void 0)}return n}var Qa=p.exports;Object.defineProperty(D,"__esModule",{value:!0}),D.default=void 0;var es=Qa(g.exports),ts=Qa(Za),ns=Ya,rs=Ja,os=Xa;const{Panel:is,toggle:as}=os.settings,ss=(0,rs.styled)("div")(({theme:e,width:t})=>({maxWidth:t,fontFamily:"Cerebri Sans",fontSize:e.typography.fontSize}));class ls extends ts.default.Component{constructor(...e){super(...e),(0,es.default)(this,"verifyRubriclessModel",(e,t)=>{const{rubricless:n=!1}=t||{};return n?(({points:e,sampleAnswers:t,...n})=>n)(e):e})}render(){const{model:e,configuration:t,onConfigurationChanged:n,onModelChanged:r,imageSupport:o}=this.props||{},{baseInputConfiguration:i={},contentDimensions:a={},settingsPanelDisabled:s,showExcludeZero:l={},showMaxPoint:c={},mathMlOptions:d={},rubricless:u=!1,rubriclessInstruction:p,width:g}=t||{},f=this.verifyRubriclessModel(e,t),{extraCSSRules:m}=e,b={excludeZeroEnabled:l.settings&&as(l.label),maxPointsEnabled:c.settings&&as(c.label),rubriclessInstructionEnabled:u&&p.settings&&as(p.label)};return ts.default.createElement(os.layout.ConfigLayout,{extraCSSRules:m,dimensions:a,hideSettings:s,settings:ts.default.createElement(is,{model:e,onChangeModel:r,configuration:t,onChangeConfiguration:n,pluginOpts:(h=Ka([p,"optionalAccess",e=>e.inputConfiguration]),Object.assign({...i},h||{})),groups:{Properties:b},imageSupport:o})},ts.default.createElement(ss,{width:g},ts.default.createElement(ns.Authoring,{value:f,config:t,onChange:r,mathMlOptions:d,rubricless:u,pluginOpts:i,imageSupport:o})));var h}}D.default=ls;var cs={};Object.defineProperty(cs,"__esModule",{value:!0}),cs.default=void 0,cs.default={model:{points:["","","",""],sampleAnswers:[null,null,null,null],maxPoints:3,excludeZero:!1,excludeZeroEnabled:!0,maxPointsEnabled:!0},configuration:{baseInputConfiguration:{h3:{disabled:!0},audio:{disabled:!1},video:{disabled:!1},image:{disabled:!1},textAlign:{disabled:!0},showParagraphs:{disabled:!1},separateParagraphs:{disabled:!0}},rubriclessInstruction:{inputConfiguration:{audio:{disabled:!1},video:{disabled:!1},image:{disabled:!1}}},showExcludeZero:{settings:!0,label:"Ability to exclude zero"},showMaxPoint:{settings:!0,label:"Show max points dropdown"},settingsPanelDisabled:!1,mathMlOptions:{mmlOutput:!1,mmlEditing:!1},maxMaxPoints:9}};const ds=e,{client:us}=t,ps=a;function gs(e){let t,n=e[0],r=1;for(;r<e.length;){const o=e[r],i=e[r+1];if(r+=2,("optionalAccess"===o||"optionalCall"===o)&&null==n)return;"access"===o||"optionalAccess"===o?(t=n,n=i(n)):"call"!==o&&"optionalCall"!==o||(n=i((...e)=>n.call(t,...e)),t=void 0)}return n}var fs=p.exports;Object.defineProperty(u,"__esModule",{value:!0});var ms=u.default=void 0,bs=fs(g.exports),hs=h,vs=fs(ds),ys=us,xs=fs(ps),Is=fs(D),Es=fs(cs);const Ds=e=>({...Es.default.model,...e}),ws=e=>({...Es.default.configuration,...e});class Cs extends HTMLElement{constructor(){super(),(0,bs.default)(this,"updateModelAccordingToReceivedProps",e=>{const t={...this._model};if(!e)return t;const n={...e};1===n.maxPoints&&(n.excludeZero=!1);const{maxPoints:r,excludeZero:o}=n||{};n.points=n.points?[...n.points]:[],n.sampleAnswers=n.sampleAnswers?[...n.sampleAnswers]:[];const i=o?r:r+1,a=n.points.length,s=gs([t,"optionalAccess",e=>e.excludeZero])!==gs([e,"optionalAccess",e=>e.excludeZero]),l=gs([t,"optionalAccess",e=>e.maxPoints])!==gs([e,"optionalAccess",e=>e.maxPoints]);if(a<i){if(s&&!o&&(n.points=["",...n.points],n.sampleAnswers=[null,...n.sampleAnswers]),l)for(let e=0;e<i-a;e++)n.points.push(""),n.sampleAnswers.push(null)}else a>i&&(s&&o&&(n.points=n.points.slice(1),n.sampleAnswers=n.sampleAnswers.slice(1)),l&&(n.points=n.points.slice(0,i),n.sampleAnswers=n.sampleAnswers.slice(0,i)));return n}),(0,bs.default)(this,"onConfigurationChanged",e=>{this._configuration=ws(e),this._model&&this.onModelChanged(this._model),this._render()}),this._root=null,xs.default.log("constructor called"),this._model=Ds(),this._configuration=ws(),this.onModelChanged=this.onModelChanged.bind(this),this.onConfigurationChanged=this.onConfigurationChanged.bind(this)}set model(e){this._model=this.updateModelAccordingToReceivedProps(Ds(e)),this._render()}set configuration(e){this._configuration=ws(e),this._render()}onModelChanged(e){this._model=this.updateModelAccordingToReceivedProps(e),this._render(),this.dispatchEvent(new hs.ModelUpdatedEvent(this._model,!1))}insertImage(e){this.dispatchEvent(new hs.InsertImageEvent(e))}onDeleteImage(e,t){this.dispatchEvent(new hs.DeleteImageEvent(e,t))}connectedCallback(){this._render()}_render(){if(this._model){let e=vs.default.createElement(Is.default,{model:this._model,configuration:this._configuration,onModelChanged:this.onModelChanged,onConfigurationChanged:this.onConfigurationChanged,imageSupport:{add:this.insertImage.bind(this),delete:this.onDeleteImage.bind(this)}});this._root||(this._root=(0,ys.createRoot)(this)),this._root.render(e)}}disconnectedCallback(){this._root&&this._root.unmount()}}ms=u.default=Cs;export{ms as default};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
var lib = {};
|
|
2
|
+
|
|
3
|
+
var interopRequireDefault = {exports: {}};
|
|
4
|
+
|
|
5
|
+
(function (module) {
|
|
6
|
+
function _interopRequireDefault(e) {
|
|
7
|
+
return e && e.__esModule ? e : {
|
|
8
|
+
"default": e
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
12
|
+
}(interopRequireDefault));
|
|
13
|
+
|
|
14
|
+
var defaults = {};
|
|
15
|
+
|
|
16
|
+
Object.defineProperty(defaults, "__esModule", {
|
|
17
|
+
value: true
|
|
18
|
+
});
|
|
19
|
+
defaults.default = void 0;
|
|
20
|
+
defaults.default = {
|
|
21
|
+
points: ['', '', '', ''],
|
|
22
|
+
sampleAnswers: [null, null, null, null],
|
|
23
|
+
maxPoints: 3,
|
|
24
|
+
maxPointsEnabled: true,
|
|
25
|
+
excludeZero: false,
|
|
26
|
+
excludeZeroEnabled: true
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
var _interopRequireDefault = interopRequireDefault.exports;
|
|
30
|
+
Object.defineProperty(lib, "__esModule", {
|
|
31
|
+
value: true
|
|
32
|
+
});
|
|
33
|
+
var model_1 = lib.model = model;
|
|
34
|
+
var validate_1 = lib.validate = validate;
|
|
35
|
+
var _defaults = _interopRequireDefault(defaults);
|
|
36
|
+
const normalize = model => ({
|
|
37
|
+
..._defaults.default,
|
|
38
|
+
...model
|
|
39
|
+
});
|
|
40
|
+
function model(model, session, env) {
|
|
41
|
+
return new Promise(resolve => {
|
|
42
|
+
const modelResult = normalize(model || {});
|
|
43
|
+
resolve(env && env.role && env.role === 'instructor' ? modelResult : {});
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
function markupToText(s) {
|
|
47
|
+
return (s || '').replace(/(<([^>]+)>)/gi, '');
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// IMPORTANT! If you make any changes to this function, please make sure you also update complex-rubric/controller/validateSimpleRubric function!“.
|
|
51
|
+
function validate(model) {
|
|
52
|
+
const {
|
|
53
|
+
points
|
|
54
|
+
} = model;
|
|
55
|
+
const errors = {};
|
|
56
|
+
const pointsDescriptorsErrors = {};
|
|
57
|
+
(points || []).forEach((point, index) => {
|
|
58
|
+
if (!point || point === '<div></div>') {
|
|
59
|
+
pointsDescriptorsErrors[index] = 'Points descriptors cannot be empty.';
|
|
60
|
+
} else {
|
|
61
|
+
const identicalPointDescr = points.slice(index + 1).some(p => markupToText(p) === markupToText(point));
|
|
62
|
+
if (identicalPointDescr) {
|
|
63
|
+
pointsDescriptorsErrors[index] = 'Points descriptors should be unique.';
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
if (Object.keys(pointsDescriptorsErrors).length > 0) {
|
|
68
|
+
errors.pointsDescriptorsErrors = pointsDescriptorsErrors;
|
|
69
|
+
}
|
|
70
|
+
return errors;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export { lib as default, model_1 as model, validate_1 as validate };
|
package/module/demo.js
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import Configure from './configure.js';
|
|
2
|
+
import Element from './element.js';
|
|
3
|
+
import * as controller from './controller.js';
|
|
4
|
+
|
|
5
|
+
var generate = {};
|
|
6
|
+
|
|
7
|
+
generate.model = (id, element) => ({
|
|
8
|
+
id,
|
|
9
|
+
element,
|
|
10
|
+
points: ['nothing right', 'a teeny bit right', 'mostly right', 'bingo'],
|
|
11
|
+
sampleAnswers: [null, 'just right', 'not left', null],
|
|
12
|
+
maxPoints: 3,
|
|
13
|
+
excludeZero: false,
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
const { model } = generate;
|
|
17
|
+
|
|
18
|
+
var config = {
|
|
19
|
+
elements: {
|
|
20
|
+
'pie-rubric': '../..',
|
|
21
|
+
},
|
|
22
|
+
models: [model('1', 'pie-rubric')],
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
//Note: demo-el is a custom element loaded in the markup.
|
|
26
|
+
customElements.whenDefined("demo-el").then(() => {
|
|
27
|
+
config.models.forEach((m) => {
|
|
28
|
+
const de = document.createElement("demo-el");
|
|
29
|
+
document.body.appendChild(de);
|
|
30
|
+
de.def = { tagName: m.element, Element, Configure, controller };
|
|
31
|
+
de.model = m;
|
|
32
|
+
});
|
|
33
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_dll_react as e,_dll_mui__material_styles as t,_dll_mui__material as n,_dll_mui__material_collapse as i,_dll_pie_lib__render_ui as r,_dll_prop_types as o,_dll_react_dom as l,_dll_debug as s}from"../../../@pie-lib/shared-module@^4.0.1/module/index.js";import{_dll_pie_lib__math_rendering as a}from"../../../@pie-lib/math-rendering-module@^4.0.7/module/index.js";const c=e,{styled:d}=t,{ListItem:h}=n,{List:p}=n,m=i,{color:u}=r,{UiLayout:g}=r,x=o,b=d(g)({color:u.text(),backgroundColor:u.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"}}),_=d(h)({display:"flex",flexDirection:"column",alignItems:"flex-start",padding:"12px 0px"}),f=d("div")({color:u.text()}),y=d("h3")({color:u.text(),fontSize:"16px",fontWeight:"700",margin:0,paddingBottom:"6px"}),k=d("h4")({color:u.text(),fontSize:"16px",fontWeight:"normal",margin:0,paddingBottom:"6px"}),S=d("h2")(({theme:e})=>({display:"flex",alignItems:"center",cursor:"pointer",userSelect:"none",fontSize:e.typography.fontSize,fontWeight:"500",color:u.tertiary(),margin:0})),E=d("span")({display:"inline-flex",transition:"transform 0.2s",marginLeft:2,alignSelf:"center"}),v=d("h2")({position:"absolute",width:"1px",height:"1px",padding:0,margin:"-1px",overflow:"hidden",clip:"rect(0,0,0,0)",border:0,whiteSpace:"nowrap"}),w=x.shape({excludeZero:x.bool,points:x.arrayOf(x.string),sampleAnswers:x.arrayOf(x.string),animationsDisabled:x.bool});class C extends c.Component{__init(){this.dudUrl="javascript:;"}constructor(e){super(e),C.prototype.__init.call(this),C.prototype.__init2.call(this),this.state={rubricOpen:!1,linkPrefix:"Show"},this.toggleRubric=this.toggleRubric.bind(this)}static __initStatic(){this.propTypes={model:x.object.isRequired,animationsDisabled:x.bool,value:w}}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,l=c.createElement(p,{component:"nav"},r.slice(0).reverse().map((e,n)=>{n=r.length-n-1;const i=t.excludeZero?n+1:n;return c.createElement(c.Fragment,{key:n},c.createElement(_,{key:`P${n}`},c.createElement(y,null,1===i?`${i} PT`:`${i} PTS`),c.createElement(f,{dangerouslySetInnerHTML:{__html:e}})),o&&o[n]&&c.createElement(_,{key:`S${n}`},c.createElement(k,null,"Sample Answer"),c.createElement(f,{dangerouslySetInnerHTML:{__html:o[n]}})))}));return c.createElement(b,{extraCSSRules:i},c.createElement(v,null,"Rubric"),n?l:c.createElement(c.Fragment,null,c.createElement(S,{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",c.createElement(E,{"aria-hidden":"true"},this.state.rubricOpen?c.createElement("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},c.createElement("polyline",{points:"18 15 12 9 6 15"})):c.createElement("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},c.createElement("polyline",{points:"6 9 12 15 18 9"})))),c.createElement(m,{in:this.state.rubricOpen,timeout:{enter:225,exit:195}},l)))}return null}}C.__initStatic();var R,L=l;R=L.createRoot,L.hydrateRoot;const M=e,O=s,{renderMath:P}=a;class T extends HTMLElement{constructor(){super(),O.log("constructor called"),this.onModelChanged=this.onModelChanged.bind(this),this._root=null}set model(e){this._model=e,this._render()}onModelChanged(e){this._model=e,this._render()}connectedCallback(){this._render()}_render(){if(this._model){const e=M.createElement(C,{value:this._model});this._root||(this._root=R(this)),this._root.render(e),queueMicrotask(()=>{P(this)})}}disconnectedCallback(){this._root&&this._root.unmount()}}export{T as default};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
|
|
2
|
+
<!doctype html>
|
|
3
|
+
<html>
|
|
4
|
+
<head>
|
|
5
|
+
<title>@pie-element/rubric@7.0.0-beta.1</title>
|
|
6
|
+
<script
|
|
7
|
+
type="module"
|
|
8
|
+
src="https://cdn.jsdelivr.net/npm/@pslb/demo-el@^1.0.0/dist/demo-el/demo-el.esm.js"></script>
|
|
9
|
+
|
|
10
|
+
<link
|
|
11
|
+
href="https://fonts.googleapis.com/css?family=Roboto&display=swap"
|
|
12
|
+
rel="stylesheet"
|
|
13
|
+
/>
|
|
14
|
+
<style>
|
|
15
|
+
html, body {
|
|
16
|
+
font-family: 'Roboto', sans-serif;
|
|
17
|
+
}
|
|
18
|
+
</style>
|
|
19
|
+
<script type="module" src="./demo.js"></script>
|
|
20
|
+
</head>
|
|
21
|
+
</html>
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import PrintElement from './print.js';
|
|
2
|
+
|
|
3
|
+
var generate = {};
|
|
4
|
+
|
|
5
|
+
generate.model = (id, element) => ({
|
|
6
|
+
id,
|
|
7
|
+
element,
|
|
8
|
+
points: ['nothing right', 'a teeny bit right', 'mostly right', 'bingo'],
|
|
9
|
+
sampleAnswers: [null, 'just right', 'not left', null],
|
|
10
|
+
maxPoints: 3,
|
|
11
|
+
excludeZero: false,
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
const { model } = generate;
|
|
15
|
+
|
|
16
|
+
var config = {
|
|
17
|
+
elements: {
|
|
18
|
+
'pie-rubric': '../..',
|
|
19
|
+
},
|
|
20
|
+
models: [model('1', 'pie-rubric')],
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
// new init - just shows off print!
|
|
24
|
+
|
|
25
|
+
const init = async () => {
|
|
26
|
+
console.log('define the element...');
|
|
27
|
+
await Promise.all(
|
|
28
|
+
config.models.map(async (m) => {
|
|
29
|
+
try {
|
|
30
|
+
const printTag = `${m.element}-print`;
|
|
31
|
+
if (customElements.get(printTag)) {
|
|
32
|
+
return true;
|
|
33
|
+
} else {
|
|
34
|
+
customElements.define(printTag, PrintElement);
|
|
35
|
+
await customElements.whenDefined(printTag);
|
|
36
|
+
return true;
|
|
37
|
+
}
|
|
38
|
+
} catch (e) {
|
|
39
|
+
return false;
|
|
40
|
+
}
|
|
41
|
+
})
|
|
42
|
+
);
|
|
43
|
+
|
|
44
|
+
console.log('now apply the model...');
|
|
45
|
+
config.models.forEach((m) => {
|
|
46
|
+
const printTag = `${m.element}-print`;
|
|
47
|
+
const h3s = document.createElement('h3');
|
|
48
|
+
h3s.textContent = 'student mode';
|
|
49
|
+
document.body.appendChild(h3s);
|
|
50
|
+
const de = document.createElement(printTag);
|
|
51
|
+
document.body.appendChild(de);
|
|
52
|
+
de.options = {};
|
|
53
|
+
de.model = m;
|
|
54
|
+
|
|
55
|
+
const h3 = document.createElement('h3');
|
|
56
|
+
h3.textContent = 'instructor mode';
|
|
57
|
+
document.body.appendChild(h3);
|
|
58
|
+
const instr = document.createElement(printTag);
|
|
59
|
+
document.body.appendChild(instr);
|
|
60
|
+
instr.options = { mode: 'instructor' };
|
|
61
|
+
instr.model = JSON.parse(JSON.stringify(m));
|
|
62
|
+
});
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
init()
|
|
66
|
+
.then(() => {
|
|
67
|
+
console.log('ready');
|
|
68
|
+
})
|
|
69
|
+
.catch((e) => {
|
|
70
|
+
console.error(e);
|
|
71
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
|
|
2
|
+
<!doctype html>
|
|
3
|
+
<html>
|
|
4
|
+
<head>
|
|
5
|
+
<title>@pie-element/rubric@7.0.0-beta.1</title>
|
|
6
|
+
<link
|
|
7
|
+
href="https://fonts.googleapis.com/css?family=Roboto&display=swap"
|
|
8
|
+
rel="stylesheet"
|
|
9
|
+
/>
|
|
10
|
+
<style>
|
|
11
|
+
html, body {
|
|
12
|
+
font-family: 'Roboto', sans-serif;
|
|
13
|
+
}
|
|
14
|
+
</style>
|
|
15
|
+
<script type="module" src="./print-demo.js"></script>
|
|
16
|
+
</head>
|
|
17
|
+
<body></body>
|
|
18
|
+
</html>
|
package/module/print.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_dll_react_dom as e,_dll_react as t,_dll_mui__material_styles as n,_dll_mui__material as r,_dll_mui__material_collapse as i,_dll_pie_lib__render_ui as o,_dll_prop_types as l,_dll_debug as a}from"../../../@pie-lib/shared-module@^4.0.1/module/index.js";import{_dll_pie_lib__math_rendering as s}from"../../../@pie-lib/math-rendering-module@^4.0.7/module/index.js";var c,u=e;c=u.createRoot,u.hydrateRoot;var p="object"==typeof global&&global&&global.Object===Object&&global,d="object"==typeof self&&self&&self.Object===Object&&self,h=p||d||Function("return this")(),m=h.Symbol,f=Object.prototype,g=f.hasOwnProperty,b=f.toString,v=m?m.toStringTag:void 0;var x=Object.prototype.toString;var y=m?m.toStringTag:void 0;function _(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":y&&y in Object(e)?function(e){var t=g.call(e,v),n=e[v];try{e[v]=void 0;var r=!0}catch(e){}var i=b.call(e);return r&&(t?e[v]=n:delete e[v]),i}(e):function(e){return x.call(e)}(e)}var S=/\s/;var k=/^\s+/;function E(e){return e?e.slice(0,function(e){for(var t=e.length;t--&&S.test(e.charAt(t)););return t}(e)+1).replace(k,""):e}function j(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}var O=/^[-+]0x[0-9a-f]+$/i,w=/^0b[01]+$/i,T=/^0o[0-7]+$/i,R=parseInt;function L(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]"==_(e)}(e))return NaN;if(j(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=j(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=E(e);var n=w.test(e);return n||T.test(e)?R(e.slice(2),n?2:8):O.test(e)?NaN:+e}var C=function(){return h.Date.now()},M=Math.max,P=Math.min;function D(e,t,n){var r,i,o,l,a,s,c=0,u=!1,p=!1,d=!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,l=e.apply(o,n)}function m(e){var n=e-s;return void 0===s||n>=t||n<0||p&&e-c>=o}function f(){var e=C();if(m(e))return g(e);a=setTimeout(f,function(e){var n=t-(e-s);return p?P(n,o-(e-c)):n}(e))}function g(e){return a=void 0,d&&r?h(e):(r=i=void 0,l)}function b(){var e=C(),n=m(e);if(r=arguments,i=this,s=e,n){if(void 0===a)return function(e){return c=e,a=setTimeout(f,t),u?h(e):l}(s);if(p)return clearTimeout(a),a=setTimeout(f,t),h(s)}return void 0===a&&(a=setTimeout(f,t)),l}return t=L(t)||0,j(n)&&(u=!!n.leading,o=(p="maxWait"in n)?M(L(n.maxWait)||0,t):o,d="trailing"in n?!!n.trailing:d),b.cancel=function(){void 0!==a&&clearTimeout(a),c=0,r=s=i=a=void 0},b.flush=function(){return void 0===a?l:g(C())},b}const I=t,{styled:W}=n,{ListItem:$}=r,{List:A}=r,B=i,{color:H}=o,{UiLayout:N}=o,z=l,F=W(N)({color:H.text(),backgroundColor:H.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"}}),J=W($)({display:"flex",flexDirection:"column",alignItems:"flex-start",padding:"12px 0px"}),U=W("div")({color:H.text()}),Z=W("h3")({color:H.text(),fontSize:"16px",fontWeight:"700",margin:0,paddingBottom:"6px"}),q=W("h4")({color:H.text(),fontSize:"16px",fontWeight:"normal",margin:0,paddingBottom:"6px"}),K=W("h2")(({theme:e})=>({display:"flex",alignItems:"center",cursor:"pointer",userSelect:"none",fontSize:e.typography.fontSize,fontWeight:"500",color:H.tertiary(),margin:0})),G=W("span")({display:"inline-flex",transition:"transform 0.2s",marginLeft:2,alignSelf:"center"}),Q=W("h2")({position:"absolute",width:"1px",height:"1px",padding:0,margin:"-1px",overflow:"hidden",clip:"rect(0,0,0,0)",border:0,whiteSpace:"nowrap"}),V=z.shape({excludeZero:z.bool,points:z.arrayOf(z.string),sampleAnswers:z.arrayOf(z.string),animationsDisabled:z.bool});class X extends I.Component{__init(){this.dudUrl="javascript:;"}constructor(e){super(e),X.prototype.__init.call(this),X.prototype.__init2.call(this),this.state={rubricOpen:!1,linkPrefix:"Show"},this.toggleRubric=this.toggleRubric.bind(this)}static __initStatic(){this.propTypes={model:z.object.isRequired,animationsDisabled:z.bool,value:V}}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,l=I.createElement(A,{component:"nav"},i.slice(0).reverse().map((e,n)=>{n=i.length-n-1;const r=t.excludeZero?n+1:n;return I.createElement(I.Fragment,{key:n},I.createElement(J,{key:`P${n}`},I.createElement(Z,null,1===r?`${r} PT`:`${r} PTS`),I.createElement(U,{dangerouslySetInnerHTML:{__html:e}})),o&&o[n]&&I.createElement(J,{key:`S${n}`},I.createElement(q,null,"Sample Answer"),I.createElement(U,{dangerouslySetInnerHTML:{__html:o[n]}})))}));return I.createElement(F,{extraCSSRules:r},I.createElement(Q,null,"Rubric"),n?l:I.createElement(I.Fragment,null,I.createElement(K,{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",I.createElement(G,{"aria-hidden":"true"},this.state.rubricOpen?I.createElement("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},I.createElement("polyline",{points:"18 15 12 9 6 15"})):I.createElement("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},I.createElement("polyline",{points:"6 9 12 15 18 9"})))),I.createElement(B,{in:this.state.rubricOpen,timeout:{enter:225,exit:195}},l)))}return null}}X.__initStatic();const Y=t,ee=a,{renderMath:te}=s,ne=ee("pie-element:rubric:print");class re extends HTMLElement{constructor(){super(),this._options=null,this._model=null,this._session=[],this._root=null,this._rerender=D(()=>{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&&Y.createElement(X,{...t});this._root||(this._root=c(this)),this._root.render(n),queueMicrotask(()=>{ne("render complete - render math"),te(this)})}else ne("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{re as default};
|
package/package.json
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-element/rubric",
|
|
3
|
-
"version": "7.0.0-
|
|
3
|
+
"version": "7.0.0-next.0+67da381",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"module": "src/index.js",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": "./src/index.js",
|
|
8
|
+
"./print": "./src/print.js"
|
|
9
|
+
},
|
|
6
10
|
"description": "Rubric Scoring Interaction",
|
|
7
11
|
"repository": "pie-framework/pie-elements",
|
|
8
12
|
"publishConfig": {
|
|
@@ -13,13 +17,13 @@
|
|
|
13
17
|
"@emotion/style": "^0.8.0",
|
|
14
18
|
"@mui/icons-material": "^7.3.4",
|
|
15
19
|
"@mui/material": "^7.3.4",
|
|
16
|
-
"@pie-lib/math-rendering": "4.1.
|
|
17
|
-
"@pie-lib/render-ui": "5.1.
|
|
18
|
-
"prop-types": "^15.
|
|
20
|
+
"@pie-lib/math-rendering": "4.1.1-next.1",
|
|
21
|
+
"@pie-lib/render-ui": "5.1.1-next.1",
|
|
22
|
+
"prop-types": "^15.8.1"
|
|
19
23
|
},
|
|
20
24
|
"author": "pie framework developers",
|
|
21
25
|
"license": "ISC",
|
|
22
|
-
"gitHead": "
|
|
26
|
+
"gitHead": "67da3818d2af966110c6e85f6e8e238b79515eb2",
|
|
23
27
|
"scripts": {
|
|
24
28
|
"postpublish": "../../scripts/postpublish"
|
|
25
29
|
}
|
package/src/print.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { createRoot } from 'react-dom/client';
|
|
3
|
-
import debounce from 'lodash
|
|
3
|
+
import { debounce } from 'lodash-es';
|
|
4
4
|
import Main from './main';
|
|
5
5
|
import { renderMath } from '@pie-lib/math-rendering';
|
|
6
6
|
import debug from 'debug';
|