andoncloud-dashboard-toolkit 1.5.18 → 1.5.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/graphql-request.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
|
@@ -3071,7 +3071,7 @@ export type WorkplaceAssignment = {
|
|
|
3071
3071
|
workplace?: Maybe<Workplace>;
|
|
3072
3072
|
};
|
|
3073
3073
|
export type WorkplaceAssignmentsInput = {
|
|
3074
|
-
date: Scalars['
|
|
3074
|
+
date: Scalars['ISO8601DateTime']['input'];
|
|
3075
3075
|
departmentId?: InputMaybe<Scalars['ID']['input']>;
|
|
3076
3076
|
shiftId: Scalars['ID']['input'];
|
|
3077
3077
|
};
|
package/dist/index.js
CHANGED
|
@@ -12,5 +12,5 @@ return S.createElement("div",null,u)}var c=a[0]?this.getOptionValue(a[0]):"";/*#
|
|
|
12
12
|
return S.createElement("input",{name:o,type:"hidden",value:c})}}},{key:"renderLiveRegion",value:function(){var e=this.commonProps,n=this.state,t=n.ariaSelection,r=n.focusedOption,i=n.focusedValue,o=n.isFocused,a=n.selectValue,s=this.getFocusableOptions();/*#__PURE__*/
|
|
13
13
|
return S.createElement(Ra,Qi({},e,{id:this.getElementId("live-region"),ariaSelection:t,focusedOption:r,focusedValue:i,isFocused:o,selectValue:a,focusableOptions:s,isAppleDevice:this.state.isAppleDevice}))}},{key:"render",value:function(){var e=this.getComponents(),n=e.Control,t=e.IndicatorsContainer,r=e.SelectContainer,i=e.ValueContainer,o=this.props,a=o.className,s=o.id,u=o.isDisabled,c=o.menuIsOpen,l=this.state.isFocused,d=this.commonProps=this.getCommonProps();/*#__PURE__*/
|
|
14
14
|
return S.createElement(r,Qi({},d,{className:a,innerProps:{id:s,onKeyDown:this.onKeyDown},isDisabled:u,isFocused:l}),this.renderLiveRegion(),/*#__PURE__*/S.createElement(n,Qi({},d,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:u,isFocused:l,menuIsOpen:c}),/*#__PURE__*/S.createElement(i,Qi({},d,{isDisabled:u}),this.renderPlaceholderOrValue(),this.renderInput()),/*#__PURE__*/S.createElement(t,Qi({},d,{isDisabled:u}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(e,n){var t=n.prevProps,r=n.clearFocusValueOnUpdate,i=n.inputIsHiddenAfterUpdate,o=n.ariaSelection,a=n.isFocused,s=n.prevWasFocused,u=n.instancePrefix,c=e.options,l=e.value,d=e.menuIsOpen,p=e.inputValue,f=e.isMulti,m=ko(l),g={};if(t&&(l!==t.value||c!==t.options||d!==t.menuIsOpen||p!==t.inputValue)){var b=d?function(e,n){return as(os(e,n))}(e,m):[],h=d?ss(os(e,m),"".concat(u,"-option")):[],v=r?function(e,n){var t=e.focusedValue,r=e.selectValue.indexOf(t);if(r>-1){if(n.indexOf(t)>-1)return t;if(r<n.length)return n[r]}return null}(n,m):null,I=function(e,n){var t=e.focusedOption;return t&&n.indexOf(t)>-1?t:n[0]}(n,b);g={selectValue:m,focusedOption:I,focusedOptionId:cs(h,I),focusableOptionsWithIds:h,focusedValue:v,clearFocusValueOnUpdate:!1}}var y=null!=i&&e!==t?{inputIsHidden:i,inputIsHiddenAfterUpdate:void 0}:{},C=o,x=a&&s;return a&&!x&&(C={value:Jo(f,m,m[0]||null),options:m,action:"initial-input-focus"},x=!s),"initial-input-focus"===(null==o?void 0:o.action)&&(C=null),ji(ji(ji({},g),y),{},{prevProps:e,ariaSelection:C,prevWasFocused:x})}}]),i}();hs.defaultProps=rs;var vs=/*#__PURE__*/e.forwardRef(function(n,t){var r=function(n){var t=n.defaultInputValue,r=void 0===t?"":t,i=n.defaultMenuIsOpen,o=void 0!==i&&i,a=n.defaultValue,s=void 0===a?null:a,u=n.inputValue,c=n.menuIsOpen,l=n.onChange,d=n.onInputChange,p=n.onMenuClose,f=n.onMenuOpen,m=n.value,g=Ui(n,qi),b=_i(e.useState(void 0!==u?u:r),2),h=b[0],v=b[1],I=_i(e.useState(void 0!==c?c:o),2),y=I[0],C=I[1],x=_i(e.useState(void 0!==m?m:s),2),A=x[0],E=x[1],w=e.useCallback(function(e,n){"function"==typeof l&&l(e,n),E(e)},[l]),R=e.useCallback(function(e,n){var t;"function"==typeof d&&(t=d(e,n)),v(void 0!==t?t:e)},[d]),T=e.useCallback(function(){"function"==typeof f&&f(),C(!0)},[f]),S=e.useCallback(function(){"function"==typeof p&&p(),C(!1)},[p]),N=void 0!==u?u:h,O=void 0!==c?c:y,D=void 0!==m?m:A;return ji(ji({},g),{},{inputValue:N,menuIsOpen:O,onChange:w,onInputChange:R,onMenuClose:S,onMenuOpen:T,value:D})}(n);/*#__PURE__*/
|
|
15
|
-
return S.createElement(hs,Qi({ref:t},r))}),Is=vs;const ys="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function Cs(e){const n=Object.prototype.toString.call(e);return"[object Window]"===n||"[object global]"===n}function xs(e){return"nodeType"in e}function As(e){var n,t;return e?Cs(e)?e:xs(e)&&null!=(n=null==(t=e.ownerDocument)?void 0:t.defaultView)?n:window:window}function Es(e){const{Document:n}=As(e);return e instanceof n}function ws(e){return!Cs(e)&&e instanceof As(e).HTMLElement}function Rs(e){return e instanceof As(e).SVGElement}function Ts(e){return e?Cs(e)?e.document:xs(e)?Es(e)?e:ws(e)||Rs(e)?e.ownerDocument:document:document:document}const Ss=ys?e.useLayoutEffect:e.useEffect;function Ns(n){const t=e.useRef(n);return Ss(()=>{t.current=n}),e.useCallback(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return null==t.current?void 0:t.current(...n)},[])}function Os(n,t){void 0===t&&(t=[n]);const r=e.useRef(n);return Ss(()=>{r.current!==n&&(r.current=n)},t),r}function Ds(n,t){const r=e.useRef();return e.useMemo(()=>{const e=n(r.current);return r.current=e,e},[...t])}function Gs(n){const t=Ns(n),r=e.useRef(null),i=e.useCallback(e=>{e!==r.current&&(null==t||t(e,r.current)),r.current=e},[]);return[r,i]}function ks(n){const t=e.useRef();return e.useEffect(()=>{t.current=n},[n]),t.current}let Bs={};function Ps(n,t){return e.useMemo(()=>{if(t)return t;const e=null==Bs[n]?0:Bs[n]+1;return Bs[n]=e,n+"-"+e},[n,t])}function Ms(e){return function(n){for(var t=arguments.length,r=new Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];return r.reduce((n,t)=>{const r=Object.entries(t);for(const[t,i]of r){const r=n[t];null!=r&&(n[t]=r+e*i)}return n},{...n})}}const Vs=/*#__PURE__*/Ms(1),Ws=/*#__PURE__*/Ms(-1);function Hs(e){if(!e)return!1;const{KeyboardEvent:n}=As(e.target);return n&&e instanceof n}function Fs(e){if(function(e){if(!e)return!1;const{TouchEvent:n}=As(e.target);return n&&e instanceof n}(e)){if(e.touches&&e.touches.length){const{clientX:n,clientY:t}=e.touches[0];return{x:n,y:t}}if(e.changedTouches&&e.changedTouches.length){const{clientX:n,clientY:t}=e.changedTouches[0];return{x:n,y:t}}}return function(e){return"clientX"in e&&"clientY"in e}(e)?{x:e.clientX,y:e.clientY}:null}const Xs=/*#__PURE__*/Object.freeze({Translate:{toString(e){if(!e)return;const{x:n,y:t}=e;return"translate3d("+(n?Math.round(n):0)+"px, "+(t?Math.round(t):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:n,scaleY:t}=e;return"scaleX("+n+") scaleY("+t+")"}},Transform:{toString(e){if(e)return[Xs.Translate.toString(e),Xs.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:n,duration:t,easing:r}=e;return n+" "+t+"ms "+r}}}),Ls="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function Zs(e){return e.matches(Ls)?e:e.querySelector(Ls)}const Ys={display:"none"};function js(e){let{id:n,value:t}=e;return T.default.createElement("div",{id:n,style:Ys},t)}function Js(e){let{id:n,announcement:t,ariaLiveType:r="assertive"}=e;return T.default.createElement("div",{id:n,style:{position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"},role:"status","aria-live":r,"aria-atomic":!0},t)}const zs=/*#__PURE__*/e.createContext(null),_s={draggable:"\n To pick up a draggable item, press the space bar.\n While dragging, use the arrow keys to move the item.\n Press space again to drop the item in its new position, or press escape to cancel.\n "},Us={onDragStart(e){let{active:n}=e;return"Picked up draggable item "+n.id+"."},onDragOver(e){let{active:n,over:t}=e;return t?"Draggable item "+n.id+" was moved over droppable area "+t.id+".":"Draggable item "+n.id+" is no longer over a droppable area."},onDragEnd(e){let{active:n,over:t}=e;return t?"Draggable item "+n.id+" was dropped over droppable area "+t.id:"Draggable item "+n.id+" was dropped."},onDragCancel(e){let{active:n}=e;return"Dragging was cancelled. Draggable item "+n.id+" was dropped."}};function qs(n){let{announcements:t=Us,container:r,hiddenTextDescribedById:i,screenReaderInstructions:o=_s}=n;const{announce:a,announcement:s}=function(){const[n,t]=e.useState("");return{announce:e.useCallback(e=>{null!=e&&t(e)},[]),announcement:n}}(),u=Ps("DndLiveRegion"),[c,l]=e.useState(!1);if(e.useEffect(()=>{l(!0)},[]),function(n){const t=e.useContext(zs);e.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(n)},[n,t])}(e.useMemo(()=>({onDragStart(e){let{active:n}=e;a(t.onDragStart({active:n}))},onDragMove(e){let{active:n,over:r}=e;t.onDragMove&&a(t.onDragMove({active:n,over:r}))},onDragOver(e){let{active:n,over:r}=e;a(t.onDragOver({active:n,over:r}))},onDragEnd(e){let{active:n,over:r}=e;a(t.onDragEnd({active:n,over:r}))},onDragCancel(e){let{active:n,over:r}=e;a(t.onDragCancel({active:n,over:r}))}}),[a,t])),!c)return null;const d=T.default.createElement(T.default.Fragment,null,T.default.createElement(js,{id:i,value:o.draggable}),T.default.createElement(Js,{id:u,announcement:s}));return r?I.createPortal(d,r):d}var Qs;function $s(){}!function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"}(Qs||(Qs={}));const Ks=/*#__PURE__*/Object.freeze({x:0,y:0});function eu(e,n){let{data:{value:t}}=e,{data:{value:r}}=n;return r-t}function nu(e,n){const t=Math.max(n.top,e.top),r=Math.max(n.left,e.left),i=Math.min(n.left+n.width,e.left+e.width),o=Math.min(n.top+n.height,e.top+e.height);if(r<i&&t<o){const a=(i-r)*(o-t);return Number((a/(n.width*n.height+e.width*e.height-a)).toFixed(4))}return 0}const tu=e=>{let{collisionRect:n,droppableRects:t,droppableContainers:r}=e;const i=[];for(const e of r){const{id:r}=e,o=t.get(r);if(o){const t=nu(o,n);t>0&&i.push({id:r,data:{droppableContainer:e,value:t}})}}return i.sort(eu)};function ru(e,n){return e&&n?{x:e.left-n.left,y:e.top-n.top}:Ks}function iu(e){return function(n){for(var t=arguments.length,r=new Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];return r.reduce((n,t)=>({...n,top:n.top+e*t.y,bottom:n.bottom+e*t.y,left:n.left+e*t.x,right:n.right+e*t.x}),{...n})}}const ou=/*#__PURE__*/iu(1),au={ignoreTransform:!1};function su(e,n){void 0===n&&(n=au);let t=e.getBoundingClientRect();if(n.ignoreTransform){const{transform:n,transformOrigin:r}=As(e).getComputedStyle(e);n&&(t=function(e,n,t){const r=function(e){if(e.startsWith("matrix3d(")){const n=e.slice(9,-1).split(/, /);return{x:+n[12],y:+n[13],scaleX:+n[0],scaleY:+n[5]}}if(e.startsWith("matrix(")){const n=e.slice(7,-1).split(/, /);return{x:+n[4],y:+n[5],scaleX:+n[0],scaleY:+n[3]}}return null}(n);if(!r)return e;const{scaleX:i,scaleY:o,x:a,y:s}=r,u=e.left-a-(1-i)*parseFloat(t),c=e.top-s-(1-o)*parseFloat(t.slice(t.indexOf(" ")+1)),l=i?e.width/i:e.width,d=o?e.height/o:e.height;return{width:l,height:d,top:c,right:u+l,bottom:c+d,left:u}}(t,n,r))}const{top:r,left:i,width:o,height:a,bottom:s,right:u}=t;return{top:r,left:i,width:o,height:a,bottom:s,right:u}}function uu(e){return su(e,{ignoreTransform:!0})}function cu(e,n){const t=[];return e?function r(i){if(null!=n&&t.length>=n)return t;if(!i)return t;if(Es(i)&&null!=i.scrollingElement&&!t.includes(i.scrollingElement))return t.push(i.scrollingElement),t;if(!ws(i)||Rs(i))return t;if(t.includes(i))return t;const o=As(e).getComputedStyle(i);return i!==e&&function(e,n){void 0===n&&(n=As(e).getComputedStyle(e));const t=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(e=>{const r=n[e];return"string"==typeof r&&t.test(r)})}(i,o)&&t.push(i),function(e,n){return void 0===n&&(n=As(e).getComputedStyle(e)),"fixed"===n.position}(i,o)?t:r(i.parentNode)}(e):t}function lu(e){const[n]=cu(e,1);return null!=n?n:null}function du(e){return ys&&e?Cs(e)?e:xs(e)?Es(e)||e===Ts(e).scrollingElement?window:ws(e)?e:null:null:null}function pu(e){return Cs(e)?e.scrollX:e.scrollLeft}function fu(e){return Cs(e)?e.scrollY:e.scrollTop}function mu(e){return{x:pu(e),y:fu(e)}}var gu;function bu(e){return!(!ys||!e)&&e===document.scrollingElement}function hu(e){const n={x:0,y:0},t=bu(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-t.width,y:e.scrollHeight-t.height};return{isTop:e.scrollTop<=n.y,isLeft:e.scrollLeft<=n.x,isBottom:e.scrollTop>=r.y,isRight:e.scrollLeft>=r.x,maxScroll:r,minScroll:n}}!function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"}(gu||(gu={}));const vu={x:.2,y:.2};function Iu(e,n,t,r,i){let{top:o,left:a,right:s,bottom:u}=t;void 0===r&&(r=10),void 0===i&&(i=vu);const{isTop:c,isBottom:l,isLeft:d,isRight:p}=hu(e),f={x:0,y:0},m={x:0,y:0},g=n.height*i.y,b=n.width*i.x;return!c&&o<=n.top+g?(f.y=gu.Backward,m.y=r*Math.abs((n.top+g-o)/g)):!l&&u>=n.bottom-g&&(f.y=gu.Forward,m.y=r*Math.abs((n.bottom-g-u)/g)),!p&&s>=n.right-b?(f.x=gu.Forward,m.x=r*Math.abs((n.right-b-s)/b)):!d&&a<=n.left+b&&(f.x=gu.Backward,m.x=r*Math.abs((n.left+b-a)/b)),{direction:f,speed:m}}function yu(e){if(e===document.scrollingElement){const{innerWidth:e,innerHeight:n}=window;return{top:0,left:0,right:e,bottom:n,width:e,height:n}}const{top:n,left:t,right:r,bottom:i}=e.getBoundingClientRect();return{top:n,left:t,right:r,bottom:i,width:e.clientWidth,height:e.clientHeight}}function Cu(e){return e.reduce((e,n)=>Vs(e,mu(n)),Ks)}const xu=[["x",["left","right"],function(e){return e.reduce((e,n)=>e+pu(n),0)}],["y",["top","bottom"],function(e){return e.reduce((e,n)=>e+fu(n),0)}]];class Au{constructor(e,n){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const t=cu(n),r=Cu(t);this.rect={...e},this.width=e.width,this.height=e.height;for(const[e,n,i]of xu)for(const o of n)Object.defineProperty(this,o,{get:()=>{const n=i(t);return this.rect[o]+(r[e]-n)},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Eu{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(e=>{var n;return null==(n=this.target)?void 0:n.removeEventListener(...e)})},this.target=e}add(e,n,t){var r;null==(r=this.target)||r.addEventListener(e,n,t),this.listeners.push([e,n,t])}}function wu(e,n){const t=Math.abs(e.x),r=Math.abs(e.y);return"number"==typeof n?Math.sqrt(t**2+r**2)>n:"x"in n&&"y"in n?t>n.x&&r>n.y:"x"in n?t>n.x:"y"in n&&r>n.y}var Ru,Tu;function Su(e){e.preventDefault()}function Nu(e){e.stopPropagation()}!function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"}(Ru||(Ru={})),function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"}(Tu||(Tu={}));const Ou={start:[Tu.Space,Tu.Enter],cancel:[Tu.Esc],end:[Tu.Space,Tu.Enter,Tu.Tab]},Du=(e,n)=>{let{currentCoordinates:t}=n;switch(e.code){case Tu.Right:return{...t,x:t.x+25};case Tu.Left:return{...t,x:t.x-25};case Tu.Down:return{...t,y:t.y+25};case Tu.Up:return{...t,y:t.y-25}}};class Gu{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;const{event:{target:n}}=e;this.props=e,this.listeners=new Eu(Ts(n)),this.windowListeners=new Eu(As(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Ru.Resize,this.handleCancel),this.windowListeners.add(Ru.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Ru.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:e,onStart:n}=this.props,t=e.node.current;t&&function(e,n){if(void 0===n&&(n=su),!e)return;const{top:t,left:r,bottom:i,right:o}=n(e);lu(e)&&(i<=0||o<=0||t>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}(t),n(Ks)}handleKeyDown(e){if(Hs(e)){const{active:n,context:t,options:r}=this.props,{keyboardCodes:i=Ou,coordinateGetter:o=Du,scrollBehavior:a="smooth"}=r,{code:s}=e;if(i.end.includes(s))return void this.handleEnd(e);if(i.cancel.includes(s))return void this.handleCancel(e);const{collisionRect:u}=t.current,c=u?{x:u.left,y:u.top}:Ks;this.referenceCoordinates||(this.referenceCoordinates=c);const l=o(e,{active:n,context:t.current,currentCoordinates:c});if(l){const n=Ws(l,c),r={x:0,y:0},{scrollableAncestors:i}=t.current;for(const t of i){const i=e.code,{isTop:o,isRight:s,isLeft:u,isBottom:c,maxScroll:d,minScroll:p}=hu(t),f=yu(t),m={x:Math.min(i===Tu.Right?f.right-f.width/2:f.right,Math.max(i===Tu.Right?f.left:f.left+f.width/2,l.x)),y:Math.min(i===Tu.Down?f.bottom-f.height/2:f.bottom,Math.max(i===Tu.Down?f.top:f.top+f.height/2,l.y))},g=i===Tu.Down&&!c||i===Tu.Up&&!o;if((i===Tu.Right&&!s||i===Tu.Left&&!u)&&m.x!==l.x){const e=t.scrollLeft+n.x,o=i===Tu.Right&&e<=d.x||i===Tu.Left&&e>=p.x;if(o&&!n.y)return void t.scrollTo({left:e,behavior:a});r.x=o?t.scrollLeft-e:i===Tu.Right?t.scrollLeft-d.x:t.scrollLeft-p.x,r.x&&t.scrollBy({left:-r.x,behavior:a});break}if(g&&m.y!==l.y){const e=t.scrollTop+n.y,o=i===Tu.Down&&e<=d.y||i===Tu.Up&&e>=p.y;if(o&&!n.x)return void t.scrollTo({top:e,behavior:a});r.y=o?t.scrollTop-e:i===Tu.Down?t.scrollTop-d.y:t.scrollTop-p.y,r.y&&t.scrollBy({top:-r.y,behavior:a});break}}this.handleMove(e,Vs(Ws(l,this.referenceCoordinates),r))}}}handleMove(e,n){const{onMove:t}=this.props;e.preventDefault(),t(n)}handleEnd(e){const{onEnd:n}=this.props;e.preventDefault(),this.detach(),n()}handleCancel(e){const{onCancel:n}=this.props;e.preventDefault(),this.detach(),n()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}function ku(e){return Boolean(e&&"distance"in e)}function Bu(e){return Boolean(e&&"delay"in e)}Gu.activators=[{eventName:"onKeyDown",handler:(e,n,t)=>{let{keyboardCodes:r=Ou,onActivation:i}=n,{active:o}=t;const{code:a}=e.nativeEvent;if(r.start.includes(a)){const n=o.activatorNode.current;return!(n&&e.target!==n||(e.preventDefault(),null==i||i({event:e.nativeEvent}),0))}return!1}}];class Pu{constructor(e,n,t){var r;void 0===t&&(t=function(e){const{EventTarget:n}=As(e);return e instanceof n?e:Ts(e)}(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=n;const{event:i}=e,{target:o}=i;this.props=e,this.events=n,this.document=Ts(o),this.documentListeners=new Eu(this.document),this.listeners=new Eu(t),this.windowListeners=new Eu(As(o)),this.initialCoordinates=null!=(r=Fs(i))?r:Ks,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:e,props:{options:{activationConstraint:n,bypassActivationConstraint:t}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),e.cancel&&this.listeners.add(e.cancel.name,this.handleCancel),this.windowListeners.add(Ru.Resize,this.handleCancel),this.windowListeners.add(Ru.DragStart,Su),this.windowListeners.add(Ru.VisibilityChange,this.handleCancel),this.windowListeners.add(Ru.ContextMenu,Su),this.documentListeners.add(Ru.Keydown,this.handleKeydown),n){if(null!=t&&t({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(Bu(n))return this.timeoutId=setTimeout(this.handleStart,n.delay),void this.handlePending(n);if(ku(n))return void this.handlePending(n)}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),null!==this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(e,n){const{active:t,onPending:r}=this.props;r(t,e,this.initialCoordinates,n)}handleStart(){const{initialCoordinates:e}=this,{onStart:n}=this.props;e&&(this.activated=!0,this.documentListeners.add(Ru.Click,Nu,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Ru.SelectionChange,this.removeTextSelection),n(e))}handleMove(e){var n;const{activated:t,initialCoordinates:r,props:i}=this,{onMove:o,options:{activationConstraint:a}}=i;if(!r)return;const s=null!=(n=Fs(e))?n:Ks,u=Ws(r,s);if(!t&&a){if(ku(a)){if(null!=a.tolerance&&wu(u,a.tolerance))return this.handleCancel();if(wu(u,a.distance))return this.handleStart()}return Bu(a)&&wu(u,a.tolerance)?this.handleCancel():void this.handlePending(a,u)}e.cancelable&&e.preventDefault(),o(s)}handleEnd(){const{onAbort:e,onEnd:n}=this.props;this.detach(),this.activated||e(this.props.active),n()}handleCancel(){const{onAbort:e,onCancel:n}=this.props;this.detach(),this.activated||e(this.props.active),n()}handleKeydown(e){e.code===Tu.Esc&&this.handleCancel()}removeTextSelection(){var e;null==(e=this.document.getSelection())||e.removeAllRanges()}}const Mu={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class Vu extends Pu{constructor(e){const{event:n}=e,t=Ts(n.target);super(e,Mu,t)}}Vu.activators=[{eventName:"onPointerDown",handler:(e,n)=>{let{nativeEvent:t}=e,{onActivation:r}=n;return!(!t.isPrimary||0!==t.button||(null==r||r({event:t}),0))}}];const Wu={move:{name:"mousemove"},end:{name:"mouseup"}};var Hu;!function(e){e[e.RightClick=2]="RightClick"}(Hu||(Hu={})),class extends Pu{constructor(e){super(e,Wu,Ts(e.event.target))}}.activators=[{eventName:"onMouseDown",handler:(e,n)=>{let{nativeEvent:t}=e,{onActivation:r}=n;return t.button!==Hu.RightClick&&(null==r||r({event:t}),!0)}}];const Fu={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};var Xu,Lu;(class extends Pu{constructor(e){super(e,Fu)}static setup(){return window.addEventListener(Fu.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(Fu.move.name,e)};function e(){}}}).activators=[{eventName:"onTouchStart",handler:(e,n)=>{let{nativeEvent:t}=e,{onActivation:r}=n;const{touches:i}=t;return!(i.length>1||(null==r||r({event:t}),0))}}],function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"}(Xu||(Xu={})),function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"}(Lu||(Lu={}));const Zu={x:{[gu.Backward]:!1,[gu.Forward]:!1},y:{[gu.Backward]:!1,[gu.Forward]:!1}};var Yu,ju;!function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"}(Yu||(Yu={})),function(e){e.Optimized="optimized"}(ju||(ju={}));const Ju=/*#__PURE__*/new Map;function zu(e,n){return Ds(t=>e?t||("function"==typeof n?n(e):e):null,[n,e])}function _u(n){let{callback:t,disabled:r}=n;const i=Ns(t),o=e.useMemo(()=>{if(r||"undefined"==typeof window||void 0===window.ResizeObserver)return;const{ResizeObserver:e}=window;return new e(i)},[r]);return e.useEffect(()=>()=>null==o?void 0:o.disconnect(),[o]),o}function Uu(e){return new Au(su(e),e)}function qu(n,t,r){void 0===t&&(t=Uu);const[i,o]=e.useState(null);function a(){o(e=>{if(!n)return null;var i;if(!1===n.isConnected)return null!=(i=null!=e?e:r)?i:null;const o=t(n);return JSON.stringify(e)===JSON.stringify(o)?e:o})}const s=function(n){let{callback:t,disabled:r}=n;const i=Ns(t),o=e.useMemo(()=>{if(r||"undefined"==typeof window||void 0===window.MutationObserver)return;const{MutationObserver:e}=window;return new e(i)},[i,r]);return e.useEffect(()=>()=>null==o?void 0:o.disconnect(),[o]),o}({callback(e){if(n)for(const t of e){const{type:e,target:r}=t;if("childList"===e&&r instanceof HTMLElement&&r.contains(n)){a();break}}}}),u=_u({callback:a});return Ss(()=>{a(),n?(null==u||u.observe(n),null==s||s.observe(document.body,{childList:!0,subtree:!0})):(null==u||u.disconnect(),null==s||s.disconnect())},[n]),i}const Qu=[];function $u(n,t){void 0===t&&(t=[]);const r=e.useRef(null);return e.useEffect(()=>{r.current=null},t),e.useEffect(()=>{const e=n!==Ks;e&&!r.current&&(r.current=n),!e&&r.current&&(r.current=null)},[n]),r.current?Ws(n,r.current):Ks}function Ku(n){return e.useMemo(()=>n?function(e){const n=e.innerWidth,t=e.innerHeight;return{top:0,left:0,right:n,bottom:t,width:n,height:t}}(n):null,[n])}const ec=[],nc=[{sensor:Vu,options:{}},{sensor:Gu,options:{}}],tc={current:{}},rc={draggable:{measure:uu},droppable:{measure:uu,strategy:Yu.WhileDragging,frequency:ju.Optimized},dragOverlay:{measure:su}};class ic extends Map{get(e){var n;return null!=e&&null!=(n=super.get(e))?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(e=>{let{disabled:n}=e;return!n})}getNodeFor(e){var n,t;return null!=(n=null==(t=this.get(e))?void 0:t.node.current)?n:void 0}}const oc={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:/*#__PURE__*/new Map,droppableRects:/*#__PURE__*/new Map,droppableContainers:/*#__PURE__*/new ic,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:$s},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:rc,measureDroppableContainers:$s,windowRect:null,measuringScheduled:!1},ac=/*#__PURE__*/e.createContext({activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:$s,draggableNodes:/*#__PURE__*/new Map,over:null,measureDroppableContainers:$s}),sc=/*#__PURE__*/e.createContext(oc);function uc(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new ic}}}function cc(e,n){switch(n.type){case Qs.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:n.initialCoordinates,active:n.active}};case Qs.DragMove:return null==e.draggable.active?e:{...e,draggable:{...e.draggable,translate:{x:n.coordinates.x-e.draggable.initialCoordinates.x,y:n.coordinates.y-e.draggable.initialCoordinates.y}}};case Qs.DragEnd:case Qs.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Qs.RegisterDroppable:{const{element:t}=n,{id:r}=t,i=new ic(e.droppable.containers);return i.set(r,t),{...e,droppable:{...e.droppable,containers:i}}}case Qs.SetDroppableDisabled:{const{id:t,key:r,disabled:i}=n,o=e.droppable.containers.get(t);if(!o||r!==o.key)return e;const a=new ic(e.droppable.containers);return a.set(t,{...o,disabled:i}),{...e,droppable:{...e.droppable,containers:a}}}case Qs.UnregisterDroppable:{const{id:t,key:r}=n,i=e.droppable.containers.get(t);if(!i||r!==i.key)return e;const o=new ic(e.droppable.containers);return o.delete(t),{...e,droppable:{...e.droppable,containers:o}}}default:return e}}function lc(n){let{disabled:t}=n;const{active:r,activatorEvent:i,draggableNodes:o}=e.useContext(ac),a=ks(i),s=ks(null==r?void 0:r.id);return e.useEffect(()=>{if(!t&&!i&&a&&null!=s){if(!Hs(a))return;if(document.activeElement===a.target)return;const e=o.get(s);if(!e)return;const{activatorNode:n,node:t}=e;if(!n.current&&!t.current)return;requestAnimationFrame(()=>{for(const e of[n.current,t.current]){if(!e)continue;const n=Zs(e);if(n){n.focus();break}}})}},[i,t,o,s,a]),null}const dc=/*#__PURE__*/e.createContext({...Ks,scaleX:1,scaleY:1});var pc;!function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"}(pc||(pc={}));const fc=/*#__PURE__*/e.memo(function(n){var t,r,i,o;let{id:a,accessibility:s,autoScroll:u=!0,children:c,sensors:l=nc,collisionDetection:d=tu,measuring:p,modifiers:f,...m}=n;const g=e.useReducer(cc,void 0,uc),[b,h]=g,[v,y]=function(){const[n]=e.useState(()=>new Set),t=e.useCallback(e=>(n.add(e),()=>n.delete(e)),[n]),r=e.useCallback(e=>{let{type:t,event:r}=e;n.forEach(e=>{var n;return null==(n=e[t])?void 0:n.call(e,r)})},[n]);return[r,t]}(),[C,x]=e.useState(pc.Uninitialized),A=C===pc.Initialized,{draggable:{active:E,nodes:w,translate:R},droppable:{containers:S}}=b,N=null!=E?w.get(E):null,O=e.useRef({initial:null,translated:null}),D=e.useMemo(()=>{var e;return null!=E?{id:E,data:null!=(e=null==N?void 0:N.data)?e:tc,rect:O}:null},[E,N]),G=e.useRef(null),[k,B]=e.useState(null),[P,M]=e.useState(null),V=Os(m,Object.values(m)),W=Ps("DndDescribedBy",a),H=e.useMemo(()=>S.getEnabled(),[S]),F=function(n){return e.useMemo(()=>({draggable:{...rc.draggable,...null==n?void 0:n.draggable},droppable:{...rc.droppable,...null==n?void 0:n.droppable},dragOverlay:{...rc.dragOverlay,...null==n?void 0:n.dragOverlay}}),[null==n?void 0:n.draggable,null==n?void 0:n.droppable,null==n?void 0:n.dragOverlay])}(p),{droppableRects:X,measureDroppableContainers:L,measuringScheduled:Z}=function(n,t){let{dragging:r,dependencies:i,config:o}=t;const[a,s]=e.useState(null),{frequency:u,measure:c,strategy:l}=o,d=e.useRef(n),p=function(){switch(l){case Yu.Always:return!1;case Yu.BeforeDragging:return r;default:return!r}}(),f=Os(p),m=e.useCallback(function(e){void 0===e&&(e=[]),f.current||s(n=>null===n?e:n.concat(e.filter(e=>!n.includes(e))))},[f]),g=e.useRef(null),b=Ds(e=>{if(p&&!r)return Ju;if(!e||e===Ju||d.current!==n||null!=a){const e=new Map;for(let t of n){if(!t)continue;if(a&&a.length>0&&!a.includes(t.id)&&t.rect.current){e.set(t.id,t.rect.current);continue}const n=t.node.current,r=n?new Au(c(n),n):null;t.rect.current=r,r&&e.set(t.id,r)}return e}return e},[n,a,r,p,c]);return e.useEffect(()=>{d.current=n},[n]),e.useEffect(()=>{p||m()},[r,p]),e.useEffect(()=>{a&&a.length>0&&s(null)},[JSON.stringify(a)]),e.useEffect(()=>{p||"number"!=typeof u||null!==g.current||(g.current=setTimeout(()=>{m(),g.current=null},u))},[u,p,m,...i]),{droppableRects:b,measureDroppableContainers:m,measuringScheduled:null!=a}}(H,{dragging:A,dependencies:[R.x,R.y],config:F.droppable}),Y=function(e,n){const t=null!=n?e.get(n):void 0,r=t?t.node.current:null;return Ds(e=>{var t;return null==n?null:null!=(t=null!=r?r:e)?t:null},[r,n])}(w,E),j=e.useMemo(()=>P?Fs(P):null,[P]),J=function(){const e=A&&!(!1===(null==k?void 0:k.autoScrollEnabled))&&!("object"==typeof u?!1===u.enabled:!1===u);return"object"==typeof u?{...u,enabled:e}:{enabled:e}}(),z=function(e,n){return zu(e,n)}(Y,F.draggable.measure);!function(n){let{activeNode:t,measure:r,initialRect:i,config:o=!0}=n;const a=e.useRef(!1),{x:s,y:u}="boolean"==typeof o?{x:o,y:o}:o;Ss(()=>{if(!s&&!u||!t)return void(a.current=!1);if(a.current||!i)return;const e=null==t?void 0:t.node.current;if(!e||!1===e.isConnected)return;const n=ru(r(e),i);if(s||(n.x=0),u||(n.y=0),a.current=!0,Math.abs(n.x)>0||Math.abs(n.y)>0){const t=lu(e);t&&t.scrollBy({top:n.y,left:n.x})}},[t,s,u,i,r])}({activeNode:null!=E?w.get(E):null,config:J.layoutShiftCompensation,initialRect:z,measure:F.draggable.measure});const _=qu(Y,F.draggable.measure,z),U=qu(Y?Y.parentElement:null),q=e.useRef({activatorEvent:null,active:null,activeNode:Y,collisionRect:null,collisions:null,droppableRects:X,draggableNodes:w,draggingNode:null,draggingNodeRect:null,droppableContainers:S,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Q=S.getNodeFor(null==(t=q.current.over)?void 0:t.id),$=function(n){let{measure:t}=n;const[r,i]=e.useState(null),o=e.useCallback(e=>{for(const{target:n}of e)if(ws(n)){i(e=>{const r=t(n);return e?{...e,width:r.width,height:r.height}:r});break}},[t]),a=_u({callback:o}),s=e.useCallback(e=>{const n=function(e){if(!e)return null;if(e.children.length>1)return e;const n=e.children[0];return ws(n)?n:e}(e);null==a||a.disconnect(),n&&(null==a||a.observe(n)),i(n?t(n):null)},[t,a]),[u,c]=Gs(s);return e.useMemo(()=>({nodeRef:u,rect:r,setRef:c}),[r,u,c])}({measure:F.dragOverlay.measure}),K=null!=(r=$.nodeRef.current)?r:Y,ee=A?null!=(i=$.rect)?i:_:null,ne=Boolean($.nodeRef.current&&$.rect),te=ru(re=ne?null:_,zu(re));var re;const ie=Ku(K?As(K):null),oe=function(n){const t=e.useRef(n),r=Ds(e=>n?e&&e!==Qu&&n&&t.current&&n.parentNode===t.current.parentNode?e:cu(n):Qu,[n]);return e.useEffect(()=>{t.current=n},[n]),r}(A?null!=Q?Q:Y:null),ae=function(n,t){void 0===t&&(t=su);const[r]=n,i=Ku(r?As(r):null),[o,a]=e.useState(ec);function s(){a(()=>n.length?n.map(e=>bu(e)?i:new Au(t(e),e)):ec)}const u=_u({callback:s});return Ss(()=>{null==u||u.disconnect(),s(),n.forEach(e=>null==u?void 0:u.observe(e))},[n]),o}(oe),se=function(e,n){let{transform:t,...r}=n;return null!=e&&e.length?e.reduce((e,n)=>n({transform:e,...r}),t):t}(f,{transform:{x:R.x-te.x,y:R.y-te.y,scaleX:1,scaleY:1},activatorEvent:P,active:D,activeNodeRect:_,containerNodeRect:U,draggingNodeRect:ee,over:q.current.over,overlayNodeRect:$.rect,scrollableAncestors:oe,scrollableAncestorRects:ae,windowRect:ie}),ue=j?Vs(j,R):null,ce=function(n){const[t,r]=e.useState(null),i=e.useRef(n),o=e.useCallback(e=>{const n=du(e.target);n&&r(e=>e?(e.set(n,mu(n)),new Map(e)):null)},[]);return e.useEffect(()=>{const e=i.current;if(n!==e){t(e);const a=n.map(e=>{const n=du(e);return n?(n.addEventListener("scroll",o,{passive:!0}),[n,mu(n)]):null}).filter(e=>null!=e);r(a.length?new Map(a):null),i.current=n}return()=>{t(n),t(e)};function t(e){e.forEach(e=>{const n=du(e);null==n||n.removeEventListener("scroll",o)})}},[o,n]),e.useMemo(()=>n.length?t?Array.from(t.values()).reduce((e,n)=>Vs(e,n),Ks):Cu(n):Ks,[n,t])}(oe),le=$u(ce),de=$u(ce,[_]),pe=Vs(se,le),fe=ee?ou(ee,se):null,me=D&&fe?d({active:D,collisionRect:fe,droppableRects:X,droppableContainers:H,pointerCoordinates:ue}):null,ge=function(e){if(!e||0===e.length)return null;const[n]=e;return n.id}(me),[be,he]=e.useState(null),ve=function(e,n,t){return{...e,scaleX:n&&t?n.width/t.width:1,scaleY:n&&t?n.height/t.height:1}}(ne?se:Vs(se,de),null!=(o=null==be?void 0:be.rect)?o:null,_),Ie=e.useRef(null),ye=e.useCallback((e,n)=>{let{sensor:t,options:r}=n;if(null==G.current)return;const i=w.get(G.current);if(!i)return;const o=e.nativeEvent,a=new t({active:G.current,activeNode:i,event:o,options:r,context:q,onAbort(e){if(!w.get(e))return;const{onDragAbort:n}=V.current,t={id:e};null==n||n(t),v({type:"onDragAbort",event:t})},onPending(e,n,t,r){if(!w.get(e))return;const{onDragPending:i}=V.current,o={id:e,constraint:n,initialCoordinates:t,offset:r};null==i||i(o),v({type:"onDragPending",event:o})},onStart(e){const n=G.current;if(null==n)return;const t=w.get(n);if(!t)return;const{onDragStart:r}=V.current,i={activatorEvent:o,active:{id:n,data:t.data,rect:O}};I.unstable_batchedUpdates(()=>{null==r||r(i),x(pc.Initializing),h({type:Qs.DragStart,initialCoordinates:e,active:n}),v({type:"onDragStart",event:i}),B(Ie.current),M(o)})},onMove(e){h({type:Qs.DragMove,coordinates:e})},onEnd:s(Qs.DragEnd),onCancel:s(Qs.DragCancel)});function s(e){return async function(){const{active:n,collisions:t,over:r,scrollAdjustedTranslate:i}=q.current;let a=null;if(n&&i){const{cancelDrop:s}=V.current;a={activatorEvent:o,active:n,collisions:t,delta:i,over:r},e===Qs.DragEnd&&"function"==typeof s&&await Promise.resolve(s(a))&&(e=Qs.DragCancel)}G.current=null,I.unstable_batchedUpdates(()=>{h({type:e}),x(pc.Uninitialized),he(null),B(null),M(null),Ie.current=null;const n=e===Qs.DragEnd?"onDragEnd":"onDragCancel";if(a){const e=V.current[n];null==e||e(a),v({type:n,event:a})}})}}Ie.current=a},[w]),Ce=e.useCallback((e,n)=>(t,r)=>{const i=t.nativeEvent,o=w.get(r);null!==G.current||!o||i.dndKit||i.defaultPrevented||!0===e(t,n.options,{active:o})&&(i.dndKit={capturedBy:n.sensor},G.current=r,ye(t,n))},[w,ye]),xe=function(n,t){return e.useMemo(()=>n.reduce((e,n)=>{const{sensor:r}=n;return[...e,...r.activators.map(e=>({eventName:e.eventName,handler:t(e.handler,n)}))]},[]),[n,t])}(l,Ce);!function(n){e.useEffect(()=>{if(!ys)return;const e=n.map(e=>{let{sensor:n}=e;return null==n.setup?void 0:n.setup()});return()=>{for(const n of e)null==n||n()}},n.map(e=>{let{sensor:n}=e;return n}))}(l),Ss(()=>{_&&C===pc.Initializing&&x(pc.Initialized)},[_,C]),e.useEffect(()=>{const{onDragMove:e}=V.current,{active:n,activatorEvent:t,collisions:r,over:i}=q.current;if(!n||!t)return;const o={active:n,activatorEvent:t,collisions:r,delta:{x:pe.x,y:pe.y},over:i};I.unstable_batchedUpdates(()=>{null==e||e(o),v({type:"onDragMove",event:o})})},[pe.x,pe.y]),e.useEffect(()=>{const{active:e,activatorEvent:n,collisions:t,droppableContainers:r,scrollAdjustedTranslate:i}=q.current;if(!e||null==G.current||!n||!i)return;const{onDragOver:o}=V.current,a=r.get(ge),s=a&&a.rect.current?{id:a.id,rect:a.rect.current,data:a.data,disabled:a.disabled}:null,u={active:e,activatorEvent:n,collisions:t,delta:{x:i.x,y:i.y},over:s};I.unstable_batchedUpdates(()=>{he(s),null==o||o(u),v({type:"onDragOver",event:u})})},[ge]),Ss(()=>{q.current={activatorEvent:P,active:D,activeNode:Y,collisionRect:fe,collisions:me,droppableRects:X,draggableNodes:w,draggingNode:K,draggingNodeRect:ee,droppableContainers:S,over:be,scrollableAncestors:oe,scrollAdjustedTranslate:pe},O.current={initial:ee,translated:fe}},[D,Y,me,fe,w,K,ee,X,S,be,oe,pe]),function(n){let{acceleration:t,activator:r=Xu.Pointer,canScroll:i,draggingRect:o,enabled:a,interval:s=5,order:u=Lu.TreeOrder,pointerCoordinates:c,scrollableAncestors:l,scrollableAncestorRects:d,delta:p,threshold:f}=n;const m=function(e){let{delta:n,disabled:t}=e;const r=ks(n);return Ds(e=>{if(t||!r||!e)return Zu;const i=Math.sign(n.x-r.x),o=Math.sign(n.y-r.y);return{x:{[gu.Backward]:e.x[gu.Backward]||-1===i,[gu.Forward]:e.x[gu.Forward]||1===i},y:{[gu.Backward]:e.y[gu.Backward]||-1===o,[gu.Forward]:e.y[gu.Forward]||1===o}}},[t,n,r])}({delta:p,disabled:!a}),[g,b]=function(){const n=e.useRef(null);return[e.useCallback((e,t)=>{n.current=setInterval(e,t)},[]),e.useCallback(()=>{null!==n.current&&(clearInterval(n.current),n.current=null)},[])]}(),h=e.useRef({x:0,y:0}),v=e.useRef({x:0,y:0}),I=e.useMemo(()=>{switch(r){case Xu.Pointer:return c?{top:c.y,bottom:c.y,left:c.x,right:c.x}:null;case Xu.DraggableRect:return o}},[r,o,c]),y=e.useRef(null),C=e.useCallback(()=>{const e=y.current;e&&e.scrollBy(h.current.x*v.current.x,h.current.y*v.current.y)},[]),x=e.useMemo(()=>u===Lu.TreeOrder?[...l].reverse():l,[u,l]);e.useEffect(()=>{if(a&&l.length&&I){for(const e of x){if(!1===(null==i?void 0:i(e)))continue;const n=l.indexOf(e),r=d[n];if(!r)continue;const{direction:o,speed:a}=Iu(e,r,I,t,f);for(const e of["x","y"])m[e][o[e]]||(a[e]=0,o[e]=0);if(a.x>0||a.y>0)return b(),y.current=e,g(C,s),h.current=a,void(v.current=o)}h.current={x:0,y:0},v.current={x:0,y:0},b()}else b()},[t,C,i,b,a,s,JSON.stringify(I),JSON.stringify(m),g,l,x,d,JSON.stringify(f)])}({...J,delta:R,draggingRect:fe,pointerCoordinates:ue,scrollableAncestors:oe,scrollableAncestorRects:ae});const Ae=e.useMemo(()=>({active:D,activeNode:Y,activeNodeRect:_,activatorEvent:P,collisions:me,containerNodeRect:U,dragOverlay:$,draggableNodes:w,droppableContainers:S,droppableRects:X,over:be,measureDroppableContainers:L,scrollableAncestors:oe,scrollableAncestorRects:ae,measuringConfiguration:F,measuringScheduled:Z,windowRect:ie}),[D,Y,_,P,me,U,$,w,S,X,be,L,oe,ae,F,Z,ie]),Ee=e.useMemo(()=>({activatorEvent:P,activators:xe,active:D,activeNodeRect:_,ariaDescribedById:{draggable:W},dispatch:h,draggableNodes:w,over:be,measureDroppableContainers:L}),[P,xe,D,_,h,W,w,be,L]);return T.default.createElement(zs.Provider,{value:y},T.default.createElement(ac.Provider,{value:Ee},T.default.createElement(sc.Provider,{value:Ae},T.default.createElement(dc.Provider,{value:ve},c)),T.default.createElement(lc,{disabled:!1===(null==s?void 0:s.restoreFocus)})),T.default.createElement(qs,{...s,hiddenTextDescribedById:W}))}),mc=/*#__PURE__*/e.createContext(null),gc="button",bc={timeout:25};function hc(e,n,t){const r=e.slice();return r.splice(t<0?r.length+t:t,0,r.splice(n,1)[0]),r}function vc(e,n){return e.reduce((e,t,r)=>{const i=n.get(t);return i&&(e[r]=i),e},Array(e.length))}function Ic(e){return null!==e&&e>=0}const yc=e=>{let{rects:n,activeIndex:t,overIndex:r,index:i}=e;const o=hc(n,r,t),a=n[i],s=o[i];return s&&a?{x:s.left-a.left,y:s.top-a.top,scaleX:s.width/a.width,scaleY:s.height/a.height}:null},Cc="Sortable",xc=/*#__PURE__*/T.default.createContext({activeIndex:-1,containerId:Cc,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:yc,disabled:{draggable:!1,droppable:!1}});function Ac(n){let{children:t,id:r,items:i,strategy:o=yc,disabled:a=!1}=n;const{active:s,dragOverlay:u,droppableRects:c,over:l,measureDroppableContainers:d}=e.useContext(sc),p=Ps(Cc,r),f=Boolean(null!==u.rect),m=e.useMemo(()=>i.map(e=>"object"==typeof e&&"id"in e?e.id:e),[i]),g=null!=s,b=s?m.indexOf(s.id):-1,h=l?m.indexOf(l.id):-1,v=e.useRef(m),I=!function(e,n){if(e===n)return!0;if(e.length!==n.length)return!1;for(let t=0;t<e.length;t++)if(e[t]!==n[t])return!1;return!0}(m,v.current),y=-1!==h&&-1===b||I,C=function(e){return"boolean"==typeof e?{draggable:e,droppable:e}:e}(a);Ss(()=>{I&&g&&d(m)},[I,m,g,d]),e.useEffect(()=>{v.current=m},[m]);const x=e.useMemo(()=>({activeIndex:b,containerId:p,disabled:C,disableTransforms:y,items:m,overIndex:h,useDragOverlay:f,sortedRects:vc(m,c),strategy:o}),[b,p,C.draggable,C.droppable,y,m,h,c,f,o]);return T.default.createElement(xc.Provider,{value:x},t)}const Ec=e=>{let{id:n,items:t,activeIndex:r,overIndex:i}=e;return hc(t,r,i).indexOf(n)},wc=e=>{let{containerId:n,isSorting:t,wasDragging:r,index:i,items:o,newIndex:a,previousItems:s,previousContainerId:u,transition:c}=e;return!(!c||!r||s!==o&&i===a||!t&&(a===i||n!==u))},Rc={duration:200,easing:"ease"},Tc="transform",Sc=/*#__PURE__*/Xs.Transition.toString({property:Tc,duration:0,easing:"linear"}),Nc={roleDescription:"sortable"};var Oc=function(n){var t=function(n){let{animateLayoutChanges:t=wc,attributes:r,disabled:i,data:o,getNewIndex:a=Ec,id:s,strategy:u,resizeObserverConfig:c,transition:l=Rc}=n;const{items:d,containerId:p,activeIndex:f,disabled:m,disableTransforms:g,sortedRects:b,overIndex:h,useDragOverlay:v,strategy:I}=e.useContext(xc),y=function(e,n){var t,r;return"boolean"==typeof e?{draggable:e,droppable:!1}:{draggable:null!=(t=null==e?void 0:e.draggable)?t:n.draggable,droppable:null!=(r=null==e?void 0:e.droppable)?r:n.droppable}}(i,m),C=d.indexOf(s),x=e.useMemo(()=>({sortable:{containerId:p,index:C,items:d},...o}),[p,o,C,d]),A=e.useMemo(()=>d.slice(d.indexOf(s)),[d,s]),{rect:E,node:w,isOver:R,setNodeRef:T}=function(n){let{data:t,disabled:r=!1,id:i,resizeObserverConfig:o}=n;const a=Ps("Droppable"),{active:s,dispatch:u,over:c,measureDroppableContainers:l}=e.useContext(ac),d=e.useRef({disabled:r}),p=e.useRef(!1),f=e.useRef(null),m=e.useRef(null),{disabled:g,updateMeasurementsFor:b,timeout:h}={...bc,...o},v=Os(null!=b?b:i),I=_u({callback:e.useCallback(()=>{p.current?(null!=m.current&&clearTimeout(m.current),m.current=setTimeout(()=>{l(Array.isArray(v.current)?v.current:[v.current]),m.current=null},h)):p.current=!0},[h]),disabled:g||!s}),y=e.useCallback((e,n)=>{I&&(n&&(I.unobserve(n),p.current=!1),e&&I.observe(e))},[I]),[C,x]=Gs(y),A=Os(t);return e.useEffect(()=>{I&&C.current&&(I.disconnect(),p.current=!1,I.observe(C.current))},[C,I]),e.useEffect(()=>(u({type:Qs.RegisterDroppable,element:{id:i,key:a,disabled:r,node:C,rect:f,data:A}}),()=>u({type:Qs.UnregisterDroppable,key:a,id:i})),[i]),e.useEffect(()=>{r!==d.current.disabled&&(u({type:Qs.SetDroppableDisabled,id:i,key:a,disabled:r}),d.current.disabled=r)},[i,a,r,u]),{active:s,rect:f,isOver:(null==c?void 0:c.id)===i,node:C,over:c,setNodeRef:x}}({id:s,data:x,disabled:y.droppable,resizeObserverConfig:{updateMeasurementsFor:A,...c}}),{active:S,activatorEvent:N,activeNodeRect:O,attributes:D,setNodeRef:G,listeners:k,isDragging:B,over:P,setActivatorNodeRef:M,transform:V}=function(n){let{id:t,data:r,disabled:i=!1,attributes:o}=n;const a=Ps("Draggable"),{activators:s,activatorEvent:u,active:c,activeNodeRect:l,ariaDescribedById:d,draggableNodes:p,over:f}=e.useContext(ac),{role:m=gc,roleDescription:g="draggable",tabIndex:b=0}=null!=o?o:{},h=(null==c?void 0:c.id)===t,v=e.useContext(h?dc:mc),[I,y]=Gs(),[C,x]=Gs(),A=function(n,t){return e.useMemo(()=>n.reduce((e,n)=>{let{eventName:r,handler:i}=n;return e[r]=e=>{i(e,t)},e},{}),[n,t])}(s,t),E=Os(r);return Ss(()=>(p.set(t,{id:t,key:a,node:I,activatorNode:C,data:E}),()=>{const e=p.get(t);e&&e.key===a&&p.delete(t)}),[p,t]),{active:c,activatorEvent:u,activeNodeRect:l,attributes:e.useMemo(()=>({role:m,tabIndex:b,"aria-disabled":i,"aria-pressed":!(!h||m!==gc)||void 0,"aria-roledescription":g,"aria-describedby":d.draggable}),[i,m,b,h,g,d.draggable]),isDragging:h,listeners:i?void 0:A,node:I,over:f,setNodeRef:y,setActivatorNodeRef:x,transform:v}}({id:s,data:x,attributes:{...Nc,...r},disabled:y.draggable}),W=function(){for(var n=arguments.length,t=new Array(n),r=0;r<n;r++)t[r]=arguments[r];return e.useMemo(()=>e=>{t.forEach(n=>n(e))},t)}(T,G),H=Boolean(S),F=H&&!g&&Ic(f)&&Ic(h),X=!v&&B,L=X&&F?V:null,Z=F?null!=L?L:(null!=u?u:I)({rects:b,activeNodeRect:O,activeIndex:f,overIndex:h,index:C}):null,Y=Ic(f)&&Ic(h)?a({id:s,items:d,activeIndex:f,overIndex:h}):C,j=null==S?void 0:S.id,J=e.useRef({activeId:j,items:d,newIndex:Y,containerId:p}),z=d!==J.current.items,_=t({active:S,containerId:p,isDragging:B,isSorting:H,id:s,index:C,items:d,newIndex:J.current.newIndex,previousItems:J.current.items,previousContainerId:J.current.containerId,transition:l,wasDragging:null!=J.current.activeId}),U=function(n){let{disabled:t,index:r,node:i,rect:o}=n;const[a,s]=e.useState(null),u=e.useRef(r);return Ss(()=>{if(!t&&r!==u.current&&i.current){const e=o.current;if(e){const n=su(i.current,{ignoreTransform:!0}),t={x:e.left-n.left,y:e.top-n.top,scaleX:e.width/n.width,scaleY:e.height/n.height};(t.x||t.y)&&s(t)}}r!==u.current&&(u.current=r)},[t,r,i,o]),e.useEffect(()=>{a&&s(null)},[a]),a}({disabled:!_,index:C,node:w,rect:E});return e.useEffect(()=>{H&&J.current.newIndex!==Y&&(J.current.newIndex=Y),p!==J.current.containerId&&(J.current.containerId=p),d!==J.current.items&&(J.current.items=d)},[H,Y,p,d]),e.useEffect(()=>{if(j===J.current.activeId)return;if(null!=j&&null==J.current.activeId)return void(J.current.activeId=j);const e=setTimeout(()=>{J.current.activeId=j},50);return()=>clearTimeout(e)},[j]),{active:S,activeIndex:f,attributes:D,data:x,rect:E,index:C,newIndex:Y,items:d,isOver:R,isSorting:H,isDragging:B,listeners:k,node:w,overIndex:h,over:P,setNodeRef:W,setActivatorNodeRef:M,setDroppableNodeRef:T,setDraggableNodeRef:G,transform:null!=U?U:Z,transition:U||z&&J.current.newIndex===C?Sc:X&&!Hs(N)||!l?void 0:H||_?Xs.Transition.toString({...l,property:Tc}):void 0}}({id:n.data.value}),r=t.attributes,i=t.listeners,o=t.setNodeRef,a=t.transition,s={display:"flex",transform:Xs.Transform.toString(t.transform),transition:a};return T.default.createElement("div",X({ref:o,style:s},r,i,{onPointerDown:function(e){e.target instanceof HTMLElement&&(["svg","path"].includes(e.target.nodeName)&&(e.preventDefault(),e.stopPropagation()),null==i||i.onPointerDown(e))}}),T.default.createElement(Ia.MultiValueContainer,X({},n)))},Dc=function(e){var n=X({},e.innerProps,{style:{cursor:"grab"},onMouseDown:function(e){e.preventDefault(),e.stopPropagation()}});return T.default.createElement(Ia.MultiValueLabel,X({},e,{innerProps:n}))},Gc={en:{translation:{"Are you sure you want to delete this widget?":"Are you sure you want to delete this widget?",Cancel:"Cancel",Delete:"Delete","filters.dayType.label":"Day type","filters.dayType.calendar":"Calendar","filters.dayType.production":"Production","filters.shifts.label":"Shifts","filters.shifts.allShifts":"All shifts","filters.dateRange.label":"Date range","filters.dateRange.from":"From","filters.dateRange.to":"To","filters.search.placeholder":"Search periods...","filters.search.noResults":"No periods found","filters.premium.indicator":"Premium","filters.periods.currentShift":"Current shift","filters.periods.lastShift":"Previous shift","filters.periods.today":"Today","filters.periods.yesterday":"Yesterday","filters.periods.last7Days":"Last 7 days","filters.periods.last14Days":"Last 14 days","filters.periods.last30Days":"Last 30 days","filters.periods.last90Days":"Last 90 days","filters.periods.last180Days":"Last 180 days","filters.periods.last365Days":"Last 365 days","filters.periods.currentWeek":"Current week","filters.periods.currentMonth":"Current month","filters.periods.currentQuarter":"Current quarter","filters.periods.currentYear":"Current year","filters.periods.previousWeek":"Previous week","filters.periods.previousMonth":"Previous month","filters.periods.previousQuarter":"Previous quarter","filters.periods.previousYear":"Previous year","filters.periods.last2Weeks":"Last 2 weeks","filters.periods.last4Weeks":"Last 4 weeks","filters.periods.last8Weeks":"Last 8 weeks","filters.periods.last12Weeks":"Last 12 weeks","filters.periods.last3Months":"Last 3 months","filters.periods.last6Months":"Last 6 months","filters.periods.last12Months":"Last 12 months","filters.periods.week":"Week {{week}}","filters.accessDenied.title":"Premium feature","filters.accessDenied.close":"Close"}},pl:{translation:{"Are you sure you want to delete this widget?":"Czy na pewno usunąć ten widżet?",Cancel:"Anuluj",Delete:"Usuń","filters.dayType.label":"Typ dnia","filters.dayType.calendar":"Kalendarzowy","filters.dayType.production":"Produkcyjny","filters.shifts.label":"Zmiany","filters.shifts.allShifts":"Wszystkie zmiany","filters.dateRange.label":"Zakres dat","filters.dateRange.from":"Od","filters.dateRange.to":"Do","filters.search.placeholder":"Szukaj okresów...","filters.search.noResults":"Nie znaleziono okresów","filters.premium.indicator":"Premium","filters.periods.currentShift":"Aktualna zmiana","filters.periods.lastShift":"Poprzednia zmiana","filters.periods.today":"Dzisiaj","filters.periods.yesterday":"Wczoraj","filters.periods.last7Days":"Ostatnie 7 dni","filters.periods.last14Days":"Ostatnie 14 dni","filters.periods.last30Days":"Ostatnie 30 dni","filters.periods.last90Days":"Ostatnie 90 dni","filters.periods.last180Days":"Ostatnie 180 dni","filters.periods.last365Days":"Ostatnie 365 dni","filters.periods.currentWeek":"Bieżący tydzień","filters.periods.currentMonth":"Bieżący miesiąc","filters.periods.currentQuarter":"Bieżący kwartał","filters.periods.currentYear":"Bieżący rok","filters.periods.previousWeek":"Poprzedni tydzień","filters.periods.previousMonth":"Poprzedni miesiąc","filters.periods.previousQuarter":"Poprzedni kwartał","filters.periods.previousYear":"Poprzedni rok","filters.periods.last2Weeks":"Ostatnie 2 tygodnie","filters.periods.last4Weeks":"Ostatnie 4 tygodnie","filters.periods.last8Weeks":"Ostatnie 8 tygodni","filters.periods.last12Weeks":"Ostatnie 12 tygodni","filters.periods.last3Months":"Ostatnie 3 miesiące","filters.periods.last6Months":"Ostatnie 6 miesięcy","filters.periods.last12Months":"Ostatnie 12 miesięcy","filters.periods.week":"Tydzień {{week}}","filters.accessDenied.title":"Funkcja Premium","filters.accessDenied.close":"Zamknij"}}},kc=Pi(function(e,n){var t,r,i,o="[object Map]",a="[object Promise]",s="[object Set]",u="[object WeakMap]",c="[object DataView]",l=/^\[object .+?Constructor\]$/,d="object"==typeof self&&self&&self.Object===Object&&self,p="object"==typeof ki&&ki&&ki.Object===Object&&ki||d||Function("return this")(),f=n&&!n.nodeType&&n,m=f&&e&&!e.nodeType&&e,g=m&&m.exports===f,b=Function.prototype,h=Object.prototype,v=p["__core-js_shared__"],I=(t=/[^.]+$/.exec(v&&v.keys&&v.keys.IE_PROTO||""))?"Symbol(src)_1."+t:"",y=b.toString,C=h.hasOwnProperty,x=h.toString,A=RegExp("^"+y.call(C).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),E=g?p.Buffer:void 0,w=h.propertyIsEnumerable,R=E?E.isBuffer:void 0,T=(r=Object.keys,i=Object,function(e){return r(i(e))}),S=H(p,"DataView"),N=H(p,"Map"),O=H(p,"Promise"),D=H(p,"Set"),G=H(p,"WeakMap"),k=!w.call({valueOf:1},"valueOf"),B=X(S),P=X(N),M=X(O),V=X(D),W=X(G);function H(e,n){var t=function(e,n){return null==e?void 0:e[n]}(e,n);return function(e){if(!J(e)||function(e){return!!I&&I in e}(e))return!1;var n=j(e)||function(e){var n=!1;if(null!=e&&"function"!=typeof e.toString)try{n=!!(e+"")}catch(e){}return n}(e)?A:l;return n.test(X(e))}(t)?t:void 0}var F=function(e){return x.call(e)};function X(e){if(null!=e){try{return y.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(S&&F(new S(new ArrayBuffer(1)))!=c||N&&F(new N)!=o||O&&F(O.resolve())!=a||D&&F(new D)!=s||G&&F(new G)!=u)&&(F=function(e){var n=x.call(e),t="[object Object]"==n?e.constructor:void 0,r=t?X(t):void 0;if(r)switch(r){case B:return c;case P:return o;case M:return a;case V:return s;case W:return u}return n});var L=Array.isArray;function Z(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}(e.length)&&!j(e)}var Y=R||function(){return!1};function j(e){var n=J(e)?x.call(e):"";return"[object Function]"==n||"[object GeneratorFunction]"==n}function J(e){var n=typeof e;return!!e&&("object"==n||"function"==n)}e.exports=function(e){if(Z(e)&&(L(e)||"string"==typeof e||"function"==typeof e.splice||Y(e)||function(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&Z(e)}(e)&&C.call(e,"callee")&&(!w.call(e,"callee")||"[object Arguments]"==x.call(e))}(e)))return!e.length;var n=F(e);if(n==o||n==s)return!e.size;if(k||function(e){var n=e&&e.constructor;return e===("function"==typeof n&&n.prototype||h)}(e))return!T(e).length;for(var t in e)if(C.call(e,t))return!1;return!0}}),Bc=function(e,n){return Bc=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var t in n)n.hasOwnProperty(t)&&(e[t]=n[t])},Bc(e,n)};function Pc(e,n){function t(){this.constructor=e}Bc(e,n),e.prototype=null===n?Object.create(n):(t.prototype=n.prototype,new t)}function Mc(e){return"function"==typeof e}var Vc=!1,Wc={Promise:void 0,set useDeprecatedSynchronousErrorHandling(e){Vc=e},get useDeprecatedSynchronousErrorHandling(){return Vc}};function Hc(e){setTimeout(function(){throw e},0)}var Fc={closed:!0,next:function(e){},error:function(e){if(Wc.useDeprecatedSynchronousErrorHandling)throw e;Hc(e)},complete:function(){}},Xc=/*@__PURE__*/function(){return Array.isArray||function(e){return e&&"number"==typeof e.length}}();function Lc(e){return null!==e&&"object"==typeof e}var Zc=/*@__PURE__*/function(){function e(e){return Error.call(this),this.message=e?e.length+" errors occurred during unsubscription:\n"+e.map(function(e,n){return n+1+") "+e.toString()}).join("\n "):"",this.name="UnsubscriptionError",this.errors=e,this}return e.prototype=/*@__PURE__*/Object.create(Error.prototype),e}(),Yc=Zc,jc=/*@__PURE__*/function(){function e(e){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,e&&(this._ctorUnsubscribe=!0,this._unsubscribe=e)}return e.prototype.unsubscribe=function(){var n;if(!this.closed){var t=this,r=t._parentOrParents,i=t._ctorUnsubscribe,o=t._unsubscribe,a=t._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,r instanceof e)r.remove(this);else if(null!==r)for(var s=0;s<r.length;++s)r[s].remove(this);if(Mc(o)){i&&(this._unsubscribe=void 0);try{o.call(this)}catch(e){n=e instanceof Yc?Jc(e.errors):[e]}}if(Xc(a)){s=-1;for(var u=a.length;++s<u;){var c=a[s];if(Lc(c))try{c.unsubscribe()}catch(e){n=n||[],e instanceof Yc?n=n.concat(Jc(e.errors)):n.push(e)}}}if(n)throw new Yc(n)}},e.prototype.add=function(n){var t=n;if(!n)return e.EMPTY;switch(typeof n){case"function":t=new e(n);case"object":if(t===this||t.closed||"function"!=typeof t.unsubscribe)return t;if(this.closed)return t.unsubscribe(),t;if(!(t instanceof e)){var r=t;(t=new e)._subscriptions=[r]}break;default:throw new Error("unrecognized teardown "+n+" added to Subscription.")}var i=t._parentOrParents;if(null===i)t._parentOrParents=this;else if(i instanceof e){if(i===this)return t;t._parentOrParents=[i,this]}else{if(-1!==i.indexOf(this))return t;i.push(this)}var o=this._subscriptions;return null===o?this._subscriptions=[t]:o.push(t),t},e.prototype.remove=function(e){var n=this._subscriptions;if(n){var t=n.indexOf(e);-1!==t&&n.splice(t,1)}},e.EMPTY=function(e){return e.closed=!0,e}(new e),e}();function Jc(e){return e.reduce(function(e,n){return e.concat(n instanceof Yc?n.errors:n)},[])}var zc=/*@__PURE__*/function(){return"function"==typeof Symbol?/*@__PURE__*/Symbol("rxSubscriber"):"@@rxSubscriber_"+/*@__PURE__*/Math.random()}(),_c=/*@__PURE__*/function(e){function n(t,r,i){var o=e.call(this)||this;switch(o.syncErrorValue=null,o.syncErrorThrown=!1,o.syncErrorThrowable=!1,o.isStopped=!1,arguments.length){case 0:o.destination=Fc;break;case 1:if(!t){o.destination=Fc;break}if("object"==typeof t){t instanceof n?(o.syncErrorThrowable=t.syncErrorThrowable,o.destination=t,t.add(o)):(o.syncErrorThrowable=!0,o.destination=new Uc(o,t));break}default:o.syncErrorThrowable=!0,o.destination=new Uc(o,t,r,i)}return o}return Pc(n,e),n.prototype[zc]=function(){return this},n.create=function(e,t,r){var i=new n(e,t,r);return i.syncErrorThrowable=!1,i},n.prototype.next=function(e){this.isStopped||this._next(e)},n.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},n.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},n.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this))},n.prototype._next=function(e){this.destination.next(e)},n.prototype._error=function(e){this.destination.error(e),this.unsubscribe()},n.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},n.prototype._unsubscribeAndRecycle=function(){var e=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=e,this},n}(jc),Uc=/*@__PURE__*/function(e){function n(n,t,r,i){var o,a=e.call(this)||this;a._parentSubscriber=n;var s=a;return Mc(t)?o=t:t&&(o=t.next,r=t.error,i=t.complete,t!==Fc&&(Mc((s=Object.create(t)).unsubscribe)&&a.add(s.unsubscribe.bind(s)),s.unsubscribe=a.unsubscribe.bind(a))),a._context=s,a._next=o,a._error=r,a._complete=i,a}return Pc(n,e),n.prototype.next=function(e){if(!this.isStopped&&this._next){var n=this._parentSubscriber;Wc.useDeprecatedSynchronousErrorHandling&&n.syncErrorThrowable?this.__tryOrSetError(n,this._next,e)&&this.unsubscribe():this.__tryOrUnsub(this._next,e)}},n.prototype.error=function(e){if(!this.isStopped){var n=this._parentSubscriber,t=Wc.useDeprecatedSynchronousErrorHandling;if(this._error)t&&n.syncErrorThrowable?(this.__tryOrSetError(n,this._error,e),this.unsubscribe()):(this.__tryOrUnsub(this._error,e),this.unsubscribe());else if(n.syncErrorThrowable)t?(n.syncErrorValue=e,n.syncErrorThrown=!0):Hc(e),this.unsubscribe();else{if(this.unsubscribe(),t)throw e;Hc(e)}}},n.prototype.complete=function(){var e=this;if(!this.isStopped){var n=this._parentSubscriber;if(this._complete){var t=function(){return e._complete.call(e._context)};Wc.useDeprecatedSynchronousErrorHandling&&n.syncErrorThrowable?(this.__tryOrSetError(n,t),this.unsubscribe()):(this.__tryOrUnsub(t),this.unsubscribe())}else this.unsubscribe()}},n.prototype.__tryOrUnsub=function(e,n){try{e.call(this._context,n)}catch(e){if(this.unsubscribe(),Wc.useDeprecatedSynchronousErrorHandling)throw e;Hc(e)}},n.prototype.__tryOrSetError=function(e,n,t){if(!Wc.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{n.call(this._context,t)}catch(n){return Wc.useDeprecatedSynchronousErrorHandling?(e.syncErrorValue=n,e.syncErrorThrown=!0,!0):(Hc(n),!0)}return!1},n.prototype._unsubscribe=function(){var e=this._parentSubscriber;this._context=null,this._parentSubscriber=null,e.unsubscribe()},n}(_c),qc=/*@__PURE__*/function(){return"function"==typeof Symbol&&Symbol.observable||"@@observable"}();function Qc(e){return e}var $c=/*@__PURE__*/function(){function e(e){this._isScalar=!1,e&&(this._subscribe=e)}return e.prototype.lift=function(n){var t=new e;return t.source=this,t.operator=n,t},e.prototype.subscribe=function(e,n,t){var r=this.operator,i=function(e,n,t){if(e){if(e instanceof _c)return e;if(e[zc])return e[zc]()}return e||n||t?new _c(e,n,t):new _c(Fc)}(e,n,t);if(i.add(r?r.call(i,this.source):this.source||Wc.useDeprecatedSynchronousErrorHandling&&!i.syncErrorThrowable?this._subscribe(i):this._trySubscribe(i)),Wc.useDeprecatedSynchronousErrorHandling&&i.syncErrorThrowable&&(i.syncErrorThrowable=!1,i.syncErrorThrown))throw i.syncErrorValue;return i},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(n){Wc.useDeprecatedSynchronousErrorHandling&&(e.syncErrorThrown=!0,e.syncErrorValue=n),function(e){for(;e;){var n=e.destination;if(e.closed||e.isStopped)return!1;e=n&&n instanceof _c?n:null}return!0}(e)?e.error(n):console.warn(n)}},e.prototype.forEach=function(e,n){var t=this;return new(n=Kc(n))(function(n,r){var i;i=t.subscribe(function(n){try{e(n)}catch(e){r(e),i&&i.unsubscribe()}},r,n)})},e.prototype._subscribe=function(e){var n=this.source;return n&&n.subscribe(e)},e.prototype[qc]=function(){return this},e.prototype.pipe=function(){for(var e,n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];return 0===n.length?this:(0===(e=n).length?Qc:1===e.length?e[0]:function(n){return e.reduce(function(e,n){return n(e)},n)})(this)},e.prototype.toPromise=function(e){var n=this;return new(e=Kc(e))(function(e,t){var r;n.subscribe(function(e){return r=e},function(e){return t(e)},function(){return e(r)})})},e.create=function(n){return new e(n)},e}();function Kc(e){if(e||(e=Wc.Promise||Promise),!e)throw new Error("no Promise impl found");return e}var el=/*#__PURE__*/function(){function e(e){var n=this;this.wsURL=void 0,this.cable=null,this.subscriptions=new Map,this.addSubscription=function(e,t){n.subscriptions.set(e,t)},this.wsURL=e}var n=e.prototype;return n.connect=function(e,n){this.cable=H.default.createConsumer(this.wsURL+"?token="+e+"&lang="+n)},n.request=function(e){var n,t=this.cable,r=this.subscriptions,i=this.addSubscription;return new $c(function(o){if(t){var a,s=(null==(a=e.variables)?void 0:a.id)||"company";r.has(s)||(n=t.subscriptions.create({channel:"GraphqlChannel",channelId:Math.round(Date.now()+1e5*Math.random()).toString(16)},{connected:function(){this.perform("execute",e)},received:function(e){e.more?e.result.errors?o.error&&o.error(e.result.errors[0]):e.result.data&&o.next&&(kc(e.result.data)||o.next(e.result)):o.complete&&o.complete()}}),i(s,n))}})},n.hasSubscription=function(e){return this.subscriptions.has(e)},e}(),nl=/*#__PURE__*/function(){function e(e,n,t){this.actionCableClient=null,this.actionCableClient=new el(e),this.actionCableClient.connect(n,t)}return e.prototype.subscribe=function(e,n,t,r){if(void 0===r&&(r=function(e){throw e}),!this.actionCableClient)throw new Error("No WS client available");var i=this.actionCableClient.request({query:e,variables:n}).subscribe({next:function(e){var n=e.data,i=e.errors;if(i)return r(new Error(JSON.stringify(i)));n&&t&&t(function(e){var n=Object.keys(e);if(1!==n.length)throw new Error("Expected exactly one response key, got: "+n.join(", "));return e[n[0]]}(n))}});return function(){return i.unsubscribe()}},e}(),tl=function(e,n,t){return new nl(e,n,t)},rl=function(e,n){return ti(new A.GraphQLClient(e,{fetch:n}))},il=function(n){var t,r=n.url,o=n.wsUrl,a=n.lang,s=i.useStore().sessionStore,u=e.useState(),c=u[0],l=u[1],d=e.useState(),p=d[0],f=d[1],m=o||r.replace("graphql","cable"),g=(null==(t=s.loginStatus.authResponse)?void 0:t.accessToken)||"";return e.useEffect(function(){r&&l(rl(r,i.fetch))},[r]),e.useEffect(function(){r&&g&&f(tl(m||r.replace("graphql","cable"),g,a))},[r,m,g,a]),{graphqlSdk:c,gqlWsClient:p}},ol={root:{boxShadow:"none","& .react-resizable-handle":{width:"24px",height:"24px",borderRadius:"4px",background:function(e){return e.palette.primary.main+" url("+F.default+")"},backgroundRepeat:"no-repeat",backgroundSize:"50%",backgroundPosition:"50%","&:hover":{backgroundColor:function(e){return e.palette.primary.dark}}},"& .react-resizable-handle:after":{display:"none"}},header:{height:"40px"},dragIcon:{width:"30px",height:"30px",marginLeft:function(e){return"-"+e.spacing(1)},padding:"8px",borderRadius:"4px",background:function(e){return e.palette.primary.main},"&:hover":{cursor:"move",background:function(e){return e.palette.primary.dark}}},actionButtons:{height:"30px",marginTop:"-7px"},settingsButton:{color:"rgba(255, 255, 255, 0.45)",borderRadius:"4px",borderTopRightRadius:0,borderBottomRightRadius:0,borderColor:"rgba(255,255,255,0.1)",background:"rgba(255,255,255,0.1)","&:focus":{boxShadow:"0 0 0 1px rgba(255, 255, 255, 0.1)"},"&:hover":{opacity:.8}},infoButton:{marginLeft:"1px",color:"rgba(255, 255, 255, 0.45)",borderRadius:0,borderColor:"rgba(255,255,255,0.1)",background:"rgba(255,255,255,0.1)","&:focus":{boxShadow:"0 0 0 1px rgba(255, 255, 255, 0.1)"},"&:hover":{opacity:.8}},deleteButton:{marginLeft:"1px",color:"rgba(255, 255, 255, 0.45)",borderRadius:"4px",borderTopLeftRadius:0,borderBottomLeftRadius:0,borderColor:"rgba(255,255,255,0.1)",background:"rgba(255,255,255,0.1)","&:focus":{boxShadow:"0 0 0 1px rgba(255, 255, 255, 0.1)"},"&:hover":{opacity:.8}},content:{height:"calc(100% - 40px)",padding:0,background:"transparent",border:"1px solid rgba(255, 255, 255, 0.2)",borderTop:"none",borderRadius:"4px",boxShadow:"0px 4px 8px rgba(0, 0, 0, 0.25)","&:last-child":{paddingBottom:0}}},al=["children","title","Widget","id","url","wsUrl","lang","data","filters","settings","openSettingsModal","onSettingsModalOpened","onSettingsModalClosed","sidePanelOpened","updateSidePanelProps","onDelete","editMode","version","requiredFeatures","extraPermissions"];function sl(e,n){try{var t=e()}catch(e){return n(e)}return t&&t.then?t.then(void 0,n):t}var ul=T.default.forwardRef(function(r,o){var a=r.children,s=r.title,u=r.Widget,c=r.id,l=r.url,d=r.wsUrl,p=r.lang,f=r.data,m=r.filters,g=r.settings,b=r.openSettingsModal,h=r.onSettingsModalOpened,v=r.onSettingsModalClosed,I=r.sidePanelOpened,x=r.updateSidePanelProps,A=r.onDelete,E=r.editMode,w=r.version,R=r.requiredFeatures,S=r.extraPermissions,N=L(r,al),O=il({url:l,wsUrl:d,lang:p}).graphqlSdk,D=i.useAccess(R,{extraPermissions:S}).hasAccess,G=e.useState(!1),k=G[0],B=G[1],P=e.useState(!1),M=P[0],V=P[1],W=t.useTranslation(),H=W.i18n,F=W.t;return e.useEffect(function(){for(var e="translation",n=0,t=Object.entries(Gc);n<t.length;n++){var r=t[n];H.addResources(r[0],e,r[1][e])}},[H]),T.default.createElement(n.Card,X({ref:o,sx:ol.root},N),T.default.createElement(n.CardHeader,{avatar:E&&T.default.createElement(n.SvgIcon,{component:C.ReactComponent,className:"draggable-handle",sx:ol.dragIcon,inheritViewBox:!0}),title:s,titleTypographyProps:{variant:"subtitle1"},action:E&&T.default.createElement(n.Stack,{direction:"row",sx:ol.actionButtons},T.default.createElement(n.Button,{color:"secondary",sx:ol.settingsButton,onClick:function(){h&&h()},disabled:!D},T.default.createElement(y.Settings,null)),w&&T.default.createElement(T.default.Fragment,null,T.default.createElement(n.Tooltip,{title:w},T.default.createElement(n.Button,{color:"secondary",sx:ol.infoButton},T.default.createElement(y.Info,null)))),T.default.createElement(J,{open:M,confirmMessage:F("Are you sure you want to delete this widget?"),confirmButtonText:F("Delete"),cancelButtonText:F("Cancel"),onCancel:function(){return V(!1)},onConfirm:function(){try{var e=function(){B(!1)};B(!0),V(!1);var n=function(){if(A)return Promise.resolve(A()).then(function(){})}();return Promise.resolve(n&&n.then?n.then(e):e())}catch(e){return Promise.reject(e)}}},T.default.createElement(n.Button,{color:"secondary",sx:ol.deleteButton,onClick:function(e){e.stopPropagation(),V(!0)},disabled:k},T.default.createElement(y.Delete,null)))),sx:ol.header}),T.default.createElement(n.CardContent,{sx:ol.content},T.default.createElement(i.AccessGuard,{features:R,extraPermissions:S,onTrialRequest:function(e){try{return Promise.resolve(sl(function(){return Promise.resolve(null==O?void 0:O.startTrial({input:{featureKey:e}})).then(function(){return Promise.resolve(i.refreshUserData()).then(function(){return!0})})},function(e){return console.error("Failed to start trial:",e),!1}))}catch(e){return Promise.reject(e)}},onFeatureRequest:function(e){var n=e.featureKey,t=e.requestType,r=e.workplaceId;try{return Promise.resolve(sl(function(){return Promise.resolve(null==O?void 0:O.requestFeatureAccess({input:{featureKey:n,requestType:t.toUpperCase(),workplaceId:r}})).then(function(){return Promise.resolve(i.refreshUserData()).then(function(){return!0})})},function(e){return console.error("Failed to request feature access:",e),!1}))}catch(e){return Promise.reject(e)}}},T.default.createElement(u,{id:c,url:l,wsUrl:d,lang:p,data:f,filters:m,settings:g,openSettingsModal:b,onSettingsModalOpened:h,onSettingsModalClosed:v,sidePanelOpened:I,updateSidePanelProps:x,editMode:E}))),E&&a)});exports.ActualStaffingCountsDocument=pr,exports.ApplicationInfoDocument=fr,exports.AssignOperatorDocument=jr,exports.AssignOperatorToWorkplaceDocument=Vt,exports.AvailabilityInsightsDocument=mr,exports.BulkUpsertStaffingPlansDocument=Wt,exports.CompanyConfigDocument=gr,exports.ConfirmTooltip=J,exports.CounterDirectoriesDocument=br,exports.CountersDocument=hr,exports.CreateDashboardDocument=Ht,exports.CreateOrderDocument=Ft,exports.CreateProductDocument=Xt,exports.CreateStaffingPlanDocument=Lt,exports.CreateStatusChangeDocument=Zt,exports.CreateUserPresenceDocument=Yt,exports.CreateWidgetDocument=jt,exports.CurrentUserDocument=vr,exports.DashboardFilters=function(r){var o=r.initialValues,a=r.onChange,s=r.shifts,u=r.onFeatureRequest,c=e.useState(function(){return null!=o?o:{dayType:exports.DayType.Production,dateRange:(e=O.default().format("YYYY-MM-DD"),{from:e+"T00:00:00",to:e+"T23:59:59"}),shiftIds:[]};var e}),l=c[0],d=c[1],p=e.useState(function(){return null==o?void 0:o.selectedPeriodId}),f=p[0],m=p[1];e.useEffect(function(){null!=o&&o.selectedPeriodId&&m(o.selectedPeriodId)},[null==o?void 0:o.selectedPeriodId]);var g=e.useState(!1),b=g[0],h=g[1],v=e.useState(!1),I=v[0],y=v[1],C=e.useRef(null),x=i.useAccess([Gi]),A=x.hasAccess,E=x.accessState,w=x.buttons,R=x.cooldownInfo,S=x.features,D=e.useMemo(function(){var e,n=S.find(function(e){return e.featureKey===Gi});return null!=(e=null==n?void 0:n.daysSinceExpiry)?e:null},[S]),G=e.useMemo(function(){return w.filter(function(e){return"start_trial"!==e.action})},[w]);e.useEffect(function(){if(f){var e=fi.find(function(e){return e.id===f});if(e){var n=e.calculate({dayType:l.dayType,shifts:s,selectedShiftIds:l.shiftIds});d(function(e){return X({},e,{dateRange:n,selectedPeriodId:f})}),a(X({},l,{dateRange:n,selectedPeriodId:f}))}}},[l.dayType,l.shiftIds,s,f]),e.useEffect(function(){if(f){var e=hi(f,{dayType:l.dayType,shifts:s,selectedShiftIds:l.shiftIds});if(e){var n=e.getTime()-Date.now(),t=function(){var e=fi.find(function(e){return e.id===f});if(e){var n=e.calculate({dayType:l.dayType,shifts:s,selectedShiftIds:l.shiftIds});d(function(e){return X({},e,{dateRange:n,selectedPeriodId:f})}),a(X({},l,{dateRange:n,selectedPeriodId:f}))}};if(!(n<=0)){var r=setTimeout(t,n);return function(){return clearTimeout(r)}}t()}}},[f,l.dayType,l.shiftIds,s]);var k,B,P,M=t.useTranslation().t,V=e.useCallback(function(e){var n=X({},l,{dayType:e});d(n),a(n)},[l,a]),W=e.useCallback(function(e){var n=X({},l,{shiftIds:e});d(n),a(n)},[l,a]),H=e.useCallback(function(e){m(void 0);var n=X({},l,{dateRange:e,selectedPeriodId:void 0});d(n),a(n)},[l,a]),F=e.useCallback(function(e,n){if(!e.needAccess||A){m(e.id);var t=X({},l,{dateRange:n,selectedPeriodId:e.id});d(t),a(t)}else h(!0)},[l,A,a]),L=e.useCallback(function(){h(!1)},[]),Z=e.useCallback(function(){h(!0)},[]),Y=e.useCallback(function(){y(!0)},[]),j=e.useCallback(function(){y(!1)},[]);return T.default.createElement(n.Box,{sx:Di.container},T.default.createElement(n.Stack,{direction:"row",spacing:2,alignItems:"center"},T.default.createElement(n.TextField,{ref:C,label:M("filters.dateRange.label"),value:(k=l.dateRange,B=O.default(k.from).format("YYYY-MM-DD"),P=O.default(k.to).format("YYYY-MM-DD"),B===P?B:B+" - "+P),onClick:Y,size:"small",InputProps:{readOnly:!0,startAdornment:T.default.createElement(n.InputAdornment,{position:"start"},T.default.createElement(N.default,{sx:{fontSize:16}}))},sx:Di.dateField}),T.default.createElement(Oi,{shifts:s,selectedShiftIds:l.shiftIds,onChange:W})),T.default.createElement(n.Popover,{open:I,anchorEl:C.current,onClose:j,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},sx:Di.popover},T.default.createElement(n.Box,{sx:Di.popoverContent},T.default.createElement(Si,{dateRange:l.dateRange,dayType:l.dayType,shifts:s,selectedShiftIds:l.shiftIds,hasAccess:A,selectedPeriodId:f,onDayTypeChange:V,onDateRangeChange:H,onPeriodSelect:F,onAccessDenied:Z}))),T.default.createElement(Ii,{open:b,onClose:L,accessState:E,buttons:G,daysSinceExpiry:D,cooldownInfo:R,onFeatureRequest:u}))},exports.DashboardsDocument=Ir,exports.DepartmentsDocument=yr,exports.FloorPlansDocument=Cr,exports.GetWorkplacePerformanceInsightsDocument=zr,exports.GraphqlWsClient=nl,exports.ListActualStaffingCountsDocument=_r,exports.ListStaffingPlansDocument=Ur,exports.ListStatusChangesDocument=qr,exports.ListWorkOrdersDocument=Qr,exports.ListWorkplaceAssignmentsDocument=$r,exports.ListWorkplacesDocument=Kr,exports.MetricCard=function(e){var r=e.title,i=e.metricLabel,o=e.metricValue,a=e.extraValue,s=e.animateBackgroundColor,u=e.rounded,c=L(e,Fi),l=t.useTranslation().t,d=function(e){return{card:X({position:"relative",width:"100%",height:"100%"},e.showBgPattern&&{mixBlendMode:"hard-light",background:"url("+W.default+"), linear-gradient(329.66deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.75) 100%)",backgroundSize:"cover"},e.card.rounded?{borderRadius:"4px"}:{borderTopLeftRadius:0,borderTopRightRadius:0}),cardOverlay:X({position:"absolute",top:0,left:0,width:"100%",height:"100%",zIndex:-1},e.showBgPattern&&{mixBlendMode:"hard-light"},e.card.rounded?{borderRadius:"4px"}:{borderTopLeftRadius:0,borderTopRightRadius:0},e.cardOverlay,{animation:e.animateBackgroundColor?(t=e.backgroundColor,v.keyframes(Mi||(Mi=Z(["\n 0% {\n background: ",";\n }\n\n 50% {\n background: ",";\n }\n\n 100% {\n background: ",";\n }\n"])),Hi(t,.5),Hi(t,1),Hi(t,.5))+" 3s infinite"):"none"}),cardHeader:{height:"3em",color:"#090B0E",borderBottom:"1px solid rgba(0, 0, 0, 0.1)",background:"rgba(0, 0, 0, 0.05)","& span":{lineHeight:"3em",fontSize:"1em",fontWeight:500}},cardContent:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"80%",minWidth:"auto",minHeight:"auto",maxWidth:"none",background:"transparent","& > img":{flexBasis:"25%",minWidth:"125px",maxWidth:"25%"}},cardLabel:{width:"100%",lineHeight:"2.5em",fontSize:"1.8em",fontWeight:700,whiteSpace:"nowrap",overflow:"hidden",textAlign:"center",textOverflow:"ellipsis",color:"#090B0E"},cardValue:{lineHeight:"1.2em",textAlign:"center",fontSize:"1.6em",fontWeight:700,color:n.lighten("#090B0E",.15)},cardExtra:{lineHeight:"4em",textAlign:"center",fontSize:"1em",fontWeight:600,color:"#090B0E"}};var t}({card:{rounded:u},cardOverlay:{background:function(){var e=null==o?void 0:o.statusColor;if(e)switch(e){case exports.AndonLightColor.Green:return"linear-gradient(180deg, #31BF59 0%, #32D74B 100%)";case exports.AndonLightColor.Yellow:return"linear-gradient(360deg, #FFD60A 0%, #FFC12F 100%)";case exports.AndonLightColor.Red:return"linear-gradient(0deg, #F05C53 0%, #FF3B2F 100%)";default:return"rgba(187, 187, 187, 0.75)"}return"rgba(255, 255, 255, 0.75)"}()},showBgPattern:!0,backgroundColor:function(){var e=null==o?void 0:o.statusColor;if(e)switch(e){case exports.AndonLightColor.Green:return"#32D74B";case exports.AndonLightColor.Yellow:return"#FFC12F";case exports.AndonLightColor.Red:return"#FF3B2F";default:return"#BBBBBBBF"}return"#FFFFFFBF"}(),animateBackgroundColor:s});return T.default.createElement(n.Card,X({sx:d.card},c),T.default.createElement(n.Box,{sx:d.cardOverlay}),T.default.createElement(n.CardHeader,{title:T.default.createElement(Wi,{line:1,text:r}),sx:d.cardHeader}),T.default.createElement(n.CardContent,{sx:d.cardContent},T.default.createElement(n.Typography,{sx:d.cardLabel},i),T.default.createElement(n.Typography,{sx:d.cardValue},o?function(e){var n=e.textValue;if(n){var t=O.default.duration(Number(n),"seconds");return Math.floor(t.asMinutes())+"m "+t.seconds()+"s"}return""}(o):T.default.createElement(t.Trans,{t:l},"No value for the selected metric")),a&&T.default.createElement(n.Typography,{sx:d.cardExtra},a)))},exports.MetricValuesDocument=xr,exports.MetricsDocument=Ar,exports.NotificationsDocument=Er,exports.OrdersDocument=wr,exports.OrdersExecutionsDocument=Rr,exports.PauseOrderExecutionDocument=Jt,exports.ProductionInsightsDocument=Tr,exports.ProductsDocument=Sr,exports.ReasonsDocument=Nr,exports.ReasonsRecommendationDocument=Or,exports.RemoveDashboardDocument=zt,exports.RemoveStaffingPlanDocument=_t,exports.RemoveUserPresenceDocument=Ut,exports.RemoveWidgetDocument=qt,exports.RemoveWorkplaceUsersPresencesDocument=Qt,exports.RequestFeatureAccessDocument=$t,exports.SetCounterDocument=Kt,exports.ShiftsDocument=Dr,exports.SortableSelect=function(e){var n=e.options,t=e.selected,r=e.onChange,i=function(e){var n,i,o,a=e.active,s=e.over;if(a.id!==(null==s?void 0:s.id)){var u=t.findIndex(function(e){return e===a.id}),c=t.findIndex(function(e){return e===(null==s?void 0:s.id)});r((n=t,i=u,o=c,function(e,n,t){const r=n<0?e.length+n:n;if(r>=0&&r<e.length){const r=t<0?e.length+t:t,[i]=e.splice(n,1);e.splice(r,0,i)}}(n=[...n],i,o),n))}};return T.default.createElement(Is,{placeholder:e.placeholder,isMulti:!0,options:n,value:t.map(function(e){return n.find(function(n){return n.value===e})}),onChange:function(e){return r([].concat(e||[]).map(function(e){return e.value}))},closeMenuOnSelect:!1,components:{MultiValueContainer:Oc,MultiValueLabel:Dc,ValueContainer:function(e){return T.default.createElement(fc,{onDragEnd:i},T.default.createElement(Ac,{items:t},e.children))}},styles:{control:function(e,n){return X({},e,{padding:"6px 0 6px 8px",borderColor:"rgba(255, 255, 255, 0.15)",background:"#1C1F25"},n.isFocused&&{borderColor:"#4E5A67",boxShadow:"none"},{"&:hover":{borderColor:"#4E5A67",boxShadow:"none"}})},menu:function(e){return X({},e,{background:"#1C1F25"})},option:function(e,n){return X({},e,{background:n.isFocused?"#2A2E34":"#1C1F25"})}}})},exports.StaffingPlansDocument=Gr,exports.StandardRatesDocument=kr,exports.StartOrderExecutionDocument=er,exports.StartTrialDocument=nr,exports.StatusChangeTransitionPermissionsDocument=Br,exports.StatusChangesDocument=Pr,exports.StopOrderExecutionDocument=tr,exports.UnassignOperatorDocument=Jr,exports.UnassignOperatorFromWorkplaceDocument=rr,exports.UpdateDashboardDocument=ir,exports.UpdateNotificationDocument=or,exports.UpdateOrderDocument=ar,exports.UpdateOrderExecutionDocument=sr,exports.UpdateStaffingPlanDocument=ur,exports.UpdateStatusChangeDocument=cr,exports.UpdateWidgetDocument=lr,exports.UpdateWorkOrderDocument=dr,exports.UsersDocument=Mr,exports.UsersPresencesDocument=Vr,exports.WidgetCard=ul,exports.WidgetDocument=Wr,exports.WidgetsDocument=Hr,exports.WorkOrdersDocument=Fr,exports.WorkOrdersInsightsDocument=Xr,exports.WorkplaceAssignmentsDocument=Lr,exports.WorkplaceEventDocument=ei,exports.WorkplacePerformanceInsightsDocument=Zr,exports.WorkplacesDocument=Yr,exports.findPeriodById=function(e){return fi.find(function(n){return n.id===e})},exports.generateTimeRange=function(e,n,t,r){for(var i=[],o=e,a=e.isAfter(n);a?o.isAfter(n)||o.isSame(n):o.isBefore(n)||o.isSame(n);)i.push(o),o=a?o.subtract(r,t):o.add(r,t);return i},exports.getCurrentShift=oi,exports.getGqlWsClient=tl,exports.getGraphqlSdk=rl,exports.getNextBoundary=hi,exports.getRecentShift=ai,exports.getSdk=ti,exports.getShiftTimeRange=gi,exports.getTimeRangeLabel=mi,exports.normalizeShifts=ii,exports.periods=fi,exports.useGqlClients=il,exports.version="1.5.18";
|
|
15
|
+
return S.createElement(hs,Qi({ref:t},r))}),Is=vs;const ys="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function Cs(e){const n=Object.prototype.toString.call(e);return"[object Window]"===n||"[object global]"===n}function xs(e){return"nodeType"in e}function As(e){var n,t;return e?Cs(e)?e:xs(e)&&null!=(n=null==(t=e.ownerDocument)?void 0:t.defaultView)?n:window:window}function Es(e){const{Document:n}=As(e);return e instanceof n}function ws(e){return!Cs(e)&&e instanceof As(e).HTMLElement}function Rs(e){return e instanceof As(e).SVGElement}function Ts(e){return e?Cs(e)?e.document:xs(e)?Es(e)?e:ws(e)||Rs(e)?e.ownerDocument:document:document:document}const Ss=ys?e.useLayoutEffect:e.useEffect;function Ns(n){const t=e.useRef(n);return Ss(()=>{t.current=n}),e.useCallback(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return null==t.current?void 0:t.current(...n)},[])}function Os(n,t){void 0===t&&(t=[n]);const r=e.useRef(n);return Ss(()=>{r.current!==n&&(r.current=n)},t),r}function Ds(n,t){const r=e.useRef();return e.useMemo(()=>{const e=n(r.current);return r.current=e,e},[...t])}function Gs(n){const t=Ns(n),r=e.useRef(null),i=e.useCallback(e=>{e!==r.current&&(null==t||t(e,r.current)),r.current=e},[]);return[r,i]}function ks(n){const t=e.useRef();return e.useEffect(()=>{t.current=n},[n]),t.current}let Bs={};function Ps(n,t){return e.useMemo(()=>{if(t)return t;const e=null==Bs[n]?0:Bs[n]+1;return Bs[n]=e,n+"-"+e},[n,t])}function Ms(e){return function(n){for(var t=arguments.length,r=new Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];return r.reduce((n,t)=>{const r=Object.entries(t);for(const[t,i]of r){const r=n[t];null!=r&&(n[t]=r+e*i)}return n},{...n})}}const Vs=/*#__PURE__*/Ms(1),Ws=/*#__PURE__*/Ms(-1);function Hs(e){if(!e)return!1;const{KeyboardEvent:n}=As(e.target);return n&&e instanceof n}function Fs(e){if(function(e){if(!e)return!1;const{TouchEvent:n}=As(e.target);return n&&e instanceof n}(e)){if(e.touches&&e.touches.length){const{clientX:n,clientY:t}=e.touches[0];return{x:n,y:t}}if(e.changedTouches&&e.changedTouches.length){const{clientX:n,clientY:t}=e.changedTouches[0];return{x:n,y:t}}}return function(e){return"clientX"in e&&"clientY"in e}(e)?{x:e.clientX,y:e.clientY}:null}const Xs=/*#__PURE__*/Object.freeze({Translate:{toString(e){if(!e)return;const{x:n,y:t}=e;return"translate3d("+(n?Math.round(n):0)+"px, "+(t?Math.round(t):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:n,scaleY:t}=e;return"scaleX("+n+") scaleY("+t+")"}},Transform:{toString(e){if(e)return[Xs.Translate.toString(e),Xs.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:n,duration:t,easing:r}=e;return n+" "+t+"ms "+r}}}),Ls="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function Zs(e){return e.matches(Ls)?e:e.querySelector(Ls)}const Ys={display:"none"};function js(e){let{id:n,value:t}=e;return T.default.createElement("div",{id:n,style:Ys},t)}function Js(e){let{id:n,announcement:t,ariaLiveType:r="assertive"}=e;return T.default.createElement("div",{id:n,style:{position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"},role:"status","aria-live":r,"aria-atomic":!0},t)}const zs=/*#__PURE__*/e.createContext(null),_s={draggable:"\n To pick up a draggable item, press the space bar.\n While dragging, use the arrow keys to move the item.\n Press space again to drop the item in its new position, or press escape to cancel.\n "},Us={onDragStart(e){let{active:n}=e;return"Picked up draggable item "+n.id+"."},onDragOver(e){let{active:n,over:t}=e;return t?"Draggable item "+n.id+" was moved over droppable area "+t.id+".":"Draggable item "+n.id+" is no longer over a droppable area."},onDragEnd(e){let{active:n,over:t}=e;return t?"Draggable item "+n.id+" was dropped over droppable area "+t.id:"Draggable item "+n.id+" was dropped."},onDragCancel(e){let{active:n}=e;return"Dragging was cancelled. Draggable item "+n.id+" was dropped."}};function qs(n){let{announcements:t=Us,container:r,hiddenTextDescribedById:i,screenReaderInstructions:o=_s}=n;const{announce:a,announcement:s}=function(){const[n,t]=e.useState("");return{announce:e.useCallback(e=>{null!=e&&t(e)},[]),announcement:n}}(),u=Ps("DndLiveRegion"),[c,l]=e.useState(!1);if(e.useEffect(()=>{l(!0)},[]),function(n){const t=e.useContext(zs);e.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(n)},[n,t])}(e.useMemo(()=>({onDragStart(e){let{active:n}=e;a(t.onDragStart({active:n}))},onDragMove(e){let{active:n,over:r}=e;t.onDragMove&&a(t.onDragMove({active:n,over:r}))},onDragOver(e){let{active:n,over:r}=e;a(t.onDragOver({active:n,over:r}))},onDragEnd(e){let{active:n,over:r}=e;a(t.onDragEnd({active:n,over:r}))},onDragCancel(e){let{active:n,over:r}=e;a(t.onDragCancel({active:n,over:r}))}}),[a,t])),!c)return null;const d=T.default.createElement(T.default.Fragment,null,T.default.createElement(js,{id:i,value:o.draggable}),T.default.createElement(Js,{id:u,announcement:s}));return r?I.createPortal(d,r):d}var Qs;function $s(){}!function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"}(Qs||(Qs={}));const Ks=/*#__PURE__*/Object.freeze({x:0,y:0});function eu(e,n){let{data:{value:t}}=e,{data:{value:r}}=n;return r-t}function nu(e,n){const t=Math.max(n.top,e.top),r=Math.max(n.left,e.left),i=Math.min(n.left+n.width,e.left+e.width),o=Math.min(n.top+n.height,e.top+e.height);if(r<i&&t<o){const a=(i-r)*(o-t);return Number((a/(n.width*n.height+e.width*e.height-a)).toFixed(4))}return 0}const tu=e=>{let{collisionRect:n,droppableRects:t,droppableContainers:r}=e;const i=[];for(const e of r){const{id:r}=e,o=t.get(r);if(o){const t=nu(o,n);t>0&&i.push({id:r,data:{droppableContainer:e,value:t}})}}return i.sort(eu)};function ru(e,n){return e&&n?{x:e.left-n.left,y:e.top-n.top}:Ks}function iu(e){return function(n){for(var t=arguments.length,r=new Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];return r.reduce((n,t)=>({...n,top:n.top+e*t.y,bottom:n.bottom+e*t.y,left:n.left+e*t.x,right:n.right+e*t.x}),{...n})}}const ou=/*#__PURE__*/iu(1),au={ignoreTransform:!1};function su(e,n){void 0===n&&(n=au);let t=e.getBoundingClientRect();if(n.ignoreTransform){const{transform:n,transformOrigin:r}=As(e).getComputedStyle(e);n&&(t=function(e,n,t){const r=function(e){if(e.startsWith("matrix3d(")){const n=e.slice(9,-1).split(/, /);return{x:+n[12],y:+n[13],scaleX:+n[0],scaleY:+n[5]}}if(e.startsWith("matrix(")){const n=e.slice(7,-1).split(/, /);return{x:+n[4],y:+n[5],scaleX:+n[0],scaleY:+n[3]}}return null}(n);if(!r)return e;const{scaleX:i,scaleY:o,x:a,y:s}=r,u=e.left-a-(1-i)*parseFloat(t),c=e.top-s-(1-o)*parseFloat(t.slice(t.indexOf(" ")+1)),l=i?e.width/i:e.width,d=o?e.height/o:e.height;return{width:l,height:d,top:c,right:u+l,bottom:c+d,left:u}}(t,n,r))}const{top:r,left:i,width:o,height:a,bottom:s,right:u}=t;return{top:r,left:i,width:o,height:a,bottom:s,right:u}}function uu(e){return su(e,{ignoreTransform:!0})}function cu(e,n){const t=[];return e?function r(i){if(null!=n&&t.length>=n)return t;if(!i)return t;if(Es(i)&&null!=i.scrollingElement&&!t.includes(i.scrollingElement))return t.push(i.scrollingElement),t;if(!ws(i)||Rs(i))return t;if(t.includes(i))return t;const o=As(e).getComputedStyle(i);return i!==e&&function(e,n){void 0===n&&(n=As(e).getComputedStyle(e));const t=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(e=>{const r=n[e];return"string"==typeof r&&t.test(r)})}(i,o)&&t.push(i),function(e,n){return void 0===n&&(n=As(e).getComputedStyle(e)),"fixed"===n.position}(i,o)?t:r(i.parentNode)}(e):t}function lu(e){const[n]=cu(e,1);return null!=n?n:null}function du(e){return ys&&e?Cs(e)?e:xs(e)?Es(e)||e===Ts(e).scrollingElement?window:ws(e)?e:null:null:null}function pu(e){return Cs(e)?e.scrollX:e.scrollLeft}function fu(e){return Cs(e)?e.scrollY:e.scrollTop}function mu(e){return{x:pu(e),y:fu(e)}}var gu;function bu(e){return!(!ys||!e)&&e===document.scrollingElement}function hu(e){const n={x:0,y:0},t=bu(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-t.width,y:e.scrollHeight-t.height};return{isTop:e.scrollTop<=n.y,isLeft:e.scrollLeft<=n.x,isBottom:e.scrollTop>=r.y,isRight:e.scrollLeft>=r.x,maxScroll:r,minScroll:n}}!function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"}(gu||(gu={}));const vu={x:.2,y:.2};function Iu(e,n,t,r,i){let{top:o,left:a,right:s,bottom:u}=t;void 0===r&&(r=10),void 0===i&&(i=vu);const{isTop:c,isBottom:l,isLeft:d,isRight:p}=hu(e),f={x:0,y:0},m={x:0,y:0},g=n.height*i.y,b=n.width*i.x;return!c&&o<=n.top+g?(f.y=gu.Backward,m.y=r*Math.abs((n.top+g-o)/g)):!l&&u>=n.bottom-g&&(f.y=gu.Forward,m.y=r*Math.abs((n.bottom-g-u)/g)),!p&&s>=n.right-b?(f.x=gu.Forward,m.x=r*Math.abs((n.right-b-s)/b)):!d&&a<=n.left+b&&(f.x=gu.Backward,m.x=r*Math.abs((n.left+b-a)/b)),{direction:f,speed:m}}function yu(e){if(e===document.scrollingElement){const{innerWidth:e,innerHeight:n}=window;return{top:0,left:0,right:e,bottom:n,width:e,height:n}}const{top:n,left:t,right:r,bottom:i}=e.getBoundingClientRect();return{top:n,left:t,right:r,bottom:i,width:e.clientWidth,height:e.clientHeight}}function Cu(e){return e.reduce((e,n)=>Vs(e,mu(n)),Ks)}const xu=[["x",["left","right"],function(e){return e.reduce((e,n)=>e+pu(n),0)}],["y",["top","bottom"],function(e){return e.reduce((e,n)=>e+fu(n),0)}]];class Au{constructor(e,n){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const t=cu(n),r=Cu(t);this.rect={...e},this.width=e.width,this.height=e.height;for(const[e,n,i]of xu)for(const o of n)Object.defineProperty(this,o,{get:()=>{const n=i(t);return this.rect[o]+(r[e]-n)},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Eu{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(e=>{var n;return null==(n=this.target)?void 0:n.removeEventListener(...e)})},this.target=e}add(e,n,t){var r;null==(r=this.target)||r.addEventListener(e,n,t),this.listeners.push([e,n,t])}}function wu(e,n){const t=Math.abs(e.x),r=Math.abs(e.y);return"number"==typeof n?Math.sqrt(t**2+r**2)>n:"x"in n&&"y"in n?t>n.x&&r>n.y:"x"in n?t>n.x:"y"in n&&r>n.y}var Ru,Tu;function Su(e){e.preventDefault()}function Nu(e){e.stopPropagation()}!function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"}(Ru||(Ru={})),function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"}(Tu||(Tu={}));const Ou={start:[Tu.Space,Tu.Enter],cancel:[Tu.Esc],end:[Tu.Space,Tu.Enter,Tu.Tab]},Du=(e,n)=>{let{currentCoordinates:t}=n;switch(e.code){case Tu.Right:return{...t,x:t.x+25};case Tu.Left:return{...t,x:t.x-25};case Tu.Down:return{...t,y:t.y+25};case Tu.Up:return{...t,y:t.y-25}}};class Gu{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;const{event:{target:n}}=e;this.props=e,this.listeners=new Eu(Ts(n)),this.windowListeners=new Eu(As(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Ru.Resize,this.handleCancel),this.windowListeners.add(Ru.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Ru.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:e,onStart:n}=this.props,t=e.node.current;t&&function(e,n){if(void 0===n&&(n=su),!e)return;const{top:t,left:r,bottom:i,right:o}=n(e);lu(e)&&(i<=0||o<=0||t>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}(t),n(Ks)}handleKeyDown(e){if(Hs(e)){const{active:n,context:t,options:r}=this.props,{keyboardCodes:i=Ou,coordinateGetter:o=Du,scrollBehavior:a="smooth"}=r,{code:s}=e;if(i.end.includes(s))return void this.handleEnd(e);if(i.cancel.includes(s))return void this.handleCancel(e);const{collisionRect:u}=t.current,c=u?{x:u.left,y:u.top}:Ks;this.referenceCoordinates||(this.referenceCoordinates=c);const l=o(e,{active:n,context:t.current,currentCoordinates:c});if(l){const n=Ws(l,c),r={x:0,y:0},{scrollableAncestors:i}=t.current;for(const t of i){const i=e.code,{isTop:o,isRight:s,isLeft:u,isBottom:c,maxScroll:d,minScroll:p}=hu(t),f=yu(t),m={x:Math.min(i===Tu.Right?f.right-f.width/2:f.right,Math.max(i===Tu.Right?f.left:f.left+f.width/2,l.x)),y:Math.min(i===Tu.Down?f.bottom-f.height/2:f.bottom,Math.max(i===Tu.Down?f.top:f.top+f.height/2,l.y))},g=i===Tu.Down&&!c||i===Tu.Up&&!o;if((i===Tu.Right&&!s||i===Tu.Left&&!u)&&m.x!==l.x){const e=t.scrollLeft+n.x,o=i===Tu.Right&&e<=d.x||i===Tu.Left&&e>=p.x;if(o&&!n.y)return void t.scrollTo({left:e,behavior:a});r.x=o?t.scrollLeft-e:i===Tu.Right?t.scrollLeft-d.x:t.scrollLeft-p.x,r.x&&t.scrollBy({left:-r.x,behavior:a});break}if(g&&m.y!==l.y){const e=t.scrollTop+n.y,o=i===Tu.Down&&e<=d.y||i===Tu.Up&&e>=p.y;if(o&&!n.x)return void t.scrollTo({top:e,behavior:a});r.y=o?t.scrollTop-e:i===Tu.Down?t.scrollTop-d.y:t.scrollTop-p.y,r.y&&t.scrollBy({top:-r.y,behavior:a});break}}this.handleMove(e,Vs(Ws(l,this.referenceCoordinates),r))}}}handleMove(e,n){const{onMove:t}=this.props;e.preventDefault(),t(n)}handleEnd(e){const{onEnd:n}=this.props;e.preventDefault(),this.detach(),n()}handleCancel(e){const{onCancel:n}=this.props;e.preventDefault(),this.detach(),n()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}function ku(e){return Boolean(e&&"distance"in e)}function Bu(e){return Boolean(e&&"delay"in e)}Gu.activators=[{eventName:"onKeyDown",handler:(e,n,t)=>{let{keyboardCodes:r=Ou,onActivation:i}=n,{active:o}=t;const{code:a}=e.nativeEvent;if(r.start.includes(a)){const n=o.activatorNode.current;return!(n&&e.target!==n||(e.preventDefault(),null==i||i({event:e.nativeEvent}),0))}return!1}}];class Pu{constructor(e,n,t){var r;void 0===t&&(t=function(e){const{EventTarget:n}=As(e);return e instanceof n?e:Ts(e)}(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=n;const{event:i}=e,{target:o}=i;this.props=e,this.events=n,this.document=Ts(o),this.documentListeners=new Eu(this.document),this.listeners=new Eu(t),this.windowListeners=new Eu(As(o)),this.initialCoordinates=null!=(r=Fs(i))?r:Ks,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:e,props:{options:{activationConstraint:n,bypassActivationConstraint:t}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),e.cancel&&this.listeners.add(e.cancel.name,this.handleCancel),this.windowListeners.add(Ru.Resize,this.handleCancel),this.windowListeners.add(Ru.DragStart,Su),this.windowListeners.add(Ru.VisibilityChange,this.handleCancel),this.windowListeners.add(Ru.ContextMenu,Su),this.documentListeners.add(Ru.Keydown,this.handleKeydown),n){if(null!=t&&t({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(Bu(n))return this.timeoutId=setTimeout(this.handleStart,n.delay),void this.handlePending(n);if(ku(n))return void this.handlePending(n)}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),null!==this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(e,n){const{active:t,onPending:r}=this.props;r(t,e,this.initialCoordinates,n)}handleStart(){const{initialCoordinates:e}=this,{onStart:n}=this.props;e&&(this.activated=!0,this.documentListeners.add(Ru.Click,Nu,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Ru.SelectionChange,this.removeTextSelection),n(e))}handleMove(e){var n;const{activated:t,initialCoordinates:r,props:i}=this,{onMove:o,options:{activationConstraint:a}}=i;if(!r)return;const s=null!=(n=Fs(e))?n:Ks,u=Ws(r,s);if(!t&&a){if(ku(a)){if(null!=a.tolerance&&wu(u,a.tolerance))return this.handleCancel();if(wu(u,a.distance))return this.handleStart()}return Bu(a)&&wu(u,a.tolerance)?this.handleCancel():void this.handlePending(a,u)}e.cancelable&&e.preventDefault(),o(s)}handleEnd(){const{onAbort:e,onEnd:n}=this.props;this.detach(),this.activated||e(this.props.active),n()}handleCancel(){const{onAbort:e,onCancel:n}=this.props;this.detach(),this.activated||e(this.props.active),n()}handleKeydown(e){e.code===Tu.Esc&&this.handleCancel()}removeTextSelection(){var e;null==(e=this.document.getSelection())||e.removeAllRanges()}}const Mu={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class Vu extends Pu{constructor(e){const{event:n}=e,t=Ts(n.target);super(e,Mu,t)}}Vu.activators=[{eventName:"onPointerDown",handler:(e,n)=>{let{nativeEvent:t}=e,{onActivation:r}=n;return!(!t.isPrimary||0!==t.button||(null==r||r({event:t}),0))}}];const Wu={move:{name:"mousemove"},end:{name:"mouseup"}};var Hu;!function(e){e[e.RightClick=2]="RightClick"}(Hu||(Hu={})),class extends Pu{constructor(e){super(e,Wu,Ts(e.event.target))}}.activators=[{eventName:"onMouseDown",handler:(e,n)=>{let{nativeEvent:t}=e,{onActivation:r}=n;return t.button!==Hu.RightClick&&(null==r||r({event:t}),!0)}}];const Fu={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};var Xu,Lu;(class extends Pu{constructor(e){super(e,Fu)}static setup(){return window.addEventListener(Fu.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(Fu.move.name,e)};function e(){}}}).activators=[{eventName:"onTouchStart",handler:(e,n)=>{let{nativeEvent:t}=e,{onActivation:r}=n;const{touches:i}=t;return!(i.length>1||(null==r||r({event:t}),0))}}],function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"}(Xu||(Xu={})),function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"}(Lu||(Lu={}));const Zu={x:{[gu.Backward]:!1,[gu.Forward]:!1},y:{[gu.Backward]:!1,[gu.Forward]:!1}};var Yu,ju;!function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"}(Yu||(Yu={})),function(e){e.Optimized="optimized"}(ju||(ju={}));const Ju=/*#__PURE__*/new Map;function zu(e,n){return Ds(t=>e?t||("function"==typeof n?n(e):e):null,[n,e])}function _u(n){let{callback:t,disabled:r}=n;const i=Ns(t),o=e.useMemo(()=>{if(r||"undefined"==typeof window||void 0===window.ResizeObserver)return;const{ResizeObserver:e}=window;return new e(i)},[r]);return e.useEffect(()=>()=>null==o?void 0:o.disconnect(),[o]),o}function Uu(e){return new Au(su(e),e)}function qu(n,t,r){void 0===t&&(t=Uu);const[i,o]=e.useState(null);function a(){o(e=>{if(!n)return null;var i;if(!1===n.isConnected)return null!=(i=null!=e?e:r)?i:null;const o=t(n);return JSON.stringify(e)===JSON.stringify(o)?e:o})}const s=function(n){let{callback:t,disabled:r}=n;const i=Ns(t),o=e.useMemo(()=>{if(r||"undefined"==typeof window||void 0===window.MutationObserver)return;const{MutationObserver:e}=window;return new e(i)},[i,r]);return e.useEffect(()=>()=>null==o?void 0:o.disconnect(),[o]),o}({callback(e){if(n)for(const t of e){const{type:e,target:r}=t;if("childList"===e&&r instanceof HTMLElement&&r.contains(n)){a();break}}}}),u=_u({callback:a});return Ss(()=>{a(),n?(null==u||u.observe(n),null==s||s.observe(document.body,{childList:!0,subtree:!0})):(null==u||u.disconnect(),null==s||s.disconnect())},[n]),i}const Qu=[];function $u(n,t){void 0===t&&(t=[]);const r=e.useRef(null);return e.useEffect(()=>{r.current=null},t),e.useEffect(()=>{const e=n!==Ks;e&&!r.current&&(r.current=n),!e&&r.current&&(r.current=null)},[n]),r.current?Ws(n,r.current):Ks}function Ku(n){return e.useMemo(()=>n?function(e){const n=e.innerWidth,t=e.innerHeight;return{top:0,left:0,right:n,bottom:t,width:n,height:t}}(n):null,[n])}const ec=[],nc=[{sensor:Vu,options:{}},{sensor:Gu,options:{}}],tc={current:{}},rc={draggable:{measure:uu},droppable:{measure:uu,strategy:Yu.WhileDragging,frequency:ju.Optimized},dragOverlay:{measure:su}};class ic extends Map{get(e){var n;return null!=e&&null!=(n=super.get(e))?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(e=>{let{disabled:n}=e;return!n})}getNodeFor(e){var n,t;return null!=(n=null==(t=this.get(e))?void 0:t.node.current)?n:void 0}}const oc={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:/*#__PURE__*/new Map,droppableRects:/*#__PURE__*/new Map,droppableContainers:/*#__PURE__*/new ic,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:$s},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:rc,measureDroppableContainers:$s,windowRect:null,measuringScheduled:!1},ac=/*#__PURE__*/e.createContext({activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:$s,draggableNodes:/*#__PURE__*/new Map,over:null,measureDroppableContainers:$s}),sc=/*#__PURE__*/e.createContext(oc);function uc(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new ic}}}function cc(e,n){switch(n.type){case Qs.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:n.initialCoordinates,active:n.active}};case Qs.DragMove:return null==e.draggable.active?e:{...e,draggable:{...e.draggable,translate:{x:n.coordinates.x-e.draggable.initialCoordinates.x,y:n.coordinates.y-e.draggable.initialCoordinates.y}}};case Qs.DragEnd:case Qs.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Qs.RegisterDroppable:{const{element:t}=n,{id:r}=t,i=new ic(e.droppable.containers);return i.set(r,t),{...e,droppable:{...e.droppable,containers:i}}}case Qs.SetDroppableDisabled:{const{id:t,key:r,disabled:i}=n,o=e.droppable.containers.get(t);if(!o||r!==o.key)return e;const a=new ic(e.droppable.containers);return a.set(t,{...o,disabled:i}),{...e,droppable:{...e.droppable,containers:a}}}case Qs.UnregisterDroppable:{const{id:t,key:r}=n,i=e.droppable.containers.get(t);if(!i||r!==i.key)return e;const o=new ic(e.droppable.containers);return o.delete(t),{...e,droppable:{...e.droppable,containers:o}}}default:return e}}function lc(n){let{disabled:t}=n;const{active:r,activatorEvent:i,draggableNodes:o}=e.useContext(ac),a=ks(i),s=ks(null==r?void 0:r.id);return e.useEffect(()=>{if(!t&&!i&&a&&null!=s){if(!Hs(a))return;if(document.activeElement===a.target)return;const e=o.get(s);if(!e)return;const{activatorNode:n,node:t}=e;if(!n.current&&!t.current)return;requestAnimationFrame(()=>{for(const e of[n.current,t.current]){if(!e)continue;const n=Zs(e);if(n){n.focus();break}}})}},[i,t,o,s,a]),null}const dc=/*#__PURE__*/e.createContext({...Ks,scaleX:1,scaleY:1});var pc;!function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"}(pc||(pc={}));const fc=/*#__PURE__*/e.memo(function(n){var t,r,i,o;let{id:a,accessibility:s,autoScroll:u=!0,children:c,sensors:l=nc,collisionDetection:d=tu,measuring:p,modifiers:f,...m}=n;const g=e.useReducer(cc,void 0,uc),[b,h]=g,[v,y]=function(){const[n]=e.useState(()=>new Set),t=e.useCallback(e=>(n.add(e),()=>n.delete(e)),[n]),r=e.useCallback(e=>{let{type:t,event:r}=e;n.forEach(e=>{var n;return null==(n=e[t])?void 0:n.call(e,r)})},[n]);return[r,t]}(),[C,x]=e.useState(pc.Uninitialized),A=C===pc.Initialized,{draggable:{active:E,nodes:w,translate:R},droppable:{containers:S}}=b,N=null!=E?w.get(E):null,O=e.useRef({initial:null,translated:null}),D=e.useMemo(()=>{var e;return null!=E?{id:E,data:null!=(e=null==N?void 0:N.data)?e:tc,rect:O}:null},[E,N]),G=e.useRef(null),[k,B]=e.useState(null),[P,M]=e.useState(null),V=Os(m,Object.values(m)),W=Ps("DndDescribedBy",a),H=e.useMemo(()=>S.getEnabled(),[S]),F=function(n){return e.useMemo(()=>({draggable:{...rc.draggable,...null==n?void 0:n.draggable},droppable:{...rc.droppable,...null==n?void 0:n.droppable},dragOverlay:{...rc.dragOverlay,...null==n?void 0:n.dragOverlay}}),[null==n?void 0:n.draggable,null==n?void 0:n.droppable,null==n?void 0:n.dragOverlay])}(p),{droppableRects:X,measureDroppableContainers:L,measuringScheduled:Z}=function(n,t){let{dragging:r,dependencies:i,config:o}=t;const[a,s]=e.useState(null),{frequency:u,measure:c,strategy:l}=o,d=e.useRef(n),p=function(){switch(l){case Yu.Always:return!1;case Yu.BeforeDragging:return r;default:return!r}}(),f=Os(p),m=e.useCallback(function(e){void 0===e&&(e=[]),f.current||s(n=>null===n?e:n.concat(e.filter(e=>!n.includes(e))))},[f]),g=e.useRef(null),b=Ds(e=>{if(p&&!r)return Ju;if(!e||e===Ju||d.current!==n||null!=a){const e=new Map;for(let t of n){if(!t)continue;if(a&&a.length>0&&!a.includes(t.id)&&t.rect.current){e.set(t.id,t.rect.current);continue}const n=t.node.current,r=n?new Au(c(n),n):null;t.rect.current=r,r&&e.set(t.id,r)}return e}return e},[n,a,r,p,c]);return e.useEffect(()=>{d.current=n},[n]),e.useEffect(()=>{p||m()},[r,p]),e.useEffect(()=>{a&&a.length>0&&s(null)},[JSON.stringify(a)]),e.useEffect(()=>{p||"number"!=typeof u||null!==g.current||(g.current=setTimeout(()=>{m(),g.current=null},u))},[u,p,m,...i]),{droppableRects:b,measureDroppableContainers:m,measuringScheduled:null!=a}}(H,{dragging:A,dependencies:[R.x,R.y],config:F.droppable}),Y=function(e,n){const t=null!=n?e.get(n):void 0,r=t?t.node.current:null;return Ds(e=>{var t;return null==n?null:null!=(t=null!=r?r:e)?t:null},[r,n])}(w,E),j=e.useMemo(()=>P?Fs(P):null,[P]),J=function(){const e=A&&!(!1===(null==k?void 0:k.autoScrollEnabled))&&!("object"==typeof u?!1===u.enabled:!1===u);return"object"==typeof u?{...u,enabled:e}:{enabled:e}}(),z=function(e,n){return zu(e,n)}(Y,F.draggable.measure);!function(n){let{activeNode:t,measure:r,initialRect:i,config:o=!0}=n;const a=e.useRef(!1),{x:s,y:u}="boolean"==typeof o?{x:o,y:o}:o;Ss(()=>{if(!s&&!u||!t)return void(a.current=!1);if(a.current||!i)return;const e=null==t?void 0:t.node.current;if(!e||!1===e.isConnected)return;const n=ru(r(e),i);if(s||(n.x=0),u||(n.y=0),a.current=!0,Math.abs(n.x)>0||Math.abs(n.y)>0){const t=lu(e);t&&t.scrollBy({top:n.y,left:n.x})}},[t,s,u,i,r])}({activeNode:null!=E?w.get(E):null,config:J.layoutShiftCompensation,initialRect:z,measure:F.draggable.measure});const _=qu(Y,F.draggable.measure,z),U=qu(Y?Y.parentElement:null),q=e.useRef({activatorEvent:null,active:null,activeNode:Y,collisionRect:null,collisions:null,droppableRects:X,draggableNodes:w,draggingNode:null,draggingNodeRect:null,droppableContainers:S,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Q=S.getNodeFor(null==(t=q.current.over)?void 0:t.id),$=function(n){let{measure:t}=n;const[r,i]=e.useState(null),o=e.useCallback(e=>{for(const{target:n}of e)if(ws(n)){i(e=>{const r=t(n);return e?{...e,width:r.width,height:r.height}:r});break}},[t]),a=_u({callback:o}),s=e.useCallback(e=>{const n=function(e){if(!e)return null;if(e.children.length>1)return e;const n=e.children[0];return ws(n)?n:e}(e);null==a||a.disconnect(),n&&(null==a||a.observe(n)),i(n?t(n):null)},[t,a]),[u,c]=Gs(s);return e.useMemo(()=>({nodeRef:u,rect:r,setRef:c}),[r,u,c])}({measure:F.dragOverlay.measure}),K=null!=(r=$.nodeRef.current)?r:Y,ee=A?null!=(i=$.rect)?i:_:null,ne=Boolean($.nodeRef.current&&$.rect),te=ru(re=ne?null:_,zu(re));var re;const ie=Ku(K?As(K):null),oe=function(n){const t=e.useRef(n),r=Ds(e=>n?e&&e!==Qu&&n&&t.current&&n.parentNode===t.current.parentNode?e:cu(n):Qu,[n]);return e.useEffect(()=>{t.current=n},[n]),r}(A?null!=Q?Q:Y:null),ae=function(n,t){void 0===t&&(t=su);const[r]=n,i=Ku(r?As(r):null),[o,a]=e.useState(ec);function s(){a(()=>n.length?n.map(e=>bu(e)?i:new Au(t(e),e)):ec)}const u=_u({callback:s});return Ss(()=>{null==u||u.disconnect(),s(),n.forEach(e=>null==u?void 0:u.observe(e))},[n]),o}(oe),se=function(e,n){let{transform:t,...r}=n;return null!=e&&e.length?e.reduce((e,n)=>n({transform:e,...r}),t):t}(f,{transform:{x:R.x-te.x,y:R.y-te.y,scaleX:1,scaleY:1},activatorEvent:P,active:D,activeNodeRect:_,containerNodeRect:U,draggingNodeRect:ee,over:q.current.over,overlayNodeRect:$.rect,scrollableAncestors:oe,scrollableAncestorRects:ae,windowRect:ie}),ue=j?Vs(j,R):null,ce=function(n){const[t,r]=e.useState(null),i=e.useRef(n),o=e.useCallback(e=>{const n=du(e.target);n&&r(e=>e?(e.set(n,mu(n)),new Map(e)):null)},[]);return e.useEffect(()=>{const e=i.current;if(n!==e){t(e);const a=n.map(e=>{const n=du(e);return n?(n.addEventListener("scroll",o,{passive:!0}),[n,mu(n)]):null}).filter(e=>null!=e);r(a.length?new Map(a):null),i.current=n}return()=>{t(n),t(e)};function t(e){e.forEach(e=>{const n=du(e);null==n||n.removeEventListener("scroll",o)})}},[o,n]),e.useMemo(()=>n.length?t?Array.from(t.values()).reduce((e,n)=>Vs(e,n),Ks):Cu(n):Ks,[n,t])}(oe),le=$u(ce),de=$u(ce,[_]),pe=Vs(se,le),fe=ee?ou(ee,se):null,me=D&&fe?d({active:D,collisionRect:fe,droppableRects:X,droppableContainers:H,pointerCoordinates:ue}):null,ge=function(e){if(!e||0===e.length)return null;const[n]=e;return n.id}(me),[be,he]=e.useState(null),ve=function(e,n,t){return{...e,scaleX:n&&t?n.width/t.width:1,scaleY:n&&t?n.height/t.height:1}}(ne?se:Vs(se,de),null!=(o=null==be?void 0:be.rect)?o:null,_),Ie=e.useRef(null),ye=e.useCallback((e,n)=>{let{sensor:t,options:r}=n;if(null==G.current)return;const i=w.get(G.current);if(!i)return;const o=e.nativeEvent,a=new t({active:G.current,activeNode:i,event:o,options:r,context:q,onAbort(e){if(!w.get(e))return;const{onDragAbort:n}=V.current,t={id:e};null==n||n(t),v({type:"onDragAbort",event:t})},onPending(e,n,t,r){if(!w.get(e))return;const{onDragPending:i}=V.current,o={id:e,constraint:n,initialCoordinates:t,offset:r};null==i||i(o),v({type:"onDragPending",event:o})},onStart(e){const n=G.current;if(null==n)return;const t=w.get(n);if(!t)return;const{onDragStart:r}=V.current,i={activatorEvent:o,active:{id:n,data:t.data,rect:O}};I.unstable_batchedUpdates(()=>{null==r||r(i),x(pc.Initializing),h({type:Qs.DragStart,initialCoordinates:e,active:n}),v({type:"onDragStart",event:i}),B(Ie.current),M(o)})},onMove(e){h({type:Qs.DragMove,coordinates:e})},onEnd:s(Qs.DragEnd),onCancel:s(Qs.DragCancel)});function s(e){return async function(){const{active:n,collisions:t,over:r,scrollAdjustedTranslate:i}=q.current;let a=null;if(n&&i){const{cancelDrop:s}=V.current;a={activatorEvent:o,active:n,collisions:t,delta:i,over:r},e===Qs.DragEnd&&"function"==typeof s&&await Promise.resolve(s(a))&&(e=Qs.DragCancel)}G.current=null,I.unstable_batchedUpdates(()=>{h({type:e}),x(pc.Uninitialized),he(null),B(null),M(null),Ie.current=null;const n=e===Qs.DragEnd?"onDragEnd":"onDragCancel";if(a){const e=V.current[n];null==e||e(a),v({type:n,event:a})}})}}Ie.current=a},[w]),Ce=e.useCallback((e,n)=>(t,r)=>{const i=t.nativeEvent,o=w.get(r);null!==G.current||!o||i.dndKit||i.defaultPrevented||!0===e(t,n.options,{active:o})&&(i.dndKit={capturedBy:n.sensor},G.current=r,ye(t,n))},[w,ye]),xe=function(n,t){return e.useMemo(()=>n.reduce((e,n)=>{const{sensor:r}=n;return[...e,...r.activators.map(e=>({eventName:e.eventName,handler:t(e.handler,n)}))]},[]),[n,t])}(l,Ce);!function(n){e.useEffect(()=>{if(!ys)return;const e=n.map(e=>{let{sensor:n}=e;return null==n.setup?void 0:n.setup()});return()=>{for(const n of e)null==n||n()}},n.map(e=>{let{sensor:n}=e;return n}))}(l),Ss(()=>{_&&C===pc.Initializing&&x(pc.Initialized)},[_,C]),e.useEffect(()=>{const{onDragMove:e}=V.current,{active:n,activatorEvent:t,collisions:r,over:i}=q.current;if(!n||!t)return;const o={active:n,activatorEvent:t,collisions:r,delta:{x:pe.x,y:pe.y},over:i};I.unstable_batchedUpdates(()=>{null==e||e(o),v({type:"onDragMove",event:o})})},[pe.x,pe.y]),e.useEffect(()=>{const{active:e,activatorEvent:n,collisions:t,droppableContainers:r,scrollAdjustedTranslate:i}=q.current;if(!e||null==G.current||!n||!i)return;const{onDragOver:o}=V.current,a=r.get(ge),s=a&&a.rect.current?{id:a.id,rect:a.rect.current,data:a.data,disabled:a.disabled}:null,u={active:e,activatorEvent:n,collisions:t,delta:{x:i.x,y:i.y},over:s};I.unstable_batchedUpdates(()=>{he(s),null==o||o(u),v({type:"onDragOver",event:u})})},[ge]),Ss(()=>{q.current={activatorEvent:P,active:D,activeNode:Y,collisionRect:fe,collisions:me,droppableRects:X,draggableNodes:w,draggingNode:K,draggingNodeRect:ee,droppableContainers:S,over:be,scrollableAncestors:oe,scrollAdjustedTranslate:pe},O.current={initial:ee,translated:fe}},[D,Y,me,fe,w,K,ee,X,S,be,oe,pe]),function(n){let{acceleration:t,activator:r=Xu.Pointer,canScroll:i,draggingRect:o,enabled:a,interval:s=5,order:u=Lu.TreeOrder,pointerCoordinates:c,scrollableAncestors:l,scrollableAncestorRects:d,delta:p,threshold:f}=n;const m=function(e){let{delta:n,disabled:t}=e;const r=ks(n);return Ds(e=>{if(t||!r||!e)return Zu;const i=Math.sign(n.x-r.x),o=Math.sign(n.y-r.y);return{x:{[gu.Backward]:e.x[gu.Backward]||-1===i,[gu.Forward]:e.x[gu.Forward]||1===i},y:{[gu.Backward]:e.y[gu.Backward]||-1===o,[gu.Forward]:e.y[gu.Forward]||1===o}}},[t,n,r])}({delta:p,disabled:!a}),[g,b]=function(){const n=e.useRef(null);return[e.useCallback((e,t)=>{n.current=setInterval(e,t)},[]),e.useCallback(()=>{null!==n.current&&(clearInterval(n.current),n.current=null)},[])]}(),h=e.useRef({x:0,y:0}),v=e.useRef({x:0,y:0}),I=e.useMemo(()=>{switch(r){case Xu.Pointer:return c?{top:c.y,bottom:c.y,left:c.x,right:c.x}:null;case Xu.DraggableRect:return o}},[r,o,c]),y=e.useRef(null),C=e.useCallback(()=>{const e=y.current;e&&e.scrollBy(h.current.x*v.current.x,h.current.y*v.current.y)},[]),x=e.useMemo(()=>u===Lu.TreeOrder?[...l].reverse():l,[u,l]);e.useEffect(()=>{if(a&&l.length&&I){for(const e of x){if(!1===(null==i?void 0:i(e)))continue;const n=l.indexOf(e),r=d[n];if(!r)continue;const{direction:o,speed:a}=Iu(e,r,I,t,f);for(const e of["x","y"])m[e][o[e]]||(a[e]=0,o[e]=0);if(a.x>0||a.y>0)return b(),y.current=e,g(C,s),h.current=a,void(v.current=o)}h.current={x:0,y:0},v.current={x:0,y:0},b()}else b()},[t,C,i,b,a,s,JSON.stringify(I),JSON.stringify(m),g,l,x,d,JSON.stringify(f)])}({...J,delta:R,draggingRect:fe,pointerCoordinates:ue,scrollableAncestors:oe,scrollableAncestorRects:ae});const Ae=e.useMemo(()=>({active:D,activeNode:Y,activeNodeRect:_,activatorEvent:P,collisions:me,containerNodeRect:U,dragOverlay:$,draggableNodes:w,droppableContainers:S,droppableRects:X,over:be,measureDroppableContainers:L,scrollableAncestors:oe,scrollableAncestorRects:ae,measuringConfiguration:F,measuringScheduled:Z,windowRect:ie}),[D,Y,_,P,me,U,$,w,S,X,be,L,oe,ae,F,Z,ie]),Ee=e.useMemo(()=>({activatorEvent:P,activators:xe,active:D,activeNodeRect:_,ariaDescribedById:{draggable:W},dispatch:h,draggableNodes:w,over:be,measureDroppableContainers:L}),[P,xe,D,_,h,W,w,be,L]);return T.default.createElement(zs.Provider,{value:y},T.default.createElement(ac.Provider,{value:Ee},T.default.createElement(sc.Provider,{value:Ae},T.default.createElement(dc.Provider,{value:ve},c)),T.default.createElement(lc,{disabled:!1===(null==s?void 0:s.restoreFocus)})),T.default.createElement(qs,{...s,hiddenTextDescribedById:W}))}),mc=/*#__PURE__*/e.createContext(null),gc="button",bc={timeout:25};function hc(e,n,t){const r=e.slice();return r.splice(t<0?r.length+t:t,0,r.splice(n,1)[0]),r}function vc(e,n){return e.reduce((e,t,r)=>{const i=n.get(t);return i&&(e[r]=i),e},Array(e.length))}function Ic(e){return null!==e&&e>=0}const yc=e=>{let{rects:n,activeIndex:t,overIndex:r,index:i}=e;const o=hc(n,r,t),a=n[i],s=o[i];return s&&a?{x:s.left-a.left,y:s.top-a.top,scaleX:s.width/a.width,scaleY:s.height/a.height}:null},Cc="Sortable",xc=/*#__PURE__*/T.default.createContext({activeIndex:-1,containerId:Cc,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:yc,disabled:{draggable:!1,droppable:!1}});function Ac(n){let{children:t,id:r,items:i,strategy:o=yc,disabled:a=!1}=n;const{active:s,dragOverlay:u,droppableRects:c,over:l,measureDroppableContainers:d}=e.useContext(sc),p=Ps(Cc,r),f=Boolean(null!==u.rect),m=e.useMemo(()=>i.map(e=>"object"==typeof e&&"id"in e?e.id:e),[i]),g=null!=s,b=s?m.indexOf(s.id):-1,h=l?m.indexOf(l.id):-1,v=e.useRef(m),I=!function(e,n){if(e===n)return!0;if(e.length!==n.length)return!1;for(let t=0;t<e.length;t++)if(e[t]!==n[t])return!1;return!0}(m,v.current),y=-1!==h&&-1===b||I,C=function(e){return"boolean"==typeof e?{draggable:e,droppable:e}:e}(a);Ss(()=>{I&&g&&d(m)},[I,m,g,d]),e.useEffect(()=>{v.current=m},[m]);const x=e.useMemo(()=>({activeIndex:b,containerId:p,disabled:C,disableTransforms:y,items:m,overIndex:h,useDragOverlay:f,sortedRects:vc(m,c),strategy:o}),[b,p,C.draggable,C.droppable,y,m,h,c,f,o]);return T.default.createElement(xc.Provider,{value:x},t)}const Ec=e=>{let{id:n,items:t,activeIndex:r,overIndex:i}=e;return hc(t,r,i).indexOf(n)},wc=e=>{let{containerId:n,isSorting:t,wasDragging:r,index:i,items:o,newIndex:a,previousItems:s,previousContainerId:u,transition:c}=e;return!(!c||!r||s!==o&&i===a||!t&&(a===i||n!==u))},Rc={duration:200,easing:"ease"},Tc="transform",Sc=/*#__PURE__*/Xs.Transition.toString({property:Tc,duration:0,easing:"linear"}),Nc={roleDescription:"sortable"};var Oc=function(n){var t=function(n){let{animateLayoutChanges:t=wc,attributes:r,disabled:i,data:o,getNewIndex:a=Ec,id:s,strategy:u,resizeObserverConfig:c,transition:l=Rc}=n;const{items:d,containerId:p,activeIndex:f,disabled:m,disableTransforms:g,sortedRects:b,overIndex:h,useDragOverlay:v,strategy:I}=e.useContext(xc),y=function(e,n){var t,r;return"boolean"==typeof e?{draggable:e,droppable:!1}:{draggable:null!=(t=null==e?void 0:e.draggable)?t:n.draggable,droppable:null!=(r=null==e?void 0:e.droppable)?r:n.droppable}}(i,m),C=d.indexOf(s),x=e.useMemo(()=>({sortable:{containerId:p,index:C,items:d},...o}),[p,o,C,d]),A=e.useMemo(()=>d.slice(d.indexOf(s)),[d,s]),{rect:E,node:w,isOver:R,setNodeRef:T}=function(n){let{data:t,disabled:r=!1,id:i,resizeObserverConfig:o}=n;const a=Ps("Droppable"),{active:s,dispatch:u,over:c,measureDroppableContainers:l}=e.useContext(ac),d=e.useRef({disabled:r}),p=e.useRef(!1),f=e.useRef(null),m=e.useRef(null),{disabled:g,updateMeasurementsFor:b,timeout:h}={...bc,...o},v=Os(null!=b?b:i),I=_u({callback:e.useCallback(()=>{p.current?(null!=m.current&&clearTimeout(m.current),m.current=setTimeout(()=>{l(Array.isArray(v.current)?v.current:[v.current]),m.current=null},h)):p.current=!0},[h]),disabled:g||!s}),y=e.useCallback((e,n)=>{I&&(n&&(I.unobserve(n),p.current=!1),e&&I.observe(e))},[I]),[C,x]=Gs(y),A=Os(t);return e.useEffect(()=>{I&&C.current&&(I.disconnect(),p.current=!1,I.observe(C.current))},[C,I]),e.useEffect(()=>(u({type:Qs.RegisterDroppable,element:{id:i,key:a,disabled:r,node:C,rect:f,data:A}}),()=>u({type:Qs.UnregisterDroppable,key:a,id:i})),[i]),e.useEffect(()=>{r!==d.current.disabled&&(u({type:Qs.SetDroppableDisabled,id:i,key:a,disabled:r}),d.current.disabled=r)},[i,a,r,u]),{active:s,rect:f,isOver:(null==c?void 0:c.id)===i,node:C,over:c,setNodeRef:x}}({id:s,data:x,disabled:y.droppable,resizeObserverConfig:{updateMeasurementsFor:A,...c}}),{active:S,activatorEvent:N,activeNodeRect:O,attributes:D,setNodeRef:G,listeners:k,isDragging:B,over:P,setActivatorNodeRef:M,transform:V}=function(n){let{id:t,data:r,disabled:i=!1,attributes:o}=n;const a=Ps("Draggable"),{activators:s,activatorEvent:u,active:c,activeNodeRect:l,ariaDescribedById:d,draggableNodes:p,over:f}=e.useContext(ac),{role:m=gc,roleDescription:g="draggable",tabIndex:b=0}=null!=o?o:{},h=(null==c?void 0:c.id)===t,v=e.useContext(h?dc:mc),[I,y]=Gs(),[C,x]=Gs(),A=function(n,t){return e.useMemo(()=>n.reduce((e,n)=>{let{eventName:r,handler:i}=n;return e[r]=e=>{i(e,t)},e},{}),[n,t])}(s,t),E=Os(r);return Ss(()=>(p.set(t,{id:t,key:a,node:I,activatorNode:C,data:E}),()=>{const e=p.get(t);e&&e.key===a&&p.delete(t)}),[p,t]),{active:c,activatorEvent:u,activeNodeRect:l,attributes:e.useMemo(()=>({role:m,tabIndex:b,"aria-disabled":i,"aria-pressed":!(!h||m!==gc)||void 0,"aria-roledescription":g,"aria-describedby":d.draggable}),[i,m,b,h,g,d.draggable]),isDragging:h,listeners:i?void 0:A,node:I,over:f,setNodeRef:y,setActivatorNodeRef:x,transform:v}}({id:s,data:x,attributes:{...Nc,...r},disabled:y.draggable}),W=function(){for(var n=arguments.length,t=new Array(n),r=0;r<n;r++)t[r]=arguments[r];return e.useMemo(()=>e=>{t.forEach(n=>n(e))},t)}(T,G),H=Boolean(S),F=H&&!g&&Ic(f)&&Ic(h),X=!v&&B,L=X&&F?V:null,Z=F?null!=L?L:(null!=u?u:I)({rects:b,activeNodeRect:O,activeIndex:f,overIndex:h,index:C}):null,Y=Ic(f)&&Ic(h)?a({id:s,items:d,activeIndex:f,overIndex:h}):C,j=null==S?void 0:S.id,J=e.useRef({activeId:j,items:d,newIndex:Y,containerId:p}),z=d!==J.current.items,_=t({active:S,containerId:p,isDragging:B,isSorting:H,id:s,index:C,items:d,newIndex:J.current.newIndex,previousItems:J.current.items,previousContainerId:J.current.containerId,transition:l,wasDragging:null!=J.current.activeId}),U=function(n){let{disabled:t,index:r,node:i,rect:o}=n;const[a,s]=e.useState(null),u=e.useRef(r);return Ss(()=>{if(!t&&r!==u.current&&i.current){const e=o.current;if(e){const n=su(i.current,{ignoreTransform:!0}),t={x:e.left-n.left,y:e.top-n.top,scaleX:e.width/n.width,scaleY:e.height/n.height};(t.x||t.y)&&s(t)}}r!==u.current&&(u.current=r)},[t,r,i,o]),e.useEffect(()=>{a&&s(null)},[a]),a}({disabled:!_,index:C,node:w,rect:E});return e.useEffect(()=>{H&&J.current.newIndex!==Y&&(J.current.newIndex=Y),p!==J.current.containerId&&(J.current.containerId=p),d!==J.current.items&&(J.current.items=d)},[H,Y,p,d]),e.useEffect(()=>{if(j===J.current.activeId)return;if(null!=j&&null==J.current.activeId)return void(J.current.activeId=j);const e=setTimeout(()=>{J.current.activeId=j},50);return()=>clearTimeout(e)},[j]),{active:S,activeIndex:f,attributes:D,data:x,rect:E,index:C,newIndex:Y,items:d,isOver:R,isSorting:H,isDragging:B,listeners:k,node:w,overIndex:h,over:P,setNodeRef:W,setActivatorNodeRef:M,setDroppableNodeRef:T,setDraggableNodeRef:G,transform:null!=U?U:Z,transition:U||z&&J.current.newIndex===C?Sc:X&&!Hs(N)||!l?void 0:H||_?Xs.Transition.toString({...l,property:Tc}):void 0}}({id:n.data.value}),r=t.attributes,i=t.listeners,o=t.setNodeRef,a=t.transition,s={display:"flex",transform:Xs.Transform.toString(t.transform),transition:a};return T.default.createElement("div",X({ref:o,style:s},r,i,{onPointerDown:function(e){e.target instanceof HTMLElement&&(["svg","path"].includes(e.target.nodeName)&&(e.preventDefault(),e.stopPropagation()),null==i||i.onPointerDown(e))}}),T.default.createElement(Ia.MultiValueContainer,X({},n)))},Dc=function(e){var n=X({},e.innerProps,{style:{cursor:"grab"},onMouseDown:function(e){e.preventDefault(),e.stopPropagation()}});return T.default.createElement(Ia.MultiValueLabel,X({},e,{innerProps:n}))},Gc={en:{translation:{"Are you sure you want to delete this widget?":"Are you sure you want to delete this widget?",Cancel:"Cancel",Delete:"Delete","filters.dayType.label":"Day type","filters.dayType.calendar":"Calendar","filters.dayType.production":"Production","filters.shifts.label":"Shifts","filters.shifts.allShifts":"All shifts","filters.dateRange.label":"Date range","filters.dateRange.from":"From","filters.dateRange.to":"To","filters.search.placeholder":"Search periods...","filters.search.noResults":"No periods found","filters.premium.indicator":"Premium","filters.periods.currentShift":"Current shift","filters.periods.lastShift":"Previous shift","filters.periods.today":"Today","filters.periods.yesterday":"Yesterday","filters.periods.last7Days":"Last 7 days","filters.periods.last14Days":"Last 14 days","filters.periods.last30Days":"Last 30 days","filters.periods.last90Days":"Last 90 days","filters.periods.last180Days":"Last 180 days","filters.periods.last365Days":"Last 365 days","filters.periods.currentWeek":"Current week","filters.periods.currentMonth":"Current month","filters.periods.currentQuarter":"Current quarter","filters.periods.currentYear":"Current year","filters.periods.previousWeek":"Previous week","filters.periods.previousMonth":"Previous month","filters.periods.previousQuarter":"Previous quarter","filters.periods.previousYear":"Previous year","filters.periods.last2Weeks":"Last 2 weeks","filters.periods.last4Weeks":"Last 4 weeks","filters.periods.last8Weeks":"Last 8 weeks","filters.periods.last12Weeks":"Last 12 weeks","filters.periods.last3Months":"Last 3 months","filters.periods.last6Months":"Last 6 months","filters.periods.last12Months":"Last 12 months","filters.periods.week":"Week {{week}}","filters.accessDenied.title":"Premium feature","filters.accessDenied.close":"Close"}},pl:{translation:{"Are you sure you want to delete this widget?":"Czy na pewno usunąć ten widżet?",Cancel:"Anuluj",Delete:"Usuń","filters.dayType.label":"Typ dnia","filters.dayType.calendar":"Kalendarzowy","filters.dayType.production":"Produkcyjny","filters.shifts.label":"Zmiany","filters.shifts.allShifts":"Wszystkie zmiany","filters.dateRange.label":"Zakres dat","filters.dateRange.from":"Od","filters.dateRange.to":"Do","filters.search.placeholder":"Szukaj okresów...","filters.search.noResults":"Nie znaleziono okresów","filters.premium.indicator":"Premium","filters.periods.currentShift":"Aktualna zmiana","filters.periods.lastShift":"Poprzednia zmiana","filters.periods.today":"Dzisiaj","filters.periods.yesterday":"Wczoraj","filters.periods.last7Days":"Ostatnie 7 dni","filters.periods.last14Days":"Ostatnie 14 dni","filters.periods.last30Days":"Ostatnie 30 dni","filters.periods.last90Days":"Ostatnie 90 dni","filters.periods.last180Days":"Ostatnie 180 dni","filters.periods.last365Days":"Ostatnie 365 dni","filters.periods.currentWeek":"Bieżący tydzień","filters.periods.currentMonth":"Bieżący miesiąc","filters.periods.currentQuarter":"Bieżący kwartał","filters.periods.currentYear":"Bieżący rok","filters.periods.previousWeek":"Poprzedni tydzień","filters.periods.previousMonth":"Poprzedni miesiąc","filters.periods.previousQuarter":"Poprzedni kwartał","filters.periods.previousYear":"Poprzedni rok","filters.periods.last2Weeks":"Ostatnie 2 tygodnie","filters.periods.last4Weeks":"Ostatnie 4 tygodnie","filters.periods.last8Weeks":"Ostatnie 8 tygodni","filters.periods.last12Weeks":"Ostatnie 12 tygodni","filters.periods.last3Months":"Ostatnie 3 miesiące","filters.periods.last6Months":"Ostatnie 6 miesięcy","filters.periods.last12Months":"Ostatnie 12 miesięcy","filters.periods.week":"Tydzień {{week}}","filters.accessDenied.title":"Funkcja Premium","filters.accessDenied.close":"Zamknij"}}},kc=Pi(function(e,n){var t,r,i,o="[object Map]",a="[object Promise]",s="[object Set]",u="[object WeakMap]",c="[object DataView]",l=/^\[object .+?Constructor\]$/,d="object"==typeof self&&self&&self.Object===Object&&self,p="object"==typeof ki&&ki&&ki.Object===Object&&ki||d||Function("return this")(),f=n&&!n.nodeType&&n,m=f&&e&&!e.nodeType&&e,g=m&&m.exports===f,b=Function.prototype,h=Object.prototype,v=p["__core-js_shared__"],I=(t=/[^.]+$/.exec(v&&v.keys&&v.keys.IE_PROTO||""))?"Symbol(src)_1."+t:"",y=b.toString,C=h.hasOwnProperty,x=h.toString,A=RegExp("^"+y.call(C).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),E=g?p.Buffer:void 0,w=h.propertyIsEnumerable,R=E?E.isBuffer:void 0,T=(r=Object.keys,i=Object,function(e){return r(i(e))}),S=H(p,"DataView"),N=H(p,"Map"),O=H(p,"Promise"),D=H(p,"Set"),G=H(p,"WeakMap"),k=!w.call({valueOf:1},"valueOf"),B=X(S),P=X(N),M=X(O),V=X(D),W=X(G);function H(e,n){var t=function(e,n){return null==e?void 0:e[n]}(e,n);return function(e){if(!J(e)||function(e){return!!I&&I in e}(e))return!1;var n=j(e)||function(e){var n=!1;if(null!=e&&"function"!=typeof e.toString)try{n=!!(e+"")}catch(e){}return n}(e)?A:l;return n.test(X(e))}(t)?t:void 0}var F=function(e){return x.call(e)};function X(e){if(null!=e){try{return y.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(S&&F(new S(new ArrayBuffer(1)))!=c||N&&F(new N)!=o||O&&F(O.resolve())!=a||D&&F(new D)!=s||G&&F(new G)!=u)&&(F=function(e){var n=x.call(e),t="[object Object]"==n?e.constructor:void 0,r=t?X(t):void 0;if(r)switch(r){case B:return c;case P:return o;case M:return a;case V:return s;case W:return u}return n});var L=Array.isArray;function Z(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}(e.length)&&!j(e)}var Y=R||function(){return!1};function j(e){var n=J(e)?x.call(e):"";return"[object Function]"==n||"[object GeneratorFunction]"==n}function J(e){var n=typeof e;return!!e&&("object"==n||"function"==n)}e.exports=function(e){if(Z(e)&&(L(e)||"string"==typeof e||"function"==typeof e.splice||Y(e)||function(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&Z(e)}(e)&&C.call(e,"callee")&&(!w.call(e,"callee")||"[object Arguments]"==x.call(e))}(e)))return!e.length;var n=F(e);if(n==o||n==s)return!e.size;if(k||function(e){var n=e&&e.constructor;return e===("function"==typeof n&&n.prototype||h)}(e))return!T(e).length;for(var t in e)if(C.call(e,t))return!1;return!0}}),Bc=function(e,n){return Bc=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var t in n)n.hasOwnProperty(t)&&(e[t]=n[t])},Bc(e,n)};function Pc(e,n){function t(){this.constructor=e}Bc(e,n),e.prototype=null===n?Object.create(n):(t.prototype=n.prototype,new t)}function Mc(e){return"function"==typeof e}var Vc=!1,Wc={Promise:void 0,set useDeprecatedSynchronousErrorHandling(e){Vc=e},get useDeprecatedSynchronousErrorHandling(){return Vc}};function Hc(e){setTimeout(function(){throw e},0)}var Fc={closed:!0,next:function(e){},error:function(e){if(Wc.useDeprecatedSynchronousErrorHandling)throw e;Hc(e)},complete:function(){}},Xc=/*@__PURE__*/function(){return Array.isArray||function(e){return e&&"number"==typeof e.length}}();function Lc(e){return null!==e&&"object"==typeof e}var Zc=/*@__PURE__*/function(){function e(e){return Error.call(this),this.message=e?e.length+" errors occurred during unsubscription:\n"+e.map(function(e,n){return n+1+") "+e.toString()}).join("\n "):"",this.name="UnsubscriptionError",this.errors=e,this}return e.prototype=/*@__PURE__*/Object.create(Error.prototype),e}(),Yc=Zc,jc=/*@__PURE__*/function(){function e(e){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,e&&(this._ctorUnsubscribe=!0,this._unsubscribe=e)}return e.prototype.unsubscribe=function(){var n;if(!this.closed){var t=this,r=t._parentOrParents,i=t._ctorUnsubscribe,o=t._unsubscribe,a=t._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,r instanceof e)r.remove(this);else if(null!==r)for(var s=0;s<r.length;++s)r[s].remove(this);if(Mc(o)){i&&(this._unsubscribe=void 0);try{o.call(this)}catch(e){n=e instanceof Yc?Jc(e.errors):[e]}}if(Xc(a)){s=-1;for(var u=a.length;++s<u;){var c=a[s];if(Lc(c))try{c.unsubscribe()}catch(e){n=n||[],e instanceof Yc?n=n.concat(Jc(e.errors)):n.push(e)}}}if(n)throw new Yc(n)}},e.prototype.add=function(n){var t=n;if(!n)return e.EMPTY;switch(typeof n){case"function":t=new e(n);case"object":if(t===this||t.closed||"function"!=typeof t.unsubscribe)return t;if(this.closed)return t.unsubscribe(),t;if(!(t instanceof e)){var r=t;(t=new e)._subscriptions=[r]}break;default:throw new Error("unrecognized teardown "+n+" added to Subscription.")}var i=t._parentOrParents;if(null===i)t._parentOrParents=this;else if(i instanceof e){if(i===this)return t;t._parentOrParents=[i,this]}else{if(-1!==i.indexOf(this))return t;i.push(this)}var o=this._subscriptions;return null===o?this._subscriptions=[t]:o.push(t),t},e.prototype.remove=function(e){var n=this._subscriptions;if(n){var t=n.indexOf(e);-1!==t&&n.splice(t,1)}},e.EMPTY=function(e){return e.closed=!0,e}(new e),e}();function Jc(e){return e.reduce(function(e,n){return e.concat(n instanceof Yc?n.errors:n)},[])}var zc=/*@__PURE__*/function(){return"function"==typeof Symbol?/*@__PURE__*/Symbol("rxSubscriber"):"@@rxSubscriber_"+/*@__PURE__*/Math.random()}(),_c=/*@__PURE__*/function(e){function n(t,r,i){var o=e.call(this)||this;switch(o.syncErrorValue=null,o.syncErrorThrown=!1,o.syncErrorThrowable=!1,o.isStopped=!1,arguments.length){case 0:o.destination=Fc;break;case 1:if(!t){o.destination=Fc;break}if("object"==typeof t){t instanceof n?(o.syncErrorThrowable=t.syncErrorThrowable,o.destination=t,t.add(o)):(o.syncErrorThrowable=!0,o.destination=new Uc(o,t));break}default:o.syncErrorThrowable=!0,o.destination=new Uc(o,t,r,i)}return o}return Pc(n,e),n.prototype[zc]=function(){return this},n.create=function(e,t,r){var i=new n(e,t,r);return i.syncErrorThrowable=!1,i},n.prototype.next=function(e){this.isStopped||this._next(e)},n.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},n.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},n.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this))},n.prototype._next=function(e){this.destination.next(e)},n.prototype._error=function(e){this.destination.error(e),this.unsubscribe()},n.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},n.prototype._unsubscribeAndRecycle=function(){var e=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=e,this},n}(jc),Uc=/*@__PURE__*/function(e){function n(n,t,r,i){var o,a=e.call(this)||this;a._parentSubscriber=n;var s=a;return Mc(t)?o=t:t&&(o=t.next,r=t.error,i=t.complete,t!==Fc&&(Mc((s=Object.create(t)).unsubscribe)&&a.add(s.unsubscribe.bind(s)),s.unsubscribe=a.unsubscribe.bind(a))),a._context=s,a._next=o,a._error=r,a._complete=i,a}return Pc(n,e),n.prototype.next=function(e){if(!this.isStopped&&this._next){var n=this._parentSubscriber;Wc.useDeprecatedSynchronousErrorHandling&&n.syncErrorThrowable?this.__tryOrSetError(n,this._next,e)&&this.unsubscribe():this.__tryOrUnsub(this._next,e)}},n.prototype.error=function(e){if(!this.isStopped){var n=this._parentSubscriber,t=Wc.useDeprecatedSynchronousErrorHandling;if(this._error)t&&n.syncErrorThrowable?(this.__tryOrSetError(n,this._error,e),this.unsubscribe()):(this.__tryOrUnsub(this._error,e),this.unsubscribe());else if(n.syncErrorThrowable)t?(n.syncErrorValue=e,n.syncErrorThrown=!0):Hc(e),this.unsubscribe();else{if(this.unsubscribe(),t)throw e;Hc(e)}}},n.prototype.complete=function(){var e=this;if(!this.isStopped){var n=this._parentSubscriber;if(this._complete){var t=function(){return e._complete.call(e._context)};Wc.useDeprecatedSynchronousErrorHandling&&n.syncErrorThrowable?(this.__tryOrSetError(n,t),this.unsubscribe()):(this.__tryOrUnsub(t),this.unsubscribe())}else this.unsubscribe()}},n.prototype.__tryOrUnsub=function(e,n){try{e.call(this._context,n)}catch(e){if(this.unsubscribe(),Wc.useDeprecatedSynchronousErrorHandling)throw e;Hc(e)}},n.prototype.__tryOrSetError=function(e,n,t){if(!Wc.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{n.call(this._context,t)}catch(n){return Wc.useDeprecatedSynchronousErrorHandling?(e.syncErrorValue=n,e.syncErrorThrown=!0,!0):(Hc(n),!0)}return!1},n.prototype._unsubscribe=function(){var e=this._parentSubscriber;this._context=null,this._parentSubscriber=null,e.unsubscribe()},n}(_c),qc=/*@__PURE__*/function(){return"function"==typeof Symbol&&Symbol.observable||"@@observable"}();function Qc(e){return e}var $c=/*@__PURE__*/function(){function e(e){this._isScalar=!1,e&&(this._subscribe=e)}return e.prototype.lift=function(n){var t=new e;return t.source=this,t.operator=n,t},e.prototype.subscribe=function(e,n,t){var r=this.operator,i=function(e,n,t){if(e){if(e instanceof _c)return e;if(e[zc])return e[zc]()}return e||n||t?new _c(e,n,t):new _c(Fc)}(e,n,t);if(i.add(r?r.call(i,this.source):this.source||Wc.useDeprecatedSynchronousErrorHandling&&!i.syncErrorThrowable?this._subscribe(i):this._trySubscribe(i)),Wc.useDeprecatedSynchronousErrorHandling&&i.syncErrorThrowable&&(i.syncErrorThrowable=!1,i.syncErrorThrown))throw i.syncErrorValue;return i},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(n){Wc.useDeprecatedSynchronousErrorHandling&&(e.syncErrorThrown=!0,e.syncErrorValue=n),function(e){for(;e;){var n=e.destination;if(e.closed||e.isStopped)return!1;e=n&&n instanceof _c?n:null}return!0}(e)?e.error(n):console.warn(n)}},e.prototype.forEach=function(e,n){var t=this;return new(n=Kc(n))(function(n,r){var i;i=t.subscribe(function(n){try{e(n)}catch(e){r(e),i&&i.unsubscribe()}},r,n)})},e.prototype._subscribe=function(e){var n=this.source;return n&&n.subscribe(e)},e.prototype[qc]=function(){return this},e.prototype.pipe=function(){for(var e,n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];return 0===n.length?this:(0===(e=n).length?Qc:1===e.length?e[0]:function(n){return e.reduce(function(e,n){return n(e)},n)})(this)},e.prototype.toPromise=function(e){var n=this;return new(e=Kc(e))(function(e,t){var r;n.subscribe(function(e){return r=e},function(e){return t(e)},function(){return e(r)})})},e.create=function(n){return new e(n)},e}();function Kc(e){if(e||(e=Wc.Promise||Promise),!e)throw new Error("no Promise impl found");return e}var el=/*#__PURE__*/function(){function e(e){var n=this;this.wsURL=void 0,this.cable=null,this.subscriptions=new Map,this.addSubscription=function(e,t){n.subscriptions.set(e,t)},this.wsURL=e}var n=e.prototype;return n.connect=function(e,n){this.cable=H.default.createConsumer(this.wsURL+"?token="+e+"&lang="+n)},n.request=function(e){var n,t=this.cable,r=this.subscriptions,i=this.addSubscription;return new $c(function(o){if(t){var a,s=(null==(a=e.variables)?void 0:a.id)||"company";r.has(s)||(n=t.subscriptions.create({channel:"GraphqlChannel",channelId:Math.round(Date.now()+1e5*Math.random()).toString(16)},{connected:function(){this.perform("execute",e)},received:function(e){e.more?e.result.errors?o.error&&o.error(e.result.errors[0]):e.result.data&&o.next&&(kc(e.result.data)||o.next(e.result)):o.complete&&o.complete()}}),i(s,n))}})},n.hasSubscription=function(e){return this.subscriptions.has(e)},e}(),nl=/*#__PURE__*/function(){function e(e,n,t){this.actionCableClient=null,this.actionCableClient=new el(e),this.actionCableClient.connect(n,t)}return e.prototype.subscribe=function(e,n,t,r){if(void 0===r&&(r=function(e){throw e}),!this.actionCableClient)throw new Error("No WS client available");var i=this.actionCableClient.request({query:e,variables:n}).subscribe({next:function(e){var n=e.data,i=e.errors;if(i)return r(new Error(JSON.stringify(i)));n&&t&&t(function(e){var n=Object.keys(e);if(1!==n.length)throw new Error("Expected exactly one response key, got: "+n.join(", "));return e[n[0]]}(n))}});return function(){return i.unsubscribe()}},e}(),tl=function(e,n,t){return new nl(e,n,t)},rl=function(e,n){return ti(new A.GraphQLClient(e,{fetch:n}))},il=function(n){var t,r=n.url,o=n.wsUrl,a=n.lang,s=i.useStore().sessionStore,u=e.useState(),c=u[0],l=u[1],d=e.useState(),p=d[0],f=d[1],m=o||r.replace("graphql","cable"),g=(null==(t=s.loginStatus.authResponse)?void 0:t.accessToken)||"";return e.useEffect(function(){r&&l(rl(r,i.fetch))},[r]),e.useEffect(function(){r&&g&&f(tl(m||r.replace("graphql","cable"),g,a))},[r,m,g,a]),{graphqlSdk:c,gqlWsClient:p}},ol={root:{boxShadow:"none","& .react-resizable-handle":{width:"24px",height:"24px",borderRadius:"4px",background:function(e){return e.palette.primary.main+" url("+F.default+")"},backgroundRepeat:"no-repeat",backgroundSize:"50%",backgroundPosition:"50%","&:hover":{backgroundColor:function(e){return e.palette.primary.dark}}},"& .react-resizable-handle:after":{display:"none"}},header:{height:"40px"},dragIcon:{width:"30px",height:"30px",marginLeft:function(e){return"-"+e.spacing(1)},padding:"8px",borderRadius:"4px",background:function(e){return e.palette.primary.main},"&:hover":{cursor:"move",background:function(e){return e.palette.primary.dark}}},actionButtons:{height:"30px",marginTop:"-7px"},settingsButton:{color:"rgba(255, 255, 255, 0.45)",borderRadius:"4px",borderTopRightRadius:0,borderBottomRightRadius:0,borderColor:"rgba(255,255,255,0.1)",background:"rgba(255,255,255,0.1)","&:focus":{boxShadow:"0 0 0 1px rgba(255, 255, 255, 0.1)"},"&:hover":{opacity:.8}},infoButton:{marginLeft:"1px",color:"rgba(255, 255, 255, 0.45)",borderRadius:0,borderColor:"rgba(255,255,255,0.1)",background:"rgba(255,255,255,0.1)","&:focus":{boxShadow:"0 0 0 1px rgba(255, 255, 255, 0.1)"},"&:hover":{opacity:.8}},deleteButton:{marginLeft:"1px",color:"rgba(255, 255, 255, 0.45)",borderRadius:"4px",borderTopLeftRadius:0,borderBottomLeftRadius:0,borderColor:"rgba(255,255,255,0.1)",background:"rgba(255,255,255,0.1)","&:focus":{boxShadow:"0 0 0 1px rgba(255, 255, 255, 0.1)"},"&:hover":{opacity:.8}},content:{height:"calc(100% - 40px)",padding:0,background:"transparent",border:"1px solid rgba(255, 255, 255, 0.2)",borderTop:"none",borderRadius:"4px",boxShadow:"0px 4px 8px rgba(0, 0, 0, 0.25)","&:last-child":{paddingBottom:0}}},al=["children","title","Widget","id","url","wsUrl","lang","data","filters","settings","openSettingsModal","onSettingsModalOpened","onSettingsModalClosed","sidePanelOpened","updateSidePanelProps","onDelete","editMode","version","requiredFeatures","extraPermissions"];function sl(e,n){try{var t=e()}catch(e){return n(e)}return t&&t.then?t.then(void 0,n):t}var ul=T.default.forwardRef(function(r,o){var a=r.children,s=r.title,u=r.Widget,c=r.id,l=r.url,d=r.wsUrl,p=r.lang,f=r.data,m=r.filters,g=r.settings,b=r.openSettingsModal,h=r.onSettingsModalOpened,v=r.onSettingsModalClosed,I=r.sidePanelOpened,x=r.updateSidePanelProps,A=r.onDelete,E=r.editMode,w=r.version,R=r.requiredFeatures,S=r.extraPermissions,N=L(r,al),O=il({url:l,wsUrl:d,lang:p}).graphqlSdk,D=i.useAccess(R,{extraPermissions:S}).hasAccess,G=e.useState(!1),k=G[0],B=G[1],P=e.useState(!1),M=P[0],V=P[1],W=t.useTranslation(),H=W.i18n,F=W.t;return e.useEffect(function(){for(var e="translation",n=0,t=Object.entries(Gc);n<t.length;n++){var r=t[n];H.addResources(r[0],e,r[1][e])}},[H]),T.default.createElement(n.Card,X({ref:o,sx:ol.root},N),T.default.createElement(n.CardHeader,{avatar:E&&T.default.createElement(n.SvgIcon,{component:C.ReactComponent,className:"draggable-handle",sx:ol.dragIcon,inheritViewBox:!0}),title:s,titleTypographyProps:{variant:"subtitle1"},action:E&&T.default.createElement(n.Stack,{direction:"row",sx:ol.actionButtons},T.default.createElement(n.Button,{color:"secondary",sx:ol.settingsButton,onClick:function(){h&&h()},disabled:!D},T.default.createElement(y.Settings,null)),w&&T.default.createElement(T.default.Fragment,null,T.default.createElement(n.Tooltip,{title:w},T.default.createElement(n.Button,{color:"secondary",sx:ol.infoButton},T.default.createElement(y.Info,null)))),T.default.createElement(J,{open:M,confirmMessage:F("Are you sure you want to delete this widget?"),confirmButtonText:F("Delete"),cancelButtonText:F("Cancel"),onCancel:function(){return V(!1)},onConfirm:function(){try{var e=function(){B(!1)};B(!0),V(!1);var n=function(){if(A)return Promise.resolve(A()).then(function(){})}();return Promise.resolve(n&&n.then?n.then(e):e())}catch(e){return Promise.reject(e)}}},T.default.createElement(n.Button,{color:"secondary",sx:ol.deleteButton,onClick:function(e){e.stopPropagation(),V(!0)},disabled:k},T.default.createElement(y.Delete,null)))),sx:ol.header}),T.default.createElement(n.CardContent,{sx:ol.content},T.default.createElement(i.AccessGuard,{features:R,extraPermissions:S,onTrialRequest:function(e){try{return Promise.resolve(sl(function(){return Promise.resolve(null==O?void 0:O.startTrial({input:{featureKey:e}})).then(function(){return Promise.resolve(i.refreshUserData()).then(function(){return!0})})},function(e){return console.error("Failed to start trial:",e),!1}))}catch(e){return Promise.reject(e)}},onFeatureRequest:function(e){var n=e.featureKey,t=e.requestType,r=e.workplaceId;try{return Promise.resolve(sl(function(){return Promise.resolve(null==O?void 0:O.requestFeatureAccess({input:{featureKey:n,requestType:t.toUpperCase(),workplaceId:r}})).then(function(){return Promise.resolve(i.refreshUserData()).then(function(){return!0})})},function(e){return console.error("Failed to request feature access:",e),!1}))}catch(e){return Promise.reject(e)}}},T.default.createElement(u,{id:c,url:l,wsUrl:d,lang:p,data:f,filters:m,settings:g,openSettingsModal:b,onSettingsModalOpened:h,onSettingsModalClosed:v,sidePanelOpened:I,updateSidePanelProps:x,editMode:E}))),E&&a)});exports.ActualStaffingCountsDocument=pr,exports.ApplicationInfoDocument=fr,exports.AssignOperatorDocument=jr,exports.AssignOperatorToWorkplaceDocument=Vt,exports.AvailabilityInsightsDocument=mr,exports.BulkUpsertStaffingPlansDocument=Wt,exports.CompanyConfigDocument=gr,exports.ConfirmTooltip=J,exports.CounterDirectoriesDocument=br,exports.CountersDocument=hr,exports.CreateDashboardDocument=Ht,exports.CreateOrderDocument=Ft,exports.CreateProductDocument=Xt,exports.CreateStaffingPlanDocument=Lt,exports.CreateStatusChangeDocument=Zt,exports.CreateUserPresenceDocument=Yt,exports.CreateWidgetDocument=jt,exports.CurrentUserDocument=vr,exports.DashboardFilters=function(r){var o=r.initialValues,a=r.onChange,s=r.shifts,u=r.onFeatureRequest,c=e.useState(function(){return null!=o?o:{dayType:exports.DayType.Production,dateRange:(e=O.default().format("YYYY-MM-DD"),{from:e+"T00:00:00",to:e+"T23:59:59"}),shiftIds:[]};var e}),l=c[0],d=c[1],p=e.useState(function(){return null==o?void 0:o.selectedPeriodId}),f=p[0],m=p[1];e.useEffect(function(){null!=o&&o.selectedPeriodId&&m(o.selectedPeriodId)},[null==o?void 0:o.selectedPeriodId]);var g=e.useState(!1),b=g[0],h=g[1],v=e.useState(!1),I=v[0],y=v[1],C=e.useRef(null),x=i.useAccess([Gi]),A=x.hasAccess,E=x.accessState,w=x.buttons,R=x.cooldownInfo,S=x.features,D=e.useMemo(function(){var e,n=S.find(function(e){return e.featureKey===Gi});return null!=(e=null==n?void 0:n.daysSinceExpiry)?e:null},[S]),G=e.useMemo(function(){return w.filter(function(e){return"start_trial"!==e.action})},[w]);e.useEffect(function(){if(f){var e=fi.find(function(e){return e.id===f});if(e){var n=e.calculate({dayType:l.dayType,shifts:s,selectedShiftIds:l.shiftIds});d(function(e){return X({},e,{dateRange:n,selectedPeriodId:f})}),a(X({},l,{dateRange:n,selectedPeriodId:f}))}}},[l.dayType,l.shiftIds,s,f]),e.useEffect(function(){if(f){var e=hi(f,{dayType:l.dayType,shifts:s,selectedShiftIds:l.shiftIds});if(e){var n=e.getTime()-Date.now(),t=function(){var e=fi.find(function(e){return e.id===f});if(e){var n=e.calculate({dayType:l.dayType,shifts:s,selectedShiftIds:l.shiftIds});d(function(e){return X({},e,{dateRange:n,selectedPeriodId:f})}),a(X({},l,{dateRange:n,selectedPeriodId:f}))}};if(!(n<=0)){var r=setTimeout(t,n);return function(){return clearTimeout(r)}}t()}}},[f,l.dayType,l.shiftIds,s]);var k,B,P,M=t.useTranslation().t,V=e.useCallback(function(e){var n=X({},l,{dayType:e});d(n),a(n)},[l,a]),W=e.useCallback(function(e){var n=X({},l,{shiftIds:e});d(n),a(n)},[l,a]),H=e.useCallback(function(e){m(void 0);var n=X({},l,{dateRange:e,selectedPeriodId:void 0});d(n),a(n)},[l,a]),F=e.useCallback(function(e,n){if(!e.needAccess||A){m(e.id);var t=X({},l,{dateRange:n,selectedPeriodId:e.id});d(t),a(t)}else h(!0)},[l,A,a]),L=e.useCallback(function(){h(!1)},[]),Z=e.useCallback(function(){h(!0)},[]),Y=e.useCallback(function(){y(!0)},[]),j=e.useCallback(function(){y(!1)},[]);return T.default.createElement(n.Box,{sx:Di.container},T.default.createElement(n.Stack,{direction:"row",spacing:2,alignItems:"center"},T.default.createElement(n.TextField,{ref:C,label:M("filters.dateRange.label"),value:(k=l.dateRange,B=O.default(k.from).format("YYYY-MM-DD"),P=O.default(k.to).format("YYYY-MM-DD"),B===P?B:B+" - "+P),onClick:Y,size:"small",InputProps:{readOnly:!0,startAdornment:T.default.createElement(n.InputAdornment,{position:"start"},T.default.createElement(N.default,{sx:{fontSize:16}}))},sx:Di.dateField}),T.default.createElement(Oi,{shifts:s,selectedShiftIds:l.shiftIds,onChange:W})),T.default.createElement(n.Popover,{open:I,anchorEl:C.current,onClose:j,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},sx:Di.popover},T.default.createElement(n.Box,{sx:Di.popoverContent},T.default.createElement(Si,{dateRange:l.dateRange,dayType:l.dayType,shifts:s,selectedShiftIds:l.shiftIds,hasAccess:A,selectedPeriodId:f,onDayTypeChange:V,onDateRangeChange:H,onPeriodSelect:F,onAccessDenied:Z}))),T.default.createElement(Ii,{open:b,onClose:L,accessState:E,buttons:G,daysSinceExpiry:D,cooldownInfo:R,onFeatureRequest:u}))},exports.DashboardsDocument=Ir,exports.DepartmentsDocument=yr,exports.FloorPlansDocument=Cr,exports.GetWorkplacePerformanceInsightsDocument=zr,exports.GraphqlWsClient=nl,exports.ListActualStaffingCountsDocument=_r,exports.ListStaffingPlansDocument=Ur,exports.ListStatusChangesDocument=qr,exports.ListWorkOrdersDocument=Qr,exports.ListWorkplaceAssignmentsDocument=$r,exports.ListWorkplacesDocument=Kr,exports.MetricCard=function(e){var r=e.title,i=e.metricLabel,o=e.metricValue,a=e.extraValue,s=e.animateBackgroundColor,u=e.rounded,c=L(e,Fi),l=t.useTranslation().t,d=function(e){return{card:X({position:"relative",width:"100%",height:"100%"},e.showBgPattern&&{mixBlendMode:"hard-light",background:"url("+W.default+"), linear-gradient(329.66deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.75) 100%)",backgroundSize:"cover"},e.card.rounded?{borderRadius:"4px"}:{borderTopLeftRadius:0,borderTopRightRadius:0}),cardOverlay:X({position:"absolute",top:0,left:0,width:"100%",height:"100%",zIndex:-1},e.showBgPattern&&{mixBlendMode:"hard-light"},e.card.rounded?{borderRadius:"4px"}:{borderTopLeftRadius:0,borderTopRightRadius:0},e.cardOverlay,{animation:e.animateBackgroundColor?(t=e.backgroundColor,v.keyframes(Mi||(Mi=Z(["\n 0% {\n background: ",";\n }\n\n 50% {\n background: ",";\n }\n\n 100% {\n background: ",";\n }\n"])),Hi(t,.5),Hi(t,1),Hi(t,.5))+" 3s infinite"):"none"}),cardHeader:{height:"3em",color:"#090B0E",borderBottom:"1px solid rgba(0, 0, 0, 0.1)",background:"rgba(0, 0, 0, 0.05)","& span":{lineHeight:"3em",fontSize:"1em",fontWeight:500}},cardContent:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"80%",minWidth:"auto",minHeight:"auto",maxWidth:"none",background:"transparent","& > img":{flexBasis:"25%",minWidth:"125px",maxWidth:"25%"}},cardLabel:{width:"100%",lineHeight:"2.5em",fontSize:"1.8em",fontWeight:700,whiteSpace:"nowrap",overflow:"hidden",textAlign:"center",textOverflow:"ellipsis",color:"#090B0E"},cardValue:{lineHeight:"1.2em",textAlign:"center",fontSize:"1.6em",fontWeight:700,color:n.lighten("#090B0E",.15)},cardExtra:{lineHeight:"4em",textAlign:"center",fontSize:"1em",fontWeight:600,color:"#090B0E"}};var t}({card:{rounded:u},cardOverlay:{background:function(){var e=null==o?void 0:o.statusColor;if(e)switch(e){case exports.AndonLightColor.Green:return"linear-gradient(180deg, #31BF59 0%, #32D74B 100%)";case exports.AndonLightColor.Yellow:return"linear-gradient(360deg, #FFD60A 0%, #FFC12F 100%)";case exports.AndonLightColor.Red:return"linear-gradient(0deg, #F05C53 0%, #FF3B2F 100%)";default:return"rgba(187, 187, 187, 0.75)"}return"rgba(255, 255, 255, 0.75)"}()},showBgPattern:!0,backgroundColor:function(){var e=null==o?void 0:o.statusColor;if(e)switch(e){case exports.AndonLightColor.Green:return"#32D74B";case exports.AndonLightColor.Yellow:return"#FFC12F";case exports.AndonLightColor.Red:return"#FF3B2F";default:return"#BBBBBBBF"}return"#FFFFFFBF"}(),animateBackgroundColor:s});return T.default.createElement(n.Card,X({sx:d.card},c),T.default.createElement(n.Box,{sx:d.cardOverlay}),T.default.createElement(n.CardHeader,{title:T.default.createElement(Wi,{line:1,text:r}),sx:d.cardHeader}),T.default.createElement(n.CardContent,{sx:d.cardContent},T.default.createElement(n.Typography,{sx:d.cardLabel},i),T.default.createElement(n.Typography,{sx:d.cardValue},o?function(e){var n=e.textValue;if(n){var t=O.default.duration(Number(n),"seconds");return Math.floor(t.asMinutes())+"m "+t.seconds()+"s"}return""}(o):T.default.createElement(t.Trans,{t:l},"No value for the selected metric")),a&&T.default.createElement(n.Typography,{sx:d.cardExtra},a)))},exports.MetricValuesDocument=xr,exports.MetricsDocument=Ar,exports.NotificationsDocument=Er,exports.OrdersDocument=wr,exports.OrdersExecutionsDocument=Rr,exports.PauseOrderExecutionDocument=Jt,exports.ProductionInsightsDocument=Tr,exports.ProductsDocument=Sr,exports.ReasonsDocument=Nr,exports.ReasonsRecommendationDocument=Or,exports.RemoveDashboardDocument=zt,exports.RemoveStaffingPlanDocument=_t,exports.RemoveUserPresenceDocument=Ut,exports.RemoveWidgetDocument=qt,exports.RemoveWorkplaceUsersPresencesDocument=Qt,exports.RequestFeatureAccessDocument=$t,exports.SetCounterDocument=Kt,exports.ShiftsDocument=Dr,exports.SortableSelect=function(e){var n=e.options,t=e.selected,r=e.onChange,i=function(e){var n,i,o,a=e.active,s=e.over;if(a.id!==(null==s?void 0:s.id)){var u=t.findIndex(function(e){return e===a.id}),c=t.findIndex(function(e){return e===(null==s?void 0:s.id)});r((n=t,i=u,o=c,function(e,n,t){const r=n<0?e.length+n:n;if(r>=0&&r<e.length){const r=t<0?e.length+t:t,[i]=e.splice(n,1);e.splice(r,0,i)}}(n=[...n],i,o),n))}};return T.default.createElement(Is,{placeholder:e.placeholder,isMulti:!0,options:n,value:t.map(function(e){return n.find(function(n){return n.value===e})}),onChange:function(e){return r([].concat(e||[]).map(function(e){return e.value}))},closeMenuOnSelect:!1,components:{MultiValueContainer:Oc,MultiValueLabel:Dc,ValueContainer:function(e){return T.default.createElement(fc,{onDragEnd:i},T.default.createElement(Ac,{items:t},e.children))}},styles:{control:function(e,n){return X({},e,{padding:"6px 0 6px 8px",borderColor:"rgba(255, 255, 255, 0.15)",background:"#1C1F25"},n.isFocused&&{borderColor:"#4E5A67",boxShadow:"none"},{"&:hover":{borderColor:"#4E5A67",boxShadow:"none"}})},menu:function(e){return X({},e,{background:"#1C1F25"})},option:function(e,n){return X({},e,{background:n.isFocused?"#2A2E34":"#1C1F25"})}}})},exports.StaffingPlansDocument=Gr,exports.StandardRatesDocument=kr,exports.StartOrderExecutionDocument=er,exports.StartTrialDocument=nr,exports.StatusChangeTransitionPermissionsDocument=Br,exports.StatusChangesDocument=Pr,exports.StopOrderExecutionDocument=tr,exports.UnassignOperatorDocument=Jr,exports.UnassignOperatorFromWorkplaceDocument=rr,exports.UpdateDashboardDocument=ir,exports.UpdateNotificationDocument=or,exports.UpdateOrderDocument=ar,exports.UpdateOrderExecutionDocument=sr,exports.UpdateStaffingPlanDocument=ur,exports.UpdateStatusChangeDocument=cr,exports.UpdateWidgetDocument=lr,exports.UpdateWorkOrderDocument=dr,exports.UsersDocument=Mr,exports.UsersPresencesDocument=Vr,exports.WidgetCard=ul,exports.WidgetDocument=Wr,exports.WidgetsDocument=Hr,exports.WorkOrdersDocument=Fr,exports.WorkOrdersInsightsDocument=Xr,exports.WorkplaceAssignmentsDocument=Lr,exports.WorkplaceEventDocument=ei,exports.WorkplacePerformanceInsightsDocument=Zr,exports.WorkplacesDocument=Yr,exports.findPeriodById=function(e){return fi.find(function(n){return n.id===e})},exports.generateTimeRange=function(e,n,t,r){for(var i=[],o=e,a=e.isAfter(n);a?o.isAfter(n)||o.isSame(n):o.isBefore(n)||o.isSame(n);)i.push(o),o=a?o.subtract(r,t):o.add(r,t);return i},exports.getCurrentShift=oi,exports.getGqlWsClient=tl,exports.getGraphqlSdk=rl,exports.getNextBoundary=hi,exports.getRecentShift=ai,exports.getSdk=ti,exports.getShiftTimeRange=gi,exports.getTimeRangeLabel=mi,exports.normalizeShifts=ii,exports.periods=fi,exports.useGqlClients=il,exports.version="1.5.19";
|
|
16
16
|
//# sourceMappingURL=index.js.map
|