@pie-element/rubric 7.0.0-next.43 → 7.1.1-next.1

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.
@@ -15,6 +15,9 @@ var _default = exports.default = {
15
15
  },
16
16
  configuration: {
17
17
  baseInputConfiguration: {
18
+ h3: {
19
+ disabled: true
20
+ },
18
21
  audio: {
19
22
  disabled: false
20
23
  },
@@ -1 +1 @@
1
- {"version":3,"file":"defaults.js","names":["model","points","sampleAnswers","maxPoints","excludeZero","excludeZeroEnabled","maxPointsEnabled","configuration","baseInputConfiguration","audio","disabled","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 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,KAAK,EAAE;QAAEC,QAAQ,EAAE;MAAM,CAAC;MAC1BC,KAAK,EAAE;QAAED,QAAQ,EAAE;MAAM,CAAC;MAC1BE,KAAK,EAAE;QAAEF,QAAQ,EAAE;MAAM,CAAC;MAC1BG,SAAS,EAAE;QAAEH,QAAQ,EAAE;MAAK,CAAC;MAC7BI,cAAc,EAAE;QAAEJ,QAAQ,EAAE;MAAM,CAAC;MACnCK,kBAAkB,EAAE;QAAEL,QAAQ,EAAE;MAAK;IACvC,CAAC;IACDM,qBAAqB,EAAE;MACrBC,kBAAkB,EAAE;QAClBR,KAAK,EAAE;UAAEC,QAAQ,EAAE;QAAM,CAAC;QAC1BC,KAAK,EAAE;UAAED,QAAQ,EAAE;QAAM,CAAC;QAC1BE,KAAK,EAAE;UAAEF,QAAQ,EAAE;QAAM;MAC3B;IACF,CAAC;IACDQ,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":[]}
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":[]}
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pie-element/rubric-configure",
3
3
  "private": true,
4
- "version": "6.0.0-beta.1",
4
+ "version": "6.1.1-next.1",
5
5
  "description": "Rubric authoring view",
6
6
  "main": "lib/index.js",
7
7
  "author": "Pie Framework Authors",
@@ -11,13 +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.1-next.0",
15
- "@pie-lib/editable-html-tip-tap": "1.1.1-next.0",
16
- "@pie-lib/render-ui": "5.1.1-next.0",
17
- "@pie-lib/rubric": "1.1.1-next.0",
14
+ "@pie-lib/config-ui": "12.2.0-next.11",
15
+ "@pie-lib/editable-html-tip-tap": "1.2.0-next.11",
16
+ "@pie-lib/render-ui": "5.2.0-next.4",
17
+ "@pie-lib/rubric": "1.2.0-next.11",
18
18
  "debug": "^4.1.1",
19
- "react": "18.2.0",
20
- "react-dom": "18.2.0"
19
+ "react": "18.3.1",
20
+ "react-dom": "18.3.1"
21
21
  },
22
22
  "license": "ISC"
23
23
  }
@@ -9,6 +9,7 @@ export default {
9
9
  },
10
10
  configuration: {
11
11
  baseInputConfiguration: {
12
+ h3: { disabled: true },
12
13
  audio: { disabled: false },
13
14
  video: { disabled: false },
14
15
  image: { disabled: false },
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@pie-element/rubric-controller",
3
3
  "private": true,
4
- "version": "5.0.0-beta.0",
4
+ "version": "5.1.0-next.1",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {
7
7
  "test": "./node_modules/.bin/jest"
8
8
  },
9
9
  "dependencies": {
10
- "lodash": "^4.17.15"
10
+ "lodash-es": "^4.17.23"
11
11
  }
12
12
  }
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 _debounce = _interopRequireDefault(require("lodash/debounce"));
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, _debounce.default)(() => {
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","_debounce","_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/debounce';\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,GAAAH,sBAAA,CAAAC,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,iBAAQ,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":[]}
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":[]}
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@pie-element/rubric",
3
- "version": "7.0.0-next.43+4249fa78f",
3
+ "repository": "pie-framework/pie-elements",
4
+ "version": "7.1.1-next.1",
4
5
  "main": "lib/index.js",
5
6
  "module": "src/index.js",
6
7
  "exports": {
@@ -8,7 +9,6 @@
8
9
  "./print": "./src/print.js"
9
10
  },
10
11
  "description": "Rubric Scoring Interaction",
11
- "repository": "pie-framework/pie-elements",
12
12
  "publishConfig": {
13
13
  "access": "public"
14
14
  },
@@ -17,13 +17,13 @@
17
17
  "@emotion/style": "^0.8.0",
18
18
  "@mui/icons-material": "^7.3.4",
19
19
  "@mui/material": "^7.3.4",
20
- "@pie-lib/math-rendering": "4.1.1-next.0",
21
- "@pie-lib/render-ui": "5.1.1-next.0",
20
+ "@pie-lib/math-rendering": "4.2.0-next.3",
21
+ "@pie-lib/render-ui": "5.2.0-next.4",
22
22
  "prop-types": "^15.8.1"
23
23
  },
24
24
  "author": "pie framework developers",
25
25
  "license": "ISC",
26
- "gitHead": "4249fa78fc423ef0a8c89002b8f937c42b3478ea",
26
+ "gitHead": "9cc4a1cd183a260a03c7d817e0085517112a1a56",
27
27
  "scripts": {
28
28
  "postpublish": "../../scripts/postpublish"
29
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/debounce';
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';
@@ -1 +0,0 @@
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_lodash as a,_dll_debug as s}from"../../../@pie-lib/shared-module@^3.0.5/module/index.js";import{_dll_pie_lib__config_ui as l}from"../../../@pie-lib/config-module@^3.0.0/module/index.js";import{_dll_pie_lib__editable_html_tip_tap as c}from"../../../@pie-lib/editable-html-module@^6.0.5/module/index.js";function d(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var u,p={},g={exports:{}};(u=g).exports=function(e){return e&&e.__esModule?e:{default:e}},u.exports.__esModule=!0,u.exports.default=u.exports,d(g.exports);var m={exports:{}},f={exports:{}},b={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}(b),d(b.exports);var h={exports:{}};!function(e){var t=b.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}(h),d(h.exports),function(e){var t=b.exports.default,n=h.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),d(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}(m),d(m.exports);var v={};Object.defineProperty(v,"__esModule",{value:!0});class y extends CustomEvent{constructor(e,t=!1){super(y.TYPE,{bubbles:!0,detail:{update:e,reset:t}}),this.update=e,this.reset=t}}y.TYPE="model.updated",v.ModelUpdatedEvent=y;class x extends CustomEvent{constructor(e,t){super(x.TYPE,{bubbles:!0,detail:{src:e,done:t}}),this.src=e,this.done=t}}x.TYPE="delete.image",v.DeleteImageEvent=x;class I extends CustomEvent{constructor(e){super(I.TYPE,{bubbles:!0,detail:e}),this.handler=e}}I.TYPE="insert.image",v.InsertImageEvent=I;class E extends CustomEvent{constructor(e,t){super(E.TYPE,{bubbles:!0,detail:{src:e,done:t}}),this.src=e,this.done=t}}E.TYPE="delete.sound",v.DeleteSoundEvent=E;class D extends CustomEvent{constructor(e){super(D.TYPE,{bubbles:!0,detail:e}),this.handler=e}}D.TYPE="insert.sound",v.InsertSoundEvent=D;var w={};function C(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 S="function"==typeof Symbol&&Symbol.observable||"@@observable",A=()=>Math.random().toString(36).substring(7).split("").join("."),P={INIT:`@@redux/INIT${A()}`,REPLACE:`@@redux/REPLACE${A()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${A()}`};function O(e,t,n){if("function"!=typeof e)throw new Error(C(2));if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(C(0));if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error(C(1));return n(O)(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(C(3));return o}function u(e){if("function"!=typeof e)throw new Error(C(4));if(l)throw new Error(C(5));let t=!0;c();const n=s++;return a.set(n,e),function(){if(t){if(l)throw new Error(C(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(C(7));if(void 0===e.type)throw new Error(C(8));if("string"!=typeof e.type)throw new Error(C(17));if(l)throw new Error(C(9));try{l=!0,o=r(o,e)}finally{l=!1}return(i=a).forEach(e=>{e()}),e}return p({type:P.INIT}),{dispatch:p,subscribe:u,getState:d,replaceReducer:function(e){if("function"!=typeof e)throw new Error(C(10));r=e,p({type:P.REPLACE})},[S]:function(){const e=u;return{subscribe(t){if("object"!=typeof t||null===t)throw new Error(C(11));function n(){const e=t;e.next&&e.next(d())}return n(),{unsubscribe:e(n)}},[S](){return this}}}}}function R(e,t){return function(...n){return t(e.apply(this,n))}}function _(e,t){if("function"==typeof e)return R(e,t);if("object"!=typeof e||null===e)throw new Error(C(16));const n={};for(const r in e){const o=e[r];"function"==typeof o&&(n[r]=R(o,t))}return n}function N(...e){return 0===e.length?e=>e:1===e.length?e[0]:e.reduce((e,t)=>(...n)=>e(t(...n)))}var B={exports:{}},T={},M=e,L="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},G=M.useSyncExternalStore,F=M.useRef,k=M.useEffect,j=M.useMemo,W=M.useDebugValue;T.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var i=F(null);if(null===i.current){var a={hasValue:!1,value:null};i.current=a}else a=i.current;i=j(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,L(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=G(e,i[0],i[1]);return k(function(){a.hasValue=!0,a.value=s},[s]),W(s),s},B.exports=T;const $=e;var U=$.version.startsWith("19"),H=Symbol.for(U?"react.transitional.element":"react.element"),q=Symbol.for("react.portal"),V=Symbol.for("react.fragment"),z=Symbol.for("react.strict_mode"),Y=Symbol.for("react.profiler"),Z=Symbol.for("react.consumer"),J=Symbol.for("react.context"),X=Symbol.for("react.forward_ref"),K=Symbol.for("react.suspense"),Q=Symbol.for("react.suspense_list"),ee=Symbol.for("react.memo"),te=Symbol.for("react.lazy"),ne=X,re=ee;function oe(e){return function(t){const n=e(t);function r(){return n}return r.dependsOnOwnProps=!1,r}}function ie(e){return e.dependsOnOwnProps?Boolean(e.dependsOnOwnProps):1!==e.length}function ae(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=ie(e);let o=r(t,n);return"function"==typeof o&&(r.mapToProps=o,r.dependsOnOwnProps=ie(o),o=r(t,n)),o},r}}function se(e,t){return(n,r)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${r.wrappedComponentName}.`)}}function le(e,t,n){return{...n,...e,...t}}var ce={notify(){},get:()=>[]};function de(e,t){let n,r=ce,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=ce)}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 ue=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),pe="undefined"!=typeof navigator&&"ReactNative"===navigator.product,ge=ue||pe?$.useLayoutEffect:$.useEffect;function me(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function fe(e,t){if(me(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])||!me(e[n[r]],t[n[r]]))return!1;return!0}var be={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},he={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},ve={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},ye={[ne]:{$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},[re]:ve};function xe(e){return function(e){return function(e){if("object"==typeof e&&null!==e){const{$$typeof:t}=e;switch(t){case H:switch(e=e.type){case V:case Y:case z:case K:case Q:return e;default:switch(e=e&&e.$$typeof){case J:case X:case te:case ee:case Z:return e;default:return t}}case q:return t}}}(e)===ee}(e)?ve:ye[e.$$typeof]||be}var Ie=Object.defineProperty,Ee=Object.getOwnPropertyNames,De=Object.getOwnPropertySymbols,we=Object.getOwnPropertyDescriptor,Ce=Object.getPrototypeOf,Se=Object.prototype;function Ae(e,t){if("string"!=typeof t){if(Se){const n=Ce(t);n&&n!==Se&&Ae(e,n)}let n=Ee(t);De&&(n=n.concat(De(t)));const r=xe(e),o=xe(t);for(let i=0;i<n.length;++i){const a=n[i];if(!(he[a]||o&&o[a]||r&&r[a])){const n=we(t,a);try{Ie(e,a,n)}catch(e){}}}}return e}var Pe=Symbol.for("react-redux-context"),Oe="undefined"!=typeof globalThis?globalThis:{},Re=function(){if(!$.createContext)return{};const e=Oe[Pe]??=new Map;let t=e.get($.createContext);return t||(t=$.createContext(null),e.set($.createContext,t)),t}(),_e=[null,null];function Ne(e,t,n,r,o,i){e.current=r,n.current=!1,o.current&&(o.current=null,i())}function Be(e,t){return e===t}var Te=function(e,t,n,{pure:r,areStatesEqual:o=Be,areOwnPropsEqual:i=fe,areStatePropsEqual:a=fe,areMergedPropsEqual:s=fe,forwardRef:l=!1,context:c=Re}={}){const d=c,u=function(e){return e?"function"==typeof e?ae(e):se(e,"mapStateToProps"):oe(()=>({}))}(e),p=function(e){return e&&"object"==typeof e?oe(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?ae(e):se(e,"mapDispatchToProps"):oe(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):se(e,"mergeProps"):()=>le}(n),m=Boolean(e);return e=>{const t=e.displayName||e.name||"Component",n=`Connect(${t})`,r={shouldHandleStateChanges:m,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]=$.useMemo(()=>{const{reactReduxForwardedRef:e,...n}=t;return[t.context,e,n]},[t]),a=$.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=$.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=$.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 m=!i(g,l),f=!o(p,s,g,l);return s=p,l=g,m&&f?(c=e(s,l),t.dependsOnOwnProps&&(d=t(r,l)),u=n(c,d,l),u):m?(e.dependsOnOwnProps&&(c=e(s,l)),t.dependsOnOwnProps&&(d=t(r,l)),u=n(c,d,l),u):f?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]),[f,b]=$.useMemo(()=>{if(!m)return _e;const e=de(u,l?void 0:s.subscription),t=e.notifyNestedSubs.bind(e);return[e,t]},[u,l,s]),h=$.useMemo(()=>l?s:{...s,subscription:f},[l,s,f]),v=$.useRef(void 0),y=$.useRef(i),x=$.useRef(void 0),I=$.useRef(!1),E=$.useRef(!1),D=$.useRef(void 0);ge(()=>(E.current=!0,()=>{E.current=!1}),[]);const w=$.useMemo(()=>()=>x.current&&i===y.current?x.current:g(u.getState(),i),[u,i]),C=$.useMemo(()=>e=>f?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}}(m,u,f,g,y,v,I,E,x,b,e):()=>{},[f]);var S,A;let P;S=Ne,A=[y,v,I,i,x,b],ge(()=>S(...A),undefined);try{P=$.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}ge(()=>{D.current=void 0,x.current=void 0,v.current=P});const O=$.useMemo(()=>$.createElement(e,{...P,ref:o}),[o,e,P]);return $.useMemo(()=>m?$.createElement(a.Provider,{value:h},O):O,[a,O,h])}const f=$.memo(c);if(f.WrappedComponent=e,f.displayName=c.displayName=n,l){const t=$.forwardRef(function(e,t){return $.createElement(f,{...e,reactReduxForwardedRef:t})});return t.displayName=n,t.WrappedComponent=e,Ae(t,e)}return Ae(f,e)}},Me=function(e){const{children:t,context:n,serverState:r,store:o}=e,i=$.useMemo(()=>{const e=de(o);return{store:o,subscription:e,getServerState:r?()=>r:void 0}},[o,r]),a=$.useMemo(()=>o.getState(),[o]);ge(()=>{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||Re;return $.createElement(s.Provider,{value:i},t)};function Le(e=Re){return function(){return $.useContext(e)}}var Ge=Le();function Fe(e=Re){const t=e===Re?Ge:Le(e),n=()=>{const{store:e}=t();return e};return Object.assign(n,{withTypes:()=>n}),n}var ke=Fe();!function(e=Re){const t=e===Re?ke:Fe(e),n=()=>t().dispatch;Object.assign(n,{withTypes:()=>n})}();var je=(e,t)=>e===t;!function(e=Re){const t=e===Re?Ge:Le(e),n=(e,n={})=>{const{equalityFn:r=je}="function"==typeof n?{equalityFn:n}:n,o=t(),{store:i,subscription:a,getServerState:s}=o;$.useRef(!0);const l=$.useCallback({[e.name]:t=>e(t)}[e.name],[e]),c=B.exports.useSyncExternalStoreWithSelector(a.addNestedSub,i.getState,s||i.getState,l,r);return $.useDebugValue(c),c};Object.assign(n,{withTypes:()=>n})}();var We=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}}},$e=function(e,t){return{top:e.top-t.top,left:e.left-t.left,bottom:e.bottom+t.bottom,right:e.right+t.right}},Ue=function(e,t){return{top:e.top+t.top,left:e.left+t.left,bottom:e.bottom-t.bottom,right:e.right-t.right}},He={top:0,right:0,bottom:0,left:0},qe=function(e){var t=e.borderBox,n=e.margin,r=void 0===n?He:n,o=e.border,i=void 0===o?He:o,a=e.padding,s=void 0===a?He:a,l=We($e(t,r)),c=We(Ue(t,i)),d=We(Ue(c,s));return{marginBox:l,borderBox:We(t),paddingBox:c,contentBox:d,margin:r,border:i,padding:s}},Ve=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},ze=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 qe({borderBox:l,border:i,margin:a,padding:s})},Ye=function(e,t){return void 0===t&&(t={x:window.pageXOffset,y:window.pageYOffset}),ze(e,t)},Ze=function(e,t){var n={top:Ve(t.marginTop),right:Ve(t.marginRight),bottom:Ve(t.marginBottom),left:Ve(t.marginLeft)},r={top:Ve(t.paddingTop),right:Ve(t.paddingRight),bottom:Ve(t.paddingBottom),left:Ve(t.paddingLeft)},o={top:Ve(t.borderTopWidth),right:Ve(t.borderRightWidth),bottom:Ve(t.borderBottomWidth),left:Ve(t.borderLeftWidth)};return qe({borderBox:e,margin:n,padding:r,border:o})},Je=function(e){var t=e.getBoundingClientRect(),n=window.getComputedStyle(e);return Ze(t,n)},Xe=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 Ke(){return Ke=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},Ke.apply(null,arguments)}const Qe=e,{useState:et}=e,{useRef:tt}=e,{useEffect:nt}=e,{useLayoutEffect:rt}=e,{useContext:ot}=e,it=t,{flushSync:at}=t;function st(e,t){}function lt(){}function ct(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()})}}st.bind(null,"warn"),st.bind(null,"error");class dt extends Error{}function ut(e,t){throw new dt("Invariant failed")}dt.prototype.toString=function(){return this.message};class pt extends Qe.Component{constructor(...e){super(...e),this.callbacks=null,this.unbind=lt,this.onWindowError=e=>{const t=this.getCallbacks();t.isDragging()&&t.tryAbort(),e.error instanceof dt&&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=ct(window,[{eventName:"error",fn:this.onWindowError}])}componentDidCatch(e){if(!(e instanceof dt))throw e;this.setState({})}componentWillUnmount(){this.unbind()}render(){return this.props.children(this.setCallbacks)}}const gt=e=>e+1,mt=(e,t)=>{const n=e.droppableId===t.droppableId,r=gt(e.index),o=gt(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 `},ft=(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 `,bt=e=>`\n The item has returned to its starting position\n of ${gt(e.index)}\n`,ht="\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",vt=e=>`\n You have lifted an item in position ${gt(e.source.index)}\n`,yt=e=>{const t=e.destination;if(t)return mt(e.source,t);const n=e.combine;return n?ft(e.draggableId,e.source,n):"You are over an area that cannot be dropped on"},xt=e=>{if("CANCEL"===e.reason)return`\n Movement cancelled.\n ${bt(e.source)}\n `;const t=e.destination,n=e.combine;return t?`\n You have dropped the item.\n ${mt(e.source,t)}\n `:n?`\n You have dropped the item.\n ${ft(e.draggableId,e.source,n)}\n `:`\n The item has been dropped while not over a drop area.\n ${bt(e.source)}\n `};function It(e,t){return e===t||!(!Number.isNaN(e)||!Number.isNaN(t))}function Et(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!It(e[n],t[n]))return!1;return!0}function Dt(e,t){const n=et(()=>({inputs:t,result:e()}))[0],r=tt(!0),o=tt(n),i=r.current||Boolean(t&&o.current.inputs&&Et(t,o.current.inputs))?o.current:{inputs:t,result:e()};return nt(()=>{r.current=!1,o.current=i},[i]),i.result}function wt(e,t){return Dt(()=>e,t)}const Ct={x:0,y:0},St=(e,t)=>({x:e.x+t.x,y:e.y+t.y}),At=(e,t)=>({x:e.x-t.x,y:e.y-t.y}),Pt=(e,t)=>e.x===t.x&&e.y===t.y,Ot=e=>({x:0!==e.x?-e.x:0,y:0!==e.y?-e.y:0}),Rt=(e,t,n=0)=>"x"===e?{x:t,y:n}:{x:n,y:t},_t=(e,t)=>Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2),Nt=(e,t)=>Math.min(...t.map(t=>_t(e,t))),Bt=e=>t=>({x:e(t.x),y:e(t.y)}),Tt=(e,t)=>({top:e.top+t.y,left:e.left+t.x,bottom:e.bottom+t.y,right:e.right+t.x}),Mt=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}],Lt=(e,t)=>t&&t.shouldClipSubject?((e,t)=>{const n=We({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):We(e);var Gt=({page:e,withPlaceholder:t,axis:n,frame:r})=>{const o=((e,t)=>t?Tt(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:Lt(i,r)}},Ft=(e,t)=>{e.frame||ut();const n=e.frame,r=At(t,n.scroll.initial),o=Ot(r),i={...n,scroll:{initial:n.scroll.initial,current:t,diff:{value:r,displacement:o},max:n.scroll.max}},a=Gt({page:e.subject.page,withPlaceholder:e.subject.withPlaceholder,axis:e.axis,frame:i});return{...e,frame:i,subject:a}};function kt(e,t=Et){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 jt=kt(e=>e.reduce((e,t)=>(e[t.descriptor.id]=t,e),{})),Wt=kt(e=>e.reduce((e,t)=>(e[t.descriptor.id]=t,e),{})),$t=kt(e=>Object.values(e)),Ut=kt(e=>Object.values(e));var Ht=kt((e,t)=>Ut(t).filter(t=>e===t.descriptor.droppableId).sort((e,t)=>e.descriptor.index-t.descriptor.index));function qt(e){return e.at&&"REORDER"===e.at.type?e.at.destination:null}function Vt(e){return e.at&&"COMBINE"===e.at.type?e.at.combine:null}var zt=kt((e,t)=>t.filter(t=>t.descriptor.id!==e.descriptor.id)),Yt=(e,t)=>e.descriptor.droppableId===t.descriptor.id;const Zt={point:Ct,value:0},Jt={invisible:{},visible:{},all:[]},Xt={displaced:Jt,displacedBy:Zt,at:null};var Kt=(e,t)=>n=>e<=n&&n<=t,Qt=e=>{const t=Kt(e.top,e.bottom),n=Kt(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)}},en=e=>{const t=Kt(e.top,e.bottom),n=Kt(e.left,e.right);return e=>t(e.top)&&t(e.bottom)&&n(e.left)&&n(e.right)};const tn={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},nn={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"},rn=({target:e,destination:t,viewport:n,withDroppableDisplacement:r,isVisibleThroughFrameFn:o})=>{const i=r?((e,t)=>{const n=t.frame?t.frame.scroll.diff.displacement:Ct;return Tt(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)},on=e=>rn({...e,isVisibleThroughFrameFn:en});function an({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 We($e(n,r))}(a,n),l=a.descriptor.id;var c;if(e.all.push(l),c={target:s,destination:t,viewport:r,withDroppableDisplacement:!0},!rn({...c,isVisibleThroughFrameFn:Qt}))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 sn({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:Jt,displacedBy:n,at:{type:"REORDER",destination:{droppableId:r.descriptor.id,index:o}}}}function ln({draggable:e,insideDestination:t,destination:n,viewport:r,displacedBy:o,last:i,index:a,forceShouldAnimate:s}){const l=Yt(e,n);if(null==a)return sn({insideDestination:t,inHomeList:l,displacedBy:o,destination:n});const c=t.find(e=>e.descriptor.index===a);if(!c)return sn({insideDestination:t,inHomeList:l,displacedBy:o,destination:n});const d=zt(e,t),u=t.indexOf(c);return{displaced:an({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 cn(e,t){return Boolean(t.effected[e])}const dn=(e,t)=>t.margin[e.start]+t.borderBox[e.size]/2,un=(e,t,n)=>t[e.crossAxisStart]+n.margin[e.crossAxisStart]+n.borderBox[e.crossAxisSize]/2,pn=({axis:e,moveRelativeTo:t,isMoving:n})=>Rt(e.line,t.marginBox[e.end]+dn(e,n),un(e,t.marginBox,n)),gn=({axis:e,moveRelativeTo:t,isMoving:n})=>Rt(e.line,t.marginBox[e.start]-((e,t)=>t.margin[e.end]+t.borderBox[e.size]/2)(e,n),un(e,t.marginBox,n));var mn=(e,t)=>{const n=e.frame;return n?St(t,n.scroll.diff.displacement):t},fn=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=Ht(r.descriptor.id,n),a=t.page,s=r.axis;if(!i.length)return(({axis:e,moveInto:t,isMoving:n})=>Rt(e.line,t.contentBox[e.start]+dn(e,n),un(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(cn(d,o))return gn({axis:s,moveRelativeTo:e.page,isMoving:a});const t=ze(e.page,c.point);return gn({axis:s,moveRelativeTo:t,isMoving:a})}const u=i[i.length-1];if(u.descriptor.id===t.descriptor.id)return a.borderBox.center;if(cn(u.descriptor.id,o)){const e=ze(u.page,Ot(o.displacedBy.point));return pn({axis:s,moveRelativeTo:e,isMoving:a})}return pn({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=Vt(t);r||ut();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 cn(n,t)?o?Ct:Ot(r.point):o?r.point:Ct})({displaced:t.displaced,afterCritical:e,combineWith:o,displacedBy:t.displacedBy});return St(i,a)})({impact:e,draggables:r,afterCritical:o}):i})(e),n=e.droppable;return n?mn(n,t):t},bn=(e,t)=>{const n=At(t,e.scroll.initial),r=Ot(n);return{frame:We({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 hn(e,t){return e.map(e=>t[e])}var vn=({pageBorderBoxCenter:e,draggable:t,viewport:n})=>{const r=((e,t)=>St(e.scroll.diff.displacement,t))(n,e),o=At(r,t.page.borderBox.center);return St(t.client.borderBox.center,o)},yn=({draggable:e,destination:t,newPageBorderBoxCenter:n,viewport:r,withDroppableDisplacement:o,onlyOnMainAxis:i=!1})=>{const a=At(n,e.page.borderBox.center),s={target:Tt(e.page.borderBox,a),destination:t,withDroppableDisplacement:o,viewport:r};return i?(e=>{return rn({...e,isVisibleThroughFrameFn:(t=e.destination.axis,e=>{const n=Kt(e.top,e.bottom),r=Kt(e.left,e.right);return e=>t===tn?n(e.top)&&n(e.bottom):r(e.left)&&r(e.right)})});var t})(s):on(s)},xn=({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=Ht(n.descriptor.id,r),d=Yt(t,n),u=(({isMovingForward:e,draggable:t,destination:n,insideDestination:r,previousImpact:o})=>{if(!n.isCombineEnabled)return null;if(!qt(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=zt(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&&ut();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||ut(),"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:ln({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 cn(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:ln({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=fn({impact:u,draggable:t,droppable:n,draggables:r,afterCritical:l});if(yn({draggable:t,destination:n,newPageBorderBoxCenter:p,viewport:i.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0}))return{clientSelection:vn({pageBorderBoxCenter:p,draggable:t,viewport:i}),impact:u,scrollJumpRequest:null};const g=At(p,a),m=(({impact:e,viewport:t,destination:n,draggables:r,maxScrollChange:o})=>{const i=bn(t,St(t.scroll.current,o)),a=n.frame?Ft(n,St(n.frame.scroll.current,o)):n,s=e.displaced,l=an({afterDragging:hn(s.all,r),destination:n,displacedBy:e.displacedBy,viewport:i.frame,last:s,forceShouldAnimate:!1}),c=an({afterDragging:hn(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:m,scrollJumpRequest:g}};const In=e=>{const t=e.subject.active;return t||ut(),t},En=(e,t)=>{const n=e.page.borderBox.center;return cn(e.descriptor.id,t)?At(n,t.displacedBy.point):n},Dn=(e,t)=>{const n=e.page.borderBox;return cn(e.descriptor.id,t)?Tt(n,Ot(t.displacedBy.point)):n};var wn=kt(function(e,t){const n=t[e.line];return{value:n,point:Rt(e.line,n)}});const Cn=(e,t)=>({...e,scroll:{...e.scroll,max:t}}),Sn=(e,t,n)=>{const r=e.frame;Yt(t,e)&&ut(),e.subject.withPlaceholder&&ut();const o=wn(e.axis,t.displaceBy).point,i=((e,t,n)=>{const r=e.axis;if("virtual"===e.descriptor.mode)return Rt(r.line,t[r.line]);const o=e.subject.page.contentBox[r.size],i=Ht(e.descriptor.id,n).reduce((e,t)=>e+t.client.marginBox[r.size],0)+t[r.line]-o;return i<=0?null:Rt(r.line,i)})(e,o,n),a={placeholderSize:o,increasedBy:i,oldFrameMaxScroll:e.frame?e.frame.scroll.max:null};if(!r){const t=Gt({page:e.subject.page,withPlaceholder:a,axis:e.axis,frame:e.frame});return{...e,subject:t}}const s=i?St(r.scroll.max,i):r.scroll.max,l=Cn(r,s),c=Gt({page:e.subject.page,withPlaceholder:a,axis:e.axis,frame:l});return{...e,subject:c,frame:l}};var An=e=>{const t=e.at;return t?"REORDER"===t.type?t.destination.droppableId:t.combine.droppableId:null},Pn=({state:e,type:t})=>{const n=((e,t)=>{const n=An(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?xn({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=Kt(i[a.start],i[a.end]),l=$t(r).filter(e=>e!==n).filter(e=>e.isEnabled).filter(e=>Boolean(e.subject.active)).filter(e=>Qt(o.frame)(In(e))).filter(t=>{const n=In(t);return e?i[a.crossAxisEnd]<n[a.crossAxisEnd]:n[a.crossAxisStart]<i[a.crossAxisStart]}).filter(e=>{const t=In(e),n=Kt(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=In(t)[a.crossAxisStart],o=In(n)[a.crossAxisStart];return e?r-o:o-r}).filter((e,t,n)=>In(e)[a.crossAxisStart]===In(n[0])[a.crossAxisStart]);if(!l.length)return null;if(1===l.length)return l[0];const c=l.filter(e=>Kt(In(e)[a.start],In(e)[a.end])(t[a.line]));return 1===c.length?c[0]:c.length>1?c.sort((e,t)=>In(e)[a.start]-In(t)[a.start])[0]:l.sort((e,n)=>{const r=Nt(t,Mt(In(e))),o=Nt(t,Mt(In(n)));return r!==o?r-o:In(e)[a.start]-In(n)[a.start]})[0]})({isMovingForward:e,pageBorderBoxCenter:t,source:r,droppables:i,viewport:a});if(!l)return null;const c=Ht(l.descriptor.id,o),d=(({pageBorderBoxCenter:e,viewport:t,destination:n,insideDestination:r,afterCritical:o})=>{const i=r.filter(e=>on({target:Dn(e,o),destination:n,viewport:t.frame,withDroppableDisplacement:!0})).sort((t,r)=>{const i=_t(e,mn(n,En(t,o))),a=_t(e,mn(n,En(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:Jt,displacedBy:Zt,at:{type:"REORDER",destination:{droppableId:i.descriptor.id,index:0}}},t=fn({impact:e,draggable:r,droppable:i,draggables:o,afterCritical:s}),l=Yt(r,i)?i:Sn(i,r,o);return yn({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=wn(i.axis,r.displaceBy);return ln({draggable:r,insideDestination:n,destination:i,viewport:a,displacedBy:d,last:Jt,index:c})})({previousPageBorderBoxCenter:t,destination:l,draggable:n,draggables:o,moveRelativeTo:d,insideDestination:c,viewport:a,afterCritical:s});if(!u)return null;const p=fn({impact:u,draggable:n,droppable:l,draggables:o,afterCritical:s});return{clientSelection:vn({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 On(e){return"DRAGGING"===e.phase||"COLLECTING"===e.phase}function Rn(e){const t=Kt(e.top,e.bottom),n=Kt(e.left,e.right);return function(e){return t(e.y)&&n(e.x)}}const _n=(e,t)=>We(Tt(e,t));function Nn({displaced:e,id:t}){return Boolean(e.visible[t]||e.invisible[t])}var Bn=({pageOffset:e,draggable:t,draggables:n,droppables:r,previousImpact:o,viewport:i,afterCritical:a})=>{const s=_n(t.page.borderBox,e),l=function({pageBorderBox:e,draggable:t,droppables:n}){const r=$t(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(Rn(n)(e.center))return!0;const i=t.axis,a=n.center[i.crossAxisLine],s=e[i.crossAxisStart],l=e[i.crossAxisEnd],c=Kt(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=Rt(t.axis.line,e.center[n.line],t.page.borderBox.center[n.crossAxisLine]);return{id:t.descriptor.id,distance:_t(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 Xt;const c=r[l],d=Ht(c.descriptor.id,n),u=((e,t)=>{const n=e.frame;return n?_n(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=wn(r.axis,e.displaceBy),l=s.value,c=t[a.start],d=t[a.end],u=zt(e,o).find(e=>{const t=e.descriptor.id,r=e.page.borderBox,o=r[a.size]/4,s=cn(t,i),u=Nn({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=wn(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:zt(t,r).find(e=>{const t=e.descriptor.id,n=e.page.borderBox.center[s.line],r=cn(t,a),i=Nn({displaced:o,id:t});return r?i?u<=n:d<n-c:i?u<=n+c:d<n})||null,inHomeList:Yt(t,n)});return ln({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})},Tn=(e,t)=>({...e,[t.descriptor.id]:t});var Mn=({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=At(l,e.initial.client.selection),d={offset:c,selection:l,borderBoxCenter:St(e.initial.client.borderBoxCenter,c)},u={selection:St(d.selection,a.scroll.current),borderBoxCenter:St(d.borderBoxCenter,a.scroll.current),offset:St(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],m=o||Bn({pageOffset:u.offset,draggable:g,draggables:s.draggables,droppables:s.droppables,previousImpact:e.impact,viewport:a,afterCritical:e.afterCritical}),f=(({draggable:e,draggables:t,droppables:n,previousImpact:r,impact:o})=>{const i=(({previousImpact:e,impact:t,droppables:n})=>{const r=An(e),o=An(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||ut();const n=e.frame;if(!n){const t=Gt({page:e.subject.page,axis:e.axis,frame:null,withPlaceholder:null});return{...e,subject:t}}const r=t.oldFrameMaxScroll;r||ut();const o=Cn(n,r),i=Gt({page:e.subject.page,axis:e.axis,frame:o,withPlaceholder:null});return{...e,subject:i,frame:o}})(i);return Tn(n,a)})({previousImpact:r,impact:o,droppables:n}),a=An(o);if(!a)return i;const s=n[a];if(Yt(e,s))return i;if(s.subject.withPlaceholder)return i;const l=Sn(s,e,t);return Tn(i,l)})({draggable:g,impact:m,previousImpact:e.impact,draggables:s.draggables,droppables:s.droppables});return{...e,current:p,dimensions:{draggables:s.draggables,droppables:f},impact:m,viewport:a,scrollJumpRequest:i||null,forceShouldAnimate:!i&&null}},Ln=({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=an({afterDragging:a,destination:r,displacedBy:e.displacedBy,viewport:t.frame,forceShouldAnimate:o,last:i});return{...e,displaced:s}},Gn=({impact:e,draggable:t,droppable:n,draggables:r,viewport:o,afterCritical:i})=>{const a=fn({impact:e,draggable:t,draggables:r,droppable:n,afterCritical:i});return vn({pageBorderBoxCenter:a,draggable:t,viewport:o})},Fn=({state:e,dimensions:t,viewport:n})=>{"SNAP"!==e.movementMode&&ut();const r=e.impact,o=n||e.viewport,i=t||e.dimensions,{draggables:a,droppables:s}=i,l=a[e.critical.draggable.id],c=An(r);c||ut();const d=s[c],u=Ln({impact:r,viewport:o,destination:d,draggables:a}),p=Gn({impact:u,draggable:l,droppable:d,draggables:a,viewport:o,afterCritical:e.afterCritical});return Mn({impact:u,clientSelection:p,state:e,dimensions:i,viewport:o})},kn=({draggable:e,home:t,draggables:n,viewport:r})=>{const o=wn(t.axis,e.displaceBy),i=Ht(t.descriptor.id,n),a=i.indexOf(e);-1===a&&ut();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:an({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 jn=e=>"SNAP"===e.movementMode,Wn=(e,t,n)=>{const r=((e,t)=>({draggables:e.draggables,droppables:Tn(e.droppables,t)}))(e.dimensions,t);return!jn(e)||n?Mn({state:e,dimensions:r}):Fn({state:e,dimensions:r})};function $n(e){return e.isDragging&&"SNAP"===e.movementMode?{...e,scrollJumpRequest:null}:e}const Un={phase:"IDLE",completed:null,shouldFlush:!1};var Hn=(e=Un,t)=>{if("FLUSH"===t.type)return{...Un,shouldFlush:!0};if("INITIAL_PUBLISH"===t.type){"IDLE"!==e.phase&&ut();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:Ct},d={client:c,page:{selection:St(c.selection,o.scroll.initial),borderBoxCenter:St(c.selection,o.scroll.initial),offset:St(c.selection,o.scroll.diff.value)}},u=$t(i.droppables).every(e=>!e.isFixedOnPage),{impact:p,afterCritical:g}=kn({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&&ut(),{...e,phase:"COLLECTING"});if("PUBLISH_WHILE_DRAGGING"===t.type)return"COLLECTING"!==e.phase&&"DROP_PENDING"!==e.phase&&ut(),(({state:e,published:t})=>{const n=t.modified.map(t=>{const n=e.dimensions.droppables[t.droppableId];return Ft(n,t.scroll)}),r={...e.dimensions.droppables,...jt(n)},o=Wt((({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||ut(),t})(t[o]),a=i.scroll.diff.value,s=(({draggable:e,offset:t,initialWindowScroll:n})=>{const r=ze(e.client,t),o=Ye(r,n);return{...e,placeholder:{...e.placeholder,client:r},client:r,page:o}})({draggable:e,offset:St(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=An(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}=kn({draggable:c,home:d,draggables:i,viewport:e.viewport}),g=l&&l.isCombineEnabled?e.impact:u,m=Bn({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}),f={...e,phase:"DRAGGING",impact:m,onLiftImpact:u,dimensions:a,afterCritical:p,forceShouldAnimate:!1};return"COLLECTING"===e.phase?f:{...f,phase:"DROP_PENDING",reason:e.reason,isWaiting:!1}})({state:e,published:t.payload});if("MOVE"===t.type){if("DROP_PENDING"===e.phase)return e;On(e)||ut();const{client:n}=t.payload;return Pt(n,e.current.client.selection)?e:Mn({state:e,clientSelection:n,impact:jn(e)?e.impact:null})}if("UPDATE_DROPPABLE_SCROLL"===t.type){if("DROP_PENDING"===e.phase)return $n(e);if("COLLECTING"===e.phase)return $n(e);On(e)||ut();const{id:n,newScroll:r}=t.payload,o=e.dimensions.droppables[n];if(!o)return e;const i=Ft(o,r);return Wn(e,i,!1)}if("UPDATE_DROPPABLE_IS_ENABLED"===t.type){if("DROP_PENDING"===e.phase)return e;On(e)||ut();const{id:n,isEnabled:r}=t.payload,o=e.dimensions.droppables[n];o||ut(),o.isEnabled===r&&ut();const i={...o,isEnabled:r};return Wn(e,i,!0)}if("UPDATE_DROPPABLE_IS_COMBINE_ENABLED"===t.type){if("DROP_PENDING"===e.phase)return e;On(e)||ut();const{id:n,isCombineEnabled:r}=t.payload,o=e.dimensions.droppables[n];o||ut(),o.isCombineEnabled===r&&ut();const i={...o,isCombineEnabled:r};return Wn(e,i,!0)}if("MOVE_BY_WINDOW_SCROLL"===t.type){if("DROP_PENDING"===e.phase||"DROP_ANIMATING"===e.phase)return e;On(e)||ut(),e.isWindowScrollAllowed||ut();const n=t.payload.newScroll;if(Pt(e.viewport.scroll.current,n))return $n(e);const r=bn(e.viewport,n);return jn(e)?Fn({state:e,viewport:r}):Mn({state:e,viewport:r})}if("UPDATE_VIEWPORT_MAX_SCROLL"===t.type){if(!On(e))return e;const n=t.payload.maxScroll;if(Pt(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&&ut();const n=Pn({state:e,type:t.type});return n?Mn({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&&ut(),{...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&&ut(),{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 qn(e,t){return e instanceof Object&&"type"in e&&e.type===t}const Vn=e=>({type:"PUBLISH_WHILE_DRAGGING",payload:e}),zn=()=>({type:"COLLECTION_STARTING",payload:null}),Yn=e=>({type:"UPDATE_DROPPABLE_SCROLL",payload:e}),Zn=e=>({type:"UPDATE_DROPPABLE_IS_ENABLED",payload:e}),Jn=e=>({type:"UPDATE_DROPPABLE_IS_COMBINE_ENABLED",payload:e}),Xn=e=>({type:"MOVE",payload:e}),Kn=()=>({type:"MOVE_UP",payload:null}),Qn=()=>({type:"MOVE_DOWN",payload:null}),er=()=>({type:"MOVE_RIGHT",payload:null}),tr=()=>({type:"MOVE_LEFT",payload:null}),nr=e=>({type:"DROP_COMPLETE",payload:e}),rr=e=>({type:"DROP",payload:e}),or="cubic-bezier(.2,1,.1,1)",ir=0,ar=.7,sr=.75,lr={outOfTheWay:.2,minDropTime:.33,maxDropTime:.55},cr=`${lr.outOfTheWay}s cubic-bezier(0.2, 0, 0, 1)`,dr={fluid:`opacity ${cr}`,snap:`transform ${cr}, opacity ${cr}`,drop:e=>{const t=`${e}s ${or}`;return`transform ${t}, opacity ${t}`},outOfTheWay:`transform ${cr}`,placeholder:`height ${cr}, width ${cr}, margin ${cr}`},ur=e=>Pt(e,Ct)?void 0:`translate(${e.x}px, ${e.y}px)`,pr=ur,{minDropTime:gr,maxDropTime:mr}=lr,fr=mr-gr,br=({getState:e,dispatch:t})=>n=>r=>{if(!qn(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&&ut(),"DRAGGING"!==o.phase&&"DROP_PENDING"!==o.phase&&ut();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:Jt},didDropInsideDroppable:!0}:{impact:Ln({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?qt(c):null,p=d?Vt(c):null,g={index:a.draggable.index,droppableId:a.droppable.id},m={draggableId:l.descriptor.id,type:l.descriptor.type,source:g,reason:i,mode:o.movementMode,destination:u,combine:p},f=(({impact:e,draggable:t,dimensions:n,viewport:r,afterCritical:o})=>{const{draggables:i,droppables:a}=n,s=An(e),l=s?a[s]:null,c=a[t.descriptor.droppableId],d=Gn({impact:e,draggable:t,draggables:i,afterCritical:o,droppable:l||c,viewport:r});return At(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:m,impact:c};if(Pt(o.current.client.offset,f)&&!Boolean(m.combine))return void t(nr({completed:b}));const h=(({current:e,destination:t,reason:n})=>{const r=_t(e,t);if(r<=0)return gr;if(r>=1500)return mr;const o=gr+fr*(r/1500);return Number(("CANCEL"===n?.6*o:o).toFixed(2))})({current:o.current.client.offset,destination:f,reason:i});t((e=>({type:"DROP_ANIMATE",payload:e}))({newHomeClientOffset:f,dropDuration:h,completed:b}))};var hr=()=>({x:window.pageXOffset,y:window.pageYOffset});const vr=e=>{const t=function({onWindowScroll:e}){const t=Xe(function(){e(hr())}),n=function(e){return{eventName:"scroll",options:{passive:!0,capture:!1},fn:t=>{t.target!==window&&t.target!==window.document||e()}}}(t);let r=lt;function o(){return r!==lt}return{start:function(){o()&&ut(),r=ct(window,[n])},stop:function(){o()||ut(),t.cancel(),r(),r=lt},isActive:o}}({onWindowScroll:t=>{e.dispatch({type:"MOVE_BY_WINDOW_SCROLL",payload:{newScroll:t}})}});return e=>n=>{!t.isActive()&&qn(n,"INITIAL_PUBLISH")&&t.start(),t.isActive()&&(e=>qn(e,"DROP_COMPLETE")||qn(e,"DROP_ANIMATE")||qn(e,"FLUSH"))(n)&&t.stop(),e(n)}};const yr=(e,t)=>{t()},xr=(e,t)=>({draggableId:e.draggable.id,type:e.droppable.type,source:{droppableId:e.droppable.id,index:e.draggable.index},mode:t});function Ir(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 Er=(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&&ut();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||ut(),r=null,yr(0,()=>Ir(e().onDragEnd,n,t,xt))};return{beforeCapture:(t,n)=>{r&&ut(),yr(0,()=>{const r=e().onBeforeCapture;r&&r({draggableId:t,mode:n})})},beforeStart:(t,n)=>{r&&ut(),yr(0,()=>{const r=e().onBeforeDragStart;r&&r(xr(t,n))})},start:(o,i)=>{r&&ut();const a=xr(o,i);r={mode:i,lastCritical:o,lastLocation:a.source,lastCombine:null},n.add(()=>{yr(0,()=>Ir(e().onDragStart,a,t,vt))})},update:(o,i)=>{const a=qt(i),s=Vt(i);r||ut();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={...xr(o,r.mode),combine:s,destination:a};n.add(()=>{yr(0,()=>Ir(e().onDragUpdate,g,t,yt))})},flush:()=>{r||ut(),n.flush()},drop:o,abort:()=>{if(!r)return;const e={...xr(r.lastCritical,r.mode),combine:null,destination:null,reason:"CANCEL"};o(e)}}})(e,t);return e=>t=>r=>{if(qn(r,"BEFORE_INITIAL_CAPTURE"))return void n.beforeCapture(r.payload.draggableId,r.payload.movementMode);if(qn(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(qn(r,"DROP_COMPLETE")){const e=r.payload.completed.result;return n.flush(),t(r),void n.drop(e)}if(t(r),qn(r,"FLUSH"))return void n.abort();const o=e.getState();"DRAGGING"===o.phase&&n.update(o.critical,o.impact)}};const Dr=e=>t=>n=>{if(!qn(n,"DROP_ANIMATION_FINISHED"))return void t(n);const r=e.getState();"DROP_ANIMATING"!==r.phase&&ut(),e.dispatch(nr({completed:r.completed}))},wr=e=>{let t=null,n=null;return r=>o=>{if((qn(o,"FLUSH")||qn(o,"DROP_COMPLETE")||qn(o,"DROP_ANIMATION_FINISHED"))&&(n&&(cancelAnimationFrame(n),n=null),t&&(t(),t=null)),r(o),!qn(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=ct(window,[i])})}};const Cr=e=>t=>n=>{if(t(n),!qn(n,"PUBLISH_WHILE_DRAGGING"))return;const r=e.getState();"DROP_PENDING"===r.phase&&(r.isWaiting||e.dispatch(rr({reason:r.reason})))},Sr=N;var Ar=({dimensionMarshal:e,focusMarshal:t,styleMarshal:n,getResponders:r,announce:o,autoScroller:i})=>{return O(Hn,Sr(function(...e){return t=>(n,r)=>{const o=t(n,r);let i=()=>{throw new Error(C(15))};const a={getState:o.getState,dispatch:(e,...t)=>i(e,...t)},s=e.map(e=>e(a));return i=N(...s)(o.dispatch),{...o,dispatch:i}}}((a=n,()=>e=>t=>{qn(t,"INITIAL_PUBLISH")&&a.dragging(),qn(t,"DROP_ANIMATE")&&a.dropping(t.payload.completed.result.reason),(qn(t,"FLUSH")||qn(t,"DROP_COMPLETE"))&&a.resting(),e(t)}),(e=>()=>t=>n=>{(qn(n,"DROP_COMPLETE")||qn(n,"FLUSH")||qn(n,"DROP_ANIMATE"))&&e.stopPublishing(),t(n)})(e),(e=>({getState:t,dispatch:n})=>r=>o=>{if(!qn(o,"LIFT"))return void r(o);const{id:i,clientSelection:a,movementMode:s}=o.payload,l=t();"DROP_ANIMATING"===l.phase&&n(nr({completed:l.completed})),"IDLE"!==t().phase&&ut(),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),br,Dr,wr,Cr,(e=>t=>n=>r=>{if((e=>qn(e,"DROP_COMPLETE")||qn(e,"DROP_ANIMATE")||qn(e,"FLUSH"))(r))return e.stop(),void n(r);if(qn(r,"INITIAL_PUBLISH")){n(r);const o=t.getState();return"DRAGGING"!==o.phase&&ut(),void e.start(o)}n(r),e.scroll(t.getState())})(i),vr,(e=>{let t=!1;return()=>n=>r=>{if(qn(r,"INITIAL_PUBLISH"))return t=!0,e.tryRecordFocus(r.payload.critical.draggable.id),n(r),void e.tryRestoreFocusRecorded();if(n(r),t){if(qn(r,"FLUSH"))return t=!1,void e.tryRestoreFocusRecorded();if(qn(r,"DROP_COMPLETE")){t=!1;const n=r.payload.completed.result;n.combine&&e.tryShiftRecord(n.draggableId,n.combine.draggableId),e.tryRestoreFocusRecorded()}}}})(t),Er(r,o))));var a},Pr=({scrollHeight:e,scrollWidth:t,height:n,width:r})=>{const o=At({x:t,y:e},{x:r,y:n});return{x:Math.max(0,o.x),y:Math.max(0,o.y)}},Or=()=>{const e=document.documentElement;return e||ut(),e},Rr=()=>{const e=Or();return Pr({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,width:e.clientWidth,height:e.clientHeight})};function _r(e,t,n){return n.descriptor.id!==t.id&&(n.descriptor.type===t.type&&"virtual"===e.droppable.getById(n.descriptor.droppableId).descriptor.mode)}var Nr=(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(Ct)).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||ut();const o=n.critical.draggable;"ADDITION"===t.type&&_r(e,o,t.value)&&r.add(t.value),"REMOVAL"===t.type&&_r(e,o,t.value)&&r.remove(t.value)},i={updateDroppableIsEnabled:(r,o)=>{e.droppable.exists(r)||ut(),n&&t.updateDroppableIsEnabled({id:r,isEnabled:o})},updateDroppableIsCombineEnabled:(r,o)=>{n&&(e.droppable.exists(r)||ut(),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)||ut(),t.updateDroppableScroll({id:r,newScroll:o}))},startPublishing:t=>{n&&ut();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=hr(),t=Rr(),n=e.y,r=e.x,o=Or(),i=o.clientWidth,a=o.clientHeight;return{frame:We({top:n,left:r,right:r+i,bottom:n+a}),scroll:{initial:e,current:e,max:t,diff:{value:Ct,displacement:Ct}}}})(),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:Wt(s),droppables:jt(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},Br=(e,t)=>"IDLE"===e.phase||"DROP_ANIMATING"===e.phase&&e.completed.result.draggableId!==t&&"DROP"===e.completed.result.reason,Tr=e=>{window.scrollBy(e.x,e.y)};const Mr=kt(e=>$t(e).filter(e=>!!e.isEnabled&&!!e.frame));const Lr={startFromPercentage:.25,maxScrollAtPercentage:.05,maxPixelScroll:28,ease:e=>e**2,durationDampening:{stopDampeningAt:1200,accelerateAt:360},disabled:!1};var Gr=({startOfRange:e,endOfRange:t,current:n})=>{const r=t-e;return 0===r?0:(n-e)/r},Fr=({distanceToEdge:e,thresholds:t,dragStartTime:n,shouldUseTimeDampening:r,getAutoScrollerOptions:o})=>{const i=((e,t,n=()=>Lr)=>{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-Gr({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=Gr({startOfRange:o,endOfRange:s,current:l}),d=e*r.ease(c);return Math.ceil(d)})(i,n,o),1):i},kr=({container:e,distanceToEdges:t,dragStartTime:n,axis:r,shouldUseTimeDampening:o,getAutoScrollerOptions:i})=>{const a=((e,t,n=()=>Lr)=>{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]?Fr({distanceToEdge:t[r.end],thresholds:a,dragStartTime:n,shouldUseTimeDampening:o,getAutoScrollerOptions:i}):-1*Fr({distanceToEdge:t[r.start],thresholds:a,dragStartTime:n,shouldUseTimeDampening:o,getAutoScrollerOptions:i})};const jr=Bt(e=>0===e?0:e);var Wr=({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=kr({container:t,distanceToEdges:a,dragStartTime:e,axis:tn,shouldUseTimeDampening:o,getAutoScrollerOptions:i}),l=kr({container:t,distanceToEdges:a,dragStartTime:e,axis:nn,shouldUseTimeDampening:o,getAutoScrollerOptions:i}),c=jr({x:l,y:s});if(Pt(c,Ct))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?Pt(d,Ct)?null:d:null};const $r=Bt(e=>0===e?0:e>0?1:-1),Ur=(()=>{const e=(e,t)=>e<0?e:e>t?e-t:0;return({current:t,max:n,change:r})=>{const o=St(t,r),i={x:e(o.x,n.x),y:e(o.y,n.y)};return Pt(i,Ct)?null:i}})(),Hr=({max:e,current:t,change:n})=>{const r={x:Math.max(t.x,e.x),y:Math.max(t.y,e.y)},o=$r(n),i=Ur({max:r,current:t,change:o});return!i||0!==o.x&&0===i.x||0!==o.y&&0===i.y},qr=(e,t)=>Hr({current:e.scroll.current,max:e.scroll.max,change:t}),Vr=(e,t)=>{const n=e.frame;return!!n&&Hr({current:n.scroll.current,max:n.scroll.max,change:t})};var zr=({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=Wr({dragStartTime:r,container:e.frame,subject:t,center:n,shouldUseTimeDampening:o,getAutoScrollerOptions:i});return a&&qr(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)=>Mr(t).find(t=>(t.frame||ut(),Rn(t.frame.pageMarginBox)(e)))||null)(e,n);return r})({center:a,destination:An(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=Wr({dragStartTime:r,container:a.pageMarginBox,subject:t,center:n,shouldUseTimeDampening:o,getAutoScrollerOptions:i});return s&&Vr(e,s)?s:null})({dragStartTime:t,droppable:l,subject:s,center:a,shouldUseTimeDampening:n,getAutoScrollerOptions:i});c&&o(l.descriptor.id,c)};const Yr="data-rfd",Zr=(()=>{const e=`${Yr}-drag-handle`;return{base:e,draggableId:`${e}-draggable-id`,contextId:`${e}-context-id`}})(),Jr=(()=>{const e=`${Yr}-draggable`;return{base:e,contextId:`${e}-context-id`,id:`${e}-id`}})(),Xr=(()=>{const e=`${Yr}-droppable`;return{base:e,contextId:`${e}-context-id`,id:`${e}-id`}})(),Kr={contextId:`${Yr}-scroll-container-context-id`},Qr=(e,t)=>e.map(e=>{const n=e.styles[t];return n?`${e.selector} { ${n} }`:""}).join(" "),eo="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?rt:nt,to=()=>{const e=document.querySelector("head");return e||ut(),e},no=e=>{const t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.type="text/css",t};function ro(e,t){return Array.from(e.querySelectorAll(t))}var oo=e=>e&&e.ownerDocument&&e.ownerDocument.defaultView?e.ownerDocument.defaultView:window;function io(e){return e instanceof oo(e).HTMLElement}function ao(){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||ut(),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||ut(),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 so=Qe.createContext(null),lo=()=>{const e=document.body;return e||ut(),e};const co={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"},uo={separator:"::"};function po(e,t=uo){const n=Qe.useId();return Dt(()=>`${e}${t.separator}${n}`,[t.separator,e,n])}var go=Qe.createContext(null);function mo(e){const t=tt(e);return nt(()=>{t.current=e}),t}function fo(e){return"IDLE"!==e.phase&&"DROP_ANIMATING"!==e.phase&&e.isDragging}const bo=9,ho=13,vo=33,yo=34,xo=35,Io=36,Eo={[ho]:!0,[bo]:!0};var Do=e=>{Eo[e.keyCode]&&e.preventDefault()};const wo=(()=>{const e="visibilitychange";return"undefined"==typeof document?e:[e,`ms${e}`,`webkit${e}`,`moz${e}`,`o${e}`].find(e=>`on${e}`in document)||e})(),Co={type:"IDLE"};function So(){}const Ao={[yo]:!0,[vo]:!0,[Io]:!0,[xo]:!0};const Po={type:"IDLE"},Oo=["input","button","textarea","select","option","optgroup","video","audio"];function Ro(e,t){if(null==t)return!1;if(Oo.includes(t.tagName.toLowerCase()))return!0;const n=t.getAttribute("contenteditable");return"true"===n||""===n||t!==e&&Ro(e,t.parentElement)}function _o(e,t){const n=t.target;return!!io(n)&&Ro(e,n)}var No=e=>We(e.getBoundingClientRect()).center;const Bo=(()=>{const e="matches";return"undefined"==typeof document?e:[e,"msMatchesSelector","webkitMatchesSelector"].find(e=>e in Element.prototype)||e})();function To(e,t){return null==e?null:e[Bo](t)?e:To(e.parentElement,t)}function Mo(e,t){return e.closest?e.closest(t):To(e,t)}function Lo(e){e.preventDefault()}function Go({expected:e,phase:t,isLockActive:n,shouldWarn:r}){return!!n()&&e===t}function Fo({lockAPI:e,store:t,registry:n,draggableId:r}){if(e.isClaimed())return!1;const o=n.draggable.findById(r);return!!o&&!!o.options.isEnabled&&!!Br(t.getState(),r)}const ko=[function(e){const t=tt(Co),n=tt(lt),r=Dt(()=>({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=Dt(()=>({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=wt(function(){n.current=ct(window,[o,r],{passive:!1,capture:!0})},[o,r]),a=wt(()=>{"IDLE"!==t.current.type&&(t.current=Co,n.current(),i())},[i]),s=wt(()=>{const e=t.current;a(),"DRAGGING"===e.type&&e.actions.cancel({shouldBlockNextClick:!0}),"PENDING"===e.type&&e.actions.abort()},[a]),l=wt(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&&ut(),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 Do(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&&ut(),r.actions.shouldRespectForcePress()?e():t.preventDefault()}},{eventName:wo,fn:e}]}({cancel:s,completed:a,getPhase:()=>t.current,setPhase:e=>{t.current=e}});n.current=ct(window,e,{capture:!0,passive:!1})},[s,a]),c=wt(function(e,n){"IDLE"!==t.current.type&&ut(),t.current={type:"PENDING",point:n,actions:e},l()},[l]);eo(function(){return i(),function(){n.current()}},[i])},function(e){const t=tt(So),n=Dt(()=>({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||ut(),a=!1,t.current(),r()}t.current(),t.current=ct(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(Ao[r.keyCode]?r.preventDefault():Do(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:wo,fn:n}]}(s,l),{capture:!0,passive:!1})}}),[e]),r=wt(function(){t.current=ct(window,[n],{passive:!1,capture:!0})},[n]);eo(function(){return r(),function(){t.current()}},[r])},function(e){const t=tt(Po),n=tt(lt),r=wt(function(){return t.current},[]),o=wt(function(e){t.current=e},[]),i=Dt(()=>({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=wt(function(){n.current=ct(window,[i],{capture:!0,passive:!1})},[i]),s=wt(()=>{const e=t.current;"IDLE"!==e.type&&("PENDING"===e.type&&clearTimeout(e.longPressTimerId),o(Po),n.current(),a())},[a,o]),l=wt(()=>{const e=t.current;s(),"DRAGGING"===e.type&&e.actions.cancel({shouldBlockNextClick:!0}),"PENDING"===e.type&&e.actions.abort()},[s]),c=wt(function(){const e={capture:!0,passive:!1},t={cancel:l,completed:s,getPhase:r},o=ct(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&&ut();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:wo,fn:e}]}(t),e),i=ct(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:wo,fn:e}]}(t),e);n.current=function(){o(),i()}},[l,r,s]),d=wt(function(){const e=r();"PENDING"!==e.type&&ut();const t=e.actions.fluidLift(e.point);o({type:"DRAGGING",actions:t,hasMoved:!1})},[r,o]),u=wt(function(e,t){"IDLE"!==r().type&&ut();const n=setTimeout(d,120);o({type:"PENDING",point:t,actions:e,longPressTimerId:n}),c()},[c,r,o,d]);eo(function(){return a(),function(){n.current();const e=r();"PENDING"===e.type&&(clearTimeout(e.longPressTimerId),o(Po))}},[r,a,o]),eo(function(){return ct(window,[{eventName:"touchmove",fn:()=>{},options:{capture:!1,passive:!1}}])},[])}];function jo({contextId:e,store:t,registry:n,customSensors:r,enableDefaultSensors:o}){const i=[...o?ko:[],...r||[]],a=et(()=>function(){let e=null;function t(){e||ut(),e=null}return{isClaimed:function(){return Boolean(e)},isActive:function(t){return t===e},claim:function(t){e&&ut();const n={abandon:t};return e=n,n},release:t,tryAbandon:function(){e&&(e.abandon(),t())}}}())[0],s=wt(function(e,t){fo(e)&&!fo(t)&&a.tryAbandon()},[a]);eo(function(){let e=t.getState();return t.subscribe(()=>{const n=t.getState();s(e,n),e=n})},[a,t,s]),eo(()=>a.tryAbandon,[a.tryAbandon]);const l=wt(e=>Fo({lockAPI:a,registry:n,store:t,draggableId:e}),[a,n,t]),c=wt((r,o,i)=>function({lockAPI:e,contextId:t,store:n,registry:r,draggableId:o,forceSensorStop:i,sourceEvent:a}){if(!Fo({lockAPI:e,store:n,registry:r,draggableId:o}))return null;const s=r.draggable.getById(o),l=function(e,t){const n=`[${Jr.contextId}="${e}"]`,r=ro(document,n).find(e=>e.getAttribute(Jr.id)===t);return r&&io(r)?r:null}(t,s.descriptor.id);if(!l)return null;if(a&&!s.options.canDragInteractiveElements&&_o(l,a))return null;const c=e.claim(i||lt);let d="PRE_DRAG";function u(){return s.options.shouldRespectForcePress}function p(){return e.isActive(c)}const g=function(e,t){Go({expected:e,phase:d,isLockActive:p,shouldWarn:!0})&&n.dispatch(t())}.bind(null,"DRAGGING");function m(t){function r(){e.release(),d="COMPLETED"}function o(e,o={shouldBlockNextClick:!1}){if(t.cleanup(),o.shouldBlockNextClick){const e=ct(window,[{eventName:"click",fn:Lo,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(e)}r(),n.dispatch(rr({reason:e}))}return"PRE_DRAG"!==d&&(r(),ut()),n.dispatch((e=>({type:"LIFT",payload:e}))(t.liftActionArgs)),d="DRAGGING",{isActive:()=>Go({expected:"DRAGGING",phase:d,isLockActive:p,shouldWarn:!1}),shouldRespectForcePress:u,drop:e=>o("DROP",e),cancel:e=>o("CANCEL",e),...t.actions}}return{isActive:()=>Go({expected:"PRE_DRAG",phase:d,isLockActive:p,shouldWarn:!1}),shouldRespectForcePress:u,fluidLift:function(e){const t=Xe(e=>{g(()=>Xn({client:e}))});return{...m({liftActionArgs:{id:o,clientSelection:e,movementMode:"FLUID"},cleanup:()=>t.cancel(),actions:{move:t}}),move:t}},snapLift:function(){const e={moveUp:()=>g(Kn),moveRight:()=>g(er),moveDown:()=>g(Qn),moveLeft:()=>g(tr)};return m({liftActionArgs:{id:o,clientSelection:No(l),movementMode:"SNAP"},cleanup:lt,actions:e})},abort:function(){Go({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=wt(t=>function(e,t){const n=function(e,t){const n=t.target;if(!((r=n)instanceof oo(r).Element))return null;var r;const o=function(e){return`[${Zr.contextId}="${e}"]`}(e),i=Mo(n,o);return i&&io(i)?i:null}(e,t);return n?n.getAttribute(Zr.draggableId):null}(e,t),[e]),u=wt(e=>{const t=n.draggable.findById(e);return t?t.options:null},[n.draggable]),p=wt(function(){a.isClaimed()&&(a.tryAbandon(),"IDLE"!==t.getState().phase&&t.dispatch({type:"FLUSH",payload:null}))},[a,t]),g=wt(()=>a.isClaimed(),[a]),m=Dt(()=>({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](m)}function Wo(e){return e.current||ut(),e.current}function $o(e){const{contextId:t,setCallbacks:n,sensors:r,nonce:o,dragHandleUsageInstructions:i}=e,a=tt(null),s=mo(e),l=wt(()=>(e=>({onBeforeCapture:t=>{at(()=>{e.onBeforeCapture&&e.onBeforeCapture(t)})},onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragEnd:e.onDragEnd,onDragUpdate:e.onDragUpdate}))(s.current),[s]),c=wt(()=>(e=>({...Lr,...e.autoScrollerOptions,durationDampening:{...Lr.durationDampening,...e.autoScrollerOptions}}))(s.current),[s]),d=function(e){const t=Dt(()=>(e=>`rfd-announcement-${e}`)(e),[e]),n=tt(null);return nt(function(){const e=document.createElement("div");return n.current=e,e.id=t,e.setAttribute("aria-live","assertive"),e.setAttribute("aria-atomic","true"),Ke(e.style,co),lo().appendChild(e),function(){setTimeout(function(){const t=lo();t.contains(e)&&t.removeChild(e),e===n.current&&(n.current=null)})}},[t]),wt(e=>{const t=n.current;t&&(t.textContent=e)},[])}(t),u=function({contextId:e,text:t}){const n=po("hidden-text",{separator:"-"}),r=Dt(()=>function({contextId:e,uniqueId:t}){return`rfd-hidden-text-${e}-${t}`}({contextId:e,uniqueId:n}),[n,e]);return nt(function(){const e=document.createElement("div");return e.id=r,e.textContent=t,e.style.display="none",lo().appendChild(e),function(){const t=lo();t.contains(e)&&t.removeChild(e)}},[r,t]),r}({contextId:t,text:i}),p=function(e,t){const n=Dt(()=>(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(Zr.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: ${dr.outOfTheWay};\n `;return{selector:t(Jr.contextId),styles:{dragging:e,dropAnimating:e,userCancel:e}}})(),r,{selector:t(Xr.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:Qr(o,"always"),resting:Qr(o,"resting"),dragging:Qr(o,"dragging"),dropAnimating:Qr(o,"dropAnimating"),userCancel:Qr(o,"userCancel")}})(e),[e]),r=tt(null),o=tt(null),i=wt(kt(e=>{const t=o.current;t||ut(),t.textContent=e}),[]),a=wt(e=>{const t=r.current;t||ut(),t.textContent=e},[]);eo(()=>{(r.current||o.current)&&ut();const s=no(t),l=no(t);return r.current=s,o.current=l,s.setAttribute(`${Yr}-always`,e),l.setAttribute(`${Yr}-dynamic`,e),to().appendChild(s),to().appendChild(l),a(n.always),i(n.resting),()=>{const e=e=>{const t=e.current;t||ut(),to().removeChild(t),e.current=null};e(r),e(o)}},[t,a,i,n.always,n.resting,e]);const s=wt(()=>i(n.dragging),[i,n.dragging]),l=wt(e=>{i("DROP"!==e?n.userCancel:n.dropAnimating)},[i,n.dropAnimating,n.userCancel]),c=wt(()=>{o.current&&i(n.resting)},[i,n.resting]);return Dt(()=>({dragging:s,dropping:l,resting:c}),[s,l,c])}(t,o),g=wt(e=>{Wo(a).dispatch(e)},[]),m=Dt(()=>_({publishWhileDragging:Vn,updateDroppableScroll:Yn,updateDroppableIsEnabled:Zn,updateDroppableIsCombineEnabled:Jn,collectionStarting:zn},g),[g]),f=function(){const e=Dt(ao,[]);return nt(()=>function(){e.clean()},[e]),e}(),b=Dt(()=>Nr(f,m),[f,m]),h=Dt(()=>(({scrollDroppable:e,scrollWindow:t,move:n,getAutoScrollerOptions:r})=>{const o=(({scrollWindow:e,scrollDroppable:t,getAutoScrollerOptions:n=()=>Lr})=>{const r=Xe(e),o=Xe(t);let i=null;const a=e=>{i||ut();const{shouldUseTimeDampening:t,dragStartTime:a}=i;zr({state:e,scrollWindow:r,scrollDroppable:o,dragStartTime:a,shouldUseTimeDampening:t,getAutoScrollerOptions:n})};return{start:e=>{i&&ut();const t=Date.now();let r=!1;const o=()=>{r=!0};zr({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(!Vr(e,n))return n;const r=((e,t)=>{const n=e.frame;return n&&Vr(e,t)?Ur({current:n.scroll.current,max:n.scroll.max,change:t}):null})(e,n);if(!r)return t(e.descriptor.id,n),null;const o=At(n,r);return t(e.descriptor.id,o),At(n,o)},o=(e,t,r)=>{if(!e)return r;if(!qr(t,r))return r;const o=((e,t)=>{if(!qr(e,t))return null;const n=e.scroll.max,r=e.scroll.current;return Ur({current:r,max:n,change:t})})(t,r);if(!o)return n(r),null;const i=At(r,o);return n(i),At(r,i)};return t=>{const n=t.scrollJumpRequest;if(!n)return;const i=An(t.impact);i||ut();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=St(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:Tr,scrollDroppable:b.scrollDroppable,getAutoScrollerOptions:c,..._({move:Xn},g)}),[b.scrollDroppable,g,c]),v=function(e){const t=tt({}),n=tt(null),r=tt(null),o=tt(!1),i=wt(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=wt(function(t){const n=function(e,t){const n=`[${Zr.contextId}="${e}"]`,r=ro(document,n);if(!r.length)return null;const o=r.find(e=>e.getAttribute(Zr.draggableId)===t);return o&&io(o)?o:null}(e,t);n&&n!==document.activeElement&&n.focus()},[e]),s=wt(function(e,t){n.current===e&&(n.current=t)},[]),l=wt(function(){r.current||o.current&&(r.current=requestAnimationFrame(()=>{r.current=null;const e=n.current;e&&a(e)}))},[a]),c=wt(function(e){n.current=null;const t=document.activeElement;t&&t.getAttribute(Zr.draggableId)===e&&(n.current=e)},[]);return eo(()=>(o.current=!0,function(){o.current=!1;const e=r.current;e&&cancelAnimationFrame(e)}),[]),Dt(()=>({register:i,tryRecordFocus:c,tryRestoreFocusRecorded:l,tryShiftRecord:s}),[i,c,l,s])}(t),y=Dt(()=>Ar({announce:d,autoScroller:h,dimensionMarshal:b,focusMarshal:v,getResponders:l,styleMarshal:p}),[d,h,b,v,l,p]);a.current=y;const x=wt(()=>{const e=Wo(a);"IDLE"!==e.getState().phase&&e.dispatch({type:"FLUSH",payload:null})},[]),I=wt(()=>{const e=Wo(a).getState();return"DROP_ANIMATING"===e.phase||"IDLE"!==e.phase&&e.isDragging},[]);n(Dt(()=>({isDragging:I,tryAbort:x}),[I,x]));const E=wt(e=>Br(Wo(a).getState(),e),[]),D=wt(()=>On(Wo(a).getState()),[]),w=Dt(()=>({marshal:b,focus:v,contextId:t,canLift:E,isMovementAllowed:D,dragHandleUsageInstructionsId:u,registry:f}),[t,b,u,v,E,D,f]);return jo({contextId:t,store:y,registry:f,customSensors:r||null,enableDefaultSensors:!1!==e.enableDefaultSensors}),nt(()=>x,[x]),Qe.createElement(go.Provider,{value:w},Qe.createElement(Me,{context:so,store:y},e.children))}function Uo(e){const t=Qe.useId(),n=e.dragHandleUsageInstructions||ht;return Qe.createElement(pt,null,r=>Qe.createElement($o,{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 Ho=(e,t)=>t?dr.drop(t.duration):e?dr.snap:dr.fluid,qo=(e,t)=>{if(e)return t?ir:ar};function Vo(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=ur(e);if(n)return t?`${n} scale(${sr})`:n})(n,i):pr(n);return{position:"fixed",top:t.marginBox.top,left:t.marginBox.left,boxSizing:"border-box",width:t.borderBox.width,height:t.borderBox.height,transition:Ho(a,o),transform:l,opacity:qo(i,s),zIndex:s?4500:5e3,pointerEvents:"none"}}(e):{transform:pr((t=e).offset),transition:t.shouldAnimateDisplacement?void 0:"none"};var t}var zo=Qe.createContext(null);function Yo(e){const t=ot(e);return t||ut(),t}function Zo(e){e.preventDefault()}var Jo=(e,t)=>e===t,Xo=e=>{const{combine:t,destination:n}=e;return n?n.droppableId:t?t.droppableId:null};function Ko(e=null){return{isDragging:!1,isDropAnimating:!1,isClone:!1,dropAnimation:null,mode:null,draggingOver:null,combineTargetFor:e,combineWith:null}}const Qo={mapped:{type:"SECONDARY",offset:Ct,combineTargetFor:null,shouldAnimateDisplacement:!0,snapshot:Ko(null)}},ei=Te(()=>{const e=function(){const e=kt((e,t)=>({x:e,y:t})),t=kt((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=kt((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(fo(r)){if(r.critical.draggable.id!==o.draggableId)return null;const t=r.current.client.offset,a=r.dimensions.draggables[o.draggableId],s=An(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=Xo(a),c=(e=>e.combine?e.combine.draggableId:null)(a),d={duration:r.dropDuration,curve:or,moveTo:r.newHomeClientOffset,opacity:c?ir:null,scale:c?sr: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=kt((e,t)=>({x:e,y:t})),t=kt(Ko),n=kt((e,n=null,r)=>({mapped:{type:"SECONDARY",offset:e,combineTargetFor:n,shouldAnimateDisplacement:r,snapshot:t(n)}})),r=e=>e?n(Ct,e,!0):null,o=(t,o,i,a)=>{const s=i.displaced.visible[t],l=Boolean(a.inVirtualList&&a.effected[t]),c=Vt(i),d=c&&c.draggableId===t?o:null;if(!s){if(!l)return r(d);if(i.displaced.invisible[t])return null;const o=Ot(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(fo(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)||Qo},{dropAnimationFinished:()=>({type:"DROP_ANIMATION_FINISHED",payload:null})},null,{context:so,areStatePropsEqual:Jo})(e=>{const t=tt(null),n=wt((e=null)=>{t.current=e},[]),r=wt(()=>t.current,[]),{contextId:o,dragHandleUsageInstructionsId:i,registry:a}=Yo(go),{type:s,droppableId:l}=Yo(zo),c=Dt(()=>({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:m,isClone:f,mapped:b,dropAnimationFinished:h}=e;f||function(e){const t=po("draggable"),{descriptor:n,registry:r,getDraggableRef:o,canDragInteractiveElements:i,shouldRespectForcePress:a,isEnabled:s}=e,l=Dt(()=>({canDragInteractiveElements:i,shouldRespectForcePress:a,isEnabled:s}),[i,s,a]),c=wt(e=>{const t=o();return t||ut(),function(e,t,n=Ct){const r=window.getComputedStyle(t),o=t.getBoundingClientRect(),i=Ze(o,r),a=Ye(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=Dt(()=>({uniqueId:t,descriptor:n,options:l,getDimension:c}),[n,c,l,t]),u=tt(d),p=tt(!0);eo(()=>(r.draggable.register(u.current),()=>r.draggable.unregister(u.current)),[r.draggable]),eo(()=>{if(p.current)return void(p.current=!1);const e=u.current;u.current=d,r.draggable.update(d,e)},[d,r.draggable])}(Dt(()=>({descriptor:c,registry:a,getDraggableRef:r,canDragInteractiveElements:m,shouldRespectForcePress:g,isEnabled:p}),[c,a,r,m,g,p]));const v=Dt(()=>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:Zo}:null,[o,i,u,p]),y=wt(e=>{"DRAGGING"===b.type&&b.dropping&&"transform"===e.propertyName&&at(h)},[h,b]),x=Dt(()=>{const e=Vo(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=Dt(()=>({draggableId:c.id,type:c.type,source:{index:c.index,droppableId:c.droppableId}}),[c.droppableId,c.id,c.index,c.type]);return Qe.createElement(Qe.Fragment,null,d(x,b.snapshot,I))});function ti(e){return Yo(zo).isUsingCloneFor!==e.draggableId||e.isClone?Qe.createElement(ei,e):null}function ni(e){const t="boolean"!=typeof e.isDragDisabled||!e.isDragDisabled,n=Boolean(e.disableInteractiveElementBlocking),r=Boolean(e.shouldRespectForcePress);return Qe.createElement(ti,Ke({},e,{isClone:!1,isEnabled:t,canDragInteractiveElements:n,shouldRespectForcePress:r}))}const ri=e=>t=>e===t,oi=ri("scroll"),ii=ri("auto"),ai=(e,t)=>t(e.overflowX)||t(e.overflowY),si=e=>null==e||e===document.body||e===document.documentElement?null:(e=>{const t=window.getComputedStyle(e),n={overflowX:t.overflowX,overflowY:t.overflowY};return ai(n,oi)||ai(n,ii)})(e)?e:si(e.parentElement);var li=e=>({x:e.scrollLeft,y:e.scrollTop});const ci=e=>!!e&&("fixed"===window.getComputedStyle(e).position||ci(e.parentElement));const di={passive:!1},ui={passive:!0};var pi=e=>e.shouldPublishImmediately?di:ui;const gi=e=>e&&e.env.closestScrollable||null;function mi(e){const t=tt(null),n=Yo(go),r=po("droppable"),{registry:o,marshal:i}=n,a=mo(e),s=Dt(()=>({id:e.droppableId,type:e.type,mode:e.mode}),[e.droppableId,e.mode,e.type]),l=tt(s),c=Dt(()=>kt((e,n)=>{t.current||ut();const r={x:e,y:n};i.updateDroppableScroll(s.id,r)}),[s.id,i]),d=wt(()=>{const e=t.current;return e&&e.env.closestScrollable?li(e.env.closestScrollable):Ct},[]),u=wt(()=>{const e=d();c(e.x,e.y)},[d,c]),p=Dt(()=>Xe(u),[u]),g=wt(()=>{const e=t.current,n=gi(e);e&&n||ut(),e.scrollOptions.shouldPublishImmediately?u():p()},[p,u]),m=wt((e,r)=>{t.current&&ut();const o=a.current,i=o.getDroppableRef();i||ut();const l={closestScrollable:si(c=i),isFixedOnPage:ci(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=Je(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=$e({top:r,right:a,bottom:i,left:o},n.border);return qe({borderBox:s,margin:n.margin,border:n.border,padding:n.padding})})(e,l),d=Ye(c,r),u=(()=>{if(!l)return null;const e=Je(l),t={scrollHeight:l.scrollHeight,scrollWidth:l.scrollWidth};return{client:e,page:Ye(e,r),scroll:li(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=Pr({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:Ct,displacement:Ct}}}})(),c="vertical"===o?tn:nn;return{descriptor:e,isCombineEnabled:n,isFixedOnPage:r,axis:c,isEnabled:t,client:i,page:a,frame:l,subject:Gt({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(Kr.contextId,n.contextId),p.addEventListener("scroll",g,pi(d.scrollOptions))),u},[n.contextId,s,g,a]),f=wt(()=>{const e=t.current,n=gi(e);return e&&n||ut(),li(n)},[]),b=wt(()=>{const e=t.current;e||ut();const n=gi(e);t.current=null,n&&(p.cancel(),n.removeAttribute(Kr.contextId),n.removeEventListener("scroll",g,pi(e.scrollOptions)))},[g,p]),h=wt(e=>{const n=t.current;n||ut();const r=gi(n);r||ut(),r.scrollTop+=e.y,r.scrollLeft+=e.x},[]),v=Dt(()=>({getDimensionAndWatchScroll:m,getScrollWhileDragging:f,dragStopped:b,scroll:h}),[b,m,f,h]),y=Dt(()=>({uniqueId:r,descriptor:s,callbacks:v}),[v,s,r]);eo(()=>(l.current=y.descriptor,o.droppable.register(y),()=>{t.current&&b(),o.droppable.unregister(y)}),[v,s,b,y,i,o.droppable]),eo(()=>{t.current&&i.updateDroppableIsEnabled(l.current.id,!e.isDropDisabled)},[e.isDropDisabled,i]),eo(()=>{t.current&&i.updateDroppableIsCombineEnabled(l.current.id,e.isCombineEnabled)},[e.isCombineEnabled,i])}function fi(){}const bi={width:0,height:0,margin:{top:0,right:0,bottom:0,left:0}};var hi=Qe.memo(e=>{const t=tt(null),n=wt(()=>{t.current&&(clearTimeout(t.current),t.current=null)},[]),{animate:r,onTransitionEnd:o,onClose:i,contextId:a}=e,[s,l]=et("open"===e.animate);nt(()=>s?"open"!==r?(n(),l(!1),fi):t.current?fi:(t.current=setTimeout(()=>{t.current=null,l(!1)}),n):fi,[r,s,n]);const c=wt(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?bi:{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?dr.placeholder:null}})({isAnimatingOpenOnMount:s,animate:e.animate,placeholder:e.placeholder});return Qe.createElement(e.placeholder.tagName,{style:d,"data-rfd-placeholder-context-id":a,onTransitionEnd:c,ref:e.innerRef})});class vi extends Qe.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 yi={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:function(){return document.body||ut(),document.body}},xi=e=>{let t,n={...e};for(t in yi)void 0===e[t]&&(n={...n,[t]:yi[t]});return n},Ii=(e,t)=>e===t.droppable.type,Ei=(e,t)=>t.draggables[e.draggable.id],Di=Te(()=>{const e={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},t={...e,shouldAnimatePlaceholder:!1},n=kt(e=>({draggableId:e.id,type:e.type,source:{index:e.index,droppableId:e.droppableId}})),r=kt((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=xi(o),a=i.droppableId,s=i.type,l=!i.isDropDisabled,c=i.renderClone;if(fo(n)){const e=n.critical;if(!Ii(s,e))return t;const o=Ei(e,n.dimensions),i=An(n.impact)===a;return r(a,l,i,i,o,c)}if("DROP_ANIMATING"===n.phase){const e=n.completed;if(!Ii(s,e.critical))return t;const o=Ei(e.critical,n.dimensions);return r(a,l,Xo(e.result)===a,An(e.impact)===a,o,c)}if("IDLE"===n.phase&&n.completed&&!n.shouldFlush){const r=n.completed;if(!Ii(s,r.critical))return t;const o=An(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)=>({...xi(n),...e,...t}),{context:so,areStatePropsEqual:Jo})(e=>{const t=ot(go);t||ut();const{contextId:n,isMovementAllowed:r}=t,o=tt(null),i=tt(null),{children:a,droppableId:s,type:l,mode:c,direction:d,ignoreContainerClipping:u,isDropDisabled:p,isCombineEnabled:g,snapshot:m,useClone:f,updateViewportMaxScroll:b,getContainerForClone:h}=e,v=wt(()=>o.current,[]),y=wt((e=null)=>{o.current=e},[]);wt(()=>i.current,[]);const x=wt((e=null)=>{i.current=e},[]),I=wt(()=>{r()&&b({maxScroll:Rr()})},[r,b]);mi({droppableId:s,type:l,mode:c,direction:d,isDropDisabled:p,isCombineEnabled:g,ignoreContainerClipping:u,getDroppableRef:v});const E=Dt(()=>Qe.createElement(vi,{on:e.placeholder,shouldAnimate:e.shouldAnimatePlaceholder},({onClose:e,data:t,animate:r})=>Qe.createElement(hi,{placeholder:t,onClose:e,innerRef:x,animate:r,contextId:n,onTransitionEnd:I})),[n,I,e.placeholder,e.shouldAnimatePlaceholder,x]),D=Dt(()=>({innerRef:y,placeholder:E,droppableProps:{"data-rfd-droppable-id":s,"data-rfd-droppable-context-id":n}}),[n,s,E,y]),w=f?f.dragging.draggableId:null,C=Dt(()=>({droppableId:s,type:l,isUsingCloneFor:w}),[s,w,l]);return Qe.createElement(zo.Provider,{value:C},a(D,m),function(){if(!f)return null;const{dragging:e,render:t}=f,n=Qe.createElement(ti,{draggableId:e.draggableId,index:e.source.index,isClone:!0,isEnabled:!0,shouldRespectForcePress:!1,canDragInteractiveElements:!0},(n,r)=>t(n,r,e));return it.createPortal(n,h())}())}),{Menu:wi}=n,{MenuItem:Ci}=n,{IconButton:Si}=n,{MoreVert:Ai}=r,{MoreHoriz:Pi}=r,Oi=o,Ri=e;class _i extends Ri.Component{static __initStatic(){this.propTypes={opts:Oi.object,onClick:Oi.func.isRequired}}constructor(e){super(e),_i.prototype.__init.call(this),_i.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 Ri.createElement("div",null,Ri.createElement("div",{onClick:this.handleClick},Ri.createElement(Si,{size:"large"},n?Ri.createElement(Ai,{color:a}):Ri.createElement(Pi,{color:a}))),Ri.createElement(wi,{id:"point-menu",anchorEl:r,open:n,onClose:this.handleRequestClose,style:{transform:"translate(-15px, -15px)"},transformOrigin:{vertical:"center",horizontal:"right"}},o.map((t,n)=>Ri.createElement(Ci,{key:n,onClick:i(t)},e[t]))))}}_i.__initStatic();class Ni extends Ri.Component{static __initStatic2(){this.propTypes={onChange:Oi.func.isRequired,showSampleAnswer:Oi.bool.isRequired}}render(){const{onChange:e,showSampleAnswer:t}=this.props,n=t?"Provide Sample Response":"Remove Sample Response";return Ri.createElement(_i,{onClick:t=>e(t),opts:{sample:n}})}}Ni.__initStatic2();var Bi="#eeeeee",Ti="#e0e0e0",Mi="#9e9e9e";const Li=e,Gi=o,{styled:Fi}=i,{InputLabel:ki}=n,{OutlinedInput:ji}=n,{Select:Wi}=n,{FormControl:$i}=n,{MenuItem:Ui}=n,{Checkbox:Hi}=n,{FormGroup:qi}=n,{FormControlLabel:Vi}=n,{Typography:zi}=n,{times:Yi}=a,{takeRight:Zi}=a,{range:Ji}=a,{DragIndicator:Xi}=r,Ki=s,Qi=c,{InputContainer:ea}=l,ta=Ki("pie-lib:rubric:authoring"),na=(e,t,n)=>{const r=Array.from(e),[o]=r.splice(t,1);return r.splice(n,0,o),r},ra=Gi.shape({excludeZero:Gi.bool,points:Gi.arrayOf(Gi.string),sampleAnswers:Gi.arrayOf(Gi.string),maxPoints:Gi.number,rubriclessInstruction:Gi.string}),oa=e=>{const{value:t,onChange:n,max:r}=e,o="max-points-label";return Li.createElement($i,{sx:{minWidth:120,m:1},variant:"outlined"},Li.createElement(ki,{id:o},"Max Points"),Li.createElement(Wi,{labelId:o,label:"Max Points",value:t,onChange:e=>n(e.target.value),input:Li.createElement(ji,{label:"Max Points"}),MenuProps:{transitionDuration:{enter:225,exit:195}}},Ji(1,r+1).map(e=>Li.createElement(Ui,{key:`${e}`,value:e},e))))},ia=e=>null===e||"null"===e,aa=Fi("div")(()=>({display:"flex",width:"100%",position:"relative"})),sa=Fi("div")(({theme:e})=>({width:"100%",backgroundColor:`${e.palette.common.white}`})),la=Fi(Xi)(({theme:e})=>({paddingTop:e.spacing(1),color:Mi})),ca=Fi(zi)(({theme:e})=>({color:Mi,paddingBottom:e.spacing(1),textTransform:"uppercase"})),da=Fi("div")(({theme:e})=>({paddingLeft:e.spacing(3)})),ua=Fi("div")(({theme:e})=>({fontSize:e.typography.fontSize-2,color:e.palette.error.main,paddingLeft:e.spacing(3),paddingTop:e.spacing(1)})),pa=Fi("div")(()=>({position:"absolute",right:0})),ga=e=>{const{points:t,content:n,sampleAnswer:r,mathMlOptions:o={},error:i,pluginOpts:a={}}=e,s=`${t} ${t<=1?"pt":"pts"}`,l=ia(r);return Li.createElement("div",null,Li.createElement(ca,{variant:"overline"},s),Li.createElement(aa,null,Li.createElement(la,null),Li.createElement(sa,null,Li.createElement(Qi,{error:i,pluginProps:a,markup:n,onChange:e.onChange,mathMlOptions:o})),Li.createElement(pa,null,Li.createElement(Ni,{showSampleAnswer:l,onChange:e.onMenuChange}))),i&&Li.createElement(ua,null,i),!l&&Li.createElement(da,null,Li.createElement(la,{as:zi,variant:"overline"},"Sample Response"),Li.createElement(sa,null,Li.createElement(Qi,{markup:r,pluginProps:a,onChange:e.onSampleChange,mathMlOptions:o}))))},ma=Fi("div")(({theme:e})=>({backgroundColor:Bi,borderWidth:1,borderStyle:"solid",borderColor:Ti,padding:e.spacing(2),margin:e.spacing(1)})),fa=Fi("div")(({theme:e})=>({width:"100%",paddingTop:e.spacing(2),marginBottom:e.spacing(2),"& MuiFormControl-root":{width:"100%"}})),ba=Fi("div")(()=>({display:"none"})),ha=Fi("div")(({theme:e})=>({paddingTop:e.spacing(1),paddingBottom:e.spacing(1)})),va=Fi(zi)(({theme:e})=>({paddingLeft:e.spacing(1),margin:e.spacing(1)}));class ya extends Li.Component{constructor(...e){super(...e),ya.prototype.__init.call(this),ya.prototype.__init2.call(this),ya.prototype.__init3.call(this),ya.prototype.__init4.call(this),ya.prototype.__init5.call(this),ya.prototype.__init6.call(this),ya.prototype.__init7.call(this)}static __initStatic(){this.propTypes={value:ra,config:Gi.object,pluginOpts:Gi.object,rubricless:Gi.bool,onChange:Gi.func}}static __initStatic2(){this.defaultProps={}}__init(){this.dragEnd=e=>{if(!e.destination)return;const{value:t,onChange:n}=this.props,r=na(t.points,e.source.index,e.destination.index),o=na(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;ta("current",o,"new: ",e),e>o&&(i=Yi(e-o).map(()=>"").concat(t.points),a=Yi(e-o).map(()=>null).concat(t.sampleAnswers)),e<o&&(ta("less than"),i=Zi(t.points,e+1),a=Zi(t.sampleAnswers,e+1)),n(i&&!r?{...t,points:i,sampleAnswers:a,maxPoints:e}:{...t,maxPoints:e})}}__init4(){this.changeContent=(e,t,n)=>{if(ta(`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),ta(`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||[]);ia(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 Li.createElement("div",null,Li.createElement(va,{variant:"h5"},"Rubric"),Li.createElement(qi,{row:!0},a&&Li.createElement(oa,{max:u<100?u:100,value:g,onChange:this.changeMaxPoints,pluginOpts:o}),i&&Li.createElement(Vi,{label:"Exclude zeros",control:Li.createElement(Hi,{checked:e.excludeZero,onChange:this.excludeZeros})})),l&&r&&Li.createElement(fa,null,Li.createElement(ea,{label:d.label},Li.createElement(Qi,{markup:e.rubriclessInstruction||"",onChange:this.changeRubriclessInstruction,pluginProps:o,nonEmpty:!1,disableUnderline:!0,languageCharactersProps:[{language:"spanish"},{language:"special"}],mathMlOptions:t}))),Li.createElement("div",null,r?Li.createElement(ba,null):Li.createElement(ma,null,Li.createElement(Uo,{onDragEnd:this.dragEnd},Li.createElement(Di,{droppableId:"droppable"},n=>Li.createElement("div",{...n.droppableProps,ref:n.innerRef},e.points.map((n,r)=>this.shouldRenderPoint(r,e)&&Li.createElement(ni,{key:`${n.points}-${r}`,index:r,draggableId:r.toString()},i=>Li.createElement(ha,{ref:i.innerRef,...i.draggableProps,...i.dragHandleProps},Li.createElement(ga,{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))))))}}ya.__initStatic(),ya.__initStatic2();const xa=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=Yi(o.length-i.length).map(()=>null).concat(i));const a={...e.value,points:o,sampleAnswers:i};return Li.createElement(ya,{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})};xa.propTypes={value:ra,config:Gi.object,pluginOpts:Gi.object,rubricless:Gi.bool,getIndex:Gi.func,onChange:Gi.func};var Ia=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:xa,RUBRIC_TYPES:{SIMPLE_RUBRIC:"simpleRubric",MULTI_TRAIT_RUBRIC:"multiTraitRubric",RUBRICLESS:"rubricless"}}));const Ea=e,Da=i,wa=l;function Ca(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 Sa=g.exports;Object.defineProperty(w,"__esModule",{value:!0}),w.default=void 0;var Aa=Sa(m.exports),Pa=Sa(Ea),Oa=Ia,Ra=Da,_a=wa;const{Panel:Na,toggle:Ba}=_a.settings,Ta=(0,Ra.styled)("div")(({theme:e,width:t})=>({maxWidth:t,fontFamily:"Cerebri Sans",fontSize:e.typography.fontSize}));class Ma extends Pa.default.Component{constructor(...e){super(...e),(0,Aa.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||{},m=this.verifyRubriclessModel(e,t),{extraCSSRules:f}=e,b={excludeZeroEnabled:l.settings&&Ba(l.label),maxPointsEnabled:c.settings&&Ba(c.label),rubriclessInstructionEnabled:u&&p.settings&&Ba(p.label)};return Pa.default.createElement(_a.layout.ConfigLayout,{extraCSSRules:f,dimensions:a,hideSettings:s,settings:Pa.default.createElement(Na,{model:e,onChangeModel:r,configuration:t,onChangeConfiguration:n,pluginOpts:(h=Ca([p,"optionalAccess",e=>e.inputConfiguration]),Object.assign({...i},h||{})),groups:{Properties:b},imageSupport:o})},Pa.default.createElement(Ta,{width:g},Pa.default.createElement(Oa.Authoring,{value:m,config:t,onChange:r,mathMlOptions:d,rubricless:u,pluginOpts:i,imageSupport:o})));var h}}w.default=Ma;var La={};Object.defineProperty(La,"__esModule",{value:!0}),La.default=void 0,La.default={model:{points:["","","",""],sampleAnswers:[null,null,null,null],maxPoints:3,excludeZero:!1,excludeZeroEnabled:!0,maxPointsEnabled:!0},configuration:{baseInputConfiguration:{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 Ga=e,{client:Fa}=t,ka=s;function ja(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 Wa=g.exports;Object.defineProperty(p,"__esModule",{value:!0});var $a=p.default=void 0,Ua=Wa(m.exports),Ha=v,qa=Wa(Ga),Va=Fa,za=Wa(ka),Ya=Wa(w),Za=Wa(La);const Ja=e=>({...Za.default.model,...e}),Xa=e=>({...Za.default.configuration,...e});class Ka extends HTMLElement{constructor(){super(),(0,Ua.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=ja([t,"optionalAccess",e=>e.excludeZero])!==ja([e,"optionalAccess",e=>e.excludeZero]),l=ja([t,"optionalAccess",e=>e.maxPoints])!==ja([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,Ua.default)(this,"onConfigurationChanged",e=>{this._configuration=Xa(e),this._model&&this.onModelChanged(this._model),this._render()}),this._root=null,za.default.log("constructor called"),this._model=Ja(),this._configuration=Xa(),this.onModelChanged=this.onModelChanged.bind(this),this.onConfigurationChanged=this.onConfigurationChanged.bind(this)}set model(e){this._model=this.updateModelAccordingToReceivedProps(Ja(e)),this._render()}set configuration(e){this._configuration=Xa(e),this._render()}onModelChanged(e){this._model=this.updateModelAccordingToReceivedProps(e),this._render(),this.dispatchEvent(new Ha.ModelUpdatedEvent(this._model,!1))}insertImage(e){this.dispatchEvent(new Ha.InsertImageEvent(e))}onDeleteImage(e,t){this.dispatchEvent(new Ha.DeleteImageEvent(e,t))}connectedCallback(){this._render()}_render(){if(this._model){let e=qa.default.createElement(Ya.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,Va.createRoot)(this)),this._root.render(e)}}disconnectedCallback(){this._root&&this._root.unmount()}}$a=p.default=Ka;export{$a as default};
@@ -1,73 +0,0 @@
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 DELETED
@@ -1,33 +0,0 @@
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
- });
package/module/element.js DELETED
@@ -1 +0,0 @@
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@^3.0.5/module/index.js";import{_dll_pie_lib__math_rendering as a}from"../../../@pie-lib/math-rendering-module@^4.0.5/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};
package/module/index.html DELETED
@@ -1,21 +0,0 @@
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>
@@ -1,14 +0,0 @@
1
- {
2
- "name": "@pie-element/rubric",
3
- "version": "7.0.0-beta.1",
4
- "modules": [
5
- {
6
- "name": "@pie-lib/shared-module",
7
- "version": "^3.0.5"
8
- },
9
- {
10
- "name": "@pie-lib/math-rendering-module",
11
- "version": "^4.0.5"
12
- }
13
- ]
14
- }