@pie-element/complex-rubric 6.0.0-next.42 → 6.0.0-next.43

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.
@@ -0,0 +1 @@
1
+ import{_dll_react as e,_dll_mui__material_styles as t,_dll_mui__material as r,_dll_mui__material_collapse as n,_dll_pie_lib__render_ui as o,_dll_prop_types as i,_dll_react_dom as a,_dll_debug as s,_dll_mui__icons_material as l,_dll_lodash as c}from"../../../@pie-lib/shared-module@^3.0.5/module/index.js";import{_dll_pie_lib__math_rendering as d}from"../../../@pie-lib/math-rendering-module@^4.0.5/module/index.js";import{_dll_pie_lib__editable_html_tip_tap as p}from"../../../@pie-lib/editable-html-module@^6.0.5/module/index.js";import{_dll_pie_lib__config_ui as u}from"../../../@pie-lib/config-module@^3.0.0/module/index.js";const g=e,{styled:m}=t,{ListItem:f}=r,{List:b}=r,h=n,{color:y}=o,{UiLayout:v}=o,x=i,E=m(v)({color:y.text(),backgroundColor:y.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"}}),I=m(f)({display:"flex",flexDirection:"column",alignItems:"flex-start",padding:"12px 0px"}),D=m("div")({color:y.text()}),w=m("h3")({color:y.text(),fontSize:"16px",fontWeight:"700",margin:0,paddingBottom:"6px"}),S=m("h4")({color:y.text(),fontSize:"16px",fontWeight:"normal",margin:0,paddingBottom:"6px"}),C=m("h2")(({theme:e})=>({display:"flex",alignItems:"center",cursor:"pointer",userSelect:"none",fontSize:e.typography.fontSize,fontWeight:"500",color:y.tertiary(),margin:0})),A=m("span")({display:"inline-flex",transition:"transform 0.2s",marginLeft:2,alignSelf:"center"}),P=m("h2")({position:"absolute",width:"1px",height:"1px",padding:0,margin:"-1px",overflow:"hidden",clip:"rect(0,0,0,0)",border:0,whiteSpace:"nowrap"}),O=x.shape({excludeZero:x.bool,points:x.arrayOf(x.string),sampleAnswers:x.arrayOf(x.string),animationsDisabled:x.bool});class R extends g.Component{__init(){this.dudUrl="javascript:;"}constructor(e){super(e),R.prototype.__init.call(this),R.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:O}}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:r}=this.props;if(r=r||t.animationsDisabled,t&&t.points){const{extraCSSRules:n}=e||{},{points:o,sampleAnswers:i}=t,a=g.createElement(b,{component:"nav"},o.slice(0).reverse().map((e,r)=>{r=o.length-r-1;const n=t.excludeZero?r+1:r;return g.createElement(g.Fragment,{key:r},g.createElement(I,{key:`P${r}`},g.createElement(w,null,1===n?`${n} PT`:`${n} PTS`),g.createElement(D,{dangerouslySetInnerHTML:{__html:e}})),i&&i[r]&&g.createElement(I,{key:`S${r}`},g.createElement(S,null,"Sample Answer"),g.createElement(D,{dangerouslySetInnerHTML:{__html:i[r]}})))}));return g.createElement(E,{extraCSSRules:n},g.createElement(P,null,"Rubric"),r?a:g.createElement(g.Fragment,null,g.createElement(C,{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",g.createElement(A,{"aria-hidden":"true"},this.state.rubricOpen?g.createElement("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},g.createElement("polyline",{points:"18 15 12 9 6 15"})):g.createElement("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},g.createElement("polyline",{points:"6 9 12 15 18 9"})))),g.createElement(h,{in:this.state.rubricOpen,timeout:{enter:225,exit:195}},a)))}return null}}R.__initStatic();var _,B=a;_=B.createRoot,B.hydrateRoot;const N=e,T=s,{renderMath:L}=d;class M extends HTMLElement{constructor(){super(),T.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=N.createElement(R,{value:this._model});this._root||(this._root=_(this)),this._root.render(e),queueMicrotask(()=>{L(this)})}}disconnectedCallback(){this._root&&this._root.unmount()}}var k={};Object.defineProperty(k,"__esModule",{value:!0});class G extends CustomEvent{constructor(e,t,r){super(G.TYPE,{bubbles:!0,composed:!0,detail:{complete:t,component:e,hasModel:r}}),this.component=e,this.complete=t}}G.TYPE="model-set";var W=k.ModelSetEvent=G;class F extends CustomEvent{constructor(e,t){super(F.TYPE,{bubbles:!0,composed:!0,detail:{complete:t,component:e}}),this.component=e,this.complete=t}}F.TYPE="session-changed",k.SessionChangedEvent=F;const $=e,j=i,{styled:H}=t,{color:U}=o,q=H("td")({color:U.primaryDark(),verticalAlign:"middle"}),V=H("div")({color:U.secondaryBackground(),textAlign:"center"}),z=e=>{const{trait:t,traitIndex:r,scaleIndex:n,showStandards:o,showDescription:i,scorePointsValues:a}=e,{name:s,standards:l,scorePointsDescriptors:c,description:d}=t||{};return $.createElement("tr",{key:`scale-${n}-trait-${r}`},$.createElement(q,null,$.createElement("div",{dangerouslySetInnerHTML:{__html:s}})),o?$.createElement("td",null,$.createElement("div",{dangerouslySetInnerHTML:{__html:l.join(",")}})):null,i?$.createElement("td",null,$.createElement("div",{dangerouslySetInnerHTML:{__html:d}})):null,a&&a.map((e,t)=>{let r;try{r=c[a.length-t-1]||""}catch(e){r=""}return $.createElement("td",{key:`table-cell-${t}`},r?$.createElement("div",{dangerouslySetInnerHTML:{__html:r}}):$.createElement(V,{dangerouslySetInnerHTML:{__html:"No Description"}}))}))};z.propTypes={showStandards:j.bool,showDescription:j.bool,scorePointsValues:j.arrayOf(j.number),scaleIndex:j.number,traitIndex:j.number,trait:j.shape({name:j.string,standards:j.arrayOf(j.string),scorePointsDescriptors:j.arrayOf(j.string),description:j.string})};const Y=e,Z=i,{styled:J}=t,{color:X}=o,{ArrowBackIos:K}=l,{ArrowForwardIos:Q}=l,ee=J("div")({display:"flex",position:"relative"}),te=J("div")({width:"100%",overflow:"auto"}),re=J("table")(({theme:e})=>({borderSpacing:0,marginBottom:e.spacing(2),borderRadius:"4px",color:X.text(),fontSize:e.typography.fontSize,lineHeight:"16px",overflow:"unset","& ul, ol":{marginBlockStart:0,paddingInlineStart:e.spacing(2)},"& th":{padding:e.spacing(2),textAlign:"left",backgroundColor:X.secondaryBackground(),verticalAlign:"bottom"},"& th div":{width:"200px"},"& td":{width:"200px",padding:`${e.spacing(2)} ${e.spacing(1)}`,verticalAlign:"top"}})),ne=J("table")({"& td":{border:0,padding:0,textAlign:"center",minWidth:"200px"}}),oe=J("div")({marginBottom:"4px"}),ie=J("td")({fontWeight:"normal"}),ae=({show:e,onClick:t,extraStyles:r,children:n})=>Y.createElement("div",{style:{height:"calc(100% - 1px)",top:"1px",display:e?"flex":"none",width:"50px",margin:"auto",position:"absolute",alignItems:"center",justifyContent:"center",cursor:"pointer",...r},onClick:t},n);ae.propTypes={show:Z.bool,onClick:Z.func,extraStyles:Z.object,children:Z.object};class se extends Y.Component{constructor(...e){super(...e),se.prototype.__init.call(this),se.prototype.__init2.call(this),se.prototype.__init3.call(this)}__init(){this.state={}}componentDidMount(){this.tableWrapper&&this.tableWrapper.offsetWidth<this.tableWrapper.scrollWidth&&this.setState({showRight:!0})}__init2(){this.scrollLeft=()=>{this.tableWrapper.scrollLeft-=this.tableWrapper.offsetWidth/2,this.setState({showRight:this.tableWrapper.scrollLeft<this.tableWrapper.scrollWidth,showLeft:this.tableWrapper.scrollLeft<this.tableWrapper.scrollWidth&&this.tableWrapper.scrollLeft>0})}}__init3(){this.scrollRight=()=>{const e=this.tableWrapper.scrollLeft;this.tableWrapper.scrollLeft+=this.tableWrapper.offsetWidth/2,this.setState({showRight:e!==this.tableWrapper.scrollLeft&&this.tableWrapper.scrollLeft<this.tableWrapper.scrollWidth,showLeft:this.tableWrapper.scrollLeft<this.tableWrapper.scrollWidth&&this.tableWrapper.scrollLeft>0})}}render(){const{showRight:e,showLeft:t}=this.state,{scale:r,scaleIndex:n,showDescription:o,showPointsLabels:i,showStandards:a,arrowsDisabled:s}=this.props,{excludeZero:l,maxPoints:c,traitLabel:d,traits:p,scorePointsLabels:u}=r||{};let g,m,f,b=[];try{for(let e=c;e>=l;e-=1)b.push(e);const{traitStandards:e,traitDescriptions:t}=p.reduce((e,t)=>({traitStandards:[...e.traitStandards,...t.standards||[]],traitDescriptions:[...e.traitDescriptions,...t.description||[]]}),{traitStandards:[],traitDescriptions:[]});g=o&&t.length,m=i&&u.length,f=a&&e.length}catch(e){g=!1,m=!1,f=!1}return Y.createElement(ee,null,Y.createElement(ae,{show:t&&!s,onClick:this.scrollLeft,extraStyles:{left:0,background:`linear-gradient(to right, white, ${X.background()})`}},Y.createElement(K,null)),Y.createElement(te,{ref:e=>{this.tableWrapper=e},onScroll:()=>{this.setState({showRight:this.tableWrapper.scrollLeft+this.tableWrapper.offsetWidth<this.tableWrapper.scrollWidth-5&&this.tableWrapper.scrollLeft<this.tableWrapper.scrollWidth,showLeft:this.tableWrapper.scrollLeft<this.tableWrapper.scrollWidth&&this.tableWrapper.scrollLeft>0})}},s&&(e||t)?Y.createElement("div",null,"The item is too large to fit in print mode."):null,Y.createElement(re,{key:`scale-${n}`},Y.createElement("thead",null,Y.createElement("tr",null,Y.createElement("th",null,Y.createElement("div",{dangerouslySetInnerHTML:{__html:d}})),f?Y.createElement("th",null,Y.createElement("div",null,"Standard(s)")):null,g?Y.createElement("th",null,Y.createElement("div",null,"Description")):null,b&&b.map((e,t)=>{let r="";try{r=u[b.length-t-1]||""}catch(e){r=""}return Y.createElement("th",{key:`table-header-${t}`},Y.createElement(ne,null,Y.createElement("thead",null,m?Y.createElement("tr",null,Y.createElement("td",null,Y.createElement(oe,{dangerouslySetInnerHTML:{__html:r}}))):null,Y.createElement("tr",null,Y.createElement(ie,null,1===e?`${e} point`:`${e} points`)))))}))),Y.createElement("tbody",null,p&&p.map((e,t)=>Y.createElement(z,{key:`trait_${n}_${t}`,trait:e,traitIndex:t,showDescription:!!g,showStandards:!!f,scaleIndex:n,scorePointsValues:b,excludeZero:l}))))),Y.createElement(ae,{show:e&&!s,onClick:this.scrollRight,extraStyles:{right:0,background:`linear-gradient(to left, white, ${X.background()})`}},Y.createElement(Q,null)))}}se.propTypes={scaleIndex:Z.number,scale:Z.shape({excludeZero:Z.bool,maxPoints:Z.number,scorePointsLabels:Z.arrayOf(Z.string),traitLabel:Z.string,traits:Z.arrayOf(Z.shape({name:Z.string,standards:Z.arrayOf(Z.string),scorePointsDescriptors:Z.arrayOf(Z.string),description:Z.string}))}),showPointsLabels:Z.bool,showDescription:Z.bool,showStandards:Z.bool,arrowsDisabled:Z.bool};const le=e,ce=i,{Link:de}=r,pe=n,{color:ue}=o,{UiLayout:ge}=o;class me extends le.Component{constructor(e){super(e),this.state={rubricOpen:!1,linkPrefix:"Show"},this.toggleRubric=this.toggleRubric.bind(this)}toggleRubric(){this.setState({rubricOpen:!this.state.rubricOpen}),this.setState({linkPrefix:this.state.rubricOpen?"Show":"Hide"})}render(){const{model:e}=this.props;let{animationsDisabled:t}=this.props;const{extraCSSRules:r,halfScoring:n,scales:o,visible:i,pointLabels:a,description:s,standards:l,arrowsDisabled:c}=e||{};if(t=t||e.animationsDisabled,!o||!i)return null;const d=le.createElement(ge,{extraCSSRules:r,style:{fontFamily:"Cerebri Sans",color:ue.text(),backgroundColor:ue.background()}},n?le.createElement("div",{style:{marginBottom:"16px"}},"* Half-point or in-between scores are permitted under this rubric."):null,o.map((e,t)=>le.createElement(se,{key:`scale_${t}`,scale:e,scaleIndex:t,showPointsLabels:a,showDescription:s,showStandards:l,arrowsDisabled:c})));return t?d:le.createElement(ge,{extraCSSRules:r,style:{color:ue.text(),backgroundColor:ue.background()}},le.createElement(de,{style:{backgroundColor:ue.background()},href:this.dudUrl,onClick:this.toggleRubric},this.state.linkPrefix," Rubric"),le.createElement(pe,{style:{marginTop:"16px"},in:this.state.rubricOpen,timeout:{enter:225,exit:195}},d))}}me.propTypes={model:ce.shape({halfScoring:ce.bool,scales:ce.arrayOf(ce.shape({excludeZero:ce.bool,maxPoints:ce.number,scorePointsLabels:ce.arrayOf(ce.string),traitLabel:ce.string,traits:ce.arrayOf(ce.shape({name:ce.string,description:ce.string,scorePointsDescriptors:ce.arrayOf(ce.string),standards:ce.arrayOf(ce.string)}))})),visible:ce.bool,pointLabels:ce.bool,description:ce.bool,standards:ce.bool,animationsDisabled:ce.bool}),animationsDisabled:ce.bool};const fe=e,{renderMath:be}=d;class he extends HTMLElement{constructor(){super(),this._model={},this._session=null,this._root=null}set model(e){this._model=e,this.dispatchEvent(new W(this.tagName.toLowerCase(),this._session,!!this._model)),this._render()}set session(e){this._session=e}get session(){return this._session}connectedCallback(){this._render()}_render(){const e=fe.createElement(me,{model:this._model,session:this._session});this._root||(this._root=_(this)),this._root.render(e),queueMicrotask(()=>{be(this)})}disconnectedCallback(){this._root&&this._root.unmount()}}function ye(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 ve="function"==typeof Symbol&&Symbol.observable||"@@observable",xe=()=>Math.random().toString(36).substring(7).split("").join("."),Ee={INIT:`@@redux/INIT${xe()}`,REPLACE:`@@redux/REPLACE${xe()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${xe()}`};function Ie(e,t,r){if("function"!=typeof e)throw new Error(ye(2));if("function"==typeof t&&"function"==typeof r||"function"==typeof r&&"function"==typeof arguments[3])throw new Error(ye(0));if("function"==typeof t&&void 0===r&&(r=t,t=void 0),void 0!==r){if("function"!=typeof r)throw new Error(ye(1));return r(Ie)(e,t)}let n=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(ye(3));return o}function p(e){if("function"!=typeof e)throw new Error(ye(4));if(l)throw new Error(ye(5));let t=!0;c();const r=s++;return a.set(r,e),function(){if(t){if(l)throw new Error(ye(6));t=!1,c(),a.delete(r),i=null}}}function u(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(ye(7));if(void 0===e.type)throw new Error(ye(8));if("string"!=typeof e.type)throw new Error(ye(17));if(l)throw new Error(ye(9));try{l=!0,o=n(o,e)}finally{l=!1}return(i=a).forEach(e=>{e()}),e}u({type:Ee.INIT});return{dispatch:u,subscribe:p,getState:d,replaceReducer:function(e){if("function"!=typeof e)throw new Error(ye(10));n=e,u({type:Ee.REPLACE})},[ve]:function(){const e=p;return{subscribe(t){if("object"!=typeof t||null===t)throw new Error(ye(11));function r(){const e=t;e.next&&e.next(d())}r();return{unsubscribe:e(r)}},[ve](){return this}}}}}function De(e,t){return function(...r){return t(e.apply(this,r))}}function we(e,t){if("function"==typeof e)return De(e,t);if("object"!=typeof e||null===e)throw new Error(ye(16));const r={};for(const n in e){const o=e[n];"function"==typeof o&&(r[n]=De(o,t))}return r}function Se(...e){return 0===e.length?e=>e:1===e.length?e[0]:e.reduce((e,t)=>(...r)=>e(t(...r)))}var Ce={exports:{}},Ae={};var Pe=e;var Oe="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},Re=Pe.useSyncExternalStore,_e=Pe.useRef,Be=Pe.useEffect,Ne=Pe.useMemo,Te=Pe.useDebugValue;Ae.useSyncExternalStoreWithSelector=function(e,t,r,n,o){var i=_e(null);if(null===i.current){var a={hasValue:!1,value:null};i.current=a}else a=i.current;i=Ne(function(){function e(e){if(!l){if(l=!0,i=e,e=n(e),void 0!==o&&a.hasValue){var t=a.value;if(o(t,e))return s=t}return s=e}if(t=s,Oe(i,e))return t;var r=n(e);return void 0!==o&&o(t,r)?(i=e,t):(i=e,s=r)}var i,s,l=!1,c=void 0===r?null:r;return[function(){return e(t())},null===c?void 0:function(){return e(c())}]},[t,r,n,o]);var s=Re(e,i[0],i[1]);return Be(function(){a.hasValue=!0,a.value=s},[s]),Te(s),s},Ce.exports=Ae;const Le=e;var Me=Le.version.startsWith("19"),ke=Symbol.for(Me?"react.transitional.element":"react.element"),Ge=Symbol.for("react.portal"),We=Symbol.for("react.fragment"),Fe=Symbol.for("react.strict_mode"),$e=Symbol.for("react.profiler"),je=Symbol.for("react.consumer"),He=Symbol.for("react.context"),Ue=Symbol.for("react.forward_ref"),qe=Symbol.for("react.suspense"),Ve=Symbol.for("react.suspense_list"),ze=Symbol.for("react.memo"),Ye=Symbol.for("react.lazy"),Ze=Ue,Je=ze;function Xe(e){return function(e){if("object"==typeof e&&null!==e){const{$$typeof:t}=e;switch(t){case ke:switch(e=e.type){case We:case $e:case Fe:case qe:case Ve:return e;default:switch(e=e&&e.$$typeof){case He:case Ue:case Ye:case ze:case je:return e;default:return t}}case Ge:return t}}}(e)===ze}function Ke(e,t,r,n,{areStatesEqual:o,areOwnPropsEqual:i,areStatePropsEqual:a}){let s,l,c,d,p,u=!1;function g(u,g){const m=!i(g,l),f=!o(u,s,g,l);return s=u,l=g,m&&f?(c=e(s,l),t.dependsOnOwnProps&&(d=t(n,l)),p=r(c,d,l),p):m?(e.dependsOnOwnProps&&(c=e(s,l)),t.dependsOnOwnProps&&(d=t(n,l)),p=r(c,d,l),p):f?function(){const t=e(s,l),n=!a(t,c);return c=t,n&&(p=r(c,d,l)),p}():p}return function(o,i){return u?g(o,i):(s=o,l=i,c=e(s,l),d=t(n,l),p=r(c,d,l),u=!0,p)}}function Qe(e){return function(t){const r=e(t);function n(){return r}return n.dependsOnOwnProps=!1,n}}function et(e){return e.dependsOnOwnProps?Boolean(e.dependsOnOwnProps):1!==e.length}function tt(e,t){return function(t,{displayName:r}){const n=function(e,t){return n.dependsOnOwnProps?n.mapToProps(e,t):n.mapToProps(e,void 0)};return n.dependsOnOwnProps=!0,n.mapToProps=function(t,r){n.mapToProps=e,n.dependsOnOwnProps=et(e);let o=n(t,r);return"function"==typeof o&&(n.mapToProps=o,n.dependsOnOwnProps=et(o),o=n(t,r)),o},n}}function rt(e,t){return(r,n)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${n.wrappedComponentName}.`)}}function nt(e,t,r){return{...r,...e,...t}}var ot={notify(){},get:()=>[]};function it(e,t){let r,n=ot,o=0,i=!1;function a(){c.onStateChange&&c.onStateChange()}function s(){o++,r||(r=t?t.addNestedSub(a):e.subscribe(a),n=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 r=e;for(;r;)t.push(r),r=r.next;return t},subscribe(r){let n=!0;const o=t={callback:r,next:null,prev:t};return o.prev?o.prev.next=o:e=o,function(){n&&null!==e&&(n=!1,o.next?o.next.prev=o.prev:t=o.prev,o.prev?o.prev.next=o.next:e=o.next)}}}}())}function l(){o--,r&&0===o&&(r(),r=void 0,n.clear(),n=ot)}const c={addNestedSub:function(e){s();const t=n.subscribe(e);let r=!1;return()=>{r||(r=!0,t(),l())}},notifyNestedSubs:function(){n.notify()},handleChangeWrapper:a,isSubscribed:function(){return i},trySubscribe:function(){i||(i=!0,s())},tryUnsubscribe:function(){i&&(i=!1,l())},getListeners:()=>n};return c}var at=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),st="undefined"!=typeof navigator&&"ReactNative"===navigator.product,lt=at||st?Le.useLayoutEffect:Le.useEffect;function ct(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function dt(e,t){if(ct(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(let n=0;n<r.length;n++)if(!Object.prototype.hasOwnProperty.call(t,r[n])||!ct(e[r[n]],t[r[n]]))return!1;return!0}var pt={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},ut={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},gt={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},mt={[Ze]:{$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},[Je]:gt};function ft(e){return Xe(e)?gt:mt[e.$$typeof]||pt}var bt=Object.defineProperty,ht=Object.getOwnPropertyNames,yt=Object.getOwnPropertySymbols,vt=Object.getOwnPropertyDescriptor,xt=Object.getPrototypeOf,Et=Object.prototype;function It(e,t){if("string"!=typeof t){if(Et){const r=xt(t);r&&r!==Et&&It(e,r)}let r=ht(t);yt&&(r=r.concat(yt(t)));const n=ft(e),o=ft(t);for(let i=0;i<r.length;++i){const a=r[i];if(!(ut[a]||o&&o[a]||n&&n[a])){const r=vt(t,a);try{bt(e,a,r)}catch(e){}}}}return e}var Dt=Symbol.for("react-redux-context"),wt="undefined"!=typeof globalThis?globalThis:{};var St=function(){if(!Le.createContext)return{};const e=wt[Dt]??=new Map;let t=e.get(Le.createContext);return t||(t=Le.createContext(null),e.set(Le.createContext,t)),t}(),Ct=[null,null];function At(e,t,r,n,o,i){e.current=n,r.current=!1,o.current&&(o.current=null,i())}function Pt(e,t){return e===t}var Ot=function(e,t,r,{pure:n,areStatesEqual:o=Pt,areOwnPropsEqual:i=dt,areStatePropsEqual:a=dt,areMergedPropsEqual:s=dt,forwardRef:l=!1,context:c=St}={}){const d=c,p=function(e){return e?"function"==typeof e?tt(e):rt(e,"mapStateToProps"):Qe(()=>({}))}(e),u=function(e){return e&&"object"==typeof e?Qe(t=>function(e,t){const r={};for(const n in e){const o=e[n];"function"==typeof o&&(r[n]=(...e)=>t(o(...e)))}return r}(e,t)):e?"function"==typeof e?tt(e):rt(e,"mapDispatchToProps"):Qe(e=>({dispatch:e}))}(t),g=function(e){return e?"function"==typeof e?function(e){return function(t,{displayName:r,areMergedPropsEqual:n}){let o,i=!1;return function(t,r,a){const s=e(t,r,a);return i?n(s,o)||(o=s):(i=!0,o=s),o}}}(e):rt(e,"mergeProps"):()=>nt}(r),m=Boolean(e);return e=>{const t=e.displayName||e.name||"Component",r=`Connect(${t})`,n={shouldHandleStateChanges:m,displayName:r,wrappedComponentName:t,WrappedComponent:e,initMapStateToProps:p,initMapDispatchToProps:u,initMergeProps:g,areStatesEqual:o,areStatePropsEqual:a,areOwnPropsEqual:i,areMergedPropsEqual:s};function c(t){const[r,o,i]=Le.useMemo(()=>{const{reactReduxForwardedRef:e,...r}=t;return[t.context,e,r]},[t]),a=Le.useMemo(()=>{let e=d;return function(e){let t,r=e[0],n=1;for(;n<e.length;){const o=e[n],i=e[n+1];if(n+=2,("optionalAccess"===o||"optionalCall"===o)&&null==r)return;"access"===o||"optionalAccess"===o?(t=r,r=i(r)):"call"!==o&&"optionalCall"!==o||(r=i((...e)=>r.call(t,...e)),t=void 0)}}([r,"optionalAccess",e=>e.Consumer]),e},[r,d]),s=Le.useContext(a),l=Boolean(t.store)&&Boolean(t.store.getState)&&Boolean(t.store.dispatch),c=Boolean(s)&&Boolean(s.store),p=l?t.store:s.store,u=c?s.getServerState:p.getState,g=Le.useMemo(()=>function(e,{initMapStateToProps:t,initMapDispatchToProps:r,initMergeProps:n,...o}){return Ke(t(e,o),r(e,o),n(e,o),e,o)}(p.dispatch,n),[p]),[f,b]=Le.useMemo(()=>{if(!m)return Ct;const e=it(p,l?void 0:s.subscription),t=e.notifyNestedSubs.bind(e);return[e,t]},[p,l,s]),h=Le.useMemo(()=>l?s:{...s,subscription:f},[l,s,f]),y=Le.useRef(void 0),v=Le.useRef(i),x=Le.useRef(void 0),E=Le.useRef(!1),I=Le.useRef(!1),D=Le.useRef(void 0);lt(()=>(I.current=!0,()=>{I.current=!1}),[]);const w=Le.useMemo(()=>()=>x.current&&i===v.current?x.current:g(p.getState(),i),[p,i]),S=Le.useMemo(()=>e=>f?function(e,t,r,n,o,i,a,s,l,c,d){if(!e)return()=>{};let p=!1,u=null;const g=()=>{if(p||!s.current)return;const e=t.getState();let r,g;try{r=n(e,o.current)}catch(e){g=e,u=e}g||(u=null),r===i.current?a.current||c():(i.current=r,l.current=r,a.current=!0,d())};return r.onStateChange=g,r.trySubscribe(),g(),()=>{if(p=!0,r.tryUnsubscribe(),r.onStateChange=null,u)throw u}}(m,p,f,g,v,y,E,I,x,b,e):()=>{},[f]);var C,A,P;let O;C=At,A=[v,y,E,i,x,b],lt(()=>C(...A),P);try{O=Le.useSyncExternalStore(S,w,u?()=>g(u(),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}lt(()=>{D.current=void 0,x.current=void 0,y.current=O});const R=Le.useMemo(()=>Le.createElement(e,{...O,ref:o}),[o,e,O]);return Le.useMemo(()=>m?Le.createElement(a.Provider,{value:h},R):R,[a,R,h])}const f=Le.memo(c);if(f.WrappedComponent=e,f.displayName=c.displayName=r,l){const t=Le.forwardRef(function(e,t){return Le.createElement(f,{...e,reactReduxForwardedRef:t})});return t.displayName=r,t.WrappedComponent=e,It(t,e)}return It(f,e)}};var Rt=function(e){const{children:t,context:r,serverState:n,store:o}=e,i=Le.useMemo(()=>{const e=it(o);return{store:o,subscription:e,getServerState:n?()=>n:void 0}},[o,n]),a=Le.useMemo(()=>o.getState(),[o]);lt(()=>{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=r||St;return Le.createElement(s.Provider,{value:i},t)};function _t(e=St){return function(){return Le.useContext(e)}}var Bt=_t();function Nt(e=St){const t=e===St?Bt:_t(e),r=()=>{const{store:e}=t();return e};return Object.assign(r,{withTypes:()=>r}),r}var Tt=Nt();!function(e=St){const t=e===St?Tt:Nt(e),r=()=>t().dispatch;Object.assign(r,{withTypes:()=>r})}();var Lt=(e,t)=>e===t;!function(e=St){const t=e===St?Bt:_t(e),r=(e,r={})=>{const{equalityFn:n=Lt}="function"==typeof r?{equalityFn:r}:r,o=t(),{store:i,subscription:a,getServerState:s}=o;Le.useRef(!0);const l=Le.useCallback({[e.name]:t=>e(t)}[e.name],[e]),c=Ce.exports.useSyncExternalStoreWithSelector(a.addNestedSub,i.getState,s||i.getState,l,n);return Le.useDebugValue(c),c};Object.assign(r,{withTypes:()=>r})}();var Mt="Invariant failed";var kt=function(e){var t=e.top,r=e.right,n=e.bottom,o=e.left;return{top:t,right:r,bottom:n,left:o,width:r-o,height:n-t,x:o,y:t,center:{x:(r+o)/2,y:(n+t)/2}}},Gt=function(e,t){return{top:e.top-t.top,left:e.left-t.left,bottom:e.bottom+t.bottom,right:e.right+t.right}},Wt=function(e,t){return{top:e.top+t.top,left:e.left+t.left,bottom:e.bottom-t.bottom,right:e.right-t.right}},Ft={top:0,right:0,bottom:0,left:0},$t=function(e){var t=e.borderBox,r=e.margin,n=void 0===r?Ft:r,o=e.border,i=void 0===o?Ft:o,a=e.padding,s=void 0===a?Ft:a,l=kt(Gt(t,n)),c=kt(Wt(t,i)),d=kt(Wt(c,s));return{marginBox:l,borderBox:kt(t),paddingBox:c,contentBox:d,margin:n,border:i,padding:s}},jt=function(e){var t=e.slice(0,-2);if("px"!==e.slice(-2))return 0;var r=Number(t);return isNaN(r)&&function(e){if(!e)throw new Error(Mt)}(!1),r},Ht=function(e,t){var r,n,o=e.borderBox,i=e.border,a=e.margin,s=e.padding,l=(n=t,{top:(r=o).top+n.y,left:r.left+n.x,bottom:r.bottom+n.y,right:r.right+n.x});return $t({borderBox:l,border:i,margin:a,padding:s})},Ut=function(e,t){return void 0===t&&(t={x:window.pageXOffset,y:window.pageYOffset}),Ht(e,t)},qt=function(e,t){var r={top:jt(t.marginTop),right:jt(t.marginRight),bottom:jt(t.marginBottom),left:jt(t.marginLeft)},n={top:jt(t.paddingTop),right:jt(t.paddingRight),bottom:jt(t.paddingBottom),left:jt(t.paddingLeft)},o={top:jt(t.borderTopWidth),right:jt(t.borderRightWidth),bottom:jt(t.borderBottomWidth),left:jt(t.borderLeftWidth)};return $t({borderBox:e,margin:r,padding:n,border:o})},Vt=function(e){var t=e.getBoundingClientRect(),r=window.getComputedStyle(e);return qt(t,r)},zt=function(e){var t=[],r=null,n=function(){for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];t=o,r||(r=requestAnimationFrame(function(){r=null,e.apply(void 0,t)}))};return n.cancel=function(){r&&(cancelAnimationFrame(r),r=null)},n};function Yt(){return Yt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Yt.apply(null,arguments)}const Zt=e,{useState:Jt}=e,{useRef:Xt}=e,{useEffect:Kt}=e,{useLayoutEffect:Qt}=e,{useContext:er}=e,tr=a,{flushSync:rr}=a;function nr(e,t){}function or(){}function ir(e,t,r){const n=t.map(t=>{const n=(o=r,i=t.options,{...o,...i});var o,i;return e.addEventListener(t.eventName,t.fn,n),function(){e.removeEventListener(t.eventName,t.fn,n)}});return function(){n.forEach(e=>{e()})}}nr.bind(null,"warn"),nr.bind(null,"error");class ar extends Error{}function sr(e,t){throw new ar("Invariant failed")}ar.prototype.toString=function(){return this.message};class lr extends Zt.Component{constructor(...e){super(...e),this.callbacks=null,this.unbind=or,this.onWindowError=e=>{const t=this.getCallbacks();t.isDragging()&&t.tryAbort();e.error instanceof ar&&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=ir(window,[{eventName:"error",fn:this.onWindowError}])}componentDidCatch(e){if(!(e instanceof ar))throw e;this.setState({})}componentWillUnmount(){this.unbind()}render(){return this.props.children(this.setCallbacks)}}const cr=e=>e+1,dr=(e,t)=>{const r=e.droppableId===t.droppableId,n=cr(e.index),o=cr(t.index);return r?`\n You have moved the item from position ${n}\n to position ${o}\n `:`\n You have moved the item from position ${n}\n in list ${e.droppableId}\n to list ${t.droppableId}\n in position ${o}\n `},pr=(e,t,r)=>t.droppableId===r.droppableId?`\n The item ${e}\n has been combined with ${r.draggableId}`:`\n The item ${e}\n in list ${t.droppableId}\n has been combined with ${r.draggableId}\n in list ${r.droppableId}\n `,ur=e=>`\n The item has returned to its starting position\n of ${cr(e.index)}\n`,gr={dragHandleUsageInstructions:"\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",onDragStart:e=>`\n You have lifted an item in position ${cr(e.source.index)}\n`,onDragUpdate:e=>{const t=e.destination;if(t)return dr(e.source,t);const r=e.combine;return r?pr(e.draggableId,e.source,r):"You are over an area that cannot be dropped on"},onDragEnd:e=>{if("CANCEL"===e.reason)return`\n Movement cancelled.\n ${ur(e.source)}\n `;const t=e.destination,r=e.combine;return t?`\n You have dropped the item.\n ${dr(e.source,t)}\n `:r?`\n You have dropped the item.\n ${pr(e.draggableId,e.source,r)}\n `:`\n The item has been dropped while not over a drop area.\n ${ur(e.source)}\n `}};function mr(e,t){return e===t||!(!Number.isNaN(e)||!Number.isNaN(t))}function fr(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(!mr(e[r],t[r]))return!1;return!0}function br(e,t){const r=Jt(()=>({inputs:t,result:e()}))[0],n=Xt(!0),o=Xt(r),i=n.current||Boolean(t&&o.current.inputs&&fr(t,o.current.inputs))?o.current:{inputs:t,result:e()};return Kt(()=>{n.current=!1,o.current=i},[i]),i.result}function hr(e,t){return br(()=>e,t)}const yr={x:0,y:0},vr=(e,t)=>({x:e.x+t.x,y:e.y+t.y}),xr=(e,t)=>({x:e.x-t.x,y:e.y-t.y}),Er=(e,t)=>e.x===t.x&&e.y===t.y,Ir=e=>({x:0!==e.x?-e.x:0,y:0!==e.y?-e.y:0}),Dr=(e,t,r=0)=>"x"===e?{x:t,y:r}:{x:r,y:t},wr=(e,t)=>Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2),Sr=(e,t)=>Math.min(...t.map(t=>wr(e,t))),Cr=e=>t=>({x:e(t.x),y:e(t.y)});const Ar=(e,t)=>({top:e.top+t.y,left:e.left+t.x,bottom:e.bottom+t.y,right:e.right+t.x}),Pr=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}],Or=(e,t)=>t&&t.shouldClipSubject?((e,t)=>{const r=kt({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 r.width<=0||r.height<=0?null:r})(t.pageMarginBox,e):kt(e);var Rr=({page:e,withPlaceholder:t,axis:r,frame:n})=>{const o=((e,t)=>t?Ar(e,t.scroll.diff.displacement):e)(e.marginBox,n),i=((e,t,r)=>r&&r.increasedBy?{...e,[t.end]:e[t.end]+r.increasedBy[t.line]}:e)(o,r,t);return{page:e,withPlaceholder:t,active:Or(i,n)}},_r=(e,t)=>{e.frame||sr();const r=e.frame,n=xr(t,r.scroll.initial),o=Ir(n),i={...r,scroll:{initial:r.scroll.initial,current:t,diff:{value:n,displacement:o},max:r.scroll.max}},a=Rr({page:e.subject.page,withPlaceholder:e.subject.withPlaceholder,axis:e.axis,frame:i});return{...e,frame:i,subject:a}};function Br(e,t=fr){let r=null;function n(...n){if(r&&r.lastThis===this&&t(n,r.lastArgs))return r.lastResult;const o=e.apply(this,n);return r={lastResult:o,lastArgs:n,lastThis:this},o}return n.clear=function(){r=null},n}const Nr=Br(e=>e.reduce((e,t)=>(e[t.descriptor.id]=t,e),{})),Tr=Br(e=>e.reduce((e,t)=>(e[t.descriptor.id]=t,e),{})),Lr=Br(e=>Object.values(e)),Mr=Br(e=>Object.values(e));var kr=Br((e,t)=>{const r=Mr(t).filter(t=>e===t.descriptor.droppableId).sort((e,t)=>e.descriptor.index-t.descriptor.index);return r});function Gr(e){return e.at&&"REORDER"===e.at.type?e.at.destination:null}function Wr(e){return e.at&&"COMBINE"===e.at.type?e.at.combine:null}var Fr=Br((e,t)=>t.filter(t=>t.descriptor.id!==e.descriptor.id)),$r=(e,t)=>e.descriptor.droppableId===t.descriptor.id;const jr={point:yr,value:0},Hr={invisible:{},visible:{},all:[]},Ur={displaced:Hr,displacedBy:jr,at:null};var qr=(e,t)=>r=>e<=r&&r<=t,Vr=e=>{const t=qr(e.top,e.bottom),r=qr(e.left,e.right);return n=>{if(t(n.top)&&t(n.bottom)&&r(n.left)&&r(n.right))return!0;const o=t(n.top)||t(n.bottom),i=r(n.left)||r(n.right);if(o&&i)return!0;const a=n.top<e.top&&n.bottom>e.bottom,s=n.left<e.left&&n.right>e.right;if(a&&s)return!0;return a&&i||s&&o}},zr=e=>{const t=qr(e.top,e.bottom),r=qr(e.left,e.right);return e=>t(e.top)&&t(e.bottom)&&r(e.left)&&r(e.right)};const Yr={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},Zr={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"};const Jr=({target:e,destination:t,viewport:r,withDroppableDisplacement:n,isVisibleThroughFrameFn:o})=>{const i=n?((e,t)=>{const r=t.frame?t.frame.scroll.diff.displacement:yr;return Ar(e,r)})(e,t):e;return((e,t,r)=>!!t.subject.active&&r(t.subject.active)(e))(i,t,o)&&((e,t,r)=>r(t)(e))(i,r,o)},Xr=e=>Jr({...e,isVisibleThroughFrameFn:zr});function Kr({afterDragging:e,destination:t,displacedBy:r,viewport:n,forceShouldAnimate:o,last:i}){return e.reduce(function(e,a){const s=function(e,t){const r=e.page.marginBox,n={top:t.point.y,right:0,bottom:0,left:t.point.x};return kt(Gt(r,n))}(a,r),l=a.descriptor.id;e.all.push(l);var c;if(!(c={target:s,destination:t,viewport:n,withDroppableDisplacement:!0},Jr({...c,isVisibleThroughFrameFn:Vr})))return e.invisible[a.descriptor.id]=!0,e;const d=((e,t,r)=>{if("boolean"==typeof r)return r;if(!t)return!0;const{invisible:n,visible:o}=t;if(n[e])return!1;const i=o[e];return!i||i.shouldAnimate})(l,i,o),p={draggableId:l,shouldAnimate:d};return e.visible[l]=p,e},{all:[],visible:{},invisible:{}})}function Qr({insideDestination:e,inHomeList:t,displacedBy:r,destination:n}){const o=function(e,t){if(!e.length)return 0;const r=e[e.length-1].descriptor.index;return t.inHomeList?r:r+1}(e,{inHomeList:t});return{displaced:Hr,displacedBy:r,at:{type:"REORDER",destination:{droppableId:n.descriptor.id,index:o}}}}function en({draggable:e,insideDestination:t,destination:r,viewport:n,displacedBy:o,last:i,index:a,forceShouldAnimate:s}){const l=$r(e,r);if(null==a)return Qr({insideDestination:t,inHomeList:l,displacedBy:o,destination:r});const c=t.find(e=>e.descriptor.index===a);if(!c)return Qr({insideDestination:t,inHomeList:l,displacedBy:o,destination:r});const d=Fr(e,t),p=t.indexOf(c);return{displaced:Kr({afterDragging:d.slice(p),destination:r,displacedBy:o,last:i,viewport:n.frame,forceShouldAnimate:s}),displacedBy:o,at:{type:"REORDER",destination:{droppableId:r.descriptor.id,index:a}}}}function tn(e,t){return Boolean(t.effected[e])}var rn=({isMovingForward:e,isInHomeList:t,draggable:r,draggables:n,destination:o,insideDestination:i,previousImpact:a,viewport:s,afterCritical:l})=>{const c=a.at;if(c||sr(),"REORDER"===c.type){const n=(({isMovingForward:e,isInHomeList:t,insideDestination:r,location:n})=>{if(!r.length)return null;const o=n.index,i=e?o+1:o-1,a=r[0].descriptor.index,s=r[r.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==n?null:en({draggable:r,insideDestination:i,destination:o,viewport:s,last:a.displaced,displacedBy:a.displacedBy,index:n})}const d=(({isMovingForward:e,destination:t,draggables:r,combine:n,afterCritical:o})=>{if(!t.isCombineEnabled)return null;const i=n.draggableId,a=r[i].descriptor.index;return tn(i,o)?e?a:a-1:e?a+1:a})({isMovingForward:e,destination:o,displaced:a.displaced,draggables:n,combine:c.combine,afterCritical:l});return null==d?null:en({draggable:r,insideDestination:i,destination:o,viewport:s,last:a.displaced,displacedBy:a.displacedBy,index:d})},nn=({afterCritical:e,impact:t,draggables:r})=>{const n=Wr(t);n||sr();const o=n.draggableId,i=r[o].page.borderBox.center,a=(({displaced:e,afterCritical:t,combineWith:r,displacedBy:n})=>{const o=Boolean(e.visible[r]||e.invisible[r]);return tn(r,t)?o?yr:Ir(n.point):o?n.point:yr})({displaced:t.displaced,afterCritical:e,combineWith:o,displacedBy:t.displacedBy});return vr(i,a)};const on=(e,t)=>t.margin[e.start]+t.borderBox[e.size]/2,an=(e,t,r)=>t[e.crossAxisStart]+r.margin[e.crossAxisStart]+r.borderBox[e.crossAxisSize]/2,sn=({axis:e,moveRelativeTo:t,isMoving:r})=>Dr(e.line,t.marginBox[e.end]+on(e,r),an(e,t.marginBox,r)),ln=({axis:e,moveRelativeTo:t,isMoving:r})=>Dr(e.line,t.marginBox[e.start]-((e,t)=>t.margin[e.end]+t.borderBox[e.size]/2)(e,r),an(e,t.marginBox,r));var cn=({impact:e,draggable:t,draggables:r,droppable:n,afterCritical:o})=>{const i=kr(n.descriptor.id,r),a=t.page,s=n.axis;if(!i.length)return(({axis:e,moveInto:t,isMoving:r})=>Dr(e.line,t.contentBox[e.start]+on(e,r),an(e,t.contentBox,r)))({axis:s,moveInto:n.page,isMoving:a});const{displaced:l,displacedBy:c}=e,d=l.all[0];if(d){const e=r[d];if(tn(d,o))return ln({axis:s,moveRelativeTo:e.page,isMoving:a});const t=Ht(e.page,c.point);return ln({axis:s,moveRelativeTo:t,isMoving:a})}const p=i[i.length-1];if(p.descriptor.id===t.descriptor.id)return a.borderBox.center;if(tn(p.descriptor.id,o)){const e=Ht(p.page,Ir(o.displacedBy.point));return sn({axis:s,moveRelativeTo:e,isMoving:a})}return sn({axis:s,moveRelativeTo:p.page,isMoving:a})},dn=(e,t)=>{const r=e.frame;return r?vr(t,r.scroll.diff.displacement):t};var pn=e=>{const t=(({impact:e,draggable:t,droppable:r,draggables:n,afterCritical:o})=>{const i=t.page.borderBox.center,a=e.at;return r&&a?"REORDER"===a.type?cn({impact:e,draggable:t,draggables:n,droppable:r,afterCritical:o}):nn({impact:e,draggables:n,afterCritical:o}):i})(e),r=e.droppable;return r?dn(r,t):t},un=(e,t)=>{const r=xr(t,e.scroll.initial),n=Ir(r);return{frame:kt({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:r,displacement:n}}}};function gn(e,t){return e.map(e=>t[e])}var mn=({pageBorderBoxCenter:e,draggable:t,viewport:r})=>{const n=((e,t)=>vr(e.scroll.diff.displacement,t))(r,e),o=xr(n,t.page.borderBox.center);return vr(t.client.borderBox.center,o)},fn=({draggable:e,destination:t,newPageBorderBoxCenter:r,viewport:n,withDroppableDisplacement:o,onlyOnMainAxis:i=!1})=>{const a=xr(r,e.page.borderBox.center),s={target:Ar(e.page.borderBox,a),destination:t,withDroppableDisplacement:o,viewport:n};return i?(e=>{return Jr({...e,isVisibleThroughFrameFn:(t=e.destination.axis,e=>{const r=qr(e.top,e.bottom),n=qr(e.left,e.right);return e=>t===Yr?r(e.top)&&r(e.bottom):n(e.left)&&n(e.right)})});var t})(s):Xr(s)},bn=({isMovingForward:e,draggable:t,destination:r,draggables:n,previousImpact:o,viewport:i,previousPageBorderBoxCenter:a,previousClientSelection:s,afterCritical:l})=>{if(!r.isEnabled)return null;const c=kr(r.descriptor.id,n),d=$r(t,r),p=(({isMovingForward:e,draggable:t,destination:r,insideDestination:n,previousImpact:o})=>{if(!r.isCombineEnabled)return null;if(!Gr(o))return null;function i(e){const t={type:"COMBINE",combine:{draggableId:e,droppableId:r.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=Fr(t,n);if(!s)return l.length?i(l[l.length-1].descriptor.id):null;const c=l.findIndex(e=>e.descriptor.id===s);-1===c&&sr();const d=c-1;return d<0?null:i(l[d].descriptor.id)})({isMovingForward:e,draggable:t,destination:r,insideDestination:c,previousImpact:o})||rn({isMovingForward:e,isInHomeList:d,draggable:t,draggables:n,destination:r,insideDestination:c,previousImpact:o,viewport:i,afterCritical:l});if(!p)return null;const u=pn({impact:p,draggable:t,droppable:r,draggables:n,afterCritical:l});if(fn({draggable:t,destination:r,newPageBorderBoxCenter:u,viewport:i.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0})){return{clientSelection:mn({pageBorderBoxCenter:u,draggable:t,viewport:i}),impact:p,scrollJumpRequest:null}}const g=xr(u,a),m=(({impact:e,viewport:t,destination:r,draggables:n,maxScrollChange:o})=>{const i=un(t,vr(t.scroll.current,o)),a=r.frame?_r(r,vr(r.frame.scroll.current,o)):r,s=e.displaced,l=Kr({afterDragging:gn(s.all,n),destination:r,displacedBy:e.displacedBy,viewport:i.frame,last:s,forceShouldAnimate:!1}),c=Kr({afterDragging:gn(s.all,n),destination:a,displacedBy:e.displacedBy,viewport:t.frame,last:s,forceShouldAnimate:!1}),d={},p={},u=[s,l,c];return s.all.forEach(e=>{const t=function(e,t){for(let r=0;r<t.length;r++){const n=t[r].visible[e];if(n)return n}return null}(e,u);t?p[e]=t:d[e]=!0}),{...e,displaced:{all:s.all,invisible:d,visible:p}}})({impact:p,viewport:i,destination:r,draggables:n,maxScrollChange:g});return{clientSelection:s,impact:m,scrollJumpRequest:g}};const hn=e=>{const t=e.subject.active;return t||sr(),t};const yn=(e,t)=>{const r=e.page.borderBox.center;return tn(e.descriptor.id,t)?xr(r,t.displacedBy.point):r},vn=(e,t)=>{const r=e.page.borderBox;return tn(e.descriptor.id,t)?Ar(r,Ir(t.displacedBy.point)):r};var xn=Br(function(e,t){const r=t[e.line];return{value:r,point:Dr(e.line,r)}});const En=(e,t)=>({...e,scroll:{...e.scroll,max:t}}),In=(e,t,r)=>{const n=e.frame;$r(t,e)&&sr(),e.subject.withPlaceholder&&sr();const o=xn(e.axis,t.displaceBy).point,i=((e,t,r)=>{const n=e.axis;if("virtual"===e.descriptor.mode)return Dr(n.line,t[n.line]);const o=e.subject.page.contentBox[n.size],i=kr(e.descriptor.id,r).reduce((e,t)=>e+t.client.marginBox[n.size],0)+t[n.line]-o;return i<=0?null:Dr(n.line,i)})(e,o,r),a={placeholderSize:o,increasedBy:i,oldFrameMaxScroll:e.frame?e.frame.scroll.max:null};if(!n){const t=Rr({page:e.subject.page,withPlaceholder:a,axis:e.axis,frame:e.frame});return{...e,subject:t}}const s=i?vr(n.scroll.max,i):n.scroll.max,l=En(n,s),c=Rr({page:e.subject.page,withPlaceholder:a,axis:e.axis,frame:l});return{...e,subject:c,frame:l}};var Dn=({isMovingForward:e,previousPageBorderBoxCenter:t,draggable:r,isOver:n,draggables:o,droppables:i,viewport:a,afterCritical:s})=>{const l=(({isMovingForward:e,pageBorderBoxCenter:t,source:r,droppables:n,viewport:o})=>{const i=r.subject.active;if(!i)return null;const a=r.axis,s=qr(i[a.start],i[a.end]),l=Lr(n).filter(e=>e!==r).filter(e=>e.isEnabled).filter(e=>Boolean(e.subject.active)).filter(e=>Vr(o.frame)(hn(e))).filter(t=>{const r=hn(t);return e?i[a.crossAxisEnd]<r[a.crossAxisEnd]:r[a.crossAxisStart]<i[a.crossAxisStart]}).filter(e=>{const t=hn(e),r=qr(t[a.start],t[a.end]);return s(t[a.start])||s(t[a.end])||r(i[a.start])||r(i[a.end])}).sort((t,r)=>{const n=hn(t)[a.crossAxisStart],o=hn(r)[a.crossAxisStart];return e?n-o:o-n}).filter((e,t,r)=>hn(e)[a.crossAxisStart]===hn(r[0])[a.crossAxisStart]);if(!l.length)return null;if(1===l.length)return l[0];const c=l.filter(e=>qr(hn(e)[a.start],hn(e)[a.end])(t[a.line]));return 1===c.length?c[0]:c.length>1?c.sort((e,t)=>hn(e)[a.start]-hn(t)[a.start])[0]:l.sort((e,r)=>{const n=Sr(t,Pr(hn(e))),o=Sr(t,Pr(hn(r)));return n!==o?n-o:hn(e)[a.start]-hn(r)[a.start]})[0]})({isMovingForward:e,pageBorderBoxCenter:t,source:n,droppables:i,viewport:a});if(!l)return null;const c=kr(l.descriptor.id,o),d=(({pageBorderBoxCenter:e,viewport:t,destination:r,insideDestination:n,afterCritical:o})=>{const i=n.filter(e=>Xr({target:vn(e,o),destination:r,viewport:t.frame,withDroppableDisplacement:!0})).sort((t,n)=>{const i=wr(e,dn(r,yn(t,o))),a=wr(e,dn(r,yn(n,o)));return i<a?-1:a<i?1:t.descriptor.index-n.descriptor.index});return i[0]||null})({pageBorderBoxCenter:t,viewport:a,destination:l,insideDestination:c,afterCritical:s}),p=(({previousPageBorderBoxCenter:e,moveRelativeTo:t,insideDestination:r,draggable:n,draggables:o,destination:i,viewport:a,afterCritical:s})=>{if(!t){if(r.length)return null;const e={displaced:Hr,displacedBy:jr,at:{type:"REORDER",destination:{droppableId:i.descriptor.id,index:0}}},t=pn({impact:e,draggable:n,droppable:i,draggables:o,afterCritical:s}),l=$r(n,i)?i:In(i,n,o);return fn({draggable:n,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===n.descriptor.id||l?e:e+1})(),d=xn(i.axis,n.displaceBy);return en({draggable:n,insideDestination:r,destination:i,viewport:a,displacedBy:d,last:Hr,index:c})})({previousPageBorderBoxCenter:t,destination:l,draggable:r,draggables:o,moveRelativeTo:d,insideDestination:c,viewport:a,afterCritical:s});if(!p)return null;const u=pn({impact:p,draggable:r,droppable:l,draggables:o,afterCritical:s});return{clientSelection:mn({pageBorderBoxCenter:u,draggable:r,viewport:a}),impact:p,scrollJumpRequest:null}},wn=e=>{const t=e.at;return t?"REORDER"===t.type?t.destination.droppableId:t.combine.droppableId:null};var Sn=({state:e,type:t})=>{const r=((e,t)=>{const r=wn(e);return r?t[r]:null})(e.impact,e.dimensions.droppables),n=Boolean(r),o=e.dimensions.droppables[e.critical.droppable.id],i=r||o,a=i.axis.direction,s="vertical"===a&&("MOVE_UP"===t||"MOVE_DOWN"===t)||"horizontal"===a&&("MOVE_LEFT"===t||"MOVE_RIGHT"===t);if(s&&!n)return null;const l="MOVE_DOWN"===t||"MOVE_RIGHT"===t,c=e.dimensions.draggables[e.critical.draggable.id],d=e.current.page.borderBoxCenter,{draggables:p,droppables:u}=e.dimensions;return s?bn({isMovingForward:l,previousPageBorderBoxCenter:d,draggable:c,destination:i,draggables:p,viewport:e.viewport,previousClientSelection:e.current.client.selection,previousImpact:e.impact,afterCritical:e.afterCritical}):Dn({isMovingForward:l,previousPageBorderBoxCenter:d,draggable:c,isOver:i,draggables:p,droppables:u,viewport:e.viewport,afterCritical:e.afterCritical})};function Cn(e){return"DRAGGING"===e.phase||"COLLECTING"===e.phase}function An(e){const t=qr(e.top,e.bottom),r=qr(e.left,e.right);return function(e){return t(e.y)&&r(e.x)}}function Pn({pageBorderBox:e,draggable:t,droppables:r}){const n=Lr(r).filter(t=>{if(!t.isEnabled)return!1;const r=t.subject.active;if(!r)return!1;if(o=r,!((n=e).left<o.right&&n.right>o.left&&n.top<o.bottom&&n.bottom>o.top))return!1;var n,o;if(An(r)(e.center))return!0;const i=t.axis,a=r.center[i.crossAxisLine],s=e[i.crossAxisStart],l=e[i.crossAxisEnd],c=qr(r[i.crossAxisStart],r[i.crossAxisEnd]),d=c(s),p=c(l);return!d&&!p||(d?s<a:l>a)});return n.length?1===n.length?n[0].descriptor.id:function({pageBorderBox:e,draggable:t,candidates:r}){const n=t.page.borderBox.center,o=r.map(t=>{const r=t.axis,o=Dr(t.axis.line,e.center[r.line],t.page.borderBox.center[r.crossAxisLine]);return{id:t.descriptor.id,distance:wr(n,o)}}).sort((e,t)=>t.distance-e.distance);return o[0]?o[0].id:null}({pageBorderBox:e,draggable:t,candidates:n}):null}const On=(e,t)=>kt(Ar(e,t));function Rn({displaced:e,id:t}){return Boolean(e.visible[t]||e.invisible[t])}var _n=({pageOffset:e,draggable:t,draggables:r,droppables:n,previousImpact:o,viewport:i,afterCritical:a})=>{const s=On(t.page.borderBox,e),l=Pn({pageBorderBox:s,draggable:t,droppables:n});if(!l)return Ur;const c=n[l],d=kr(c.descriptor.id,r),p=((e,t)=>{const r=e.frame;return r?On(t,r.scroll.diff.value):t})(c,s);return(({draggable:e,pageBorderBoxWithDroppableScroll:t,previousImpact:r,destination:n,insideDestination:o,afterCritical:i})=>{if(!n.isCombineEnabled)return null;const a=n.axis,s=xn(n.axis,e.displaceBy),l=s.value,c=t[a.start],d=t[a.end],p=Fr(e,o).find(e=>{const t=e.descriptor.id,n=e.page.borderBox,o=n[a.size]/4,s=tn(t,i),p=Rn({displaced:r.displaced,id:t});return s?p?d>n[a.start]+o&&d<n[a.end]-o:c>n[a.start]-l+o&&c<n[a.end]-l-o:p?d>n[a.start]+l+o&&d<n[a.end]+l-o:c>n[a.start]+o&&c<n[a.end]-o});return p?{displacedBy:s,displaced:r.displaced,at:{type:"COMBINE",combine:{draggableId:p.descriptor.id,droppableId:n.descriptor.id}}}:null})({pageBorderBoxWithDroppableScroll:p,draggable:t,previousImpact:o,destination:c,insideDestination:d,afterCritical:a})||(({pageBorderBoxWithDroppableScroll:e,draggable:t,destination:r,insideDestination:n,last:o,viewport:i,afterCritical:a})=>{const s=r.axis,l=xn(r.axis,t.displaceBy),c=l.value,d=e[s.start],p=e[s.end],u=function({draggable:e,closest:t,inHomeList:r}){return t?r&&t.descriptor.index>e.descriptor.index?t.descriptor.index-1:t.descriptor.index:null}({draggable:t,closest:Fr(t,n).find(e=>{const t=e.descriptor.id,r=e.page.borderBox.center[s.line],n=tn(t,a),i=Rn({displaced:o,id:t});return n?i?p<=r:d<r-c:i?p<=r+c:d<r})||null,inHomeList:$r(t,r)});return en({draggable:t,insideDestination:n,destination:r,viewport:i,last:o,displacedBy:l,index:u})})({pageBorderBoxWithDroppableScroll:p,draggable:t,destination:c,insideDestination:d,last:o.displaced,viewport:i,afterCritical:a})},Bn=(e,t)=>({...e,[t.descriptor.id]:t});const Nn=({previousImpact:e,impact:t,droppables:r})=>{const n=wn(e),o=wn(t);if(!n)return r;if(n===o)return r;const i=r[n];if(!i.subject.withPlaceholder)return r;const a=(e=>{const t=e.subject.withPlaceholder;t||sr();const r=e.frame;if(!r){const t=Rr({page:e.subject.page,axis:e.axis,frame:null,withPlaceholder:null});return{...e,subject:t}}const n=t.oldFrameMaxScroll;n||sr();const o=En(r,n),i=Rr({page:e.subject.page,axis:e.axis,frame:o,withPlaceholder:null});return{...e,subject:i,frame:o}})(i);return Bn(r,a)};var Tn=({state:e,clientSelection:t,dimensions:r,viewport:n,impact:o,scrollJumpRequest:i})=>{const a=n||e.viewport,s=r||e.dimensions,l=t||e.current.client.selection,c=xr(l,e.initial.client.selection),d={offset:c,selection:l,borderBoxCenter:vr(e.initial.client.borderBoxCenter,c)},p={selection:vr(d.selection,a.scroll.current),borderBoxCenter:vr(d.borderBoxCenter,a.scroll.current),offset:vr(d.offset,a.scroll.diff.value)},u={client:d,page:p};if("COLLECTING"===e.phase)return{...e,dimensions:s,viewport:a,current:u};const g=s.draggables[e.critical.draggable.id],m=o||_n({pageOffset:p.offset,draggable:g,draggables:s.draggables,droppables:s.droppables,previousImpact:e.impact,viewport:a,afterCritical:e.afterCritical}),f=(({draggable:e,draggables:t,droppables:r,previousImpact:n,impact:o})=>{const i=Nn({previousImpact:n,impact:o,droppables:r}),a=wn(o);if(!a)return i;const s=r[a];if($r(e,s))return i;if(s.subject.withPlaceholder)return i;const l=In(s,e,t);return Bn(i,l)})({draggable:g,impact:m,previousImpact:e.impact,draggables:s.draggables,droppables:s.droppables});return{...e,current:u,dimensions:{draggables:s.draggables,droppables:f},impact:m,viewport:a,scrollJumpRequest:i||null,forceShouldAnimate:!i&&null}};var Ln=({impact:e,viewport:t,draggables:r,destination:n,forceShouldAnimate:o})=>{const i=e.displaced,a=function(e,t){return e.map(e=>t[e])}(i.all,r),s=Kr({afterDragging:a,destination:n,displacedBy:e.displacedBy,viewport:t.frame,forceShouldAnimate:o,last:i});return{...e,displaced:s}},Mn=({impact:e,draggable:t,droppable:r,draggables:n,viewport:o,afterCritical:i})=>{const a=pn({impact:e,draggable:t,draggables:n,droppable:r,afterCritical:i});return mn({pageBorderBoxCenter:a,draggable:t,viewport:o})},kn=({state:e,dimensions:t,viewport:r})=>{"SNAP"!==e.movementMode&&sr();const n=e.impact,o=r||e.viewport,i=t||e.dimensions,{draggables:a,droppables:s}=i,l=a[e.critical.draggable.id],c=wn(n);c||sr();const d=s[c],p=Ln({impact:n,viewport:o,destination:d,draggables:a}),u=Mn({impact:p,draggable:l,droppable:d,draggables:a,viewport:o,afterCritical:e.afterCritical});return Tn({impact:p,clientSelection:u,state:e,dimensions:i,viewport:o})},Gn=({draggable:e,home:t,draggables:r,viewport:n})=>{const o=xn(t.axis,e.displaceBy),i=kr(t.descriptor.id,r),a=i.indexOf(e);-1===a&&sr();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:Kr({afterDragging:s,destination:t,displacedBy:o,last:null,viewport:n.frame,forceShouldAnimate:!1}),displacedBy:o,at:{type:"REORDER",destination:(d=e.descriptor,{index:d.index,droppableId:d.droppableId})}},afterCritical:c}},Wn=({additions:e,updatedDroppables:t,viewport:r})=>{const n=r.scroll.diff.value;return e.map(e=>{const o=e.descriptor.droppableId,i=(e=>{const t=e.frame;return t||sr(),t})(t[o]),a=i.scroll.diff.value,s=(({draggable:e,offset:t,initialWindowScroll:r})=>{const n=Ht(e.client,t),o=Ut(n,r);return{...e,placeholder:{...e.placeholder,client:n},client:n,page:o}})({draggable:e,offset:vr(n,a),initialWindowScroll:r.scroll.initial});return s})};const Fn=e=>"SNAP"===e.movementMode,$n=(e,t,r)=>{const n=((e,t)=>({draggables:e.draggables,droppables:Bn(e.droppables,t)}))(e.dimensions,t);return!Fn(e)||r?Tn({state:e,dimensions:n}):kn({state:e,dimensions:n})};function jn(e){return e.isDragging&&"SNAP"===e.movementMode?{...e,scrollJumpRequest:null}:e}const Hn={phase:"IDLE",completed:null,shouldFlush:!1};var Un=(e=Hn,t)=>{if("FLUSH"===t.type)return{...Hn,shouldFlush:!0};if("INITIAL_PUBLISH"===t.type){"IDLE"!==e.phase&&sr();const{critical:r,clientSelection:n,viewport:o,dimensions:i,movementMode:a}=t.payload,s=i.draggables[r.draggable.id],l=i.droppables[r.droppable.id],c={selection:n,borderBoxCenter:s.client.borderBox.center,offset:yr},d={client:c,page:{selection:vr(c.selection,o.scroll.initial),borderBoxCenter:vr(c.selection,o.scroll.initial),offset:vr(c.selection,o.scroll.diff.value)}},p=Lr(i.droppables).every(e=>!e.isFixedOnPage),{impact:u,afterCritical:g}=Gn({draggable:s,home:l,draggables:i.draggables,viewport:o});return{phase:"DRAGGING",isDragging:!0,critical:r,movementMode:a,dimensions:i,initial:d,current:d,isWindowScrollAllowed:p,impact:u,afterCritical:g,onLiftImpact:u,viewport:o,scrollJumpRequest:null,forceShouldAnimate:null}}if("COLLECTION_STARTING"===t.type){if("COLLECTING"===e.phase||"DROP_PENDING"===e.phase)return e;"DRAGGING"!==e.phase&&sr();return{...e,phase:"COLLECTING"}}if("PUBLISH_WHILE_DRAGGING"===t.type)return"COLLECTING"!==e.phase&&"DROP_PENDING"!==e.phase&&sr(),(({state:e,published:t})=>{const r=t.modified.map(t=>{const r=e.dimensions.droppables[t.droppableId];return _r(r,t.scroll)}),n={...e.dimensions.droppables,...Nr(r)},o=Tr(Wn({additions:t.additions,updatedDroppables:n,viewport:e.viewport})),i={...e.dimensions.draggables,...o};t.removals.forEach(e=>{delete i[e]});const a={droppables:n,draggables:i},s=wn(e.impact),l=s?a.droppables[s]:null,c=a.draggables[e.critical.draggable.id],d=a.droppables[e.critical.droppable.id],{impact:p,afterCritical:u}=Gn({draggable:c,home:d,draggables:i,viewport:e.viewport}),g=l&&l.isCombineEnabled?e.impact:p,m=_n({pageOffset:e.current.page.offset,draggable:a.draggables[e.critical.draggable.id],draggables:a.draggables,droppables:a.droppables,previousImpact:g,viewport:e.viewport,afterCritical:u}),f={...e,phase:"DRAGGING",impact:m,onLiftImpact:p,dimensions:a,afterCritical:u,forceShouldAnimate:!1};return"COLLECTING"===e.phase?f:{...f,phase:"DROP_PENDING",reason:e.reason,isWaiting:!1}})({state:e,published:t.payload});if("MOVE"===t.type){if("DROP_PENDING"===e.phase)return e;Cn(e)||sr();const{client:r}=t.payload;return Er(r,e.current.client.selection)?e:Tn({state:e,clientSelection:r,impact:Fn(e)?e.impact:null})}if("UPDATE_DROPPABLE_SCROLL"===t.type){if("DROP_PENDING"===e.phase)return jn(e);if("COLLECTING"===e.phase)return jn(e);Cn(e)||sr();const{id:r,newScroll:n}=t.payload,o=e.dimensions.droppables[r];if(!o)return e;const i=_r(o,n);return $n(e,i,!1)}if("UPDATE_DROPPABLE_IS_ENABLED"===t.type){if("DROP_PENDING"===e.phase)return e;Cn(e)||sr();const{id:r,isEnabled:n}=t.payload,o=e.dimensions.droppables[r];o||sr(),o.isEnabled===n&&sr();const i={...o,isEnabled:n};return $n(e,i,!0)}if("UPDATE_DROPPABLE_IS_COMBINE_ENABLED"===t.type){if("DROP_PENDING"===e.phase)return e;Cn(e)||sr();const{id:r,isCombineEnabled:n}=t.payload,o=e.dimensions.droppables[r];o||sr(),o.isCombineEnabled===n&&sr();const i={...o,isCombineEnabled:n};return $n(e,i,!0)}if("MOVE_BY_WINDOW_SCROLL"===t.type){if("DROP_PENDING"===e.phase||"DROP_ANIMATING"===e.phase)return e;Cn(e)||sr(),e.isWindowScrollAllowed||sr();const r=t.payload.newScroll;if(Er(e.viewport.scroll.current,r))return jn(e);const n=un(e.viewport,r);return Fn(e)?kn({state:e,viewport:n}):Tn({state:e,viewport:n})}if("UPDATE_VIEWPORT_MAX_SCROLL"===t.type){if(!Cn(e))return e;const r=t.payload.maxScroll;if(Er(r,e.viewport.scroll.max))return e;const n={...e.viewport,scroll:{...e.viewport.scroll,max:r}};return{...e,viewport:n}}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&&sr();const r=Sn({state:e,type:t.type});return r?Tn({state:e,impact:r.impact,clientSelection:r.clientSelection,scrollJumpRequest:r.scrollJumpRequest}):e}if("DROP_PENDING"===t.type){const r=t.payload.reason;"COLLECTING"!==e.phase&&sr();return{...e,phase:"DROP_PENDING",isWaiting:!0,reason:r}}if("DROP_ANIMATE"===t.type){const{completed:r,dropDuration:n,newHomeClientOffset:o}=t.payload;"DRAGGING"!==e.phase&&"DROP_PENDING"!==e.phase&&sr();return{phase:"DROP_ANIMATING",completed:r,dropDuration:n,newHomeClientOffset:o,dimensions:e.dimensions}}if("DROP_COMPLETE"===t.type){const{completed:e}=t.payload;return{phase:"IDLE",completed:e,shouldFlush:!1}}return e};function qn(e,t){return e instanceof Object&&"type"in e&&e.type===t}const Vn=e=>({type:"PUBLISH_WHILE_DRAGGING",payload:e}),zn=()=>({type:"COLLECTION_STARTING",payload:null}),Yn=e=>({type:"UPDATE_DROPPABLE_SCROLL",payload:e}),Zn=e=>({type:"UPDATE_DROPPABLE_IS_ENABLED",payload:e}),Jn=e=>({type:"UPDATE_DROPPABLE_IS_COMBINE_ENABLED",payload:e}),Xn=e=>({type:"MOVE",payload:e}),Kn=()=>({type:"MOVE_UP",payload:null}),Qn=()=>({type:"MOVE_DOWN",payload:null}),eo=()=>({type:"MOVE_RIGHT",payload:null}),to=()=>({type:"MOVE_LEFT",payload:null}),ro=e=>({type:"DROP_COMPLETE",payload:e}),no=e=>({type:"DROP",payload:e}),oo=()=>({type:"DROP_ANIMATION_FINISHED",payload:null});const io="cubic-bezier(.2,1,.1,1)",ao={drop:0,combining:.7},so={drop:.75},lo={outOfTheWay:.2,minDropTime:.33,maxDropTime:.55},co=`${lo.outOfTheWay}s ${"cubic-bezier(0.2, 0, 0, 1)"}`,po={fluid:`opacity ${co}`,snap:`transform ${co}, opacity ${co}`,drop:e=>{const t=`${e}s ${io}`;return`transform ${t}, opacity ${t}`},outOfTheWay:`transform ${co}`,placeholder:`height ${co}, width ${co}, margin ${co}`},uo=e=>Er(e,yr)?void 0:`translate(${e.x}px, ${e.y}px)`,go=uo,mo=(e,t)=>{const r=uo(e);if(r)return t?`${r} scale(${so.drop})`:r},{minDropTime:fo,maxDropTime:bo}=lo,ho=bo-fo;const yo=({getState:e,dispatch:t})=>r=>n=>{if(!qn(n,"DROP"))return void r(n);const o=e(),i=n.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&&sr(),"DRAGGING"!==o.phase&&"DROP_PENDING"!==o.phase&&sr();const a=o.critical,s=o.dimensions,l=s.draggables[o.critical.draggable.id],{impact:c,didDropInsideDroppable:d}=(({draggables:e,reason:t,lastImpact:r,home:n,viewport:o,onLiftImpact:i})=>{if(!r.at||"DROP"!==t)return{impact:Ln({draggables:e,impact:i,destination:n,viewport:o,forceShouldAnimate:!0}),didDropInsideDroppable:!1};return"REORDER"===r.at.type?{impact:r,didDropInsideDroppable:!0}:{impact:{...r,displaced:Hr},didDropInsideDroppable:!0}})({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}),p=d?Gr(c):null,u=d?Wr(c):null,g={index:a.draggable.index,droppableId:a.droppable.id},m={draggableId:l.descriptor.id,type:l.descriptor.type,source:g,reason:i,mode:o.movementMode,destination:p,combine:u},f=(({impact:e,draggable:t,dimensions:r,viewport:n,afterCritical:o})=>{const{draggables:i,droppables:a}=r,s=wn(e),l=s?a[s]:null,c=a[t.descriptor.droppableId],d=Mn({impact:e,draggable:t,draggables:i,afterCritical:o,droppable:l||c,viewport:n});return xr(d,t.client.borderBox.center)})({impact:c,draggable:l,dimensions:s,viewport:o.viewport,afterCritical:o.afterCritical}),b={critical:o.critical,afterCritical:o.afterCritical,result:m,impact:c};if(!(!Er(o.current.client.offset,f)||Boolean(m.combine)))return void t(ro({completed:b}));const h=(({current:e,destination:t,reason:r})=>{const n=wr(e,t);if(n<=0)return fo;if(n>=1500)return bo;const o=fo+ho*(n/1500);return Number(("CANCEL"===r?.6*o:o).toFixed(2))})({current:o.current.client.offset,destination:f,reason:i});t((e=>({type:"DROP_ANIMATE",payload:e}))({newHomeClientOffset:f,dropDuration:h,completed:b}))};var vo=()=>({x:window.pageXOffset,y:window.pageYOffset});function xo({onWindowScroll:e}){const t=zt(function(){e(vo())}),r=function(e){return{eventName:"scroll",options:{passive:!0,capture:!1},fn:t=>{t.target!==window&&t.target!==window.document||e()}}}(t);let n=or;function o(){return n!==or}return{start:function(){o()&&sr(),n=ir(window,[r])},stop:function(){o()||sr(),t.cancel(),n(),n=or},isActive:o}}const Eo=e=>{const t=xo({onWindowScroll:t=>{e.dispatch({type:"MOVE_BY_WINDOW_SCROLL",payload:{newScroll:t}})}});return e=>r=>{!t.isActive()&&qn(r,"INITIAL_PUBLISH")&&t.start(),t.isActive()&&(e=>qn(e,"DROP_COMPLETE")||qn(e,"DROP_ANIMATE")||qn(e,"FLUSH"))(r)&&t.stop(),e(r)}};var Io=()=>{const e=[];return{add:t=>{const r=setTimeout(()=>(t=>{const r=e.findIndex(e=>e.timerId===t);-1===r&&sr();const[n]=e.splice(r,1);n.callback()})(r)),n={timerId:r,callback:t};e.push(n)},flush:()=>{if(!e.length)return;const t=[...e];e.length=0,t.forEach(e=>{clearTimeout(e.timerId),e.callback()})}}};const Do=(e,t)=>{t()},wo=(e,t)=>({draggableId:e.draggable.id,type:e.droppable.type,source:{droppableId:e.droppable.id,index:e.draggable.index},mode:t});function So(e,t,r,n){if(!e)return void r(n(t));const o=(e=>{let t=!1,r=!1;const n=setTimeout(()=>{r=!0}),o=o=>{t||r||(t=!0,e(o),clearTimeout(n))};return o.wasCalled=()=>t,o})(r);e(t,{announce:o}),o.wasCalled()||r(n(t))}var Co=(e,t)=>{const r=((e,t)=>{const r=Io();let n=null;const o=r=>{n||sr(),n=null,Do(0,()=>So(e().onDragEnd,r,t,gr.onDragEnd))};return{beforeCapture:(t,r)=>{n&&sr(),Do(0,()=>{const n=e().onBeforeCapture;n&&n({draggableId:t,mode:r})})},beforeStart:(t,r)=>{n&&sr(),Do(0,()=>{const n=e().onBeforeDragStart;n&&n(wo(t,r))})},start:(o,i)=>{n&&sr();const a=wo(o,i);n={mode:i,lastCritical:o,lastLocation:a.source,lastCombine:null},r.add(()=>{Do(0,()=>So(e().onDragStart,a,t,gr.onDragStart))})},update:(o,i)=>{const a=Gr(i),s=Wr(i);n||sr();const l=!((e,t)=>{if(e===t)return!0;const r=e.draggable.id===t.draggable.id&&e.draggable.droppableId===t.draggable.droppableId&&e.draggable.type===t.draggable.type&&e.draggable.index===t.draggable.index,n=e.droppable.id===t.droppable.id&&e.droppable.type===t.droppable.type;return r&&n})(o,n.lastCritical);l&&(n.lastCritical=o);const c=(p=a,!(null==(d=n.lastLocation)&&null==p||null!=d&&null!=p&&d.droppableId===p.droppableId&&d.index===p.index));var d,p;c&&(n.lastLocation=a);const u=!((e,t)=>null==e&&null==t||null!=e&&null!=t&&e.draggableId===t.draggableId&&e.droppableId===t.droppableId)(n.lastCombine,s);if(u&&(n.lastCombine=s),!l&&!c&&!u)return;const g={...wo(o,n.mode),combine:s,destination:a};r.add(()=>{Do(0,()=>So(e().onDragUpdate,g,t,gr.onDragUpdate))})},flush:()=>{n||sr(),r.flush()},drop:o,abort:()=>{if(!n)return;const e={...wo(n.lastCritical,n.mode),combine:null,destination:null,reason:"CANCEL"};o(e)}}})(e,t);return e=>t=>n=>{if(qn(n,"BEFORE_INITIAL_CAPTURE"))return void r.beforeCapture(n.payload.draggableId,n.payload.movementMode);if(qn(n,"INITIAL_PUBLISH")){const e=n.payload.critical;return r.beforeStart(e,n.payload.movementMode),t(n),void r.start(e,n.payload.movementMode)}if(qn(n,"DROP_COMPLETE")){const e=n.payload.completed.result;return r.flush(),t(n),void r.drop(e)}if(t(n),qn(n,"FLUSH"))return void r.abort();const o=e.getState();"DRAGGING"===o.phase&&r.update(o.critical,o.impact)}};const Ao=e=>t=>r=>{if(!qn(r,"DROP_ANIMATION_FINISHED"))return void t(r);const n=e.getState();"DROP_ANIMATING"!==n.phase&&sr(),e.dispatch(ro({completed:n.completed}))},Po=e=>{let t=null,r=null;return n=>o=>{if((qn(o,"FLUSH")||qn(o,"DROP_COMPLETE")||qn(o,"DROP_ANIMATION_FINISHED"))&&(r&&(cancelAnimationFrame(r),r=null),t&&(t(),t=null)),n(o),!qn(o,"DROP_ANIMATE"))return;const i={eventName:"scroll",options:{capture:!0,passive:!1,once:!0},fn:function(){"DROP_ANIMATING"===e.getState().phase&&e.dispatch({type:"DROP_ANIMATION_FINISHED",payload:null})}};r=requestAnimationFrame(()=>{r=null,t=ir(window,[i])})}};var Oo=e=>t=>r=>n=>{if((e=>qn(e,"DROP_COMPLETE")||qn(e,"DROP_ANIMATE")||qn(e,"FLUSH"))(n))return e.stop(),void r(n);if(qn(n,"INITIAL_PUBLISH")){r(n);const o=t.getState();return"DRAGGING"!==o.phase&&sr(),void e.start(o)}r(n),e.scroll(t.getState())};const Ro=e=>t=>r=>{if(t(r),!qn(r,"PUBLISH_WHILE_DRAGGING"))return;const n=e.getState();"DROP_PENDING"===n.phase&&(n.isWaiting||e.dispatch(no({reason:n.reason})))},_o=Se;var Bo=({dimensionMarshal:e,focusMarshal:t,styleMarshal:r,getResponders:n,announce:o,autoScroller:i})=>{return Ie(Un,_o(function(...e){return t=>(r,n)=>{const o=t(r,n);let i=()=>{throw new Error(ye(15))};const a={getState:o.getState,dispatch:(e,...t)=>i(e,...t)},s=e.map(e=>e(a));return i=Se(...s)(o.dispatch),{...o,dispatch:i}}}((a=r,()=>e=>t=>{qn(t,"INITIAL_PUBLISH")&&a.dragging(),qn(t,"DROP_ANIMATE")&&a.dropping(t.payload.completed.result.reason),(qn(t,"FLUSH")||qn(t,"DROP_COMPLETE"))&&a.resting(),e(t)}),(e=>()=>t=>r=>{(qn(r,"DROP_COMPLETE")||qn(r,"FLUSH")||qn(r,"DROP_ANIMATE"))&&e.stopPublishing(),t(r)})(e),(e=>({getState:t,dispatch:r})=>n=>o=>{if(!qn(o,"LIFT"))return void n(o);const{id:i,clientSelection:a,movementMode:s}=o.payload,l=t();"DROP_ANIMATING"===l.phase&&r(ro({completed:l.completed})),"IDLE"!==t().phase&&sr(),r({type:"FLUSH",payload:null}),r({type:"BEFORE_INITIAL_CAPTURE",payload:{draggableId:i,movementMode:s}});const c={draggableId:i,scrollOptions:{shouldPublishImmediately:"SNAP"===s}},{critical:d,dimensions:p,viewport:u}=e.startPublishing(c);r({type:"INITIAL_PUBLISH",payload:{critical:d,dimensions:p,clientSelection:a,movementMode:s,viewport:u}})})(e),yo,Ao,Po,Ro,Oo(i),Eo,(e=>{let t=!1;return()=>r=>n=>{if(qn(n,"INITIAL_PUBLISH"))return t=!0,e.tryRecordFocus(n.payload.critical.draggable.id),r(n),void e.tryRestoreFocusRecorded();if(r(n),t){if(qn(n,"FLUSH"))return t=!1,void e.tryRestoreFocusRecorded();if(qn(n,"DROP_COMPLETE")){t=!1;const r=n.payload.completed.result;r.combine&&e.tryShiftRecord(r.draggableId,r.combine.draggableId),e.tryRestoreFocusRecorded()}}}})(t),Co(n,o))));var a};var No=({scrollHeight:e,scrollWidth:t,height:r,width:n})=>{const o=xr({x:t,y:e},{x:n,y:r});return{x:Math.max(0,o.x),y:Math.max(0,o.y)}},To=()=>{const e=document.documentElement;return e||sr(),e},Lo=()=>{const e=To();return No({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,width:e.clientWidth,height:e.clientHeight})},Mo=({critical:e,scrollOptions:t,registry:r})=>{const n=(()=>{const e=vo(),t=Lo(),r=e.y,n=e.x,o=To(),i=o.clientWidth,a=o.clientHeight;return{frame:kt({top:r,left:n,right:n+i,bottom:r+a}),scroll:{initial:e,current:e,max:t,diff:{value:yr,displacement:yr}}}})(),o=n.scroll.current,i=e.droppable,a=r.droppable.getAllByType(i.type).map(e=>e.callbacks.getDimensionAndWatchScroll(o,t)),s=r.draggable.getAllByType(e.draggable.type).map(e=>e.getDimension(o));return{dimensions:{draggables:Tr(s),droppables:Nr(a)},critical:e,viewport:n}};function ko(e,t,r){if(r.descriptor.id===t.id)return!1;if(r.descriptor.type!==t.type)return!1;return"virtual"===e.droppable.getById(r.descriptor.droppableId).descriptor.mode}var Go=(e,t)=>{let r=null;const n=function({registry:e,callbacks:t}){let r={additions:{},removals:{},modified:{}},n=null;const o=()=>{n||(t.collectionStarting(),n=requestAnimationFrame(()=>{n=null;const{additions:o,removals:i,modified:a}=r,s=Object.keys(o).map(t=>e.draggable.getById(t).getDimension(yr)).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};r={additions:{},removals:{},modified:{}},t.publish(c)}))};return{add:e=>{const t=e.descriptor.id;r.additions[t]=e,r.modified[e.descriptor.droppableId]=!0,r.removals[t]&&delete r.removals[t],o()},remove:e=>{const t=e.descriptor;r.removals[t.id]=!0,r.modified[t.droppableId]=!0,r.additions[t.id]&&delete r.additions[t.id],o()},stop:()=>{n&&(cancelAnimationFrame(n),n=null,r={additions:{},removals:{},modified:{}})}}}({callbacks:{publish:t.publishWhileDragging,collectionStarting:t.collectionStarting},registry:e}),o=t=>{r||sr();const o=r.critical.draggable;"ADDITION"===t.type&&ko(e,o,t.value)&&n.add(t.value),"REMOVAL"===t.type&&ko(e,o,t.value)&&n.remove(t.value)},i={updateDroppableIsEnabled:(n,o)=>{e.droppable.exists(n)||sr(),r&&t.updateDroppableIsEnabled({id:n,isEnabled:o})},updateDroppableIsCombineEnabled:(n,o)=>{r&&(e.droppable.exists(n)||sr(),t.updateDroppableIsCombineEnabled({id:n,isCombineEnabled:o}))},scrollDroppable:(t,n)=>{r&&e.droppable.getById(t).callbacks.scroll(n)},updateDroppableScroll:(n,o)=>{r&&(e.droppable.exists(n)||sr(),t.updateDroppableScroll({id:n,newScroll:o}))},startPublishing:t=>{r&&sr();const n=e.draggable.getById(t.draggableId),i=e.droppable.getById(n.descriptor.droppableId),a={draggable:n.descriptor,droppable:i.descriptor},s=e.subscribe(o);return r={critical:a,unsubscribe:s},Mo({critical:a,registry:e,scrollOptions:t.scrollOptions})},stopPublishing:()=>{if(!r)return;n.stop();const t=r.critical.droppable;e.droppable.getAllByType(t.type).forEach(e=>e.callbacks.dragStopped()),r.unsubscribe(),r=null}};return i},Wo=(e,t)=>"IDLE"===e.phase||"DROP_ANIMATING"===e.phase&&(e.completed.result.draggableId!==t&&"DROP"===e.completed.result.reason),Fo=e=>{window.scrollBy(e.x,e.y)};const $o=Br(e=>Lr(e).filter(e=>!!e.isEnabled&&!!e.frame));var jo=({center:e,destination:t,droppables:r})=>{if(t){const e=r[t];return e.frame?e:null}const n=((e,t)=>{const r=$o(t).find(t=>(t.frame||sr(),An(t.frame.pageMarginBox)(e)))||null;return r})(e,r);return n};const Ho={startFromPercentage:.25,maxScrollAtPercentage:.05,maxPixelScroll:28,ease:e=>e**2,durationDampening:{stopDampeningAt:1200,accelerateAt:360},disabled:!1};var Uo=({startOfRange:e,endOfRange:t,current:r})=>{const n=t-e;if(0===n)return 0;return(r-e)/n},qo=({distanceToEdge:e,thresholds:t,dragStartTime:r,shouldUseTimeDampening:n,getAutoScrollerOptions:o})=>{const i=((e,t,r=()=>Ho)=>{const n=r();if(e>t.startScrollingFrom)return 0;if(e<=t.maxScrollValueAt)return n.maxPixelScroll;if(e===t.startScrollingFrom)return 1;const o=1-Uo({startOfRange:t.maxScrollValueAt,endOfRange:t.startScrollingFrom,current:e}),i=n.maxPixelScroll*n.ease(o);return Math.ceil(i)})(e,t,o);return 0===i?0:n?Math.max(((e,t,r)=>{const n=r(),o=n.durationDampening.accelerateAt,i=n.durationDampening.stopDampeningAt,a=t,s=i,l=Date.now()-a;if(l>=i)return e;if(l<o)return 1;const c=Uo({startOfRange:o,endOfRange:s,current:l}),d=e*n.ease(c);return Math.ceil(d)})(i,r,o),1):i},Vo=({container:e,distanceToEdges:t,dragStartTime:r,axis:n,shouldUseTimeDampening:o,getAutoScrollerOptions:i})=>{const a=((e,t,r=()=>Ho)=>{const n=r();return{startScrollingFrom:e[t.size]*n.startFromPercentage,maxScrollValueAt:e[t.size]*n.maxScrollAtPercentage}})(e,n,i);return t[n.end]<t[n.start]?qo({distanceToEdge:t[n.end],thresholds:a,dragStartTime:r,shouldUseTimeDampening:o,getAutoScrollerOptions:i}):-1*qo({distanceToEdge:t[n.start],thresholds:a,dragStartTime:r,shouldUseTimeDampening:o,getAutoScrollerOptions:i})};const zo=Cr(e=>0===e?0:e);var Yo=({dragStartTime:e,container:t,subject:r,center:n,shouldUseTimeDampening:o,getAutoScrollerOptions:i})=>{const a={top:n.y-t.top,right:t.right-n.x,bottom:t.bottom-n.y,left:n.x-t.left},s=Vo({container:t,distanceToEdges:a,dragStartTime:e,axis:Yr,shouldUseTimeDampening:o,getAutoScrollerOptions:i}),l=Vo({container:t,distanceToEdges:a,dragStartTime:e,axis:Zr,shouldUseTimeDampening:o,getAutoScrollerOptions:i}),c=zo({x:l,y:s});if(Er(c,yr))return null;const d=(({container:e,subject:t,proposedScroll:r})=>{const n=t.height>e.height,o=t.width>e.width;return o||n?o&&n?null:{x:o?0:r.x,y:n?0:r.y}:r})({container:t,subject:r,proposedScroll:c});return d?Er(d,yr)?null:d:null};const Zo=Cr(e=>0===e?0:e>0?1:-1),Jo=(()=>{const e=(e,t)=>e<0?e:e>t?e-t:0;return({current:t,max:r,change:n})=>{const o=vr(t,n),i={x:e(o.x,r.x),y:e(o.y,r.y)};return Er(i,yr)?null:i}})(),Xo=({max:e,current:t,change:r})=>{const n={x:Math.max(t.x,e.x),y:Math.max(t.y,e.y)},o=Zo(r),i=Jo({max:n,current:t,change:o});return!i||(0!==o.x&&0===i.x||0!==o.y&&0===i.y)},Ko=(e,t)=>Xo({current:e.scroll.current,max:e.scroll.max,change:t}),Qo=(e,t)=>{const r=e.frame;return!!r&&Xo({current:r.scroll.current,max:r.scroll.max,change:t})};var ei=({state:e,dragStartTime:t,shouldUseTimeDampening:r,scrollWindow:n,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:r,dragStartTime:n,shouldUseTimeDampening:o,getAutoScrollerOptions:i})=>{const a=Yo({dragStartTime:n,container:e.frame,subject:t,center:r,shouldUseTimeDampening:o,getAutoScrollerOptions:i});return a&&Ko(e,a)?a:null})({dragStartTime:t,viewport:e.viewport,subject:s,center:a,shouldUseTimeDampening:r,getAutoScrollerOptions:i});if(o)return void n(o)}const l=jo({center:a,destination:wn(e.impact),droppables:e.dimensions.droppables});if(!l)return;const c=(({droppable:e,subject:t,center:r,dragStartTime:n,shouldUseTimeDampening:o,getAutoScrollerOptions:i})=>{const a=e.frame;if(!a)return null;const s=Yo({dragStartTime:n,container:a.pageMarginBox,subject:t,center:r,shouldUseTimeDampening:o,getAutoScrollerOptions:i});return s&&Qo(e,s)?s:null})({dragStartTime:t,droppable:l,subject:s,center:a,shouldUseTimeDampening:r,getAutoScrollerOptions:i});c&&o(l.descriptor.id,c)},ti=({move:e,scrollDroppable:t,scrollWindow:r})=>{const n=(e,r)=>{if(!Qo(e,r))return r;const n=((e,t)=>{const r=e.frame;return r&&Qo(e,t)?Jo({current:r.scroll.current,max:r.scroll.max,change:t}):null})(e,r);if(!n)return t(e.descriptor.id,r),null;const o=xr(r,n);t(e.descriptor.id,o);return xr(r,o)},o=(e,t,n)=>{if(!e)return n;if(!Ko(t,n))return n;const o=((e,t)=>{if(!Ko(e,t))return null;const r=e.scroll.max,n=e.scroll.current;return Jo({current:n,max:r,change:t})})(t,n);if(!o)return r(n),null;const i=xr(n,o);r(i);return xr(n,i)};return t=>{const r=t.scrollJumpRequest;if(!r)return;const i=wn(t.impact);i||sr();const a=n(t.dimensions.droppables[i],r);if(!a)return;const s=t.viewport,l=o(t.isWindowScrollAllowed,s,a);l&&((t,r)=>{const n=vr(t.current.client.selection,r);e({client:n})})(t,l)}};const ri="data-rfd",ni=(()=>{const e=`${ri}-drag-handle`;return{base:e,draggableId:`${e}-draggable-id`,contextId:`${e}-context-id`}})(),oi=(()=>{const e=`${ri}-draggable`;return{base:e,contextId:`${e}-context-id`,id:`${e}-id`}})(),ii=(()=>{const e=`${ri}-droppable`;return{base:e,contextId:`${e}-context-id`,id:`${e}-id`}})(),ai={contextId:`${ri}-scroll-container-context-id`},si=(e,t)=>e.map(e=>{const r=e.styles[t];return r?`${e.selector} { ${r} }`:""}).join(" ");const li="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?Qt:Kt,ci=()=>{const e=document.querySelector("head");return e||sr(),e},di=e=>{const t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.type="text/css",t};function pi(e,t){const r=br(()=>(e=>{const t=(r=e,e=>`[${e}="${r}"]`);var r;const n=(()=>{const e="\n cursor: -webkit-grab;\n cursor: grab;\n ";return{selector:t(ni.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: ${po.outOfTheWay};\n `;return{selector:t(oi.contextId),styles:{dragging:e,dropAnimating:e,userCancel:e}}})(),n,{selector:t(ii.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:si(o,"always"),resting:si(o,"resting"),dragging:si(o,"dragging"),dropAnimating:si(o,"dropAnimating"),userCancel:si(o,"userCancel")}})(e),[e]),n=Xt(null),o=Xt(null),i=hr(Br(e=>{const t=o.current;t||sr(),t.textContent=e}),[]),a=hr(e=>{const t=n.current;t||sr(),t.textContent=e},[]);li(()=>{(n.current||o.current)&&sr();const s=di(t),l=di(t);return n.current=s,o.current=l,s.setAttribute(`${ri}-always`,e),l.setAttribute(`${ri}-dynamic`,e),ci().appendChild(s),ci().appendChild(l),a(r.always),i(r.resting),()=>{const e=e=>{const t=e.current;t||sr(),ci().removeChild(t),e.current=null};e(n),e(o)}},[t,a,i,r.always,r.resting,e]);const s=hr(()=>i(r.dragging),[i,r.dragging]),l=hr(e=>{i("DROP"!==e?r.userCancel:r.dropAnimating)},[i,r.dropAnimating,r.userCancel]),c=hr(()=>{o.current&&i(r.resting)},[i,r.resting]);return br(()=>({dragging:s,dropping:l,resting:c}),[s,l,c])}function ui(e,t){return Array.from(e.querySelectorAll(t))}var gi=e=>e&&e.ownerDocument&&e.ownerDocument.defaultView?e.ownerDocument.defaultView:window;function mi(e){return e instanceof gi(e).HTMLElement}function fi(e){const t=Xt({}),r=Xt(null),n=Xt(null),o=Xt(!1),i=hr(function(e,r){const n={id:e,focus:r};return t.current[e]=n,function(){const r=t.current;r[e]!==n&&delete r[e]}},[]),a=hr(function(t){const r=function(e,t){const r=`[${ni.contextId}="${e}"]`,n=ui(document,r);if(!n.length)return null;const o=n.find(e=>e.getAttribute(ni.draggableId)===t);return o&&mi(o)?o:null}(e,t);r&&r!==document.activeElement&&r.focus()},[e]),s=hr(function(e,t){r.current===e&&(r.current=t)},[]),l=hr(function(){n.current||o.current&&(n.current=requestAnimationFrame(()=>{n.current=null;const e=r.current;e&&a(e)}))},[a]),c=hr(function(e){r.current=null;const t=document.activeElement;t&&t.getAttribute(ni.draggableId)===e&&(r.current=e)},[]);li(()=>(o.current=!0,function(){o.current=!1;const e=n.current;e&&cancelAnimationFrame(e)}),[]);return br(()=>({register:i,tryRecordFocus:c,tryRestoreFocusRecorded:l,tryShiftRecord:s}),[i,c,l,s])}function bi(){const e={draggables:{},droppables:{}},t=[];function r(e){t.length&&t.forEach(t=>t(e))}function n(t){return e.draggables[t]||null}function o(t){return e.droppables[t]||null}return{draggable:{register:t=>{e.draggables[t.descriptor.id]=t,r({type:"ADDITION",value:t})},update:(t,r)=>{const n=e.draggables[r.descriptor.id];n&&n.uniqueId===t.uniqueId&&(delete e.draggables[r.descriptor.id],e.draggables[t.descriptor.id]=t)},unregister:t=>{const o=t.descriptor.id,i=n(o);i&&t.uniqueId===i.uniqueId&&(delete e.draggables[o],e.droppables[t.descriptor.droppableId]&&r({type:"REMOVAL",value:t}))},getById:function(e){const t=n(e);return t||sr(),t},findById:n,exists:e=>Boolean(n(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 r=o(t.descriptor.id);r&&t.uniqueId===r.uniqueId&&delete e.droppables[t.descriptor.id]},getById:function(e){const t=o(e);return t||sr(),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 r=t.indexOf(e);-1!==r&&t.splice(r,1)}},clean:function(){e.draggables={},e.droppables={},t.length=0}}}var hi=Zt.createContext(null),yi=()=>{const e=document.body;return e||sr(),e};const vi={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"};const xi={separator:"::"};function Ei(e,t=xi){const r=Zt.useId();return br(()=>`${e}${t.separator}${r}`,[t.separator,e,r])}var Ii=Zt.createContext(null);function Di(e){const t=Xt(e);return Kt(()=>{t.current=e}),t}function wi(e){return"IDLE"!==e.phase&&"DROP_ANIMATING"!==e.phase&&e.isDragging}const Si=9,Ci=13,Ai=33,Pi=34,Oi=35,Ri=36,_i={[Ci]:!0,[Si]:!0};var Bi=e=>{_i[e.keyCode]&&e.preventDefault()};const Ni=(()=>{const e="visibilitychange";if("undefined"==typeof document)return e;return[e,`ms${e}`,`webkit${e}`,`moz${e}`,`o${e}`].find(e=>`on${e}`in document)||e})();const Ti={type:"IDLE"};function Li({cancel:e,completed:t,getPhase:r,setPhase:n}){return[{eventName:"mousemove",fn:e=>{const{button:t,clientX:o,clientY:i}=e;if(0!==t)return;const a={x:o,y:i},s=r();if("DRAGGING"===s.type)return e.preventDefault(),void s.actions.move(a);"PENDING"!==s.type&&sr();const l=s.point;if(c=l,d=a,!(Math.abs(d.x-c.x)>=5||Math.abs(d.y-c.y)>=5))return;var c,d;e.preventDefault();const p=s.actions.fluidLift(a);n({type:"DRAGGING",actions:p})}},{eventName:"mouseup",fn:n=>{const o=r();"DRAGGING"===o.type?(n.preventDefault(),o.actions.drop({shouldBlockNextClick:!0}),t()):e()}},{eventName:"mousedown",fn:t=>{"DRAGGING"===r().type&&t.preventDefault(),e()}},{eventName:"keydown",fn:t=>{if("PENDING"!==r().type)return 27===t.keyCode?(t.preventDefault(),void e()):void Bi(t);e()}},{eventName:"resize",fn:e},{eventName:"scroll",options:{passive:!0,capture:!1},fn:()=>{"PENDING"===r().type&&e()}},{eventName:"webkitmouseforcedown",fn:t=>{const n=r();"IDLE"===n.type&&sr(),n.actions.shouldRespectForcePress()?e():t.preventDefault()}},{eventName:Ni,fn:e}]}function Mi(){}const ki={[Pi]:!0,[Ai]:!0,[Ri]:!0,[Oi]:!0};function Gi(e,t){function r(){t(),e.cancel()}return[{eventName:"keydown",fn:n=>27===n.keyCode?(n.preventDefault(),void r()):32===n.keyCode?(n.preventDefault(),t(),void e.drop()):40===n.keyCode?(n.preventDefault(),void e.moveDown()):38===n.keyCode?(n.preventDefault(),void e.moveUp()):39===n.keyCode?(n.preventDefault(),void e.moveRight()):37===n.keyCode?(n.preventDefault(),void e.moveLeft()):void(ki[n.keyCode]?n.preventDefault():Bi(n))},{eventName:"mousedown",fn:r},{eventName:"mouseup",fn:r},{eventName:"click",fn:r},{eventName:"touchstart",fn:r},{eventName:"resize",fn:r},{eventName:"wheel",fn:r,options:{passive:!0}},{eventName:Ni,fn:r}]}const Wi={type:"IDLE"};const Fi=["input","button","textarea","select","option","optgroup","video","audio"];function $i(e,t){if(null==t)return!1;if(Fi.includes(t.tagName.toLowerCase()))return!0;const r=t.getAttribute("contenteditable");return"true"===r||""===r||t!==e&&$i(e,t.parentElement)}function ji(e,t){const r=t.target;return!!mi(r)&&$i(e,r)}var Hi=e=>kt(e.getBoundingClientRect()).center;const Ui=(()=>{const e="matches";if("undefined"==typeof document)return e;return[e,"msMatchesSelector","webkitMatchesSelector"].find(e=>e in Element.prototype)||e})();function qi(e,t){return null==e?null:e[Ui](t)?e:qi(e.parentElement,t)}function Vi(e,t){return e.closest?e.closest(t):qi(e,t)}function zi(e,t){const r=t.target;if(!((n=r)instanceof gi(n).Element))return null;var n;const o=function(e){return`[${ni.contextId}="${e}"]`}(e),i=Vi(r,o);return i&&mi(i)?i:null}function Yi(e){e.preventDefault()}function Zi({expected:e,phase:t,isLockActive:r,shouldWarn:n}){return!!r()&&e===t}function Ji({lockAPI:e,store:t,registry:r,draggableId:n}){if(e.isClaimed())return!1;const o=r.draggable.findById(n);return!!o&&(!!o.options.isEnabled&&!!Wo(t.getState(),n))}function Xi({lockAPI:e,contextId:t,store:r,registry:n,draggableId:o,forceSensorStop:i,sourceEvent:a}){if(!Ji({lockAPI:e,store:r,registry:n,draggableId:o}))return null;const s=n.draggable.getById(o),l=function(e,t){const r=`[${oi.contextId}="${e}"]`,n=ui(document,r).find(e=>e.getAttribute(oi.id)===t);return n&&mi(n)?n:null}(t,s.descriptor.id);if(!l)return null;if(a&&!s.options.canDragInteractiveElements&&ji(l,a))return null;const c=e.claim(i||or);let d="PRE_DRAG";function p(){return s.options.shouldRespectForcePress}function u(){return e.isActive(c)}const g=function(e,t){Zi({expected:e,phase:d,isLockActive:u,shouldWarn:!0})&&r.dispatch(t())}.bind(null,"DRAGGING");function m(t){function n(){e.release(),d="COMPLETED"}function o(e,o={shouldBlockNextClick:!1}){if(t.cleanup(),o.shouldBlockNextClick){const e=ir(window,[{eventName:"click",fn:Yi,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(e)}n(),r.dispatch(no({reason:e}))}return"PRE_DRAG"!==d&&(n(),sr()),r.dispatch((e=>({type:"LIFT",payload:e}))(t.liftActionArgs)),d="DRAGGING",{isActive:()=>Zi({expected:"DRAGGING",phase:d,isLockActive:u,shouldWarn:!1}),shouldRespectForcePress:p,drop:e=>o("DROP",e),cancel:e=>o("CANCEL",e),...t.actions}}return{isActive:()=>Zi({expected:"PRE_DRAG",phase:d,isLockActive:u,shouldWarn:!1}),shouldRespectForcePress:p,fluidLift:function(e){const t=zt(e=>{g(()=>Xn({client:e}))});return{...m({liftActionArgs:{id:o,clientSelection:e,movementMode:"FLUID"},cleanup:()=>t.cancel(),actions:{move:t}}),move:t}},snapLift:function(){const e={moveUp:()=>g(Kn),moveRight:()=>g(eo),moveDown:()=>g(Qn),moveLeft:()=>g(to)};return m({liftActionArgs:{id:o,clientSelection:Hi(l),movementMode:"SNAP"},cleanup:or,actions:e})},abort:function(){Zi({expected:"PRE_DRAG",phase:d,isLockActive:u,shouldWarn:!0})&&e.release()}}}const Ki=[function(e){const t=Xt(Ti),r=Xt(or),n=br(()=>({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 n=e.findClosestDraggableId(t);if(!n)return;const o=e.tryGetLock(n,a,{sourceEvent:t});if(!o)return;t.preventDefault();const i={x:t.clientX,y:t.clientY};r.current(),c(o,i)}}),[e]),o=br(()=>({eventName:"webkitmouseforcewillbegin",fn:t=>{if(t.defaultPrevented)return;const r=e.findClosestDraggableId(t);if(!r)return;const n=e.findOptionsForDraggable(r);n&&(n.shouldRespectForcePress||e.canGetLock(r)&&t.preventDefault())}}),[e]),i=hr(function(){r.current=ir(window,[o,n],{passive:!1,capture:!0})},[o,n]),a=hr(()=>{"IDLE"!==t.current.type&&(t.current=Ti,r.current(),i())},[i]),s=hr(()=>{const e=t.current;a(),"DRAGGING"===e.type&&e.actions.cancel({shouldBlockNextClick:!0}),"PENDING"===e.type&&e.actions.abort()},[a]),l=hr(function(){const e=Li({cancel:s,completed:a,getPhase:()=>t.current,setPhase:e=>{t.current=e}});r.current=ir(window,e,{capture:!0,passive:!1})},[s,a]),c=hr(function(e,r){"IDLE"!==t.current.type&&sr(),t.current={type:"PENDING",point:r,actions:e},l()},[l]);li(function(){return i(),function(){r.current()}},[i])},function(e){const t=Xt(Mi),r=br(()=>({eventName:"keydown",fn:function(r){if(r.defaultPrevented)return;if(32!==r.keyCode)return;const o=e.findClosestDraggableId(r);if(!o)return;const i=e.tryGetLock(o,l,{sourceEvent:r});if(!i)return;r.preventDefault();let a=!0;const s=i.snapLift();function l(){a||sr(),a=!1,t.current(),n()}t.current(),t.current=ir(window,Gi(s,l),{capture:!0,passive:!1})}}),[e]),n=hr(function(){t.current=ir(window,[r],{passive:!1,capture:!0})},[r]);li(function(){return n(),function(){t.current()}},[n])},function(e){const t=Xt(Wi),r=Xt(or),n=hr(function(){return t.current},[]),o=hr(function(e){t.current=e},[]),i=br(()=>({eventName:"touchstart",fn:function(t){if(t.defaultPrevented)return;const n=e.findClosestDraggableId(t);if(!n)return;const o=e.tryGetLock(n,s,{sourceEvent:t});if(!o)return;const i=t.touches[0],{clientX:a,clientY:l}=i,c={x:a,y:l};r.current(),p(o,c)}}),[e]),a=hr(function(){r.current=ir(window,[i],{capture:!0,passive:!1})},[i]),s=hr(()=>{const e=t.current;"IDLE"!==e.type&&("PENDING"===e.type&&clearTimeout(e.longPressTimerId),o(Wi),r.current(),a())},[a,o]),l=hr(()=>{const e=t.current;s(),"DRAGGING"===e.type&&e.actions.cancel({shouldBlockNextClick:!0}),"PENDING"===e.type&&e.actions.abort()},[s]),c=hr(function(){const e={capture:!0,passive:!1},t={cancel:l,completed:s,getPhase:n},o=ir(window,function({cancel:e,completed:t,getPhase:r}){return[{eventName:"touchmove",options:{capture:!1},fn:t=>{const n=r();if("DRAGGING"!==n.type)return void e();n.hasMoved=!0;const{clientX:o,clientY:i}=t.touches[0],a={x:o,y:i};t.preventDefault(),n.actions.move(a)}},{eventName:"touchend",fn:n=>{const o=r();"DRAGGING"===o.type?(n.preventDefault(),o.actions.drop({shouldBlockNextClick:!0}),t()):e()}},{eventName:"touchcancel",fn:t=>{"DRAGGING"===r().type?(t.preventDefault(),e()):e()}},{eventName:"touchforcechange",fn:t=>{const n=r();"IDLE"===n.type&&sr();const o=t.touches[0];if(!o)return;if(!(o.force>=.15))return;const i=n.actions.shouldRespectForcePress();if("PENDING"!==n.type)return i?n.hasMoved?void t.preventDefault():void e():void t.preventDefault();i&&e()}},{eventName:Ni,fn:e}]}(t),e),i=ir(window,function({cancel:e,getPhase:t}){return[{eventName:"orientationchange",fn:e},{eventName:"resize",fn:e},{eventName:"contextmenu",fn:e=>{e.preventDefault()}},{eventName:"keydown",fn:r=>{"DRAGGING"===t().type?(27===r.keyCode&&r.preventDefault(),e()):e()}},{eventName:Ni,fn:e}]}(t),e);r.current=function(){o(),i()}},[l,n,s]),d=hr(function(){const e=n();"PENDING"!==e.type&&sr();const t=e.actions.fluidLift(e.point);o({type:"DRAGGING",actions:t,hasMoved:!1})},[n,o]),p=hr(function(e,t){"IDLE"!==n().type&&sr();const r=setTimeout(d,120);o({type:"PENDING",point:t,actions:e,longPressTimerId:r}),c()},[c,n,o,d]);li(function(){return a(),function(){r.current();const e=n();"PENDING"===e.type&&(clearTimeout(e.longPressTimerId),o(Wi))}},[n,a,o]),li(function(){return ir(window,[{eventName:"touchmove",fn:()=>{},options:{capture:!1,passive:!1}}])},[])}];function Qi({contextId:e,store:t,registry:r,customSensors:n,enableDefaultSensors:o}){const i=[...o?Ki:[],...n||[]],a=Jt(()=>function(){let e=null;function t(){e||sr(),e=null}return{isClaimed:function(){return Boolean(e)},isActive:function(t){return t===e},claim:function(t){e&&sr();const r={abandon:t};return e=r,r},release:t,tryAbandon:function(){e&&(e.abandon(),t())}}}())[0],s=hr(function(e,t){wi(e)&&!wi(t)&&a.tryAbandon()},[a]);li(function(){let e=t.getState();return t.subscribe(()=>{const r=t.getState();s(e,r),e=r})},[a,t,s]),li(()=>a.tryAbandon,[a.tryAbandon]);const l=hr(e=>Ji({lockAPI:a,registry:r,store:t,draggableId:e}),[a,r,t]),c=hr((n,o,i)=>Xi({lockAPI:a,registry:r,contextId:e,store:t,draggableId:n,forceSensorStop:o||null,sourceEvent:i&&i.sourceEvent?i.sourceEvent:null}),[e,a,r,t]),d=hr(t=>function(e,t){const r=zi(e,t);return r?r.getAttribute(ni.draggableId):null}(e,t),[e]),p=hr(e=>{const t=r.draggable.findById(e);return t?t.options:null},[r.draggable]),u=hr(function(){a.isClaimed()&&(a.tryAbandon(),"IDLE"!==t.getState().phase&&t.dispatch({type:"FLUSH",payload:null}))},[a,t]),g=hr(()=>a.isClaimed(),[a]),m=br(()=>({canGetLock:l,tryGetLock:c,findClosestDraggableId:d,findOptionsForDraggable:p,tryReleaseLock:u,isLockClaimed:g}),[l,c,d,p,u,g]);for(let e=0;e<i.length;e++)i[e](m)}function ea(e){return e.current||sr(),e.current}function ta(e){const{contextId:t,setCallbacks:r,sensors:n,nonce:o,dragHandleUsageInstructions:i}=e,a=Xt(null),s=Di(e),l=hr(()=>(e=>({onBeforeCapture:t=>{rr(()=>{e.onBeforeCapture&&e.onBeforeCapture(t)})},onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragEnd:e.onDragEnd,onDragUpdate:e.onDragUpdate}))(s.current),[s]),c=hr(()=>(e=>({...Ho,...e.autoScrollerOptions,durationDampening:{...Ho.durationDampening,...e.autoScrollerOptions}}))(s.current),[s]),d=function(e){const t=br(()=>(e=>`rfd-announcement-${e}`)(e),[e]),r=Xt(null);return Kt(function(){const e=document.createElement("div");return r.current=e,e.id=t,e.setAttribute("aria-live","assertive"),e.setAttribute("aria-atomic","true"),Yt(e.style,vi),yi().appendChild(e),function(){setTimeout(function(){const t=yi();t.contains(e)&&t.removeChild(e),e===r.current&&(r.current=null)})}},[t]),hr(e=>{const t=r.current;t&&(t.textContent=e)},[])}(t),p=function({contextId:e,text:t}){const r=Ei("hidden-text",{separator:"-"}),n=br(()=>function({contextId:e,uniqueId:t}){return`rfd-hidden-text-${e}-${t}`}({contextId:e,uniqueId:r}),[r,e]);return Kt(function(){const e=document.createElement("div");return e.id=n,e.textContent=t,e.style.display="none",yi().appendChild(e),function(){const t=yi();t.contains(e)&&t.removeChild(e)}},[n,t]),n}({contextId:t,text:i}),u=pi(t,o),g=hr(e=>{ea(a).dispatch(e)},[]),m=br(()=>we({publishWhileDragging:Vn,updateDroppableScroll:Yn,updateDroppableIsEnabled:Zn,updateDroppableIsCombineEnabled:Jn,collectionStarting:zn},g),[g]),f=function(){const e=br(bi,[]);return Kt(()=>function(){e.clean()},[e]),e}(),b=br(()=>Go(f,m),[f,m]),h=br(()=>(({scrollDroppable:e,scrollWindow:t,move:r,getAutoScrollerOptions:n})=>{const o=(({scrollWindow:e,scrollDroppable:t,getAutoScrollerOptions:r=()=>Ho})=>{const n=zt(e),o=zt(t);let i=null;const a=e=>{i||sr();const{shouldUseTimeDampening:t,dragStartTime:a}=i;ei({state:e,scrollWindow:n,scrollDroppable:o,dragStartTime:a,shouldUseTimeDampening:t,getAutoScrollerOptions:r})};return{start:e=>{i&&sr();const t=Date.now();let n=!1;const o=()=>{n=!0};ei({state:e,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:o,scrollDroppable:o,getAutoScrollerOptions:r}),i={dragStartTime:t,shouldUseTimeDampening:n},n&&a(e)},stop:()=>{i&&(n.cancel(),o.cancel(),i=null)},scroll:a}})({scrollWindow:t,scrollDroppable:e,getAutoScrollerOptions:n}),i=ti({move:r,scrollWindow:t,scrollDroppable:e});return{scroll:e=>{n().disabled||"DRAGGING"!==e.phase||("FLUID"!==e.movementMode?e.scrollJumpRequest&&i(e):o.scroll(e))},start:o.start,stop:o.stop}})({scrollWindow:Fo,scrollDroppable:b.scrollDroppable,getAutoScrollerOptions:c,...we({move:Xn},g)}),[b.scrollDroppable,g,c]),y=fi(t),v=br(()=>Bo({announce:d,autoScroller:h,dimensionMarshal:b,focusMarshal:y,getResponders:l,styleMarshal:u}),[d,h,b,y,l,u]);a.current=v;const x=hr(()=>{const e=ea(a);"IDLE"!==e.getState().phase&&e.dispatch({type:"FLUSH",payload:null})},[]),E=hr(()=>{const e=ea(a).getState();return"DROP_ANIMATING"===e.phase||"IDLE"!==e.phase&&e.isDragging},[]);r(br(()=>({isDragging:E,tryAbort:x}),[E,x]));const I=hr(e=>Wo(ea(a).getState(),e),[]),D=hr(()=>Cn(ea(a).getState()),[]),w=br(()=>({marshal:b,focus:y,contextId:t,canLift:I,isMovementAllowed:D,dragHandleUsageInstructionsId:p,registry:f}),[t,b,p,y,I,D,f]);return Qi({contextId:t,store:v,registry:f,customSensors:n||null,enableDefaultSensors:!1!==e.enableDefaultSensors}),Kt(()=>x,[x]),Zt.createElement(Ii.Provider,{value:w},Zt.createElement(Rt,{context:hi,store:v},e.children))}function ra(e){const t=Zt.useId(),r=e.dragHandleUsageInstructions||gr.dragHandleUsageInstructions;return Zt.createElement(lr,null,n=>Zt.createElement(ta,{nonce:e.nonce,contextId:t,setCallbacks:n,dragHandleUsageInstructions:r,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 na=5e3,oa=4500,ia=(e,t)=>t?po.drop(t.duration):e?po.snap:po.fluid,aa=(e,t)=>{if(e)return t?ao.drop:ao.combining};function sa(e){return"DRAGGING"===e.type?function(e){const t=e.dimension.client,{offset:r,combineWith:n,dropping:o}=e,i=Boolean(n),a=(e=>null!=e.forceShouldAnimate?e.forceShouldAnimate:"SNAP"===e.mode)(e),s=Boolean(o),l=s?mo(r,i):go(r);return{position:"fixed",top:t.marginBox.top,left:t.marginBox.left,boxSizing:"border-box",width:t.borderBox.width,height:t.borderBox.height,transition:ia(a,o),transform:l,opacity:aa(i,s),zIndex:s?oa:na,pointerEvents:"none"}}(e):{transform:go((t=e).offset),transition:t.shouldAnimateDisplacement?void 0:"none"};var t}function la(e){const t=Ei("draggable"),{descriptor:r,registry:n,getDraggableRef:o,canDragInteractiveElements:i,shouldRespectForcePress:a,isEnabled:s}=e,l=br(()=>({canDragInteractiveElements:i,shouldRespectForcePress:a,isEnabled:s}),[i,s,a]),c=hr(e=>{const t=o();return t||sr(),function(e,t,r=yr){const n=window.getComputedStyle(t),o=t.getBoundingClientRect(),i=qt(o,n),a=Ut(i,r);return{descriptor:e,placeholder:{client:i,tagName:t.tagName.toLowerCase(),display:n.display},displaceBy:{x:i.marginBox.width,y:i.marginBox.height},client:i,page:a}}(r,t,e)},[r,o]),d=br(()=>({uniqueId:t,descriptor:r,options:l,getDimension:c}),[r,c,l,t]),p=Xt(d),u=Xt(!0);li(()=>(n.draggable.register(p.current),()=>n.draggable.unregister(p.current)),[n.draggable]),li(()=>{if(u.current)return void(u.current=!1);const e=p.current;p.current=d,n.draggable.update(d,e)},[d,n.draggable])}var ca=Zt.createContext(null);function da(e){const t=er(e);return t||sr(),t}function pa(e){e.preventDefault()}var ua=(e,t)=>e===t,ga=e=>{const{combine:t,destination:r}=e;return r?r.droppableId:t?t.droppableId:null};function ma(e=null){return{isDragging:!1,isDropAnimating:!1,isClone:!1,dropAnimation:null,mode:null,draggingOver:null,combineTargetFor:e,combineWith:null}}const fa={mapped:{type:"SECONDARY",offset:yr,combineTargetFor:null,shouldAnimateDisplacement:!0,snapshot:ma(null)}};const ba=Ot(()=>{const e=function(){const e=Br((e,t)=>({x:e,y:t})),t=Br((e,t,r=null,n=null,o=null)=>({isDragging:!0,isClone:t,isDropAnimating:Boolean(o),dropAnimation:o,mode:e,draggingOver:r,combineWith:n,combineTargetFor:null})),r=Br((e,r,n,o,i=null,a=null,s=null)=>({mapped:{type:"DRAGGING",dropping:null,draggingOver:i,combineWith:a,mode:r,offset:e,dimension:n,forceShouldAnimate:s,snapshot:t(r,o,i,a,null)}}));return(n,o)=>{if(wi(n)){if(n.critical.draggable.id!==o.draggableId)return null;const t=n.current.client.offset,a=n.dimensions.draggables[o.draggableId],s=wn(n.impact),l=(i=n.impact).at&&"COMBINE"===i.at.type?i.at.combine.draggableId:null,c=n.forceShouldAnimate;return r(e(t.x,t.y),n.movementMode,a,o.isClone,s,l,c)}var i;if("DROP_ANIMATING"===n.phase){const e=n.completed;if(e.result.draggableId!==o.draggableId)return null;const r=o.isClone,i=n.dimensions.draggables[o.draggableId],a=e.result,s=a.mode,l=ga(a),c=(e=>e.combine?e.combine.draggableId:null)(a),d={duration:n.dropDuration,curve:io,moveTo:n.newHomeClientOffset,opacity:c?ao.drop:null,scale:c?so.drop:null};return{mapped:{type:"DRAGGING",offset:n.newHomeClientOffset,dimension:i,dropping:d,draggingOver:l,combineWith:c,mode:s,forceShouldAnimate:null,snapshot:t(s,r,l,c,d)}}}return null}}(),t=function(){const e=Br((e,t)=>({x:e,y:t})),t=Br(ma),r=Br((e,r=null,n)=>({mapped:{type:"SECONDARY",offset:e,combineTargetFor:r,shouldAnimateDisplacement:n,snapshot:t(r)}})),n=e=>e?r(yr,e,!0):null,o=(t,o,i,a)=>{const s=i.displaced.visible[t],l=Boolean(a.inVirtualList&&a.effected[t]),c=Wr(i),d=c&&c.draggableId===t?o:null;if(!s){if(!l)return n(d);if(i.displaced.invisible[t])return null;const o=Ir(a.displacedBy.point),s=e(o.x,o.y);return r(s,d,!0)}if(l)return n(d);const p=i.displacedBy.point,u=e(p.x,p.y);return r(u,d,s.shouldAnimate)};return(e,t)=>{if(wi(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 r=e.completed;return r.result.draggableId===t.draggableId?null:o(t.draggableId,r.result.draggableId,r.impact,r.afterCritical)}return null}}();return(r,n)=>e(r,n)||t(r,n)||fa},{dropAnimationFinished:oo},null,{context:hi,areStatePropsEqual:ua})(e=>{const t=Xt(null),r=hr((e=null)=>{t.current=e},[]),n=hr(()=>t.current,[]),{contextId:o,dragHandleUsageInstructionsId:i,registry:a}=da(Ii),{type:s,droppableId:l}=da(ca),c=br(()=>({id:e.draggableId,index:e.index,type:s,droppableId:l}),[e.draggableId,e.index,s,l]),{children:d,draggableId:p,isEnabled:u,shouldRespectForcePress:g,canDragInteractiveElements:m,isClone:f,mapped:b,dropAnimationFinished:h}=e;if(!f){la(br(()=>({descriptor:c,registry:a,getDraggableRef:n,canDragInteractiveElements:m,shouldRespectForcePress:g,isEnabled:u}),[c,a,n,m,g,u]))}const y=br(()=>u?{tabIndex:0,role:"button","aria-describedby":i,"data-rfd-drag-handle-draggable-id":p,"data-rfd-drag-handle-context-id":o,draggable:!1,onDragStart:pa}:null,[o,i,p,u]),v=hr(e=>{"DRAGGING"===b.type&&b.dropping&&"transform"===e.propertyName&&rr(h)},[h,b]),x=br(()=>{const e=sa(b),t="DRAGGING"===b.type&&b.dropping?v:void 0;return{innerRef:r,draggableProps:{"data-rfd-draggable-context-id":o,"data-rfd-draggable-id":p,style:e,onTransitionEnd:t},dragHandleProps:y}},[o,y,p,b,v,r]),E=br(()=>({draggableId:c.id,type:c.type,source:{index:c.index,droppableId:c.droppableId}}),[c.droppableId,c.id,c.index,c.type]);return Zt.createElement(Zt.Fragment,null,d(x,b.snapshot,E))});function ha(e){return da(ca).isUsingCloneFor!==e.draggableId||e.isClone?Zt.createElement(ba,e):null}function ya(e){const t="boolean"!=typeof e.isDragDisabled||!e.isDragDisabled,r=Boolean(e.disableInteractiveElementBlocking),n=Boolean(e.shouldRespectForcePress);return Zt.createElement(ha,Yt({},e,{isClone:!1,isEnabled:t,canDragInteractiveElements:r,shouldRespectForcePress:n}))}const va=e=>t=>e===t,xa=va("scroll"),Ea=va("auto"),Ia=(e,t)=>t(e.overflowX)||t(e.overflowY),Da=e=>null==e||e===document.body||e===document.documentElement?null:(e=>{const t=window.getComputedStyle(e),r={overflowX:t.overflowX,overflowY:t.overflowY};return Ia(r,xa)||Ia(r,Ea)})(e)?e:Da(e.parentElement);var wa=e=>({x:e.scrollLeft,y:e.scrollTop});const Sa=e=>{if(!e)return!1;return"fixed"===window.getComputedStyle(e).position||Sa(e.parentElement)};var Ca=({ref:e,descriptor:t,env:r,windowScroll:n,direction:o,isDropDisabled:i,isCombineEnabled:a,shouldClipSubject:s})=>{const l=r.closestScrollable,c=((e,t)=>{const r=Vt(e);if(!t)return r;if(e!==t)return r;const n=r.paddingBox.top-t.scrollTop,o=r.paddingBox.left-t.scrollLeft,i=n+t.scrollHeight,a=o+t.scrollWidth,s=Gt({top:n,right:a,bottom:i,left:o},r.border);return $t({borderBox:s,margin:r.margin,border:r.border,padding:r.padding})})(e,l),d=Ut(c,n),p=(()=>{if(!l)return null;const e=Vt(l),t={scrollHeight:l.scrollHeight,scrollWidth:l.scrollWidth};return{client:e,page:Ut(e,n),scroll:wa(l),scrollSize:t,shouldClipSubject:s}})(),u=(({descriptor:e,isEnabled:t,isCombineEnabled:r,isFixedOnPage:n,direction:o,client:i,page:a,closest:s})=>{const l=(()=>{if(!s)return null;const{scrollSize:e,client:t}=s,r=No({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:r,diff:{value:yr,displacement:yr}}}})(),c="vertical"===o?Yr:Zr;return{descriptor:e,isCombineEnabled:r,isFixedOnPage:n,axis:c,isEnabled:t,client:i,page:a,frame:l,subject:Rr({page:a,withPlaceholder:null,axis:c,frame:l})}})({descriptor:t,isEnabled:!i,isCombineEnabled:a,isFixedOnPage:r.isFixedOnPage,direction:o,client:c,page:d,closest:p});return u};const Aa={passive:!1},Pa={passive:!0};var Oa=e=>e.shouldPublishImmediately?Aa:Pa;const Ra=e=>e&&e.env.closestScrollable||null;function _a(e){const t=Xt(null),r=da(Ii),n=Ei("droppable"),{registry:o,marshal:i}=r,a=Di(e),s=br(()=>({id:e.droppableId,type:e.type,mode:e.mode}),[e.droppableId,e.mode,e.type]),l=Xt(s),c=br(()=>Br((e,r)=>{t.current||sr();const n={x:e,y:r};i.updateDroppableScroll(s.id,n)}),[s.id,i]),d=hr(()=>{const e=t.current;return e&&e.env.closestScrollable?wa(e.env.closestScrollable):yr},[]),p=hr(()=>{const e=d();c(e.x,e.y)},[d,c]),u=br(()=>zt(p),[p]),g=hr(()=>{const e=t.current,r=Ra(e);e&&r||sr();e.scrollOptions.shouldPublishImmediately?p():u()},[u,p]),m=hr((e,n)=>{t.current&&sr();const o=a.current,i=o.getDroppableRef();i||sr();const l={closestScrollable:Da(c=i),isFixedOnPage:Sa(c)};var c;const d={ref:i,descriptor:s,env:l,scrollOptions:n};t.current=d;const p=Ca({ref:i,descriptor:s,env:l,windowScroll:e,direction:o.direction,isDropDisabled:o.isDropDisabled,isCombineEnabled:o.isCombineEnabled,shouldClipSubject:!o.ignoreContainerClipping}),u=l.closestScrollable;return u&&(u.setAttribute(ai.contextId,r.contextId),u.addEventListener("scroll",g,Oa(d.scrollOptions))),p},[r.contextId,s,g,a]),f=hr(()=>{const e=t.current,r=Ra(e);return e&&r||sr(),wa(r)},[]),b=hr(()=>{const e=t.current;e||sr();const r=Ra(e);t.current=null,r&&(u.cancel(),r.removeAttribute(ai.contextId),r.removeEventListener("scroll",g,Oa(e.scrollOptions)))},[g,u]),h=hr(e=>{const r=t.current;r||sr();const n=Ra(r);n||sr(),n.scrollTop+=e.y,n.scrollLeft+=e.x},[]),y=br(()=>({getDimensionAndWatchScroll:m,getScrollWhileDragging:f,dragStopped:b,scroll:h}),[b,m,f,h]),v=br(()=>({uniqueId:n,descriptor:s,callbacks:y}),[y,s,n]);li(()=>(l.current=v.descriptor,o.droppable.register(v),()=>{t.current&&b(),o.droppable.unregister(v)}),[y,s,b,v,i,o.droppable]),li(()=>{t.current&&i.updateDroppableIsEnabled(l.current.id,!e.isDropDisabled)},[e.isDropDisabled,i]),li(()=>{t.current&&i.updateDroppableIsCombineEnabled(l.current.id,e.isCombineEnabled)},[e.isCombineEnabled,i])}function Ba(){}const Na={width:0,height:0,margin:{top:0,right:0,bottom:0,left:0}},Ta=({isAnimatingOpenOnMount:e,placeholder:t,animate:r})=>{const n=(({isAnimatingOpenOnMount:e,placeholder:t,animate:r})=>e||"close"===r?Na:{height:t.client.borderBox.height,width:t.client.borderBox.width,margin:t.client.margin})({isAnimatingOpenOnMount:e,placeholder:t,animate:r});return{display:t.display,boxSizing:"border-box",width:n.width,height:n.height,marginTop:n.margin.top,marginRight:n.margin.right,marginBottom:n.margin.bottom,marginLeft:n.margin.left,flexShrink:"0",flexGrow:"0",pointerEvents:"none",transition:"none"!==r?po.placeholder:null}};var La=Zt.memo(e=>{const t=Xt(null),r=hr(()=>{t.current&&(clearTimeout(t.current),t.current=null)},[]),{animate:n,onTransitionEnd:o,onClose:i,contextId:a}=e,[s,l]=Jt("open"===e.animate);Kt(()=>s?"open"!==n?(r(),l(!1),Ba):t.current?Ba:(t.current=setTimeout(()=>{t.current=null,l(!1)}),r):Ba,[n,s,r]);const c=hr(e=>{"height"===e.propertyName&&(o(),"close"===n&&i())},[n,i,o]),d=Ta({isAnimatingOpenOnMount:s,animate:e.animate,placeholder:e.placeholder});return Zt.createElement(e.placeholder.tagName,{style:d,"data-rfd-placeholder-context-id":a,onTransitionEnd:c,ref:e.innerRef})});class Ma extends Zt.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 ka={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:function(){return document.body||sr(),document.body}},Ga=e=>{let t,r={...e};for(t in ka)void 0===e[t]&&(r={...r,[t]:ka[t]});return r},Wa=(e,t)=>e===t.droppable.type,Fa=(e,t)=>t.draggables[e.draggable.id],$a=Ot(()=>{const e={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},t={...e,shouldAnimatePlaceholder:!1},r=Br(e=>({draggableId:e.id,type:e.type,source:{index:e.index,droppableId:e.droppableId}})),n=Br((n,o,i,a,s,l)=>{const c=s.descriptor.id;if(s.descriptor.droppableId===n){const e=l?{render:l,dragging:r(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(r,o)=>{const i=Ga(o),a=i.droppableId,s=i.type,l=!i.isDropDisabled,c=i.renderClone;if(wi(r)){const e=r.critical;if(!Wa(s,e))return t;const o=Fa(e,r.dimensions),i=wn(r.impact)===a;return n(a,l,i,i,o,c)}if("DROP_ANIMATING"===r.phase){const e=r.completed;if(!Wa(s,e.critical))return t;const o=Fa(e.critical,r.dimensions);return n(a,l,ga(e.result)===a,wn(e.impact)===a,o,c)}if("IDLE"===r.phase&&r.completed&&!r.shouldFlush){const n=r.completed;if(!Wa(s,n.critical))return t;const o=wn(n.impact)===a,i=Boolean(n.impact.at&&"COMBINE"===n.impact.at.type),l=n.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,r)=>({...Ga(r),...e,...t}),{context:hi,areStatePropsEqual:ua})(e=>{const t=er(Ii);t||sr();const{contextId:r,isMovementAllowed:n}=t,o=Xt(null),i=Xt(null),{children:a,droppableId:s,type:l,mode:c,direction:d,ignoreContainerClipping:p,isDropDisabled:u,isCombineEnabled:g,snapshot:m,useClone:f,updateViewportMaxScroll:b,getContainerForClone:h}=e,y=hr(()=>o.current,[]),v=hr((e=null)=>{o.current=e},[]);hr(()=>i.current,[]);const x=hr((e=null)=>{i.current=e},[]),E=hr(()=>{n()&&b({maxScroll:Lo()})},[n,b]);_a({droppableId:s,type:l,mode:c,direction:d,isDropDisabled:u,isCombineEnabled:g,ignoreContainerClipping:p,getDroppableRef:y});const I=br(()=>Zt.createElement(Ma,{on:e.placeholder,shouldAnimate:e.shouldAnimatePlaceholder},({onClose:e,data:t,animate:n})=>Zt.createElement(La,{placeholder:t,onClose:e,innerRef:x,animate:n,contextId:r,onTransitionEnd:E})),[r,E,e.placeholder,e.shouldAnimatePlaceholder,x]),D=br(()=>({innerRef:v,placeholder:I,droppableProps:{"data-rfd-droppable-id":s,"data-rfd-droppable-context-id":r}}),[r,s,I,v]),w=f?f.dragging.draggableId:null,S=br(()=>({droppableId:s,type:l,isUsingCloneFor:w}),[s,w,l]);return Zt.createElement(ca.Provider,{value:S},a(D,m),function(){if(!f)return null;const{dragging:e,render:t}=f,r=Zt.createElement(ha,{draggableId:e.draggableId,index:e.source.index,isClone:!0,isEnabled:!0,shouldRespectForcePress:!1,canDragInteractiveElements:!0},(r,n)=>t(r,n,e));return tr.createPortal(r,h())}())}),{Menu:ja}=r,{MenuItem:Ha}=r,{IconButton:Ua}=r,{MoreVert:qa}=l,{MoreHoriz:Va}=l,za=i,Ya=e;class Za extends Ya.Component{static __initStatic(){this.propTypes={opts:za.object,onClick:za.func.isRequired}}constructor(e){super(e),Za.prototype.__init.call(this),Za.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:r,anchorEl:n}=this.state,o=Object.keys(e)||[],i=e=>()=>{t(e),this.handleRequestClose()},a=r?"inherit":"disabled";return Ya.createElement("div",null,Ya.createElement("div",{onClick:this.handleClick},Ya.createElement(Ua,{size:"large"},r?Ya.createElement(qa,{color:a}):Ya.createElement(Va,{color:a}))),Ya.createElement(ja,{id:"point-menu",anchorEl:n,open:r,onClose:this.handleRequestClose,style:{transform:"translate(-15px, -15px)"},transformOrigin:{vertical:"center",horizontal:"right"}},o.map((t,r)=>Ya.createElement(Ha,{key:r,onClick:i(t)},e[t]))))}}Za.__initStatic();class Ja extends Ya.Component{static __initStatic2(){this.propTypes={onChange:za.func.isRequired,showSampleAnswer:za.bool.isRequired}}render(){const{onChange:e,showSampleAnswer:t}=this.props,r=t?"Provide Sample Response":"Remove Sample Response";return Ya.createElement(Za,{onClick:t=>e(t),opts:{sample:r}})}}Ja.__initStatic2();var Xa={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"};const Ka=e,Qa=i,{styled:es}=t,{InputLabel:ts}=r,{OutlinedInput:rs}=r,{Select:ns}=r,{FormControl:os}=r,{MenuItem:is}=r,{Checkbox:as}=r,{FormGroup:ss}=r,{FormControlLabel:ls}=r,{Typography:cs}=r,{times:ds}=c,{takeRight:ps}=c,{range:us}=c,{DragIndicator:gs}=l,ms=s,fs=p,{InputContainer:bs}=u,hs=ms("pie-lib:rubric:authoring"),ys=(e,t,r)=>{const n=Array.from(e),[o]=n.splice(t,1);return n.splice(r,0,o),n},vs=Qa.shape({excludeZero:Qa.bool,points:Qa.arrayOf(Qa.string),sampleAnswers:Qa.arrayOf(Qa.string),maxPoints:Qa.number,rubriclessInstruction:Qa.string}),xs=e=>{const{value:t,onChange:r,max:n}=e,o="max-points-label";return Ka.createElement(os,{sx:{minWidth:120,m:1},variant:"outlined"},Ka.createElement(ts,{id:o},"Max Points"),Ka.createElement(ns,{labelId:o,label:"Max Points",value:t,onChange:e=>r(e.target.value),input:Ka.createElement(rs,{label:"Max Points"}),MenuProps:{transitionDuration:{enter:225,exit:195}}},us(1,n+1).map(e=>Ka.createElement(is,{key:`${e}`,value:e},e))))},Es=e=>null===e||"null"===e,Is=es("div")(()=>({display:"flex",width:"100%",position:"relative"})),Ds=es("div")(({theme:e})=>({width:"100%",backgroundColor:`${e.palette.common.white}`})),ws=es(gs)(({theme:e})=>({paddingTop:e.spacing(1),color:Xa[500]})),Ss=es(cs)(({theme:e})=>({color:Xa[500],paddingBottom:e.spacing(1),textTransform:"uppercase"})),Cs=es("div")(({theme:e})=>({paddingLeft:e.spacing(3)})),As=es("div")(({theme:e})=>({fontSize:e.typography.fontSize-2,color:e.palette.error.main,paddingLeft:e.spacing(3),paddingTop:e.spacing(1)})),Ps=es("div")(()=>({position:"absolute",right:0})),Os=e=>{const{points:t,content:r,sampleAnswer:n,mathMlOptions:o={},error:i,pluginOpts:a={}}=e,s=`${t} ${t<=1?"pt":"pts"}`,l=Es(n);return Ka.createElement("div",null,Ka.createElement(Ss,{variant:"overline"},s),Ka.createElement(Is,null,Ka.createElement(ws,null),Ka.createElement(Ds,null,Ka.createElement(fs,{error:i,pluginProps:a,markup:r,onChange:e.onChange,mathMlOptions:o})),Ka.createElement(Ps,null,Ka.createElement(Ja,{showSampleAnswer:l,onChange:e.onMenuChange}))),i&&Ka.createElement(As,null,i),!l&&Ka.createElement(Cs,null,Ka.createElement(ws,{as:cs,variant:"overline"},"Sample Response"),Ka.createElement(Ds,null,Ka.createElement(fs,{markup:n,pluginProps:a,onChange:e.onSampleChange,mathMlOptions:o}))))},Rs=es("div")(({theme:e})=>({backgroundColor:Xa[200],borderWidth:1,borderStyle:"solid",borderColor:Xa[300],padding:e.spacing(2),margin:e.spacing(1)})),_s=es("div")(({theme:e})=>({width:"100%",paddingTop:e.spacing(2),marginBottom:e.spacing(2),"& MuiFormControl-root":{width:"100%"}})),Bs=es("div")(()=>({display:"none"})),Ns=es("div")(({theme:e})=>({paddingTop:e.spacing(1),paddingBottom:e.spacing(1)})),Ts=es(cs)(({theme:e})=>({paddingLeft:e.spacing(1),margin:e.spacing(1)}));class Ls extends Ka.Component{constructor(...e){super(...e),Ls.prototype.__init.call(this),Ls.prototype.__init2.call(this),Ls.prototype.__init3.call(this),Ls.prototype.__init4.call(this),Ls.prototype.__init5.call(this),Ls.prototype.__init6.call(this),Ls.prototype.__init7.call(this)}static __initStatic(){this.propTypes={value:vs,config:Qa.object,pluginOpts:Qa.object,rubricless:Qa.bool,onChange:Qa.func}}static __initStatic2(){this.defaultProps={}}__init(){this.dragEnd=e=>{if(!e.destination)return;const{value:t,onChange:r}=this.props,n=ys(t.points,e.source.index,e.destination.index),o=ys(t.sampleAnswers,e.source.index,e.destination.index);r({...t,points:n,sampleAnswers:o})}}__init2(){this.changeRubriclessInstruction=e=>{const{value:t,onChange:r}=this.props;r({...t,rubriclessInstruction:e})}}__init3(){this.changeMaxPoints=e=>{const{value:t,onChange:r,rubricless:n}=this.props,o=t.points.length-1;let i,a;hs("current",o,"new: ",e),e>o&&(i=ds(e-o).map(()=>"").concat(t.points),a=ds(e-o).map(()=>null).concat(t.sampleAnswers)),e<o&&(hs("less than"),i=ps(t.points,e+1),a=ps(t.sampleAnswers,e+1)),r(i&&!n?{...t,points:i,sampleAnswers:a,maxPoints:e}:{...t,maxPoints:e})}}__init4(){this.changeContent=(e,t,r)=>{if(hs(`changeModel[${r}]:`,e,t),"points"!==r&&"sampleAnswers"!==r)return;const{value:n,onChange:o}=this.props,i=n[r]&&Array.from(n[r]);i.splice(e,1,t),hs(`changeModel[${r}]:`,i),o({...n,[r]:i})}}__init5(){this.excludeZeros=()=>{const{value:e,onChange:t}=this.props;t({...e,excludeZero:!e.excludeZero})}}__init6(){this.shouldRenderPoint=(e,t)=>!t.excludeZero||(e<t.points.length-1||e!==t.points.length-1)}__init7(){this.onPointMenuChange=(e,t)=>{if("sample"===t){const{value:t}=this.props,r=Array.from(t.sampleAnswers||[]);Es(r[e])?this.changeContent(e,"","sampleAnswers"):this.changeContent(e,null,"sampleAnswers")}}}render(){const{value:e,mathMlOptions:t={},config:r={},rubricless:n=!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:p=10}=r||{},{pointsDescriptorsErrors:u}=s||{};e&&Number.isFinite(e.maxPoints)&&console.warn("maxPoints is deprecated - remove from model");const g=n?c:e.points.length-1;return Ka.createElement("div",null,Ka.createElement(Ts,{variant:"h5"},"Rubric"),Ka.createElement(ss,{row:!0},a&&Ka.createElement(xs,{max:p<100?p:100,value:g,onChange:this.changeMaxPoints,pluginOpts:o}),i&&Ka.createElement(ls,{label:"Exclude zeros",control:Ka.createElement(as,{checked:e.excludeZero,onChange:this.excludeZeros})})),l&&n&&Ka.createElement(_s,null,Ka.createElement(bs,{label:d.label},Ka.createElement(fs,{markup:e.rubriclessInstruction||"",onChange:this.changeRubriclessInstruction,pluginProps:o,nonEmpty:!1,disableUnderline:!0,languageCharactersProps:[{language:"spanish"},{language:"special"}],mathMlOptions:t}))),Ka.createElement("div",null,n?Ka.createElement(Bs,null):Ka.createElement(Rs,null,Ka.createElement(ra,{onDragEnd:this.dragEnd},Ka.createElement($a,{droppableId:"droppable"},r=>Ka.createElement("div",{...r.droppableProps,ref:r.innerRef},e.points.map((r,n)=>this.shouldRenderPoint(n,e)&&Ka.createElement(ya,{key:`${r.points}-${n}`,index:n,draggableId:n.toString()},i=>Ka.createElement(Ns,{ref:i.innerRef,...i.draggableProps,...i.dragHandleProps},Ka.createElement(Os,{points:e.points.length-1-n,content:r,error:u&&u[e.points.length-1-n],sampleAnswer:e.sampleAnswers&&e.sampleAnswers[n],onChange:e=>this.changeContent(n,e,"points"),onSampleChange:e=>this.changeContent(n,e,"sampleAnswers"),onMenuChange:e=>this.onPointMenuChange(n,e),mathMlOptions:t,pluginOpts:o})))),r.placeholder))))))}}Ls.__initStatic(),Ls.__initStatic2(),Qa.object,Qa.object,Qa.bool,Qa.func,Qa.func;const Ms="simpleRubric",ks="multiTraitRubric",Gs="rubricless",Ws="complex-rubric-simple",Fs="complex-rubric-multi-trait";class $s extends M{}class js extends he{}const Hs={[Ms]:`<${Ws} id="simpleRubric" />`,[Gs]:`<${Ws} id="rubricless" />`,[ks]:`<${Fs} id="multiTraitRubric" />`},Us=(e,t)=>"instructor"===t.role?(e.mode="evaluate",e.animationsDisabled=!0,e):{};customElements.get(Ws)||customElements.define(Ws,$s),customElements.get(Fs)||customElements.define(Fs,js);class qs extends HTMLElement{constructor(){super(),this._model={},this._type=Ms,this._options=null}set type(e){this._type=e}get type(){return this._type}set model(e){this._model=e;const t=this._type;switch(this.type=e.rubricType,this._type){case Ms:default:customElements.whenDefined(Ws).then(()=>{this.setRubricModel(this.simpleRubric)});break;case ks:customElements.whenDefined(Fs).then(()=>{this.setMultiTraitRubricModel(this.multiTraitRubric)});break;case Gs:customElements.whenDefined(Ws).then(()=>{this.setRubriclessModel(this.rubricless)})}t!==this.type&&this._render()}setRubricModel(e){this._model&&this._model.rubrics&&this._model.rubrics.simpleRubric&&(e.model=Us(this._model.rubrics.simpleRubric,this._options))}setMultiTraitRubricModel(e){if(this._model&&this._model.rubrics&&this._model.rubrics.multiTraitRubric){const{scales:t,excludeZero:r}=this._model.rubrics.multiTraitRubric||{},n=(t||[]).map(e=>({...e,excludeZero:r}));e.model={...Us(this._model.rubrics.multiTraitRubric,this._options),visible:!0,arrowsDisabled:!0,scales:n}}}setRubriclessModel(e){this._model&&this._model.rubrics&&this._model.rubrics.rubricless&&(e.model=Us(this._model.rubrics.rubricless,this._options))}set options(e){this._options=e}get multiTraitRubric(){return this.querySelector(`${Fs}#multiTraitRubric`)}get simpleRubric(){return this.querySelector(`${Ws}#simpleRubric`)}get rubricless(){return this.querySelector(`${Ws}#rubricless`)}connectedCallback(){this._render()}_render(){this.innerHTML=Hs[this._type]||""}}export{qs as default};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pie-element/complex-rubric",
3
3
  "repository": "pie-framework/pie-elements",
4
- "version": "6.0.0-next.42+bb1f3eb4e",
4
+ "version": "6.0.0-next.43+4249fa78f",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -10,8 +10,8 @@
10
10
  "@emotion/style": "^0.8.0",
11
11
  "@mui/icons-material": "^7.3.4",
12
12
  "@mui/material": "^7.3.4",
13
- "@pie-element/multi-trait-rubric": "^7.0.0-next.42+bb1f3eb4e",
14
- "@pie-element/rubric": "^7.0.0-next.42+bb1f3eb4e",
13
+ "@pie-element/multi-trait-rubric": "^7.0.0-next.43+4249fa78f",
14
+ "@pie-element/rubric": "^7.0.0-next.43+4249fa78f",
15
15
  "@pie-framework/pie-player-events": "^0.1.0",
16
16
  "@pie-lib/rubric": "1.1.1-next.0",
17
17
  "classnames": "^2.2.5",
@@ -19,12 +19,16 @@
19
19
  "lodash": "^4.17.11",
20
20
  "prop-types": "^15.7.2"
21
21
  },
22
- "gitHead": "bb1f3eb4e3b5b1cb15024d459ffd6e94bf419712",
22
+ "gitHead": "4249fa78fc423ef0a8c89002b8f937c42b3478ea",
23
23
  "scripts": {
24
24
  "postpublish": "../../scripts/postpublish"
25
25
  },
26
26
  "main": "lib/index.js",
27
27
  "module": "src/index.js",
28
+ "exports": {
29
+ ".": "./src/index.js",
30
+ "./print": "./src/print.js"
31
+ },
28
32
  "description": "Complex Rubric Scoring Interaction",
29
33
  "author": "pie framework developers",
30
34
  "license": "ISC"