@pie-element/rubric 7.2.0-next.4 → 7.2.0-next.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,12 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [7.2.0-next.5](https://github.com/pie-framework/pie-elements/compare/@pie-element/rubric@7.2.0-next.4...@pie-element/rubric@7.2.0-next.5) (2026-04-13)
7
+
8
+ ### Bug Fixes
9
+
10
+ - bump libs PIE-34 ([9f8b35a](https://github.com/pie-framework/pie-elements/commit/9f8b35a856ca1eba67d5630a358b96226cfca984))
11
+
6
12
  # [7.2.0-next.4](https://github.com/pie-framework/pie-elements/compare/@pie-element/rubric@7.2.0-next.3...@pie-element/rubric@7.2.0-next.4) (2026-04-10)
7
13
 
8
14
  ### Bug Fixes
@@ -3,6 +3,12 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [6.2.0-next.5](https://github.com/pie-framework/pie-elements/compare/@pie-element/rubric-configure@6.2.0-next.4...@pie-element/rubric-configure@6.2.0-next.5) (2026-04-13)
7
+
8
+ ### Bug Fixes
9
+
10
+ - bump libs PIE-34 ([9f8b35a](https://github.com/pie-framework/pie-elements/commit/9f8b35a856ca1eba67d5630a358b96226cfca984))
11
+
6
12
  # [6.2.0-next.4](https://github.com/pie-framework/pie-elements/compare/@pie-element/rubric-configure@6.2.0-next.3...@pie-element/rubric-configure@6.2.0-next.4) (2026-04-10)
7
13
 
8
14
  ### Features
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pie-element/rubric-configure",
3
3
  "private": true,
4
- "version": "6.2.0-next.4",
4
+ "version": "6.2.0-next.5",
5
5
  "description": "Rubric authoring view",
6
6
  "main": "lib/index.js",
7
7
  "author": "Pie Framework Authors",
@@ -11,10 +11,10 @@
11
11
  "@mui/icons-material": "^7.3.4",
12
12
  "@mui/material": "^7.3.4",
13
13
  "@pie-framework/pie-configure-events": "^1.3.0",
14
- "@pie-lib/config-ui": "12.2.0-next.28",
15
- "@pie-lib/editable-html-tip-tap": "1.2.0-next.27",
14
+ "@pie-lib/config-ui": "12.2.0-next.29",
15
+ "@pie-lib/editable-html-tip-tap": "1.2.0-next.28",
16
16
  "@pie-lib/render-ui": "5.2.0-next.7",
17
- "@pie-lib/rubric": "1.2.0-next.28",
17
+ "@pie-lib/rubric": "1.2.0-next.29",
18
18
  "debug": "^4.1.1",
19
19
  "react": "18.3.1",
20
20
  "react-dom": "18.3.1"
@@ -0,0 +1 @@
1
+ import{_dll_react as e,_dll_react_dom as t,_dll_mui__material as n,_dll_mui__icons_material as r,_dll_prop_types as o,_dll_mui__material_styles as i,_dll_debug as a}from"../../../@pie-lib/shared-module@^4.1.0/module/index.js";import{_dll_pie_lib__config_ui as s}from"../../../@pie-lib/config-module@^3.1.0/module/index.js";import{_dll_pie_lib__editable_html_tip_tap as l}from"../../../@pie-lib/editable-html-module@^6.2.0/module/index.js";import{grey as c}from"@mui/material/colors";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 f={exports:{}},m={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}(m),d(m.exports),function(e){var t=m.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}(f),d(f.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={},C="object"==typeof global&&global&&global.Object===Object&&global,S="object"==typeof self&&self&&self.Object===Object&&self,A=(C||S||Function("return this")()).Symbol,P=Object.prototype,O=P.hasOwnProperty,_=P.toString,N=A?A.toStringTag:void 0,R=Object.prototype.toString,B=A?A.toStringTag:void 0;function T(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":B&&B in Object(e)?function(e){var t=O.call(e,N),n=e[N];try{e[N]=void 0;var r=!0}catch(e){}var o=_.call(e);return r&&(t?e[N]=n:delete e[N]),o}(e):function(e){return R.call(e)}(e)}var M=/\s/,L=/^\s+/;function G(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}var F=/^[-+]0x[0-9a-f]+$/i,j=/^0b[01]+$/i,k=/^0o[0-7]+$/i,$=parseInt;function W(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return null!=e&&"object"==typeof e}(e)&&"[object Symbol]"==T(e)}(e))return NaN;if(G(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=G(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=function(e){return e?e.slice(0,function(e){for(var t=e.length;t--&&M.test(e.charAt(t)););return t}(e)+1).replace(L,""):e}(e);var n=j.test(e);return n||k.test(e)?$(e.slice(2),n?2:8):F.test(e)?NaN:+e}var U=1/0;function H(e){return e?(e=W(e))===U||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function q(e){var t=H(e),n=t%1;return t==t?n?t-n:t:0}function V(e){return e}var z=/^(?:0|[1-9]\d*)$/;function Y(e,t,n){if(!G(n))return!1;var r=typeof t;return!!("number"==r?function(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}(e.length)&&!function(e){if(!G(e))return!1;var t=T(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}(e)}(n)&&function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&z.test(e))&&e>-1&&e%1==0&&e<t}(t,n.length):"string"==r&&t in n)&&function(e,t){return e===t||e!=e&&t!=t}(n[t],e)}var Z=Math.ceil,J=Math.max,X=function(e,t,n){return n&&"number"!=typeof n&&Y(e,t,n)&&(t=n=void 0),e=H(e),void 0===t?(t=e,e=0):t=H(t),function(e,t,n){for(var r=-1,o=J(Z((t-e)/(n||1)),0),i=Array(o);o--;)i[++r]=e,e+=n;return i}(e,t,n=void 0===n?e<t?1:-1:H(n))};function K(e,t,n){var r=null==e?0:e.length;return r?function(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(o);++r<o;)i[r]=e[r+t];return i}(e,(t=r-(t=n||void 0===t?1:q(t)))<0?0:t,r):[]}var Q=4294967295,ee=Math.min;function te(e,t){if((e=q(e))<1||e>9007199254740991)return[];var n,r=Q,o=ee(e,Q);e-=Q;for(var i=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(o,t="function"==typeof(n=t)?n:V);++r<e;)t(r);return i}function ne(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 re="function"==typeof Symbol&&Symbol.observable||"@@observable",oe=()=>Math.random().toString(36).substring(7).split("").join("."),ie={INIT:`@@redux/INIT${oe()}`,REPLACE:`@@redux/REPLACE${oe()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${oe()}`};function ae(e,t,n){if("function"!=typeof e)throw new Error(ne(2));if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(ne(0));if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error(ne(1));return n(ae)(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(ne(3));return o}function u(e){if("function"!=typeof e)throw new Error(ne(4));if(l)throw new Error(ne(5));let t=!0;c();const n=s++;return a.set(n,e),function(){if(t){if(l)throw new Error(ne(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(ne(7));if(void 0===e.type)throw new Error(ne(8));if("string"!=typeof e.type)throw new Error(ne(17));if(l)throw new Error(ne(9));try{l=!0,o=r(o,e)}finally{l=!1}return(i=a).forEach(e=>{e()}),e}return p({type:ie.INIT}),{dispatch:p,subscribe:u,getState:d,replaceReducer:function(e){if("function"!=typeof e)throw new Error(ne(10));r=e,p({type:ie.REPLACE})},[re]:function(){const e=u;return{subscribe(t){if("object"!=typeof t||null===t)throw new Error(ne(11));function n(){const e=t;e.next&&e.next(d())}return n(),{unsubscribe:e(n)}},[re](){return this}}}}}function se(e,t){return function(...n){return t(e.apply(this,n))}}function le(e,t){if("function"==typeof e)return se(e,t);if("object"!=typeof e||null===e)throw new Error(ne(16));const n={};for(const r in e){const o=e[r];"function"==typeof o&&(n[r]=se(o,t))}return n}function ce(...e){return 0===e.length?e=>e:1===e.length?e[0]:e.reduce((e,t)=>(...n)=>e(t(...n)))}var de={exports:{}},ue={},pe=e,ge="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},fe=pe.useSyncExternalStore,me=pe.useRef,be=pe.useEffect,he=pe.useMemo,ve=pe.useDebugValue;ue.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var i=me(null);if(null===i.current){var a={hasValue:!1,value:null};i.current=a}else a=i.current;i=he(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,ge(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=fe(e,i[0],i[1]);return be(function(){a.hasValue=!0,a.value=s},[s]),ve(s),s},de.exports=ue;const ye=e;var xe=ye.version.startsWith("19"),Ie=Symbol.for(xe?"react.transitional.element":"react.element"),Ee=Symbol.for("react.portal"),De=Symbol.for("react.fragment"),we=Symbol.for("react.strict_mode"),Ce=Symbol.for("react.profiler"),Se=Symbol.for("react.consumer"),Ae=Symbol.for("react.context"),Pe=Symbol.for("react.forward_ref"),Oe=Symbol.for("react.suspense"),_e=Symbol.for("react.suspense_list"),Ne=Symbol.for("react.memo"),Re=Symbol.for("react.lazy"),Be=Pe,Te=Ne;function Me(e){return function(t){const n=e(t);function r(){return n}return r.dependsOnOwnProps=!1,r}}function Le(e){return e.dependsOnOwnProps?Boolean(e.dependsOnOwnProps):1!==e.length}function Ge(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=Le(e);let o=r(t,n);return"function"==typeof o&&(r.mapToProps=o,r.dependsOnOwnProps=Le(o),o=r(t,n)),o},r}}function Fe(e,t){return(n,r)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${r.wrappedComponentName}.`)}}function je(e,t,n){return{...n,...e,...t}}var ke={notify(){},get:()=>[]};function $e(e,t){let n,r=ke,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=ke)}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 We=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),Ue="undefined"!=typeof navigator&&"ReactNative"===navigator.product,He=We||Ue?ye.useLayoutEffect:ye.useEffect;function qe(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function Ve(e,t){if(qe(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])||!qe(e[n[r]],t[n[r]]))return!1;return!0}var ze={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},Ye={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Ze={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Je={[Be]:{$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},[Te]:Ze};function Xe(e){return function(e){return function(e){if("object"==typeof e&&null!==e){const{$$typeof:t}=e;switch(t){case Ie:switch(e=e.type){case De:case Ce:case we:case Oe:case _e:return e;default:switch(e=e&&e.$$typeof){case Ae:case Pe:case Re:case Ne:case Se:return e;default:return t}}case Ee:return t}}}(e)===Ne}(e)?Ze:Je[e.$$typeof]||ze}var Ke=Object.defineProperty,Qe=Object.getOwnPropertyNames,et=Object.getOwnPropertySymbols,tt=Object.getOwnPropertyDescriptor,nt=Object.getPrototypeOf,rt=Object.prototype;function ot(e,t){if("string"!=typeof t){if(rt){const n=nt(t);n&&n!==rt&&ot(e,n)}let n=Qe(t);et&&(n=n.concat(et(t)));const r=Xe(e),o=Xe(t);for(let i=0;i<n.length;++i){const a=n[i];if(!(Ye[a]||o&&o[a]||r&&r[a])){const n=tt(t,a);try{Ke(e,a,n)}catch(e){}}}}return e}var it=Symbol.for("react-redux-context"),at="undefined"!=typeof globalThis?globalThis:{},st=function(){if(!ye.createContext)return{};const e=at[it]??=new Map;let t=e.get(ye.createContext);return t||(t=ye.createContext(null),e.set(ye.createContext,t)),t}(),lt=[null,null];function ct(e,t,n,r,o,i){e.current=r,n.current=!1,o.current&&(o.current=null,i())}function dt(e,t){return e===t}var ut=function(e,t,n,{pure:r,areStatesEqual:o=dt,areOwnPropsEqual:i=Ve,areStatePropsEqual:a=Ve,areMergedPropsEqual:s=Ve,forwardRef:l=!1,context:c=st}={}){const d=c,u=function(e){return e?"function"==typeof e?Ge(e):Fe(e,"mapStateToProps"):Me(()=>({}))}(e),p=function(e){return e&&"object"==typeof e?Me(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?Ge(e):Fe(e,"mapDispatchToProps"):Me(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):Fe(e,"mergeProps"):()=>je}(n),f=Boolean(e);return e=>{const t=e.displayName||e.name||"Component",n=`Connect(${t})`,r={shouldHandleStateChanges:f,displayName:n,wrappedComponentName:t,WrappedComponent:e,initMapStateToProps:u,initMapDispatchToProps:p,initMergeProps:g,areStatesEqual:o,areStatePropsEqual:a,areOwnPropsEqual:i,areMergedPropsEqual:s};function c(t){const[n,o,i]=ye.useMemo(()=>{const{reactReduxForwardedRef:e,...n}=t;return[t.context,e,n]},[t]),a=ye.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=ye.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=ye.useMemo(()=>function(e,{initMapStateToProps:t,initMapDispatchToProps:n,initMergeProps:r,...o}){return function(e,t,n,r,{areStatesEqual:o,areOwnPropsEqual:i,areStatePropsEqual:a}){let s,l,c,d,u,p=!1;function g(p,g){const f=!i(g,l),m=!o(p,s,g,l);return s=p,l=g,f&&m?(c=e(s,l),t.dependsOnOwnProps&&(d=t(r,l)),u=n(c,d,l),u):f?(e.dependsOnOwnProps&&(c=e(s,l)),t.dependsOnOwnProps&&(d=t(r,l)),u=n(c,d,l),u):m?function(){const t=e(s,l),r=!a(t,c);return c=t,r&&(u=n(c,d,l)),u}():u}return function(o,i){return p?g(o,i):(s=o,l=i,c=e(s,l),d=t(r,l),u=n(c,d,l),p=!0,u)}}(t(e,o),n(e,o),r(e,o),e,o)}(u.dispatch,r),[u]),[m,b]=ye.useMemo(()=>{if(!f)return lt;const e=$e(u,l?void 0:s.subscription),t=e.notifyNestedSubs.bind(e);return[e,t]},[u,l,s]),h=ye.useMemo(()=>l?s:{...s,subscription:m},[l,s,m]),v=ye.useRef(void 0),y=ye.useRef(i),x=ye.useRef(void 0),I=ye.useRef(!1),E=ye.useRef(!1),D=ye.useRef(void 0);He(()=>(E.current=!0,()=>{E.current=!1}),[]);const w=ye.useMemo(()=>()=>x.current&&i===y.current?x.current:g(u.getState(),i),[u,i]),C=ye.useMemo(()=>e=>m?function(e,t,n,r,o,i,a,s,l,c,d){if(!e)return()=>{};let u=!1,p=null;const g=()=>{if(u||!s.current)return;const e=t.getState();let n,g;try{n=r(e,o.current)}catch(e){g=e,p=e}g||(p=null),n===i.current?a.current||c():(i.current=n,l.current=n,a.current=!0,d())};return n.onStateChange=g,n.trySubscribe(),g(),()=>{if(u=!0,n.tryUnsubscribe(),n.onStateChange=null,p)throw p}}(f,u,m,g,y,v,I,E,x,b,e):()=>{},[m]);var S,A;let P;S=ct,A=[y,v,I,i,x,b],He(()=>S(...A),undefined);try{P=ye.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}He(()=>{D.current=void 0,x.current=void 0,v.current=P});const O=ye.useMemo(()=>ye.createElement(e,{...P,ref:o}),[o,e,P]);return ye.useMemo(()=>f?ye.createElement(a.Provider,{value:h},O):O,[a,O,h])}const m=ye.memo(c);if(m.WrappedComponent=e,m.displayName=c.displayName=n,l){const t=ye.forwardRef(function(e,t){return ye.createElement(m,{...e,reactReduxForwardedRef:t})});return t.displayName=n,t.WrappedComponent=e,ot(t,e)}return ot(m,e)}},pt=function(e){const{children:t,context:n,serverState:r,store:o}=e,i=ye.useMemo(()=>{const e=$e(o);return{store:o,subscription:e,getServerState:r?()=>r:void 0}},[o,r]),a=ye.useMemo(()=>o.getState(),[o]);He(()=>{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||st;return ye.createElement(s.Provider,{value:i},t)};function gt(e=st){return function(){return ye.useContext(e)}}var ft=gt();function mt(e=st){const t=e===st?ft:gt(e),n=()=>{const{store:e}=t();return e};return Object.assign(n,{withTypes:()=>n}),n}var bt=mt();!function(e=st){const t=e===st?bt:mt(e),n=()=>t().dispatch;Object.assign(n,{withTypes:()=>n})}();var ht=(e,t)=>e===t;!function(e=st){const t=e===st?ft:gt(e),n=(e,n={})=>{const{equalityFn:r=ht}="function"==typeof n?{equalityFn:n}:n,o=t(),{store:i,subscription:a,getServerState:s}=o;ye.useRef(!0);const l=ye.useCallback({[e.name]:t=>e(t)}[e.name],[e]),c=de.exports.useSyncExternalStoreWithSelector(a.addNestedSub,i.getState,s||i.getState,l,r);return ye.useDebugValue(c),c};Object.assign(n,{withTypes:()=>n})}();var vt=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}}},yt=function(e,t){return{top:e.top-t.top,left:e.left-t.left,bottom:e.bottom+t.bottom,right:e.right+t.right}},xt=function(e,t){return{top:e.top+t.top,left:e.left+t.left,bottom:e.bottom-t.bottom,right:e.right-t.right}},It={top:0,right:0,bottom:0,left:0},Et=function(e){var t=e.borderBox,n=e.margin,r=void 0===n?It:n,o=e.border,i=void 0===o?It:o,a=e.padding,s=void 0===a?It:a,l=vt(yt(t,r)),c=vt(xt(t,i)),d=vt(xt(c,s));return{marginBox:l,borderBox:vt(t),paddingBox:c,contentBox:d,margin:r,border:i,padding:s}},Dt=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},wt=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 Et({borderBox:l,border:i,margin:a,padding:s})},Ct=function(e,t){return void 0===t&&(t={x:window.pageXOffset,y:window.pageYOffset}),wt(e,t)},St=function(e,t){var n={top:Dt(t.marginTop),right:Dt(t.marginRight),bottom:Dt(t.marginBottom),left:Dt(t.marginLeft)},r={top:Dt(t.paddingTop),right:Dt(t.paddingRight),bottom:Dt(t.paddingBottom),left:Dt(t.paddingLeft)},o={top:Dt(t.borderTopWidth),right:Dt(t.borderRightWidth),bottom:Dt(t.borderBottomWidth),left:Dt(t.borderLeftWidth)};return Et({borderBox:e,margin:n,padding:r,border:o})},At=function(e){var t=e.getBoundingClientRect(),n=window.getComputedStyle(e);return St(t,n)},Pt=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 Ot(){return Ot=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},Ot.apply(null,arguments)}const _t=e,{useState:Nt}=e,{useRef:Rt}=e,{useEffect:Bt}=e,{useLayoutEffect:Tt}=e,{useContext:Mt}=e,Lt=t,{flushSync:Gt}=t;function Ft(e,t){}function jt(){}function kt(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()})}}Ft.bind(null,"warn"),Ft.bind(null,"error");class $t extends Error{}function Wt(e,t){throw new $t("Invariant failed")}$t.prototype.toString=function(){return this.message};class Ut extends _t.Component{constructor(...e){super(...e),this.callbacks=null,this.unbind=jt,this.onWindowError=e=>{const t=this.getCallbacks();t.isDragging()&&t.tryAbort(),e.error instanceof $t&&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=kt(window,[{eventName:"error",fn:this.onWindowError}])}componentDidCatch(e){if(!(e instanceof $t))throw e;this.setState({})}componentWillUnmount(){this.unbind()}render(){return this.props.children(this.setCallbacks)}}const Ht=e=>e+1,qt=(e,t)=>{const n=e.droppableId===t.droppableId,r=Ht(e.index),o=Ht(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 `},Vt=(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 `,zt=e=>`\n The item has returned to its starting position\n of ${Ht(e.index)}\n`,Yt="\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",Zt=e=>`\n You have lifted an item in position ${Ht(e.source.index)}\n`,Jt=e=>{const t=e.destination;if(t)return qt(e.source,t);const n=e.combine;return n?Vt(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 ${zt(e.source)}\n `;const t=e.destination,n=e.combine;return t?`\n You have dropped the item.\n ${qt(e.source,t)}\n `:n?`\n You have dropped the item.\n ${Vt(e.draggableId,e.source,n)}\n `:`\n The item has been dropped while not over a drop area.\n ${zt(e.source)}\n `};function Kt(e,t){return e===t||!(!Number.isNaN(e)||!Number.isNaN(t))}function Qt(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!Kt(e[n],t[n]))return!1;return!0}function en(e,t){const n=Nt(()=>({inputs:t,result:e()}))[0],r=Rt(!0),o=Rt(n),i=r.current||Boolean(t&&o.current.inputs&&Qt(t,o.current.inputs))?o.current:{inputs:t,result:e()};return Bt(()=>{r.current=!1,o.current=i},[i]),i.result}function tn(e,t){return en(()=>e,t)}const nn={x:0,y:0},rn=(e,t)=>({x:e.x+t.x,y:e.y+t.y}),on=(e,t)=>({x:e.x-t.x,y:e.y-t.y}),an=(e,t)=>e.x===t.x&&e.y===t.y,sn=e=>({x:0!==e.x?-e.x:0,y:0!==e.y?-e.y:0}),ln=(e,t,n=0)=>"x"===e?{x:t,y:n}:{x:n,y:t},cn=(e,t)=>Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2),dn=(e,t)=>Math.min(...t.map(t=>cn(e,t))),un=e=>t=>({x:e(t.x),y:e(t.y)}),pn=(e,t)=>({top:e.top+t.y,left:e.left+t.x,bottom:e.bottom+t.y,right:e.right+t.x}),gn=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}],fn=(e,t)=>t&&t.shouldClipSubject?((e,t)=>{const n=vt({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):vt(e);var mn=({page:e,withPlaceholder:t,axis:n,frame:r})=>{const o=((e,t)=>t?pn(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:fn(i,r)}},bn=(e,t)=>{e.frame||Wt();const n=e.frame,r=on(t,n.scroll.initial),o=sn(r),i={...n,scroll:{initial:n.scroll.initial,current:t,diff:{value:r,displacement:o},max:n.scroll.max}},a=mn({page:e.subject.page,withPlaceholder:e.subject.withPlaceholder,axis:e.axis,frame:i});return{...e,frame:i,subject:a}};function hn(e,t=Qt){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 vn=hn(e=>e.reduce((e,t)=>(e[t.descriptor.id]=t,e),{})),yn=hn(e=>e.reduce((e,t)=>(e[t.descriptor.id]=t,e),{})),xn=hn(e=>Object.values(e)),In=hn(e=>Object.values(e));var En=hn((e,t)=>In(t).filter(t=>e===t.descriptor.droppableId).sort((e,t)=>e.descriptor.index-t.descriptor.index));function Dn(e){return e.at&&"REORDER"===e.at.type?e.at.destination:null}function wn(e){return e.at&&"COMBINE"===e.at.type?e.at.combine:null}var Cn=hn((e,t)=>t.filter(t=>t.descriptor.id!==e.descriptor.id)),Sn=(e,t)=>e.descriptor.droppableId===t.descriptor.id;const An={point:nn,value:0},Pn={invisible:{},visible:{},all:[]},On={displaced:Pn,displacedBy:An,at:null};var _n=(e,t)=>n=>e<=n&&n<=t,Nn=e=>{const t=_n(e.top,e.bottom),n=_n(e.left,e.right);return r=>{if(t(r.top)&&t(r.bottom)&&n(r.left)&&n(r.right))return!0;const o=t(r.top)||t(r.bottom),i=n(r.left)||n(r.right);if(o&&i)return!0;const a=r.top<e.top&&r.bottom>e.bottom,s=r.left<e.left&&r.right>e.right;return!(!a||!s)||(a&&i||s&&o)}},Rn=e=>{const t=_n(e.top,e.bottom),n=_n(e.left,e.right);return e=>t(e.top)&&t(e.bottom)&&n(e.left)&&n(e.right)};const Bn={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},Tn={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"},Mn=({target:e,destination:t,viewport:n,withDroppableDisplacement:r,isVisibleThroughFrameFn:o})=>{const i=r?((e,t)=>{const n=t.frame?t.frame.scroll.diff.displacement:nn;return pn(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)},Ln=e=>Mn({...e,isVisibleThroughFrameFn:Rn});function Gn({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 vt(yt(n,r))}(a,n),l=a.descriptor.id;var c;if(e.all.push(l),c={target:s,destination:t,viewport:r,withDroppableDisplacement:!0},!Mn({...c,isVisibleThroughFrameFn:Nn}))return e.invisible[a.descriptor.id]=!0,e;const d=((e,t,n)=>{if("boolean"==typeof n)return n;if(!t)return!0;const{invisible:r,visible:o}=t;if(r[e])return!1;const i=o[e];return!i||i.shouldAnimate})(l,i,o),u={draggableId:l,shouldAnimate:d};return e.visible[l]=u,e},{all:[],visible:{},invisible:{}})}function Fn({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:Pn,displacedBy:n,at:{type:"REORDER",destination:{droppableId:r.descriptor.id,index:o}}}}function jn({draggable:e,insideDestination:t,destination:n,viewport:r,displacedBy:o,last:i,index:a,forceShouldAnimate:s}){const l=Sn(e,n);if(null==a)return Fn({insideDestination:t,inHomeList:l,displacedBy:o,destination:n});const c=t.find(e=>e.descriptor.index===a);if(!c)return Fn({insideDestination:t,inHomeList:l,displacedBy:o,destination:n});const d=Cn(e,t),u=t.indexOf(c);return{displaced:Gn({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 kn(e,t){return Boolean(t.effected[e])}const $n=(e,t)=>t.margin[e.start]+t.borderBox[e.size]/2,Wn=(e,t,n)=>t[e.crossAxisStart]+n.margin[e.crossAxisStart]+n.borderBox[e.crossAxisSize]/2,Un=({axis:e,moveRelativeTo:t,isMoving:n})=>ln(e.line,t.marginBox[e.end]+$n(e,n),Wn(e,t.marginBox,n)),Hn=({axis:e,moveRelativeTo:t,isMoving:n})=>ln(e.line,t.marginBox[e.start]-((e,t)=>t.margin[e.end]+t.borderBox[e.size]/2)(e,n),Wn(e,t.marginBox,n));var qn=(e,t)=>{const n=e.frame;return n?rn(t,n.scroll.diff.displacement):t},Vn=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=En(r.descriptor.id,n),a=t.page,s=r.axis;if(!i.length)return(({axis:e,moveInto:t,isMoving:n})=>ln(e.line,t.contentBox[e.start]+$n(e,n),Wn(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(kn(d,o))return Hn({axis:s,moveRelativeTo:e.page,isMoving:a});const t=wt(e.page,c.point);return Hn({axis:s,moveRelativeTo:t,isMoving:a})}const u=i[i.length-1];if(u.descriptor.id===t.descriptor.id)return a.borderBox.center;if(kn(u.descriptor.id,o)){const e=wt(u.page,sn(o.displacedBy.point));return Un({axis:s,moveRelativeTo:e,isMoving:a})}return Un({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=wn(t);r||Wt();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 kn(n,t)?o?nn:sn(r.point):o?r.point:nn})({displaced:t.displaced,afterCritical:e,combineWith:o,displacedBy:t.displacedBy});return rn(i,a)})({impact:e,draggables:r,afterCritical:o}):i})(e),n=e.droppable;return n?qn(n,t):t},zn=(e,t)=>{const n=on(t,e.scroll.initial),r=sn(n);return{frame:vt({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 Yn(e,t){return e.map(e=>t[e])}var Zn=({pageBorderBoxCenter:e,draggable:t,viewport:n})=>{const r=((e,t)=>rn(e.scroll.diff.displacement,t))(n,e),o=on(r,t.page.borderBox.center);return rn(t.client.borderBox.center,o)},Jn=({draggable:e,destination:t,newPageBorderBoxCenter:n,viewport:r,withDroppableDisplacement:o,onlyOnMainAxis:i=!1})=>{const a=on(n,e.page.borderBox.center),s={target:pn(e.page.borderBox,a),destination:t,withDroppableDisplacement:o,viewport:r};return i?(e=>{return Mn({...e,isVisibleThroughFrameFn:(t=e.destination.axis,e=>{const n=_n(e.top,e.bottom),r=_n(e.left,e.right);return e=>t===Bn?n(e.top)&&n(e.bottom):r(e.left)&&r(e.right)})});var t})(s):Ln(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=En(n.descriptor.id,r),d=Sn(t,n),u=(({isMovingForward:e,draggable:t,destination:n,insideDestination:r,previousImpact:o})=>{if(!n.isCombineEnabled)return null;if(!Dn(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=Cn(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&&Wt();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||Wt(),"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:jn({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 kn(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:jn({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=Vn({impact:u,draggable:t,droppable:n,draggables:r,afterCritical:l});if(Jn({draggable:t,destination:n,newPageBorderBoxCenter:p,viewport:i.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0}))return{clientSelection:Zn({pageBorderBoxCenter:p,draggable:t,viewport:i}),impact:u,scrollJumpRequest:null};const g=on(p,a),f=(({impact:e,viewport:t,destination:n,draggables:r,maxScrollChange:o})=>{const i=zn(t,rn(t.scroll.current,o)),a=n.frame?bn(n,rn(n.frame.scroll.current,o)):n,s=e.displaced,l=Gn({afterDragging:Yn(s.all,r),destination:n,displacedBy:e.displacedBy,viewport:i.frame,last:s,forceShouldAnimate:!1}),c=Gn({afterDragging:Yn(s.all,r),destination:a,displacedBy:e.displacedBy,viewport:t.frame,last:s,forceShouldAnimate:!1}),d={},u={},p=[s,l,c];return s.all.forEach(e=>{const t=function(e,t){for(let n=0;n<t.length;n++){const r=t[n].visible[e];if(r)return r}return null}(e,p);t?u[e]=t:d[e]=!0}),{...e,displaced:{all:s.all,invisible:d,visible:u}}})({impact:u,viewport:i,destination:n,draggables:r,maxScrollChange:g});return{clientSelection:s,impact:f,scrollJumpRequest:g}};const Kn=e=>{const t=e.subject.active;return t||Wt(),t},Qn=(e,t)=>{const n=e.page.borderBox.center;return kn(e.descriptor.id,t)?on(n,t.displacedBy.point):n},er=(e,t)=>{const n=e.page.borderBox;return kn(e.descriptor.id,t)?pn(n,sn(t.displacedBy.point)):n};var tr=hn(function(e,t){const n=t[e.line];return{value:n,point:ln(e.line,n)}});const nr=(e,t)=>({...e,scroll:{...e.scroll,max:t}}),rr=(e,t,n)=>{const r=e.frame;Sn(t,e)&&Wt(),e.subject.withPlaceholder&&Wt();const o=tr(e.axis,t.displaceBy).point,i=((e,t,n)=>{const r=e.axis;if("virtual"===e.descriptor.mode)return ln(r.line,t[r.line]);const o=e.subject.page.contentBox[r.size],i=En(e.descriptor.id,n).reduce((e,t)=>e+t.client.marginBox[r.size],0)+t[r.line]-o;return i<=0?null:ln(r.line,i)})(e,o,n),a={placeholderSize:o,increasedBy:i,oldFrameMaxScroll:e.frame?e.frame.scroll.max:null};if(!r){const t=mn({page:e.subject.page,withPlaceholder:a,axis:e.axis,frame:e.frame});return{...e,subject:t}}const s=i?rn(r.scroll.max,i):r.scroll.max,l=nr(r,s),c=mn({page:e.subject.page,withPlaceholder:a,axis:e.axis,frame:l});return{...e,subject:c,frame:l}};var or=e=>{const t=e.at;return t?"REORDER"===t.type?t.destination.droppableId:t.combine.droppableId:null},ir=({state:e,type:t})=>{const n=((e,t)=>{const n=or(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=_n(i[a.start],i[a.end]),l=xn(r).filter(e=>e!==n).filter(e=>e.isEnabled).filter(e=>Boolean(e.subject.active)).filter(e=>Nn(o.frame)(Kn(e))).filter(t=>{const n=Kn(t);return e?i[a.crossAxisEnd]<n[a.crossAxisEnd]:n[a.crossAxisStart]<i[a.crossAxisStart]}).filter(e=>{const t=Kn(e),n=_n(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=Kn(t)[a.crossAxisStart],o=Kn(n)[a.crossAxisStart];return e?r-o:o-r}).filter((e,t,n)=>Kn(e)[a.crossAxisStart]===Kn(n[0])[a.crossAxisStart]);if(!l.length)return null;if(1===l.length)return l[0];const c=l.filter(e=>_n(Kn(e)[a.start],Kn(e)[a.end])(t[a.line]));return 1===c.length?c[0]:c.length>1?c.sort((e,t)=>Kn(e)[a.start]-Kn(t)[a.start])[0]:l.sort((e,n)=>{const r=dn(t,gn(Kn(e))),o=dn(t,gn(Kn(n)));return r!==o?r-o:Kn(e)[a.start]-Kn(n)[a.start]})[0]})({isMovingForward:e,pageBorderBoxCenter:t,source:r,droppables:i,viewport:a});if(!l)return null;const c=En(l.descriptor.id,o),d=(({pageBorderBoxCenter:e,viewport:t,destination:n,insideDestination:r,afterCritical:o})=>{const i=r.filter(e=>Ln({target:er(e,o),destination:n,viewport:t.frame,withDroppableDisplacement:!0})).sort((t,r)=>{const i=cn(e,qn(n,Qn(t,o))),a=cn(e,qn(n,Qn(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:Pn,displacedBy:An,at:{type:"REORDER",destination:{droppableId:i.descriptor.id,index:0}}},t=Vn({impact:e,draggable:r,droppable:i,draggables:o,afterCritical:s}),l=Sn(r,i)?i:rr(i,r,o);return Jn({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=tr(i.axis,r.displaceBy);return jn({draggable:r,insideDestination:n,destination:i,viewport:a,displacedBy:d,last:Pn,index:c})})({previousPageBorderBoxCenter:t,destination:l,draggable:n,draggables:o,moveRelativeTo:d,insideDestination:c,viewport:a,afterCritical:s});if(!u)return null;const p=Vn({impact:u,draggable:n,droppable:l,draggables:o,afterCritical:s});return{clientSelection:Zn({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 ar(e){return"DRAGGING"===e.phase||"COLLECTING"===e.phase}function sr(e){const t=_n(e.top,e.bottom),n=_n(e.left,e.right);return function(e){return t(e.y)&&n(e.x)}}const lr=(e,t)=>vt(pn(e,t));function cr({displaced:e,id:t}){return Boolean(e.visible[t]||e.invisible[t])}var dr=({pageOffset:e,draggable:t,draggables:n,droppables:r,previousImpact:o,viewport:i,afterCritical:a})=>{const s=lr(t.page.borderBox,e),l=function({pageBorderBox:e,draggable:t,droppables:n}){const r=xn(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(sr(n)(e.center))return!0;const i=t.axis,a=n.center[i.crossAxisLine],s=e[i.crossAxisStart],l=e[i.crossAxisEnd],c=_n(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=ln(t.axis.line,e.center[n.line],t.page.borderBox.center[n.crossAxisLine]);return{id:t.descriptor.id,distance:cn(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 On;const c=r[l],d=En(c.descriptor.id,n),u=((e,t)=>{const n=e.frame;return n?lr(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=tr(r.axis,e.displaceBy),l=s.value,c=t[a.start],d=t[a.end],u=Cn(e,o).find(e=>{const t=e.descriptor.id,r=e.page.borderBox,o=r[a.size]/4,s=kn(t,i),u=cr({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=tr(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:Cn(t,r).find(e=>{const t=e.descriptor.id,n=e.page.borderBox.center[s.line],r=kn(t,a),i=cr({displaced:o,id:t});return r?i?u<=n:d<n-c:i?u<=n+c:d<n})||null,inHomeList:Sn(t,n)});return jn({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})},ur=(e,t)=>({...e,[t.descriptor.id]:t});var pr=({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=on(l,e.initial.client.selection),d={offset:c,selection:l,borderBoxCenter:rn(e.initial.client.borderBoxCenter,c)},u={selection:rn(d.selection,a.scroll.current),borderBoxCenter:rn(d.borderBoxCenter,a.scroll.current),offset:rn(d.offset,a.scroll.diff.value)},p={client:d,page:u};if("COLLECTING"===e.phase)return{...e,dimensions:s,viewport:a,current:p};const g=s.draggables[e.critical.draggable.id],f=o||dr({pageOffset:u.offset,draggable:g,draggables:s.draggables,droppables:s.droppables,previousImpact:e.impact,viewport:a,afterCritical:e.afterCritical}),m=(({draggable:e,draggables:t,droppables:n,previousImpact:r,impact:o})=>{const i=(({previousImpact:e,impact:t,droppables:n})=>{const r=or(e),o=or(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||Wt();const n=e.frame;if(!n){const t=mn({page:e.subject.page,axis:e.axis,frame:null,withPlaceholder:null});return{...e,subject:t}}const r=t.oldFrameMaxScroll;r||Wt();const o=nr(n,r),i=mn({page:e.subject.page,axis:e.axis,frame:o,withPlaceholder:null});return{...e,subject:i,frame:o}})(i);return ur(n,a)})({previousImpact:r,impact:o,droppables:n}),a=or(o);if(!a)return i;const s=n[a];if(Sn(e,s))return i;if(s.subject.withPlaceholder)return i;const l=rr(s,e,t);return ur(i,l)})({draggable:g,impact:f,previousImpact:e.impact,draggables:s.draggables,droppables:s.droppables});return{...e,current:p,dimensions:{draggables:s.draggables,droppables:m},impact:f,viewport:a,scrollJumpRequest:i||null,forceShouldAnimate:!i&&null}},gr=({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=Gn({afterDragging:a,destination:r,displacedBy:e.displacedBy,viewport:t.frame,forceShouldAnimate:o,last:i});return{...e,displaced:s}},fr=({impact:e,draggable:t,droppable:n,draggables:r,viewport:o,afterCritical:i})=>{const a=Vn({impact:e,draggable:t,draggables:r,droppable:n,afterCritical:i});return Zn({pageBorderBoxCenter:a,draggable:t,viewport:o})},mr=({state:e,dimensions:t,viewport:n})=>{"SNAP"!==e.movementMode&&Wt();const r=e.impact,o=n||e.viewport,i=t||e.dimensions,{draggables:a,droppables:s}=i,l=a[e.critical.draggable.id],c=or(r);c||Wt();const d=s[c],u=gr({impact:r,viewport:o,destination:d,draggables:a}),p=fr({impact:u,draggable:l,droppable:d,draggables:a,viewport:o,afterCritical:e.afterCritical});return pr({impact:u,clientSelection:p,state:e,dimensions:i,viewport:o})},br=({draggable:e,home:t,draggables:n,viewport:r})=>{const o=tr(t.axis,e.displaceBy),i=En(t.descriptor.id,n),a=i.indexOf(e);-1===a&&Wt();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:Gn({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 hr=e=>"SNAP"===e.movementMode,vr=(e,t,n)=>{const r=((e,t)=>({draggables:e.draggables,droppables:ur(e.droppables,t)}))(e.dimensions,t);return!hr(e)||n?pr({state:e,dimensions:r}):mr({state:e,dimensions:r})};function yr(e){return e.isDragging&&"SNAP"===e.movementMode?{...e,scrollJumpRequest:null}:e}const xr={phase:"IDLE",completed:null,shouldFlush:!1};var Ir=(e=xr,t)=>{if("FLUSH"===t.type)return{...xr,shouldFlush:!0};if("INITIAL_PUBLISH"===t.type){"IDLE"!==e.phase&&Wt();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:nn},d={client:c,page:{selection:rn(c.selection,o.scroll.initial),borderBoxCenter:rn(c.selection,o.scroll.initial),offset:rn(c.selection,o.scroll.diff.value)}},u=xn(i.droppables).every(e=>!e.isFixedOnPage),{impact:p,afterCritical:g}=br({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&&Wt(),{...e,phase:"COLLECTING"});if("PUBLISH_WHILE_DRAGGING"===t.type)return"COLLECTING"!==e.phase&&"DROP_PENDING"!==e.phase&&Wt(),(({state:e,published:t})=>{const n=t.modified.map(t=>{const n=e.dimensions.droppables[t.droppableId];return bn(n,t.scroll)}),r={...e.dimensions.droppables,...vn(n)},o=yn((({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||Wt(),t})(t[o]),a=i.scroll.diff.value,s=(({draggable:e,offset:t,initialWindowScroll:n})=>{const r=wt(e.client,t),o=Ct(r,n);return{...e,placeholder:{...e.placeholder,client:r},client:r,page:o}})({draggable:e,offset:rn(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=or(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}=br({draggable:c,home:d,draggables:i,viewport:e.viewport}),g=l&&l.isCombineEnabled?e.impact:u,f=dr({pageOffset:e.current.page.offset,draggable:a.draggables[e.critical.draggable.id],draggables:a.draggables,droppables:a.droppables,previousImpact:g,viewport:e.viewport,afterCritical:p}),m={...e,phase:"DRAGGING",impact:f,onLiftImpact:u,dimensions:a,afterCritical:p,forceShouldAnimate:!1};return"COLLECTING"===e.phase?m:{...m,phase:"DROP_PENDING",reason:e.reason,isWaiting:!1}})({state:e,published:t.payload});if("MOVE"===t.type){if("DROP_PENDING"===e.phase)return e;ar(e)||Wt();const{client:n}=t.payload;return an(n,e.current.client.selection)?e:pr({state:e,clientSelection:n,impact:hr(e)?e.impact:null})}if("UPDATE_DROPPABLE_SCROLL"===t.type){if("DROP_PENDING"===e.phase)return yr(e);if("COLLECTING"===e.phase)return yr(e);ar(e)||Wt();const{id:n,newScroll:r}=t.payload,o=e.dimensions.droppables[n];if(!o)return e;const i=bn(o,r);return vr(e,i,!1)}if("UPDATE_DROPPABLE_IS_ENABLED"===t.type){if("DROP_PENDING"===e.phase)return e;ar(e)||Wt();const{id:n,isEnabled:r}=t.payload,o=e.dimensions.droppables[n];o||Wt(),o.isEnabled===r&&Wt();const i={...o,isEnabled:r};return vr(e,i,!0)}if("UPDATE_DROPPABLE_IS_COMBINE_ENABLED"===t.type){if("DROP_PENDING"===e.phase)return e;ar(e)||Wt();const{id:n,isCombineEnabled:r}=t.payload,o=e.dimensions.droppables[n];o||Wt(),o.isCombineEnabled===r&&Wt();const i={...o,isCombineEnabled:r};return vr(e,i,!0)}if("MOVE_BY_WINDOW_SCROLL"===t.type){if("DROP_PENDING"===e.phase||"DROP_ANIMATING"===e.phase)return e;ar(e)||Wt(),e.isWindowScrollAllowed||Wt();const n=t.payload.newScroll;if(an(e.viewport.scroll.current,n))return yr(e);const r=zn(e.viewport,n);return hr(e)?mr({state:e,viewport:r}):pr({state:e,viewport:r})}if("UPDATE_VIEWPORT_MAX_SCROLL"===t.type){if(!ar(e))return e;const n=t.payload.maxScroll;if(an(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&&Wt();const n=ir({state:e,type:t.type});return n?pr({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&&Wt(),{...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&&Wt(),{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 Er(e,t){return e instanceof Object&&"type"in e&&e.type===t}const Dr=e=>({type:"PUBLISH_WHILE_DRAGGING",payload:e}),wr=()=>({type:"COLLECTION_STARTING",payload:null}),Cr=e=>({type:"UPDATE_DROPPABLE_SCROLL",payload:e}),Sr=e=>({type:"UPDATE_DROPPABLE_IS_ENABLED",payload:e}),Ar=e=>({type:"UPDATE_DROPPABLE_IS_COMBINE_ENABLED",payload:e}),Pr=e=>({type:"MOVE",payload:e}),Or=()=>({type:"MOVE_UP",payload:null}),_r=()=>({type:"MOVE_DOWN",payload:null}),Nr=()=>({type:"MOVE_RIGHT",payload:null}),Rr=()=>({type:"MOVE_LEFT",payload:null}),Br=e=>({type:"DROP_COMPLETE",payload:e}),Tr=e=>({type:"DROP",payload:e}),Mr="cubic-bezier(.2,1,.1,1)",Lr=0,Gr=.7,Fr=.75,jr={outOfTheWay:.2,minDropTime:.33,maxDropTime:.55},kr=`${jr.outOfTheWay}s cubic-bezier(0.2, 0, 0, 1)`,$r={fluid:`opacity ${kr}`,snap:`transform ${kr}, opacity ${kr}`,drop:e=>{const t=`${e}s ${Mr}`;return`transform ${t}, opacity ${t}`},outOfTheWay:`transform ${kr}`,placeholder:`height ${kr}, width ${kr}, margin ${kr}`},Wr=e=>an(e,nn)?void 0:`translate(${e.x}px, ${e.y}px)`,Ur=Wr,{minDropTime:Hr,maxDropTime:qr}=jr,Vr=qr-Hr,zr=({getState:e,dispatch:t})=>n=>r=>{if(!Er(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&&Wt(),"DRAGGING"!==o.phase&&"DROP_PENDING"!==o.phase&&Wt();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:Pn},didDropInsideDroppable:!0}:{impact:gr({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?Dn(c):null,p=d?wn(c):null,g={index:a.draggable.index,droppableId:a.droppable.id},f={draggableId:l.descriptor.id,type:l.descriptor.type,source:g,reason:i,mode:o.movementMode,destination:u,combine:p},m=(({impact:e,draggable:t,dimensions:n,viewport:r,afterCritical:o})=>{const{draggables:i,droppables:a}=n,s=or(e),l=s?a[s]:null,c=a[t.descriptor.droppableId],d=fr({impact:e,draggable:t,draggables:i,afterCritical:o,droppable:l||c,viewport:r});return on(d,t.client.borderBox.center)})({impact:c,draggable:l,dimensions:s,viewport:o.viewport,afterCritical:o.afterCritical}),b={critical:o.critical,afterCritical:o.afterCritical,result:f,impact:c};if(an(o.current.client.offset,m)&&!Boolean(f.combine))return void t(Br({completed:b}));const h=(({current:e,destination:t,reason:n})=>{const r=cn(e,t);if(r<=0)return Hr;if(r>=1500)return qr;const o=Hr+Vr*(r/1500);return Number(("CANCEL"===n?.6*o:o).toFixed(2))})({current:o.current.client.offset,destination:m,reason:i});t((e=>({type:"DROP_ANIMATE",payload:e}))({newHomeClientOffset:m,dropDuration:h,completed:b}))};var Yr=()=>({x:window.pageXOffset,y:window.pageYOffset});const Zr=e=>{const t=function({onWindowScroll:e}){const t=Pt(function(){e(Yr())}),n=function(e){return{eventName:"scroll",options:{passive:!0,capture:!1},fn:t=>{t.target!==window&&t.target!==window.document||e()}}}(t);let r=jt;function o(){return r!==jt}return{start:function(){o()&&Wt(),r=kt(window,[n])},stop:function(){o()||Wt(),t.cancel(),r(),r=jt},isActive:o}}({onWindowScroll:t=>{e.dispatch({type:"MOVE_BY_WINDOW_SCROLL",payload:{newScroll:t}})}});return e=>n=>{!t.isActive()&&Er(n,"INITIAL_PUBLISH")&&t.start(),t.isActive()&&(e=>Er(e,"DROP_COMPLETE")||Er(e,"DROP_ANIMATE")||Er(e,"FLUSH"))(n)&&t.stop(),e(n)}};const Jr=(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 Kr(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 Qr=(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&&Wt();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||Wt(),r=null,Jr(0,()=>Kr(e().onDragEnd,n,t,Xt))};return{beforeCapture:(t,n)=>{r&&Wt(),Jr(0,()=>{const r=e().onBeforeCapture;r&&r({draggableId:t,mode:n})})},beforeStart:(t,n)=>{r&&Wt(),Jr(0,()=>{const r=e().onBeforeDragStart;r&&r(Xr(t,n))})},start:(o,i)=>{r&&Wt();const a=Xr(o,i);r={mode:i,lastCritical:o,lastLocation:a.source,lastCombine:null},n.add(()=>{Jr(0,()=>Kr(e().onDragStart,a,t,Zt))})},update:(o,i)=>{const a=Dn(i),s=wn(i);r||Wt();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(()=>{Jr(0,()=>Kr(e().onDragUpdate,g,t,Jt))})},flush:()=>{r||Wt(),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(Er(r,"BEFORE_INITIAL_CAPTURE"))return void n.beforeCapture(r.payload.draggableId,r.payload.movementMode);if(Er(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(Er(r,"DROP_COMPLETE")){const e=r.payload.completed.result;return n.flush(),t(r),void n.drop(e)}if(t(r),Er(r,"FLUSH"))return void n.abort();const o=e.getState();"DRAGGING"===o.phase&&n.update(o.critical,o.impact)}};const eo=e=>t=>n=>{if(!Er(n,"DROP_ANIMATION_FINISHED"))return void t(n);const r=e.getState();"DROP_ANIMATING"!==r.phase&&Wt(),e.dispatch(Br({completed:r.completed}))},to=e=>{let t=null,n=null;return r=>o=>{if((Er(o,"FLUSH")||Er(o,"DROP_COMPLETE")||Er(o,"DROP_ANIMATION_FINISHED"))&&(n&&(cancelAnimationFrame(n),n=null),t&&(t(),t=null)),r(o),!Er(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=kt(window,[i])})}};const no=e=>t=>n=>{if(t(n),!Er(n,"PUBLISH_WHILE_DRAGGING"))return;const r=e.getState();"DROP_PENDING"===r.phase&&(r.isWaiting||e.dispatch(Tr({reason:r.reason})))},ro=ce;var oo=({dimensionMarshal:e,focusMarshal:t,styleMarshal:n,getResponders:r,announce:o,autoScroller:i})=>{return ae(Ir,ro(function(...e){return t=>(n,r)=>{const o=t(n,r);let i=()=>{throw new Error(ne(15))};const a={getState:o.getState,dispatch:(e,...t)=>i(e,...t)},s=e.map(e=>e(a));return i=ce(...s)(o.dispatch),{...o,dispatch:i}}}((a=n,()=>e=>t=>{Er(t,"INITIAL_PUBLISH")&&a.dragging(),Er(t,"DROP_ANIMATE")&&a.dropping(t.payload.completed.result.reason),(Er(t,"FLUSH")||Er(t,"DROP_COMPLETE"))&&a.resting(),e(t)}),(e=>()=>t=>n=>{(Er(n,"DROP_COMPLETE")||Er(n,"FLUSH")||Er(n,"DROP_ANIMATE"))&&e.stopPublishing(),t(n)})(e),(e=>({getState:t,dispatch:n})=>r=>o=>{if(!Er(o,"LIFT"))return void r(o);const{id:i,clientSelection:a,movementMode:s}=o.payload,l=t();"DROP_ANIMATING"===l.phase&&n(Br({completed:l.completed})),"IDLE"!==t().phase&&Wt(),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),zr,eo,to,no,(e=>t=>n=>r=>{if((e=>Er(e,"DROP_COMPLETE")||Er(e,"DROP_ANIMATE")||Er(e,"FLUSH"))(r))return e.stop(),void n(r);if(Er(r,"INITIAL_PUBLISH")){n(r);const o=t.getState();return"DRAGGING"!==o.phase&&Wt(),void e.start(o)}n(r),e.scroll(t.getState())})(i),Zr,(e=>{let t=!1;return()=>n=>r=>{if(Er(r,"INITIAL_PUBLISH"))return t=!0,e.tryRecordFocus(r.payload.critical.draggable.id),n(r),void e.tryRestoreFocusRecorded();if(n(r),t){if(Er(r,"FLUSH"))return t=!1,void e.tryRestoreFocusRecorded();if(Er(r,"DROP_COMPLETE")){t=!1;const n=r.payload.completed.result;n.combine&&e.tryShiftRecord(n.draggableId,n.combine.draggableId),e.tryRestoreFocusRecorded()}}}})(t),Qr(r,o))));var a},io=({scrollHeight:e,scrollWidth:t,height:n,width:r})=>{const o=on({x:t,y:e},{x:r,y:n});return{x:Math.max(0,o.x),y:Math.max(0,o.y)}},ao=()=>{const e=document.documentElement;return e||Wt(),e},so=()=>{const e=ao();return io({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,width:e.clientWidth,height:e.clientHeight})};function lo(e,t,n){return n.descriptor.id!==t.id&&(n.descriptor.type===t.type&&"virtual"===e.droppable.getById(n.descriptor.droppableId).descriptor.mode)}var co=(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(nn)).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||Wt();const o=n.critical.draggable;"ADDITION"===t.type&&lo(e,o,t.value)&&r.add(t.value),"REMOVAL"===t.type&&lo(e,o,t.value)&&r.remove(t.value)},i={updateDroppableIsEnabled:(r,o)=>{e.droppable.exists(r)||Wt(),n&&t.updateDroppableIsEnabled({id:r,isEnabled:o})},updateDroppableIsCombineEnabled:(r,o)=>{n&&(e.droppable.exists(r)||Wt(),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)||Wt(),t.updateDroppableScroll({id:r,newScroll:o}))},startPublishing:t=>{n&&Wt();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=Yr(),t=so(),n=e.y,r=e.x,o=ao(),i=o.clientWidth,a=o.clientHeight;return{frame:vt({top:n,left:r,right:r+i,bottom:n+a}),scroll:{initial:e,current:e,max:t,diff:{value:nn,displacement:nn}}}})(),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:yn(s),droppables:vn(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},uo=(e,t)=>"IDLE"===e.phase||"DROP_ANIMATING"===e.phase&&e.completed.result.draggableId!==t&&"DROP"===e.completed.result.reason,po=e=>{window.scrollBy(e.x,e.y)};const go=hn(e=>xn(e).filter(e=>!!e.isEnabled&&!!e.frame));const fo={startFromPercentage:.25,maxScrollAtPercentage:.05,maxPixelScroll:28,ease:e=>e**2,durationDampening:{stopDampeningAt:1200,accelerateAt:360},disabled:!1};var mo=({startOfRange:e,endOfRange:t,current:n})=>{const r=t-e;return 0===r?0:(n-e)/r},bo=({distanceToEdge:e,thresholds:t,dragStartTime:n,shouldUseTimeDampening:r,getAutoScrollerOptions:o})=>{const i=((e,t,n=()=>fo)=>{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-mo({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=mo({startOfRange:o,endOfRange:s,current:l}),d=e*r.ease(c);return Math.ceil(d)})(i,n,o),1):i},ho=({container:e,distanceToEdges:t,dragStartTime:n,axis:r,shouldUseTimeDampening:o,getAutoScrollerOptions:i})=>{const a=((e,t,n=()=>fo)=>{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]?bo({distanceToEdge:t[r.end],thresholds:a,dragStartTime:n,shouldUseTimeDampening:o,getAutoScrollerOptions:i}):-1*bo({distanceToEdge:t[r.start],thresholds:a,dragStartTime:n,shouldUseTimeDampening:o,getAutoScrollerOptions:i})};const vo=un(e=>0===e?0:e);var yo=({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=ho({container:t,distanceToEdges:a,dragStartTime:e,axis:Bn,shouldUseTimeDampening:o,getAutoScrollerOptions:i}),l=ho({container:t,distanceToEdges:a,dragStartTime:e,axis:Tn,shouldUseTimeDampening:o,getAutoScrollerOptions:i}),c=vo({x:l,y:s});if(an(c,nn))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?an(d,nn)?null:d:null};const xo=un(e=>0===e?0:e>0?1:-1),Io=(()=>{const e=(e,t)=>e<0?e:e>t?e-t:0;return({current:t,max:n,change:r})=>{const o=rn(t,r),i={x:e(o.x,n.x),y:e(o.y,n.y)};return an(i,nn)?null:i}})(),Eo=({max:e,current:t,change:n})=>{const r={x:Math.max(t.x,e.x),y:Math.max(t.y,e.y)},o=xo(n),i=Io({max:r,current:t,change:o});return!i||0!==o.x&&0===i.x||0!==o.y&&0===i.y},Do=(e,t)=>Eo({current:e.scroll.current,max:e.scroll.max,change:t}),wo=(e,t)=>{const n=e.frame;return!!n&&Eo({current:n.scroll.current,max:n.scroll.max,change:t})};var Co=({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=yo({dragStartTime:r,container:e.frame,subject:t,center:n,shouldUseTimeDampening:o,getAutoScrollerOptions:i});return a&&Do(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)=>go(t).find(t=>(t.frame||Wt(),sr(t.frame.pageMarginBox)(e)))||null)(e,n);return r})({center:a,destination:or(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=yo({dragStartTime:r,container:a.pageMarginBox,subject:t,center:n,shouldUseTimeDampening:o,getAutoScrollerOptions:i});return s&&wo(e,s)?s:null})({dragStartTime:t,droppable:l,subject:s,center:a,shouldUseTimeDampening:n,getAutoScrollerOptions:i});c&&o(l.descriptor.id,c)};const So="data-rfd",Ao=(()=>{const e=`${So}-drag-handle`;return{base:e,draggableId:`${e}-draggable-id`,contextId:`${e}-context-id`}})(),Po=(()=>{const e=`${So}-draggable`;return{base:e,contextId:`${e}-context-id`,id:`${e}-id`}})(),Oo=(()=>{const e=`${So}-droppable`;return{base:e,contextId:`${e}-context-id`,id:`${e}-id`}})(),_o={contextId:`${So}-scroll-container-context-id`},No=(e,t)=>e.map(e=>{const n=e.styles[t];return n?`${e.selector} { ${n} }`:""}).join(" "),Ro="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?Tt:Bt,Bo=()=>{const e=document.querySelector("head");return e||Wt(),e},To=e=>{const t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.type="text/css",t};function Mo(e,t){return Array.from(e.querySelectorAll(t))}var Lo=e=>e&&e.ownerDocument&&e.ownerDocument.defaultView?e.ownerDocument.defaultView:window;function Go(e){return e instanceof Lo(e).HTMLElement}function Fo(){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||Wt(),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||Wt(),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 jo=_t.createContext(null),ko=()=>{const e=document.body;return e||Wt(),e};const $o={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"},Wo={separator:"::"};function Uo(e,t=Wo){const n=_t.useId();return en(()=>`${e}${t.separator}${n}`,[t.separator,e,n])}var Ho=_t.createContext(null);function qo(e){const t=Rt(e);return Bt(()=>{t.current=e}),t}function Vo(e){return"IDLE"!==e.phase&&"DROP_ANIMATING"!==e.phase&&e.isDragging}const zo=9,Yo=13,Zo=33,Jo=34,Xo=35,Ko=36,Qo={[Yo]:!0,[zo]:!0};var ei=e=>{Qo[e.keyCode]&&e.preventDefault()};const ti=(()=>{const e="visibilitychange";return"undefined"==typeof document?e:[e,`ms${e}`,`webkit${e}`,`moz${e}`,`o${e}`].find(e=>`on${e}`in document)||e})(),ni={type:"IDLE"};function ri(){}const oi={[Jo]:!0,[Zo]:!0,[Ko]:!0,[Xo]:!0};const ii={type:"IDLE"},ai=["input","button","textarea","select","option","optgroup","video","audio"];function si(e,t){if(null==t)return!1;if(ai.includes(t.tagName.toLowerCase()))return!0;const n=t.getAttribute("contenteditable");return"true"===n||""===n||t!==e&&si(e,t.parentElement)}function li(e,t){const n=t.target;return!!Go(n)&&si(e,n)}var ci=e=>vt(e.getBoundingClientRect()).center;const di=(()=>{const e="matches";return"undefined"==typeof document?e:[e,"msMatchesSelector","webkitMatchesSelector"].find(e=>e in Element.prototype)||e})();function ui(e,t){return null==e?null:e[di](t)?e:ui(e.parentElement,t)}function pi(e,t){return e.closest?e.closest(t):ui(e,t)}function gi(e){e.preventDefault()}function fi({expected:e,phase:t,isLockActive:n,shouldWarn:r}){return!!n()&&e===t}function mi({lockAPI:e,store:t,registry:n,draggableId:r}){if(e.isClaimed())return!1;const o=n.draggable.findById(r);return!!o&&!!o.options.isEnabled&&!!uo(t.getState(),r)}const bi=[function(e){const t=Rt(ni),n=Rt(jt),r=en(()=>({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=en(()=>({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=tn(function(){n.current=kt(window,[o,r],{passive:!1,capture:!0})},[o,r]),a=tn(()=>{"IDLE"!==t.current.type&&(t.current=ni,n.current(),i())},[i]),s=tn(()=>{const e=t.current;a(),"DRAGGING"===e.type&&e.actions.cancel({shouldBlockNextClick:!0}),"PENDING"===e.type&&e.actions.abort()},[a]),l=tn(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&&Wt(),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 ei(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&&Wt(),r.actions.shouldRespectForcePress()?e():t.preventDefault()}},{eventName:ti,fn:e}]}({cancel:s,completed:a,getPhase:()=>t.current,setPhase:e=>{t.current=e}});n.current=kt(window,e,{capture:!0,passive:!1})},[s,a]),c=tn(function(e,n){"IDLE"!==t.current.type&&Wt(),t.current={type:"PENDING",point:n,actions:e},l()},[l]);Ro(function(){return i(),function(){n.current()}},[i])},function(e){const t=Rt(ri),n=en(()=>({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||Wt(),a=!1,t.current(),r()}t.current(),t.current=kt(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(oi[r.keyCode]?r.preventDefault():ei(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:ti,fn:n}]}(s,l),{capture:!0,passive:!1})}}),[e]),r=tn(function(){t.current=kt(window,[n],{passive:!1,capture:!0})},[n]);Ro(function(){return r(),function(){t.current()}},[r])},function(e){const t=Rt(ii),n=Rt(jt),r=tn(function(){return t.current},[]),o=tn(function(e){t.current=e},[]),i=en(()=>({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=tn(function(){n.current=kt(window,[i],{capture:!0,passive:!1})},[i]),s=tn(()=>{const e=t.current;"IDLE"!==e.type&&("PENDING"===e.type&&clearTimeout(e.longPressTimerId),o(ii),n.current(),a())},[a,o]),l=tn(()=>{const e=t.current;s(),"DRAGGING"===e.type&&e.actions.cancel({shouldBlockNextClick:!0}),"PENDING"===e.type&&e.actions.abort()},[s]),c=tn(function(){const e={capture:!0,passive:!1},t={cancel:l,completed:s,getPhase:r},o=kt(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&&Wt();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:ti,fn:e}]}(t),e),i=kt(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:ti,fn:e}]}(t),e);n.current=function(){o(),i()}},[l,r,s]),d=tn(function(){const e=r();"PENDING"!==e.type&&Wt();const t=e.actions.fluidLift(e.point);o({type:"DRAGGING",actions:t,hasMoved:!1})},[r,o]),u=tn(function(e,t){"IDLE"!==r().type&&Wt();const n=setTimeout(d,120);o({type:"PENDING",point:t,actions:e,longPressTimerId:n}),c()},[c,r,o,d]);Ro(function(){return a(),function(){n.current();const e=r();"PENDING"===e.type&&(clearTimeout(e.longPressTimerId),o(ii))}},[r,a,o]),Ro(function(){return kt(window,[{eventName:"touchmove",fn:()=>{},options:{capture:!1,passive:!1}}])},[])}];function hi({contextId:e,store:t,registry:n,customSensors:r,enableDefaultSensors:o}){const i=[...o?bi:[],...r||[]],a=Nt(()=>function(){let e=null;function t(){e||Wt(),e=null}return{isClaimed:function(){return Boolean(e)},isActive:function(t){return t===e},claim:function(t){e&&Wt();const n={abandon:t};return e=n,n},release:t,tryAbandon:function(){e&&(e.abandon(),t())}}}())[0],s=tn(function(e,t){Vo(e)&&!Vo(t)&&a.tryAbandon()},[a]);Ro(function(){let e=t.getState();return t.subscribe(()=>{const n=t.getState();s(e,n),e=n})},[a,t,s]),Ro(()=>a.tryAbandon,[a.tryAbandon]);const l=tn(e=>mi({lockAPI:a,registry:n,store:t,draggableId:e}),[a,n,t]),c=tn((r,o,i)=>function({lockAPI:e,contextId:t,store:n,registry:r,draggableId:o,forceSensorStop:i,sourceEvent:a}){if(!mi({lockAPI:e,store:n,registry:r,draggableId:o}))return null;const s=r.draggable.getById(o),l=function(e,t){const n=`[${Po.contextId}="${e}"]`,r=Mo(document,n).find(e=>e.getAttribute(Po.id)===t);return r&&Go(r)?r:null}(t,s.descriptor.id);if(!l)return null;if(a&&!s.options.canDragInteractiveElements&&li(l,a))return null;const c=e.claim(i||jt);let d="PRE_DRAG";function u(){return s.options.shouldRespectForcePress}function p(){return e.isActive(c)}const g=function(e,t){fi({expected:e,phase:d,isLockActive:p,shouldWarn:!0})&&n.dispatch(t())}.bind(null,"DRAGGING");function f(t){function r(){e.release(),d="COMPLETED"}function o(e,o={shouldBlockNextClick:!1}){if(t.cleanup(),o.shouldBlockNextClick){const e=kt(window,[{eventName:"click",fn:gi,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(e)}r(),n.dispatch(Tr({reason:e}))}return"PRE_DRAG"!==d&&(r(),Wt()),n.dispatch((e=>({type:"LIFT",payload:e}))(t.liftActionArgs)),d="DRAGGING",{isActive:()=>fi({expected:"DRAGGING",phase:d,isLockActive:p,shouldWarn:!1}),shouldRespectForcePress:u,drop:e=>o("DROP",e),cancel:e=>o("CANCEL",e),...t.actions}}return{isActive:()=>fi({expected:"PRE_DRAG",phase:d,isLockActive:p,shouldWarn:!1}),shouldRespectForcePress:u,fluidLift:function(e){const t=Pt(e=>{g(()=>Pr({client:e}))});return{...f({liftActionArgs:{id:o,clientSelection:e,movementMode:"FLUID"},cleanup:()=>t.cancel(),actions:{move:t}}),move:t}},snapLift:function(){const e={moveUp:()=>g(Or),moveRight:()=>g(Nr),moveDown:()=>g(_r),moveLeft:()=>g(Rr)};return f({liftActionArgs:{id:o,clientSelection:ci(l),movementMode:"SNAP"},cleanup:jt,actions:e})},abort:function(){fi({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=tn(t=>function(e,t){const n=function(e,t){const n=t.target;if(!((r=n)instanceof Lo(r).Element))return null;var r;const o=function(e){return`[${Ao.contextId}="${e}"]`}(e),i=pi(n,o);return i&&Go(i)?i:null}(e,t);return n?n.getAttribute(Ao.draggableId):null}(e,t),[e]),u=tn(e=>{const t=n.draggable.findById(e);return t?t.options:null},[n.draggable]),p=tn(function(){a.isClaimed()&&(a.tryAbandon(),"IDLE"!==t.getState().phase&&t.dispatch({type:"FLUSH",payload:null}))},[a,t]),g=tn(()=>a.isClaimed(),[a]),f=en(()=>({canGetLock:l,tryGetLock:c,findClosestDraggableId:d,findOptionsForDraggable:u,tryReleaseLock:p,isLockClaimed:g}),[l,c,d,u,p,g]);for(let e=0;e<i.length;e++)i[e](f)}function vi(e){return e.current||Wt(),e.current}function yi(e){const{contextId:t,setCallbacks:n,sensors:r,nonce:o,dragHandleUsageInstructions:i}=e,a=Rt(null),s=qo(e),l=tn(()=>(e=>({onBeforeCapture:t=>{Gt(()=>{e.onBeforeCapture&&e.onBeforeCapture(t)})},onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragEnd:e.onDragEnd,onDragUpdate:e.onDragUpdate}))(s.current),[s]),c=tn(()=>(e=>({...fo,...e.autoScrollerOptions,durationDampening:{...fo.durationDampening,...e.autoScrollerOptions}}))(s.current),[s]),d=function(e){const t=en(()=>(e=>`rfd-announcement-${e}`)(e),[e]),n=Rt(null);return Bt(function(){const e=document.createElement("div");return n.current=e,e.id=t,e.setAttribute("aria-live","assertive"),e.setAttribute("aria-atomic","true"),Ot(e.style,$o),ko().appendChild(e),function(){setTimeout(function(){const t=ko();t.contains(e)&&t.removeChild(e),e===n.current&&(n.current=null)})}},[t]),tn(e=>{const t=n.current;t&&(t.textContent=e)},[])}(t),u=function({contextId:e,text:t}){const n=Uo("hidden-text",{separator:"-"}),r=en(()=>function({contextId:e,uniqueId:t}){return`rfd-hidden-text-${e}-${t}`}({contextId:e,uniqueId:n}),[n,e]);return Bt(function(){const e=document.createElement("div");return e.id=r,e.textContent=t,e.style.display="none",ko().appendChild(e),function(){const t=ko();t.contains(e)&&t.removeChild(e)}},[r,t]),r}({contextId:t,text:i}),p=function(e,t){const n=en(()=>(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(Ao.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: ${$r.outOfTheWay};\n `;return{selector:t(Po.contextId),styles:{dragging:e,dropAnimating:e,userCancel:e}}})(),r,{selector:t(Oo.contextId),styles:{always:"overflow-anchor: none;"}},{selector:"body",styles:{dragging:"\n cursor: grabbing;\n cursor: -webkit-grabbing;\n user-select: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n overflow-anchor: none;\n "}}];return{always:No(o,"always"),resting:No(o,"resting"),dragging:No(o,"dragging"),dropAnimating:No(o,"dropAnimating"),userCancel:No(o,"userCancel")}})(e),[e]),r=Rt(null),o=Rt(null),i=tn(hn(e=>{const t=o.current;t||Wt(),t.textContent=e}),[]),a=tn(e=>{const t=r.current;t||Wt(),t.textContent=e},[]);Ro(()=>{(r.current||o.current)&&Wt();const s=To(t),l=To(t);return r.current=s,o.current=l,s.setAttribute(`${So}-always`,e),l.setAttribute(`${So}-dynamic`,e),Bo().appendChild(s),Bo().appendChild(l),a(n.always),i(n.resting),()=>{const e=e=>{const t=e.current;t||Wt(),Bo().removeChild(t),e.current=null};e(r),e(o)}},[t,a,i,n.always,n.resting,e]);const s=tn(()=>i(n.dragging),[i,n.dragging]),l=tn(e=>{i("DROP"!==e?n.userCancel:n.dropAnimating)},[i,n.dropAnimating,n.userCancel]),c=tn(()=>{o.current&&i(n.resting)},[i,n.resting]);return en(()=>({dragging:s,dropping:l,resting:c}),[s,l,c])}(t,o),g=tn(e=>{vi(a).dispatch(e)},[]),f=en(()=>le({publishWhileDragging:Dr,updateDroppableScroll:Cr,updateDroppableIsEnabled:Sr,updateDroppableIsCombineEnabled:Ar,collectionStarting:wr},g),[g]),m=function(){const e=en(Fo,[]);return Bt(()=>function(){e.clean()},[e]),e}(),b=en(()=>co(m,f),[m,f]),h=en(()=>(({scrollDroppable:e,scrollWindow:t,move:n,getAutoScrollerOptions:r})=>{const o=(({scrollWindow:e,scrollDroppable:t,getAutoScrollerOptions:n=()=>fo})=>{const r=Pt(e),o=Pt(t);let i=null;const a=e=>{i||Wt();const{shouldUseTimeDampening:t,dragStartTime:a}=i;Co({state:e,scrollWindow:r,scrollDroppable:o,dragStartTime:a,shouldUseTimeDampening:t,getAutoScrollerOptions:n})};return{start:e=>{i&&Wt();const t=Date.now();let r=!1;const o=()=>{r=!0};Co({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(!wo(e,n))return n;const r=((e,t)=>{const n=e.frame;return n&&wo(e,t)?Io({current:n.scroll.current,max:n.scroll.max,change:t}):null})(e,n);if(!r)return t(e.descriptor.id,n),null;const o=on(n,r);return t(e.descriptor.id,o),on(n,o)},o=(e,t,r)=>{if(!e)return r;if(!Do(t,r))return r;const o=((e,t)=>{if(!Do(e,t))return null;const n=e.scroll.max,r=e.scroll.current;return Io({current:r,max:n,change:t})})(t,r);if(!o)return n(r),null;const i=on(r,o);return n(i),on(r,i)};return t=>{const n=t.scrollJumpRequest;if(!n)return;const i=or(t.impact);i||Wt();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=rn(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:po,scrollDroppable:b.scrollDroppable,getAutoScrollerOptions:c,...le({move:Pr},g)}),[b.scrollDroppable,g,c]),v=function(e){const t=Rt({}),n=Rt(null),r=Rt(null),o=Rt(!1),i=tn(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=tn(function(t){const n=function(e,t){const n=`[${Ao.contextId}="${e}"]`,r=Mo(document,n);if(!r.length)return null;const o=r.find(e=>e.getAttribute(Ao.draggableId)===t);return o&&Go(o)?o:null}(e,t);n&&n!==document.activeElement&&n.focus()},[e]),s=tn(function(e,t){n.current===e&&(n.current=t)},[]),l=tn(function(){r.current||o.current&&(r.current=requestAnimationFrame(()=>{r.current=null;const e=n.current;e&&a(e)}))},[a]),c=tn(function(e){n.current=null;const t=document.activeElement;t&&t.getAttribute(Ao.draggableId)===e&&(n.current=e)},[]);return Ro(()=>(o.current=!0,function(){o.current=!1;const e=r.current;e&&cancelAnimationFrame(e)}),[]),en(()=>({register:i,tryRecordFocus:c,tryRestoreFocusRecorded:l,tryShiftRecord:s}),[i,c,l,s])}(t),y=en(()=>oo({announce:d,autoScroller:h,dimensionMarshal:b,focusMarshal:v,getResponders:l,styleMarshal:p}),[d,h,b,v,l,p]);a.current=y;const x=tn(()=>{const e=vi(a);"IDLE"!==e.getState().phase&&e.dispatch({type:"FLUSH",payload:null})},[]),I=tn(()=>{const e=vi(a).getState();return"DROP_ANIMATING"===e.phase||"IDLE"!==e.phase&&e.isDragging},[]);n(en(()=>({isDragging:I,tryAbort:x}),[I,x]));const E=tn(e=>uo(vi(a).getState(),e),[]),D=tn(()=>ar(vi(a).getState()),[]),w=en(()=>({marshal:b,focus:v,contextId:t,canLift:E,isMovementAllowed:D,dragHandleUsageInstructionsId:u,registry:m}),[t,b,u,v,E,D,m]);return hi({contextId:t,store:y,registry:m,customSensors:r||null,enableDefaultSensors:!1!==e.enableDefaultSensors}),Bt(()=>x,[x]),_t.createElement(Ho.Provider,{value:w},_t.createElement(pt,{context:jo,store:y},e.children))}function xi(e){const t=_t.useId(),n=e.dragHandleUsageInstructions||Yt;return _t.createElement(Ut,null,r=>_t.createElement(yi,{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 Ii=(e,t)=>t?$r.drop(t.duration):e?$r.snap:$r.fluid,Ei=(e,t)=>{if(e)return t?Lr:Gr};function Di(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=Wr(e);if(n)return t?`${n} scale(${Fr})`:n})(n,i):Ur(n);return{position:"fixed",top:t.marginBox.top,left:t.marginBox.left,boxSizing:"border-box",width:t.borderBox.width,height:t.borderBox.height,transition:Ii(a,o),transform:l,opacity:Ei(i,s),zIndex:s?4500:5e3,pointerEvents:"none"}}(e):{transform:Ur((t=e).offset),transition:t.shouldAnimateDisplacement?void 0:"none"};var t}var wi=_t.createContext(null);function Ci(e){const t=Mt(e);return t||Wt(),t}function Si(e){e.preventDefault()}var Ai=(e,t)=>e===t,Pi=e=>{const{combine:t,destination:n}=e;return n?n.droppableId:t?t.droppableId:null};function Oi(e=null){return{isDragging:!1,isDropAnimating:!1,isClone:!1,dropAnimation:null,mode:null,draggingOver:null,combineTargetFor:e,combineWith:null}}const _i={mapped:{type:"SECONDARY",offset:nn,combineTargetFor:null,shouldAnimateDisplacement:!0,snapshot:Oi(null)}},Ni=ut(()=>{const e=function(){const e=hn((e,t)=>({x:e,y:t})),t=hn((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=hn((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(Vo(r)){if(r.critical.draggable.id!==o.draggableId)return null;const t=r.current.client.offset,a=r.dimensions.draggables[o.draggableId],s=or(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=Pi(a),c=(e=>e.combine?e.combine.draggableId:null)(a),d={duration:r.dropDuration,curve:Mr,moveTo:r.newHomeClientOffset,opacity:c?Lr:null,scale:c?Fr: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=hn((e,t)=>({x:e,y:t})),t=hn(Oi),n=hn((e,n=null,r)=>({mapped:{type:"SECONDARY",offset:e,combineTargetFor:n,shouldAnimateDisplacement:r,snapshot:t(n)}})),r=e=>e?n(nn,e,!0):null,o=(t,o,i,a)=>{const s=i.displaced.visible[t],l=Boolean(a.inVirtualList&&a.effected[t]),c=wn(i),d=c&&c.draggableId===t?o:null;if(!s){if(!l)return r(d);if(i.displaced.invisible[t])return null;const o=sn(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(Vo(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)||_i},{dropAnimationFinished:()=>({type:"DROP_ANIMATION_FINISHED",payload:null})},null,{context:jo,areStatePropsEqual:Ai})(e=>{const t=Rt(null),n=tn((e=null)=>{t.current=e},[]),r=tn(()=>t.current,[]),{contextId:o,dragHandleUsageInstructionsId:i,registry:a}=Ci(Ho),{type:s,droppableId:l}=Ci(wi),c=en(()=>({id:e.draggableId,index:e.index,type:s,droppableId:l}),[e.draggableId,e.index,s,l]),{children:d,draggableId:u,isEnabled:p,shouldRespectForcePress:g,canDragInteractiveElements:f,isClone:m,mapped:b,dropAnimationFinished:h}=e;m||function(e){const t=Uo("draggable"),{descriptor:n,registry:r,getDraggableRef:o,canDragInteractiveElements:i,shouldRespectForcePress:a,isEnabled:s}=e,l=en(()=>({canDragInteractiveElements:i,shouldRespectForcePress:a,isEnabled:s}),[i,s,a]),c=tn(e=>{const t=o();return t||Wt(),function(e,t,n=nn){const r=window.getComputedStyle(t),o=t.getBoundingClientRect(),i=St(o,r),a=Ct(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=en(()=>({uniqueId:t,descriptor:n,options:l,getDimension:c}),[n,c,l,t]),u=Rt(d),p=Rt(!0);Ro(()=>(r.draggable.register(u.current),()=>r.draggable.unregister(u.current)),[r.draggable]),Ro(()=>{if(p.current)return void(p.current=!1);const e=u.current;u.current=d,r.draggable.update(d,e)},[d,r.draggable])}(en(()=>({descriptor:c,registry:a,getDraggableRef:r,canDragInteractiveElements:f,shouldRespectForcePress:g,isEnabled:p}),[c,a,r,f,g,p]));const v=en(()=>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:Si}:null,[o,i,u,p]),y=tn(e=>{"DRAGGING"===b.type&&b.dropping&&"transform"===e.propertyName&&Gt(h)},[h,b]),x=en(()=>{const e=Di(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=en(()=>({draggableId:c.id,type:c.type,source:{index:c.index,droppableId:c.droppableId}}),[c.droppableId,c.id,c.index,c.type]);return _t.createElement(_t.Fragment,null,d(x,b.snapshot,I))});function Ri(e){return Ci(wi).isUsingCloneFor!==e.draggableId||e.isClone?_t.createElement(Ni,e):null}function Bi(e){const t="boolean"!=typeof e.isDragDisabled||!e.isDragDisabled,n=Boolean(e.disableInteractiveElementBlocking),r=Boolean(e.shouldRespectForcePress);return _t.createElement(Ri,Ot({},e,{isClone:!1,isEnabled:t,canDragInteractiveElements:n,shouldRespectForcePress:r}))}const Ti=e=>t=>e===t,Mi=Ti("scroll"),Li=Ti("auto"),Gi=(e,t)=>t(e.overflowX)||t(e.overflowY),Fi=e=>null==e||e===document.body||e===document.documentElement?null:(e=>{const t=window.getComputedStyle(e),n={overflowX:t.overflowX,overflowY:t.overflowY};return Gi(n,Mi)||Gi(n,Li)})(e)?e:Fi(e.parentElement);var ji=e=>({x:e.scrollLeft,y:e.scrollTop});const ki=e=>!!e&&("fixed"===window.getComputedStyle(e).position||ki(e.parentElement));const $i={passive:!1},Wi={passive:!0};var Ui=e=>e.shouldPublishImmediately?$i:Wi;const Hi=e=>e&&e.env.closestScrollable||null;function qi(e){const t=Rt(null),n=Ci(Ho),r=Uo("droppable"),{registry:o,marshal:i}=n,a=qo(e),s=en(()=>({id:e.droppableId,type:e.type,mode:e.mode}),[e.droppableId,e.mode,e.type]),l=Rt(s),c=en(()=>hn((e,n)=>{t.current||Wt();const r={x:e,y:n};i.updateDroppableScroll(s.id,r)}),[s.id,i]),d=tn(()=>{const e=t.current;return e&&e.env.closestScrollable?ji(e.env.closestScrollable):nn},[]),u=tn(()=>{const e=d();c(e.x,e.y)},[d,c]),p=en(()=>Pt(u),[u]),g=tn(()=>{const e=t.current,n=Hi(e);e&&n||Wt(),e.scrollOptions.shouldPublishImmediately?u():p()},[p,u]),f=tn((e,r)=>{t.current&&Wt();const o=a.current,i=o.getDroppableRef();i||Wt();const l={closestScrollable:Fi(c=i),isFixedOnPage:ki(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=At(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=yt({top:r,right:a,bottom:i,left:o},n.border);return Et({borderBox:s,margin:n.margin,border:n.border,padding:n.padding})})(e,l),d=Ct(c,r),u=(()=>{if(!l)return null;const e=At(l),t={scrollHeight:l.scrollHeight,scrollWidth:l.scrollWidth};return{client:e,page:Ct(e,r),scroll:ji(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=io({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:nn,displacement:nn}}}})(),c="vertical"===o?Bn:Tn;return{descriptor:e,isCombineEnabled:n,isFixedOnPage:r,axis:c,isEnabled:t,client:i,page:a,frame:l,subject:mn({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(_o.contextId,n.contextId),p.addEventListener("scroll",g,Ui(d.scrollOptions))),u},[n.contextId,s,g,a]),m=tn(()=>{const e=t.current,n=Hi(e);return e&&n||Wt(),ji(n)},[]),b=tn(()=>{const e=t.current;e||Wt();const n=Hi(e);t.current=null,n&&(p.cancel(),n.removeAttribute(_o.contextId),n.removeEventListener("scroll",g,Ui(e.scrollOptions)))},[g,p]),h=tn(e=>{const n=t.current;n||Wt();const r=Hi(n);r||Wt(),r.scrollTop+=e.y,r.scrollLeft+=e.x},[]),v=en(()=>({getDimensionAndWatchScroll:f,getScrollWhileDragging:m,dragStopped:b,scroll:h}),[b,f,m,h]),y=en(()=>({uniqueId:r,descriptor:s,callbacks:v}),[v,s,r]);Ro(()=>(l.current=y.descriptor,o.droppable.register(y),()=>{t.current&&b(),o.droppable.unregister(y)}),[v,s,b,y,i,o.droppable]),Ro(()=>{t.current&&i.updateDroppableIsEnabled(l.current.id,!e.isDropDisabled)},[e.isDropDisabled,i]),Ro(()=>{t.current&&i.updateDroppableIsCombineEnabled(l.current.id,e.isCombineEnabled)},[e.isCombineEnabled,i])}function Vi(){}const zi={width:0,height:0,margin:{top:0,right:0,bottom:0,left:0}};var Yi=_t.memo(e=>{const t=Rt(null),n=tn(()=>{t.current&&(clearTimeout(t.current),t.current=null)},[]),{animate:r,onTransitionEnd:o,onClose:i,contextId:a}=e,[s,l]=Nt("open"===e.animate);Bt(()=>s?"open"!==r?(n(),l(!1),Vi):t.current?Vi:(t.current=setTimeout(()=>{t.current=null,l(!1)}),n):Vi,[r,s,n]);const c=tn(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?zi:{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?$r.placeholder:null}})({isAnimatingOpenOnMount:s,animate:e.animate,placeholder:e.placeholder});return _t.createElement(e.placeholder.tagName,{style:d,"data-rfd-placeholder-context-id":a,onTransitionEnd:c,ref:e.innerRef})});class Zi extends _t.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 Ji={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:function(){return document.body||Wt(),document.body}},Xi=e=>{let t,n={...e};for(t in Ji)void 0===e[t]&&(n={...n,[t]:Ji[t]});return n},Ki=(e,t)=>e===t.droppable.type,Qi=(e,t)=>t.draggables[e.draggable.id],ea=ut(()=>{const e={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},t={...e,shouldAnimatePlaceholder:!1},n=hn(e=>({draggableId:e.id,type:e.type,source:{index:e.index,droppableId:e.droppableId}})),r=hn((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(Vo(n)){const e=n.critical;if(!Ki(s,e))return t;const o=Qi(e,n.dimensions),i=or(n.impact)===a;return r(a,l,i,i,o,c)}if("DROP_ANIMATING"===n.phase){const e=n.completed;if(!Ki(s,e.critical))return t;const o=Qi(e.critical,n.dimensions);return r(a,l,Pi(e.result)===a,or(e.impact)===a,o,c)}if("IDLE"===n.phase&&n.completed&&!n.shouldFlush){const r=n.completed;if(!Ki(s,r.critical))return t;const o=or(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:jo,areStatePropsEqual:Ai})(e=>{const t=Mt(Ho);t||Wt();const{contextId:n,isMovementAllowed:r}=t,o=Rt(null),i=Rt(null),{children:a,droppableId:s,type:l,mode:c,direction:d,ignoreContainerClipping:u,isDropDisabled:p,isCombineEnabled:g,snapshot:f,useClone:m,updateViewportMaxScroll:b,getContainerForClone:h}=e,v=tn(()=>o.current,[]),y=tn((e=null)=>{o.current=e},[]);tn(()=>i.current,[]);const x=tn((e=null)=>{i.current=e},[]),I=tn(()=>{r()&&b({maxScroll:so()})},[r,b]);qi({droppableId:s,type:l,mode:c,direction:d,isDropDisabled:p,isCombineEnabled:g,ignoreContainerClipping:u,getDroppableRef:v});const E=en(()=>_t.createElement(Zi,{on:e.placeholder,shouldAnimate:e.shouldAnimatePlaceholder},({onClose:e,data:t,animate:r})=>_t.createElement(Yi,{placeholder:t,onClose:e,innerRef:x,animate:r,contextId:n,onTransitionEnd:I})),[n,I,e.placeholder,e.shouldAnimatePlaceholder,x]),D=en(()=>({innerRef:y,placeholder:E,droppableProps:{"data-rfd-droppable-id":s,"data-rfd-droppable-context-id":n}}),[n,s,E,y]),w=m?m.dragging.draggableId:null,C=en(()=>({droppableId:s,type:l,isUsingCloneFor:w}),[s,w,l]);return _t.createElement(wi.Provider,{value:C},a(D,f),function(){if(!m)return null;const{dragging:e,render:t}=m,n=_t.createElement(Ri,{draggableId:e.draggableId,index:e.source.index,isClone:!0,isEnabled:!0,shouldRespectForcePress:!1,canDragInteractiveElements:!0},(n,r)=>t(n,r,e));return Lt.createPortal(n,h())}())}),{Menu:ta}=n,{MenuItem:na}=n,{IconButton:ra}=n,{MoreVert:oa}=r,{MoreHoriz:ia}=r,aa=o,sa=e;class la extends sa.Component{static __initStatic(){this.propTypes={opts:aa.object,onClick:aa.func.isRequired}}constructor(e){super(e),la.prototype.__init.call(this),la.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 sa.createElement("div",null,sa.createElement("div",{onClick:this.handleClick},sa.createElement(ra,{size:"large"},n?sa.createElement(oa,{color:a}):sa.createElement(ia,{color:a}))),sa.createElement(ta,{id:"point-menu",anchorEl:r,open:n,onClose:this.handleRequestClose,style:{transform:"translate(-15px, -15px)"},transformOrigin:{vertical:"center",horizontal:"right"}},o.map((t,n)=>sa.createElement(na,{key:n,onClick:i(t)},e[t]))))}}la.__initStatic();class ca extends sa.Component{static __initStatic2(){this.propTypes={onChange:aa.func.isRequired,showSampleAnswer:aa.bool.isRequired}}render(){const{onChange:e,showSampleAnswer:t}=this.props,n=t?"Provide Sample Response":"Remove Sample Response";return sa.createElement(la,{onClick:t=>e(t),opts:{sample:n}})}}ca.__initStatic2();const da=e,ua=o,{styled:pa}=i,{InputLabel:ga}=n,{OutlinedInput:fa}=n,{Select:ma}=n,{FormControl:ba}=n,{MenuItem:ha}=n,{Checkbox:va}=n,{FormGroup:ya}=n,{FormControlLabel:xa}=n,{Typography:Ia}=n,{DragIndicator:Ea}=r,Da=a,wa=l,{InputContainer:Ca}=s,Sa=Da("pie-lib:rubric:authoring"),Aa=(e,t,n)=>{const r=Array.from(e),[o]=r.splice(t,1);return r.splice(n,0,o),r},Pa=ua.shape({excludeZero:ua.bool,points:ua.arrayOf(ua.string),sampleAnswers:ua.arrayOf(ua.string),maxPoints:ua.number,rubriclessInstruction:ua.string}),Oa=e=>{const{value:t,onChange:n,max:r}=e,o="max-points-label";return da.createElement(ba,{sx:{minWidth:120,m:1},variant:"outlined"},da.createElement(ga,{id:o},"Max Points"),da.createElement(ma,{labelId:o,label:"Max Points",value:t,onChange:e=>n(e.target.value),input:da.createElement(fa,{label:"Max Points"}),MenuProps:{transitionDuration:{enter:225,exit:195}}},X(1,r+1).map(e=>da.createElement(ha,{key:`${e}`,value:e},e))))},_a=e=>null===e||"null"===e,Na=pa("div")(()=>({display:"flex",width:"100%",position:"relative"})),Ra=pa("div")(({theme:e})=>({width:"100%",backgroundColor:`${e.palette.common.white}`})),Ba=pa(Ea)(({theme:e})=>({paddingTop:e.spacing(1),color:c[500]})),Ta=pa(Ia)(({theme:e})=>({color:c[500],paddingBottom:e.spacing(1),textTransform:"uppercase"})),Ma=pa("div")(({theme:e})=>({paddingLeft:e.spacing(3)})),La=pa("div")(({theme:e})=>({fontSize:e.typography.fontSize-2,color:e.palette.error.main,paddingLeft:e.spacing(3),paddingTop:e.spacing(1)})),Ga=pa("div")(()=>({position:"absolute",right:0})),Fa=e=>{const{points:t,content:n,sampleAnswer:r,mathMlOptions:o={},error:i,pluginOpts:a={}}=e,s=`${t} ${t<=1?"pt":"pts"}`,l=_a(r);return da.createElement("div",null,da.createElement(Ta,{variant:"overline"},s),da.createElement(Na,null,da.createElement(Ba,null),da.createElement(Ra,null,da.createElement(wa,{error:i,pluginProps:a,markup:n,onChange:e.onChange,mathMlOptions:o})),da.createElement(Ga,null,da.createElement(ca,{showSampleAnswer:l,onChange:e.onMenuChange}))),i&&da.createElement(La,null,i),!l&&da.createElement(Ma,null,da.createElement(Ba,{as:Ia,variant:"overline"},"Sample Response"),da.createElement(Ra,null,da.createElement(wa,{markup:r,pluginProps:a,onChange:e.onSampleChange,mathMlOptions:o}))))},ja=pa("div")(({theme:e})=>({backgroundColor:c[200],borderWidth:1,borderStyle:"solid",borderColor:c[300],padding:e.spacing(2),margin:e.spacing(1)})),ka=pa(Ca)(({theme:e})=>({width:"100%",paddingTop:e.spacing(2.5),marginBottom:e.spacing(2),marginTop:e.spacing(1),"& .MuiFormControl-root":{width:"100%"},"& > .MuiFormLabel-root.MuiInputLabel-shrink":{fontSize:e.typography.fontSize+2,transform:"translate(0, 1.5px) scale(0.75)"}})),$a=pa("div")(()=>({display:"none"})),Wa=pa("div")(({theme:e})=>({paddingTop:e.spacing(1),paddingBottom:e.spacing(1)})),Ua=pa(Ia)(({theme:e})=>({paddingLeft:e.spacing(1),margin:e.spacing(1)}));class Ha extends da.Component{constructor(...e){super(...e),Ha.prototype.__init.call(this),Ha.prototype.__init2.call(this),Ha.prototype.__init3.call(this),Ha.prototype.__init4.call(this),Ha.prototype.__init5.call(this),Ha.prototype.__init6.call(this),Ha.prototype.__init7.call(this),Ha.prototype.__init8.call(this),Ha.prototype.__init9.call(this)}static __initStatic(){this.propTypes={value:Pa,config:ua.object,pluginOpts:ua.object,rubricless:ua.bool,onChange:ua.func}}static __initStatic2(){this.defaultProps={}}__init(){this.dragEnd=e=>{if(!e.destination)return;const{value:t,onChange:n}=this.props,r=Aa(t.points,e.source.index,e.destination.index),o=Aa(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;Sa("current",o,"new: ",e),e>o&&(i=te(e-o).map(()=>"").concat(t.points),a=te(e-o).map(()=>null).concat(t.sampleAnswers)),e<o&&(Sa("less than"),i=K(t.points,e+1),a=K(t.sampleAnswers,e+1)),n(i&&!r?{...t,points:i,sampleAnswers:a,maxPoints:e}:{...t,maxPoints:e})}}__init4(){this.changeContent=(e,t,n)=>{if(Sa(`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),Sa(`changeModel[${n}]:`,i),o({...r,[n]:i})}}__init5(){this.excludeZeros=()=>{const{value:e,onChange:t}=this.props;t({...e,excludeZero:!e.excludeZero})}}__init6(){this.getPointForIndex=(e,t)=>(t.excludeZero?t.points.length-1+1:t.points.length-1)-e}__init7(){this.getMaxPoint=e=>e.excludeZero?e.points.length:e.points.length-1}__init8(){this.shouldRenderPoint=(e,t)=>this.getPointForIndex(e,t)>0||!t.excludeZero}__init9(){this.onPointMenuChange=(e,t)=>{if("sample"===t){const{value:t}=this.props,n=Array.from(t.sampleAnswers||[]);_a(n[e])?this.changeContent(e,"","sampleAnswers"):this.changeContent(e,null,"sampleAnswers")}}}render(){const{value:e,mathMlOptions:t={},config:n={},rubricless:r=!1,pluginOpts:o={}}=this.props;let{excludeZeroEnabled:i=!0,maxPointsEnabled:a=!0,errors:s={},rubriclessInstructionEnabled:l=!1,maxPoints:c=10}=e||{};const{rubriclessInstruction:d={},maxMaxPoints:u=10}=n||{},{pointsDescriptorsErrors:p}=s||{};e&&Number.isFinite(e.maxPoints)&&console.warn("maxPoints is deprecated - remove from model");const g=r?c:e.excludeZero?e.points.length:e.points.length-1;return da.createElement("div",null,da.createElement(Ua,{variant:"h5"},"Rubric"),da.createElement(ya,{row:!0},a&&da.createElement(Oa,{max:u<100?u:100,value:g,onChange:this.changeMaxPoints,pluginOpts:o}),i&&da.createElement(xa,{label:"Exclude zeros",control:da.createElement(va,{checked:e.excludeZero,onChange:this.excludeZeros})})),l&&r&&da.createElement(ka,{label:d.label},da.createElement(wa,{markup:e.rubriclessInstruction||"",onChange:this.changeRubriclessInstruction,pluginProps:o,nonEmpty:!1,disableUnderline:!0,languageCharactersProps:[{language:"spanish"},{language:"special"}],mathMlOptions:t,autoWidthToolbar:!0})),da.createElement("div",null,r?da.createElement($a,null):da.createElement(ja,null,da.createElement(xi,{onDragEnd:this.dragEnd},da.createElement(ea,{droppableId:"droppable"},n=>da.createElement("div",{...n.droppableProps,ref:n.innerRef},e.points.map((n,r)=>this.shouldRenderPoint(r,e)&&da.createElement(Bi,{key:`${n.points}-${r}`,index:r,draggableId:r.toString()},i=>da.createElement(Wa,{ref:i.innerRef,...i.draggableProps,...i.dragHandleProps},da.createElement(Fa,{points:this.getPointForIndex(r,e),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))))))}}Ha.__initStatic(),Ha.__initStatic2();const qa=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=te(o.length-i.length).map(()=>null).concat(i));const a={...e.value,points:o,sampleAnswers:i};return da.createElement(Ha,{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})};qa.propTypes={value:Pa,config:ua.object,pluginOpts:ua.object,rubricless:ua.bool,getIndex:ua.func,onChange:ua.func};var Va=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:qa,RUBRIC_TYPES:{SIMPLE_RUBRIC:"simpleRubric",MULTI_TRAIT_RUBRIC:"multiTraitRubric",RUBRICLESS:"rubricless"}}));const za=e,Ya=i,Za=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 Xa=g.exports;Object.defineProperty(w,"__esModule",{value:!0}),w.default=void 0;var Ka=Xa(f.exports),Qa=Xa(za),es=Va,ts=Ya,ns=Za;const{Panel:rs,toggle:os}=ns.settings,is=(0,ts.styled)("div")(({theme:e,width:t})=>({maxWidth:t,fontFamily:"Cerebri Sans",fontSize:e.typography.fontSize}));class as extends Qa.default.Component{constructor(...e){super(...e),(0,Ka.default)(this,"verifyRubriclessModel",(e,t)=>{const{rubricless:n=!1}=t||{};return n?(({points:e,sampleAnswers:t,...n})=>n)(e):e})}render(){const{model:e,configuration:t,onConfigurationChanged:n,onModelChanged:r,imageSupport:o}=this.props||{},{baseInputConfiguration:i={},contentDimensions:a={},settingsPanelDisabled:s,showExcludeZero:l={},showMaxPoint:c={},mathMlOptions:d={},rubricless:u=!1,rubriclessInstruction:p,width:g}=t||{},f=this.verifyRubriclessModel(e,t),{extraCSSRules:m}=e,b={excludeZeroEnabled:l.settings&&os(l.label),maxPointsEnabled:c.settings&&os(c.label),rubriclessInstructionEnabled:u&&p.settings&&os(p.label)};return Qa.default.createElement(ns.layout.ConfigLayout,{extraCSSRules:m,dimensions:a,hideSettings:s,settings:Qa.default.createElement(rs,{model:e,onChangeModel:r,configuration:t,onChangeConfiguration:n,pluginOpts:(h=Ja([p,"optionalAccess",e=>e.inputConfiguration]),Object.assign({...i},h||{})),groups:{Properties:b},imageSupport:o})},Qa.default.createElement(is,{width:g},Qa.default.createElement(es.Authoring,{value:f,config:t,onChange:r,mathMlOptions:d,rubricless:u,pluginOpts:i,imageSupport:o})));var h}}w.default=as;var ss={};Object.defineProperty(ss,"__esModule",{value:!0}),ss.default=void 0,ss.default={model:{points:["","","",""],sampleAnswers:[null,null,null,null],maxPoints:3,excludeZero:!1,excludeZeroEnabled:!0,maxPointsEnabled:!0},configuration:{baseInputConfiguration:{h3:{disabled:!0},audio:{disabled:!1},video:{disabled:!1},image:{disabled:!1},textAlign:{disabled:!0},showParagraphs:{disabled:!1},separateParagraphs:{disabled:!0}},rubriclessInstruction:{inputConfiguration:{audio:{disabled:!1},video:{disabled:!1},image:{disabled:!1}}},showExcludeZero:{settings:!0,label:"Ability to exclude zero"},showMaxPoint:{settings:!0,label:"Show max points dropdown"},settingsPanelDisabled:!1,mathMlOptions:{mmlOutput:!1,mmlEditing:!1},maxMaxPoints:9}};const ls=e,{client:cs}=t,ds=a;function us(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 ps=g.exports;Object.defineProperty(p,"__esModule",{value:!0});var gs=p.default=void 0,fs=ps(f.exports),ms=v,bs=ps(ls),hs=cs,vs=ps(ds),ys=ps(w),xs=ps(ss);const Is=e=>({...xs.default.model,...e}),Es=e=>({...xs.default.configuration,...e});class Ds extends HTMLElement{constructor(){super(),(0,fs.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=us([t,"optionalAccess",e=>e.excludeZero])!==us([e,"optionalAccess",e=>e.excludeZero]),l=us([t,"optionalAccess",e=>e.maxPoints])!==us([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,fs.default)(this,"onConfigurationChanged",e=>{this._configuration=Es(e),this._model&&this.onModelChanged(this._model),this._render()}),this._root=null,vs.default.log("constructor called"),this._model=Is(),this._configuration=Es(),this.onModelChanged=this.onModelChanged.bind(this),this.onConfigurationChanged=this.onConfigurationChanged.bind(this)}set model(e){this._model=this.updateModelAccordingToReceivedProps(Is(e)),this._render()}set configuration(e){this._configuration=Es(e),this._render()}onModelChanged(e){this._model=this.updateModelAccordingToReceivedProps(e),this._render(),this.dispatchEvent(new ms.ModelUpdatedEvent(this._model,!1))}insertImage(e){this.dispatchEvent(new ms.InsertImageEvent(e))}onDeleteImage(e,t){this.dispatchEvent(new ms.DeleteImageEvent(e,t))}connectedCallback(){this._render()}_render(){if(this._model){let e=bs.default.createElement(ys.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,hs.createRoot)(this)),this._root.render(e)}}disconnectedCallback(){this._root&&this._root.unmount()}}gs=p.default=Ds;export{gs as default};
@@ -0,0 +1,73 @@
1
+ var lib = {};
2
+
3
+ var interopRequireDefault = {exports: {}};
4
+
5
+ (function (module) {
6
+ function _interopRequireDefault(e) {
7
+ return e && e.__esModule ? e : {
8
+ "default": e
9
+ };
10
+ }
11
+ module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports;
12
+ }(interopRequireDefault));
13
+
14
+ var defaults = {};
15
+
16
+ Object.defineProperty(defaults, "__esModule", {
17
+ value: true
18
+ });
19
+ defaults.default = void 0;
20
+ defaults.default = {
21
+ points: ['', '', '', ''],
22
+ sampleAnswers: [null, null, null, null],
23
+ maxPoints: 3,
24
+ maxPointsEnabled: true,
25
+ excludeZero: false,
26
+ excludeZeroEnabled: true
27
+ };
28
+
29
+ var _interopRequireDefault = interopRequireDefault.exports;
30
+ Object.defineProperty(lib, "__esModule", {
31
+ value: true
32
+ });
33
+ var model_1 = lib.model = model;
34
+ var validate_1 = lib.validate = validate;
35
+ var _defaults = _interopRequireDefault(defaults);
36
+ const normalize = model => ({
37
+ ..._defaults.default,
38
+ ...model
39
+ });
40
+ function model(model, session, env) {
41
+ return new Promise(resolve => {
42
+ const modelResult = normalize(model || {});
43
+ resolve(env && env.role && env.role === 'instructor' ? modelResult : {});
44
+ });
45
+ }
46
+ function markupToText(s) {
47
+ return (s || '').replace(/(<([^>]+)>)/gi, '');
48
+ }
49
+
50
+ // IMPORTANT! If you make any changes to this function, please make sure you also update complex-rubric/controller/validateSimpleRubric function!“.
51
+ function validate(model) {
52
+ const {
53
+ points
54
+ } = model;
55
+ const errors = {};
56
+ const pointsDescriptorsErrors = {};
57
+ (points || []).forEach((point, index) => {
58
+ if (!point || point === '<div></div>') {
59
+ pointsDescriptorsErrors[index] = 'Points descriptors cannot be empty.';
60
+ } else {
61
+ const identicalPointDescr = points.slice(index + 1).some(p => markupToText(p) === markupToText(point));
62
+ if (identicalPointDescr) {
63
+ pointsDescriptorsErrors[index] = 'Points descriptors should be unique.';
64
+ }
65
+ }
66
+ });
67
+ if (Object.keys(pointsDescriptorsErrors).length > 0) {
68
+ errors.pointsDescriptorsErrors = pointsDescriptorsErrors;
69
+ }
70
+ return errors;
71
+ }
72
+
73
+ export { lib as default, model_1 as model, validate_1 as validate };
package/module/demo.js ADDED
@@ -0,0 +1,33 @@
1
+ import Configure from './configure.js';
2
+ import Element from './element.js';
3
+ import * as controller from './controller.js';
4
+
5
+ var generate = {};
6
+
7
+ generate.model = (id, element) => ({
8
+ id,
9
+ element,
10
+ points: ['nothing right', 'a teeny bit right', 'mostly right', 'bingo'],
11
+ sampleAnswers: [null, 'just right', 'not left', null],
12
+ maxPoints: 3,
13
+ excludeZero: false,
14
+ });
15
+
16
+ const { model } = generate;
17
+
18
+ var config = {
19
+ elements: {
20
+ 'pie-rubric': '../..',
21
+ },
22
+ models: [model('1', 'pie-rubric')],
23
+ };
24
+
25
+ //Note: demo-el is a custom element loaded in the markup.
26
+ customElements.whenDefined("demo-el").then(() => {
27
+ config.models.forEach((m) => {
28
+ const de = document.createElement("demo-el");
29
+ document.body.appendChild(de);
30
+ de.def = { tagName: m.element, Element, Configure, controller };
31
+ de.model = m;
32
+ });
33
+ });
@@ -0,0 +1 @@
1
+ import{_dll_react as e,_dll_mui__material_styles as t,_dll_mui__material as n,_dll_mui__material_collapse as i,_dll_pie_lib__render_ui as r,_dll_prop_types as o,_dll_react_dom as l,_dll_debug as s}from"../../../@pie-lib/shared-module@^4.1.0/module/index.js";import{_dll_pie_lib__math_rendering as a}from"../../../@pie-lib/math-rendering-module@^4.1.0/module/index.js";const c=e,{styled:d}=t,{ListItem:h}=n,{List:p}=n,m=i,{color:u}=r,{UiLayout:g}=r,x=o,b=d(g)({color:u.text(),backgroundColor:u.background(),"&:not(.MathJax) table":{borderCollapse:"collapse"},"&:not(.MathJax) table td, &:not(.MathJax) table th":{padding:"8px 12px",textAlign:"left"},"& ul p, & ol p":{marginBottom:0,marginTop:0,lineHeight:"normal"}}),_=d(h)({display:"flex",flexDirection:"column",alignItems:"flex-start",padding:"12px 0px"}),f=d("div")({color:u.text()}),y=d("h3")({color:u.text(),fontSize:"16px",fontWeight:"700",margin:0,paddingBottom:"6px"}),k=d("h4")({color:u.text(),fontSize:"16px",fontWeight:"normal",margin:0,paddingBottom:"6px"}),S=d("h2")(({theme:e})=>({display:"flex",alignItems:"center",cursor:"pointer",userSelect:"none",fontSize:e.typography.fontSize,fontWeight:"500",color:u.tertiary(),margin:0})),E=d("span")({display:"inline-flex",transition:"transform 0.2s",marginLeft:2,alignSelf:"center"}),v=d("h2")({position:"absolute",width:"1px",height:"1px",padding:0,margin:"-1px",overflow:"hidden",clip:"rect(0,0,0,0)",border:0,whiteSpace:"nowrap"}),w=x.shape({excludeZero:x.bool,points:x.arrayOf(x.string),sampleAnswers:x.arrayOf(x.string),animationsDisabled:x.bool});class C extends c.Component{__init(){this.dudUrl="javascript:;"}constructor(e){super(e),C.prototype.__init.call(this),C.prototype.__init2.call(this),this.state={rubricOpen:!1,linkPrefix:"Show"},this.toggleRubric=this.toggleRubric.bind(this)}static __initStatic(){this.propTypes={model:x.object.isRequired,animationsDisabled:x.bool,value:w}}toggleRubric(){this.setState({rubricOpen:!this.state.rubricOpen}),this.setState({linkPrefix:this.state.rubricOpen?"Show":"Hide"})}__init2(){this.shouldRenderPoint=(e,t)=>!t.excludeZero||0!==e}render(){const{model:e,value:t}=this.props;let{animationsDisabled:n}=this.props;if(n=n||t.animationsDisabled,t&&t.points){const{extraCSSRules:i}=e||{},{points:r,sampleAnswers:o}=t,l=c.createElement(p,{component:"nav"},r.slice(0).reverse().map((e,n)=>{n=r.length-n-1;const i=t.excludeZero?n+1:n;return c.createElement(c.Fragment,{key:n},c.createElement(_,{key:`P${n}`},c.createElement(y,null,1===i?`${i} PT`:`${i} PTS`),c.createElement(f,{dangerouslySetInnerHTML:{__html:e}})),o&&o[n]&&c.createElement(_,{key:`S${n}`},c.createElement(k,null,"Sample Answer"),c.createElement(f,{dangerouslySetInnerHTML:{__html:o[n]}})))}));return c.createElement(b,{extraCSSRules:i},c.createElement(v,null,"Rubric"),n?l:c.createElement(c.Fragment,null,c.createElement(S,{id:"rubric-toggle",tabIndex:0,role:"button","aria-expanded":this.state.rubricOpen,onClick:this.toggleRubric,onKeyPress:e=>{"Enter"!==e.key&&" "!==e.key||this.toggleRubric()}},this.state.linkPrefix," Rubric",c.createElement(E,{"aria-hidden":"true"},this.state.rubricOpen?c.createElement("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},c.createElement("polyline",{points:"18 15 12 9 6 15"})):c.createElement("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},c.createElement("polyline",{points:"6 9 12 15 18 9"})))),c.createElement(m,{in:this.state.rubricOpen,timeout:{enter:225,exit:195}},l)))}return null}}C.__initStatic();var R,L=l;R=L.createRoot,L.hydrateRoot;const M=e,O=s,{renderMath:P}=a;class T extends HTMLElement{constructor(){super(),O.log("constructor called"),this.onModelChanged=this.onModelChanged.bind(this),this._root=null}set model(e){this._model=e,this._render()}onModelChanged(e){this._model=e,this._render()}connectedCallback(){this._render()}_render(){if(this._model){const e=M.createElement(C,{value:this._model});this._root||(this._root=R(this)),this._root.render(e),queueMicrotask(()=>{P(this)})}}disconnectedCallback(){this._root&&this._root.unmount()}}export{T as default};
@@ -0,0 +1,21 @@
1
+
2
+ <!doctype html>
3
+ <html>
4
+ <head>
5
+ <title>@pie-element/rubric@7.2.0-next.4</title>
6
+ <script
7
+ type="module"
8
+ src="https://cdn.jsdelivr.net/npm/@pslb/demo-el@^1.0.0/dist/demo-el/demo-el.esm.js"></script>
9
+
10
+ <link
11
+ href="https://fonts.googleapis.com/css?family=Roboto&display=swap"
12
+ rel="stylesheet"
13
+ />
14
+ <style>
15
+ html, body {
16
+ font-family: 'Roboto', sans-serif;
17
+ }
18
+ </style>
19
+ <script type="module" src="./demo.js"></script>
20
+ </head>
21
+ </html>
@@ -0,0 +1,14 @@
1
+ {
2
+ "name": "@pie-element/rubric",
3
+ "version": "7.2.0-next.4",
4
+ "modules": [
5
+ {
6
+ "name": "@pie-lib/shared-module",
7
+ "version": "^4.1.0"
8
+ },
9
+ {
10
+ "name": "@pie-lib/math-rendering-module",
11
+ "version": "^4.1.0"
12
+ }
13
+ ]
14
+ }
@@ -0,0 +1,71 @@
1
+ import PrintElement from './print.js';
2
+
3
+ var generate = {};
4
+
5
+ generate.model = (id, element) => ({
6
+ id,
7
+ element,
8
+ points: ['nothing right', 'a teeny bit right', 'mostly right', 'bingo'],
9
+ sampleAnswers: [null, 'just right', 'not left', null],
10
+ maxPoints: 3,
11
+ excludeZero: false,
12
+ });
13
+
14
+ const { model } = generate;
15
+
16
+ var config = {
17
+ elements: {
18
+ 'pie-rubric': '../..',
19
+ },
20
+ models: [model('1', 'pie-rubric')],
21
+ };
22
+
23
+ // new init - just shows off print!
24
+
25
+ const init = async () => {
26
+ console.log('define the element...');
27
+ await Promise.all(
28
+ config.models.map(async (m) => {
29
+ try {
30
+ const printTag = `${m.element}-print`;
31
+ if (customElements.get(printTag)) {
32
+ return true;
33
+ } else {
34
+ customElements.define(printTag, PrintElement);
35
+ await customElements.whenDefined(printTag);
36
+ return true;
37
+ }
38
+ } catch (e) {
39
+ return false;
40
+ }
41
+ })
42
+ );
43
+
44
+ console.log('now apply the model...');
45
+ config.models.forEach((m) => {
46
+ const printTag = `${m.element}-print`;
47
+ const h3s = document.createElement('h3');
48
+ h3s.textContent = 'student mode';
49
+ document.body.appendChild(h3s);
50
+ const de = document.createElement(printTag);
51
+ document.body.appendChild(de);
52
+ de.options = {};
53
+ de.model = m;
54
+
55
+ const h3 = document.createElement('h3');
56
+ h3.textContent = 'instructor mode';
57
+ document.body.appendChild(h3);
58
+ const instr = document.createElement(printTag);
59
+ document.body.appendChild(instr);
60
+ instr.options = { mode: 'instructor' };
61
+ instr.model = JSON.parse(JSON.stringify(m));
62
+ });
63
+ };
64
+
65
+ init()
66
+ .then(() => {
67
+ console.log('ready');
68
+ })
69
+ .catch((e) => {
70
+ console.error(e);
71
+ });
@@ -0,0 +1,18 @@
1
+
2
+ <!doctype html>
3
+ <html>
4
+ <head>
5
+ <title>@pie-element/rubric@7.2.0-next.4</title>
6
+ <link
7
+ href="https://fonts.googleapis.com/css?family=Roboto&display=swap"
8
+ rel="stylesheet"
9
+ />
10
+ <style>
11
+ html, body {
12
+ font-family: 'Roboto', sans-serif;
13
+ }
14
+ </style>
15
+ <script type="module" src="./print-demo.js"></script>
16
+ </head>
17
+ <body></body>
18
+ </html>
@@ -0,0 +1 @@
1
+ import{_dll_react_dom as e,_dll_react as t,_dll_mui__material_styles as n,_dll_mui__material as r,_dll_mui__material_collapse as i,_dll_pie_lib__render_ui as o,_dll_prop_types as l,_dll_debug as a}from"../../../@pie-lib/shared-module@^4.1.0/module/index.js";import{_dll_pie_lib__math_rendering as s}from"../../../@pie-lib/math-rendering-module@^4.1.0/module/index.js";var c,u=e;c=u.createRoot,u.hydrateRoot;var p="object"==typeof global&&global&&global.Object===Object&&global,d="object"==typeof self&&self&&self.Object===Object&&self,h=p||d||Function("return this")(),m=h.Symbol,f=Object.prototype,g=f.hasOwnProperty,b=f.toString,v=m?m.toStringTag:void 0;var x=Object.prototype.toString;var y=m?m.toStringTag:void 0;function _(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":y&&y in Object(e)?function(e){var t=g.call(e,v),n=e[v];try{e[v]=void 0;var r=!0}catch(e){}var i=b.call(e);return r&&(t?e[v]=n:delete e[v]),i}(e):function(e){return x.call(e)}(e)}var S=/\s/;var k=/^\s+/;function E(e){return e?e.slice(0,function(e){for(var t=e.length;t--&&S.test(e.charAt(t)););return t}(e)+1).replace(k,""):e}function j(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}var O=/^[-+]0x[0-9a-f]+$/i,w=/^0b[01]+$/i,T=/^0o[0-7]+$/i,R=parseInt;function L(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return null!=e&&"object"==typeof e}(e)&&"[object Symbol]"==_(e)}(e))return NaN;if(j(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=j(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=E(e);var n=w.test(e);return n||T.test(e)?R(e.slice(2),n?2:8):O.test(e)?NaN:+e}var C=function(){return h.Date.now()},M=Math.max,P=Math.min;function D(e,t,n){var r,i,o,l,a,s,c=0,u=!1,p=!1,d=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function h(t){var n=r,o=i;return r=i=void 0,c=t,l=e.apply(o,n)}function m(e){var n=e-s;return void 0===s||n>=t||n<0||p&&e-c>=o}function f(){var e=C();if(m(e))return g(e);a=setTimeout(f,function(e){var n=t-(e-s);return p?P(n,o-(e-c)):n}(e))}function g(e){return a=void 0,d&&r?h(e):(r=i=void 0,l)}function b(){var e=C(),n=m(e);if(r=arguments,i=this,s=e,n){if(void 0===a)return function(e){return c=e,a=setTimeout(f,t),u?h(e):l}(s);if(p)return clearTimeout(a),a=setTimeout(f,t),h(s)}return void 0===a&&(a=setTimeout(f,t)),l}return t=L(t)||0,j(n)&&(u=!!n.leading,o=(p="maxWait"in n)?M(L(n.maxWait)||0,t):o,d="trailing"in n?!!n.trailing:d),b.cancel=function(){void 0!==a&&clearTimeout(a),c=0,r=s=i=a=void 0},b.flush=function(){return void 0===a?l:g(C())},b}const I=t,{styled:W}=n,{ListItem:$}=r,{List:A}=r,B=i,{color:H}=o,{UiLayout:N}=o,z=l,F=W(N)({color:H.text(),backgroundColor:H.background(),"&:not(.MathJax) table":{borderCollapse:"collapse"},"&:not(.MathJax) table td, &:not(.MathJax) table th":{padding:"8px 12px",textAlign:"left"},"& ul p, & ol p":{marginBottom:0,marginTop:0,lineHeight:"normal"}}),J=W($)({display:"flex",flexDirection:"column",alignItems:"flex-start",padding:"12px 0px"}),U=W("div")({color:H.text()}),Z=W("h3")({color:H.text(),fontSize:"16px",fontWeight:"700",margin:0,paddingBottom:"6px"}),q=W("h4")({color:H.text(),fontSize:"16px",fontWeight:"normal",margin:0,paddingBottom:"6px"}),K=W("h2")(({theme:e})=>({display:"flex",alignItems:"center",cursor:"pointer",userSelect:"none",fontSize:e.typography.fontSize,fontWeight:"500",color:H.tertiary(),margin:0})),G=W("span")({display:"inline-flex",transition:"transform 0.2s",marginLeft:2,alignSelf:"center"}),Q=W("h2")({position:"absolute",width:"1px",height:"1px",padding:0,margin:"-1px",overflow:"hidden",clip:"rect(0,0,0,0)",border:0,whiteSpace:"nowrap"}),V=z.shape({excludeZero:z.bool,points:z.arrayOf(z.string),sampleAnswers:z.arrayOf(z.string),animationsDisabled:z.bool});class X extends I.Component{__init(){this.dudUrl="javascript:;"}constructor(e){super(e),X.prototype.__init.call(this),X.prototype.__init2.call(this),this.state={rubricOpen:!1,linkPrefix:"Show"},this.toggleRubric=this.toggleRubric.bind(this)}static __initStatic(){this.propTypes={model:z.object.isRequired,animationsDisabled:z.bool,value:V}}toggleRubric(){this.setState({rubricOpen:!this.state.rubricOpen}),this.setState({linkPrefix:this.state.rubricOpen?"Show":"Hide"})}__init2(){this.shouldRenderPoint=(e,t)=>!t.excludeZero||0!==e}render(){const{model:e,value:t}=this.props;let{animationsDisabled:n}=this.props;if(n=n||t.animationsDisabled,t&&t.points){const{extraCSSRules:r}=e||{},{points:i,sampleAnswers:o}=t,l=I.createElement(A,{component:"nav"},i.slice(0).reverse().map((e,n)=>{n=i.length-n-1;const r=t.excludeZero?n+1:n;return I.createElement(I.Fragment,{key:n},I.createElement(J,{key:`P${n}`},I.createElement(Z,null,1===r?`${r} PT`:`${r} PTS`),I.createElement(U,{dangerouslySetInnerHTML:{__html:e}})),o&&o[n]&&I.createElement(J,{key:`S${n}`},I.createElement(q,null,"Sample Answer"),I.createElement(U,{dangerouslySetInnerHTML:{__html:o[n]}})))}));return I.createElement(F,{extraCSSRules:r},I.createElement(Q,null,"Rubric"),n?l:I.createElement(I.Fragment,null,I.createElement(K,{id:"rubric-toggle",tabIndex:0,role:"button","aria-expanded":this.state.rubricOpen,onClick:this.toggleRubric,onKeyPress:e=>{"Enter"!==e.key&&" "!==e.key||this.toggleRubric()}},this.state.linkPrefix," Rubric",I.createElement(G,{"aria-hidden":"true"},this.state.rubricOpen?I.createElement("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},I.createElement("polyline",{points:"18 15 12 9 6 15"})):I.createElement("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},I.createElement("polyline",{points:"6 9 12 15 18 9"})))),I.createElement(B,{in:this.state.rubricOpen,timeout:{enter:225,exit:195}},l)))}return null}}X.__initStatic();const Y=t,ee=a,{renderMath:te}=s,ne=ee("pie-element:rubric:print");class re extends HTMLElement{constructor(){super(),this._options=null,this._model=null,this._session=[],this._root=null,this._rerender=D(()=>{if(this._model&&this._session){const t=(e=this._model,"instructor"===this._options.role?(e.value={...e},e.mode="evaluate",e.animationsDisabled=!0,e):{}),n=this._options&&Y.createElement(X,{...t});this._root||(this._root=c(this)),this._root.render(n),queueMicrotask(()=>{ne("render complete - render math"),te(this)})}else ne("skip");var e},50,{leading:!1,trailing:!0})}set options(e){this._options=e}set model(e){this._model=e,this._rerender()}connectedCallback(){}disconnectedCallback(){this._root&&this._root.unmount()}}export{re as default};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pie-element/rubric",
3
3
  "repository": "pie-framework/pie-elements",
4
- "version": "7.2.0-next.4",
4
+ "version": "7.2.0-next.5",
5
5
  "main": "lib/index.js",
6
6
  "module": "src/index.js",
7
7
  "exports": {
@@ -30,7 +30,7 @@
30
30
  },
31
31
  "author": "pie framework developers",
32
32
  "license": "ISC",
33
- "gitHead": "8ab147d04d240a5b4bf690ba41ab737726adcb6f",
33
+ "gitHead": "e9c9eb021e31f961170c60e147b17fc6a9f56957",
34
34
  "scripts": {
35
35
  "postpublish": "../../scripts/postpublish"
36
36
  }