tocco-legacy-bundle 0.1.13 → 0.1.14

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.
@@ -61,7 +61,7 @@ object-assign
61
61
  * LICENSE file in the root directory of this source tree.
62
62
  */var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,o=n?Symbol.for("react.portal"):60106,i=n?Symbol.for("react.fragment"):60107,a=n?Symbol.for("react.strict_mode"):60108,c=n?Symbol.for("react.profiler"):60114,s=n?Symbol.for("react.provider"):60109,u=n?Symbol.for("react.context"):60110,l=n?Symbol.for("react.async_mode"):60111,d=n?Symbol.for("react.concurrent_mode"):60111,f=n?Symbol.for("react.forward_ref"):60112,p=n?Symbol.for("react.suspense"):60113,h=n?Symbol.for("react.suspense_list"):60120,m=n?Symbol.for("react.memo"):60115,g=n?Symbol.for("react.lazy"):60116,v=n?Symbol.for("react.block"):60121,y=n?Symbol.for("react.fundamental"):60117,b=n?Symbol.for("react.responder"):60118,w=n?Symbol.for("react.scope"):60119;function A(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case l:case d:case i:case c:case a:case p:return e;default:switch(e=e&&e.$$typeof){case u:case f:case g:case m:case s:return e;default:return t}}case o:return t}}}function x(e){return A(e)===d}t.AsyncMode=l,t.ConcurrentMode=d,t.ContextConsumer=u,t.ContextProvider=s,t.Element=r,t.ForwardRef=f,t.Fragment=i,t.Lazy=g,t.Memo=m,t.Portal=o,t.Profiler=c,t.StrictMode=a,t.Suspense=p,t.isAsyncMode=function(e){return x(e)||A(e)===l},t.isConcurrentMode=x,t.isContextConsumer=function(e){return A(e)===u},t.isContextProvider=function(e){return A(e)===s},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return A(e)===f},t.isFragment=function(e){return A(e)===i},t.isLazy=function(e){return A(e)===g},t.isMemo=function(e){return A(e)===m},t.isPortal=function(e){return A(e)===o},t.isProfiler=function(e){return A(e)===c},t.isStrictMode=function(e){return A(e)===a},t.isSuspense=function(e){return A(e)===p},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===d||e===c||e===a||e===p||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===g||e.$$typeof===m||e.$$typeof===s||e.$$typeof===u||e.$$typeof===f||e.$$typeof===y||e.$$typeof===b||e.$$typeof===w||e.$$typeof===v)},t.typeOf=A},51976:(e,t,n)=>{"use strict";e.exports=n(9734)},94842:(e,t,n)=>{"use strict";n.r(t),n.d(t,{IGNORE_CLASS_NAME:()=>h,default:()=>g});var r=n(1024),o=n(30314);function i(e,t){return i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},i(e,t)}function a(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function c(e,t,n){return e===t||(e.correspondingElement?e.correspondingElement.classList.contains(n):e.classList.contains(n))}var s,u,l=(void 0===s&&(s=0),function(){return++s}),d={},f={},p=["touchstart","touchmove"],h="ignore-react-onclickoutside";function m(e,t){var n=null;return-1!==p.indexOf(t)&&u&&(n={passive:!e.props.preventDefault}),n}const g=function(e,t){var n,s,p=e.displayName||e.name||"Component";return s=n=function(n){var s,h;function g(e){var r;return(r=n.call(this,e)||this).__outsideClickHandler=function(e){if("function"!=typeof r.__clickOutsideHandlerProp){var t=r.getInstance();if("function"!=typeof t.props.handleClickOutside){if("function"!=typeof t.handleClickOutside)throw new Error("WrappedComponent: "+p+" lacks a handleClickOutside(event) function for processing outside click events.");t.handleClickOutside(e)}else t.props.handleClickOutside(e)}else r.__clickOutsideHandlerProp(e)},r.__getComponentNode=function(){var e=r.getInstance();return t&&"function"==typeof t.setClickOutsideRef?t.setClickOutsideRef()(e):"function"==typeof e.setClickOutsideRef?e.setClickOutsideRef():(0,o.findDOMNode)(e)},r.enableOnClickOutside=function(){if("undefined"!=typeof document&&!f[r._uid]){void 0===u&&(u=function(){if("undefined"!=typeof window&&"function"==typeof window.addEventListener){var e=!1,t=Object.defineProperty({},"passive",{get:function(){e=!0}}),n=function(){};return window.addEventListener("testPassiveEventSupport",n,t),window.removeEventListener("testPassiveEventSupport",n,t),e}}()),f[r._uid]=!0;var e=r.props.eventTypes;e.forEach||(e=[e]),d[r._uid]=function(e){var t;null!==r.componentNode&&(r.props.preventDefault&&e.preventDefault(),r.props.stopPropagation&&e.stopPropagation(),r.props.excludeScrollbar&&(t=e,document.documentElement.clientWidth<=t.clientX||document.documentElement.clientHeight<=t.clientY)||function(e,t,n){if(e===t)return!0;for(;e.parentNode||e.host;){if(e.parentNode&&c(e,t,n))return!0;e=e.parentNode||e.host}return e}(e.composed&&e.composedPath&&e.composedPath().shift()||e.target,r.componentNode,r.props.outsideClickIgnoreClass)===document&&r.__outsideClickHandler(e))},e.forEach((function(e){document.addEventListener(e,d[r._uid],m(a(r),e))}))}},r.disableOnClickOutside=function(){delete f[r._uid];var e=d[r._uid];if(e&&"undefined"!=typeof document){var t=r.props.eventTypes;t.forEach||(t=[t]),t.forEach((function(t){return document.removeEventListener(t,e,m(a(r),t))})),delete d[r._uid]}},r.getRef=function(e){return r.instanceRef=e},r._uid=l(),r}h=n,(s=g).prototype=Object.create(h.prototype),s.prototype.constructor=s,i(s,h);var v=g.prototype;return v.getInstance=function(){if(e.prototype&&!e.prototype.isReactComponent)return this;var t=this.instanceRef;return t.getInstance?t.getInstance():t},v.componentDidMount=function(){if("undefined"!=typeof document&&document.createElement){var e=this.getInstance();if(t&&"function"==typeof t.handleClickOutside&&(this.__clickOutsideHandlerProp=t.handleClickOutside(e),"function"!=typeof this.__clickOutsideHandlerProp))throw new Error("WrappedComponent: "+p+" lacks a function for processing outside click events specified by the handleClickOutside config option.");this.componentNode=this.__getComponentNode(),this.props.disableOnClickOutside||this.enableOnClickOutside()}},v.componentDidUpdate=function(){this.componentNode=this.__getComponentNode()},v.componentWillUnmount=function(){this.disableOnClickOutside()},v.render=function(){var t=this.props;t.excludeScrollbar;var n=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(t,["excludeScrollbar"]);return e.prototype&&e.prototype.isReactComponent?n.ref=this.getRef:n.wrappedRef=this.getRef,n.disableOnClickOutside=this.disableOnClickOutside,n.enableOnClickOutside=this.enableOnClickOutside,(0,r.createElement)(e,n)},g}(r.Component),n.displayName="OnClickOutside("+p+")",n.defaultProps={eventTypes:["mousedown","touchstart"],excludeScrollbar:t&&t.excludeScrollbar||!1,outsideClickIgnoreClass:h,preventDefault:!1,stopPropagation:!1},n.getClass=function(){return e.getClass?e.getClass():e},s}},28384:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Manager:()=>a,Popper:()=>f,Reference:()=>m,usePopper:()=>s.D});var r=n(1024),o=r.createContext(),i=r.createContext();function a(e){var t=e.children,n=r.useState(null),a=n[0],c=n[1],s=r.useRef(!1);r.useEffect((function(){return function(){s.current=!0}}),[]);var u=r.useCallback((function(e){s.current||c(e)}),[]);return r.createElement(o.Provider,{value:a},r.createElement(i.Provider,{value:u},t))}var c=n(87568),s=n(32654),u=function(){},l=function(){return Promise.resolve(null)},d=[];function f(e){var t=e.placement,n=void 0===t?"bottom":t,i=e.strategy,a=void 0===i?"absolute":i,f=e.modifiers,p=void 0===f?d:f,h=e.referenceElement,m=e.onFirstUpdate,g=e.innerRef,v=e.children,y=r.useContext(o),b=r.useState(null),w=b[0],A=b[1],x=r.useState(null),E=x[0],O=x[1];r.useEffect((function(){(0,c.k$)(g,w)}),[g,w]);var C=r.useMemo((function(){return{placement:n,strategy:a,onFirstUpdate:m,modifiers:[].concat(p,[{name:"arrow",enabled:null!=E,options:{element:E}}])}}),[n,a,m,p,E]),k=(0,s.D)(h||y,w,C),S=k.state,D=k.styles,P=k.forceUpdate,_=k.update,j=r.useMemo((function(){return{ref:A,style:D.popper,placement:S?S.placement:n,hasPopperEscaped:S&&S.modifiersData.hide?S.modifiersData.hide.hasPopperEscaped:null,isReferenceHidden:S&&S.modifiersData.hide?S.modifiersData.hide.isReferenceHidden:null,arrowProps:{style:D.arrow,ref:O},forceUpdate:P||u,update:_||l}}),[A,O,n,S,D,_,P]);return(0,c.$p)(v)(j)}var p=n(99874),h=n.n(p);function m(e){var t=e.children,n=e.innerRef,o=r.useContext(i),a=r.useCallback((function(e){(0,c.k$)(n,e),(0,c.DL)(o,e)}),[n,o]);return r.useEffect((function(){return function(){return(0,c.k$)(n,null)}}),[]),r.useEffect((function(){h()(Boolean(o),"`Reference` should not be used outside of a `Manager` component.")}),[o]),(0,c.$p)(t)({ref:a})}},32654:(e,t,n)=>{"use strict";n.d(t,{D:()=>be});var r=n(1024),o=n(30314);function i(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function a(e){return e instanceof i(e).Element||e instanceof Element}function c(e){return e instanceof i(e).HTMLElement||e instanceof HTMLElement}function s(e){return"undefined"!=typeof ShadowRoot&&(e instanceof i(e).ShadowRoot||e instanceof ShadowRoot)}var u=Math.max,l=Math.min,d=Math.round;function f(e,t){void 0===t&&(t=!1);var n=e.getBoundingClientRect(),r=1,o=1;if(c(e)&&t){var i=e.offsetHeight,a=e.offsetWidth;a>0&&(r=d(n.width)/a||1),i>0&&(o=d(n.height)/i||1)}return{width:n.width/r,height:n.height/o,top:n.top/o,right:n.right/r,bottom:n.bottom/o,left:n.left/r,x:n.left/r,y:n.top/o}}function p(e){var t=i(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function h(e){return e?(e.nodeName||"").toLowerCase():null}function m(e){return((a(e)?e.ownerDocument:e.document)||window.document).documentElement}function g(e){return f(m(e)).left+p(e).scrollLeft}function v(e){return i(e).getComputedStyle(e)}function y(e){var t=v(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function b(e,t,n){void 0===n&&(n=!1);var r,o,a=c(t),s=c(t)&&function(e){var t=e.getBoundingClientRect(),n=d(t.width)/e.offsetWidth||1,r=d(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(t),u=m(t),l=f(e,s),v={scrollLeft:0,scrollTop:0},b={x:0,y:0};return(a||!a&&!n)&&(("body"!==h(t)||y(u))&&(v=(r=t)!==i(r)&&c(r)?{scrollLeft:(o=r).scrollLeft,scrollTop:o.scrollTop}:p(r)),c(t)?((b=f(t,!0)).x+=t.clientLeft,b.y+=t.clientTop):u&&(b.x=g(u))),{x:l.left+v.scrollLeft-b.x,y:l.top+v.scrollTop-b.y,width:l.width,height:l.height}}function w(e){var t=f(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function A(e){return"html"===h(e)?e:e.assignedSlot||e.parentNode||(s(e)?e.host:null)||m(e)}function x(e){return["html","body","#document"].indexOf(h(e))>=0?e.ownerDocument.body:c(e)&&y(e)?e:x(A(e))}function E(e,t){var n;void 0===t&&(t=[]);var r=x(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),a=i(r),c=o?[a].concat(a.visualViewport||[],y(r)?r:[]):r,s=t.concat(c);return o?s:s.concat(E(A(c)))}function O(e){return["table","td","th"].indexOf(h(e))>=0}function C(e){return c(e)&&"fixed"!==v(e).position?e.offsetParent:null}function k(e){for(var t=i(e),n=C(e);n&&O(n)&&"static"===v(n).position;)n=C(n);return n&&("html"===h(n)||"body"===h(n)&&"static"===v(n).position)?t:n||function(e){var t=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&c(e)&&"fixed"===v(e).position)return null;var n=A(e);for(s(n)&&(n=n.host);c(n)&&["html","body"].indexOf(h(n))<0;){var r=v(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}var S="top",D="bottom",P="right",_="left",j="auto",T=[S,D,P,_],R="start",I="end",M="viewport",N="popper",B=T.reduce((function(e,t){return e.concat([t+"-"+R,t+"-"+I])}),[]),Z=[].concat(T,[j]).reduce((function(e,t){return e.concat([t,t+"-"+R,t+"-"+I])}),[]),F=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function L(e){var t=new Map,n=new Set,r=[];function o(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var r=t.get(e);r&&o(r)}})),r.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||o(e)})),r}var H={placement:"bottom",modifiers:[],strategy:"absolute"};function U(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}function z(e){void 0===e&&(e={});var t=e,n=t.defaultModifiers,r=void 0===n?[]:n,o=t.defaultOptions,i=void 0===o?H:o;return function(e,t,n){void 0===n&&(n=i);var o,c,s={placement:"bottom",orderedModifiers:[],options:Object.assign({},H,i),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},u=[],l=!1,d={state:s,setOptions:function(n){var o="function"==typeof n?n(s.options):n;f(),s.options=Object.assign({},i,s.options,o),s.scrollParents={reference:a(e)?E(e):e.contextElement?E(e.contextElement):[],popper:E(t)};var c=function(e){var t=L(e);return F.reduce((function(e,n){return e.concat(t.filter((function(e){return e.phase===n})))}),[])}(function(e){var t=e.reduce((function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e}),{});return Object.keys(t).map((function(e){return t[e]}))}([].concat(r,s.options.modifiers)));return s.orderedModifiers=c.filter((function(e){return e.enabled})),s.orderedModifiers.forEach((function(e){var t=e.name,n=e.options,r=void 0===n?{}:n,o=e.effect;if("function"==typeof o){var i=o({state:s,name:t,instance:d,options:r}),a=function(){};u.push(i||a)}})),d.update()},forceUpdate:function(){if(!l){var e=s.elements,t=e.reference,n=e.popper;if(U(t,n)){s.rects={reference:b(t,k(n),"fixed"===s.options.strategy),popper:w(n)},s.reset=!1,s.placement=s.options.placement,s.orderedModifiers.forEach((function(e){return s.modifiersData[e.name]=Object.assign({},e.data)}));for(var r=0;r<s.orderedModifiers.length;r++)if(!0!==s.reset){var o=s.orderedModifiers[r],i=o.fn,a=o.options,c=void 0===a?{}:a,u=o.name;"function"==typeof i&&(s=i({state:s,options:c,name:u,instance:d})||s)}else s.reset=!1,r=-1}}},update:(o=function(){return new Promise((function(e){d.forceUpdate(),e(s)}))},function(){return c||(c=new Promise((function(e){Promise.resolve().then((function(){c=void 0,e(o())}))}))),c}),destroy:function(){f(),l=!0}};if(!U(e,t))return d;function f(){u.forEach((function(e){return e()})),u=[]}return d.setOptions(n).then((function(e){!l&&n.onFirstUpdate&&n.onFirstUpdate(e)})),d}}var W={passive:!0};function V(e){return e.split("-")[0]}function Y(e){return e.split("-")[1]}function q(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function G(e){var t,n=e.reference,r=e.element,o=e.placement,i=o?V(o):null,a=o?Y(o):null,c=n.x+n.width/2-r.width/2,s=n.y+n.height/2-r.height/2;switch(i){case S:t={x:c,y:n.y-r.height};break;case D:t={x:c,y:n.y+n.height};break;case P:t={x:n.x+n.width,y:s};break;case _:t={x:n.x-r.width,y:s};break;default:t={x:n.x,y:n.y}}var u=i?q(i):null;if(null!=u){var l="y"===u?"height":"width";switch(a){case R:t[u]=t[u]-(n[l]/2-r[l]/2);break;case I:t[u]=t[u]+(n[l]/2-r[l]/2)}}return t}var Q={top:"auto",right:"auto",bottom:"auto",left:"auto"};function X(e){var t,n=e.popper,r=e.popperRect,o=e.placement,a=e.variation,c=e.offsets,s=e.position,u=e.gpuAcceleration,l=e.adaptive,f=e.roundOffsets,p=e.isFixed,h=c.x,g=void 0===h?0:h,y=c.y,b=void 0===y?0:y,w="function"==typeof f?f({x:g,y:b}):{x:g,y:b};g=w.x,b=w.y;var A=c.hasOwnProperty("x"),x=c.hasOwnProperty("y"),E=_,O=S,C=window;if(l){var j=k(n),T="clientHeight",R="clientWidth";if(j===i(n)&&"static"!==v(j=m(n)).position&&"absolute"===s&&(T="scrollHeight",R="scrollWidth"),j=j,o===S||(o===_||o===P)&&a===I)O=D,b-=(p&&j===C&&C.visualViewport?C.visualViewport.height:j[T])-r.height,b*=u?1:-1;if(o===_||(o===S||o===D)&&a===I)E=P,g-=(p&&j===C&&C.visualViewport?C.visualViewport.width:j[R])-r.width,g*=u?1:-1}var M,N=Object.assign({position:s},l&&Q),B=!0===f?function(e){var t=e.x,n=e.y,r=window.devicePixelRatio||1;return{x:d(t*r)/r||0,y:d(n*r)/r||0}}({x:g,y:b}):{x:g,y:b};return g=B.x,b=B.y,u?Object.assign({},N,((M={})[O]=x?"0":"",M[E]=A?"0":"",M.transform=(C.devicePixelRatio||1)<=1?"translate("+g+"px, "+b+"px)":"translate3d("+g+"px, "+b+"px, 0)",M)):Object.assign({},N,((t={})[O]=x?b+"px":"",t[E]=A?g+"px":"",t.transform="",t))}const K={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.offset,i=void 0===o?[0,0]:o,a=Z.reduce((function(e,n){return e[n]=function(e,t,n){var r=V(e),o=[_,S].indexOf(r)>=0?-1:1,i="function"==typeof n?n(Object.assign({},t,{placement:e})):n,a=i[0],c=i[1];return a=a||0,c=(c||0)*o,[_,P].indexOf(r)>=0?{x:c,y:a}:{x:a,y:c}}(n,t.rects,i),e}),{}),c=a[t.placement],s=c.x,u=c.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=s,t.modifiersData.popperOffsets.y+=u),t.modifiersData[r]=a}};var $={left:"right",right:"left",bottom:"top",top:"bottom"};function J(e){return e.replace(/left|right|bottom|top/g,(function(e){return $[e]}))}var ee={start:"end",end:"start"};function te(e){return e.replace(/start|end/g,(function(e){return ee[e]}))}function ne(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&s(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function re(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function oe(e,t){return t===M?re(function(e){var t=i(e),n=m(e),r=t.visualViewport,o=n.clientWidth,a=n.clientHeight,c=0,s=0;return r&&(o=r.width,a=r.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(c=r.offsetLeft,s=r.offsetTop)),{width:o,height:a,x:c+g(e),y:s}}(e)):a(t)?function(e){var t=f(e);return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}(t):re(function(e){var t,n=m(e),r=p(e),o=null==(t=e.ownerDocument)?void 0:t.body,i=u(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=u(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),c=-r.scrollLeft+g(e),s=-r.scrollTop;return"rtl"===v(o||n).direction&&(c+=u(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:a,x:c,y:s}}(m(e)))}function ie(e,t,n){var r="clippingParents"===t?function(e){var t=E(A(e)),n=["absolute","fixed"].indexOf(v(e).position)>=0&&c(e)?k(e):e;return a(n)?t.filter((function(e){return a(e)&&ne(e,n)&&"body"!==h(e)})):[]}(e):[].concat(t),o=[].concat(r,[n]),i=o[0],s=o.reduce((function(t,n){var r=oe(e,n);return t.top=u(r.top,t.top),t.right=l(r.right,t.right),t.bottom=l(r.bottom,t.bottom),t.left=u(r.left,t.left),t}),oe(e,i));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function ae(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function ce(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}function se(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=void 0===r?e.placement:r,i=n.boundary,c=void 0===i?"clippingParents":i,s=n.rootBoundary,u=void 0===s?M:s,l=n.elementContext,d=void 0===l?N:l,p=n.altBoundary,h=void 0!==p&&p,g=n.padding,v=void 0===g?0:g,y=ae("number"!=typeof v?v:ce(v,T)),b=d===N?"reference":N,w=e.rects.popper,A=e.elements[h?b:d],x=ie(a(A)?A:A.contextElement||m(e.elements.popper),c,u),E=f(e.elements.reference),O=G({reference:E,element:w,strategy:"absolute",placement:o}),C=re(Object.assign({},w,O)),k=d===N?C:E,_={top:x.top-k.top+y.top,bottom:k.bottom-x.bottom+y.bottom,left:x.left-k.left+y.left,right:k.right-x.right+y.right},j=e.modifiersData.offset;if(d===N&&j){var R=j[o];Object.keys(_).forEach((function(e){var t=[P,D].indexOf(e)>=0?1:-1,n=[S,D].indexOf(e)>=0?"y":"x";_[e]+=R[n]*t}))}return _}function ue(e,t,n){return u(e,l(t,n))}const le={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,i=void 0===o||o,a=n.altAxis,c=void 0!==a&&a,s=n.boundary,d=n.rootBoundary,f=n.altBoundary,p=n.padding,h=n.tether,m=void 0===h||h,g=n.tetherOffset,v=void 0===g?0:g,y=se(t,{boundary:s,rootBoundary:d,padding:p,altBoundary:f}),b=V(t.placement),A=Y(t.placement),x=!A,E=q(b),O="x"===E?"y":"x",C=t.modifiersData.popperOffsets,j=t.rects.reference,T=t.rects.popper,I="function"==typeof v?v(Object.assign({},t.rects,{placement:t.placement})):v,M="number"==typeof I?{mainAxis:I,altAxis:I}:Object.assign({mainAxis:0,altAxis:0},I),N=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,B={x:0,y:0};if(C){if(i){var Z,F="y"===E?S:_,L="y"===E?D:P,H="y"===E?"height":"width",U=C[E],z=U+y[F],W=U-y[L],G=m?-T[H]/2:0,Q=A===R?j[H]:T[H],X=A===R?-T[H]:-j[H],K=t.elements.arrow,$=m&&K?w(K):{width:0,height:0},J=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},ee=J[F],te=J[L],ne=ue(0,j[H],$[H]),re=x?j[H]/2-G-ne-ee-M.mainAxis:Q-ne-ee-M.mainAxis,oe=x?-j[H]/2+G+ne+te+M.mainAxis:X+ne+te+M.mainAxis,ie=t.elements.arrow&&k(t.elements.arrow),ae=ie?"y"===E?ie.clientTop||0:ie.clientLeft||0:0,ce=null!=(Z=null==N?void 0:N[E])?Z:0,le=U+oe-ce,de=ue(m?l(z,U+re-ce-ae):z,U,m?u(W,le):W);C[E]=de,B[E]=de-U}if(c){var fe,pe="x"===E?S:_,he="x"===E?D:P,me=C[O],ge="y"===O?"height":"width",ve=me+y[pe],ye=me-y[he],be=-1!==[S,_].indexOf(b),we=null!=(fe=null==N?void 0:N[O])?fe:0,Ae=be?ve:me-j[ge]-T[ge]-we+M.altAxis,xe=be?me+j[ge]+T[ge]-we-M.altAxis:ye,Ee=m&&be?function(e,t,n){var r=ue(e,t,n);return r>n?n:r}(Ae,me,xe):ue(m?Ae:ve,me,m?xe:ye);C[O]=Ee,B[O]=Ee-me}t.modifiersData[r]=B}},requiresIfExists:["offset"]};const de={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,o=e.options,i=n.elements.arrow,a=n.modifiersData.popperOffsets,c=V(n.placement),s=q(c),u=[_,P].indexOf(c)>=0?"height":"width";if(i&&a){var l=function(e,t){return ae("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:ce(e,T))}(o.padding,n),d=w(i),f="y"===s?S:_,p="y"===s?D:P,h=n.rects.reference[u]+n.rects.reference[s]-a[s]-n.rects.popper[u],m=a[s]-n.rects.reference[s],g=k(i),v=g?"y"===s?g.clientHeight||0:g.clientWidth||0:0,y=h/2-m/2,b=l[f],A=v-d[u]-l[p],x=v/2-d[u]/2+y,E=ue(b,x,A),O=s;n.modifiersData[r]=((t={})[O]=E,t.centerOffset=E-x,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&ne(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function fe(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function pe(e){return[S,P,D,_].some((function(t){return e[t]>=0}))}var he=z({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,r=e.options,o=r.scroll,a=void 0===o||o,c=r.resize,s=void 0===c||c,u=i(t.elements.popper),l=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&l.forEach((function(e){e.addEventListener("scroll",n.update,W)})),s&&u.addEventListener("resize",n.update,W),function(){a&&l.forEach((function(e){e.removeEventListener("scroll",n.update,W)})),s&&u.removeEventListener("resize",n.update,W)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=G({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=void 0===r||r,i=n.adaptive,a=void 0===i||i,c=n.roundOffsets,s=void 0===c||c,u={placement:V(t.placement),variation:Y(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,X(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:s})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,X(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:s})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},o=t.elements[e];c(o)&&h(o)&&(Object.assign(o.style,n),Object.keys(r).forEach((function(e){var t=r[e];!1===t?o.removeAttribute(e):o.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var r=t.elements[e],o=t.attributes[e]||{},i=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});c(r)&&h(r)&&(Object.assign(r.style,i),Object.keys(o).forEach((function(e){r.removeAttribute(e)})))}))}},requires:["computeStyles"]},K,{name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,i=void 0===o||o,a=n.altAxis,c=void 0===a||a,s=n.fallbackPlacements,u=n.padding,l=n.boundary,d=n.rootBoundary,f=n.altBoundary,p=n.flipVariations,h=void 0===p||p,m=n.allowedAutoPlacements,g=t.options.placement,v=V(g),y=s||(v===g||!h?[J(g)]:function(e){if(V(e)===j)return[];var t=J(e);return[te(e),t,te(t)]}(g)),b=[g].concat(y).reduce((function(e,n){return e.concat(V(n)===j?function(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=n.boundary,i=n.rootBoundary,a=n.padding,c=n.flipVariations,s=n.allowedAutoPlacements,u=void 0===s?Z:s,l=Y(r),d=l?c?B:B.filter((function(e){return Y(e)===l})):T,f=d.filter((function(e){return u.indexOf(e)>=0}));0===f.length&&(f=d);var p=f.reduce((function(t,n){return t[n]=se(e,{placement:n,boundary:o,rootBoundary:i,padding:a})[V(n)],t}),{});return Object.keys(p).sort((function(e,t){return p[e]-p[t]}))}(t,{placement:n,boundary:l,rootBoundary:d,padding:u,flipVariations:h,allowedAutoPlacements:m}):n)}),[]),w=t.rects.reference,A=t.rects.popper,x=new Map,E=!0,O=b[0],C=0;C<b.length;C++){var k=b[C],I=V(k),M=Y(k)===R,N=[S,D].indexOf(I)>=0,F=N?"width":"height",L=se(t,{placement:k,boundary:l,rootBoundary:d,altBoundary:f,padding:u}),H=N?M?P:_:M?D:S;w[F]>A[F]&&(H=J(H));var U=J(H),z=[];if(i&&z.push(L[I]<=0),c&&z.push(L[H]<=0,L[U]<=0),z.every((function(e){return e}))){O=k,E=!1;break}x.set(k,z)}if(E)for(var W=function(e){var t=b.find((function(t){var n=x.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return O=t,"break"},q=h?3:1;q>0;q--){if("break"===W(q))break}t.placement!==O&&(t.modifiersData[r]._skip=!0,t.placement=O,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},le,de,{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,a=se(t,{elementContext:"reference"}),c=se(t,{altBoundary:!0}),s=fe(a,r),u=fe(c,o,i),l=pe(s),d=pe(u);t.modifiersData[n]={referenceClippingOffsets:s,popperEscapeOffsets:u,isReferenceHidden:l,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":l,"data-popper-escaped":d})}}]}),me=n(98836),ge=n.n(me),ve=n(87568),ye=[],be=function(e,t,n){void 0===n&&(n={});var i=r.useRef(null),a={onFirstUpdate:n.onFirstUpdate,placement:n.placement||"bottom",strategy:n.strategy||"absolute",modifiers:n.modifiers||ye},c=r.useState({styles:{popper:{position:a.strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),s=c[0],u=c[1],l=r.useMemo((function(){return{name:"updateState",enabled:!0,phase:"write",fn:function(e){var t=e.state,n=Object.keys(t.elements);o.flushSync((function(){u({styles:(0,ve.sq)(n.map((function(e){return[e,t.styles[e]||{}]}))),attributes:(0,ve.sq)(n.map((function(e){return[e,t.attributes[e]]})))})}))},requires:["computeStyles"]}}),[]),d=r.useMemo((function(){var e={onFirstUpdate:a.onFirstUpdate,placement:a.placement,strategy:a.strategy,modifiers:[].concat(a.modifiers,[l,{name:"applyStyles",enabled:!1}])};return ge()(i.current,e)?i.current||e:(i.current=e,e)}),[a.onFirstUpdate,a.placement,a.strategy,a.modifiers,l]),f=r.useRef();return(0,ve.LI)((function(){f.current&&f.current.setOptions(d)}),[d]),(0,ve.LI)((function(){if(null!=e&&null!=t){var r=(n.createPopper||he)(e,t,d);return f.current=r,function(){r.destroy(),f.current=null}}}),[e,t,n.createPopper]),{state:f.current?f.current.state:null,styles:s.styles,attributes:s.attributes,update:f.current?f.current.update:null,forceUpdate:f.current?f.current.forceUpdate:null}}},87568:(e,t,n)=>{"use strict";n.d(t,{$p:()=>o,DL:()=>i,LI:()=>s,k$:()=>a,sq:()=>c});var r=n(1024),o=function(e){return Array.isArray(e)?e[0]:e},i=function(e){if("function"==typeof e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return e.apply(void 0,n)}},a=function(e,t){if("function"==typeof e)return i(e,t);null!=e&&(e.current=t)},c=function(e){return e.reduce((function(e,t){var n=t[0],r=t[1];return e[n]=r,e}),{})},s="undefined"!=typeof window&&window.document&&window.document.createElement?r.useLayoutEffect:r.useEffect},13508:(e,t,n)=>{"use strict";n.d(t,{A:()=>V,B:()=>J,C:()=>$,D:()=>K,E:()=>M,F:()=>qe,G:()=>X,H:()=>Z,I:()=>N,J:()=>z,K:()=>R,M:()=>ie,a:()=>Oe,b:()=>he,c:()=>Ye,d:()=>_e,e:()=>Ee,f:()=>Re,g:()=>Te,h:()=>Ce,i:()=>ge,j:()=>Me,k:()=>ue,l:()=>Se,m:()=>re,n:()=>ae,o:()=>pe,p:()=>Fe,q:()=>Le,r:()=>ee,s:()=>Q,t:()=>He,u:()=>se,v:()=>ze,w:()=>We,x:()=>Ve,y:()=>me,z:()=>W});var r=n(8486),o=n(3640),i=n(89178),a=n(91411),c=n(56315),s=n(68957),u=n(73891),l=n(46927),d=n(1024),f=n(30314);Math.min,Math.max;const p=["top","right","bottom","left"];p.reduce(((e,t)=>e.concat(t,t+"-start",t+"-end")),[]);function h(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function m(e){if(null==e)return window;if(!h(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function g(e){return m(e).getComputedStyle(e)}function v(e){return h(e)?"":e?(e.nodeName||"").toLowerCase():""}function y(){const e=navigator.userAgentData;return null!=e&&e.brands?e.brands.map((e=>e.brand+"/"+e.version)).join(" "):navigator.userAgent}function b(e){return e instanceof m(e).HTMLElement}function w(e){return e instanceof m(e).Element}function A(e){return"undefined"!=typeof ShadowRoot&&(e instanceof m(e).ShadowRoot||e instanceof ShadowRoot)}function x(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=g(e);return/auto|scroll|overlay|hidden/.test(t+r+n)&&!["inline","contents"].includes(o)}function E(){return!/^((?!chrome|android).)*safari/i.test(y())}function O(e){return["html","body","#document"].includes(v(e))}Math.min,Math.max;const C=Math.round;function k(e,t,n){var r,o,i,a;void 0===t&&(t=!1),void 0===n&&(n=!1);const c=e.getBoundingClientRect();let s=1,u=1;t&&b(e)&&(s=e.offsetWidth>0&&C(c.width)/e.offsetWidth||1,u=e.offsetHeight>0&&C(c.height)/e.offsetHeight||1);const l=w(e)?m(e):window,d=!E()&&n,f=(c.left+(d&&null!=(r=null==(o=l.visualViewport)?void 0:o.offsetLeft)?r:0))/s,p=(c.top+(d&&null!=(i=null==(a=l.visualViewport)?void 0:a.offsetTop)?i:0))/u,h=c.width/s,g=c.height/u;return{width:h,height:g,top:p,right:f+h,bottom:p+g,left:f,x:f,y:p}}function S(e){return(t=e,(t instanceof m(t).Node?e.ownerDocument:e.document)||window.document).documentElement;var t}function D(e){return"html"===v(e)?e:e.assignedSlot||e.parentNode||(A(e)?e.host:null)||S(e)}function P(e){const t=D(e);return O(t)?e.ownerDocument.body:b(t)&&x(t)?t:P(t)}function _(e,t){var n;void 0===t&&(t=[]);const r=P(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=m(r),a=o?[i].concat(i.visualViewport||[],x(r)?r:[]):r,c=t.concat(a);return o?c:c.concat(_(a))}var j=n(6919),T=["className","clearValue","cx","getStyles","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],R=function(){};function I(e,t){return t?"-"===t[0]?e+t:e+"__"+t:e}function M(e,t,n){var r=[n];if(t&&e)for(var o in t)t.hasOwnProperty(o)&&t[o]&&r.push("".concat(I(e,o)));return r.filter((function(e){return e})).map((function(e){return String(e).trim()})).join(" ")}var N=function(e){return t=e,Array.isArray(t)?e.filter(Boolean):"object"===(0,u.Z)(e)&&null!==e?[e]:[];var t},B=function(e){e.className,e.clearValue,e.cx,e.getStyles,e.getValue,e.hasValue,e.isMulti,e.isRtl,e.options,e.selectOption,e.selectProps,e.setValue,e.theme;var t=(0,c.Z)(e,T);return(0,r.Z)({},t)};function Z(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function F(e){return Z(e)?window.pageYOffset:e.scrollTop}function L(e,t){Z(e)?window.scrollTo(0,t):e.scrollTop=t}function H(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}function U(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:R,o=F(e),i=t-o,a=10,c=0;function s(){var t=H(c+=a,o,i,n);L(e,t),c<n?window.requestAnimationFrame(s):r(e)}s()}function z(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),o=t.offsetHeight/3;r.bottom+o>n.bottom?L(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+o,e.scrollHeight)):r.top-o<n.top&&L(e,Math.max(t.offsetTop-o,0))}function W(){try{return document.createEvent("TouchEvent"),!0}catch(e){return!1}}function V(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}var Y=!1,q={get passive(){return Y=!0}},G="undefined"!=typeof window?window:{};G.addEventListener&&G.removeEventListener&&(G.addEventListener("p",R,q),G.removeEventListener("p",R,!1));var Q=Y;function X(e){return null!=e}function K(e,t,n){return e?t:n}function $(e){return e}function J(e){return e}var ee=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=Object.entries(e).filter((function(e){var t=(0,s.Z)(e,1)[0];return!n.includes(t)}));return o.reduce((function(e,t){var n=(0,s.Z)(t,2),r=n[0],o=n[1];return e[r]=o,e}),{})};function te(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,o=e.placement,i=e.shouldScroll,a=e.isFixedPosition,c=e.theme.spacing,s=function(e){var t=getComputedStyle(e),n="absolute"===t.position,r=/(auto|scroll)/;if("fixed"===t.position)return document.documentElement;for(var o=e;o=o.parentElement;)if(t=getComputedStyle(o),(!n||"static"!==t.position)&&r.test(t.overflow+t.overflowY+t.overflowX))return o;return document.documentElement}(n),u={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return u;var l,d=s.getBoundingClientRect().height,f=n.getBoundingClientRect(),p=f.bottom,h=f.height,m=f.top,g=n.offsetParent.getBoundingClientRect().top,v=a?window.innerHeight:Z(l=s)?window.innerHeight:l.clientHeight,y=F(s),b=parseInt(getComputedStyle(n).marginBottom,10),w=parseInt(getComputedStyle(n).marginTop,10),A=g-w,x=v-m,E=A+y,O=d-y-m,C=p-v+y+b,k=y+m-w,S=160;switch(o){case"auto":case"bottom":if(x>=h)return{placement:"bottom",maxHeight:t};if(O>=h&&!a)return i&&U(s,C,S),{placement:"bottom",maxHeight:t};if(!a&&O>=r||a&&x>=r)return i&&U(s,C,S),{placement:"bottom",maxHeight:a?x-b:O-b};if("auto"===o||a){var D=t,P=a?A:E;return P>=r&&(D=Math.min(P-b-c.controlHeight,t)),{placement:"top",maxHeight:D}}if("bottom"===o)return i&&L(s,C),{placement:"bottom",maxHeight:t};break;case"top":if(A>=h)return{placement:"top",maxHeight:t};if(E>=h&&!a)return i&&U(s,k,S),{placement:"top",maxHeight:t};if(!a&&E>=r||a&&A>=r){var _=t;return(!a&&E>=r||a&&A>=r)&&(_=a?A-w:E-w),i&&U(s,k,S),{placement:"top",maxHeight:_}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(o,'".'))}return u}var ne=function(e){return"auto"===e?"bottom":e},re=function(e){var t,n=e.placement,r=e.theme,o=r.borderRadius,i=r.spacing,a=r.colors;return t={label:"menu"},(0,l.Z)(t,function(e){return e?{bottom:"top",top:"bottom"}[e]:"bottom"}(n),"100%"),(0,l.Z)(t,"backgroundColor",a.neutral0),(0,l.Z)(t,"borderRadius",o),(0,l.Z)(t,"boxShadow","0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)"),(0,l.Z)(t,"marginBottom",i.menuGutter),(0,l.Z)(t,"marginTop",i.menuGutter),(0,l.Z)(t,"position","absolute"),(0,l.Z)(t,"width","100%"),(0,l.Z)(t,"zIndex",1),t},oe=(0,d.createContext)(null),ie=function(e){var t=e.children,n=e.minMenuHeight,o=e.maxMenuHeight,i=e.menuPlacement,a=e.menuPosition,c=e.menuShouldScrollIntoView,u=e.theme,l=((0,d.useContext)(oe)||{}).setPortalPlacement,f=(0,d.useRef)(null),p=(0,d.useState)(o),h=(0,s.Z)(p,2),m=h[0],g=h[1],v=(0,d.useState)(null),y=(0,s.Z)(v,2),b=y[0],w=y[1];return(0,j.Z)((function(){var e=f.current;if(e){var t="fixed"===a,r=te({maxHeight:o,menuEl:e,minHeight:n,placement:i,shouldScroll:c&&!t,isFixedPosition:t,theme:u});g(r.maxHeight),w(r.placement),null==l||l(r.placement)}}),[o,i,a,c,n,l,u]),t({ref:f,placerProps:(0,r.Z)((0,r.Z)({},e),{},{placement:b||ne(i),maxHeight:m})})},ae=function(e){var t=e.maxHeight,n=e.theme.spacing.baseUnit;return{maxHeight:t,overflowY:"auto",paddingBottom:n,paddingTop:n,position:"relative",WebkitOverflowScrolling:"touch"}},ce=function(e){var t=e.theme,n=t.spacing.baseUnit;return{color:t.colors.neutral40,padding:"".concat(2*n,"px ").concat(3*n,"px"),textAlign:"center"}},se=ce,ue=ce,le=function(e){var t=e.children,n=e.className,r=e.cx,a=e.getStyles,c=e.innerProps;return(0,i.tZ)("div",(0,o.Z)({css:a("noOptionsMessage",e),className:r({"menu-notice":!0,"menu-notice--no-options":!0},n)},c),t)};le.defaultProps={children:"No options"};var de=function(e){var t=e.children,n=e.className,r=e.cx,a=e.getStyles,c=e.innerProps;return(0,i.tZ)("div",(0,o.Z)({css:a("loadingMessage",e),className:r({"menu-notice":!0,"menu-notice--loading":!0},n)},c),t)};de.defaultProps={children:"Loading..."};var fe,pe=function(e){var t=e.rect,n=e.offset,r=e.position;return{left:t.left,position:r,top:n,width:t.width,zIndex:1}},he=function(e){var t=e.isDisabled;return{label:"container",direction:e.isRtl?"rtl":void 0,pointerEvents:t?"none":void 0,position:"relative"}},me=function(e){var t=e.theme.spacing,n=e.isMulti,r=e.hasValue,o=e.selectProps.controlShouldRenderValue;return{alignItems:"center",display:n&&r&&o?"flex":"grid",flex:1,flexWrap:"wrap",padding:"".concat(t.baseUnit/2,"px ").concat(2*t.baseUnit,"px"),WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"}},ge=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},ve=["size"];var ye={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},be=function(e){var t=e.size,n=(0,c.Z)(e,ve);return(0,i.tZ)("svg",(0,o.Z)({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:ye},n))},we=function(e){return(0,i.tZ)(be,(0,o.Z)({size:20},e),(0,i.tZ)("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},Ae=function(e){return(0,i.tZ)(be,(0,o.Z)({size:20},e),(0,i.tZ)("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},xe=function(e){var t=e.isFocused,n=e.theme,r=n.spacing.baseUnit,o=n.colors;return{label:"indicatorContainer",color:t?o.neutral60:o.neutral20,display:"flex",padding:2*r,transition:"color 150ms",":hover":{color:t?o.neutral80:o.neutral40}}},Ee=xe,Oe=xe,Ce=function(e){var t=e.isDisabled,n=e.theme,r=n.spacing.baseUnit,o=n.colors;return{label:"indicatorSeparator",alignSelf:"stretch",backgroundColor:t?o.neutral10:o.neutral20,marginBottom:2*r,marginTop:2*r,width:1}},ke=(0,i.F4)(fe||(fe=(0,a.Z)(["\n 0%, 80%, 100% { opacity: 0; }\n 40% { opacity: 1; }\n"]))),Se=function(e){var t=e.isFocused,n=e.size,r=e.theme,o=r.colors,i=r.spacing.baseUnit;return{label:"loadingIndicator",color:t?o.neutral60:o.neutral20,display:"flex",padding:2*i,transition:"color 150ms",alignSelf:"center",fontSize:n,lineHeight:1,marginRight:n,textAlign:"center",verticalAlign:"middle"}},De=function(e){var t=e.delay,n=e.offset;return(0,i.tZ)("span",{css:(0,i.iv)({animation:"".concat(ke," 1s ease-in-out ").concat(t,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:n?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},Pe=function(e){var t=e.className,n=e.cx,r=e.getStyles,a=e.innerProps,c=e.isRtl;return(0,i.tZ)("div",(0,o.Z)({css:r("loadingIndicator",e),className:n({indicator:!0,"loading-indicator":!0},t)},a),(0,i.tZ)(De,{delay:0,offset:c}),(0,i.tZ)(De,{delay:160,offset:!0}),(0,i.tZ)(De,{delay:320,offset:!c}))};Pe.defaultProps={size:4};var _e=function(e){var t=e.isDisabled,n=e.isFocused,r=e.theme,o=r.colors,i=r.borderRadius,a=r.spacing;return{label:"control",alignItems:"center",backgroundColor:t?o.neutral5:o.neutral0,borderColor:t?o.neutral10:n?o.primary:o.neutral20,borderRadius:i,borderStyle:"solid",borderWidth:1,boxShadow:n?"0 0 0 1px ".concat(o.primary):void 0,cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:a.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms","&:hover":{borderColor:n?o.primary:o.neutral30}}},je=["data"],Te=function(e){var t=e.theme.spacing;return{paddingBottom:2*t.baseUnit,paddingTop:2*t.baseUnit}},Re=function(e){var t=e.theme.spacing;return{label:"group",color:"#999",cursor:"default",display:"block",fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:3*t.baseUnit,paddingRight:3*t.baseUnit,textTransform:"uppercase"}},Ie=["innerRef","isDisabled","isHidden","inputClassName"],Me=function(e){var t=e.isDisabled,n=e.value,o=e.theme,i=o.spacing,a=o.colors;return(0,r.Z)({margin:i.baseUnit/2,paddingBottom:i.baseUnit/2,paddingTop:i.baseUnit/2,visibility:t?"hidden":"visible",color:a.neutral80,transform:n?"translateZ(0)":""},Be)},Ne={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},Be={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":(0,r.Z)({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},Ne)},Ze=function(e){return(0,r.Z)({label:"input",color:"inherit",background:0,opacity:e?0:1,width:"100%"},Ne)},Fe=function(e){var t=e.theme,n=t.spacing,r=t.borderRadius;return{label:"multiValue",backgroundColor:t.colors.neutral10,borderRadius:r/2,display:"flex",margin:n.baseUnit/2,minWidth:0}},Le=function(e){var t=e.theme,n=t.borderRadius,r=t.colors,o=e.cropWithEllipsis;return{borderRadius:n/2,color:r.neutral80,fontSize:"85%",overflow:"hidden",padding:3,paddingLeft:6,textOverflow:o||void 0===o?"ellipsis":void 0,whiteSpace:"nowrap"}},He=function(e){var t=e.theme,n=t.spacing,r=t.borderRadius,o=t.colors;return{alignItems:"center",borderRadius:r/2,backgroundColor:e.isFocused?o.dangerLight:void 0,display:"flex",paddingLeft:n.baseUnit,paddingRight:n.baseUnit,":hover":{backgroundColor:o.dangerLight,color:o.danger}}},Ue=function(e){var t=e.children,n=e.innerProps;return(0,i.tZ)("div",n,t)};var ze=function(e){var t=e.isDisabled,n=e.isFocused,r=e.isSelected,o=e.theme,i=o.spacing,a=o.colors;return{label:"option",backgroundColor:r?a.primary:n?a.primary25:"transparent",color:t?a.neutral20:r?a.neutral0:"inherit",cursor:"default",display:"block",fontSize:"inherit",padding:"".concat(2*i.baseUnit,"px ").concat(3*i.baseUnit,"px"),width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",":active":{backgroundColor:t?void 0:r?a.primary:a.primary50}}},We=function(e){var t=e.theme,n=t.spacing;return{label:"placeholder",color:t.colors.neutral50,gridArea:"1 / 1 / 2 / 3",marginLeft:n.baseUnit/2,marginRight:n.baseUnit/2}},Ve=function(e){var t=e.isDisabled,n=e.theme,r=n.spacing,o=n.colors;return{label:"singleValue",color:t?o.neutral40:o.neutral80,gridArea:"1 / 1 / 2 / 3",marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2,maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},Ye={ClearIndicator:function(e){var t=e.children,n=e.className,r=e.cx,a=e.getStyles,c=e.innerProps;return(0,i.tZ)("div",(0,o.Z)({css:a("clearIndicator",e),className:r({indicator:!0,"clear-indicator":!0},n)},c),t||(0,i.tZ)(we,null))},Control:function(e){var t=e.children,n=e.cx,r=e.getStyles,a=e.className,c=e.isDisabled,s=e.isFocused,u=e.innerRef,l=e.innerProps,d=e.menuIsOpen;return(0,i.tZ)("div",(0,o.Z)({ref:u,css:r("control",e),className:n({control:!0,"control--is-disabled":c,"control--is-focused":s,"control--menu-is-open":d},a)},l),t)},DropdownIndicator:function(e){var t=e.children,n=e.className,r=e.cx,a=e.getStyles,c=e.innerProps;return(0,i.tZ)("div",(0,o.Z)({css:a("dropdownIndicator",e),className:r({indicator:!0,"dropdown-indicator":!0},n)},c),t||(0,i.tZ)(Ae,null))},DownChevron:Ae,CrossIcon:we,Group:function(e){var t=e.children,n=e.className,r=e.cx,a=e.getStyles,c=e.Heading,s=e.headingProps,u=e.innerProps,l=e.label,d=e.theme,f=e.selectProps;return(0,i.tZ)("div",(0,o.Z)({css:a("group",e),className:r({group:!0},n)},u),(0,i.tZ)(c,(0,o.Z)({},s,{selectProps:f,theme:d,getStyles:a,cx:r}),l),(0,i.tZ)("div",null,t))},GroupHeading:function(e){var t=e.getStyles,n=e.cx,r=e.className,a=B(e);a.data;var s=(0,c.Z)(a,je);return(0,i.tZ)("div",(0,o.Z)({css:t("groupHeading",e),className:n({"group-heading":!0},r)},s))},IndicatorsContainer:function(e){var t=e.children,n=e.className,r=e.cx,a=e.innerProps,c=e.getStyles;return(0,i.tZ)("div",(0,o.Z)({css:c("indicatorsContainer",e),className:r({indicators:!0},n)},a),t)},IndicatorSeparator:function(e){var t=e.className,n=e.cx,r=e.getStyles,a=e.innerProps;return(0,i.tZ)("span",(0,o.Z)({},a,{css:r("indicatorSeparator",e),className:n({"indicator-separator":!0},t)}))},Input:function(e){var t=e.className,n=e.cx,r=e.getStyles,a=e.value,s=B(e),u=s.innerRef,l=s.isDisabled,d=s.isHidden,f=s.inputClassName,p=(0,c.Z)(s,Ie);return(0,i.tZ)("div",{className:n({"input-container":!0},t),css:r("input",e),"data-value":a||""},(0,i.tZ)("input",(0,o.Z)({className:n({input:!0},f),ref:u,style:Ze(d),disabled:l},p)))},LoadingIndicator:Pe,Menu:function(e){var t=e.children,n=e.className,r=e.cx,a=e.getStyles,c=e.innerRef,s=e.innerProps;return(0,i.tZ)("div",(0,o.Z)({css:a("menu",e),className:r({menu:!0},n),ref:c},s),t)},MenuList:function(e){var t=e.children,n=e.className,r=e.cx,a=e.getStyles,c=e.innerProps,s=e.innerRef,u=e.isMulti;return(0,i.tZ)("div",(0,o.Z)({css:a("menuList",e),className:r({"menu-list":!0,"menu-list--is-multi":u},n),ref:s},c),t)},MenuPortal:function(e){var t=e.appendTo,n=e.children,r=e.className,a=e.controlElement,c=e.cx,u=e.innerProps,l=e.menuPlacement,p=e.menuPosition,h=e.getStyles,m=(0,d.useRef)(null),g=(0,d.useRef)(null),v=(0,d.useState)(ne(l)),y=(0,s.Z)(v,2),b=y[0],A=y[1],x=(0,d.useMemo)((function(){return{setPortalPlacement:A}}),[]),E=(0,d.useState)(null),O=(0,s.Z)(E,2),C=O[0],S=O[1],D=(0,d.useCallback)((function(){if(a){var e=function(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}(a),t="fixed"===p?0:window.pageYOffset,n=e[b]+t;n===(null==C?void 0:C.offset)&&e.left===(null==C?void 0:C.rect.left)&&e.width===(null==C?void 0:C.rect.width)||S({offset:n,rect:e})}}),[a,p,b,null==C?void 0:C.offset,null==C?void 0:C.rect.left,null==C?void 0:C.rect.width]);(0,j.Z)((function(){D()}),[D]);var P=(0,d.useCallback)((function(){"function"==typeof g.current&&(g.current(),g.current=null),a&&m.current&&(g.current=function(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=!0,animationFrame:c=!1}=r,s=o&&!c,u=s||i?[...w(e)?_(e):[],..._(t)]:[];u.forEach((e=>{s&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));let l,d=null;if(a){let r=!0;d=new ResizeObserver((()=>{r||n(),r=!1})),w(e)&&!c&&d.observe(e),d.observe(t)}let f=c?k(e):null;return c&&function t(){const r=k(e);!f||r.x===f.x&&r.y===f.y&&r.width===f.width&&r.height===f.height||n(),f=r,l=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach((e=>{s&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),null==(e=d)||e.disconnect(),d=null,c&&cancelAnimationFrame(l)}}(a,m.current,D,{elementResize:"ResizeObserver"in window}))}),[a,D]);(0,j.Z)((function(){P()}),[P]);var T=(0,d.useCallback)((function(e){m.current=e,P()}),[P]);if(!t&&"fixed"!==p||!C)return null;var R=(0,i.tZ)("div",(0,o.Z)({ref:T,css:h("menuPortal",{offset:C.offset,position:p,rect:C.rect}),className:c({"menu-portal":!0},r)},u),n);return(0,i.tZ)(oe.Provider,{value:x},t?(0,f.createPortal)(R,t):R)},LoadingMessage:de,NoOptionsMessage:le,MultiValue:function(e){var t=e.children,n=e.className,o=e.components,a=e.cx,c=e.data,s=e.getStyles,u=e.innerProps,l=e.isDisabled,d=e.removeProps,f=e.selectProps,p=o.Container,h=o.Label,m=o.Remove;return(0,i.tZ)(i.ms,null,(function(o){var g=o.css,v=o.cx;return(0,i.tZ)(p,{data:c,innerProps:(0,r.Z)({className:v(g(s("multiValue",e)),a({"multi-value":!0,"multi-value--is-disabled":l},n))},u),selectProps:f},(0,i.tZ)(h,{data:c,innerProps:{className:v(g(s("multiValueLabel",e)),a({"multi-value__label":!0},n))},selectProps:f},t),(0,i.tZ)(m,{data:c,innerProps:(0,r.Z)({className:v(g(s("multiValueRemove",e)),a({"multi-value__remove":!0},n)),"aria-label":"Remove ".concat(t||"option")},d),selectProps:f}))}))},MultiValueContainer:Ue,MultiValueLabel:Ue,MultiValueRemove:function(e){var t=e.children,n=e.innerProps;return(0,i.tZ)("div",(0,o.Z)({role:"button"},n),t||(0,i.tZ)(we,{size:14}))},Option:function(e){var t=e.children,n=e.className,r=e.cx,a=e.getStyles,c=e.isDisabled,s=e.isFocused,u=e.isSelected,l=e.innerRef,d=e.innerProps;return(0,i.tZ)("div",(0,o.Z)({css:a("option",e),className:r({option:!0,"option--is-disabled":c,"option--is-focused":s,"option--is-selected":u},n),ref:l,"aria-disabled":c},d),t)},Placeholder:function(e){var t=e.children,n=e.className,r=e.cx,a=e.getStyles,c=e.innerProps;return(0,i.tZ)("div",(0,o.Z)({css:a("placeholder",e),className:r({placeholder:!0},n)},c),t)},SelectContainer:function(e){var t=e.children,n=e.className,r=e.cx,a=e.getStyles,c=e.innerProps,s=e.isDisabled,u=e.isRtl;return(0,i.tZ)("div",(0,o.Z)({css:a("container",e),className:r({"--is-disabled":s,"--is-rtl":u},n)},c),t)},SingleValue:function(e){var t=e.children,n=e.className,r=e.cx,a=e.getStyles,c=e.isDisabled,s=e.innerProps;return(0,i.tZ)("div",(0,o.Z)({css:a("singleValue",e),className:r({"single-value":!0,"single-value--is-disabled":c},n)},s),t)},ValueContainer:function(e){var t=e.children,n=e.className,r=e.cx,a=e.innerProps,c=e.isMulti,s=e.getStyles,u=e.hasValue;return(0,i.tZ)("div",(0,o.Z)({css:s("valueContainer",e),className:r({"value-container":!0,"value-container--is-multi":c,"value-container--has-value":u},n)},a),t)}},qe=function(e){return(0,r.Z)((0,r.Z)({},Ye),e.components)}},46335:(e,t,n)=>{"use strict";var r=n(33890);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,a){if(a!==r){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},66462:(e,t,n)=>{e.exports=n(46335)()},33890:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},77208:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{!r&&c.return&&c.return()}finally{if(o)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};function o(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var i,a=n(6663),c=(i=a)&&i.__esModule?i:{default:i},s=function(e){return e};t.default=function(e){var t=Array.isArray(e)&&2===e.length?e:[e,null],n=r(t,2),i=n[0],a=n[1];return function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var u=n.map((function(e){return i[e]})).filter(s);return"string"==typeof u[0]||"function"==typeof a?{key:e,className:a?a.apply(void 0,o(u)):u.join(" ")}:{key:e,style:c.default.apply(void 0,[{}].concat(o(u)))}}},e.exports=t.default},6663:e=>{"use strict";var t=Object.prototype.propertyIsEnumerable;function n(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function r(e){var n=Object.getOwnPropertyNames(e);return Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(e))),n.filter((function(n){return t.call(e,n)}))}e.exports=Object.assign||function(e,t){for(var o,i,a=n(e),c=1;c<arguments.length;c++){o=arguments[c],i=r(Object(o));for(var s=0;s<i.length;s++)a[i[s]]=o[i[s]]}return a}},59211:e=>{var t=function(e){"use strict";var t,n=Object.prototype,r=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),a=new D(r||[]);return i._invoke=function(e,t,n){var r=d;return function(o,i){if(r===p)throw new Error("Generator is already running");if(r===h){if("throw"===o)throw i;return _()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var c=C(a,n);if(c){if(c===m)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===d)throw r=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=p;var s=l(e,t,n);if("normal"===s.type){if(r=n.done?h:f,s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r=h,n.method="throw",n.arg=s.arg)}}}(e,n,a),i}function l(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=u;var d="suspendedStart",f="suspendedYield",p="executing",h="completed",m={};function g(){}function v(){}function y(){}var b={};b[i]=function(){return this};var w=Object.getPrototypeOf,A=w&&w(w(P([])));A&&A!==n&&r.call(A,i)&&(b=A);var x=y.prototype=g.prototype=Object.create(b);function E(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function O(e,t){function n(o,i,a,c){var s=l(e[o],e,i);if("throw"!==s.type){var u=s.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,a,c)}),(function(e){n("throw",e,a,c)})):t.resolve(d).then((function(e){u.value=e,a(u)}),(function(e){return n("throw",e,a,c)}))}c(s.arg)}var o;this._invoke=function(e,r){function i(){return new t((function(t,o){n(e,r,t,o)}))}return o=o?o.then(i,i):i()}}function C(e,n){var r=e.iterator[n.method];if(r===t){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=t,C(e,n),"throw"===n.method))return m;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return m}var o=l(r,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,m;var i=o.arg;return i?i.done?(n[e.resultName]=i.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,m):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function k(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function S(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function D(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(k,this),this.reset(!0)}function P(e){if(e){var n=e[i];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return a.next=a}}return{next:_}}function _(){return{value:t,done:!0}}return v.prototype=x.constructor=y,y.constructor=v,v.displayName=s(y,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===v||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,c,"GeneratorFunction")),e.prototype=Object.create(x),e},e.awrap=function(e){return{__await:e}},E(O.prototype),O.prototype[a]=function(){return this},e.AsyncIterator=O,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new O(u(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},E(x),s(x,c,"Generator"),x[i]=function(){return this},x.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=P,D.prototype={constructor:D,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(S),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return c.type="throw",c.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(s&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),S(n),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;S(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:P(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}(e.exports);try{regeneratorRuntime=t}catch(e){Function("r","regeneratorRuntime = r")(t)}},53090:e=>{"use strict";var t=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{!r&&c.return&&c.return()}finally{if(o)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};e.exports=function(e){var n=e.data,r=e.multiSection;function o(e){var o=t(e,2),i=o[0],a=o[1];return r?null===a||a===n[i]-1?null===(i=function(e){for(null===e?e=0:e++;e<n.length&&0===n[e];)e++;return e===n.length?null:e}(i))?[null,null]:[i,0]:[i,a+1]:0===n||a===n-1?[null,null]:null===a?[null,0]:[null,a+1]}return{next:o,prev:function(e){var o=t(e,2),i=o[0],a=o[1];return r?null===a||0===a?null===(i=function(e){for(null===e?e=n.length-1:e--;e>=0&&0===n[e];)e--;return-1===e?null:e}(i))?[null,null]:[i,n[i]-1]:[i,a-1]:0===n||0===a?[null,null]:null===a?[null,n-1]:[null,a-1]},isLast:function(e){return null===o(e)[1]}}}},78858:e=>{"use strict";e.exports=function(e,t){if(e===t)return!0;if(!e||!t)return!1;var n=e.length;if(t.length!==n)return!1;for(var r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}},83109:function(e,t){var n,r,o;/*! tether 1.4.7 */r=[],n=function(){"use strict";var e=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var n=void 0;void 0===n&&(n={modules:[]});var r=null;function o(e){var t=e.getBoundingClientRect(),n={};for(var r in t)n[r]=t[r];try{if(e.ownerDocument!==document){var i=e.ownerDocument.defaultView.frameElement;if(i){var a=o(i);n.top+=a.top,n.bottom+=a.top,n.left+=a.left,n.right+=a.left}}}catch(e){}return n}function i(e){var t=(getComputedStyle(e)||{}).position,n=[];if("fixed"===t)return[e];for(var r=e;(r=r.parentNode)&&r&&1===r.nodeType;){var o=void 0;try{o=getComputedStyle(r)}catch(e){}if(null==o)return n.push(r),n;var i=o,a=i.overflow,c=i.overflowX,s=i.overflowY;/(auto|scroll|overlay)/.test(a+s+c)&&("absolute"!==t||["relative","absolute","fixed"].indexOf(o.position)>=0)&&n.push(r)}return n.push(e.ownerDocument.body),e.ownerDocument!==document&&n.push(e.ownerDocument.defaultView),n}var a,c=(a=0,function(){return++a}),s={},u=function(){var e=r;e&&document.body.contains(e)||((e=document.createElement("div")).setAttribute("data-tether-id",c()),m(e.style,{top:0,left:0,position:"absolute"}),document.body.appendChild(e),r=e);var t=e.getAttribute("data-tether-id");return void 0===s[t]&&(s[t]=o(e),E((function(){delete s[t]}))),s[t]};function l(){r&&document.body.removeChild(r),r=null}function d(e){var t=void 0;e===document?(t=document,e=document.documentElement):t=e.ownerDocument;var n=t.documentElement,r=o(e),i=u();return r.top-=i.top,r.left-=i.left,void 0===r.width&&(r.width=document.body.scrollWidth-r.left-r.right),void 0===r.height&&(r.height=document.body.scrollHeight-r.top-r.bottom),r.top=r.top-n.clientTop,r.left=r.left-n.clientLeft,r.right=t.body.clientWidth-r.width-r.left,r.bottom=t.body.clientHeight-r.height-r.top,r}function f(e){return e.offsetParent||document.documentElement}var p=null;function h(){if(p)return p;var e=document.createElement("div");e.style.width="100%",e.style.height="200px";var t=document.createElement("div");m(t.style,{position:"absolute",top:0,left:0,pointerEvents:"none",visibility:"hidden",width:"200px",height:"150px",overflow:"hidden"}),t.appendChild(e),document.body.appendChild(t);var n=e.offsetWidth;t.style.overflow="scroll";var r=e.offsetWidth;n===r&&(r=t.clientWidth),document.body.removeChild(t);var o=n-r;return p={width:o,height:o}}function m(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=[];return Array.prototype.push.apply(t,arguments),t.slice(1).forEach((function(t){if(t)for(var n in t)({}).hasOwnProperty.call(t,n)&&(e[n]=t[n])})),e}function g(e,t){if(void 0!==e.classList)t.split(" ").forEach((function(t){t.trim()&&e.classList.remove(t)}));else{var n=new RegExp("(^| )"+t.split(" ").join("|")+"( |$)","gi"),r=b(e).replace(n," ");w(e,r)}}function v(e,t){if(void 0!==e.classList)t.split(" ").forEach((function(t){t.trim()&&e.classList.add(t)}));else{g(e,t);var n=b(e)+" "+t;w(e,n)}}function y(e,t){if(void 0!==e.classList)return e.classList.contains(t);var n=b(e);return new RegExp("(^| )"+t+"( |$)","gi").test(n)}function b(e){return e.className instanceof e.ownerDocument.defaultView.SVGAnimatedString?e.className.baseVal:e.className}function w(e,t){e.setAttribute("class",t)}function A(e,t,n){n.forEach((function(n){-1===t.indexOf(n)&&y(e,n)&&g(e,n)})),t.forEach((function(t){y(e,t)||v(e,t)}))}var x=[],E=function(e){x.push(e)},O=function(){for(var e=void 0;e=x.pop();)e()},C=function(){function n(){t(this,n)}return e(n,[{key:"on",value:function(e,t,n){var r=!(arguments.length<=3||void 0===arguments[3])&&arguments[3];void 0===this.bindings&&(this.bindings={}),void 0===this.bindings[e]&&(this.bindings[e]=[]),this.bindings[e].push({handler:t,ctx:n,once:r})}},{key:"once",value:function(e,t,n){this.on(e,t,n,!0)}},{key:"off",value:function(e,t){if(void 0!==this.bindings&&void 0!==this.bindings[e])if(void 0===t)delete this.bindings[e];else for(var n=0;n<this.bindings[e].length;)this.bindings[e][n].handler===t?this.bindings[e].splice(n,1):++n}},{key:"trigger",value:function(e){if(void 0!==this.bindings&&this.bindings[e]){for(var t=0,n=arguments.length,r=Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];for(;t<this.bindings[e].length;){var i=this.bindings[e][t],a=i.handler,c=i.ctx,s=i.once,u=c;void 0===u&&(u=this),a.apply(u,r),s?this.bindings[e].splice(t,1):++t}}}}]),n}();n.Utils={getActualBoundingClientRect:o,getScrollParents:i,getBounds:d,getOffsetParent:f,extend:m,addClass:v,removeClass:g,hasClass:y,updateClasses:A,defer:E,flush:O,uniqueId:c,Evented:C,getScrollBarSize:h,removeUtilElements:l};var k=function(){function e(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{!r&&c.return&&c.return()}finally{if(o)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),S=(e=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),function(e,t,n){for(var r=!0;r;){var o=e,i=t,a=n;r=!1,null===o&&(o=Function.prototype);var c=Object.getOwnPropertyDescriptor(o,i);if(void 0!==c){if("value"in c)return c.value;var s=c.get;if(void 0===s)return;return s.call(a)}var u=Object.getPrototypeOf(o);if(null===u)return;e=u,t=i,n=a,r=!0,c=u=void 0}});function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function D(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}if(void 0===n)throw new Error("You must include the utils.js file before tether.js");var i=(K=n.Utils).getScrollParents,f=(d=K.getBounds,K.getOffsetParent),v=(m=K.extend,K.addClass),g=K.removeClass,h=(A=K.updateClasses,E=K.defer,O=K.flush,K.getScrollBarSize),l=K.removeUtilElements;function P(e,t){var n=arguments.length<=2||void 0===arguments[2]?1:arguments[2];return e+n>=t&&t>=e-n}var _,j,T,R,I=function(){if("undefined"==typeof document)return"";for(var e=document.createElement("div"),t=["transform","WebkitTransform","OTransform","MozTransform","msTransform"],n=0;n<t.length;++n){var r=t[n];if(void 0!==e.style[r])return r}}(),M=[],N=function(){M.forEach((function(e){e.position(!1)})),O()};function B(){return"object"==typeof performance&&"function"==typeof performance.now?performance.now():+new Date}_=null,j=null,T=null,R=function e(){if(void 0!==j&&j>16)return j=Math.min(j-16,250),void(T=setTimeout(e,250));void 0!==_&&B()-_<10||(null!=T&&(clearTimeout(T),T=null),_=B(),N(),j=B()-_)},"undefined"!=typeof window&&void 0!==window.addEventListener&&["resize","scroll","touchmove"].forEach((function(e){window.addEventListener(e,R)}));var Z={center:"center",left:"right",right:"left"},F={middle:"middle",top:"bottom",bottom:"top"},L={top:0,left:0,middle:"50%",center:"50%",bottom:"100%",right:"100%"},H=function(e,t){var n=e.left,r=e.top;return"auto"===n&&(n=Z[t.left]),"auto"===r&&(r=F[t.top]),{left:n,top:r}},U=function(e){var t=e.left,n=e.top;return void 0!==L[e.left]&&(t=L[e.left]),void 0!==L[e.top]&&(n=L[e.top]),{left:t,top:n}};function z(){for(var e={top:0,left:0},t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.forEach((function(t){var n=t.top,r=t.left;"string"==typeof n&&(n=parseFloat(n,10)),"string"==typeof r&&(r=parseFloat(r,10)),e.top+=n,e.left+=r})),e}function W(e,t){return"string"==typeof e.left&&-1!==e.left.indexOf("%")&&(e.left=parseFloat(e.left,10)/100*t.width),"string"==typeof e.top&&-1!==e.top.indexOf("%")&&(e.top=parseFloat(e.top,10)/100*t.height),e}var V=function(e){var t=e.split(" "),n=k(t,2);return{top:n[0],left:n[1]}},Y=V,q=function(r){function o(e){var r=this;t(this,o),S(Object.getPrototypeOf(o.prototype),"constructor",this).call(this),this.position=this.position.bind(this),M.push(this),this.history=[],this.setOptions(e,!1),n.modules.forEach((function(e){void 0!==e.initialize&&e.initialize.call(r)})),this.position()}return D(o,r),e(o,[{key:"getClass",value:function(){var e=arguments.length<=0||void 0===arguments[0]?"":arguments[0],t=this.options.classes;return void 0!==t&&t[e]?this.options.classes[e]:this.options.classPrefix?this.options.classPrefix+"-"+e:e}},{key:"setOptions",value:function(e){var t=this,n=arguments.length<=1||void 0===arguments[1]||arguments[1],r={offset:"0 0",targetOffset:"0 0",targetAttachment:"auto auto",classPrefix:"tether"};this.options=m(r,e);var o=this.options,a=o.element,c=o.target,s=o.targetModifier;if(this.element=a,this.target=c,this.targetModifier=s,"viewport"===this.target?(this.target=document.body,this.targetModifier="visible"):"scroll-handle"===this.target&&(this.target=document.body,this.targetModifier="scroll-handle"),["element","target"].forEach((function(e){if(void 0===t[e])throw new Error("Tether Error: Both element and target must be defined");void 0!==t[e].jquery?t[e]=t[e][0]:"string"==typeof t[e]&&(t[e]=document.querySelector(t[e]))})),v(this.element,this.getClass("element")),!1!==this.options.addTargetClasses&&v(this.target,this.getClass("target")),!this.options.attachment)throw new Error("Tether Error: You must provide an attachment");this.targetAttachment=Y(this.options.targetAttachment),this.attachment=Y(this.options.attachment),this.offset=V(this.options.offset),this.targetOffset=V(this.options.targetOffset),void 0!==this.scrollParents&&this.disable(),"scroll-handle"===this.targetModifier?this.scrollParents=[this.target]:this.scrollParents=i(this.target),!1!==this.options.enabled&&this.enable(n)}},{key:"getTargetBounds",value:function(){if(void 0===this.targetModifier)return d(this.target);if("visible"===this.targetModifier)return this.target===document.body?{top:pageYOffset,left:pageXOffset,height:innerHeight,width:innerWidth}:((i={height:(e=d(this.target)).height,width:e.width,top:e.top,left:e.left}).height=Math.min(i.height,e.height-(pageYOffset-e.top)),i.height=Math.min(i.height,e.height-(e.top+e.height-(pageYOffset+innerHeight))),i.height=Math.min(innerHeight,i.height),i.height-=2,i.width=Math.min(i.width,e.width-(pageXOffset-e.left)),i.width=Math.min(i.width,e.width-(e.left+e.width-(pageXOffset+innerWidth))),i.width=Math.min(innerWidth,i.width),i.width-=2,i.top<pageYOffset&&(i.top=pageYOffset),i.left<pageXOffset&&(i.left=pageXOffset),i);if("scroll-handle"===this.targetModifier){var e=void 0,t=this.target;t===document.body?(t=document.documentElement,e={left:pageXOffset,top:pageYOffset,height:innerHeight,width:innerWidth}):e=d(t);var n=getComputedStyle(t),r=0;(t.scrollWidth>t.clientWidth||[n.overflow,n.overflowX].indexOf("scroll")>=0||this.target!==document.body)&&(r=15);var o=e.height-parseFloat(n.borderTopWidth)-parseFloat(n.borderBottomWidth)-r,i={width:15,height:.975*o*(o/t.scrollHeight),left:e.left+e.width-parseFloat(n.borderLeftWidth)-15},a=0;o<408&&this.target===document.body&&(a=-11e-5*Math.pow(o,2)-.00727*o+22.58),this.target!==document.body&&(i.height=Math.max(i.height,24));var c=this.target.scrollTop/(t.scrollHeight-o);return i.top=c*(o-i.height-a)+e.top+parseFloat(n.borderTopWidth),this.target===document.body&&(i.height=Math.max(i.height,24)),i}}},{key:"clearCache",value:function(){this._cache={}}},{key:"cache",value:function(e,t){return void 0===this._cache&&(this._cache={}),void 0===this._cache[e]&&(this._cache[e]=t.call(this)),this._cache[e]}},{key:"enable",value:function(){var e=this,t=arguments.length<=0||void 0===arguments[0]||arguments[0];!1!==this.options.addTargetClasses&&v(this.target,this.getClass("enabled")),v(this.element,this.getClass("enabled")),this.enabled=!0,this.scrollParents.forEach((function(t){t!==e.target.ownerDocument&&t.addEventListener("scroll",e.position)})),t&&this.position()}},{key:"disable",value:function(){var e=this;g(this.target,this.getClass("enabled")),g(this.element,this.getClass("enabled")),this.enabled=!1,void 0!==this.scrollParents&&this.scrollParents.forEach((function(t){t.removeEventListener("scroll",e.position)}))}},{key:"destroy",value:function(){var e=this;this.disable(),M.forEach((function(t,n){t===e&&M.splice(n,1)})),0===M.length&&l()}},{key:"updateAttachClasses",value:function(e,t){var n=this;e=e||this.attachment,t=t||this.targetAttachment;var r=["left","top","bottom","right","middle","center"];void 0!==this._addAttachClasses&&this._addAttachClasses.length&&this._addAttachClasses.splice(0,this._addAttachClasses.length),void 0===this._addAttachClasses&&(this._addAttachClasses=[]);var o=this._addAttachClasses;e.top&&o.push(this.getClass("element-attached")+"-"+e.top),e.left&&o.push(this.getClass("element-attached")+"-"+e.left),t.top&&o.push(this.getClass("target-attached")+"-"+t.top),t.left&&o.push(this.getClass("target-attached")+"-"+t.left);var i=[];r.forEach((function(e){i.push(n.getClass("element-attached")+"-"+e),i.push(n.getClass("target-attached")+"-"+e)})),E((function(){void 0!==n._addAttachClasses&&(A(n.element,n._addAttachClasses,i),!1!==n.options.addTargetClasses&&A(n.target,n._addAttachClasses,i),delete n._addAttachClasses)}))}},{key:"position",value:function(){var e=this,t=arguments.length<=0||void 0===arguments[0]||arguments[0];if(this.enabled){this.clearCache();var r=H(this.targetAttachment,this.attachment);this.updateAttachClasses(this.attachment,r);var o=this.cache("element-bounds",(function(){return d(e.element)})),i=o.width,a=o.height;if(0===i&&0===a&&void 0!==this.lastSize){var c=this.lastSize;i=c.width,a=c.height}else this.lastSize={width:i,height:a};var s=this.cache("target-bounds",(function(){return e.getTargetBounds()})),u=s,l=W(U(this.attachment),{width:i,height:a}),p=W(U(r),u),m=W(this.offset,{width:i,height:a}),g=W(this.targetOffset,u);l=z(l,m),p=z(p,g);for(var v=s.left+p.left-l.left,y=s.top+p.top-l.top,b=0;b<n.modules.length;++b){var w=n.modules[b].position.call(this,{left:v,top:y,targetAttachment:r,targetPos:s,elementPos:o,offset:l,targetOffset:p,manualOffset:m,manualTargetOffset:g,scrollbarSize:C,attachment:this.attachment});if(!1===w)return!1;void 0!==w&&"object"==typeof w&&(y=w.top,v=w.left)}var A={page:{top:y,left:v},viewport:{top:y-pageYOffset,bottom:pageYOffset-y-a+innerHeight,left:v-pageXOffset,right:pageXOffset-v-i+innerWidth}},x=this.target.ownerDocument,E=x.defaultView,C=void 0;return E.innerHeight>x.documentElement.clientHeight&&(C=this.cache("scrollbar-size",h),A.viewport.bottom-=C.height),E.innerWidth>x.documentElement.clientWidth&&(C=this.cache("scrollbar-size",h),A.viewport.right-=C.width),-1!==["","static"].indexOf(x.body.style.position)&&-1!==["","static"].indexOf(x.body.parentElement.style.position)||(A.page.bottom=x.body.scrollHeight-y-a,A.page.right=x.body.scrollWidth-v-i),void 0!==this.options.optimizations&&!1!==this.options.optimizations.moveElement&&void 0===this.targetModifier&&function(){var t=e.cache("target-offsetparent",(function(){return f(e.target)})),n=e.cache("target-offsetparent-bounds",(function(){return d(t)})),r=getComputedStyle(t),o=n,i={};if(["Top","Left","Bottom","Right"].forEach((function(e){i[e.toLowerCase()]=parseFloat(r["border"+e+"Width"])})),n.right=x.body.scrollWidth-n.left-o.width+i.right,n.bottom=x.body.scrollHeight-n.top-o.height+i.bottom,A.page.top>=n.top+i.top&&A.page.bottom>=n.bottom&&A.page.left>=n.left+i.left&&A.page.right>=n.right){var a=t.scrollTop,c=t.scrollLeft;A.offset={top:A.page.top-n.top+a-i.top,left:A.page.left-n.left+c-i.left}}}(),this.move(A),this.history.unshift(A),this.history.length>3&&this.history.pop(),t&&O(),!0}}},{key:"move",value:function(e){var t=this;if(void 0!==this.element.parentNode){var n={};for(var r in e)for(var o in n[r]={},e[r]){for(var i=!1,a=0;a<this.history.length;++a){var c=this.history[a];if(void 0!==c[r]&&!P(c[r][o],e[r][o])){i=!0;break}}i||(n[r][o]=!0)}var s={top:"",left:"",right:"",bottom:""},u=function(e,n){if(!1!==(void 0!==t.options.optimizations?t.options.optimizations.gpu:null)){var r=void 0,o=void 0;e.top?(s.top=0,r=n.top):(s.bottom=0,r=-n.bottom),e.left?(s.left=0,o=n.left):(s.right=0,o=-n.right),"number"==typeof window.devicePixelRatio&&devicePixelRatio%1==0&&(o=Math.round(o*devicePixelRatio)/devicePixelRatio,r=Math.round(r*devicePixelRatio)/devicePixelRatio),s[I]="translateX("+o+"px) translateY("+r+"px)","msTransform"!==I&&(s[I]+=" translateZ(0)")}else e.top?s.top=n.top+"px":s.bottom=n.bottom+"px",e.left?s.left=n.left+"px":s.right=n.right+"px"},l=!1;if((n.page.top||n.page.bottom)&&(n.page.left||n.page.right)?(s.position="absolute",u(n.page,e.page)):(n.viewport.top||n.viewport.bottom)&&(n.viewport.left||n.viewport.right)?(s.position="fixed",u(n.viewport,e.viewport)):void 0!==n.offset&&n.offset.top&&n.offset.left?function(){s.position="absolute";var r=t.cache("target-offsetparent",(function(){return f(t.target)}));f(t.element)!==r&&E((function(){t.element.parentNode.removeChild(t.element),r.appendChild(t.element)})),u(n.offset,e.offset),l=!0}():(s.position="absolute",u({top:!0,left:!0},e.page)),!l)if(this.options.bodyElement)this.element.parentNode!==this.options.bodyElement&&this.options.bodyElement.appendChild(this.element);else{for(var d=function(e){var t=e.ownerDocument;return(t.fullscreenElement||t.webkitFullscreenElement||t.mozFullScreenElement||t.msFullscreenElement)===e},p=!0,h=this.element.parentNode;h&&1===h.nodeType&&"BODY"!==h.tagName&&!d(h);){if("static"!==getComputedStyle(h).position){p=!1;break}h=h.parentNode}p||(this.element.parentNode.removeChild(this.element),this.element.ownerDocument.body.appendChild(this.element))}var g={},v=!1;for(var o in s){var y=s[o];this.element.style[o]!==y&&(v=!0,g[o]=y)}v&&E((function(){m(t.element.style,g),t.trigger("repositioned")}))}}}]),o}(C);q.modules=[],n.position=N;var G=m(q,n);k=function(){function e(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{!r&&c.return&&c.return()}finally{if(o)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),d=(K=n.Utils).getBounds;var m=K.extend,Q=(A=K.updateClasses,E=K.defer,["left","top","right","bottom"]);function X(e,t){return"scrollParent"===t?t=e.scrollParents[0]:"window"===t&&(t=[pageXOffset,pageYOffset,innerWidth+pageXOffset,innerHeight+pageYOffset]),t===document&&(t=t.documentElement),void 0!==t.nodeType&&function(){var e=t,n=d(t),r=n,o=getComputedStyle(t);if(t=[r.left,r.top,n.width+r.left,n.height+r.top],e.ownerDocument!==document){var i=e.ownerDocument.defaultView;t[0]+=i.pageXOffset,t[1]+=i.pageYOffset,t[2]+=i.pageXOffset,t[3]+=i.pageYOffset}Q.forEach((function(e,n){"Top"===(e=e[0].toUpperCase()+e.substr(1))||"Left"===e?t[n]+=parseFloat(o["border"+e+"Width"]):t[n]-=parseFloat(o["border"+e+"Width"])}))}(),t}n.modules.push({position:function(e){var t=this,n=e.top,r=e.left,o=e.targetAttachment;if(!this.options.constraints)return!0;var i=this.cache("element-bounds",(function(){return d(t.element)})),a=i.height,c=i.width;if(0===c&&0===a&&void 0!==this.lastSize){var s=this.lastSize;c=s.width,a=s.height}var u=this.cache("target-bounds",(function(){return t.getTargetBounds()})),l=u.height,f=u.width,p=[this.getClass("pinned"),this.getClass("out-of-bounds")];this.options.constraints.forEach((function(e){var t=e.outOfBoundsClass,n=e.pinnedClass;t&&p.push(t),n&&p.push(n)})),p.forEach((function(e){["left","top","right","bottom"].forEach((function(t){p.push(e+"-"+t)}))}));var h=[],g=m({},o),v=m({},this.attachment);return this.options.constraints.forEach((function(e){var i=e.to,s=e.attachment,u=e.pin;void 0===s&&(s="");var d=void 0,p=void 0;if(s.indexOf(" ")>=0){var m=s.split(" "),y=k(m,2);p=y[0],d=y[1]}else d=p=s;var b=X(t,i);"target"!==p&&"both"!==p||(n<b[1]&&"top"===g.top&&(n+=l,g.top="bottom"),n+a>b[3]&&"bottom"===g.top&&(n-=l,g.top="top")),"together"===p&&("top"===g.top&&("bottom"===v.top&&n<b[1]?(n+=l,g.top="bottom",n+=a,v.top="top"):"top"===v.top&&n+a>b[3]&&n-(a-l)>=b[1]&&(n-=a-l,g.top="bottom",v.top="bottom")),"bottom"===g.top&&("top"===v.top&&n+a>b[3]?(n-=l,g.top="top",n-=a,v.top="bottom"):"bottom"===v.top&&n<b[1]&&n+(2*a-l)<=b[3]&&(n+=a-l,g.top="top",v.top="top")),"middle"===g.top&&(n+a>b[3]&&"top"===v.top?(n-=a,v.top="bottom"):n<b[1]&&"bottom"===v.top&&(n+=a,v.top="top"))),"target"!==d&&"both"!==d||(r<b[0]&&"left"===g.left&&(r+=f,g.left="right"),r+c>b[2]&&"right"===g.left&&(r-=f,g.left="left")),"together"===d&&(r<b[0]&&"left"===g.left?"right"===v.left?(r+=f,g.left="right",r+=c,v.left="left"):"left"===v.left&&(r+=f,g.left="right",r-=c,v.left="right"):r+c>b[2]&&"right"===g.left?"left"===v.left?(r-=f,g.left="left",r-=c,v.left="right"):"right"===v.left&&(r-=f,g.left="left",r+=c,v.left="left"):"center"===g.left&&(r+c>b[2]&&"left"===v.left?(r-=c,v.left="right"):r<b[0]&&"right"===v.left&&(r+=c,v.left="left"))),"element"!==p&&"both"!==p||(n<b[1]&&"bottom"===v.top&&(n+=a,v.top="top"),n+a>b[3]&&"top"===v.top&&(n-=a,v.top="bottom")),"element"!==d&&"both"!==d||(r<b[0]&&("right"===v.left?(r+=c,v.left="left"):"center"===v.left&&(r+=c/2,v.left="left")),r+c>b[2]&&("left"===v.left?(r-=c,v.left="right"):"center"===v.left&&(r-=c/2,v.left="right"))),"string"==typeof u?u=u.split(",").map((function(e){return e.trim()})):!0===u&&(u=["top","left","right","bottom"]),u=u||[];var w,A,x=[],E=[];n<b[1]&&(u.indexOf("top")>=0?(n=b[1],x.push("top")):E.push("top")),n+a>b[3]&&(u.indexOf("bottom")>=0?(n=b[3]-a,x.push("bottom")):E.push("bottom")),r<b[0]&&(u.indexOf("left")>=0?(r=b[0],x.push("left")):E.push("left")),r+c>b[2]&&(u.indexOf("right")>=0?(r=b[2]-c,x.push("right")):E.push("right")),x.length&&(w=void 0,w=void 0!==t.options.pinnedClass?t.options.pinnedClass:t.getClass("pinned"),h.push(w),x.forEach((function(e){h.push(w+"-"+e)}))),E.length&&(A=void 0,A=void 0!==t.options.outOfBoundsClass?t.options.outOfBoundsClass:t.getClass("out-of-bounds"),h.push(A),E.forEach((function(e){h.push(A+"-"+e)}))),(x.indexOf("left")>=0||x.indexOf("right")>=0)&&(v.left=g.left=!1),(x.indexOf("top")>=0||x.indexOf("bottom")>=0)&&(v.top=g.top=!1),g.top===o.top&&g.left===o.left&&v.top===t.attachment.top&&v.left===t.attachment.left||(t.updateAttachClasses(v,g),t.trigger("update",{attachment:v,targetAttachment:g}))})),E((function(){!1!==t.options.addTargetClasses&&A(t.target,h,p),A(t.element,h,p)})),{top:n,left:r}}});var K,d=(K=n.Utils).getBounds,A=K.updateClasses;return E=K.defer,n.modules.push({position:function(e){var t=this,n=e.top,r=e.left,o=this.cache("element-bounds",(function(){return d(t.element)})),i=o.height,a=o.width,c=this.getTargetBounds(),s=n+i,u=r+a,l=[];n<=c.bottom&&s>=c.top&&["left","right"].forEach((function(e){var t=c[e];t!==r&&t!==u||l.push(e)})),r<=c.right&&u>=c.left&&["top","bottom"].forEach((function(e){var t=c[e];t!==n&&t!==s||l.push(e)}));var f=[],p=[],h=["left","top","right","bottom"];return f.push(this.getClass("abutted")),h.forEach((function(e){f.push(t.getClass("abutted")+"-"+e)})),l.length&&p.push(this.getClass("abutted")),l.forEach((function(e){p.push(t.getClass("abutted")+"-"+e)})),E((function(){!1!==t.options.addTargetClasses&&A(t.target,p,f),A(t.element,p,f)})),!0}}),k=function(){function e(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{!r&&c.return&&c.return()}finally{if(o)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),n.modules.push({position:function(e){var t=e.top,n=e.left;if(this.options.shift){var r=this.options.shift;"function"==typeof this.options.shift&&(r=this.options.shift.call(this,{top:t,left:n}));var o=void 0,i=void 0;if("string"==typeof r){(r=r.split(" "))[1]=r[1]||r[0];var a=k(r,2);o=a[0],i=a[1],o=parseFloat(o,10),i=parseFloat(i,10)}else o=r.top,i=r.left;return{top:t+=o,left:n+=i}}}}),G},void 0===(o="function"==typeof n?n.apply(t,r):n)||(e.exports=o)},6919:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(1024);const o=r.useLayoutEffect},99874:e=>{"use strict";var t=function(){};e.exports=t},13615:function(e){
63
63
  /*! @license DOMPurify 2.4.0 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.4.0/LICENSE */
64
- e.exports=function(){"use strict";function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,n){return t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},t(e,n)}function n(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function r(e,o,i){return r=n()?Reflect.construct:function(e,n,r){var o=[null];o.push.apply(o,n);var i=new(Function.bind.apply(e,o));return r&&t(i,r.prototype),i},r.apply(null,arguments)}function o(e){return i(e)||a(e)||c(e)||u()}function i(e){if(Array.isArray(e))return s(e)}function a(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function c(e,t){if(e){if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function u(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l=Object.hasOwnProperty,d=Object.setPrototypeOf,f=Object.isFrozen,p=Object.getPrototypeOf,h=Object.getOwnPropertyDescriptor,m=Object.freeze,g=Object.seal,v=Object.create,y="undefined"!=typeof Reflect&&Reflect,b=y.apply,w=y.construct;b||(b=function(e,t,n){return e.apply(t,n)}),m||(m=function(e){return e}),g||(g=function(e){return e}),w||(w=function(e,t){return r(e,o(t))});var A=j(Array.prototype.forEach),x=j(Array.prototype.pop),E=j(Array.prototype.push),O=j(String.prototype.toLowerCase),C=j(String.prototype.match),k=j(String.prototype.replace),S=j(String.prototype.indexOf),D=j(String.prototype.trim),P=j(RegExp.prototype.test),_=T(TypeError);function j(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return b(e,t,r)}}function T(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return w(e,n)}}function R(e,t,n){n=n||O,d&&d(e,null);for(var r=t.length;r--;){var o=t[r];if("string"==typeof o){var i=n(o);i!==o&&(f(t)||(t[r]=i),o=i)}e[o]=!0}return e}function I(e){var t,n=v(null);for(t in e)b(l,e,[t])&&(n[t]=e[t]);return n}function M(e,t){for(;null!==e;){var n=h(e,t);if(n){if(n.get)return j(n.get);if("function"==typeof n.value)return j(n.value)}e=p(e)}function r(e){return console.warn("fallback value for",e),null}return r}var N=m(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),B=m(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Z=m(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),F=m(["animate","color-profile","cursor","discard","fedropshadow","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),L=m(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),H=m(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),U=m(["#text"]),z=m(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),W=m(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),V=m(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Y=m(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),q=g(/\{\{[\w\W]*|[\w\W]*\}\}/gm),G=g(/<%[\w\W]*|[\w\W]*%>/gm),Q=g(/^data-[\-\w.\u00B7-\uFFFF]/),X=g(/^aria-[\-\w]+$/),K=g(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),$=g(/^(?:\w+script|data):/i),J=g(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),ee=g(/^html$/i),te=function(){return"undefined"==typeof window?null:window},ne=function(t,n){if("object"!==e(t)||"function"!=typeof t.createPolicy)return null;var r=null,o="data-tt-policy-suffix";n.currentScript&&n.currentScript.hasAttribute(o)&&(r=n.currentScript.getAttribute(o));var i="dompurify"+(r?"#"+r:"");try{return t.createPolicy(i,{createHTML:function(e){return e},createScriptURL:function(e){return e}})}catch(e){return console.warn("TrustedTypes policy "+i+" could not be created."),null}};function re(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:te(),n=function(e){return re(e)};if(n.version="2.4.0",n.removed=[],!t||!t.document||9!==t.document.nodeType)return n.isSupported=!1,n;var r=t.document,i=t.document,a=t.DocumentFragment,c=t.HTMLTemplateElement,s=t.Node,u=t.Element,l=t.NodeFilter,d=t.NamedNodeMap,f=void 0===d?t.NamedNodeMap||t.MozNamedAttrMap:d,p=t.HTMLFormElement,h=t.DOMParser,g=t.trustedTypes,v=u.prototype,y=M(v,"cloneNode"),b=M(v,"nextSibling"),w=M(v,"childNodes"),j=M(v,"parentNode");if("function"==typeof c){var T=i.createElement("template");T.content&&T.content.ownerDocument&&(i=T.content.ownerDocument)}var oe=ne(g,r),ie=oe?oe.createHTML(""):"",ae=i,ce=ae.implementation,se=ae.createNodeIterator,ue=ae.createDocumentFragment,le=ae.getElementsByTagName,de=r.importNode,fe={};try{fe=I(i).documentMode?i.documentMode:{}}catch(e){}var pe={};n.isSupported="function"==typeof j&&ce&&void 0!==ce.createHTMLDocument&&9!==fe;var he,me,ge=q,ve=G,ye=Q,be=X,we=$,Ae=J,xe=K,Ee=null,Oe=R({},[].concat(o(N),o(B),o(Z),o(L),o(U))),Ce=null,ke=R({},[].concat(o(z),o(W),o(V),o(Y))),Se=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),De=null,Pe=null,_e=!0,je=!0,Te=!1,Re=!1,Ie=!1,Me=!1,Ne=!1,Be=!1,Ze=!1,Fe=!1,Le=!0,He=!1,Ue="user-content-",ze=!0,We=!1,Ve={},Ye=null,qe=R({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),Ge=null,Qe=R({},["audio","video","img","source","image","track"]),Xe=null,Ke=R({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),$e="http://www.w3.org/1998/Math/MathML",Je="http://www.w3.org/2000/svg",et="http://www.w3.org/1999/xhtml",tt=et,nt=!1,rt=["application/xhtml+xml","text/html"],ot="text/html",it=null,at=i.createElement("form"),ct=function(e){return e instanceof RegExp||e instanceof Function},st=function(t){it&&it===t||(t&&"object"===e(t)||(t={}),t=I(t),he=he=-1===rt.indexOf(t.PARSER_MEDIA_TYPE)?ot:t.PARSER_MEDIA_TYPE,me="application/xhtml+xml"===he?function(e){return e}:O,Ee="ALLOWED_TAGS"in t?R({},t.ALLOWED_TAGS,me):Oe,Ce="ALLOWED_ATTR"in t?R({},t.ALLOWED_ATTR,me):ke,Xe="ADD_URI_SAFE_ATTR"in t?R(I(Ke),t.ADD_URI_SAFE_ATTR,me):Ke,Ge="ADD_DATA_URI_TAGS"in t?R(I(Qe),t.ADD_DATA_URI_TAGS,me):Qe,Ye="FORBID_CONTENTS"in t?R({},t.FORBID_CONTENTS,me):qe,De="FORBID_TAGS"in t?R({},t.FORBID_TAGS,me):{},Pe="FORBID_ATTR"in t?R({},t.FORBID_ATTR,me):{},Ve="USE_PROFILES"in t&&t.USE_PROFILES,_e=!1!==t.ALLOW_ARIA_ATTR,je=!1!==t.ALLOW_DATA_ATTR,Te=t.ALLOW_UNKNOWN_PROTOCOLS||!1,Re=t.SAFE_FOR_TEMPLATES||!1,Ie=t.WHOLE_DOCUMENT||!1,Be=t.RETURN_DOM||!1,Ze=t.RETURN_DOM_FRAGMENT||!1,Fe=t.RETURN_TRUSTED_TYPE||!1,Ne=t.FORCE_BODY||!1,Le=!1!==t.SANITIZE_DOM,He=t.SANITIZE_NAMED_PROPS||!1,ze=!1!==t.KEEP_CONTENT,We=t.IN_PLACE||!1,xe=t.ALLOWED_URI_REGEXP||xe,tt=t.NAMESPACE||et,t.CUSTOM_ELEMENT_HANDLING&&ct(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Se.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&ct(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Se.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Se.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Re&&(je=!1),Ze&&(Be=!0),Ve&&(Ee=R({},o(U)),Ce=[],!0===Ve.html&&(R(Ee,N),R(Ce,z)),!0===Ve.svg&&(R(Ee,B),R(Ce,W),R(Ce,Y)),!0===Ve.svgFilters&&(R(Ee,Z),R(Ce,W),R(Ce,Y)),!0===Ve.mathMl&&(R(Ee,L),R(Ce,V),R(Ce,Y))),t.ADD_TAGS&&(Ee===Oe&&(Ee=I(Ee)),R(Ee,t.ADD_TAGS,me)),t.ADD_ATTR&&(Ce===ke&&(Ce=I(Ce)),R(Ce,t.ADD_ATTR,me)),t.ADD_URI_SAFE_ATTR&&R(Xe,t.ADD_URI_SAFE_ATTR,me),t.FORBID_CONTENTS&&(Ye===qe&&(Ye=I(Ye)),R(Ye,t.FORBID_CONTENTS,me)),ze&&(Ee["#text"]=!0),Ie&&R(Ee,["html","head","body"]),Ee.table&&(R(Ee,["tbody"]),delete De.tbody),m&&m(t),it=t)},ut=R({},["mi","mo","mn","ms","mtext"]),lt=R({},["foreignobject","desc","title","annotation-xml"]),dt=R({},["title","style","font","a","script"]),ft=R({},B);R(ft,Z),R(ft,F);var pt=R({},L);R(pt,H);var ht=function(e){var t=j(e);t&&t.tagName||(t={namespaceURI:et,tagName:"template"});var n=O(e.tagName),r=O(t.tagName);return e.namespaceURI===Je?t.namespaceURI===et?"svg"===n:t.namespaceURI===$e?"svg"===n&&("annotation-xml"===r||ut[r]):Boolean(ft[n]):e.namespaceURI===$e?t.namespaceURI===et?"math"===n:t.namespaceURI===Je?"math"===n&&lt[r]:Boolean(pt[n]):e.namespaceURI===et&&!(t.namespaceURI===Je&&!lt[r])&&!(t.namespaceURI===$e&&!ut[r])&&!pt[n]&&(dt[n]||!ft[n])},mt=function(e){E(n.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){try{e.outerHTML=ie}catch(t){e.remove()}}},gt=function(e,t){try{E(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){E(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!Ce[e])if(Be||Ze)try{mt(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},vt=function(e){var t,n;if(Ne)e="<remove></remove>"+e;else{var r=C(e,/^[\r\n\t ]+/);n=r&&r[0]}"application/xhtml+xml"===he&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");var o=oe?oe.createHTML(e):e;if(tt===et)try{t=(new h).parseFromString(o,he)}catch(e){}if(!t||!t.documentElement){t=ce.createDocument(tt,"template",null);try{t.documentElement.innerHTML=nt?"":o}catch(e){}}var a=t.body||t.documentElement;return e&&n&&a.insertBefore(i.createTextNode(n),a.childNodes[0]||null),tt===et?le.call(t,Ie?"html":"body")[0]:Ie?t.documentElement:a},yt=function(e){return se.call(e.ownerDocument||e,e,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT,null,!1)},bt=function(e){return e instanceof p&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof f)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore)},wt=function(t){return"object"===e(s)?t instanceof s:t&&"object"===e(t)&&"number"==typeof t.nodeType&&"string"==typeof t.nodeName},At=function(e,t,r){pe[e]&&A(pe[e],(function(e){e.call(n,t,r,it)}))},xt=function(e){var t;if(At("beforeSanitizeElements",e,null),bt(e))return mt(e),!0;if(P(/[\u0080-\uFFFF]/,e.nodeName))return mt(e),!0;var r=me(e.nodeName);if(At("uponSanitizeElement",e,{tagName:r,allowedTags:Ee}),e.hasChildNodes()&&!wt(e.firstElementChild)&&(!wt(e.content)||!wt(e.content.firstElementChild))&&P(/<[/\w]/g,e.innerHTML)&&P(/<[/\w]/g,e.textContent))return mt(e),!0;if("select"===r&&P(/<template/i,e.innerHTML))return mt(e),!0;if(!Ee[r]||De[r]){if(!De[r]&&Ot(r)){if(Se.tagNameCheck instanceof RegExp&&P(Se.tagNameCheck,r))return!1;if(Se.tagNameCheck instanceof Function&&Se.tagNameCheck(r))return!1}if(ze&&!Ye[r]){var o=j(e)||e.parentNode,i=w(e)||e.childNodes;if(i&&o)for(var a=i.length-1;a>=0;--a)o.insertBefore(y(i[a],!0),b(e))}return mt(e),!0}return e instanceof u&&!ht(e)?(mt(e),!0):"noscript"!==r&&"noembed"!==r||!P(/<\/no(script|embed)/i,e.innerHTML)?(Re&&3===e.nodeType&&(t=e.textContent,t=k(t,ge," "),t=k(t,ve," "),e.textContent!==t&&(E(n.removed,{element:e.cloneNode()}),e.textContent=t)),At("afterSanitizeElements",e,null),!1):(mt(e),!0)},Et=function(e,t,n){if(Le&&("id"===t||"name"===t)&&(n in i||n in at))return!1;if(je&&!Pe[t]&&P(ye,t));else if(_e&&P(be,t));else if(!Ce[t]||Pe[t]){if(!(Ot(e)&&(Se.tagNameCheck instanceof RegExp&&P(Se.tagNameCheck,e)||Se.tagNameCheck instanceof Function&&Se.tagNameCheck(e))&&(Se.attributeNameCheck instanceof RegExp&&P(Se.attributeNameCheck,t)||Se.attributeNameCheck instanceof Function&&Se.attributeNameCheck(t))||"is"===t&&Se.allowCustomizedBuiltInElements&&(Se.tagNameCheck instanceof RegExp&&P(Se.tagNameCheck,n)||Se.tagNameCheck instanceof Function&&Se.tagNameCheck(n))))return!1}else if(Xe[t]);else if(P(xe,k(n,Ae,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==S(n,"data:")||!Ge[e])if(Te&&!P(we,k(n,Ae,"")));else if(n)return!1;return!0},Ot=function(e){return e.indexOf("-")>0},Ct=function(t){var r,o,i,a;At("beforeSanitizeAttributes",t,null);var c=t.attributes;if(c){var s={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Ce};for(a=c.length;a--;){var u=r=c[a],l=u.name,d=u.namespaceURI;if(o="value"===l?r.value:D(r.value),i=me(l),s.attrName=i,s.attrValue=o,s.keepAttr=!0,s.forceKeepAttr=void 0,At("uponSanitizeAttribute",t,s),o=s.attrValue,!s.forceKeepAttr&&(gt(l,t),s.keepAttr))if(P(/\/>/i,o))gt(l,t);else{Re&&(o=k(o,ge," "),o=k(o,ve," "));var f=me(t.nodeName);if(Et(f,i,o)){if(!He||"id"!==i&&"name"!==i||(gt(l,t),o=Ue+o),oe&&"object"===e(g)&&"function"==typeof g.getAttributeType)if(d);else switch(g.getAttributeType(f,i)){case"TrustedHTML":o=oe.createHTML(o);break;case"TrustedScriptURL":o=oe.createScriptURL(o)}try{d?t.setAttributeNS(d,l,o):t.setAttribute(l,o),x(n.removed)}catch(e){}}}}At("afterSanitizeAttributes",t,null)}},kt=function e(t){var n,r=yt(t);for(At("beforeSanitizeShadowDOM",t,null);n=r.nextNode();)At("uponSanitizeShadowNode",n,null),xt(n)||(n.content instanceof a&&e(n.content),Ct(n));At("afterSanitizeShadowDOM",t,null)};return n.sanitize=function(o){var i,c,u,l,d,f=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if((nt=!o)&&(o="\x3c!--\x3e"),"string"!=typeof o&&!wt(o)){if("function"!=typeof o.toString)throw _("toString is not a function");if("string"!=typeof(o=o.toString()))throw _("dirty is not a string, aborting")}if(!n.isSupported){if("object"===e(t.toStaticHTML)||"function"==typeof t.toStaticHTML){if("string"==typeof o)return t.toStaticHTML(o);if(wt(o))return t.toStaticHTML(o.outerHTML)}return o}if(Me||st(f),n.removed=[],"string"==typeof o&&(We=!1),We){if(o.nodeName){var p=me(o.nodeName);if(!Ee[p]||De[p])throw _("root node is forbidden and cannot be sanitized in-place")}}else if(o instanceof s)1===(c=(i=vt("\x3c!----\x3e")).ownerDocument.importNode(o,!0)).nodeType&&"BODY"===c.nodeName||"HTML"===c.nodeName?i=c:i.appendChild(c);else{if(!Be&&!Re&&!Ie&&-1===o.indexOf("<"))return oe&&Fe?oe.createHTML(o):o;if(!(i=vt(o)))return Be?null:Fe?ie:""}i&&Ne&&mt(i.firstChild);for(var h=yt(We?o:i);u=h.nextNode();)3===u.nodeType&&u===l||xt(u)||(u.content instanceof a&&kt(u.content),Ct(u),l=u);if(l=null,We)return o;if(Be){if(Ze)for(d=ue.call(i.ownerDocument);i.firstChild;)d.appendChild(i.firstChild);else d=i;return Ce.shadowroot&&(d=de.call(r,d,!0)),d}var m=Ie?i.outerHTML:i.innerHTML;return Ie&&Ee["!doctype"]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&P(ee,i.ownerDocument.doctype.name)&&(m="<!DOCTYPE "+i.ownerDocument.doctype.name+">\n"+m),Re&&(m=k(m,ge," "),m=k(m,ve," ")),oe&&Fe?oe.createHTML(m):m},n.setConfig=function(e){st(e),Me=!0},n.clearConfig=function(){it=null,Me=!1},n.isValidAttribute=function(e,t,n){it||st({});var r=me(e),o=me(t);return Et(r,o,n)},n.addHook=function(e,t){"function"==typeof t&&(pe[e]=pe[e]||[],E(pe[e],t))},n.removeHook=function(e){if(pe[e])return x(pe[e])},n.removeHooks=function(e){pe[e]&&(pe[e]=[])},n.removeAllHooks=function(){pe={}},n}return re()}()},85042:e=>{"use strict";e.exports="data:application/x-font-ttf;charset=utf-8;base64,AAEAAAALAIAAAwAwT1MvMg8SBfAAAAC8AAAAYGNtYXAXVtKNAAABHAAAAFRnYXNwAAAAEAAAAXAAAAAIZ2x5ZgYydxIAAAF4AAAFNGhlYWQUJ7cIAAAGrAAAADZoaGVhB20DzAAABuQAAAAkaG10eCIABhQAAAcIAAAALGxvY2ED4AU6AAAHNAAAABhtYXhwAA8AjAAAB0wAAAAgbmFtZXsr690AAAdsAAABhnBvc3QAAwAAAAAI9AAAACAAAwPAAZAABQAAApkCzAAAAI8CmQLMAAAB6wAzAQkAAAAAAAAAAAAAAAAAAAABEAAAAAAAAAAAAAAAAAAAAABAAADpBgPA/8AAQAPAAEAAAAABAAAAAAAAAAAAAAAgAAAAAAADAAAAAwAAABwAAQADAAAAHAADAAEAAAAcAAQAOAAAAAoACAACAAIAAQAg6Qb//f//AAAAAAAg6QD//f//AAH/4xcEAAMAAQAAAAAAAAAAAAAAAQAB//8ADwABAAAAAAAAAAAAAgAANzkBAAAAAAEAAAAAAAAAAAACAAA3OQEAAAAAAQAAAAAAAAAAAAIAADc5AQAAAAABAWIAjQKeAskAEwAAJSc3NjQnJiIHAQYUFwEWMjc2NCcCnuLiDQ0MJAz/AA0NAQAMJAwNDcni4gwjDQwM/wANIwz/AA0NDCMNAAAAAQFiAI0CngLJABMAACUBNjQnASYiBwYUHwEHBhQXFjI3AZ4BAA0N/wAMJAwNDeLiDQ0MJAyNAQAMIw0BAAwMDSMM4uINIwwNDQAAAAIA4gC3Ax4CngATACcAACUnNzY0JyYiDwEGFB8BFjI3NjQnISc3NjQnJiIPAQYUHwEWMjc2NCcB87e3DQ0MIw3VDQ3VDSMMDQ0BK7e3DQ0MJAzVDQ3VDCQMDQ3zuLcMJAwNDdUNIwzWDAwNIwy4twwkDA0N1Q0jDNYMDA0jDAAAAgDiALcDHgKeABMAJwAAJTc2NC8BJiIHBhQfAQcGFBcWMjchNzY0LwEmIgcGFB8BBwYUFxYyNwJJ1Q0N1Q0jDA0Nt7cNDQwjDf7V1Q0N1QwkDA0Nt7cNDQwkDLfWDCMN1Q0NDCQMt7gMIw0MDNYMIw3VDQ0MJAy3uAwjDQwMAAADAFUAAAOrA1UAMwBoAHcAABMiBgcOAQcOAQcOARURFBYXHgEXHgEXHgEzITI2Nz4BNz4BNz4BNRE0JicuAScuAScuASMFITIWFx4BFx4BFx4BFREUBgcOAQcOAQcOASMhIiYnLgEnLgEnLgE1ETQ2Nz4BNz4BNz4BMxMhMjY1NCYjISIGFRQWM9UNGAwLFQkJDgUFBQUFBQ4JCRULDBgNAlYNGAwLFQkJDgUFBQUFBQ4JCRULDBgN/aoCVgQIBAQHAwMFAQIBAQIBBQMDBwQECAT9qgQIBAQHAwMFAQIBAQIBBQMDBwQECASAAVYRGRkR/qoRGRkRA1UFBAUOCQkVDAsZDf2rDRkLDBUJCA4FBQUFBQUOCQgVDAsZDQJVDRkLDBUJCQ4FBAVVAgECBQMCBwQECAX9qwQJAwQHAwMFAQICAgIBBQMDBwQDCQQCVQUIBAQHAgMFAgEC/oAZEhEZGRESGQAAAAADAFUAAAOrA1UAMwBoAIkAABMiBgcOAQcOAQcOARURFBYXHgEXHgEXHgEzITI2Nz4BNz4BNz4BNRE0JicuAScuAScuASMFITIWFx4BFx4BFx4BFREUBgcOAQcOAQcOASMhIiYnLgEnLgEnLgE1ETQ2Nz4BNz4BNz4BMxMzFRQWMzI2PQEzMjY1NCYrATU0JiMiBh0BIyIGFRQWM9UNGAwLFQkJDgUFBQUFBQ4JCRULDBgNAlYNGAwLFQkJDgUFBQUFBQ4JCRULDBgN/aoCVgQIBAQHAwMFAQIBAQIBBQMDBwQECAT9qgQIBAQHAwMFAQIBAQIBBQMDBwQECASAgBkSEhmAERkZEYAZEhIZgBEZGREDVQUEBQ4JCRUMCxkN/asNGQsMFQkIDgUFBQUFBQ4JCBUMCxkNAlUNGQsMFQkJDgUEBVUCAQIFAwIHBAQIBf2rBAkDBAcDAwUBAgICAgEFAwMHBAMJBAJVBQgEBAcCAwUCAQL+gIASGRkSgBkSERmAEhkZEoAZERIZAAABAOIAjQMeAskAIAAAExcHBhQXFjI/ARcWMjc2NC8BNzY0JyYiDwEnJiIHBhQX4uLiDQ0MJAzi4gwkDA0N4uINDQwkDOLiDCQMDQ0CjeLiDSMMDQ3h4Q0NDCMN4uIMIw0MDOLiDAwNIwwAAAABAAAAAQAAa5n0y18PPPUACwQAAAAAANivOVsAAAAA2K85WwAAAAADqwNVAAAACAACAAAAAAAAAAEAAAPA/8AAAAQAAAAAAAOrAAEAAAAAAAAAAAAAAAAAAAALBAAAAAAAAAAAAAAAAgAAAAQAAWIEAAFiBAAA4gQAAOIEAABVBAAAVQQAAOIAAAAAAAoAFAAeAEQAagCqAOoBngJkApoAAQAAAAsAigADAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAA4ArgABAAAAAAABAAcAAAABAAAAAAACAAcAYAABAAAAAAADAAcANgABAAAAAAAEAAcAdQABAAAAAAAFAAsAFQABAAAAAAAGAAcASwABAAAAAAAKABoAigADAAEECQABAA4ABwADAAEECQACAA4AZwADAAEECQADAA4APQADAAEECQAEAA4AfAADAAEECQAFABYAIAADAAEECQAGAA4AUgADAAEECQAKADQApGZjaWNvbnMAZgBjAGkAYwBvAG4Ac1ZlcnNpb24gMS4wAFYAZQByAHMAaQBvAG4AIAAxAC4AMGZjaWNvbnMAZgBjAGkAYwBvAG4Ac2ZjaWNvbnMAZgBjAGkAYwBvAG4Ac1JlZ3VsYXIAUgBlAGcAdQBsAGEAcmZjaWNvbnMAZgBjAGkAYwBvAG4Ac0ZvbnQgZ2VuZXJhdGVkIGJ5IEljb01vb24uAEYAbwBuAHQAIABnAGUAbgBlAHIAYQB0AGUAZAAgAGIAeQAgAEkAYwBvAE0AbwBvAG4ALgAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="},1024:e=>{"use strict";e.exports=t},30314:t=>{"use strict";t.exports=e},55721:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n,r,o,i,a){var c=new Date(0);return c.setUTCFullYear(e,t,n),c.setUTCHours(r,o,i,a),c},e.exports=t.default},25855:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){var r=function(e,t,n){if(n&&!n.code)throw new Error("date-fns-tz error: Please set a language code on the locale object imported from date-fns, e.g. `locale.code = 'en-US'`");return new Intl.DateTimeFormat(n?[n.code,"en-US"]:void 0,{timeZone:t,timeZoneName:e})}(e,n.timeZone,n.locale);return r.formatToParts?function(e,t){for(var n=e.formatToParts(t),r=n.length-1;r>=0;--r)if("timeZoneName"===n[r].type)return n[r].value}(r,t):function(e,t){var n=e.format(t).replace(/\u200E/g,""),r=/ [\w-+ ]+$/.exec(n);return r?r[0].substr(1):""}(r,t)},e.exports=t.default},32734:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){var r,i,d;if(""===e)return 0;if(r=c.timezoneZ.exec(e))return 0;if(r=c.timezoneHH.exec(e))return u(d=parseInt(r[1],10))?-d*a:NaN;if(r=c.timezoneHHMM.exec(e)){d=parseInt(r[1],10);var f=parseInt(r[2],10);return u(d,f)?(i=Math.abs(d)*a+6e4*f,d>0?-i:i):NaN}if(function(e){if(l[e])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:e}),l[e]=!0,!0}catch(e){return!1}}(e)){t=new Date(t||Date.now());var p=n?t:function(e){return(0,o.default)(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())}(t),h=s(p,e),m=n?h:function(e,t,n){var r=e.getTime()-t,o=s(new Date(r),n);if(t===o)return t;r-=o-t;var i=s(new Date(r),n);if(o===i)return o;return Math.max(o,i)}(t,h,e);return-m}return NaN};var r=i(n(2712)),o=i(n(55721));function i(e){return e&&e.__esModule?e:{default:e}}var a=36e5,c={timezone:/([Z+-].*)$/,timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-]\d{2}):?(\d{2})$/};function s(e,t){var n=(0,r.default)(e,t),i=(0,o.default)(n[0],n[1]-1,n[2],n[3]%24,n[4],n[5],0).getTime(),a=e.getTime(),c=a%1e3;return i-(a-=c>=0?c:1e3+c)}function u(e,t){return-23<=e&&e<=23&&(null==t||0<=t&&t<=59)}var l={};e.exports=t.default},7048:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/;t.default=n,e.exports=t.default},2712:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var o=function(e){if(!r[e]){var t=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:"America/New_York",year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(new Date("2014-06-25T04:00:00.123Z")),n="06/25/2014, 00:00:00"===t||"‎06‎/‎25‎/‎2014‎ ‎00‎:‎00‎:‎00"===t;r[e]=n?new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:e,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})}return r[e]}(t);return o.formatToParts?function(e,t){try{for(var r=e.formatToParts(t),o=[],i=0;i<r.length;i++){var a=n[r[i].type];a>=0&&(o[a]=parseInt(r[i].value,10))}return o}catch(e){if(e instanceof RangeError)return[NaN];throw e}}(o,e):function(e,t){var n=e.format(t).replace(/\u200E/g,""),r=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(n);return[r[3],r[1],r[2],r[4],r[5],r[6]]}(o,e)};var n={year:0,month:1,day:2,hour:3,minute:4,second:5};var r={};e.exports=t.default},33826:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(25855)),o=i(n(32734));function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){var n=e?(0,o.default)(e,t,!0)/6e4:t.getTimezoneOffset();if(Number.isNaN(n))throw new RangeError("Invalid time zone specified: "+e);return n}function c(e,t){for(var n=e<0?"-":"",r=Math.abs(e).toString();r.length<t;)r="0"+r;return n+r}function s(e,t){var n=t||"",r=e>0?"-":"+",o=Math.abs(e);return r+c(Math.floor(o/60),2)+n+c(Math.floor(o%60),2)}function u(e,t){return e%60==0?(e>0?"-":"+")+c(Math.abs(e)/60,2):s(e,t)}var l={X:function(e,t,n,r){var o=a(r.timeZone,r._originalDate||e);if(0===o)return"Z";switch(t){case"X":return u(o);case"XXXX":case"XX":return s(o);default:return s(o,":")}},x:function(e,t,n,r){var o=a(r.timeZone,r._originalDate||e);switch(t){case"x":return u(o);case"xxxx":case"xx":return s(o);default:return s(o,":")}},O:function(e,t,n,r){var o=a(r.timeZone,r._originalDate||e);switch(t){case"O":case"OO":case"OOO":return"GMT"+function(e,t){var n=e>0?"-":"+",r=Math.abs(e),o=Math.floor(r/60),i=r%60;if(0===i)return n+String(o);var a=t||"";return n+String(o)+a+c(i,2)}(o,":");default:return"GMT"+s(o,":")}},z:function(e,t,n,o){var i=o._originalDate||e;switch(t){case"z":case"zz":case"zzz":return(0,r.default)("short",i,o);default:return(0,r.default)("long",i,o)}}};t.default=l,e.exports=t.default},56558:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){var a=String(t),s=n||{},u=a.match(c);if(u){var l=(0,i.default)(e,s);a=u.reduce((function(e,t){if("'"===t[0])return e;var n=e.indexOf(t),r="'"===e[n-1],i=e.replace(t,"'"+o.default[t[0]](l,t,null,s)+"'");return r?i.substring(0,n-1)+i.substring(n+1):i}),a)}return(0,r.default)(e,a,s)};var r=a(n(15616)),o=a(n(33826)),i=a(n(21476));function a(e){return e&&e.__esModule?e:{default:e}}var c=/([xXOz]+)|''|'(''|[^'])+('|$)/g;e.exports=t.default},26645:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n,a){var c=(0,r.default)(a);return c.timeZone=t,(0,o.default)((0,i.default)(e,t),n,c)};var r=a(n(46420)),o=a(n(56558)),i=a(n(1132));function a(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},24992:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return-(0,o.default)(e,t)};var r,o=(r=n(32734))&&r.__esModule?r:{default:r};e.exports=t.default},70722:(e,t,n)=>{"use strict";e.exports={format:n(56558),formatInTimeZone:n(26645),getTimezoneOffset:n(24992),toDate:n(21476),utcToZonedTime:n(1132),zonedTimeToUtc:n(68516)}},21476:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");if(null===e)return new Date(NaN);var n=t||{},a=null==n.additionalDigits?2:(0,r.default)(n.additionalDigits);if(2!==a&&1!==a&&0!==a)throw new RangeError("additionalDigits must be 0, 1 or 2");if(e instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e))return new Date(e.getTime());if("number"==typeof e||"[object Number]"===Object.prototype.toString.call(e))return new Date(e);if("string"!=typeof e&&"[object String]"!==Object.prototype.toString.call(e))return new Date(NaN);var c=l(e),s=d(c.date,a),u=s.year,h=s.restDateString,m=f(h,u);if(isNaN(m))return new Date(NaN);if(m){var g,v=m.getTime(),y=0;if(c.time&&(y=p(c.time),isNaN(y)))return new Date(NaN);if(c.timeZone||n.timeZone){if(g=(0,i.default)(c.timeZone||n.timeZone,new Date(v+y)),isNaN(g))return new Date(NaN)}else g=(0,o.default)(new Date(v+y)),g=(0,o.default)(new Date(v+y+g));return new Date(v+y+g)}return new Date(NaN)};var r=c(n(82084)),o=c(n(93561)),i=c(n(32734)),a=c(n(7048));function c(e){return e&&e.__esModule?e:{default:e}}var s=36e5,u={dateTimePattern:/^([0-9W+-]+)(T| )(.*)/,datePattern:/^([0-9W+-]+)(.*)/,plainTime:/:/,YY:/^(\d{2})$/,YYY:[/^([+-]\d{2})$/,/^([+-]\d{3})$/,/^([+-]\d{4})$/],YYYY:/^(\d{4})/,YYYYY:[/^([+-]\d{4})/,/^([+-]\d{5})/,/^([+-]\d{6})/],MM:/^-(\d{2})$/,DDD:/^-?(\d{3})$/,MMDD:/^-?(\d{2})-?(\d{2})$/,Www:/^-?W(\d{2})$/,WwwD:/^-?W(\d{2})-?(\d{1})$/,HH:/^(\d{2}([.,]\d*)?)$/,HHMM:/^(\d{2}):?(\d{2}([.,]\d*)?)$/,HHMMSS:/^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,timeZone:a.default};function l(e){var t,n={},r=u.dateTimePattern.exec(e);if(r?(n.date=r[1],t=r[3]):(r=u.datePattern.exec(e))?(n.date=r[1],t=r[2]):(n.date=null,t=e),t){var o=u.timeZone.exec(t);o?(n.time=t.replace(o[1],""),n.timeZone=o[1].trim()):n.time=t}return n}function d(e,t){var n,r=u.YYY[t],o=u.YYYYY[t];if(n=u.YYYY.exec(e)||o.exec(e)){var i=n[1];return{year:parseInt(i,10),restDateString:e.slice(i.length)}}if(n=u.YY.exec(e)||r.exec(e)){var a=n[1];return{year:100*parseInt(a,10),restDateString:e.slice(a.length)}}return{year:null}}function f(e,t){if(null===t)return null;var n,r,o,i;if(0===e.length)return(r=new Date(0)).setUTCFullYear(t),r;if(n=u.MM.exec(e))return r=new Date(0),y(t,o=parseInt(n[1],10)-1)?(r.setUTCFullYear(t,o),r):new Date(NaN);if(n=u.DDD.exec(e)){r=new Date(0);var a=parseInt(n[1],10);return function(e,t){if(t<1)return!1;var n=v(e);if(n&&t>366)return!1;if(!n&&t>365)return!1;return!0}(t,a)?(r.setUTCFullYear(t,0,a),r):new Date(NaN)}if(n=u.MMDD.exec(e)){r=new Date(0),o=parseInt(n[1],10)-1;var c=parseInt(n[2],10);return y(t,o,c)?(r.setUTCFullYear(t,o,c),r):new Date(NaN)}if(n=u.Www.exec(e))return b(t,i=parseInt(n[1],10)-1)?h(t,i):new Date(NaN);if(n=u.WwwD.exec(e)){i=parseInt(n[1],10)-1;var s=parseInt(n[2],10)-1;return b(t,i,s)?h(t,i,s):new Date(NaN)}return null}function p(e){var t,n,r;if(t=u.HH.exec(e))return w(n=parseFloat(t[1].replace(",",".")))?n%24*s:NaN;if(t=u.HHMM.exec(e))return w(n=parseInt(t[1],10),r=parseFloat(t[2].replace(",",".")))?n%24*s+6e4*r:NaN;if(t=u.HHMMSS.exec(e)){n=parseInt(t[1],10),r=parseInt(t[2],10);var o=parseFloat(t[3].replace(",","."));return w(n,r,o)?n%24*s+6e4*r+1e3*o:NaN}return null}function h(e,t,n){t=t||0,n=n||0;var r=new Date(0);r.setUTCFullYear(e,0,4);var o=7*t+n+1-(r.getUTCDay()||7);return r.setUTCDate(r.getUTCDate()+o),r}var m=[31,28,31,30,31,30,31,31,30,31,30,31],g=[31,29,31,30,31,30,31,31,30,31,30,31];function v(e){return e%400==0||e%4==0&&e%100!=0}function y(e,t,n){if(t<0||t>11)return!1;if(null!=n){if(n<1)return!1;var r=v(e);if(r&&n>g[t])return!1;if(!r&&n>m[t])return!1}return!0}function b(e,t,n){return!(t<0||t>52)&&(null==n||!(n<0||n>6))}function w(e,t,n){return(null==e||!(e<0||e>=25))&&((null==t||!(t<0||t>=60))&&(null==n||!(n<0||n>=60)))}e.exports=t.default},1132:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){var i=(0,o.default)(e,n),a=(0,r.default)(t,i,!0),c=new Date(i.getTime()-a),s=new Date(0);return s.setFullYear(c.getUTCFullYear(),c.getUTCMonth(),c.getUTCDate()),s.setHours(c.getUTCHours(),c.getUTCMinutes(),c.getUTCSeconds(),c.getUTCMilliseconds()),s};var r=i(n(32734)),o=i(n(21476));function i(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},68516:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){if("string"==typeof e&&!e.match(i.default)){var s=(0,r.default)(n);return s.timeZone=t,(0,o.default)(e,s)}var u=(0,o.default)(e,n),l=(0,c.default)(u.getFullYear(),u.getMonth(),u.getDate(),u.getHours(),u.getMinutes(),u.getSeconds(),u.getMilliseconds()).getTime(),d=(0,a.default)(t,new Date(l));return new Date(l+d)};var r=s(n(46420)),o=s(n(21476)),i=s(n(7048)),a=s(n(32734)),c=s(n(55721));function s(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},71298:e=>{e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.__esModule=!0,e.exports.default=e.exports},38088:e=>{e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports},87462:(e,t,n)=>{"use strict";function r(){return r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},r.apply(this,arguments)}n.d(t,{Z:()=>r})},88911:(e,t,n)=>{"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,{Z:()=>r})},83029:(e,t,n)=>{"use strict";function r(e){if(Array.isArray(e))return e}n.d(t,{Z:()=>r})},11259:(e,t,n)=>{"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,{Z:()=>r})},44822:(e,t,n)=>{"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function o(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}n.d(t,{Z:()=>o})},46927:(e,t,n)=>{"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,{Z:()=>r})},3640:(e,t,n)=>{"use strict";function r(){return r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},r.apply(this,arguments)}n.d(t,{Z:()=>r})},19241:(e,t,n)=>{"use strict";function r(e){return r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},r(e)}n.d(t,{Z:()=>r})},32208:(e,t,n)=>{"use strict";function r(e,t){return r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},r(e,t)}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}n.d(t,{Z:()=>o})},72753:(e,t,n)=>{"use strict";function r(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}n.d(t,{Z:()=>r})},56265:(e,t,n)=>{"use strict";function r(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(t,{Z:()=>r})},8486:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(46927);function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}},56315:(e,t,n)=>{"use strict";function r(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}n.d(t,{Z:()=>r})},99357:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(73891);function o(e,t){if(t&&("object"===(0,r.Z)(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}},68957:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(83029);var o=n(61917),i=n(56265);function a(e,t){return(0,r.Z)(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,c=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){c=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(c)throw o}}return i}}(e,t)||(0,o.Z)(e,t)||(0,i.Z)()}},91411:(e,t,n)=>{"use strict";function r(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}n.d(t,{Z:()=>r})},45915:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(88911);var o=n(72753),i=n(61917);function a(e){return function(e){if(Array.isArray(e))return(0,r.Z)(e)}(e)||(0,o.Z)(e)||(0,i.Z)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},73891:(e,t,n)=>{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}n.d(t,{Z:()=>r})},61917:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(88911);function o(e,t){if(e){if("string"==typeof e)return(0,r.Z)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?(0,r.Z)(e,t):void 0}}}},i={};function a(e){var t=i[e];if(void 0!==t)return t.exports;var n=i[e]={id:e,loaded:!1,exports:{}};return o[e].call(n.exports,n,n.exports,a),n.loaded=!0,n.exports}a.m=o,a.amdD=function(){throw new Error("define cannot be used indirect")},a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.f={},a.e=e=>Promise.all(Object.keys(a.f).reduce(((t,n)=>(a.f[n](e,t),t)),[])),a.u=e=>288===e?"chunk-ckeditor.a33f04bebbca8a2c1b18.js":"chunk-"+({85:"code-editor",198:"vendor-fontawesome",614:"vendor-icons",877:"vendor-libphonenumber-js"}[e]||e)+"."+{85:"7292db136075fbf07fda",198:"97ac4a852bd9a61298d3",414:"92d4d9c8e30bb8ce3835",614:"1eac866ad8378d1e617a",759:"7aa09f3c0f32bbc5fe3a",817:"32a024d3c7e2fc5be22e",877:"d0e1a624b281ea60375f",909:"7cc6eb29ce4023a06dd0"}[e]+".js",a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),a.hmd=e=>((e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e),a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n={},r="tocco-legacy-bundle:",a.l=(e,t,o,i)=>{if(n[e])n[e].push(t);else{var c,s;if(void 0!==o)for(var u=document.getElementsByTagName("script"),l=0;l<u.length;l++){var d=u[l];if(d.getAttribute("src")==e||d.getAttribute("data-webpack")==r+o){c=d;break}}c||(s=!0,(c=document.createElement("script")).charset="utf-8",c.timeout=120,a.nc&&c.setAttribute("nonce",a.nc),c.setAttribute("data-webpack",r+o),c.src=e),n[e]=[t];var f=(t,r)=>{c.onerror=c.onload=null,clearTimeout(p);var o=n[e];if(delete n[e],c.parentNode&&c.parentNode.removeChild(c),o&&o.forEach((e=>e(r))),t)return t(r)},p=setTimeout(f.bind(null,void 0,{type:"timeout",target:c}),12e4);c.onerror=f.bind(null,c.onerror),c.onload=f.bind(null,c.onload),s&&document.head.appendChild(c)}},a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),a.j=713,a.p="/",(()=>{a.b=document.baseURI||self.location.href;var e={713:0};a.f.j=(t,n)=>{var r=a.o(e,t)?e[t]:void 0;if(0!==r)if(r)n.push(r[2]);else{var o=new Promise(((n,o)=>r=e[t]=[n,o]));n.push(r[2]=o);var i=a.p+a.u(t),c=new Error;a.l(i,(n=>{if(a.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var o=n&&("load"===n.type?"missing":n.type),i=n&&n.target&&n.target.src;c.message="Loading chunk "+t+" failed.\n("+o+": "+i+")",c.name="ChunkLoadError",c.type=o,c.request=i,r[1](c)}}),"chunk-"+t,t)}};var t=(t,n)=>{var r,o,[i,c,s]=n,u=0;if(i.some((t=>0!==e[t]))){for(r in c)a.o(c,r)&&(a.m[r]=c[r]);if(s)s(a)}for(t&&t(n);u<i.length;u++)o=i[u],a.o(e,o)&&e[o]&&e[o][0](),e[o]=0},n=self.webpackChunktocco_legacy_bundle=self.webpackChunktocco_legacy_bundle||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})(),a.nc=void 0;var c={};return(()=>{"use strict";a.r(c);var e={};a.r(e),a.d(e,{ACTION_INVOKE:()=>Lg,ACTION_INVOKED:()=>Ug,ACTION_IN_PROGRESS:()=>Hg,actionInvoke:()=>zg,actionInvoked:()=>Wg});var t={};a.r(t),a.d(t,{focusErrorField:()=>Ax,focusField:()=>bx,formInitialValueSelector:()=>yx,getCurrentEntityState:()=>Ox,getEntityForSubmit:()=>Cx,getFormErrors:()=>wx,handleInvalidForm:()=>Ex,handleSubmitError:()=>kx,touchAllFields:()=>xx});var n={};a.r(n),a.d(n,{asyncValidationStop:()=>Ix,autoComplete:()=>Tx,default:()=>jx,onChange:()=>Rx});var r={};a.r(r),a.d(r,{useAsyncValidation:()=>RI,useFormEvents:()=>II,useSyncValidation:()=>TI});var o,i,s=a(55954),u=a(45697),l=a.n(u),d=a(50600),f=a(22731),p=a(19743),h=a(45430),m=a(27023),g=a(73665),v=a(91411),y=a(76538),b=a(58804),w=a(24875),A=a(30759),x=a(7281),E=w.FS.color("secondaryLight"),O=w.FS.color("paper"),C=w.FS.color("secondary"),k=(0,b.vJ)(o||(o=(0,v.Z)(["\n .react-datepicker-popper {\n && {\n z-index: 5;\n margin: 0;\n }\n }\n\n .react-datepicker {\n && {\n * {\n box-sizing: content-box; // prevent box-sizing problems in widgets\n }\n border-radius: 0;\n border: 1px solid ",";\n ","\n\n .react-datepicker__header {\n ","\n border-radius: 0;\n background-color: ",";\n padding-bottom: 0;\n }\n\n .react-datepicker__navigation {\n top: 3px;\n }\n\n .react-datepicker__navigation--previous,\n .react-datepicker__navigation--next {\n margin-top: ",";\n }\n ","\n\n .react-datepicker__year-read-view--down-arrow,\n .react-datepicker__month-read-view--down-arrow,\n .react-datepicker__month-year-read-view--down-arrow,\n .react-datepicker__navigation-icon:before {\n border-color: "," !important;\n border-width: 1.5px 1.5px 0 0;\n }\n\n .react-datepicker__header__dropdown {\n font-size: ",";\n\n /* decrease padding to prevent overflow on small screens */\n @media only screen and (max-width: 480px) {\n font-size: ",";\n }\n }\n\n .react-datepicker__current-month {\n ","\n }\n\n .react-datepicker__day-name {\n color: ",";\n font-size: ",";\n }\n\n .react-datepicker__day,\n .react-datepicker__day-name {\n border: 1px solid transparent;\n padding: ",";\n outline: none;\n\n /* decrease padding to prevent overflow on small screens */\n @media only screen and (max-width: 480px) {\n padding: ",";\n }\n }\n\n .react-datepicker__day--selected {\n background-color: ",";\n border-color: ",";\n border-radius: 50%;\n\n &:focus {\n border-color: ",";\n background-color: ",";\n }\n }\n\n .react-datepicker__day--keyboard-selected {\n background-color: ",";\n border-color: ",";\n border-radius: 50%;\n }\n\n .react-datepicker__day--today,\n .react-datepicker__month-text--today,\n .react-datepicker__quarter-text--today,\n .react-datepicker__year-text--today {\n border-radius: 50%;\n border-color: ",";\n }\n\n .react-datepicker__today-button {\n ","\n background-color: ",";\n border-top: 0;\n padding-bottom: ",";\n padding-top: 0;\n\n &:hover > button {\n background-color: ",";\n }\n }\n\n .react-datepicker__input-time-container {\n display: flex;\n justify-content: center;\n margin: 5px 0;\n\n .react-datepicker-time__input {\n margin: 0;\n\n input {\n text-align: center;\n }\n }\n }\n\n .react-datepicker__header__dropdown.react-datepicker__header__dropdown--scroll {\n width: 190px;\n margin: 8px auto 0;\n display: grid;\n grid-template-columns: 100px 85px;\n }\n\n .react-datepicker__month-read-view,\n .react-datepicker__year-read-view {\n color: ",";\n visibility: visible !important;\n }\n\n .react-datepicker__year-option,\n .react-datepicker__month-option,\n .react-datepicker__month-year-option {\n font-size: ",";\n }\n\n .react-datepicker__year-option:first-of-type,\n .react-datepicker__month-option:first-of-type,\n .react-datepicker__month-year-option:first-of-type,\n .react-datepicker__year-option:last-of-type,\n .react-datepicker__month-option:last-of-type,\n .react-datepicker__month-year-option:last-of-type {\n border-radius: 0;\n }\n\n .react-datepicker__year-read-view--down-arrow,\n .react-datepicker__month-read-view--down-arrow,\n .react-datepicker__month-year-read-view--down-arrow {\n top: 6px;\n right: -10px;\n width: 5px;\n height: 5px;\n\n /* decrease padding to prevent overflow on small screens */\n @media only screen and (max-width: 480px) {\n right: -8px;\n }\n }\n\n .react-datepicker__year-read-view--down-arrow {\n right: -4px;\n\n /* decrease padding to prevent overflow on small screens */\n @media only screen and (max-width: 480px) {\n right: 3px;\n }\n }\n\n .react-datepicker__day:hover,\n .react-datepicker__month-text:hover,\n .react-datepicker__quarter-text:hover,\n .react-datepicker__year-text:hover {\n border-color: ",";\n background-color: ",";\n border-radius: 50%;\n color: ",";\n }\n\n .react-datepicker__year-dropdown {\n left: 40%;\n top: 45px;\n }\n\n .react-datepicker__navigation--years-upcoming:before {\n border-width: 1.5px 1.5px 0 0;\n border-color: ",";\n border-style: solid;\n content: '';\n display: block;\n position: absolute;\n top: 8px;\n left: 12px;\n height: 5px;\n width: 5px;\n transform: rotate(-45deg);\n }\n\n .react-datepicker__navigation--years-previous:before {\n border-width: 1.5px 1.5px 0 0;\n border-color: ",";\n border-style: solid;\n content: '';\n display: block;\n position: absolute;\n top: 6px;\n left: 12px;\n height: 5px;\n width: 5px;\n transform: rotate(135deg);\n }\n\n .react-datepicker__year-dropdown,\n .react-datepicker__month-dropdown,\n .react-datepicker__month-year-dropdown {\n background-color: ",";\n border-radius: 0;\n border-color: ",";\n box-shadow: 0 0 5px rgb(0 0 0 / 30%);\n }\n\n .react-datepicker__year-option:hover,\n .react-datepicker__month-option:hover,\n .react-datepicker__month-year-option:hover {\n background-color: ",";\n }\n\n .react-datepicker__month-option--selected {\n left: 10px;\n }\n\n .react-datepicker__day--outside-month {\n color: ",";\n }\n }\n }\n"])),E,(0,A.Z)(),(0,A.Z)(),E,x.Z.space(-.6),"\n .react-datepicker__current-month.react-datepicker__current-month--hasYearDropdown.react-datepicker__current-month--hasMonthDropdown {\n // Avoid showing the month and year a second time when it has month and year dropdowns.\n display: none;\n }\n",O,x.Z.font(2.85),x.Z.font(1.8),(0,A.Z)({fontWeight:w.FS.fontWeight("bold")}),O,x.Z.font(-2),x.Z.space(-.6),x.Z.space(-1.2),C,C,C,E,E,E,C,(0,A.Z)(),O,x.Z.space(-.5),(function(e){var t=e.theme;return(0,y._j)(.1,t.colors.paper)}),O,x.Z.font(0),E,E,O,w.FS.color("text"),w.FS.color("text"),O,E,(function(e){var t=e.theme;return(0,y._j)(.1,t.colors.paper)}),(function(e){var t=e.theme;return(0,y.$n)(.7,t.colors.text)})),S=a(85893);const D=function(){return(0,S.jsx)(S.Fragment,{children:i||(i=(0,S.jsx)(k,{}))})};var P=a(74806),_=a(50558),j=a(63038),T=a.n(j),R=a(1024),I=a.n(R),M=a(30314),N=a.n(M),B=a(88162),Z=a(50258),F=a(59713),L=a.n(F),H=a(35997),U=a(319),z=a.n(U),W=16,V=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!e)return t;e=Y(e);var n=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return n?{r:parseInt(n[1],W),g:parseInt(n[2],W),b:parseInt(n[3],W)}:t},Y=function(e){return e.startsWith("#")||(e="#"+e),e.padEnd(7,"0")},q=function(e){var t=e/255;return t<=.03928?t/=12.92:t=Math.pow((t+.055)/1.055,2.4),t},G=function(e){return.2126*q(e.r)+.7152*q(e.g)+.0722*q(e.b)};const Q=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"#FFFFFF",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"#000000",r=V(e);return r&&G(r)>.25?n:t},X=Object.freeze({EXISTING:"existing",ACCEPTED:"accepted",NONE:"none"});function K(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function $(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?K(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):K(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var J=function(e,t){return e+t},ee=function(e){return e.map((function(e){return{title:e.label,id:J(e.key,e.model),entityKey:e.key,calendarType:e.calendarType,entityModel:e.model}}))},te=a(69100),ne=a.n(te),re=function(e,t){return re=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},re(e,t)};function oe(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}re(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var ie=function(){return ie=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},ie.apply(this,arguments)};Object.create;function ae(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}Object.create;("undefined"!=typeof globalThis?globalThis:window).FullCalendarVDom={Component:R.Component,createElement:R.createElement,render:M.render,createRef:R.createRef,Fragment:R.Fragment,createContext:R.createContext,createPortal:M.createPortal,flushSync:function(e){e()},unmountComponentAtNode:M.unmountComponentAtNode};var ce=a(93379),se=a.n(ce),ue=a(7795),le=a.n(ue),de=a(90569),fe=a.n(de),pe=a(3565),he=a.n(pe),me=a(19216),ge=a.n(me),ve=a(44589),ye=a.n(ve),be=a(33440),we={};we.styleTagTransform=ye(),we.setAttributes=he(),we.insert=fe().bind(null,"head"),we.domAPI=le(),we.insertStyleElement=ge();se()(be.Z,we);be.Z&&be.Z.locals&&be.Z.locals;if("undefined"==typeof FullCalendarVDom)throw new Error("Please import the top-level fullcalendar lib before attempting to import a plugin.");var Ae=FullCalendarVDom.Component,xe=FullCalendarVDom.createElement,Ee=(FullCalendarVDom.render,FullCalendarVDom.createRef),Oe=FullCalendarVDom.Fragment,Ce=FullCalendarVDom.createContext,ke=FullCalendarVDom.createPortal,Se=FullCalendarVDom.flushSync,De=(FullCalendarVDom.unmountComponentAtNode,function(){function e(e,t){this.context=e,this.internalEventSource=t}return e.prototype.remove=function(){this.context.dispatch({type:"REMOVE_EVENT_SOURCE",sourceId:this.internalEventSource.sourceId})},e.prototype.refetch=function(){this.context.dispatch({type:"FETCH_EVENT_SOURCES",sourceIds:[this.internalEventSource.sourceId],isRefetch:!0})},Object.defineProperty(e.prototype,"id",{get:function(){return this.internalEventSource.publicId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"url",{get:function(){return this.internalEventSource.meta.url},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"format",{get:function(){return this.internalEventSource.meta.format},enumerable:!1,configurable:!0}),e}());function Pe(e){e.parentNode&&e.parentNode.removeChild(e)}function _e(e,t){if(e.closest)return e.closest(t);if(!document.documentElement.contains(e))return null;do{if(je(e,t))return e;e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType);return null}function je(e,t){return(e.matches||e.matchesSelector||e.msMatchesSelector).call(e,t)}function Te(e,t){for(var n=e instanceof HTMLElement?[e]:e,r=[],o=0;o<n.length;o+=1)for(var i=n[o].querySelectorAll(t),a=0;a<i.length;a+=1)r.push(i[a]);return r}var Re=/(top|left|right|bottom|width|height)$/i;function Ie(e,t){for(var n in t)Me(e,n,t[n])}function Me(e,t,n){null==n?e.style[t]="":"number"==typeof n&&Re.test(t)?e.style[t]=n+"px":e.style[t]=n}function Ne(e){var t,n;return null!==(n=null===(t=e.composedPath)||void 0===t?void 0:t.call(e)[0])&&void 0!==n?n:e.target}function Be(e){return e.getRootNode?e.getRootNode():document}var Ze=0;function Fe(){return"fc-dom-"+(Ze+=1)}function Le(e){e.preventDefault()}function He(e,t,n,r){var o=function(e,t){return function(n){var r=_e(n.target,e);r&&t.call(r,n,r)}}(n,r);return e.addEventListener(t,o),function(){e.removeEventListener(t,o)}}var Ue=["webkitTransitionEnd","otransitionend","oTransitionEnd","msTransitionEnd","transitionend"];function ze(e){return{tabIndex:0,onKeyDown:function(t){"Enter"!==t.key&&" "!==t.key||(e(t),t.preventDefault())}}}var We=0;function Ve(){return String(We+=1)}function Ye(){document.body.classList.add("fc-not-allowed")}function qe(){document.body.classList.remove("fc-not-allowed")}function Ge(e){var t,n,r=[],o=[];for("string"==typeof e?o=e.split(/\s*,\s*/):"function"==typeof e?o=[e]:Array.isArray(e)&&(o=e),t=0;t<o.length;t+=1)"string"==typeof(n=o[t])?r.push("-"===n.charAt(0)?{field:n.substring(1),order:-1}:{field:n,order:1}):"function"==typeof n&&r.push({func:n});return r}function Qe(e,t,n){var r,o;for(r=0;r<n.length;r+=1)if(o=Xe(e,t,n[r]))return o;return 0}function Xe(e,t,n){return n.func?n.func(e,t):Ke(e[n.field],t[n.field])*(n.order||1)}function Ke(e,t){return e||t?null==t?-1:null==e?1:"string"==typeof e||"string"==typeof t?String(e).localeCompare(String(t)):e-t:0}function $e(e,t){var n=String(e);return"000".substr(0,t-n.length)+n}function Je(e,t,n){return"function"==typeof e?e.apply(void 0,t):"string"==typeof e?t.reduce((function(e,t,n){return e.replace("$"+n,t||"")}),e):n}function et(e,t){return e-t}function tt(e){return e%1==0}function nt(e){var t=e.querySelector(".fc-scrollgrid-shrink-frame"),n=e.querySelector(".fc-scrollgrid-shrink-cushion");if(!t)throw new Error("needs fc-scrollgrid-shrink-frame className");if(!n)throw new Error("needs fc-scrollgrid-shrink-cushion className");return e.getBoundingClientRect().width-t.getBoundingClientRect().width+n.getBoundingClientRect().width}var rt=["sun","mon","tue","wed","thu","fri","sat"];function ot(e,t){var n=pt(e);return n[2]+=t,ht(n)}function it(e,t){var n=pt(e);return n[6]+=t,ht(n)}function at(e,t){return(t.valueOf()-e.valueOf())/864e5}function ct(e,t){return gt(e)===gt(t)?Math.round(at(e,t)):null}function st(e){return ht([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()])}function ut(e,t,n,r){var o=ht([t,0,1+lt(t,n,r)]),i=st(e),a=Math.round(at(o,i));return Math.floor(a/7)+1}function lt(e,t,n){var r=7+t-n;return-((7+ht([e,0,r]).getUTCDay()-t)%7)+r-1}function dt(e){return[e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()]}function ft(e){return new Date(e[0],e[1]||0,null==e[2]?1:e[2],e[3]||0,e[4]||0,e[5]||0)}function pt(e){return[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()]}function ht(e){return 1===e.length&&(e=e.concat([0])),new Date(Date.UTC.apply(Date,e))}function mt(e){return!isNaN(e.valueOf())}function gt(e){return 1e3*e.getUTCHours()*60*60+1e3*e.getUTCMinutes()*60+1e3*e.getUTCSeconds()+e.getUTCMilliseconds()}function vt(e,t,n,r){return{instanceId:Ve(),defId:e,range:t,forcedStartTzo:null==n?null:n,forcedEndTzo:null==r?null:r}}var yt=Object.prototype.hasOwnProperty;function bt(e,t){var n={};if(t)for(var r in t){for(var o=[],i=e.length-1;i>=0;i-=1){var a=e[i][r];if("object"==typeof a&&a)o.unshift(a);else if(void 0!==a){n[r]=a;break}}o.length&&(n[r]=bt(o))}for(i=e.length-1;i>=0;i-=1){var c=e[i];for(var s in c)s in n||(n[s]=c[s])}return n}function wt(e,t){var n={};for(var r in e)t(e[r],r)&&(n[r]=e[r]);return n}function At(e,t){var n={};for(var r in e)n[r]=t(e[r],r);return n}function xt(e){for(var t={},n=0,r=e;n<r.length;n++){t[r[n]]=!0}return t}function Et(e){var t=[];for(var n in e)t.push(e[n]);return t}function Ot(e,t){if(e===t)return!0;for(var n in e)if(yt.call(e,n)&&!(n in t))return!1;for(var n in t)if(yt.call(t,n)&&e[n]!==t[n])return!1;return!0}function Ct(e,t){var n=[];for(var r in e)yt.call(e,r)&&(r in t||n.push(r));for(var r in t)yt.call(t,r)&&e[r]!==t[r]&&n.push(r);return n}function kt(e,t,n){if(void 0===n&&(n={}),e===t)return!0;for(var r in t)if(!(r in e)||!St(e[r],t[r],n[r]))return!1;for(var r in e)if(!(r in t))return!1;return!0}function St(e,t,n){return e===t||!0===n||!!n&&n(e,t)}function Dt(e,t,n,r){void 0===t&&(t=0),void 0===r&&(r=1);var o=[];null==n&&(n=Object.keys(e).length);for(var i=t;i<n;i+=r){var a=e[i];void 0!==a&&o.push(a)}return o}function Pt(e,t,n){var r=n.dateEnv,o=n.pluginHooks,i=n.options,a=e.defs,c=e.instances;for(var s in c=wt(c,(function(e){return!a[e.defId].recurringDef})),a){var u=a[s];if(u.recurringDef){var l=u.recurringDef.duration;l||(l=u.allDay?i.defaultAllDayEventDuration:i.defaultTimedEventDuration);for(var d=0,f=_t(u,l,t,r,o.recurringTypes);d<f.length;d++){var p=f[d],h=vt(s,{start:p,end:r.add(p,l)});c[h.instanceId]=h}}}return{defs:a,instances:c}}function _t(e,t,n,r,o){var i=o[e.recurringDef.typeId].expand(e.recurringDef.typeData,{start:r.subtract(n.start,t),end:n.end},r);return e.allDay&&(i=i.map(st)),i}var jt=["years","months","days","milliseconds"],Tt=/^(-?)(?:(\d+)\.)?(\d+):(\d\d)(?::(\d\d)(?:\.(\d\d\d))?)?/;function Rt(e,t){var n;return"string"==typeof e?function(e){var t=Tt.exec(e);if(t){var n=t[1]?-1:1;return{years:0,months:0,days:n*(t[2]?parseInt(t[2],10):0),milliseconds:n*(60*(t[3]?parseInt(t[3],10):0)*60*1e3+60*(t[4]?parseInt(t[4],10):0)*1e3+1e3*(t[5]?parseInt(t[5],10):0)+(t[6]?parseInt(t[6],10):0))}}return null}(e):"object"==typeof e&&e?It(e):"number"==typeof e?It(((n={})[t||"milliseconds"]=e,n)):null}function It(e){var t={years:e.years||e.year||0,months:e.months||e.month||0,days:e.days||e.day||0,milliseconds:60*(e.hours||e.hour||0)*60*1e3+60*(e.minutes||e.minute||0)*1e3+1e3*(e.seconds||e.second||0)+(e.milliseconds||e.millisecond||e.ms||0)},n=e.weeks||e.week;return n&&(t.days+=7*n,t.specifiedWeeks=!0),t}function Mt(e){return e.years||e.months||e.milliseconds?0:e.days}function Nt(e){return Bt(e)/864e5}function Bt(e){return 31536e6*e.years+2592e6*e.months+864e5*e.days+e.milliseconds}function Zt(e,t){for(var n=null,r=0;r<jt.length;r+=1){var o=jt[r];if(t[o]){var i=e[o]/t[o];if(!tt(i)||null!==n&&n!==i)return null;n=i}else if(e[o])return null}return n}function Ft(e){var t=e.milliseconds;if(t){if(t%1e3!=0)return{unit:"millisecond",value:t};if(t%6e4!=0)return{unit:"second",value:t/1e3};if(t%36e5!=0)return{unit:"minute",value:t/6e4};if(t)return{unit:"hour",value:t/36e5}}return e.days?e.specifiedWeeks&&e.days%7==0?{unit:"week",value:e.days/7}:{unit:"day",value:e.days}:e.months?{unit:"month",value:e.months}:e.years?{unit:"year",value:e.years}:{unit:"millisecond",value:0}}function Lt(e,t,n){void 0===n&&(n=!1);var r=e.toISOString();return r=r.replace(".000",""),n&&(r=r.replace("T00:00:00Z","")),r.length>10&&(null==t?r=r.replace("Z",""):0!==t&&(r=r.replace("Z",Ut(t,!0)))),r}function Ht(e){return e.toISOString().replace(/T.*$/,"")}function Ut(e,t){void 0===t&&(t=!1);var n=e<0?"-":"+",r=Math.abs(e),o=Math.floor(r/60),i=Math.round(r%60);return t?n+$e(o,2)+":"+$e(i,2):"GMT"+n+o+(i?":"+$e(i,2):"")}function zt(e,t,n){if(e===t)return!0;var r,o=e.length;if(o!==t.length)return!1;for(r=0;r<o;r+=1)if(!(n?n(e[r],t[r]):e[r]===t[r]))return!1;return!0}function Wt(e,t,n){var r,o;return function(){for(var i=[],a=0;a<arguments.length;a++)i[a]=arguments[a];if(r){if(!zt(r,i)){n&&n(o);var c=e.apply(this,i);t&&t(c,o)||(o=c)}}else o=e.apply(this,i);return r=i,o}}function Vt(e,t,n){var r,o,i=this;return function(a){if(r){if(!Ot(r,a)){n&&n(o);var c=e.call(i,a);t&&t(c,o)||(o=c)}}else o=e.call(i,a);return r=a,o}}function Yt(e,t,n){var r=this,o=[],i=[];return function(a){for(var c=o.length,s=a.length,u=0;u<c;u+=1)if(a[u]){if(!zt(o[u],a[u])){n&&n(i[u]);var l=e.apply(r,a[u]);t&&t(l,i[u])||(i[u]=l)}}else n&&n(i[u]);for(;u<s;u+=1)i[u]=e.apply(r,a[u]);return o=a,i.splice(s),i}}function qt(e,t,n){var r=this,o={},i={};return function(a){var c={};for(var s in a)if(i[s])if(zt(o[s],a[s]))c[s]=i[s];else{n&&n(i[s]);var u=e.apply(r,a[s]);c[s]=t&&t(u,i[s])?i[s]:u}else c[s]=e.apply(r,a[s]);return o=a,i=c,c}}var Gt={week:3,separator:0,omitZeroMinute:0,meridiem:0,omitCommas:0},Qt={timeZoneName:7,era:6,year:5,month:4,day:2,weekday:2,hour:1,minute:1,second:1},Xt=/\s*([ap])\.?m\.?/i,Kt=/,/g,$t=/\s+/g,Jt=/\u200e/g,en=/UTC|GMT/,tn=function(){function e(e){var t={},n={},r=0;for(var o in e)o in Gt?(n[o]=e[o],r=Math.max(Gt[o],r)):(t[o]=e[o],o in Qt&&(r=Math.max(Qt[o],r)));this.standardDateProps=t,this.extendedSettings=n,this.severity=r,this.buildFormattingFunc=Wt(nn)}return e.prototype.format=function(e,t){return this.buildFormattingFunc(this.standardDateProps,this.extendedSettings,t)(e)},e.prototype.formatRange=function(e,t,n,r){var o=this.standardDateProps,i=this.extendedSettings,a=function(e,t,n){if(n.getMarkerYear(e)!==n.getMarkerYear(t))return 5;if(n.getMarkerMonth(e)!==n.getMarkerMonth(t))return 4;if(n.getMarkerDay(e)!==n.getMarkerDay(t))return 2;if(gt(e)!==gt(t))return 1;return 0}(e.marker,t.marker,n.calendarSystem);if(!a)return this.format(e,n);var c=a;!(c>1)||"numeric"!==o.year&&"2-digit"!==o.year||"numeric"!==o.month&&"2-digit"!==o.month||"numeric"!==o.day&&"2-digit"!==o.day||(c=1);var s=this.format(e,n),u=this.format(t,n);if(s===u)return s;var l=function(e,t){var n={};for(var r in e)(!(r in Qt)||Qt[r]<=t)&&(n[r]=e[r]);return n}(o,c),d=nn(l,i,n),f=d(e),p=d(t),h=function(e,t,n,r){var o=0;for(;o<e.length;){var i=e.indexOf(t,o);if(-1===i)break;var a=e.substr(0,i);o=i+t.length;for(var c=e.substr(o),s=0;s<n.length;){var u=n.indexOf(r,s);if(-1===u)break;var l=n.substr(0,u);s=u+r.length;var d=n.substr(s);if(a===l&&c===d)return{before:a,after:c}}}return null}(s,f,u,p),m=i.separator||r||n.defaultSeparator||"";return h?h.before+f+m+p+h.after:s+m+u},e.prototype.getLargestUnit=function(){switch(this.severity){case 7:case 6:case 5:return"year";case 4:return"month";case 3:return"week";case 2:return"day";default:return"time"}},e}();function nn(e,t,n){var r=Object.keys(e).length;return 1===r&&"short"===e.timeZoneName?function(e){return Ut(e.timeZoneOffset)}:0===r&&t.week?function(e){return function(e,t,n,r,o){var i=[];"long"===o?i.push(n):"short"!==o&&"narrow"!==o||i.push(t);"long"!==o&&"short"!==o||i.push(" ");i.push(r.simpleNumberFormat.format(e)),"rtl"===r.options.direction&&i.reverse();return i.join("")}(n.computeWeekNumber(e.marker),n.weekText,n.weekTextLong,n.locale,t.week)}:function(e,t,n){e=ie({},e),t=ie({},t),function(e,t){e.timeZoneName&&(e.hour||(e.hour="2-digit"),e.minute||(e.minute="2-digit"));"long"===e.timeZoneName&&(e.timeZoneName="short");t.omitZeroMinute&&(e.second||e.millisecond)&&delete t.omitZeroMinute}(e,t),e.timeZone="UTC";var r,o=new Intl.DateTimeFormat(n.locale.codes,e);if(t.omitZeroMinute){var i=ie({},e);delete i.minute,r=new Intl.DateTimeFormat(n.locale.codes,i)}return function(i){var a=i.marker;return function(e,t,n,r,o){e=e.replace(Jt,""),"short"===n.timeZoneName&&(e=function(e,t){var n=!1;e=e.replace(en,(function(){return n=!0,t})),n||(e+=" "+t);return e}(e,"UTC"===o.timeZone||null==t.timeZoneOffset?"UTC":Ut(t.timeZoneOffset)));r.omitCommas&&(e=e.replace(Kt,"").trim());r.omitZeroMinute&&(e=e.replace(":00",""));!1===r.meridiem?e=e.replace(Xt,"").trim():"narrow"===r.meridiem?e=e.replace(Xt,(function(e,t){return t.toLocaleLowerCase()})):"short"===r.meridiem?e=e.replace(Xt,(function(e,t){return t.toLocaleLowerCase()+"m"})):"lowercase"===r.meridiem&&(e=e.replace(Xt,(function(e){return e.toLocaleLowerCase()})));return e=(e=e.replace($t," ")).trim()}((r&&!a.getUTCMinutes()?r:o).format(a),i,e,t,n)}}(e,t,n)}function rn(e,t){var n=t.markerToArray(e.marker);return{marker:e.marker,timeZoneOffset:e.timeZoneOffset,array:n,year:n[0],month:n[1],day:n[2],hour:n[3],minute:n[4],second:n[5],millisecond:n[6]}}function on(e,t,n,r){var o=rn(e,n.calendarSystem);return{date:o,start:o,end:t?rn(t,n.calendarSystem):null,timeZone:n.timeZone,localeCodes:n.locale.codes,defaultSeparator:r||n.defaultSeparator}}var an=function(){function e(e){this.cmdStr=e}return e.prototype.format=function(e,t,n){return t.cmdFormatter(this.cmdStr,on(e,null,t,n))},e.prototype.formatRange=function(e,t,n,r){return n.cmdFormatter(this.cmdStr,on(e,t,n,r))},e}(),cn=function(){function e(e){this.func=e}return e.prototype.format=function(e,t,n){return this.func(on(e,null,t,n))},e.prototype.formatRange=function(e,t,n,r){return this.func(on(e,t,n,r))},e}();function sn(e){return"object"==typeof e&&e?new tn(e):"string"==typeof e?new an(e):"function"==typeof e?new cn(e):null}var un={navLinkDayClick:yn,navLinkWeekClick:yn,duration:Rt,bootstrapFontAwesome:yn,buttonIcons:yn,customButtons:yn,defaultAllDayEventDuration:Rt,defaultTimedEventDuration:Rt,nextDayThreshold:Rt,scrollTime:Rt,scrollTimeReset:Boolean,slotMinTime:Rt,slotMaxTime:Rt,dayPopoverFormat:sn,slotDuration:Rt,snapDuration:Rt,headerToolbar:yn,footerToolbar:yn,defaultRangeSeparator:String,titleRangeSeparator:String,forceEventDuration:Boolean,dayHeaders:Boolean,dayHeaderFormat:sn,dayHeaderClassNames:yn,dayHeaderContent:yn,dayHeaderDidMount:yn,dayHeaderWillUnmount:yn,dayCellClassNames:yn,dayCellContent:yn,dayCellDidMount:yn,dayCellWillUnmount:yn,initialView:String,aspectRatio:Number,weekends:Boolean,weekNumberCalculation:yn,weekNumbers:Boolean,weekNumberClassNames:yn,weekNumberContent:yn,weekNumberDidMount:yn,weekNumberWillUnmount:yn,editable:Boolean,viewClassNames:yn,viewDidMount:yn,viewWillUnmount:yn,nowIndicator:Boolean,nowIndicatorClassNames:yn,nowIndicatorContent:yn,nowIndicatorDidMount:yn,nowIndicatorWillUnmount:yn,showNonCurrentDates:Boolean,lazyFetching:Boolean,startParam:String,endParam:String,timeZoneParam:String,timeZone:String,locales:yn,locale:yn,themeSystem:String,dragRevertDuration:Number,dragScroll:Boolean,allDayMaintainDuration:Boolean,unselectAuto:Boolean,dropAccept:yn,eventOrder:Ge,eventOrderStrict:Boolean,handleWindowResize:Boolean,windowResizeDelay:Number,longPressDelay:Number,eventDragMinDistance:Number,expandRows:Boolean,height:yn,contentHeight:yn,direction:String,weekNumberFormat:sn,eventResizableFromStart:Boolean,displayEventTime:Boolean,displayEventEnd:Boolean,weekText:String,weekTextLong:String,progressiveEventRendering:Boolean,businessHours:yn,initialDate:yn,now:yn,eventDataTransform:yn,stickyHeaderDates:yn,stickyFooterScrollbar:yn,viewHeight:yn,defaultAllDay:Boolean,eventSourceFailure:yn,eventSourceSuccess:yn,eventDisplay:String,eventStartEditable:Boolean,eventDurationEditable:Boolean,eventOverlap:yn,eventConstraint:yn,eventAllow:yn,eventBackgroundColor:String,eventBorderColor:String,eventTextColor:String,eventColor:String,eventClassNames:yn,eventContent:yn,eventDidMount:yn,eventWillUnmount:yn,selectConstraint:yn,selectOverlap:yn,selectAllow:yn,droppable:Boolean,unselectCancel:String,slotLabelFormat:yn,slotLaneClassNames:yn,slotLaneContent:yn,slotLaneDidMount:yn,slotLaneWillUnmount:yn,slotLabelClassNames:yn,slotLabelContent:yn,slotLabelDidMount:yn,slotLabelWillUnmount:yn,dayMaxEvents:yn,dayMaxEventRows:yn,dayMinWidth:Number,slotLabelInterval:Rt,allDayText:String,allDayClassNames:yn,allDayContent:yn,allDayDidMount:yn,allDayWillUnmount:yn,slotMinWidth:Number,navLinks:Boolean,eventTimeFormat:sn,rerenderDelay:Number,moreLinkText:yn,moreLinkHint:yn,selectMinDistance:Number,selectable:Boolean,selectLongPressDelay:Number,eventLongPressDelay:Number,selectMirror:Boolean,eventMaxStack:Number,eventMinHeight:Number,eventMinWidth:Number,eventShortHeight:Number,slotEventOverlap:Boolean,plugins:yn,firstDay:Number,dayCount:Number,dateAlignment:String,dateIncrement:Rt,hiddenDays:yn,monthMode:Boolean,fixedWeekCount:Boolean,validRange:yn,visibleRange:yn,titleFormat:yn,eventInteractive:Boolean,noEventsText:String,viewHint:yn,navLinkHint:yn,closeHint:String,timeHint:String,eventHint:String,moreLinkClick:yn,moreLinkClassNames:yn,moreLinkContent:yn,moreLinkDidMount:yn,moreLinkWillUnmount:yn},ln={eventDisplay:"auto",defaultRangeSeparator:" - ",titleRangeSeparator:" – ",defaultTimedEventDuration:"01:00:00",defaultAllDayEventDuration:{day:1},forceEventDuration:!1,nextDayThreshold:"00:00:00",dayHeaders:!0,initialView:"",aspectRatio:1.35,headerToolbar:{start:"title",center:"",end:"today prev,next"},weekends:!0,weekNumbers:!1,weekNumberCalculation:"local",editable:!1,nowIndicator:!1,scrollTime:"06:00:00",scrollTimeReset:!0,slotMinTime:"00:00:00",slotMaxTime:"24:00:00",showNonCurrentDates:!0,lazyFetching:!0,startParam:"start",endParam:"end",timeZoneParam:"timeZone",timeZone:"local",locales:[],locale:"",themeSystem:"standard",dragRevertDuration:500,dragScroll:!0,allDayMaintainDuration:!1,unselectAuto:!0,dropAccept:"*",eventOrder:"start,-duration,allDay,title",dayPopoverFormat:{month:"long",day:"numeric",year:"numeric"},handleWindowResize:!0,windowResizeDelay:100,longPressDelay:1e3,eventDragMinDistance:5,expandRows:!1,navLinks:!1,selectable:!1,eventMinHeight:15,eventMinWidth:30,eventShortHeight:30},dn={datesSet:yn,eventsSet:yn,eventAdd:yn,eventChange:yn,eventRemove:yn,windowResize:yn,eventClick:yn,eventMouseEnter:yn,eventMouseLeave:yn,select:yn,unselect:yn,loading:yn,_unmount:yn,_beforeprint:yn,_afterprint:yn,_noEventDrop:yn,_noEventResize:yn,_resize:yn,_scrollRequest:yn},fn={buttonText:yn,buttonHints:yn,views:yn,plugins:yn,initialEvents:yn,events:yn,eventSources:yn},pn={headerToolbar:hn,footerToolbar:hn,buttonText:hn,buttonHints:hn,buttonIcons:hn,dateIncrement:hn};function hn(e,t){return"object"==typeof e&&"object"==typeof t&&e&&t?Ot(e,t):e===t}var mn={type:String,component:yn,buttonText:String,buttonTextKey:String,dateProfileGeneratorClass:yn,usesMinMaxTime:Boolean,classNames:yn,content:yn,didMount:yn,willUnmount:yn};function gn(e){return bt(e,pn)}function vn(e,t){var n={},r={};for(var o in t)o in e&&(n[o]=t[o](e[o]));for(var o in e)o in t||(r[o]=e[o]);return{refined:n,extra:r}}function yn(e){return e}function bn(e,t,n,r){for(var o={defs:{},instances:{}},i=Mn(n),a=0,c=e;a<c.length;a++){var s=Rn(c[a],t,n,r,i);s&&wn(s,o)}return o}function wn(e,t){return void 0===t&&(t={defs:{},instances:{}}),t.defs[e.def.defId]=e.def,e.instance&&(t.instances[e.instance.instanceId]=e.instance),t}function An(e,t){var n=e.instances[t];if(n){var r=e.defs[n.defId],o=En(e,(function(e){return t=r,n=e,Boolean(t.groupId&&t.groupId===n.groupId);var t,n}));return o.defs[r.defId]=r,o.instances[n.instanceId]=n,o}return{defs:{},instances:{}}}function xn(e,t){return{defs:ie(ie({},e.defs),t.defs),instances:ie(ie({},e.instances),t.instances)}}function En(e,t){var n=wt(e.defs,t),r=wt(e.instances,(function(e){return n[e.defId]}));return{defs:n,instances:r}}function On(e){return Array.isArray(e)?e:"string"==typeof e?e.split(/\s+/):[]}var Cn={display:String,editable:Boolean,startEditable:Boolean,durationEditable:Boolean,constraint:yn,overlap:yn,allow:yn,className:On,classNames:On,color:String,backgroundColor:String,borderColor:String,textColor:String},kn={display:null,startEditable:null,durationEditable:null,constraints:[],overlap:null,allows:[],backgroundColor:"",borderColor:"",textColor:"",classNames:[]};function Sn(e,t){var n=function(e,t){return Array.isArray(e)?bn(e,null,t,!0):"object"==typeof e&&e?bn([e],null,t,!0):null!=e?String(e):null}(e.constraint,t);return{display:e.display||null,startEditable:null!=e.startEditable?e.startEditable:e.editable,durationEditable:null!=e.durationEditable?e.durationEditable:e.editable,constraints:null!=n?[n]:[],overlap:null!=e.overlap?e.overlap:null,allows:null!=e.allow?[e.allow]:[],backgroundColor:e.backgroundColor||e.color||"",borderColor:e.borderColor||e.color||"",textColor:e.textColor||"",classNames:(e.className||[]).concat(e.classNames||[])}}function Dn(e){return e.reduce(Pn,kn)}function Pn(e,t){return{display:null!=t.display?t.display:e.display,startEditable:null!=t.startEditable?t.startEditable:e.startEditable,durationEditable:null!=t.durationEditable?t.durationEditable:e.durationEditable,constraints:e.constraints.concat(t.constraints),overlap:"boolean"==typeof t.overlap?t.overlap:e.overlap,allows:e.allows.concat(t.allows),backgroundColor:t.backgroundColor||e.backgroundColor,borderColor:t.borderColor||e.borderColor,textColor:t.textColor||e.textColor,classNames:e.classNames.concat(t.classNames)}}var _n={id:String,groupId:String,title:String,url:String,interactive:Boolean},jn={start:yn,end:yn,date:yn,allDay:Boolean},Tn=ie(ie(ie({},_n),jn),{extendedProps:yn});function Rn(e,t,n,r,o){void 0===o&&(o=Mn(n));var i=In(e,n,o),a=i.refined,c=i.extra,s=function(e,t){var n=null;e&&(n=e.defaultAllDay);null==n&&(n=t.options.defaultAllDay);return n}(t,n),u=function(e,t,n,r){for(var o=0;o<r.length;o+=1){var i=r[o].parse(e,n);if(i){var a=e.allDay;return null==a&&null==(a=t)&&null==(a=i.allDayGuess)&&(a=!1),{allDay:a,duration:i.duration,typeData:i.typeData,typeId:o}}}return null}(a,s,n.dateEnv,n.pluginHooks.recurringTypes);if(u)return(l=Nn(a,c,t?t.sourceId:"",u.allDay,Boolean(u.duration),n)).recurringDef={typeId:u.typeId,typeData:u.typeData,duration:u.duration},{def:l,instance:null};var l,d=function(e,t,n,r){var o,i,a=e.allDay,c=null,s=!1,u=null,l=null!=e.start?e.start:e.date;if(o=n.dateEnv.createMarkerMeta(l))c=o.marker;else if(!r)return null;null!=e.end&&(i=n.dateEnv.createMarkerMeta(e.end));null==a&&(a=null!=t?t:(!o||o.isTimeUnspecified)&&(!i||i.isTimeUnspecified));a&&c&&(c=st(c));i&&(u=i.marker,a&&(u=st(u)),c&&u<=c&&(u=null));u?s=!0:r||(s=n.options.forceEventDuration||!1,u=n.dateEnv.add(c,a?n.options.defaultAllDayEventDuration:n.options.defaultTimedEventDuration));return{allDay:a,hasEnd:s,range:{start:c,end:u},forcedStartTzo:o?o.forcedTzo:null,forcedEndTzo:i?i.forcedTzo:null}}(a,s,n,r);return d?{def:l=Nn(a,c,t?t.sourceId:"",d.allDay,d.hasEnd,n),instance:vt(l.defId,d.range,d.forcedStartTzo,d.forcedEndTzo)}:null}function In(e,t,n){return void 0===n&&(n=Mn(t)),vn(e,n)}function Mn(e){return ie(ie(ie({},Cn),Tn),e.pluginHooks.eventRefiners)}function Nn(e,t,n,r,o,i){for(var a={title:e.title||"",groupId:e.groupId||"",publicId:e.id||"",url:e.url||"",recurringDef:null,defId:Ve(),sourceId:n,allDay:r,hasEnd:o,interactive:e.interactive,ui:Sn(e,i),extendedProps:ie(ie({},e.extendedProps||{}),t)},c=0,s=i.pluginHooks.eventDefMemberAdders;c<s.length;c++){var u=s[c];ie(a,u(e))}return Object.freeze(a.ui.classNames),Object.freeze(a.extendedProps),a}function Bn(e){var t=Math.floor(at(e.start,e.end))||1,n=st(e.start);return{start:n,end:ot(n,t)}}function Zn(e,t){void 0===t&&(t=Rt(0));var n=null,r=null;if(e.end){r=st(e.end);var o=e.end.valueOf()-r.valueOf();o&&o>=Bt(t)&&(r=ot(r,1))}return e.start&&(n=st(e.start),r&&r<=n&&(r=ot(n,1))),{start:n,end:r}}function Fn(e,t,n,r){return"year"===r?Rt(n.diffWholeYears(e,t),"year"):"month"===r?Rt(n.diffWholeMonths(e,t),"month"):(i=t,a=st(o=e),c=st(i),{years:0,months:0,days:Math.round(at(a,c)),milliseconds:i.valueOf()-c.valueOf()-(o.valueOf()-a.valueOf())});var o,i,a,c}function Ln(e,t){var n,r,o=[],i=t.start;for(e.sort(Hn),n=0;n<e.length;n+=1)(r=e[n]).start>i&&o.push({start:i,end:r.start}),r.end>i&&(i=r.end);return i<t.end&&o.push({start:i,end:t.end}),o}function Hn(e,t){return e.start.valueOf()-t.start.valueOf()}function Un(e,t){var n=e.start,r=e.end,o=null;return null!==t.start&&(n=null===n?t.start:new Date(Math.max(n.valueOf(),t.start.valueOf()))),null!=t.end&&(r=null===r?t.end:new Date(Math.min(r.valueOf(),t.end.valueOf()))),(null===n||null===r||n<r)&&(o={start:n,end:r}),o}function zn(e,t){return(null===e.start?null:e.start.valueOf())===(null===t.start?null:t.start.valueOf())&&(null===e.end?null:e.end.valueOf())===(null===t.end?null:t.end.valueOf())}function Wn(e,t){return(null===e.end||null===t.start||e.end>t.start)&&(null===e.start||null===t.end||e.start<t.end)}function Vn(e,t){return(null===e.start||null!==t.start&&t.start>=e.start)&&(null===e.end||null!==t.end&&t.end<=e.end)}function Yn(e,t){return(null===e.start||t>=e.start)&&(null===e.end||t<e.end)}function qn(e,t,n,r){var o={},i={},a={},c=[],s=[],u=Xn(e.defs,t);for(var l in e.defs){"inverse-background"===(p=u[(w=e.defs[l]).defId]).display&&(w.groupId?(o[w.groupId]=[],a[w.groupId]||(a[w.groupId]=w)):i[l]=[])}for(var d in e.instances){var f=e.instances[d],p=u[(w=e.defs[f.defId]).defId],h=f.range,m=!w.allDay&&r?Zn(h,r):h,g=Un(m,n);g&&("inverse-background"===p.display?w.groupId?o[w.groupId].push(g):i[f.defId].push(g):"none"!==p.display&&("background"===p.display?c:s).push({def:w,ui:p,instance:f,range:g,isStart:m.start&&m.start.valueOf()===g.start.valueOf(),isEnd:m.end&&m.end.valueOf()===g.end.valueOf()}))}for(var v in o)for(var y=0,b=Ln(o[v],n);y<b.length;y++){var w,A=b[y];p=u[(w=a[v]).defId];c.push({def:w,ui:p,instance:null,range:A,isStart:!1,isEnd:!1})}for(var l in i)for(var x=0,E=Ln(i[l],n);x<E.length;x++){A=E[x];c.push({def:e.defs[l],ui:u[l],instance:null,range:A,isStart:!1,isEnd:!1})}return{bg:c,fg:s}}function Gn(e,t){e.fcSeg=t}function Qn(e){return e.fcSeg||e.parentNode.fcSeg||null}function Xn(e,t){return At(e,(function(e){return Kn(e,t)}))}function Kn(e,t){var n=[];return t[""]&&n.push(t[""]),t[e.defId]&&n.push(t[e.defId]),n.push(e.ui),Dn(n)}function $n(e,t){var n=e.map(Jn);return n.sort((function(e,n){return Qe(e,n,t)})),n.map((function(e){return e._seg}))}function Jn(e){var t=e.eventRange,n=t.def,r=t.instance?t.instance.range:t.range,o=r.start?r.start.valueOf():0,i=r.end?r.end.valueOf():0;return ie(ie(ie({},n.extendedProps),n),{id:n.publicId,start:o,end:i,duration:i-o,allDay:Number(n.allDay),_seg:e})}function er(e,t){for(var n=t.pluginHooks.isDraggableTransformers,r=e.eventRange,o=r.def,i=r.ui,a=i.startEditable,c=0,s=n;c<s.length;c++){a=(0,s[c])(a,o,i,t)}return a}function tr(e,t){return e.isStart&&e.eventRange.ui.durationEditable&&t.options.eventResizableFromStart}function nr(e,t){return e.isEnd&&e.eventRange.ui.durationEditable}function rr(e,t,n){var r=e.eventRange.range;return{isPast:r.end<(n||t.start),isFuture:r.start>=(n||t.end),isToday:t&&Yn(t,r.start)}}var or={start:yn,end:yn,allDay:Boolean};function ir(e,t,n){var r=function(e,t){var n=vn(e,or),r=n.refined,o=n.extra,i=r.start?t.createMarkerMeta(r.start):null,a=r.end?t.createMarkerMeta(r.end):null,c=r.allDay;null==c&&(c=i&&i.isTimeUnspecified&&(!a||a.isTimeUnspecified));return ie({range:{start:i?i.marker:null,end:a?a.marker:null},allDay:c},o)}(e,t),o=r.range;if(!o.start)return null;if(!o.end){if(null==n)return null;o.end=t.add(o.start,n)}return r}function ar(e,t,n){return ie(ie({},cr(e,t,n)),{timeZone:t.timeZone})}function cr(e,t,n){return{start:t.toDate(e.start),end:t.toDate(e.end),startStr:t.formatIso(e.start,{omitTime:n}),endStr:t.formatIso(e.end,{omitTime:n})}}function sr(e,t,n){var r=In({editable:!1},n),o=Nn(r.refined,r.extra,"",e.allDay,!0,n);return{def:o,ui:Kn(o,t),instance:vt(o.defId,e.range),range:e.range,isStart:!0,isEnd:!0}}function ur(e,t,n){n.emitter.trigger("select",ie(ie({},lr(e,n)),{jsEvent:t?t.origEvent:null,view:n.viewApi||n.calendarApi.view}))}function lr(e,t){for(var n,r,o={},i=0,a=t.pluginHooks.dateSpanTransforms;i<a.length;i++){var c=a[i];ie(o,c(e,t))}return ie(o,(n=e,r=t.dateEnv,ie(ie({},cr(n.range,r,n.allDay)),{allDay:n.allDay}))),o}function dr(e,t,n){var r=n.dateEnv,o=n.options,i=t;return e?(i=st(i),i=r.add(i,o.defaultAllDayEventDuration)):i=r.add(i,o.defaultTimedEventDuration),i}function fr(e,t,n,r){var o=Xn(e.defs,t),i={defs:{},instances:{}};for(var a in e.defs){var c=e.defs[a];i.defs[a]=pr(c,o[a],n,r)}for(var s in e.instances){var u=e.instances[s];c=i.defs[u.defId];i.instances[s]=hr(u,c,o[u.defId],n,r)}return i}function pr(e,t,n,r){var o=n.standardProps||{};null==o.hasEnd&&t.durationEditable&&(n.startDelta||n.endDelta)&&(o.hasEnd=!0);var i=ie(ie(ie({},e),o),{ui:ie(ie({},e.ui),o.ui)});n.extendedProps&&(i.extendedProps=ie(ie({},i.extendedProps),n.extendedProps));for(var a=0,c=r.pluginHooks.eventDefMutationAppliers;a<c.length;a++){(0,c[a])(i,n,r)}return!i.hasEnd&&r.options.forceEventDuration&&(i.hasEnd=!0),i}function hr(e,t,n,r,o){var i=o.dateEnv,a=r.standardProps&&!0===r.standardProps.allDay,c=r.standardProps&&!1===r.standardProps.hasEnd,s=ie({},e);return a&&(s.range=Bn(s.range)),r.datesDelta&&n.startEditable&&(s.range={start:i.add(s.range.start,r.datesDelta),end:i.add(s.range.end,r.datesDelta)}),r.startDelta&&n.durationEditable&&(s.range={start:i.add(s.range.start,r.startDelta),end:s.range.end}),r.endDelta&&n.durationEditable&&(s.range={start:s.range.start,end:i.add(s.range.end,r.endDelta)}),c&&(s.range={start:s.range.start,end:dr(t.allDay,s.range.start,o)}),t.allDay&&(s.range={start:st(s.range.start),end:st(s.range.end)}),s.range.end<s.range.start&&(s.range.end=dr(t.allDay,s.range.start,o)),s}var mr=function(){function e(e,t,n){this.type=e,this.getCurrentData=t,this.dateEnv=n}return Object.defineProperty(e.prototype,"calendar",{get:function(){return this.getCurrentData().calendarApi},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"title",{get:function(){return this.getCurrentData().viewTitle},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"activeStart",{get:function(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.activeRange.start)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"activeEnd",{get:function(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.activeRange.end)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentStart",{get:function(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.currentRange.start)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentEnd",{get:function(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.currentRange.end)},enumerable:!1,configurable:!0}),e.prototype.getOption=function(e){return this.getCurrentData().options[e]},e}(),gr={id:String,defaultAllDay:Boolean,url:String,format:String,events:yn,eventDataTransform:yn,success:yn,failure:yn};function vr(e,t,n){var r;if(void 0===n&&(n=yr(t)),"string"==typeof e?r={url:e}:"function"==typeof e||Array.isArray(e)?r={events:e}:"object"==typeof e&&e&&(r=e),r){var o=vn(r,n),i=o.refined,a=o.extra,c=function(e,t){for(var n=t.pluginHooks.eventSourceDefs,r=n.length-1;r>=0;r-=1){var o=n[r].parseMeta(e);if(o)return{sourceDefId:r,meta:o}}return null}(i,t);if(c)return{_raw:e,isFetching:!1,latestFetchId:"",fetchRange:null,defaultAllDay:i.defaultAllDay,eventDataTransform:i.eventDataTransform,success:i.success,failure:i.failure,publicId:i.id||"",sourceId:Ve(),sourceDefId:c.sourceDefId,meta:c.meta,ui:Sn(i,t),extendedProps:a}}return null}function yr(e){return ie(ie(ie({},Cn),gr),e.pluginHooks.eventSourceRefiners)}function br(e,t){return"function"==typeof e&&(e=e()),null==e?t.createNowMarker():t.createMarker(e)}var wr=function(){function e(){}return e.prototype.getCurrentData=function(){return this.currentDataManager.getCurrentData()},e.prototype.dispatch=function(e){return this.currentDataManager.dispatch(e)},Object.defineProperty(e.prototype,"view",{get:function(){return this.getCurrentData().viewApi},enumerable:!1,configurable:!0}),e.prototype.batchRendering=function(e){e()},e.prototype.updateSize=function(){this.trigger("_resize",!0)},e.prototype.setOption=function(e,t){this.dispatch({type:"SET_OPTION",optionName:e,rawOptionValue:t})},e.prototype.getOption=function(e){return this.currentDataManager.currentCalendarOptionsInput[e]},e.prototype.getAvailableLocaleCodes=function(){return Object.keys(this.getCurrentData().availableRawLocales)},e.prototype.on=function(e,t){var n=this.currentDataManager;n.currentCalendarOptionsRefiners[e]?n.emitter.on(e,t):console.warn("Unknown listener name '"+e+"'")},e.prototype.off=function(e,t){this.currentDataManager.emitter.off(e,t)},e.prototype.trigger=function(e){for(var t,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];(t=this.currentDataManager.emitter).trigger.apply(t,ae([e],n))},e.prototype.changeView=function(e,t){var n=this;this.batchRendering((function(){if(n.unselect(),t)if(t.start&&t.end)n.dispatch({type:"CHANGE_VIEW_TYPE",viewType:e}),n.dispatch({type:"SET_OPTION",optionName:"visibleRange",rawOptionValue:t});else{var r=n.getCurrentData().dateEnv;n.dispatch({type:"CHANGE_VIEW_TYPE",viewType:e,dateMarker:r.createMarker(t)})}else n.dispatch({type:"CHANGE_VIEW_TYPE",viewType:e})}))},e.prototype.zoomTo=function(e,t){var n;t=t||"day",n=this.getCurrentData().viewSpecs[t]||this.getUnitViewSpec(t),this.unselect(),n?this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:n.type,dateMarker:e}):this.dispatch({type:"CHANGE_DATE",dateMarker:e})},e.prototype.getUnitViewSpec=function(e){var t,n,r=this.getCurrentData(),o=r.viewSpecs,i=r.toolbarConfig,a=[].concat(i.header?i.header.viewsWithButtons:[],i.footer?i.footer.viewsWithButtons:[]);for(var c in o)a.push(c);for(t=0;t<a.length;t+=1)if((n=o[a[t]])&&n.singleUnit===e)return n;return null},e.prototype.prev=function(){this.unselect(),this.dispatch({type:"PREV"})},e.prototype.next=function(){this.unselect(),this.dispatch({type:"NEXT"})},e.prototype.prevYear=function(){var e=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:e.dateEnv.addYears(e.currentDate,-1)})},e.prototype.nextYear=function(){var e=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:e.dateEnv.addYears(e.currentDate,1)})},e.prototype.today=function(){var e=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:br(e.calendarOptions.now,e.dateEnv)})},e.prototype.gotoDate=function(e){var t=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:t.dateEnv.createMarker(e)})},e.prototype.incrementDate=function(e){var t=this.getCurrentData(),n=Rt(e);n&&(this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:t.dateEnv.add(t.currentDate,n)}))},e.prototype.getDate=function(){var e=this.getCurrentData();return e.dateEnv.toDate(e.currentDate)},e.prototype.formatDate=function(e,t){var n=this.getCurrentData().dateEnv;return n.format(n.createMarker(e),sn(t))},e.prototype.formatRange=function(e,t,n){var r=this.getCurrentData().dateEnv;return r.formatRange(r.createMarker(e),r.createMarker(t),sn(n),n)},e.prototype.formatIso=function(e,t){var n=this.getCurrentData().dateEnv;return n.formatIso(n.createMarker(e),{omitTime:t})},e.prototype.select=function(e,t){var n;n=null==t?null!=e.start?e:{start:e,end:null}:{start:e,end:t};var r=this.getCurrentData(),o=ir(n,r.dateEnv,Rt({days:1}));o&&(this.dispatch({type:"SELECT_DATES",selection:o}),ur(o,null,r))},e.prototype.unselect=function(e){var t=this.getCurrentData();t.dateSelection&&(this.dispatch({type:"UNSELECT_DATES"}),function(e,t){t.emitter.trigger("unselect",{jsEvent:e?e.origEvent:null,view:t.viewApi||t.calendarApi.view})}(e,t))},e.prototype.addEvent=function(e,t){if(e instanceof Ar){var n=e._def,r=e._instance;return this.getCurrentData().eventStore.defs[n.defId]||(this.dispatch({type:"ADD_EVENTS",eventStore:wn({def:n,instance:r})}),this.triggerEventAdd(e)),e}var o,i=this.getCurrentData();if(t instanceof De)o=t.internalEventSource;else if("boolean"==typeof t)t&&(o=Et(i.eventSources)[0]);else if(null!=t){var a=this.getEventSourceById(t);if(!a)return console.warn('Could not find an event source with ID "'+t+'"'),null;o=a.internalEventSource}var c=Rn(e,o,i,!1);if(c){var s=new Ar(i,c.def,c.def.recurringDef?null:c.instance);return this.dispatch({type:"ADD_EVENTS",eventStore:wn(c)}),this.triggerEventAdd(s),s}return null},e.prototype.triggerEventAdd=function(e){var t=this;this.getCurrentData().emitter.trigger("eventAdd",{event:e,relatedEvents:[],revert:function(){t.dispatch({type:"REMOVE_EVENTS",eventStore:xr(e)})}})},e.prototype.getEventById=function(e){var t=this.getCurrentData(),n=t.eventStore,r=n.defs,o=n.instances;for(var i in e=String(e),r){var a=r[i];if(a.publicId===e){if(a.recurringDef)return new Ar(t,a,null);for(var c in o){var s=o[c];if(s.defId===a.defId)return new Ar(t,a,s)}}}return null},e.prototype.getEvents=function(){var e=this.getCurrentData();return Er(e.eventStore,e)},e.prototype.removeAllEvents=function(){this.dispatch({type:"REMOVE_ALL_EVENTS"})},e.prototype.getEventSources=function(){var e=this.getCurrentData(),t=e.eventSources,n=[];for(var r in t)n.push(new De(e,t[r]));return n},e.prototype.getEventSourceById=function(e){var t=this.getCurrentData(),n=t.eventSources;for(var r in e=String(e),n)if(n[r].publicId===e)return new De(t,n[r]);return null},e.prototype.addEventSource=function(e){var t=this.getCurrentData();if(e instanceof De)return t.eventSources[e.internalEventSource.sourceId]||this.dispatch({type:"ADD_EVENT_SOURCES",sources:[e.internalEventSource]}),e;var n=vr(e,t);return n?(this.dispatch({type:"ADD_EVENT_SOURCES",sources:[n]}),new De(t,n)):null},e.prototype.removeAllEventSources=function(){this.dispatch({type:"REMOVE_ALL_EVENT_SOURCES"})},e.prototype.refetchEvents=function(){this.dispatch({type:"FETCH_EVENT_SOURCES",isRefetch:!0})},e.prototype.scrollToTime=function(e){var t=Rt(e);t&&this.trigger("_scrollRequest",{time:t})},e}(),Ar=function(){function e(e,t,n){this._context=e,this._def=t,this._instance=n||null}return e.prototype.setProp=function(e,t){var n,r;if(e in jn)console.warn("Could not set date-related prop 'name'. Use one of the date-related methods instead.");else if("id"===e)t=_n[e](t),this.mutate({standardProps:{publicId:t}});else if(e in _n)t=_n[e](t),this.mutate({standardProps:(n={},n[e]=t,n)});else if(e in Cn){var o=Cn[e](t);"color"===e?o={backgroundColor:t,borderColor:t}:"editable"===e?o={startEditable:t,durationEditable:t}:((r={})[e]=t,o=r),this.mutate({standardProps:{ui:o}})}else console.warn("Could not set prop '"+e+"'. Use setExtendedProp instead.")},e.prototype.setExtendedProp=function(e,t){var n;this.mutate({extendedProps:(n={},n[e]=t,n)})},e.prototype.setStart=function(e,t){void 0===t&&(t={});var n=this._context.dateEnv,r=n.createMarker(e);if(r&&this._instance){var o=Fn(this._instance.range.start,r,n,t.granularity);t.maintainDuration?this.mutate({datesDelta:o}):this.mutate({startDelta:o})}},e.prototype.setEnd=function(e,t){void 0===t&&(t={});var n,r=this._context.dateEnv;if((null==e||(n=r.createMarker(e)))&&this._instance)if(n){var o=Fn(this._instance.range.end,n,r,t.granularity);this.mutate({endDelta:o})}else this.mutate({standardProps:{hasEnd:!1}})},e.prototype.setDates=function(e,t,n){void 0===n&&(n={});var r,o,i,a=this._context.dateEnv,c={allDay:n.allDay},s=a.createMarker(e);if(s&&((null==t||(r=a.createMarker(t)))&&this._instance)){var u=this._instance.range;!0===n.allDay&&(u=Bn(u));var l=Fn(u.start,s,a,n.granularity);if(r){var d=Fn(u.end,r,a,n.granularity);i=d,(o=l).years===i.years&&o.months===i.months&&o.days===i.days&&o.milliseconds===i.milliseconds?this.mutate({datesDelta:l,standardProps:c}):this.mutate({startDelta:l,endDelta:d,standardProps:c})}else c.hasEnd=!1,this.mutate({datesDelta:l,standardProps:c})}},e.prototype.moveStart=function(e){var t=Rt(e);t&&this.mutate({startDelta:t})},e.prototype.moveEnd=function(e){var t=Rt(e);t&&this.mutate({endDelta:t})},e.prototype.moveDates=function(e){var t=Rt(e);t&&this.mutate({datesDelta:t})},e.prototype.setAllDay=function(e,t){void 0===t&&(t={});var n={allDay:e},r=t.maintainDuration;null==r&&(r=this._context.options.allDayMaintainDuration),this._def.allDay!==e&&(n.hasEnd=r),this.mutate({standardProps:n})},e.prototype.formatRange=function(e){var t=this._context.dateEnv,n=this._instance,r=sn(e);return this._def.hasEnd?t.formatRange(n.range.start,n.range.end,r,{forcedStartTzo:n.forcedStartTzo,forcedEndTzo:n.forcedEndTzo}):t.format(n.range.start,r,{forcedTzo:n.forcedStartTzo})},e.prototype.mutate=function(t){var n=this._instance;if(n){var r=this._def,o=this._context,i=o.getCurrentData().eventStore,a=An(i,n.instanceId);a=fr(a,{"":{display:"",startEditable:!0,durationEditable:!0,constraints:[],overlap:null,allows:[],backgroundColor:"",borderColor:"",textColor:"",classNames:[]}},t,o);var c=new e(o,r,n);this._def=a.defs[r.defId],this._instance=a.instances[n.instanceId],o.dispatch({type:"MERGE_EVENTS",eventStore:a}),o.emitter.trigger("eventChange",{oldEvent:c,event:this,relatedEvents:Er(a,o,n),revert:function(){o.dispatch({type:"RESET_EVENTS",eventStore:i})}})}},e.prototype.remove=function(){var e=this._context,t=xr(this);e.dispatch({type:"REMOVE_EVENTS",eventStore:t}),e.emitter.trigger("eventRemove",{event:this,relatedEvents:[],revert:function(){e.dispatch({type:"MERGE_EVENTS",eventStore:t})}})},Object.defineProperty(e.prototype,"source",{get:function(){var e=this._def.sourceId;return e?new De(this._context,this._context.getCurrentData().eventSources[e]):null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"start",{get:function(){return this._instance?this._context.dateEnv.toDate(this._instance.range.start):null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"end",{get:function(){return this._instance&&this._def.hasEnd?this._context.dateEnv.toDate(this._instance.range.end):null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"startStr",{get:function(){var e=this._instance;return e?this._context.dateEnv.formatIso(e.range.start,{omitTime:this._def.allDay,forcedTzo:e.forcedStartTzo}):""},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"endStr",{get:function(){var e=this._instance;return e&&this._def.hasEnd?this._context.dateEnv.formatIso(e.range.end,{omitTime:this._def.allDay,forcedTzo:e.forcedEndTzo}):""},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"id",{get:function(){return this._def.publicId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"groupId",{get:function(){return this._def.groupId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"allDay",{get:function(){return this._def.allDay},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"title",{get:function(){return this._def.title},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"url",{get:function(){return this._def.url},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"display",{get:function(){return this._def.ui.display||"auto"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"startEditable",{get:function(){return this._def.ui.startEditable},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"durationEditable",{get:function(){return this._def.ui.durationEditable},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"constraint",{get:function(){return this._def.ui.constraints[0]||null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"overlap",{get:function(){return this._def.ui.overlap},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"allow",{get:function(){return this._def.ui.allows[0]||null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"backgroundColor",{get:function(){return this._def.ui.backgroundColor},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"borderColor",{get:function(){return this._def.ui.borderColor},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textColor",{get:function(){return this._def.ui.textColor},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"classNames",{get:function(){return this._def.ui.classNames},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"extendedProps",{get:function(){return this._def.extendedProps},enumerable:!1,configurable:!0}),e.prototype.toPlainObject=function(e){void 0===e&&(e={});var t=this._def,n=t.ui,r=this.startStr,o=this.endStr,i={};return t.title&&(i.title=t.title),r&&(i.start=r),o&&(i.end=o),t.publicId&&(i.id=t.publicId),t.groupId&&(i.groupId=t.groupId),t.url&&(i.url=t.url),n.display&&"auto"!==n.display&&(i.display=n.display),e.collapseColor&&n.backgroundColor&&n.backgroundColor===n.borderColor?i.color=n.backgroundColor:(n.backgroundColor&&(i.backgroundColor=n.backgroundColor),n.borderColor&&(i.borderColor=n.borderColor)),n.textColor&&(i.textColor=n.textColor),n.classNames.length&&(i.classNames=n.classNames),Object.keys(t.extendedProps).length&&(e.collapseExtendedProps?ie(i,t.extendedProps):i.extendedProps=t.extendedProps),i},e.prototype.toJSON=function(){return this.toPlainObject()},e}();function xr(e){var t,n,r=e._def,o=e._instance;return{defs:(t={},t[r.defId]=r,t),instances:o?(n={},n[o.instanceId]=o,n):{}}}function Er(e,t,n){var r=e.defs,o=e.instances,i=[],a=n?n.instanceId:"";for(var c in o){var s=o[c],u=r[s.defId];s.instanceId!==a&&i.push(new Ar(t,u,s))}return i}var Or={};!function(e,t){Or[e]=t}("gregory",function(){function e(){}return e.prototype.getMarkerYear=function(e){return e.getUTCFullYear()},e.prototype.getMarkerMonth=function(e){return e.getUTCMonth()},e.prototype.getMarkerDay=function(e){return e.getUTCDate()},e.prototype.arrayToMarker=function(e){return ht(e)},e.prototype.markerToArray=function(e){return pt(e)},e}());var Cr=/^\s*(\d{4})(-?(\d{2})(-?(\d{2})([T ](\d{2}):?(\d{2})(:?(\d{2})(\.(\d+))?)?(Z|(([-+])(\d{2})(:?(\d{2}))?))?)?)?)?$/;var kr=function(){function e(e){var t=this.timeZone=e.timeZone,n="local"!==t&&"UTC"!==t;e.namedTimeZoneImpl&&n&&(this.namedTimeZoneImpl=new e.namedTimeZoneImpl(t)),this.canComputeOffset=Boolean(!n||this.namedTimeZoneImpl),this.calendarSystem=function(e){return new Or[e]}(e.calendarSystem),this.locale=e.locale,this.weekDow=e.locale.week.dow,this.weekDoy=e.locale.week.doy,"ISO"===e.weekNumberCalculation&&(this.weekDow=1,this.weekDoy=4),"number"==typeof e.firstDay&&(this.weekDow=e.firstDay),"function"==typeof e.weekNumberCalculation&&(this.weekNumberFunc=e.weekNumberCalculation),this.weekText=null!=e.weekText?e.weekText:e.locale.options.weekText,this.weekTextLong=(null!=e.weekTextLong?e.weekTextLong:e.locale.options.weekTextLong)||this.weekText,this.cmdFormatter=e.cmdFormatter,this.defaultSeparator=e.defaultSeparator}return e.prototype.createMarker=function(e){var t=this.createMarkerMeta(e);return null===t?null:t.marker},e.prototype.createNowMarker=function(){return this.canComputeOffset?this.timestampToMarker((new Date).valueOf()):ht(dt(new Date))},e.prototype.createMarkerMeta=function(e){if("string"==typeof e)return this.parse(e);var t=null;return"number"==typeof e?t=this.timestampToMarker(e):e instanceof Date?(e=e.valueOf(),isNaN(e)||(t=this.timestampToMarker(e))):Array.isArray(e)&&(t=ht(e)),null!==t&&mt(t)?{marker:t,isTimeUnspecified:!1,forcedTzo:null}:null},e.prototype.parse=function(e){var t=function(e){var t=Cr.exec(e);if(t){var n=new Date(Date.UTC(Number(t[1]),t[3]?Number(t[3])-1:0,Number(t[5]||1),Number(t[7]||0),Number(t[8]||0),Number(t[10]||0),t[12]?1e3*Number("0."+t[12]):0));if(mt(n)){var r=null;return t[13]&&(r=("-"===t[15]?-1:1)*(60*Number(t[16]||0)+Number(t[18]||0))),{marker:n,isTimeUnspecified:!t[6],timeZoneOffset:r}}}return null}(e);if(null===t)return null;var n=t.marker,r=null;return null!==t.timeZoneOffset&&(this.canComputeOffset?n=this.timestampToMarker(n.valueOf()-60*t.timeZoneOffset*1e3):r=t.timeZoneOffset),{marker:n,isTimeUnspecified:t.isTimeUnspecified,forcedTzo:r}},e.prototype.getYear=function(e){return this.calendarSystem.getMarkerYear(e)},e.prototype.getMonth=function(e){return this.calendarSystem.getMarkerMonth(e)},e.prototype.add=function(e,t){var n=this.calendarSystem.markerToArray(e);return n[0]+=t.years,n[1]+=t.months,n[2]+=t.days,n[6]+=t.milliseconds,this.calendarSystem.arrayToMarker(n)},e.prototype.subtract=function(e,t){var n=this.calendarSystem.markerToArray(e);return n[0]-=t.years,n[1]-=t.months,n[2]-=t.days,n[6]-=t.milliseconds,this.calendarSystem.arrayToMarker(n)},e.prototype.addYears=function(e,t){var n=this.calendarSystem.markerToArray(e);return n[0]+=t,this.calendarSystem.arrayToMarker(n)},e.prototype.addMonths=function(e,t){var n=this.calendarSystem.markerToArray(e);return n[1]+=t,this.calendarSystem.arrayToMarker(n)},e.prototype.diffWholeYears=function(e,t){var n=this.calendarSystem;return gt(e)===gt(t)&&n.getMarkerDay(e)===n.getMarkerDay(t)&&n.getMarkerMonth(e)===n.getMarkerMonth(t)?n.getMarkerYear(t)-n.getMarkerYear(e):null},e.prototype.diffWholeMonths=function(e,t){var n=this.calendarSystem;return gt(e)===gt(t)&&n.getMarkerDay(e)===n.getMarkerDay(t)?n.getMarkerMonth(t)-n.getMarkerMonth(e)+12*(n.getMarkerYear(t)-n.getMarkerYear(e)):null},e.prototype.greatestWholeUnit=function(e,t){var n=this.diffWholeYears(e,t);return null!==n?{unit:"year",value:n}:null!==(n=this.diffWholeMonths(e,t))?{unit:"month",value:n}:(n=function(e,t){var n=ct(e,t);return null!==n&&n%7==0?n/7:null}(e,t),null!==n?{unit:"week",value:n}:null!==(n=ct(e,t))?{unit:"day",value:n}:(n=function(e,t){return(t.valueOf()-e.valueOf())/36e5}(e,t),tt(n)?{unit:"hour",value:n}:(n=function(e,t){return(t.valueOf()-e.valueOf())/6e4}(e,t),tt(n)?{unit:"minute",value:n}:(n=function(e,t){return(t.valueOf()-e.valueOf())/1e3}(e,t),tt(n)?{unit:"second",value:n}:{unit:"millisecond",value:t.valueOf()-e.valueOf()}))))},e.prototype.countDurationsBetween=function(e,t,n){var r;return n.years&&null!==(r=this.diffWholeYears(e,t))?r/(Nt(n)/365):n.months&&null!==(r=this.diffWholeMonths(e,t))?r/function(e){return Nt(e)/30}(n):n.days&&null!==(r=ct(e,t))?r/Nt(n):(t.valueOf()-e.valueOf())/Bt(n)},e.prototype.startOf=function(e,t){return"year"===t?this.startOfYear(e):"month"===t?this.startOfMonth(e):"week"===t?this.startOfWeek(e):"day"===t?st(e):"hour"===t?function(e){return ht([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours()])}(e):"minute"===t?function(e){return ht([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes()])}(e):"second"===t?function(e){return ht([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds()])}(e):null},e.prototype.startOfYear=function(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e)])},e.prototype.startOfMonth=function(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e),this.calendarSystem.getMarkerMonth(e)])},e.prototype.startOfWeek=function(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e),this.calendarSystem.getMarkerMonth(e),e.getUTCDate()-(e.getUTCDay()-this.weekDow+7)%7])},e.prototype.computeWeekNumber=function(e){return this.weekNumberFunc?this.weekNumberFunc(this.toDate(e)):function(e,t,n){var r=e.getUTCFullYear(),o=ut(e,r,t,n);if(o<1)return ut(e,r-1,t,n);var i=ut(e,r+1,t,n);return i>=1?Math.min(o,i):o}(e,this.weekDow,this.weekDoy)},e.prototype.format=function(e,t,n){return void 0===n&&(n={}),t.format({marker:e,timeZoneOffset:null!=n.forcedTzo?n.forcedTzo:this.offsetForMarker(e)},this)},e.prototype.formatRange=function(e,t,n,r){return void 0===r&&(r={}),r.isEndExclusive&&(t=it(t,-1)),n.formatRange({marker:e,timeZoneOffset:null!=r.forcedStartTzo?r.forcedStartTzo:this.offsetForMarker(e)},{marker:t,timeZoneOffset:null!=r.forcedEndTzo?r.forcedEndTzo:this.offsetForMarker(t)},this,r.defaultSeparator)},e.prototype.formatIso=function(e,t){void 0===t&&(t={});var n=null;return t.omitTimeZoneOffset||(n=null!=t.forcedTzo?t.forcedTzo:this.offsetForMarker(e)),Lt(e,n,t.omitTime)},e.prototype.timestampToMarker=function(e){return"local"===this.timeZone?ht(dt(new Date(e))):"UTC"!==this.timeZone&&this.namedTimeZoneImpl?ht(this.namedTimeZoneImpl.timestampToArray(e)):new Date(e)},e.prototype.offsetForMarker=function(e){return"local"===this.timeZone?-ft(pt(e)).getTimezoneOffset():"UTC"===this.timeZone?0:this.namedTimeZoneImpl?this.namedTimeZoneImpl.offsetForArray(pt(e)):null},e.prototype.toDate=function(e,t){return"local"===this.timeZone?ft(pt(e)):"UTC"===this.timeZone?new Date(e.valueOf()):this.namedTimeZoneImpl?new Date(e.valueOf()-1e3*this.namedTimeZoneImpl.offsetForArray(pt(e))*60):new Date(e.valueOf()-(t||0))},e}(),Sr=[],Dr={code:"en",week:{dow:0,doy:4},direction:"ltr",buttonText:{prev:"prev",next:"next",prevYear:"prev year",nextYear:"next year",year:"year",today:"today",month:"month",week:"week",day:"day",list:"list"},weekText:"W",weekTextLong:"Week",closeHint:"Close",timeHint:"Time",eventHint:"Event",allDayText:"all-day",moreLinkText:"more",noEventsText:"No events to display"},Pr=ie(ie({},Dr),{buttonHints:{prev:"Previous $0",next:"Next $0",today:function(e,t){return"day"===t?"Today":"This "+e}},viewHint:"$0 view",navLinkHint:"Go to $0",moreLinkHint:function(e){return"Show "+e+" more event"+(1===e?"":"s")}});function _r(e){for(var t=e.length>0?e[0].code:"en",n=Sr.concat(e),r={en:Pr},o=0,i=n;o<i.length;o++){var a=i[o];r[a.code]=a}return{map:r,defaultCode:t}}function jr(e,t){return"object"!=typeof e||Array.isArray(e)?function(e,t){var n=[].concat(e||[]),r=function(e,t){for(var n=0;n<e.length;n+=1)for(var r=e[n].toLocaleLowerCase().split("-"),o=r.length;o>0;o-=1){var i=r.slice(0,o).join("-");if(t[i])return t[i]}return null}(n,t)||Pr;return Tr(e,n,r)}(e,t):Tr(e.code,[e.code],e)}function Tr(e,t,n){var r=bt([Dr,n],["buttonText"]);delete r.code;var o=r.week;return delete r.week,{codeArg:e,codes:t,week:o,simpleNumberFormat:new Intl.NumberFormat(e),options:r}}var Rr,Ir={startTime:"09:00",endTime:"17:00",daysOfWeek:[1,2,3,4,5],display:"inverse-background",classNames:"fc-non-business",groupId:"_businessHours"};function Mr(e,t){return bn(function(e){var t;t=!0===e?[{}]:Array.isArray(e)?e.filter((function(e){return e.daysOfWeek})):"object"==typeof e&&e?[e]:[];return t=t.map((function(e){return ie(ie({},Ir),e)}))}(e),null,t)}function Nr(e,t){return e.left>=t.left&&e.left<t.right&&e.top>=t.top&&e.top<t.bottom}function Br(e,t){var n={left:Math.max(e.left,t.left),right:Math.min(e.right,t.right),top:Math.max(e.top,t.top),bottom:Math.min(e.bottom,t.bottom)};return n.left<n.right&&n.top<n.bottom&&n}function Zr(e,t,n){return{left:e.left+t,right:e.right+t,top:e.top+n,bottom:e.bottom+n}}function Fr(){return null==Rr&&(Rr=function(){if("undefined"==typeof document)return!0;var e=document.createElement("div");e.style.position="absolute",e.style.top="0px",e.style.left="0px",e.innerHTML="<table><tr><td><div></div></td></tr></table>",e.querySelector("table").style.height="100px",e.querySelector("div").style.height="100%",document.body.appendChild(e);var t=e.querySelector("div").offsetHeight>0;return document.body.removeChild(e),t}()),Rr}var Lr={defs:{},instances:{}},Hr=function(){function e(){this.getKeysForEventDefs=Wt(this._getKeysForEventDefs),this.splitDateSelection=Wt(this._splitDateSpan),this.splitEventStore=Wt(this._splitEventStore),this.splitIndividualUi=Wt(this._splitIndividualUi),this.splitEventDrag=Wt(this._splitInteraction),this.splitEventResize=Wt(this._splitInteraction),this.eventUiBuilders={}}return e.prototype.splitProps=function(e){var t=this,n=this.getKeyInfo(e),r=this.getKeysForEventDefs(e.eventStore),o=this.splitDateSelection(e.dateSelection),i=this.splitIndividualUi(e.eventUiBases,r),a=this.splitEventStore(e.eventStore,r),c=this.splitEventDrag(e.eventDrag),s=this.splitEventResize(e.eventResize),u={};for(var l in this.eventUiBuilders=At(n,(function(e,n){return t.eventUiBuilders[n]||Wt(Ur)})),n){var d=n[l],f=a[l]||Lr,p=this.eventUiBuilders[l];u[l]={businessHours:d.businessHours||e.businessHours,dateSelection:o[l]||null,eventStore:f,eventUiBases:p(e.eventUiBases[""],d.ui,i[l]),eventSelection:f.instances[e.eventSelection]?e.eventSelection:"",eventDrag:c[l]||null,eventResize:s[l]||null}}return u},e.prototype._splitDateSpan=function(e){var t={};if(e)for(var n=0,r=this.getKeysForDateSpan(e);n<r.length;n++){t[r[n]]=e}return t},e.prototype._getKeysForEventDefs=function(e){var t=this;return At(e.defs,(function(e){return t.getKeysForEventDef(e)}))},e.prototype._splitEventStore=function(e,t){var n=e.defs,r=e.instances,o={};for(var i in n)for(var a=0,c=t[i];a<c.length;a++){o[f=c[a]]||(o[f]={defs:{},instances:{}}),o[f].defs[i]=n[i]}for(var s in r)for(var u=r[s],l=0,d=t[u.defId];l<d.length;l++){var f;o[f=d[l]]&&(o[f].instances[s]=u)}return o},e.prototype._splitIndividualUi=function(e,t){var n={};for(var r in e)if(r)for(var o=0,i=t[r];o<i.length;o++){var a=i[o];n[a]||(n[a]={}),n[a][r]=e[r]}return n},e.prototype._splitInteraction=function(e){var t={};if(e){var n=this._splitEventStore(e.affectedEvents,this._getKeysForEventDefs(e.affectedEvents)),r=this._getKeysForEventDefs(e.mutatedEvents),o=this._splitEventStore(e.mutatedEvents,r),i=function(r){t[r]||(t[r]={affectedEvents:n[r]||Lr,mutatedEvents:o[r]||Lr,isEvent:e.isEvent})};for(var a in n)i(a);for(var a in o)i(a)}return t},e}();function Ur(e,t,n){var r=[];e&&r.push(e),t&&r.push(t);var o={"":Dn(r)};return n&&ie(o,n),o}function zr(e,t,n,r){return{dow:e.getUTCDay(),isDisabled:Boolean(r&&!Yn(r.activeRange,e)),isOther:Boolean(r&&!Yn(r.currentRange,e)),isToday:Boolean(t&&Yn(t,e)),isPast:Boolean(n?e<n:!!t&&e<t.start),isFuture:Boolean(n?e>n:!!t&&e>=t.end)}}function Wr(e,t){var n=["fc-day","fc-day-"+rt[e.dow]];return e.isDisabled?n.push("fc-day-disabled"):(e.isToday&&(n.push("fc-day-today"),n.push(t.getClass("today"))),e.isPast&&n.push("fc-day-past"),e.isFuture&&n.push("fc-day-future"),e.isOther&&n.push("fc-day-other")),n}function Vr(e,t){var n=["fc-slot","fc-slot-"+rt[e.dow]];return e.isDisabled?n.push("fc-slot-disabled"):(e.isToday&&(n.push("fc-slot-today"),n.push(t.getClass("today"))),e.isPast&&n.push("fc-slot-past"),e.isFuture&&n.push("fc-slot-future")),n}var Yr=sn({year:"numeric",month:"long",day:"numeric"}),qr=sn({week:"long"});function Gr(e,t,n,r){void 0===n&&(n="day"),void 0===r&&(r=!0);var o,i=e.dateEnv,a=e.options,c=e.calendarApi,s=i.format(t,"week"===n?qr:Yr);if(a.navLinks){var u=i.toDate(t),l=function(e){var r="day"===n?a.navLinkDayClick:"week"===n?a.navLinkWeekClick:null;"function"==typeof r?r.call(c,i.toDate(t),e):("string"==typeof r&&(n=r),c.zoomTo(t,n))};return ie({title:Je(a.navLinkHint,[s,u],s),"data-navlink":""},r?ie({onClick:o=l},ze(o)):{onClick:l})}return{"aria-label":s}}var Qr,Xr=null;function Kr(){return null===Xr&&(Xr=function(){var e=document.createElement("div");Ie(e,{position:"absolute",top:-1e3,left:0,border:0,padding:0,overflow:"scroll",direction:"rtl"}),e.innerHTML="<div></div>",document.body.appendChild(e);var t=e.firstChild.getBoundingClientRect().left>e.getBoundingClientRect().left;return Pe(e),t}()),Xr}function $r(){return Qr||(Qr=function(){var e=document.createElement("div");e.style.overflow="scroll",e.style.position="absolute",e.style.top="-9999px",e.style.left="-9999px",document.body.appendChild(e);var t=Jr(e);return document.body.removeChild(e),t}()),Qr}function Jr(e){return{x:e.offsetHeight-e.clientHeight,y:e.offsetWidth-e.clientWidth}}function eo(e,t){void 0===t&&(t=!1);var n=window.getComputedStyle(e),r=parseInt(n.borderLeftWidth,10)||0,o=parseInt(n.borderRightWidth,10)||0,i=parseInt(n.borderTopWidth,10)||0,a=parseInt(n.borderBottomWidth,10)||0,c=Jr(e),s=c.y-r-o,u={borderLeft:r,borderRight:o,borderTop:i,borderBottom:a,scrollbarBottom:c.x-i-a,scrollbarLeft:0,scrollbarRight:0};return Kr()&&"rtl"===n.direction?u.scrollbarLeft=s:u.scrollbarRight=s,t&&(u.paddingLeft=parseInt(n.paddingLeft,10)||0,u.paddingRight=parseInt(n.paddingRight,10)||0,u.paddingTop=parseInt(n.paddingTop,10)||0,u.paddingBottom=parseInt(n.paddingBottom,10)||0),u}function to(e,t,n){void 0===t&&(t=!1);var r=n?e.getBoundingClientRect():no(e),o=eo(e,t),i={left:r.left+o.borderLeft+o.scrollbarLeft,right:r.right-o.borderRight-o.scrollbarRight,top:r.top+o.borderTop,bottom:r.bottom-o.borderBottom-o.scrollbarBottom};return t&&(i.left+=o.paddingLeft,i.right-=o.paddingRight,i.top+=o.paddingTop,i.bottom-=o.paddingBottom),i}function no(e){var t=e.getBoundingClientRect();return{left:t.left+window.pageXOffset,top:t.top+window.pageYOffset,right:t.right+window.pageXOffset,bottom:t.bottom+window.pageYOffset}}function ro(e){for(var t=[];e instanceof HTMLElement;){var n=window.getComputedStyle(e);if("fixed"===n.position)break;/(auto|scroll)/.test(n.overflow+n.overflowY+n.overflowX)&&t.push(e),e=e.parentNode}return t}function oo(e,t,n){var r=!1,o=function(){r||(r=!0,t.apply(this,arguments))},i=function(){r||(r=!0,n&&n.apply(this,arguments))},a=e(o,i);a&&"function"==typeof a.then&&a.then(o,i)}var io=function(){function e(){this.handlers={},this.thisContext=null}return e.prototype.setThisContext=function(e){this.thisContext=e},e.prototype.setOptions=function(e){this.options=e},e.prototype.on=function(e,t){!function(e,t,n){(e[t]||(e[t]=[])).push(n)}(this.handlers,e,t)},e.prototype.off=function(e,t){!function(e,t,n){n?e[t]&&(e[t]=e[t].filter((function(e){return e!==n}))):delete e[t]}(this.handlers,e,t)},e.prototype.trigger=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r=this.handlers[e]||[],o=this.options&&this.options[e],i=[].concat(o||[],r),a=0,c=i;a<c.length;a++){var s=c[a];s.apply(this.thisContext,t)}},e.prototype.hasHandlers=function(e){return Boolean(this.handlers[e]&&this.handlers[e].length||this.options&&this.options[e])},e}();var ao=function(){function e(e,t,n,r){this.els=t;var o=this.originClientRect=e.getBoundingClientRect();n&&this.buildElHorizontals(o.left),r&&this.buildElVerticals(o.top)}return e.prototype.buildElHorizontals=function(e){for(var t=[],n=[],r=0,o=this.els;r<o.length;r++){var i=o[r].getBoundingClientRect();t.push(i.left-e),n.push(i.right-e)}this.lefts=t,this.rights=n},e.prototype.buildElVerticals=function(e){for(var t=[],n=[],r=0,o=this.els;r<o.length;r++){var i=o[r].getBoundingClientRect();t.push(i.top-e),n.push(i.bottom-e)}this.tops=t,this.bottoms=n},e.prototype.leftToIndex=function(e){var t,n=this.lefts,r=this.rights,o=n.length;for(t=0;t<o;t+=1)if(e>=n[t]&&e<r[t])return t},e.prototype.topToIndex=function(e){var t,n=this.tops,r=this.bottoms,o=n.length;for(t=0;t<o;t+=1)if(e>=n[t]&&e<r[t])return t},e.prototype.getWidth=function(e){return this.rights[e]-this.lefts[e]},e.prototype.getHeight=function(e){return this.bottoms[e]-this.tops[e]},e}(),co=function(){function e(){}return e.prototype.getMaxScrollTop=function(){return this.getScrollHeight()-this.getClientHeight()},e.prototype.getMaxScrollLeft=function(){return this.getScrollWidth()-this.getClientWidth()},e.prototype.canScrollVertically=function(){return this.getMaxScrollTop()>0},e.prototype.canScrollHorizontally=function(){return this.getMaxScrollLeft()>0},e.prototype.canScrollUp=function(){return this.getScrollTop()>0},e.prototype.canScrollDown=function(){return this.getScrollTop()<this.getMaxScrollTop()},e.prototype.canScrollLeft=function(){return this.getScrollLeft()>0},e.prototype.canScrollRight=function(){return this.getScrollLeft()<this.getMaxScrollLeft()},e}(),so=function(e){function t(t){var n=e.call(this)||this;return n.el=t,n}return oe(t,e),t.prototype.getScrollTop=function(){return this.el.scrollTop},t.prototype.getScrollLeft=function(){return this.el.scrollLeft},t.prototype.setScrollTop=function(e){this.el.scrollTop=e},t.prototype.setScrollLeft=function(e){this.el.scrollLeft=e},t.prototype.getScrollWidth=function(){return this.el.scrollWidth},t.prototype.getScrollHeight=function(){return this.el.scrollHeight},t.prototype.getClientHeight=function(){return this.el.clientHeight},t.prototype.getClientWidth=function(){return this.el.clientWidth},t}(co),uo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return oe(t,e),t.prototype.getScrollTop=function(){return window.pageYOffset},t.prototype.getScrollLeft=function(){return window.pageXOffset},t.prototype.setScrollTop=function(e){window.scroll(window.pageXOffset,e)},t.prototype.setScrollLeft=function(e){window.scroll(e,window.pageYOffset)},t.prototype.getScrollWidth=function(){return document.documentElement.scrollWidth},t.prototype.getScrollHeight=function(){return document.documentElement.scrollHeight},t.prototype.getClientHeight=function(){return document.documentElement.clientHeight},t.prototype.getClientWidth=function(){return document.documentElement.clientWidth},t}(co),lo=function(){function e(e){this.iconOverrideOption&&this.setIconOverride(e[this.iconOverrideOption])}return e.prototype.setIconOverride=function(e){var t,n;if("object"==typeof e&&e){for(n in t=ie({},this.iconClasses),e)t[n]=this.applyIconOverridePrefix(e[n]);this.iconClasses=t}else!1===e&&(this.iconClasses={})},e.prototype.applyIconOverridePrefix=function(e){var t=this.iconOverridePrefix;return t&&0!==e.indexOf(t)&&(e=t+e),e},e.prototype.getClass=function(e){return this.classes[e]||""},e.prototype.getIconClass=function(e,t){var n;return(n=t&&this.rtlIconClasses&&this.rtlIconClasses[e]||this.iconClasses[e])?this.baseIconClass+" "+n:""},e.prototype.getCustomButtonIconClass=function(e){var t;return this.iconOverrideCustomButtonOption&&(t=e[this.iconOverrideCustomButtonOption])?this.baseIconClass+" "+this.applyIconOverridePrefix(t):""},e}();lo.prototype.classes={},lo.prototype.iconClasses={},lo.prototype.baseIconClass="",lo.prototype.iconOverridePrefix="";var fo=function(){function e(e,t,n,r){var o=this;this.execFunc=e,this.emitter=t,this.scrollTime=n,this.scrollTimeReset=r,this.handleScrollRequest=function(e){o.queuedRequest=ie({},o.queuedRequest||{},e),o.drain()},t.on("_scrollRequest",this.handleScrollRequest),this.fireInitialScroll()}return e.prototype.detach=function(){this.emitter.off("_scrollRequest",this.handleScrollRequest)},e.prototype.update=function(e){e&&this.scrollTimeReset?this.fireInitialScroll():this.drain()},e.prototype.fireInitialScroll=function(){this.handleScrollRequest({time:this.scrollTime})},e.prototype.drain=function(){this.queuedRequest&&this.execFunc(this.queuedRequest)&&(this.queuedRequest=null)},e}(),po=Ce({});function ho(e,t,n,r,o,i,a,c,s,u,l,d,f){return{dateEnv:o,options:n,pluginHooks:a,emitter:u,dispatch:c,getCurrentData:s,calendarApi:l,viewSpec:e,viewApi:t,dateProfileGenerator:r,theme:i,isRtl:"rtl"===n.direction,addResizeHandler:function(e){u.on("_resize",e)},removeResizeHandler:function(e){u.off("_resize",e)},createScrollResponder:function(e){return new fo(e,u,Rt(n.scrollTime),n.scrollTimeReset)},registerInteractiveComponent:d,unregisterInteractiveComponent:f}}var mo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return oe(t,e),t.prototype.shouldComponentUpdate=function(e,t){return this.debug&&console.log(Ct(e,this.props),Ct(t,this.state)),!kt(this.props,e,this.propEquality)||!kt(this.state,t,this.stateEquality)},t.prototype.safeSetState=function(e){kt(this.state,ie(ie({},this.state),e),this.stateEquality)||this.setState(e)},t.addPropsEquality=vo,t.addStateEquality=yo,t.contextType=po,t}(Ae);mo.prototype.propEquality={},mo.prototype.stateEquality={};var go=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return oe(t,e),t.contextType=po,t}(mo);function vo(e){var t=Object.create(this.prototype.propEquality);ie(t,e),this.prototype.propEquality=t}function yo(e){var t=Object.create(this.prototype.stateEquality);ie(t,e),this.prototype.stateEquality=t}function bo(e,t){"function"==typeof e?e(t):e&&(e.current=t)}var wo=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.uid=Ve(),t}return oe(t,e),t.prototype.prepareHits=function(){},t.prototype.queryHit=function(e,t,n,r){return null},t.prototype.isValidSegDownEl=function(e){return!this.props.eventDrag&&!this.props.eventResize&&!_e(e,".fc-event-mirror")},t.prototype.isValidDateDownEl=function(e){return!(_e(e,".fc-event:not(.fc-bg-event)")||_e(e,".fc-more-link")||_e(e,"a[data-navlink]")||_e(e,".fc-popover"))},t}(go);function Ao(e){return{id:Ve(),deps:e.deps||[],reducers:e.reducers||[],isLoadingFuncs:e.isLoadingFuncs||[],contextInit:[].concat(e.contextInit||[]),eventRefiners:e.eventRefiners||{},eventDefMemberAdders:e.eventDefMemberAdders||[],eventSourceRefiners:e.eventSourceRefiners||{},isDraggableTransformers:e.isDraggableTransformers||[],eventDragMutationMassagers:e.eventDragMutationMassagers||[],eventDefMutationAppliers:e.eventDefMutationAppliers||[],dateSelectionTransformers:e.dateSelectionTransformers||[],datePointTransforms:e.datePointTransforms||[],dateSpanTransforms:e.dateSpanTransforms||[],views:e.views||{},viewPropsTransformers:e.viewPropsTransformers||[],isPropsValid:e.isPropsValid||null,externalDefTransforms:e.externalDefTransforms||[],viewContainerAppends:e.viewContainerAppends||[],eventDropTransformers:e.eventDropTransformers||[],componentInteractions:e.componentInteractions||[],calendarInteractions:e.calendarInteractions||[],themeClasses:e.themeClasses||{},eventSourceDefs:e.eventSourceDefs||[],cmdFormatter:e.cmdFormatter,recurringTypes:e.recurringTypes||[],namedTimeZonedImpl:e.namedTimeZonedImpl,initialView:e.initialView||"",elementDraggingImpl:e.elementDraggingImpl,optionChangeHandlers:e.optionChangeHandlers||{},scrollGridImpl:e.scrollGridImpl||null,contentTypeHandlers:e.contentTypeHandlers||{},listenerRefiners:e.listenerRefiners||{},optionRefiners:e.optionRefiners||{},propSetHandlers:e.propSetHandlers||{}}}function xo(){var e,t=[],n=[];return function(r,o){return e&&zt(r,t)&&zt(o,n)||(e=function(e,t){var n={},r={reducers:[],isLoadingFuncs:[],contextInit:[],eventRefiners:{},eventDefMemberAdders:[],eventSourceRefiners:{},isDraggableTransformers:[],eventDragMutationMassagers:[],eventDefMutationAppliers:[],dateSelectionTransformers:[],datePointTransforms:[],dateSpanTransforms:[],views:{},viewPropsTransformers:[],isPropsValid:null,externalDefTransforms:[],viewContainerAppends:[],eventDropTransformers:[],componentInteractions:[],calendarInteractions:[],themeClasses:{},eventSourceDefs:[],cmdFormatter:null,recurringTypes:[],namedTimeZonedImpl:null,initialView:"",elementDraggingImpl:null,optionChangeHandlers:{},scrollGridImpl:null,contentTypeHandlers:{},listenerRefiners:{},optionRefiners:{},propSetHandlers:{}};function o(e){for(var t=0,i=e;t<i.length;t++){var a=i[t];n[a.id]||(n[a.id]=!0,o(a.deps),s=a,r={reducers:(c=r).reducers.concat(s.reducers),isLoadingFuncs:c.isLoadingFuncs.concat(s.isLoadingFuncs),contextInit:c.contextInit.concat(s.contextInit),eventRefiners:ie(ie({},c.eventRefiners),s.eventRefiners),eventDefMemberAdders:c.eventDefMemberAdders.concat(s.eventDefMemberAdders),eventSourceRefiners:ie(ie({},c.eventSourceRefiners),s.eventSourceRefiners),isDraggableTransformers:c.isDraggableTransformers.concat(s.isDraggableTransformers),eventDragMutationMassagers:c.eventDragMutationMassagers.concat(s.eventDragMutationMassagers),eventDefMutationAppliers:c.eventDefMutationAppliers.concat(s.eventDefMutationAppliers),dateSelectionTransformers:c.dateSelectionTransformers.concat(s.dateSelectionTransformers),datePointTransforms:c.datePointTransforms.concat(s.datePointTransforms),dateSpanTransforms:c.dateSpanTransforms.concat(s.dateSpanTransforms),views:ie(ie({},c.views),s.views),viewPropsTransformers:c.viewPropsTransformers.concat(s.viewPropsTransformers),isPropsValid:s.isPropsValid||c.isPropsValid,externalDefTransforms:c.externalDefTransforms.concat(s.externalDefTransforms),viewContainerAppends:c.viewContainerAppends.concat(s.viewContainerAppends),eventDropTransformers:c.eventDropTransformers.concat(s.eventDropTransformers),calendarInteractions:c.calendarInteractions.concat(s.calendarInteractions),componentInteractions:c.componentInteractions.concat(s.componentInteractions),themeClasses:ie(ie({},c.themeClasses),s.themeClasses),eventSourceDefs:c.eventSourceDefs.concat(s.eventSourceDefs),cmdFormatter:s.cmdFormatter||c.cmdFormatter,recurringTypes:c.recurringTypes.concat(s.recurringTypes),namedTimeZonedImpl:s.namedTimeZonedImpl||c.namedTimeZonedImpl,initialView:c.initialView||s.initialView,elementDraggingImpl:c.elementDraggingImpl||s.elementDraggingImpl,optionChangeHandlers:ie(ie({},c.optionChangeHandlers),s.optionChangeHandlers),scrollGridImpl:s.scrollGridImpl||c.scrollGridImpl,contentTypeHandlers:ie(ie({},c.contentTypeHandlers),s.contentTypeHandlers),listenerRefiners:ie(ie({},c.listenerRefiners),s.listenerRefiners),optionRefiners:ie(ie({},c.optionRefiners),s.optionRefiners),propSetHandlers:ie(ie({},c.propSetHandlers),s.propSetHandlers)})}var c,s}return e&&o(e),o(t),r}(r,o)),t=r,n=o,e}}var Eo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return oe(t,e),t}(lo);function Oo(e,t,n,r){if(t[e])return t[e];var o=function(e,t,n,r){var o=n[e],i=r[e],a=function(e){return o&&null!==o[e]?o[e]:i&&null!==i[e]?i[e]:null},c=a("component"),s=a("superType"),u=null;if(s){if(s===e)throw new Error("Can't have a custom view type that references itself");u=Oo(s,t,n,r)}!c&&u&&(c=u.component);if(!c)return null;return{type:e,component:c,defaults:ie(ie({},u?u.defaults:{}),o?o.rawOptions:{}),overrides:ie(ie({},u?u.overrides:{}),i?i.rawOptions:{})}}(e,t,n,r);return o&&(t[e]=o),o}Eo.prototype.classes={root:"fc-theme-standard",tableCellShaded:"fc-cell-shaded",buttonGroup:"fc-button-group",button:"fc-button fc-button-primary",buttonActive:"fc-button-active"},Eo.prototype.baseIconClass="fc-icon",Eo.prototype.iconClasses={close:"fc-icon-x",prev:"fc-icon-chevron-left",next:"fc-icon-chevron-right",prevYear:"fc-icon-chevrons-left",nextYear:"fc-icon-chevrons-right"},Eo.prototype.rtlIconClasses={prev:"fc-icon-chevron-right",next:"fc-icon-chevron-left",prevYear:"fc-icon-chevrons-right",nextYear:"fc-icon-chevrons-left"},Eo.prototype.iconOverrideOption="buttonIcons",Eo.prototype.iconOverrideCustomButtonOption="icon",Eo.prototype.iconOverridePrefix="fc-icon-";var Co=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rootElRef=Ee(),t.handleRootEl=function(e){bo(t.rootElRef,e),t.props.elRef&&bo(t.props.elRef,e)},t}return oe(t,e),t.prototype.render=function(){var e=this,t=this.props,n=t.hookProps;return xe(Po,{hookProps:n,didMount:t.didMount,willUnmount:t.willUnmount,elRef:this.handleRootEl},(function(r){return xe(So,{hookProps:n,content:t.content,defaultContent:t.defaultContent,backupElRef:e.rootElRef},(function(e,o){return t.children(r,jo(t.classNames,n),e,o)}))}))},t}(go),ko=Ce(0);function So(e){return xe(ko.Consumer,null,(function(t){return xe(Do,ie({renderId:t},e))}))}var Do=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.innerElRef=Ee(),t}return oe(t,e),t.prototype.render=function(){return this.props.children(this.innerElRef,this.renderInnerContent())},t.prototype.componentDidMount=function(){this.updateCustomContent()},t.prototype.componentDidUpdate=function(){this.updateCustomContent()},t.prototype.componentWillUnmount=function(){this.customContentInfo&&this.customContentInfo.destroy&&this.customContentInfo.destroy()},t.prototype.renderInnerContent=function(){var e=this.customContentInfo,t=this.getInnerContent(),n=this.getContentMeta(t);return e&&e.contentKey===n.contentKey?e&&(e.contentVal=t[n.contentKey]):(e&&(e.destroy&&e.destroy(),e=this.customContentInfo=null),n.contentKey&&(e=this.customContentInfo=ie({contentKey:n.contentKey,contentVal:t[n.contentKey]},n.buildLifecycleFuncs()))),e?[]:t},t.prototype.getInnerContent=function(){var e=this.props,t=To(e.content,e.hookProps);return void 0===t&&(t=To(e.defaultContent,e.hookProps)),null==t?null:t},t.prototype.getContentMeta=function(e){var t=this.context.pluginHooks.contentTypeHandlers,n="",r=null;if(e)for(var o in t)if(void 0!==e[o]){n=o,r=t[o];break}return{contentKey:n,buildLifecycleFuncs:r}},t.prototype.updateCustomContent=function(){this.customContentInfo&&this.customContentInfo.render(this.innerElRef.current||this.props.backupElRef.current,this.customContentInfo.contentVal)},t}(go),Po=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleRootEl=function(e){t.rootEl=e,t.props.elRef&&bo(t.props.elRef,e)},t}return oe(t,e),t.prototype.render=function(){return this.props.children(this.handleRootEl)},t.prototype.componentDidMount=function(){var e=this.props.didMount;e&&e(ie(ie({},this.props.hookProps),{el:this.rootEl}))},t.prototype.componentWillUnmount=function(){var e=this.props.willUnmount;e&&e(ie(ie({},this.props.hookProps),{el:this.rootEl}))},t}(go);function _o(){var e,t,n=[];return function(r,o){return t&&Ot(t,o)&&r===e||(e=r,t=o,n=jo(r,o)),n}}function jo(e,t){return"function"==typeof e&&(e=e(t)),On(e)}function To(e,t){return"function"==typeof e?e(t,xe):e}var Ro=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.normalizeClassNames=_o(),t}return oe(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=t.options,r={view:t.viewApi},o=this.normalizeClassNames(n.viewClassNames,r);return xe(Po,{hookProps:r,didMount:n.viewDidMount,willUnmount:n.viewWillUnmount,elRef:e.elRef},(function(t){return e.children(t,["fc-"+e.viewSpec.type+"-view","fc-view"].concat(o))}))},t}(go);function Io(e){return At(e,Mo)}function Mo(e){var t="function"==typeof e?{component:e}:e,n=t.component;return t.content&&(n=function(e){return function(t){return xe(po.Consumer,null,(function(n){return xe(Ro,{viewSpec:n.viewSpec},(function(r,o){var i=ie(ie({},t),{nextDayThreshold:n.options.nextDayThreshold});return xe(Co,{hookProps:i,classNames:e.classNames,content:e.content,didMount:e.didMount,willUnmount:e.willUnmount,elRef:r},(function(e,t,n,r){return xe("div",{className:o.concat(t).join(" "),ref:e},r)}))}))}))}}(t)),{superType:t.type,component:n,rawOptions:t}}function No(e,t,n,r){var o=Io(e),i=Io(t.views),a=function(e,t){var n,r={};for(n in e)Oo(n,r,e,t);for(n in t)Oo(n,r,e,t);return r}(o,i);return At(a,(function(e){return function(e,t,n,r,o){var i=e.overrides.duration||e.defaults.duration||r.duration||n.duration,a=null,c="",s="",u={};if(i&&(a=function(e){var t=JSON.stringify(e),n=Bo[t];void 0===n&&(n=Rt(e),Bo[t]=n);return n}(i),a)){var l=Ft(a);c=l.unit,1===l.value&&(s=c,u=t[c]?t[c].rawOptions:{})}var d=function(t){var n=t.buttonText||{},r=e.defaults.buttonTextKey;return null!=r&&null!=n[r]?n[r]:null!=n[e.type]?n[e.type]:null!=n[s]?n[s]:null},f=function(t){var n=t.buttonHints||{},r=e.defaults.buttonTextKey;return null!=r&&null!=n[r]?n[r]:null!=n[e.type]?n[e.type]:null!=n[s]?n[s]:null};return{type:e.type,component:e.component,duration:a,durationUnit:c,singleUnit:s,optionDefaults:e.defaults,optionOverrides:ie(ie({},u),e.overrides),buttonTextOverride:d(r)||d(n)||e.overrides.buttonText,buttonTextDefault:d(o)||e.defaults.buttonText||d(ln)||e.type,buttonTitleOverride:f(r)||f(n)||e.overrides.buttonHint,buttonTitleDefault:f(o)||e.defaults.buttonHint||f(ln)}}(e,i,t,n,r)}))}var Bo={};var Zo=function(){function e(e){this.props=e,this.nowDate=br(e.nowInput,e.dateEnv),this.initHiddenDays()}return e.prototype.buildPrev=function(e,t,n){var r=this.props.dateEnv,o=r.subtract(r.startOf(t,e.currentRangeUnit),e.dateIncrement);return this.build(o,-1,n)},e.prototype.buildNext=function(e,t,n){var r=this.props.dateEnv,o=r.add(r.startOf(t,e.currentRangeUnit),e.dateIncrement);return this.build(o,1,n)},e.prototype.build=function(e,t,n){void 0===n&&(n=!0);var r,o,i,a,c,s,u=this.props;return r=this.buildValidRange(),r=this.trimHiddenDays(r),n&&(e=function(e,t){return null!=t.start&&e<t.start?t.start:null!=t.end&&e>=t.end?new Date(t.end.valueOf()-1):e}(e,r)),o=this.buildCurrentRangeInfo(e,t),i=/^(year|month|week|day)$/.test(o.unit),a=this.buildRenderRange(this.trimHiddenDays(o.range),o.unit,i),c=a=this.trimHiddenDays(a),u.showNonCurrentDates||(c=Un(c,o.range)),c=Un(c=this.adjustActiveRange(c),r),s=Wn(o.range,r),{validRange:r,currentRange:o.range,currentRangeUnit:o.unit,isRangeAllDay:i,activeRange:c,renderRange:a,slotMinTime:u.slotMinTime,slotMaxTime:u.slotMaxTime,isValid:s,dateIncrement:this.buildDateIncrement(o.duration)}},e.prototype.buildValidRange=function(){var e=this.props.validRangeInput,t="function"==typeof e?e.call(this.props.calendarApi,this.nowDate):e;return this.refineRange(t)||{start:null,end:null}},e.prototype.buildCurrentRangeInfo=function(e,t){var n,r=this.props,o=null,i=null,a=null;return r.duration?(o=r.duration,i=r.durationUnit,a=this.buildRangeFromDuration(e,t,o,i)):(n=this.props.dayCount)?(i="day",a=this.buildRangeFromDayCount(e,t,n)):(a=this.buildCustomVisibleRange(e))?i=r.dateEnv.greatestWholeUnit(a.start,a.end).unit:(i=Ft(o=this.getFallbackDuration()).unit,a=this.buildRangeFromDuration(e,t,o,i)),{duration:o,unit:i,range:a}},e.prototype.getFallbackDuration=function(){return Rt({day:1})},e.prototype.adjustActiveRange=function(e){var t=this.props,n=t.dateEnv,r=t.usesMinMaxTime,o=t.slotMinTime,i=t.slotMaxTime,a=e.start,c=e.end;return r&&(Nt(o)<0&&(a=st(a),a=n.add(a,o)),Nt(i)>1&&(c=ot(c=st(c),-1),c=n.add(c,i))),{start:a,end:c}},e.prototype.buildRangeFromDuration=function(e,t,n,r){var o,i,a,c=this.props,s=c.dateEnv,u=c.dateAlignment;if(!u){var l=this.props.dateIncrement;u=l&&Bt(l)<Bt(n)?Ft(l).unit:r}function d(){o=s.startOf(e,u),i=s.add(o,n),a={start:o,end:i}}return Nt(n)<=1&&this.isHiddenDay(o)&&(o=st(o=this.skipHiddenDays(o,t))),d(),this.trimHiddenDays(a)||(e=this.skipHiddenDays(e,t),d()),a},e.prototype.buildRangeFromDayCount=function(e,t,n){var r,o=this.props,i=o.dateEnv,a=o.dateAlignment,c=0,s=e;a&&(s=i.startOf(s,a)),s=st(s),r=s=this.skipHiddenDays(s,t);do{r=ot(r,1),this.isHiddenDay(r)||(c+=1)}while(c<n);return{start:s,end:r}},e.prototype.buildCustomVisibleRange=function(e){var t=this.props,n=t.visibleRangeInput,r="function"==typeof n?n.call(t.calendarApi,t.dateEnv.toDate(e)):n,o=this.refineRange(r);return!o||null!=o.start&&null!=o.end?o:null},e.prototype.buildRenderRange=function(e,t,n){return e},e.prototype.buildDateIncrement=function(e){var t,n=this.props.dateIncrement;return n||((t=this.props.dateAlignment)?Rt(1,t):e||Rt({days:1}))},e.prototype.refineRange=function(e){if(e){var t=(n=e,r=this.props.dateEnv,o=null,i=null,n.start&&(o=r.createMarker(n.start)),n.end&&(i=r.createMarker(n.end)),o||i?o&&i&&i<o?null:{start:o,end:i}:null);return t&&(t=Zn(t)),t}var n,r,o,i;return null},e.prototype.initHiddenDays=function(){var e,t=this.props.hiddenDays||[],n=[],r=0;for(!1===this.props.weekends&&t.push(0,6),e=0;e<7;e+=1)(n[e]=-1!==t.indexOf(e))||(r+=1);if(!r)throw new Error("invalid hiddenDays");this.isHiddenDayHash=n},e.prototype.trimHiddenDays=function(e){var t=e.start,n=e.end;return t&&(t=this.skipHiddenDays(t)),n&&(n=this.skipHiddenDays(n,-1,!0)),null==t||null==n||t<n?{start:t,end:n}:null},e.prototype.isHiddenDay=function(e){return e instanceof Date&&(e=e.getUTCDay()),this.isHiddenDayHash[e]},e.prototype.skipHiddenDays=function(e,t,n){for(void 0===t&&(t=1),void 0===n&&(n=!1);this.isHiddenDayHash[(e.getUTCDay()+(n?t:0)+7)%7];)e=ot(e,t);return e},e}();function Fo(e,t,n){var r=t?t.activeRange:null;return Uo({},function(e,t){var n=yr(t),r=[].concat(e.eventSources||[]),o=[];e.initialEvents&&r.unshift(e.initialEvents);e.events&&r.unshift(e.events);for(var i=0,a=r;i<a.length;i++){var c=vr(a[i],t,n);c&&o.push(c)}return o}(e,n),r,n)}function Lo(e,t,n,r){var o,i,a=n?n.activeRange:null;switch(t.type){case"ADD_EVENT_SOURCES":return Uo(e,t.sources,a,r);case"REMOVE_EVENT_SOURCE":return o=e,i=t.sourceId,wt(o,(function(e){return e.sourceId!==i}));case"PREV":case"NEXT":case"CHANGE_DATE":case"CHANGE_VIEW_TYPE":return n?zo(e,a,r):e;case"FETCH_EVENT_SOURCES":return Wo(e,t.sourceIds?xt(t.sourceIds):Yo(e,r),a,t.isRefetch||!1,r);case"RECEIVE_EVENTS":case"RECEIVE_EVENT_ERROR":return function(e,t,n,r){var o,i=e[t];if(i&&n===i.latestFetchId)return ie(ie({},e),((o={})[t]=ie(ie({},i),{isFetching:!1,fetchRange:r}),o));return e}(e,t.sourceId,t.fetchId,t.fetchRange);case"REMOVE_ALL_EVENT_SOURCES":return{};default:return e}}function Ho(e){for(var t in e)if(e[t].isFetching)return!0;return!1}function Uo(e,t,n,r){for(var o={},i=0,a=t;i<a.length;i++){var c=a[i];o[c.sourceId]=c}return n&&(o=zo(o,n,r)),ie(ie({},e),o)}function zo(e,t,n){return Wo(e,wt(e,(function(e){return function(e,t,n){if(!qo(e,n))return!e.latestFetchId;return!n.options.lazyFetching||!e.fetchRange||e.isFetching||t.start<e.fetchRange.start||t.end>e.fetchRange.end}(e,t,n)})),t,!1,n)}function Wo(e,t,n,r,o){var i={};for(var a in e){var c=e[a];t[a]?i[a]=Vo(c,n,r,o):i[a]=c}return i}function Vo(e,t,n,r){var o=r.options,i=r.calendarApi,a=r.pluginHooks.eventSourceDefs[e.sourceDefId],c=Ve();return a.fetch({eventSource:e,range:t,isRefetch:n,context:r},(function(n){var a=n.rawEvents;o.eventSourceSuccess&&(a=o.eventSourceSuccess.call(i,a,n.xhr)||a),e.success&&(a=e.success.call(i,a,n.xhr)||a),r.dispatch({type:"RECEIVE_EVENTS",sourceId:e.sourceId,fetchId:c,fetchRange:t,rawEvents:a})}),(function(n){console.warn(n.message,n),o.eventSourceFailure&&o.eventSourceFailure.call(i,n),e.failure&&e.failure(n),r.dispatch({type:"RECEIVE_EVENT_ERROR",sourceId:e.sourceId,fetchId:c,fetchRange:t,error:n})})),ie(ie({},e),{isFetching:!0,latestFetchId:c})}function Yo(e,t){return wt(e,(function(e){return qo(e,t)}))}function qo(e,t){return!t.pluginHooks.eventSourceDefs[e.sourceDefId].ignoreRange}function Go(e,t,n,r,o){switch(t.type){case"RECEIVE_EVENTS":return function(e,t,n,r,o,i){if(t&&n===t.latestFetchId){var a=bn(function(e,t,n){var r=n.options.eventDataTransform,o=t?t.eventDataTransform:null;o&&(e=Qo(e,o));r&&(e=Qo(e,r));return e}(o,t,i),t,i);return r&&(a=Pt(a,r,i)),xn(Xo(e,t.sourceId),a)}return e}(e,n[t.sourceId],t.fetchId,t.fetchRange,t.rawEvents,o);case"ADD_EVENTS":return function(e,t,n,r){n&&(t=Pt(t,n,r));return xn(e,t)}(e,t.eventStore,r?r.activeRange:null,o);case"RESET_EVENTS":return t.eventStore;case"MERGE_EVENTS":return xn(e,t.eventStore);case"PREV":case"NEXT":case"CHANGE_DATE":case"CHANGE_VIEW_TYPE":return r?Pt(e,r.activeRange,o):e;case"REMOVE_EVENTS":return function(e,t){var n=e.defs,r=e.instances,o={},i={};for(var a in n)t.defs[a]||(o[a]=n[a]);for(var c in r)!t.instances[c]&&o[r[c].defId]&&(i[c]=r[c]);return{defs:o,instances:i}}(e,t.eventStore);case"REMOVE_EVENT_SOURCE":return Xo(e,t.sourceId);case"REMOVE_ALL_EVENT_SOURCES":return En(e,(function(e){return!e.sourceId}));case"REMOVE_ALL_EVENTS":return{defs:{},instances:{}};default:return e}}function Qo(e,t){var n;if(t){n=[];for(var r=0,o=e;r<o.length;r++){var i=o[r],a=t(i);a?n.push(a):null==a&&n.push(i)}}else n=e;return n}function Xo(e,t){return En(e,(function(e){return e.sourceId!==t}))}function Ko(e,t){switch(t.type){case"UNSELECT_DATES":return null;case"SELECT_DATES":return t.selection;default:return e}}function $o(e,t){switch(t.type){case"UNSELECT_EVENT":return"";case"SELECT_EVENT":return t.eventInstanceId;default:return e}}function Jo(e,t){var n;switch(t.type){case"UNSET_EVENT_DRAG":return null;case"SET_EVENT_DRAG":return{affectedEvents:(n=t.state).affectedEvents,mutatedEvents:n.mutatedEvents,isEvent:n.isEvent};default:return e}}function ei(e,t){var n;switch(t.type){case"UNSET_EVENT_RESIZE":return null;case"SET_EVENT_RESIZE":return{affectedEvents:(n=t.state).affectedEvents,mutatedEvents:n.mutatedEvents,isEvent:n.isEvent};default:return e}}function ti(e,t,n,r,o){return{header:e.headerToolbar?ni(e.headerToolbar,e,t,n,r,o):null,footer:e.footerToolbar?ni(e.footerToolbar,e,t,n,r,o):null}}function ni(e,t,n,r,o,i){var a={},c=[],s=!1;for(var u in e){var l=ri(e[u],t,n,r,o,i);a[u]=l.widgets,c.push.apply(c,l.viewsWithButtons),s=s||l.hasTitle}return{sectionWidgets:a,viewsWithButtons:c,hasTitle:s}}function ri(e,t,n,r,o,i){var a="rtl"===t.direction,c=t.customButtons||{},s=n.buttonText||{},u=t.buttonText||{},l=n.buttonHints||{},d=t.buttonHints||{},f=e?e.split(" "):[],p=[],h=!1;return{widgets:f.map((function(e){return e.split(",").map((function(e){if("title"===e)return h=!0,{buttonName:e};var n,f,m,g,v,y;if(n=c[e])m=function(e){n.click&&n.click.call(e.target,e,e.target)},(g=r.getCustomButtonIconClass(n))||(g=r.getIconClass(e,a))||(v=n.text),y=n.hint||n.text;else if(f=o[e]){p.push(e),m=function(){i.changeView(e)},(v=f.buttonTextOverride)||(g=r.getIconClass(e,a))||(v=f.buttonTextDefault);var b=f.buttonTextOverride||f.buttonTextDefault;y=Je(f.buttonTitleOverride||f.buttonTitleDefault||t.viewHint,[b,e],b)}else if(i[e])if(m=function(){i[e]()},(v=s[e])||(g=r.getIconClass(e,a))||(v=u[e]),"prevYear"===e||"nextYear"===e){var w="prevYear"===e?"prev":"next";y=Je(l[w]||d[w],[u.year||"year","year"],u[e])}else y=function(t){return Je(l[e]||d[e],[u[t]||t,t],u[e])};return{buttonName:e,buttonClick:m,buttonIcon:g,buttonText:v,buttonHint:y}}))})),viewsWithButtons:p,hasTitle:h}}function oi(e,t,n,r,o){var i=null;"GET"===(e=e.toUpperCase())?t=function(e,t){return e+(-1===e.indexOf("?")?"?":"&")+ii(t)}(t,n):i=ii(n);var a=new XMLHttpRequest;a.open(e,t,!0),"GET"!==e&&a.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),a.onload=function(){if(a.status>=200&&a.status<400){var e=!1,t=void 0;try{t=JSON.parse(a.responseText),e=!0}catch(e){}e?r(t,a):o("Failure parsing JSON",a)}else o("Request failed",a)},a.onerror=function(){o("Request failed",a)},a.send(i)}function ii(e){var t=[];for(var n in e)t.push(encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t.join("&")}var ai={parseMeta:function(e){return!e.url||"json"!==e.format&&e.format?null:{url:e.url,format:"json",method:(e.method||"GET").toUpperCase(),extraParams:e.extraParams,startParam:e.startParam,endParam:e.endParam,timeZoneParam:e.timeZoneParam}},fetch:function(e,t,n){var r=e.eventSource.meta,o=function(e,t,n){var r,o,i,a,c=n.dateEnv,s=n.options,u={};null==(r=e.startParam)&&(r=s.startParam);null==(o=e.endParam)&&(o=s.endParam);null==(i=e.timeZoneParam)&&(i=s.timeZoneParam);a="function"==typeof e.extraParams?e.extraParams():e.extraParams||{};ie(u,a),u[r]=c.formatIso(t.start),u[o]=c.formatIso(t.end),"local"!==c.timeZone&&(u[i]=c.timeZone);return u}(r,e.range,e.context);oi(r.method,r.url,o,(function(e,n){t({rawEvents:e,xhr:n})}),(function(e,t){n({message:e,xhr:t})}))}};var ci={parse:function(e,t){if(e.daysOfWeek||e.startTime||e.endTime||e.startRecur||e.endRecur){var n={daysOfWeek:e.daysOfWeek||null,startTime:e.startTime||null,endTime:e.endTime||null,startRecur:e.startRecur?t.createMarker(e.startRecur):null,endRecur:e.endRecur?t.createMarker(e.endRecur):null},r=void 0;return e.duration&&(r=e.duration),!r&&e.startTime&&e.endTime&&(o=e.endTime,i=e.startTime,r={years:o.years-i.years,months:o.months-i.months,days:o.days-i.days,milliseconds:o.milliseconds-i.milliseconds}),{allDayGuess:Boolean(!e.startTime&&!e.endTime),duration:r,typeData:n}}var o,i;return null},expand:function(e,t,n){var r=Un(t,{start:e.startRecur,end:e.endRecur});return r?function(e,t,n,r){var o=e?xt(e):null,i=st(n.start),a=n.end,c=[];for(;i<a;){var s=void 0;o&&!o[i.getUTCDay()]||(s=t?r.add(i,t):i,c.push(s)),i=ot(i,1)}return c}(e.daysOfWeek,e.startTime,r,n):[]}};function si(e,t){for(var n=Et(t.getCurrentData().eventSources),r=[],o=0,i=e;o<i.length;o++){for(var a=i[o],c=!1,s=0;s<n.length;s+=1)if(n[s]._raw===a){n.splice(s,1),c=!0;break}c||r.push(a)}for(var u=0,l=n;u<l.length;u++){var d=l[u];t.dispatch({type:"REMOVE_EVENT_SOURCE",sourceId:d.sourceId})}for(var f=0,p=r;f<p.length;f++){var h=p[f];t.calendarApi.addEventSource(h)}}var ui=[Ao({eventSourceDefs:[{ignoreRange:!0,parseMeta:function(e){return Array.isArray(e.events)?e.events:null},fetch:function(e,t){t({rawEvents:e.eventSource.meta})}}]}),Ao({eventSourceDefs:[{parseMeta:function(e){return"function"==typeof e.events?e.events:null},fetch:function(e,t,n){var r=e.context.dateEnv;oo(e.eventSource.meta.bind(null,ar(e.range,r)),(function(e){t({rawEvents:e})}),n)}}]}),Ao({eventSourceRefiners:{method:String,extraParams:yn,startParam:String,endParam:String,timeZoneParam:String},eventSourceDefs:[ai]}),Ao({recurringTypes:[ci],eventRefiners:{daysOfWeek:yn,startTime:Rt,endTime:Rt,duration:Rt,startRecur:yn,endRecur:yn}}),Ao({optionChangeHandlers:{events:function(e,t){si([e],t)},eventSources:si}}),Ao({isLoadingFuncs:[function(e){return Ho(e.eventSources)}],contentTypeHandlers:{html:function(){var e=null,t="";return{render:function(n,r){n===e&&r===t||(n.innerHTML=r),e=n,t=r},destroy:function(){e.innerHTML="",e=null,t=""}}},domNodes:function(){var e=null,t=[];function n(){t.forEach(Pe),t=[],e=null}return{render:function(r,o){var i=Array.prototype.slice.call(o);if(r!==e||!zt(t,i)){for(var a=0,c=i;a<c.length;a++){var s=c[a];r.appendChild(s)}n()}e=r,t=i},destroy:n}}},propSetHandlers:{dateProfile:function(e,t){t.emitter.trigger("datesSet",ie(ie({},ar(e.activeRange,t.dateEnv)),{view:t.viewApi}))},eventStore:function(e,t){var n=t.emitter;n.hasHandlers("eventsSet")&&n.trigger("eventsSet",Er(e,t))}}})];var li=function(){function e(e){this.drainedOption=e,this.isRunning=!1,this.isDirty=!1,this.pauseDepths={},this.timeoutId=0}return e.prototype.request=function(e){this.isDirty=!0,this.isPaused()||(this.clearTimeout(),null==e?this.tryDrain():this.timeoutId=setTimeout(this.tryDrain.bind(this),e))},e.prototype.pause=function(e){void 0===e&&(e="");var t=this.pauseDepths;t[e]=(t[e]||0)+1,this.clearTimeout()},e.prototype.resume=function(e,t){void 0===e&&(e="");var n=this.pauseDepths;if(e in n){if(t)delete n[e];else n[e]-=1,n[e]<=0&&delete n[e];this.tryDrain()}},e.prototype.isPaused=function(){return Object.keys(this.pauseDepths).length},e.prototype.tryDrain=function(){if(!this.isRunning&&!this.isPaused()){for(this.isRunning=!0;this.isDirty;)this.isDirty=!1,this.drained();this.isRunning=!1}},e.prototype.clear=function(){this.clearTimeout(),this.isDirty=!1,this.pauseDepths={}},e.prototype.clearTimeout=function(){this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=0)},e.prototype.drained=function(){this.drainedOption&&this.drainedOption()},e}(),di=function(){function e(e,t){this.runTaskOption=e,this.drainedOption=t,this.queue=[],this.delayedRunner=new li(this.drain.bind(this))}return e.prototype.request=function(e,t){this.queue.push(e),this.delayedRunner.request(t)},e.prototype.pause=function(e){this.delayedRunner.pause(e)},e.prototype.resume=function(e,t){this.delayedRunner.resume(e,t)},e.prototype.drain=function(){for(var e=this.queue;e.length;){for(var t=[],n=void 0;n=e.shift();)this.runTask(n),t.push(n);this.drained(t)}},e.prototype.runTask=function(e){this.runTaskOption&&this.runTaskOption(e)},e.prototype.drained=function(e){this.drainedOption&&this.drainedOption(e)},e}();function fi(e,t,n){var r;return r=/^(year|month)$/.test(e.currentRangeUnit)?e.currentRange:e.activeRange,n.formatRange(r.start,r.end,sn(t.titleFormat||function(e){var t=e.currentRangeUnit;if("year"===t)return{year:"numeric"};if("month"===t)return{year:"numeric",month:"long"};var n=ct(e.currentRange.start,e.currentRange.end);if(null!==n&&n>1)return{year:"numeric",month:"short",day:"numeric"};return{year:"numeric",month:"long",day:"numeric"}}(e)),{isEndExclusive:e.isRangeAllDay,defaultSeparator:t.titleRangeSeparator})}var pi=function(){function e(e){var t=this;this.computeOptionsData=Wt(this._computeOptionsData),this.computeCurrentViewData=Wt(this._computeCurrentViewData),this.organizeRawLocales=Wt(_r),this.buildLocale=Wt(jr),this.buildPluginHooks=xo(),this.buildDateEnv=Wt(hi),this.buildTheme=Wt(mi),this.parseToolbars=Wt(ti),this.buildViewSpecs=Wt(No),this.buildDateProfileGenerator=Vt(gi),this.buildViewApi=Wt(vi),this.buildViewUiProps=Vt(wi),this.buildEventUiBySource=Wt(yi,Ot),this.buildEventUiBases=Wt(bi),this.parseContextBusinessHours=Vt(xi),this.buildTitle=Wt(fi),this.emitter=new io,this.actionRunner=new di(this._handleAction.bind(this),this.updateData.bind(this)),this.currentCalendarOptionsInput={},this.currentCalendarOptionsRefined={},this.currentViewOptionsInput={},this.currentViewOptionsRefined={},this.currentCalendarOptionsRefiners={},this.getCurrentData=function(){return t.data},this.dispatch=function(e){t.actionRunner.request(e)},this.props=e,this.actionRunner.pause();var n={},r=this.computeOptionsData(e.optionOverrides,n,e.calendarApi),o=r.calendarOptions.initialView||r.pluginHooks.initialView,i=this.computeCurrentViewData(o,r,e.optionOverrides,n);e.calendarApi.currentDataManager=this,this.emitter.setThisContext(e.calendarApi),this.emitter.setOptions(i.options);var a=function(e,t){var n=e.initialDate;return null!=n?t.createMarker(n):br(e.now,t)}(r.calendarOptions,r.dateEnv),c=i.dateProfileGenerator.build(a);Yn(c.activeRange,a)||(a=c.currentRange.start);for(var s={dateEnv:r.dateEnv,options:r.calendarOptions,pluginHooks:r.pluginHooks,calendarApi:e.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData},u=0,l=r.pluginHooks.contextInit;u<l.length;u++){(0,l[u])(s)}for(var d=Fo(r.calendarOptions,c,s),f={dynamicOptionOverrides:n,currentViewType:o,currentDate:a,dateProfile:c,businessHours:this.parseContextBusinessHours(s),eventSources:d,eventUiBases:{},eventStore:{defs:{},instances:{}},renderableEventStore:{defs:{},instances:{}},dateSelection:null,eventSelection:"",eventDrag:null,eventResize:null,selectionConfig:this.buildViewUiProps(s).selectionConfig},p=ie(ie({},s),f),h=0,m=r.pluginHooks.reducers;h<m.length;h++){var g=m[h];ie(f,g(null,null,p))}Ai(f,s)&&this.emitter.trigger("loading",!0),this.state=f,this.updateData(),this.actionRunner.resume()}return e.prototype.resetOptions=function(e,t){var n=this.props;n.optionOverrides=t?ie(ie({},n.optionOverrides),e):e,this.actionRunner.request({type:"NOTHING"})},e.prototype._handleAction=function(e){var t=this,n=t.props,r=t.state,o=t.emitter,i=function(e,t){var n;return"SET_OPTION"===t.type?ie(ie({},e),((n={})[t.optionName]=t.rawOptionValue,n)):e}(r.dynamicOptionOverrides,e),a=this.computeOptionsData(n.optionOverrides,i,n.calendarApi),c=function(e,t){"CHANGE_VIEW_TYPE"===t.type&&(e=t.viewType);return e}(r.currentViewType,e),s=this.computeCurrentViewData(c,a,n.optionOverrides,i);n.calendarApi.currentDataManager=this,o.setThisContext(n.calendarApi),o.setOptions(s.options);var u={dateEnv:a.dateEnv,options:a.calendarOptions,pluginHooks:a.pluginHooks,calendarApi:n.calendarApi,dispatch:this.dispatch,emitter:o,getCurrentData:this.getCurrentData},l=r.currentDate,d=r.dateProfile;this.data&&this.data.dateProfileGenerator!==s.dateProfileGenerator&&(d=s.dateProfileGenerator.build(l)),l=function(e,t){return"CHANGE_DATE"===t.type?t.dateMarker:e}(l,e),d=function(e,t,n,r){var o;switch(t.type){case"CHANGE_VIEW_TYPE":return r.build(t.dateMarker||n);case"CHANGE_DATE":return r.build(t.dateMarker);case"PREV":if((o=r.buildPrev(e,n)).isValid)return o;break;case"NEXT":if((o=r.buildNext(e,n)).isValid)return o}return e}(d,e,l,s.dateProfileGenerator),"PREV"!==e.type&&"NEXT"!==e.type&&Yn(d.currentRange,l)||(l=d.currentRange.start);for(var f=Lo(r.eventSources,e,d,u),p=Go(r.eventStore,e,f,d,u),h=Ho(f)&&!s.options.progressiveEventRendering&&r.renderableEventStore||p,m=this.buildViewUiProps(u),g=m.eventUiSingleBase,v=m.selectionConfig,y=this.buildEventUiBySource(f),b={dynamicOptionOverrides:i,currentViewType:c,currentDate:l,dateProfile:d,eventSources:f,eventStore:p,renderableEventStore:h,selectionConfig:v,eventUiBases:this.buildEventUiBases(h.defs,g,y),businessHours:this.parseContextBusinessHours(u),dateSelection:Ko(r.dateSelection,e),eventSelection:$o(r.eventSelection,e),eventDrag:Jo(r.eventDrag,e),eventResize:ei(r.eventResize,e)},w=ie(ie({},u),b),A=0,x=a.pluginHooks.reducers;A<x.length;A++){var E=x[A];ie(b,E(r,e,w))}var O=Ai(r,u),C=Ai(b,u);!O&&C?o.trigger("loading",!0):O&&!C&&o.trigger("loading",!1),this.state=b,n.onAction&&n.onAction(e)},e.prototype.updateData=function(){var e,t,n,r,o=this.props,i=this.state,a=this.data,c=this.computeOptionsData(o.optionOverrides,i.dynamicOptionOverrides,o.calendarApi),s=this.computeCurrentViewData(i.currentViewType,c,o.optionOverrides,i.dynamicOptionOverrides),u=this.data=ie(ie(ie({viewTitle:this.buildTitle(i.dateProfile,s.options,c.dateEnv),calendarApi:o.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData},c),s),i),l=c.pluginHooks.optionChangeHandlers,d=a&&a.calendarOptions,f=c.calendarOptions;if(d&&d!==f)for(var p in d.timeZone!==f.timeZone&&(i.eventSources=u.eventSources=(e=u.eventSources,t=i.dateProfile,n=u,r=t?t.activeRange:null,Wo(e,Yo(e,n),r,!0,n)),i.eventStore=u.eventStore=function(e,t,n){var r=e.defs,o=At(e.instances,(function(e){var o=r[e.defId];return o.allDay||o.recurringDef?e:ie(ie({},e),{range:{start:n.createMarker(t.toDate(e.range.start,e.forcedStartTzo)),end:n.createMarker(t.toDate(e.range.end,e.forcedEndTzo))},forcedStartTzo:n.canComputeOffset?null:e.forcedStartTzo,forcedEndTzo:n.canComputeOffset?null:e.forcedEndTzo})}));return{defs:r,instances:o}}(u.eventStore,a.dateEnv,u.dateEnv)),l)d[p]!==f[p]&&l[p](f[p],u);o.onData&&o.onData(u)},e.prototype._computeOptionsData=function(e,t,n){var r=this.processRawCalendarOptions(e,t),o=r.refinedOptions,i=r.pluginHooks,a=r.localeDefaults,c=r.availableLocaleData;Ei(r.extra);var s=this.buildDateEnv(o.timeZone,o.locale,o.weekNumberCalculation,o.firstDay,o.weekText,i,c,o.defaultRangeSeparator),u=this.buildViewSpecs(i.views,e,t,a),l=this.buildTheme(o,i);return{calendarOptions:o,pluginHooks:i,dateEnv:s,viewSpecs:u,theme:l,toolbarConfig:this.parseToolbars(o,e,l,u,n),localeDefaults:a,availableRawLocales:c.map}},e.prototype.processRawCalendarOptions=function(e,t){var n=gn([ln,e,t]),r=n.locales,o=n.locale,i=this.organizeRawLocales(r),a=i.map,c=this.buildLocale(o||i.defaultCode,a).options,s=this.buildPluginHooks(e.plugins||[],ui),u=this.currentCalendarOptionsRefiners=ie(ie(ie(ie(ie({},un),dn),fn),s.listenerRefiners),s.optionRefiners),l={},d=gn([ln,c,e,t]),f={},p=this.currentCalendarOptionsInput,h=this.currentCalendarOptionsRefined,m=!1;for(var g in d)"plugins"!==g&&(d[g]===p[g]||pn[g]&&g in p&&pn[g](p[g],d[g])?f[g]=h[g]:u[g]?(f[g]=u[g](d[g]),m=!0):l[g]=p[g]);return m&&(this.currentCalendarOptionsInput=d,this.currentCalendarOptionsRefined=f),{rawOptions:this.currentCalendarOptionsInput,refinedOptions:this.currentCalendarOptionsRefined,pluginHooks:s,availableLocaleData:i,localeDefaults:c,extra:l}},e.prototype._computeCurrentViewData=function(e,t,n,r){var o=t.viewSpecs[e];if(!o)throw new Error('viewType "'+e+"\" is not available. Please make sure you've loaded all neccessary plugins");var i=this.processRawViewOptions(o,t.pluginHooks,t.localeDefaults,n,r),a=i.refinedOptions;return Ei(i.extra),{viewSpec:o,options:a,dateProfileGenerator:this.buildDateProfileGenerator({dateProfileGeneratorClass:o.optionDefaults.dateProfileGeneratorClass,duration:o.duration,durationUnit:o.durationUnit,usesMinMaxTime:o.optionDefaults.usesMinMaxTime,dateEnv:t.dateEnv,calendarApi:this.props.calendarApi,slotMinTime:a.slotMinTime,slotMaxTime:a.slotMaxTime,showNonCurrentDates:a.showNonCurrentDates,dayCount:a.dayCount,dateAlignment:a.dateAlignment,dateIncrement:a.dateIncrement,hiddenDays:a.hiddenDays,weekends:a.weekends,nowInput:a.now,validRangeInput:a.validRange,visibleRangeInput:a.visibleRange,monthMode:a.monthMode,fixedWeekCount:a.fixedWeekCount}),viewApi:this.buildViewApi(e,this.getCurrentData,t.dateEnv)}},e.prototype.processRawViewOptions=function(e,t,n,r,o){var i=gn([ln,e.optionDefaults,n,r,e.optionOverrides,o]),a=ie(ie(ie(ie(ie(ie({},un),dn),fn),mn),t.listenerRefiners),t.optionRefiners),c={},s=this.currentViewOptionsInput,u=this.currentViewOptionsRefined,l=!1,d={};for(var f in i)i[f]===s[f]||pn[f]&&pn[f](i[f],s[f])?c[f]=u[f]:(i[f]===this.currentCalendarOptionsInput[f]||pn[f]&&pn[f](i[f],this.currentCalendarOptionsInput[f])?f in this.currentCalendarOptionsRefined&&(c[f]=this.currentCalendarOptionsRefined[f]):a[f]?c[f]=a[f](i[f]):d[f]=i[f],l=!0);return l&&(this.currentViewOptionsInput=i,this.currentViewOptionsRefined=c),{rawOptions:this.currentViewOptionsInput,refinedOptions:this.currentViewOptionsRefined,extra:d}},e}();function hi(e,t,n,r,o,i,a,c){var s=jr(t||a.defaultCode,a.map);return new kr({calendarSystem:"gregory",timeZone:e,namedTimeZoneImpl:i.namedTimeZonedImpl,locale:s,weekNumberCalculation:n,firstDay:r,weekText:o,cmdFormatter:i.cmdFormatter,defaultSeparator:c})}function mi(e,t){return new(t.themeClasses[e.themeSystem]||Eo)(e)}function gi(e){return new(e.dateProfileGeneratorClass||Zo)(e)}function vi(e,t,n){return new mr(e,t,n)}function yi(e){return At(e,(function(e){return e.ui}))}function bi(e,t,n){var r={"":t};for(var o in e){var i=e[o];i.sourceId&&n[i.sourceId]&&(r[o]=n[i.sourceId])}return r}function wi(e){var t=e.options;return{eventUiSingleBase:Sn({display:t.eventDisplay,editable:t.editable,startEditable:t.eventStartEditable,durationEditable:t.eventDurationEditable,constraint:t.eventConstraint,overlap:"boolean"==typeof t.eventOverlap?t.eventOverlap:void 0,allow:t.eventAllow,backgroundColor:t.eventBackgroundColor,borderColor:t.eventBorderColor,textColor:t.eventTextColor,color:t.eventColor},e),selectionConfig:Sn({constraint:t.selectConstraint,overlap:"boolean"==typeof t.selectOverlap?t.selectOverlap:void 0,allow:t.selectAllow},e)}}function Ai(e,t){for(var n=0,r=t.pluginHooks.isLoadingFuncs;n<r.length;n++){if((0,r[n])(e))return!0}return!1}function xi(e){return Mr(e.options.businessHours,e)}function Ei(e,t){for(var n in e)console.warn("Unknown option '"+n+"'"+(t?" for view '"+t+"'":""))}var Oi=function(e){function t(t){var n=e.call(this,t)||this;return n.handleData=function(e){n.dataManager?n.setState(e):n.state=e},n.dataManager=new pi({optionOverrides:t.optionOverrides,calendarApi:t.calendarApi,onData:n.handleData}),n}return oe(t,e),t.prototype.render=function(){return this.props.children(this.state)},t.prototype.componentDidUpdate=function(e){var t=this.props.optionOverrides;t!==e.optionOverrides&&this.dataManager.resetOptions(t)},t}(Ae);var Ci=function(){function e(){this.strictOrder=!1,this.allowReslicing=!1,this.maxCoord=-1,this.maxStackCnt=-1,this.levelCoords=[],this.entriesByLevel=[],this.stackCnts={}}return e.prototype.addSegs=function(e){for(var t=[],n=0,r=e;n<r.length;n++){var o=r[n];this.insertEntry(o,t)}return t},e.prototype.insertEntry=function(e,t){var n=this.findInsertion(e);return this.isInsertionValid(n,e)?(this.insertEntryAt(e,n),1):this.handleInvalidInsertion(n,e,t)},e.prototype.isInsertionValid=function(e,t){return(-1===this.maxCoord||e.levelCoord+t.thickness<=this.maxCoord)&&(-1===this.maxStackCnt||e.stackCnt<this.maxStackCnt)},e.prototype.handleInvalidInsertion=function(e,t,n){return this.allowReslicing&&e.touchingEntry?this.splitEntry(t,e.touchingEntry,n):(n.push(t),0)},e.prototype.splitEntry=function(e,t,n){var r=0,o=[],i=e.span,a=t.span;return i.start<a.start&&(r+=this.insertEntry({index:e.index,thickness:e.thickness,span:{start:i.start,end:a.start}},o)),i.end>a.end&&(r+=this.insertEntry({index:e.index,thickness:e.thickness,span:{start:a.end,end:i.end}},o)),r?(n.push.apply(n,ae([{index:e.index,thickness:e.thickness,span:Di(a,i)}],o)),r):(n.push(e),0)},e.prototype.insertEntryAt=function(e,t){var n=this.entriesByLevel,r=this.levelCoords;-1===t.lateral?(Pi(r,t.level,t.levelCoord),Pi(n,t.level,[e])):Pi(n[t.level],t.lateral,e),this.stackCnts[Si(e)]=t.stackCnt},e.prototype.findInsertion=function(e){for(var t=this,n=t.levelCoords,r=t.entriesByLevel,o=t.strictOrder,i=t.stackCnts,a=n.length,c=0,s=-1,u=-1,l=null,d=0,f=0;f<a;f+=1){var p=n[f];if(!o&&p>=c+e.thickness)break;for(var h=r[f],m=void 0,g=_i(h,e.span.start,ki),v=g[0]+g[1];(m=h[v])&&m.span.start<e.span.end;){var y=p+m.thickness;y>c&&(c=y,l=m,s=f,u=v),y===c&&(d=Math.max(d,i[Si(m)]+1)),v+=1}}var b=0;if(l)for(b=s+1;b<a&&n[b]<c;)b+=1;var w=-1;return b<a&&n[b]===c&&(w=_i(r[b],e.span.end,ki)[0]),{touchingLevel:s,touchingLateral:u,touchingEntry:l,stackCnt:d,levelCoord:c,level:b,lateral:w}},e.prototype.toRects=function(){for(var e=this.entriesByLevel,t=this.levelCoords,n=e.length,r=[],o=0;o<n;o+=1)for(var i=e[o],a=t[o],c=0,s=i;c<s.length;c++){var u=s[c];r.push(ie(ie({},u),{levelCoord:a}))}return r},e}();function ki(e){return e.span.end}function Si(e){return e.index+":"+e.span.start}function Di(e,t){var n=Math.max(e.start,t.start),r=Math.min(e.end,t.end);return n<r?{start:n,end:r}:null}function Pi(e,t,n){e.splice(t,0,n)}function _i(e,t,n){var r=0,o=e.length;if(!o||t<n(e[r]))return[0,0];if(t>n(e[o-1]))return[o,0];for(;r<o;){var i=Math.floor(r+(o-r)/2),a=n(e[i]);if(t<a)o=i;else{if(!(t>a))return[i,1];r=i+1}}return[r,0]}var ji=function(){function e(e){this.component=e.component,this.isHitComboAllowed=e.isHitComboAllowed||null}return e.prototype.destroy=function(){},e}();function Ti(e,t){return{component:e,el:t.el,useEventCenter:null==t.useEventCenter||t.useEventCenter,isHitComboAllowed:t.isHitComboAllowed||null}}function Ri(e){var t;return(t={})[e.component.uid]=e,t}var Ii={},Mi=function(){function e(e,t){this.emitter=new io}return e.prototype.destroy=function(){},e.prototype.setMirrorIsVisible=function(e){},e.prototype.setMirrorNeedsRevert=function(e){},e.prototype.setAutoScrollEnabled=function(e){},e}(),Ni={},Bi={startTime:Rt,duration:Rt,create:Boolean,sourceId:String};function Zi(e){var t=vn(e,Bi),n=t.refined,r=t.extra;return{startTime:n.startTime||null,duration:n.duration||null,create:null==n.create||n.create,sourceId:n.sourceId,leftoverProps:r}}var Fi=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return oe(t,e),t.prototype.render=function(){var e=this,t=this.props.widgetGroups.map((function(t){return e.renderWidgetGroup(t)}));return xe.apply(void 0,ae(["div",{className:"fc-toolbar-chunk"}],t))},t.prototype.renderWidgetGroup=function(e){for(var t=this.props,n=this.context.theme,r=[],o=!0,i=0,a=e;i<a.length;i++){var c=a[i],s=c.buttonName,u=c.buttonClick,l=c.buttonText,d=c.buttonIcon,f=c.buttonHint;if("title"===s)o=!1,r.push(xe("h2",{className:"fc-toolbar-title",id:t.titleId},t.title));else{var p=s===t.activeButton,h=!t.isTodayEnabled&&"today"===s||!t.isPrevEnabled&&"prev"===s||!t.isNextEnabled&&"next"===s,m=["fc-"+s+"-button",n.getClass("button")];p&&m.push(n.getClass("buttonActive")),r.push(xe("button",{type:"button",title:"function"==typeof f?f(t.navUnit):f,disabled:h,"aria-pressed":p,className:m.join(" "),onClick:u},l||(d?xe("span",{className:d}):"")))}}if(r.length>1){var g=o&&n.getClass("buttonGroup")||"";return xe.apply(void 0,ae(["div",{className:g}],r))}return r[0]},t}(go),Li=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return oe(t,e),t.prototype.render=function(){var e,t,n=this.props,r=n.model,o=n.extraClassName,i=!1,a=r.sectionWidgets,c=a.center;return a.left?(i=!0,e=a.left):e=a.start,a.right?(i=!0,t=a.right):t=a.end,xe("div",{className:[o||"","fc-toolbar",i?"fc-toolbar-ltr":""].join(" ")},this.renderSection("start",e||[]),this.renderSection("center",c||[]),this.renderSection("end",t||[]))},t.prototype.renderSection=function(e,t){var n=this.props;return xe(Fi,{key:e,widgetGroups:t,title:n.title,navUnit:n.navUnit,activeButton:n.activeButton,isTodayEnabled:n.isTodayEnabled,isPrevEnabled:n.isPrevEnabled,isNextEnabled:n.isNextEnabled,titleId:n.titleId})},t}(go),Hi=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={availableWidth:null},t.handleEl=function(e){t.el=e,bo(t.props.elRef,e),t.updateAvailableWidth()},t.handleResize=function(){t.updateAvailableWidth()},t}return oe(t,e),t.prototype.render=function(){var e=this.props,t=this.state,n=e.aspectRatio,r=["fc-view-harness",n||e.liquid||e.height?"fc-view-harness-active":"fc-view-harness-passive"],o="",i="";return n?null!==t.availableWidth?o=t.availableWidth/n:i=1/n*100+"%":o=e.height||"",xe("div",{"aria-labelledby":e.labeledById,ref:this.handleEl,className:r.join(" "),style:{height:o,paddingBottom:i}},e.children)},t.prototype.componentDidMount=function(){this.context.addResizeHandler(this.handleResize)},t.prototype.componentWillUnmount=function(){this.context.removeResizeHandler(this.handleResize)},t.prototype.updateAvailableWidth=function(){this.el&&this.props.aspectRatio&&this.setState({availableWidth:this.el.offsetWidth})},t}(go),Ui=function(e){function t(t){var n=e.call(this,t)||this;return n.handleSegClick=function(e,t){var r=n.component,o=r.context,i=Qn(t);if(i&&r.isValidSegDownEl(e.target)){var a=_e(e.target,".fc-event-forced-url"),c=a?a.querySelector("a[href]").href:"";o.emitter.trigger("eventClick",{el:t,event:new Ar(r.context,i.eventRange.def,i.eventRange.instance),jsEvent:e,view:o.viewApi}),c&&!e.defaultPrevented&&(window.location.href=c)}},n.destroy=He(t.el,"click",".fc-event",n.handleSegClick),n}return oe(t,e),t}(ji),zi=function(e){function t(t){var n=e.call(this,t)||this;return n.handleEventElRemove=function(e){e===n.currentSegEl&&n.handleSegLeave(null,n.currentSegEl)},n.handleSegEnter=function(e,t){Qn(t)&&(n.currentSegEl=t,n.triggerEvent("eventMouseEnter",e,t))},n.handleSegLeave=function(e,t){n.currentSegEl&&(n.currentSegEl=null,n.triggerEvent("eventMouseLeave",e,t))},n.removeHoverListeners=function(e,t,n,r){var o;return He(e,"mouseover",t,(function(e,t){if(t!==o){o=t,n(e,t);var i=function(e){o=null,r(e,t),t.removeEventListener("mouseleave",i)};t.addEventListener("mouseleave",i)}}))}(t.el,".fc-event",n.handleSegEnter,n.handleSegLeave),n}return oe(t,e),t.prototype.destroy=function(){this.removeHoverListeners()},t.prototype.triggerEvent=function(e,t,n){var r=this.component,o=r.context,i=Qn(n);t&&!r.isValidSegDownEl(t.target)||o.emitter.trigger(e,{el:n,event:new Ar(o,i.eventRange.def,i.eventRange.instance),jsEvent:t,view:o.viewApi})},t}(ji),Wi=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.buildViewContext=Wt(ho),t.buildViewPropTransformers=Wt(Yi),t.buildToolbarProps=Wt(Vi),t.headerRef=Ee(),t.footerRef=Ee(),t.interactionsStore={},t.state={viewLabelId:Fe()},t.registerInteractiveComponent=function(e,n){var r=Ti(e,n),o=[Ui,zi].concat(t.props.pluginHooks.componentInteractions).map((function(e){return new e(r)}));t.interactionsStore[e.uid]=o,Ii[e.uid]=r},t.unregisterInteractiveComponent=function(e){var n=t.interactionsStore[e.uid];if(n){for(var r=0,o=n;r<o.length;r++){o[r].destroy()}delete t.interactionsStore[e.uid]}delete Ii[e.uid]},t.resizeRunner=new li((function(){t.props.emitter.trigger("_resize",!0),t.props.emitter.trigger("windowResize",{view:t.props.viewApi})})),t.handleWindowResize=function(e){var n=t.props.options;n.handleWindowResize&&e.target===window&&t.resizeRunner.request(n.windowResizeDelay)},t}return oe(t,e),t.prototype.render=function(){var e,t=this.props,n=t.toolbarConfig,r=t.options,o=this.buildToolbarProps(t.viewSpec,t.dateProfile,t.dateProfileGenerator,t.currentDate,br(t.options.now,t.dateEnv),t.viewTitle),i=!1,a="";t.isHeightAuto||t.forPrint?a="":null!=r.height?i=!0:null!=r.contentHeight?a=r.contentHeight:e=Math.max(r.aspectRatio,.5);var c=this.buildViewContext(t.viewSpec,t.viewApi,t.options,t.dateProfileGenerator,t.dateEnv,t.theme,t.pluginHooks,t.dispatch,t.getCurrentData,t.emitter,t.calendarApi,this.registerInteractiveComponent,this.unregisterInteractiveComponent),s=n.header&&n.header.hasTitle?this.state.viewLabelId:"";return xe(po.Provider,{value:c},n.header&&xe(Li,ie({ref:this.headerRef,extraClassName:"fc-header-toolbar",model:n.header,titleId:s},o)),xe(Hi,{liquid:i,height:a,aspectRatio:e,labeledById:s},this.renderView(t),this.buildAppendContent()),n.footer&&xe(Li,ie({ref:this.footerRef,extraClassName:"fc-footer-toolbar",model:n.footer,titleId:""},o)))},t.prototype.componentDidMount=function(){var e=this.props;this.calendarInteractions=e.pluginHooks.calendarInteractions.map((function(t){return new t(e)})),window.addEventListener("resize",this.handleWindowResize);var t=e.pluginHooks.propSetHandlers;for(var n in t)t[n](e[n],e)},t.prototype.componentDidUpdate=function(e){var t=this.props,n=t.pluginHooks.propSetHandlers;for(var r in n)t[r]!==e[r]&&n[r](t[r],t)},t.prototype.componentWillUnmount=function(){window.removeEventListener("resize",this.handleWindowResize),this.resizeRunner.clear();for(var e=0,t=this.calendarInteractions;e<t.length;e++){t[e].destroy()}this.props.emitter.trigger("_unmount")},t.prototype.buildAppendContent=function(){var e=this.props,t=e.pluginHooks.viewContainerAppends.map((function(t){return t(e)}));return xe.apply(void 0,ae([Oe,{}],t))},t.prototype.renderView=function(e){for(var t=e.pluginHooks,n=e.viewSpec,r={dateProfile:e.dateProfile,businessHours:e.businessHours,eventStore:e.renderableEventStore,eventUiBases:e.eventUiBases,dateSelection:e.dateSelection,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,isHeightAuto:e.isHeightAuto,forPrint:e.forPrint},o=0,i=this.buildViewPropTransformers(t.viewPropsTransformers);o<i.length;o++){var a=i[o];ie(r,a.transform(r,e))}var c=n.component;return xe(c,ie({},r))},t}(mo);function Vi(e,t,n,r,o,i){var a=n.build(o,void 0,!1),c=n.buildPrev(t,r,!1),s=n.buildNext(t,r,!1);return{title:i,activeButton:e.type,navUnit:e.singleUnit,isTodayEnabled:a.isValid&&!Yn(t.currentRange,o),isPrevEnabled:c.isValid,isNextEnabled:s.isValid}}function Yi(e){return e.map((function(e){return new e}))}var qi=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={forPrint:!1},t.handleBeforePrint=function(){t.setState({forPrint:!0})},t.handleAfterPrint=function(){t.setState({forPrint:!1})},t}return oe(t,e),t.prototype.render=function(){var e=this.props,t=e.options,n=this.state.forPrint,r=n||"auto"===t.height||"auto"===t.contentHeight,o=r||null==t.height?"":t.height,i=["fc",n?"fc-media-print":"fc-media-screen","fc-direction-"+t.direction,e.theme.getClass("root")];return Fr()||i.push("fc-liquid-hack"),e.children(i,o,r,n)},t.prototype.componentDidMount=function(){var e=this.props.emitter;e.on("_beforeprint",this.handleBeforePrint),e.on("_afterprint",this.handleAfterPrint)},t.prototype.componentWillUnmount=function(){var e=this.props.emitter;e.off("_beforeprint",this.handleBeforePrint),e.off("_afterprint",this.handleAfterPrint)},t}(go);function Gi(e,t){return sn(!e||t>10?{weekday:"short"}:t>1?{weekday:"short",month:"numeric",day:"numeric",omitCommas:!0}:{weekday:"long"})}var Qi="fc-col-header-cell";function Xi(e){return e.text}var Ki=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return oe(t,e),t.prototype.render=function(){var e=this.context,t=e.dateEnv,n=e.options,r=e.theme,o=e.viewApi,i=this.props,a=i.date,c=i.dateProfile,s=zr(a,i.todayRange,null,c),u=[Qi].concat(Wr(s,r)),l=t.format(a,i.dayHeaderFormat),d=!s.isDisabled&&i.colCnt>1?Gr(this.context,a):{},f=ie(ie(ie({date:t.toDate(a),view:o},i.extraHookProps),{text:l}),s);return xe(Co,{hookProps:f,classNames:n.dayHeaderClassNames,content:n.dayHeaderContent,defaultContent:Xi,didMount:n.dayHeaderDidMount,willUnmount:n.dayHeaderWillUnmount},(function(e,t,n,r){return xe("th",ie({ref:e,role:"columnheader",className:u.concat(t).join(" "),"data-date":s.isDisabled?void 0:Ht(a),colSpan:i.colSpan},i.extraDataAttrs),xe("div",{className:"fc-scrollgrid-sync-inner"},!s.isDisabled&&xe("a",ie({ref:n,className:["fc-col-header-cell-cushion",i.isSticky?"fc-sticky":""].join(" ")},d),r)))}))},t}(go),$i=sn({weekday:"long"}),Ji=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return oe(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=t.dateEnv,r=t.theme,o=t.viewApi,i=t.options,a=ot(new Date(2592e5),e.dow),c={dow:e.dow,isDisabled:!1,isFuture:!1,isPast:!1,isToday:!1,isOther:!1},s=[Qi].concat(Wr(c,r),e.extraClassNames||[]),u=n.format(a,e.dayHeaderFormat),l=ie(ie(ie(ie({date:a},c),{view:o}),e.extraHookProps),{text:u});return xe(Co,{hookProps:l,classNames:i.dayHeaderClassNames,content:i.dayHeaderContent,defaultContent:Xi,didMount:i.dayHeaderDidMount,willUnmount:i.dayHeaderWillUnmount},(function(t,r,o,i){return xe("th",ie({ref:t,role:"columnheader",className:s.concat(r).join(" "),colSpan:e.colSpan},e.extraDataAttrs),xe("div",{className:"fc-scrollgrid-sync-inner"},xe("a",{"aria-label":n.format(a,$i),className:["fc-col-header-cell-cushion",e.isSticky?"fc-sticky":""].join(" "),ref:o},i)))}))},t}(go),ea=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.initialNowDate=br(n.options.now,n.dateEnv),r.initialNowQueriedMs=(new Date).valueOf(),r.state=r.computeTiming().currentState,r}return oe(t,e),t.prototype.render=function(){var e=this.props,t=this.state;return e.children(t.nowDate,t.todayRange)},t.prototype.componentDidMount=function(){this.setTimeout()},t.prototype.componentDidUpdate=function(e){e.unit!==this.props.unit&&(this.clearTimeout(),this.setTimeout())},t.prototype.componentWillUnmount=function(){this.clearTimeout()},t.prototype.computeTiming=function(){var e=this.props,t=this.context,n=it(this.initialNowDate,(new Date).valueOf()-this.initialNowQueriedMs),r=t.dateEnv.startOf(n,e.unit),o=t.dateEnv.add(r,Rt(1,e.unit)),i=o.valueOf()-n.valueOf();return i=Math.min(864e5,i),{currentState:{nowDate:r,todayRange:ta(r)},nextState:{nowDate:o,todayRange:ta(o)},waitMs:i}},t.prototype.setTimeout=function(){var e=this,t=this.computeTiming(),n=t.nextState,r=t.waitMs;this.timeoutId=setTimeout((function(){e.setState(n,(function(){e.setTimeout()}))}),r)},t.prototype.clearTimeout=function(){this.timeoutId&&clearTimeout(this.timeoutId)},t.contextType=po,t}(Ae);function ta(e){var t=st(e);return{start:t,end:ot(t,1)}}!function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.createDayHeaderFormatter=Wt(na),t}oe(t,e),t.prototype.render=function(){var e=this.context,t=this.props,n=t.dates,r=t.dateProfile,o=t.datesRepDistinctDays,i=t.renderIntro,a=this.createDayHeaderFormatter(e.options.dayHeaderFormat,o,n.length);return xe(ea,{unit:"day"},(function(e,t){return xe("tr",{role:"row"},i&&i("day"),n.map((function(e){return o?xe(Ki,{key:e.toISOString(),date:e,dateProfile:r,todayRange:t,colCnt:n.length,dayHeaderFormat:a}):xe(Ji,{key:e.getUTCDay(),dow:e.getUTCDay(),dayHeaderFormat:a})})))}))}}(go);function na(e,t,n){return e||Gi(t,n)}(function(){function e(e,t){for(var n=e.start,r=e.end,o=[],i=[],a=-1;n<r;)t.isHiddenDay(n)?o.push(a+.5):(a+=1,o.push(a),i.push(n)),n=ot(n,1);this.dates=i,this.indices=o,this.cnt=i.length}e.prototype.sliceRange=function(e){var t=this.getDateDayIndex(e.start),n=this.getDateDayIndex(ot(e.end,-1)),r=Math.max(0,t),o=Math.min(this.cnt-1,n);return(r=Math.ceil(r))<=(o=Math.floor(o))?{firstIndex:r,lastIndex:o,isStart:t===r,isEnd:n===o}:null},e.prototype.getDateDayIndex=function(e){var t=this.indices,n=Math.floor(at(this.dates[0],e));return n<0?t[0]-1:n>=t.length?t[t.length-1]+1:t[n]}})(),function(){function e(e,t){var n,r,o,i=e.dates;if(t){for(r=i[0].getUTCDay(),n=1;n<i.length&&i[n].getUTCDay()!==r;n+=1);o=Math.ceil(i.length/n)}else o=1,n=i.length;this.rowCnt=o,this.colCnt=n,this.daySeries=e,this.cells=this.buildCells(),this.headerDates=this.buildHeaderDates()}e.prototype.buildCells=function(){for(var e=[],t=0;t<this.rowCnt;t+=1){for(var n=[],r=0;r<this.colCnt;r+=1)n.push(this.buildCell(t,r));e.push(n)}return e},e.prototype.buildCell=function(e,t){var n=this.daySeries.dates[e*this.colCnt+t];return{key:n.toISOString(),date:n}},e.prototype.buildHeaderDates=function(){for(var e=[],t=0;t<this.colCnt;t+=1)e.push(this.cells[0][t].date);return e},e.prototype.sliceRange=function(e){var t=this.colCnt,n=this.daySeries.sliceRange(e),r=[];if(n)for(var o=n.firstIndex,i=n.lastIndex,a=o;a<=i;){var c=Math.floor(a/t),s=Math.min((c+1)*t,i+1);r.push({row:c,firstCol:a%t,lastCol:(s-1)%t,isStart:n.isStart&&a===o,isEnd:n.isEnd&&s-1===i}),a=s}return r}}();var ra=function(){function e(){this.sliceBusinessHours=Wt(this._sliceBusinessHours),this.sliceDateSelection=Wt(this._sliceDateSpan),this.sliceEventStore=Wt(this._sliceEventStore),this.sliceEventDrag=Wt(this._sliceInteraction),this.sliceEventResize=Wt(this._sliceInteraction),this.forceDayIfListItem=!1}return e.prototype.sliceProps=function(e,t,n,r){for(var o=[],i=4;i<arguments.length;i++)o[i-4]=arguments[i];var a=e.eventUiBases,c=this.sliceEventStore.apply(this,ae([e.eventStore,a,t,n],o));return{dateSelectionSegs:this.sliceDateSelection.apply(this,ae([e.dateSelection,a,r],o)),businessHourSegs:this.sliceBusinessHours.apply(this,ae([e.businessHours,t,n,r],o)),fgEventSegs:c.fg,bgEventSegs:c.bg,eventDrag:this.sliceEventDrag.apply(this,ae([e.eventDrag,a,t,n],o)),eventResize:this.sliceEventResize.apply(this,ae([e.eventResize,a,t,n],o)),eventSelection:e.eventSelection}},e.prototype.sliceNowDate=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return this._sliceDateSpan.apply(this,ae([{range:{start:e,end:it(e,1)},allDay:!1},{},t],n))},e.prototype._sliceBusinessHours=function(e,t,n,r){for(var o=[],i=4;i<arguments.length;i++)o[i-4]=arguments[i];return e?this._sliceEventStore.apply(this,ae([Pt(e,oa(t,Boolean(n)),r),{},t,n],o)).bg:[]},e.prototype._sliceEventStore=function(e,t,n,r){for(var o=[],i=4;i<arguments.length;i++)o[i-4]=arguments[i];if(e){var a=qn(e,t,oa(n,Boolean(r)),r);return{bg:this.sliceEventRanges(a.bg,o),fg:this.sliceEventRanges(a.fg,o)}}return{bg:[],fg:[]}},e.prototype._sliceInteraction=function(e,t,n,r){for(var o=[],i=4;i<arguments.length;i++)o[i-4]=arguments[i];if(!e)return null;var a=qn(e.mutatedEvents,t,oa(n,Boolean(r)),r);return{segs:this.sliceEventRanges(a.fg,o),affectedInstances:e.affectedEvents.instances,isEvent:e.isEvent}},e.prototype._sliceDateSpan=function(e,t,n){for(var r=[],o=3;o<arguments.length;o++)r[o-3]=arguments[o];if(!e)return[];for(var i=sr(e,t,n),a=this.sliceRange.apply(this,ae([e.range],r)),c=0,s=a;c<s.length;c++){var u=s[c];u.eventRange=i}return a},e.prototype.sliceEventRanges=function(e,t){for(var n=[],r=0,o=e;r<o.length;r++){var i=o[r];n.push.apply(n,this.sliceEventRange(i,t))}return n},e.prototype.sliceEventRange=function(e,t){var n=e.range;this.forceDayIfListItem&&"list-item"===e.ui.display&&(n={start:n.start,end:ot(n.start,1)});for(var r=this.sliceRange.apply(this,ae([n],t)),o=0,i=r;o<i.length;o++){var a=i[o];a.eventRange=e,a.isStart=e.isStart&&a.isStart,a.isEnd=e.isEnd&&a.isEnd}return r},e}();function oa(e,t){var n=e.activeRange;return t?n:{start:it(n.start,e.slotMinTime.milliseconds),end:it(n.end,e.slotMaxTime.milliseconds-864e5)}}function ia(e,t,n){var r=e.mutatedEvents.instances;for(var o in r)if(!Vn(t.validRange,r[o].range))return!1;return aa({eventDrag:e},n)}function aa(e,t){var n=t.getCurrentData(),r=ie({businessHours:n.businessHours,dateSelection:"",eventStore:n.eventStore,eventUiBases:n.eventUiBases,eventSelection:"",eventDrag:null,eventResize:null},e);return(t.pluginHooks.isPropsValid||ca)(r,t)}function ca(e,t,n,r){return void 0===n&&(n={}),!(e.eventDrag&&!function(e,t,n,r){var o=t.getCurrentData(),i=e.eventDrag,a=i.mutatedEvents,c=a.defs,s=a.instances,u=Xn(c,i.isEvent?e.eventUiBases:{"":o.selectionConfig});r&&(u=At(u,r));var l=(h=e.eventStore,m=i.affectedEvents.instances,{defs:h.defs,instances:wt(h.instances,(function(e){return!m[e.instanceId]}))}),d=l.defs,f=l.instances,p=Xn(d,e.eventUiBases);var h,m;for(var g in s){var v=s[g],y=v.range,b=u[v.defId],w=c[v.defId];if(!sa(b.constraints,y,l,e.businessHours,t))return!1;var A=t.options.eventOverlap,x="function"==typeof A?A:null;for(var E in f){var O=f[E];if(Wn(y,O.range)){if(!1===p[O.defId].overlap&&i.isEvent)return!1;if(!1===b.overlap)return!1;if(x&&!x(new Ar(t,d[O.defId],O),new Ar(t,w,v)))return!1}}for(var C=o.eventStore,k=0,S=b.allows;k<S.length;k++){var D=S[k],P=ie(ie({},n),{range:v.range,allDay:w.allDay}),_=C.defs[w.defId],j=C.instances[g],T=void 0;if(T=_?new Ar(t,_,j):new Ar(t,w),!D(lr(P,t),T))return!1}}return!0}(e,t,n,r))&&!(e.dateSelection&&!function(e,t,n,r){var o=e.eventStore,i=o.defs,a=o.instances,c=e.dateSelection,s=c.range,u=t.getCurrentData().selectionConfig;r&&(u=r(u));if(!sa(u.constraints,s,o,e.businessHours,t))return!1;var l=t.options.selectOverlap,d="function"==typeof l?l:null;for(var f in a){var p=a[f];if(Wn(s,p.range)){if(!1===u.overlap)return!1;if(d&&!d(new Ar(t,i[p.defId],p),null))return!1}}for(var h=0,m=u.allows;h<m.length;h++){if(!(0,m[h])(lr(ie(ie({},n),c),t),null))return!1}return!0}(e,t,n,r))}function sa(e,t,n,r,o){for(var i=0,a=e;i<a.length;i++){if(!da(ua(a[i],t,n,r,o),t))return!1}return!0}function ua(e,t,n,r,o){return"businessHours"===e?la(Pt(r,t,o)):"string"==typeof e?la(En(n,(function(t){return t.groupId===e}))):"object"==typeof e&&e?la(Pt(e,t,o)):[]}function la(e){var t=e.instances,n=[];for(var r in t)n.push(t[r].range);return n}function da(e,t){for(var n=0,r=e;n<r.length;n++){if(Vn(r[n],t))return!0}return!1}var fa=/^(visible|hidden)$/,pa=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleEl=function(e){t.el=e,bo(t.props.elRef,e)},t}return oe(t,e),t.prototype.render=function(){var e=this.props,t=e.liquid,n=e.liquidIsAbsolute,r=t&&n,o=["fc-scroller"];return t&&(n?o.push("fc-scroller-liquid-absolute"):o.push("fc-scroller-liquid")),xe("div",{ref:this.handleEl,className:o.join(" "),style:{overflowX:e.overflowX,overflowY:e.overflowY,left:r&&-(e.overcomeLeft||0)||"",right:r&&-(e.overcomeRight||0)||"",bottom:r&&-(e.overcomeBottom||0)||"",marginLeft:!r&&-(e.overcomeLeft||0)||"",marginRight:!r&&-(e.overcomeRight||0)||"",marginBottom:!r&&-(e.overcomeBottom||0)||"",maxHeight:e.maxHeight||""}},e.children)},t.prototype.needsXScrolling=function(){if(fa.test(this.props.overflowX))return!1;for(var e=this.el,t=this.el.getBoundingClientRect().width-this.getYScrollbarWidth(),n=e.children,r=0;r<n.length;r+=1){if(n[r].getBoundingClientRect().width>t)return!0}return!1},t.prototype.needsYScrolling=function(){if(fa.test(this.props.overflowY))return!1;for(var e=this.el,t=this.el.getBoundingClientRect().height-this.getXScrollbarWidth(),n=e.children,r=0;r<n.length;r+=1){if(n[r].getBoundingClientRect().height>t)return!0}return!1},t.prototype.getXScrollbarWidth=function(){return fa.test(this.props.overflowX)?0:this.el.offsetHeight-this.el.clientHeight},t.prototype.getYScrollbarWidth=function(){return fa.test(this.props.overflowY)?0:this.el.offsetWidth-this.el.clientWidth},t}(go),ha=function(){function e(e){var t=this;this.masterCallback=e,this.currentMap={},this.depths={},this.callbackMap={},this.handleValue=function(e,n){var r=t,o=r.depths,i=r.currentMap,a=!1,c=!1;null!==e?(a=n in i,i[n]=e,o[n]=(o[n]||0)+1,c=!0):(o[n]-=1,o[n]||(delete i[n],delete t.callbackMap[n],a=!0)),t.masterCallback&&(a&&t.masterCallback(null,String(n)),c&&t.masterCallback(e,String(n)))}}return e.prototype.createRef=function(e){var t=this,n=this.callbackMap[e];return n||(n=this.callbackMap[e]=function(n){t.handleValue(n,String(e))}),n},e.prototype.collect=function(e,t,n){return Dt(this.currentMap,e,t,n)},e.prototype.getAll=function(){return Et(this.currentMap)},e}();function ma(e){for(var t=0,n=0,r=Te(e,".fc-scrollgrid-shrink");n<r.length;n++){var o=r[n];t=Math.max(t,nt(o))}return Math.ceil(t)}function ga(e,t){return e.liquid&&t.liquid}function va(e,t){return null!=t.maxHeight||ga(e,t)}function ya(e,t,n,r){var o=n.expandRows;return"function"==typeof t.content?t.content(n):xe("table",{role:"presentation",className:[t.tableClassName,e.syncRowHeights?"fc-scrollgrid-sync-table":""].join(" "),style:{minWidth:n.tableMinWidth,width:n.clientWidth,height:o?n.clientHeight:""}},n.tableColGroupNode,xe(r?"thead":"tbody",{role:"presentation"},"function"==typeof t.rowContent?t.rowContent(n):t.rowContent))}function ba(e,t){return zt(e,t,Ot)}function wa(e,t){for(var n=[],r=0,o=e;r<o.length;r++)for(var i=o[r],a=i.span||1,c=0;c<a;c+=1)n.push(xe("col",{style:{width:"shrink"===i.width?Aa(t):i.width||"",minWidth:i.minWidth||""}}));return xe.apply(void 0,ae(["colgroup",{}],n))}function Aa(e){return null==e?4:e}function xa(e){for(var t=0,n=e;t<n.length;t++){if("shrink"===n[t].width)return!0}return!1}function Ea(e,t){var n=["fc-scrollgrid",t.theme.getClass("table")];return e&&n.push("fc-scrollgrid-liquid"),n}function Oa(e,t){var n=["fc-scrollgrid-section","fc-scrollgrid-section-"+e.type,e.className];return t&&e.liquid&&null==e.maxHeight&&n.push("fc-scrollgrid-section-liquid"),e.isSticky&&n.push("fc-scrollgrid-section-sticky"),n}function Ca(e){return xe("div",{className:"fc-scrollgrid-sticky-shim",style:{width:e.clientWidth,minWidth:e.tableMinWidth}})}function ka(e){var t=e.stickyHeaderDates;return null!=t&&"auto"!==t||(t="auto"===e.height||"auto"===e.viewHeight),t}function Sa(e){var t=e.stickyFooterScrollbar;return null!=t&&"auto"!==t||(t="auto"===e.height||"auto"===e.viewHeight),t}var Da=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.processCols=Wt((function(e){return e}),ba),t.renderMicroColGroup=Wt(wa),t.scrollerRefs=new ha,t.scrollerElRefs=new ha(t._handleScrollerEl.bind(t)),t.state={shrinkWidth:null,forceYScrollbars:!1,scrollerClientWidths:{},scrollerClientHeights:{}},t.handleSizing=function(){t.safeSetState(ie({shrinkWidth:t.computeShrinkWidth()},t.computeScrollerDims()))},t}return oe(t,e),t.prototype.render=function(){var e=this,t=e.props,n=e.state,r=e.context,o=t.sections||[],i=this.processCols(t.cols),a=this.renderMicroColGroup(i,n.shrinkWidth),c=Ea(t.liquid,r);t.collapsibleWidth&&c.push("fc-scrollgrid-collapsible");for(var s,u=o.length,l=0,d=[],f=[],p=[];l<u&&"header"===(s=o[l]).type;)d.push(this.renderSection(s,a,!0)),l+=1;for(;l<u&&"body"===(s=o[l]).type;)f.push(this.renderSection(s,a,!1)),l+=1;for(;l<u&&"footer"===(s=o[l]).type;)p.push(this.renderSection(s,a,!0)),l+=1;var h=!Fr(),m={role:"rowgroup"};return xe("table",{role:"grid",className:c.join(" "),style:{height:t.height}},Boolean(!h&&d.length)&&xe.apply(void 0,ae(["thead",m],d)),Boolean(!h&&f.length)&&xe.apply(void 0,ae(["tbody",m],f)),Boolean(!h&&p.length)&&xe.apply(void 0,ae(["tfoot",m],p)),h&&xe.apply(void 0,ae(ae(ae(["tbody",m],d),f),p)))},t.prototype.renderSection=function(e,t,n){return"outerContent"in e?xe(Oe,{key:e.key},e.outerContent):xe("tr",{key:e.key,role:"presentation",className:Oa(e,this.props.liquid).join(" ")},this.renderChunkTd(e,t,e.chunk,n))},t.prototype.renderChunkTd=function(e,t,n,r){if("outerContent"in n)return n.outerContent;var o=this.props,i=this.state,a=i.forceYScrollbars,c=i.scrollerClientWidths,s=i.scrollerClientHeights,u=va(o,e),l=ga(o,e),d=o.liquid?a?"scroll":u?"auto":"hidden":"visible",f=e.key,p=ya(e,n,{tableColGroupNode:t,tableMinWidth:"",clientWidth:o.collapsibleWidth||void 0===c[f]?null:c[f],clientHeight:void 0!==s[f]?s[f]:null,expandRows:e.expandRows,syncRowHeights:!1,rowSyncHeights:[],reportRowHeightChange:function(){}},r);return xe(r?"th":"td",{ref:n.elRef,role:"presentation"},xe("div",{className:"fc-scroller-harness"+(l?" fc-scroller-harness-liquid":"")},xe(pa,{ref:this.scrollerRefs.createRef(f),elRef:this.scrollerElRefs.createRef(f),overflowY:d,overflowX:o.liquid?"hidden":"visible",maxHeight:e.maxHeight,liquid:l,liquidIsAbsolute:!0},p)))},t.prototype._handleScrollerEl=function(e,t){var n=function(e,t){for(var n=0,r=e;n<r.length;n++){var o=r[n];if(o.key===t)return o}return null}(this.props.sections,t);n&&bo(n.chunk.scrollerElRef,e)},t.prototype.componentDidMount=function(){this.handleSizing(),this.context.addResizeHandler(this.handleSizing)},t.prototype.componentDidUpdate=function(){this.handleSizing()},t.prototype.componentWillUnmount=function(){this.context.removeResizeHandler(this.handleSizing)},t.prototype.computeShrinkWidth=function(){return xa(this.props.cols)?ma(this.scrollerElRefs.getAll()):0},t.prototype.computeScrollerDims=function(){var e=$r(),t=this.scrollerRefs,n=this.scrollerElRefs,r=!1,o={},i={};for(var a in t.currentMap){var c=t.currentMap[a];if(c&&c.needsYScrolling()){r=!0;break}}for(var s=0,u=this.props.sections;s<u.length;s++){a=u[s].key;var l=n.currentMap[a];if(l){var d=l.parentNode;o[a]=Math.floor(d.getBoundingClientRect().width-(r?e.y:0)),i[a]=Math.floor(d.getBoundingClientRect().height)}}return{forceYScrollbars:r,scrollerClientWidths:o,scrollerClientHeights:i}},t}(go);Da.addStateEquality({scrollerClientWidths:Ot,scrollerClientHeights:Ot});var Pa=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.elRef=Ee(),t}return oe(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=t.options,r=e.seg,o=r.eventRange,i=o.ui,a={event:new Ar(t,o.def,o.instance),view:t.viewApi,timeText:e.timeText,textColor:i.textColor,backgroundColor:i.backgroundColor,borderColor:i.borderColor,isDraggable:!e.disableDragging&&er(r,t),isStartResizable:!e.disableResizing&&tr(r,t),isEndResizable:!e.disableResizing&&nr(r),isMirror:Boolean(e.isDragging||e.isResizing||e.isDateSelecting),isStart:Boolean(r.isStart),isEnd:Boolean(r.isEnd),isPast:Boolean(e.isPast),isFuture:Boolean(e.isFuture),isToday:Boolean(e.isToday),isSelected:Boolean(e.isSelected),isDragging:Boolean(e.isDragging),isResizing:Boolean(e.isResizing)},c=function(e){var t=["fc-event"];return e.isMirror&&t.push("fc-event-mirror"),e.isDraggable&&t.push("fc-event-draggable"),(e.isStartResizable||e.isEndResizable)&&t.push("fc-event-resizable"),e.isDragging&&t.push("fc-event-dragging"),e.isResizing&&t.push("fc-event-resizing"),e.isSelected&&t.push("fc-event-selected"),e.isStart&&t.push("fc-event-start"),e.isEnd&&t.push("fc-event-end"),e.isPast&&t.push("fc-event-past"),e.isToday&&t.push("fc-event-today"),e.isFuture&&t.push("fc-event-future"),t}(a).concat(i.classNames);return xe(Co,{hookProps:a,classNames:n.eventClassNames,content:n.eventContent,defaultContent:e.defaultContent,didMount:n.eventDidMount,willUnmount:n.eventWillUnmount,elRef:this.elRef},(function(t,n,r,o){return e.children(t,c.concat(n),r,o,a)}))},t.prototype.componentDidMount=function(){Gn(this.elRef.current,this.props.seg)},t.prototype.componentDidUpdate=function(e){var t=this.props.seg;t!==e.seg&&Gn(this.elRef.current,t)},t}(go),_a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return oe(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=e.seg,r=t.options.eventTimeFormat||e.defaultTimeFormat,o=function(e,t,n,r,o,i,a){var c=n.dateEnv,s=n.options,u=s.displayEventTime,l=s.displayEventEnd,d=e.eventRange.def,f=e.eventRange.instance;null==u&&(u=!1!==r),null==l&&(l=!1!==o);var p=f.range.start,h=f.range.end,m=i||e.start||e.eventRange.range.start,g=a||e.end||e.eventRange.range.end,v=st(p).valueOf()===st(m).valueOf(),y=st(it(h,-1)).valueOf()===st(it(g,-1)).valueOf();return u&&!d.allDay&&(v||y)?(m=v?p:m,g=y?h:g,l&&d.hasEnd?c.formatRange(m,g,t,{forcedStartTzo:i?null:f.forcedStartTzo,forcedEndTzo:a?null:f.forcedEndTzo}):c.format(m,t,{forcedTzo:i?null:f.forcedStartTzo})):""}(n,r,t,e.defaultDisplayEventTime,e.defaultDisplayEventEnd);return xe(Pa,{seg:n,timeText:o,disableDragging:e.disableDragging,disableResizing:e.disableResizing,defaultContent:e.defaultContent||ja,isDragging:e.isDragging,isResizing:e.isResizing,isDateSelecting:e.isDateSelecting,isSelected:e.isSelected,isPast:e.isPast,isFuture:e.isFuture,isToday:e.isToday},(function(r,o,i,a,c){return xe("a",ie({className:e.extraClassNames.concat(o).join(" "),style:{borderColor:c.borderColor,backgroundColor:c.backgroundColor},ref:r},function(e,t){var n=e.eventRange,r=n.def,o=n.instance,i=r.url;if(i)return{href:i};var a=t.emitter,c=t.options.eventInteractive;return null==c&&null==(c=r.interactive)&&(c=Boolean(a.hasHandlers("eventClick"))),c?ze((function(e){a.trigger("eventClick",{el:e.target,event:new Ar(t,r,o),jsEvent:e,view:t.viewApi})})):{}}(n,t)),xe("div",{className:"fc-event-main",ref:i,style:{color:c.textColor}},a),c.isStartResizable&&xe("div",{className:"fc-event-resizer fc-event-resizer-start"}),c.isEndResizable&&xe("div",{className:"fc-event-resizer fc-event-resizer-end"}))}))},t}(go);function ja(e){return xe("div",{className:"fc-event-main-frame"},e.timeText&&xe("div",{className:"fc-event-time"},e.timeText),xe("div",{className:"fc-event-title-container"},xe("div",{className:"fc-event-title fc-sticky"},e.event.title||xe(Oe,null," "))))}var Ta=function(e){return xe(po.Consumer,null,(function(t){var n=t.options,r={isAxis:e.isAxis,date:t.dateEnv.toDate(e.date),view:t.viewApi};return xe(Co,{hookProps:r,classNames:n.nowIndicatorClassNames,content:n.nowIndicatorContent,didMount:n.nowIndicatorDidMount,willUnmount:n.nowIndicatorWillUnmount},e.children)}))},Ra=sn({day:"numeric"}),Ia=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return oe(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=t.options,r=Ma({date:e.date,dateProfile:e.dateProfile,todayRange:e.todayRange,showDayNumber:e.showDayNumber,extraProps:e.extraHookProps,viewApi:t.viewApi,dateEnv:t.dateEnv});return xe(So,{hookProps:r,content:n.dayCellContent,defaultContent:e.defaultContent},e.children)},t}(go);function Ma(e){var t=e.date,n=e.dateEnv,r=zr(t,e.todayRange,null,e.dateProfile);return ie(ie(ie({date:n.toDate(t),view:e.viewApi},r),{dayNumberText:e.showDayNumber?n.format(t,Ra):""}),e.extraProps)}var Na=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.refineHookProps=Vt(Ma),t.normalizeClassNames=_o(),t}return oe(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=t.options,r=this.refineHookProps({date:e.date,dateProfile:e.dateProfile,todayRange:e.todayRange,showDayNumber:e.showDayNumber,extraProps:e.extraHookProps,viewApi:t.viewApi,dateEnv:t.dateEnv}),o=Wr(r,t.theme).concat(r.isDisabled?[]:this.normalizeClassNames(n.dayCellClassNames,r)),i=r.isDisabled?{}:{"data-date":Ht(e.date)};return xe(Po,{hookProps:r,didMount:n.dayCellDidMount,willUnmount:n.dayCellWillUnmount,elRef:e.elRef},(function(t){return e.children(t,o,i,r.isDisabled)}))},t}(go);var Ba=function(e){return xe(Pa,{defaultContent:Za,seg:e.seg,timeText:"",disableDragging:!0,disableResizing:!0,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:!1,isPast:e.isPast,isFuture:e.isFuture,isToday:e.isToday},(function(e,t,n,r,o){return xe("div",{ref:e,className:["fc-bg-event"].concat(t).join(" "),style:{backgroundColor:o.backgroundColor}},r)}))};function Za(e){return e.event.title&&xe("div",{className:"fc-event-title"},e.event.title)}var Fa=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={titleId:Fe()},t.handleRootEl=function(e){t.rootEl=e,t.props.elRef&&bo(t.props.elRef,e)},t.handleDocumentMouseDown=function(e){var n=Ne(e);t.rootEl.contains(n)||t.handleCloseClick()},t.handleDocumentKeyDown=function(e){"Escape"===e.key&&t.handleCloseClick()},t.handleCloseClick=function(){var e=t.props.onClose;e&&e()},t}return oe(t,e),t.prototype.render=function(){var e=this.context,t=e.theme,n=e.options,r=this.props,o=this.state,i=["fc-popover",t.getClass("popover")].concat(r.extraClassNames||[]);return ke(xe("div",ie({id:r.id,className:i.join(" "),"aria-labelledby":o.titleId},r.extraAttrs,{ref:this.handleRootEl}),xe("div",{className:"fc-popover-header "+t.getClass("popoverHeader")},xe("span",{className:"fc-popover-title",id:o.titleId},r.title),xe("span",{className:"fc-popover-close "+t.getIconClass("close"),title:n.closeHint,onClick:this.handleCloseClick})),xe("div",{className:"fc-popover-body "+t.getClass("popoverContent")},r.children)),r.parentEl)},t.prototype.componentDidMount=function(){document.addEventListener("mousedown",this.handleDocumentMouseDown),document.addEventListener("keydown",this.handleDocumentKeyDown),this.updateSize()},t.prototype.componentWillUnmount=function(){document.removeEventListener("mousedown",this.handleDocumentMouseDown),document.removeEventListener("keydown",this.handleDocumentKeyDown)},t.prototype.updateSize=function(){var e=this.context.isRtl,t=this.props,n=t.alignmentEl,r=t.alignGridTop,o=this.rootEl,i=function(e){for(var t=ro(e),n=e.getBoundingClientRect(),r=0,o=t;r<o.length;r++){var i=Br(n,o[r].getBoundingClientRect());if(!i)return null;n=i}return n}(n);if(i){var a=o.getBoundingClientRect(),c=r?_e(n,".fc-scrollgrid").getBoundingClientRect().top:i.top,s=e?i.right-a.width:i.left;c=Math.max(c,10),s=Math.min(s,document.documentElement.clientWidth-10-a.width),s=Math.max(s,10);var u=o.offsetParent.getBoundingClientRect();Ie(o,{top:c-u.top,left:s-u.left})}},t}(go),La=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleRootEl=function(e){t.rootEl=e,e?t.context.registerInteractiveComponent(t,{el:e,useEventCenter:!1}):t.context.unregisterInteractiveComponent(t)},t}return oe(t,e),t.prototype.render=function(){var e=this.context,t=e.options,n=e.dateEnv,r=this.props,o=r.startDate,i=r.todayRange,a=r.dateProfile,c=n.format(o,t.dayPopoverFormat);return xe(Na,{date:o,dateProfile:a,todayRange:i,elRef:this.handleRootEl},(function(e,t,n){return xe(Fa,{elRef:e,id:r.id,title:c,extraClassNames:["fc-more-popover"].concat(t),extraAttrs:n,parentEl:r.parentEl,alignmentEl:r.alignmentEl,alignGridTop:r.alignGridTop,onClose:r.onClose},xe(Ia,{date:o,dateProfile:a,todayRange:i},(function(e,t){return t&&xe("div",{className:"fc-more-popover-misc",ref:e},t)})),r.children)}))},t.prototype.queryHit=function(e,t,n,r){var o=this.rootEl,i=this.props;return e>=0&&e<n&&t>=0&&t<r?{dateProfile:i.dateProfile,dateSpan:ie({allDay:!0,range:{start:i.startDate,end:i.endDate}},i.extraDateSpan),dayEl:o,rect:{left:0,top:0,right:n,bottom:r},layer:1}:null},t}(wo),Ha=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.linkElRef=Ee(),t.state={isPopoverOpen:!1,popoverId:Fe()},t.handleClick=function(e){var n=t,r=n.props,o=n.context,i=o.options.moreLinkClick,a=za(r).start;function c(e){var t=e.eventRange,n=t.def,r=t.instance,i=t.range;return{event:new Ar(o,n,r),start:o.dateEnv.toDate(i.start),end:o.dateEnv.toDate(i.end),isStart:e.isStart,isEnd:e.isEnd}}"function"==typeof i&&(i=i({date:a,allDay:Boolean(r.allDayDate),allSegs:r.allSegs.map(c),hiddenSegs:r.hiddenSegs.map(c),jsEvent:e,view:o.viewApi})),i&&"popover"!==i?"string"==typeof i&&o.calendarApi.zoomTo(a,i):t.setState({isPopoverOpen:!0})},t.handlePopoverClose=function(){t.setState({isPopoverOpen:!1})},t}return oe(t,e),t.prototype.render=function(){var e=this,t=this.props,n=this.state;return xe(po.Consumer,null,(function(r){var o=r.viewApi,i=r.options,a=r.calendarApi,c=i.moreLinkText,s=t.moreCnt,u=za(t),l="function"==typeof c?c.call(a,s):"+"+s+" "+c,d=Je(i.moreLinkHint,[s],l),f={num:s,shortText:"+"+s,text:l,view:o};return xe(Oe,null,Boolean(t.moreCnt)&&xe(Co,{elRef:e.linkElRef,hookProps:f,classNames:i.moreLinkClassNames,content:i.moreLinkContent,defaultContent:t.defaultContent||Ua,didMount:i.moreLinkDidMount,willUnmount:i.moreLinkWillUnmount},(function(r,o,i,a){return t.children(r,["fc-more-link"].concat(o),i,a,e.handleClick,d,n.isPopoverOpen,n.isPopoverOpen?n.popoverId:"")})),n.isPopoverOpen&&xe(La,{id:n.popoverId,startDate:u.start,endDate:u.end,dateProfile:t.dateProfile,todayRange:t.todayRange,extraDateSpan:t.extraDateSpan,parentEl:e.parentEl,alignmentEl:t.alignmentElRef.current,alignGridTop:t.alignGridTop,onClose:e.handlePopoverClose},t.popoverContent()))}))},t.prototype.componentDidMount=function(){this.updateParentEl()},t.prototype.componentDidUpdate=function(){this.updateParentEl()},t.prototype.updateParentEl=function(){this.linkElRef.current&&(this.parentEl=_e(this.linkElRef.current,".fc-view-harness"))},t}(go);function Ua(e){return e.text}function za(e){if(e.allDayDate)return{start:e.allDayDate,end:ot(e.allDayDate,1)};var t,n=e.hiddenSegs;return{start:Wa(n),end:(t=n,t.reduce(Ya).eventRange.range.end)}}function Wa(e){return e.reduce(Va).eventRange.range.start}function Va(e,t){return e.eventRange.range.start<t.eventRange.range.start?e:t}function Ya(e,t){return e.eventRange.range.end>t.eventRange.range.end?e:t}const qa=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._calendarApi=new wr,t}return oe(t,e),t.prototype.render=function(){return R.createElement(Oi,{optionOverrides:this.props,calendarApi:this._calendarApi},(function(e){return R.createElement(qi,{options:e.calendarOptions,theme:e.theme,emitter:e.emitter},(function(t,n,r,o){return R.createElement("div",{className:t.join(" "),style:{height:n}},R.createElement(Wi,ie({isHeightAuto:r,forPrint:o},e)))}))}))},t.prototype.getApi=function(){return this._calendarApi},t}(R.Component);var Ga=a(31397),Qa={};Qa.styleTagTransform=ye(),Qa.setAttributes=he(),Qa.insert=fe().bind(null,"head"),Qa.domAPI=le(),Qa.insertStyleElement=ge();se()(Ga.Z,Qa);Ga.Z&&Ga.Z.locals&&Ga.Z.locals;
64
+ e.exports=function(){"use strict";function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,n){return t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},t(e,n)}function n(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function r(e,o,i){return r=n()?Reflect.construct:function(e,n,r){var o=[null];o.push.apply(o,n);var i=new(Function.bind.apply(e,o));return r&&t(i,r.prototype),i},r.apply(null,arguments)}function o(e){return i(e)||a(e)||c(e)||u()}function i(e){if(Array.isArray(e))return s(e)}function a(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function c(e,t){if(e){if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function u(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l=Object.hasOwnProperty,d=Object.setPrototypeOf,f=Object.isFrozen,p=Object.getPrototypeOf,h=Object.getOwnPropertyDescriptor,m=Object.freeze,g=Object.seal,v=Object.create,y="undefined"!=typeof Reflect&&Reflect,b=y.apply,w=y.construct;b||(b=function(e,t,n){return e.apply(t,n)}),m||(m=function(e){return e}),g||(g=function(e){return e}),w||(w=function(e,t){return r(e,o(t))});var A=j(Array.prototype.forEach),x=j(Array.prototype.pop),E=j(Array.prototype.push),O=j(String.prototype.toLowerCase),C=j(String.prototype.match),k=j(String.prototype.replace),S=j(String.prototype.indexOf),D=j(String.prototype.trim),P=j(RegExp.prototype.test),_=T(TypeError);function j(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return b(e,t,r)}}function T(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return w(e,n)}}function R(e,t,n){n=n||O,d&&d(e,null);for(var r=t.length;r--;){var o=t[r];if("string"==typeof o){var i=n(o);i!==o&&(f(t)||(t[r]=i),o=i)}e[o]=!0}return e}function I(e){var t,n=v(null);for(t in e)b(l,e,[t])&&(n[t]=e[t]);return n}function M(e,t){for(;null!==e;){var n=h(e,t);if(n){if(n.get)return j(n.get);if("function"==typeof n.value)return j(n.value)}e=p(e)}function r(e){return console.warn("fallback value for",e),null}return r}var N=m(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),B=m(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Z=m(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),F=m(["animate","color-profile","cursor","discard","fedropshadow","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),L=m(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),H=m(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),U=m(["#text"]),z=m(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),W=m(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),V=m(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Y=m(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),q=g(/\{\{[\w\W]*|[\w\W]*\}\}/gm),G=g(/<%[\w\W]*|[\w\W]*%>/gm),Q=g(/^data-[\-\w.\u00B7-\uFFFF]/),X=g(/^aria-[\-\w]+$/),K=g(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),$=g(/^(?:\w+script|data):/i),J=g(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),ee=g(/^html$/i),te=function(){return"undefined"==typeof window?null:window},ne=function(t,n){if("object"!==e(t)||"function"!=typeof t.createPolicy)return null;var r=null,o="data-tt-policy-suffix";n.currentScript&&n.currentScript.hasAttribute(o)&&(r=n.currentScript.getAttribute(o));var i="dompurify"+(r?"#"+r:"");try{return t.createPolicy(i,{createHTML:function(e){return e},createScriptURL:function(e){return e}})}catch(e){return console.warn("TrustedTypes policy "+i+" could not be created."),null}};function re(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:te(),n=function(e){return re(e)};if(n.version="2.4.0",n.removed=[],!t||!t.document||9!==t.document.nodeType)return n.isSupported=!1,n;var r=t.document,i=t.document,a=t.DocumentFragment,c=t.HTMLTemplateElement,s=t.Node,u=t.Element,l=t.NodeFilter,d=t.NamedNodeMap,f=void 0===d?t.NamedNodeMap||t.MozNamedAttrMap:d,p=t.HTMLFormElement,h=t.DOMParser,g=t.trustedTypes,v=u.prototype,y=M(v,"cloneNode"),b=M(v,"nextSibling"),w=M(v,"childNodes"),j=M(v,"parentNode");if("function"==typeof c){var T=i.createElement("template");T.content&&T.content.ownerDocument&&(i=T.content.ownerDocument)}var oe=ne(g,r),ie=oe?oe.createHTML(""):"",ae=i,ce=ae.implementation,se=ae.createNodeIterator,ue=ae.createDocumentFragment,le=ae.getElementsByTagName,de=r.importNode,fe={};try{fe=I(i).documentMode?i.documentMode:{}}catch(e){}var pe={};n.isSupported="function"==typeof j&&ce&&void 0!==ce.createHTMLDocument&&9!==fe;var he,me,ge=q,ve=G,ye=Q,be=X,we=$,Ae=J,xe=K,Ee=null,Oe=R({},[].concat(o(N),o(B),o(Z),o(L),o(U))),Ce=null,ke=R({},[].concat(o(z),o(W),o(V),o(Y))),Se=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),De=null,Pe=null,_e=!0,je=!0,Te=!1,Re=!1,Ie=!1,Me=!1,Ne=!1,Be=!1,Ze=!1,Fe=!1,Le=!0,He=!1,Ue="user-content-",ze=!0,We=!1,Ve={},Ye=null,qe=R({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),Ge=null,Qe=R({},["audio","video","img","source","image","track"]),Xe=null,Ke=R({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),$e="http://www.w3.org/1998/Math/MathML",Je="http://www.w3.org/2000/svg",et="http://www.w3.org/1999/xhtml",tt=et,nt=!1,rt=["application/xhtml+xml","text/html"],ot="text/html",it=null,at=i.createElement("form"),ct=function(e){return e instanceof RegExp||e instanceof Function},st=function(t){it&&it===t||(t&&"object"===e(t)||(t={}),t=I(t),he=he=-1===rt.indexOf(t.PARSER_MEDIA_TYPE)?ot:t.PARSER_MEDIA_TYPE,me="application/xhtml+xml"===he?function(e){return e}:O,Ee="ALLOWED_TAGS"in t?R({},t.ALLOWED_TAGS,me):Oe,Ce="ALLOWED_ATTR"in t?R({},t.ALLOWED_ATTR,me):ke,Xe="ADD_URI_SAFE_ATTR"in t?R(I(Ke),t.ADD_URI_SAFE_ATTR,me):Ke,Ge="ADD_DATA_URI_TAGS"in t?R(I(Qe),t.ADD_DATA_URI_TAGS,me):Qe,Ye="FORBID_CONTENTS"in t?R({},t.FORBID_CONTENTS,me):qe,De="FORBID_TAGS"in t?R({},t.FORBID_TAGS,me):{},Pe="FORBID_ATTR"in t?R({},t.FORBID_ATTR,me):{},Ve="USE_PROFILES"in t&&t.USE_PROFILES,_e=!1!==t.ALLOW_ARIA_ATTR,je=!1!==t.ALLOW_DATA_ATTR,Te=t.ALLOW_UNKNOWN_PROTOCOLS||!1,Re=t.SAFE_FOR_TEMPLATES||!1,Ie=t.WHOLE_DOCUMENT||!1,Be=t.RETURN_DOM||!1,Ze=t.RETURN_DOM_FRAGMENT||!1,Fe=t.RETURN_TRUSTED_TYPE||!1,Ne=t.FORCE_BODY||!1,Le=!1!==t.SANITIZE_DOM,He=t.SANITIZE_NAMED_PROPS||!1,ze=!1!==t.KEEP_CONTENT,We=t.IN_PLACE||!1,xe=t.ALLOWED_URI_REGEXP||xe,tt=t.NAMESPACE||et,t.CUSTOM_ELEMENT_HANDLING&&ct(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Se.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&ct(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Se.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Se.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Re&&(je=!1),Ze&&(Be=!0),Ve&&(Ee=R({},o(U)),Ce=[],!0===Ve.html&&(R(Ee,N),R(Ce,z)),!0===Ve.svg&&(R(Ee,B),R(Ce,W),R(Ce,Y)),!0===Ve.svgFilters&&(R(Ee,Z),R(Ce,W),R(Ce,Y)),!0===Ve.mathMl&&(R(Ee,L),R(Ce,V),R(Ce,Y))),t.ADD_TAGS&&(Ee===Oe&&(Ee=I(Ee)),R(Ee,t.ADD_TAGS,me)),t.ADD_ATTR&&(Ce===ke&&(Ce=I(Ce)),R(Ce,t.ADD_ATTR,me)),t.ADD_URI_SAFE_ATTR&&R(Xe,t.ADD_URI_SAFE_ATTR,me),t.FORBID_CONTENTS&&(Ye===qe&&(Ye=I(Ye)),R(Ye,t.FORBID_CONTENTS,me)),ze&&(Ee["#text"]=!0),Ie&&R(Ee,["html","head","body"]),Ee.table&&(R(Ee,["tbody"]),delete De.tbody),m&&m(t),it=t)},ut=R({},["mi","mo","mn","ms","mtext"]),lt=R({},["foreignobject","desc","title","annotation-xml"]),dt=R({},["title","style","font","a","script"]),ft=R({},B);R(ft,Z),R(ft,F);var pt=R({},L);R(pt,H);var ht=function(e){var t=j(e);t&&t.tagName||(t={namespaceURI:et,tagName:"template"});var n=O(e.tagName),r=O(t.tagName);return e.namespaceURI===Je?t.namespaceURI===et?"svg"===n:t.namespaceURI===$e?"svg"===n&&("annotation-xml"===r||ut[r]):Boolean(ft[n]):e.namespaceURI===$e?t.namespaceURI===et?"math"===n:t.namespaceURI===Je?"math"===n&&lt[r]:Boolean(pt[n]):e.namespaceURI===et&&!(t.namespaceURI===Je&&!lt[r])&&!(t.namespaceURI===$e&&!ut[r])&&!pt[n]&&(dt[n]||!ft[n])},mt=function(e){E(n.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){try{e.outerHTML=ie}catch(t){e.remove()}}},gt=function(e,t){try{E(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){E(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!Ce[e])if(Be||Ze)try{mt(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},vt=function(e){var t,n;if(Ne)e="<remove></remove>"+e;else{var r=C(e,/^[\r\n\t ]+/);n=r&&r[0]}"application/xhtml+xml"===he&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");var o=oe?oe.createHTML(e):e;if(tt===et)try{t=(new h).parseFromString(o,he)}catch(e){}if(!t||!t.documentElement){t=ce.createDocument(tt,"template",null);try{t.documentElement.innerHTML=nt?"":o}catch(e){}}var a=t.body||t.documentElement;return e&&n&&a.insertBefore(i.createTextNode(n),a.childNodes[0]||null),tt===et?le.call(t,Ie?"html":"body")[0]:Ie?t.documentElement:a},yt=function(e){return se.call(e.ownerDocument||e,e,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT,null,!1)},bt=function(e){return e instanceof p&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof f)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore)},wt=function(t){return"object"===e(s)?t instanceof s:t&&"object"===e(t)&&"number"==typeof t.nodeType&&"string"==typeof t.nodeName},At=function(e,t,r){pe[e]&&A(pe[e],(function(e){e.call(n,t,r,it)}))},xt=function(e){var t;if(At("beforeSanitizeElements",e,null),bt(e))return mt(e),!0;if(P(/[\u0080-\uFFFF]/,e.nodeName))return mt(e),!0;var r=me(e.nodeName);if(At("uponSanitizeElement",e,{tagName:r,allowedTags:Ee}),e.hasChildNodes()&&!wt(e.firstElementChild)&&(!wt(e.content)||!wt(e.content.firstElementChild))&&P(/<[/\w]/g,e.innerHTML)&&P(/<[/\w]/g,e.textContent))return mt(e),!0;if("select"===r&&P(/<template/i,e.innerHTML))return mt(e),!0;if(!Ee[r]||De[r]){if(!De[r]&&Ot(r)){if(Se.tagNameCheck instanceof RegExp&&P(Se.tagNameCheck,r))return!1;if(Se.tagNameCheck instanceof Function&&Se.tagNameCheck(r))return!1}if(ze&&!Ye[r]){var o=j(e)||e.parentNode,i=w(e)||e.childNodes;if(i&&o)for(var a=i.length-1;a>=0;--a)o.insertBefore(y(i[a],!0),b(e))}return mt(e),!0}return e instanceof u&&!ht(e)?(mt(e),!0):"noscript"!==r&&"noembed"!==r||!P(/<\/no(script|embed)/i,e.innerHTML)?(Re&&3===e.nodeType&&(t=e.textContent,t=k(t,ge," "),t=k(t,ve," "),e.textContent!==t&&(E(n.removed,{element:e.cloneNode()}),e.textContent=t)),At("afterSanitizeElements",e,null),!1):(mt(e),!0)},Et=function(e,t,n){if(Le&&("id"===t||"name"===t)&&(n in i||n in at))return!1;if(je&&!Pe[t]&&P(ye,t));else if(_e&&P(be,t));else if(!Ce[t]||Pe[t]){if(!(Ot(e)&&(Se.tagNameCheck instanceof RegExp&&P(Se.tagNameCheck,e)||Se.tagNameCheck instanceof Function&&Se.tagNameCheck(e))&&(Se.attributeNameCheck instanceof RegExp&&P(Se.attributeNameCheck,t)||Se.attributeNameCheck instanceof Function&&Se.attributeNameCheck(t))||"is"===t&&Se.allowCustomizedBuiltInElements&&(Se.tagNameCheck instanceof RegExp&&P(Se.tagNameCheck,n)||Se.tagNameCheck instanceof Function&&Se.tagNameCheck(n))))return!1}else if(Xe[t]);else if(P(xe,k(n,Ae,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==S(n,"data:")||!Ge[e])if(Te&&!P(we,k(n,Ae,"")));else if(n)return!1;return!0},Ot=function(e){return e.indexOf("-")>0},Ct=function(t){var r,o,i,a;At("beforeSanitizeAttributes",t,null);var c=t.attributes;if(c){var s={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Ce};for(a=c.length;a--;){var u=r=c[a],l=u.name,d=u.namespaceURI;if(o="value"===l?r.value:D(r.value),i=me(l),s.attrName=i,s.attrValue=o,s.keepAttr=!0,s.forceKeepAttr=void 0,At("uponSanitizeAttribute",t,s),o=s.attrValue,!s.forceKeepAttr&&(gt(l,t),s.keepAttr))if(P(/\/>/i,o))gt(l,t);else{Re&&(o=k(o,ge," "),o=k(o,ve," "));var f=me(t.nodeName);if(Et(f,i,o)){if(!He||"id"!==i&&"name"!==i||(gt(l,t),o=Ue+o),oe&&"object"===e(g)&&"function"==typeof g.getAttributeType)if(d);else switch(g.getAttributeType(f,i)){case"TrustedHTML":o=oe.createHTML(o);break;case"TrustedScriptURL":o=oe.createScriptURL(o)}try{d?t.setAttributeNS(d,l,o):t.setAttribute(l,o),x(n.removed)}catch(e){}}}}At("afterSanitizeAttributes",t,null)}},kt=function e(t){var n,r=yt(t);for(At("beforeSanitizeShadowDOM",t,null);n=r.nextNode();)At("uponSanitizeShadowNode",n,null),xt(n)||(n.content instanceof a&&e(n.content),Ct(n));At("afterSanitizeShadowDOM",t,null)};return n.sanitize=function(o){var i,c,u,l,d,f=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if((nt=!o)&&(o="\x3c!--\x3e"),"string"!=typeof o&&!wt(o)){if("function"!=typeof o.toString)throw _("toString is not a function");if("string"!=typeof(o=o.toString()))throw _("dirty is not a string, aborting")}if(!n.isSupported){if("object"===e(t.toStaticHTML)||"function"==typeof t.toStaticHTML){if("string"==typeof o)return t.toStaticHTML(o);if(wt(o))return t.toStaticHTML(o.outerHTML)}return o}if(Me||st(f),n.removed=[],"string"==typeof o&&(We=!1),We){if(o.nodeName){var p=me(o.nodeName);if(!Ee[p]||De[p])throw _("root node is forbidden and cannot be sanitized in-place")}}else if(o instanceof s)1===(c=(i=vt("\x3c!----\x3e")).ownerDocument.importNode(o,!0)).nodeType&&"BODY"===c.nodeName||"HTML"===c.nodeName?i=c:i.appendChild(c);else{if(!Be&&!Re&&!Ie&&-1===o.indexOf("<"))return oe&&Fe?oe.createHTML(o):o;if(!(i=vt(o)))return Be?null:Fe?ie:""}i&&Ne&&mt(i.firstChild);for(var h=yt(We?o:i);u=h.nextNode();)3===u.nodeType&&u===l||xt(u)||(u.content instanceof a&&kt(u.content),Ct(u),l=u);if(l=null,We)return o;if(Be){if(Ze)for(d=ue.call(i.ownerDocument);i.firstChild;)d.appendChild(i.firstChild);else d=i;return Ce.shadowroot&&(d=de.call(r,d,!0)),d}var m=Ie?i.outerHTML:i.innerHTML;return Ie&&Ee["!doctype"]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&P(ee,i.ownerDocument.doctype.name)&&(m="<!DOCTYPE "+i.ownerDocument.doctype.name+">\n"+m),Re&&(m=k(m,ge," "),m=k(m,ve," ")),oe&&Fe?oe.createHTML(m):m},n.setConfig=function(e){st(e),Me=!0},n.clearConfig=function(){it=null,Me=!1},n.isValidAttribute=function(e,t,n){it||st({});var r=me(e),o=me(t);return Et(r,o,n)},n.addHook=function(e,t){"function"==typeof t&&(pe[e]=pe[e]||[],E(pe[e],t))},n.removeHook=function(e){if(pe[e])return x(pe[e])},n.removeHooks=function(e){pe[e]&&(pe[e]=[])},n.removeAllHooks=function(){pe={}},n}return re()}()},85042:e=>{"use strict";e.exports="data:application/x-font-ttf;charset=utf-8;base64,AAEAAAALAIAAAwAwT1MvMg8SBfAAAAC8AAAAYGNtYXAXVtKNAAABHAAAAFRnYXNwAAAAEAAAAXAAAAAIZ2x5ZgYydxIAAAF4AAAFNGhlYWQUJ7cIAAAGrAAAADZoaGVhB20DzAAABuQAAAAkaG10eCIABhQAAAcIAAAALGxvY2ED4AU6AAAHNAAAABhtYXhwAA8AjAAAB0wAAAAgbmFtZXsr690AAAdsAAABhnBvc3QAAwAAAAAI9AAAACAAAwPAAZAABQAAApkCzAAAAI8CmQLMAAAB6wAzAQkAAAAAAAAAAAAAAAAAAAABEAAAAAAAAAAAAAAAAAAAAABAAADpBgPA/8AAQAPAAEAAAAABAAAAAAAAAAAAAAAgAAAAAAADAAAAAwAAABwAAQADAAAAHAADAAEAAAAcAAQAOAAAAAoACAACAAIAAQAg6Qb//f//AAAAAAAg6QD//f//AAH/4xcEAAMAAQAAAAAAAAAAAAAAAQAB//8ADwABAAAAAAAAAAAAAgAANzkBAAAAAAEAAAAAAAAAAAACAAA3OQEAAAAAAQAAAAAAAAAAAAIAADc5AQAAAAABAWIAjQKeAskAEwAAJSc3NjQnJiIHAQYUFwEWMjc2NCcCnuLiDQ0MJAz/AA0NAQAMJAwNDcni4gwjDQwM/wANIwz/AA0NDCMNAAAAAQFiAI0CngLJABMAACUBNjQnASYiBwYUHwEHBhQXFjI3AZ4BAA0N/wAMJAwNDeLiDQ0MJAyNAQAMIw0BAAwMDSMM4uINIwwNDQAAAAIA4gC3Ax4CngATACcAACUnNzY0JyYiDwEGFB8BFjI3NjQnISc3NjQnJiIPAQYUHwEWMjc2NCcB87e3DQ0MIw3VDQ3VDSMMDQ0BK7e3DQ0MJAzVDQ3VDCQMDQ3zuLcMJAwNDdUNIwzWDAwNIwy4twwkDA0N1Q0jDNYMDA0jDAAAAgDiALcDHgKeABMAJwAAJTc2NC8BJiIHBhQfAQcGFBcWMjchNzY0LwEmIgcGFB8BBwYUFxYyNwJJ1Q0N1Q0jDA0Nt7cNDQwjDf7V1Q0N1QwkDA0Nt7cNDQwkDLfWDCMN1Q0NDCQMt7gMIw0MDNYMIw3VDQ0MJAy3uAwjDQwMAAADAFUAAAOrA1UAMwBoAHcAABMiBgcOAQcOAQcOARURFBYXHgEXHgEXHgEzITI2Nz4BNz4BNz4BNRE0JicuAScuAScuASMFITIWFx4BFx4BFx4BFREUBgcOAQcOAQcOASMhIiYnLgEnLgEnLgE1ETQ2Nz4BNz4BNz4BMxMhMjY1NCYjISIGFRQWM9UNGAwLFQkJDgUFBQUFBQ4JCRULDBgNAlYNGAwLFQkJDgUFBQUFBQ4JCRULDBgN/aoCVgQIBAQHAwMFAQIBAQIBBQMDBwQECAT9qgQIBAQHAwMFAQIBAQIBBQMDBwQECASAAVYRGRkR/qoRGRkRA1UFBAUOCQkVDAsZDf2rDRkLDBUJCA4FBQUFBQUOCQgVDAsZDQJVDRkLDBUJCQ4FBAVVAgECBQMCBwQECAX9qwQJAwQHAwMFAQICAgIBBQMDBwQDCQQCVQUIBAQHAgMFAgEC/oAZEhEZGRESGQAAAAADAFUAAAOrA1UAMwBoAIkAABMiBgcOAQcOAQcOARURFBYXHgEXHgEXHgEzITI2Nz4BNz4BNz4BNRE0JicuAScuAScuASMFITIWFx4BFx4BFx4BFREUBgcOAQcOAQcOASMhIiYnLgEnLgEnLgE1ETQ2Nz4BNz4BNz4BMxMzFRQWMzI2PQEzMjY1NCYrATU0JiMiBh0BIyIGFRQWM9UNGAwLFQkJDgUFBQUFBQ4JCRULDBgNAlYNGAwLFQkJDgUFBQUFBQ4JCRULDBgN/aoCVgQIBAQHAwMFAQIBAQIBBQMDBwQECAT9qgQIBAQHAwMFAQIBAQIBBQMDBwQECASAgBkSEhmAERkZEYAZEhIZgBEZGREDVQUEBQ4JCRUMCxkN/asNGQsMFQkIDgUFBQUFBQ4JCBUMCxkNAlUNGQsMFQkJDgUEBVUCAQIFAwIHBAQIBf2rBAkDBAcDAwUBAgICAgEFAwMHBAMJBAJVBQgEBAcCAwUCAQL+gIASGRkSgBkSERmAEhkZEoAZERIZAAABAOIAjQMeAskAIAAAExcHBhQXFjI/ARcWMjc2NC8BNzY0JyYiDwEnJiIHBhQX4uLiDQ0MJAzi4gwkDA0N4uINDQwkDOLiDCQMDQ0CjeLiDSMMDQ3h4Q0NDCMN4uIMIw0MDOLiDAwNIwwAAAABAAAAAQAAa5n0y18PPPUACwQAAAAAANivOVsAAAAA2K85WwAAAAADqwNVAAAACAACAAAAAAAAAAEAAAPA/8AAAAQAAAAAAAOrAAEAAAAAAAAAAAAAAAAAAAALBAAAAAAAAAAAAAAAAgAAAAQAAWIEAAFiBAAA4gQAAOIEAABVBAAAVQQAAOIAAAAAAAoAFAAeAEQAagCqAOoBngJkApoAAQAAAAsAigADAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAA4ArgABAAAAAAABAAcAAAABAAAAAAACAAcAYAABAAAAAAADAAcANgABAAAAAAAEAAcAdQABAAAAAAAFAAsAFQABAAAAAAAGAAcASwABAAAAAAAKABoAigADAAEECQABAA4ABwADAAEECQACAA4AZwADAAEECQADAA4APQADAAEECQAEAA4AfAADAAEECQAFABYAIAADAAEECQAGAA4AUgADAAEECQAKADQApGZjaWNvbnMAZgBjAGkAYwBvAG4Ac1ZlcnNpb24gMS4wAFYAZQByAHMAaQBvAG4AIAAxAC4AMGZjaWNvbnMAZgBjAGkAYwBvAG4Ac2ZjaWNvbnMAZgBjAGkAYwBvAG4Ac1JlZ3VsYXIAUgBlAGcAdQBsAGEAcmZjaWNvbnMAZgBjAGkAYwBvAG4Ac0ZvbnQgZ2VuZXJhdGVkIGJ5IEljb01vb24uAEYAbwBuAHQAIABnAGUAbgBlAHIAYQB0AGUAZAAgAGIAeQAgAEkAYwBvAE0AbwBvAG4ALgAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="},1024:e=>{"use strict";e.exports=t},30314:t=>{"use strict";t.exports=e},55721:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n,r,o,i,a){var c=new Date(0);return c.setUTCFullYear(e,t,n),c.setUTCHours(r,o,i,a),c},e.exports=t.default},25855:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){var r=function(e,t,n){if(n&&!n.code)throw new Error("date-fns-tz error: Please set a language code on the locale object imported from date-fns, e.g. `locale.code = 'en-US'`");return new Intl.DateTimeFormat(n?[n.code,"en-US"]:void 0,{timeZone:t,timeZoneName:e})}(e,n.timeZone,n.locale);return r.formatToParts?function(e,t){for(var n=e.formatToParts(t),r=n.length-1;r>=0;--r)if("timeZoneName"===n[r].type)return n[r].value}(r,t):function(e,t){var n=e.format(t).replace(/\u200E/g,""),r=/ [\w-+ ]+$/.exec(n);return r?r[0].substr(1):""}(r,t)},e.exports=t.default},32734:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){var r,i,d;if(""===e)return 0;if(r=c.timezoneZ.exec(e))return 0;if(r=c.timezoneHH.exec(e))return u(d=parseInt(r[1],10))?-d*a:NaN;if(r=c.timezoneHHMM.exec(e)){d=parseInt(r[1],10);var f=parseInt(r[2],10);return u(d,f)?(i=Math.abs(d)*a+6e4*f,d>0?-i:i):NaN}if(function(e){if(l[e])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:e}),l[e]=!0,!0}catch(e){return!1}}(e)){t=new Date(t||Date.now());var p=n?t:function(e){return(0,o.default)(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())}(t),h=s(p,e),m=n?h:function(e,t,n){var r=e.getTime()-t,o=s(new Date(r),n);if(t===o)return t;r-=o-t;var i=s(new Date(r),n);if(o===i)return o;return Math.max(o,i)}(t,h,e);return-m}return NaN};var r=i(n(2712)),o=i(n(55721));function i(e){return e&&e.__esModule?e:{default:e}}var a=36e5,c={timezone:/([Z+-].*)$/,timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-]\d{2}):?(\d{2})$/};function s(e,t){var n=(0,r.default)(e,t),i=(0,o.default)(n[0],n[1]-1,n[2],n[3]%24,n[4],n[5],0).getTime(),a=e.getTime(),c=a%1e3;return i-(a-=c>=0?c:1e3+c)}function u(e,t){return-23<=e&&e<=23&&(null==t||0<=t&&t<=59)}var l={};e.exports=t.default},7048:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/;t.default=n,e.exports=t.default},2712:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var o=function(e){if(!r[e]){var t=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:"America/New_York",year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(new Date("2014-06-25T04:00:00.123Z")),n="06/25/2014, 00:00:00"===t||"‎06‎/‎25‎/‎2014‎ ‎00‎:‎00‎:‎00"===t;r[e]=n?new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:e,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})}return r[e]}(t);return o.formatToParts?function(e,t){try{for(var r=e.formatToParts(t),o=[],i=0;i<r.length;i++){var a=n[r[i].type];a>=0&&(o[a]=parseInt(r[i].value,10))}return o}catch(e){if(e instanceof RangeError)return[NaN];throw e}}(o,e):function(e,t){var n=e.format(t).replace(/\u200E/g,""),r=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(n);return[r[3],r[1],r[2],r[4],r[5],r[6]]}(o,e)};var n={year:0,month:1,day:2,hour:3,minute:4,second:5};var r={};e.exports=t.default},33826:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(25855)),o=i(n(32734));function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){var n=e?(0,o.default)(e,t,!0)/6e4:t.getTimezoneOffset();if(Number.isNaN(n))throw new RangeError("Invalid time zone specified: "+e);return n}function c(e,t){for(var n=e<0?"-":"",r=Math.abs(e).toString();r.length<t;)r="0"+r;return n+r}function s(e,t){var n=t||"",r=e>0?"-":"+",o=Math.abs(e);return r+c(Math.floor(o/60),2)+n+c(Math.floor(o%60),2)}function u(e,t){return e%60==0?(e>0?"-":"+")+c(Math.abs(e)/60,2):s(e,t)}var l={X:function(e,t,n,r){var o=a(r.timeZone,r._originalDate||e);if(0===o)return"Z";switch(t){case"X":return u(o);case"XXXX":case"XX":return s(o);default:return s(o,":")}},x:function(e,t,n,r){var o=a(r.timeZone,r._originalDate||e);switch(t){case"x":return u(o);case"xxxx":case"xx":return s(o);default:return s(o,":")}},O:function(e,t,n,r){var o=a(r.timeZone,r._originalDate||e);switch(t){case"O":case"OO":case"OOO":return"GMT"+function(e,t){var n=e>0?"-":"+",r=Math.abs(e),o=Math.floor(r/60),i=r%60;if(0===i)return n+String(o);var a=t||"";return n+String(o)+a+c(i,2)}(o,":");default:return"GMT"+s(o,":")}},z:function(e,t,n,o){var i=o._originalDate||e;switch(t){case"z":case"zz":case"zzz":return(0,r.default)("short",i,o);default:return(0,r.default)("long",i,o)}}};t.default=l,e.exports=t.default},56558:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){var a=String(t),s=n||{},u=a.match(c);if(u){var l=(0,i.default)(e,s);a=u.reduce((function(e,t){if("'"===t[0])return e;var n=e.indexOf(t),r="'"===e[n-1],i=e.replace(t,"'"+o.default[t[0]](l,t,null,s)+"'");return r?i.substring(0,n-1)+i.substring(n+1):i}),a)}return(0,r.default)(e,a,s)};var r=a(n(15616)),o=a(n(33826)),i=a(n(21476));function a(e){return e&&e.__esModule?e:{default:e}}var c=/([xXOz]+)|''|'(''|[^'])+('|$)/g;e.exports=t.default},26645:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n,a){var c=(0,r.default)(a);return c.timeZone=t,(0,o.default)((0,i.default)(e,t),n,c)};var r=a(n(46420)),o=a(n(56558)),i=a(n(1132));function a(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},24992:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return-(0,o.default)(e,t)};var r,o=(r=n(32734))&&r.__esModule?r:{default:r};e.exports=t.default},70722:(e,t,n)=>{"use strict";e.exports={format:n(56558),formatInTimeZone:n(26645),getTimezoneOffset:n(24992),toDate:n(21476),utcToZonedTime:n(1132),zonedTimeToUtc:n(68516)}},21476:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");if(null===e)return new Date(NaN);var n=t||{},a=null==n.additionalDigits?2:(0,r.default)(n.additionalDigits);if(2!==a&&1!==a&&0!==a)throw new RangeError("additionalDigits must be 0, 1 or 2");if(e instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e))return new Date(e.getTime());if("number"==typeof e||"[object Number]"===Object.prototype.toString.call(e))return new Date(e);if("string"!=typeof e&&"[object String]"!==Object.prototype.toString.call(e))return new Date(NaN);var c=l(e),s=d(c.date,a),u=s.year,h=s.restDateString,m=f(h,u);if(isNaN(m))return new Date(NaN);if(m){var g,v=m.getTime(),y=0;if(c.time&&(y=p(c.time),isNaN(y)))return new Date(NaN);if(c.timeZone||n.timeZone){if(g=(0,i.default)(c.timeZone||n.timeZone,new Date(v+y)),isNaN(g))return new Date(NaN)}else g=(0,o.default)(new Date(v+y)),g=(0,o.default)(new Date(v+y+g));return new Date(v+y+g)}return new Date(NaN)};var r=c(n(82084)),o=c(n(93561)),i=c(n(32734)),a=c(n(7048));function c(e){return e&&e.__esModule?e:{default:e}}var s=36e5,u={dateTimePattern:/^([0-9W+-]+)(T| )(.*)/,datePattern:/^([0-9W+-]+)(.*)/,plainTime:/:/,YY:/^(\d{2})$/,YYY:[/^([+-]\d{2})$/,/^([+-]\d{3})$/,/^([+-]\d{4})$/],YYYY:/^(\d{4})/,YYYYY:[/^([+-]\d{4})/,/^([+-]\d{5})/,/^([+-]\d{6})/],MM:/^-(\d{2})$/,DDD:/^-?(\d{3})$/,MMDD:/^-?(\d{2})-?(\d{2})$/,Www:/^-?W(\d{2})$/,WwwD:/^-?W(\d{2})-?(\d{1})$/,HH:/^(\d{2}([.,]\d*)?)$/,HHMM:/^(\d{2}):?(\d{2}([.,]\d*)?)$/,HHMMSS:/^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,timeZone:a.default};function l(e){var t,n={},r=u.dateTimePattern.exec(e);if(r?(n.date=r[1],t=r[3]):(r=u.datePattern.exec(e))?(n.date=r[1],t=r[2]):(n.date=null,t=e),t){var o=u.timeZone.exec(t);o?(n.time=t.replace(o[1],""),n.timeZone=o[1].trim()):n.time=t}return n}function d(e,t){var n,r=u.YYY[t],o=u.YYYYY[t];if(n=u.YYYY.exec(e)||o.exec(e)){var i=n[1];return{year:parseInt(i,10),restDateString:e.slice(i.length)}}if(n=u.YY.exec(e)||r.exec(e)){var a=n[1];return{year:100*parseInt(a,10),restDateString:e.slice(a.length)}}return{year:null}}function f(e,t){if(null===t)return null;var n,r,o,i;if(0===e.length)return(r=new Date(0)).setUTCFullYear(t),r;if(n=u.MM.exec(e))return r=new Date(0),y(t,o=parseInt(n[1],10)-1)?(r.setUTCFullYear(t,o),r):new Date(NaN);if(n=u.DDD.exec(e)){r=new Date(0);var a=parseInt(n[1],10);return function(e,t){if(t<1)return!1;var n=v(e);if(n&&t>366)return!1;if(!n&&t>365)return!1;return!0}(t,a)?(r.setUTCFullYear(t,0,a),r):new Date(NaN)}if(n=u.MMDD.exec(e)){r=new Date(0),o=parseInt(n[1],10)-1;var c=parseInt(n[2],10);return y(t,o,c)?(r.setUTCFullYear(t,o,c),r):new Date(NaN)}if(n=u.Www.exec(e))return b(t,i=parseInt(n[1],10)-1)?h(t,i):new Date(NaN);if(n=u.WwwD.exec(e)){i=parseInt(n[1],10)-1;var s=parseInt(n[2],10)-1;return b(t,i,s)?h(t,i,s):new Date(NaN)}return null}function p(e){var t,n,r;if(t=u.HH.exec(e))return w(n=parseFloat(t[1].replace(",",".")))?n%24*s:NaN;if(t=u.HHMM.exec(e))return w(n=parseInt(t[1],10),r=parseFloat(t[2].replace(",",".")))?n%24*s+6e4*r:NaN;if(t=u.HHMMSS.exec(e)){n=parseInt(t[1],10),r=parseInt(t[2],10);var o=parseFloat(t[3].replace(",","."));return w(n,r,o)?n%24*s+6e4*r+1e3*o:NaN}return null}function h(e,t,n){t=t||0,n=n||0;var r=new Date(0);r.setUTCFullYear(e,0,4);var o=7*t+n+1-(r.getUTCDay()||7);return r.setUTCDate(r.getUTCDate()+o),r}var m=[31,28,31,30,31,30,31,31,30,31,30,31],g=[31,29,31,30,31,30,31,31,30,31,30,31];function v(e){return e%400==0||e%4==0&&e%100!=0}function y(e,t,n){if(t<0||t>11)return!1;if(null!=n){if(n<1)return!1;var r=v(e);if(r&&n>g[t])return!1;if(!r&&n>m[t])return!1}return!0}function b(e,t,n){return!(t<0||t>52)&&(null==n||!(n<0||n>6))}function w(e,t,n){return(null==e||!(e<0||e>=25))&&((null==t||!(t<0||t>=60))&&(null==n||!(n<0||n>=60)))}e.exports=t.default},1132:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){var i=(0,o.default)(e,n),a=(0,r.default)(t,i,!0),c=new Date(i.getTime()-a),s=new Date(0);return s.setFullYear(c.getUTCFullYear(),c.getUTCMonth(),c.getUTCDate()),s.setHours(c.getUTCHours(),c.getUTCMinutes(),c.getUTCSeconds(),c.getUTCMilliseconds()),s};var r=i(n(32734)),o=i(n(21476));function i(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},68516:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){if("string"==typeof e&&!e.match(i.default)){var s=(0,r.default)(n);return s.timeZone=t,(0,o.default)(e,s)}var u=(0,o.default)(e,n),l=(0,c.default)(u.getFullYear(),u.getMonth(),u.getDate(),u.getHours(),u.getMinutes(),u.getSeconds(),u.getMilliseconds()).getTime(),d=(0,a.default)(t,new Date(l));return new Date(l+d)};var r=s(n(46420)),o=s(n(21476)),i=s(n(7048)),a=s(n(32734)),c=s(n(55721));function s(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},71298:e=>{e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.__esModule=!0,e.exports.default=e.exports},38088:e=>{e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports},87462:(e,t,n)=>{"use strict";function r(){return r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},r.apply(this,arguments)}n.d(t,{Z:()=>r})},88911:(e,t,n)=>{"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,{Z:()=>r})},83029:(e,t,n)=>{"use strict";function r(e){if(Array.isArray(e))return e}n.d(t,{Z:()=>r})},11259:(e,t,n)=>{"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,{Z:()=>r})},44822:(e,t,n)=>{"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function o(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}n.d(t,{Z:()=>o})},46927:(e,t,n)=>{"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,{Z:()=>r})},3640:(e,t,n)=>{"use strict";function r(){return r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},r.apply(this,arguments)}n.d(t,{Z:()=>r})},19241:(e,t,n)=>{"use strict";function r(e){return r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},r(e)}n.d(t,{Z:()=>r})},32208:(e,t,n)=>{"use strict";function r(e,t){return r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},r(e,t)}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}n.d(t,{Z:()=>o})},72753:(e,t,n)=>{"use strict";function r(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}n.d(t,{Z:()=>r})},56265:(e,t,n)=>{"use strict";function r(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(t,{Z:()=>r})},8486:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(46927);function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}},56315:(e,t,n)=>{"use strict";function r(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}n.d(t,{Z:()=>r})},99357:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(73891);function o(e,t){if(t&&("object"===(0,r.Z)(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}},68957:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(83029);var o=n(61917),i=n(56265);function a(e,t){return(0,r.Z)(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,c=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){c=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(c)throw o}}return i}}(e,t)||(0,o.Z)(e,t)||(0,i.Z)()}},91411:(e,t,n)=>{"use strict";function r(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}n.d(t,{Z:()=>r})},45915:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(88911);var o=n(72753),i=n(61917);function a(e){return function(e){if(Array.isArray(e))return(0,r.Z)(e)}(e)||(0,o.Z)(e)||(0,i.Z)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},73891:(e,t,n)=>{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}n.d(t,{Z:()=>r})},61917:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(88911);function o(e,t){if(e){if("string"==typeof e)return(0,r.Z)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?(0,r.Z)(e,t):void 0}}}},i={};function a(e){var t=i[e];if(void 0!==t)return t.exports;var n=i[e]={id:e,loaded:!1,exports:{}};return o[e].call(n.exports,n,n.exports,a),n.loaded=!0,n.exports}a.m=o,a.amdD=function(){throw new Error("define cannot be used indirect")},a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.f={},a.e=e=>Promise.all(Object.keys(a.f).reduce(((t,n)=>(a.f[n](e,t),t)),[])),a.u=e=>288===e?"chunk-ckeditor.a33f04bebbca8a2c1b18.js":"chunk-"+({85:"code-editor",198:"vendor-fontawesome",614:"vendor-icons",877:"vendor-libphonenumber-js"}[e]||e)+"."+{85:"7292db136075fbf07fda",198:"97ac4a852bd9a61298d3",414:"92d4d9c8e30bb8ce3835",614:"602b08a5027a59b076d3",759:"7aa09f3c0f32bbc5fe3a",817:"32a024d3c7e2fc5be22e",877:"d0e1a624b281ea60375f",909:"7cc6eb29ce4023a06dd0"}[e]+".js",a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),a.hmd=e=>((e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e),a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n={},r="tocco-legacy-bundle:",a.l=(e,t,o,i)=>{if(n[e])n[e].push(t);else{var c,s;if(void 0!==o)for(var u=document.getElementsByTagName("script"),l=0;l<u.length;l++){var d=u[l];if(d.getAttribute("src")==e||d.getAttribute("data-webpack")==r+o){c=d;break}}c||(s=!0,(c=document.createElement("script")).charset="utf-8",c.timeout=120,a.nc&&c.setAttribute("nonce",a.nc),c.setAttribute("data-webpack",r+o),c.src=e),n[e]=[t];var f=(t,r)=>{c.onerror=c.onload=null,clearTimeout(p);var o=n[e];if(delete n[e],c.parentNode&&c.parentNode.removeChild(c),o&&o.forEach((e=>e(r))),t)return t(r)},p=setTimeout(f.bind(null,void 0,{type:"timeout",target:c}),12e4);c.onerror=f.bind(null,c.onerror),c.onload=f.bind(null,c.onload),s&&document.head.appendChild(c)}},a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),a.j=713,a.p="/",(()=>{a.b=document.baseURI||self.location.href;var e={713:0};a.f.j=(t,n)=>{var r=a.o(e,t)?e[t]:void 0;if(0!==r)if(r)n.push(r[2]);else{var o=new Promise(((n,o)=>r=e[t]=[n,o]));n.push(r[2]=o);var i=a.p+a.u(t),c=new Error;a.l(i,(n=>{if(a.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var o=n&&("load"===n.type?"missing":n.type),i=n&&n.target&&n.target.src;c.message="Loading chunk "+t+" failed.\n("+o+": "+i+")",c.name="ChunkLoadError",c.type=o,c.request=i,r[1](c)}}),"chunk-"+t,t)}};var t=(t,n)=>{var r,o,[i,c,s]=n,u=0;if(i.some((t=>0!==e[t]))){for(r in c)a.o(c,r)&&(a.m[r]=c[r]);if(s)s(a)}for(t&&t(n);u<i.length;u++)o=i[u],a.o(e,o)&&e[o]&&e[o][0](),e[o]=0},n=self.webpackChunktocco_legacy_bundle=self.webpackChunktocco_legacy_bundle||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})(),a.nc=void 0;var c={};return(()=>{"use strict";a.r(c);var e={};a.r(e),a.d(e,{ACTION_INVOKE:()=>Lg,ACTION_INVOKED:()=>Ug,ACTION_IN_PROGRESS:()=>Hg,actionInvoke:()=>zg,actionInvoked:()=>Wg});var t={};a.r(t),a.d(t,{focusErrorField:()=>Ax,focusField:()=>bx,formInitialValueSelector:()=>yx,getCurrentEntityState:()=>Ox,getEntityForSubmit:()=>Cx,getFormErrors:()=>wx,handleInvalidForm:()=>Ex,handleSubmitError:()=>kx,touchAllFields:()=>xx});var n={};a.r(n),a.d(n,{asyncValidationStop:()=>Ix,autoComplete:()=>Tx,default:()=>jx,onChange:()=>Rx});var r={};a.r(r),a.d(r,{useAsyncValidation:()=>RI,useFormEvents:()=>II,useSyncValidation:()=>TI});var o,i,s=a(55954),u=a(45697),l=a.n(u),d=a(50600),f=a(22731),p=a(19743),h=a(45430),m=a(27023),g=a(73665),v=a(91411),y=a(76538),b=a(58804),w=a(24875),A=a(30759),x=a(7281),E=w.FS.color("secondaryLight"),O=w.FS.color("paper"),C=w.FS.color("secondary"),k=(0,b.vJ)(o||(o=(0,v.Z)(["\n .react-datepicker-popper {\n && {\n z-index: 5;\n margin: 0;\n }\n }\n\n .react-datepicker {\n && {\n * {\n box-sizing: content-box; // prevent box-sizing problems in widgets\n }\n border-radius: 0;\n border: 1px solid ",";\n ","\n\n .react-datepicker__header {\n ","\n border-radius: 0;\n background-color: ",";\n padding-bottom: 0;\n }\n\n .react-datepicker__navigation {\n top: 3px;\n }\n\n .react-datepicker__navigation--previous,\n .react-datepicker__navigation--next {\n margin-top: ",";\n }\n ","\n\n .react-datepicker__year-read-view--down-arrow,\n .react-datepicker__month-read-view--down-arrow,\n .react-datepicker__month-year-read-view--down-arrow,\n .react-datepicker__navigation-icon:before {\n border-color: "," !important;\n border-width: 1.5px 1.5px 0 0;\n }\n\n .react-datepicker__header__dropdown {\n font-size: ",";\n\n /* decrease padding to prevent overflow on small screens */\n @media only screen and (max-width: 480px) {\n font-size: ",";\n }\n }\n\n .react-datepicker__current-month {\n ","\n }\n\n .react-datepicker__day-name {\n color: ",";\n font-size: ",";\n }\n\n .react-datepicker__day,\n .react-datepicker__day-name {\n border: 1px solid transparent;\n padding: ",";\n outline: none;\n\n /* decrease padding to prevent overflow on small screens */\n @media only screen and (max-width: 480px) {\n padding: ",";\n }\n }\n\n .react-datepicker__day--selected {\n background-color: ",";\n border-color: ",";\n border-radius: 50%;\n\n &:focus {\n border-color: ",";\n background-color: ",";\n }\n }\n\n .react-datepicker__day--keyboard-selected {\n background-color: ",";\n border-color: ",";\n border-radius: 50%;\n }\n\n .react-datepicker__day--today,\n .react-datepicker__month-text--today,\n .react-datepicker__quarter-text--today,\n .react-datepicker__year-text--today {\n border-radius: 50%;\n border-color: ",";\n }\n\n .react-datepicker__today-button {\n ","\n background-color: ",";\n border-top: 0;\n padding-bottom: ",";\n padding-top: 0;\n\n &:hover > button {\n background-color: ",";\n }\n }\n\n .react-datepicker__input-time-container {\n display: flex;\n justify-content: center;\n margin: 5px 0;\n\n .react-datepicker-time__input {\n margin: 0;\n\n input {\n text-align: center;\n }\n }\n }\n\n .react-datepicker__header__dropdown.react-datepicker__header__dropdown--scroll {\n width: 190px;\n margin: 8px auto 0;\n display: grid;\n grid-template-columns: 100px 85px;\n }\n\n .react-datepicker__month-read-view,\n .react-datepicker__year-read-view {\n color: ",";\n visibility: visible !important;\n }\n\n .react-datepicker__year-option,\n .react-datepicker__month-option,\n .react-datepicker__month-year-option {\n font-size: ",";\n }\n\n .react-datepicker__year-option:first-of-type,\n .react-datepicker__month-option:first-of-type,\n .react-datepicker__month-year-option:first-of-type,\n .react-datepicker__year-option:last-of-type,\n .react-datepicker__month-option:last-of-type,\n .react-datepicker__month-year-option:last-of-type {\n border-radius: 0;\n }\n\n .react-datepicker__year-read-view--down-arrow,\n .react-datepicker__month-read-view--down-arrow,\n .react-datepicker__month-year-read-view--down-arrow {\n top: 6px;\n right: -10px;\n width: 5px;\n height: 5px;\n\n /* decrease padding to prevent overflow on small screens */\n @media only screen and (max-width: 480px) {\n right: -8px;\n }\n }\n\n .react-datepicker__year-read-view--down-arrow {\n right: -4px;\n\n /* decrease padding to prevent overflow on small screens */\n @media only screen and (max-width: 480px) {\n right: 3px;\n }\n }\n\n .react-datepicker__day:hover,\n .react-datepicker__month-text:hover,\n .react-datepicker__quarter-text:hover,\n .react-datepicker__year-text:hover {\n border-color: ",";\n background-color: ",";\n border-radius: 50%;\n color: ",";\n }\n\n .react-datepicker__year-dropdown {\n left: 40%;\n top: 45px;\n }\n\n .react-datepicker__navigation--years-upcoming:before {\n border-width: 1.5px 1.5px 0 0;\n border-color: ",";\n border-style: solid;\n content: '';\n display: block;\n position: absolute;\n top: 8px;\n left: 12px;\n height: 5px;\n width: 5px;\n transform: rotate(-45deg);\n }\n\n .react-datepicker__navigation--years-previous:before {\n border-width: 1.5px 1.5px 0 0;\n border-color: ",";\n border-style: solid;\n content: '';\n display: block;\n position: absolute;\n top: 6px;\n left: 12px;\n height: 5px;\n width: 5px;\n transform: rotate(135deg);\n }\n\n .react-datepicker__year-dropdown,\n .react-datepicker__month-dropdown,\n .react-datepicker__month-year-dropdown {\n background-color: ",";\n border-radius: 0;\n border-color: ",";\n box-shadow: 0 0 5px rgb(0 0 0 / 30%);\n }\n\n .react-datepicker__year-option:hover,\n .react-datepicker__month-option:hover,\n .react-datepicker__month-year-option:hover {\n background-color: ",";\n }\n\n .react-datepicker__month-option--selected {\n left: 10px;\n }\n\n .react-datepicker__day--outside-month {\n color: ",";\n }\n }\n }\n"])),E,(0,A.Z)(),(0,A.Z)(),E,x.Z.space(-.6),"\n .react-datepicker__current-month.react-datepicker__current-month--hasYearDropdown.react-datepicker__current-month--hasMonthDropdown {\n // Avoid showing the month and year a second time when it has month and year dropdowns.\n display: none;\n }\n",O,x.Z.font(2.85),x.Z.font(1.8),(0,A.Z)({fontWeight:w.FS.fontWeight("bold")}),O,x.Z.font(-2),x.Z.space(-.6),x.Z.space(-1.2),C,C,C,E,E,E,C,(0,A.Z)(),O,x.Z.space(-.5),(function(e){var t=e.theme;return(0,y._j)(.1,t.colors.paper)}),O,x.Z.font(0),E,E,O,w.FS.color("text"),w.FS.color("text"),O,E,(function(e){var t=e.theme;return(0,y._j)(.1,t.colors.paper)}),(function(e){var t=e.theme;return(0,y.$n)(.7,t.colors.text)})),S=a(85893);const D=function(){return(0,S.jsx)(S.Fragment,{children:i||(i=(0,S.jsx)(k,{}))})};var P=a(74806),_=a(50558),j=a(63038),T=a.n(j),R=a(1024),I=a.n(R),M=a(30314),N=a.n(M),B=a(88162),Z=a(50258),F=a(59713),L=a.n(F),H=a(35997),U=a(319),z=a.n(U),W=16,V=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!e)return t;e=Y(e);var n=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return n?{r:parseInt(n[1],W),g:parseInt(n[2],W),b:parseInt(n[3],W)}:t},Y=function(e){return e.startsWith("#")||(e="#"+e),e.padEnd(7,"0")},q=function(e){var t=e/255;return t<=.03928?t/=12.92:t=Math.pow((t+.055)/1.055,2.4),t},G=function(e){return.2126*q(e.r)+.7152*q(e.g)+.0722*q(e.b)};const Q=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"#FFFFFF",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"#000000",r=V(e);return r&&G(r)>.25?n:t},X=Object.freeze({EXISTING:"existing",ACCEPTED:"accepted",NONE:"none"});function K(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function $(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?K(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):K(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var J=function(e,t){return e+t},ee=function(e){return e.map((function(e){return{title:e.label,id:J(e.key,e.model),entityKey:e.key,calendarType:e.calendarType,entityModel:e.model}}))},te=a(69100),ne=a.n(te),re=function(e,t){return re=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},re(e,t)};function oe(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}re(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var ie=function(){return ie=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},ie.apply(this,arguments)};Object.create;function ae(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}Object.create;("undefined"!=typeof globalThis?globalThis:window).FullCalendarVDom={Component:R.Component,createElement:R.createElement,render:M.render,createRef:R.createRef,Fragment:R.Fragment,createContext:R.createContext,createPortal:M.createPortal,flushSync:function(e){e()},unmountComponentAtNode:M.unmountComponentAtNode};var ce=a(93379),se=a.n(ce),ue=a(7795),le=a.n(ue),de=a(90569),fe=a.n(de),pe=a(3565),he=a.n(pe),me=a(19216),ge=a.n(me),ve=a(44589),ye=a.n(ve),be=a(33440),we={};we.styleTagTransform=ye(),we.setAttributes=he(),we.insert=fe().bind(null,"head"),we.domAPI=le(),we.insertStyleElement=ge();se()(be.Z,we);be.Z&&be.Z.locals&&be.Z.locals;if("undefined"==typeof FullCalendarVDom)throw new Error("Please import the top-level fullcalendar lib before attempting to import a plugin.");var Ae=FullCalendarVDom.Component,xe=FullCalendarVDom.createElement,Ee=(FullCalendarVDom.render,FullCalendarVDom.createRef),Oe=FullCalendarVDom.Fragment,Ce=FullCalendarVDom.createContext,ke=FullCalendarVDom.createPortal,Se=FullCalendarVDom.flushSync,De=(FullCalendarVDom.unmountComponentAtNode,function(){function e(e,t){this.context=e,this.internalEventSource=t}return e.prototype.remove=function(){this.context.dispatch({type:"REMOVE_EVENT_SOURCE",sourceId:this.internalEventSource.sourceId})},e.prototype.refetch=function(){this.context.dispatch({type:"FETCH_EVENT_SOURCES",sourceIds:[this.internalEventSource.sourceId],isRefetch:!0})},Object.defineProperty(e.prototype,"id",{get:function(){return this.internalEventSource.publicId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"url",{get:function(){return this.internalEventSource.meta.url},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"format",{get:function(){return this.internalEventSource.meta.format},enumerable:!1,configurable:!0}),e}());function Pe(e){e.parentNode&&e.parentNode.removeChild(e)}function _e(e,t){if(e.closest)return e.closest(t);if(!document.documentElement.contains(e))return null;do{if(je(e,t))return e;e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType);return null}function je(e,t){return(e.matches||e.matchesSelector||e.msMatchesSelector).call(e,t)}function Te(e,t){for(var n=e instanceof HTMLElement?[e]:e,r=[],o=0;o<n.length;o+=1)for(var i=n[o].querySelectorAll(t),a=0;a<i.length;a+=1)r.push(i[a]);return r}var Re=/(top|left|right|bottom|width|height)$/i;function Ie(e,t){for(var n in t)Me(e,n,t[n])}function Me(e,t,n){null==n?e.style[t]="":"number"==typeof n&&Re.test(t)?e.style[t]=n+"px":e.style[t]=n}function Ne(e){var t,n;return null!==(n=null===(t=e.composedPath)||void 0===t?void 0:t.call(e)[0])&&void 0!==n?n:e.target}function Be(e){return e.getRootNode?e.getRootNode():document}var Ze=0;function Fe(){return"fc-dom-"+(Ze+=1)}function Le(e){e.preventDefault()}function He(e,t,n,r){var o=function(e,t){return function(n){var r=_e(n.target,e);r&&t.call(r,n,r)}}(n,r);return e.addEventListener(t,o),function(){e.removeEventListener(t,o)}}var Ue=["webkitTransitionEnd","otransitionend","oTransitionEnd","msTransitionEnd","transitionend"];function ze(e){return{tabIndex:0,onKeyDown:function(t){"Enter"!==t.key&&" "!==t.key||(e(t),t.preventDefault())}}}var We=0;function Ve(){return String(We+=1)}function Ye(){document.body.classList.add("fc-not-allowed")}function qe(){document.body.classList.remove("fc-not-allowed")}function Ge(e){var t,n,r=[],o=[];for("string"==typeof e?o=e.split(/\s*,\s*/):"function"==typeof e?o=[e]:Array.isArray(e)&&(o=e),t=0;t<o.length;t+=1)"string"==typeof(n=o[t])?r.push("-"===n.charAt(0)?{field:n.substring(1),order:-1}:{field:n,order:1}):"function"==typeof n&&r.push({func:n});return r}function Qe(e,t,n){var r,o;for(r=0;r<n.length;r+=1)if(o=Xe(e,t,n[r]))return o;return 0}function Xe(e,t,n){return n.func?n.func(e,t):Ke(e[n.field],t[n.field])*(n.order||1)}function Ke(e,t){return e||t?null==t?-1:null==e?1:"string"==typeof e||"string"==typeof t?String(e).localeCompare(String(t)):e-t:0}function $e(e,t){var n=String(e);return"000".substr(0,t-n.length)+n}function Je(e,t,n){return"function"==typeof e?e.apply(void 0,t):"string"==typeof e?t.reduce((function(e,t,n){return e.replace("$"+n,t||"")}),e):n}function et(e,t){return e-t}function tt(e){return e%1==0}function nt(e){var t=e.querySelector(".fc-scrollgrid-shrink-frame"),n=e.querySelector(".fc-scrollgrid-shrink-cushion");if(!t)throw new Error("needs fc-scrollgrid-shrink-frame className");if(!n)throw new Error("needs fc-scrollgrid-shrink-cushion className");return e.getBoundingClientRect().width-t.getBoundingClientRect().width+n.getBoundingClientRect().width}var rt=["sun","mon","tue","wed","thu","fri","sat"];function ot(e,t){var n=pt(e);return n[2]+=t,ht(n)}function it(e,t){var n=pt(e);return n[6]+=t,ht(n)}function at(e,t){return(t.valueOf()-e.valueOf())/864e5}function ct(e,t){return gt(e)===gt(t)?Math.round(at(e,t)):null}function st(e){return ht([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()])}function ut(e,t,n,r){var o=ht([t,0,1+lt(t,n,r)]),i=st(e),a=Math.round(at(o,i));return Math.floor(a/7)+1}function lt(e,t,n){var r=7+t-n;return-((7+ht([e,0,r]).getUTCDay()-t)%7)+r-1}function dt(e){return[e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()]}function ft(e){return new Date(e[0],e[1]||0,null==e[2]?1:e[2],e[3]||0,e[4]||0,e[5]||0)}function pt(e){return[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()]}function ht(e){return 1===e.length&&(e=e.concat([0])),new Date(Date.UTC.apply(Date,e))}function mt(e){return!isNaN(e.valueOf())}function gt(e){return 1e3*e.getUTCHours()*60*60+1e3*e.getUTCMinutes()*60+1e3*e.getUTCSeconds()+e.getUTCMilliseconds()}function vt(e,t,n,r){return{instanceId:Ve(),defId:e,range:t,forcedStartTzo:null==n?null:n,forcedEndTzo:null==r?null:r}}var yt=Object.prototype.hasOwnProperty;function bt(e,t){var n={};if(t)for(var r in t){for(var o=[],i=e.length-1;i>=0;i-=1){var a=e[i][r];if("object"==typeof a&&a)o.unshift(a);else if(void 0!==a){n[r]=a;break}}o.length&&(n[r]=bt(o))}for(i=e.length-1;i>=0;i-=1){var c=e[i];for(var s in c)s in n||(n[s]=c[s])}return n}function wt(e,t){var n={};for(var r in e)t(e[r],r)&&(n[r]=e[r]);return n}function At(e,t){var n={};for(var r in e)n[r]=t(e[r],r);return n}function xt(e){for(var t={},n=0,r=e;n<r.length;n++){t[r[n]]=!0}return t}function Et(e){var t=[];for(var n in e)t.push(e[n]);return t}function Ot(e,t){if(e===t)return!0;for(var n in e)if(yt.call(e,n)&&!(n in t))return!1;for(var n in t)if(yt.call(t,n)&&e[n]!==t[n])return!1;return!0}function Ct(e,t){var n=[];for(var r in e)yt.call(e,r)&&(r in t||n.push(r));for(var r in t)yt.call(t,r)&&e[r]!==t[r]&&n.push(r);return n}function kt(e,t,n){if(void 0===n&&(n={}),e===t)return!0;for(var r in t)if(!(r in e)||!St(e[r],t[r],n[r]))return!1;for(var r in e)if(!(r in t))return!1;return!0}function St(e,t,n){return e===t||!0===n||!!n&&n(e,t)}function Dt(e,t,n,r){void 0===t&&(t=0),void 0===r&&(r=1);var o=[];null==n&&(n=Object.keys(e).length);for(var i=t;i<n;i+=r){var a=e[i];void 0!==a&&o.push(a)}return o}function Pt(e,t,n){var r=n.dateEnv,o=n.pluginHooks,i=n.options,a=e.defs,c=e.instances;for(var s in c=wt(c,(function(e){return!a[e.defId].recurringDef})),a){var u=a[s];if(u.recurringDef){var l=u.recurringDef.duration;l||(l=u.allDay?i.defaultAllDayEventDuration:i.defaultTimedEventDuration);for(var d=0,f=_t(u,l,t,r,o.recurringTypes);d<f.length;d++){var p=f[d],h=vt(s,{start:p,end:r.add(p,l)});c[h.instanceId]=h}}}return{defs:a,instances:c}}function _t(e,t,n,r,o){var i=o[e.recurringDef.typeId].expand(e.recurringDef.typeData,{start:r.subtract(n.start,t),end:n.end},r);return e.allDay&&(i=i.map(st)),i}var jt=["years","months","days","milliseconds"],Tt=/^(-?)(?:(\d+)\.)?(\d+):(\d\d)(?::(\d\d)(?:\.(\d\d\d))?)?/;function Rt(e,t){var n;return"string"==typeof e?function(e){var t=Tt.exec(e);if(t){var n=t[1]?-1:1;return{years:0,months:0,days:n*(t[2]?parseInt(t[2],10):0),milliseconds:n*(60*(t[3]?parseInt(t[3],10):0)*60*1e3+60*(t[4]?parseInt(t[4],10):0)*1e3+1e3*(t[5]?parseInt(t[5],10):0)+(t[6]?parseInt(t[6],10):0))}}return null}(e):"object"==typeof e&&e?It(e):"number"==typeof e?It(((n={})[t||"milliseconds"]=e,n)):null}function It(e){var t={years:e.years||e.year||0,months:e.months||e.month||0,days:e.days||e.day||0,milliseconds:60*(e.hours||e.hour||0)*60*1e3+60*(e.minutes||e.minute||0)*1e3+1e3*(e.seconds||e.second||0)+(e.milliseconds||e.millisecond||e.ms||0)},n=e.weeks||e.week;return n&&(t.days+=7*n,t.specifiedWeeks=!0),t}function Mt(e){return e.years||e.months||e.milliseconds?0:e.days}function Nt(e){return Bt(e)/864e5}function Bt(e){return 31536e6*e.years+2592e6*e.months+864e5*e.days+e.milliseconds}function Zt(e,t){for(var n=null,r=0;r<jt.length;r+=1){var o=jt[r];if(t[o]){var i=e[o]/t[o];if(!tt(i)||null!==n&&n!==i)return null;n=i}else if(e[o])return null}return n}function Ft(e){var t=e.milliseconds;if(t){if(t%1e3!=0)return{unit:"millisecond",value:t};if(t%6e4!=0)return{unit:"second",value:t/1e3};if(t%36e5!=0)return{unit:"minute",value:t/6e4};if(t)return{unit:"hour",value:t/36e5}}return e.days?e.specifiedWeeks&&e.days%7==0?{unit:"week",value:e.days/7}:{unit:"day",value:e.days}:e.months?{unit:"month",value:e.months}:e.years?{unit:"year",value:e.years}:{unit:"millisecond",value:0}}function Lt(e,t,n){void 0===n&&(n=!1);var r=e.toISOString();return r=r.replace(".000",""),n&&(r=r.replace("T00:00:00Z","")),r.length>10&&(null==t?r=r.replace("Z",""):0!==t&&(r=r.replace("Z",Ut(t,!0)))),r}function Ht(e){return e.toISOString().replace(/T.*$/,"")}function Ut(e,t){void 0===t&&(t=!1);var n=e<0?"-":"+",r=Math.abs(e),o=Math.floor(r/60),i=Math.round(r%60);return t?n+$e(o,2)+":"+$e(i,2):"GMT"+n+o+(i?":"+$e(i,2):"")}function zt(e,t,n){if(e===t)return!0;var r,o=e.length;if(o!==t.length)return!1;for(r=0;r<o;r+=1)if(!(n?n(e[r],t[r]):e[r]===t[r]))return!1;return!0}function Wt(e,t,n){var r,o;return function(){for(var i=[],a=0;a<arguments.length;a++)i[a]=arguments[a];if(r){if(!zt(r,i)){n&&n(o);var c=e.apply(this,i);t&&t(c,o)||(o=c)}}else o=e.apply(this,i);return r=i,o}}function Vt(e,t,n){var r,o,i=this;return function(a){if(r){if(!Ot(r,a)){n&&n(o);var c=e.call(i,a);t&&t(c,o)||(o=c)}}else o=e.call(i,a);return r=a,o}}function Yt(e,t,n){var r=this,o=[],i=[];return function(a){for(var c=o.length,s=a.length,u=0;u<c;u+=1)if(a[u]){if(!zt(o[u],a[u])){n&&n(i[u]);var l=e.apply(r,a[u]);t&&t(l,i[u])||(i[u]=l)}}else n&&n(i[u]);for(;u<s;u+=1)i[u]=e.apply(r,a[u]);return o=a,i.splice(s),i}}function qt(e,t,n){var r=this,o={},i={};return function(a){var c={};for(var s in a)if(i[s])if(zt(o[s],a[s]))c[s]=i[s];else{n&&n(i[s]);var u=e.apply(r,a[s]);c[s]=t&&t(u,i[s])?i[s]:u}else c[s]=e.apply(r,a[s]);return o=a,i=c,c}}var Gt={week:3,separator:0,omitZeroMinute:0,meridiem:0,omitCommas:0},Qt={timeZoneName:7,era:6,year:5,month:4,day:2,weekday:2,hour:1,minute:1,second:1},Xt=/\s*([ap])\.?m\.?/i,Kt=/,/g,$t=/\s+/g,Jt=/\u200e/g,en=/UTC|GMT/,tn=function(){function e(e){var t={},n={},r=0;for(var o in e)o in Gt?(n[o]=e[o],r=Math.max(Gt[o],r)):(t[o]=e[o],o in Qt&&(r=Math.max(Qt[o],r)));this.standardDateProps=t,this.extendedSettings=n,this.severity=r,this.buildFormattingFunc=Wt(nn)}return e.prototype.format=function(e,t){return this.buildFormattingFunc(this.standardDateProps,this.extendedSettings,t)(e)},e.prototype.formatRange=function(e,t,n,r){var o=this.standardDateProps,i=this.extendedSettings,a=function(e,t,n){if(n.getMarkerYear(e)!==n.getMarkerYear(t))return 5;if(n.getMarkerMonth(e)!==n.getMarkerMonth(t))return 4;if(n.getMarkerDay(e)!==n.getMarkerDay(t))return 2;if(gt(e)!==gt(t))return 1;return 0}(e.marker,t.marker,n.calendarSystem);if(!a)return this.format(e,n);var c=a;!(c>1)||"numeric"!==o.year&&"2-digit"!==o.year||"numeric"!==o.month&&"2-digit"!==o.month||"numeric"!==o.day&&"2-digit"!==o.day||(c=1);var s=this.format(e,n),u=this.format(t,n);if(s===u)return s;var l=function(e,t){var n={};for(var r in e)(!(r in Qt)||Qt[r]<=t)&&(n[r]=e[r]);return n}(o,c),d=nn(l,i,n),f=d(e),p=d(t),h=function(e,t,n,r){var o=0;for(;o<e.length;){var i=e.indexOf(t,o);if(-1===i)break;var a=e.substr(0,i);o=i+t.length;for(var c=e.substr(o),s=0;s<n.length;){var u=n.indexOf(r,s);if(-1===u)break;var l=n.substr(0,u);s=u+r.length;var d=n.substr(s);if(a===l&&c===d)return{before:a,after:c}}}return null}(s,f,u,p),m=i.separator||r||n.defaultSeparator||"";return h?h.before+f+m+p+h.after:s+m+u},e.prototype.getLargestUnit=function(){switch(this.severity){case 7:case 6:case 5:return"year";case 4:return"month";case 3:return"week";case 2:return"day";default:return"time"}},e}();function nn(e,t,n){var r=Object.keys(e).length;return 1===r&&"short"===e.timeZoneName?function(e){return Ut(e.timeZoneOffset)}:0===r&&t.week?function(e){return function(e,t,n,r,o){var i=[];"long"===o?i.push(n):"short"!==o&&"narrow"!==o||i.push(t);"long"!==o&&"short"!==o||i.push(" ");i.push(r.simpleNumberFormat.format(e)),"rtl"===r.options.direction&&i.reverse();return i.join("")}(n.computeWeekNumber(e.marker),n.weekText,n.weekTextLong,n.locale,t.week)}:function(e,t,n){e=ie({},e),t=ie({},t),function(e,t){e.timeZoneName&&(e.hour||(e.hour="2-digit"),e.minute||(e.minute="2-digit"));"long"===e.timeZoneName&&(e.timeZoneName="short");t.omitZeroMinute&&(e.second||e.millisecond)&&delete t.omitZeroMinute}(e,t),e.timeZone="UTC";var r,o=new Intl.DateTimeFormat(n.locale.codes,e);if(t.omitZeroMinute){var i=ie({},e);delete i.minute,r=new Intl.DateTimeFormat(n.locale.codes,i)}return function(i){var a=i.marker;return function(e,t,n,r,o){e=e.replace(Jt,""),"short"===n.timeZoneName&&(e=function(e,t){var n=!1;e=e.replace(en,(function(){return n=!0,t})),n||(e+=" "+t);return e}(e,"UTC"===o.timeZone||null==t.timeZoneOffset?"UTC":Ut(t.timeZoneOffset)));r.omitCommas&&(e=e.replace(Kt,"").trim());r.omitZeroMinute&&(e=e.replace(":00",""));!1===r.meridiem?e=e.replace(Xt,"").trim():"narrow"===r.meridiem?e=e.replace(Xt,(function(e,t){return t.toLocaleLowerCase()})):"short"===r.meridiem?e=e.replace(Xt,(function(e,t){return t.toLocaleLowerCase()+"m"})):"lowercase"===r.meridiem&&(e=e.replace(Xt,(function(e){return e.toLocaleLowerCase()})));return e=(e=e.replace($t," ")).trim()}((r&&!a.getUTCMinutes()?r:o).format(a),i,e,t,n)}}(e,t,n)}function rn(e,t){var n=t.markerToArray(e.marker);return{marker:e.marker,timeZoneOffset:e.timeZoneOffset,array:n,year:n[0],month:n[1],day:n[2],hour:n[3],minute:n[4],second:n[5],millisecond:n[6]}}function on(e,t,n,r){var o=rn(e,n.calendarSystem);return{date:o,start:o,end:t?rn(t,n.calendarSystem):null,timeZone:n.timeZone,localeCodes:n.locale.codes,defaultSeparator:r||n.defaultSeparator}}var an=function(){function e(e){this.cmdStr=e}return e.prototype.format=function(e,t,n){return t.cmdFormatter(this.cmdStr,on(e,null,t,n))},e.prototype.formatRange=function(e,t,n,r){return n.cmdFormatter(this.cmdStr,on(e,t,n,r))},e}(),cn=function(){function e(e){this.func=e}return e.prototype.format=function(e,t,n){return this.func(on(e,null,t,n))},e.prototype.formatRange=function(e,t,n,r){return this.func(on(e,t,n,r))},e}();function sn(e){return"object"==typeof e&&e?new tn(e):"string"==typeof e?new an(e):"function"==typeof e?new cn(e):null}var un={navLinkDayClick:yn,navLinkWeekClick:yn,duration:Rt,bootstrapFontAwesome:yn,buttonIcons:yn,customButtons:yn,defaultAllDayEventDuration:Rt,defaultTimedEventDuration:Rt,nextDayThreshold:Rt,scrollTime:Rt,scrollTimeReset:Boolean,slotMinTime:Rt,slotMaxTime:Rt,dayPopoverFormat:sn,slotDuration:Rt,snapDuration:Rt,headerToolbar:yn,footerToolbar:yn,defaultRangeSeparator:String,titleRangeSeparator:String,forceEventDuration:Boolean,dayHeaders:Boolean,dayHeaderFormat:sn,dayHeaderClassNames:yn,dayHeaderContent:yn,dayHeaderDidMount:yn,dayHeaderWillUnmount:yn,dayCellClassNames:yn,dayCellContent:yn,dayCellDidMount:yn,dayCellWillUnmount:yn,initialView:String,aspectRatio:Number,weekends:Boolean,weekNumberCalculation:yn,weekNumbers:Boolean,weekNumberClassNames:yn,weekNumberContent:yn,weekNumberDidMount:yn,weekNumberWillUnmount:yn,editable:Boolean,viewClassNames:yn,viewDidMount:yn,viewWillUnmount:yn,nowIndicator:Boolean,nowIndicatorClassNames:yn,nowIndicatorContent:yn,nowIndicatorDidMount:yn,nowIndicatorWillUnmount:yn,showNonCurrentDates:Boolean,lazyFetching:Boolean,startParam:String,endParam:String,timeZoneParam:String,timeZone:String,locales:yn,locale:yn,themeSystem:String,dragRevertDuration:Number,dragScroll:Boolean,allDayMaintainDuration:Boolean,unselectAuto:Boolean,dropAccept:yn,eventOrder:Ge,eventOrderStrict:Boolean,handleWindowResize:Boolean,windowResizeDelay:Number,longPressDelay:Number,eventDragMinDistance:Number,expandRows:Boolean,height:yn,contentHeight:yn,direction:String,weekNumberFormat:sn,eventResizableFromStart:Boolean,displayEventTime:Boolean,displayEventEnd:Boolean,weekText:String,weekTextLong:String,progressiveEventRendering:Boolean,businessHours:yn,initialDate:yn,now:yn,eventDataTransform:yn,stickyHeaderDates:yn,stickyFooterScrollbar:yn,viewHeight:yn,defaultAllDay:Boolean,eventSourceFailure:yn,eventSourceSuccess:yn,eventDisplay:String,eventStartEditable:Boolean,eventDurationEditable:Boolean,eventOverlap:yn,eventConstraint:yn,eventAllow:yn,eventBackgroundColor:String,eventBorderColor:String,eventTextColor:String,eventColor:String,eventClassNames:yn,eventContent:yn,eventDidMount:yn,eventWillUnmount:yn,selectConstraint:yn,selectOverlap:yn,selectAllow:yn,droppable:Boolean,unselectCancel:String,slotLabelFormat:yn,slotLaneClassNames:yn,slotLaneContent:yn,slotLaneDidMount:yn,slotLaneWillUnmount:yn,slotLabelClassNames:yn,slotLabelContent:yn,slotLabelDidMount:yn,slotLabelWillUnmount:yn,dayMaxEvents:yn,dayMaxEventRows:yn,dayMinWidth:Number,slotLabelInterval:Rt,allDayText:String,allDayClassNames:yn,allDayContent:yn,allDayDidMount:yn,allDayWillUnmount:yn,slotMinWidth:Number,navLinks:Boolean,eventTimeFormat:sn,rerenderDelay:Number,moreLinkText:yn,moreLinkHint:yn,selectMinDistance:Number,selectable:Boolean,selectLongPressDelay:Number,eventLongPressDelay:Number,selectMirror:Boolean,eventMaxStack:Number,eventMinHeight:Number,eventMinWidth:Number,eventShortHeight:Number,slotEventOverlap:Boolean,plugins:yn,firstDay:Number,dayCount:Number,dateAlignment:String,dateIncrement:Rt,hiddenDays:yn,monthMode:Boolean,fixedWeekCount:Boolean,validRange:yn,visibleRange:yn,titleFormat:yn,eventInteractive:Boolean,noEventsText:String,viewHint:yn,navLinkHint:yn,closeHint:String,timeHint:String,eventHint:String,moreLinkClick:yn,moreLinkClassNames:yn,moreLinkContent:yn,moreLinkDidMount:yn,moreLinkWillUnmount:yn},ln={eventDisplay:"auto",defaultRangeSeparator:" - ",titleRangeSeparator:" – ",defaultTimedEventDuration:"01:00:00",defaultAllDayEventDuration:{day:1},forceEventDuration:!1,nextDayThreshold:"00:00:00",dayHeaders:!0,initialView:"",aspectRatio:1.35,headerToolbar:{start:"title",center:"",end:"today prev,next"},weekends:!0,weekNumbers:!1,weekNumberCalculation:"local",editable:!1,nowIndicator:!1,scrollTime:"06:00:00",scrollTimeReset:!0,slotMinTime:"00:00:00",slotMaxTime:"24:00:00",showNonCurrentDates:!0,lazyFetching:!0,startParam:"start",endParam:"end",timeZoneParam:"timeZone",timeZone:"local",locales:[],locale:"",themeSystem:"standard",dragRevertDuration:500,dragScroll:!0,allDayMaintainDuration:!1,unselectAuto:!0,dropAccept:"*",eventOrder:"start,-duration,allDay,title",dayPopoverFormat:{month:"long",day:"numeric",year:"numeric"},handleWindowResize:!0,windowResizeDelay:100,longPressDelay:1e3,eventDragMinDistance:5,expandRows:!1,navLinks:!1,selectable:!1,eventMinHeight:15,eventMinWidth:30,eventShortHeight:30},dn={datesSet:yn,eventsSet:yn,eventAdd:yn,eventChange:yn,eventRemove:yn,windowResize:yn,eventClick:yn,eventMouseEnter:yn,eventMouseLeave:yn,select:yn,unselect:yn,loading:yn,_unmount:yn,_beforeprint:yn,_afterprint:yn,_noEventDrop:yn,_noEventResize:yn,_resize:yn,_scrollRequest:yn},fn={buttonText:yn,buttonHints:yn,views:yn,plugins:yn,initialEvents:yn,events:yn,eventSources:yn},pn={headerToolbar:hn,footerToolbar:hn,buttonText:hn,buttonHints:hn,buttonIcons:hn,dateIncrement:hn};function hn(e,t){return"object"==typeof e&&"object"==typeof t&&e&&t?Ot(e,t):e===t}var mn={type:String,component:yn,buttonText:String,buttonTextKey:String,dateProfileGeneratorClass:yn,usesMinMaxTime:Boolean,classNames:yn,content:yn,didMount:yn,willUnmount:yn};function gn(e){return bt(e,pn)}function vn(e,t){var n={},r={};for(var o in t)o in e&&(n[o]=t[o](e[o]));for(var o in e)o in t||(r[o]=e[o]);return{refined:n,extra:r}}function yn(e){return e}function bn(e,t,n,r){for(var o={defs:{},instances:{}},i=Mn(n),a=0,c=e;a<c.length;a++){var s=Rn(c[a],t,n,r,i);s&&wn(s,o)}return o}function wn(e,t){return void 0===t&&(t={defs:{},instances:{}}),t.defs[e.def.defId]=e.def,e.instance&&(t.instances[e.instance.instanceId]=e.instance),t}function An(e,t){var n=e.instances[t];if(n){var r=e.defs[n.defId],o=En(e,(function(e){return t=r,n=e,Boolean(t.groupId&&t.groupId===n.groupId);var t,n}));return o.defs[r.defId]=r,o.instances[n.instanceId]=n,o}return{defs:{},instances:{}}}function xn(e,t){return{defs:ie(ie({},e.defs),t.defs),instances:ie(ie({},e.instances),t.instances)}}function En(e,t){var n=wt(e.defs,t),r=wt(e.instances,(function(e){return n[e.defId]}));return{defs:n,instances:r}}function On(e){return Array.isArray(e)?e:"string"==typeof e?e.split(/\s+/):[]}var Cn={display:String,editable:Boolean,startEditable:Boolean,durationEditable:Boolean,constraint:yn,overlap:yn,allow:yn,className:On,classNames:On,color:String,backgroundColor:String,borderColor:String,textColor:String},kn={display:null,startEditable:null,durationEditable:null,constraints:[],overlap:null,allows:[],backgroundColor:"",borderColor:"",textColor:"",classNames:[]};function Sn(e,t){var n=function(e,t){return Array.isArray(e)?bn(e,null,t,!0):"object"==typeof e&&e?bn([e],null,t,!0):null!=e?String(e):null}(e.constraint,t);return{display:e.display||null,startEditable:null!=e.startEditable?e.startEditable:e.editable,durationEditable:null!=e.durationEditable?e.durationEditable:e.editable,constraints:null!=n?[n]:[],overlap:null!=e.overlap?e.overlap:null,allows:null!=e.allow?[e.allow]:[],backgroundColor:e.backgroundColor||e.color||"",borderColor:e.borderColor||e.color||"",textColor:e.textColor||"",classNames:(e.className||[]).concat(e.classNames||[])}}function Dn(e){return e.reduce(Pn,kn)}function Pn(e,t){return{display:null!=t.display?t.display:e.display,startEditable:null!=t.startEditable?t.startEditable:e.startEditable,durationEditable:null!=t.durationEditable?t.durationEditable:e.durationEditable,constraints:e.constraints.concat(t.constraints),overlap:"boolean"==typeof t.overlap?t.overlap:e.overlap,allows:e.allows.concat(t.allows),backgroundColor:t.backgroundColor||e.backgroundColor,borderColor:t.borderColor||e.borderColor,textColor:t.textColor||e.textColor,classNames:e.classNames.concat(t.classNames)}}var _n={id:String,groupId:String,title:String,url:String,interactive:Boolean},jn={start:yn,end:yn,date:yn,allDay:Boolean},Tn=ie(ie(ie({},_n),jn),{extendedProps:yn});function Rn(e,t,n,r,o){void 0===o&&(o=Mn(n));var i=In(e,n,o),a=i.refined,c=i.extra,s=function(e,t){var n=null;e&&(n=e.defaultAllDay);null==n&&(n=t.options.defaultAllDay);return n}(t,n),u=function(e,t,n,r){for(var o=0;o<r.length;o+=1){var i=r[o].parse(e,n);if(i){var a=e.allDay;return null==a&&null==(a=t)&&null==(a=i.allDayGuess)&&(a=!1),{allDay:a,duration:i.duration,typeData:i.typeData,typeId:o}}}return null}(a,s,n.dateEnv,n.pluginHooks.recurringTypes);if(u)return(l=Nn(a,c,t?t.sourceId:"",u.allDay,Boolean(u.duration),n)).recurringDef={typeId:u.typeId,typeData:u.typeData,duration:u.duration},{def:l,instance:null};var l,d=function(e,t,n,r){var o,i,a=e.allDay,c=null,s=!1,u=null,l=null!=e.start?e.start:e.date;if(o=n.dateEnv.createMarkerMeta(l))c=o.marker;else if(!r)return null;null!=e.end&&(i=n.dateEnv.createMarkerMeta(e.end));null==a&&(a=null!=t?t:(!o||o.isTimeUnspecified)&&(!i||i.isTimeUnspecified));a&&c&&(c=st(c));i&&(u=i.marker,a&&(u=st(u)),c&&u<=c&&(u=null));u?s=!0:r||(s=n.options.forceEventDuration||!1,u=n.dateEnv.add(c,a?n.options.defaultAllDayEventDuration:n.options.defaultTimedEventDuration));return{allDay:a,hasEnd:s,range:{start:c,end:u},forcedStartTzo:o?o.forcedTzo:null,forcedEndTzo:i?i.forcedTzo:null}}(a,s,n,r);return d?{def:l=Nn(a,c,t?t.sourceId:"",d.allDay,d.hasEnd,n),instance:vt(l.defId,d.range,d.forcedStartTzo,d.forcedEndTzo)}:null}function In(e,t,n){return void 0===n&&(n=Mn(t)),vn(e,n)}function Mn(e){return ie(ie(ie({},Cn),Tn),e.pluginHooks.eventRefiners)}function Nn(e,t,n,r,o,i){for(var a={title:e.title||"",groupId:e.groupId||"",publicId:e.id||"",url:e.url||"",recurringDef:null,defId:Ve(),sourceId:n,allDay:r,hasEnd:o,interactive:e.interactive,ui:Sn(e,i),extendedProps:ie(ie({},e.extendedProps||{}),t)},c=0,s=i.pluginHooks.eventDefMemberAdders;c<s.length;c++){var u=s[c];ie(a,u(e))}return Object.freeze(a.ui.classNames),Object.freeze(a.extendedProps),a}function Bn(e){var t=Math.floor(at(e.start,e.end))||1,n=st(e.start);return{start:n,end:ot(n,t)}}function Zn(e,t){void 0===t&&(t=Rt(0));var n=null,r=null;if(e.end){r=st(e.end);var o=e.end.valueOf()-r.valueOf();o&&o>=Bt(t)&&(r=ot(r,1))}return e.start&&(n=st(e.start),r&&r<=n&&(r=ot(n,1))),{start:n,end:r}}function Fn(e,t,n,r){return"year"===r?Rt(n.diffWholeYears(e,t),"year"):"month"===r?Rt(n.diffWholeMonths(e,t),"month"):(i=t,a=st(o=e),c=st(i),{years:0,months:0,days:Math.round(at(a,c)),milliseconds:i.valueOf()-c.valueOf()-(o.valueOf()-a.valueOf())});var o,i,a,c}function Ln(e,t){var n,r,o=[],i=t.start;for(e.sort(Hn),n=0;n<e.length;n+=1)(r=e[n]).start>i&&o.push({start:i,end:r.start}),r.end>i&&(i=r.end);return i<t.end&&o.push({start:i,end:t.end}),o}function Hn(e,t){return e.start.valueOf()-t.start.valueOf()}function Un(e,t){var n=e.start,r=e.end,o=null;return null!==t.start&&(n=null===n?t.start:new Date(Math.max(n.valueOf(),t.start.valueOf()))),null!=t.end&&(r=null===r?t.end:new Date(Math.min(r.valueOf(),t.end.valueOf()))),(null===n||null===r||n<r)&&(o={start:n,end:r}),o}function zn(e,t){return(null===e.start?null:e.start.valueOf())===(null===t.start?null:t.start.valueOf())&&(null===e.end?null:e.end.valueOf())===(null===t.end?null:t.end.valueOf())}function Wn(e,t){return(null===e.end||null===t.start||e.end>t.start)&&(null===e.start||null===t.end||e.start<t.end)}function Vn(e,t){return(null===e.start||null!==t.start&&t.start>=e.start)&&(null===e.end||null!==t.end&&t.end<=e.end)}function Yn(e,t){return(null===e.start||t>=e.start)&&(null===e.end||t<e.end)}function qn(e,t,n,r){var o={},i={},a={},c=[],s=[],u=Xn(e.defs,t);for(var l in e.defs){"inverse-background"===(p=u[(w=e.defs[l]).defId]).display&&(w.groupId?(o[w.groupId]=[],a[w.groupId]||(a[w.groupId]=w)):i[l]=[])}for(var d in e.instances){var f=e.instances[d],p=u[(w=e.defs[f.defId]).defId],h=f.range,m=!w.allDay&&r?Zn(h,r):h,g=Un(m,n);g&&("inverse-background"===p.display?w.groupId?o[w.groupId].push(g):i[f.defId].push(g):"none"!==p.display&&("background"===p.display?c:s).push({def:w,ui:p,instance:f,range:g,isStart:m.start&&m.start.valueOf()===g.start.valueOf(),isEnd:m.end&&m.end.valueOf()===g.end.valueOf()}))}for(var v in o)for(var y=0,b=Ln(o[v],n);y<b.length;y++){var w,A=b[y];p=u[(w=a[v]).defId];c.push({def:w,ui:p,instance:null,range:A,isStart:!1,isEnd:!1})}for(var l in i)for(var x=0,E=Ln(i[l],n);x<E.length;x++){A=E[x];c.push({def:e.defs[l],ui:u[l],instance:null,range:A,isStart:!1,isEnd:!1})}return{bg:c,fg:s}}function Gn(e,t){e.fcSeg=t}function Qn(e){return e.fcSeg||e.parentNode.fcSeg||null}function Xn(e,t){return At(e,(function(e){return Kn(e,t)}))}function Kn(e,t){var n=[];return t[""]&&n.push(t[""]),t[e.defId]&&n.push(t[e.defId]),n.push(e.ui),Dn(n)}function $n(e,t){var n=e.map(Jn);return n.sort((function(e,n){return Qe(e,n,t)})),n.map((function(e){return e._seg}))}function Jn(e){var t=e.eventRange,n=t.def,r=t.instance?t.instance.range:t.range,o=r.start?r.start.valueOf():0,i=r.end?r.end.valueOf():0;return ie(ie(ie({},n.extendedProps),n),{id:n.publicId,start:o,end:i,duration:i-o,allDay:Number(n.allDay),_seg:e})}function er(e,t){for(var n=t.pluginHooks.isDraggableTransformers,r=e.eventRange,o=r.def,i=r.ui,a=i.startEditable,c=0,s=n;c<s.length;c++){a=(0,s[c])(a,o,i,t)}return a}function tr(e,t){return e.isStart&&e.eventRange.ui.durationEditable&&t.options.eventResizableFromStart}function nr(e,t){return e.isEnd&&e.eventRange.ui.durationEditable}function rr(e,t,n){var r=e.eventRange.range;return{isPast:r.end<(n||t.start),isFuture:r.start>=(n||t.end),isToday:t&&Yn(t,r.start)}}var or={start:yn,end:yn,allDay:Boolean};function ir(e,t,n){var r=function(e,t){var n=vn(e,or),r=n.refined,o=n.extra,i=r.start?t.createMarkerMeta(r.start):null,a=r.end?t.createMarkerMeta(r.end):null,c=r.allDay;null==c&&(c=i&&i.isTimeUnspecified&&(!a||a.isTimeUnspecified));return ie({range:{start:i?i.marker:null,end:a?a.marker:null},allDay:c},o)}(e,t),o=r.range;if(!o.start)return null;if(!o.end){if(null==n)return null;o.end=t.add(o.start,n)}return r}function ar(e,t,n){return ie(ie({},cr(e,t,n)),{timeZone:t.timeZone})}function cr(e,t,n){return{start:t.toDate(e.start),end:t.toDate(e.end),startStr:t.formatIso(e.start,{omitTime:n}),endStr:t.formatIso(e.end,{omitTime:n})}}function sr(e,t,n){var r=In({editable:!1},n),o=Nn(r.refined,r.extra,"",e.allDay,!0,n);return{def:o,ui:Kn(o,t),instance:vt(o.defId,e.range),range:e.range,isStart:!0,isEnd:!0}}function ur(e,t,n){n.emitter.trigger("select",ie(ie({},lr(e,n)),{jsEvent:t?t.origEvent:null,view:n.viewApi||n.calendarApi.view}))}function lr(e,t){for(var n,r,o={},i=0,a=t.pluginHooks.dateSpanTransforms;i<a.length;i++){var c=a[i];ie(o,c(e,t))}return ie(o,(n=e,r=t.dateEnv,ie(ie({},cr(n.range,r,n.allDay)),{allDay:n.allDay}))),o}function dr(e,t,n){var r=n.dateEnv,o=n.options,i=t;return e?(i=st(i),i=r.add(i,o.defaultAllDayEventDuration)):i=r.add(i,o.defaultTimedEventDuration),i}function fr(e,t,n,r){var o=Xn(e.defs,t),i={defs:{},instances:{}};for(var a in e.defs){var c=e.defs[a];i.defs[a]=pr(c,o[a],n,r)}for(var s in e.instances){var u=e.instances[s];c=i.defs[u.defId];i.instances[s]=hr(u,c,o[u.defId],n,r)}return i}function pr(e,t,n,r){var o=n.standardProps||{};null==o.hasEnd&&t.durationEditable&&(n.startDelta||n.endDelta)&&(o.hasEnd=!0);var i=ie(ie(ie({},e),o),{ui:ie(ie({},e.ui),o.ui)});n.extendedProps&&(i.extendedProps=ie(ie({},i.extendedProps),n.extendedProps));for(var a=0,c=r.pluginHooks.eventDefMutationAppliers;a<c.length;a++){(0,c[a])(i,n,r)}return!i.hasEnd&&r.options.forceEventDuration&&(i.hasEnd=!0),i}function hr(e,t,n,r,o){var i=o.dateEnv,a=r.standardProps&&!0===r.standardProps.allDay,c=r.standardProps&&!1===r.standardProps.hasEnd,s=ie({},e);return a&&(s.range=Bn(s.range)),r.datesDelta&&n.startEditable&&(s.range={start:i.add(s.range.start,r.datesDelta),end:i.add(s.range.end,r.datesDelta)}),r.startDelta&&n.durationEditable&&(s.range={start:i.add(s.range.start,r.startDelta),end:s.range.end}),r.endDelta&&n.durationEditable&&(s.range={start:s.range.start,end:i.add(s.range.end,r.endDelta)}),c&&(s.range={start:s.range.start,end:dr(t.allDay,s.range.start,o)}),t.allDay&&(s.range={start:st(s.range.start),end:st(s.range.end)}),s.range.end<s.range.start&&(s.range.end=dr(t.allDay,s.range.start,o)),s}var mr=function(){function e(e,t,n){this.type=e,this.getCurrentData=t,this.dateEnv=n}return Object.defineProperty(e.prototype,"calendar",{get:function(){return this.getCurrentData().calendarApi},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"title",{get:function(){return this.getCurrentData().viewTitle},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"activeStart",{get:function(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.activeRange.start)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"activeEnd",{get:function(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.activeRange.end)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentStart",{get:function(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.currentRange.start)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentEnd",{get:function(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.currentRange.end)},enumerable:!1,configurable:!0}),e.prototype.getOption=function(e){return this.getCurrentData().options[e]},e}(),gr={id:String,defaultAllDay:Boolean,url:String,format:String,events:yn,eventDataTransform:yn,success:yn,failure:yn};function vr(e,t,n){var r;if(void 0===n&&(n=yr(t)),"string"==typeof e?r={url:e}:"function"==typeof e||Array.isArray(e)?r={events:e}:"object"==typeof e&&e&&(r=e),r){var o=vn(r,n),i=o.refined,a=o.extra,c=function(e,t){for(var n=t.pluginHooks.eventSourceDefs,r=n.length-1;r>=0;r-=1){var o=n[r].parseMeta(e);if(o)return{sourceDefId:r,meta:o}}return null}(i,t);if(c)return{_raw:e,isFetching:!1,latestFetchId:"",fetchRange:null,defaultAllDay:i.defaultAllDay,eventDataTransform:i.eventDataTransform,success:i.success,failure:i.failure,publicId:i.id||"",sourceId:Ve(),sourceDefId:c.sourceDefId,meta:c.meta,ui:Sn(i,t),extendedProps:a}}return null}function yr(e){return ie(ie(ie({},Cn),gr),e.pluginHooks.eventSourceRefiners)}function br(e,t){return"function"==typeof e&&(e=e()),null==e?t.createNowMarker():t.createMarker(e)}var wr=function(){function e(){}return e.prototype.getCurrentData=function(){return this.currentDataManager.getCurrentData()},e.prototype.dispatch=function(e){return this.currentDataManager.dispatch(e)},Object.defineProperty(e.prototype,"view",{get:function(){return this.getCurrentData().viewApi},enumerable:!1,configurable:!0}),e.prototype.batchRendering=function(e){e()},e.prototype.updateSize=function(){this.trigger("_resize",!0)},e.prototype.setOption=function(e,t){this.dispatch({type:"SET_OPTION",optionName:e,rawOptionValue:t})},e.prototype.getOption=function(e){return this.currentDataManager.currentCalendarOptionsInput[e]},e.prototype.getAvailableLocaleCodes=function(){return Object.keys(this.getCurrentData().availableRawLocales)},e.prototype.on=function(e,t){var n=this.currentDataManager;n.currentCalendarOptionsRefiners[e]?n.emitter.on(e,t):console.warn("Unknown listener name '"+e+"'")},e.prototype.off=function(e,t){this.currentDataManager.emitter.off(e,t)},e.prototype.trigger=function(e){for(var t,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];(t=this.currentDataManager.emitter).trigger.apply(t,ae([e],n))},e.prototype.changeView=function(e,t){var n=this;this.batchRendering((function(){if(n.unselect(),t)if(t.start&&t.end)n.dispatch({type:"CHANGE_VIEW_TYPE",viewType:e}),n.dispatch({type:"SET_OPTION",optionName:"visibleRange",rawOptionValue:t});else{var r=n.getCurrentData().dateEnv;n.dispatch({type:"CHANGE_VIEW_TYPE",viewType:e,dateMarker:r.createMarker(t)})}else n.dispatch({type:"CHANGE_VIEW_TYPE",viewType:e})}))},e.prototype.zoomTo=function(e,t){var n;t=t||"day",n=this.getCurrentData().viewSpecs[t]||this.getUnitViewSpec(t),this.unselect(),n?this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:n.type,dateMarker:e}):this.dispatch({type:"CHANGE_DATE",dateMarker:e})},e.prototype.getUnitViewSpec=function(e){var t,n,r=this.getCurrentData(),o=r.viewSpecs,i=r.toolbarConfig,a=[].concat(i.header?i.header.viewsWithButtons:[],i.footer?i.footer.viewsWithButtons:[]);for(var c in o)a.push(c);for(t=0;t<a.length;t+=1)if((n=o[a[t]])&&n.singleUnit===e)return n;return null},e.prototype.prev=function(){this.unselect(),this.dispatch({type:"PREV"})},e.prototype.next=function(){this.unselect(),this.dispatch({type:"NEXT"})},e.prototype.prevYear=function(){var e=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:e.dateEnv.addYears(e.currentDate,-1)})},e.prototype.nextYear=function(){var e=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:e.dateEnv.addYears(e.currentDate,1)})},e.prototype.today=function(){var e=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:br(e.calendarOptions.now,e.dateEnv)})},e.prototype.gotoDate=function(e){var t=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:t.dateEnv.createMarker(e)})},e.prototype.incrementDate=function(e){var t=this.getCurrentData(),n=Rt(e);n&&(this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:t.dateEnv.add(t.currentDate,n)}))},e.prototype.getDate=function(){var e=this.getCurrentData();return e.dateEnv.toDate(e.currentDate)},e.prototype.formatDate=function(e,t){var n=this.getCurrentData().dateEnv;return n.format(n.createMarker(e),sn(t))},e.prototype.formatRange=function(e,t,n){var r=this.getCurrentData().dateEnv;return r.formatRange(r.createMarker(e),r.createMarker(t),sn(n),n)},e.prototype.formatIso=function(e,t){var n=this.getCurrentData().dateEnv;return n.formatIso(n.createMarker(e),{omitTime:t})},e.prototype.select=function(e,t){var n;n=null==t?null!=e.start?e:{start:e,end:null}:{start:e,end:t};var r=this.getCurrentData(),o=ir(n,r.dateEnv,Rt({days:1}));o&&(this.dispatch({type:"SELECT_DATES",selection:o}),ur(o,null,r))},e.prototype.unselect=function(e){var t=this.getCurrentData();t.dateSelection&&(this.dispatch({type:"UNSELECT_DATES"}),function(e,t){t.emitter.trigger("unselect",{jsEvent:e?e.origEvent:null,view:t.viewApi||t.calendarApi.view})}(e,t))},e.prototype.addEvent=function(e,t){if(e instanceof Ar){var n=e._def,r=e._instance;return this.getCurrentData().eventStore.defs[n.defId]||(this.dispatch({type:"ADD_EVENTS",eventStore:wn({def:n,instance:r})}),this.triggerEventAdd(e)),e}var o,i=this.getCurrentData();if(t instanceof De)o=t.internalEventSource;else if("boolean"==typeof t)t&&(o=Et(i.eventSources)[0]);else if(null!=t){var a=this.getEventSourceById(t);if(!a)return console.warn('Could not find an event source with ID "'+t+'"'),null;o=a.internalEventSource}var c=Rn(e,o,i,!1);if(c){var s=new Ar(i,c.def,c.def.recurringDef?null:c.instance);return this.dispatch({type:"ADD_EVENTS",eventStore:wn(c)}),this.triggerEventAdd(s),s}return null},e.prototype.triggerEventAdd=function(e){var t=this;this.getCurrentData().emitter.trigger("eventAdd",{event:e,relatedEvents:[],revert:function(){t.dispatch({type:"REMOVE_EVENTS",eventStore:xr(e)})}})},e.prototype.getEventById=function(e){var t=this.getCurrentData(),n=t.eventStore,r=n.defs,o=n.instances;for(var i in e=String(e),r){var a=r[i];if(a.publicId===e){if(a.recurringDef)return new Ar(t,a,null);for(var c in o){var s=o[c];if(s.defId===a.defId)return new Ar(t,a,s)}}}return null},e.prototype.getEvents=function(){var e=this.getCurrentData();return Er(e.eventStore,e)},e.prototype.removeAllEvents=function(){this.dispatch({type:"REMOVE_ALL_EVENTS"})},e.prototype.getEventSources=function(){var e=this.getCurrentData(),t=e.eventSources,n=[];for(var r in t)n.push(new De(e,t[r]));return n},e.prototype.getEventSourceById=function(e){var t=this.getCurrentData(),n=t.eventSources;for(var r in e=String(e),n)if(n[r].publicId===e)return new De(t,n[r]);return null},e.prototype.addEventSource=function(e){var t=this.getCurrentData();if(e instanceof De)return t.eventSources[e.internalEventSource.sourceId]||this.dispatch({type:"ADD_EVENT_SOURCES",sources:[e.internalEventSource]}),e;var n=vr(e,t);return n?(this.dispatch({type:"ADD_EVENT_SOURCES",sources:[n]}),new De(t,n)):null},e.prototype.removeAllEventSources=function(){this.dispatch({type:"REMOVE_ALL_EVENT_SOURCES"})},e.prototype.refetchEvents=function(){this.dispatch({type:"FETCH_EVENT_SOURCES",isRefetch:!0})},e.prototype.scrollToTime=function(e){var t=Rt(e);t&&this.trigger("_scrollRequest",{time:t})},e}(),Ar=function(){function e(e,t,n){this._context=e,this._def=t,this._instance=n||null}return e.prototype.setProp=function(e,t){var n,r;if(e in jn)console.warn("Could not set date-related prop 'name'. Use one of the date-related methods instead.");else if("id"===e)t=_n[e](t),this.mutate({standardProps:{publicId:t}});else if(e in _n)t=_n[e](t),this.mutate({standardProps:(n={},n[e]=t,n)});else if(e in Cn){var o=Cn[e](t);"color"===e?o={backgroundColor:t,borderColor:t}:"editable"===e?o={startEditable:t,durationEditable:t}:((r={})[e]=t,o=r),this.mutate({standardProps:{ui:o}})}else console.warn("Could not set prop '"+e+"'. Use setExtendedProp instead.")},e.prototype.setExtendedProp=function(e,t){var n;this.mutate({extendedProps:(n={},n[e]=t,n)})},e.prototype.setStart=function(e,t){void 0===t&&(t={});var n=this._context.dateEnv,r=n.createMarker(e);if(r&&this._instance){var o=Fn(this._instance.range.start,r,n,t.granularity);t.maintainDuration?this.mutate({datesDelta:o}):this.mutate({startDelta:o})}},e.prototype.setEnd=function(e,t){void 0===t&&(t={});var n,r=this._context.dateEnv;if((null==e||(n=r.createMarker(e)))&&this._instance)if(n){var o=Fn(this._instance.range.end,n,r,t.granularity);this.mutate({endDelta:o})}else this.mutate({standardProps:{hasEnd:!1}})},e.prototype.setDates=function(e,t,n){void 0===n&&(n={});var r,o,i,a=this._context.dateEnv,c={allDay:n.allDay},s=a.createMarker(e);if(s&&((null==t||(r=a.createMarker(t)))&&this._instance)){var u=this._instance.range;!0===n.allDay&&(u=Bn(u));var l=Fn(u.start,s,a,n.granularity);if(r){var d=Fn(u.end,r,a,n.granularity);i=d,(o=l).years===i.years&&o.months===i.months&&o.days===i.days&&o.milliseconds===i.milliseconds?this.mutate({datesDelta:l,standardProps:c}):this.mutate({startDelta:l,endDelta:d,standardProps:c})}else c.hasEnd=!1,this.mutate({datesDelta:l,standardProps:c})}},e.prototype.moveStart=function(e){var t=Rt(e);t&&this.mutate({startDelta:t})},e.prototype.moveEnd=function(e){var t=Rt(e);t&&this.mutate({endDelta:t})},e.prototype.moveDates=function(e){var t=Rt(e);t&&this.mutate({datesDelta:t})},e.prototype.setAllDay=function(e,t){void 0===t&&(t={});var n={allDay:e},r=t.maintainDuration;null==r&&(r=this._context.options.allDayMaintainDuration),this._def.allDay!==e&&(n.hasEnd=r),this.mutate({standardProps:n})},e.prototype.formatRange=function(e){var t=this._context.dateEnv,n=this._instance,r=sn(e);return this._def.hasEnd?t.formatRange(n.range.start,n.range.end,r,{forcedStartTzo:n.forcedStartTzo,forcedEndTzo:n.forcedEndTzo}):t.format(n.range.start,r,{forcedTzo:n.forcedStartTzo})},e.prototype.mutate=function(t){var n=this._instance;if(n){var r=this._def,o=this._context,i=o.getCurrentData().eventStore,a=An(i,n.instanceId);a=fr(a,{"":{display:"",startEditable:!0,durationEditable:!0,constraints:[],overlap:null,allows:[],backgroundColor:"",borderColor:"",textColor:"",classNames:[]}},t,o);var c=new e(o,r,n);this._def=a.defs[r.defId],this._instance=a.instances[n.instanceId],o.dispatch({type:"MERGE_EVENTS",eventStore:a}),o.emitter.trigger("eventChange",{oldEvent:c,event:this,relatedEvents:Er(a,o,n),revert:function(){o.dispatch({type:"RESET_EVENTS",eventStore:i})}})}},e.prototype.remove=function(){var e=this._context,t=xr(this);e.dispatch({type:"REMOVE_EVENTS",eventStore:t}),e.emitter.trigger("eventRemove",{event:this,relatedEvents:[],revert:function(){e.dispatch({type:"MERGE_EVENTS",eventStore:t})}})},Object.defineProperty(e.prototype,"source",{get:function(){var e=this._def.sourceId;return e?new De(this._context,this._context.getCurrentData().eventSources[e]):null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"start",{get:function(){return this._instance?this._context.dateEnv.toDate(this._instance.range.start):null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"end",{get:function(){return this._instance&&this._def.hasEnd?this._context.dateEnv.toDate(this._instance.range.end):null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"startStr",{get:function(){var e=this._instance;return e?this._context.dateEnv.formatIso(e.range.start,{omitTime:this._def.allDay,forcedTzo:e.forcedStartTzo}):""},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"endStr",{get:function(){var e=this._instance;return e&&this._def.hasEnd?this._context.dateEnv.formatIso(e.range.end,{omitTime:this._def.allDay,forcedTzo:e.forcedEndTzo}):""},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"id",{get:function(){return this._def.publicId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"groupId",{get:function(){return this._def.groupId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"allDay",{get:function(){return this._def.allDay},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"title",{get:function(){return this._def.title},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"url",{get:function(){return this._def.url},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"display",{get:function(){return this._def.ui.display||"auto"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"startEditable",{get:function(){return this._def.ui.startEditable},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"durationEditable",{get:function(){return this._def.ui.durationEditable},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"constraint",{get:function(){return this._def.ui.constraints[0]||null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"overlap",{get:function(){return this._def.ui.overlap},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"allow",{get:function(){return this._def.ui.allows[0]||null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"backgroundColor",{get:function(){return this._def.ui.backgroundColor},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"borderColor",{get:function(){return this._def.ui.borderColor},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textColor",{get:function(){return this._def.ui.textColor},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"classNames",{get:function(){return this._def.ui.classNames},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"extendedProps",{get:function(){return this._def.extendedProps},enumerable:!1,configurable:!0}),e.prototype.toPlainObject=function(e){void 0===e&&(e={});var t=this._def,n=t.ui,r=this.startStr,o=this.endStr,i={};return t.title&&(i.title=t.title),r&&(i.start=r),o&&(i.end=o),t.publicId&&(i.id=t.publicId),t.groupId&&(i.groupId=t.groupId),t.url&&(i.url=t.url),n.display&&"auto"!==n.display&&(i.display=n.display),e.collapseColor&&n.backgroundColor&&n.backgroundColor===n.borderColor?i.color=n.backgroundColor:(n.backgroundColor&&(i.backgroundColor=n.backgroundColor),n.borderColor&&(i.borderColor=n.borderColor)),n.textColor&&(i.textColor=n.textColor),n.classNames.length&&(i.classNames=n.classNames),Object.keys(t.extendedProps).length&&(e.collapseExtendedProps?ie(i,t.extendedProps):i.extendedProps=t.extendedProps),i},e.prototype.toJSON=function(){return this.toPlainObject()},e}();function xr(e){var t,n,r=e._def,o=e._instance;return{defs:(t={},t[r.defId]=r,t),instances:o?(n={},n[o.instanceId]=o,n):{}}}function Er(e,t,n){var r=e.defs,o=e.instances,i=[],a=n?n.instanceId:"";for(var c in o){var s=o[c],u=r[s.defId];s.instanceId!==a&&i.push(new Ar(t,u,s))}return i}var Or={};!function(e,t){Or[e]=t}("gregory",function(){function e(){}return e.prototype.getMarkerYear=function(e){return e.getUTCFullYear()},e.prototype.getMarkerMonth=function(e){return e.getUTCMonth()},e.prototype.getMarkerDay=function(e){return e.getUTCDate()},e.prototype.arrayToMarker=function(e){return ht(e)},e.prototype.markerToArray=function(e){return pt(e)},e}());var Cr=/^\s*(\d{4})(-?(\d{2})(-?(\d{2})([T ](\d{2}):?(\d{2})(:?(\d{2})(\.(\d+))?)?(Z|(([-+])(\d{2})(:?(\d{2}))?))?)?)?)?$/;var kr=function(){function e(e){var t=this.timeZone=e.timeZone,n="local"!==t&&"UTC"!==t;e.namedTimeZoneImpl&&n&&(this.namedTimeZoneImpl=new e.namedTimeZoneImpl(t)),this.canComputeOffset=Boolean(!n||this.namedTimeZoneImpl),this.calendarSystem=function(e){return new Or[e]}(e.calendarSystem),this.locale=e.locale,this.weekDow=e.locale.week.dow,this.weekDoy=e.locale.week.doy,"ISO"===e.weekNumberCalculation&&(this.weekDow=1,this.weekDoy=4),"number"==typeof e.firstDay&&(this.weekDow=e.firstDay),"function"==typeof e.weekNumberCalculation&&(this.weekNumberFunc=e.weekNumberCalculation),this.weekText=null!=e.weekText?e.weekText:e.locale.options.weekText,this.weekTextLong=(null!=e.weekTextLong?e.weekTextLong:e.locale.options.weekTextLong)||this.weekText,this.cmdFormatter=e.cmdFormatter,this.defaultSeparator=e.defaultSeparator}return e.prototype.createMarker=function(e){var t=this.createMarkerMeta(e);return null===t?null:t.marker},e.prototype.createNowMarker=function(){return this.canComputeOffset?this.timestampToMarker((new Date).valueOf()):ht(dt(new Date))},e.prototype.createMarkerMeta=function(e){if("string"==typeof e)return this.parse(e);var t=null;return"number"==typeof e?t=this.timestampToMarker(e):e instanceof Date?(e=e.valueOf(),isNaN(e)||(t=this.timestampToMarker(e))):Array.isArray(e)&&(t=ht(e)),null!==t&&mt(t)?{marker:t,isTimeUnspecified:!1,forcedTzo:null}:null},e.prototype.parse=function(e){var t=function(e){var t=Cr.exec(e);if(t){var n=new Date(Date.UTC(Number(t[1]),t[3]?Number(t[3])-1:0,Number(t[5]||1),Number(t[7]||0),Number(t[8]||0),Number(t[10]||0),t[12]?1e3*Number("0."+t[12]):0));if(mt(n)){var r=null;return t[13]&&(r=("-"===t[15]?-1:1)*(60*Number(t[16]||0)+Number(t[18]||0))),{marker:n,isTimeUnspecified:!t[6],timeZoneOffset:r}}}return null}(e);if(null===t)return null;var n=t.marker,r=null;return null!==t.timeZoneOffset&&(this.canComputeOffset?n=this.timestampToMarker(n.valueOf()-60*t.timeZoneOffset*1e3):r=t.timeZoneOffset),{marker:n,isTimeUnspecified:t.isTimeUnspecified,forcedTzo:r}},e.prototype.getYear=function(e){return this.calendarSystem.getMarkerYear(e)},e.prototype.getMonth=function(e){return this.calendarSystem.getMarkerMonth(e)},e.prototype.add=function(e,t){var n=this.calendarSystem.markerToArray(e);return n[0]+=t.years,n[1]+=t.months,n[2]+=t.days,n[6]+=t.milliseconds,this.calendarSystem.arrayToMarker(n)},e.prototype.subtract=function(e,t){var n=this.calendarSystem.markerToArray(e);return n[0]-=t.years,n[1]-=t.months,n[2]-=t.days,n[6]-=t.milliseconds,this.calendarSystem.arrayToMarker(n)},e.prototype.addYears=function(e,t){var n=this.calendarSystem.markerToArray(e);return n[0]+=t,this.calendarSystem.arrayToMarker(n)},e.prototype.addMonths=function(e,t){var n=this.calendarSystem.markerToArray(e);return n[1]+=t,this.calendarSystem.arrayToMarker(n)},e.prototype.diffWholeYears=function(e,t){var n=this.calendarSystem;return gt(e)===gt(t)&&n.getMarkerDay(e)===n.getMarkerDay(t)&&n.getMarkerMonth(e)===n.getMarkerMonth(t)?n.getMarkerYear(t)-n.getMarkerYear(e):null},e.prototype.diffWholeMonths=function(e,t){var n=this.calendarSystem;return gt(e)===gt(t)&&n.getMarkerDay(e)===n.getMarkerDay(t)?n.getMarkerMonth(t)-n.getMarkerMonth(e)+12*(n.getMarkerYear(t)-n.getMarkerYear(e)):null},e.prototype.greatestWholeUnit=function(e,t){var n=this.diffWholeYears(e,t);return null!==n?{unit:"year",value:n}:null!==(n=this.diffWholeMonths(e,t))?{unit:"month",value:n}:(n=function(e,t){var n=ct(e,t);return null!==n&&n%7==0?n/7:null}(e,t),null!==n?{unit:"week",value:n}:null!==(n=ct(e,t))?{unit:"day",value:n}:(n=function(e,t){return(t.valueOf()-e.valueOf())/36e5}(e,t),tt(n)?{unit:"hour",value:n}:(n=function(e,t){return(t.valueOf()-e.valueOf())/6e4}(e,t),tt(n)?{unit:"minute",value:n}:(n=function(e,t){return(t.valueOf()-e.valueOf())/1e3}(e,t),tt(n)?{unit:"second",value:n}:{unit:"millisecond",value:t.valueOf()-e.valueOf()}))))},e.prototype.countDurationsBetween=function(e,t,n){var r;return n.years&&null!==(r=this.diffWholeYears(e,t))?r/(Nt(n)/365):n.months&&null!==(r=this.diffWholeMonths(e,t))?r/function(e){return Nt(e)/30}(n):n.days&&null!==(r=ct(e,t))?r/Nt(n):(t.valueOf()-e.valueOf())/Bt(n)},e.prototype.startOf=function(e,t){return"year"===t?this.startOfYear(e):"month"===t?this.startOfMonth(e):"week"===t?this.startOfWeek(e):"day"===t?st(e):"hour"===t?function(e){return ht([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours()])}(e):"minute"===t?function(e){return ht([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes()])}(e):"second"===t?function(e){return ht([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds()])}(e):null},e.prototype.startOfYear=function(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e)])},e.prototype.startOfMonth=function(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e),this.calendarSystem.getMarkerMonth(e)])},e.prototype.startOfWeek=function(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e),this.calendarSystem.getMarkerMonth(e),e.getUTCDate()-(e.getUTCDay()-this.weekDow+7)%7])},e.prototype.computeWeekNumber=function(e){return this.weekNumberFunc?this.weekNumberFunc(this.toDate(e)):function(e,t,n){var r=e.getUTCFullYear(),o=ut(e,r,t,n);if(o<1)return ut(e,r-1,t,n);var i=ut(e,r+1,t,n);return i>=1?Math.min(o,i):o}(e,this.weekDow,this.weekDoy)},e.prototype.format=function(e,t,n){return void 0===n&&(n={}),t.format({marker:e,timeZoneOffset:null!=n.forcedTzo?n.forcedTzo:this.offsetForMarker(e)},this)},e.prototype.formatRange=function(e,t,n,r){return void 0===r&&(r={}),r.isEndExclusive&&(t=it(t,-1)),n.formatRange({marker:e,timeZoneOffset:null!=r.forcedStartTzo?r.forcedStartTzo:this.offsetForMarker(e)},{marker:t,timeZoneOffset:null!=r.forcedEndTzo?r.forcedEndTzo:this.offsetForMarker(t)},this,r.defaultSeparator)},e.prototype.formatIso=function(e,t){void 0===t&&(t={});var n=null;return t.omitTimeZoneOffset||(n=null!=t.forcedTzo?t.forcedTzo:this.offsetForMarker(e)),Lt(e,n,t.omitTime)},e.prototype.timestampToMarker=function(e){return"local"===this.timeZone?ht(dt(new Date(e))):"UTC"!==this.timeZone&&this.namedTimeZoneImpl?ht(this.namedTimeZoneImpl.timestampToArray(e)):new Date(e)},e.prototype.offsetForMarker=function(e){return"local"===this.timeZone?-ft(pt(e)).getTimezoneOffset():"UTC"===this.timeZone?0:this.namedTimeZoneImpl?this.namedTimeZoneImpl.offsetForArray(pt(e)):null},e.prototype.toDate=function(e,t){return"local"===this.timeZone?ft(pt(e)):"UTC"===this.timeZone?new Date(e.valueOf()):this.namedTimeZoneImpl?new Date(e.valueOf()-1e3*this.namedTimeZoneImpl.offsetForArray(pt(e))*60):new Date(e.valueOf()-(t||0))},e}(),Sr=[],Dr={code:"en",week:{dow:0,doy:4},direction:"ltr",buttonText:{prev:"prev",next:"next",prevYear:"prev year",nextYear:"next year",year:"year",today:"today",month:"month",week:"week",day:"day",list:"list"},weekText:"W",weekTextLong:"Week",closeHint:"Close",timeHint:"Time",eventHint:"Event",allDayText:"all-day",moreLinkText:"more",noEventsText:"No events to display"},Pr=ie(ie({},Dr),{buttonHints:{prev:"Previous $0",next:"Next $0",today:function(e,t){return"day"===t?"Today":"This "+e}},viewHint:"$0 view",navLinkHint:"Go to $0",moreLinkHint:function(e){return"Show "+e+" more event"+(1===e?"":"s")}});function _r(e){for(var t=e.length>0?e[0].code:"en",n=Sr.concat(e),r={en:Pr},o=0,i=n;o<i.length;o++){var a=i[o];r[a.code]=a}return{map:r,defaultCode:t}}function jr(e,t){return"object"!=typeof e||Array.isArray(e)?function(e,t){var n=[].concat(e||[]),r=function(e,t){for(var n=0;n<e.length;n+=1)for(var r=e[n].toLocaleLowerCase().split("-"),o=r.length;o>0;o-=1){var i=r.slice(0,o).join("-");if(t[i])return t[i]}return null}(n,t)||Pr;return Tr(e,n,r)}(e,t):Tr(e.code,[e.code],e)}function Tr(e,t,n){var r=bt([Dr,n],["buttonText"]);delete r.code;var o=r.week;return delete r.week,{codeArg:e,codes:t,week:o,simpleNumberFormat:new Intl.NumberFormat(e),options:r}}var Rr,Ir={startTime:"09:00",endTime:"17:00",daysOfWeek:[1,2,3,4,5],display:"inverse-background",classNames:"fc-non-business",groupId:"_businessHours"};function Mr(e,t){return bn(function(e){var t;t=!0===e?[{}]:Array.isArray(e)?e.filter((function(e){return e.daysOfWeek})):"object"==typeof e&&e?[e]:[];return t=t.map((function(e){return ie(ie({},Ir),e)}))}(e),null,t)}function Nr(e,t){return e.left>=t.left&&e.left<t.right&&e.top>=t.top&&e.top<t.bottom}function Br(e,t){var n={left:Math.max(e.left,t.left),right:Math.min(e.right,t.right),top:Math.max(e.top,t.top),bottom:Math.min(e.bottom,t.bottom)};return n.left<n.right&&n.top<n.bottom&&n}function Zr(e,t,n){return{left:e.left+t,right:e.right+t,top:e.top+n,bottom:e.bottom+n}}function Fr(){return null==Rr&&(Rr=function(){if("undefined"==typeof document)return!0;var e=document.createElement("div");e.style.position="absolute",e.style.top="0px",e.style.left="0px",e.innerHTML="<table><tr><td><div></div></td></tr></table>",e.querySelector("table").style.height="100px",e.querySelector("div").style.height="100%",document.body.appendChild(e);var t=e.querySelector("div").offsetHeight>0;return document.body.removeChild(e),t}()),Rr}var Lr={defs:{},instances:{}},Hr=function(){function e(){this.getKeysForEventDefs=Wt(this._getKeysForEventDefs),this.splitDateSelection=Wt(this._splitDateSpan),this.splitEventStore=Wt(this._splitEventStore),this.splitIndividualUi=Wt(this._splitIndividualUi),this.splitEventDrag=Wt(this._splitInteraction),this.splitEventResize=Wt(this._splitInteraction),this.eventUiBuilders={}}return e.prototype.splitProps=function(e){var t=this,n=this.getKeyInfo(e),r=this.getKeysForEventDefs(e.eventStore),o=this.splitDateSelection(e.dateSelection),i=this.splitIndividualUi(e.eventUiBases,r),a=this.splitEventStore(e.eventStore,r),c=this.splitEventDrag(e.eventDrag),s=this.splitEventResize(e.eventResize),u={};for(var l in this.eventUiBuilders=At(n,(function(e,n){return t.eventUiBuilders[n]||Wt(Ur)})),n){var d=n[l],f=a[l]||Lr,p=this.eventUiBuilders[l];u[l]={businessHours:d.businessHours||e.businessHours,dateSelection:o[l]||null,eventStore:f,eventUiBases:p(e.eventUiBases[""],d.ui,i[l]),eventSelection:f.instances[e.eventSelection]?e.eventSelection:"",eventDrag:c[l]||null,eventResize:s[l]||null}}return u},e.prototype._splitDateSpan=function(e){var t={};if(e)for(var n=0,r=this.getKeysForDateSpan(e);n<r.length;n++){t[r[n]]=e}return t},e.prototype._getKeysForEventDefs=function(e){var t=this;return At(e.defs,(function(e){return t.getKeysForEventDef(e)}))},e.prototype._splitEventStore=function(e,t){var n=e.defs,r=e.instances,o={};for(var i in n)for(var a=0,c=t[i];a<c.length;a++){o[f=c[a]]||(o[f]={defs:{},instances:{}}),o[f].defs[i]=n[i]}for(var s in r)for(var u=r[s],l=0,d=t[u.defId];l<d.length;l++){var f;o[f=d[l]]&&(o[f].instances[s]=u)}return o},e.prototype._splitIndividualUi=function(e,t){var n={};for(var r in e)if(r)for(var o=0,i=t[r];o<i.length;o++){var a=i[o];n[a]||(n[a]={}),n[a][r]=e[r]}return n},e.prototype._splitInteraction=function(e){var t={};if(e){var n=this._splitEventStore(e.affectedEvents,this._getKeysForEventDefs(e.affectedEvents)),r=this._getKeysForEventDefs(e.mutatedEvents),o=this._splitEventStore(e.mutatedEvents,r),i=function(r){t[r]||(t[r]={affectedEvents:n[r]||Lr,mutatedEvents:o[r]||Lr,isEvent:e.isEvent})};for(var a in n)i(a);for(var a in o)i(a)}return t},e}();function Ur(e,t,n){var r=[];e&&r.push(e),t&&r.push(t);var o={"":Dn(r)};return n&&ie(o,n),o}function zr(e,t,n,r){return{dow:e.getUTCDay(),isDisabled:Boolean(r&&!Yn(r.activeRange,e)),isOther:Boolean(r&&!Yn(r.currentRange,e)),isToday:Boolean(t&&Yn(t,e)),isPast:Boolean(n?e<n:!!t&&e<t.start),isFuture:Boolean(n?e>n:!!t&&e>=t.end)}}function Wr(e,t){var n=["fc-day","fc-day-"+rt[e.dow]];return e.isDisabled?n.push("fc-day-disabled"):(e.isToday&&(n.push("fc-day-today"),n.push(t.getClass("today"))),e.isPast&&n.push("fc-day-past"),e.isFuture&&n.push("fc-day-future"),e.isOther&&n.push("fc-day-other")),n}function Vr(e,t){var n=["fc-slot","fc-slot-"+rt[e.dow]];return e.isDisabled?n.push("fc-slot-disabled"):(e.isToday&&(n.push("fc-slot-today"),n.push(t.getClass("today"))),e.isPast&&n.push("fc-slot-past"),e.isFuture&&n.push("fc-slot-future")),n}var Yr=sn({year:"numeric",month:"long",day:"numeric"}),qr=sn({week:"long"});function Gr(e,t,n,r){void 0===n&&(n="day"),void 0===r&&(r=!0);var o,i=e.dateEnv,a=e.options,c=e.calendarApi,s=i.format(t,"week"===n?qr:Yr);if(a.navLinks){var u=i.toDate(t),l=function(e){var r="day"===n?a.navLinkDayClick:"week"===n?a.navLinkWeekClick:null;"function"==typeof r?r.call(c,i.toDate(t),e):("string"==typeof r&&(n=r),c.zoomTo(t,n))};return ie({title:Je(a.navLinkHint,[s,u],s),"data-navlink":""},r?ie({onClick:o=l},ze(o)):{onClick:l})}return{"aria-label":s}}var Qr,Xr=null;function Kr(){return null===Xr&&(Xr=function(){var e=document.createElement("div");Ie(e,{position:"absolute",top:-1e3,left:0,border:0,padding:0,overflow:"scroll",direction:"rtl"}),e.innerHTML="<div></div>",document.body.appendChild(e);var t=e.firstChild.getBoundingClientRect().left>e.getBoundingClientRect().left;return Pe(e),t}()),Xr}function $r(){return Qr||(Qr=function(){var e=document.createElement("div");e.style.overflow="scroll",e.style.position="absolute",e.style.top="-9999px",e.style.left="-9999px",document.body.appendChild(e);var t=Jr(e);return document.body.removeChild(e),t}()),Qr}function Jr(e){return{x:e.offsetHeight-e.clientHeight,y:e.offsetWidth-e.clientWidth}}function eo(e,t){void 0===t&&(t=!1);var n=window.getComputedStyle(e),r=parseInt(n.borderLeftWidth,10)||0,o=parseInt(n.borderRightWidth,10)||0,i=parseInt(n.borderTopWidth,10)||0,a=parseInt(n.borderBottomWidth,10)||0,c=Jr(e),s=c.y-r-o,u={borderLeft:r,borderRight:o,borderTop:i,borderBottom:a,scrollbarBottom:c.x-i-a,scrollbarLeft:0,scrollbarRight:0};return Kr()&&"rtl"===n.direction?u.scrollbarLeft=s:u.scrollbarRight=s,t&&(u.paddingLeft=parseInt(n.paddingLeft,10)||0,u.paddingRight=parseInt(n.paddingRight,10)||0,u.paddingTop=parseInt(n.paddingTop,10)||0,u.paddingBottom=parseInt(n.paddingBottom,10)||0),u}function to(e,t,n){void 0===t&&(t=!1);var r=n?e.getBoundingClientRect():no(e),o=eo(e,t),i={left:r.left+o.borderLeft+o.scrollbarLeft,right:r.right-o.borderRight-o.scrollbarRight,top:r.top+o.borderTop,bottom:r.bottom-o.borderBottom-o.scrollbarBottom};return t&&(i.left+=o.paddingLeft,i.right-=o.paddingRight,i.top+=o.paddingTop,i.bottom-=o.paddingBottom),i}function no(e){var t=e.getBoundingClientRect();return{left:t.left+window.pageXOffset,top:t.top+window.pageYOffset,right:t.right+window.pageXOffset,bottom:t.bottom+window.pageYOffset}}function ro(e){for(var t=[];e instanceof HTMLElement;){var n=window.getComputedStyle(e);if("fixed"===n.position)break;/(auto|scroll)/.test(n.overflow+n.overflowY+n.overflowX)&&t.push(e),e=e.parentNode}return t}function oo(e,t,n){var r=!1,o=function(){r||(r=!0,t.apply(this,arguments))},i=function(){r||(r=!0,n&&n.apply(this,arguments))},a=e(o,i);a&&"function"==typeof a.then&&a.then(o,i)}var io=function(){function e(){this.handlers={},this.thisContext=null}return e.prototype.setThisContext=function(e){this.thisContext=e},e.prototype.setOptions=function(e){this.options=e},e.prototype.on=function(e,t){!function(e,t,n){(e[t]||(e[t]=[])).push(n)}(this.handlers,e,t)},e.prototype.off=function(e,t){!function(e,t,n){n?e[t]&&(e[t]=e[t].filter((function(e){return e!==n}))):delete e[t]}(this.handlers,e,t)},e.prototype.trigger=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r=this.handlers[e]||[],o=this.options&&this.options[e],i=[].concat(o||[],r),a=0,c=i;a<c.length;a++){var s=c[a];s.apply(this.thisContext,t)}},e.prototype.hasHandlers=function(e){return Boolean(this.handlers[e]&&this.handlers[e].length||this.options&&this.options[e])},e}();var ao=function(){function e(e,t,n,r){this.els=t;var o=this.originClientRect=e.getBoundingClientRect();n&&this.buildElHorizontals(o.left),r&&this.buildElVerticals(o.top)}return e.prototype.buildElHorizontals=function(e){for(var t=[],n=[],r=0,o=this.els;r<o.length;r++){var i=o[r].getBoundingClientRect();t.push(i.left-e),n.push(i.right-e)}this.lefts=t,this.rights=n},e.prototype.buildElVerticals=function(e){for(var t=[],n=[],r=0,o=this.els;r<o.length;r++){var i=o[r].getBoundingClientRect();t.push(i.top-e),n.push(i.bottom-e)}this.tops=t,this.bottoms=n},e.prototype.leftToIndex=function(e){var t,n=this.lefts,r=this.rights,o=n.length;for(t=0;t<o;t+=1)if(e>=n[t]&&e<r[t])return t},e.prototype.topToIndex=function(e){var t,n=this.tops,r=this.bottoms,o=n.length;for(t=0;t<o;t+=1)if(e>=n[t]&&e<r[t])return t},e.prototype.getWidth=function(e){return this.rights[e]-this.lefts[e]},e.prototype.getHeight=function(e){return this.bottoms[e]-this.tops[e]},e}(),co=function(){function e(){}return e.prototype.getMaxScrollTop=function(){return this.getScrollHeight()-this.getClientHeight()},e.prototype.getMaxScrollLeft=function(){return this.getScrollWidth()-this.getClientWidth()},e.prototype.canScrollVertically=function(){return this.getMaxScrollTop()>0},e.prototype.canScrollHorizontally=function(){return this.getMaxScrollLeft()>0},e.prototype.canScrollUp=function(){return this.getScrollTop()>0},e.prototype.canScrollDown=function(){return this.getScrollTop()<this.getMaxScrollTop()},e.prototype.canScrollLeft=function(){return this.getScrollLeft()>0},e.prototype.canScrollRight=function(){return this.getScrollLeft()<this.getMaxScrollLeft()},e}(),so=function(e){function t(t){var n=e.call(this)||this;return n.el=t,n}return oe(t,e),t.prototype.getScrollTop=function(){return this.el.scrollTop},t.prototype.getScrollLeft=function(){return this.el.scrollLeft},t.prototype.setScrollTop=function(e){this.el.scrollTop=e},t.prototype.setScrollLeft=function(e){this.el.scrollLeft=e},t.prototype.getScrollWidth=function(){return this.el.scrollWidth},t.prototype.getScrollHeight=function(){return this.el.scrollHeight},t.prototype.getClientHeight=function(){return this.el.clientHeight},t.prototype.getClientWidth=function(){return this.el.clientWidth},t}(co),uo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return oe(t,e),t.prototype.getScrollTop=function(){return window.pageYOffset},t.prototype.getScrollLeft=function(){return window.pageXOffset},t.prototype.setScrollTop=function(e){window.scroll(window.pageXOffset,e)},t.prototype.setScrollLeft=function(e){window.scroll(e,window.pageYOffset)},t.prototype.getScrollWidth=function(){return document.documentElement.scrollWidth},t.prototype.getScrollHeight=function(){return document.documentElement.scrollHeight},t.prototype.getClientHeight=function(){return document.documentElement.clientHeight},t.prototype.getClientWidth=function(){return document.documentElement.clientWidth},t}(co),lo=function(){function e(e){this.iconOverrideOption&&this.setIconOverride(e[this.iconOverrideOption])}return e.prototype.setIconOverride=function(e){var t,n;if("object"==typeof e&&e){for(n in t=ie({},this.iconClasses),e)t[n]=this.applyIconOverridePrefix(e[n]);this.iconClasses=t}else!1===e&&(this.iconClasses={})},e.prototype.applyIconOverridePrefix=function(e){var t=this.iconOverridePrefix;return t&&0!==e.indexOf(t)&&(e=t+e),e},e.prototype.getClass=function(e){return this.classes[e]||""},e.prototype.getIconClass=function(e,t){var n;return(n=t&&this.rtlIconClasses&&this.rtlIconClasses[e]||this.iconClasses[e])?this.baseIconClass+" "+n:""},e.prototype.getCustomButtonIconClass=function(e){var t;return this.iconOverrideCustomButtonOption&&(t=e[this.iconOverrideCustomButtonOption])?this.baseIconClass+" "+this.applyIconOverridePrefix(t):""},e}();lo.prototype.classes={},lo.prototype.iconClasses={},lo.prototype.baseIconClass="",lo.prototype.iconOverridePrefix="";var fo=function(){function e(e,t,n,r){var o=this;this.execFunc=e,this.emitter=t,this.scrollTime=n,this.scrollTimeReset=r,this.handleScrollRequest=function(e){o.queuedRequest=ie({},o.queuedRequest||{},e),o.drain()},t.on("_scrollRequest",this.handleScrollRequest),this.fireInitialScroll()}return e.prototype.detach=function(){this.emitter.off("_scrollRequest",this.handleScrollRequest)},e.prototype.update=function(e){e&&this.scrollTimeReset?this.fireInitialScroll():this.drain()},e.prototype.fireInitialScroll=function(){this.handleScrollRequest({time:this.scrollTime})},e.prototype.drain=function(){this.queuedRequest&&this.execFunc(this.queuedRequest)&&(this.queuedRequest=null)},e}(),po=Ce({});function ho(e,t,n,r,o,i,a,c,s,u,l,d,f){return{dateEnv:o,options:n,pluginHooks:a,emitter:u,dispatch:c,getCurrentData:s,calendarApi:l,viewSpec:e,viewApi:t,dateProfileGenerator:r,theme:i,isRtl:"rtl"===n.direction,addResizeHandler:function(e){u.on("_resize",e)},removeResizeHandler:function(e){u.off("_resize",e)},createScrollResponder:function(e){return new fo(e,u,Rt(n.scrollTime),n.scrollTimeReset)},registerInteractiveComponent:d,unregisterInteractiveComponent:f}}var mo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return oe(t,e),t.prototype.shouldComponentUpdate=function(e,t){return this.debug&&console.log(Ct(e,this.props),Ct(t,this.state)),!kt(this.props,e,this.propEquality)||!kt(this.state,t,this.stateEquality)},t.prototype.safeSetState=function(e){kt(this.state,ie(ie({},this.state),e),this.stateEquality)||this.setState(e)},t.addPropsEquality=vo,t.addStateEquality=yo,t.contextType=po,t}(Ae);mo.prototype.propEquality={},mo.prototype.stateEquality={};var go=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return oe(t,e),t.contextType=po,t}(mo);function vo(e){var t=Object.create(this.prototype.propEquality);ie(t,e),this.prototype.propEquality=t}function yo(e){var t=Object.create(this.prototype.stateEquality);ie(t,e),this.prototype.stateEquality=t}function bo(e,t){"function"==typeof e?e(t):e&&(e.current=t)}var wo=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.uid=Ve(),t}return oe(t,e),t.prototype.prepareHits=function(){},t.prototype.queryHit=function(e,t,n,r){return null},t.prototype.isValidSegDownEl=function(e){return!this.props.eventDrag&&!this.props.eventResize&&!_e(e,".fc-event-mirror")},t.prototype.isValidDateDownEl=function(e){return!(_e(e,".fc-event:not(.fc-bg-event)")||_e(e,".fc-more-link")||_e(e,"a[data-navlink]")||_e(e,".fc-popover"))},t}(go);function Ao(e){return{id:Ve(),deps:e.deps||[],reducers:e.reducers||[],isLoadingFuncs:e.isLoadingFuncs||[],contextInit:[].concat(e.contextInit||[]),eventRefiners:e.eventRefiners||{},eventDefMemberAdders:e.eventDefMemberAdders||[],eventSourceRefiners:e.eventSourceRefiners||{},isDraggableTransformers:e.isDraggableTransformers||[],eventDragMutationMassagers:e.eventDragMutationMassagers||[],eventDefMutationAppliers:e.eventDefMutationAppliers||[],dateSelectionTransformers:e.dateSelectionTransformers||[],datePointTransforms:e.datePointTransforms||[],dateSpanTransforms:e.dateSpanTransforms||[],views:e.views||{},viewPropsTransformers:e.viewPropsTransformers||[],isPropsValid:e.isPropsValid||null,externalDefTransforms:e.externalDefTransforms||[],viewContainerAppends:e.viewContainerAppends||[],eventDropTransformers:e.eventDropTransformers||[],componentInteractions:e.componentInteractions||[],calendarInteractions:e.calendarInteractions||[],themeClasses:e.themeClasses||{},eventSourceDefs:e.eventSourceDefs||[],cmdFormatter:e.cmdFormatter,recurringTypes:e.recurringTypes||[],namedTimeZonedImpl:e.namedTimeZonedImpl,initialView:e.initialView||"",elementDraggingImpl:e.elementDraggingImpl,optionChangeHandlers:e.optionChangeHandlers||{},scrollGridImpl:e.scrollGridImpl||null,contentTypeHandlers:e.contentTypeHandlers||{},listenerRefiners:e.listenerRefiners||{},optionRefiners:e.optionRefiners||{},propSetHandlers:e.propSetHandlers||{}}}function xo(){var e,t=[],n=[];return function(r,o){return e&&zt(r,t)&&zt(o,n)||(e=function(e,t){var n={},r={reducers:[],isLoadingFuncs:[],contextInit:[],eventRefiners:{},eventDefMemberAdders:[],eventSourceRefiners:{},isDraggableTransformers:[],eventDragMutationMassagers:[],eventDefMutationAppliers:[],dateSelectionTransformers:[],datePointTransforms:[],dateSpanTransforms:[],views:{},viewPropsTransformers:[],isPropsValid:null,externalDefTransforms:[],viewContainerAppends:[],eventDropTransformers:[],componentInteractions:[],calendarInteractions:[],themeClasses:{},eventSourceDefs:[],cmdFormatter:null,recurringTypes:[],namedTimeZonedImpl:null,initialView:"",elementDraggingImpl:null,optionChangeHandlers:{},scrollGridImpl:null,contentTypeHandlers:{},listenerRefiners:{},optionRefiners:{},propSetHandlers:{}};function o(e){for(var t=0,i=e;t<i.length;t++){var a=i[t];n[a.id]||(n[a.id]=!0,o(a.deps),s=a,r={reducers:(c=r).reducers.concat(s.reducers),isLoadingFuncs:c.isLoadingFuncs.concat(s.isLoadingFuncs),contextInit:c.contextInit.concat(s.contextInit),eventRefiners:ie(ie({},c.eventRefiners),s.eventRefiners),eventDefMemberAdders:c.eventDefMemberAdders.concat(s.eventDefMemberAdders),eventSourceRefiners:ie(ie({},c.eventSourceRefiners),s.eventSourceRefiners),isDraggableTransformers:c.isDraggableTransformers.concat(s.isDraggableTransformers),eventDragMutationMassagers:c.eventDragMutationMassagers.concat(s.eventDragMutationMassagers),eventDefMutationAppliers:c.eventDefMutationAppliers.concat(s.eventDefMutationAppliers),dateSelectionTransformers:c.dateSelectionTransformers.concat(s.dateSelectionTransformers),datePointTransforms:c.datePointTransforms.concat(s.datePointTransforms),dateSpanTransforms:c.dateSpanTransforms.concat(s.dateSpanTransforms),views:ie(ie({},c.views),s.views),viewPropsTransformers:c.viewPropsTransformers.concat(s.viewPropsTransformers),isPropsValid:s.isPropsValid||c.isPropsValid,externalDefTransforms:c.externalDefTransforms.concat(s.externalDefTransforms),viewContainerAppends:c.viewContainerAppends.concat(s.viewContainerAppends),eventDropTransformers:c.eventDropTransformers.concat(s.eventDropTransformers),calendarInteractions:c.calendarInteractions.concat(s.calendarInteractions),componentInteractions:c.componentInteractions.concat(s.componentInteractions),themeClasses:ie(ie({},c.themeClasses),s.themeClasses),eventSourceDefs:c.eventSourceDefs.concat(s.eventSourceDefs),cmdFormatter:s.cmdFormatter||c.cmdFormatter,recurringTypes:c.recurringTypes.concat(s.recurringTypes),namedTimeZonedImpl:s.namedTimeZonedImpl||c.namedTimeZonedImpl,initialView:c.initialView||s.initialView,elementDraggingImpl:c.elementDraggingImpl||s.elementDraggingImpl,optionChangeHandlers:ie(ie({},c.optionChangeHandlers),s.optionChangeHandlers),scrollGridImpl:s.scrollGridImpl||c.scrollGridImpl,contentTypeHandlers:ie(ie({},c.contentTypeHandlers),s.contentTypeHandlers),listenerRefiners:ie(ie({},c.listenerRefiners),s.listenerRefiners),optionRefiners:ie(ie({},c.optionRefiners),s.optionRefiners),propSetHandlers:ie(ie({},c.propSetHandlers),s.propSetHandlers)})}var c,s}return e&&o(e),o(t),r}(r,o)),t=r,n=o,e}}var Eo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return oe(t,e),t}(lo);function Oo(e,t,n,r){if(t[e])return t[e];var o=function(e,t,n,r){var o=n[e],i=r[e],a=function(e){return o&&null!==o[e]?o[e]:i&&null!==i[e]?i[e]:null},c=a("component"),s=a("superType"),u=null;if(s){if(s===e)throw new Error("Can't have a custom view type that references itself");u=Oo(s,t,n,r)}!c&&u&&(c=u.component);if(!c)return null;return{type:e,component:c,defaults:ie(ie({},u?u.defaults:{}),o?o.rawOptions:{}),overrides:ie(ie({},u?u.overrides:{}),i?i.rawOptions:{})}}(e,t,n,r);return o&&(t[e]=o),o}Eo.prototype.classes={root:"fc-theme-standard",tableCellShaded:"fc-cell-shaded",buttonGroup:"fc-button-group",button:"fc-button fc-button-primary",buttonActive:"fc-button-active"},Eo.prototype.baseIconClass="fc-icon",Eo.prototype.iconClasses={close:"fc-icon-x",prev:"fc-icon-chevron-left",next:"fc-icon-chevron-right",prevYear:"fc-icon-chevrons-left",nextYear:"fc-icon-chevrons-right"},Eo.prototype.rtlIconClasses={prev:"fc-icon-chevron-right",next:"fc-icon-chevron-left",prevYear:"fc-icon-chevrons-right",nextYear:"fc-icon-chevrons-left"},Eo.prototype.iconOverrideOption="buttonIcons",Eo.prototype.iconOverrideCustomButtonOption="icon",Eo.prototype.iconOverridePrefix="fc-icon-";var Co=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rootElRef=Ee(),t.handleRootEl=function(e){bo(t.rootElRef,e),t.props.elRef&&bo(t.props.elRef,e)},t}return oe(t,e),t.prototype.render=function(){var e=this,t=this.props,n=t.hookProps;return xe(Po,{hookProps:n,didMount:t.didMount,willUnmount:t.willUnmount,elRef:this.handleRootEl},(function(r){return xe(So,{hookProps:n,content:t.content,defaultContent:t.defaultContent,backupElRef:e.rootElRef},(function(e,o){return t.children(r,jo(t.classNames,n),e,o)}))}))},t}(go),ko=Ce(0);function So(e){return xe(ko.Consumer,null,(function(t){return xe(Do,ie({renderId:t},e))}))}var Do=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.innerElRef=Ee(),t}return oe(t,e),t.prototype.render=function(){return this.props.children(this.innerElRef,this.renderInnerContent())},t.prototype.componentDidMount=function(){this.updateCustomContent()},t.prototype.componentDidUpdate=function(){this.updateCustomContent()},t.prototype.componentWillUnmount=function(){this.customContentInfo&&this.customContentInfo.destroy&&this.customContentInfo.destroy()},t.prototype.renderInnerContent=function(){var e=this.customContentInfo,t=this.getInnerContent(),n=this.getContentMeta(t);return e&&e.contentKey===n.contentKey?e&&(e.contentVal=t[n.contentKey]):(e&&(e.destroy&&e.destroy(),e=this.customContentInfo=null),n.contentKey&&(e=this.customContentInfo=ie({contentKey:n.contentKey,contentVal:t[n.contentKey]},n.buildLifecycleFuncs()))),e?[]:t},t.prototype.getInnerContent=function(){var e=this.props,t=To(e.content,e.hookProps);return void 0===t&&(t=To(e.defaultContent,e.hookProps)),null==t?null:t},t.prototype.getContentMeta=function(e){var t=this.context.pluginHooks.contentTypeHandlers,n="",r=null;if(e)for(var o in t)if(void 0!==e[o]){n=o,r=t[o];break}return{contentKey:n,buildLifecycleFuncs:r}},t.prototype.updateCustomContent=function(){this.customContentInfo&&this.customContentInfo.render(this.innerElRef.current||this.props.backupElRef.current,this.customContentInfo.contentVal)},t}(go),Po=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleRootEl=function(e){t.rootEl=e,t.props.elRef&&bo(t.props.elRef,e)},t}return oe(t,e),t.prototype.render=function(){return this.props.children(this.handleRootEl)},t.prototype.componentDidMount=function(){var e=this.props.didMount;e&&e(ie(ie({},this.props.hookProps),{el:this.rootEl}))},t.prototype.componentWillUnmount=function(){var e=this.props.willUnmount;e&&e(ie(ie({},this.props.hookProps),{el:this.rootEl}))},t}(go);function _o(){var e,t,n=[];return function(r,o){return t&&Ot(t,o)&&r===e||(e=r,t=o,n=jo(r,o)),n}}function jo(e,t){return"function"==typeof e&&(e=e(t)),On(e)}function To(e,t){return"function"==typeof e?e(t,xe):e}var Ro=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.normalizeClassNames=_o(),t}return oe(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=t.options,r={view:t.viewApi},o=this.normalizeClassNames(n.viewClassNames,r);return xe(Po,{hookProps:r,didMount:n.viewDidMount,willUnmount:n.viewWillUnmount,elRef:e.elRef},(function(t){return e.children(t,["fc-"+e.viewSpec.type+"-view","fc-view"].concat(o))}))},t}(go);function Io(e){return At(e,Mo)}function Mo(e){var t="function"==typeof e?{component:e}:e,n=t.component;return t.content&&(n=function(e){return function(t){return xe(po.Consumer,null,(function(n){return xe(Ro,{viewSpec:n.viewSpec},(function(r,o){var i=ie(ie({},t),{nextDayThreshold:n.options.nextDayThreshold});return xe(Co,{hookProps:i,classNames:e.classNames,content:e.content,didMount:e.didMount,willUnmount:e.willUnmount,elRef:r},(function(e,t,n,r){return xe("div",{className:o.concat(t).join(" "),ref:e},r)}))}))}))}}(t)),{superType:t.type,component:n,rawOptions:t}}function No(e,t,n,r){var o=Io(e),i=Io(t.views),a=function(e,t){var n,r={};for(n in e)Oo(n,r,e,t);for(n in t)Oo(n,r,e,t);return r}(o,i);return At(a,(function(e){return function(e,t,n,r,o){var i=e.overrides.duration||e.defaults.duration||r.duration||n.duration,a=null,c="",s="",u={};if(i&&(a=function(e){var t=JSON.stringify(e),n=Bo[t];void 0===n&&(n=Rt(e),Bo[t]=n);return n}(i),a)){var l=Ft(a);c=l.unit,1===l.value&&(s=c,u=t[c]?t[c].rawOptions:{})}var d=function(t){var n=t.buttonText||{},r=e.defaults.buttonTextKey;return null!=r&&null!=n[r]?n[r]:null!=n[e.type]?n[e.type]:null!=n[s]?n[s]:null},f=function(t){var n=t.buttonHints||{},r=e.defaults.buttonTextKey;return null!=r&&null!=n[r]?n[r]:null!=n[e.type]?n[e.type]:null!=n[s]?n[s]:null};return{type:e.type,component:e.component,duration:a,durationUnit:c,singleUnit:s,optionDefaults:e.defaults,optionOverrides:ie(ie({},u),e.overrides),buttonTextOverride:d(r)||d(n)||e.overrides.buttonText,buttonTextDefault:d(o)||e.defaults.buttonText||d(ln)||e.type,buttonTitleOverride:f(r)||f(n)||e.overrides.buttonHint,buttonTitleDefault:f(o)||e.defaults.buttonHint||f(ln)}}(e,i,t,n,r)}))}var Bo={};var Zo=function(){function e(e){this.props=e,this.nowDate=br(e.nowInput,e.dateEnv),this.initHiddenDays()}return e.prototype.buildPrev=function(e,t,n){var r=this.props.dateEnv,o=r.subtract(r.startOf(t,e.currentRangeUnit),e.dateIncrement);return this.build(o,-1,n)},e.prototype.buildNext=function(e,t,n){var r=this.props.dateEnv,o=r.add(r.startOf(t,e.currentRangeUnit),e.dateIncrement);return this.build(o,1,n)},e.prototype.build=function(e,t,n){void 0===n&&(n=!0);var r,o,i,a,c,s,u=this.props;return r=this.buildValidRange(),r=this.trimHiddenDays(r),n&&(e=function(e,t){return null!=t.start&&e<t.start?t.start:null!=t.end&&e>=t.end?new Date(t.end.valueOf()-1):e}(e,r)),o=this.buildCurrentRangeInfo(e,t),i=/^(year|month|week|day)$/.test(o.unit),a=this.buildRenderRange(this.trimHiddenDays(o.range),o.unit,i),c=a=this.trimHiddenDays(a),u.showNonCurrentDates||(c=Un(c,o.range)),c=Un(c=this.adjustActiveRange(c),r),s=Wn(o.range,r),{validRange:r,currentRange:o.range,currentRangeUnit:o.unit,isRangeAllDay:i,activeRange:c,renderRange:a,slotMinTime:u.slotMinTime,slotMaxTime:u.slotMaxTime,isValid:s,dateIncrement:this.buildDateIncrement(o.duration)}},e.prototype.buildValidRange=function(){var e=this.props.validRangeInput,t="function"==typeof e?e.call(this.props.calendarApi,this.nowDate):e;return this.refineRange(t)||{start:null,end:null}},e.prototype.buildCurrentRangeInfo=function(e,t){var n,r=this.props,o=null,i=null,a=null;return r.duration?(o=r.duration,i=r.durationUnit,a=this.buildRangeFromDuration(e,t,o,i)):(n=this.props.dayCount)?(i="day",a=this.buildRangeFromDayCount(e,t,n)):(a=this.buildCustomVisibleRange(e))?i=r.dateEnv.greatestWholeUnit(a.start,a.end).unit:(i=Ft(o=this.getFallbackDuration()).unit,a=this.buildRangeFromDuration(e,t,o,i)),{duration:o,unit:i,range:a}},e.prototype.getFallbackDuration=function(){return Rt({day:1})},e.prototype.adjustActiveRange=function(e){var t=this.props,n=t.dateEnv,r=t.usesMinMaxTime,o=t.slotMinTime,i=t.slotMaxTime,a=e.start,c=e.end;return r&&(Nt(o)<0&&(a=st(a),a=n.add(a,o)),Nt(i)>1&&(c=ot(c=st(c),-1),c=n.add(c,i))),{start:a,end:c}},e.prototype.buildRangeFromDuration=function(e,t,n,r){var o,i,a,c=this.props,s=c.dateEnv,u=c.dateAlignment;if(!u){var l=this.props.dateIncrement;u=l&&Bt(l)<Bt(n)?Ft(l).unit:r}function d(){o=s.startOf(e,u),i=s.add(o,n),a={start:o,end:i}}return Nt(n)<=1&&this.isHiddenDay(o)&&(o=st(o=this.skipHiddenDays(o,t))),d(),this.trimHiddenDays(a)||(e=this.skipHiddenDays(e,t),d()),a},e.prototype.buildRangeFromDayCount=function(e,t,n){var r,o=this.props,i=o.dateEnv,a=o.dateAlignment,c=0,s=e;a&&(s=i.startOf(s,a)),s=st(s),r=s=this.skipHiddenDays(s,t);do{r=ot(r,1),this.isHiddenDay(r)||(c+=1)}while(c<n);return{start:s,end:r}},e.prototype.buildCustomVisibleRange=function(e){var t=this.props,n=t.visibleRangeInput,r="function"==typeof n?n.call(t.calendarApi,t.dateEnv.toDate(e)):n,o=this.refineRange(r);return!o||null!=o.start&&null!=o.end?o:null},e.prototype.buildRenderRange=function(e,t,n){return e},e.prototype.buildDateIncrement=function(e){var t,n=this.props.dateIncrement;return n||((t=this.props.dateAlignment)?Rt(1,t):e||Rt({days:1}))},e.prototype.refineRange=function(e){if(e){var t=(n=e,r=this.props.dateEnv,o=null,i=null,n.start&&(o=r.createMarker(n.start)),n.end&&(i=r.createMarker(n.end)),o||i?o&&i&&i<o?null:{start:o,end:i}:null);return t&&(t=Zn(t)),t}var n,r,o,i;return null},e.prototype.initHiddenDays=function(){var e,t=this.props.hiddenDays||[],n=[],r=0;for(!1===this.props.weekends&&t.push(0,6),e=0;e<7;e+=1)(n[e]=-1!==t.indexOf(e))||(r+=1);if(!r)throw new Error("invalid hiddenDays");this.isHiddenDayHash=n},e.prototype.trimHiddenDays=function(e){var t=e.start,n=e.end;return t&&(t=this.skipHiddenDays(t)),n&&(n=this.skipHiddenDays(n,-1,!0)),null==t||null==n||t<n?{start:t,end:n}:null},e.prototype.isHiddenDay=function(e){return e instanceof Date&&(e=e.getUTCDay()),this.isHiddenDayHash[e]},e.prototype.skipHiddenDays=function(e,t,n){for(void 0===t&&(t=1),void 0===n&&(n=!1);this.isHiddenDayHash[(e.getUTCDay()+(n?t:0)+7)%7];)e=ot(e,t);return e},e}();function Fo(e,t,n){var r=t?t.activeRange:null;return Uo({},function(e,t){var n=yr(t),r=[].concat(e.eventSources||[]),o=[];e.initialEvents&&r.unshift(e.initialEvents);e.events&&r.unshift(e.events);for(var i=0,a=r;i<a.length;i++){var c=vr(a[i],t,n);c&&o.push(c)}return o}(e,n),r,n)}function Lo(e,t,n,r){var o,i,a=n?n.activeRange:null;switch(t.type){case"ADD_EVENT_SOURCES":return Uo(e,t.sources,a,r);case"REMOVE_EVENT_SOURCE":return o=e,i=t.sourceId,wt(o,(function(e){return e.sourceId!==i}));case"PREV":case"NEXT":case"CHANGE_DATE":case"CHANGE_VIEW_TYPE":return n?zo(e,a,r):e;case"FETCH_EVENT_SOURCES":return Wo(e,t.sourceIds?xt(t.sourceIds):Yo(e,r),a,t.isRefetch||!1,r);case"RECEIVE_EVENTS":case"RECEIVE_EVENT_ERROR":return function(e,t,n,r){var o,i=e[t];if(i&&n===i.latestFetchId)return ie(ie({},e),((o={})[t]=ie(ie({},i),{isFetching:!1,fetchRange:r}),o));return e}(e,t.sourceId,t.fetchId,t.fetchRange);case"REMOVE_ALL_EVENT_SOURCES":return{};default:return e}}function Ho(e){for(var t in e)if(e[t].isFetching)return!0;return!1}function Uo(e,t,n,r){for(var o={},i=0,a=t;i<a.length;i++){var c=a[i];o[c.sourceId]=c}return n&&(o=zo(o,n,r)),ie(ie({},e),o)}function zo(e,t,n){return Wo(e,wt(e,(function(e){return function(e,t,n){if(!qo(e,n))return!e.latestFetchId;return!n.options.lazyFetching||!e.fetchRange||e.isFetching||t.start<e.fetchRange.start||t.end>e.fetchRange.end}(e,t,n)})),t,!1,n)}function Wo(e,t,n,r,o){var i={};for(var a in e){var c=e[a];t[a]?i[a]=Vo(c,n,r,o):i[a]=c}return i}function Vo(e,t,n,r){var o=r.options,i=r.calendarApi,a=r.pluginHooks.eventSourceDefs[e.sourceDefId],c=Ve();return a.fetch({eventSource:e,range:t,isRefetch:n,context:r},(function(n){var a=n.rawEvents;o.eventSourceSuccess&&(a=o.eventSourceSuccess.call(i,a,n.xhr)||a),e.success&&(a=e.success.call(i,a,n.xhr)||a),r.dispatch({type:"RECEIVE_EVENTS",sourceId:e.sourceId,fetchId:c,fetchRange:t,rawEvents:a})}),(function(n){console.warn(n.message,n),o.eventSourceFailure&&o.eventSourceFailure.call(i,n),e.failure&&e.failure(n),r.dispatch({type:"RECEIVE_EVENT_ERROR",sourceId:e.sourceId,fetchId:c,fetchRange:t,error:n})})),ie(ie({},e),{isFetching:!0,latestFetchId:c})}function Yo(e,t){return wt(e,(function(e){return qo(e,t)}))}function qo(e,t){return!t.pluginHooks.eventSourceDefs[e.sourceDefId].ignoreRange}function Go(e,t,n,r,o){switch(t.type){case"RECEIVE_EVENTS":return function(e,t,n,r,o,i){if(t&&n===t.latestFetchId){var a=bn(function(e,t,n){var r=n.options.eventDataTransform,o=t?t.eventDataTransform:null;o&&(e=Qo(e,o));r&&(e=Qo(e,r));return e}(o,t,i),t,i);return r&&(a=Pt(a,r,i)),xn(Xo(e,t.sourceId),a)}return e}(e,n[t.sourceId],t.fetchId,t.fetchRange,t.rawEvents,o);case"ADD_EVENTS":return function(e,t,n,r){n&&(t=Pt(t,n,r));return xn(e,t)}(e,t.eventStore,r?r.activeRange:null,o);case"RESET_EVENTS":return t.eventStore;case"MERGE_EVENTS":return xn(e,t.eventStore);case"PREV":case"NEXT":case"CHANGE_DATE":case"CHANGE_VIEW_TYPE":return r?Pt(e,r.activeRange,o):e;case"REMOVE_EVENTS":return function(e,t){var n=e.defs,r=e.instances,o={},i={};for(var a in n)t.defs[a]||(o[a]=n[a]);for(var c in r)!t.instances[c]&&o[r[c].defId]&&(i[c]=r[c]);return{defs:o,instances:i}}(e,t.eventStore);case"REMOVE_EVENT_SOURCE":return Xo(e,t.sourceId);case"REMOVE_ALL_EVENT_SOURCES":return En(e,(function(e){return!e.sourceId}));case"REMOVE_ALL_EVENTS":return{defs:{},instances:{}};default:return e}}function Qo(e,t){var n;if(t){n=[];for(var r=0,o=e;r<o.length;r++){var i=o[r],a=t(i);a?n.push(a):null==a&&n.push(i)}}else n=e;return n}function Xo(e,t){return En(e,(function(e){return e.sourceId!==t}))}function Ko(e,t){switch(t.type){case"UNSELECT_DATES":return null;case"SELECT_DATES":return t.selection;default:return e}}function $o(e,t){switch(t.type){case"UNSELECT_EVENT":return"";case"SELECT_EVENT":return t.eventInstanceId;default:return e}}function Jo(e,t){var n;switch(t.type){case"UNSET_EVENT_DRAG":return null;case"SET_EVENT_DRAG":return{affectedEvents:(n=t.state).affectedEvents,mutatedEvents:n.mutatedEvents,isEvent:n.isEvent};default:return e}}function ei(e,t){var n;switch(t.type){case"UNSET_EVENT_RESIZE":return null;case"SET_EVENT_RESIZE":return{affectedEvents:(n=t.state).affectedEvents,mutatedEvents:n.mutatedEvents,isEvent:n.isEvent};default:return e}}function ti(e,t,n,r,o){return{header:e.headerToolbar?ni(e.headerToolbar,e,t,n,r,o):null,footer:e.footerToolbar?ni(e.footerToolbar,e,t,n,r,o):null}}function ni(e,t,n,r,o,i){var a={},c=[],s=!1;for(var u in e){var l=ri(e[u],t,n,r,o,i);a[u]=l.widgets,c.push.apply(c,l.viewsWithButtons),s=s||l.hasTitle}return{sectionWidgets:a,viewsWithButtons:c,hasTitle:s}}function ri(e,t,n,r,o,i){var a="rtl"===t.direction,c=t.customButtons||{},s=n.buttonText||{},u=t.buttonText||{},l=n.buttonHints||{},d=t.buttonHints||{},f=e?e.split(" "):[],p=[],h=!1;return{widgets:f.map((function(e){return e.split(",").map((function(e){if("title"===e)return h=!0,{buttonName:e};var n,f,m,g,v,y;if(n=c[e])m=function(e){n.click&&n.click.call(e.target,e,e.target)},(g=r.getCustomButtonIconClass(n))||(g=r.getIconClass(e,a))||(v=n.text),y=n.hint||n.text;else if(f=o[e]){p.push(e),m=function(){i.changeView(e)},(v=f.buttonTextOverride)||(g=r.getIconClass(e,a))||(v=f.buttonTextDefault);var b=f.buttonTextOverride||f.buttonTextDefault;y=Je(f.buttonTitleOverride||f.buttonTitleDefault||t.viewHint,[b,e],b)}else if(i[e])if(m=function(){i[e]()},(v=s[e])||(g=r.getIconClass(e,a))||(v=u[e]),"prevYear"===e||"nextYear"===e){var w="prevYear"===e?"prev":"next";y=Je(l[w]||d[w],[u.year||"year","year"],u[e])}else y=function(t){return Je(l[e]||d[e],[u[t]||t,t],u[e])};return{buttonName:e,buttonClick:m,buttonIcon:g,buttonText:v,buttonHint:y}}))})),viewsWithButtons:p,hasTitle:h}}function oi(e,t,n,r,o){var i=null;"GET"===(e=e.toUpperCase())?t=function(e,t){return e+(-1===e.indexOf("?")?"?":"&")+ii(t)}(t,n):i=ii(n);var a=new XMLHttpRequest;a.open(e,t,!0),"GET"!==e&&a.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),a.onload=function(){if(a.status>=200&&a.status<400){var e=!1,t=void 0;try{t=JSON.parse(a.responseText),e=!0}catch(e){}e?r(t,a):o("Failure parsing JSON",a)}else o("Request failed",a)},a.onerror=function(){o("Request failed",a)},a.send(i)}function ii(e){var t=[];for(var n in e)t.push(encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t.join("&")}var ai={parseMeta:function(e){return!e.url||"json"!==e.format&&e.format?null:{url:e.url,format:"json",method:(e.method||"GET").toUpperCase(),extraParams:e.extraParams,startParam:e.startParam,endParam:e.endParam,timeZoneParam:e.timeZoneParam}},fetch:function(e,t,n){var r=e.eventSource.meta,o=function(e,t,n){var r,o,i,a,c=n.dateEnv,s=n.options,u={};null==(r=e.startParam)&&(r=s.startParam);null==(o=e.endParam)&&(o=s.endParam);null==(i=e.timeZoneParam)&&(i=s.timeZoneParam);a="function"==typeof e.extraParams?e.extraParams():e.extraParams||{};ie(u,a),u[r]=c.formatIso(t.start),u[o]=c.formatIso(t.end),"local"!==c.timeZone&&(u[i]=c.timeZone);return u}(r,e.range,e.context);oi(r.method,r.url,o,(function(e,n){t({rawEvents:e,xhr:n})}),(function(e,t){n({message:e,xhr:t})}))}};var ci={parse:function(e,t){if(e.daysOfWeek||e.startTime||e.endTime||e.startRecur||e.endRecur){var n={daysOfWeek:e.daysOfWeek||null,startTime:e.startTime||null,endTime:e.endTime||null,startRecur:e.startRecur?t.createMarker(e.startRecur):null,endRecur:e.endRecur?t.createMarker(e.endRecur):null},r=void 0;return e.duration&&(r=e.duration),!r&&e.startTime&&e.endTime&&(o=e.endTime,i=e.startTime,r={years:o.years-i.years,months:o.months-i.months,days:o.days-i.days,milliseconds:o.milliseconds-i.milliseconds}),{allDayGuess:Boolean(!e.startTime&&!e.endTime),duration:r,typeData:n}}var o,i;return null},expand:function(e,t,n){var r=Un(t,{start:e.startRecur,end:e.endRecur});return r?function(e,t,n,r){var o=e?xt(e):null,i=st(n.start),a=n.end,c=[];for(;i<a;){var s=void 0;o&&!o[i.getUTCDay()]||(s=t?r.add(i,t):i,c.push(s)),i=ot(i,1)}return c}(e.daysOfWeek,e.startTime,r,n):[]}};function si(e,t){for(var n=Et(t.getCurrentData().eventSources),r=[],o=0,i=e;o<i.length;o++){for(var a=i[o],c=!1,s=0;s<n.length;s+=1)if(n[s]._raw===a){n.splice(s,1),c=!0;break}c||r.push(a)}for(var u=0,l=n;u<l.length;u++){var d=l[u];t.dispatch({type:"REMOVE_EVENT_SOURCE",sourceId:d.sourceId})}for(var f=0,p=r;f<p.length;f++){var h=p[f];t.calendarApi.addEventSource(h)}}var ui=[Ao({eventSourceDefs:[{ignoreRange:!0,parseMeta:function(e){return Array.isArray(e.events)?e.events:null},fetch:function(e,t){t({rawEvents:e.eventSource.meta})}}]}),Ao({eventSourceDefs:[{parseMeta:function(e){return"function"==typeof e.events?e.events:null},fetch:function(e,t,n){var r=e.context.dateEnv;oo(e.eventSource.meta.bind(null,ar(e.range,r)),(function(e){t({rawEvents:e})}),n)}}]}),Ao({eventSourceRefiners:{method:String,extraParams:yn,startParam:String,endParam:String,timeZoneParam:String},eventSourceDefs:[ai]}),Ao({recurringTypes:[ci],eventRefiners:{daysOfWeek:yn,startTime:Rt,endTime:Rt,duration:Rt,startRecur:yn,endRecur:yn}}),Ao({optionChangeHandlers:{events:function(e,t){si([e],t)},eventSources:si}}),Ao({isLoadingFuncs:[function(e){return Ho(e.eventSources)}],contentTypeHandlers:{html:function(){var e=null,t="";return{render:function(n,r){n===e&&r===t||(n.innerHTML=r),e=n,t=r},destroy:function(){e.innerHTML="",e=null,t=""}}},domNodes:function(){var e=null,t=[];function n(){t.forEach(Pe),t=[],e=null}return{render:function(r,o){var i=Array.prototype.slice.call(o);if(r!==e||!zt(t,i)){for(var a=0,c=i;a<c.length;a++){var s=c[a];r.appendChild(s)}n()}e=r,t=i},destroy:n}}},propSetHandlers:{dateProfile:function(e,t){t.emitter.trigger("datesSet",ie(ie({},ar(e.activeRange,t.dateEnv)),{view:t.viewApi}))},eventStore:function(e,t){var n=t.emitter;n.hasHandlers("eventsSet")&&n.trigger("eventsSet",Er(e,t))}}})];var li=function(){function e(e){this.drainedOption=e,this.isRunning=!1,this.isDirty=!1,this.pauseDepths={},this.timeoutId=0}return e.prototype.request=function(e){this.isDirty=!0,this.isPaused()||(this.clearTimeout(),null==e?this.tryDrain():this.timeoutId=setTimeout(this.tryDrain.bind(this),e))},e.prototype.pause=function(e){void 0===e&&(e="");var t=this.pauseDepths;t[e]=(t[e]||0)+1,this.clearTimeout()},e.prototype.resume=function(e,t){void 0===e&&(e="");var n=this.pauseDepths;if(e in n){if(t)delete n[e];else n[e]-=1,n[e]<=0&&delete n[e];this.tryDrain()}},e.prototype.isPaused=function(){return Object.keys(this.pauseDepths).length},e.prototype.tryDrain=function(){if(!this.isRunning&&!this.isPaused()){for(this.isRunning=!0;this.isDirty;)this.isDirty=!1,this.drained();this.isRunning=!1}},e.prototype.clear=function(){this.clearTimeout(),this.isDirty=!1,this.pauseDepths={}},e.prototype.clearTimeout=function(){this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=0)},e.prototype.drained=function(){this.drainedOption&&this.drainedOption()},e}(),di=function(){function e(e,t){this.runTaskOption=e,this.drainedOption=t,this.queue=[],this.delayedRunner=new li(this.drain.bind(this))}return e.prototype.request=function(e,t){this.queue.push(e),this.delayedRunner.request(t)},e.prototype.pause=function(e){this.delayedRunner.pause(e)},e.prototype.resume=function(e,t){this.delayedRunner.resume(e,t)},e.prototype.drain=function(){for(var e=this.queue;e.length;){for(var t=[],n=void 0;n=e.shift();)this.runTask(n),t.push(n);this.drained(t)}},e.prototype.runTask=function(e){this.runTaskOption&&this.runTaskOption(e)},e.prototype.drained=function(e){this.drainedOption&&this.drainedOption(e)},e}();function fi(e,t,n){var r;return r=/^(year|month)$/.test(e.currentRangeUnit)?e.currentRange:e.activeRange,n.formatRange(r.start,r.end,sn(t.titleFormat||function(e){var t=e.currentRangeUnit;if("year"===t)return{year:"numeric"};if("month"===t)return{year:"numeric",month:"long"};var n=ct(e.currentRange.start,e.currentRange.end);if(null!==n&&n>1)return{year:"numeric",month:"short",day:"numeric"};return{year:"numeric",month:"long",day:"numeric"}}(e)),{isEndExclusive:e.isRangeAllDay,defaultSeparator:t.titleRangeSeparator})}var pi=function(){function e(e){var t=this;this.computeOptionsData=Wt(this._computeOptionsData),this.computeCurrentViewData=Wt(this._computeCurrentViewData),this.organizeRawLocales=Wt(_r),this.buildLocale=Wt(jr),this.buildPluginHooks=xo(),this.buildDateEnv=Wt(hi),this.buildTheme=Wt(mi),this.parseToolbars=Wt(ti),this.buildViewSpecs=Wt(No),this.buildDateProfileGenerator=Vt(gi),this.buildViewApi=Wt(vi),this.buildViewUiProps=Vt(wi),this.buildEventUiBySource=Wt(yi,Ot),this.buildEventUiBases=Wt(bi),this.parseContextBusinessHours=Vt(xi),this.buildTitle=Wt(fi),this.emitter=new io,this.actionRunner=new di(this._handleAction.bind(this),this.updateData.bind(this)),this.currentCalendarOptionsInput={},this.currentCalendarOptionsRefined={},this.currentViewOptionsInput={},this.currentViewOptionsRefined={},this.currentCalendarOptionsRefiners={},this.getCurrentData=function(){return t.data},this.dispatch=function(e){t.actionRunner.request(e)},this.props=e,this.actionRunner.pause();var n={},r=this.computeOptionsData(e.optionOverrides,n,e.calendarApi),o=r.calendarOptions.initialView||r.pluginHooks.initialView,i=this.computeCurrentViewData(o,r,e.optionOverrides,n);e.calendarApi.currentDataManager=this,this.emitter.setThisContext(e.calendarApi),this.emitter.setOptions(i.options);var a=function(e,t){var n=e.initialDate;return null!=n?t.createMarker(n):br(e.now,t)}(r.calendarOptions,r.dateEnv),c=i.dateProfileGenerator.build(a);Yn(c.activeRange,a)||(a=c.currentRange.start);for(var s={dateEnv:r.dateEnv,options:r.calendarOptions,pluginHooks:r.pluginHooks,calendarApi:e.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData},u=0,l=r.pluginHooks.contextInit;u<l.length;u++){(0,l[u])(s)}for(var d=Fo(r.calendarOptions,c,s),f={dynamicOptionOverrides:n,currentViewType:o,currentDate:a,dateProfile:c,businessHours:this.parseContextBusinessHours(s),eventSources:d,eventUiBases:{},eventStore:{defs:{},instances:{}},renderableEventStore:{defs:{},instances:{}},dateSelection:null,eventSelection:"",eventDrag:null,eventResize:null,selectionConfig:this.buildViewUiProps(s).selectionConfig},p=ie(ie({},s),f),h=0,m=r.pluginHooks.reducers;h<m.length;h++){var g=m[h];ie(f,g(null,null,p))}Ai(f,s)&&this.emitter.trigger("loading",!0),this.state=f,this.updateData(),this.actionRunner.resume()}return e.prototype.resetOptions=function(e,t){var n=this.props;n.optionOverrides=t?ie(ie({},n.optionOverrides),e):e,this.actionRunner.request({type:"NOTHING"})},e.prototype._handleAction=function(e){var t=this,n=t.props,r=t.state,o=t.emitter,i=function(e,t){var n;return"SET_OPTION"===t.type?ie(ie({},e),((n={})[t.optionName]=t.rawOptionValue,n)):e}(r.dynamicOptionOverrides,e),a=this.computeOptionsData(n.optionOverrides,i,n.calendarApi),c=function(e,t){"CHANGE_VIEW_TYPE"===t.type&&(e=t.viewType);return e}(r.currentViewType,e),s=this.computeCurrentViewData(c,a,n.optionOverrides,i);n.calendarApi.currentDataManager=this,o.setThisContext(n.calendarApi),o.setOptions(s.options);var u={dateEnv:a.dateEnv,options:a.calendarOptions,pluginHooks:a.pluginHooks,calendarApi:n.calendarApi,dispatch:this.dispatch,emitter:o,getCurrentData:this.getCurrentData},l=r.currentDate,d=r.dateProfile;this.data&&this.data.dateProfileGenerator!==s.dateProfileGenerator&&(d=s.dateProfileGenerator.build(l)),l=function(e,t){return"CHANGE_DATE"===t.type?t.dateMarker:e}(l,e),d=function(e,t,n,r){var o;switch(t.type){case"CHANGE_VIEW_TYPE":return r.build(t.dateMarker||n);case"CHANGE_DATE":return r.build(t.dateMarker);case"PREV":if((o=r.buildPrev(e,n)).isValid)return o;break;case"NEXT":if((o=r.buildNext(e,n)).isValid)return o}return e}(d,e,l,s.dateProfileGenerator),"PREV"!==e.type&&"NEXT"!==e.type&&Yn(d.currentRange,l)||(l=d.currentRange.start);for(var f=Lo(r.eventSources,e,d,u),p=Go(r.eventStore,e,f,d,u),h=Ho(f)&&!s.options.progressiveEventRendering&&r.renderableEventStore||p,m=this.buildViewUiProps(u),g=m.eventUiSingleBase,v=m.selectionConfig,y=this.buildEventUiBySource(f),b={dynamicOptionOverrides:i,currentViewType:c,currentDate:l,dateProfile:d,eventSources:f,eventStore:p,renderableEventStore:h,selectionConfig:v,eventUiBases:this.buildEventUiBases(h.defs,g,y),businessHours:this.parseContextBusinessHours(u),dateSelection:Ko(r.dateSelection,e),eventSelection:$o(r.eventSelection,e),eventDrag:Jo(r.eventDrag,e),eventResize:ei(r.eventResize,e)},w=ie(ie({},u),b),A=0,x=a.pluginHooks.reducers;A<x.length;A++){var E=x[A];ie(b,E(r,e,w))}var O=Ai(r,u),C=Ai(b,u);!O&&C?o.trigger("loading",!0):O&&!C&&o.trigger("loading",!1),this.state=b,n.onAction&&n.onAction(e)},e.prototype.updateData=function(){var e,t,n,r,o=this.props,i=this.state,a=this.data,c=this.computeOptionsData(o.optionOverrides,i.dynamicOptionOverrides,o.calendarApi),s=this.computeCurrentViewData(i.currentViewType,c,o.optionOverrides,i.dynamicOptionOverrides),u=this.data=ie(ie(ie({viewTitle:this.buildTitle(i.dateProfile,s.options,c.dateEnv),calendarApi:o.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData},c),s),i),l=c.pluginHooks.optionChangeHandlers,d=a&&a.calendarOptions,f=c.calendarOptions;if(d&&d!==f)for(var p in d.timeZone!==f.timeZone&&(i.eventSources=u.eventSources=(e=u.eventSources,t=i.dateProfile,n=u,r=t?t.activeRange:null,Wo(e,Yo(e,n),r,!0,n)),i.eventStore=u.eventStore=function(e,t,n){var r=e.defs,o=At(e.instances,(function(e){var o=r[e.defId];return o.allDay||o.recurringDef?e:ie(ie({},e),{range:{start:n.createMarker(t.toDate(e.range.start,e.forcedStartTzo)),end:n.createMarker(t.toDate(e.range.end,e.forcedEndTzo))},forcedStartTzo:n.canComputeOffset?null:e.forcedStartTzo,forcedEndTzo:n.canComputeOffset?null:e.forcedEndTzo})}));return{defs:r,instances:o}}(u.eventStore,a.dateEnv,u.dateEnv)),l)d[p]!==f[p]&&l[p](f[p],u);o.onData&&o.onData(u)},e.prototype._computeOptionsData=function(e,t,n){var r=this.processRawCalendarOptions(e,t),o=r.refinedOptions,i=r.pluginHooks,a=r.localeDefaults,c=r.availableLocaleData;Ei(r.extra);var s=this.buildDateEnv(o.timeZone,o.locale,o.weekNumberCalculation,o.firstDay,o.weekText,i,c,o.defaultRangeSeparator),u=this.buildViewSpecs(i.views,e,t,a),l=this.buildTheme(o,i);return{calendarOptions:o,pluginHooks:i,dateEnv:s,viewSpecs:u,theme:l,toolbarConfig:this.parseToolbars(o,e,l,u,n),localeDefaults:a,availableRawLocales:c.map}},e.prototype.processRawCalendarOptions=function(e,t){var n=gn([ln,e,t]),r=n.locales,o=n.locale,i=this.organizeRawLocales(r),a=i.map,c=this.buildLocale(o||i.defaultCode,a).options,s=this.buildPluginHooks(e.plugins||[],ui),u=this.currentCalendarOptionsRefiners=ie(ie(ie(ie(ie({},un),dn),fn),s.listenerRefiners),s.optionRefiners),l={},d=gn([ln,c,e,t]),f={},p=this.currentCalendarOptionsInput,h=this.currentCalendarOptionsRefined,m=!1;for(var g in d)"plugins"!==g&&(d[g]===p[g]||pn[g]&&g in p&&pn[g](p[g],d[g])?f[g]=h[g]:u[g]?(f[g]=u[g](d[g]),m=!0):l[g]=p[g]);return m&&(this.currentCalendarOptionsInput=d,this.currentCalendarOptionsRefined=f),{rawOptions:this.currentCalendarOptionsInput,refinedOptions:this.currentCalendarOptionsRefined,pluginHooks:s,availableLocaleData:i,localeDefaults:c,extra:l}},e.prototype._computeCurrentViewData=function(e,t,n,r){var o=t.viewSpecs[e];if(!o)throw new Error('viewType "'+e+"\" is not available. Please make sure you've loaded all neccessary plugins");var i=this.processRawViewOptions(o,t.pluginHooks,t.localeDefaults,n,r),a=i.refinedOptions;return Ei(i.extra),{viewSpec:o,options:a,dateProfileGenerator:this.buildDateProfileGenerator({dateProfileGeneratorClass:o.optionDefaults.dateProfileGeneratorClass,duration:o.duration,durationUnit:o.durationUnit,usesMinMaxTime:o.optionDefaults.usesMinMaxTime,dateEnv:t.dateEnv,calendarApi:this.props.calendarApi,slotMinTime:a.slotMinTime,slotMaxTime:a.slotMaxTime,showNonCurrentDates:a.showNonCurrentDates,dayCount:a.dayCount,dateAlignment:a.dateAlignment,dateIncrement:a.dateIncrement,hiddenDays:a.hiddenDays,weekends:a.weekends,nowInput:a.now,validRangeInput:a.validRange,visibleRangeInput:a.visibleRange,monthMode:a.monthMode,fixedWeekCount:a.fixedWeekCount}),viewApi:this.buildViewApi(e,this.getCurrentData,t.dateEnv)}},e.prototype.processRawViewOptions=function(e,t,n,r,o){var i=gn([ln,e.optionDefaults,n,r,e.optionOverrides,o]),a=ie(ie(ie(ie(ie(ie({},un),dn),fn),mn),t.listenerRefiners),t.optionRefiners),c={},s=this.currentViewOptionsInput,u=this.currentViewOptionsRefined,l=!1,d={};for(var f in i)i[f]===s[f]||pn[f]&&pn[f](i[f],s[f])?c[f]=u[f]:(i[f]===this.currentCalendarOptionsInput[f]||pn[f]&&pn[f](i[f],this.currentCalendarOptionsInput[f])?f in this.currentCalendarOptionsRefined&&(c[f]=this.currentCalendarOptionsRefined[f]):a[f]?c[f]=a[f](i[f]):d[f]=i[f],l=!0);return l&&(this.currentViewOptionsInput=i,this.currentViewOptionsRefined=c),{rawOptions:this.currentViewOptionsInput,refinedOptions:this.currentViewOptionsRefined,extra:d}},e}();function hi(e,t,n,r,o,i,a,c){var s=jr(t||a.defaultCode,a.map);return new kr({calendarSystem:"gregory",timeZone:e,namedTimeZoneImpl:i.namedTimeZonedImpl,locale:s,weekNumberCalculation:n,firstDay:r,weekText:o,cmdFormatter:i.cmdFormatter,defaultSeparator:c})}function mi(e,t){return new(t.themeClasses[e.themeSystem]||Eo)(e)}function gi(e){return new(e.dateProfileGeneratorClass||Zo)(e)}function vi(e,t,n){return new mr(e,t,n)}function yi(e){return At(e,(function(e){return e.ui}))}function bi(e,t,n){var r={"":t};for(var o in e){var i=e[o];i.sourceId&&n[i.sourceId]&&(r[o]=n[i.sourceId])}return r}function wi(e){var t=e.options;return{eventUiSingleBase:Sn({display:t.eventDisplay,editable:t.editable,startEditable:t.eventStartEditable,durationEditable:t.eventDurationEditable,constraint:t.eventConstraint,overlap:"boolean"==typeof t.eventOverlap?t.eventOverlap:void 0,allow:t.eventAllow,backgroundColor:t.eventBackgroundColor,borderColor:t.eventBorderColor,textColor:t.eventTextColor,color:t.eventColor},e),selectionConfig:Sn({constraint:t.selectConstraint,overlap:"boolean"==typeof t.selectOverlap?t.selectOverlap:void 0,allow:t.selectAllow},e)}}function Ai(e,t){for(var n=0,r=t.pluginHooks.isLoadingFuncs;n<r.length;n++){if((0,r[n])(e))return!0}return!1}function xi(e){return Mr(e.options.businessHours,e)}function Ei(e,t){for(var n in e)console.warn("Unknown option '"+n+"'"+(t?" for view '"+t+"'":""))}var Oi=function(e){function t(t){var n=e.call(this,t)||this;return n.handleData=function(e){n.dataManager?n.setState(e):n.state=e},n.dataManager=new pi({optionOverrides:t.optionOverrides,calendarApi:t.calendarApi,onData:n.handleData}),n}return oe(t,e),t.prototype.render=function(){return this.props.children(this.state)},t.prototype.componentDidUpdate=function(e){var t=this.props.optionOverrides;t!==e.optionOverrides&&this.dataManager.resetOptions(t)},t}(Ae);var Ci=function(){function e(){this.strictOrder=!1,this.allowReslicing=!1,this.maxCoord=-1,this.maxStackCnt=-1,this.levelCoords=[],this.entriesByLevel=[],this.stackCnts={}}return e.prototype.addSegs=function(e){for(var t=[],n=0,r=e;n<r.length;n++){var o=r[n];this.insertEntry(o,t)}return t},e.prototype.insertEntry=function(e,t){var n=this.findInsertion(e);return this.isInsertionValid(n,e)?(this.insertEntryAt(e,n),1):this.handleInvalidInsertion(n,e,t)},e.prototype.isInsertionValid=function(e,t){return(-1===this.maxCoord||e.levelCoord+t.thickness<=this.maxCoord)&&(-1===this.maxStackCnt||e.stackCnt<this.maxStackCnt)},e.prototype.handleInvalidInsertion=function(e,t,n){return this.allowReslicing&&e.touchingEntry?this.splitEntry(t,e.touchingEntry,n):(n.push(t),0)},e.prototype.splitEntry=function(e,t,n){var r=0,o=[],i=e.span,a=t.span;return i.start<a.start&&(r+=this.insertEntry({index:e.index,thickness:e.thickness,span:{start:i.start,end:a.start}},o)),i.end>a.end&&(r+=this.insertEntry({index:e.index,thickness:e.thickness,span:{start:a.end,end:i.end}},o)),r?(n.push.apply(n,ae([{index:e.index,thickness:e.thickness,span:Di(a,i)}],o)),r):(n.push(e),0)},e.prototype.insertEntryAt=function(e,t){var n=this.entriesByLevel,r=this.levelCoords;-1===t.lateral?(Pi(r,t.level,t.levelCoord),Pi(n,t.level,[e])):Pi(n[t.level],t.lateral,e),this.stackCnts[Si(e)]=t.stackCnt},e.prototype.findInsertion=function(e){for(var t=this,n=t.levelCoords,r=t.entriesByLevel,o=t.strictOrder,i=t.stackCnts,a=n.length,c=0,s=-1,u=-1,l=null,d=0,f=0;f<a;f+=1){var p=n[f];if(!o&&p>=c+e.thickness)break;for(var h=r[f],m=void 0,g=_i(h,e.span.start,ki),v=g[0]+g[1];(m=h[v])&&m.span.start<e.span.end;){var y=p+m.thickness;y>c&&(c=y,l=m,s=f,u=v),y===c&&(d=Math.max(d,i[Si(m)]+1)),v+=1}}var b=0;if(l)for(b=s+1;b<a&&n[b]<c;)b+=1;var w=-1;return b<a&&n[b]===c&&(w=_i(r[b],e.span.end,ki)[0]),{touchingLevel:s,touchingLateral:u,touchingEntry:l,stackCnt:d,levelCoord:c,level:b,lateral:w}},e.prototype.toRects=function(){for(var e=this.entriesByLevel,t=this.levelCoords,n=e.length,r=[],o=0;o<n;o+=1)for(var i=e[o],a=t[o],c=0,s=i;c<s.length;c++){var u=s[c];r.push(ie(ie({},u),{levelCoord:a}))}return r},e}();function ki(e){return e.span.end}function Si(e){return e.index+":"+e.span.start}function Di(e,t){var n=Math.max(e.start,t.start),r=Math.min(e.end,t.end);return n<r?{start:n,end:r}:null}function Pi(e,t,n){e.splice(t,0,n)}function _i(e,t,n){var r=0,o=e.length;if(!o||t<n(e[r]))return[0,0];if(t>n(e[o-1]))return[o,0];for(;r<o;){var i=Math.floor(r+(o-r)/2),a=n(e[i]);if(t<a)o=i;else{if(!(t>a))return[i,1];r=i+1}}return[r,0]}var ji=function(){function e(e){this.component=e.component,this.isHitComboAllowed=e.isHitComboAllowed||null}return e.prototype.destroy=function(){},e}();function Ti(e,t){return{component:e,el:t.el,useEventCenter:null==t.useEventCenter||t.useEventCenter,isHitComboAllowed:t.isHitComboAllowed||null}}function Ri(e){var t;return(t={})[e.component.uid]=e,t}var Ii={},Mi=function(){function e(e,t){this.emitter=new io}return e.prototype.destroy=function(){},e.prototype.setMirrorIsVisible=function(e){},e.prototype.setMirrorNeedsRevert=function(e){},e.prototype.setAutoScrollEnabled=function(e){},e}(),Ni={},Bi={startTime:Rt,duration:Rt,create:Boolean,sourceId:String};function Zi(e){var t=vn(e,Bi),n=t.refined,r=t.extra;return{startTime:n.startTime||null,duration:n.duration||null,create:null==n.create||n.create,sourceId:n.sourceId,leftoverProps:r}}var Fi=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return oe(t,e),t.prototype.render=function(){var e=this,t=this.props.widgetGroups.map((function(t){return e.renderWidgetGroup(t)}));return xe.apply(void 0,ae(["div",{className:"fc-toolbar-chunk"}],t))},t.prototype.renderWidgetGroup=function(e){for(var t=this.props,n=this.context.theme,r=[],o=!0,i=0,a=e;i<a.length;i++){var c=a[i],s=c.buttonName,u=c.buttonClick,l=c.buttonText,d=c.buttonIcon,f=c.buttonHint;if("title"===s)o=!1,r.push(xe("h2",{className:"fc-toolbar-title",id:t.titleId},t.title));else{var p=s===t.activeButton,h=!t.isTodayEnabled&&"today"===s||!t.isPrevEnabled&&"prev"===s||!t.isNextEnabled&&"next"===s,m=["fc-"+s+"-button",n.getClass("button")];p&&m.push(n.getClass("buttonActive")),r.push(xe("button",{type:"button",title:"function"==typeof f?f(t.navUnit):f,disabled:h,"aria-pressed":p,className:m.join(" "),onClick:u},l||(d?xe("span",{className:d}):"")))}}if(r.length>1){var g=o&&n.getClass("buttonGroup")||"";return xe.apply(void 0,ae(["div",{className:g}],r))}return r[0]},t}(go),Li=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return oe(t,e),t.prototype.render=function(){var e,t,n=this.props,r=n.model,o=n.extraClassName,i=!1,a=r.sectionWidgets,c=a.center;return a.left?(i=!0,e=a.left):e=a.start,a.right?(i=!0,t=a.right):t=a.end,xe("div",{className:[o||"","fc-toolbar",i?"fc-toolbar-ltr":""].join(" ")},this.renderSection("start",e||[]),this.renderSection("center",c||[]),this.renderSection("end",t||[]))},t.prototype.renderSection=function(e,t){var n=this.props;return xe(Fi,{key:e,widgetGroups:t,title:n.title,navUnit:n.navUnit,activeButton:n.activeButton,isTodayEnabled:n.isTodayEnabled,isPrevEnabled:n.isPrevEnabled,isNextEnabled:n.isNextEnabled,titleId:n.titleId})},t}(go),Hi=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={availableWidth:null},t.handleEl=function(e){t.el=e,bo(t.props.elRef,e),t.updateAvailableWidth()},t.handleResize=function(){t.updateAvailableWidth()},t}return oe(t,e),t.prototype.render=function(){var e=this.props,t=this.state,n=e.aspectRatio,r=["fc-view-harness",n||e.liquid||e.height?"fc-view-harness-active":"fc-view-harness-passive"],o="",i="";return n?null!==t.availableWidth?o=t.availableWidth/n:i=1/n*100+"%":o=e.height||"",xe("div",{"aria-labelledby":e.labeledById,ref:this.handleEl,className:r.join(" "),style:{height:o,paddingBottom:i}},e.children)},t.prototype.componentDidMount=function(){this.context.addResizeHandler(this.handleResize)},t.prototype.componentWillUnmount=function(){this.context.removeResizeHandler(this.handleResize)},t.prototype.updateAvailableWidth=function(){this.el&&this.props.aspectRatio&&this.setState({availableWidth:this.el.offsetWidth})},t}(go),Ui=function(e){function t(t){var n=e.call(this,t)||this;return n.handleSegClick=function(e,t){var r=n.component,o=r.context,i=Qn(t);if(i&&r.isValidSegDownEl(e.target)){var a=_e(e.target,".fc-event-forced-url"),c=a?a.querySelector("a[href]").href:"";o.emitter.trigger("eventClick",{el:t,event:new Ar(r.context,i.eventRange.def,i.eventRange.instance),jsEvent:e,view:o.viewApi}),c&&!e.defaultPrevented&&(window.location.href=c)}},n.destroy=He(t.el,"click",".fc-event",n.handleSegClick),n}return oe(t,e),t}(ji),zi=function(e){function t(t){var n=e.call(this,t)||this;return n.handleEventElRemove=function(e){e===n.currentSegEl&&n.handleSegLeave(null,n.currentSegEl)},n.handleSegEnter=function(e,t){Qn(t)&&(n.currentSegEl=t,n.triggerEvent("eventMouseEnter",e,t))},n.handleSegLeave=function(e,t){n.currentSegEl&&(n.currentSegEl=null,n.triggerEvent("eventMouseLeave",e,t))},n.removeHoverListeners=function(e,t,n,r){var o;return He(e,"mouseover",t,(function(e,t){if(t!==o){o=t,n(e,t);var i=function(e){o=null,r(e,t),t.removeEventListener("mouseleave",i)};t.addEventListener("mouseleave",i)}}))}(t.el,".fc-event",n.handleSegEnter,n.handleSegLeave),n}return oe(t,e),t.prototype.destroy=function(){this.removeHoverListeners()},t.prototype.triggerEvent=function(e,t,n){var r=this.component,o=r.context,i=Qn(n);t&&!r.isValidSegDownEl(t.target)||o.emitter.trigger(e,{el:n,event:new Ar(o,i.eventRange.def,i.eventRange.instance),jsEvent:t,view:o.viewApi})},t}(ji),Wi=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.buildViewContext=Wt(ho),t.buildViewPropTransformers=Wt(Yi),t.buildToolbarProps=Wt(Vi),t.headerRef=Ee(),t.footerRef=Ee(),t.interactionsStore={},t.state={viewLabelId:Fe()},t.registerInteractiveComponent=function(e,n){var r=Ti(e,n),o=[Ui,zi].concat(t.props.pluginHooks.componentInteractions).map((function(e){return new e(r)}));t.interactionsStore[e.uid]=o,Ii[e.uid]=r},t.unregisterInteractiveComponent=function(e){var n=t.interactionsStore[e.uid];if(n){for(var r=0,o=n;r<o.length;r++){o[r].destroy()}delete t.interactionsStore[e.uid]}delete Ii[e.uid]},t.resizeRunner=new li((function(){t.props.emitter.trigger("_resize",!0),t.props.emitter.trigger("windowResize",{view:t.props.viewApi})})),t.handleWindowResize=function(e){var n=t.props.options;n.handleWindowResize&&e.target===window&&t.resizeRunner.request(n.windowResizeDelay)},t}return oe(t,e),t.prototype.render=function(){var e,t=this.props,n=t.toolbarConfig,r=t.options,o=this.buildToolbarProps(t.viewSpec,t.dateProfile,t.dateProfileGenerator,t.currentDate,br(t.options.now,t.dateEnv),t.viewTitle),i=!1,a="";t.isHeightAuto||t.forPrint?a="":null!=r.height?i=!0:null!=r.contentHeight?a=r.contentHeight:e=Math.max(r.aspectRatio,.5);var c=this.buildViewContext(t.viewSpec,t.viewApi,t.options,t.dateProfileGenerator,t.dateEnv,t.theme,t.pluginHooks,t.dispatch,t.getCurrentData,t.emitter,t.calendarApi,this.registerInteractiveComponent,this.unregisterInteractiveComponent),s=n.header&&n.header.hasTitle?this.state.viewLabelId:"";return xe(po.Provider,{value:c},n.header&&xe(Li,ie({ref:this.headerRef,extraClassName:"fc-header-toolbar",model:n.header,titleId:s},o)),xe(Hi,{liquid:i,height:a,aspectRatio:e,labeledById:s},this.renderView(t),this.buildAppendContent()),n.footer&&xe(Li,ie({ref:this.footerRef,extraClassName:"fc-footer-toolbar",model:n.footer,titleId:""},o)))},t.prototype.componentDidMount=function(){var e=this.props;this.calendarInteractions=e.pluginHooks.calendarInteractions.map((function(t){return new t(e)})),window.addEventListener("resize",this.handleWindowResize);var t=e.pluginHooks.propSetHandlers;for(var n in t)t[n](e[n],e)},t.prototype.componentDidUpdate=function(e){var t=this.props,n=t.pluginHooks.propSetHandlers;for(var r in n)t[r]!==e[r]&&n[r](t[r],t)},t.prototype.componentWillUnmount=function(){window.removeEventListener("resize",this.handleWindowResize),this.resizeRunner.clear();for(var e=0,t=this.calendarInteractions;e<t.length;e++){t[e].destroy()}this.props.emitter.trigger("_unmount")},t.prototype.buildAppendContent=function(){var e=this.props,t=e.pluginHooks.viewContainerAppends.map((function(t){return t(e)}));return xe.apply(void 0,ae([Oe,{}],t))},t.prototype.renderView=function(e){for(var t=e.pluginHooks,n=e.viewSpec,r={dateProfile:e.dateProfile,businessHours:e.businessHours,eventStore:e.renderableEventStore,eventUiBases:e.eventUiBases,dateSelection:e.dateSelection,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,isHeightAuto:e.isHeightAuto,forPrint:e.forPrint},o=0,i=this.buildViewPropTransformers(t.viewPropsTransformers);o<i.length;o++){var a=i[o];ie(r,a.transform(r,e))}var c=n.component;return xe(c,ie({},r))},t}(mo);function Vi(e,t,n,r,o,i){var a=n.build(o,void 0,!1),c=n.buildPrev(t,r,!1),s=n.buildNext(t,r,!1);return{title:i,activeButton:e.type,navUnit:e.singleUnit,isTodayEnabled:a.isValid&&!Yn(t.currentRange,o),isPrevEnabled:c.isValid,isNextEnabled:s.isValid}}function Yi(e){return e.map((function(e){return new e}))}var qi=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={forPrint:!1},t.handleBeforePrint=function(){t.setState({forPrint:!0})},t.handleAfterPrint=function(){t.setState({forPrint:!1})},t}return oe(t,e),t.prototype.render=function(){var e=this.props,t=e.options,n=this.state.forPrint,r=n||"auto"===t.height||"auto"===t.contentHeight,o=r||null==t.height?"":t.height,i=["fc",n?"fc-media-print":"fc-media-screen","fc-direction-"+t.direction,e.theme.getClass("root")];return Fr()||i.push("fc-liquid-hack"),e.children(i,o,r,n)},t.prototype.componentDidMount=function(){var e=this.props.emitter;e.on("_beforeprint",this.handleBeforePrint),e.on("_afterprint",this.handleAfterPrint)},t.prototype.componentWillUnmount=function(){var e=this.props.emitter;e.off("_beforeprint",this.handleBeforePrint),e.off("_afterprint",this.handleAfterPrint)},t}(go);function Gi(e,t){return sn(!e||t>10?{weekday:"short"}:t>1?{weekday:"short",month:"numeric",day:"numeric",omitCommas:!0}:{weekday:"long"})}var Qi="fc-col-header-cell";function Xi(e){return e.text}var Ki=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return oe(t,e),t.prototype.render=function(){var e=this.context,t=e.dateEnv,n=e.options,r=e.theme,o=e.viewApi,i=this.props,a=i.date,c=i.dateProfile,s=zr(a,i.todayRange,null,c),u=[Qi].concat(Wr(s,r)),l=t.format(a,i.dayHeaderFormat),d=!s.isDisabled&&i.colCnt>1?Gr(this.context,a):{},f=ie(ie(ie({date:t.toDate(a),view:o},i.extraHookProps),{text:l}),s);return xe(Co,{hookProps:f,classNames:n.dayHeaderClassNames,content:n.dayHeaderContent,defaultContent:Xi,didMount:n.dayHeaderDidMount,willUnmount:n.dayHeaderWillUnmount},(function(e,t,n,r){return xe("th",ie({ref:e,role:"columnheader",className:u.concat(t).join(" "),"data-date":s.isDisabled?void 0:Ht(a),colSpan:i.colSpan},i.extraDataAttrs),xe("div",{className:"fc-scrollgrid-sync-inner"},!s.isDisabled&&xe("a",ie({ref:n,className:["fc-col-header-cell-cushion",i.isSticky?"fc-sticky":""].join(" ")},d),r)))}))},t}(go),$i=sn({weekday:"long"}),Ji=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return oe(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=t.dateEnv,r=t.theme,o=t.viewApi,i=t.options,a=ot(new Date(2592e5),e.dow),c={dow:e.dow,isDisabled:!1,isFuture:!1,isPast:!1,isToday:!1,isOther:!1},s=[Qi].concat(Wr(c,r),e.extraClassNames||[]),u=n.format(a,e.dayHeaderFormat),l=ie(ie(ie(ie({date:a},c),{view:o}),e.extraHookProps),{text:u});return xe(Co,{hookProps:l,classNames:i.dayHeaderClassNames,content:i.dayHeaderContent,defaultContent:Xi,didMount:i.dayHeaderDidMount,willUnmount:i.dayHeaderWillUnmount},(function(t,r,o,i){return xe("th",ie({ref:t,role:"columnheader",className:s.concat(r).join(" "),colSpan:e.colSpan},e.extraDataAttrs),xe("div",{className:"fc-scrollgrid-sync-inner"},xe("a",{"aria-label":n.format(a,$i),className:["fc-col-header-cell-cushion",e.isSticky?"fc-sticky":""].join(" "),ref:o},i)))}))},t}(go),ea=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.initialNowDate=br(n.options.now,n.dateEnv),r.initialNowQueriedMs=(new Date).valueOf(),r.state=r.computeTiming().currentState,r}return oe(t,e),t.prototype.render=function(){var e=this.props,t=this.state;return e.children(t.nowDate,t.todayRange)},t.prototype.componentDidMount=function(){this.setTimeout()},t.prototype.componentDidUpdate=function(e){e.unit!==this.props.unit&&(this.clearTimeout(),this.setTimeout())},t.prototype.componentWillUnmount=function(){this.clearTimeout()},t.prototype.computeTiming=function(){var e=this.props,t=this.context,n=it(this.initialNowDate,(new Date).valueOf()-this.initialNowQueriedMs),r=t.dateEnv.startOf(n,e.unit),o=t.dateEnv.add(r,Rt(1,e.unit)),i=o.valueOf()-n.valueOf();return i=Math.min(864e5,i),{currentState:{nowDate:r,todayRange:ta(r)},nextState:{nowDate:o,todayRange:ta(o)},waitMs:i}},t.prototype.setTimeout=function(){var e=this,t=this.computeTiming(),n=t.nextState,r=t.waitMs;this.timeoutId=setTimeout((function(){e.setState(n,(function(){e.setTimeout()}))}),r)},t.prototype.clearTimeout=function(){this.timeoutId&&clearTimeout(this.timeoutId)},t.contextType=po,t}(Ae);function ta(e){var t=st(e);return{start:t,end:ot(t,1)}}!function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.createDayHeaderFormatter=Wt(na),t}oe(t,e),t.prototype.render=function(){var e=this.context,t=this.props,n=t.dates,r=t.dateProfile,o=t.datesRepDistinctDays,i=t.renderIntro,a=this.createDayHeaderFormatter(e.options.dayHeaderFormat,o,n.length);return xe(ea,{unit:"day"},(function(e,t){return xe("tr",{role:"row"},i&&i("day"),n.map((function(e){return o?xe(Ki,{key:e.toISOString(),date:e,dateProfile:r,todayRange:t,colCnt:n.length,dayHeaderFormat:a}):xe(Ji,{key:e.getUTCDay(),dow:e.getUTCDay(),dayHeaderFormat:a})})))}))}}(go);function na(e,t,n){return e||Gi(t,n)}(function(){function e(e,t){for(var n=e.start,r=e.end,o=[],i=[],a=-1;n<r;)t.isHiddenDay(n)?o.push(a+.5):(a+=1,o.push(a),i.push(n)),n=ot(n,1);this.dates=i,this.indices=o,this.cnt=i.length}e.prototype.sliceRange=function(e){var t=this.getDateDayIndex(e.start),n=this.getDateDayIndex(ot(e.end,-1)),r=Math.max(0,t),o=Math.min(this.cnt-1,n);return(r=Math.ceil(r))<=(o=Math.floor(o))?{firstIndex:r,lastIndex:o,isStart:t===r,isEnd:n===o}:null},e.prototype.getDateDayIndex=function(e){var t=this.indices,n=Math.floor(at(this.dates[0],e));return n<0?t[0]-1:n>=t.length?t[t.length-1]+1:t[n]}})(),function(){function e(e,t){var n,r,o,i=e.dates;if(t){for(r=i[0].getUTCDay(),n=1;n<i.length&&i[n].getUTCDay()!==r;n+=1);o=Math.ceil(i.length/n)}else o=1,n=i.length;this.rowCnt=o,this.colCnt=n,this.daySeries=e,this.cells=this.buildCells(),this.headerDates=this.buildHeaderDates()}e.prototype.buildCells=function(){for(var e=[],t=0;t<this.rowCnt;t+=1){for(var n=[],r=0;r<this.colCnt;r+=1)n.push(this.buildCell(t,r));e.push(n)}return e},e.prototype.buildCell=function(e,t){var n=this.daySeries.dates[e*this.colCnt+t];return{key:n.toISOString(),date:n}},e.prototype.buildHeaderDates=function(){for(var e=[],t=0;t<this.colCnt;t+=1)e.push(this.cells[0][t].date);return e},e.prototype.sliceRange=function(e){var t=this.colCnt,n=this.daySeries.sliceRange(e),r=[];if(n)for(var o=n.firstIndex,i=n.lastIndex,a=o;a<=i;){var c=Math.floor(a/t),s=Math.min((c+1)*t,i+1);r.push({row:c,firstCol:a%t,lastCol:(s-1)%t,isStart:n.isStart&&a===o,isEnd:n.isEnd&&s-1===i}),a=s}return r}}();var ra=function(){function e(){this.sliceBusinessHours=Wt(this._sliceBusinessHours),this.sliceDateSelection=Wt(this._sliceDateSpan),this.sliceEventStore=Wt(this._sliceEventStore),this.sliceEventDrag=Wt(this._sliceInteraction),this.sliceEventResize=Wt(this._sliceInteraction),this.forceDayIfListItem=!1}return e.prototype.sliceProps=function(e,t,n,r){for(var o=[],i=4;i<arguments.length;i++)o[i-4]=arguments[i];var a=e.eventUiBases,c=this.sliceEventStore.apply(this,ae([e.eventStore,a,t,n],o));return{dateSelectionSegs:this.sliceDateSelection.apply(this,ae([e.dateSelection,a,r],o)),businessHourSegs:this.sliceBusinessHours.apply(this,ae([e.businessHours,t,n,r],o)),fgEventSegs:c.fg,bgEventSegs:c.bg,eventDrag:this.sliceEventDrag.apply(this,ae([e.eventDrag,a,t,n],o)),eventResize:this.sliceEventResize.apply(this,ae([e.eventResize,a,t,n],o)),eventSelection:e.eventSelection}},e.prototype.sliceNowDate=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return this._sliceDateSpan.apply(this,ae([{range:{start:e,end:it(e,1)},allDay:!1},{},t],n))},e.prototype._sliceBusinessHours=function(e,t,n,r){for(var o=[],i=4;i<arguments.length;i++)o[i-4]=arguments[i];return e?this._sliceEventStore.apply(this,ae([Pt(e,oa(t,Boolean(n)),r),{},t,n],o)).bg:[]},e.prototype._sliceEventStore=function(e,t,n,r){for(var o=[],i=4;i<arguments.length;i++)o[i-4]=arguments[i];if(e){var a=qn(e,t,oa(n,Boolean(r)),r);return{bg:this.sliceEventRanges(a.bg,o),fg:this.sliceEventRanges(a.fg,o)}}return{bg:[],fg:[]}},e.prototype._sliceInteraction=function(e,t,n,r){for(var o=[],i=4;i<arguments.length;i++)o[i-4]=arguments[i];if(!e)return null;var a=qn(e.mutatedEvents,t,oa(n,Boolean(r)),r);return{segs:this.sliceEventRanges(a.fg,o),affectedInstances:e.affectedEvents.instances,isEvent:e.isEvent}},e.prototype._sliceDateSpan=function(e,t,n){for(var r=[],o=3;o<arguments.length;o++)r[o-3]=arguments[o];if(!e)return[];for(var i=sr(e,t,n),a=this.sliceRange.apply(this,ae([e.range],r)),c=0,s=a;c<s.length;c++){var u=s[c];u.eventRange=i}return a},e.prototype.sliceEventRanges=function(e,t){for(var n=[],r=0,o=e;r<o.length;r++){var i=o[r];n.push.apply(n,this.sliceEventRange(i,t))}return n},e.prototype.sliceEventRange=function(e,t){var n=e.range;this.forceDayIfListItem&&"list-item"===e.ui.display&&(n={start:n.start,end:ot(n.start,1)});for(var r=this.sliceRange.apply(this,ae([n],t)),o=0,i=r;o<i.length;o++){var a=i[o];a.eventRange=e,a.isStart=e.isStart&&a.isStart,a.isEnd=e.isEnd&&a.isEnd}return r},e}();function oa(e,t){var n=e.activeRange;return t?n:{start:it(n.start,e.slotMinTime.milliseconds),end:it(n.end,e.slotMaxTime.milliseconds-864e5)}}function ia(e,t,n){var r=e.mutatedEvents.instances;for(var o in r)if(!Vn(t.validRange,r[o].range))return!1;return aa({eventDrag:e},n)}function aa(e,t){var n=t.getCurrentData(),r=ie({businessHours:n.businessHours,dateSelection:"",eventStore:n.eventStore,eventUiBases:n.eventUiBases,eventSelection:"",eventDrag:null,eventResize:null},e);return(t.pluginHooks.isPropsValid||ca)(r,t)}function ca(e,t,n,r){return void 0===n&&(n={}),!(e.eventDrag&&!function(e,t,n,r){var o=t.getCurrentData(),i=e.eventDrag,a=i.mutatedEvents,c=a.defs,s=a.instances,u=Xn(c,i.isEvent?e.eventUiBases:{"":o.selectionConfig});r&&(u=At(u,r));var l=(h=e.eventStore,m=i.affectedEvents.instances,{defs:h.defs,instances:wt(h.instances,(function(e){return!m[e.instanceId]}))}),d=l.defs,f=l.instances,p=Xn(d,e.eventUiBases);var h,m;for(var g in s){var v=s[g],y=v.range,b=u[v.defId],w=c[v.defId];if(!sa(b.constraints,y,l,e.businessHours,t))return!1;var A=t.options.eventOverlap,x="function"==typeof A?A:null;for(var E in f){var O=f[E];if(Wn(y,O.range)){if(!1===p[O.defId].overlap&&i.isEvent)return!1;if(!1===b.overlap)return!1;if(x&&!x(new Ar(t,d[O.defId],O),new Ar(t,w,v)))return!1}}for(var C=o.eventStore,k=0,S=b.allows;k<S.length;k++){var D=S[k],P=ie(ie({},n),{range:v.range,allDay:w.allDay}),_=C.defs[w.defId],j=C.instances[g],T=void 0;if(T=_?new Ar(t,_,j):new Ar(t,w),!D(lr(P,t),T))return!1}}return!0}(e,t,n,r))&&!(e.dateSelection&&!function(e,t,n,r){var o=e.eventStore,i=o.defs,a=o.instances,c=e.dateSelection,s=c.range,u=t.getCurrentData().selectionConfig;r&&(u=r(u));if(!sa(u.constraints,s,o,e.businessHours,t))return!1;var l=t.options.selectOverlap,d="function"==typeof l?l:null;for(var f in a){var p=a[f];if(Wn(s,p.range)){if(!1===u.overlap)return!1;if(d&&!d(new Ar(t,i[p.defId],p),null))return!1}}for(var h=0,m=u.allows;h<m.length;h++){if(!(0,m[h])(lr(ie(ie({},n),c),t),null))return!1}return!0}(e,t,n,r))}function sa(e,t,n,r,o){for(var i=0,a=e;i<a.length;i++){if(!da(ua(a[i],t,n,r,o),t))return!1}return!0}function ua(e,t,n,r,o){return"businessHours"===e?la(Pt(r,t,o)):"string"==typeof e?la(En(n,(function(t){return t.groupId===e}))):"object"==typeof e&&e?la(Pt(e,t,o)):[]}function la(e){var t=e.instances,n=[];for(var r in t)n.push(t[r].range);return n}function da(e,t){for(var n=0,r=e;n<r.length;n++){if(Vn(r[n],t))return!0}return!1}var fa=/^(visible|hidden)$/,pa=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleEl=function(e){t.el=e,bo(t.props.elRef,e)},t}return oe(t,e),t.prototype.render=function(){var e=this.props,t=e.liquid,n=e.liquidIsAbsolute,r=t&&n,o=["fc-scroller"];return t&&(n?o.push("fc-scroller-liquid-absolute"):o.push("fc-scroller-liquid")),xe("div",{ref:this.handleEl,className:o.join(" "),style:{overflowX:e.overflowX,overflowY:e.overflowY,left:r&&-(e.overcomeLeft||0)||"",right:r&&-(e.overcomeRight||0)||"",bottom:r&&-(e.overcomeBottom||0)||"",marginLeft:!r&&-(e.overcomeLeft||0)||"",marginRight:!r&&-(e.overcomeRight||0)||"",marginBottom:!r&&-(e.overcomeBottom||0)||"",maxHeight:e.maxHeight||""}},e.children)},t.prototype.needsXScrolling=function(){if(fa.test(this.props.overflowX))return!1;for(var e=this.el,t=this.el.getBoundingClientRect().width-this.getYScrollbarWidth(),n=e.children,r=0;r<n.length;r+=1){if(n[r].getBoundingClientRect().width>t)return!0}return!1},t.prototype.needsYScrolling=function(){if(fa.test(this.props.overflowY))return!1;for(var e=this.el,t=this.el.getBoundingClientRect().height-this.getXScrollbarWidth(),n=e.children,r=0;r<n.length;r+=1){if(n[r].getBoundingClientRect().height>t)return!0}return!1},t.prototype.getXScrollbarWidth=function(){return fa.test(this.props.overflowX)?0:this.el.offsetHeight-this.el.clientHeight},t.prototype.getYScrollbarWidth=function(){return fa.test(this.props.overflowY)?0:this.el.offsetWidth-this.el.clientWidth},t}(go),ha=function(){function e(e){var t=this;this.masterCallback=e,this.currentMap={},this.depths={},this.callbackMap={},this.handleValue=function(e,n){var r=t,o=r.depths,i=r.currentMap,a=!1,c=!1;null!==e?(a=n in i,i[n]=e,o[n]=(o[n]||0)+1,c=!0):(o[n]-=1,o[n]||(delete i[n],delete t.callbackMap[n],a=!0)),t.masterCallback&&(a&&t.masterCallback(null,String(n)),c&&t.masterCallback(e,String(n)))}}return e.prototype.createRef=function(e){var t=this,n=this.callbackMap[e];return n||(n=this.callbackMap[e]=function(n){t.handleValue(n,String(e))}),n},e.prototype.collect=function(e,t,n){return Dt(this.currentMap,e,t,n)},e.prototype.getAll=function(){return Et(this.currentMap)},e}();function ma(e){for(var t=0,n=0,r=Te(e,".fc-scrollgrid-shrink");n<r.length;n++){var o=r[n];t=Math.max(t,nt(o))}return Math.ceil(t)}function ga(e,t){return e.liquid&&t.liquid}function va(e,t){return null!=t.maxHeight||ga(e,t)}function ya(e,t,n,r){var o=n.expandRows;return"function"==typeof t.content?t.content(n):xe("table",{role:"presentation",className:[t.tableClassName,e.syncRowHeights?"fc-scrollgrid-sync-table":""].join(" "),style:{minWidth:n.tableMinWidth,width:n.clientWidth,height:o?n.clientHeight:""}},n.tableColGroupNode,xe(r?"thead":"tbody",{role:"presentation"},"function"==typeof t.rowContent?t.rowContent(n):t.rowContent))}function ba(e,t){return zt(e,t,Ot)}function wa(e,t){for(var n=[],r=0,o=e;r<o.length;r++)for(var i=o[r],a=i.span||1,c=0;c<a;c+=1)n.push(xe("col",{style:{width:"shrink"===i.width?Aa(t):i.width||"",minWidth:i.minWidth||""}}));return xe.apply(void 0,ae(["colgroup",{}],n))}function Aa(e){return null==e?4:e}function xa(e){for(var t=0,n=e;t<n.length;t++){if("shrink"===n[t].width)return!0}return!1}function Ea(e,t){var n=["fc-scrollgrid",t.theme.getClass("table")];return e&&n.push("fc-scrollgrid-liquid"),n}function Oa(e,t){var n=["fc-scrollgrid-section","fc-scrollgrid-section-"+e.type,e.className];return t&&e.liquid&&null==e.maxHeight&&n.push("fc-scrollgrid-section-liquid"),e.isSticky&&n.push("fc-scrollgrid-section-sticky"),n}function Ca(e){return xe("div",{className:"fc-scrollgrid-sticky-shim",style:{width:e.clientWidth,minWidth:e.tableMinWidth}})}function ka(e){var t=e.stickyHeaderDates;return null!=t&&"auto"!==t||(t="auto"===e.height||"auto"===e.viewHeight),t}function Sa(e){var t=e.stickyFooterScrollbar;return null!=t&&"auto"!==t||(t="auto"===e.height||"auto"===e.viewHeight),t}var Da=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.processCols=Wt((function(e){return e}),ba),t.renderMicroColGroup=Wt(wa),t.scrollerRefs=new ha,t.scrollerElRefs=new ha(t._handleScrollerEl.bind(t)),t.state={shrinkWidth:null,forceYScrollbars:!1,scrollerClientWidths:{},scrollerClientHeights:{}},t.handleSizing=function(){t.safeSetState(ie({shrinkWidth:t.computeShrinkWidth()},t.computeScrollerDims()))},t}return oe(t,e),t.prototype.render=function(){var e=this,t=e.props,n=e.state,r=e.context,o=t.sections||[],i=this.processCols(t.cols),a=this.renderMicroColGroup(i,n.shrinkWidth),c=Ea(t.liquid,r);t.collapsibleWidth&&c.push("fc-scrollgrid-collapsible");for(var s,u=o.length,l=0,d=[],f=[],p=[];l<u&&"header"===(s=o[l]).type;)d.push(this.renderSection(s,a,!0)),l+=1;for(;l<u&&"body"===(s=o[l]).type;)f.push(this.renderSection(s,a,!1)),l+=1;for(;l<u&&"footer"===(s=o[l]).type;)p.push(this.renderSection(s,a,!0)),l+=1;var h=!Fr(),m={role:"rowgroup"};return xe("table",{role:"grid",className:c.join(" "),style:{height:t.height}},Boolean(!h&&d.length)&&xe.apply(void 0,ae(["thead",m],d)),Boolean(!h&&f.length)&&xe.apply(void 0,ae(["tbody",m],f)),Boolean(!h&&p.length)&&xe.apply(void 0,ae(["tfoot",m],p)),h&&xe.apply(void 0,ae(ae(ae(["tbody",m],d),f),p)))},t.prototype.renderSection=function(e,t,n){return"outerContent"in e?xe(Oe,{key:e.key},e.outerContent):xe("tr",{key:e.key,role:"presentation",className:Oa(e,this.props.liquid).join(" ")},this.renderChunkTd(e,t,e.chunk,n))},t.prototype.renderChunkTd=function(e,t,n,r){if("outerContent"in n)return n.outerContent;var o=this.props,i=this.state,a=i.forceYScrollbars,c=i.scrollerClientWidths,s=i.scrollerClientHeights,u=va(o,e),l=ga(o,e),d=o.liquid?a?"scroll":u?"auto":"hidden":"visible",f=e.key,p=ya(e,n,{tableColGroupNode:t,tableMinWidth:"",clientWidth:o.collapsibleWidth||void 0===c[f]?null:c[f],clientHeight:void 0!==s[f]?s[f]:null,expandRows:e.expandRows,syncRowHeights:!1,rowSyncHeights:[],reportRowHeightChange:function(){}},r);return xe(r?"th":"td",{ref:n.elRef,role:"presentation"},xe("div",{className:"fc-scroller-harness"+(l?" fc-scroller-harness-liquid":"")},xe(pa,{ref:this.scrollerRefs.createRef(f),elRef:this.scrollerElRefs.createRef(f),overflowY:d,overflowX:o.liquid?"hidden":"visible",maxHeight:e.maxHeight,liquid:l,liquidIsAbsolute:!0},p)))},t.prototype._handleScrollerEl=function(e,t){var n=function(e,t){for(var n=0,r=e;n<r.length;n++){var o=r[n];if(o.key===t)return o}return null}(this.props.sections,t);n&&bo(n.chunk.scrollerElRef,e)},t.prototype.componentDidMount=function(){this.handleSizing(),this.context.addResizeHandler(this.handleSizing)},t.prototype.componentDidUpdate=function(){this.handleSizing()},t.prototype.componentWillUnmount=function(){this.context.removeResizeHandler(this.handleSizing)},t.prototype.computeShrinkWidth=function(){return xa(this.props.cols)?ma(this.scrollerElRefs.getAll()):0},t.prototype.computeScrollerDims=function(){var e=$r(),t=this.scrollerRefs,n=this.scrollerElRefs,r=!1,o={},i={};for(var a in t.currentMap){var c=t.currentMap[a];if(c&&c.needsYScrolling()){r=!0;break}}for(var s=0,u=this.props.sections;s<u.length;s++){a=u[s].key;var l=n.currentMap[a];if(l){var d=l.parentNode;o[a]=Math.floor(d.getBoundingClientRect().width-(r?e.y:0)),i[a]=Math.floor(d.getBoundingClientRect().height)}}return{forceYScrollbars:r,scrollerClientWidths:o,scrollerClientHeights:i}},t}(go);Da.addStateEquality({scrollerClientWidths:Ot,scrollerClientHeights:Ot});var Pa=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.elRef=Ee(),t}return oe(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=t.options,r=e.seg,o=r.eventRange,i=o.ui,a={event:new Ar(t,o.def,o.instance),view:t.viewApi,timeText:e.timeText,textColor:i.textColor,backgroundColor:i.backgroundColor,borderColor:i.borderColor,isDraggable:!e.disableDragging&&er(r,t),isStartResizable:!e.disableResizing&&tr(r,t),isEndResizable:!e.disableResizing&&nr(r),isMirror:Boolean(e.isDragging||e.isResizing||e.isDateSelecting),isStart:Boolean(r.isStart),isEnd:Boolean(r.isEnd),isPast:Boolean(e.isPast),isFuture:Boolean(e.isFuture),isToday:Boolean(e.isToday),isSelected:Boolean(e.isSelected),isDragging:Boolean(e.isDragging),isResizing:Boolean(e.isResizing)},c=function(e){var t=["fc-event"];return e.isMirror&&t.push("fc-event-mirror"),e.isDraggable&&t.push("fc-event-draggable"),(e.isStartResizable||e.isEndResizable)&&t.push("fc-event-resizable"),e.isDragging&&t.push("fc-event-dragging"),e.isResizing&&t.push("fc-event-resizing"),e.isSelected&&t.push("fc-event-selected"),e.isStart&&t.push("fc-event-start"),e.isEnd&&t.push("fc-event-end"),e.isPast&&t.push("fc-event-past"),e.isToday&&t.push("fc-event-today"),e.isFuture&&t.push("fc-event-future"),t}(a).concat(i.classNames);return xe(Co,{hookProps:a,classNames:n.eventClassNames,content:n.eventContent,defaultContent:e.defaultContent,didMount:n.eventDidMount,willUnmount:n.eventWillUnmount,elRef:this.elRef},(function(t,n,r,o){return e.children(t,c.concat(n),r,o,a)}))},t.prototype.componentDidMount=function(){Gn(this.elRef.current,this.props.seg)},t.prototype.componentDidUpdate=function(e){var t=this.props.seg;t!==e.seg&&Gn(this.elRef.current,t)},t}(go),_a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return oe(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=e.seg,r=t.options.eventTimeFormat||e.defaultTimeFormat,o=function(e,t,n,r,o,i,a){var c=n.dateEnv,s=n.options,u=s.displayEventTime,l=s.displayEventEnd,d=e.eventRange.def,f=e.eventRange.instance;null==u&&(u=!1!==r),null==l&&(l=!1!==o);var p=f.range.start,h=f.range.end,m=i||e.start||e.eventRange.range.start,g=a||e.end||e.eventRange.range.end,v=st(p).valueOf()===st(m).valueOf(),y=st(it(h,-1)).valueOf()===st(it(g,-1)).valueOf();return u&&!d.allDay&&(v||y)?(m=v?p:m,g=y?h:g,l&&d.hasEnd?c.formatRange(m,g,t,{forcedStartTzo:i?null:f.forcedStartTzo,forcedEndTzo:a?null:f.forcedEndTzo}):c.format(m,t,{forcedTzo:i?null:f.forcedStartTzo})):""}(n,r,t,e.defaultDisplayEventTime,e.defaultDisplayEventEnd);return xe(Pa,{seg:n,timeText:o,disableDragging:e.disableDragging,disableResizing:e.disableResizing,defaultContent:e.defaultContent||ja,isDragging:e.isDragging,isResizing:e.isResizing,isDateSelecting:e.isDateSelecting,isSelected:e.isSelected,isPast:e.isPast,isFuture:e.isFuture,isToday:e.isToday},(function(r,o,i,a,c){return xe("a",ie({className:e.extraClassNames.concat(o).join(" "),style:{borderColor:c.borderColor,backgroundColor:c.backgroundColor},ref:r},function(e,t){var n=e.eventRange,r=n.def,o=n.instance,i=r.url;if(i)return{href:i};var a=t.emitter,c=t.options.eventInteractive;return null==c&&null==(c=r.interactive)&&(c=Boolean(a.hasHandlers("eventClick"))),c?ze((function(e){a.trigger("eventClick",{el:e.target,event:new Ar(t,r,o),jsEvent:e,view:t.viewApi})})):{}}(n,t)),xe("div",{className:"fc-event-main",ref:i,style:{color:c.textColor}},a),c.isStartResizable&&xe("div",{className:"fc-event-resizer fc-event-resizer-start"}),c.isEndResizable&&xe("div",{className:"fc-event-resizer fc-event-resizer-end"}))}))},t}(go);function ja(e){return xe("div",{className:"fc-event-main-frame"},e.timeText&&xe("div",{className:"fc-event-time"},e.timeText),xe("div",{className:"fc-event-title-container"},xe("div",{className:"fc-event-title fc-sticky"},e.event.title||xe(Oe,null," "))))}var Ta=function(e){return xe(po.Consumer,null,(function(t){var n=t.options,r={isAxis:e.isAxis,date:t.dateEnv.toDate(e.date),view:t.viewApi};return xe(Co,{hookProps:r,classNames:n.nowIndicatorClassNames,content:n.nowIndicatorContent,didMount:n.nowIndicatorDidMount,willUnmount:n.nowIndicatorWillUnmount},e.children)}))},Ra=sn({day:"numeric"}),Ia=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return oe(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=t.options,r=Ma({date:e.date,dateProfile:e.dateProfile,todayRange:e.todayRange,showDayNumber:e.showDayNumber,extraProps:e.extraHookProps,viewApi:t.viewApi,dateEnv:t.dateEnv});return xe(So,{hookProps:r,content:n.dayCellContent,defaultContent:e.defaultContent},e.children)},t}(go);function Ma(e){var t=e.date,n=e.dateEnv,r=zr(t,e.todayRange,null,e.dateProfile);return ie(ie(ie({date:n.toDate(t),view:e.viewApi},r),{dayNumberText:e.showDayNumber?n.format(t,Ra):""}),e.extraProps)}var Na=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.refineHookProps=Vt(Ma),t.normalizeClassNames=_o(),t}return oe(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=t.options,r=this.refineHookProps({date:e.date,dateProfile:e.dateProfile,todayRange:e.todayRange,showDayNumber:e.showDayNumber,extraProps:e.extraHookProps,viewApi:t.viewApi,dateEnv:t.dateEnv}),o=Wr(r,t.theme).concat(r.isDisabled?[]:this.normalizeClassNames(n.dayCellClassNames,r)),i=r.isDisabled?{}:{"data-date":Ht(e.date)};return xe(Po,{hookProps:r,didMount:n.dayCellDidMount,willUnmount:n.dayCellWillUnmount,elRef:e.elRef},(function(t){return e.children(t,o,i,r.isDisabled)}))},t}(go);var Ba=function(e){return xe(Pa,{defaultContent:Za,seg:e.seg,timeText:"",disableDragging:!0,disableResizing:!0,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:!1,isPast:e.isPast,isFuture:e.isFuture,isToday:e.isToday},(function(e,t,n,r,o){return xe("div",{ref:e,className:["fc-bg-event"].concat(t).join(" "),style:{backgroundColor:o.backgroundColor}},r)}))};function Za(e){return e.event.title&&xe("div",{className:"fc-event-title"},e.event.title)}var Fa=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={titleId:Fe()},t.handleRootEl=function(e){t.rootEl=e,t.props.elRef&&bo(t.props.elRef,e)},t.handleDocumentMouseDown=function(e){var n=Ne(e);t.rootEl.contains(n)||t.handleCloseClick()},t.handleDocumentKeyDown=function(e){"Escape"===e.key&&t.handleCloseClick()},t.handleCloseClick=function(){var e=t.props.onClose;e&&e()},t}return oe(t,e),t.prototype.render=function(){var e=this.context,t=e.theme,n=e.options,r=this.props,o=this.state,i=["fc-popover",t.getClass("popover")].concat(r.extraClassNames||[]);return ke(xe("div",ie({id:r.id,className:i.join(" "),"aria-labelledby":o.titleId},r.extraAttrs,{ref:this.handleRootEl}),xe("div",{className:"fc-popover-header "+t.getClass("popoverHeader")},xe("span",{className:"fc-popover-title",id:o.titleId},r.title),xe("span",{className:"fc-popover-close "+t.getIconClass("close"),title:n.closeHint,onClick:this.handleCloseClick})),xe("div",{className:"fc-popover-body "+t.getClass("popoverContent")},r.children)),r.parentEl)},t.prototype.componentDidMount=function(){document.addEventListener("mousedown",this.handleDocumentMouseDown),document.addEventListener("keydown",this.handleDocumentKeyDown),this.updateSize()},t.prototype.componentWillUnmount=function(){document.removeEventListener("mousedown",this.handleDocumentMouseDown),document.removeEventListener("keydown",this.handleDocumentKeyDown)},t.prototype.updateSize=function(){var e=this.context.isRtl,t=this.props,n=t.alignmentEl,r=t.alignGridTop,o=this.rootEl,i=function(e){for(var t=ro(e),n=e.getBoundingClientRect(),r=0,o=t;r<o.length;r++){var i=Br(n,o[r].getBoundingClientRect());if(!i)return null;n=i}return n}(n);if(i){var a=o.getBoundingClientRect(),c=r?_e(n,".fc-scrollgrid").getBoundingClientRect().top:i.top,s=e?i.right-a.width:i.left;c=Math.max(c,10),s=Math.min(s,document.documentElement.clientWidth-10-a.width),s=Math.max(s,10);var u=o.offsetParent.getBoundingClientRect();Ie(o,{top:c-u.top,left:s-u.left})}},t}(go),La=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleRootEl=function(e){t.rootEl=e,e?t.context.registerInteractiveComponent(t,{el:e,useEventCenter:!1}):t.context.unregisterInteractiveComponent(t)},t}return oe(t,e),t.prototype.render=function(){var e=this.context,t=e.options,n=e.dateEnv,r=this.props,o=r.startDate,i=r.todayRange,a=r.dateProfile,c=n.format(o,t.dayPopoverFormat);return xe(Na,{date:o,dateProfile:a,todayRange:i,elRef:this.handleRootEl},(function(e,t,n){return xe(Fa,{elRef:e,id:r.id,title:c,extraClassNames:["fc-more-popover"].concat(t),extraAttrs:n,parentEl:r.parentEl,alignmentEl:r.alignmentEl,alignGridTop:r.alignGridTop,onClose:r.onClose},xe(Ia,{date:o,dateProfile:a,todayRange:i},(function(e,t){return t&&xe("div",{className:"fc-more-popover-misc",ref:e},t)})),r.children)}))},t.prototype.queryHit=function(e,t,n,r){var o=this.rootEl,i=this.props;return e>=0&&e<n&&t>=0&&t<r?{dateProfile:i.dateProfile,dateSpan:ie({allDay:!0,range:{start:i.startDate,end:i.endDate}},i.extraDateSpan),dayEl:o,rect:{left:0,top:0,right:n,bottom:r},layer:1}:null},t}(wo),Ha=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.linkElRef=Ee(),t.state={isPopoverOpen:!1,popoverId:Fe()},t.handleClick=function(e){var n=t,r=n.props,o=n.context,i=o.options.moreLinkClick,a=za(r).start;function c(e){var t=e.eventRange,n=t.def,r=t.instance,i=t.range;return{event:new Ar(o,n,r),start:o.dateEnv.toDate(i.start),end:o.dateEnv.toDate(i.end),isStart:e.isStart,isEnd:e.isEnd}}"function"==typeof i&&(i=i({date:a,allDay:Boolean(r.allDayDate),allSegs:r.allSegs.map(c),hiddenSegs:r.hiddenSegs.map(c),jsEvent:e,view:o.viewApi})),i&&"popover"!==i?"string"==typeof i&&o.calendarApi.zoomTo(a,i):t.setState({isPopoverOpen:!0})},t.handlePopoverClose=function(){t.setState({isPopoverOpen:!1})},t}return oe(t,e),t.prototype.render=function(){var e=this,t=this.props,n=this.state;return xe(po.Consumer,null,(function(r){var o=r.viewApi,i=r.options,a=r.calendarApi,c=i.moreLinkText,s=t.moreCnt,u=za(t),l="function"==typeof c?c.call(a,s):"+"+s+" "+c,d=Je(i.moreLinkHint,[s],l),f={num:s,shortText:"+"+s,text:l,view:o};return xe(Oe,null,Boolean(t.moreCnt)&&xe(Co,{elRef:e.linkElRef,hookProps:f,classNames:i.moreLinkClassNames,content:i.moreLinkContent,defaultContent:t.defaultContent||Ua,didMount:i.moreLinkDidMount,willUnmount:i.moreLinkWillUnmount},(function(r,o,i,a){return t.children(r,["fc-more-link"].concat(o),i,a,e.handleClick,d,n.isPopoverOpen,n.isPopoverOpen?n.popoverId:"")})),n.isPopoverOpen&&xe(La,{id:n.popoverId,startDate:u.start,endDate:u.end,dateProfile:t.dateProfile,todayRange:t.todayRange,extraDateSpan:t.extraDateSpan,parentEl:e.parentEl,alignmentEl:t.alignmentElRef.current,alignGridTop:t.alignGridTop,onClose:e.handlePopoverClose},t.popoverContent()))}))},t.prototype.componentDidMount=function(){this.updateParentEl()},t.prototype.componentDidUpdate=function(){this.updateParentEl()},t.prototype.updateParentEl=function(){this.linkElRef.current&&(this.parentEl=_e(this.linkElRef.current,".fc-view-harness"))},t}(go);function Ua(e){return e.text}function za(e){if(e.allDayDate)return{start:e.allDayDate,end:ot(e.allDayDate,1)};var t,n=e.hiddenSegs;return{start:Wa(n),end:(t=n,t.reduce(Ya).eventRange.range.end)}}function Wa(e){return e.reduce(Va).eventRange.range.start}function Va(e,t){return e.eventRange.range.start<t.eventRange.range.start?e:t}function Ya(e,t){return e.eventRange.range.end>t.eventRange.range.end?e:t}const qa=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._calendarApi=new wr,t}return oe(t,e),t.prototype.render=function(){return R.createElement(Oi,{optionOverrides:this.props,calendarApi:this._calendarApi},(function(e){return R.createElement(qi,{options:e.calendarOptions,theme:e.theme,emitter:e.emitter},(function(t,n,r,o){return R.createElement("div",{className:t.join(" "),style:{height:n}},R.createElement(Wi,ie({isHeightAuto:r,forPrint:o},e)))}))}))},t.prototype.getApi=function(){return this._calendarApi},t}(R.Component);var Ga=a(31397),Qa={};Qa.styleTagTransform=ye(),Qa.setAttributes=he(),Qa.insert=fe().bind(null,"head"),Qa.domAPI=le(),Qa.insertStyleElement=ge();se()(Ga.Z,Qa);Ga.Z&&Ga.Z.locals&&Ga.Z.locals;
65
65
  /*!
66
66
  FullCalendar Scheduler v5.11.3
67
67
  Docs & License: https://fullcalendar.io/scheduler
@@ -97,4 +97,4 @@ FullCalendar Scheduler v5.11.3
97
97
  Docs & License: https://fullcalendar.io/scheduler
98
98
  (c) 2022 Adam Shaw
99
99
  */
100
- function _u(e){for(var t=e.depth,n=e.hasChildren,r=e.isExpanded,o=e.onExpanderClick,i=[],a=0;a<t;a+=1)i.push(xe("span",{className:"fc-icon"}));var c=["fc-icon"];return n&&(r?c.push("fc-icon-minus-square"):c.push("fc-icon-plus-square")),i.push(xe("span",{className:"fc-datagrid-expander"+(n?"":" fc-datagrid-expander-placeholder"),onClick:o},xe("span",{className:c.join(" ")}))),xe.apply(void 0,ae([Oe,{}],i))}function ju(e){return{resource:new su(e.context,e.resource),fieldValue:e.fieldValue,view:e.context.viewApi}}var Tu=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return oe(t,e),t.prototype.render=function(){var e=this.props;return xe(So,{hookProps:e.hookProps,content:e.colSpec.cellContent,defaultContent:Ru},(function(e,t){return xe("span",{className:"fc-datagrid-cell-main",ref:e},t)}))},t}(go);function Ru(e){return e.fieldValue||xe(Oe,null," ")}var Iu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.refineHookProps=Vt(ju),t.normalizeClassNames=_o(),t.onExpanderClick=function(e){var n=t.props;n.hasChildren&&t.context.dispatch({type:"SET_RESOURCE_ENTITY_EXPANDED",id:n.resource.id,isExpanded:!n.isExpanded})},t}return oe(t,e),t.prototype.render=function(){var e=this,t=this.props,n=this.context,r=t.colSpec,o=this.refineHookProps({resource:t.resource,fieldValue:t.fieldValue,context:n}),i=this.normalizeClassNames(r.cellClassNames,o);return xe(Po,{hookProps:o,didMount:r.cellDidMount,willUnmount:r.cellWillUnmount},(function(n){return xe("td",{ref:n,role:"gridcell","data-resource-id":t.resource.id,className:["fc-datagrid-cell","fc-resource"].concat(i).join(" ")},xe("div",{className:"fc-datagrid-cell-frame",style:{height:t.innerHeight}},xe("div",{className:"fc-datagrid-cell-cushion fc-scrollgrid-sync-inner"},r.isMain&&xe(_u,{depth:t.depth,hasChildren:t.hasChildren,isExpanded:t.isExpanded,onExpanderClick:e.onExpanderClick}),xe(Tu,{hookProps:o,colSpec:r}))))}))},t}(go),Mu=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return oe(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=e.colSpec,r={groupValue:e.fieldValue,view:t.viewApi};return xe(Co,{hookProps:r,classNames:n.cellClassNames,content:n.cellContent,defaultContent:Nu,didMount:n.cellDidMount,willUnmount:n.cellWillUnmount},(function(t,n,r,o){return xe("td",{ref:t,role:"gridcell",rowSpan:e.rowSpan,className:["fc-datagrid-cell","fc-resource-group"].concat(n).join(" ")},xe("div",{className:"fc-datagrid-cell-frame fc-datagrid-cell-frame-liquid"},xe("div",{className:"fc-datagrid-cell-cushion fc-sticky",ref:r},o)))}))},t}(go);function Nu(e){return e.groupValue||xe(Oe,null," ")}var Bu=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return oe(t,e),t.prototype.render=function(){var e=this.props,t=e.resource,n=e.rowSpans,r=e.depth,o=Su(t);return xe("tr",{role:"row"},e.colSpecs.map((function(i,a){var c=n[a];if(0===c)return null;null==c&&(c=1);var s=i.field?o[i.field]:t.title||iu(t.id);return c>1?xe(Mu,{key:a,colSpec:i,fieldValue:s,rowSpan:c}):xe(Iu,{key:a,colSpec:i,resource:t,fieldValue:s,depth:r,hasChildren:e.hasChildren,isExpanded:e.isExpanded,innerHeight:e.innerHeight})})))},t}(go);Bu.addPropsEquality({rowSpans:zt});var Zu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.innerInnerRef=Ee(),t.onExpanderClick=function(){var e=t.props;t.context.dispatch({type:"SET_RESOURCE_ENTITY_EXPANDED",id:e.id,isExpanded:!e.isExpanded})},t}return oe(t,e),t.prototype.render=function(){var e=this,t=this.props,n=this.context,r={groupValue:t.group.value,view:n.viewApi},o=t.group.spec;return xe("tr",{role:"row"},xe(Co,{hookProps:r,classNames:o.labelClassNames,content:o.labelContent,defaultContent:Fu,didMount:o.labelDidMount,willUnmount:o.labelWillUnmount},(function(r,o,i,a){return xe("th",{ref:r,role:"columnheader",scope:"colgroup",colSpan:t.spreadsheetColCnt,className:["fc-datagrid-cell","fc-resource-group",n.theme.getClass("tableCellShaded")].concat(o).join(" ")},xe("div",{className:"fc-datagrid-cell-frame",style:{height:t.innerHeight}},xe("div",{className:"fc-datagrid-cell-cushion fc-scrollgrid-sync-inner",ref:e.innerInnerRef},xe(_u,{depth:0,hasChildren:!0,isExpanded:t.isExpanded,onExpanderClick:e.onExpanderClick}),xe("span",{className:"fc-datagrid-cell-main",ref:i},a))))})))},t}(go);function Fu(e){return e.groupValue||xe(Oe,null," ")}Zu.addPropsEquality({group:function(e,t){return e.spec===t.spec&&e.value===t.value}});var Lu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.resizerElRefs=new ha(t._handleColResizerEl.bind(t)),t.colDraggings={},t}return oe(t,e),t.prototype.render=function(){var e=this,t=this.props,n=t.colSpecs,r=t.superHeaderRendering,o=t.rowInnerHeights,i={view:this.context.viewApi},a=[];if(o=o.slice(),r){var c=o.shift();a.push(xe("tr",{key:"row-super",role:"row"},xe(Co,{hookProps:i,classNames:r.headerClassNames,content:r.headerContent,didMount:r.headerDidMount,willUnmount:r.headerWillUnmount},(function(e,t,r,o){return xe("th",{ref:e,role:"columnheader",scope:"colgroup",colSpan:n.length,className:["fc-datagrid-cell","fc-datagrid-cell-super"].concat(t).join(" ")},xe("div",{className:"fc-datagrid-cell-frame",style:{height:c}},xe("div",{className:"fc-datagrid-cell-cushion fc-scrollgrid-sync-inner",ref:r},o)))}))))}var s=o.shift();return a.push(xe("tr",{key:"row",role:"row"},n.map((function(t,r){var o=r===n.length-1;return xe(Co,{key:r,hookProps:i,classNames:t.headerClassNames,content:t.headerContent,didMount:t.headerDidMount,willUnmount:t.headerWillUnmount},(function(n,i,a,c){return xe("th",{ref:n,role:"columnheader",className:["fc-datagrid-cell"].concat(i).join(" ")},xe("div",{className:"fc-datagrid-cell-frame",style:{height:s}},xe("div",{className:"fc-datagrid-cell-cushion fc-scrollgrid-sync-inner"},t.isMain&&xe("span",{className:"fc-datagrid-expander fc-datagrid-expander-placeholder"},xe("span",{className:"fc-icon"})),xe("span",{className:"fc-datagrid-cell-main",ref:a},c)),!o&&xe("div",{className:"fc-datagrid-cell-resizer",ref:e.resizerElRefs.createRef(r)})))}))})))),xe(Oe,null,a)},t.prototype._handleColResizerEl=function(e,t){var n,r=this.colDraggings;e?(n=this.initColResizing(e,parseInt(t,10)))&&(r[t]=n):(n=r[t])&&(n.destroy(),delete r[t])},t.prototype.initColResizing=function(e,t){var n=this.context,r=n.pluginHooks,o=n.isRtl,i=this.props.onColWidthChange,a=r.elementDraggingImpl;if(a){var c,s,u=new a(e);return u.emitter.on("dragstart",(function(){var n=Te(_e(e,"tr"),"th");s=n.map((function(e){return e.getBoundingClientRect().width})),c=s[t]})),u.emitter.on("dragmove",(function(e){s[t]=Math.max(c+e.deltaX*(o?-1:1),20),i&&i(s.slice())})),u.setAutoScrollEnabled(!1),u}return null},t}(go),Hu=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return oe(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n={resource:new su(t,e.resource)};return xe(So,{hookProps:n,content:t.options.resourceLaneContent},(function(e,t){return t&&xe("div",{className:"fc-timeline-lane-misc",ref:e},t)}))},t}(go),Uu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.refineHookProps=Vt(zu),t.normalizeClassNames=_o(),t.handleHeightChange=function(e,n){t.props.onHeightChange&&t.props.onHeightChange(_e(e,"tr"),n)},t}return oe(t,e),t.prototype.render=function(){var e=this,t=this.props,n=this.context,r=n.options,o=this.refineHookProps({resource:t.resource,context:n}),i=this.normalizeClassNames(r.resourceLaneClassNames,o);return xe("tr",{ref:t.elRef},xe(Po,{hookProps:o,didMount:r.resourceLaneDidMount,willUnmount:r.resourceLaneWillUnmount},(function(n){return xe("td",{ref:n,className:["fc-timeline-lane","fc-resource"].concat(i).join(" "),"data-resource-id":t.resource.id},xe("div",{className:"fc-timeline-lane-frame",style:{height:t.innerHeight}},xe(Hu,{resource:t.resource}),xe(Ns,{dateProfile:t.dateProfile,tDateProfile:t.tDateProfile,nowDate:t.nowDate,todayRange:t.todayRange,nextDayThreshold:t.nextDayThreshold,businessHours:t.businessHours,eventStore:t.eventStore,eventUiBases:t.eventUiBases,dateSelection:t.dateSelection,eventSelection:t.eventSelection,eventDrag:t.eventDrag,eventResize:t.eventResize,timelineCoords:t.timelineCoords,onHeightChange:e.handleHeightChange,resourceId:t.resource.id})))})))},t}(go);function zu(e){return{resource:new su(e.context,e.resource)}}var Wu=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return oe(t,e),t.prototype.render=function(){var e=this,t=this.props,n=this.props.renderingHooks,r={groupValue:t.groupValue,view:this.context.viewApi};return xe("tr",{ref:t.elRef},xe(Co,{hookProps:r,classNames:n.laneClassNames,content:n.laneContent,didMount:n.laneDidMount,willUnmount:n.laneWillUnmount},(function(n,r,o,i){return xe("td",{ref:n,className:["fc-timeline-lane","fc-resource-group",e.context.theme.getClass("tableCellShaded")].concat(r).join(" ")},xe("div",{style:{height:t.innerHeight},ref:o},i))})))},t}(go),Vu=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return oe(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=e.rowElRefs,r=e.innerHeights;return xe("tbody",null,e.rowNodes.map((function(o,i){if(o.group)return xe(Wu,{key:o.id,elRef:n.createRef(o.id),groupValue:o.group.value,renderingHooks:o.group.spec,innerHeight:r[i]||""});if(o.resource){var a=o.resource;return xe(Uu,ie({key:o.id,elRef:n.createRef(o.id)},e.splitProps[a.id],{resource:a,dateProfile:e.dateProfile,tDateProfile:e.tDateProfile,nowDate:e.nowDate,todayRange:e.todayRange,nextDayThreshold:t.options.nextDayThreshold,businessHours:a.businessHours||e.fallbackBusinessHours,innerHeight:r[i]||"",timelineCoords:e.slatCoords,onHeightChange:e.onRowHeightChange}))}return null})))},t}(go),Yu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rootElRef=Ee(),t.rowElRefs=new ha,t}return oe(t,e),t.prototype.render=function(){var e=this.props,t=this.context;return xe("table",{ref:this.rootElRef,"aria-hidden":!0,className:"fc-scrollgrid-sync-table "+t.theme.getClass("table"),style:{minWidth:e.tableMinWidth,width:e.clientWidth,height:e.minHeight}},xe(Vu,{rowElRefs:this.rowElRefs,rowNodes:e.rowNodes,dateProfile:e.dateProfile,tDateProfile:e.tDateProfile,nowDate:e.nowDate,todayRange:e.todayRange,splitProps:e.splitProps,fallbackBusinessHours:e.fallbackBusinessHours,slatCoords:e.slatCoords,innerHeights:e.innerHeights,onRowHeightChange:e.onRowHeightChange}))},t.prototype.componentDidMount=function(){this.updateCoords()},t.prototype.componentDidUpdate=function(){this.updateCoords()},t.prototype.componentWillUnmount=function(){this.props.onRowCoords&&this.props.onRowCoords(null)},t.prototype.updateCoords=function(){var e,t=this.props;t.onRowCoords&&null!==t.clientWidth&&this.props.onRowCoords(new ao(this.rootElRef.current,(e=this.rowElRefs.currentMap,t.rowNodes.map((function(t){return e[t.id]}))),!1,!0))},t}(go);var qu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.computeHasResourceBusinessHours=Wt(Gu),t.resourceSplitter=new uu,t.bgSlicer=new Ts,t.slatsRef=Ee(),t.state={slatCoords:null},t.handleEl=function(e){e?t.context.registerInteractiveComponent(t,{el:e}):t.context.unregisterInteractiveComponent(t)},t.handleSlatCoords=function(e){t.setState({slatCoords:e}),t.props.onSlatCoords&&t.props.onSlatCoords(e)},t.handleRowCoords=function(e){t.rowCoords=e,t.props.onRowCoords&&t.props.onRowCoords(e)},t}return oe(t,e),t.prototype.render=function(){var e=this,t=this,n=t.props,r=t.state,o=t.context,i=n.dateProfile,a=n.tDateProfile,c=Ft(a.slotDuration).unit,s=this.computeHasResourceBusinessHours(n.rowNodes),u=this.resourceSplitter.splitProps(n),l=u[""],d=this.bgSlicer.sliceProps(l,i,a.isTimeScale?null:n.nextDayThreshold,o,i,o.dateProfileGenerator,a,o.dateEnv),f=r.slatCoords&&r.slatCoords.dateProfile===n.dateProfile?r.slatCoords:null;return xe("div",{ref:this.handleEl,className:["fc-timeline-body",n.expandRows?"fc-timeline-body-expandrows":""].join(" "),style:{minWidth:n.tableMinWidth}},xe(ea,{unit:c},(function(t,r){return xe(Oe,null,xe(Ds,{ref:e.slatsRef,dateProfile:i,tDateProfile:a,nowDate:t,todayRange:r,clientWidth:n.clientWidth,tableColGroupNode:n.tableColGroupNode,tableMinWidth:n.tableMinWidth,onCoords:e.handleSlatCoords,onScrollLeftRequest:n.onScrollLeftRequest}),xe(js,{businessHourSegs:s?null:d.businessHourSegs,bgEventSegs:d.bgEventSegs,timelineCoords:f,eventResizeSegs:d.eventResize?d.eventResize.segs:[],dateSelectionSegs:d.dateSelectionSegs,nowDate:t,todayRange:r}),xe(Yu,{rowNodes:n.rowNodes,dateProfile:i,tDateProfile:n.tDateProfile,nowDate:t,todayRange:r,splitProps:u,fallbackBusinessHours:s?n.businessHours:null,clientWidth:n.clientWidth,minHeight:n.expandRows?n.clientHeight:"",tableMinWidth:n.tableMinWidth,innerHeights:n.rowInnerHeights,slatCoords:f,onRowCoords:e.handleRowCoords,onRowHeightChange:n.onRowHeightChange}),o.options.nowIndicator&&f&&f.isDateInRange(t)&&xe("div",{className:"fc-timeline-now-indicator-container"},xe(Ta,{isAxis:!1,date:t},(function(e,n,r,i){return xe("div",{ref:e,className:["fc-timeline-now-indicator-line"].concat(n).join(" "),style:Es(f.dateToCoord(t),o.isRtl)},i)}))))})))},t.prototype.queryHit=function(e,t){var n=this.rowCoords,r=n.topToIndex(t);if(null!=r){var o=this.props.rowNodes[r].resource;if(o){var i=this.slatsRef.current.positionToHit(e);if(i)return{dateProfile:this.props.dateProfile,dateSpan:{range:i.dateSpan.range,allDay:i.dateSpan.allDay,resourceId:o.id},rect:{left:i.left,right:i.right,top:n.tops[r],bottom:n.bottoms[r]},dayEl:i.dayEl,layer:0}}}return null},t}(wo);function Gu(e){for(var t=0,n=e;t<n.length;t++){var r=n[t].resource;if(r&&r.businessHours)return!0}return!1}var Qu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.scrollGridRef=Ee(),t.timeBodyScrollerElRef=Ee(),t.spreadsheetHeaderChunkElRef=Ee(),t.rootElRef=Ee(),t.ensureScrollGridResizeId=0,t.state={resourceAreaWidthOverride:null},t.ensureScrollGridResize=function(){t.ensureScrollGridResizeId&&clearTimeout(t.ensureScrollGridResizeId),t.ensureScrollGridResizeId=setTimeout((function(){t.scrollGridRef.current.handleSizing(!1)}),Ni.SCROLLGRID_RESIZE_INTERVAL+1)},t}return oe(t,e),t.prototype.render=function(){var e=this,t=e.props,n=e.state,r=e.context,o=r.options,i=!t.forPrint&&ka(o),a=!t.forPrint&&Sa(o),c=[{type:"header",key:"header",syncRowHeights:!0,isSticky:i,chunks:[{key:"datagrid",elRef:this.spreadsheetHeaderChunkElRef,tableClassName:"fc-datagrid-header",rowContent:t.spreadsheetHeaderRows},{key:"divider",outerContent:xe("td",{role:"presentation",className:"fc-resource-timeline-divider "+r.theme.getClass("tableCellShaded")})},{key:"timeline",content:t.timeHeaderContent}]},{type:"body",key:"body",syncRowHeights:!0,liquid:!0,expandRows:Boolean(o.expandRows),chunks:[{key:"datagrid",tableClassName:"fc-datagrid-body",rowContent:t.spreadsheetBodyRows},{key:"divider",outerContent:xe("td",{role:"presentation",className:"fc-resource-timeline-divider "+r.theme.getClass("tableCellShaded")})},{key:"timeline",scrollerElRef:this.timeBodyScrollerElRef,content:t.timeBodyContent}]}];a&&c.push({type:"footer",key:"footer",isSticky:!0,chunks:[{key:"datagrid",content:Ca},{key:"divider",outerContent:xe("td",{role:"presentation",className:"fc-resource-timeline-divider "+r.theme.getClass("tableCellShaded")})},{key:"timeline",content:Ca}]});var s=null!=n.resourceAreaWidthOverride?n.resourceAreaWidthOverride:o.resourceAreaWidth;return xe(Xc,{ref:this.scrollGridRef,elRef:this.rootElRef,liquid:!t.isHeightAuto&&!t.forPrint,collapsibleWidth:!1,colGroups:[{cols:t.spreadsheetCols,width:s},{cols:[]},{cols:t.timeCols}],sections:c})},t.prototype.forceTimeScroll=function(e){this.scrollGridRef.current.forceScrollLeft(2,e)},t.prototype.forceResourceScroll=function(e){this.scrollGridRef.current.forceScrollTop(1,e)},t.prototype.getResourceScroll=function(){return this.timeBodyScrollerElRef.current.scrollTop},t.prototype.componentDidMount=function(){this.initSpreadsheetResizing()},t.prototype.componentWillUnmount=function(){this.destroySpreadsheetResizing()},t.prototype.initSpreadsheetResizing=function(){var e=this,t=this.context,n=t.isRtl,r=t.pluginHooks.elementDraggingImpl,o=this.spreadsheetHeaderChunkElRef.current;if(r){var i,a,c=this.rootElRef.current,s=this.spreadsheetResizerDragging=new r(c,".fc-resource-timeline-divider");s.emitter.on("dragstart",(function(){i=o.getBoundingClientRect().width,a=c.getBoundingClientRect().width})),s.emitter.on("dragmove",(function(t){var r=i+t.deltaX*(n?-1:1);r=Math.max(r,30),r=Math.min(r,a-30),e.setState({resourceAreaWidthOverride:r},e.ensureScrollGridResize)})),s.setAutoScrollEnabled(!1)}},t.prototype.destroySpreadsheetResizing=function(){this.spreadsheetResizerDragging&&this.spreadsheetResizerDragging.destroy()},t}(go),Xu=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.processColOptions=Wt(el),r.buildTimelineDateProfile=Wt(us),r.hasNesting=Wt(Ju),r.buildRowNodes=Wt(Eu),r.layoutRef=Ee(),r.rowNodes=[],r.renderedRowNodes=[],r.buildRowIndex=Wt(Ku),r.handleSlatCoords=function(e){r.setState({slatCoords:e})},r.handleRowCoords=function(e){r.rowCoords=e,r.scrollResponder.update(!1)},r.handleMaxCushionWidth=function(e){r.setState({slotCushionMaxWidth:Math.ceil(e)})},r.handleScrollLeftRequest=function(e){r.layoutRef.current.forceTimeScroll(e)},r.handleScrollRequest=function(e){var t=r.rowCoords,n=r.layoutRef.current,o=e.rowId||e.resourceId;if(t){if(o){var i=r.buildRowIndex(r.renderedRowNodes)[o];if(null!=i){var a=null!=e.fromBottom?t.bottoms[i]-e.fromBottom:t.tops[i];n.forceResourceScroll(a)}}return!0}return null},r.handleColWidthChange=function(e){r.setState({spreadsheetColWidths:e})},r.state={resourceAreaWidth:n.options.resourceAreaWidth,spreadsheetColWidths:[]},r}return oe(t,e),t.prototype.render=function(){var e=this,t=this,n=t.props,r=t.state,o=t.context,i=o.options,a=o.viewSpec,c=this.processColOptions(o.options),s=c.superHeaderRendering,u=c.groupSpecs,l=c.orderSpecs,d=c.isVGrouping,f=c.colSpecs,p=this.buildTimelineDateProfile(n.dateProfile,o.dateEnv,i,o.dateProfileGenerator),h=this.rowNodes=this.buildRowNodes(n.resourceStore,u,l,d,n.resourceEntityExpansions,i.resourcesInitiallyExpanded),m=["fc-resource-timeline",this.hasNesting(h)?"":"fc-resource-timeline-flat","fc-timeline",!1===i.eventOverlap?"fc-timeline-overlap-disabled":"fc-timeline-overlap-enabled"],g=i.slotMinWidth,v=Fs(p,g||this.computeFallbackSlotMinWidth(p));return xe(Ro,{viewSpec:a},(function(t,i){return xe("div",{ref:t,className:m.concat(i).join(" ")},xe(Qu,{ref:e.layoutRef,forPrint:n.forPrint,isHeightAuto:n.isHeightAuto,spreadsheetCols:$u(f,r.spreadsheetColWidths,""),spreadsheetHeaderRows:function(t){return xe(Lu,{superHeaderRendering:s,colSpecs:f,onColWidthChange:e.handleColWidthChange,rowInnerHeights:t.rowSyncHeights})},spreadsheetBodyRows:function(t){return xe(Oe,null,e.renderSpreadsheetRows(h,f,t.rowSyncHeights))},timeCols:v,timeHeaderContent:function(t){return xe(Cs,{clientWidth:t.clientWidth,clientHeight:t.clientHeight,tableMinWidth:t.tableMinWidth,tableColGroupNode:t.tableColGroupNode,dateProfile:n.dateProfile,tDateProfile:p,slatCoords:r.slatCoords,rowInnerHeights:t.rowSyncHeights,onMaxCushionWidth:g?null:e.handleMaxCushionWidth})},timeBodyContent:function(t){return xe(qu,{dateProfile:n.dateProfile,clientWidth:t.clientWidth,clientHeight:t.clientHeight,tableMinWidth:t.tableMinWidth,tableColGroupNode:t.tableColGroupNode,expandRows:t.expandRows,tDateProfile:p,rowNodes:h,businessHours:n.businessHours,dateSelection:n.dateSelection,eventStore:n.eventStore,eventUiBases:n.eventUiBases,eventSelection:n.eventSelection,eventDrag:n.eventDrag,eventResize:n.eventResize,resourceStore:n.resourceStore,nextDayThreshold:o.options.nextDayThreshold,rowInnerHeights:t.rowSyncHeights,onSlatCoords:e.handleSlatCoords,onRowCoords:e.handleRowCoords,onScrollLeftRequest:e.handleScrollLeftRequest,onRowHeightChange:t.reportRowHeightChange})}}))}))},t.prototype.renderSpreadsheetRows=function(e,t,n){return e.map((function(e,r){return e.group?xe(Zu,{key:e.id,id:e.id,spreadsheetColCnt:t.length,isExpanded:e.isExpanded,group:e.group,innerHeight:n[r]||""}):e.resource?xe(Bu,{key:e.id,colSpecs:t,rowSpans:e.rowSpans,depth:e.depth,isExpanded:e.isExpanded,hasChildren:e.hasChildren,resource:e.resource,innerHeight:n[r]||""}):null}))},t.prototype.componentDidMount=function(){this.renderedRowNodes=this.rowNodes,this.scrollResponder=this.context.createScrollResponder(this.handleScrollRequest)},t.prototype.getSnapshotBeforeUpdate=function(){return this.props.forPrint?{}:{resourceScroll:this.queryResourceScroll()}},t.prototype.componentDidUpdate=function(e,t,n){this.renderedRowNodes=this.rowNodes,this.scrollResponder.update(e.dateProfile!==this.props.dateProfile),n.resourceScroll&&this.handleScrollRequest(n.resourceScroll)},t.prototype.componentWillUnmount=function(){this.scrollResponder.detach()},t.prototype.computeFallbackSlotMinWidth=function(e){return Math.max(30,(this.state.slotCushionMaxWidth||0)/e.slotsPerLabel)},t.prototype.queryResourceScroll=function(){var e=this.rowCoords,t=this.renderedRowNodes;if(e){for(var n=this.layoutRef.current,r=e.bottoms,o=n.getResourceScroll(),i={},a=0;a<r.length;a+=1){var c=t[a],s=r[a]-o;if(s>0){i.rowId=c.id,i.fromBottom=s;break}}return i}return null},t}(go);function Ku(e){for(var t={},n=0;n<e.length;n+=1)t[e[n].id]=n;return t}function $u(e,t,n){return void 0===n&&(n=""),e.map((function(e,r){return{className:e.isMain?"fc-main-col":"",width:t[r]||e.width||n}}))}function Ju(e){for(var t=0,n=e;t<n.length;t++){var r=n[t];if(r.group)return!0;if(r.resource&&r.hasChildren)return!0}return!1}function el(e){var t=e.resourceAreaColumns||[],n=null;t.length?e.resourceAreaHeaderContent&&(n={headerClassNames:e.resourceAreaHeaderClassNames,headerContent:e.resourceAreaHeaderContent,headerDidMount:e.resourceAreaHeaderDidMount,headerWillUnmount:e.resourceAreaHeaderWillUnmount}):t.push({headerClassNames:e.resourceAreaHeaderClassNames,headerContent:e.resourceAreaHeaderContent||"Resources",headerDidMount:e.resourceAreaHeaderDidMount,headerWillUnmount:e.resourceAreaHeaderWillUnmount});for(var r=[],o=[],i=[],a=!1,c=0,s=t;c<s.length;c++){var u=s[c];u.group?o.push(ie(ie({},u),{cellClassNames:u.cellClassNames||e.resourceGroupLabelClassNames,cellContent:u.cellContent||e.resourceGroupLabelContent,cellDidMount:u.cellDidMount||e.resourceGroupLabelDidMount,cellWillUnmount:u.cellWillUnmount||e.resourceGroupLaneWillUnmount})):r.push(u)}var l=r[0];if(l.isMain=!0,l.cellClassNames=l.cellClassNames||e.resourceLabelClassNames,l.cellContent=l.cellContent||e.resourceLabelContent,l.cellDidMount=l.cellDidMount||e.resourceLabelDidMount,l.cellWillUnmount=l.cellWillUnmount||e.resourceLabelWillUnmount,o.length)i=o,a=!0;else{var d=e.resourceGroupField;d&&i.push({field:d,labelClassNames:e.resourceGroupLabelClassNames,labelContent:e.resourceGroupLabelContent,labelDidMount:e.resourceGroupLabelDidMount,labelWillUnmount:e.resourceGroupLabelWillUnmount,laneClassNames:e.resourceGroupLaneClassNames,laneContent:e.resourceGroupLaneContent,laneDidMount:e.resourceGroupLaneDidMount,laneWillUnmount:e.resourceGroupLaneWillUnmount})}for(var f=[],p=0,h=e.resourceOrder||pu;p<h.length;p++){for(var m=h[p],g=!1,v=0,y=i;v<y.length;v++){var b=y[v];if(b.field===m.field){b.order=m.order,g=!0;break}}g||f.push(m)}return{superHeaderRendering:n,isVGrouping:a,groupSpecs:i,colSpecs:o.concat(r),orderSpecs:f}}Xu.addStateEquality({spreadsheetColWidths:zt});const tl=Ao({deps:[Ja,Pu,Ls],initialView:"resourceTimelineDay",views:{resourceTimeline:{type:"timeline",component:Xu,needsResourceData:!0,resourceAreaWidth:"30%",resourcesInitiallyExpanded:!0,eventResizableFromStart:!0},resourceTimelineDay:{type:"resourceTimeline",duration:{days:1}},resourceTimelineWeek:{type:"resourceTimeline",duration:{weeks:1}},resourceTimelineMonth:{type:"resourceTimeline",duration:{months:1}},resourceTimelineYear:{type:"resourceTimeline",duration:{years:1}}}});var nl=a(42060),rl=a(76791),ol=a(44759),il=a(13882);function al(e){return al="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},al(e)}function cl(e){return(0,il.Z)(1,arguments),e instanceof Date||"object"===al(e)&&"[object Date]"===Object.prototype.toString.call(e)}var sl=a(19013);function ul(e){if((0,il.Z)(1,arguments),!cl(e)&&"number"!=typeof e)return!1;var t=(0,sl.Z)(e);return!isNaN(Number(t))}var ll=a(83946);function dl(e,t){(0,il.Z)(2,arguments);var n=(0,sl.Z)(e).getTime(),r=(0,ll.Z)(t);return new Date(n+r)}function fl(e,t){(0,il.Z)(2,arguments);var n=(0,ll.Z)(t);return dl(e,-n)}var pl=864e5;function hl(e){(0,il.Z)(1,arguments);var t=1,n=(0,sl.Z)(e),r=n.getUTCDay(),o=(r<t?7:0)+r-t;return n.setUTCDate(n.getUTCDate()-o),n.setUTCHours(0,0,0,0),n}function ml(e){(0,il.Z)(1,arguments);var t=(0,sl.Z)(e),n=t.getUTCFullYear(),r=new Date(0);r.setUTCFullYear(n+1,0,4),r.setUTCHours(0,0,0,0);var o=hl(r),i=new Date(0);i.setUTCFullYear(n,0,4),i.setUTCHours(0,0,0,0);var a=hl(i);return t.getTime()>=o.getTime()?n+1:t.getTime()>=a.getTime()?n:n-1}function gl(e){(0,il.Z)(1,arguments);var t=ml(e),n=new Date(0);n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0);var r=hl(n);return r}var vl=6048e5;function yl(e){(0,il.Z)(1,arguments);var t=(0,sl.Z)(e),n=hl(t).getTime()-gl(t).getTime();return Math.round(n/vl)+1}var bl=a(59025),wl=a(84314);function Al(e,t){var n,r,o,i,a,c,s,u;(0,il.Z)(1,arguments);var l=(0,sl.Z)(e),d=l.getUTCFullYear(),f=(0,wl.j)(),p=(0,ll.Z)(null!==(n=null!==(r=null!==(o=null!==(i=null==t?void 0:t.firstWeekContainsDate)&&void 0!==i?i:null==t||null===(a=t.locale)||void 0===a||null===(c=a.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==o?o:f.firstWeekContainsDate)&&void 0!==r?r:null===(s=f.locale)||void 0===s||null===(u=s.options)||void 0===u?void 0:u.firstWeekContainsDate)&&void 0!==n?n:1);if(!(p>=1&&p<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var h=new Date(0);h.setUTCFullYear(d+1,0,p),h.setUTCHours(0,0,0,0);var m=(0,bl.Z)(h,t),g=new Date(0);g.setUTCFullYear(d,0,p),g.setUTCHours(0,0,0,0);var v=(0,bl.Z)(g,t);return l.getTime()>=m.getTime()?d+1:l.getTime()>=v.getTime()?d:d-1}function xl(e,t){var n,r,o,i,a,c,s,u;(0,il.Z)(1,arguments);var l=(0,wl.j)(),d=(0,ll.Z)(null!==(n=null!==(r=null!==(o=null!==(i=null==t?void 0:t.firstWeekContainsDate)&&void 0!==i?i:null==t||null===(a=t.locale)||void 0===a||null===(c=a.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==o?o:l.firstWeekContainsDate)&&void 0!==r?r:null===(s=l.locale)||void 0===s||null===(u=s.options)||void 0===u?void 0:u.firstWeekContainsDate)&&void 0!==n?n:1),f=Al(e,t),p=new Date(0);p.setUTCFullYear(f,0,d),p.setUTCHours(0,0,0,0);var h=(0,bl.Z)(p,t);return h}var El=6048e5;function Ol(e,t){(0,il.Z)(1,arguments);var n=(0,sl.Z)(e),r=(0,bl.Z)(n,t).getTime()-xl(n,t).getTime();return Math.round(r/El)+1}function Cl(e,t){for(var n=e<0?"-":"",r=Math.abs(e).toString();r.length<t;)r="0"+r;return n+r}var kl={y:function(e,t){var n=e.getUTCFullYear(),r=n>0?n:1-n;return Cl("yy"===t?r%100:r,t.length)},M:function(e,t){var n=e.getUTCMonth();return"M"===t?String(n+1):Cl(n+1,2)},d:function(e,t){return Cl(e.getUTCDate(),t.length)},a:function(e,t){var n=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return"am"===n?"a.m.":"p.m."}},h:function(e,t){return Cl(e.getUTCHours()%12||12,t.length)},H:function(e,t){return Cl(e.getUTCHours(),t.length)},m:function(e,t){return Cl(e.getUTCMinutes(),t.length)},s:function(e,t){return Cl(e.getUTCSeconds(),t.length)},S:function(e,t){var n=t.length,r=e.getUTCMilliseconds();return Cl(Math.floor(r*Math.pow(10,n-3)),t.length)}};const Sl=kl;var Dl="midnight",Pl="noon",_l="morning",jl="afternoon",Tl="evening",Rl="night",Il={G:function(e,t,n){var r=e.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if("yo"===t){var r=e.getUTCFullYear(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return Sl.y(e,t)},Y:function(e,t,n,r){var o=Al(e,r),i=o>0?o:1-o;return"YY"===t?Cl(i%100,2):"Yo"===t?n.ordinalNumber(i,{unit:"year"}):Cl(i,t.length)},R:function(e,t){return Cl(ml(e),t.length)},u:function(e,t){return Cl(e.getUTCFullYear(),t.length)},Q:function(e,t,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return Cl(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return Cl(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){var r=e.getUTCMonth();switch(t){case"M":case"MM":return Sl.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){var r=e.getUTCMonth();switch(t){case"L":return String(r+1);case"LL":return Cl(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){var o=Ol(e,r);return"wo"===t?n.ordinalNumber(o,{unit:"week"}):Cl(o,t.length)},I:function(e,t,n){var r=yl(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):Cl(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getUTCDate(),{unit:"date"}):Sl.d(e,t)},D:function(e,t,n){var r=function(e){(0,il.Z)(1,arguments);var t=(0,sl.Z)(e),n=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var r=t.getTime(),o=n-r;return Math.floor(o/pl)+1}(e);return"Do"===t?n.ordinalNumber(r,{unit:"dayOfYear"}):Cl(r,t.length)},E:function(e,t,n){var r=e.getUTCDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){var o=e.getUTCDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return Cl(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){var o=e.getUTCDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return Cl(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){var r=e.getUTCDay(),o=0===r?7:r;switch(t){case"i":return String(o);case"ii":return Cl(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){var r=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){var r,o=e.getUTCHours();switch(r=12===o?Pl:0===o?Dl:o/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(e,t,n){var r,o=e.getUTCHours();switch(r=o>=17?Tl:o>=12?jl:o>=4?_l:Rl,t){case"B":case"BB":case"BBB":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){var r=e.getUTCHours()%12;return 0===r&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Sl.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getUTCHours(),{unit:"hour"}):Sl.H(e,t)},K:function(e,t,n){var r=e.getUTCHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):Cl(r,t.length)},k:function(e,t,n){var r=e.getUTCHours();return 0===r&&(r=24),"ko"===t?n.ordinalNumber(r,{unit:"hour"}):Cl(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):Sl.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):Sl.s(e,t)},S:function(e,t){return Sl.S(e,t)},X:function(e,t,n,r){var o=(r._originalDate||e).getTimezoneOffset();if(0===o)return"Z";switch(t){case"X":return Nl(o);case"XXXX":case"XX":return Bl(o);default:return Bl(o,":")}},x:function(e,t,n,r){var o=(r._originalDate||e).getTimezoneOffset();switch(t){case"x":return Nl(o);case"xxxx":case"xx":return Bl(o);default:return Bl(o,":")}},O:function(e,t,n,r){var o=(r._originalDate||e).getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Ml(o,":");default:return"GMT"+Bl(o,":")}},z:function(e,t,n,r){var o=(r._originalDate||e).getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Ml(o,":");default:return"GMT"+Bl(o,":")}},t:function(e,t,n,r){var o=r._originalDate||e;return Cl(Math.floor(o.getTime()/1e3),t.length)},T:function(e,t,n,r){return Cl((r._originalDate||e).getTime(),t.length)}};function Ml(e,t){var n=e>0?"-":"+",r=Math.abs(e),o=Math.floor(r/60),i=r%60;if(0===i)return n+String(o);var a=t||"";return n+String(o)+a+Cl(i,2)}function Nl(e,t){return e%60==0?(e>0?"-":"+")+Cl(Math.abs(e)/60,2):Bl(e,t)}function Bl(e,t){var n=t||"",r=e>0?"-":"+",o=Math.abs(e);return r+Cl(Math.floor(o/60),2)+n+Cl(o%60,2)}const Zl=Il;var Fl=function(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},Ll=function(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}};const Hl={p:Ll,P:function(e,t){var n,r=e.match(/(P+)(p+)?/)||[],o=r[1],i=r[2];if(!i)return Fl(e,t);switch(o){case"P":n=t.dateTime({width:"short"});break;case"PP":n=t.dateTime({width:"medium"});break;case"PPP":n=t.dateTime({width:"long"});break;default:n=t.dateTime({width:"full"})}return n.replace("{{date}}",Fl(o,t)).replace("{{time}}",Ll(i,t))}};function Ul(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}var zl=["D","DD"],Wl=["YY","YYYY"];function Vl(e){return-1!==zl.indexOf(e)}function Yl(e){return-1!==Wl.indexOf(e)}function ql(e,t,n){if("YYYY"===e)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===e)throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===e)throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===e)throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}const Gl=a(41695).Z;var Ql=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Xl=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Kl=/^'([^]*?)'?$/,$l=/''/g,Jl=/[a-zA-Z]/;function ed(e,t,n){var r,o,i,a,c,s,u,l,d,f,p,h,m,g,v,y,b,w;(0,il.Z)(2,arguments);var A=String(t),x=(0,wl.j)(),E=null!==(r=null!==(o=null==n?void 0:n.locale)&&void 0!==o?o:x.locale)&&void 0!==r?r:Gl,O=(0,ll.Z)(null!==(i=null!==(a=null!==(c=null!==(s=null==n?void 0:n.firstWeekContainsDate)&&void 0!==s?s:null==n||null===(u=n.locale)||void 0===u||null===(l=u.options)||void 0===l?void 0:l.firstWeekContainsDate)&&void 0!==c?c:x.firstWeekContainsDate)&&void 0!==a?a:null===(d=x.locale)||void 0===d||null===(f=d.options)||void 0===f?void 0:f.firstWeekContainsDate)&&void 0!==i?i:1);if(!(O>=1&&O<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var C=(0,ll.Z)(null!==(p=null!==(h=null!==(m=null!==(g=null==n?void 0:n.weekStartsOn)&&void 0!==g?g:null==n||null===(v=n.locale)||void 0===v||null===(y=v.options)||void 0===y?void 0:y.weekStartsOn)&&void 0!==m?m:x.weekStartsOn)&&void 0!==h?h:null===(b=x.locale)||void 0===b||null===(w=b.options)||void 0===w?void 0:w.weekStartsOn)&&void 0!==p?p:0);if(!(C>=0&&C<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!E.localize)throw new RangeError("locale must contain localize property");if(!E.formatLong)throw new RangeError("locale must contain formatLong property");var k=(0,sl.Z)(e);if(!ul(k))throw new RangeError("Invalid time value");var S=Ul(k),D=fl(k,S),P={firstWeekContainsDate:O,weekStartsOn:C,locale:E,_originalDate:k},_=A.match(Xl).map((function(e){var t=e[0];return"p"===t||"P"===t?(0,Hl[t])(e,E.formatLong):e})).join("").match(Ql).map((function(r){if("''"===r)return"'";var o=r[0];if("'"===o)return td(r);var i=Zl[o];if(i)return null!=n&&n.useAdditionalWeekYearTokens||!Yl(r)||ql(r,t,String(e)),null!=n&&n.useAdditionalDayOfYearTokens||!Vl(r)||ql(r,t,String(e)),i(D,r,E.localize,P);if(o.match(Jl))throw new RangeError("Format string contains an unescaped latin alphabet character `"+o+"`");return r})).join("");return _}function td(e){var t=e.match(Kl);return t?t[1].replace($l,"'"):e}function nd(e){(0,il.Z)(1,arguments);var t=(0,sl.Z)(e);return t.setHours(0,0,0,0),t}var rd=864e5;function od(e,t){(0,il.Z)(2,arguments);var n=(0,sl.Z)(e),r=(0,sl.Z)(t);return n.getFullYear()-r.getFullYear()}function id(e,t){(0,il.Z)(2,arguments);var n=(0,sl.Z)(e),r=(0,sl.Z)(t),o=n.getTime()-r.getTime();return o<0?-1:o>0?1:o}var ad=a(82022),cd=function(e,t){return ed(t,"HH",{locale:ad.Z.getDateFnsLocale(e)})},sd=function(e,t,n){var r=function(e,t){(0,il.Z)(2,arguments);var n=nd(e),r=nd(t),o=n.getTime()-Ul(n),i=r.getTime()-Ul(r);return Math.round((o-i)/rd)}(n,t),o=function(e,t){(0,il.Z)(2,arguments);var n=(0,sl.Z)(e),r=(0,sl.Z)(t),o=id(n,r),i=Math.abs(od(n,r));n.setFullYear(1584),r.setFullYear(1584);var a=id(n,r)===-o,c=o*(i-Number(a));return 0===c?0:c}(n,t),i=r>0,a="d. LLLL".concat(o>0?" y":""),c="H:mm",s={locale:ad.Z.getDateFnsLocale(e)},u=ed(t,a,s),l=ed(n,a,s),d=ed(t,c,s),f=ed(n,c,s);return"".concat(u,", ").concat(d," - ").concat(i?"".concat(l,", "):"").concat(f)};const ud=function(e){var t=e.conflictStatus,n=e.intl;if(t!==X.ACCEPTED&&t!==X.EXISTING)return null;var r=t===X.ACCEPTED,o="client.scheduler.conflict".concat(r?"Accepted":"Existing"),i=r?"✓":"✕";return(0,S.jsxs)("span",{children:[i," ",n.formatMessage({id:o})]})},ld=ud;var dd,fd=a(44012),pd=a(65035),hd=a(46444),md=a.n(hd),gd=a(58129);const vd=b.ZP.div.withConfig({displayName:"StyledButtonGroup"})(dd||(dd=(0,v.Z)(["\n display: flex;\n\n &&& > "," {\n :not(:first-child) {\n margin-left: -1px;\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n }\n\n :not(:last-child) {\n margin-right: 0;\n border-right: 0;\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n }\n }\n"])),gd.Z);var yd=I().forwardRef((function(e,t){return(0,S.jsx)(vd,{ref:t,children:e.children})}));yd.propTypes={children:md().node};const bd=yd;var wd=a(68957),Ad=a(70807),xd={};xd.styleTagTransform=ye(),xd.setAttributes=he(),xd.insert=fe().bind(null,"head"),xd.domAPI=le(),xd.insertStyleElement=ge();se()(Ad.Z,xd);Ad.Z&&Ad.Z.locals&&Ad.Z.locals;var Ed,Od=a(12520),Cd=a.n(Od),kd=b.ZP.span.withConfig({displayName:"StyledChildrenWrapper"})(Ed||(Ed=(0,v.Z)(["\n cursor: pointer;\n user-select: none;\n"])));const Sd=function(e){var t=e.children,n=e.onOpen;return(0,S.jsx)(kd,{onClick:n,children:t})};var Dd=a(5429),Pd=function(){(0,Od.registerLocale)("en",ad.Z.getDateFnsLocale("en")),(0,Od.registerLocale)("en-US",ad.Z.getDateFnsLocale("en")),(0,Od.registerLocale)("de-CH",ad.Z.getDateFnsLocale("de-CH")),(0,Od.registerLocale)("de",ad.Z.getDateFnsLocale("de")),(0,Od.registerLocale)("fr",ad.Z.getDateFnsLocale("fr")),(0,Od.registerLocale)("fr-CH",ad.Z.getDateFnsLocale("fr")),(0,Od.registerLocale)("it",ad.Z.getDateFnsLocale("it")),(0,Od.registerLocale)("it-CH",ad.Z.getDateFnsLocale("it")),(0,Od.setDefaultLocale)("de")};Pd();const _d=(0,b.Zz)((0,P.ZP)((function(e){var t,n=e.children,r=e.value,o=e.onChange,i=e.intl,a=i.locale,c=(0,R.useRef)(null),s=(0,R.useState)(!1),u=(0,wd.Z)(s,2),l=u[0],d=u[1],f=function(e){var t,n;(d(e),null!==(t=c.current)&&void 0!==t&&t.setPreSelection)&&(null===(n=c.current)||void 0===n||n.setPreSelection(r))};return(0,S.jsx)(Cd(),{ref:c,selected:r,preSelection:null,onChange:o,showTimeInput:!1,dateFormat:"P",showMonthDropdown:!0,showYearDropdown:!0,scrollableYearDropdown:!0,fixedHeight:!0,showPopperArrow:!1,open:l,onFocus:function(){f(!0)},onClickOutside:function(){f(!1)},locale:a,enableTabLoop:!1,customInput:(0,S.jsx)(Sd,{onOpen:function(){f(!0)},children:n}),todayButton:(t="client.component.datePicker.todayLabel",i.formatMessage({id:t}))})})));var jd,Td,Rd,Id,Md,Nd,Bd,Zd=a(34206),Fd=a(28655),Ld=a.n(Fd),Hd=b.ZP.div.withConfig({displayName:"StyledNavigationFullCalendar"})(jd||(jd=Ld()(["\n display: flex;\n justify-content: space-between;\n margin: "," ",";\n\n > div {\n display: flex;\n align-items: center;\n }\n"])),x.Z.space(-1),x.Z.space(-2)),Ud=b.ZP.div.withConfig({displayName:"StyledButtonGroupReloadWrapper"})(Td||(Td=Ld()(["\n && {\n display: grid;\n grid-template-columns: auto 40px;\n }\n"]))),zd=b.ZP.div.withConfig({displayName:"StyledReloadButtonWrapper"})(Rd||(Rd=Ld()([""])));function Wd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Vd(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Wd(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wd(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Yd=function(e,t){return e===t?{ink:"secondary"}:{}},qd=function(e,t){return t.formatMessage({id:e})};const Gd=(0,P.ZP)((function(e){var t=e.date,n=e.changeRange,r=e.changeView,o=e.chooseNext,i=e.choosePrev,a=e.chooseToday,c=e.goToDate,s=e.intl,u=e.isLoading,l=e.refresh,d=e.title,f=e.type;return(0,S.jsxs)(Hd,{children:[(0,S.jsxs)("div",{children:[(0,S.jsx)(pd.Z,{look:"raised",onClick:function(){a(),n()},children:Id||(Id=(0,S.jsx)(fd.Z,{id:"client.scheduler.today"}))}),(0,S.jsxs)(bd,{children:[(0,S.jsx)(pd.Z,{look:"raised",onClick:function(){i(),n()},icon:"chevron-left",title:qd("client.scheduler.previous",s)}),(0,S.jsx)(pd.Z,{look:"raised",onClick:function(){o(),n()},icon:"chevron-right",title:qd("client.scheduler.next",s)})]}),(0,S.jsxs)(_d,{value:t,onChange:function(e){c(e),n()},children:[(0,S.jsx)(Zd.ZP.Span,{children:d}),(0,S.jsx)(B.Z,{style:{marginLeft:"5px"},icon:"chevron-down"})]})]}),(0,S.jsxs)(Ud,{children:[(0,S.jsxs)(bd,{children:[(0,S.jsx)(pd.Z,Vd(Vd({look:"raised"},Yd("dayView",f)),{},{onClick:function(){return r("dayView")},children:Md||(Md=(0,S.jsx)(fd.Z,{id:"client.scheduler.day"}))})),(0,S.jsx)(pd.Z,Vd(Vd(Vd({look:"raised"},Yd("weekView",f)),Yd("weekViewSimple",f)),{},{onClick:function(){return r("weekViewSimple"!==f?"weekViewSimple":"weekView")},children:Nd||(Nd=(0,S.jsx)(fd.Z,{id:"client.scheduler.week"}))})),(0,S.jsx)(pd.Z,Vd(Vd({look:"raised"},Yd("monthView",f)),{},{onClick:function(){return r("monthView")},children:Bd||(Bd=(0,S.jsx)(fd.Z,{id:"client.scheduler.month"}))}))]}),(0,S.jsx)(zd,{children:(0,S.jsx)(pd.Z,{icon:u?"":"sync",onClick:function(){u||l()},pending:u,title:qd("client.scheduler.reload",s)})})]})]})})),Qd=Gd;const Xd=function(e){var t=e.fieldValue,n=e.resource,r=e.onCalendarRemove;return(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)("input",{type:"checkbox",defaultChecked:!0,className:"remove-resource-checkbox",onClick:function(){return r(n.extendedProps.entityKey,n.extendedProps.entityModel)}}),t]})};var Kd,$d,Jd,ef,tf=a(27361),nf=a.n(tf),rf=a(58664),of=a(11347),af=b.ZP.div.withConfig({displayName:"StyledFullCalendarWrapper"})(Kd||(Kd=Ld()(["\n height: 100%;\n display: grid;\n grid-template-rows: auto 1fr;\n\n .fc {\n ",";\n\n table {\n font-size: ",";\n }\n\n // decrease header height\n .fc-datagrid-header {\n .fc-datagrid-cell-frame {\n height: 25px !important;\n }\n }\n\n .fc-timeline-event {\n overflow: hidden;\n }\n\n .fc-timeline-slot-frame a {\n text-decoration: none;\n }\n\n // decrease header height\n .fc-timeline-slot-frame.fc-timeline-slot-frame {\n height: 25px !important;\n }\n\n .remove-resource-checkbox {\n margin-right: 6px;\n }\n\n .fc-scrollgrid {\n border-top: 0; // remove top border as it otherwise causes a double border when not scrolling\n border-color: ",";\n }\n\n // prevent top border from disappearing on scroll\n & .fc-scroller-harness {\n border-top: 1px solid ",";\n }\n\n .fc-timeline-header-row {\n th {\n font-weight: ",";\n }\n }\n\n .fc-event {\n cursor: pointer;\n\n .dark {\n color: ",";\n }\n\n .bright {\n color: ",";\n }\n\n .conflict {\n border: 2px dashed ",";\n }\n\n .fc-event-time {\n overflow: visible;\n font-size: ",";\n font-weight: ",";\n }\n }\n\n .fc-event-title {\n font-size: ",";\n }\n }\n"])),(0,A.Z)(),x.Z.font(-2),(function(e){var t=e.theme;return(0,rf.HO)(nf()(t,"colors.paper"),1)}),(function(e){var t=e.theme;return(0,rf.HO)(nf()(t,"colors.paper"),1)}),w.FS.fontWeight("regular"),w.FS.color("text"),w.FS.color("paper"),w.FS.color("signal.danger.text"),x.Z.font(0),w.FS.fontWeight("regular"),x.Z.font(0)),cf=b.ZP.div.withConfig({displayName:"StyledMemoizedFullCalender"})($d||($d=Ld()(["\n overflow-y: auto;\n ","\n"])),of.C),sf=(0,b.vJ)(Jd||(Jd=Ld()(["\n @media print {\n body * {\n visibility: hidden;\n }\n\n #section-to-print,\n #section-to-print * {\n visibility: visible;\n color: ",";\n\n input[type='checkbox'] {\n visibility: hidden !important;\n }\n }\n\n #section-to-print {\n position: fixed;\n overflow: visible;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n\n & *:not(.fc-timeline-event-harness *) {\n overflow: visible;\n }\n }\n }\n"])),w.FS.color("text"));function uf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function lf(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?uf(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uf(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var df=(0,R.forwardRef)((function(e,t){var n=e.resources,r=e.events,o=e.onDateRangeChange,i=e.isLoading,a=e.onRefresh,c=e.onCalendarRemove,s=e.onCalendarRemoveAll,u=e.locale,l=e.onEventClick,d=e.intl,f=(0,R.useRef)(null),p=(0,R.useRef)(null),h=(0,R.useCallback)((function(){var e=f.current.getApi().view;o&&o({startDate:e.activeStart,endDate:e.activeEnd})}),[o]);(0,R.useEffect)((function(){h()}),[h,u]),(0,R.useEffect)((function(){var e=f.current.getApi();e.batchRendering((function(){e.getEventSources().forEach((function(e){return e.remove()})),e.addEventSource(r)}))}),[JSON.stringify(r)]),(0,R.useEffect)((function(){var e=f.current.getApi();e.batchRendering((function(){var t=e.getResources();t.forEach((function(e){n.find((function(t){return e.id===t.id}))||e.remove()})),n.forEach((function(n){t.find((function(e){return e.id===n.id}))||e.addResource(n)}))}))}),[JSON.stringify(n)]);var m=(0,S.jsx)("input",{type:"checkbox",checked:!0,onChange:function(){return s()},style:{visibility:n.length>0?"visible":"hidden"},className:"remove-all-checkbox"}),g=function(e){var t=sd(u,e.event.start,e.event.end),n=(0,S.jsxs)("div",{children:[(0,S.jsx)(nl.Z,{type:"html",value:e.event.extendedProps.description}),(0,S.jsx)("p",{children:t}),(0,S.jsx)("p",{children:(0,S.jsx)(ld,{conflictStatus:e.event.extendedProps.conflict,intl:d})})]}),r=e.event.extendedProps.styleAttr;return(0,S.jsx)(rl.Z,{content:n,isPlainHtml:!0,placement:"top",children:(0,S.jsxs)("div",{className:"fc-event-main-frame ".concat(r&&r.join(" ")),children:[e.timeText&&(0,S.jsx)("div",{className:"fc-event-time",children:e.timeText}),(0,S.jsx)("div",{className:"fc-event-title-container",children:(0,S.jsx)("div",{className:"fc-event-title fc-sticky",children:e.event.title||(0,S.jsx)(S.Fragment,{children:" "})})})]})})},v=(0,R.useMemo)((function(){return(0,S.jsx)(qa,{resourceOrder:"calendarType,title",schedulerLicenseKey:(e="MISSING_ENV_VAR".FULL_CALENDAR_LICENCE,e||(ol.Z.logWarning("This Version runs with the NonCommercial FullCalendar license."),"CC-Attribution-NonCommercial-NoDerivatives")),locale:u,plugins:[cc,tl,Ic],ref:f,initialView:"dayView",headerToolbar:!1,height:"auto",resourceAreaWidth:"15%",resourceAreaColumns:[{labelText:"",headerContent:m}],resourceLabelContent:function(e){return(0,S.jsx)(Xd,lf(lf({},e),{},{onCalendarRemove:c}))},eventClick:function(e){l(e.event)},eventContent:g,firstDay:1,slotMinTime:"06:00:00",slotMaxTime:"23:00:00",views:{dayView:{type:"resourceTimelineDay",slotLabelFormat:function(e){return cd(u,ne()(Date,z()(e.date.array)))}},weekView:{type:"resourceTimelineWeek",slotLabelFormat:[{weekday:"short",month:"numeric",day:"numeric"},function(e){return cd(u,ne()(Date,z()(e.date.array)))}]},weekViewSimple:{type:"resourceTimelineWeek",slotDuration:{day:1},slotLabelFormat:[{weekday:"short",month:"numeric",day:"numeric"}]},monthView:{type:"resourceTimelineMonth",slotLabelFormat:{weekday:"short",day:"numeric",omitCommas:!0}}}});var e}),[n.length]);return(0,R.useImperativeHandle)(t,(function(){return{updateSize:function(){setTimeout((function(){f.current.getApi().updateSize()}),0)}}})),(0,S.jsxs)(af,{ref:p,children:[ef||(ef=(0,S.jsx)(sf,{})),f.current&&(0,S.jsx)(Qd,{changeRange:h,changeView:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"timelineDay";f.current.getApi().changeView(e),h()},chooseNext:function(){return f.current.getApi().next()},choosePrev:function(){return f.current.getApi().prev()},chooseToday:function(){return f.current.getApi().today()},goToDate:function(e){return f.current.getApi().gotoDate(e)},date:f.current.getApi().getDate(),isLoading:i,refresh:a,title:f.current.getApi().view.title,type:f.current.getApi().view.type}),(0,S.jsx)(cf,{id:"section-to-print",children:v})]})}));df.defaultProps={locale:"en"},df.displayName="FullCalendar";const ff=df;const pf=function(e){return(0,S.jsx)(ff,{events:(t=e.calendars,t.reduce((function(e,t){return[].concat(z()(e),z()(t.events.map((function(e){return $($({entity:e.source,resourceId:J(t.key,t.model),title:e.label,start:e.start,end:e.end,description:e.description,conflict:e.conflict},e.color?{backgroundColor:e.color,borderColor:e.color}:{}),{},{styleAttr:[].concat(z()(e.conflict===X.EXISTING?["conflict"]:[]),[(n=e.color,Q(n,"bright","dark"))])});var n}))))}),[])),resources:ee(e.calendars),onDateRangeChange:e.onDateRangeChange,onCalendarRemove:e.onCalendarRemove,onCalendarRemoveAll:e.onCalendarRemoveAll,onEventClick:e.onEventClick,onRefresh:e.onRefresh,locale:e.locale,isLoading:e.isLoading,intl:e.intl,ref:e.schedulerRef});var t};var hf="scheduler/SET_CALENDARS",mf="scheduler/ON_DATE_RANGE_CHANGE",gf="scheduler/ON_CALENDAR_REMOVE",vf="scheduler/ON_CALENDARS_REMOVE_ALL",yf="scheduler/ON_EVENT_CLICK",bf="scheduler/ON_REFRESH",wf="scheduler/REMOVE_EVENTS",Af="scheduler/SET_IS_LOADING",xf=function(){return{type:wf}},Ef=function(e){return{type:Af,payload:{isLoading:e}}},Of={onDateRangeChange:function(e){return{type:mf,payload:{dateRange:e}}},onCalendarRemove:function(e,t){return{type:gf,payload:{id:e,entityModel:t}}},onCalendarRemoveAll:function(){return{type:vf}},onEventClick:function(e){return{type:yf,payload:{event:e}}},onRefresh:function(){return{type:bf}}};const Cf=(0,_.connect)((function(e,t){return{calendars:e.scheduler.calendars,locale:e.intl.locale,isLoading:e.scheduler.isLoading,schedulerRef:e.input.schedulerRef}}),Of)((0,P.ZP)(pf));var kf=function(e){return void 0!==e};const Sf=function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return t.reduce((function(t,r){return kf(e[r.name])&&"function"==typeof r.action?t.push(r.action.apply(r,z()(r.argsFactory(e)))):r.mandatory&&n&&ol.Z.logError("Mandatory field '".concat(r.name,"' not set in input")),t}),[])};var Df,Pf=function(e){return Sf(e,_f)},_f=[{name:"calendars",action:function(e){return{type:hf,payload:{calendars:e}}},argsFactory:function(e){return[e.calendars]}}],jf=a(81770);function Tf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Rf(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Tf(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Tf(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var If=(Df={},L()(Df,hf,jf.Z.singleTransferReducer("calendars")),L()(Df,Af,jf.Z.singleTransferReducer("isLoading")),L()(Df,wf,(function(e){return Rf(Rf({},e),{},{calendars:e.calendars.map((function(e){return Rf(Rf({},e),{},{events:[]})}))})})),Df),Mf={calendars:[],isLoading:!0};const Nf=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Mf,t=arguments.length>1?arguments[1]:void 0,n=If[t.type];return n?n(e,t):e};var Bf=a(87757),Zf=a.n(Bf),Ff=a(34857),Lf=Zf().mark(qf),Hf=Zf().mark(Gf),Uf=Zf().mark(Qf),zf=Zf().mark(Xf),Wf=Zf().mark(Kf),Vf=Zf().mark($f),Yf=Zf().mark(Jf);function qf(){return Zf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Ff.$6)([(0,Ff.Fm)(mf,Gf),(0,Ff.Fm)(gf,Qf),(0,Ff.Fm)(vf,Xf),(0,Ff.Fm)(yf,Kf),(0,Ff.Fm)(bf,$f),(0,Ff.Fm)(hf,Jf)]);case 2:case"end":return e.stop()}}),Lf)}function Gf(e){var t,n;return Zf().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return t=e.payload,r.next=3,(0,Ff.gz)(Ef(!0));case 3:return r.next=5,(0,Ff.gz)(xf());case 5:return n=t.dateRange,r.next=8,(0,Ff.gz)(h.Z.fireExternalEvent("onDateRangeChange",{dateRange:n}));case 8:case"end":return r.stop()}}),Hf)}function Qf(e){var t;return Zf().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return t=e.payload,n.next=3,(0,Ff.gz)(Ef(!0));case 3:return n.next=5,(0,Ff.gz)(h.Z.fireExternalEvent("onCalendarRemove",{id:t.id,entityModel:t.entityModel}));case 5:case"end":return n.stop()}}),Uf)}function Xf(){return Zf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Ff.gz)(Ef(!0));case 2:return e.next=4,(0,Ff.gz)(h.Z.fireExternalEvent("onCalendarRemoveAll"));case 4:case"end":return e.stop()}}),zf)}function Kf(e){var t,n;return Zf().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(t=e.payload,!(n=t.event.extendedProps.entity)){r.next=5;break}return r.next=5,(0,Ff.gz)(h.Z.fireExternalEvent("onEventClick",n));case 5:case"end":return r.stop()}}),Wf)}function $f(){return Zf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Ff.gz)(Ef(!0));case 2:return e.next=4,(0,Ff.gz)(xf());case 4:return e.next=6,(0,Ff.gz)(h.Z.fireExternalEvent("onRefresh"));case 6:case"end":return e.stop()}}),Vf)}function Jf(){return Zf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Ff.gz)(Ef(!1));case 2:case"end":return e.stop()}}),Yf)}const ep={scheduler:Nf};var tp,np=[qf];function rp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function op(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?rp(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rp(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ip="scheduler",ap=["onDateRangeChange","onCalendarRemove","onCalendarRemoveAll","onEventClick","onRefresh"],cp=function(e,t,n,r){var o=tp||(tp=(0,S.jsx)(Cf,{})),i=s.Z.createStore(ep,np,t,ip);return h.Z.addToStore(i,(function(e){return s.Z.getEvents(ap,e.input)})),s.Z.createApp(ip,o,i,{input:t,events:n,actions:Pf(t),publicPath:r,textResourceModules:["component","common",ip]})},sp=function(e){var t=s.Z.useApp({initApp:cp,props:e,packageName:ip,externalEvents:ap}),n=t.component,r=t.store;return H.Z.useDidUpdate((function(){Pf(e).forEach((function(e){null!=n&&r.dispatch(e)}))}),[e]),n};sp.propTypes=op(op({calendars:l().arrayOf(l().shape({calendarType:l().string.isRequired,events:l().arrayOf(l().shape({description:l().string,start:l().number,end:l().number,allDay:l().bool})),key:l().string.isRequired,label:l().string.isRequired,model:l().string.isRequired})),schedulerRef:l().object},ap.reduce((function(e,t){return op(op({},e),{},L()({},t,l().func))}),{})),{},{locale:l().string});const up=sp;var lp="resourceScheduler/SET_CALENDAR_TYPES",dp="resourceScheduler/INITIALIZE",fp="resourceScheduler/UPDATE_REQUESTED_CALENDARS",pp="resourceScheduler/LOAD_REQUESTED_CALENDARS",hp="resourceScheduler/SET_CALENDARS",mp="resourceScheduler/SET_DATE_RANGE",gp="resourceScheduler/REMOVE_REQUESTED_CALENDAR",vp="resourceScheduler/REMOVE_ALL_CALENDARS",yp="resourceScheduler/ON_EVENT_CLICK",bp="resourceScheduler/ON_REFRESH",wp="resourceScheduler/SET_HANDLE_NOTIFICATIONS",Ap=function(e,t){return{type:fp,payload:{calendarType:e,ids:t}}},xp=function(e){return{type:hp,payload:{calendars:e}}},Ep=function(e){return{type:mp,payload:{dateRange:e}}},Op=function(e,t){return{type:gp,payload:{entityModel:e,id:t}}},Cp={onDateRangeChange:function(e){var t=e.dateRange;return Ep(t)},onCalendarRemove:function(e){var t=e.entityModel,n=e.id;return Op(t,n)},onCalendarRemoveAll:function(){return{type:vp}},onEventClick:function(e){return function(e,t){return{type:yp,payload:{model:e,key:t}}}(e.model,e.key)},onRefresh:function(){return{type:bp}}};const kp=(0,_.connect)((function(e,t){return{calendars:e.resourceScheduler.calendars,locale:e.intl.locale}}),Cp)((0,P.ZP)(up));var Sp=a(18446),Dp=a.n(Sp),Pp=a(35937),_p=a.n(Pp),jp=a(6479),Tp=a.n(jp),Rp=a(48926),Ip=a.n(Rp),Mp=a(74133),Np=a(88001);const Bp=function(e){var t=e.packageName,n=e.appName;return"PRODUCTION"!==Np.Z.getRunEnv()?(0,S.jsxs)("div",{children:['Fehler beim Laden der "',n,'" App im Package "',t,'".']}):null};var Zp=function(e){return"/js/tocco-".concat(e,"/dist/")},Fp=function(e,t){var n=e!==t?t:"index";return"".concat(Zp(e)).concat(n,".js")},Lp=function(e){return new Promise((function(t,n){var r=document.createElement("script");r.src=e,r.async=!0,r.type="text/javascript",r.onload=function(){t()},r.onerror=function(){n(new Error("Could not load script."))},r.crossorogin=!0;var o=document.getElementsByTagName("script")[0];o.parentNode.insertBefore(r,o)}))},Hp=function(){var e=Ip()(Zf().mark((function e(t,n){var r,o;return Zf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r="tocco-".concat(n),o=window[r]){e.next=6;break}return e.next=5,Lp(Fp(t,n));case 5:o=window[r];case 6:return e.abrupt("return",o);case 7:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}();const Up={loadBundle:Hp,loadScriptAsync:Lp,getEntryFilePath:Fp,getDistPath:Zp};const zp=function(e){var t,n=e.packageName,r=e.appName,o=(0,R.useState)(null),i=T()(o,2),a=i[0],c=i[1];return(0,R.useEffect)((function(){var e=function(){var e=Ip()(Zf().mark((function e(){var o,i,a;return Zf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Up.loadBundle(n,r);case 3:o=e.sent,i=o.app,a=i.App,(0,i.setWebpacksPublicPath)(Up.getDistPath(n)),c((function(){return a})),e.next=13;break;case 9:e.prev=9,e.t0=e.catch(0),Mp.Z.logError(e.t0),c((function(){return function(){return t||(t=(0,S.jsx)(Bp,{packageName:n,appName:r}))}}));case 13:case"end":return e.stop()}}),e,null,[[0,9]])})));return function(){return e.apply(this,arguments)}}();e()}),[]),a};Up.loadBundle,Up.loadScriptAsync,Up.getEntryFilePath;var Wp,Vp=["packageName","appName"];function Yp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}const qp=function(e){var t=e.packageName,n=e.appName,r=Tp()(e,Vp),o=zp({packageName:t,appName:n});return o?(0,S.jsx)(o,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Yp(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Yp(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},r)):Wp||(Wp=(0,S.jsx)(Z.Z,{}))};var Gp,Qp="actions/FETCH_ACTION_PACKAGES",Xp="actions/SET_ACTION_PACKAGES",Kp=function(){return{type:Qp}},$p=["appId","fetchActionPackages","actionPackages"];function Jp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function eh(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Jp(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Jp(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var th=function(){return Gp||(Gp=(0,S.jsx)(Z.Z,{}))};const nh=function(e){var t={fetchActionPackages:Kp};return(0,_.connect)((function(e){return{actionPackages:e.dynamicActions.actionPackages}}),t)((function(t){var n=t.appId,r=t.fetchActionPackages,o=t.actionPackages,i=Tp()(t,$p),a=null!=o;if((0,R.useEffect)((function(){a||r()}),[r,a]),!a)return th();var c=e[n]||function(e){if(!e)return null;var t=e.packageName,n=e.appName;return function(e){return(0,S.jsx)(qp,eh(eh({},e),{},{packageName:t,appName:n}))}}(function(e,t){var n=e?e.filter((function(e){return e.actionName===t})):null;return n&&n.length>0?n[0]:null}(o,n));if(!c)return ol.Z.logError("no action found with id: ".concat(n)),null;var s=(0,_.connect)(null,{emitAction:function(e){return d.Z.dispatchEmittedAction(e)}})(c);return(0,S.jsx)(R.Suspense,{fallback:th(),children:(0,S.jsx)(s,eh({appId:n},i))})}))},rh=Object.freeze({ACTION:"action",REPORT:"report",ACTION_GROUP:"action-group",ACTION_BAR:"action-bar"});var oh=function(e){return!!e&&Object.values(rh).indexOf(e)>=0},ih=a(24688),ah=L()({},Xp,jf.Z.singleTransferReducer("actionPackages")),ch={actionPackages:null};function sh(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ch,t=arguments.length>1?arguments[1]:void 0,n=ah[t.type];return n?n(e,t):e}var uh=a(63094),lh=Zf().mark(fh),dh=Zf().mark(ph);function fh(){return Zf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Ff.$6)([(0,Ff.Fm)(Qp,ph)]);case 2:case"end":return e.stop()}}),lh)}function ph(){var e,t;return Zf().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,Ff.RE)(uh.Z.requestSaga,"/client/actionPackages",{method:"GET"});case 2:return t=n.sent,n.next=5,(0,Ff.gz)((r=(null===(e=t.body)||void 0===e?void 0:e.actionPackages)||[],{type:Xp,payload:{actionPackages:r}}));case 5:case"end":return n.stop()}var r}),dh)}var hh="remoteEvents/REMOTE_EVENT";const mh=hh,gh=function(e){return{type:hh,payload:{event:e}}},vh=Object.freeze({CUSTOM:"custom",SIMPLE:"simple",REPORT:"report",DIVIDER:"divider",LEGACY:"legacy"});var yh=a(44422),bh=a(2100),wh=Zf().mark(Ch),Ah=Zf().mark(Ph),xh=Zf().mark(_h),Eh=Zf().mark(jh),Oh=Zf().mark(Th);function Ch(e,t,n,r,o){var i;return Zf().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:if(!e.appId){a.next=21;break}if(!e.fullscreen){a.next=11;break}if(!o.customActions||!o.customActions.fullscreen){a.next=7;break}return a.next=5,(0,Ff.RE)(_h,{definition:e,selection:t,config:o});case 5:a.next=9;break;case 7:return a.next=9,(0,Ff.RE)(ol.Z.logError,"Unable to render custom action: No fullscreen handler provided");case 9:a.next=19;break;case 11:if(!o.appComponent){a.next=17;break}return a.next=14,(0,Ff.RE)(Ph,{definition:e,config:o,selection:t});case 14:case 25:return a.abrupt("return",a.sent);case 17:return a.next=19,(0,Ff.RE)(ol.Z.logError,"Unable to render custom action: No appComponent provided");case 19:a.next=30;break;case 21:if(!(i=o&&o.customActions&&o.customActions[e.id])){a.next=28;break}return a.next=25,(0,Ff.RE)(jh,{definition:e,selection:t,parent:n,params:r,config:o,handler:i});case 28:return a.next=30,(0,Ff.RE)(ol.Z.logError,"Unable to load custom action with id ".concat(e.id));case 30:case"end":return a.stop()}}),wh)}var kh="ok",Sh="not_ok",Dh="cancel";function Ph(e){var t,n,r,o,i,a,c,s,u,l;return Zf().wrap((function(d){for(;;)switch(d.prev=d.next){case 0:return t=e.definition,n=e.selection,r=e.config,d.next=3,(0,Ff.RE)(yh.CE);case 3:return o=d.sent,d.next=6,(0,Ff.Ys)(bh.Z.localeSelector);case 6:return i=d.sent,a=r.appComponent,d.next=10,(0,Ff.gz)(m.Z.modal("action-".concat(t.appId),"client.actions.".concat(t.appId,".title"),null,(function(e){var c=e.close;return(0,S.jsx)(a,{appId:t.appId,context:r.context,actionProperties:t.properties,selection:n,navigationStrategy:r.navigationStrategy||{},locale:i,onSuccess:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.title,n=e.message,r=e.remoteEvents;c(),o.put({status:kh,title:t,message:n,remoteEvents:r})},onError:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.title,n=e.message;c(),o.put({status:Sh,title:t,message:n})},onCancel:function(){c(),o.put({status:Dh})}})}),!0));case 10:return d.next=12,(0,Ff.qn)(o);case 12:if((c=d.sent).status!==Dh){d.next=15;break}return d.abrupt("return",null);case 15:if(s=c.status===kh,null===c.title){d.next=21;break}return u=s?"success":"error",l=c.title||"client.component.actions.successDefault",d.next=21,(0,Ff.gz)(m.Z.toaster({type:u,title:l,body:c.message}));case 21:return d.abrupt("return",{success:s,remoteEvents:c.remoteEvents});case 22:case"end":return d.stop()}}),Ah)}function _h(e){var t,n,r;return Zf().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return t=e.definition,n=e.selection,r=e.config,o.next=3,(0,Ff.RE)(r.customActions.fullscreen,t,n);case 3:case"end":return o.stop()}}),xh)}function jh(e){var t,n,r,o,i,a,c,s,u,l;return Zf().wrap((function(d){for(;;)switch(d.prev=d.next){case 0:return t=e.definition,n=e.selection,r=e.config,o=e.parent,i=e.params,a=e.handler,d.next=3,(0,Ff.RE)(yh.CE);case 3:return c=d.sent,s=function(e){var t=e.title,n=e.message,r=e.remoteEvents;c.put({status:kh,title:t,message:n,remoteEvents:r})},u=function(e){var t=e.title,n=e.message;c.put({status:Sh,title:t,message:n})},l=function(){c.put({status:Dh})},d.next=9,(0,Ff.RE)(a,t,n,o,i,r,s,u,l);case 9:return d.next=11,(0,Ff.RE)(Th,c);case 11:return d.abrupt("return",d.sent);case 12:case"end":return d.stop()}}),Eh)}function Th(e){var t,n,r,o;return Zf().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,(0,Ff.qn)(e);case 2:if((t=i.sent).status!==Dh){i.next=5;break}return i.abrupt("return",null);case 5:if(n=t.status===kh,!t.title){i.next=11;break}return r=n?"success":"error",o="default"===t.title?"client.component.actions.successDefault":t.title,i.next=11,(0,Ff.gz)(m.Z.toaster({type:r,title:o,body:t.message}));case 11:return i.abrupt("return",{success:n,remoteEvents:t.remoteEvents});case 12:case"end":return i.stop()}}),Oh)}var Rh=a(68630),Ih=a.n(Rh);function Mh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Nh(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Mh(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Mh(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Bh=Zf().mark($h),Zh=Zf().mark(tm),Fh=Zf().mark(nm),Lh=Zf().mark(rm),Hh=Zf().mark(om),Uh=Zf().mark(im),zh=Zf().mark(am),Wh=Zf().mark(fm),Vh=Zf().mark(pm),Yh=Zf().mark(hm);function qh(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return Gh(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Gh(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){c=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(c)throw i}}}}function Gh(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Qh=["Single selection only, aborting...","Nothing selected, aborting..."],Xh=function(e){return new Promise((function(t,n){var r=document.createElement("script");r.src=e,r.onload=t,r.onerror=n,document.head.appendChild(r)}))},Kh=function(e){return new Promise((function(t,n){var r=document.getElementsByTagName("head")[0],o=document.createElement("link");o.rel="stylesheet",o.type="text/css",o.href=e,o.media="all",o.onload=t,o.onerror=n,r.appendChild(o)}))};function $h(e){var t,n,r,o,i;return Zf().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return t=window.legacyActionEnv||"new",a.next=3,(0,Ff.RE)(uh.Z.fetchServerSettings);case 3:n=a.sent,r=qh(e),a.prev=5,r.s();case 7:if((o=r.n()).done){a.next=14;break}if(!(i=o.value).envs.includes(t)){a.next=12;break}return a.next=12,(0,Ff.RE)(i.handler,"".concat(i.src,"?v=").concat(n.niceRevision));case 12:a.next=7;break;case 14:a.next=19;break;case 16:a.prev=16,a.t0=a.catch(5),r.e(a.t0);case 19:return a.prev=19,r.f(),a.finish(19);case 22:case"end":return a.stop()}}),Bh,null,[[5,16,19,22]])}var Jh=[{src:"/nice2/javascript/lang.release.js",handler:Xh,envs:["new"]},{src:"/nice2/javascript/nice2-ext-newclient-actions.release.js",handler:Xh,envs:["new"]},{src:"/nice2/javascript/nice2-admin.release.js",handler:Xh,envs:["new"]},{src:"/nice2/javascript/nice2-newclient-actions-public.release.js",handler:Xh,envs:["legacy-public"]},{src:"/nice2/javascript/nice2-newclient-actions-setup.release.js",handler:Xh,envs:["legacy-public","legacy-admin","new"]},{src:"/nice2/dwr-all.js",handler:Xh,envs:["new"]},{src:"/js/ext-extensions/ckeditor/ckeditor/ckeditor.js",handler:Xh,envs:["new"]},{src:"/css/themes/blue-medium.css",handler:Kh,envs:["new"]},{src:"/css/nice2-admin.css",handler:Kh,envs:["new"]},{src:"/css/nice2-new-client-legacy-actions.css",handler:Kh,envs:["new"]}],em=function(e,t){return function(n){e.put(n),t&&t.put(n)}};function tm(e){var t,n;return Zf().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=3,(0,Ff.qn)(e);case 3:return t=r.sent,n=gh(t),r.next=7,(0,Ff.gz)(n);case 7:r.next=0;break;case 9:case"end":return r.stop()}}),Zh)}function nm(){var e,t,n,r;return Zf().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,(0,Ff.RE)([window.app,window.app.getDataRegistry]);case 2:if(!(e=o.sent).setNewClientCallback){o.next=18;break}return o.next=6,(0,Ff.RE)(yh.CE);case 6:return t=o.sent,o.next=9,(0,Ff.RE)(yh.CE);case 9:return n=o.sent,o.next=12,(0,Ff.RE)(em,t,n);case 12:return r=o.sent,o.next=15,(0,Ff.RE)([e,e.setNewClientCallback],r);case 15:return o.next=17,(0,Ff.Cs)(tm,t);case 17:return o.abrupt("return",n);case 18:case"end":return o.stop()}}),Fh)}function rm(e){var t,n;return Zf().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:t=e.message.replace(/&nbsp;/g," "),r.t0=e.level,r.next="ERROR"===r.t0?4:"INFO"===r.t0?6:8;break;case 4:return n=m.Z.toaster({type:"error",title:t}),r.abrupt("break",9);case 6:return n=m.Z.toaster({type:"info",title:t}),r.abrupt("break",9);case 8:throw new Error("Unsupported notification level: ".concat(e.level));case 9:if(!n){r.next=12;break}return r.next=12,(0,Ff.gz)(n);case 12:case"end":return r.stop()}}),Lh)}function om(e){var t;return Zf().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=3,(0,Ff.qn)(e);case 3:return t=n.sent,n.next=6,(0,Ff.RE)(rm,t);case 6:n.next=0;break;case 8:case"end":return n.stop()}}),Hh)}function im(){var e,t,n,r;return Zf().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,(0,Ff.RE)([window.app,window.app.getGui]);case 2:return e=o.sent,o.next=5,(0,Ff.RE)([e,e.getNotifier]);case 5:if(!(t=o.sent).setNewClientCallback){o.next=17;break}return o.next=9,(0,Ff.RE)(yh.CE);case 9:return n=o.sent,o.next=12,(0,Ff.RE)(em,n);case 12:return r=o.sent,o.next=15,(0,Ff.RE)([t,t.setNewClientCallback],r);case 15:return o.next=17,(0,Ff.Cs)(om,n);case 17:case"end":return o.stop()}}),Uh)}function am(){return Zf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!0===window.legacyActionsEnvInitialized){e.next=5;break}return e.next=3,(0,Ff.RE)($h,Jh);case 3:return e.next=5,(0,Ff.RE)(window.setUpLegacyActionsEnv);case 5:return e.next=7,(0,Ff.RE)(im);case 7:return e.next=9,(0,Ff.RE)(nm);case 9:return e.abrupt("return",e.sent);case 10:case"end":return e.stop()}}),zh)}var cm=function(e){return e.list},sm=function(e){return e.entityList?Nh(Nh({},e.input),e.entityList):void 0},um=function(e){return e.entityDetail?Nh(Nh({},e.input),e.entityDetail):void 0},lm=function(e){return Nh(Nh({},new window.nice2.netui.ManualQuery),{},{entityName:e.entityName,queryWhere:e.query.where})},dm=function(e){return Nh(Nh({},new window.form.FormIdentifier),{},{scope:"list",formName:e.formDefinition.id})};function fm(e){var t,n;return Zf().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(t={entityName:e.entityName},"ID"!==e.type){r.next=6;break}t.selectedEntities=e.ids,t.selectionType="SELECTION",r.next=17;break;case 6:if("QUERY"!==e.type){r.next=16;break}return r.next=9,(0,Ff.Ys)(cm);case 9:n=r.sent,t.selectionType="NEW_CLIENT_QUERY",t.manualQuery=lm(e),t.listForm=dm(n),t.searchFilters=e.query.filter,r.next=17;break;case 16:throw new Error("Unsupported selection type: ".concat(e.type));case 17:return r.abrupt("return",t);case 18:case"end":return r.stop()}}),Wh)}function pm(){var e,t;return Zf().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,Ff.Ys)(sm);case 2:return e=n.sent,n.next=5,(0,Ff.Ys)(um);case 5:if(t=n.sent,!e||!t){n.next=8;break}throw new Error("Unable to get form scope. Unexpected state: entityList and entityDetail exist");case 8:if(!e){n.next=10;break}return n.abrupt("return","list");case 10:if(!t){n.next=20;break}if("update"!==t.mode){n.next=15;break}return n.abrupt("return","detail");case 15:if("create"!==t.mode){n.next=19;break}return n.abrupt("return","create");case 19:throw new Error("Unable to get form scope. Unexpected detail mode: ".concat(t.mode));case 20:throw new Error("Unable to get form scope. Expected to find either entityList or entityDetail in state");case 21:case"end":return n.stop()}}),Vh)}function hm(e,t,n,r,o){var i,a,c,s,u,l,d,f,p,h;return Zf().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,Ff.RE)(am);case 2:if(i=n.sent,(a=new window.nice2.netui.actions.model.ClientActionDefinition(e.path,e.id)).setEnabled(!e.readOnly),!Ih()(e.properties)){n.next=9;break}return c=Object.entries(e.properties).map((function(e){var t=T()(e,2),n=t[0],r=t[1];return(0,Ff.RE)([a,a.setProperty],n,r)})),n.next=9,(0,Ff.$6)(c);case 9:if((s=new window.nice2.modules.NewClientLegacyActionsModule({entityName:t.entityName,formName:t.entityName})).init(),u=new window.nice2.modules.NewClientLegacyActionsPanel({entityName:t.entityName}),l=new window.nice2.modules.entityexplorer.EntityExplorerActionContext(s,u),"ID"===t.type&&1===t.ids.length&&(l.getRecord=function(){return{id:t.ids[0]}}),n.t0=t.entityName,n.t1=e.scope,n.t1){n.next=20;break}return n.next=19,(0,Ff.RE)(pm);case 19:n.t1=n.sent;case 20:return n.t2=n.t1,d={entityName:n.t0,scope:n.t2},f=window.NetuiActionRegistry.newActionFromDefinition(a,d,l),n.next=25,(0,Ff.RE)(fm,t);case 25:p=n.sent,f.getSelectionNumber=function(){return"ID"===t.type?t.ids.length:0},f.getSelection=function(){return p},n.prev=28,f.perform(),n.next=37;break;case 32:if(n.prev=32,n.t3=n.catch(28),h=n.t3 instanceof Error?n.t3.message:n.t3,Qh.includes(h)){n.next=37;break}throw n.t3;case 37:if(!i){n.next=41;break}return n.next=40,(0,Ff.qn)(i);case 40:return n.abrupt("return",{success:!0});case 41:case"end":return n.stop()}}),Yh,null,[[28,32]])}var mm=a(36968),gm=a.n(mm);function vm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ym(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?vm(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vm(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var bm=a(13218),wm=a.n(bm),Am=a(78718),xm=a.n(Am),Em=a(54061),Om=a.n(Em),Cm=a(87185),km=a.n(Cm);function Sm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Dm(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Sm(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Sm(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Pm={KEY:"__key",MODEL:"__model",VERSION:"__version"},_m=["key","display","model","version"],jm=function(e,t){switch(e){case"entity":return t?xm()(t,_m):null;case"entity-list":return t.length>0?t.map((function(e){return xm()(e,_m)})):null;case"login":return nf()(t,"username");case"longitude":case"latitude":return nf()(t,"value");default:return t}},Tm=function(e,t){return Om()(t,(function(e,t,n){var r=(Array.isArray(t)?t:[t]).filter((function(e){return null!==e}));return Dm(Dm({},e),{},L()({},n,km()([].concat(z()(e[n]||[]),z()(r)),Dp())))}),e)},Rm=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return Om()(t,(function(t,r,o){var i=[].concat(z()(n),[o]),a={};r.value&&(a=Array.isArray(r.value)?r.value.reduce((function(t,n){var r=e(n.paths,i);return Tm(t,r)}),{}):e(r.value.paths,i));var c=L()({},i.join("."),jm(r.type,r.value));return Dm(Dm(Dm({},t),c),a)}),{})};function Im(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Mm(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Im(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Im(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Nm=function(e){return!e.hidden},Bm=function(e,t){var n=t&&t.findIndex((function(t){return t.field===e.id}));return n>=0?{sortRank:n+1,order:t[n].order}:null},Zm=["counter","decimal","double","integer","latitude","long","longitude","moneyamount","percent","serial","sorting","version"],Fm=function(e){return e.children&&1===e.children.length&&Zm.includes(e.children[0].dataType)};const Lm={metaFields:Pm,relationFieldTypes:["single-select-box","multi-select-box","single-remote-field","multi-remote-field"],relevantRelationAttributes:_m,getFlattenEntity:function(e){var t;return Dm((t={},L()(t,Pm.KEY,e.key),L()(t,Pm.MODEL,e.model),L()(t,Pm.VERSION,e.version),t),Rm(e.paths))},flattenPaths:Rm,toEntity:function(e){var t=function e(t){return Array.isArray(t)?t.map((function(t){return e(t)})):wm()(t)?xm()(t,["key","version","id","resourceKey"]):t},n=Object.keys(e).reduce((function(n,r){if(i=r,!Object.values(Pm).includes(i)){var o=r.split(".").join(".paths.").split(".");return gm()(n,o,t(e[r]))}var i;return n}),{});return{model:e[Pm.MODEL],key:e[Pm.KEY],version:e[Pm.VERSION],paths:n}},getPathDisplayRequest:function(e,t,n){var r={};return e.forEach((function(e){t.forEach((function(t){if(e[t]){var o=e[t];(Array.isArray(o)?o:[o]).filter((function(e){return null!==e})).forEach((function(e){var t=e.model,o=e.key;(function(e,t,n){return!!nf()(n,["defaultDisplays",e,t],"")})(t,o,n)||function(e,t,n){return nf()(n,[e],[]).includes(t)}(t,o,r)||gm()(r,[t],[].concat(z()(nf()(r,[t],[])),[o]))}))}}))})),r},getDisplayRequest:function(e){return e.reduce((function(e,t){return ym(ym({},e),{},L()({},t.model,[].concat(z()(e[t.model]||[]),[t.key])))}),{})},getColumnDefinition:function(e,t,n){for(var r=arguments.length,o=new Array(r>3?r-3:0),i=3;i<r;i++)o[i-3]=arguments[i];return e?e.filter((function(e){return!e.hidden})).filter((function(e){return e.children.filter(Nm).length>0})).map((function(e,r){return{idx:r,id:e.id,label:e.label,sorting:Mm({sortable:e.sortable},Bm(e,t)),children:e.children.filter(Nm),resizable:!e.widthFixed,rightAligned:Fm(e),CellRenderer:function(e){var t=e.rowData;return e.column.children.map((function(e){return n.apply(void 0,[e,t].concat(o))}))}}})):[]}};var Hm=a(23369),Um=a(28721),zm={emitAction:function(e){return d.Z.dispatchEmittedAction(e)}};const Wm=(0,_.connect)(null,zm);function Vm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ym(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Vm(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Vm(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var qm,Gm,Qm,Xm="generalSettings",Km="recipientSettings",$m=(Object.freeze({DISPLAY:"display",DOWNLOAD:"download"}),function(e,t){var n=function(e){return t.formatMessage({id:e})},r=function(t){return(e[t]||[]).map((function(e){return{children:[Ym(Ym({componentType:"field",dataType:e.dataType,defaultValue:e.defaultValue,id:e.id,label:e.label||e.description,path:e.id},e.targetEntity?{targetEntity:e.targetEntity}:{}),e.validation?{validation:e.validation}:{})],componentType:"field-set",hidden:!1,id:e.id,label:e.label||e.description,readonly:e.disabled,scopes:[]}}))};return{componentType:"form",label:null,modelid:"Bill_report_settings",readonly:!1,children:[{componentType:"layout",id:"generalSettings",label:n("client.common.report.generalSettings"),layoutType:"vertical-box",children:r(Xm)},{componentType:"layout",id:"recipientSettings",label:n("client.common.report.recipientSettings"),layoutType:"vertical-box",children:r(Km)}]}}),Jm=(l().shape({customSettings:l().shape({form:l().object,entity:l().object}),generalSettings:l().array,recipient:l().array,description:l().shape({name:l().string.isRequired})}),a(88601)),eg=b.ZP.div.withConfig({displayName:"StyledReportSettings"})(qm||(qm=Ld()(["\n margin-bottom: ",";\n\n && {\n > div:first-of-type {\n margin-bottom: 10px;\n }\n }\n"])),x.Z.space(1)),tg=b.ZP.div.withConfig({displayName:"StyledStickyButtons"})(Gm||(Gm=Ld()(["\n position: absolute;\n bottom: 0;\n width: calc(100% - 2 * ",");\n padding: ",";\n background-color: ",";\n z-index: 1;\n display: flex;\n justify-content: flex-end;\n\n ",":last-child {\n margin-right: 0;\n }\n"])),x.Z.space(1),x.Z.space(0),Jm.Z.color("paper"),gd.Z);function ng(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function rg(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ng(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ng(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const og=(0,P.ZP)((function(e){var t=e.settingsDefinition,n=e.formApp,r=e.onSubmit,o=e.listApp,i=e.docsApp,a=e.intl,c=t.customSettings&&t.customSettings.entity,s=(0,R.useState)({valid:!1,customSettingsValid:!c}),u=T()(s,2),l=u[0],d=u[1],f=(0,R.useMemo)((function(){return Wm(n)}),[n]);return(0,S.jsxs)(eg,{children:[(0,S.jsx)(f,{listApp:o,docsApp:i,form:$m(t,a),noButtons:!0,onChange:function(e){var t=e.values,n=e.valid;d((function(e){return rg(rg({},e),{},{values:t,valid:n})}))},mode:"create"}),c&&(0,S.jsx)(f,{listApp:o,docsApp:i,form:t.customSettings.form.form,noButtons:!0,onChange:function(e){var t=e.values,n=e.valid;d((function(e){return rg(rg({},e),{},{customSettings:t,customSettingsValid:n})}))},mode:"create"}),(0,S.jsx)(tg,{children:(0,S.jsx)(pd.Z,{ink:"primary",disabled:!l.customSettingsValid||!l.valid,onClick:function(){var e,n,o=rg(rg({},function(e,t){var n=function(n){return L()({},n,(e[n]||[]).reduce((function(e,n){return Ym(Ym({},e),{},L()({},n.id,t[n.id]))}),{}))};return Ym(Ym({},n(Xm)),n(Km))}(t,(e=l.values,n=function(e){return e.key?e.key:e},Om()(e,(function(e,t,r){return Ym(Ym({},e),{},L()({},r,Array.isArray(t)?t.map(n):n(t)))}),{})))),{},{customSettings:l.customSettings});r(o)},look:"raised",children:Qm||(Qm=(0,S.jsx)(fd.Z,{id:"client.common.report.generate"}))})})]})}));var ig=a(28247);function ag(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return cg(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return cg(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){c=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(c)throw i}}}}function cg(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var sg=function(e){return Object.keys(e).length>=1?e[Object.keys(e)[0]]:void 0};const ug=function(e){var t,n=ag(e);try{for(n.s();!(t=n.n()).done;){var r=t.value;if(r.entityValidatorErrors)return sg(r.entityValidatorErrors)[0];if(r.paths)return sg(sg(r.paths))[0]}}catch(e){n.e(e)}finally{n.f()}return null};var lg=a(39916),dg=a(57170);function fg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function pg(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?fg(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fg(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var hg=Zf().mark(bg),mg=Zf().mark(wg),gg=Zf().mark(Ag),vg=Zf().mark(xg),yg=Zf().mark(Eg);function bg(e,t,n,r){var o,i;return Zf().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return o=e.runInBackgroundTask,i=o?wg:Ag,a.next=4,(0,Ff.RE)(i,e,t,n,r);case 4:return a.abrupt("return",a.sent);case 5:case"end":return a.stop()}}),hg)}function wg(e,t,n,r){var o;return Zf().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,(0,Ff.RE)(uh.Z.requestSaga,e.endpoint,{method:"POST",body:pg(pg({entity:t.entityName,selection:t,parent:n},r),{},{params:{background:!0},formProperties:e.properties}),acceptedErrorCodes:["VALIDATION_FAILED"]});case 2:if(!(o=i.sent).body||!1!==o.body.success){i.next=6;break}return i.next=6,(0,Ff.gz)(m.Z.toaster({type:"error",title:"client.common.unexpectedError",body:o.body.title||"client.component.actions.errorText"}));case 6:case"end":return i.stop()}}),mg)}function Ag(e,t,n,r){var o,i,a;return Zf().wrap((function(c){for(;;)switch(c.prev=c.next){case 0:return o=(0,Um.Z)(),i=e.progressMsg||"client.component.actions.defaultProgressMessage",c.next=4,(0,Ff.gz)(m.Z.blockingInfo(o,i));case 4:return c.next=6,(0,Ff.RE)(xg,e,t,n,r);case 6:return a=c.sent,c.next=9,(0,Ff.gz)(m.Z.removeBlockingInfo(o));case 9:return c.abrupt("return",pg(pg({},a),{},{remoteEvents:z()(a&&a.success?[{type:"entity-update-event",payload:{parent:n,entities:[{entityName:t.entityName}]}}]:[])}));case 10:case"end":return c.stop()}}),gg)}function xg(e,t,n,r){var o,i,a;return Zf().wrap((function(c){for(;;)switch(c.prev=c.next){case 0:return c.prev=0,c.next=3,(0,Ff.RE)(uh.Z.requestSaga,e.endpoint,{method:"POST",body:pg(pg({entity:t.entityName,selection:t,parent:n},r),{},{formProperties:e.properties}),acceptedErrorCodes:["VALIDATION_FAILED"]});case 3:if(!(o=c.sent).body||"VALIDATION_FAILED"!==o.body.errorCode){c.next=9;break}return c.next=7,(0,Ff.gz)(m.Z.toaster({type:"error",title:"client.component.actions.validationError",body:ug(o.body.errors)}));case 7:case 16:c.next=20;break;case 9:if(!(o.body&&o.body.params&&o.body.params.downloadUrl)){c.next=18;break}return i=ig.Z.getDownloadUrl(o.body.params.downloadUrl),c.next=13,(0,Ff.RE)(uh.Z.requestBytesSaga,i,{method:"POST",body:pg(pg({entity:t.entityName,selection:t,parent:n},r),{},{formProperties:e.properties})});case 13:return a=c.sent,c.next=16,(0,Ff.RE)(ig.Z.downloadReadableStream,a.body,o.body.params.filename);case 18:return c.next=20,(0,Ff.RE)(Eg,o,!0===o.body.success?"success":"warning");case 20:return c.abrupt("return",o.body);case 23:if(c.prev=23,c.t0=c.catch(0),c.t0 instanceof uh.Z.ClientQuestionCancelledException){c.next=28;break}return c.next=28,(0,Ff.gz)(p.Z.logError("client.common.unexpectedError","client.component.actions.errorText",c.t0));case 28:case"end":return c.stop()}}),vg,null,[[0,23]])}function Eg(e,t){var n,r,o,i,a;return Zf().wrap((function(c){for(;;)switch(c.prev=c.next){case 0:return n=e.body.title||"client.component.actions.successDefault",r=e.body.message,o=e.body.notificationKey?"".concat(dg.c).concat(e.body.notificationKey):void 0,i=e.body.result,a=function(e){var t=e.navigationStrategy,n=e.cancelTask;return(0,S.jsx)(lg.Z,{notification:{key:o,message:r,result:i},navigationStrategy:t,cancelTask:n})},c.next=7,(0,Ff.gz)(m.Z.toaster({type:t,title:n,message:r,body:a,key:o}));case 7:case"end":return c.stop()}}),yg)}function Og(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Cg(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Og(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Og(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var kg,Sg=Zf().mark(Tg),Dg=Zf().mark(Rg),Pg=Zf().mark(Ig),_g=Zf().mark(Mg),jg=Zf().mark(Ng);function Tg(e,t,n,r,o){var i,a;return Zf().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if("widget"!==Hm.Z.getEmbedType()){n.next=5;break}return n.next=3,(0,Ff.RE)(Ig,e,t);case 3:n.next=13;break;case 5:return n.next=7,(0,Ff.RE)(yh.CE);case 7:return i=n.sent,n.next=10,(0,Ff.RE)(Rg,e,t,i,o);case 10:return a=n.sent,n.next=13,(0,Ff.RE)(Ng,e,i,a,t);case 13:case"end":return n.stop()}}),Sg)}function Rg(e,t,n,r){var o,i,a;return Zf().wrap((function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,(0,Ff.RE)(Mg,e,t);case 2:return o=c.sent,i=function(e){return n.put({formValues:e,settingsDefinition:o})},c.next=6,(0,Ff.RE)(Um.Z);case 6:return a=c.sent,c.next=9,(0,Ff.gz)(m.Z.modal(a,o.description.name,null,(function(){return(0,S.jsx)(og,{listApp:r.listApp,docsApp:r.docsApp,formApp:r.formApp,onSubmit:i,settingsDefinition:o})}),!0));case 9:return c.abrupt("return",a);case 10:case"end":return c.stop()}}),Dg)}function Ig(e,t){var n,r,o;return Zf().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,(0,Ff.RE)(Mg,e,t);case 2:return n=i.sent,r=n.generalSettings.reduce((function(e,t){var n;return Cg(Cg({},e),{},L()({},t.id,(null===(n=t.defaultValue)||void 0===n?void 0:n.key)||t.defaultValue))}),{}),e.endpoint="report/generations",o={additionalProperties:{reportId:e.reportId,generalSettings:r,recipientSettings:{}},formData:null},i.next=8,(0,Ff.RE)(wg,e,t,null,o);case 8:case"end":return i.stop()}}),Pg)}function Mg(e,t){var n,r,o,i;return Zf().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return n={body:t,method:"POST"},r="report/".concat(e.reportId,"/settings"),a.next=4,(0,Ff.RE)(uh.Z.requestSaga,r,n);case 4:return o=a.sent,i=o.body,a.abrupt("return",i);case 7:case"end":return a.stop()}}),_g)}function Ng(e,t,n,r){var o,i,a,c,s,u,l,d;return Zf().wrap((function(f){for(;;)switch(f.prev=f.next){case 0:return f.next=3,(0,Ff.qn)(t);case 3:return o=f.sent,i=o.formValues,a=i.customSettings,c=i.generalSettings,s=i.recipientSettings,u=o.settingsDefinition,e.endpoint="report/generations",l=u.customSettings?Lm.toEntity(Cg({__model:u.customSettings.entity.name},a)):null,d={additionalProperties:{reportId:e.reportId,generalSettings:c,recipientSettings:s},formData:l},f.next=14,(0,Ff.RE)(wg,e,r,null,d);case 14:return f.next=16,(0,Ff.gz)(m.Z.removeModal(n));case 16:f.next=0;break;case 18:case"end":return f.stop()}}),jg)}const Bg=(kg={},L()(kg,vh.SIMPLE,bg),L()(kg,vh.REPORT,Tg),L()(kg,vh.CUSTOM,Ch),L()(kg,vh.LEGACY,hm),kg);var Zg,Fg,Lg="actions/ACTION_INVOKE",Hg="actions/ACTION_IN_PROGRESS",Ug="actions/ACTION_INVOKED",zg=function(e,t,n){return{type:Lg,payload:{definition:e,selection:t,parent:n}}},Wg=function(e,t,n){return{type:Ug,payload:{definition:e,selection:t,response:n}}},Vg=Zf().mark(qg),Yg=Zf().mark(Gg);function qg(e){var t,n;return Zf().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!(t=e.preparationResponse).preCheck||!t.preCheck.confirmMessage){r.next=6;break}return r.next=4,(0,Ff.RE)(Gg,t.preCheck.confirmMessage);case 4:return n=r.sent,r.abrupt("return",{abort:!n});case 6:return r.abrupt("return",{abort:!1});case 7:case"end":return r.stop()}}),Vg)}function Gg(e){var t,n,r;return Zf().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,(0,Ff.RE)(yh.CE);case 2:return t=o.sent,n=function(){return t.put(!0)},r=function(){return t.put(!1)},o.next=7,(0,Ff.gz)(m.Z.confirm("client.component.actions.confirmTitle",e,Zg||(Zg=(0,S.jsx)(fd.Z,{id:"client.common.yes"})),Fg||(Fg=(0,S.jsx)(fd.Z,{id:"client.common.cancel"})),n,r));case 7:return o.next=9,(0,Ff.qn)(t);case 9:return o.abrupt("return",o.sent);case 10:case"end":return o.stop()}}),Yg)}function Qg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Xg(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Qg(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qg(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Kg=Zf().mark(Jg),$g=Zf().mark(tv);function Jg(e){var t,n,r;return Zf().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:if(t=e.preparationResponse,n=e.config,!t.initialFormValues){o.next=6;break}return o.next=4,(0,Ff.RE)(tv,t.initialFormValues,n);case 4:return r=o.sent,o.abrupt("return",{abort:null===r,params:{formData:r}});case 6:return o.abrupt("return",{abort:!1});case 7:case"end":return o.stop()}}),Kg)}var ev=function(e){return{formValues:e}};function tv(e,t){var n,r,o,i,a,c,s,u,l,d,f,p,h;return Zf().wrap((function(g){for(;;)switch(g.prev=g.next){case 0:return n=e.formDefinition,r=e.defaultValues,o=e.conditions,i=e.formTitle,a=e.formMessage,g.next=3,(0,Ff.RE)(yh.CE);case 3:return c=g.sent,s=(new Date).valueOf(),u=function(e){var t=e.values;return c.put(ev(t))},l=function(){return c.put(ev(null))},d=Wm(t.formApp),f=iv(n.form,o),p=m.Z.modal(s,i,a,(function(){return(0,S.jsx)(d,{form:f,listApp:t.listApp,docsApp:t.docsApp,onSubmit:u,onCancel:l,defaultValues:r,mode:"create"})})),g.next=12,(0,Ff.gz)(p);case 12:return g.next=14,(0,Ff.qn)(c);case 14:return h=g.sent,g.next=17,(0,Ff.gz)(m.Z.removeModal(s));case 17:return g.abrupt("return",h.formValues?{model:n.model,paths:h.formValues}:null);case 18:case"end":return g.stop()}}),$g)}var nv,rv,ov,iv=function e(t,n){return n&&0!==Object.keys(n).length?Xg(Xg(Xg({},t),Lm.relationFieldTypes.includes(t.dataType)&&n[t.id]?{condition:n[t.id]}:{}),t.children?{children:t.children.map((function(t){return e(t,n)}))}:{}):t},av=Zf().mark(sv),cv=Zf().mark(uv);function sv(e){var t,n,r;return Zf().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:if(t=e.definition,n=e.selection,!(t.showConfirmation&&n&&n.count>t.confirmationThreshold)){o.next=6;break}return o.next=4,(0,Ff.RE)(uv,n.count);case 4:return r=o.sent,o.abrupt("return",{abort:!r});case 6:return o.abrupt("return",{abort:!1});case 7:case"end":return o.stop()}}),av)}function uv(e){var t,n,r;return Zf().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,(0,Ff.RE)(yh.CE);case 2:return t=o.sent,n=function(){return t.put(!0)},r=function(){return t.put(!1)},o.next=7,(0,Ff.gz)(m.Z.confirm(nv||(nv=(0,S.jsx)(fd.Z,{id:"client.component.actions.confirmTitle"})),(0,S.jsx)(fd.Z,{id:"client.component.actions.largeSelectionConfirm",values:{count:e}}),rv||(rv=(0,S.jsx)(fd.Z,{id:"client.common.yes"})),ov||(ov=(0,S.jsx)(fd.Z,{id:"client.common.cancel"})),n,r));case 7:return o.next=9,(0,Ff.qn)(t);case 9:return o.abrupt("return",o.sent);case 10:case"end":return o.stop()}}),cv)}var lv=Zf().mark(dv);function dv(e){var t;return Zf().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!(t=e.preparationResponse).preCheck||!1!==t.preCheck.success){n.next=3;break}return n.abrupt("return",{abort:!0,abortMessage:t.preCheck.message||"client.component.actions.errorText"});case 3:return n.abrupt("return",{abort:!1});case 4:case"end":return n.stop()}}),lv)}function fv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function pv(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?fv(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fv(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var hv=Zf().mark(gv),mv=Zf().mark(yv);function gv(e,t,n){var r;return Zf().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,(0,Ff.RE)(uh.Z.requestSaga,e.endpoint+"/check",{method:"POST",body:{selection:t,parent:n,formProperties:e.properties}});case 2:return r=o.sent,o.abrupt("return",r.body);case 4:case"end":return o.stop()}}),hv)}var vv=function(e){return[sv,dv,qg,Jg].concat(z()(e.customPreparationHandlers||[]))};function yv(e,t,n,r){var o,i,a,c,s,u,l,d,f,p;return Zf().wrap((function(h){for(;;)switch(h.prev=h.next){case 0:if(o=!1,i=null,a={},c=t,!e.endpoint){h.next=10;break}return h.next=7,(0,Ff.RE)(gv,e,t,n);case 7:h.t0=h.sent,h.next=11;break;case 10:h.t0={};case 11:return s=h.t0,h.next=14,(0,Ff.RE)(vv,r);case 14:u=h.sent,l=0;case 16:if(o||!u[l]){h.next=29;break}return d=u[l],f={preparationResponse:s,params:a,definition:e,selection:c,config:r},h.next=21,(0,Ff.RE)(d,f);case 21:p=h.sent,o=p.abort,a=pv(pv({},a),p.params),p.abortMessage&&(i=p.abortMessage),p.selection&&(c=p.selection),l++,h.next=16;break;case 29:return h.abrupt("return",{abort:o,abortMessage:i,params:a,selection:c});case 30:case"end":return h.stop()}}),mv)}const bv=yv;var wv=Zf().mark(xv),Av=Zf().mark(Ev);function xv(e){return Zf().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,Ff.$6)([(0,Ff.ib)(Lg,Ev,e)]);case 2:case"end":return t.stop()}}),wv)}function Ev(e,t){var n,r,o,i,a,c,s,u,l,d,f,p;return Zf().wrap((function(h){for(;;)switch(h.prev=h.next){case 0:return n=t.payload,r=n.definition,o=n.selection,i=n.parent,h.next=4,(0,Ff.Ys)(e);case 4:return a=h.sent,h.next=7,(0,Ff.RE)(bv,r,o,i,a);case 7:if(c=h.sent,s=c.abort,u=c.abortMessage,l=c.params,d=c.selection,s){h.next=25;break}return f=Bg[r.actionType],h.next=16,(0,Ff.RE)(f,r,d,i,l,a);case 16:if(!(p=h.sent)||!p.remoteEvents){h.next=20;break}return h.next=20,(0,Ff.$6)(p.remoteEvents.map((function(e){return(0,Ff.gz)(gh(e))})));case 20:if(!p||!p.success){h.next=23;break}return h.next=23,(0,Ff.gz)(Wg(r,d,p));case 23:h.next=28;break;case 25:if(!u){h.next=28;break}return h.next=28,(0,Ff.gz)(m.Z.toaster({type:"error",title:u}));case 28:case"end":return h.stop()}}),Av)}var Ov,Cv,kv,Sv,Dv,Pv,_v,jv,Tv=a(57557),Rv=a.n(Tv),Iv=a(46927),Mv=a(97388),Nv=a(84647),Bv=b.ZP.div.withConfig({displayName:"StyledIconWrapper"})(Ov||(Ov=(0,v.Z)(["\n margin-left: ",";\n margin-right: -",";\n"])),x.Z.space(-1.7),x.Z.space(-2.1)),Zv=(0,b.ZP)(pd.Z).withConfig({displayName:"StyledIconButtonWrapper"})(Cv||(Cv=(0,v.Z)(["\n padding-left: ",";\n padding-right: ",";\n"])),x.Z.space(-.5),x.Z.space(-.5)),Fv=b.ZP.div.withConfig({displayName:"StyledPopperWrapper"})(kv||(kv=(0,v.Z)(["\n position: relative;\n"]))),Lv=b.ZP.div.withConfig({displayName:"StyledPopper"})(Sv||(Sv=(0,v.Z)(["\n max-height: ","; // add 15px for small padding\n min-height: calc(2 * "," + ","); // min-height of 1 entry\n width: max-content;\n overflow-y: auto;\n overflow-x: hidden;\n background: ",";\n box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);\n border: 1px solid ",";\n z-index: 9999999; /* higher than StyledModalHolder */\n ","\n"])),(function(e){var t=e.rectBottom;return"calc(100vh - ".concat(t+15,"px)")}),x.Z.space(-1.4),x.Z.font(0),Jm.Z.color("paper"),Jm.Z.color("secondaryLight"),of.C),Hv=b.ZP.div.withConfig({displayName:"StyledMenuItem"})(Dv||(Dv=(0,v.Z)(["\n min-width: 200px;\n max-width: 300px;\n"]))),Uv=b.ZP.div.withConfig({displayName:"StyledItemLabel"})(Pv||(Pv=(0,v.Z)(["\n cursor: ",";\n ","\n ","\n /* increased padding on touchdevices */\n padding: ","\n calc("," + ",");\n font-weight: ",";\n box-shadow: none;\n"])),(function(e){return e.hasOnClick?"pointer":"default"}),(0,A.Z)(),Mv.Z,Nv.b?(0,b.iv)(_v||(_v=(0,v.Z)(["\n ","\n ","\n ","\n "])),x.Z.space(-1.4),x.Z.space(-.5),x.Z.space(-1.4)):(0,b.iv)(jv||(jv=(0,v.Z)(["\n ","\n ","\n ","\n "])),x.Z.space(-2),x.Z.space(-.5),x.Z.space(-2)),x.Z.space(-.5),(function(e){return 5*(e.level||0)+"px"}),(function(e){return e.isGroup?Jm.Z.fontWeight("bold"):Jm.Z.fontWeight("regular")}));function zv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Wv(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?zv(Object(n),!0).forEach((function(t){(0,Iv.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zv(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Vv=function(e){var t=e.children,n=e.onClick,r=e.onClose,o=e.disabled,i=e.closeOnClick,a=e.title,c=e.level,s=I().Children.toArray(t).filter(Boolean),u=s.length>1,l=Boolean(n),d=s.map((function(e,t){var n,s=c?c++:1;return"MenuItem"===(null===(n=e.type)||void 0===n?void 0:n.displayName)?I().cloneElement(e,Wv(Wv({},e.props),{},{onClose:r,closeOnClick:i,level:s,key:"menu-item-".concat(t,"-").concat(s)})):(0,S.jsx)(Uv,{hasOnClick:l,isGroup:u,title:a,disabled:o,look:"raised",level:c,children:e},"menu-item-label-".concat(t,"-").concat(s))}));return(0,S.jsx)(Hv,{onClick:function(e){l&&!o&&(n(),i&&r&&r()),e.stopPropagation()},level:c,children:d})};Vv.defaultProps={closeOnClick:!0},Vv.displayName="MenuItem";const Yv=Vv;var qv=a(32654);function Gv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Qv(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Gv(Object(n),!0).forEach((function(t){(0,Iv.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Gv(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const Xv=function(e){var t=e.referenceElement,n=e.onClose,r=e.open,o=e.children,i=(0,R.useRef)(null),a=(0,R.useState)(null),c=(0,wd.Z)(a,2),s=c[0],u=c[1],l=(0,R.useState)(0),d=(0,wd.Z)(l,2),f=d[0],p=d[1],h=(0,R.useCallback)((function(e){i&&i.current&&!i.current.contains(e.target)&&s&&!s.contains(e.target)&&t&&!t.contains(e.target)&&n()}),[t,s,n]);(0,R.useEffect)((function(){return i.current&&p(i.current.getBoundingClientRect().bottom),document.addEventListener("mousedown",h),function(){document.removeEventListener("mousedown",h)}}),[h]);var m=(0,qv.D)(t,s,{placement:"bottom-start",modifiers:[{name:"offset",options:{offset:[0,5]}}]}),g=m.styles,v=m.attributes;return r?(0,S.jsx)(Fv,{ref:i,children:o&&N().createPortal((0,S.jsx)(Lv,Qv(Qv({ref:u,style:g.popper},v.popper),{},{rectBottom:f,children:I().Children.map(o,(function(e){return e&&I().cloneElement(e,{onClose:n})}))})),document.body)}):null};function Kv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function $v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Kv(Object(n),!0).forEach((function(t){(0,Iv.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Kv(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const Jv=function(e){var t=e.onOpen,n=e.children,r=e.onClick,o=e.buttonProps,i=e.label,a=e.icon,c=(0,R.useRef)(null),s=(0,R.useState)(!1),u=(0,wd.Z)(s,2),l=u[0],d=u[1],f=(0,R.useState)(!1),p=(0,wd.Z)(f,2),h=p[0],m=p[1],g=function(){d(!l),t&&!h&&(t(),m(!0))},v=function(){d(!1)},y=l?"chevron-up":"chevron-down",b=function(){return(0,S.jsx)(Xv,{referenceElement:c.current,open:l,onClose:v,children:n})};return r?(0,S.jsxs)(S.Fragment,{children:[(0,S.jsxs)(bd,{ref:c,children:[(0,S.jsx)(pd.Z,$v($v({},o||{}),{},{onClick:r,label:i,"data-cy":e["data-cy"],icon:a})),(0,S.jsx)(Zv,$v({icon:y,onClick:g},o||{}))]}),l&&(0,S.jsx)(b,{})]}):(0,S.jsxs)(S.Fragment,{children:[(0,S.jsxs)(pd.Z,$v($v({"data-cy":e["data-cy"]},o||{}),{},{ref:c,onClick:g,icon:a,children:[(0,S.jsx)(gd.s,{children:i}),(0,S.jsx)(Bv,{children:(0,S.jsx)(B.Z,{icon:y})})]})),l&&(0,S.jsx)(b,{})]})};var ey=function(e,t){var n=t.minSelection,r=t.maxSelection;return!(ny(e,n)||ry(e,r))},ty=function(e,t,n){var r=t.minSelection,o=t.maxSelection;return ny(e,r)?n.formatMessage({id:"client.component.actions.notEnoughSelected"},{minSelection:r}):ry(e,o)?n.formatMessage({id:"client.component.actions.tooManySelected"},{maxSelection:o}):null},ny=function(e,t){return t&&e<t},ry=function(e,t){return t&&e>t};function oy(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function iy(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?oy(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oy(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ay=function e(t){var n=t.onClick,r=t.definition,o=t.selectedCount,i=t.intl,a=ey(o,r),c=!0===r.readonly||!a,s=ty(o,r,i),u="action-group"===r.componentType;return(0,R.createElement)(Yv,iy(iy({},!u&&!c&&{onClick:function(){return n(r)}}),{},{disabled:c,title:s,key:"MenuItem-".concat(r.id)}),(0,S.jsx)("span",{children:r.label}),"action-group"===r.componentType&&r.children.map((function(n){return e(iy(iy({},t),{},{definition:n}))})))};const cy=(0,P.ZP)((function(e){var t=e.definition,n=e.onClick,r=t.defaultAction&&Object.keys(t.defaultAction).length>0,o=r?t.defaultAction.label:t.label,i=r?function(){n(t.defaultAction)}:null,a=r?t.defaultAction.id:t.id;return(0,S.jsx)(Jv,{buttonProps:{look:"raised"},label:o,"data-cy":"action-".concat(a),onClick:i,icon:t.icon,children:t.children.map((function(t,n){return ay(iy(iy({},e),{},{definition:t}))}))})}));const sy=(0,P.ZP)((function(e){var t=e.definition,n=e.onClick,r=e.selectedCount,o=e.disabled,i=e.intl,a=function(e){return!("NO"===e.useLabel||"HIDE"===e.useLabel)},c=!0===t.readonly||!ey(r,t)||o,s=t.label&&a(t)?t.label:"",u=ty(r,t,i)||(a(t)?"":t.label);return(0,S.jsx)(pd.Z,{iconOnly:"ICON"===t.buttonType,"data-cy":"action-".concat(t.id),look:"ICON"===t.buttonType?"flat":"raised",withoutBackground:"ICON"===t.buttonType,onClick:function(e){n(t),e.stopPropagation()},icon:t.icon,label:s,title:u,disabled:c})}));function uy(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ly(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?uy(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uy(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var dy=function(e){var t=e.definition,n=e.onClick,r=e.selection,o=e.parent,i=e.mode,a=e.callback,c=e.disabled,s=e.customRenderedActions;if(s&&s[t.id])return s[t.id](t);if(!function(e,t){return!e||!t||t.length<0||t.includes(e)}(i,t.scopes))return null;var u=t.componentType===rh.ACTION_GROUP?cy:sy;return(0,S.jsx)(u,{definition:t,onClick:function(e){n(Rv()(e,["label"]),r,o,a)},selectedCount:r.count,disabled:c})};const fy=function(e){return e.definition.componentType===rh.ACTION_BAR?e.definition.children.map((function(t){return(0,S.jsx)(dy,ly(ly({},e),{},{definition:t}),"action-".concat(e.definition.id,"-").concat(t.id))})):(0,S.jsx)(dy,ly({},e))};var py={onClick:zg};const hy=(0,_.connect)(null,py)(fy);const my={isAction:oh,Action:hy,actionFactory:nh,addToStore:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){return{}};e.sagaMiddleware.run(ih.Z.autoRestartSaga(xv,t,p.Z.logError))},dynamicActionsAddToStore:function(e){jf.Z.injectReducers(e,{dynamicActions:sh}),e.sagaMiddleware.run(fh)},actions:e,getSingleEntitySelection:function(e,t){return{entityName:e,type:"ID",ids:[t],count:1}}};var gy,vy,yy,by=a(15857),wy="formData/CHANGE_FIELD_VALUE",Ay="formData/TOUCH_FIELD",xy=function(e,t,n){return{type:wy,payload:{formName:e,fieldName:t,value:n}}},Ey="formData/OPEN_ADVANCED_SEARCH",Oy="formData/OPEN_DOCS_TREE_SEARCH",Cy="formData/ADVANCED_SEARCH_UPDATE",ky="formData/ADVANCED_SEARCH_CLOSE",Sy=function(e){return{type:Cy,payload:{ids:e}}},Dy=function(){return{type:ky}},Py=b.ZP.div.withConfig({displayName:"StyledAdvancedSearch"})(gy||(gy=Ld()(["\n && {\n > *:not(:last-child) {\n margin-bottom: ",";\n }\n }\n"])),x.Z.space(-1)),_y=b.ZP.div.withConfig({displayName:"StyledAdvancedSearchButtonWrapper"})(vy||(vy=Ld()(["\n background: ",";\n padding-top: ",";\n padding-bottom: ",";\n z-index: 1;\n position: sticky;\n bottom: 0;\n display: flex;\n justify-content: flex-end;\n\n "," {\n margin-right: 0;\n }\n"])),Jm.Z.color("paper"),x.Z.space(.5),x.Z.space(-.1),gd.Z);const jy=function(e){var t=e.entityName,n=e.formName,r=e.listFormDefinition,o=e.onSelectionChange,i=e.selection,a=e.searchTerm,c=e.emitAction,s=e.multi,u=e.constriction,l=e.onOkClick,d=e.ListApp;return(0,S.jsxs)(Py,{children:[(0,S.jsx)(d,{id:"advancedSearch-".concat((0,Um.Z)()),entityName:t,formName:n,scope:"remotefield",listFormDefinition:r,limit:15,onSelectChange:o,selection:i,emitAction:c,selectionStyle:s?"multi":"single",selectOnRowClick:!0,disableSelectionController:!0,showActions:!1,scrollBehaviour:"inline",tableMinHeight:"400px",constriction:u,preselectedSearchFields:[{id:"txtFulltext",value:a,hidden:!1}]}),(0,S.jsx)(_y,{children:(0,S.jsx)(pd.Z,{look:"raised",onClick:l,children:yy||(yy=(0,S.jsx)(fd.Z,{id:"client.common.ok"}))})})]})};var Ty={emitAction:d.Z.dispatchEmittedAction};const Ry=(0,_.connect)(null,Ty)(jy);var Iy,My=function(e){return null===e?"DocsTreeSearch_root_docs_list_item":"DocsTreeSearch_docs_list_item"};const Ny=function(e){var t,n=e.entityName,r=e.onSelectionChange,o=e.selection,i=e.emitAction,a=e.multi,c=e.onOkClick,s=e.DocsApp,u=(0,R.useState)((t=o)?t.map((function(e){return"".concat(n,"/").concat(e)})):[]),l=T()(u,2),d=l[0],f=l[1];return(0,S.jsxs)(Py,{children:[(0,S.jsx)(s,{routerType:"routerless",listLimit:15,selectionStyle:a?"multi":"single",selection:d,selectionFilterFn:function(e){return(null==e?void 0:e.type)===n},searchFormType:"none",disableViewPersistor:!0,getListFormName:My,navigationStrategy:{},embedded:!0,noLeftPadding:!0,sortable:!1,scrollBehaviour:"none",onSelectChange:function(e){r(function(e){return e.map((function(e){var t=e.split("/"),n=T()(t,2);return{name:n[0],key:n[1]}})).filter((function(e){return e.name===n})).map((function(e){return e.key}))}(e)),f(e)},emitAction:i,openResource:function(){}}),(0,S.jsx)(_y,{children:(0,S.jsx)(pd.Z,{look:"raised",onClick:c,children:Iy||(Iy=(0,S.jsx)(fd.Z,{id:"client.common.ok"}))})})]})};var By={emitAction:d.Z.dispatchEmittedAction};const Zy=(0,_.connect)(null,By)(Ny);var Fy=function(e,t){return e?t?e.map((function(e){return e.key})):[e.key]:[]},Ly=function(e,t){return t?e:e.length>0?{key:e[0].key,display:e[0].display}:null},Hy=function(e,t,n,r,o,i,a,c,s,u,l){var d;return function(){return d||(d=(0,S.jsx)(Ry,{ListApp:e,entityName:t,formName:n,listFormDefinition:r,selection:o,onSelectionChange:i,onOkClick:a,field:c,multi:s,constriction:u,searchTerm:l}))}},Uy=function(e,t,n,r,o,i){var a;return function(){return a||(a=(0,S.jsx)(Zy,{DocsApp:e,entityName:t,selection:n,onSelectionChange:r,onOkClick:o,multi:i}))}};function zy(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Wy(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?zy(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zy(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Vy=Zf().mark(Ky),Yy=Zf().mark($y),qy=Zf().mark(Jy),Gy=Zf().mark(eb),Qy=Zf().mark(tb),Xy=Zf().mark(nb);function Ky(e){return Zf().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,Ff.$6)([(0,Ff.ib)(Ey,Jy,e),(0,Ff.ib)(Oy,$y,e)]);case 2:case"end":return t.stop()}}),Vy)}function $y(e,t){var n,r,o,i,a,c,s,u,l,d,f,p,h,g,v;return Zf().wrap((function(y){for(;;)switch(y.prev=y.next){case 0:return n=t.payload,y.next=3,(0,Ff.Ys)(e);case 3:return r=y.sent,o=r.docsApp,i=n.formName,a=n.formField,c=n.value,s=a.id,u=a.label,l=a.targetEntity,d=a.dataType,f="multi-remote-field"===d,y.next=10,(0,Ff.RE)(yh.CE);case 10:return p=y.sent,y.next=13,(0,Ff.RE)(Um.Z);case 13:return h=y.sent,y.next=16,(0,Ff.RE)(Fy,c,f);case 16:return g=y.sent,v=Uy(o,l,g,(function(e){p.put(Sy(e))}),(function(){p.put(Dy())}),f),y.next=22,(0,Ff.gz)(m.Z.modal(h,u,null,v,!0));case 22:return y.next=24,(0,Ff.Cs)(tb,p,h,s,i,l,f);case 24:case"end":return y.stop()}}),Yy)}function Jy(e,t){var n,r,o,i,a,c,s,u,l,d,f,p,h,g,v,y,b,w,A,x,E;return Zf().wrap((function(O){for(;;)switch(O.prev=O.next){case 0:return n=t.payload,O.next=3,(0,Ff.Ys)(e);case 3:return r=O.sent,o=r.listApp,i=n.formName,a=n.formField,c=n.searchTerm,s=n.value,u=a.id,l=a.label,d=a.formBase,f=a.targetEntity,p=a.dataType,h=a.formName,g=a.constriction,v="multi-remote-field"===p,y=h?"".concat(f,"_").concat(h):d||f,O.next=11,(0,Ff.RE)(uh.Z.fetchForm,y,"remotefield");case 11:return b=O.sent,O.next=14,(0,Ff.RE)(yh.CE);case 14:return w=O.sent,O.next=17,(0,Ff.RE)(Um.Z);case 17:return A=O.sent,O.next=20,(0,Ff.RE)(Fy,s,v);case 20:return x=O.sent,E=Hy(o,f,y,b,x,(function(e){w.put(Sy(e))}),(function(){w.put(Dy())}),u,v,g,c),O.next=24,(0,Ff.gz)(m.Z.modal(A,l,null,E,!0));case 24:return O.next=26,(0,Ff.Cs)(tb,w,A,u,i,f,v);case 26:case"end":return O.stop()}}),qy)}function eb(e){var t,n;return Zf().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,(0,Ff.RE)(Lm.getDisplayRequest,e);case 2:return t=r.sent,r.next=5,(0,Ff.RE)(uh.Z.fetchDisplays,t);case 5:return n=r.sent,r.abrupt("return",e.map((function(e){return Wy(Wy({},e),{},{display:n[e.model][e.key]})})));case 7:case"end":return r.stop()}}),Gy)}function tb(e,t,n,r,o,i){var a,c,s,u,l,d,f,p;return Zf().wrap((function(h){for(;;)switch(h.prev=h.next){case 0:a=!0;case 1:if(!a){h.next=37;break}return h.next=4,(0,Ff.qn)(e);case 4:if(c=h.sent,s=c.payload,(u=c.type)!==Cy){h.next=31;break}if(!((null===(l=s.ids)||void 0===l?void 0:l.length)>0)){h.next=23;break}return d={keys:s.ids},h.next=12,(0,Ff.RE)(uh.Z.fetchEntities,o,d);case 12:return f=h.sent,h.next=15,(0,Ff.RE)(eb,f);case 15:return f=h.sent,h.next=18,(0,Ff.RE)(Ly,f,i);case 18:return p=h.sent,h.next=21,(0,Ff.RE)(nb,r,n,p);case 21:h.next=25;break;case 23:return h.next=25,(0,Ff.RE)(nb,r,n,[]);case 25:if(i){h.next=29;break}return h.next=28,(0,Ff.gz)(m.Z.removeModal(t));case 28:a=!1;case 29:h.next=35;break;case 31:if(u!==ky){h.next=35;break}return h.next=34,(0,Ff.gz)(m.Z.removeModal(t));case 34:a=!1;case 35:h.next=1;break;case 37:case"end":return h.stop()}}),Qy)}function nb(e,t,n){return Zf().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,(0,Ff.gz)(xy(e,t,n));case 2:case"end":return r.stop()}}),Xy)}var rb="formData/SET_CONFIG_SELECTOR",ob=function(e){return{type:rb,payload:{configSelector:e}}},ib=L()({},rb,jf.Z.singleTransferReducer("configSelector")),ab={configSelector:function(){return{}}};function cb(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ab,t=arguments.length>1?arguments[1]:void 0,n=ib[t.type];return n?n(e,t):e}var sb,ub="formData/LOAD_LOCATION_SUGGESTIONS",lb="formData/SET_LOCATION_SUGGESTIONS",db="formData/SET_LOCATION_SUGGESTIONS_LOADING",fb=function(e,t){return{type:lb,payload:{field:e,suggestions:t}}},pb=function(e){return{type:db,payload:{field:e}}};function hb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function mb(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?hb(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hb(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var gb=(sb={},L()(sb,lb,(function(e,t){var n=t.payload,r=n.field,o=n.suggestions;return mb(mb({},e),{},L()({},r,{suggestions:o}))})),L()(sb,db,(function(e,t){var n=t.payload.field;return mb(mb({},e),{},L()({},n,{isLoading:!0}))})),sb),vb={};function yb(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:vb,t=arguments.length>1?arguments[1]:void 0,n=gb[t.type];return n?n(e,t):e}var bb=a(44908),wb=a.n(bb),Ab=Zf().mark(Pb),xb=Zf().mark(_b),Eb=Zf().mark(Tb),Ob=Zf().mark(Rb);function Cb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function kb(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Cb(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Cb(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Sb="iso2",Db={};function Pb(e){var t,n,r,o;return Zf().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:i.t0=Zf().keys(Db);case 1:if((i.t1=i.t0()).done){i.next=7;break}if(t=i.t1.value,Db[t].key!==e){i.next=5;break}return i.abrupt("return",t);case 5:i.next=1;break;case 7:return i.next=9,(0,Ff.RE)(uh.Z.fetchEntity,"Country",e,{paths:[Sb]});case 9:return n=i.sent,i.next=12,(0,Ff.RE)(uh.Z.fetchDisplay,"Country",e);case 12:return r=i.sent,o=nf()(n,["paths",Sb,"value"]),Db=kb(kb({},Db),{},L()({},o,{key:n.key,display:r})),i.abrupt("return",o);case 16:case"end":return i.stop()}}),Ab)}function _b(e){var t,n,r,o,i,a;return Zf().wrap((function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,(0,Ff.$6)(e.map((function(e){return e.country})));case 2:return t=c.sent,c.next=5,(0,Ff.RE)(wb(),t);case 5:return n=c.sent,c.next=8,(0,Ff.$6)(n.reduce((function(e,t){return[].concat(z()(e),z()(Db[t]?[]:[t]))}),[]));case 8:if(!((r=c.sent).length>0)){c.next=18;break}return o={conditions:L()({},Sb,r),paths:[Sb]},c.next=13,(0,Ff.RE)(uh.Z.fetchEntities,"Country",o,{method:"GET"});case 13:return i=c.sent,c.next=16,(0,Ff.RE)(uh.Z.fetchDisplays,Lm.getDisplayRequest(i));case 16:a=c.sent,Db=kb(kb({},Db),i.reduce((function(e,t){return kb(kb({},e),{},L()({},nf()(t,["paths",Sb,"value"]),{key:t.key,display:nf()(a,["Country",t.key])}))}),{}));case 18:return c.abrupt("return",Db);case 19:case"end":return c.stop()}}),xb)}var jb=function(e,t){return e.map((function(e){return kb(kb({},e),{},{country:t[e.country]})}))};function Tb(e,t,n){var r,o;return Zf().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return r={queryParams:kb(kb(kb({},e?{city:e}:{}),t?{postcode:t}:{}),n?{country:n}:{}),method:"GET"},i.next=3,(0,Ff.RE)(uh.Z.requestSaga,"location/suggestions",r);case 3:return o=i.sent,i.abrupt("return",o.body.data);case 5:case"end":return i.stop()}}),Eb)}function Rb(e,t){return Zf().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!e){n.next=6;break}return n.next=3,(0,Ff.RE)(Pb,e.key);case 3:n.t0=n.sent,n.next=7;break;case 6:n.t0=t;case 7:return n.abrupt("return",n.t0);case 8:case"end":return n.stop()}}),Ob)}var Ib=Zf().mark(Nb),Mb=Zf().mark(Bb);function Nb(){return Zf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Ff.$6)([(0,Ff.Fm)(ub,Bb)]);case 2:case"end":return e.stop()}}),Ib)}function Bb(e){var t,n,r,o,i,a,c,s,u,l,d;return Zf().wrap((function(f){for(;;)switch(f.prev=f.next){case 0:return t=e.payload,n=t.field,r=t.searchInput,o=t.countryValue,i=t.fieldCountries,f.next=3,(0,Ff.gz)(pb(n));case 3:return a=r.city,c=r.postcode,f.next=6,(0,Ff.RE)(Rb,o,i);case 6:return s=f.sent,f.next=9,(0,Ff.RE)(Tb,a,c,s);case 9:return u=f.sent,f.next=12,(0,Ff.RE)(_b,u);case 12:return l=f.sent,f.next=15,(0,Ff.RE)(jb,u,l);case 15:return d=f.sent,f.next=18,(0,Ff.gz)(fb(n,d));case 18:case"end":return f.stop()}}),Mb)}var Zb,Fb="formData/LOAD_RELATION_ENTITIES",Lb="formData/SET_RELATION_ENTITIES",Hb="formData/SET_RELATION_ENTITIES_LOADING",Ub=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return{type:Hb,payload:{fieldName:e,clearData:t}}},zb=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:void 0;return{type:Lb,payload:{fieldName:e,entities:t,searchTerm:r,moreEntitiesAvailable:n}}};function Wb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Vb(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Wb(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wb(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Yb=(Zb={},L()(Zb,Lb,(function(e,t){var n=t.payload,r=n.fieldName,o=n.entities,i=n.moreEntitiesAvailable,a=n.searchTerm;return Vb(Vb({},e),{},{data:Vb(Vb({},e.data),{},L()({},r,{data:o,isLoading:!1,moreEntitiesAvailable:i,searchTerm:a}))})})),L()(Zb,Hb,(function(e,t){var n,r,o=t.payload,i=o.fieldName,a=o.clearData;return Vb(Vb({},e),{},{data:Vb(Vb({},e.data),{},L()({},i,Vb(Vb({},a?{searchTerm:void 0,data:[]}:{searchTerm:null===(n=e.data[i])||void 0===n?void 0:n.searchTerm,data:(null===(r=e.data[i])||void 0===r?void 0:r.data)||[]}),{},{isLoading:!0})))})})),Zb),qb={data:{}};function Gb(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:qb,t=arguments.length>1?arguments[1]:void 0,n=Yb[t.type];return n?n(e,t):e}var Qb=a(85354),Xb=a.n(Qb);function Kb(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $b(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var Jb=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";Kb(this,t);var n=$b(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return Object.defineProperty(n,"message",{configurable:!0,enumerable:!1,value:e,writable:!0}),Object.defineProperty(n,"name",{configurable:!0,enumerable:!1,value:n.constructor.name,writable:!0}),Error.hasOwnProperty("captureStackTrace")?(Error.captureStackTrace(n,n.constructor),$b(n)):(Object.defineProperty(n,"stack",{configurable:!0,enumerable:!1,value:new Error(e).stack,writable:!0}),n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(function(e){function t(){e.apply(this,arguments)}return t.prototype=Object.create(e.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e,t}(Error));var ew="@@redux-form/submission-error-flag",tw=function(e){function t(t){var n;return(n=e.call(this,"Submit Validation Failed")||this).errors=t,n}return Xb()(t,e),t}(Jb);function nw(e){return!0===(e&&e.constructor&&e.constructor.__FLAG__===ew)}tw.__FLAG__=ew;var rw=a(2525),ow=a.n(rw);function iw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function aw(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?iw(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):iw(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var cw="_error",sw="entityValidatorErrors",uw="relatedEntityErrors",lw="outdatedError",dw=function(e){var t=aw({},e);return delete t._error,t},fw=function(e){return e._error};const pw={hasFieldErrors:function(e){return Object.keys(dw(e)).length>=1},getFieldErrors:dw,getValidatorErrors:function(e){var t=fw(e);return Om()(t.entityValidatorErrors,(function(e,t){return[].concat(z()(e),z()(t))}),[])},hasValidatorErrors:function(e){var t=fw(e);return!!(t&&t.entityValidatorErrors&&Object.keys(t.entityValidatorErrors).length>=1)},hasRelatedEntityErrors:function(e){var t=fw(e);return!!(t&&t.relatedEntityErrors&&t.relatedEntityErrors.length>=1)},hasOutdatedError:function(e){var t=fw(e);return!!(t&&t.outdatedError&&Object.keys(t.outdatedError).length>=1)},getFirstErrorField:function(e){return Object.keys(dw(e))[0]},getRelatedEntityErrorsCompact:function(e){var t=fw(e).relatedEntityErrors;return Om()(t,(function(e,t){var n=t.key,r=t.model,o=t.paths,i=t.entityValidatorErrors,a=z()(e);return ow()(o,(function(e,t){ow()(e,(function(e,o){a.push.apply(a,z()(e.map((function(e){return"".concat(e," (").concat(t,", ").concat(r,", ").concat(n,")")}))))}))})),i&&Object.keys(i).length>=1&&a.push.apply(a,z()(Om()(i,(function(e,t){return[].concat(z()(e),z()(t.map((function(e){return"".concat(e," (").concat(r,", ").concat(n,")")}))))}),[]))),a}),[])},addErrors:function(e,t,n){return aw(aw({},e),{},L()({},t,aw(aw({},e[t]||{}),n||{})))},outdatedResponseToFormError:function(e,t){return L()({},cw,L()({},lw,aw(aw({},xm()(e,["updateTimestamp","updateUser","key","model"])),{},{sameEntity:t.model===e.model&&t.key===e.key})))},getOutdatedError:function(e){return fw(e).outdatedError}};var hw=a(50008),mw=a.n(hw);const gw=Object.freeze({FIELD_SET:"field-set",FIELD:"field",ACTION:"action",ACTION_BAR:"action-bar",LAYOUT:"layout",TABLE:"table",SUB_TABLE:"sub-table",DISPLAY:"display"});function vw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function yw(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?vw(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vw(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var bw=function(e,t){return"input-".concat(e,"-").concat(t)},ww=[gw.FIELD,gw.DISPLAY],Aw=function e(t,n){for(var r=[],o=0;o<t.children.length;o++){t.children[o].children&&r.push.apply(r,z()(e(t.children[o],n)));var i=t.children[o].componentType;!ww.includes(i)||n&&!0===t.hidden||r.push(yw(yw({},t.children[o]),{},{readonly:t.readonly,ignoreCopy:t.ignoreCopy}))}return r},xw={location:function(e){var t=xm()(e.locationMapping,["postcode","city"]);return{mapping:t,paths:Object.values(t).filter(Boolean)}}};function Ew(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ow(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ew(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ew(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Cw=function(e){return 0===Object.keys(e).length},kw=function(e,t,n){var r=L()({},cw,L()({},uw,[]));return n?(n.forEach((function(t){t.model!==e.model||(e.key||t.key)&&t.key!==e.key?r._error.relatedEntityErrors.push(t):(r=Ow(Ow({},r),t.paths),Object.prototype.hasOwnProperty.call(t,sw)&&(r._error.entityValidatorErrors=t.entityValidatorErrors))})),function(e,t){return t.filter((function(e){return e.componentType===gw.FIELD})).reduce((function(e,t){if(xw[t.dataType]){var n=Ow({},xw[t.dataType](t).paths.reduce((function(t,n){return Ow(Ow({},t),e[n])}),{}));return Ow(Ow({},e),Cw(n)?{}:L()({},t.path||t.id,n))}return e}),e)}(r,t)):r},Sw="--",Dw=function(e){return e?e.replace(/\./g,Sw).replace(/\[/g,"=-=").replace(/\]/g,"=_="):e},Pw=function(e){return e?e.replace(new RegExp(Sw,"g"),".").replace(new RegExp("=-=","g"),"[").replace(new RegExp("=_=","g"),"]"):e},_w=function(e,t){return function(e,t){return t.filter((function(e){return e.componentType===gw.FIELD})).reduce((function(e,t){if(xw[t.dataType]){var n=xw[t.dataType](t).mapping,r=e[t.path||t.id],o=r?Ow({},Object.keys(n).reduce((function(e,t){var o=n[t];return Ow(Ow({},e),r[t]?L()({},o,r[t]):{})}),{})):{};return Ow(Ow({},Rv()(e,t.path||t.id)),Cw(o)?{}:o)}return e}),e)}(Om()(e,(function(e,t,n){return Ow(Ow({},e),{},L()({},Pw(n),t))}),{}),t)},jw=function(e,t,n){var r=function(e,t,n){var r=[];return ow()(t,(function(t,o){!n&&Dp()(t,e[o])||r.push(o)})),r}(e,t,n);return Object.keys(t).reduce((function(e,n){return Object.values(Lm.metaFields).includes(n)||r.some((function(e){return e===n||e.startsWith("".concat(n).concat(Sw))}))?Ow(Ow({},e),{},L()({},n,t[n])):e}),{})},Tw=function(e){return null==e||""===e||Array.isArray(e)&&0===e.length||"object"===mw()(e)&&0===Object.keys(e).length};function Rw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Iw(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Rw(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Rw(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Mw,Nw=function(e){var t=e.children.find((function(e){return!oh(e.componentType)}));return t?Iw(Iw({},t),xm()(e,["label","hidden","readonly","scopes"])):null},Bw=function(e){return Boolean(e)&&Object.keys(e).length>0},Zw=a(18721),Fw=a.n(Zw),Lw=function(){var e=Ip()(Zf().mark((function e(t){var n,r,o,i,c=arguments;return Zf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=c.length>1&&void 0!==c[1]?c[1]:{},e.next=3,Promise.all([a.e(817),a.e(877)]).then(a.bind(a,80446));case 3:return r=e.sent,o=n.customRegex&&t.match(n.customRegex),i=r.isValidNumber(t,n.defaultRegion||"CH"),e.abrupt("return",o||i?null:{phone:[Mw||(Mw=(0,S.jsx)(fd.Z,{id:"client.component.form.invalidPhoneNumber"},"invalidPhoneNumber"))]});case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();const Hw={phone:Lw};var Uw=function(e){return!(null==e||""===e||Array.isArray(e)&&0===e.length||"object"===mw()(e)&&0===Object.keys(e).length)},zw={mandatory:[(0,S.jsx)(fd.Z,{id:"client.component.form.syncValidationRequired"},"syncValidationRequired")]};function Ww(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return Vw(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Vw(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){c=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(c)throw i}}}}function Vw(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Yw=function(){var e=Ip()(Zf().mark((function e(t,n){var r,o,i,a,c,s,u,l,d;return Zf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r={},o=Ww(n),e.prev=2,o.s();case 4:if((i=o.n()).done){e.next=22;break}if(a=i.value,c=t[a.path],!Uw(c)){e.next=20;break}e.t0=Zf().keys(Hw);case 9:if((e.t1=e.t0()).done){e.next=20;break}if(s=e.t1.value,!Fw()(a,["validation",s])){e.next=18;break}return u=nf()(a,["validation",s]),l=Hw[s],e.next=16,l(c,u);case 16:(d=e.sent)&&(r=pw.addErrors(r,a.path,d));case 18:e.next=9;break;case 20:e.next=4;break;case 22:e.next=27;break;case 24:e.prev=24,e.t2=e.catch(2),o.e(e.t2);case 27:return e.prev=27,o.f(),e.finish(27);case 30:return e.abrupt("return",r);case 31:case"end":return e.stop()}}),e,null,[[2,24,27,30]])})));return function(t,n){return e.apply(this,arguments)}}();function qw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Gw(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qw(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qw(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Qw="OUTDATED_ENTITY",Xw=function(e,t,n,r,o){var i=jw(t,e,"create"===o),a=_w(i,n),c=Hm.Z.getWidgetConfigKey(),s=Lm.toEntity(a),u={queryParams:Gw({_validate:!0},c?{_widget_key:c}:{}),method:"create"===o?"POST":"PATCH",headers:{"X-Client":"rest"},body:s,acceptedStatusCodes:[403],acceptedErrorCodes:[Qw]},l=("create"===o?null==r?void 0:r.createEndpoint:void 0)||"entities/2.0/".concat(s.model).concat(s.key?"/".concat(s.key):"");return uh.Z.simpleRequest(l,u).then((function(e){var t=e.body;return 403===e.status||t.valid?{}:t.errorCode===Qw?pw.outdatedResponseToFormError(t,s):kw(s,n,t.errors)}))},Kw=function(){var e=Ip()(Zf().mark((function e(t,n,r,o,i){var a,c;return Zf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Yw(t,r);case 2:if(a=e.sent,!Bw(a)){e.next=5;break}throw a;case 5:return e.next=7,Xw(t,n,r,o,i);case 7:if(c=e.sent,!Bw(c)){e.next=10;break}throw c;case 10:case"end":return e.stop()}}),e)})));return function(t,n,r,o,i){return e.apply(this,arguments)}}();const $w=Object.freeze({VERTICAL_BOX:"vertical-box",HORIZONTAL_BOX:"horizontal-box"}),Jw=Object.freeze({CREATE:"create",UPDATE:"update"});var eA=function(e){var t=e.message;return(0,S.jsx)("div",{children:(0,S.jsx)(nl.Z,{type:"html",value:t})})},tA=a(34115),nA=a(48272),rA=a(67154),oA=a.n(rA),iA="@@redux-form/",aA=iA+"ARRAY_INSERT",cA=iA+"ARRAY_MOVE",sA=iA+"ARRAY_POP",uA=iA+"ARRAY_PUSH",lA=iA+"ARRAY_REMOVE",dA=iA+"ARRAY_REMOVE_ALL",fA=iA+"ARRAY_SHIFT",pA=iA+"ARRAY_SPLICE",hA=iA+"ARRAY_UNSHIFT",mA=iA+"ARRAY_SWAP",gA=iA+"AUTOFILL",vA=iA+"BLUR",yA=iA+"CHANGE",bA=iA+"CLEAR_FIELDS",wA=iA+"CLEAR_SUBMIT",AA=iA+"CLEAR_SUBMIT_ERRORS",xA=iA+"CLEAR_ASYNC_ERROR",EA=iA+"DESTROY",OA=iA+"FOCUS",CA=iA+"INITIALIZE",kA=iA+"REGISTER_FIELD",SA=iA+"RESET",DA=iA+"RESET_SECTION",PA=iA+"SET_SUBMIT_FAILED",_A=iA+"SET_SUBMIT_SUCCEEDED",jA=iA+"START_ASYNC_VALIDATION",TA=iA+"START_SUBMIT",RA=iA+"STOP_ASYNC_VALIDATION",IA=iA+"STOP_SUBMIT",MA=iA+"SUBMIT",NA=iA+"TOUCH",BA=iA+"UNREGISTER_FIELD",ZA=iA+"UNTOUCH",FA=iA+"UPDATE_SYNC_ERRORS",LA=iA+"UPDATE_SYNC_WARNINGS";var HA={arrayInsert:function(e,t,n,r){return{type:aA,meta:{form:e,field:t,index:n},payload:r}},arrayMove:function(e,t,n,r){return{type:cA,meta:{form:e,field:t,from:n,to:r}}},arrayPop:function(e,t){return{type:sA,meta:{form:e,field:t}}},arrayPush:function(e,t,n){return{type:uA,meta:{form:e,field:t},payload:n}},arrayRemove:function(e,t,n){return{type:lA,meta:{form:e,field:t,index:n}}},arrayRemoveAll:function(e,t){return{type:dA,meta:{form:e,field:t}}},arrayShift:function(e,t){return{type:fA,meta:{form:e,field:t}}},arraySplice:function(e,t,n,r,o){var i={type:pA,meta:{form:e,field:t,index:n,removeNum:r}};return void 0!==o&&(i.payload=o),i},arraySwap:function(e,t,n,r){if(n===r)throw new Error("Swap indices cannot be equal");if(n<0||r<0)throw new Error("Swap indices cannot be negative");return{type:mA,meta:{form:e,field:t,indexA:n,indexB:r}}},arrayUnshift:function(e,t,n){return{type:hA,meta:{form:e,field:t},payload:n}},autofill:function(e,t,n){return{type:gA,meta:{form:e,field:t},payload:n}},blur:function(e,t,n,r){return{type:vA,meta:{form:e,field:t,touch:r},payload:n}},change:function(e,t,n,r,o){return{type:yA,meta:{form:e,field:t,touch:r,persistentSubmitErrors:o},payload:n}},clearFields:function(e,t,n){for(var r=arguments.length,o=new Array(r>3?r-3:0),i=3;i<r;i++)o[i-3]=arguments[i];return{type:bA,meta:{form:e,keepTouched:t,persistentSubmitErrors:n,fields:o}}},clearSubmit:function(e){return{type:wA,meta:{form:e}}},clearSubmitErrors:function(e){return{type:AA,meta:{form:e}}},clearAsyncError:function(e,t){return{type:xA,meta:{form:e,field:t}}},destroy:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return{type:EA,meta:{form:t}}},focus:function(e,t){return{type:OA,meta:{form:e,field:t}}},initialize:function(e,t,n,r){return void 0===r&&(r={}),n instanceof Object&&(r=n,n=!1),{type:CA,meta:oA()({form:e,keepDirty:n},r),payload:t}},registerField:function(e,t,n){return{type:kA,meta:{form:e},payload:{name:t,type:n}}},reset:function(e){return{type:SA,meta:{form:e}}},resetSection:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return{type:DA,meta:{form:e,sections:n}}},startAsyncValidation:function(e,t){return{type:jA,meta:{form:e,field:t}}},startSubmit:function(e){return{type:TA,meta:{form:e}}},stopAsyncValidation:function(e,t){return{type:RA,meta:{form:e},payload:t,error:!(!t||!Object.keys(t).length)}},stopSubmit:function(e,t){return{type:IA,meta:{form:e},payload:t,error:!(!t||!Object.keys(t).length)}},submit:function(e){return{type:MA,meta:{form:e}}},setSubmitFailed:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return{type:PA,meta:{form:e,fields:n},error:!0}},setSubmitSucceeded:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return{type:_A,meta:{form:e,fields:n},error:!1}},touch:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return{type:NA,meta:{form:e,fields:n}}},unregisterField:function(e,t,n){return void 0===n&&(n=!0),{type:BA,meta:{form:e},payload:{name:t,destroyOnUnmount:n}}},untouch:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return{type:ZA,meta:{form:e,fields:n}}},updateSyncErrors:function(e,t,n){return void 0===t&&(t={}),{type:FA,meta:{form:e},payload:{syncErrors:t,error:n}}},updateSyncWarnings:function(e,t,n){return void 0===t&&(t={}),{type:LA,meta:{form:e},payload:{syncWarnings:t,warning:n}}}};const UA=HA;const zA=function(e,t,n,r){if(t<(e=e||[]).length){if(void 0===r&&!n){var o=[].concat(e);return o.splice(t,0,!0),o[t]=void 0,o}if(null!=r){var i=[].concat(e);return i.splice(t,n,r),i}var a=[].concat(e);return a.splice(t,n),a}if(n)return e;var c=[].concat(e);return c[t]=r,c};var WA=a(30084),VA=a.n(WA);const YA=function(e,t){if(!e)return e;var n=VA()(t),r=n.length;if(r){for(var o=e,i=0;i<r&&o;++i)o=o[n[i]];return o}};var qA=function e(t,n,r,o){var i;if(o>=r.length)return n;var a=r[o],c=e(t&&(Array.isArray(t)?t[Number(a)]:t[a]),n,r,o+1);if(!t){var s;if(isNaN(a))return(s={})[a]=c,s;var u=[];return u[parseInt(a,10)]=c,u}if(Array.isArray(t)){var l=[].concat(t);return l[parseInt(a,10)]=c,l}return oA()({},t,((i={})[a]=c,i))};const GA=function(e,t,n){return qA(e,n,VA()(t),0)};var QA=a(14293),XA=a.n(QA),KA=a(28368),$A=a.n(KA),JA=function(e){return XA()(e)||""===e||isNaN(e)},ex=function(e,t){return e===t||(e||t?(!e||!t||e._error===t._error)&&((!e||!t||e._warning===t._warning)&&(!I().isValidElement(e)&&!I().isValidElement(t)&&void 0)):JA(e)===JA(t))};function tx(e,t){if(null==e||null==t)return e;for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];if(r.length){if(Array.isArray(e)){if(isNaN(t))throw new Error('Must access array elements with a number, not "'+String(t)+'".');var i=Number(t);if(i<e.length){var a=tx.apply(void 0,[e&&e[i]].concat(r));if(a!==e[i]){var c=[].concat(e);return c[i]=a,c}}return e}if(t in e){var s,u=tx.apply(void 0,[e&&e[t]].concat(r));return e[t]===u?e:oA()({},e,((s={})[t]=u,s))}return e}if(Array.isArray(e)){if(isNaN(t))throw new Error('Cannot delete non-numerical index from an array. Given: "'+String(t));var l=Number(t);if(l<e.length){var d=[].concat(e);return d.splice(l,1),d}return e}if(t in e){var f=oA()({},e);return delete f[t],f}return e}const nx=function(e,t){return tx.apply(void 0,[e].concat(VA()(t)))};const rx=function(e){return e?Array.isArray(e)?e.map((function(e){return e.name})):Object.keys(e):[]};const ox={allowsArrayErrors:!0,empty:{},emptyList:[],getIn:YA,setIn:GA,deepEqual:function(e,t){return $A()(e,t,ex)},deleteIn:nx,forEach:function(e,t){return e.forEach(t)},fromJS:function(e){return e},keys:rx,size:function(e){return e?e.length:0},some:function(e,t){return e.some(t)},splice:zA,equals:function(e,t){return t.every((function(t){return~e.indexOf(t)}))},orderChanged:function(e,t){return t.some((function(t,n){return t!==e[n]}))},toJS:function(e){return e}},ix=function(e){var t=e.getIn;return function(e,n){return function(r){var o=n||function(e){return t(e,"form")};return t(o(r),e+".values")}}}(ox);const ax=function(e){var t=e.getIn;return function(e,n){return function(r){var o=n||function(e){return t(e,"form")};return t(o(r),e+".asyncErrors")}}}(ox);const cx=function(e){var t=e.getIn,n=e.empty;return function(e,r){return function(o){var i=r||function(e){return t(e,"form")};return t(i(o),e+".submitErrors")||n}}}(ox);const sx=function(e){var t=e.getIn,n=e.empty;return function(e,r){return function(o){var i=r||function(e){return t(e,"form")};return t(i(o),e+".syncErrors")||n}}}(ox);var ux=Zf().mark(wx),lx=Zf().mark(Ax),dx=Zf().mark(xx),fx=Zf().mark(Ex),px=Zf().mark(Ox),hx=Zf().mark(Cx),mx=Zf().mark(kx);function gx(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function vx(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?gx(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gx(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var yx=function(e,t){return e.form[t].initial};function bx(e,t){var n=e.formId,r=document.getElementById(bw(n,t));return!!r&&(r.focus(),!0)}function wx(e){var t;return Zf().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return t=e.formId,n.t0=vx,n.t1=vx,n.t2=vx,n.t3={},n.next=7,(0,Ff.Ys)(sx(t));case 7:return n.t4=n.sent,n.t5=(0,n.t2)(n.t3,n.t4),n.next=11,(0,Ff.Ys)(ax(t));case 11:return n.t6=n.sent,n.t7=(0,n.t1)(n.t5,n.t6),n.next=15,(0,Ff.Ys)(cx(t));case 15:return n.t8=n.sent,n.abrupt("return",(0,n.t0)(n.t7,n.t8));case 17:case"end":return n.stop()}}),ux)}function Ax(e){var t,n;return Zf().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,(0,Ff.RE)(wx,e);case 2:return t=r.sent,r.next=5,(0,Ff.RE)(pw.getFirstErrorField,t);case 5:if(!(n=r.sent)){r.next=9;break}return r.next=9,(0,Ff.RE)(bx,e,n);case 9:case"end":return r.stop()}}),lx)}function xx(e){var t,n,r,o;return Zf().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return t=e.formId,n=e.stateSelector,i.next=3,(0,Ff.Ys)(n);case 3:return r=i.sent,o=r.fieldDefinitions,i.next=7,(0,Ff.gz)(UA.touch.apply(UA,[t].concat(z()(o.map((function(e){return Dw(e.path||e.id)}))))));case 7:case"end":return i.stop()}}),dx)}function Ex(e){return Zf().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,Ff.RE)(xx,e);case 2:return t.next=4,(0,Ff.RE)(Ax,e);case 4:case"end":return t.stop()}}),fx)}function Ox(e){var t,n,r,o,i,a,c,s,u,l;return Zf().wrap((function(d){for(;;)switch(d.prev=d.next){case 0:return t=e.formId,n=e.stateSelector,d.next=3,(0,Ff.Ys)(ix(t));case 3:return r=d.sent,d.next=6,(0,Ff.Ys)(yx,t);case 6:return o=d.sent,d.next=9,(0,Ff.Ys)(n);case 9:return i=d.sent,a=i.mode,c=i.fieldDefinitions,s=i.formDefinition,u="create"===a?{}:o,d.next=16,(0,Ff.RE)(jw,u,r,"create"===a);case 16:return l=d.sent,d.abrupt("return",{formValues:r,initialValues:u,mode:a,fieldDefinitions:c,formDefinition:s,dirtyFormValues:l});case 18:case"end":return d.stop()}}),px)}function Cx(e){var t,n,r,o;return Zf().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,(0,Ff.RE)(Ox,e);case 2:return t=i.sent,n=t.dirtyFormValues,r=t.fieldDefinitions,i.next=7,(0,Ff.RE)(_w,n,r);case 7:return o=i.sent,i.next=10,(0,Ff.RE)(Lm.toEntity,o);case 10:return i.abrupt("return",i.sent);case 11:case"end":return i.stop()}}),hx)}function kx(e,t){var n,r,o;return Zf().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:if(n=e.formId,!(t instanceof tw)){i.next=14;break}return i.next=4,(0,Ff.gz)(UA.stopSubmit(n,t.errors));case 4:return i.next=6,(0,Ff.RE)(Ex,e);case 6:return i.next=8,(0,Ff.RE)(pw.getValidatorErrors,t.errors);case 8:return r=i.sent,o=r&&r.length>0?function(){return(0,S.jsx)(eA,{message:r.join("<br>")})}:"client.component.form.saveAbortedMessage",i.next=12,(0,Ff.gz)(m.Z.toaster({type:"warning",title:"client.component.form.saveAbortedTitle",body:o,duration:5e3}));case 12:case 19:case 26:case 31:i.next=37;break;case 14:if(!(t instanceof uh.Z.InformationError)){i.next=21;break}return i.next=17,(0,Ff.gz)(m.Z.toaster({type:"info",title:"client.component.form.saveAbortedTitle",body:t.message}));case 17:return i.next=19,(0,Ff.gz)(UA.stopSubmit(n));case 21:if(!(t instanceof uh.Z.ForbiddenException)){i.next=28;break}return i.next=24,(0,Ff.gz)(m.Z.toaster({type:"error",title:"client.component.form.saveAbortedTitle",body:"client.component.form.noPermission"}));case 24:return i.next=26,(0,Ff.gz)(UA.stopSubmit(n));case 28:if(!(t instanceof uh.Z.ClientQuestionCancelledException)){i.next=33;break}return i.next=31,(0,Ff.gz)(UA.stopSubmit(n));case 33:return i.next=35,(0,Ff.gz)(p.Z.logError("client.common.unexpectedError","client.component.form.saveError",t));case 35:return i.next=37,(0,Ff.gz)(UA.stopSubmit(n));case 37:case"end":return i.stop()}}),mx)}var Sx=Zf().mark(jx),Dx=Zf().mark(Tx),Px=Zf().mark(Rx),_x=Zf().mark(Ix);function jx(e){return Zf().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,Ff.$6)([(0,Ff.Ds)(500,yA,Rx,e),(0,Ff.ib)(RA,Ix)]);case 2:case"end":return t.stop()}}),Sx)}function Tx(e,t,n,r){var o,i,a,c,s;return Zf().wrap((function(u){for(;;)switch(u.prev=u.next){case 0:return o=e.formId,i={method:"POST",body:{triggerField:t,entity:n},acceptedStatusCodes:[403]},u.next=4,(0,Ff.RE)(uh.Z.requestSaga,r,i);case 4:return a=u.sent,c=nf()(a,"body.values",[]),u.next=8,(0,Ff.Ys)(ix(o));case 8:return s=u.sent,u.next=11,(0,Ff.$6)(Object.keys(c).map((function(e){var t=c[e],n=s[e];return"override"===t.mode||"if_empty"===t.mode&&Tw(n)?(0,Ff.gz)(UA.change(o,e,t.value)):null})));case 11:case"end":return u.stop()}}),Dx)}function Rx(e,t){var n,r,o,i,a;return Zf().wrap((function(c){for(;;)switch(c.prev=c.next){case 0:return n=t.meta,r=e.stateSelector,o=n.field,c.next=5,(0,Ff.Ys)(r);case 5:if(!(i=c.sent.fieldDefinitions.find((function(e){return e.id===o})))||!i.autoCompleteEndpoint){c.next=12;break}return c.next=9,(0,Ff.RE)(Cx,e);case 9:return a=c.sent,c.next=12,(0,Ff.RE)(Tx,e,o,a,i.autoCompleteEndpoint);case 12:case"end":return c.stop()}}),Px)}function Ix(e){var t,n,r,o,i,a;return Zf().wrap((function(c){for(;;)switch(c.prev=c.next){case 0:if(!(t=e.payload)){c.next=9;break}if(!pw.hasOutdatedError(t)){c.next=9;break}return n=pw.getOutdatedError(t),r=(0,tA.W)(new Date(n.updateTimestamp)),o=r.value,i=r.unit,a="client.component.form.".concat(n.sameEntity?"outdated":"relatedOutdated","ErrorTitle"),c.next=9,(0,Ff.gz)(m.Z.toaster({type:"warning",key:"outdated-warning",title:(0,S.jsx)(fd.Z,{id:a,values:{model:n.model,key:n.key}}),body:(0,S.jsx)(fd.Z,{id:"client.component.form.outdatedErrorDescription",values:{ago:(0,S.jsx)(nA.Z,{value:o,unit:i}),user:n.updateUser}})}));case 9:case"end":return c.stop()}}),_x)}var Mx=a(93913),Nx=a.n(Mx),Bx=a(93458),Zx=a.n(Bx),Fx=a(41143),Lx=a.n(Fx),Hx=a(37316),Ux=a.n(Hx),zx=function(e,t,n,r){var o=t.value;return"checkbox"===e?oA()({},t,{checked:!!o}):"radio"===e?oA()({},t,{checked:r(o,n),value:n}):"select-multiple"===e?oA()({},t,{value:o||[]}):"file"===e?oA()({},t,{value:o||void 0}):t};const Wx=function(e){return!!(e&&e.stopPropagation&&e.preventDefault)};const Vx=function(e,t){if(Wx(e)){if(!t&&e.nativeEvent&&void 0!==e.nativeEvent.text)return e.nativeEvent.text;if(t&&void 0!==e.nativeEvent)return e.nativeEvent.text;var n=e,r=n.target,o=r.type,i=r.value,a=r.checked,c=r.files,s=n.dataTransfer;return"checkbox"===o?!!a:"file"===o?c||s&&s.files:"select-multiple"===o?function(e){var t=[];if(e)for(var n=0;n<e.length;n++){var r=e[n];r.selected&&t.push(r.value)}return t}(e.target.options):i}return e};const Yx="undefined"!=typeof window&&window.navigator&&window.navigator.product&&"ReactNative"===window.navigator.product;const qx=function(e,t){var n=t.name,r=t.parse,o=t.normalize,i=Vx(e,Yx);return r&&(i=r(i,n)),o&&(i=o(n,i)),i};var Gx="text",Qx=a(59864);const Xx=function(e,t,n){return(0,Qx.isValidElementType)(e[t])?null:new Error("Invalid prop `"+t+"` supplied to `"+n+"`.")};var Kx=["_reduxForm"],$x=function(e){return e&&"object"==typeof e},Jx=function(e){return e&&"function"==typeof e},eE=function(e){$x(e)&&Jx(e.preventDefault)&&e.preventDefault()},tE=function(e,t){if($x(e)&&$x(e.dataTransfer)&&Jx(e.dataTransfer.getData))return e.dataTransfer.getData(t)},nE=function(e,t,n){$x(e)&&$x(e.dataTransfer)&&Jx(e.dataTransfer.setData)&&e.dataTransfer.setData(t,n)};const rE=function(e){var t=e.deepEqual,n=e.getIn,r=function(n){function r(){for(var e,t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];return(e=n.call.apply(n,[this].concat(r))||this).ref=I().createRef(),e.isPristine=function(){return e.props.pristine},e.getValue=function(){return e.props.value},e.handleChange=function(t){var n=e.props,r=n.name,o=n.dispatch,i=n.parse,a=n.normalize,c=n.onChange,s=n._reduxForm,u=n.value,l=qx(t,{name:r,parse:i,normalize:a}),d=!1;if(c)if(!Yx&&Wx(t))c(oA()({},t,{preventDefault:function(){return d=!0,eE(t)}}),l,u,r);else{var f=c(t,l,u,r);Yx&&(d=f)}d||(o(s.change(r,l)),s.asyncValidate&&s.asyncValidate(r,l,"change"))},e.handleFocus=function(t){var n=e.props,r=n.name,o=n.dispatch,i=n.onFocus,a=n._reduxForm,c=!1;i&&(Yx?c=i(t,r):i(oA()({},t,{preventDefault:function(){return c=!0,eE(t)}}),r)),c||o(a.focus(r))},e.handleBlur=function(t){var n=e.props,r=n.name,o=n.dispatch,i=n.parse,a=n.normalize,c=n.onBlur,s=n._reduxForm,u=n._value,l=n.value,d=qx(t,{name:r,parse:i,normalize:a});d===u&&void 0!==u&&(d=l);var f=!1;c&&(Yx?f=c(t,d,l,r):c(oA()({},t,{preventDefault:function(){return f=!0,eE(t)}}),d,l,r)),f||(o(s.blur(r,d)),s.asyncValidate&&s.asyncValidate(r,d,"blur"))},e.handleDragStart=function(t){var n=e.props,r=n.name,o=n.onDragStart,i=n.value;nE(t,Gx,null==i?"":i),o&&o(t,r)},e.handleDrop=function(t){var n=e.props,r=n.name,o=n.dispatch,i=n.onDrop,a=n._reduxForm,c=n.value,s=tE(t,Gx),u=!1;i&&i(oA()({},t,{preventDefault:function(){return u=!0,eE(t)}}),s,c,r),u||(o(a.change(r,s)),eE(t))},e}Xb()(r,n);var o=r.prototype;return o.shouldComponentUpdate=function(e){var n=this,r=Object.keys(e),o=Object.keys(this.props);return!!(this.props.children||e.children||r.length!==o.length||r.some((function(r){return~(e.immutableProps||[]).indexOf(r)?n.props[r]!==e[r]:!~Kx.indexOf(r)&&!t(n.props[r],e[r])})))},o.getRenderedComponent=function(){return this.ref.current},o.render=function(){var t=this.props,n=t.component,r=t.forwardRef,o=t.name,i=t._reduxForm,a=(t.normalize,t.onBlur,t.onChange,t.onFocus,t.onDragStart,t.onDrop,t.immutableProps,Ux()(t,["component","forwardRef","name","_reduxForm","normalize","onBlur","onChange","onFocus","onDragStart","onDrop","immutableProps"])),c=function(e,t,n){var r=e.getIn,o=e.toJS,i=e.deepEqual,a=n.asyncError,c=n.asyncValidating,s=n.onBlur,u=n.onChange,l=n.onDrop,d=n.onDragStart,f=n.dirty,p=n.dispatch,h=n.onFocus,m=n.form,g=n.format,v=n.initial,y=(n.parse,n.pristine),b=n.props,w=n.state,A=n.submitError,x=n.submitFailed,E=n.submitting,O=n.syncError,C=n.syncWarning,k=(n.validate,n.value),S=n._value,D=(n.warn,Ux()(n,["asyncError","asyncValidating","onBlur","onChange","onDrop","onDragStart","dirty","dispatch","onFocus","form","format","initial","parse","pristine","props","state","submitError","submitFailed","submitting","syncError","syncWarning","validate","value","_value","warn"])),P=O||a||A,_=C,j=function(e,n){if(null===n)return e;var r=null==e?"":e;return n?n(e,t):r}(k,g);return{input:zx(D.type,{name:t,onBlur:s,onChange:u,onDragStart:d,onDrop:l,onFocus:h,value:j},S,i),meta:oA()({},o(w),{active:!(!w||!r(w,"active")),asyncValidating:c,autofilled:!(!w||!r(w,"autofilled")),dirty:f,dispatch:p,error:P,form:m,initial:v,warning:_,invalid:!!P,pristine:y,submitting:!!E,submitFailed:!!x,touched:!(!w||!r(w,"touched")),valid:!P,visited:!(!w||!r(w,"visited"))}),custom:oA()({},D,{},b)}}(e,o,oA()({},a,{form:i.form,onBlur:this.handleBlur,onChange:this.handleChange,onDrop:this.handleDrop,onDragStart:this.handleDragStart,onFocus:this.handleFocus})),s=c.custom,u=Ux()(c,["custom"]);if(r&&(s.ref=this.ref),"string"==typeof n){var l=u.input;u.meta;return(0,R.createElement)(n,oA()({},l,{},s))}return(0,R.createElement)(n,oA()({},u,{},s))},r}(R.Component);r.propTypes={component:Xx,props:Zx().object};var o=(0,_.connect)((function(e,r){var o=r.name,i=r._reduxForm,a=i.initialValues,c=(0,i.getFormState)(e),s=n(c,"initial."+o),u=void 0!==s?s:a&&n(a,o),l=n(c,"values."+o),d=n(c,"submitting"),f=function(e,t){var n=ox.getIn(e,t);return n&&n._error?n._error:n}(n(c,"syncErrors"),o),p=function(e,t){var r=n(e,t);return r&&r._warning?r._warning:r}(n(c,"syncWarnings"),o),h=t(l,u);return{asyncError:n(c,"asyncErrors."+o),asyncValidating:n(c,"asyncValidating")===o,dirty:!h,pristine:h,state:n(c,"fields."+o),submitError:n(c,"submitErrors."+o),submitFailed:n(c,"submitFailed"),submitting:d,syncError:f,syncWarning:p,initial:u,value:l,_value:r.value}}),void 0,void 0,{forwardRef:!0});return o(r)};var oE=function(e,t,n,r,o,i){if(i)return e===t};const iE=function(e,t,n){var r=$A()(e.props,t,oE),o=$A()(e.state,n,oE);return!r||!o};const aE=function(e,t){var n=e._reduxForm.sectionPrefix;return n?n+"."+t:t};var cE=R.createContext(null),sE=function(e,t){var n=t.forwardedRef,r=Ux()(t,["forwardedRef"]);return function(t){return R.createElement(e,oA()({},r,{_reduxForm:t,ref:n}))}},uE=function(e){var t=function(t){function n(){return t.apply(this,arguments)||this}return Xb()(n,t),n.prototype.render=function(){return R.createElement(cE.Consumer,{children:sE(e,this.props)})},n}(R.Component),n=R.forwardRef((function(e,n){return R.createElement(t,oA()({},e,{forwardedRef:n}))}));return n.displayName=e.displayName||e.name||"Component",n};const lE=function(e){var t=rE(e),n=e.setIn,r=function(e){function r(t){var r;if((r=e.call(this,t)||this).ref=I().createRef(),r.normalize=function(e,t){var o=r.props.normalize;if(!o)return t;var i=r.props._reduxForm.getValues();return o(t,r.value,n(i,e,t),i,e)},!t._reduxForm)throw new Error("Field must be inside a component decorated with reduxForm()");return r}Xb()(r,e);var o=r.prototype;return o.componentDidMount=function(){var e=this;this.props._reduxForm.register(this.name,"Field",(function(){return e.props.validate}),(function(){return e.props.warn}))},o.shouldComponentUpdate=function(e,t){return iE(this,e,t)},o.UNSAFE_componentWillReceiveProps=function(e){var t=aE(this.props,this.props.name),n=aE(e,e.name);t===n&&ox.deepEqual(this.props.validate,e.validate)&&ox.deepEqual(this.props.warn,e.warn)||(this.props._reduxForm.unregister(t),this.props._reduxForm.register(n,"Field",(function(){return e.validate}),(function(){return e.warn})))},o.componentWillUnmount=function(){this.props._reduxForm.unregister(this.name)},o.getRenderedComponent=function(){return Lx()(this.props.forwardRef,"If you want to access getRenderedComponent(), you must specify a forwardRef prop to Field"),this.ref.current?this.ref.current.getRenderedComponent():void 0},o.render=function(){return(0,R.createElement)(t,oA()({},this.props,{name:this.name,normalize:this.normalize,ref:this.ref}))},Nx()(r,[{key:"name",get:function(){return aE(this.props,this.props.name)}},{key:"dirty",get:function(){return!this.pristine}},{key:"pristine",get:function(){return!(!this.ref.current||!this.ref.current.isPristine())}},{key:"value",get:function(){return this.ref.current&&this.ref.current.getValue()}}]),r}(R.Component);return r.propTypes={name:Zx().string.isRequired,component:Xx,format:Zx().func,normalize:Zx().func,onBlur:Zx().func,onChange:Zx().func,onFocus:Zx().func,onDragStart:Zx().func,onDrop:Zx().func,parse:Zx().func,props:Zx().object,validate:Zx().oneOfType([Zx().func,Zx().arrayOf(Zx().func)]),warn:Zx().oneOfType([Zx().func,Zx().arrayOf(Zx().func)]),forwardRef:Zx().bool,immutableProps:Zx().arrayOf(Zx().string),_reduxForm:Zx().object},uE(r)},dE=lE(ox);var fE,pE=b.ZP.div.withConfig({displayName:"StyledPanel"})(fE||(fE=(0,v.Z)(["\n && {\n background-color: ",";\n border: 1px "," ",";\n }\n"])),w.FS.color("paper"),(function(e){return e.isFramed?"solid":"none"}),(function(e){var t=e.theme;return(0,y.$n)(.93,t.colors.text)}));const hE=pE;const mE=function(e){var t=e.children,n=e.isFramed,r=void 0===n||n,o=e.controlledIsOpen,i=e.isOpenInitial,a=void 0===i||i,c=e.isToggleable,s=void 0===c||c,u=e.onToggle,l=(0,R.useState)(a),d=(0,wd.Z)(l,2),f=d[0],p=d[1],h="boolean"==typeof o,m=function(){s&&(h?"function"==typeof u&&u(!o):p(!f))};return(0,S.jsx)(hE,{isFramed:r,children:I().Children.map(t,(function(e){return I().cloneElement(e,{isFramed:r,isOpen:h?o:f,isToggleable:s,toggleOpenState:m})}))})};var gE,vE=b.ZP.div.withConfig({displayName:"StyledPanelBody"})(gE||(gE=(0,v.Z)(["\n && {\n padding: 0 ",";\n display: ",";\n\n > div {\n padding: "," 0 0 0;\n }\n }\n"])),(function(e){return e.isFramed?"10px":0}),(function(e){return e.isOpen?"block":"none"}),(function(e){return e.isFramed?"10px":0}));const yE=vE;const bE=function(e){var t=e.children,n=e.isFramed,r=e.isOpen;return(0,S.jsx)(yE,{isFramed:n,isOpen:r,children:(0,S.jsx)("div",{children:t})})};var wE;const AE=b.ZP.div.withConfig({displayName:"StyledPanelGroup"})(wE||(wE=(0,v.Z)(["\n margin-bottom: ",";\n\n && {\n ",":not(:last-child) {\n margin-bottom: ",";\n }\n }\n"])),x.Z.space(0),hE,x.Z.space(-1));const xE=function(e){var t=e.initialOpenPanelIndex,n=e.children,r=(0,R.useState)(t),o=(0,wd.Z)(r,2),i=o[0],a=o[1];return(0,S.jsx)(AE,{children:I().Children.map(n,(function(e,t){return I().cloneElement(e,{controlledIsOpen:i===t,onToggle:function(e){return function(e,t){a(!0===t?e:void 0)}(t,e)}})}))})};var EE,OE,CE,kE,SE=b.ZP.span.withConfig({displayName:"StyledIconWrapper"})(EE||(EE=(0,v.Z)(["\n font-size: ",";\n\n /* only hide arrow on non-touch devices */\n ","\n"])),x.Z.font(1),!Nv.b&&(0,b.iv)(OE||(OE=(0,v.Z)(["\n opacity: 0;\n\n &:hover {\n color: ",";\n }\n "])),w.FS.color("secondaryLight"))),DE=b.ZP.div.withConfig({displayName:"StyledPanelHeaderFooter"})(CE||(CE=(0,v.Z)(["\n && {\n background-color: #f2f2f2;\n display: flex;\n padding: ",";\n align-items: center;\n\n /* only apply arrow styles on non-touch devices */\n ","\n > div {\n flex: 1 1 auto;\n }\n ","\n }\n"])),(function(e){return e.isFramed?"4px 8px 4px 8px":0}),!Nv.b&&(0,b.iv)(kE||(kE=(0,v.Z)(["\n &:hover {\n cursor: pointer;\n\n "," {\n opacity: 1;\n }\n }\n "])),SE),(function(e){return function(e){var t=e.theme,n=e.isOpen,r=e.isFramed,o="\n &:first-child {\n border-bottom-color: ".concat((0,rf.HO)(nf()(t,"colors.paper"),1),";\n border-bottom-style: ").concat(r?"solid":"none",";\n }\n\n &:last-child,\n &:nth-child(3) {\n border-top-color: ").concat((0,rf.HO)(nf()(t,"colors.paper"),1),";\n border-top-style: ").concat(r?"solid":"none",";\n }\n ");return"\n ".concat(o,n?"\n &:first-child {\n border-bottom-width: 1px;\n }\n\n &:last-child,\n &:nth-child(3) {\n border-top-width: 1px;\n }\n ":"\n &:first-child {\n border-bottom-width: 0;\n }\n\n &:last-child {\n border-top-width: 0;\n }\n\n &:nth-child(3) {\n border-top-width: 1px;\n }\n ")}(e)}));const PE=DE;var _E=function(e){var t=e.children,n=e.isFramed,r=e.isOpen,o=e.isToggleable,i=e.showToggler,a=e.toggleOpenState,c=e.options;return(0,S.jsxs)(PE,{isFramed:n,isOpen:r,onClick:a,children:[(0,S.jsx)("div",{children:I().Children.map(t,(function(e){return I().cloneElement(e)}))}),o&&i&&(0,S.jsx)(SE,{children:(0,S.jsx)(B.Z,{icon:r?"chevron-up":"chevron-down",onClick:a,title:r?c.collapseButtonText:c.unfoldButtonText})})]})};_E.defaultProps={showToggler:!0,options:{collapseButtonText:"Hide information",unfoldButtonText:"Show more information"}};const jE={Body:bE,Footer:_E,Group:xE,Header:_E,Wrapper:mE};var TE;const RE=b.ZP.div.withConfig({displayName:"StyledLayoutBox"})(TE||(TE=(0,v.Z)(["\n height: fit-content;\n margin-bottom: ",";\n"])),x.Z.space(.25));var IE=function(e){var t=e.children;return(0,S.jsx)(RE,{children:t})};const ME=(0,R.memo)(IE);var NE,BE=b.ZP.div.withConfig({displayName:"StyledLayoutContainer"})(NE||(NE=(0,v.Z)(["\n display: grid;\n padding-right: ",";\n ",";\n ",";\n"])),x.Z.space(0),(function(e){var t=e.containerWidth,n=e.theme,r=e.minBoxWidth;return t<600?"grid-template-columns: 100%;":"grid-template-columns: repeat(auto-fit, minmax(".concat(r,"px, 1fr));\n grid-gap: ").concat(x.Z.space(.25)({theme:n}))}),(function(e){return e.occupiesRemainingHeight&&"\n flex: 1;\n "}));const ZE=BE;var FE=function(e){var t=e.children,n=e.occupiesRemainingHeight,r=e.minBoxWidth,o=(0,R.useRef)(null),i=(0,R.useState)(0),a=(0,wd.Z)(i,2),c=a[0],s=a[1],u=function(){s(o.current.offsetWidth)};return(0,R.useEffect)((function(){return u(),window.addEventListener("resize",u),function(){return window.removeEventListener("resize",u)}}),[]),(0,S.jsx)(ZE,{ref:o,containerWidth:c,occupiesRemainingHeight:n,minBoxWidth:r,children:t})};FE.defaultProps={minBoxWidth:250};const LE={Box:ME,Container:FE};var HE,UE=a(70696),zE=a(52058),WE=b.ZP.div.withConfig({displayName:"StyledActionsWrapper"})(HE||(HE=Ld()(["\n background-color: ",";\n padding-bottom: ",";\n display: flex;\n flex-wrap: wrap;\n z-index: 2; // Higher than StyledIndicatorsContainerWrapper\n position: sticky;\n top: 0;\n\n & > * {\n margin-top: ",";\n }\n"])),Jm.Z.color("paper"),x.Z.space(-.5),x.Z.space(-.5));const VE=function(e){var t=e.entityName,n=e.entityKey,r=e.mode,o=e.customRenderedActions,i=e.action;return(0,S.jsx)(zE.ZP,{children:function(e){return(0,S.jsx)(WE,{ref:e,children:(0,S.jsx)(my.Action,{definition:i,selection:my.getSingleEntitySelection(t,n),mode:r,customRenderedActions:o})})}})},YE={fixLabel:function(){return!0}},qE={getOptions:function(e){var t=e.formData;return{trueLabel:t.intl.formatMessage({id:"client.common.yes"}),falseLabel:t.intl.formatMessage({id:"client.common.no"})}},hasValue:function(e){var t=e.value;return!0===t||!1===t}};var GE=function(e,t){return{entityModel:e.model,key:e.key,field:t}},QE=function(e,t){if(e.implicitModelField&&t.formValues){var n=e.implicitModelField,r=n.indexOf(".");return r?function(e,t,n){var r=e.substring(0,t),o=e.substring(t+1),i=n.formValues[r];if(i){if(!Array.isArray(i))return GE(i,o);if(1===i.length)return GE(i[0],o)}return null}(n,r,t):t.formValues[n]}return e.implicitModel},XE=function(e){if(e.implicitModelField){var t=e.implicitModelField,n=t.indexOf(".");return n?[t.substring(0,n)]:[t]}return[]};const KE={fixLabel:function(){return!0},getOptions:function(e){var t=e.formField,n=e.formData;return{mode:t.mode,implicitModel:QE(t,n)}},dataContainerProps:function(e){var t=e.formField;return{formValues:{formName:e.formName,fields:XE(t)}}}};var $E=function(e){if(!e||isNaN(e))return null;var t=e.getFullYear(),n=e.getMonth()+1,r=e.getDate();return[t,(n>9?"":"0")+n,(r>9?"":"0")+r].join("-")};const JE={getOptions:function(){return{datePickerOptions:{dateToValue:$E}}}},eO={getOptions:function(e){var t=e.entityField;if("long"===(null==t?void 0:t.type))return{datePickerOptions:{valueToDate:function(e){var t=e?new Date(e):null;return isNaN(t)?null:t},dateToValue:function(e){return e?e.getTime():null}}}}},tO={getOptions:function(e){var t=e.formField;return{postPointDigits:nf()(t,"validation.decimalDigits.postPointDigits",null),prePointDigits:nf()(t,"validation.decimalDigits.prePointDigits",null),minValue:nf()(t,"validation.numberRange.fromIncluding",null),maxValue:nf()(t,"validation.numberRange.toIncluding",null),allowNegative:!0}}};function nO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function rO(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?nO(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nO(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const oO={getOptions:function(e){var t=e.formField,n=e.formName,r=e.formData;return rO(rO({upload:function(e){r.uploadDocument(n,t.id,e)}},r.chooseDocument?{choose:function(){return r.chooseDocument(r.setDocument,n,t.id)}}:{}),{},{uploadText:r.intl.formatMessage({id:"client.component.upload.upload"}),uploadingText:r.intl.formatMessage({id:"client.component.upload.uploading"}),downloadText:r.intl.formatMessage({id:"client.component.upload.downloadTitle"}),deleteText:r.intl.formatMessage({id:"client.component.upload.deleteTitle"})})},fixLabel:function(){return!0}};var iO=function(e){return!e.validation||!e.validation.numberRange||"number"!=typeof e.validation.numberRange.fromIncluding||e.validation.numberRange.fromIncluding<0};const aO={getOptions:function(e){var t=e.formField,n=e.formData;return{hoursLabel:n.intl.formatMessage({id:"client.component.duration.hoursLabel"}),minutesLabel:n.intl.formatMessage({id:"client.component.duration.minutesLabel"}),secondsLabel:n.intl.formatMessage({id:"client.component.duration.secondsLabel"}),allowNegative:iO(t)}}};var cO=function(e){if(!["email_editor","correspondence_editor"].includes(e))return{toolbar:{removeItems:["fontFamily","fontSize","fontColor"]}}};const sO={fixLabel:function(){return!0},getOptions:function(e){var t=e.formField;return{ckEditorConfig:cO(t.htmlconfig)}}},uO={getOptions:function(e){var t=e.formField;return{minValue:nf()(t,"validation.numberRange.fromIncluding",null),maxValue:nf()(t,"validation.numberRange.toIncluding",null)}}};function lO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function dO(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?lO(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lO(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const fO={hasValue:function(e){var t=e.formValues,n=e.formField.locationMapping;return!(!t[Dw(n.city)]&&!t[Dw(n.postcode)])},getValue:function(e){var t=e.formField,n=e.formData,r=t.locationMapping;return{postcode:n.formValues[Dw(r.postcode)],city:n.formValues[Dw(r.city)]}},getEvents:function(e){var t=e.formField,n=e.formName,r=e.formData,o=e.events,i=t.locationMapping||{};return dO(dO({},o),{},{onChange:function(e){for(var o in i)if(i[o]&&void 0!==e[o]){var a=null!==e[o]?e[o]:"";r.changeFieldValue(n,i[o],a)}var c=e.postcode,s=e.city;r.changeFieldValue(n,t.id,dO(dO({},void 0!==c?{postcode:c||""}:{}),void 0!==s?{city:s||""}:{}))},onBlur:function(){r.touchField(n,t.id)}})},dataContainerProps:function(e){var t=e.formField,n=e.formName;return{locations:[t.id],formValues:{formName:n,fields:t.locationMapping?Object.values(t.locationMapping).map((function(e){return Dw(e)})):{}}}},getOptions:function(e){var t=e.formField,n=e.formData;return{fetchSuggestions:function(e,r){return n.loadLocationsSuggestions(t.id,e,r,nf()(t,"countries"))},isLoading:nf()(n,["locations",t.id,"isLoading"],!1),suggestions:nf()(n,["locations",t.id,"suggestions"],null),mapButtonTitle:n.intl.formatMessage({id:"client.component.location.mapButtonTitle"}),locationValues:Object.keys(t.locationMapping||{}).reduce((function(e,r){return dO(dO({},e),{},L()({},r,n.formValues[Dw(t.locationMapping[r])]))}),{})}},getMandatoryValidation:function(e){var t,n,r=e.formField,o=r.locationMapping,i=null===(t=r.siblings.find((function(e){return e.id===o.city})))||void 0===t?void 0:t.validation,a=null===(n=r.siblings.find((function(e){return e.id===o.postcode})))||void 0===n?void 0:n.validation;return(null==i?void 0:i.mandatory)||(null==a?void 0:a.mandatory)}},pO={getOptions:function(e){var t=e.formField;return{postPointDigits:nf()(t,"validation.decimalDigits.postPointDigits",2),prePointDigits:nf()(t,"validation.decimalDigits.prePointDigits",null),minValue:nf()(t,"validation.numberRange.fromIncluding",null),maxValue:nf()(t,"validation.numberRange.toIncluding",null),allowNegative:!0,fixedDecimalScale:!0}}},hO={getOptions:function(e){var t=e.formField;return{prePointDigits:nf()(t,"validation.decimalDigits.prePointDigits",null),postPointDigits:nf()(t,"validation.decimalDigits.postPointDigits",null),minValue:nf()(t,"validation.numberRange.fromIncluding",null),maxValue:nf()(t,"validation.numberRange.toIncluding",null),allowNegative:!0}}},mO={getOptions:function(e){var t=e.formField;return{prePointDigits:nf()(t,"validation.decimalDigits.prePointDigits",null),postPointDigits:nf()(t,"validation.decimalDigits.postPointDigits",null),minValue:nf()(t,"validation.numberRange.fromIncluding",null),maxValue:nf()(t,"validation.numberRange.toIncluding",null),allowNegative:!1,suffix:"%"}}},gO={getOptions:function(e){var t=e.formField;return{customPhoneRegex:nf()(t,"validation.phone.customRegex",null),defaultCountry:nf()(t,"validation.phone.defaultRegion",null)}}};var vO=50,yO=10,bO=function(e){return e.filter(Boolean).join(" and ")},wO=function(e){return e&&Array.isArray(e)&&0!==e.length?"not KEYS(".concat(e.map((function(e){return e.key})).join(", "),")"):void 0};const AO={dataContainerProps:function(e){var t=e.formField;return{relationEntities:[t.id],tooltips:[t.targetEntity],navigationStrategy:!0}},getOptions:function(e){var t=e.formField,n=e.formName,r=e.formData;return{options:nf()(r,["relationEntities",t.id,"data"],[]),moreOptionsAvailable:nf()(r,["relationEntities",t.id,"moreEntitiesAvailable"],!1),isLoading:nf()(r,["relationEntities",t.id,"isLoading"],!1),fetchOptions:function(e){r.loadRelationEntities(t.id,t.targetEntity,{forceReload:!0,limit:yO,formBase:t.formBase,formName:t.formName,where:bO([t.condition,wO(e)]),loadRemoteFieldConfiguration:!0,constriction:t.constriction})},searchOptions:function(e,n){r.loadRelationEntities(t.id,t.targetEntity,{searchTerm:e,limit:vO,forceReload:!0,formBase:t.formBase,formName:t.formName,where:bO([t.condition,wO(n)]),loadRemoteFieldConfiguration:!0,constriction:t.constriction})},openDocsTreeSearch:t.displayDocsTree?function(e){return r.openDocsTreeSearch(n,t,e)}:void 0,openAdvancedSearch:!1===t.displayAdvancedSearch?void 0:function(e,o){return r.openAdvancedSearch(n,t,e,o)},tooltips:nf()(r.tooltips,t.targetEntity,null),loadTooltip:function(e){return r.loadTooltip(t.targetEntity,e)},noResultsText:r.intl.formatMessage({id:"client.component.remoteselect.noResultsText"}),moreOptionsAvailableText:r.intl.formatMessage({id:"client.component.remoteselect.moreOptionsAvailableText"}),DetailLink:r.navigationStrategy&&r.navigationStrategy.DetailLink?function(e){var n=e.entityKey,o=e.children;return(0,S.jsx)(r.navigationStrategy.DetailLink,{entityName:t.targetEntity,entityKey:n,children:o})}:null,createPermission:t.relationName&&nf()(r,["entityModel","paths",t.relationName,"createPermission"],!1),openRemoteCreate:function(e){return r.openRemoteCreate(t,n,e)}}}},xO={dataContainerProps:function(e){return{searchFilters:[e.formField.model]}},getOptions:function(e){var t=e.formField,n=e.formData;return{isMulti:t.multiple,options:nf()(n.searchFilters,t.model,null),fetchOptions:function(){return n.loadSearchFilters(t.model,t.group)},noResultsText:n.intl.formatMessage({id:"client.component.searchfilter.noResultsText"})}}};var EO=1e4;const OO={dataContainerProps:function(e){var t=e.formField;return{relationEntities:[t.id],tooltips:[t.targetEntity]}},getOptions:function(e){var t=e.formField,n=e.formData;return{options:nf()(n,["relationEntities",t.id,"data"],[]),isLoading:nf()(n,["relationEntities",t.id,"isLoading"],!1),tooltips:nf()(n.tooltips,t.targetEntity,null),loadTooltip:function(e){return n.loadTooltip(t.targetEntity,e)},noResultsText:n.intl.formatMessage({id:"client.component.remoteselect.noResultsText"}),fetchOptions:function(){return n.loadRelationEntities(t.id,t.targetEntity,{forceReload:!1,limit:EO,constriction:t.constriction,where:t.condition})}}}};function CO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function kO(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?CO(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):CO(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var SO={binary:oO,boolean:YE,code:KE,counter:hO,"data-amount":hO,datetime:eO,date:JE,birthdate:JE,"pulldown-date":JE,decimal:tO,document:oO,double:tO,duration:aO,html:sO,image:oO,integer:uO,location:fO,long:uO,moneyamount:pO,marking:YE,"multi-remote-field":AO,"multi-select-box":OO,"named-upload":oO,number:hO,phone:gO,"search-filter":xO,"single-remote-field":AO,"single-select-box":OO,sorting:hO,percent:mO},DO=kO({},SO);const PO={editable:SO,readOnly:kO({},SO),list:DO,search:kO(kO({},SO),{},{boolean:qE,marking:qE})};var _O=a(80470),jO=a(41609),TO=a.n(jO),RO=a(45915),IO=a(23493),MO=a.n(IO),NO=a(8486),BO=a(56315),ZO=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];var FO=a(3640),LO=a(11259),HO=a(44822),UO=a(32208),zO=a(19241);var WO=a(99357);function VO(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=(0,zO.Z)(e);if(t){var o=(0,zO.Z)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return(0,WO.Z)(this,n)}}var YO=a(13508),qO=a(89178),GO=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function QO(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(r=e[n],o=t[n],!(r===o||GO(r)&&GO(o)))return!1;var r,o;return!0}for(var XO={name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"},KO=function(e){return(0,qO.tZ)("span",(0,FO.Z)({css:XO},e))},$O={guidance:function(e){var t=e.isSearchable,n=e.isMulti,r=e.isDisabled,o=e.tabSelectsValue;switch(e.context){case"menu":return"Use Up and Down to choose options".concat(r?"":", press Enter to select the currently focused option",", press Escape to exit the menu").concat(o?", press Tab to select the option and exit the menu":"",".");case"input":return"".concat(e["aria-label"]||"Select"," is focused ").concat(t?",type to refine list":"",", press Down to open the menu, ").concat(n?" press left to focus selected values":"");case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function(e){var t=e.action,n=e.label,r=void 0===n?"":n,o=e.labels,i=e.isDisabled;switch(t){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(r,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(o.length>1?"s":""," ").concat(o.join(","),", selected.");case"select-option":return"option ".concat(r,i?" is disabled. Select another option.":", selected.");default:return""}},onFocus:function(e){var t=e.context,n=e.focused,r=e.options,o=e.label,i=void 0===o?"":o,a=e.selectValue,c=e.isDisabled,s=e.isSelected,u=function(e,t){return e&&e.length?"".concat(e.indexOf(t)+1," of ").concat(e.length):""};if("value"===t&&a)return"value ".concat(i," focused, ").concat(u(a,n),".");if("menu"===t){var l=c?" disabled":"",d="".concat(s?"selected":"focused").concat(l);return"option ".concat(i," ").concat(d,", ").concat(u(r,n),".")}return""},onFilter:function(e){var t=e.inputValue,n=e.resultsMessage;return"".concat(n).concat(t?" for search term "+t:"",".")}},JO=function(e){var t=e.ariaSelection,n=e.focusedOption,r=e.focusedValue,o=e.focusableOptions,i=e.isFocused,a=e.selectValue,c=e.selectProps,s=e.id,u=c.ariaLiveMessages,l=c.getOptionLabel,d=c.inputValue,f=c.isMulti,p=c.isOptionDisabled,h=c.isSearchable,m=c.menuIsOpen,g=c.options,v=c.screenReaderStatus,y=c.tabSelectsValue,b=c["aria-label"],w=c["aria-live"],A=(0,R.useMemo)((function(){return(0,NO.Z)((0,NO.Z)({},$O),u||{})}),[u]),x=(0,R.useMemo)((function(){var e,n="";if(t&&A.onChange){var r=t.option,o=t.options,i=t.removedValue,c=t.removedValues,s=t.value,u=i||r||(e=s,Array.isArray(e)?null:e),d=u?l(u):"",f=o||c||void 0,h=f?f.map(l):[],m=(0,NO.Z)({isDisabled:u&&p(u,a),label:d,labels:h},t);n=A.onChange(m)}return n}),[t,A,p,a,l]),E=(0,R.useMemo)((function(){var e="",t=n||r,o=!!(n&&a&&a.includes(n));if(t&&A.onFocus){var i={focused:t,label:l(t),isDisabled:p(t,a),isSelected:o,options:g,context:t===n?"menu":"value",selectValue:a};e=A.onFocus(i)}return e}),[n,r,l,p,A,g,a]),O=(0,R.useMemo)((function(){var e="";if(m&&g.length&&A.onFilter){var t=v({count:o.length});e=A.onFilter({inputValue:d,resultsMessage:t})}return e}),[o,d,m,A,g,v]),C=(0,R.useMemo)((function(){var e="";if(A.guidance){var t=r?"value":m?"menu":"input";e=A.guidance({"aria-label":b,context:t,isDisabled:n&&p(n,a),isMulti:f,isSearchable:h,tabSelectsValue:y})}return e}),[b,n,r,f,p,h,m,A,a,y]),k="".concat(E," ").concat(O," ").concat(C),S=(0,qO.tZ)(R.Fragment,null,(0,qO.tZ)("span",{id:"aria-selection"},x),(0,qO.tZ)("span",{id:"aria-context"},k)),D="initial-input-focus"===(null==t?void 0:t.action);return(0,qO.tZ)(R.Fragment,null,(0,qO.tZ)(KO,{id:s},D&&S),(0,qO.tZ)(KO,{"aria-live":w,"aria-atomic":"false","aria-relevant":"additions text"},i&&!D&&S))},eC=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],tC=new RegExp("["+eC.map((function(e){return e.letters})).join("")+"]","g"),nC={},rC=0;rC<eC.length;rC++)for(var oC=eC[rC],iC=0;iC<oC.letters.length;iC++)nC[oC.letters[iC]]=oC.base;var aC=function(e){return e.replace(tC,(function(e){return nC[e]}))},cC=function(e,t){void 0===t&&(t=QO);var n=null;function r(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];if(n&&n.lastThis===this&&t(r,n.lastArgs))return n.lastResult;var i=e.apply(this,r);return n={lastResult:i,lastArgs:r,lastThis:this},i}return r.clear=function(){n=null},r}(aC),sC=function(e){return e.replace(/^\s+|\s+$/g,"")},uC=function(e){return"".concat(e.label," ").concat(e.value)},lC=["innerRef"];function dC(e){var t=e.innerRef,n=(0,BO.Z)(e,lC),r=(0,YO.r)(n,"onExited","in","enter","exit","appear");return(0,qO.tZ)("input",(0,FO.Z)({ref:t},r,{css:(0,qO.iv)({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},"","")}))}var fC=["boxSizing","height","overflow","paddingRight","position"],pC={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function hC(e){e.preventDefault()}function mC(e){e.stopPropagation()}function gC(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;0===e?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function vC(){return"ontouchstart"in window||navigator.maxTouchPoints}var yC=!("undefined"==typeof window||!window.document||!window.document.createElement),bC=0,wC={capture:!1,passive:!1};var AC=function(){return document.activeElement&&document.activeElement.blur()},xC={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function EC(e){var t=e.children,n=e.lockEnabled,r=e.captureEnabled,o=function(e){var t=e.isEnabled,n=e.onBottomArrive,r=e.onBottomLeave,o=e.onTopArrive,i=e.onTopLeave,a=(0,R.useRef)(!1),c=(0,R.useRef)(!1),s=(0,R.useRef)(0),u=(0,R.useRef)(null),l=(0,R.useCallback)((function(e,t){if(null!==u.current){var s=u.current,l=s.scrollTop,d=s.scrollHeight,f=s.clientHeight,p=u.current,h=t>0,m=d-f-l,g=!1;m>t&&a.current&&(r&&r(e),a.current=!1),h&&c.current&&(i&&i(e),c.current=!1),h&&t>m?(n&&!a.current&&n(e),p.scrollTop=d,g=!0,a.current=!0):!h&&-t>l&&(o&&!c.current&&o(e),p.scrollTop=0,g=!0,c.current=!0),g&&function(e){e.preventDefault(),e.stopPropagation()}(e)}}),[n,r,o,i]),d=(0,R.useCallback)((function(e){l(e,e.deltaY)}),[l]),f=(0,R.useCallback)((function(e){s.current=e.changedTouches[0].clientY}),[]),p=(0,R.useCallback)((function(e){var t=s.current-e.changedTouches[0].clientY;l(e,t)}),[l]),h=(0,R.useCallback)((function(e){if(e){var t=!!YO.s&&{passive:!1};e.addEventListener("wheel",d,t),e.addEventListener("touchstart",f,t),e.addEventListener("touchmove",p,t)}}),[p,f,d]),m=(0,R.useCallback)((function(e){e&&(e.removeEventListener("wheel",d,!1),e.removeEventListener("touchstart",f,!1),e.removeEventListener("touchmove",p,!1))}),[p,f,d]);return(0,R.useEffect)((function(){if(t){var e=u.current;return h(e),function(){m(e)}}}),[t,h,m]),function(e){u.current=e}}({isEnabled:void 0===r||r,onBottomArrive:e.onBottomArrive,onBottomLeave:e.onBottomLeave,onTopArrive:e.onTopArrive,onTopLeave:e.onTopLeave}),i=function(e){var t=e.isEnabled,n=e.accountForScrollbars,r=void 0===n||n,o=(0,R.useRef)({}),i=(0,R.useRef)(null),a=(0,R.useCallback)((function(e){if(yC){var t=document.body,n=t&&t.style;if(r&&fC.forEach((function(e){var t=n&&n[e];o.current[e]=t})),r&&bC<1){var i=parseInt(o.current.paddingRight,10)||0,a=document.body?document.body.clientWidth:0,c=window.innerWidth-a+i||0;Object.keys(pC).forEach((function(e){var t=pC[e];n&&(n[e]=t)})),n&&(n.paddingRight="".concat(c,"px"))}t&&vC()&&(t.addEventListener("touchmove",hC,wC),e&&(e.addEventListener("touchstart",gC,wC),e.addEventListener("touchmove",mC,wC))),bC+=1}}),[r]),c=(0,R.useCallback)((function(e){if(yC){var t=document.body,n=t&&t.style;bC=Math.max(bC-1,0),r&&bC<1&&fC.forEach((function(e){var t=o.current[e];n&&(n[e]=t)})),t&&vC()&&(t.removeEventListener("touchmove",hC,wC),e&&(e.removeEventListener("touchstart",gC,wC),e.removeEventListener("touchmove",mC,wC)))}}),[r]);return(0,R.useEffect)((function(){if(t){var e=i.current;return a(e),function(){c(e)}}}),[t,a,c]),function(e){i.current=e}}({isEnabled:n});return(0,qO.tZ)(R.Fragment,null,n&&(0,qO.tZ)("div",{onClick:AC,css:xC}),t((function(e){o(e),i(e)})))}var OC={clearIndicator:YO.a,container:YO.b,control:YO.d,dropdownIndicator:YO.e,group:YO.g,groupHeading:YO.f,indicatorsContainer:YO.i,indicatorSeparator:YO.h,input:YO.j,loadingIndicator:YO.l,loadingMessage:YO.k,menu:YO.m,menuList:YO.n,menuPortal:YO.o,multiValue:YO.p,multiValueLabel:YO.q,multiValueRemove:YO.t,noOptionsMessage:YO.u,option:YO.v,placeholder:YO.w,singleValue:YO.x,valueContainer:YO.y};var CC={borderRadius:4,colors:{primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},spacing:{baseUnit:4,controlHeight:38,menuGutter:8}},kC={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:(0,YO.z)(),captureMenuScroll:!(0,YO.z)(),closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e){return function(t,n){if(t.data.__isNew__)return!0;var r=(0,NO.Z)({ignoreCase:!0,ignoreAccents:!0,stringify:uC,trim:!0,matchFrom:"any"},e),o=r.ignoreCase,i=r.ignoreAccents,a=r.stringify,c=r.trim,s=r.matchFrom,u=c?sC(n):n,l=c?sC(a(t)):a(t);return o&&(u=u.toLowerCase(),l=l.toLowerCase()),i&&(u=cC(u),l=aC(l)),"start"===s?l.substr(0,u.length)===u:l.indexOf(u)>-1}}(),formatGroupLabel:function(e){return e.label},getOptionLabel:function(e){return e.label},getOptionValue:function(e){return e.value},isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:function(e){return!!e.isDisabled},loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!(0,YO.A)(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return"".concat(t," result").concat(1!==t?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0};function SC(e,t,n,r){return{type:"option",data:t,isDisabled:RC(e,t,n),isSelected:IC(e,t,n),label:jC(e,t),value:TC(e,t),index:r}}function DC(e,t){return e.options.map((function(n,r){if("options"in n){var o=n.options.map((function(n,r){return SC(e,n,t,r)})).filter((function(t){return _C(e,t)}));return o.length>0?{type:"group",data:n,options:o,index:r}:void 0}var i=SC(e,n,t,r);return _C(e,i)?i:void 0})).filter(YO.G)}function PC(e){return e.reduce((function(e,t){return"group"===t.type?e.push.apply(e,(0,RO.Z)(t.options.map((function(e){return e.data})))):e.push(t.data),e}),[])}function _C(e,t){var n=e.inputValue,r=void 0===n?"":n,o=t.data,i=t.isSelected,a=t.label,c=t.value;return(!NC(e)||!i)&&MC(e,{label:a,value:c,data:o},r)}var jC=function(e,t){return e.getOptionLabel(t)},TC=function(e,t){return e.getOptionValue(t)};function RC(e,t,n){return"function"==typeof e.isOptionDisabled&&e.isOptionDisabled(t,n)}function IC(e,t,n){if(n.indexOf(t)>-1)return!0;if("function"==typeof e.isOptionSelected)return e.isOptionSelected(t,n);var r=TC(e,t);return n.some((function(t){return TC(e,t)===r}))}function MC(e,t,n){return!e.filterOption||e.filterOption(t,n)}var NC=function(e){var t=e.hideSelectedOptions,n=e.isMulti;return void 0===t?n:t},BC=1,ZC=function(e){(0,UO.Z)(n,e);var t=VO(n);function n(e){var r;return(0,LO.Z)(this,n),(r=t.call(this,e)).state={ariaSelection:null,focusedOption:null,focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0},r.blockOptionHover=!1,r.isComposing=!1,r.commonProps=void 0,r.initialTouchX=0,r.initialTouchY=0,r.instancePrefix="",r.openAfterFocus=!1,r.scrollToFocusedOptionOnUpdate=!1,r.userIsDragging=void 0,r.controlRef=null,r.getControlRef=function(e){r.controlRef=e},r.focusedOptionRef=null,r.getFocusedOptionRef=function(e){r.focusedOptionRef=e},r.menuListRef=null,r.getMenuListRef=function(e){r.menuListRef=e},r.inputRef=null,r.getInputRef=function(e){r.inputRef=e},r.focus=r.focusInput,r.blur=r.blurInput,r.onChange=function(e,t){var n=r.props,o=n.onChange,i=n.name;t.name=i,r.ariaOnChange(e,t),o(e,t)},r.setValue=function(e,t,n){var o=r.props,i=o.closeMenuOnSelect,a=o.isMulti,c=o.inputValue;r.onInputChange("",{action:"set-value",prevInputValue:c}),i&&(r.setState({inputIsHiddenAfterUpdate:!a}),r.onMenuClose()),r.setState({clearFocusValueOnUpdate:!0}),r.onChange(e,{action:t,option:n})},r.selectOption=function(e){var t=r.props,n=t.blurInputOnSelect,o=t.isMulti,i=t.name,a=r.state.selectValue,c=o&&r.isOptionSelected(e,a),s=r.isOptionDisabled(e,a);if(c){var u=r.getOptionValue(e);r.setValue((0,YO.B)(a.filter((function(e){return r.getOptionValue(e)!==u}))),"deselect-option",e)}else{if(s)return void r.ariaOnChange((0,YO.C)(e),{action:"select-option",option:e,name:i});o?r.setValue((0,YO.B)([].concat((0,RO.Z)(a),[e])),"select-option",e):r.setValue((0,YO.C)(e),"select-option")}n&&r.blurInput()},r.removeValue=function(e){var t=r.props.isMulti,n=r.state.selectValue,o=r.getOptionValue(e),i=n.filter((function(e){return r.getOptionValue(e)!==o})),a=(0,YO.D)(t,i,i[0]||null);r.onChange(a,{action:"remove-value",removedValue:e}),r.focusInput()},r.clearValue=function(){var e=r.state.selectValue;r.onChange((0,YO.D)(r.props.isMulti,[],null),{action:"clear",removedValues:e})},r.popValue=function(){var e=r.props.isMulti,t=r.state.selectValue,n=t[t.length-1],o=t.slice(0,t.length-1),i=(0,YO.D)(e,o,o[0]||null);r.onChange(i,{action:"pop-value",removedValue:n})},r.getValue=function(){return r.state.selectValue},r.cx=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return YO.E.apply(void 0,[r.props.classNamePrefix].concat(t))},r.getOptionLabel=function(e){return jC(r.props,e)},r.getOptionValue=function(e){return TC(r.props,e)},r.getStyles=function(e,t){var n=OC[e](t);n.boxSizing="border-box";var o=r.props.styles[e];return o?o(n,t):n},r.getElementId=function(e){return"".concat(r.instancePrefix,"-").concat(e)},r.getComponents=function(){return(0,YO.F)(r.props)},r.buildCategorizedOptions=function(){return DC(r.props,r.state.selectValue)},r.getCategorizedOptions=function(){return r.props.menuIsOpen?r.buildCategorizedOptions():[]},r.buildFocusableOptions=function(){return PC(r.buildCategorizedOptions())},r.getFocusableOptions=function(){return r.props.menuIsOpen?r.buildFocusableOptions():[]},r.ariaOnChange=function(e,t){r.setState({ariaSelection:(0,NO.Z)({value:e},t)})},r.onMenuMouseDown=function(e){0===e.button&&(e.stopPropagation(),e.preventDefault(),r.focusInput())},r.onMenuMouseMove=function(e){r.blockOptionHover=!1},r.onControlMouseDown=function(e){if(!e.defaultPrevented){var t=r.props.openMenuOnClick;r.state.isFocused?r.props.menuIsOpen?"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&r.onMenuClose():t&&r.openMenu("first"):(t&&(r.openAfterFocus=!0),r.focusInput()),"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&e.preventDefault()}},r.onDropdownIndicatorMouseDown=function(e){if(!(e&&"mousedown"===e.type&&0!==e.button||r.props.isDisabled)){var t=r.props,n=t.isMulti,o=t.menuIsOpen;r.focusInput(),o?(r.setState({inputIsHiddenAfterUpdate:!n}),r.onMenuClose()):r.openMenu("first"),e.preventDefault()}},r.onClearIndicatorMouseDown=function(e){e&&"mousedown"===e.type&&0!==e.button||(r.clearValue(),e.preventDefault(),r.openAfterFocus=!1,"touchend"===e.type?r.focusInput():setTimeout((function(){return r.focusInput()})))},r.onScroll=function(e){"boolean"==typeof r.props.closeMenuOnScroll?e.target instanceof HTMLElement&&(0,YO.H)(e.target)&&r.props.onMenuClose():"function"==typeof r.props.closeMenuOnScroll&&r.props.closeMenuOnScroll(e)&&r.props.onMenuClose()},r.onCompositionStart=function(){r.isComposing=!0},r.onCompositionEnd=function(){r.isComposing=!1},r.onTouchStart=function(e){var t=e.touches,n=t&&t.item(0);n&&(r.initialTouchX=n.clientX,r.initialTouchY=n.clientY,r.userIsDragging=!1)},r.onTouchMove=function(e){var t=e.touches,n=t&&t.item(0);if(n){var o=Math.abs(n.clientX-r.initialTouchX),i=Math.abs(n.clientY-r.initialTouchY);r.userIsDragging=o>5||i>5}},r.onTouchEnd=function(e){r.userIsDragging||(r.controlRef&&!r.controlRef.contains(e.target)&&r.menuListRef&&!r.menuListRef.contains(e.target)&&r.blurInput(),r.initialTouchX=0,r.initialTouchY=0)},r.onControlTouchEnd=function(e){r.userIsDragging||r.onControlMouseDown(e)},r.onClearIndicatorTouchEnd=function(e){r.userIsDragging||r.onClearIndicatorMouseDown(e)},r.onDropdownIndicatorTouchEnd=function(e){r.userIsDragging||r.onDropdownIndicatorMouseDown(e)},r.handleInputChange=function(e){var t=r.props.inputValue,n=e.currentTarget.value;r.setState({inputIsHiddenAfterUpdate:!1}),r.onInputChange(n,{action:"input-change",prevInputValue:t}),r.props.menuIsOpen||r.onMenuOpen()},r.onInputFocus=function(e){r.props.onFocus&&r.props.onFocus(e),r.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(r.openAfterFocus||r.props.openMenuOnFocus)&&r.openMenu("first"),r.openAfterFocus=!1},r.onInputBlur=function(e){var t=r.props.inputValue;r.menuListRef&&r.menuListRef.contains(document.activeElement)?r.inputRef.focus():(r.props.onBlur&&r.props.onBlur(e),r.onInputChange("",{action:"input-blur",prevInputValue:t}),r.onMenuClose(),r.setState({focusedValue:null,isFocused:!1}))},r.onOptionHover=function(e){r.blockOptionHover||r.state.focusedOption===e||r.setState({focusedOption:e})},r.shouldHideSelectedOptions=function(){return NC(r.props)},r.onKeyDown=function(e){var t=r.props,n=t.isMulti,o=t.backspaceRemovesValue,i=t.escapeClearsValue,a=t.inputValue,c=t.isClearable,s=t.isDisabled,u=t.menuIsOpen,l=t.onKeyDown,d=t.tabSelectsValue,f=t.openMenuOnFocus,p=r.state,h=p.focusedOption,m=p.focusedValue,g=p.selectValue;if(!(s||"function"==typeof l&&(l(e),e.defaultPrevented))){switch(r.blockOptionHover=!0,e.key){case"ArrowLeft":if(!n||a)return;r.focusValue("previous");break;case"ArrowRight":if(!n||a)return;r.focusValue("next");break;case"Delete":case"Backspace":if(a)return;if(m)r.removeValue(m);else{if(!o)return;n?r.popValue():c&&r.clearValue()}break;case"Tab":if(r.isComposing)return;if(e.shiftKey||!u||!d||!h||f&&r.isOptionSelected(h,g))return;r.selectOption(h);break;case"Enter":if(229===e.keyCode)break;if(u){if(!h)return;if(r.isComposing)return;r.selectOption(h);break}return;case"Escape":u?(r.setState({inputIsHiddenAfterUpdate:!1}),r.onInputChange("",{action:"menu-close",prevInputValue:a}),r.onMenuClose()):c&&i&&r.clearValue();break;case" ":if(a)return;if(!u){r.openMenu("first");break}if(!h)return;r.selectOption(h);break;case"ArrowUp":u?r.focusOption("up"):r.openMenu("last");break;case"ArrowDown":u?r.focusOption("down"):r.openMenu("first");break;case"PageUp":if(!u)return;r.focusOption("pageup");break;case"PageDown":if(!u)return;r.focusOption("pagedown");break;case"Home":if(!u)return;r.focusOption("first");break;case"End":if(!u)return;r.focusOption("last");break;default:return}e.preventDefault()}},r.instancePrefix="react-select-"+(r.props.instanceId||++BC),r.state.selectValue=(0,YO.I)(e.value),r}return(0,HO.Z)(n,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput()}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.isDisabled,r=t.menuIsOpen,o=this.state.isFocused;(o&&!n&&e.isDisabled||o&&r&&!e.menuIsOpen)&&this.focusInput(),o&&n&&!e.isDisabled?this.setState({isFocused:!1},this.onMenuClose):o||n||!e.isDisabled||this.inputRef!==document.activeElement||this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&((0,YO.J)(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(e,t){this.props.onInputChange(e,t)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(e){var t=this,n=this.state,r=n.selectValue,o=n.isFocused,i=this.buildFocusableOptions(),a="first"===e?0:i.length-1;if(!this.props.isMulti){var c=i.indexOf(r[0]);c>-1&&(a=c)}this.scrollToFocusedOptionOnUpdate=!(o&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:i[a]},(function(){return t.onMenuOpen()}))}},{key:"focusValue",value:function(e){var t=this.state,n=t.selectValue,r=t.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var o=n.indexOf(r);r||(o=-1);var i=n.length-1,a=-1;if(n.length){switch(e){case"previous":a=0===o?0:-1===o?i:o-1;break;case"next":o>-1&&o<i&&(a=o+1)}this.setState({inputIsHidden:-1!==a,focusedValue:n[a]})}}}},{key:"focusOption",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props.pageSize,n=this.state.focusedOption,r=this.getFocusableOptions();if(r.length){var o=0,i=r.indexOf(n);n||(i=-1),"up"===e?o=i>0?i-1:r.length-1:"down"===e?o=(i+1)%r.length:"pageup"===e?(o=i-t)<0&&(o=0):"pagedown"===e?(o=i+t)>r.length-1&&(o=r.length-1):"last"===e&&(o=r.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:r[o],focusedValue:null})}}},{key:"getTheme",value:function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(CC):(0,NO.Z)((0,NO.Z)({},CC),this.props.theme):CC}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.cx,n=this.getStyles,r=this.getValue,o=this.selectOption,i=this.setValue,a=this.props,c=a.isMulti,s=a.isRtl,u=a.options;return{clearValue:e,cx:t,getStyles:n,getValue:r,hasValue:this.hasValue(),isMulti:c,isRtl:s,options:u,selectOption:o,selectProps:a,setValue:i,theme:this.getTheme()}}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var e=this.props,t=e.isClearable,n=e.isMulti;return void 0===t?n:t}},{key:"isOptionDisabled",value:function(e,t){return RC(this.props,e,t)}},{key:"isOptionSelected",value:function(e,t){return IC(this.props,e,t)}},{key:"filterOption",value:function(e,t){return MC(this.props,e,t)}},{key:"formatOptionLabel",value:function(e,t){if("function"==typeof this.props.formatOptionLabel){var n=this.props.inputValue,r=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:r})}return this.getOptionLabel(e)}},{key:"formatGroupLabel",value:function(e){return this.props.formatGroupLabel(e)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var e=this.props,t=e.isDisabled,n=e.isSearchable,r=e.inputId,o=e.inputValue,i=e.tabIndex,a=e.form,c=e.menuIsOpen,s=this.getComponents().Input,u=this.state,l=u.inputIsHidden,d=u.ariaSelection,f=this.commonProps,p=r||this.getElementId("input"),h=(0,NO.Z)((0,NO.Z)((0,NO.Z)({"aria-autocomplete":"list","aria-expanded":c,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],role:"combobox"},c&&{"aria-controls":this.getElementId("listbox"),"aria-owns":this.getElementId("listbox")}),!n&&{"aria-readonly":!0}),this.hasValue()?"initial-input-focus"===(null==d?void 0:d.action)&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return n?R.createElement(s,(0,FO.Z)({},f,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:p,innerRef:this.getInputRef,isDisabled:t,isHidden:l,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:i,form:a,type:"text",value:o},h)):R.createElement(dC,(0,FO.Z)({id:p,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:YO.K,onFocus:this.onInputFocus,disabled:t,tabIndex:i,inputMode:"none",form:a,value:""},h))}},{key:"renderPlaceholderOrValue",value:function(){var e=this,t=this.getComponents(),n=t.MultiValue,r=t.MultiValueContainer,o=t.MultiValueLabel,i=t.MultiValueRemove,a=t.SingleValue,c=t.Placeholder,s=this.commonProps,u=this.props,l=u.controlShouldRenderValue,d=u.isDisabled,f=u.isMulti,p=u.inputValue,h=u.placeholder,m=this.state,g=m.selectValue,v=m.focusedValue,y=m.isFocused;if(!this.hasValue()||!l)return p?null:R.createElement(c,(0,FO.Z)({},s,{key:"placeholder",isDisabled:d,isFocused:y,innerProps:{id:this.getElementId("placeholder")}}),h);if(f)return g.map((function(t,a){var c=t===v,u="".concat(e.getOptionLabel(t),"-").concat(e.getOptionValue(t));return R.createElement(n,(0,FO.Z)({},s,{components:{Container:r,Label:o,Remove:i},isFocused:c,isDisabled:d,key:u,index:a,removeProps:{onClick:function(){return e.removeValue(t)},onTouchEnd:function(){return e.removeValue(t)},onMouseDown:function(e){e.preventDefault()}},data:t}),e.formatOptionLabel(t,"value"))}));if(p)return null;var b=g[0];return R.createElement(a,(0,FO.Z)({},s,{data:b,isDisabled:d}),this.formatOptionLabel(b,"value"))}},{key:"renderClearIndicator",value:function(){var e=this.getComponents().ClearIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,o=n.isLoading,i=this.state.isFocused;if(!this.isClearable()||!e||r||!this.hasValue()||o)return null;var a={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return R.createElement(e,(0,FO.Z)({},t,{innerProps:a,isFocused:i}))}},{key:"renderLoadingIndicator",value:function(){var e=this.getComponents().LoadingIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,o=n.isLoading,i=this.state.isFocused;if(!e||!o)return null;return R.createElement(e,(0,FO.Z)({},t,{innerProps:{"aria-hidden":"true"},isDisabled:r,isFocused:i}))}},{key:"renderIndicatorSeparator",value:function(){var e=this.getComponents(),t=e.DropdownIndicator,n=e.IndicatorSeparator;if(!t||!n)return null;var r=this.commonProps,o=this.props.isDisabled,i=this.state.isFocused;return R.createElement(n,(0,FO.Z)({},r,{isDisabled:o,isFocused:i}))}},{key:"renderDropdownIndicator",value:function(){var e=this.getComponents().DropdownIndicator;if(!e)return null;var t=this.commonProps,n=this.props.isDisabled,r=this.state.isFocused,o={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return R.createElement(e,(0,FO.Z)({},t,{innerProps:o,isDisabled:n,isFocused:r}))}},{key:"renderMenu",value:function(){var e=this,t=this.getComponents(),n=t.Group,r=t.GroupHeading,o=t.Menu,i=t.MenuList,a=t.MenuPortal,c=t.LoadingMessage,s=t.NoOptionsMessage,u=t.Option,l=this.commonProps,d=this.state.focusedOption,f=this.props,p=f.captureMenuScroll,h=f.inputValue,m=f.isLoading,g=f.loadingMessage,v=f.minMenuHeight,y=f.maxMenuHeight,b=f.menuIsOpen,w=f.menuPlacement,A=f.menuPosition,x=f.menuPortalTarget,E=f.menuShouldBlockScroll,O=f.menuShouldScrollIntoView,C=f.noOptionsMessage,k=f.onMenuScrollToTop,S=f.onMenuScrollToBottom;if(!b)return null;var D,P=function(t,n){var r=t.type,o=t.data,i=t.isDisabled,a=t.isSelected,c=t.label,s=t.value,f=d===o,p=i?void 0:function(){return e.onOptionHover(o)},h=i?void 0:function(){return e.selectOption(o)},m="".concat(e.getElementId("option"),"-").concat(n),g={id:m,onClick:h,onMouseMove:p,onMouseOver:p,tabIndex:-1};return R.createElement(u,(0,FO.Z)({},l,{innerProps:g,data:o,isDisabled:i,isSelected:a,key:m,label:c,type:r,value:s,isFocused:f,innerRef:f?e.getFocusedOptionRef:void 0}),e.formatOptionLabel(t.data,"menu"))};if(this.hasOptions())D=this.getCategorizedOptions().map((function(t){if("group"===t.type){var o=t.data,i=t.options,a=t.index,c="".concat(e.getElementId("group"),"-").concat(a),s="".concat(c,"-heading");return R.createElement(n,(0,FO.Z)({},l,{key:c,data:o,options:i,Heading:r,headingProps:{id:s,data:t.data},label:e.formatGroupLabel(t.data)}),t.options.map((function(e){return P(e,"".concat(a,"-").concat(e.index))})))}if("option"===t.type)return P(t,"".concat(t.index))}));else if(m){var _=g({inputValue:h});if(null===_)return null;D=R.createElement(c,l,_)}else{var j=C({inputValue:h});if(null===j)return null;D=R.createElement(s,l,j)}var T={minMenuHeight:v,maxMenuHeight:y,menuPlacement:w,menuPosition:A,menuShouldScrollIntoView:O},I=R.createElement(YO.M,(0,FO.Z)({},l,T),(function(t){var n=t.ref,r=t.placerProps,a=r.placement,c=r.maxHeight;return R.createElement(o,(0,FO.Z)({},l,T,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove,id:e.getElementId("listbox")},isLoading:m,placement:a}),R.createElement(EC,{captureEnabled:p,onTopArrive:k,onBottomArrive:S,lockEnabled:E},(function(t){return R.createElement(i,(0,FO.Z)({},l,{innerRef:function(n){e.getMenuListRef(n),t(n)},isLoading:m,maxHeight:c,focusedOption:d}),D)})))}));return x||"fixed"===A?R.createElement(a,(0,FO.Z)({},l,{appendTo:x,controlElement:this.controlRef,menuPlacement:w,menuPosition:A}),I):I}},{key:"renderFormField",value:function(){var e=this,t=this.props,n=t.delimiter,r=t.isDisabled,o=t.isMulti,i=t.name,a=this.state.selectValue;if(i&&!r){if(o){if(n){var c=a.map((function(t){return e.getOptionValue(t)})).join(n);return R.createElement("input",{name:i,type:"hidden",value:c})}var s=a.length>0?a.map((function(t,n){return R.createElement("input",{key:"i-".concat(n),name:i,type:"hidden",value:e.getOptionValue(t)})})):R.createElement("input",{name:i,type:"hidden"});return R.createElement("div",null,s)}var u=a[0]?this.getOptionValue(a[0]):"";return R.createElement("input",{name:i,type:"hidden",value:u})}}},{key:"renderLiveRegion",value:function(){var e=this.commonProps,t=this.state,n=t.ariaSelection,r=t.focusedOption,o=t.focusedValue,i=t.isFocused,a=t.selectValue,c=this.getFocusableOptions();return R.createElement(JO,(0,FO.Z)({},e,{id:this.getElementId("live-region"),ariaSelection:n,focusedOption:r,focusedValue:o,isFocused:i,selectValue:a,focusableOptions:c}))}},{key:"render",value:function(){var e=this.getComponents(),t=e.Control,n=e.IndicatorsContainer,r=e.SelectContainer,o=e.ValueContainer,i=this.props,a=i.className,c=i.id,s=i.isDisabled,u=i.menuIsOpen,l=this.state.isFocused,d=this.commonProps=this.getCommonProps();return R.createElement(r,(0,FO.Z)({},d,{className:a,innerProps:{id:c,onKeyDown:this.onKeyDown},isDisabled:s,isFocused:l}),this.renderLiveRegion(),R.createElement(t,(0,FO.Z)({},d,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:s,isFocused:l,menuIsOpen:u}),R.createElement(o,(0,FO.Z)({},d,{isDisabled:s}),this.renderPlaceholderOrValue(),this.renderInput()),R.createElement(n,(0,FO.Z)({},d,{isDisabled:s}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.prevProps,r=t.clearFocusValueOnUpdate,o=t.inputIsHiddenAfterUpdate,i=t.ariaSelection,a=t.isFocused,c=t.prevWasFocused,s=e.options,u=e.value,l=e.menuIsOpen,d=e.inputValue,f=e.isMulti,p=(0,YO.I)(u),h={};if(n&&(u!==n.value||s!==n.options||l!==n.menuIsOpen||d!==n.inputValue)){var m=l?function(e,t){return PC(DC(e,t))}(e,p):[],g=r?function(e,t){var n=e.focusedValue,r=e.selectValue.indexOf(n);if(r>-1){if(t.indexOf(n)>-1)return n;if(r<t.length)return t[r]}return null}(t,p):null,v=function(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}(t,m);h={selectValue:p,focusedOption:v,focusedValue:g,clearFocusValueOnUpdate:!1}}var y=null!=o&&e!==n?{inputIsHidden:o,inputIsHiddenAfterUpdate:void 0}:{},b=i,w=a&&c;return a&&!w&&(b={value:(0,YO.D)(f,p,p[0]||null),options:p,action:"initial-input-focus"},w=!c),"initial-input-focus"===(null==i?void 0:i.action)&&(b=null),(0,NO.Z)((0,NO.Z)((0,NO.Z)({},h),y),{},{prevProps:e,ariaSelection:b,prevWasFocused:w})}}]),n}(R.Component);ZC.defaultProps=kC;Math.abs,String.fromCharCode;a(6919);var FC=(0,R.forwardRef)((function(e,t){var n=function(e){var t=e.defaultInputValue,n=void 0===t?"":t,r=e.defaultMenuIsOpen,o=void 0!==r&&r,i=e.defaultValue,a=void 0===i?null:i,c=e.inputValue,s=e.menuIsOpen,u=e.onChange,l=e.onInputChange,d=e.onMenuClose,f=e.onMenuOpen,p=e.value,h=(0,BO.Z)(e,ZO),m=(0,R.useState)(void 0!==c?c:n),g=(0,wd.Z)(m,2),v=g[0],y=g[1],b=(0,R.useState)(void 0!==s?s:o),w=(0,wd.Z)(b,2),A=w[0],x=w[1],E=(0,R.useState)(void 0!==p?p:a),O=(0,wd.Z)(E,2),C=O[0],k=O[1],S=(0,R.useCallback)((function(e,t){"function"==typeof u&&u(e,t),k(e)}),[u]),D=(0,R.useCallback)((function(e,t){var n;"function"==typeof l&&(n=l(e,t)),y(void 0!==n?n:e)}),[l]),P=(0,R.useCallback)((function(){"function"==typeof f&&f(),x(!0)}),[f]),_=(0,R.useCallback)((function(){"function"==typeof d&&d(),x(!1)}),[d]),j=void 0!==c?c:v,T=void 0!==s?s:A,I=void 0!==p?p:C;return(0,NO.Z)((0,NO.Z)({},h),{},{inputValue:j,menuIsOpen:T,onChange:S,onInputChange:D,onMenuClose:_,onMenuOpen:P,value:I})}(e);return R.createElement(ZC,(0,FO.Z)({ref:t},n))}));const LC=FC;function HC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function UC(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?HC(Object(n),!0).forEach((function(t){(0,Iv.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):HC(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const zC=(0,P.ZP)((function(e){var t;return(0,S.jsx)("span",UC(UC({},e.innerProps),{},{children:(0,S.jsx)(_O.Z,{icon:"times",tabIndex:-1,"aria-label":(t="client.component.select.clearFieldLabel",e.intl.formatMessage({id:t}))})}))}));var WC=a(87186);function VC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function YC(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?VC(Object(n),!0).forEach((function(t){(0,Iv.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):VC(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const qC=function(e){var t=e.selectProps,n=t.isDisabled,r=t.menuIsOpen;return n?null:(0,S.jsx)(YO.c.DropdownIndicator,YC(YC({},e),{},{children:(0,S.jsxs)(WC.M6,{children:[(0,S.jsx)(WC.A,{icon:"chevron-down",visible:!r,tabIndex:-1}),(0,S.jsx)(WC.A,{icon:"chevron-up",visible:r,tabIndex:-1})]})}))};var GC,QC,XC;function KC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function $C(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?KC(Object(n),!0).forEach((function(t){(0,Iv.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):KC(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var JC=function(e,t,n){return function(r){r.stopPropagation(),e(t,n)}},ek=function(e,t){return function(n){n.stopPropagation(),e(t)}},tk=function(e,t){return function(n){n.stopPropagation(),e(t)}},nk=function(e){e.stopPropagation()};const rk=function(e){var t=e.selectProps,n=t.openDocsTreeSearch,r=t.openAdvancedSearch,o=t.openRemoteCreate,i=t.isDisabled,a=t.hasDocsTreeSearch,c=t.hasAdvancedSearch,s=t.createPermission,u=t.value,l=t.isMulti,d=t.inputValue,f=l&&(c||a);return(0,S.jsx)(WC.HO,{isTopAligned:f,children:(0,S.jsxs)(YO.c.IndicatorsContainer,$C($C({},e),{},{children:[e.children,n&&!i&&(0,S.jsx)("span",{onTouchEnd:nk,onMouseDown:ek(n,u),children:GC||(GC=(0,S.jsx)(_O.Z,{icon:"folder",tabIndex:-1}))}),r&&!i&&(0,S.jsx)("span",{onTouchEnd:nk,onMouseDown:JC(r,d,u),children:QC||(QC=(0,S.jsx)(_O.Z,{icon:"search",tabIndex:-1}))}),s&&!i&&(0,S.jsx)("span",{onTouchEnd:nk,onMouseDown:tk(o,u),children:XC||(XC=(0,S.jsx)(_O.Z,{icon:"plus",tabIndex:-1}))})]}))})};var ok,ik=a(93235);const ak=function(){return ok||(ok=(0,S.jsx)("span",{children:(0,S.jsx)(ik.Z,{size:"1.8rem"})}))};function ck(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function sk(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ck(Object(n),!0).forEach((function(t){(0,Iv.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ck(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const uk=function(e){var t=e.selectProps,n=e.children;return(0,S.jsx)(WC._M,{attachment:"top left",targetAttachment:"bottom left",constraints:[{to:"window",attachment:"together"}],renderTarget:function(e){return(0,S.jsx)("div",{ref:e})},renderElement:function(r){return(0,S.jsx)("div",{ref:r,children:(0,S.jsx)(WC.l2,sk(sk({},Rv()(e,["innerRef"])),{},{wrapperWidth:t.wrapperWidth,wrapperHeight:t.wrapperHeight,children:n}))})}})};function lk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function dk(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?lk(Object(n),!0).forEach((function(t){(0,Iv.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lk(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const fk=function(e){var t=e.selectProps,n=e.children,r=e.theme,o=t.moreOptionsAvailable,i=t.moreOptionsAvailableText;return(0,S.jsxs)(YO.c.MenuList,dk(dk({},e),{},{className:"MenuList",children:[n,o&&(0,S.jsx)(WC.OA,{reactSelectTheme:r,children:i})]}))};var pk,hk=a(10535);const mk=b.ZP.span(pk||(pk=(0,v.Z)(["\n pointer-events: auto;\n cursor: pointer;\n"])));function gk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function vk(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?gk(Object(n),!0).forEach((function(t){(0,Iv.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gk(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const yk=function(e){var t=e.data,n=e.innerProps,r=e.children,o=e.selectProps,i=o.tooltips,a=o.loadTooltip,c=o.DetailLink,s=nf()(i,t.key,null),u=(0,S.jsx)("span",vk(vk({},n),{},{children:r})),l=c?(0,S.jsx)(mk,{onMouseDown:function(e){e.stopPropagation(),e.preventDefault()},children:(0,S.jsx)(c,{entityKey:t.key,children:(0,S.jsx)(rl.Z,{content:s?(0,S.jsx)("div",{dangerouslySetInnerHTML:{__html:hk.Z.sanitizeHtml(s)}}):null,children:(0,S.jsx)("span",{onMouseOver:function(){return a&&!s&&a(t.key)},children:u})})})}):u;return(0,S.jsx)(WC.B1,{children:l})};var bk=a(47037),wk=a.n(bk),Ak=a(14176),xk=a.n(Ak);function Ek(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ok(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ek(Object(n),!0).forEach((function(t){(0,Iv.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ek(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ck=["linkComp"],kk=function(e,t){var n=UE.Z.difference(e,t),r=xk()(Rv()(n,Ck),(function(e){return 0===Object.keys(e).length}));return 0===Object.entries(r).length},Sk=(0,R.memo)((function(e){var t=e.linkComp,n=e.entityKey,r=e.children;return t&&wk()(n)?(0,S.jsx)(mk,{onMouseDown:function(e){e.stopPropagation(),e.preventDefault()},children:(0,S.jsx)(t,{entityKey:n,children:r})}):r}),kk);Sk.propTypes={children:md().node,entityKey:md().any,linkComp:md().func};const Dk=function(e){var t=e.data,n=e.selectProps,r=e.isDisabled,o=e.children,i=n.tooltips,a=n.loadTooltip,c=n.DetailLink,s=nf()(i,t.key,null);return(0,S.jsx)(YO.c.SingleValue,Ok(Ok({},e),{},{children:(0,S.jsx)(WC.xq,{onMouseOver:function(){return a&&!s&&a(t.key)},isDisabled:r,children:(0,S.jsx)(rl.Z,{content:s?(0,S.jsx)("div",{dangerouslySetInnerHTML:{__html:hk.Z.sanitizeHtml(s)}}):null,children:(0,S.jsx)(Sk,{linkComp:c,entityKey:t.key,children:o})})})}))};function Pk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var _k=function(e){var t;return"Input"===(null==e||null===(t=e.type)||void 0===t?void 0:t.name)};const jk=function(e){var t=e.selectProps,n=e.hasValue,r=e.children,o=t.isMulti,i=t.hasAdvancedSearch,a=t.hasDocsTreeSearch,c=t.isDisabled;if(!(o&&(i||a)))return(0,S.jsx)(YO.c.ValueContainer,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Pk(Object(n),!0).forEach((function(t){(0,Iv.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Pk(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e));var s=R.Children.map(r,(function(e){return _k(e)?e:null})),u=R.Children.map(r,(function(e){return _k(e)?null:e})),l=c&&n;return(0,S.jsxs)(S.Fragment,{children:[!l&&(0,S.jsx)(S.Fragment,{children:s}),(0,S.jsx)(WC.eQ,{children:u})]})};function Tk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Rk(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Tk(Object(n),!0).forEach((function(t){(0,Iv.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Tk(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const Ik=(0,b.Zz)((function(e){var t=e.fetchOptions,n=e.id,r=e.immutable,o=e.isLoading,i=e.isMulti,a=e.loadTooltip,c=e.moreOptionsAvailable,s=e.moreOptionsAvailableText,u=e.noResultsText,l=e.onChange,d=e.openDocsTreeSearch,f=e.openAdvancedSearch,p=e.options,h=e.searchOptions,m=e.theme,g=e.tooltips,v=e.value,y=e.DetailLink,b=e.createPermission,w=e.openRemoteCreate,A=(0,R.useRef)(null),x=(0,R.useRef)(null),E=function(){var e;return(null===(e=x.current)||void 0===e?void 0:e.clientWidth)||300},O=function(){var e;return(null===(e=x.current)||void 0===e?void 0:e.clientHeight)||35},C=(0,R.useState)(E()),k=(0,wd.Z)(C,2),D=k[0],P=k[1],_=(0,R.useState)(O()),j=(0,wd.Z)(_,2),T=j[0],I=j[1],M=function(e){t&&t(e)},N=(0,R.useCallback)(h||function(){},[]),B=(0,R.useCallback)(MO()(N,800,{trailing:!0}),[]),Z=Boolean(f),F=Boolean(d),L=Boolean(b);return(0,S.jsx)(WC.sP,{tabIndex:"-1",id:n,onFocus:function(){A.current.focus(),setTimeout((function(){P(E()),I(O())}),0)},children:(0,S.jsx)(WC.RU,{ref:x,children:(0,S.jsx)(LC,Rk(Rk({getOptionLabel:function(e){return e.display},getOptionValue:function(e){return e.key},wrapperWidth:D,wrapperHeight:T,components:{ClearIndicator:zC,LoadingIndicator:ak,DropdownIndicator:qC,IndicatorsContainer:rk,IndicatorSeparator:null,Menu:uk,MenuList:fk,MultiValueLabel:yk,SingleValue:Dk,ValueContainer:jk},noOptionsMessage:function(){return u||" - "},isMulti:i,closeMenuOnSelect:!i,isSearchable:!0},h?{filterOption:function(){return!0}}:{}),{},{isClearable:!0,loadingMessage:function(){return null},placeholder:"",menuShouldScrollIntoView:!1,autoFocus:!1,value:v||null,onChange:function(e){l(e),M(e)},onInputChange:function(e,t){var n=t.action;h&&e&&B(e,v),""===e&&"input-change"===n&&M(v)},options:(0,RO.Z)(p||[]),isLoading:o,isDisabled:r,ref:A,onMenuOpen:function(){M(v)},styles:(0,WC.i4)(m),theme:function(e){return(0,WC.$p)(e,m)},loadTooltip:a,tooltips:g,DetailLink:y,hasDocsTreeSearch:F,openDocsTreeSearch:d,hasAdvancedSearch:Z,openAdvancedSearch:f,moreOptionsAvailable:c,moreOptionsAvailableText:s,blurInputOnSelect:!1,hasCreatePermission:L,createPermission:b,openRemoteCreate:w,closeMenuOnScroll:function(e){var t;return!(null!==(t=e.target.classList)&&void 0!==t&&t.contains("MenuList"))}}))})})}));const Mk=function(e){var t=e.id,n=e.immutable,r=e.value,o=e.options,i=o.trueLabel,a=o.falseLabel,c=e.onChange;return(0,S.jsx)(Ik,{id:t,immutable:n,isMulti:!1,onChange:function(e){return c(e?e.key:null)},value:XA()(r)?r:{key:r,display:r?i:a},openMenuOnClick:!0,options:[{key:!0,display:i},{key:!1,display:a}]})};var Nk,Bk=b.ZP.div.withConfig({displayName:"StyledBoolEdit"})(Nk||(Nk=(0,v.Z)(["\n margin: 5px 0;\n"])));const Zk=function(e){return(0,S.jsx)(Bk,{children:(0,S.jsx)("input",{type:"checkbox",checked:e.value||!1,name:e.name,onChange:function(t){e.onChange&&e.onChange(t.target.checked)},id:e.id,disabled:e.immutable})})};var Fk=a(23279),Lk=a.n(Fk);function Hk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Uk(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Hk(Object(n),!0).forEach((function(t){(0,Iv.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Hk(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var zk=(0,R.lazy)((function(){return Promise.all([a.e(414),a.e(85)]).then(a.bind(a,30919))}));const Wk=function(e){return(0,S.jsx)(R.Suspense,{fallback:(t=e.value,(0,S.jsx)("div",{children:(0,S.jsx)("p",{children:t})})),children:(0,S.jsx)(zk,Uk({},e))});var t};var Vk,Yk=b.ZP.div.withConfig({displayName:"EditorWrapper"})(Vk||(Vk=(0,v.Z)(["\n margin-top: 5px;\n"])));const qk=function(e){var t=e.value,n=e.onChange,r=e.immutable,o=e.options;return(0,S.jsx)(Yk,{children:(0,S.jsx)(Wk,{value:t,onChange:Lk()(n,1e3),mode:o.mode,theme:"textmate",showGutter:!0,editorOptions:{enableBasicAutocompletion:!0,enableLiveAutocompletion:!0,enableSnippets:!0,minLines:5,maxLines:50,readOnly:r,wrap:!0,indentedSoftWrap:!1},implicitModel:o.implicitModel})})};var Gk,Qk,Xk,Kk,$k,Jk,eS,tS,nS,rS=a(86896),oS=(0,b.iv)(Gk||(Gk=(0,v.Z)(["\n align-items: center;\n cursor: ",";\n display: flex;\n"])),(function(e){return e.immutable?"not-allowed":"default"})),iS=b.ZP.label.withConfig({displayName:"StyledEditableWrapper"})(Qk||(Qk=(0,v.Z)(["\n &&& {\n margin: 0; /* reset Bootstrap and Ext JS */\n padding: 0; /* reset Ext JS */\n ","\n }\n"])),oS),aS=(0,b.iv)(Xk||(Xk=(0,v.Z)(["\n background-color: transparent;\n border: 0;\n cursor: ",";\n flex-grow: 1;\n min-height: 2.6rem;\n min-width: 0;\n outline: 0;\n padding: 0;\n ","\n &::-ms-clear {\n display: none;\n }\n\n &::-webkit-clear-button {\n display: none;\n }\n\n &::-webkit-inner-spin-button {\n display: none;\n }\n\n &[type='number'] {\n appearance: textfield;\n }\n\n &[type='search'] {\n appearance: none;\n }\n\n &:disabled {\n -webkit-text-fill-color: ","; // Safari fix\n opacity: 1; // iOS fix\n }\n\n /* remove indicators */\n &[type='date'],\n &[type='datetime-local'],\n &[type='month'],\n &[type='time'],\n &[type='week'] {\n appearance: none;\n display: flex;\n\n /* reset margin on smaller screens */\n ::-webkit-date-and-time-value {\n ","\n }\n }\n\n // allow pointer event only on touch devices\n @media (pointer: coarse) {\n pointer-events: ",";\n }\n"])),(function(e){return e.immutable?"not-allowed":"default"}),(function(){return(0,A.Z)({color:Jm.Z.color("text")})}),Jm.Z.color("text"),(function(e){return e.immutable&&"margin: unset;"}),(function(e){return e.immutable?"none":"auto"})),cS=(0,b.iv)(Kk||(Kk=(0,v.Z)(["\n display: flex;\n align-items: center;\n"]))),sS=b.ZP.div.withConfig({displayName:"StyledEditableControl"})($k||($k=(0,v.Z)(["\n &&& {\n ","\n }\n"])),cS),uS=b.ZP.span.withConfig({displayName:"StyledEditableValue"})(Jk||(Jk=(0,v.Z)(["\n width: 100%;\n\n && {\n //url\n [type='url'] + .input-group-addon > a {\n color: inherit; // reset bootstrap default\n }\n\n //url\n [type='tel'] + .input-group-addon > a {\n color: inherit; // reset bootstrap default\n }\n\n //date\n .date-edit {\n .input-group-addon {\n cursor: pointer;\n }\n\n input {\n z-index: 0;\n }\n\n &.disabled {\n input {\n cursor: not-allowed;\n }\n }\n\n .right-addon {\n position: relative;\n }\n\n .right-addon input {\n padding-right: 30px;\n }\n\n .reset {\n position: absolute;\n padding-right: 10px;\n padding-top: 5px;\n right: 0;\n color: #999;\n font-size: 18px;\n font-style: normal;\n cursor: pointer;\n }\n\n .reset:hover {\n color: ",";\n }\n }\n }\n"])),Jm.Z.color("signal.danger.text")),lS=b.ZP.div.withConfig({displayName:"StyledDatePickerOuterWrapper"})(eS||(eS=(0,v.Z)(["\n outline: ",";\n"])),(function(e){return e.immutable?0:"initial"})),dS=b.ZP.div.withConfig({displayName:"StyledDatePickerWrapper"})(tS||(tS=(0,v.Z)(["\n && {\n ","\n\n & .react-datepicker__input-container {\n & input {\n ","\n width: calc(100% - 5px);\n }\n }\n\n & .react-datepicker {\n & .react-datepicker__today-button {\n ","\n }\n }\n }\n"])),oS,aS,(function(e){return e.hasTime&&"border-bottom: 1px solid #aeaeae;"})),fS=b.ZP.input.withConfig({displayName:"StyledTimeInput"})(nS||(nS=(0,v.Z)(["\n ","\n border: none;\n outline: none;\n min-height: 2.6rem;\n"])),(0,A.Z)()),pS=a(80877),hS=a(31712),mS=a(83167),gS=a(65809),vS=a(94712),yS=a(38466),bS=a(75502),wS="react-datepicker-time__input",AS="react-datepicker__day",xS="react-datepicker__input",ES=function(e){return e.classList.contains(AS)},OS=function(e){return e.classList.contains(wS)},CS=function(e){return e.classList.contains(xS)},kS=function(e,t){var n=t.hour,r=void 0===n?0:n,o=t.minute,i=void 0===o?0:o,a=t.second,c=void 0===a?0:a;return(0,pS.default)((0,hS.default)((0,mS.default)(e,c),i),r)},SS=function(e){setTimeout((function(){if(e){var t=e.querySelector(".".concat(AS,'[tabindex="0"]'));t&&t.focus({preventScroll:!0})}}),0)},DS=function(e){setTimeout((function(){e&&e.focus({preventScroll:!0})}),0)},PS=function(e){var t=(0,Dd.default)(e);return isNaN(t)?null:t},_S=function(e){return e?e.toISOString():null};const jS=function(e,t,n){var r=n.minDate,o=n.maxDate,i=n.hasTime,a=n.valueToDate,c=void 0===a?PS:a,s=n.dateToValue,u=void 0===s?_S:s,l=(0,R.useRef)(null),d=(0,R.useState)(!1),f=(0,wd.Z)(d,2),p=f[0],h=f[1],m=c(e),g=r?c(r):void 0,v=o?c(o):void 0;(0,R.useEffect)((function(){l.current&&"function"==typeof l.current.setOpen&&l.current.setOpen(p)}),[p]);var y=function(){return h(!1)},b=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(l.current&&"function"==typeof l.current.getPreSelection){var t,n=e?l.current.getPreSelection():null;return(null===(t=l.current.state)||void 0===t?void 0:t.preSelection)||n}return null},w=function(e){l.current&&"function"==typeof l.current.setPreSelection&&l.current.setPreSelection(e)},A=function(){t(null),w(null)},x=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=b(!1);if(n){var r=m||new Date,o=t?kS(n,{hour:(0,gS.default)(r),minute:(0,vS.default)(r),second:(0,yS.default)(r)}):n;E(o,e)}},E=function(n,r){if(n){var o=!e&&n,a=(0,bS.default)(n),c=(0,gS.default)(n)!==(0,gS.default)(a)||(0,vS.default)(n)!==(0,vS.default)(a);o&&i&&!c&&(n=ad.Z.setCurrentTime(n)),t(u(n))}else A();var s;i||"click"!==(null==r?void 0:r.type)||(y(),DS(null===(s=l.current)||void 0===s?void 0:s.input))},O=function(e){if("Tab"===e.key)if(e.shiftKey)if(CS(e.target))y();else if(OS(e.target)){var t,n;w(m||b(!0)),SS(null===(t=l.current)||void 0===t||null===(n=t.calendar)||void 0===n?void 0:n.componentNode)}else ES(e.target)&&y();else if(CS(e.target)&&p)x(e),y();else if(OS(e.target))y();else if(ES(e.target)){var r,o;if(i)x(e,!0),w(null),a=null===(r=l.current)||void 0===r||null===(o=r.calendar)||void 0===o?void 0:o.componentNode,setTimeout((function(){if(a){var e=a.querySelector("input.".concat(wS));e&&e.focus({preventScroll:!0})}}),0);else x(e),y()}var a,c;"Enter"===e.key&&(y(),e.preventDefault(),e.stopPropagation(),DS(null===(c=l.current)||void 0===c?void 0:c.input));if(["ArrowDown","ArrowUp","Enter"].includes(e.key))if(p){if(p&&null===b(!1)){var s,u;w(m||b(!0)),SS(null===(s=l.current)||void 0===s||null===(u=s.calendar)||void 0===u?void 0:u.componentNode)}}else h(!0),e.key="Handled".concat(e.key)},C=function(){var e;h((function(e){return!e})),w(null),DS(null===(e=l.current)||void 0===e?void 0:e.input)};return{reactDatePickerProps:{closeOnScroll:function(){return y(),!0},onClickOutside:y,onInputClick:C,onKeyDown:O,onChange:E,onCalendarOpen:function(){w(null)},preventOpenOnFocus:!0,enableTabLoop:!1,shouldCloseOnSelect:!1,open:p,selected:m,showTimeInput:i,minDate:g,maxDate:v,ref:l,className:xS},timeInputProps:{onKeyDown:O,className:wS},clearButtonProps:{onMouseDown:function(e){e.preventDefault(),A()}},calendarButtonProps:{onClick:C,className:p?"react-datepicker-ignore-onclickoutside":""}}};var TS=a(81084),RS=a(4284),IS=a(50946);function MS(e,t,n){return(0,IS.Z)(2,arguments),(0,RS.default)((0,TS.default)(e,t,new Date,n))}var NS=a(95395),BS="HH:mm:ss",ZS="HH:mm",FS=function(e){return MS(e,ZS)},LS=function(e){var t=function(e){return MS(e,BS)?(0,TS.default)(e,BS,new Date):MS(e,ZS)?(0,TS.default)(e,ZS,new Date):MS(e,"HH:")?(0,TS.default)(e,"HH:",new Date):MS(e,"H")?(0,TS.default)(e,"H",new Date):null}(e);return t&&!isNaN(t)?function(e){return(0,NS.default)(e,ZS)}(t):""};const HS=function(e,t){var n=LS(e),r=(0,R.useState)(n),o=(0,wd.Z)(r,2),i=o[0],a=o[1],c=(0,R.useRef)(i),s=H.Z.usePrevious(n);(0,R.useEffect)((function(){s!==n&&i===s&&a(n)}),[n,i,s]);var u={onChange:function(e){if(e.target.value!==i&&function(e){return/^(\d{0,2}|\d{1,2}:\d{0,2})$/.test(e)}(e.target.value)){var n=function(e,t){return e&&t?2!==e.length||3===t.length||e.includes(":")?e.length+1===t.length&&t.indexOf(":")===t.length-1?e.slice(0,-1):e:"".concat(e,":"):e}(e.target.value,c.current),r=n.indexOf(":"),o=n.substring(0,r),s=n.substring(r+1),u=parseInt(o,10),l=parseInt(s,10),d=!o||!Number.isNaN(u)&&u<24,f=!s||!Number.isNaN(l)&&l<60;if(!d||!f)return!1;c.current=n,a(n),n&&!FS(n)||t(n)}},onBlur:function(){if(i!==n){var e=LS(i);e&&FS(e)?(c.current=e,a(e),t(e)):a(n)}},onFocus:function(e){i&&"function"==typeof e.target.select&&e.target.select()},value:i||""};return{inputProps:u,clearButtonProps:{onClick:function(){t(""),a("")}}}};var US=["value","onChange","onKeyDown"];function zS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function WS(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?zS(Object(n),!0).forEach((function(t){(0,Iv.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zS(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}Pd();var VS=function(e){var t=e.onChange,n=e.label;return(0,S.jsx)(pd.Z,{onMouseDown:function(e){e.preventDefault(),t(null)},tabIndex:-1,children:n})},YS=function(e){var t=e.value,n=e.onChange,r=e.onKeyDown,o=(0,BO.Z)(e,US),i=HS(t,(function(e){n&&n(e||"00:00")})).inputProps;return(0,S.jsx)(fS,WS(WS(WS({},i),o),{},{type:"text",onKeyDown:r,onClick:function(e){e.target.focus()}}))},qS={strategy:"fixed"};const GS=(0,b.Zz)((0,P.ZP)((function(e){var t=e.immutable,n=e.id,r=e.value,o=e.minDate,i=e.maxDate,a=e.valueToDate,c=e.dateToValue,s=e.onChange,u=e.intl,l=e.placeholder,d=e.hasTime,f=e.dateFormat,p=e.events,h=(0,R.useRef)(void 0),m=u.locale,g=function(e){return u.formatMessage({id:e})},v=(0,R.useRef)(null),y=Boolean(r),b=!t&&y,w=function(e){h.current=e,s(e)},A=jS(r,w,{minDate:o,maxDate:i,valueToDate:a,dateToValue:c,hasTime:d}),x=A.reactDatePickerProps,E=A.timeInputProps,O=A.clearButtonProps,C=A.calendarButtonProps;return(0,S.jsx)(lS,{immutable:t,id:n,tabIndex:"-1",children:(0,S.jsxs)(dS,{immutable:t,ref:v,hasTime:d,onBlur:function(e){if("function"==typeof(null==p?void 0:p.onBlur)){var t=void 0!==h.current?h.current:r;p.onBlur(t)}e.stopPropagation()},children:[(0,S.jsx)(Cd(),WS(WS({},x),{},{disabled:t,dateFormat:f,placeholderText:l,showMonthDropdown:!0,showYearDropdown:!0,scrollableYearDropdown:!1,fixedHeight:!0,showPopperArrow:!1,locale:m,customTimeInput:(0,S.jsx)(YS,WS({},E)),timeInputLabel:"",popperProps:qS,todayButton:(0,S.jsx)(VS,{onChange:w,label:g("client.component.datePicker.todayLabel")})})),b&&(0,S.jsx)(_O.Z,WS({icon:"times",tabIndex:-1,"aria-label":g("client.component.datePicker.clearDateLabel")},O)),!t&&(0,S.jsx)(_O.Z,WS({icon:"calendar",tabIndex:-1},C))]})})})));function QS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}const XS=function(e){var t=e.onChange,n=e.options,r=e.id,o=e.value,i=e.immutable,a=e.events,c=e.placeholder,s=(0,rS.Z)(),u=(null==n?void 0:n.datePickerOptions)||{},l=ad.Z.getLocalizedDateFormatWithoutPunctuation(s.locale),d=["P",l,ad.Z.useTwoDigitYear("P"),ad.Z.useTwoDigitYear(l)];return(0,S.jsx)(GS,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?QS(Object(n),!0).forEach((function(t){(0,Iv.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):QS(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({id:r,value:o,onChange:t,dateFormat:d,hasTime:!1,immutable:i,placeholder:c,events:a},u))};function KS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var $S="P HH:mm";const JS=(0,P.ZP)((function(e){var t=e.onChange,n=e.options,r=e.value,o=e.immutable,i=e.placeholder,a=(0,rS.Z)(),c=(null==n?void 0:n.datePickerOptions)||{},s=ad.Z.getLocalizedDateTimeFormatWithoutPunctuation(a.locale),u=[$S,s,ad.Z.useTwoDigitYear($S),ad.Z.useTwoDigitYear(s)];return(0,S.jsx)(GS,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?KS(Object(n),!0).forEach((function(t){(0,Iv.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):KS(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({value:r,onChange:t,dateFormat:u,hasTime:!0,immutable:o,placeholder:i},c))}));var eD=a(74870),tD=a.n(eD);function nD(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(e){i(e)}}function c(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,c)}s((r=r.apply(e,t||[])).next())}))}function rD(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}}Object.create;function oD(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function iD(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}Object.create;var aD=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function cD(e,t){var n=function(e){var t=e.name;if(t&&-1!==t.lastIndexOf(".")&&!e.type){var n=t.split(".").pop().toLowerCase(),r=aD.get(n);r&&Object.defineProperty(e,"type",{value:r,writable:!1,configurable:!1,enumerable:!0})}return e}(e);if("string"!=typeof n.path){var r=e.webkitRelativePath;Object.defineProperty(n,"path",{value:"string"==typeof t?t:"string"==typeof r&&r.length>0?r:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}var sD=[".DS_Store","Thumbs.db"];function uD(e){return"object"==typeof e&&null!==e}function lD(e){return hD(e.target.files).map((function(e){return cD(e)}))}function dD(e){return nD(this,void 0,void 0,(function(){return rD(this,(function(t){switch(t.label){case 0:return[4,Promise.all(e.map((function(e){return e.getFile()})))];case 1:return[2,t.sent().map((function(e){return cD(e)}))]}}))}))}function fD(e,t){return nD(this,void 0,void 0,(function(){var n;return rD(this,(function(r){switch(r.label){case 0:return e.items?(n=hD(e.items).filter((function(e){return"file"===e.kind})),"drop"!==t?[2,n]:[4,Promise.all(n.map(mD))]):[3,2];case 1:return[2,pD(gD(r.sent()))];case 2:return[2,pD(hD(e.files).map((function(e){return cD(e)})))]}}))}))}function pD(e){return e.filter((function(e){return-1===sD.indexOf(e.name)}))}function hD(e){if(null===e)return[];for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push(r)}return t}function mD(e){if("function"!=typeof e.webkitGetAsEntry)return vD(e);var t=e.webkitGetAsEntry();return t&&t.isDirectory?bD(t):vD(e)}function gD(e){return e.reduce((function(e,t){return iD(iD([],oD(e),!1),oD(Array.isArray(t)?gD(t):[t]),!1)}),[])}function vD(e){var t=e.getAsFile();if(!t)return Promise.reject("".concat(e," is not a File"));var n=cD(t);return Promise.resolve(n)}function yD(e){return nD(this,void 0,void 0,(function(){return rD(this,(function(t){return[2,e.isDirectory?bD(e):wD(e)]}))}))}function bD(e){var t=e.createReader();return new Promise((function(e,n){var r=[];!function o(){var i=this;t.readEntries((function(t){return nD(i,void 0,void 0,(function(){var i,a,c;return rD(this,(function(s){switch(s.label){case 0:if(t.length)return[3,5];s.label=1;case 1:return s.trys.push([1,3,,4]),[4,Promise.all(r)];case 2:return i=s.sent(),e(i),[3,4];case 3:return a=s.sent(),n(a),[3,4];case 4:return[3,6];case 5:c=Promise.all(t.map(yD)),r.push(c),o(),s.label=6;case 6:return[2]}}))}))}),(function(e){n(e)}))}()}))}function wD(e){return nD(this,void 0,void 0,(function(){return rD(this,(function(t){return[2,new Promise((function(t,n){e.file((function(n){var r=cD(n,e.fullPath);t(r)}),(function(e){n(e)}))}))]}))}))}var AD=a(91073);function xD(e){return function(e){if(Array.isArray(e))return DD(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||SD(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ED(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function OD(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ED(Object(n),!0).forEach((function(t){CD(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ED(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function CD(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kD(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,c=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){c=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(c)throw o}}return i}(e,t)||SD(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function SD(e,t){if(e){if("string"==typeof e)return DD(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?DD(e,t):void 0}}function DD(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var PD="file-invalid-type",_D="file-too-large",jD="file-too-small",TD="too-many-files",RD=function(e){e=Array.isArray(e)&&1===e.length?e[0]:e;var t=Array.isArray(e)?"one of ".concat(e.join(", ")):e;return{code:PD,message:"File type must be ".concat(t)}},ID=function(e){return{code:_D,message:"File is larger than ".concat(e," ").concat(1===e?"byte":"bytes")}},MD=function(e){return{code:jD,message:"File is smaller than ".concat(e," ").concat(1===e?"byte":"bytes")}},ND={code:TD,message:"Too many files"};function BD(e,t){var n="application/x-moz-file"===e.type||(0,AD.Z)(e,t);return[n,n?null:RD(t)]}function ZD(e,t,n){if(FD(e.size))if(FD(t)&&FD(n)){if(e.size>n)return[!1,ID(n)];if(e.size<t)return[!1,MD(t)]}else{if(FD(t)&&e.size<t)return[!1,MD(t)];if(FD(n)&&e.size>n)return[!1,ID(n)]}return[!0,null]}function FD(e){return null!=e}function LD(e){var t=e.files,n=e.accept,r=e.minSize,o=e.maxSize,i=e.multiple,a=e.maxFiles,c=e.validator;return!(!i&&t.length>1||i&&a>=1&&t.length>a)&&t.every((function(e){var t=kD(BD(e,n),1)[0],i=kD(ZD(e,r,o),1)[0],a=c?c(e):null;return t&&i&&!a}))}function HD(e){return"function"==typeof e.isPropagationStopped?e.isPropagationStopped():void 0!==e.cancelBubble&&e.cancelBubble}function UD(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,(function(e){return"Files"===e||"application/x-moz-file"===e})):!!e.target&&!!e.target.files}function zD(e){e.preventDefault()}function WD(e){return-1!==e.indexOf("MSIE")||-1!==e.indexOf("Trident/")}function VD(e){return-1!==e.indexOf("Edge/")}function YD(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.navigator.userAgent;return WD(e)||VD(e)}function qD(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return t.some((function(t){return!HD(e)&&t&&t.apply(void 0,[e].concat(r)),HD(e)}))}}function GD(){return"showOpenFilePicker"in window}function QD(e){if(FD(e)){var t=Object.entries(e).filter((function(e){var t=kD(e,2),n=t[0],r=t[1],o=!0;return JD(n)||(console.warn('Skipped "'.concat(n,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),o=!1),Array.isArray(r)&&r.every(eP)||(console.warn('Skipped "'.concat(n,'" because an invalid file extension was provided.')),o=!1),o})).reduce((function(e,t){var n=kD(t,2),r=n[0],o=n[1];return OD(OD({},e),{},CD({},r,o))}),{});return[{description:"Files",accept:t}]}return e}function XD(e){if(FD(e))return Object.entries(e).reduce((function(e,t){var n=kD(t,2),r=n[0],o=n[1];return[].concat(xD(e),[r],xD(o))}),[]).filter((function(e){return JD(e)||eP(e)})).join(",")}function KD(e){return e instanceof DOMException&&("AbortError"===e.name||e.code===e.ABORT_ERR)}function $D(e){return e instanceof DOMException&&("SecurityError"===e.name||e.code===e.SECURITY_ERR)}function JD(e){return"audio/*"===e||"video/*"===e||"image/*"===e||"text/*"===e||/\w+\/[-+.\w]+/g.test(e)}function eP(e){return/^.*\.[\w]+$/.test(e)}var tP=["children"],nP=["open"],rP=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],oP=["refKey","onChange","onClick"];function iP(e){return function(e){if(Array.isArray(e))return sP(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||cP(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function aP(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,c=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){c=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(c)throw o}}return i}(e,t)||cP(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function cP(e,t){if(e){if("string"==typeof e)return sP(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?sP(e,t):void 0}}function sP(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function uP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function lP(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?uP(Object(n),!0).forEach((function(t){dP(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uP(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function dP(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fP(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var pP=(0,R.forwardRef)((function(e,t){var n=e.children,r=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=lP(lP({},hP),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,i=t.maxSize,a=t.minSize,c=t.multiple,s=t.maxFiles,u=t.onDragEnter,l=t.onDragLeave,d=t.onDragOver,f=t.onDrop,p=t.onDropAccepted,h=t.onDropRejected,m=t.onFileDialogCancel,g=t.onFileDialogOpen,v=t.useFsAccessApi,y=t.autoFocus,b=t.preventDropOnDocument,w=t.noClick,A=t.noKeyboard,x=t.noDrag,E=t.noDragEventsBubbling,O=t.onError,C=t.validator,k=(0,R.useMemo)((function(){return XD(n)}),[n]),S=(0,R.useMemo)((function(){return QD(n)}),[n]),D=(0,R.useMemo)((function(){return"function"==typeof g?g:yP}),[g]),P=(0,R.useMemo)((function(){return"function"==typeof m?m:yP}),[m]),_=(0,R.useRef)(null),j=(0,R.useRef)(null),T=aP((0,R.useReducer)(vP,gP),2),I=T[0],M=T[1],N=I.isFocused,B=I.isFileDialogActive,Z=(0,R.useRef)("undefined"!=typeof window&&window.isSecureContext&&v&&GD()),F=function(){!Z.current&&B&&setTimeout((function(){j.current&&(j.current.files.length||(M({type:"closeDialog"}),P()))}),300)};(0,R.useEffect)((function(){return window.addEventListener("focus",F,!1),function(){window.removeEventListener("focus",F,!1)}}),[j,B,P,Z]);var L=(0,R.useRef)([]),H=function(e){_.current&&_.current.contains(e.target)||(e.preventDefault(),L.current=[])};(0,R.useEffect)((function(){return b&&(document.addEventListener("dragover",zD,!1),document.addEventListener("drop",H,!1)),function(){b&&(document.removeEventListener("dragover",zD),document.removeEventListener("drop",H))}}),[_,b]),(0,R.useEffect)((function(){return!r&&y&&_.current&&_.current.focus(),function(){}}),[_,y,r]);var U=(0,R.useCallback)((function(e){O?O(e):console.error(e)}),[O]),z=(0,R.useCallback)((function(e){e.preventDefault(),e.persist(),ne(e),L.current=[].concat(iP(L.current),[e.target]),UD(e)&&Promise.resolve(o(e)).then((function(t){if(!HD(e)||E){var n=t.length,r=n>0&&LD({files:t,accept:k,minSize:a,maxSize:i,multiple:c,maxFiles:s,validator:C});M({isDragAccept:r,isDragReject:n>0&&!r,isDragActive:!0,type:"setDraggedFiles"}),u&&u(e)}})).catch((function(e){return U(e)}))}),[o,u,U,E,k,a,i,c,s,C]),W=(0,R.useCallback)((function(e){e.preventDefault(),e.persist(),ne(e);var t=UD(e);if(t&&e.dataTransfer)try{e.dataTransfer.dropEffect="copy"}catch(e){}return t&&d&&d(e),!1}),[d,E]),V=(0,R.useCallback)((function(e){e.preventDefault(),e.persist(),ne(e);var t=L.current.filter((function(e){return _.current&&_.current.contains(e)})),n=t.indexOf(e.target);-1!==n&&t.splice(n,1),L.current=t,t.length>0||(M({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),UD(e)&&l&&l(e))}),[_,l,E]),Y=(0,R.useCallback)((function(e,t){var n=[],r=[];e.forEach((function(e){var t=aP(BD(e,k),2),o=t[0],c=t[1],s=aP(ZD(e,a,i),2),u=s[0],l=s[1],d=C?C(e):null;if(o&&u&&!d)n.push(e);else{var f=[c,l];d&&(f=f.concat(d)),r.push({file:e,errors:f.filter((function(e){return e}))})}})),(!c&&n.length>1||c&&s>=1&&n.length>s)&&(n.forEach((function(e){r.push({file:e,errors:[ND]})})),n.splice(0)),M({acceptedFiles:n,fileRejections:r,type:"setFiles"}),f&&f(n,r,t),r.length>0&&h&&h(r,t),n.length>0&&p&&p(n,t)}),[M,c,k,a,i,s,f,p,h,C]),q=(0,R.useCallback)((function(e){e.preventDefault(),e.persist(),ne(e),L.current=[],UD(e)&&Promise.resolve(o(e)).then((function(t){HD(e)&&!E||Y(t,e)})).catch((function(e){return U(e)})),M({type:"reset"})}),[o,Y,U,E]),G=(0,R.useCallback)((function(){if(Z.current){M({type:"openDialog"}),D();var e={multiple:c,types:S};window.showOpenFilePicker(e).then((function(e){return o(e)})).then((function(e){Y(e,null),M({type:"closeDialog"})})).catch((function(e){KD(e)?(P(e),M({type:"closeDialog"})):$D(e)?(Z.current=!1,j.current?(j.current.value=null,j.current.click()):U(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):U(e)}))}else j.current&&(M({type:"openDialog"}),D(),j.current.value=null,j.current.click())}),[M,D,P,v,Y,U,S,c]),Q=(0,R.useCallback)((function(e){_.current&&_.current.isEqualNode(e.target)&&(" "!==e.key&&"Enter"!==e.key&&32!==e.keyCode&&13!==e.keyCode||(e.preventDefault(),G()))}),[_,G]),X=(0,R.useCallback)((function(){M({type:"focus"})}),[]),K=(0,R.useCallback)((function(){M({type:"blur"})}),[]),$=(0,R.useCallback)((function(){w||(YD()?setTimeout(G,0):G())}),[w,G]),J=function(e){return r?null:e},ee=function(e){return A?null:J(e)},te=function(e){return x?null:J(e)},ne=function(e){E&&e.stopPropagation()},re=(0,R.useMemo)((function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.refKey,n=void 0===t?"ref":t,o=e.role,i=e.onKeyDown,a=e.onFocus,c=e.onBlur,s=e.onClick,u=e.onDragEnter,l=e.onDragOver,d=e.onDragLeave,f=e.onDrop,p=fP(e,rP);return lP(lP(dP({onKeyDown:ee(qD(i,Q)),onFocus:ee(qD(a,X)),onBlur:ee(qD(c,K)),onClick:J(qD(s,$)),onDragEnter:te(qD(u,z)),onDragOver:te(qD(l,W)),onDragLeave:te(qD(d,V)),onDrop:te(qD(f,q)),role:"string"==typeof o&&""!==o?o:"presentation"},n,_),r||A?{}:{tabIndex:0}),p)}}),[_,Q,X,K,$,z,W,V,q,A,x,r]),oe=(0,R.useCallback)((function(e){e.stopPropagation()}),[]),ie=(0,R.useMemo)((function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.refKey,n=void 0===t?"ref":t,r=e.onChange,o=e.onClick,i=fP(e,oP);return lP(lP({},dP({accept:k,multiple:c,type:"file",style:{display:"none"},onChange:J(qD(r,q)),onClick:J(qD(o,oe)),tabIndex:-1},n,j)),i)}}),[j,n,c,q,r]);return lP(lP({},I),{},{isFocused:N&&!r,getRootProps:re,getInputProps:ie,rootRef:_,inputRef:j,open:J(G)})}(fP(e,tP)),o=r.open,i=fP(r,nP);return(0,R.useImperativeHandle)(t,(function(){return{open:o}}),[o]),I().createElement(R.Fragment,null,n(lP(lP({},i),{},{open:o})))}));pP.displayName="Dropzone";var hP={disabled:!1,getFilesFromEvent:function(e){return nD(this,void 0,void 0,(function(){return rD(this,(function(t){return uD(e)&&uD(e.dataTransfer)?[2,fD(e.dataTransfer,e.type)]:function(e){return uD(e)&&uD(e.target)}(e)?[2,lD(e)]:Array.isArray(e)&&e.every((function(e){return"getFile"in e&&"function"==typeof e.getFile}))?[2,dD(e)]:[2,[]]}))}))},maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};pP.defaultProps=hP,pP.propTypes={children:tD().func,accept:tD().objectOf(tD().arrayOf(tD().string)),multiple:tD().bool,preventDropOnDocument:tD().bool,noClick:tD().bool,noKeyboard:tD().bool,noDrag:tD().bool,noDragEventsBubbling:tD().bool,minSize:tD().number,maxSize:tD().number,maxFiles:tD().number,disabled:tD().bool,getFilesFromEvent:tD().func,onFileDialogCancel:tD().func,onFileDialogOpen:tD().func,useFsAccessApi:tD().bool,autoFocus:tD().bool,onDragEnter:tD().func,onDragLeave:tD().func,onDragOver:tD().func,onDrop:tD().func,onDropAccepted:tD().func,onDropRejected:tD().func,onError:tD().func,validator:tD().func};const mP=pP;var gP={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function vP(e,t){switch(t.type){case"focus":return lP(lP({},e),{},{isFocused:!0});case"blur":return lP(lP({},e),{},{isFocused:!1});case"openDialog":return lP(lP({},gP),{},{isFileDialogActive:!0});case"closeDialog":return lP(lP({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return lP(lP({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return lP(lP({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return lP({},gP);default:return e}}function yP(){}var bP,wP,AP,xP,EP,OP,CP,kP,SP,DP=a(69829),PP={shade0:function(e){var t=e.theme;return nf()(t,"colors.text")},shade1:function(e){var t=e.theme;return(0,rf.HO)(nf()(t,"colors.text"),3.5)},shade2:function(e){var t=e.theme;return(0,rf.HO)(nf()(t,"colors.text"),5.5)},signal:function(e){var t=e.theme,n=e.signal;return nf()(t,"colors.signal.".concat(n,".text"))},hasValue:function(e){var t=e.theme;return nf()(t,"colors.signal.info.text")}},_P={shade0:function(e){var t=e.theme;return nf()(t,"colors.paper")},shade1:function(e){var t=e.theme;return(0,rf.HO)(nf()(t,"colors.paper"),2)},shade2:function(e){var t=e.theme;return(0,rf.HO)(nf()(t,"colors.paper"),4)},signal:function(e){var t=e.theme,n=e.signal;return nf()(t,"colors.signal.".concat(n,".text"))},isDirty:function(e){var t=e.theme;return nf()(t,"colors.secondaryLight")},transparent:function(){return"transparent"}},jP=b.ZP.section.withConfig({displayName:"StyledSection"})(bP||(bP=(0,v.Z)(["\n flex: 1;\n display: flex;\n justify-content: flex-end;\n"]))),TP=b.ZP.div.withConfig({displayName:"StyledButtonsWrapper"})(wP||(wP=(0,v.Z)(["\n display: flex;\n align-items: center;\n\n "," {\n margin: 0;\n border-radius: 50%;\n padding: ",";\n\n a:hover {\n color: unset;\n }\n }\n"])),gd.Z,x.Z.space(-2)),RP=b.ZP.div.withConfig({displayName:"StyledDropzone"})(AP||(AP=(0,v.Z)(["\n width: 100%;\n\n &:hover {\n "," {\n background-color: ",";\n }\n }\n"])),gd.Z,(function(e){var t=e.theme;return(0,y._j)(.1,t.colors.paper)})),IP=b.ZP.div.withConfig({displayName:"StyledUploadInput"})(xP||(xP=(0,v.Z)(["\n ","\n cursor: ",";\n background-color: ",";\n color: ",";\n padding: "," 0 0 0;\n display: flex;\n\n "," {\n float: right;\n position: relative;\n top: -",";\n margin: 0;\n border-radius: 50%;\n padding: ",";\n }\n"])),(0,A.Z)(),(function(e){return e.immutable?"not-allowed":"pointer"}),w.FS.color("paper"),(function(e){return e.immutable?PP.shade2(e):PP.shade0(e)}),x.Z.space(-2),gd.Z,x.Z.space(-3.1),x.Z.space(-1.5)),MP=b.ZP.div.withConfig({displayName:"StyledUploadProgress"})(EP||(EP=(0,v.Z)(["\n && {\n padding-top: ",";\n text-align: center;\n display: inline-block;\n }\n"])),x.Z.space(-2)),NP=(0,b.ZP)(DP.Fe).withConfig({displayName:"StyledUploadProgressText"})(OP||(OP=(0,v.Z)(["\n && {\n ","\n }\n"])),(0,A.Z)({fontSize:x.Z.font(-1)})),BP=b.ZP.div.withConfig({displayName:"StyledUploadProgressIconAndText"})(CP||(CP=(0,v.Z)(["\n && {\n display: flex;\n justify-content: center;\n align-items: center;\n\n span {\n margin-left: ",";\n }\n }\n"])),x.Z.space(-2)),ZP=b.ZP.div.withConfig({displayName:"StyledView"})(kP||(kP=(0,v.Z)(["\n display: flex;\n justify-content: space-between;\n padding-top: ",";\n"])),x.Z.space(-2));function FP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function LP(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?FP(Object(n),!0).forEach((function(t){(0,Iv.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):FP(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const HP=function(e){var t=e.onDrop,n=e.immutable,r=e.text,o=e.onChoose;return(0,S.jsxs)(IP,{immutable:n,children:[(0,S.jsx)(mP,{onDrop:function(e){var n=e.map((function(e){return Object.assign(e,{preview:URL.createObjectURL(e)})}));t(n[0])},multiple:!1,disabled:n,title:r||"drag and drop or click",children:function(e){var t=e.getRootProps,n=e.getInputProps;return(0,S.jsx)(jP,{children:(0,S.jsxs)(RP,LP(LP({},t()),{},{children:[(0,S.jsx)("input",LP({},n())),SP||(SP=(0,S.jsx)(pd.Z,{icon:"arrow-to-top"}))]}))})}}),o&&(0,S.jsx)(pd.Z,{onClick:function(e){o(),e.stopPropagation()},icon:"folder",label:"browse docs",iconOnly:!0})]})};var UP=a(73906),zP=a(78958),WP=function(e){var t=Math.floor(Math.log(e)/Math.log(1024));return"".concat(1*(e/Math.pow(1024,t)).toFixed(2)," ").concat(["Bytes","KB","MB","GB","TB"][t])};const VP=function(e){var t=e.file,n=e.text;return(0,S.jsxs)(MP,{children:[(0,S.jsx)(UP.Z,{alt:t.name,caption:t.name,maxDimensionX:"96px",maxDimensionY:"96px",srcUrl:t.preview,thumbnailUrl:t.type.startsWith("image")?t.preview:null}),(0,S.jsxs)(BP,{children:[(0,S.jsx)(ik.Z,{position:zP.Z.position.PREPEND}),(0,S.jsxs)(NP,{children:[n||"uploading"," (",WP(t.size),")"]})]})]})};var YP=a(41291);function qP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function GP(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qP(Object(n),!0).forEach((function(t){(0,Iv.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qP(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const QP=function(e){var t,n=e.value,r=e.downloadTitle,o=e.immutable,i=e.onUpload,a=e.deleteTitle,c=null===(t=n.binaryLink)||void 0===t?void 0:t.startsWith("blob:");return(0,S.jsxs)(ZP,{className:"StyledView",children:[(0,S.jsx)(UP.Z,GP(GP({alt:n.fileName},c&&{caption:n.fileName}),{},{fileName:n.fileName,maxDimensionX:"96px",maxDimensionY:"96px",srcUrl:n.binaryLink,thumbnailUrl:n.thumbnailLink})),(0,S.jsxs)(TP,{children:[!o&&(0,S.jsx)(pd.Z,{icon:"trash",onClick:function(){return i(null)},tabIndex:-1,title:a||"delete"}),(0,S.jsx)(pd.Z,{children:(0,S.jsx)(YP.Z,{neutral:!0,icon:"arrow-to-bottom",target:"_blank",href:ig.Z.getDownloadUrl(n.binaryLink),tabIndex:-1,title:r||"download"})})]})]})};function XP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function KP(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?XP(Object(n),!0).forEach((function(t){(0,Iv.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):XP(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var $P=function(e){var t=e.value,n=e.textResources,r=e.onUpload,o=e.onChoose,i=(0,R.useRef)(t),a=(0,R.useState)({isUploading:!1,previewFile:null}),c=(0,wd.Z)(a,2),s=c[0],u=c[1];return(0,R.useEffect)((function(){Dp()(i.current,t)||u({isUploading:!1,previewFile:null}),i.current=t}),[t]),null!=t&&t.binaryLink?(0,S.jsx)(QP,KP(KP({},e),{},{deleteTitle:n.delete,downloadTitle:n.download})):s.isUploading?(0,S.jsx)(VP,KP({file:s.previewFile,text:n.uploading},e)):(0,S.jsx)(HP,KP(KP({},e),{},{onDrop:function(e){!function(e){u({isUploading:!0,previewFile:e})}(e),r(e)},onChoose:o}))};$P.defaultProps={textResources:{}};const JP=$P;var e_=function(e){return(0,S.jsx)(JP,{onUpload:function(t){null===t?e.onChange&&e.onChange(null):e.options.upload&&e.options.upload(t)},onChoose:e.options.choose,immutable:e.immutable,textResources:{upload:e.options.uploadText,uploading:e.options.uploadingText,delete:e.options.deleteText,download:e.options.downloadText},value:e.value?e.value:null})};e_.defaultProps={options:{}};const t_=e_;var n_,r_,o_=function(e){return-1*Math.abs(e)},i_=b.ZP.input.withConfig({displayName:"StyledDurationEdit"})(n_||(n_=(0,v.Z)(["\n && {\n ","\n flex-grow: 0;\n width: ","px;\n min-width: 2.5ch;\n }\n"])),aS,(function(e){return e.width})),a_=b.ZP.label.withConfig({displayName:"StyledDurationEditFocusable"})(r_||(r_=(0,v.Z)(["\n &&& {\n align-items: center;\n display: flex;\n flex-wrap: nowrap;\n margin-bottom: 0; /* reset bootstrap */\n margin-left: ",";\n\n &:first-child {\n margin-left: 0;\n }\n\n > span {\n color: ",";\n cursor: ",";\n }\n }\n"])),x.Z.space(1),(function(e){return e.immutable?(0,rf.iy)(nf()(e.theme,"colors.text")):Jm.Z.color("text")}),(function(e){return e.immutable?"not-allowed":"default"})),c_=function(e){var t=e.value,n=e.immutable,r=e.onChange,o=e.options,i=ad.Z.millisecondsToDuration(t),a=(0,R.useState)(!1),c=(0,wd.Z)(a,2),s=c[0],u=c[1],l=function(e,t){var n,o,a=null!==t?t:i.minutes,c=null!==e?e:i.hours;""!==a||""!==c?(a>=60&&(c=0),r((o=a,(n=c)||o?((n<0||o<0)&&(n=o_(n),o=o_(o)),60*(n||0)*6e4+6e4*(o||0)):null))):r(null)},d=function(){u(!0)},f=function(e){e.charCode>=48&&e.charCode<=57||45===e.charCode&&!0===o.allowNegative||e.preventDefault()},p=function(){return!0===o.allowNegative?"-?d+":"d+"},h=function(){return s||"number"==typeof t},m=function(e){return 9*(e+"").length},g=n&&Boolean(i.seconds);return(0,S.jsxs)(iS,{onBlur:function(){u(!1)},immutable:n,children:[(0,S.jsxs)(a_,{immutable:n,children:[(0,S.jsx)(i_,{disabled:n,immutable:n,min:!0===o.allowNegative?void 0:0,onChange:function(){},onFocus:d,onInput:function(e){var t=e.target.value.replace(/[^-\d]/g,"");l(t,null)},onKeyPress:f,pattern:p(),step:1,width:m(i.hours),type:"number",value:"number"!=typeof i.hours||0===i.hours&&!n?"":i.hours+""}),h()&&(0,S.jsx)(Zd.ZP.Span,{children:o.hoursLabel})]}),(0,S.jsxs)(a_,{immutable:n,children:[(0,S.jsx)(i_,{disabled:n,immutable:n,min:!0!==o.allowNegative||null!==i.hours&&0!==i.hours?0:void 0,onChange:function(){},onFocus:d,onInput:function(e){var t=e.target.value.replace(/[^-\d]/g,"");l(null,t)},onKeyPress:f,pattern:p(),step:1,width:m(i.minutes),type:"number",value:i.minutes+""}),h()&&(0,S.jsx)(Zd.ZP.Span,{children:o.minutesLabel})]}),g&&(0,S.jsxs)(a_,{immutable:n,children:[(0,S.jsx)(i_,{disabled:n,immutable:n,onChange:function(){},width:m(i.seconds),type:"number",value:i.seconds+""}),h()&&(0,S.jsx)(Zd.ZP.Span,{children:o.secondsLabel})]})]})};c_.defaultProps={options:{hoursLabel:"hrs",minutesLabel:"min",secondsLabel:"s"}};const s_=c_;var u_;const l_=b.ZP.input.attrs((function(e){return{type:"text"}})).withConfig({displayName:"StyledStringEdit"})(u_||(u_=(0,v.Z)(["\n && {\n ","\n }\n"])),aS);const d_=H.Z.Debouncer((function(e){return(0,S.jsxs)(iS,{immutable:e.immutable,children:[(0,S.jsx)(l_,{disabled:e.immutable,id:e.id,name:e.name,onChange:function(t){return e.onChange(t.target.value)},immutable:e.immutable,value:e.value||""}),e.value&&(0,S.jsx)(sS,{children:(0,S.jsx)(YP.Z,{href:"mailto:".concat(e.value.toString()),icon:"envelope",look:"ball",tabIndex:-1,target:"_blank",neutral:!0})})]})}));var f_,p_=(0,R.lazy)((function(){return Promise.all([a.e(288),a.e(759),a.e(85)]).then(a.bind(a,17676))})),h_=function(e){var t=e.onChange,n=e.immutable,r=e.value,o=e.options;if(n)return(0,S.jsx)(Zd.ZP.Span,{children:(0,S.jsx)("div",{dangerouslySetInnerHTML:{__html:r}})});var i=o||{},a=i.contentLang,c=i.ckEditorConfig;return(0,S.jsx)(R.Suspense,{fallback:f_||(f_=(0,S.jsx)("i",{})),children:(0,S.jsx)(p_,{onChange:function(e){t&&t(e)},value:r,contentLang:a,ckEditorConfig:c})})};h_.defaultProps={value:""};const m_=h_;function g_(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}var v_;function y_(){}function b_(e){return!!(e||"").match(/\d/)}function w_(e){return null==e}function A_(e){return"number"==typeof e&&isNaN(e)}function x_(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function E_(e,t){void 0===t&&(t=!0);var n="-"===e[0],r=n&&t,o=(e=e.replace("-","")).split(".");return{beforeDecimal:o[0],afterDecimal:o[1]||"",hasNegation:n,addNegation:r}}function O_(e,t,n){for(var r="",o=n?"0":"",i=0;i<=t-1;i++)r+=e[i]||o;return r}function C_(e,t){return Array(t+1).join(e)}function k_(e){var t=e+"",n="-"===t[0]?"-":"";n&&(t=t.substring(1));var r=t.split(/[eE]/g),o=r[0],i=r[1];if(!(i=Number(i)))return n+o;var a=1+i,c=(o=o.replace(".","")).length;return a<0?o="0."+C_("0",Math.abs(a))+o:a>=c?o+=C_("0",a-c):o=(o.substring(0,a)||"0")+"."+o.substring(a),n+o}function S_(e,t,n){if(-1!==["","-"].indexOf(e))return e;var r=(-1!==e.indexOf(".")||n)&&t,o=E_(e),i=o.beforeDecimal,a=o.afterDecimal,c=o.hasNegation,s=parseFloat("0."+(a||"0")),u=(a.length<=t?"0."+a:s.toFixed(t)).split(".");return""+(c?"-":"")+i.split("").reverse().reduce((function(e,t,n){return e.length>n?(Number(e[0])+Number(t)).toString()+e.substring(1,e.length):t+e}),u[0])+(r?".":"")+O_(u[1]||"",t,n)}function D_(e,t){if(e.value=e.value,null!==e){if(e.createTextRange){var n=e.createTextRange();return n.move("character",t),n.select(),!0}return e.selectionStart||0===e.selectionStart?(e.focus(),e.setSelectionRange(t,t),!0):(e.focus(),!1)}}function P_(e){return{from:{start:0,end:0},to:{start:0,end:e.length},lastValue:""}}function __(e,t,n,r){var o,i,a,c=e.length;if(o=t,i=0,a=c,t=Math.min(Math.max(o,i),a),"left"===r){for(;t>=0&&!n[t];)t--;-1===t&&(t=n.indexOf(!0))}else{for(;t<=c&&!n[t];)t++;t>c&&(t=n.lastIndexOf(!0))}return-1===t&&(t=c),t}function j_(e){for(var t=Array.from({length:e.length+1}).map((function(){return!0})),n=0,r=t.length;n<r;n++)t[n]=Boolean(b_(e[n])||b_(e[n-1]));return t}function T_(e,t,n,r,o,i){void 0===i&&(i=y_);var a=(0,R.useRef)(),c=function(e){var t=(0,R.useRef)(e);t.current=e;var n=(0,R.useRef)((function(){for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];return t.current.apply(t,e)}));return n.current}((function(e){var t,i;return w_(e)||A_(e)?(i="",t=""):"number"==typeof e||n?(i="number"==typeof e?k_(e):e,t=r(i)):(i=o(e,void 0),t=e),{formattedValue:t,numAsString:i}})),s=(0,R.useState)((function(){return c(t)})),u=s[0],l=s[1];return(0,R.useMemo)((function(){w_(e)?a.current=void 0:(a.current=c(e),l(a.current))}),[e,c]),[u,function(e,t){l({formattedValue:e.formattedValue,numAsString:e.value}),i(e,t)}]}function R_(e){return e.replace(/[^0-9]/g,"")}function I_(e){return e}function M_(e){var t=e.type;void 0===t&&(t="text");var n=e.displayType;void 0===n&&(n="input");var r=e.customInput,o=e.renderText,i=e.getInputRef,a=e.format;void 0===a&&(a=I_);var c=e.removeFormatting;void 0===c&&(c=R_);var s=e.defaultValue,u=e.valueIsNumericString,l=e.onValueChange,d=e.isAllowed,f=e.onChange;void 0===f&&(f=y_);var p=e.onKeyDown;void 0===p&&(p=y_);var h=e.onMouseUp;void 0===h&&(h=y_);var m=e.onFocus;void 0===m&&(m=y_);var g=e.onBlur;void 0===g&&(g=y_);var v=e.value,y=e.getCaretBoundary;void 0===y&&(y=j_);var b=e.isValidInputCharacter;void 0===b&&(b=b_);var w=g_(e,["type","displayType","customInput","renderText","getInputRef","format","removeFormatting","defaultValue","valueIsNumericString","onValueChange","isAllowed","onChange","onKeyDown","onMouseUp","onFocus","onBlur","value","getCaretBoundary","isValidInputCharacter"]),A=T_(v,s,Boolean(u),a,c,l),x=A[0],E=x.formattedValue,O=x.numAsString,C=A[1],k=(0,R.useRef)();(0,R.useEffect)((function(){var e=a(O);if(void 0===k.current||e!==k.current){var t=_.current;F({formattedValue:e,numAsString:O,input:t,setCaretPosition:!0,source:v_.props,event:void 0})}}));var S=(0,R.useState)(!1),D=S[0],P=S[1],_=(0,R.useRef)(null),j=(0,R.useRef)({setCaretTimeout:null,focusTimeout:null});(0,R.useEffect)((function(){return P(!0),function(){clearTimeout(j.current.setCaretTimeout),clearTimeout(j.current.focusTimeout)}}),[]);var T=a,M=function(e,t){var n=parseFloat(t);return{formattedValue:e,value:t,floatValue:isNaN(n)?void 0:n}},N=function(e,t,n){D_(e,t),j.current.setCaretTimeout=setTimeout((function(){e.value===n&&D_(e,t)}),0)},B=function(e,t,n){return __(e,t,y(e),n)},Z=function(e,t,n){var r=y(t),o=function(e,t,n,r,o,i){var a=o.findIndex((function(e){return e})),c=e.slice(0,a);t||n.startsWith(c)||(n=c+n,r+=c.length);for(var s=n.length,u=e.length,l={},d=new Array(s),f=0;f<s;f++){d[f]=-1;for(var p=0,h=u;p<h;p++)if(n[f]===e[p]&&!0!==l[p]){d[f]=p,l[p]=!0;break}}for(var m=r;m<s&&(-1===d[m]||!i(n[m]));)m++;var g=m===s||-1===d[m]?u:d[m];for(m=r-1;m>0&&-1===d[m];)m--;var v=-1===m||-1===d[m]?0:d[m]+1;return v>g?g:r-v<g-r?v:g}(t,E,e,n,r,b);return o=__(t,o,r)},F=function(e){var t=e.formattedValue;void 0===t&&(t="");var n=e.input,r=e.setCaretPosition;void 0===r&&(r=!0);var o,i=e.source,a=e.event,c=e.numAsString,s=e.caretPos;if(n){if(void 0===s&&r){var u=e.inputValue||n.value,l=(o=n,Math.max(o.selectionStart,o.selectionEnd));n.value=t,s=Z(u,t,l)}n.value=t,r&&void 0!==s&&N(n,s,t)}t!==E&&function(e,t){k.current=e.formattedValue,C(e,t)}(M(t,c),{event:a,source:i})},L=!D||"undefined"==typeof navigator||navigator.platform&&/iPhone|iPod/.test(navigator.platform)?void 0:"numeric",H=Object.assign({inputMode:L},w,{type:t,value:E,onChange:function(e){var t=function(e,t,n){var r=function(e,t){for(var n=0,r=0,o=e.length,i=t.length;e[n]===t[n]&&n<o;)n++;for(;e[o-1-r]===t[i-1-r]&&i-r>n&&o-r>n;)r++;return{from:{start:n,end:o-r},to:{start:n,end:i-r}}}(E,e),o=Object.assign(Object.assign({},r),{lastValue:E}),i=c(e,o),a=T(i);return!(d&&!d(M(a,i))||(F({formattedValue:a,numAsString:i,inputValue:e,event:t,source:n,setCaretPosition:!0,input:t.target}),0))}(e.target.value,e,v_.event);t&&f(e)},onKeyDown:function(e){var t,n=e.target,r=e.key,o=n.selectionStart,i=n.selectionEnd,a=n.value;if(void 0===a&&(a=""),"ArrowLeft"===r||"Backspace"===r?t=Math.max(o-1,0):"ArrowRight"===r?t=Math.min(o+1,a.length):"Delete"===r&&(t=o),void 0!==t&&o===i){var c=t;if("ArrowLeft"===r||"ArrowRight"===r)c=B(a,t,"ArrowLeft"===r?"left":"right");else"Delete"!==r||b(a[t])?"Backspace"!==r||b(a[t])||(c=B(a,t,"left")):c=B(a,t,"right");c!==t&&N(n,c,a),e.isUnitTestRun&&N(n,c,a),p(e)}else p(e)},onMouseUp:function(e){var t=e.target,n=t.selectionStart,r=t.selectionEnd,o=t.value;if(void 0===o&&(o=""),n===r){var i=B(o,n);i!==n&&N(t,i,o)}h(e)},onFocus:function(e){e.persist();var t=e.target;_.current=t,j.current.focusTimeout=setTimeout((function(){var n=t.selectionStart,r=t.selectionEnd,o=t.value;void 0===o&&(o="");var i=B(o,n);i===n||0===n&&r===o.length||N(t,i,o),m(e)}),0)},onBlur:function(e){_.current=null,clearTimeout(j.current.focusTimeout),clearTimeout(j.current.setCaretTimeout),g(e)}});if("text"===n)return o?I().createElement(I().Fragment,null,o(E,w)||null):I().createElement("span",Object.assign({},w,{ref:i}),E);if(r){var U=r;return I().createElement(U,Object.assign({},H,{ref:i}))}return I().createElement("input",Object.assign({},H,{ref:i}))}function N_(e,t){var n=t.decimalScale,r=t.fixedDecimalScale,o=t.prefix;void 0===o&&(o="");var i=t.suffix;void 0===i&&(i="");var a=t.allowNegative;void 0===a&&(a=!0);var c=t.thousandsGroupStyle;if(void 0===c&&(c="thousand"),""===e||"-"===e)return e;var s=B_(t),u=s.thousandSeparator,l=s.decimalSeparator,d=0!==n&&-1!==e.indexOf(".")||n&&r,f=E_(e,a),p=f.beforeDecimal,h=f.afterDecimal,m=f.addNegation;return void 0!==n&&(h=O_(h,n,!!r)),u&&(p=function(e,t,n){var r=function(e){switch(e){case"lakh":return/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;case"wan":return/(\d)(?=(\d{4})+(?!\d))/g;default:return/(\d)(?=(\d{3})+(?!\d))/g}}(n),o=e.search(/[1-9]/);return o=-1===o?e.length:o,e.substring(0,o)+e.substring(o,e.length).replace(r,"$1"+t)}(p,u,c)),o&&(p=o+p),i&&(h+=i),m&&(p="-"+p),e=p+(d&&l||"")+h}function B_(e){var t=e.decimalSeparator;void 0===t&&(t=".");var n=e.thousandSeparator,r=e.allowedDecimalSeparators;return!0===n&&(n=","),r||(r=[t,"."]),{decimalSeparator:t,thousandSeparator:n,allowedDecimalSeparators:r}}function Z_(e,t,n){void 0===t&&(t=P_(e));var r=n.allowNegative;void 0===r&&(r=!0);var o=n.prefix;void 0===o&&(o="");var i=n.suffix;void 0===i&&(i="");var a=n.decimalScale,c=t.from,s=t.to,u=s.start,l=s.end,d=B_(n),f=d.allowedDecimalSeparators,p=d.decimalSeparator,h=e[l]===p;if(l-u==1&&-1!==f.indexOf(e[u])){var m=0===a?"":p;e=e.substring(0,u)+m+e.substring(u+1,e.length)}var g=!1;o.startsWith("-")?g=e.startsWith("--"):i.startsWith("-")&&e.length===i.length?g=!1:"-"===e[0]&&(g=!0),g&&(e=e.substring(1),u-=1,l-=1);var v=0;e.startsWith(o)?v+=o.length:u<o.length&&(v=u),l-=v;var y=(e=e.substring(v)).length,b=e.length-i.length;e.endsWith(i)?y=b:l>e.length-i.length&&(y=l),e=e.substring(0,y),e=function(e,t){void 0===e&&(e="");var n=new RegExp("(-)"),r=new RegExp("(-)(.)*(-)"),o=n.test(e),i=r.test(e);return e=e.replace(/-/g,""),o&&!i&&t&&(e="-"+e),e}(g?"-"+e:e,r),e=(e.match(function(e,t){return new RegExp("(^-)|[0-9]|"+x_(e),t?"g":void 0)}(p,!0))||[]).join("");var w=e.indexOf(p),A=E_(e=e.replace(new RegExp(x_(p),"g"),(function(e,t){return t===w?".":""})),r),x=A.beforeDecimal,E=A.afterDecimal,O=A.addNegation;return s.end-s.start<c.end-c.start&&""===x&&h&&!parseFloat(E)&&(e=O?"-":""),e}function F_(e){var t=e.decimalSeparator;void 0===t&&(t=".");e.allowedDecimalSeparators,e.thousandsGroupStyle,e.suffix,e.allowNegative;var n=e.allowLeadingZeros,r=e.onKeyDown;void 0===r&&(r=y_);var o=e.onBlur;void 0===o&&(o=y_);var i=e.thousandSeparator,a=e.decimalScale,c=e.fixedDecimalScale,s=e.prefix;void 0===s&&(s="");var u=e.defaultValue,l=e.value,d=e.valueIsNumericString,f=e.onValueChange,p=g_(e,["decimalSeparator","allowedDecimalSeparators","thousandsGroupStyle","suffix","allowNegative","allowLeadingZeros","onKeyDown","onBlur","thousandSeparator","decimalScale","fixedDecimalScale","prefix","defaultValue","value","valueIsNumericString","onValueChange"]);!function(e){var t=B_(e),n=t.thousandSeparator,r=t.decimalSeparator;if(n===r)throw new Error("\n Decimal separator can't be same as thousand separator.\n thousandSeparator: "+n+' (thousandSeparator = {true} is same as thousandSeparator = ",")\n decimalSeparator: '+r+" (default value for decimalSeparator is .)\n ")}(e);var h=function(t){return N_(t,e)},m=function(t,n){return Z_(t,n,e)},g=d;w_(l)?w_(u)||(g=null!=d?d:"number"==typeof u):g=null!=d?d:"number"==typeof l;var v=function(e){return w_(e)||A_(e)?e:("number"==typeof e&&(e=k_(e)),g&&"number"==typeof a?S_(e,a,Boolean(c)):e)},y=T_(v(l),v(u),Boolean(g),h,m,f),b=y[0],w=b.numAsString,A=b.formattedValue,x=y[1];return Object.assign(Object.assign({},p),{value:A,valueIsNumericString:!1,isValidInputCharacter:function(e){return e===t||b_(e)},onValueChange:x,format:h,removeFormatting:m,getCaretBoundary:function(t){return function(e,t){var n=t.prefix;void 0===n&&(n="");var r=t.suffix;void 0===r&&(r="");var o=Array.from({length:e.length+1}).map((function(){return!0})),i="-"===e[0];o.fill(!1,0,n.length+(i?1:0));var a=e.length;return o.fill(!1,a-r.length+1,a+1),o}(t,e)},onKeyDown:function(t){var n=t.target,o=t.key,u=n.selectionStart,l=n.selectionEnd,d=n.value;if(void 0===d&&(d=""),u===l){"Backspace"===o&&"-"===d[0]&&u===s.length+1&&D_(n,1);var f=B_(e).decimalSeparator;"Backspace"===o&&d[u-1]===f&&a&&c&&(D_(n,u-1),t.preventDefault());var p=!0===i?",":i;"Backspace"===o&&d[u-1]===p&&D_(n,u-1),"Delete"===o&&d[u]===p&&D_(n,u+1),r(t)}else r(t)},onBlur:function(t){var r=w;if(r.match(/\d/g)||(r=""),n||(r=function(e){if(!e)return e;var t="-"===e[0];t&&(e=e.substring(1,e.length));var n=e.split("."),r=n[0].replace(/^0+/,"")||"0",o=n[1]||"";return(t?"-":"")+r+(o?"."+o:"")}(r)),c&&a&&(r=S_(r,a,c)),r!==w){var i=N_(r,e);x({formattedValue:i,value:r,floatValue:parseFloat(r)},{event:t,source:v_.event})}o(t)}})}function L_(e){var t=F_(e);return I().createElement(M_,Object.assign({},t))}!function(e){e.event="event",e.props="prop"}(v_||(v_={}));var H_,U_=["immutable"];function z_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var W_=(0,b.ZP)((function(e){e.immutable;var t=(0,BO.Z)(e,U_);return(0,S.jsx)(L_,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?z_(Object(n),!0).forEach((function(t){(0,Iv.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):z_(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},t))})).withConfig({displayName:"StyledNumberEdit"})(H_||(H_=(0,v.Z)(["\n && {\n ","\n }\n"])),aS);const V_=W_;function Y_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function q_(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Y_(Object(n),!0).forEach((function(t){(0,Iv.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Y_(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var G_=function(e){return 0!==e?Math.ceil(Math.log10(Math.abs(e)+1)):1},Q_=function(e){return null!=e&&!isNaN(parseFloat(e))},X_=function(e,t,n){return!Q_(n)||!(Q_(t)&&n>t)&&!(Q_(e)&&n<e)},K_=function(e,t){return function(n){var r=n.floatValue;return G_(r)<G_(e)||X_(e,t,r)}};const $_=(0,P.ZP)(H.Z.Debouncer((function(e){var t,n=(t=e.intl.locale,{thousandSeparator:1111..toLocaleString(t).replace(/1/g,""),decimalSeparator:1.1.toLocaleString(t).replace(/1/g,"")}),r=n.thousandSeparator,o=n.decimalSeparator,i=e.options||{},a=i.prePointDigits,c=i.postPointDigits,s=i.minValue,u=i.maxValue,l=i.allowNegative,d=i.fixedDecimalScale,f=i.suffix,p=i.prefix,h=i.format,m=function(e,t,n){if(e){var r=Math.pow(10,e)-(t?1/Math.pow(10,t):1);return n&&n>r?n:r}return n}(a,c,u),g=q_(q_({isAllowed:K_(s,m),allowNegative:!!l},isNaN(c)?{}:{decimalScale:c}),{},{fixedDecimalScale:!!d});return(0,S.jsx)(iS,{immutable:e.immutable,children:(0,S.jsx)(V_,q_(q_({decimalSeparator:o,disabled:e.immutable,id:e.id,valueIsNumericString:!0,name:e.name,onValueChange:function(t){e.onChange&&X_(s,m,t.floatValue)&&e.onChange(void 0!==t.floatValue?t.floatValue:null)},immutable:e.immutable,thousandSeparator:r,value:e.value,suffix:f,prefix:p},g),{},{format:h,placeholder:e.placeholder,onBlur:function(t){var n,r=!(n=t.target.value)||isNaN(n)?null:parseFloat(n);e.onChange&&!X_(s,m,r)&&(t.target.value=null)}}))})}),800));const J_=H.Z.Debouncer((function(e){var t=e.value,n=e.onChange,r=e.options,o=e.immutable,i=e.name,a=e.id,c=e.placeholder,s=r||{},u=s.minValue,l=s.maxValue,d=s.format,f=s.allowLeadingZeros;return(0,S.jsx)(iS,{immutable:o,children:(0,S.jsx)(V_,{isAllowed:K_(u,l),allowNegative:!0,decimalScale:0,disabled:o,id:a,name:i,onValueChange:function(e){var t=e.value,r=e.floatValue,o=f?t:r;void 0===o&&(o=null),X_(u,l,r)&&n(o)},value:t,allowLeadingZeros:f,format:d,placeholder:c})})}),800);var ej=a(73891),tj=a(52931),nj=a.n(tj),rj=a(66462),oj=a.n(rj),ij=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},aj=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},cj=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},sj={outline:"none"},uj=function(e){function t(){var n,r;ij(this,t);for(var o=arguments.length,i=Array(o),a=0;a<o;a++)i[a]=arguments[a];return n=r=cj(this,e.call.apply(e,[this].concat(i))),r.state={focused:!1},r._isMounted=!1,r._lastBlurEvent=null,r.ref=I().createRef(),r._onFocusIn=function(){r._isMounted&&r._lastBlurEvent&&r.isInsideNode(r.ref.current,r._lastBlurEvent.target)&&!r.isInsideNode(r.ref.current,document.activeElement)&&r.setState({focused:!1},(function(){document.removeEventListener("focusin",r._onFocusIn),r.props.onBlur(r._lastBlurEvent)}))},r.onFocus=function(e){var t=r.props.onFocus;r.state.focused||r.setState({focused:!0},(function(){document.addEventListener("focusin",r._onFocusIn),t(e)}))},r.onBlur=function(e){e.persist(),r._lastBlurEvent=e},r.isInsideNode=function(e,t){return null!=e&&e.contains(t)},cj(r,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.componentDidMount=function(){null!=document&&document.querySelector("body").setAttribute("tabindex","-1"),this._isMounted=!0},t.prototype.componentWillUnmount=function(){this._isMounted=!1,document.removeEventListener("focusin",this._onFocusIn)},t.prototype.focus=function(){var e=this.ref.current;null!=e&&"function"==typeof e.focus&&e.focus()},t.prototype.render=function(){var e=this.props.children,t=this.state.focused,n={onFocus:this.onFocus,onBlur:this.onBlur};return"function"==typeof e?I().cloneElement(e({focused:t,getRef:this.ref}),n):I().createElement("div",aj({ref:this.ref,style:sj},n),e)},t}(I().Component);uj.propTypes={children:oj().oneOfType([oj().node,oj().func]).isRequired,onBlur:oj().func,onFocus:oj().func},uj.defaultProps={onBlur:function(){},onFocus:function(){}};const lj=uj;var dj,fj,pj,hj=b.ZP.div.withConfig({displayName:"StyledLocationEdit"})(dj||(dj=(0,v.Z)(["\n && {\n ","\n position: relative;\n\n div {\n :nth-of-type(1) {\n flex: 0 0 13ch;\n margin-right: ",";\n }\n\n :nth-of-type(2) {\n flex: 1 1 auto;\n }\n }\n\n > span {\n flex: 0 0 auto;\n margin-right: ",";\n color: ",";\n }\n\n .react-autosuggest__input {\n ","\n width: 100%;\n }\n\n .react-autosuggest__suggestions-container--open {\n width: calc(100% + 17.5px);\n background-color: ",";\n box-shadow: 0 0 6px ",";\n border: 1px solid ",";\n bottom: -9px;\n left: -10px;\n max-height: 300px;\n overflow-y: auto;\n position: absolute;\n transform: translateY(100%);\n z-index: 2; // higher than StyledIndicatorsContainerWrapper\n }\n\n .react-autosuggest__suggestions-list {\n margin: 0;\n padding: 0;\n list-style-type: none;\n }\n\n .react-autosuggest__suggestion {\n cursor: pointer;\n padding: 8px 12px;\n }\n\n .react-autosuggest__suggestion--highlighted {\n background-color: ",";\n }\n }\n"])),oS,x.Z.space(-2),x.Z.space(-2),(function(e){var t=e.immutable,n=e.theme;return t?(0,rf.iy)(nf()(n,"colors.text")):nf()(n,"colors.text")}),aS,w.FS.color("paper"),w.FS.color("signal.info.text"),w.FS.color("secondaryLight"),(function(e){var t=e.theme;return(0,rf.HO)(nf()(t,"colors.paper"),1)}));function mj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function gj(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?mj(Object(n),!0).forEach((function(t){(0,Iv.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mj(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const vj=function(e){var t=e.onChange,n=e.options,r=e.value,o=e.id,i=e.immutable,a=e.name,c=function(e){return function(t){return t[e]}},s=function(e){var t=e.state,n=e.country,r=e.postcode,o=e.city,i=t?"- ".concat(t):"",a=n?"/ ".concat(n.display):"";return(0,S.jsxs)(Zd.ZP.Span,{children:[r," ",o," ",i," ",a]})},u=function(e){return function(n,o){var i=o.newValue;t(gj(gj({},r),{},(0,Iv.Z)({},e,i)))}},l=function(e,n){var r=n.suggestion;t(r)},d=function(e){return function(t){var r=t.value;n.fetchSuggestions((0,Iv.Z)({},e,r),n.locationValues.country)}},f={id:o,value:r.postcode||"",onChange:u("postcode"),disabled:i},p={value:r.city||"",onChange:u("city"),disabled:i};return(0,S.jsx)(lj,{children:function(e){var t,o,u,h=e.focused,m=e.getRef;return(0,S.jsxs)(hj,{immutable:i,name:a,ref:m,children:[(0,S.jsx)(nj(),{suggestions:n.suggestions||[],onSuggestionsFetchRequested:d("postcode"),getSuggestionValue:c("postcode"),renderSuggestion:s,onSuggestionsClearRequested:function(){},inputProps:f,onSuggestionSelected:l,focusInputOnSuggestionClick:!1,shouldRenderSuggestions:function(e){return e&&!i}}),(h||r.city||r.postcode)&&(fj||(fj=(0,S.jsx)(Zd.ZP.Span,{children:"/"}))),(0,S.jsx)(nj(),{suggestions:n.suggestions||[],onSuggestionsFetchRequested:d("city"),getSuggestionValue:c("city"),renderSuggestion:s,onSuggestionsClearRequested:function(){},inputProps:p,onSuggestionSelected:l,focusInputOnSuggestionClick:!1,shouldRenderSuggestions:function(e){return e&&!i}}),(0,S.jsxs)(sS,{children:[n.isLoading&&(pj||(pj=(0,S.jsx)(ik.Z,{size:"1.8rem"}))),(u=n.locationValues,Boolean(u.city||u.postcode)&&(0,S.jsx)(YP.Z,{href:(t=n.locationValues,o=t?Object.values(t).filter(Boolean).map((function(e){return"object"===(0,ej.Z)(e)&&e.display?e.display:e})).join("+"):"","".concat("https://www.google.com/maps/search/?api=1&query=").concat(o)),icon:"map-marked",tabIndex:-1,target:"_blank",dense:!1,title:n.mapButtonTitle||"Show on map",neutral:!0}))]})]})}})};function yj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}const bj=function(e){return(0,S.jsx)(Ik,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?yj(Object(n),!0).forEach((function(t){(0,Iv.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yj(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({id:e.id,isMulti:!0,immutable:e.immutable,onChange:e.onChange,value:e.value},e.options))};function wj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}const Aj=function(e){return(0,S.jsx)(Ik,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?wj(Object(n),!0).forEach((function(t){(0,Iv.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wj(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({id:e.id,isMulti:!0,immutable:e.immutable,onChange:e.onChange,value:e.value,openMenuOnClick:!0},e.options))};function xj(e,t,n,r,o,i,a){try{var c=e[i](a),s=c.value}catch(e){return void n(e)}c.done?t(s):Promise.resolve(s).then(r,o)}var Ej,Oj=a(92546),Cj=a.n(Oj);const kj=b.ZP.input.attrs((function(e){return{type:"tel"}})).withConfig({displayName:"StyledPhoneEdit"})(Ej||(Ej=(0,v.Z)(["\n && {\n ","\n }\n"])),aS);const Sj=function(e){var t=e.onChange,n=e.value,r=e.immutable,o=e.id,i=e.onLibLoaded,c=nf()(e,"options.defaultCountry")||"CH",s=(0,R.useState)(null),u=(0,wd.Z)(s,2),l=u[0],d=u[1],f=I().createRef();(0,R.useEffect)((function(){var e=function(){var e,t=(e=Cj().mark((function e(){var t;return Cj().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([a.e(817),a.e(877)]).then(a.bind(a,80446));case 2:t=e.sent,d(t),i&&i();case 5:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){xj(i,r,o,a,c,"next",e)}function c(e){xj(i,r,o,a,c,"throw",e)}a(void 0)}))});return function(){return t.apply(this,arguments)}}();e()}),[i]);var p=function(e,t){var n=e.substring(0,t-1).match(/\s/g);return(null==n?void 0:n.length)||0},h=n&&null!=l&&l.AsYouType?new l.AsYouType(c).input(n):n||"";return(0,S.jsxs)(iS,{immutable:r,children:[(0,S.jsx)(kj,{disabled:r||!l,id:o,name,onChange:function(e){var r=e.target.value,o=l?l.parseNumber(r,c):r,i=TO()(o)?new l.AsYouType(c).input(r).replace(/\s/g,""):l.formatNumber(o,"E.164");t(i);var a=e.target.selectionStart;!function(e,t,n){if(n&&e.length!==n){var r=new l.AsYouType(c).input(t),o=new l.AsYouType(c).input(e),i=p(r,n),a=p(o,n)-i;window.requestAnimationFrame(function(){var e=n+a;this.setSelectionRange(e,e)}.bind(f.current))}}(r,n,a)},immutable:r||!l,ref:f,value:h}),h&&(0,S.jsx)(sS,{children:(0,S.jsx)(YP.Z,{href:"tel:".concat(n),icon:"phone",tabIndex:-1,neutral:!0})})]})};function Dj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}const Pj=function(e){return(0,S.jsx)(Ik,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Dj(Object(n),!0).forEach((function(t){(0,Iv.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Dj(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({id:e.id,isMulti:!1,immutable:e.immutable,onChange:e.onChange,value:e.value},e.options))};function _j(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}const jj=function(e){return(0,S.jsx)(Ik,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_j(Object(n),!0).forEach((function(t){(0,Iv.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_j(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({immutable:e.immutable,onChange:e.onChange,value:e.value},e.options))};function Tj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}const Rj=function(e){return(0,S.jsx)(Ik,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Tj(Object(n),!0).forEach((function(t){(0,Iv.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Tj(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({id:e.id,immutable:e.immutable,isMulti:!1,onChange:e.onChange,value:e.value,openMenuOnClick:!0},e.options))};const Ij=H.Z.Debouncer((function(e){return(0,S.jsx)(iS,{immutable:e.immutable,children:(0,S.jsx)(l_,{disabled:e.immutable,id:e.id,name:e.name,onChange:function(t){return e.onChange(t.target.value)},immutable:e.immutable,value:e.value||""})})}));const Mj=function(){var e,t=(null===(e=navigator)||void 0===e?void 0:e.userAgent)||"";return/^((?!chrome|android).)*safari/i.test(t)};var Nj,Bj,Zj,Fj=(0,b.iv)(Nj||(Nj=(0,v.Z)(["\n ","\n width: 100%;\n grid-area: 1 / 1 / 2 / 2;\n max-height: 25rem;\n box-sizing: border-box;\n"])),aS),Lj=b.ZP.div.withConfig({displayName:"StyledSizeWrapper"})(Bj||(Bj=(0,v.Z)(["\n display: grid;\n width: 100%;\n\n &:after {\n content: attr(data-replicated-value) ' ';\n white-space: pre-wrap;\n word-break: break-all;\n visibility: hidden;\n ","\n\n /* prevent scrollbar on Firefox */\n padding-right: 15px;\n }\n"])),Fj),Hj=b.ZP.textarea.withConfig({displayName:"StyledTextarea"})(Zj||(Zj=(0,v.Z)(["\n ","\n resize: none;\n margin: 0;\n min-height: 4em;\n"])),Fj);function Uj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function zj(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Uj(Object(n),!0).forEach((function(t){(0,Iv.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Uj(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const Wj=function(e){var t=e.value,n=e.onChange,r=e.name,o=e.id,i=e.disabled,a=e.immutable,c=(0,R.useState)(t),s=(0,wd.Z)(c,2),u=s[0],l=s[1],d=!Mj(),f=(0,R.useCallback)(MO()(l,500,{trailing:!0}),[]);return(0,R.useEffect)((function(){d&&f(t)}),[t,d,f]),(0,S.jsx)(Lj,zj(zj({"data-testid":"replicated-test"},d?{"data-replicated-value":u}:{}),{},{children:(0,S.jsx)(Hj,{value:t,name:r,id:o,onChange:n,disabled:i,immutable:a,rows:"1"})}))};const Vj=H.Z.Debouncer((function(e){return(0,S.jsx)(iS,{immutable:e.immutable,children:(0,S.jsx)(Wj,{id:e.id,immutable:e.immutable,maxRows:20,name:e.name,onChange:function(t){return e.onChange(t.target.value)},disabled:e.immutable,rows:2,value:e.value})})}));var Yj;const qj=b.ZP.input.withConfig({displayName:"StyledTimeEdit"})(Yj||(Yj=(0,v.Z)(["\n && {\n ","\n }\n"])),aS);function Gj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Qj(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Gj(Object(n),!0).forEach((function(t){(0,Iv.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Gj(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const Xj=function(e){var t=e.onChange,n=e.value,r=e.immutable,o=e.id,i=e.name,a=HS(n,t),c=a.inputProps,s=a.clearButtonProps,u=n&&!r;return(0,S.jsxs)(iS,{immutable:r,children:[(0,S.jsx)(qj,Qj({type:"text",disabled:r,id:o,immutable:r,name:i},c)),u&&(0,S.jsx)(sS,{children:(0,S.jsx)(_O.Z,Qj(Qj({icon:"times"},s),{},{tabIndex:-1}))})]})};var Kj;const $j=b.ZP.input.attrs((function(e){return{type:"url"}})).withConfig({displayName:"StyledUrlEdit"})(Kj||(Kj=(0,v.Z)(["\n && {\n ","\n }\n"])),aS);function Jj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function eT(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Jj(Object(n),!0).forEach((function(t){(0,Iv.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Jj(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var tT={boolean:Zk,"boolean-select":Mk,code:qk,date:XS,datetime:JS,document:t_,duration:s_,email:d_,html:m_,integer:J_,location:vj,"multi-remote":bj,"multi-select":Aj,number:$_,phone:Sj,remote:Pj,"search-filter":jj,"single-select":Rj,string:Ij,text:Vj,url:H.Z.Debouncer((function(e){return(0,S.jsxs)(iS,{immutable:e.immutable,children:[(0,S.jsx)($j,{disabled:e.immutable,id:e.id,immutable:e.immutable,name:e.name,onChange:function(t){return e.onChange(((n=(n=t.target.value).toLowerCase()).indexOf(".")>0&&!/^[a-z0-9]+:\/\//.test(n)&&(n="https://".concat(n)),n));var n},value:e.value}),e.value&&(0,S.jsx)(sS,{children:(0,S.jsx)(YP.Z,{href:e.value,icon:"external-link",look:"ball",tabIndex:-1,target:"_blank",neutral:!0})})]})})),time:Xj};const nT=function(e){var t=e.componentType,n=e.value,r=e.options,o=e.id,i=e.events,a=e.placeholder,c=e.readOnly,s=void 0!==c&&c;if(tT[t]){var u=tT[t],l=eT(eT({},Rv()(i,"onChange")),{},{onBlur:function(){"function"==typeof(null==i?void 0:i.onBlur)&&i.onBlur(n)}});return(0,S.jsx)("div",eT(eT({},l),{},{"data-cy":"form-field",children:(0,S.jsx)(u,eT(eT({value:n,onChange:null==i?void 0:i.onChange},TO()(r)?{}:{options:r}),{},{id:o,immutable:s,placeholder:a,events:i}))}))}return console.log("No type-editor defined for component type",t),null};function rT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function oT(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?rT(Object(n),!0).forEach((function(t){(0,Iv.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rT(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const iT=function(e){return(0,S.jsx)(uS,{children:(0,S.jsx)(nT,oT({componentType:e.type},Rv()(e,"type")))})};var aT=a(87486);function cT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function sT(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?cT(Object(n),!0).forEach((function(t){(0,Iv.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cT(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var uT="yyyy-MM-dd",lT=function(e){return MS(e,uT)?(0,TS.default)(e,uT,new Date):MS(e,"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")||MS(e,"yyyy-MM-dd'T'HH:mm:ss.SSSxxx")?(0,bS.default)(new Date(e)):null},dT={number:{icons:{range:"square-plus",single:"square-minus"}},integer:{icons:{range:"square-plus",single:"square-minus"}},datetime:{type:"date",icons:{range:"calendar-plus",single:"calendar-minus"},toRange:function(e){return{from:e?lT(e).toISOString():null,to:e?(0,aT.default)(lT(e),1).toISOString():null,isRangeValue:!0}},fromRange:function(e){return e&&e.from?(0,NS.default)(new Date(e.from),uT):e&&e.to?(0,NS.default)(new Date(e.to),uT):null},getToOptions:function(e,t){return sT(sT({},e),{},{datePickerOptions:sT({minDate:t},null==e?void 0:e.datePickerOptions)})},getFromOptions:function(e,t){return sT(sT({},e),{},{datePickerOptions:sT({maxDate:t},null==e?void 0:e.datePickerOptions)})}},date:{icons:{range:"calendar-plus",single:"calendar-minus"},getToOptions:function(e,t){return sT(sT({},e),{},{datePickerOptions:sT({minDate:t},null==e?void 0:e.datePickerOptions)})},getFromOptions:function(e,t){return sT(sT({},e),{},{datePickerOptions:sT({maxDate:t},null==e?void 0:e.datePickerOptions)})}}};const fT=dT;var pT,hT,mT,gT,vT,yT,bT,wT=b.ZP.div.withConfig({displayName:"StyledInputWrapper"})(pT||(pT=(0,v.Z)(["\n width: calc(100% - 25px); // subtract extender width\n"]))),AT=b.ZP.div.withConfig({displayName:"StyledInputItemWrapper"})(hT||(hT=(0,v.Z)(["\n display: inline-block;\n width: 50%;\n\n * {\n text-align: center;\n }\n"]))),xT=b.ZP.div.withConfig({displayName:"StyledIconWrapper"})(mT||(mT=(0,v.Z)(["\n font-size: ",";\n display: flex;\n align-items: center;\n padding-left: ",";\n padding-right: ",";\n"])),x.Z.font(-2.7),x.Z.space(-.5),x.Z.space(-.9)),ET=b.ZP.div.withConfig({displayName:"StyledRange"})(gT||(gT=(0,v.Z)(["\n display: flex;\n"]))),OT=b.ZP.div.withConfig({displayName:"StyledInput"})(vT||(vT=(0,v.Z)(["\n flex: 1;\n display: flex;\n justify-content: space-between;\n align-items: baseline;\n"]))),CT=b.ZP.div.withConfig({displayName:"StyledExtender"})(yT||(yT=(0,v.Z)(["\n display: flex;\n align-items: center;\n position: relative;\n left: 2px;\n z-index: 1;\n"])));function kT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ST(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?kT(Object(n),!0).forEach((function(t){(0,Iv.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kT(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var DT="expanded_initial",PT="expanded",_T="collapsed";const jT=function(e){var t,n,r=e.value,o=e.events,i=e.readOnly,a=e.type,c=e.options,s=e.fromText,u=e.toText,l=e.expanded?DT:_T,d=(0,R.useState)(l),f=(0,wd.Z)(d,2),p=f[0],h=f[1],m=fT[a];(0,R.useEffect)((function(){var e,t=p===DT&&r&&!r.isRangeValue,n=p===PT&&!(null!=r&&r.isRangeValue),i=p===_T&&(null==r?void 0:r.isRangeValue);t?o.onChange({from:r,to:void 0,isRangeValue:!0}):n?o.onChange((e=r,null!=m&&m.toRange?m.toRange(e):{from:e,to:e,isRangeValue:!0})):i&&o.onChange(function(e){return null!=m&&m.fromRange?m.fromRange(e):(null==e?void 0:e.from)||(null==e?void 0:e.to)||null}(r))}),[p,r,o,m]);var g=(null==r?void 0:r.isRangeValue)||!1,v=(0,R.useRef)(r);v.current=r;var y,b,w=(0,R.useMemo)((function(){return ST(ST({},o),{},{onChange:o.onChange})}),[o]),A={onChange:function(e){o.onChange(ST(ST({},v.current),{},{to:e}))}},x={onChange:function(e){o.onChange(ST(ST({},v.current),{},{from:e}))}},E=(null==m||null===(t=m.icons)||void 0===t?void 0:t.range)||"chevron-down",O=(null==m||null===(n=m.icons)||void 0===n?void 0:n.single)||"chevron-left",C=(null==m?void 0:m.type)||a;return(0,S.jsxs)(ET,{children:[(0,S.jsx)(wT,{children:g?(0,S.jsxs)(OT,{children:[(0,S.jsx)(AT,{children:(0,S.jsx)(iT,ST(ST({},e),{},{options:(y=c,b=r.to,null!=m&&m.getFromOptions?m.getFromOptions(y,b):y),value:(null==r?void 0:r.from)||null,events:x,placeholder:s}))}),bT||(bT=(0,S.jsx)(xT,{children:(0,S.jsx)(B.Z,{icon:"horizontal-rule"})})),(0,S.jsx)(AT,{children:(0,S.jsx)(iT,ST(ST({},e),{},{options:function(e,t){return null!=m&&m.getToOptions?m.getToOptions(e,t):e}(c,r.from),value:(null==r?void 0:r.to)||null,events:A,placeholder:u}))})]}):(0,S.jsx)(iT,ST(ST({type:C},Rv()(e,["type"])),{},{events:w}))}),(0,S.jsx)(CT,{children:(0,S.jsx)(_O.Z,{disabled:i,icon:g?O:E,onClick:function(){h(g?_T:PT)}})})]})};function TT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function RT(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?TT(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):TT(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var IT=function(e){var t,n=e.componentType,r=e.mappingType,o=e.range,i=e.formField,a=e.entityField,c=e.formName,s=e.value,u=e.info,l=e.events,d=e.formData,f=i.dataType||i.componentType,p=null===(t=PO[r||"editable"])||void 0===t?void 0:t[f],h=function(e,t,n,r,o){return null!=e&&e.getOptions?e.getOptions({formField:t,formName:n,formData:r,entityField:o}):{}}(p,i,c,d,a),m=function(e,t,n,r,o,i){return null!=e&&e.getValue?e.getValue({formField:t,formName:n,formData:r,entityField:o,value:i}):i}(p,i,c,d,a,s),g=function(e,t,n,r,o,i){return null!=e&&e.getEvents?e.getEvents({formField:t,formName:n,formData:r,entityField:o,events:i}):i}(p,i,c,d,a,l),v=o?jT:iT;return(0,S.jsx)(v,RT(RT({type:n,events:g,value:m},u),{},{options:h},o&&{fromText:d.intl.formatMessage({id:"client.component.range.from"}),toText:d.intl.formatMessage({id:"client.component.range.to"}),expanded:i.expanded}))};const MT=function(e,t){return function(n){return(0,S.jsx)(IT,RT({componentType:e,range:t},n))}},NT={dataContainerProps:function(){return{tooltips:["Resource"],navigationStrategy:!0}},getOptions:function(e){var t=e.formData;return t?{downloadTitle:t.intl.formatMessage({id:"client.component.upload.downloadTitle"}),tooltips:nf()(t.tooltips,"Resource",null),loadTooltip:function(e){return t.loadTooltip("Resource",e)}}:{}}},BT={getOptions:function(e){var t=e.formField;return{postPointDigits:nf()(t,"validation.decimalDigits.postPointDigits",2)}}},ZT={getOptions:function(e){var t=e.formField;return{postPointDigits:nf()(t,"validation.decimalDigits.postPointDigits",null)}}},FT={getValue:function(e){return e.value/100},getOptions:function(e){var t=e.formField;return{postPointDigits:nf()(t,"validation.decimalDigits.postPointDigits",null)}}},LT={dataContainerProps:function(e){return{tooltips:[e.formField.targetEntity],navigationStrategy:!0}},getOptions:function(e){var t=e.formField,n=e.formData;return{tooltips:nf()(n.tooltips,t.targetEntity,null),loadTooltip:function(e){return n.loadTooltip(t.targetEntity,e)},navigationStrategy:n.navigationStrategy,linkProps:{entityName:t.targetEntity}}}},HT={binary:NT,document:NT,image:NT,"multi-remote-field":LT,"single-remote-field":LT,description:{getOptions:function(e){var t=e.formField;return{mode:t.mode,title:t.title}},getValue:function(e){return e.formField.text}},number:ZT,moneyamount:BT,percent:FT};function UT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function zT(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?UT(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):UT(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var WT=function(e){var t=e.componentType,n=e.formField,r=e.value,o=e.formData,i=e.key,a=e.breakWords,c=n.dataType||n.componentType,s=HT[c],u=function(e,t,n){return null!=e&&e.getOptions?e.getOptions({formField:t,formData:n}):{}}(s,n,o),l=function(e,t,n,r){return null!=e&&e.getValue?e.getValue({formField:t,formData:n,value:r}):r}(s,n,o,r);return(0,S.jsx)(nl.Z,{type:t,value:l,options:u,breakWords:a},i)};const VT=function(e){return function(t){return(0,S.jsx)(WT,zT(zT({},t),{},{componentType:e}))}};function YT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function qT(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?YT(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):YT(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var GT={binary:MT("document"),birthdate:MT("date"),boolean:MT("boolean"),char:MT("string"),code:MT("code"),count:MT("string"),counter:MT("integer"),createts:MT("datetime"),createuser:MT("string"),"compressed-text":MT("text"),date:MT("date"),datetime:MT("datetime"),decimal:MT("number"),display:VT("html"),description:VT("description"),document:MT("document"),double:MT("number"),duration:MT("duration"),email:MT("email"),"fulltext-search":MT("string"),html:MT("html"),image:MT("document"),identifier:MT("string"),integer:MT("integer"),ipaddress:MT("string"),latitude:MT("string"),location:MT("location"),login:MT("string"),long:MT("integer"),longitude:MT("string"),marking:MT("boolean"),moneyamount:MT("number"),"multi-remote-field":MT("multi-remote"),"multi-select-box":MT("multi-select"),"named-upload":MT("document"),percent:MT("number"),phone:MT("phone"),postcode:MT("string"),"pulldown-date":MT("date"),"search-filter":MT("search-filter"),serial:MT("string"),"single-remote-field":MT("remote"),"single-select-box":MT("single-select"),sorting:MT("integer"),string:MT("string"),text:MT("text"),"text-area":MT("text"),time:MT("time"),updatets:MT("datetime"),updateuser:MT("string"),upload:MT("document"),url:MT("url"),uuid:MT("string"),version:MT("integer")},QT={binary:VT("document"),birthdate:VT("date"),boolean:VT("boolean"),code:VT("text"),char:VT("string"),counter:VT("integer"),createuser:VT("string"),createts:VT("datetime"),"compressed-text":VT("text"),"data-amount":VT("number"),date:VT("date"),datetime:VT("datetime"),decimal:VT("number"),display:VT("html"),description:VT("description"),duration:VT("duration"),document:VT("document"),double:VT("number"),email:VT("email"),html:VT("html"),image:VT("document"),ipaddress:VT("string"),identifier:VT("string"),latitude:VT("string"),login:VT("string"),long:VT("integer"),longitude:VT("string"),moneyamount:VT("number"),"multi-remote-field":VT("multi-remote"),"multi-select-box":VT("multi-select"),"named-upload":VT("document"),integer:VT("integer"),percent:VT("percent"),phone:VT("phone"),postcode:VT("string"),"pulldown-date":VT("date"),remote:VT("remote"),"search-filter":VT("search-filter"),serial:VT("string"),"single-remote-field":VT("remote"),"single-select-box":VT("single-select"),sorting:VT("integer"),string:VT("string"),text:VT("text"),"text-area":VT("text"),time:VT("time"),updatets:VT("datetime"),updateuser:VT("string"),upload:VT("document"),url:VT("url"),uuid:VT("string"),version:VT("integer")};const XT={editable:GT,readOnly:QT,list:qT(qT({},QT),{},{binary:VT("document-compact"),document:VT("document-compact"),image:VT("document-compact")}),search:qT(qT({},GT),{},{text:MT("string"),birthdate:MT("date",!0),code:VT("text",!0),date:MT("date",!0),updatets:MT("datetime",!0),createts:MT("datetime",!0),datetime:MT("datetime",!0),moneyamount:MT("number",!0),percent:MT("number",!0),long:MT("integer",!0),integer:MT("integer",!0),decimal:MT("number",!0),counter:MT("integer",!0),time:MT("time",!0),boolean:MT("boolean-select"),marking:MT("boolean-select")})};var KT;const $T={factory:function(e,t){return XT[e]&&XT[e][t]?XT[e][t]:(ol.Z.log("Unable to display field: unknown mapping type combination (".concat(e," / ").concat(t,")")),function(){return KT||(KT=(0,S.jsx)("span",{}))})},editableComponentConfigs:PO,formattedComponentConfigs:HT};var JT;const eR=function(){return JT||(JT=(0,S.jsx)(Zd.ZP.Span,{children:", "}))};var tR=["multi-select-box","multi-remote-field","search-filter"],nR=function(e,t){return Array.isArray(e)&&!tR.includes(t)},rR=function(e){return e.reduce((function(e,t,n){return[].concat(z()(e),z()(e.length>0?[(0,S.jsx)(eR,{},"sep".concat(n))]:[]),[t])}),[])};const oR=function(e){var t=e.fieldMappingType,n=e.formName,r=e.formField,o=e.entityField,i=e.value,a=e.info,c=e.events,s=e.formData,u=r.dataType||r.componentType,l=(0,R.useMemo)((function(){return $T.factory(t,u)}),[t,u]);return nR(i,r.dataType)?rR(i.map((function(e,i){return(0,S.jsx)(l,{formField:r,entityField:o,formName:n,mappingType:t,value:e,info:a,events:c,formData:s},"valueField-"+r.id+i)}))):(0,S.jsx)(l,{formField:r,entityField:o,formName:n,mappingType:t,value:i,info:a,events:c,formData:s})};var iR,aR=a(37188);const cR=(0,b.ZP)(aR.hc).withConfig({displayName:"StyledSignalList"})(iR||(iR=(0,v.Z)(["\n && {\n list-style-type: none;\n }\n"])));const sR=function(e){return(0,S.jsx)(cR,{as:"ul",children:I().Children.map(e.children,(function(e){return I().cloneElement(e)}))})};var uR,lR,dR=(uR={},(0,Iv.Z)(uR,zP.Z.condition.BASE,"inherit"),(0,Iv.Z)(uR,zP.Z.condition.DANGER,Jm.Z.color("signal.danger.text")),(0,Iv.Z)(uR,zP.Z.condition.PRIMARY,(function(e){return(0,rf.HO)(nf()(e.theme,"colors.primary"),1)})),(0,Iv.Z)(uR,zP.Z.condition.SUCCESS,Jm.Z.color("signal.success.text")),(0,Iv.Z)(uR,zP.Z.condition.WARNING,Jm.Z.color("signal.warning.text")),(0,Iv.Z)(uR,zP.Z.condition.INFO,Jm.Z.color("signal.info.text")),uR),fR=(0,b.ZP)(aR.EF).withConfig({displayName:"StyledSignalListItem"})(lR||(lR=(0,v.Z)(["\n && {\n color: ",";\n position: relative;\n\n > i,\n > svg {\n position: absolute;\n left: -1.6rem;\n text-align: left;\n }\n\n > svg {\n top: 0.2em;\n }\n }\n"])),(function(e){return function(e){return dR[e.condition]||"inherit"}(e)}));fR.propTypes={condition:zP.Z.conditionPropTypes(dR)};const pR=fR;var hR,mR,gR=(hR={},(0,Iv.Z)(hR,zP.Z.condition.BASE,!1),(0,Iv.Z)(hR,zP.Z.condition.PRIMARY,!1),(0,Iv.Z)(hR,zP.Z.condition.DANGER,"times"),(0,Iv.Z)(hR,zP.Z.condition.SUCCESS,"check"),(0,Iv.Z)(hR,zP.Z.condition.WARNING,"exclamation-triangle"),(0,Iv.Z)(hR,zP.Z.condition.INFO,"info"),hR),vR=function(e){var t=gR[e.condition];return t?(0,S.jsx)(B.Z,{icon:t,position:zP.Z.position.SOLE}):mR||(mR=(0,S.jsx)("i",{children:"•"}))},yR=function(e){return(0,S.jsxs)(pR,{condition:e.condition,children:[vR(e),e.label,I().Children.map(e.children,(function(e){return I().cloneElement(e)}))]})};yR.defaultProps={condition:zP.Z.condition.BASE};const bR={List:sR,Item:yR};const wR=function(e){if(!e.error)return null;var t=[];return Object.keys(e.error).forEach((function(n){t.push.apply(t,(0,RO.Z)(e.error[n]))})),(0,S.jsx)(bR.List,{children:t.map((function(e,t){return(0,S.jsx)(bR.Item,{condition:"danger",label:e},t)}))})};var AR,xR,ER,OR,CR,kR,SR,DR=a(79686),PR="1.1px",_R=function(e){var t=e.isDisplay,n=e.immutable;return"cursor: ".concat(!t&&n?"not-allowed":"auto",";")},jR=b.ZP.div.withConfig({displayName:"StyledLabelWrapper"})(AR||(AR=(0,v.Z)(["\n width: calc(100% - ",");\n"])),x.Z.space(.5)),TR=b.ZP.label.withConfig({displayName:"StyledStatedValueLabel"})(xR||(xR=(0,v.Z)(["\n &&& {\n ","\n background-color: ",";\n color: ",";\n left: ",";\n margin: calc("," / -2) 0 0;\n padding: 0 "," 0 ","; // if immutable remove left padding\n position: absolute;\n width: auto;\n height: calc("," + 1px);\n overflow: hidden;\n top: 0;\n pointer-events: auto;\n ","\n\n span {\n white-space: nowrap;\n }\n }\n"])),(0,A.Z)({fontWeight:function(e){return e.dirty?Jm.Z.fontWeight("bold"):Jm.Z.fontWeight("regular")},lineHeight:Jm.Z.lineHeight("dense")}),Jm.Z.color("paper"),(function(e){return PP[function(e){var t=e.isDisplay,n=e.immutable,r=e.signal,o=e.hasValue;return r?"signal":o?"hasValue":t?"shade1":n?"shade0":"shade1"}(e)](e)}),x.Z.space(-2),x.Z.font(0),x.Z.space(-2),(function(e){return e.immutable&&"0"}),x.Z.font(0),(function(e){return _R(e)})),RR=b.ZP.div.withConfig({displayName:"StyledStatedValueBox"})(ER||(ER=(0,v.Z)(["\n &&& {\n border: "," solid ",";\n padding: "," "," "," ",";\n position: relative;\n margin-top: ",";\n padding-left: ",";\n padding-top: ",";\n ","\n ","\n\n * {\n padding-left: ",";\n margin-bottom: 0;\n }\n\n > "," {\n padding-top: ",";\n position: relative;\n top: 5px;\n\n p:first-of-type {\n margin-top: 0;\n }\n }\n }\n"])),PR,(function(e){return _P[function(e){var t=e.immutable,n=e.isDisplay,r=e.signal;return e.isDirty?"isDirty":n||t?"transparent":r?"signal":"shade1"}(e)](e)}),x.Z.space(-1),x.Z.space(-1),x.Z.space(-2),x.Z.space(-1),(function(e){return e.isDisplay&&x.Z.space(-1)}),(function(e){return e.immutable&&x.Z.space(-2)}),(function(e){var t=e.isDisplay,n=e.immutable;return t&&n&&x.Z.space(-1)}),(function(e){return!e.immutable&&(0,rf.kk)(e)}),(function(e){return _R(e)}),(function(e){return e.isDisplay&&"0"}),DR.j,(function(e){return e.isDisplay&&x.Z.space(-1)})),IR=b.ZP.p.withConfig({displayName:"StyledStatedValueDescription"})(OR||(OR=(0,v.Z)(["\n &&& {\n ","\n }\n"])),(0,A.Z)({fontSize:x.Z.font(-1)})),MR=b.ZP.div.withConfig({displayName:"StyledStatedValueError"})(CR||(CR=(0,v.Z)([""]))),NR=b.ZP.div.withConfig({displayName:"StyledStatedValueWrapper"})(kR||(kR=(0,v.Z)(["\n &&& {\n margin-bottom: ",";\n padding-top: ",";\n\n ",",\n ",",\n "," {\n margin-bottom: ",";\n\n &:last-child {\n margin-bottom: 0;\n }\n }\n\n ",",\n "," {\n margin-left: calc("," + ",");\n\n "," {\n margin-left: -",";\n }\n }\n }\n"])),x.Z.space(-1),x.Z.space(-1.5),RR,IR,MR,x.Z.space(-2),IR,MR,x.Z.space(-1),PR,aR.hc,x.Z.space(-2));b.ZP.input.withConfig({displayName:"StyledInput"})(SR||(SR=(0,v.Z)(["\n border: 0;\n cursor: ",";\n color: ",";\n outline: 0;\n transition: color 200ms;\n width: 100%;\n"])),(function(e){var t=e.args;return t.immutable&&!t.isDisplay?"not-allowed":"auto"}),(function(e){var t=e.args;return t.immutable&&!t.isDisplay?"#545454":"#000"}));function BR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ZR(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?BR(Object(n),!0).forEach((function(t){(0,Iv.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):BR(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const FR=function(e){var t,n,r,o=e.children,i=e.description,a=e.dirty,c=e.isDisplay,s=e.error,u=e.hasValue,l=e.id,d=e.label,f=e.mandatory,p=e.mandatoryTitle,h=e.immutable,m=e.touched,g=e.signal,v=!h&&m&&s&&Object.keys(s).length>0,y="".concat(UE.Z.adjustedHTMLString(d)).concat(f&&p?", ".concat(p):""),b=g||function(e,t,n,r){return t?zP.Z.condition.DANGER:e?zP.Z.condition.INFO:n&&!r?zP.Z.condition.WARNING:void 0}(a,v,f,u),w={__html:"".concat(hk.Z.sanitizeHtml(d)).concat(f?" *":"")},A=!c&&!h&&{htmlFor:l};return(0,S.jsx)(lj,{children:function(e){var l=e.getRef;return(0,S.jsxs)(NR,{ref:l,children:[(0,S.jsxs)(RR,{hasValue:u,immutable:h,isDisplay:c,signal:b,children:[o,d&&(0,S.jsx)(jR,{children:(0,S.jsx)(TR,ZR(ZR({},A),{},{hasValue:u,dirty:a,title:y,immutable:h,isDisplay:c,signal:b,children:t||(t=(0,S.jsx)("span",{dangerouslySetInnerHTML:w}))}))})]}),i&&(n||(n=(0,S.jsx)(IR,{children:i}))),v&&(r||(r=(0,S.jsx)(MR,{children:(0,S.jsx)(wR,{error:s})})))]})}})};function LR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function HR(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?LR(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):LR(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const UR=function(e){var t=e.typeEditable,n=e.value,r=e.formData,o=e.formField,i=e.dirty,a=e.error,c=e.children,s=t&&t.hasValue?t.hasValue({formValues:r.formValues,formField:o,value:n}):null!=n&&!1!==n&&(void 0===n.length||n.length>0);return(0,S.jsx)(FR,HR(HR({},e),{},{dirty:r.isDirty||i,error:r.errors||a,hasValue:s,children:I().cloneElement(c,{formData:r})}))};var zR;function WR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function VR(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?WR(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):WR(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var YR=["display","description"];const qR=function(e){var t=e.fieldMappingType,n=e.data,r=e.resources,o=void 0===r?{}:r;try{var i,a,c=n.formDefinitionField,s=n.entityField,u=n.id,l=n.value,d=n.dirty,f=n.touched,p=n.events,h=n.error,m=n.submitting,g=n.parentReadOnly,v=n.formName,y=n.mode,b=c.componentType,w=c.dataType,A=c.readonly,x=g||A||m||!nf()(s,"writable",!0),E=function(e,t,n,r){return!!r||!!YR.includes(t)||!!nR(e,n)}(l,b,w,g),O=c.dataType||c.componentType,C=null===(i=$T.editableComponentConfigs[t])||void 0===i?void 0:i[O];C&&C.dataContainerProps&&(a=C.dataContainerProps({formField:c,formName:v}));var k=nf()(c,"validation.mandatory",!1);C&&C.getMandatoryValidation&&(k=C.getMandatoryValidation({formField:c})||!1);var D=!x&&k&&"search"!==y,P=C&&C.fixLabel&&C.fixLabel();return(0,S.jsx)(yN.FormDataContainer,VR(VR({},a),{},{children:(0,S.jsx)(UR,{typeEditable:C,dirty:d,error:h,value:l,id:u,immutable:x,isDisplay:E,label:c.label,mandatory:D,mandatoryTitle:o.mandatoryTitle,touched:f,fixLabel:P,formField:c,children:(0,S.jsx)(oR,{fieldMappingType:E?"readOnly":t,formName:v,formField:c,entityField:s,value:l,info:{id:u,readOnly:x,mandatory:D},events:p})},u)}))}catch(e){return ol.Z.logError("Error creating formField",e),zR||(zR=(0,S.jsx)("span",{}))}},GR={FormField:qR,MultipleFieldsSeparator:eR,isMultipleFields:nR,enhanceMultipleFieldsWithSeparators:rR};const QR=(0,P.ZP)((function(e){var t=e.input,n=e.meta,r=n.dirty,o=n.touched,i=n.error,a=n.submitting,c=e.id,s=e.formDefinitionField,u=e.entityField,l=e.parentReadOnly,d=e.formName,f=e.mode,p=function(e){return Rv()(e,["name","value"])}(t),h={formDefinitionField:s,id:c,formName:d,value:t.value,dirty:r,touched:o,submitting:a,events:p,error:i,entityField:u,parentReadOnly:l,mode:f},m={mandatoryTitle:e.intl.formatMessage({id:"client.component.form.mandatoryFieldTitle"})};return(0,S.jsx)(GR.FormField,{fieldMappingType:e.fieldMappingType,data:h,resources:m})}));function XR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function KR(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?XR(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):XR(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function $R(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return JR(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return JR(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){c=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(c)throw i}}}}function JR(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var eI=function(e,t){return!e||!t||0===t.length||t.includes(e)},tI=function(e){var t=e.componentMapping,n=e.entity,r=e.mode,o=e.beforeRenderField,i=e.formDefinition,a=e.formValues,c=e.formName,s=e.fieldMappingType,u=e.customRenderedActions,l=e.readonly,d=function(e){var n,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=[],i=$R(e);try{for(i.s();!(n=i.n()).done;){var a=n.value;if(a.componentType===gw.LAYOUT)o.push(h(a,a.layoutType,r));else if(oh(a.componentType))o.push(p(a));else if(a.componentType===gw.FIELD_SET)o.push(f(a,r,e));else if(t&&t[a.componentType])return m(a)}}catch(e){i.e(e)}finally{i.f()}return o},f=function(e,t,i){var u=Nw(e);if(!u)return null;var l=KR(KR({},u),{},{siblings:i.map(Nw).filter(Boolean)}),d=l.path||l.id,f="paths.".concat(d.split(".").join(".value.paths.")).split("."),p=nf()(n,f);return function(e){var t=e.formDefinitionField,n=e.formDefinition,r=e.entityField,o=e.parentReadOnly,i=e.beforeRenderField,a=e.fieldName,c=e.formValues,s=e.mode,u=e.fieldMappingType;if(!eI(s,t.scopes))return!1;if(t.hidden)return!1;if(i&&!i(a))return!1;if("search"===u)return!0;var l=Dw(a);return!((o||n.readonly||r&&!1===r.writable||"create"!==s&&!r&&"description"!==t.componentType&&"location"!==t.dataType||t.readonly||"display"===t.componentType)&&function(){if(Object.prototype.hasOwnProperty.call(c||{},l)){var e=c[l];return null==e||""===e||Array.isArray(e)&&0===e.length}return!0}())}({parentReadOnly:t,formDefinition:u,formDefinitionField:l,entityField:p,beforeRenderField:o,fieldName:d,formValues:a,mode:r,fieldMappingType:s})?(0,S.jsx)(dE,{parentReadOnly:t,name:Dw(d),id:bw(c,d),formName:c,component:QR,formDefinitionField:l,entityField:p,fieldMappingType:s,format:null,mode:r},"field-".concat(d)):null},p=function(t){var n=nf()(e,"entity.model"),o=nf()(e,"entity.key");return(0,S.jsx)(VE,{action:t,entityKey:o,entityName:n,mode:r,customRenderedActions:u},"action-".concat(t.id))},h=function(e,t,n){var r,o=d(e.children,n||e.readonly);if(Array.isArray(o)&&(o=o.filter(Boolean)),!o||Array.isArray(o)&&0===o.length)return null;var i=e.label?(0,S.jsxs)(jE.Wrapper,{isFramed:!0,isOpen:!0,children:[(0,S.jsx)(jE.Header,{children:(0,S.jsx)(Zd.ZP.H4,{children:e.label})}),(0,S.jsx)(jE.Body,{children:o})]}):o,a=(r={},L()(r,$w.HORIZONTAL_BOX,LE.Container),L()(r,$w.VERTICAL_BOX,LE.Box),r)[t],c="layoutcomponent-".concat(e.id,"-").concat(e.layoutType);return a?(0,S.jsx)(a,{occupiesRemainingHeight:e.occupiesRemainingHeight,children:i},c):(ol.Z.logWarning('Layout type "'.concat(t,'" for box "').concat(e.id,'" is unknown.')),null)},m=function(e){if(!eI(r,e.scopes))return null;var n="custom-component-".concat(e.id,"-").concat(e.layoutType);return(0,t[e.componentType])(e,n)};return d(i.children,l||i.readonly)},nI=function(e,t){return 0===Object.keys(UE.Z.difference(e,t)).length};const rI=I().memo(tI,nI);function oI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function iI(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?oI(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oI(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var aI="main-action-bar",cI="action-bar",sI="action-group",uI="layout",lI="table",dI="createcopy",fI=function e(t,n){return iI(iI({},t),{},{children:t.children.filter((function(e){return e.componentType===uI||e.componentType===lI||!n(e,t)})).map((function(t){return t.componentType===uI||t.componentType===lI?e(t,n):t}))})},pI=function e(t,n,r){return iI(iI({},t),{},{children:t.children.map((function(t){return t.componentType===cI||t.componentType===sI?e(t,n,r):t})).map((function(e){return"action"===e.componentType&&n.includes(e.id)?r(e):e})).filter((function(e){return e})).filter((function(e){var t;return e.componentType!==cI&&e.componentType!==sI||(null===(t=e.children)||void 0===t?void 0:t.length)>0}))})},hI=function(e){if(e.children.filter((function(e){return e.id===aI})).length>0)return e;var t={id:aI,componentType:cI,children:[]};return iI(iI({},e),{},{children:[t].concat(z()(e.children))})};function mI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function gI(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?mI(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mI(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var vI=function e(t,n){return n.id===t?Nw(n):n.children&&0!==n.children.length?n.children.reduce((function(n,r){return n||e(t,r)}),null):null};const yI={location:function(e,t,n,r){var o=t.locationMapping,i=vI(o.city,n),a=vI(o.postcode,n),c=SI(i,r[Dw(i.path)],{}),s=SI(a,r[Dw(a.path)],{});return Bw(c)||Bw(s)?L()({},t.id,gI(gI({},c[i.path]),s[a.path])):{}}};var bI,wI,AI=a(23065),xI=a.n(AI),EI=a(38186),OI=a.n(EI),CI=function(e){return null!=e};const kI={"length.fromIncluding":function(e,t){return CI(t)&&e.length<t?{minLength:[(0,S.jsx)(fd.Z,{id:"client.component.form.syncValidationMinLength",values:{minLength:t}},"syncValidationMinLength")]}:null},"length.toIncluding":function(e,t){return CI(t)&&e.length>t?{maxLength:[(0,S.jsx)(fd.Z,{id:"client.component.form.syncValidationMaxLength",values:{maxLength:t}},"syncValidationMaxLength")]}:null},"numberRange.fromIncluding":function(e,t){return CI(t)&&e<t?{maxNumber:[(0,S.jsx)(fd.Z,{id:"client.component.form.syncValidationMinNumber",values:{minValue:t}},"syncValidationMaxNumber")]}:null},"numberRange.toIncluding":function(e,t){return CI(t)&&e>t?{maxNumber:[(0,S.jsx)(fd.Z,{id:"client.component.form.syncValidationMaxNumber",values:{maxValue:t}},"syncValidationMaxNumber")]}:null},"decimalDigits.postPointDigits":function(e,t){return e.toString().includes(".")&&e.toString().split(".")[1].length>t?{prePoint:[(0,S.jsx)(fd.Z,{id:"client.component.form.syncValidationPrePoint",values:{limit:t}},"syncValidationPrePoint")]}:null},"decimalDigits.prePointDigits":function(e,t){return t>0&&e.toString().split(".")[0].length>t?{prePoint:[(0,S.jsx)(fd.Z,{id:"client.component.form.syncValidationPrePoint",values:{limit:t}},"syncValidationPrePoint")]}:null},"regex.pattern":function(e,t){return RegExp(t).test(e)?null:{prePoint:[(0,S.jsx)(fd.Z,{id:"client.component.form.syncValidationRegexPattern",values:{pattern:t}},"syncValidationRegexPattern")]}},email:function(e){return xI()(e)?null:{format:[bI||(bI=(0,S.jsx)(fd.Z,{id:"client.component.form.invalidEmail"},"invalidEmail"))]}},url:function(e){return OI()(e)||e.includes("localhost")&&OI()(e,{require_tld:!1})?null:{format:[wI||(wI=(0,S.jsx)(fd.Z,{id:"client.component.form.invalidUrl"},"invalidUrl"))]}}};var SI=function(e,t){var n={};return Uw(t)?Object.keys(kI).forEach((function(r){if(Fw()(e,["validation"].concat(z()(r.split("."))))){var o=nf()(e,["validation"].concat(z()(r.split(".")))),i=(0,kI[r])(t,o);i&&(n=pw.addErrors(n,e.path,i))}})):e.validation&&e.validation.mandatory&&(n=pw.addErrors(n,e.path,zw)),n},DI=function(e,t,n,r){var o=r.dataType,i=yI[o];return i?i(n,r,t,e):{}};function PI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _I(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?PI(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):PI(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const jI=function(e,t){return function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.reduce((function(e,r){var o=n[r.path];return _I(_I(_I({},e),SI(r,o)),DI(n,t,o,r))}),{})}};var TI=function(e){var t=e.fieldDefinitions,n=e.formDefinition,r=(0,R.useRef)(null);return r.current||TO()(t)||(r.current=jI(t,n)),r.current},RI=function(e){var t=e.formInitialValues,n=e.fieldDefinitions,r=e.formDefinition,o=e.mode;return function(e){return Kw(e,"create"===o?{}:t,n,r,o)}},II=function(e){var t=e.submitForm;return{onSubmit:function(e){e.preventDefault(),t()},onKeyDown:function(e){"Enter"===e.key&&"TEXTAREA"!==e.target.tagName&&e.preventDefault()}}};function MI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function NI(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?MI(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):MI(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const BI={getFormErrors:function(e){return function(t){return NI(NI(NI(NI({},sx(e)(t)),ax(e)(t)),cx(e)(t)),{},{_error:(n=e,function(e){return nf()(e,"form.".concat(n,".error"),{})})(t)});var n}}};var ZI=Zf().mark(UI),FI=Zf().mark(VI);function LI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function HI(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?LI(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):LI(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function UI(e,t){var n;return Zf().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(n=e.reduce((function(e,n){var r=n.id,o=n.value,i=nf()(t,["paths",r]);if(i&&"relation"===i.type){var a=i.targetEntity,c=Array.isArray(o)?o:[o];return HI(HI({},e),{},L()({},a,[].concat(z()(e[a]||[]),z()(c))))}return e}),{}),0!==Object.keys(n).length){r.next=3;break}return r.abrupt("return",null);case 3:return r.next=5,(0,Ff.RE)(uh.Z.fetchDisplays,n);case 5:return r.abrupt("return",r.sent);case 6:case"end":return r.stop()}}),ZI)}var zI=function(e,t,n){return{key:e,display:nf()(t,[n,e],"??")}},WI=function(e,t,n){if(t&&"relation"===t.type){var r=t.targetEntity;return t.multi?e.map((function(e){return zI(e,n,r)})):zI(e,n,r)}return e};function VI(e,t){var n;return Zf().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,(0,Ff.RE)(UI,e,t);case 2:return n=r.sent,r.abrupt("return",e.reduce((function(e,r){var o=r.id,i=r.value,a=nf()(t,["paths",o]);return HI(HI({},e),{},L()({},o,WI(i,a,n)))}),{}));case 4:case"end":return r.stop()}}),FI)}const YI={formErrorsUtil:pw,FormBuilder:rI,getFieldId:bw,getFieldDefinitions:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return Aw(e,t)},getDefaultValues:function(e){return e.filter((function(e){return null!==e.defaultValue&&void 0!==e.defaultValue})).reduce((function(e,t){return yw(yw({},e),{},L()({},t.path||t.id,t.defaultValue))}),{})},getUsedPaths:function(e){return wb()(e.filter((function(e){return e.componentType===gw.FIELD})).reduce((function(e,t){return[].concat(z()(e),z()(xw[t.dataType]?xw[t.dataType](t).paths:[t.path||t.id]))}),[]))},formValuesToFlattenEntity:_w,entityToFormValues:function(e,t){return function(e,t){return t.filter((function(e){return e.componentType===gw.FIELD})).reduce((function(e,t){if(xw[t.dataType]){var n=xw[t.dataType](t).mapping,r=Ow({},Object.keys(n).reduce((function(t,r){var o=n[r];return Ow(Ow({},t),e[o]?L()({},r,e[o]):{})}),{}));return Ow(Ow({},e),Cw(r)?{}:L()({},t.path||t.id,r))}return e}),e)}(Om()(e,(function(e,t,n){return Ow(Ow({},e),{},L()({},Dw(n),t))}),{}),t)},getDirtyFormValues:jw,validationErrorToFormError:kw,transformFieldName:Dw,transformFieldNameBack:Pw,syncValidation:jI,componentTypes:gw,layoutTypes:$w,scopes:Jw,validators:{syncValidators:kI,asyncTypeValidators:Hw,syncTypeValidators:yI,mandatoryError:zw,valueDefined:Uw},transformInputValues:VI,asyncValidation:Kw,submitValidation:function(e,t,n,r,o){return Xw(e,t,n,r,o).then((function(e){if(Bw(e))throw new tw(e)}))},isValueEmpty:Tw,typeFieldMapping:xw,sagas:n,sagasUtils:t,addToStore:function(e,t){e.sagaMiddleware.run(jx,t)},ErrorItem:eA,hooks:r,selectors:BI,addCreate:function(e,t){if(e.id.endsWith("_create"))return e;var n=hI(e),r={id:"new",label:t.formatMessage({id:"client.actions.create"}),componentType:"action",children:[],actionType:"custom",useLabel:"YES",buttonType:"REGULAR",icon:"plus"};return iI(iI({},n),{},{children:n.children.map((function(e){return e.id===aI?e.children.some((function(e){return dI===e.id}))?e:iI(iI({},e),{},{children:[r].concat(z()(e.children))}):e}))})},addBack:function(e,t){var n=hI(e),r={id:"back",label:t.formatMessage({id:"client.actions.back"}),componentType:"action",children:[],actionType:"custom",useLabel:"YES",buttonType:"REGULAR",icon:"arrow-left"};return iI(iI({},n),{},{children:n.children.map((function(e){return e.id===aI?iI(iI({},e),{},{children:[r].concat(z()(e.children))}):e}))})},addReports:function(e,t){if(0===(null==t?void 0:t.length))return e;var n=hI(e),r=[dI,"delete","save"];return iI(iI({},n),{},{children:n.children.map((function(e){return e.id===aI?iI(iI({},e),{},{children:[].concat(z()(e.children.filter((function(e){return r.includes(e.id)}))),z()(t),z()(e.children.filter((function(e){return!r.includes(e.id)}))))}):e}))})},removeBoxes:function e(t,n){return iI(iI({},t),{},{children:t.children.filter((function(e){return e.componentType!==uI||!n.includes(e.id)})).map((function(t){return t.componentType===uI?e(t,n):t}))})},removeFields:function(e,t){return fI(e,(function(e){return t.includes(e.id)}))},removeFieldsByPredicate:fI,removeActions:function(e,t){return pI(e,t,(function(){return!1}))},adjustActions:pI};function qI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function GI(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qI(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qI(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var QI=Zf().mark(JI),XI=Zf().mark(eM),KI=Zf().mark(tM),$I=Zf().mark(nM);function JI(){return Zf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Ff.$6)([(0,Ff.ib)(Fb,tM)]);case 2:case"end":return e.stop()}}),QI)}function eM(e){var t,n;return Zf().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,(0,Ff.RE)(Lm.getDisplayRequest,e);case 2:return t=r.sent,r.next=5,(0,Ff.RE)(uh.Z.fetchDisplays,t,"remote");case 5:return n=r.sent,r.abrupt("return",e.map((function(e){return GI(GI({},e),{},{display:n[e.model][e.key]})})));case 7:case"end":return r.stop()}}),XI)}function tM(e){var t,n,r,o,i,a,c,s,u,l,d,f,p;return Zf().wrap((function(h){for(;;)switch(h.prev=h.next){case 0:return t=e.payload,n=t.fieldName,r=t.entityName,o=t.options,i=void 0===o?{}:o,h.next=3,(0,Ff.Ys)(aM,n);case 3:if(a=h.sent,cM(a)&&!i.forceReload){h.next=29;break}return h.next=7,(0,Ff.RE)(nM,r,i);case 7:return c=h.sent,s=(null==a?void 0:a.searchTerm)!==c.searchTerm,h.next=11,(0,Ff.gz)(Ub(n,s));case 11:return h.next=13,(0,Ff.RE)(sM,c);case 13:return u=h.sent,l={method:"GET"},h.next=17,(0,Ff.RE)(uh.Z.fetchModel,r);case 17:return d=h.sent,"boolean"===nf()(d,"paths.active.type")&&(u.where=u.where?"".concat(u.where," and active"):"active"),h.next=21,(0,Ff.RE)(uh.Z.fetchEntities,r,u,l);case 21:return f=h.sent,h.next=24,(0,Ff.RE)(eM,f);case 24:return f=(f=h.sent).map((function(e){return xm()(e,Lm.relevantRelationAttributes)})),p=!!c.limit&&f.length>c.limit,h.next=29,(0,Ff.gz)(zb(n,c.limit?f.splice(0,c.limit):f,p,c.searchTerm));case 29:case"end":return h.stop()}}),KI)}function nM(e,t){var n,r,o,i,a,c;return Zf().wrap((function(s){for(;;)switch(s.prev=s.next){case 0:if(!t.loadRemoteFieldConfiguration||t.constriction&&t.sorting){s.next=7;break}return n=t.formName,r=t.formBase,o=t.constriction,i=t.sorting,a=n?"".concat(e,"_").concat(n):r||e,s.next=5,(0,Ff.RE)(uh.Z.fetchForm,a,"remotefield");case 5:return c=s.sent,s.abrupt("return",GI(GI({},t),{},{constriction:o||oM(c),sorting:i||rM(c)||[{field:"update_timestamp",order:"desc"}]}));case 7:return s.abrupt("return",t);case 8:case"end":return s.stop()}}),$I)}var rM=function(e){var t=iM(e);return(null==t?void 0:t.sorting)||null},oM=function(e){var t=iM(e);return(null==t?void 0:t.constriction)||null},iM=function(e){return e.children.find((function(e){return e.componentType===YI.componentTypes.TABLE}))},aM=function(e,t){return e.formData.relationEntities.data[t]},cM=function(e){var t;return!(null==e||null===(t=e.data)||void 0===t||!t.length)>0},sM=function(e){return GI(GI(GI(GI(GI(GI({},e.limit?{limit:e.limit+1}:{}),e.searchTerm?{search:e.searchTerm}:{}),e.sorting?{sorting:e.sorting}:{}),e.constriction?{constriction:e.constriction}:{}),e.formName?{form:e.formName}:{}),e.where?{where:e.where}:{})},uM="formData/OPEN_REMOTE_CREATE",lM=function(e,t){return function(n){e(),t.put(n)}};const dM=function(e){var t=e.DetailApp,n=e.targetEntity,r=e.answerChannel,o=e.close,i=e.emitAction;return(0,S.jsx)(t,{entityName:n,formName:n,mode:"create",onEntityCreated:lM(o,r),emitAction:i})};var fM={emitAction:d.Z.dispatchEmittedAction};const pM=(0,_.connect)(null,fM)(dM);var hM=Zf().mark(gM),mM=Zf().mark(vM);function gM(e){return Zf().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,Ff.$6)([(0,Ff.ib)(uM,vM,e)]);case 2:case"end":return t.stop()}}),hM)}function vM(e,t){var n,r,o,i,a,c,s,u,l,d,f,p,h,g;return Zf().wrap((function(v){for(;;)switch(v.prev=v.next){case 0:return n=t.payload,r=n.formName,o=n.formField,i=n.value,v.next=3,(0,Ff.Ys)(e);case 3:return a=v.sent,c=a.detailApp,v.next=7,(0,Ff.RE)(yh.CE);case 7:return s=v.sent,v.next=10,(0,Ff.RE)(Um.Z);case 10:return u=v.sent,l=function(e){var t=e.close;return(0,S.jsx)(pM,{targetEntity:o.targetEntity,answerChannel:s,close:t,DetailApp:c})},v.next=14,(0,Ff.gz)(m.Z.modal(u,o.label,null,l,!0));case 14:return v.next=16,(0,Ff.qn)(s);case 16:return d=v.sent,f=d.id,v.next=20,(0,Ff.RE)(uh.Z.fetchDisplay,o.targetEntity,f);case 20:return p=v.sent,h={key:f,model:o.targetEntity,version:0,display:p},g="multi-remote-field"===o.dataType?[].concat(z()(i||[]),[h]):h,v.next=25,(0,Ff.gz)(xy(r,o.path,g));case 25:case"end":return v.stop()}}),mM)}var yM="formData/LOAD_SEARCH_FILTERS",bM="formData/SET_SEARCH_FILTER",wM=function(e,t){return{type:bM,payload:{entity:e,filters:t}}};function AM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function xM(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?AM(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):AM(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var EM=L()({},bM,(function(e,t){var n=t.payload,r=n.entity,o=n.filters;return xM(xM({},e),{},L()({},r,o))})),OM={};function CM(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:OM,t=arguments.length>1?arguments[1]:void 0,n=EM[t.type];return n?n(e,t):e}var kM=function(e){return e.body.filters.map((function(e){return{uniqueId:e.uniqueId,display:e.label,key:e.key}}))};function SM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function DM(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?SM(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):SM(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var PM=Zf().mark(jM),_M=Zf().mark(RM);function jM(){return Zf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Ff.$6)([(0,Ff.Fm)(yM,RM)]);case 2:case"end":return e.stop()}}),PM)}var TM=function(e){return e.formData.searchFilters};function RM(e){var t,n,r,o,i;return Zf().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return t=e.payload,n=t.entity,r=t.group,a.next=4,(0,Ff.Ys)(TM);case 4:if(a.sent[n]){a.next=14;break}return a.next=8,(0,Ff.RE)(uh.Z.requestSaga,"client/searchfilters/".concat(n),DM({},r?{queryParams:{group:r}}:{}));case 8:return o=a.sent,a.next=11,(0,Ff.RE)(kM,o);case 11:return i=a.sent,a.next=14,(0,Ff.gz)(wM(n,i));case 14:case"end":return a.stop()}}),_M)}var IM="formData/LOAD_TOOLTIP",MM="formData/SET_TOOLTIP",NM=function(e,t,n){return{type:MM,payload:{entity:e,id:t,tooltip:n}}};function BM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ZM(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?BM(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):BM(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var FM=L()({},MM,(function(e,t){var n=t.payload,r=n.entity,o=n.id,i=n.tooltip;return ZM(ZM({},e),{},{data:ZM(ZM({},e.data),{},L()({},r,ZM(ZM({},e.data[r]),{},L()({},o,i))))})})),LM={data:{}};function HM(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:LM,t=arguments.length>1?arguments[1]:void 0,n=FM[t.type];return n?n(e,t):e}var UM=Zf().mark(WM),zM=Zf().mark(YM);function WM(){return Zf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Ff.$6)([(0,Ff.ib)(IM,YM)]);case 2:case"end":return e.stop()}}),UM)}var VM=function(e,t,n){return nf()(e,"formData.tooltips.data.".concat(t,".").concat(n),null)};function YM(e){var t,n,r,o;return Zf().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:if(t=e.payload,n=t.entity,r=t.id,!n){i.next=11;break}return i.next=4,(0,Ff.Ys)(VM,n,r);case 4:if(null!=i.sent){i.next=11;break}return i.next=8,(0,Ff.RE)(uh.Z.fetchDisplay,n,r,"tooltip",!0);case 8:return o=i.sent,i.next=11,(0,Ff.gz)(NM(n,r,o));case 11:case"end":return i.stop()}}),zM)}var qM="formData/UPLOAD_DOCUMENT",GM="formData/SET_DOCUMENT",QM=a(54159);function XM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function KM(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?XM(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):XM(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var $M=function(e){var t=new FormData;t.append("file",e);var n={method:"POST",body:t};return QM.Z.executeRequest("upload",n).then(QM.Z.extractBody)},JM=function(e,t){var n=xm()(e,["id","fileName"]),r=e.contentType;return KM(KM({},n),{},{binaryLink:t.preview,thumbnailLink:r.startsWith("image")?t.preview:null})};function eN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function tN(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?eN(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eN(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var nN=Zf().mark(iN),rN=Zf().mark(aN),oN=Zf().mark(cN);function iN(){return Zf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Ff.$6)([(0,Ff.ib)(qM,aN),(0,Ff.ib)(GM,cN)]);case 2:case"end":return e.stop()}}),nN)}function aN(e){var t,n,r,o,i,a;return Zf().wrap((function(c){for(;;)switch(c.prev=c.next){case 0:return t=e.payload,n=t.formName,r=t.file,o=t.field,c.prev=2,c.next=5,(0,Ff.RE)($M,r);case 5:if(!(i=c.sent).success){c.next=14;break}return c.next=9,(0,Ff.RE)(JM,i,r);case 9:return a=c.sent,c.next=12,(0,Ff.gz)(UA.change(n,YI.transformFieldName(o),a));case 12:c.next=15;break;case 14:throw new Error("upload not successful: ".concat(JSON.stringify(i)));case 15:c.next=23;break;case 17:return c.prev=17,c.t0=c.catch(2),c.next=21,(0,Ff.gz)(UA.change(n,o,{id:null,timestamp:Date.now()}));case 21:return c.next=23,(0,Ff.gz)(p.Z.logError("client.component.form.uploadFailedTitle","client.component.form.uploadFailedMessage",c.t0));case 23:case"end":return c.stop()}}),rN,null,[[2,17]])}function cN(e){var t,n,r,o,i,a;return Zf().wrap((function(c){for(;;)switch(c.prev=c.next){case 0:return t=e.payload,n=t.formName,r=t.field,o=t.resourceId,c.next=4,(0,Ff.RE)(uh.Z.fetchEntity,"Resource",o,{paths:["relContent.data"]});case 4:return i=c.sent,a=tN(tN({},i.paths.relContent.value.paths.data.value),{},{resourceKey:o}),c.next=8,(0,Ff.gz)(UA.change(n,YI.transformFieldName(r),a));case 8:case"end":return c.stop()}}),oN)}var sN=Zf().mark(dN),uN=Zf().mark(fN),lN=Zf().mark(pN);function dN(){return Zf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Ff.$6)([(0,Ff.ib)(wy,fN),(0,Ff.ib)(Ay,pN)]);case 2:case"end":return e.stop()}}),sN)}function fN(e){var t,n,r,o;return Zf().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return t=e.payload,n=t.formName,r=t.fieldName,o=t.value,i.next=3,(0,Ff.gz)(UA.change(n,YI.transformFieldName(r),o));case 3:case"end":return i.stop()}}),uN)}function pN(e){var t,n,r;return Zf().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return t=e.payload,n=t.formName,r=t.fieldName,o.next=3,(0,Ff.gz)(UA.touch(n,YI.transformFieldName(r)));case 3:case"end":return o.stop()}}),lN)}l().shape({relationEntities:l().objectOf(l().array)});function hN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function mN(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?hN(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hN(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var gN={loadRelationEntities:function(e,t,n){return{type:Fb,payload:{fieldName:e,entityName:t,options:n}}},loadTooltip:function(e,t){return{type:IM,payload:{entity:e,id:t}}},openAdvancedSearch:function(e,t,n,r){return{type:Ey,payload:{formName:e,formField:t,searchTerm:n,value:r}}},openDocsTreeSearch:function(e,t,n){return{type:Oy,payload:{formName:e,formField:t,value:n}}},uploadDocument:function(e,t,n){return{type:qM,payload:{formName:e,file:n,field:t}}},setDocument:function(e,t,n){return{type:GM,payload:{formName:e,field:t,resourceId:n}}},changeFieldValue:xy,touchField:function(e,t){return{type:Ay,payload:{formName:e,fieldName:t}}},loadSearchFilters:function(e,t){return{type:yM,payload:{entity:e,group:t}}},loadLocationsSuggestions:function(e,t,n,r){return{type:ub,payload:{field:e,searchInput:t,countryValue:n,fieldCountries:r}}},openRemoteCreate:function(e,t,n){return{type:uM,payload:{formField:e,formName:t,value:n}}}},vN=(0,_.connect)((function(e,t){var n,r=t.formValues,o=t.tooltips,i=t.locations,a=t.relationEntities,c=t.searchFilters,s=t.navigationStrategy,u=function(e){return(0,e.formData.config.configSelector)(e)}(e);return mN(mN(mN(mN(mN(mN(mN(mN({},a?{relationEntities:xm()(e.formData.relationEntities.data,a)}:{}),o?{tooltips:xm()(null===(n=e.formData.tooltips)||void 0===n?void 0:n.data,o)}:{}),c?{searchFilters:xm()(e.formData.searchFilters,c)}:{}),i?{locations:xm()(e.formData.locations,i)}:{}),r&&e.form[r.formName]?{formValues:xm()(e.form[r.formName].values,r.fields)}:{}),s&&u.navigationStrategy?{navigationStrategy:u.navigationStrategy}:{}),u.chooseDocument?{chooseDocument:u.chooseDocument}:{}),{},{entityModel:nf()(e,"entityDetail.entityModel")})}),gN,null,{areStatePropsEqual:Dp()})((0,P.ZP)((function(e){return(0,S.jsx)(I().Fragment,{children:I().cloneElement(e.children,{formData:e})})})));const yN={addToStore:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){return{}};jf.Z.injectReducers(e,{formData:(0,by.UY)({relationEntities:Gb,tooltips:HM,searchFilters:CM,locations:yb,config:cb})}),e.sagaMiddleware.run(JI),e.sagaMiddleware.run(WM),e.sagaMiddleware.run(Ky,t),e.sagaMiddleware.run(dN),e.sagaMiddleware.run(iN),e.sagaMiddleware.run(jM),e.sagaMiddleware.run(Nb),e.sagaMiddleware.run(gM,t),e.dispatch(ob(t));var n=e.getState(),r=nf()(t(n),"initialData.relationEntities",null);null!==r&&Object.keys(r).forEach((function(t){e.dispatch(zb(t,r[t],!1,void 0))}))},FormDataContainer:vN};var bN,wN="formData/LOAD_REPORTS",AN="formData/SET_REPORTS",xN="formData/SET_REPORT_ICONS",EN=function(e){return{type:AN,payload:{reports:e}}},ON=function(e){return{type:xN,payload:{reportIcons:e}}},CN=(bN={},L()(bN,AN,jf.Z.singleTransferReducer("reports")),L()(bN,xN,jf.Z.singleTransferReducer("reportIcons")),bN),kN={reports:null,reportIcons:null};function SN(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:kN,t=arguments.length>1?arguments[1]:void 0,n=CN[t.type];return n?n(e,t):e}var DN=Zf().mark(IN),PN=Zf().mark(MN),_N=Zf().mark(NN),jN=Zf().mark(BN),TN=Zf().mark(ZN),RN=function(e){return e.reports};function IN(){return Zf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Ff.$6)([(0,Ff.Fm)(wN,MN)]);case 2:case"end":return e.stop()}}),DN)}function MN(e){var t,n,r,o,i,a,c,s;return Zf().wrap((function(u){for(;;)switch(u.prev=u.next){case 0:if(t=e.payload,n=t.reportIds,r=t.entityName,o=t.scope,0!==n.length){u.next=5;break}return u.next=4,(0,Ff.gz)(EN([]));case 4:return u.abrupt("return");case 5:return i=FN(n,r,o),a={where:i,paths:"unique_id,label,ignore_selection,relOutput_template.relReport_file_format.unique_id"},u.next=9,(0,Ff.RE)(uh.Z.fetchEntities,"Report",a,{method:"GET"});case 9:return c=u.sent,u.next=12,(0,Ff.$6)(c.map((function(e){return Lm.getFlattenEntity(e)})).map((function(e){return(0,Ff.RE)(NN,e)})));case 12:return s=u.sent,u.next=15,(0,Ff.gz)(EN(s));case 15:case"end":return u.stop()}}),PN)}function NN(e){return Zf().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.t0=e.ignore_selection?null:100,t.t1=e.unique_id,t.t2=e.label,t.t3=e.unique_id,t.t4=!e.ignore_selection,t.next=7,(0,Ff.RE)(BN,e);case 7:return t.t5=t.sent,t.abrupt("return",{actionType:"report",componentType:"report",confirmationThreshold:t.t0,id:t.t1,label:t.t2,reportId:t.t3,showConfirmation:t.t4,icon:t.t5});case 9:case"end":return t.stop()}}),_N)}function BN(e){var t,n;return Zf().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,(0,Ff.RE)(ZN);case 2:return t=r.sent,n=e["relOutput_template.relReport_file_format.unique_id"],r.abrupt("return",t[n]);case 5:case"end":return r.stop()}}),jN)}function ZN(){var e,t,n,r;return Zf().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,(0,Ff.Ys)(RN);case 2:if(e=o.sent,t=e.reportIcons){o.next=14;break}return o.next=7,(0,Ff.RE)(uh.Z.requestSaga,"/client/report-icons",{method:"GET"});case 7:return n=o.sent,r=n.body,o.next=11,(0,Ff.gz)(ON(r));case 11:return o.abrupt("return",r);case 14:return o.abrupt("return",t);case 15:case"end":return o.stop()}}),TN)}var FN=function(e,t,n){var r=[];return r.push("IN (unique_id,".concat(e.map((function(e){return'"'.concat(e,'"')})).join(","),")")),t&&n?r.push('exists (\n relReport_placement where entity_model == "'.concat(t,'"\n and relReport_location.unique_id == "').concat(n,'"\n )')):t?r.push('exists (relReport_placement where entity_model == "'.concat(t,'")')):n&&r.push('exists (relReport_placement where relReport_location.unique_id == "'.concat(n,'")')),r.join(" and ")};const LN=function(e){jf.Z.injectReducers(e,{reports:SN}),e.sagaMiddleware.run(IN)},HN=function(e,t,n){return{type:wN,payload:{reportIds:e,entityName:t,scope:n}}},UN=AN;var zN=a(82492),WN=a.n(zN),VN=a(66604),YN=a.n(VN),qN=a(8679),GN=a.n(qN),QN=a(66141),XN=a.n(QN);const KN=function(e,t,n,r){t(r);var o=e();if(!XN()(o))throw new Error("asyncValidate function passed to reduxForm must return a promise");var i=function(e){return function(t){if(e){if(t&&Object.keys(t).length)return n(t),t;throw n(),new Error("Asynchronous validation promise was rejected without errors.")}return n(),Promise.resolve()}};return o.then(i(!1),i(!0))};const $N=function(e){var t=e.initialized,n=e.trigger,r=e.pristine;if(!e.syncValidationPasses)return!1;switch(n){case"blur":case"change":return!0;case"submit":return!r||!t;default:return!1}};const JN=function(e){var t=e.values,n=e.nextProps,r=e.initialRender,o=e.lastFieldValidatorKeys,i=e.fieldValidatorKeys,a=e.structure;return!!r||(!a.deepEqual(t,n&&n.values)||!a.deepEqual(o,i))};const eB=function(e){var t=e.values,n=e.nextProps,r=e.initialRender,o=e.lastFieldValidatorKeys,i=e.fieldValidatorKeys,a=e.structure;return!!r||(!a.deepEqual(t,n&&n.values)||!a.deepEqual(o,i))};const tB=function(e){var t=e.values,n=e.nextProps,r=e.initialRender,o=e.lastFieldValidatorKeys,i=e.fieldValidatorKeys,a=e.structure;return!!r||(!a.deepEqual(t,n&&n.values)||!a.deepEqual(o,i))};const nB=function(e){var t=Wx(e);return t&&e.preventDefault(),t};const rB=function(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return nB(t)?e.apply(void 0,r):e.apply(void 0,[t].concat(r))}};var oB=function(e,t,n,r,o){for(var i=function(e){return Array.isArray(e)?e:[e]}(r),a=0;a<i.length;a++){var c=i[a](e,t,n,o);if(c)return c}};function iB(e,t){var n=t.getIn;return function(t,r){var o={};return Object.keys(e).forEach((function(i){var a=n(t,i),c=oB(a,t,r,e[i],i);c&&(o=ox.setIn(o,i,c))})),o}}var aB=function(e,t,n){var r,o=n.dispatch,i=n.submitAsSideEffect,a=n.onSubmitFail,c=n.onSubmitSuccess,s=n.startSubmit,u=n.stopSubmit,l=n.setSubmitFailed,d=n.setSubmitSucceeded,f=n.values;try{r=e(f,o,n)}catch(e){var p=nw(e)?e.errors:void 0;if(u(p),l.apply(void 0,t),a&&a(p,o,e,n),p||a)return p;throw e}if(i)r&&o(r);else{if(XN()(r))return s(),r.then((function(e){return u(),d(),c&&c(e,o,n),e}),(function(e){var r=nw(e)?e.errors:void 0;if(u(r),l.apply(void 0,t),a&&a(r,o,e,n),r||a)return r;throw e}));d(),c&&c(r,o,n)}return r};const cB=function(e,t,n,r,o){var i=t.dispatch,a=t.onSubmitFail,c=t.setSubmitFailed,s=t.syncErrors,u=t.asyncErrors,l=t.touch,d=t.persistentSubmitErrors;if(l.apply(void 0,o),n||d){var f=r&&r();return f?f.then((function(n){if(n)throw n;return aB(e,o,t)})).catch((function(e){return c.apply(void 0,o),a&&a(e,i,null,t),Promise.reject(e)})):aB(e,o,t)}c.apply(void 0,o);var p=function(e){var t=e.asyncErrors,n=e.syncErrors;return t&&"function"==typeof t.merge?t.merge(n).toJS():oA()({},t,{},n)}({asyncErrors:u,syncErrors:s});return a&&a(p,i,null,t),p};function sB(e){var t=e.getIn;return function(e,n,r,o){return!!(n||r||o)&&function(e,t){switch(t){case"Field":return[e,e+"._error"];case"FieldArray":return[e+"._error"];default:throw new Error("Unknown field type")}}(t(e,"name"),t(e,"type")).some((function(e){return t(n,e)||t(r,e)||t(o,e)}))}}function uB(e){var t=e.getIn,n=e.keys,r=sB(e);return function(e,o,i){return void 0===i&&(i=!1),function(a){var c=o||function(e){return t(e,"form")},s=c(a);if(t(s,e+".syncError"))return!1;if(!i&&t(s,e+".error"))return!1;var u=t(s,e+".syncErrors"),l=t(s,e+".asyncErrors"),d=i?void 0:t(s,e+".submitErrors");if(!u&&!l&&!d)return!0;var f=t(s,e+".registeredFields");return!f||!n(f).filter((function(e){return t(f,"['"+e+"'].count")>0})).some((function(e){return r(t(f,"['"+e+"']"),u,l,d)}))}}}const lB=function(e){return e.displayName||e.name||"Component"};var dB=a(65078),fB=UA.arrayInsert,pB=UA.arrayMove,hB=UA.arrayPop,mB=UA.arrayPush,gB=UA.arrayRemove,vB=UA.arrayRemoveAll,yB=UA.arrayShift,bB=UA.arraySplice,wB=UA.arraySwap,AB=UA.arrayUnshift,xB=UA.blur,EB=UA.change,OB=UA.focus,CB=Ux()(UA,["arrayInsert","arrayMove","arrayPop","arrayPush","arrayRemove","arrayRemoveAll","arrayShift","arraySplice","arraySwap","arrayUnshift","blur","change","focus"]),kB={arrayInsert:fB,arrayMove:pB,arrayPop:hB,arrayPush:mB,arrayRemove:gB,arrayRemoveAll:vB,arrayShift:yB,arraySplice:bB,arraySwap:wB,arrayUnshift:AB},SB=[].concat(Object.keys(UA),["array","asyncErrors","initialValues","syncErrors","syncWarnings","values","registeredFields"]),DB=function(e){if(!e||"function"!=typeof e)throw new Error("You must either pass handleSubmit() an onSubmit function or pass onSubmit as a prop");return e};const PB=function(e){var t=e.deepEqual,n=e.empty,r=e.getIn,o=e.setIn,i=e.keys,a=e.fromJS,c=e.toJS,s=uB(e);return function(u){var l=oA()({touchOnBlur:!0,touchOnChange:!1,persistentSubmitErrors:!1,destroyOnUnmount:!0,shouldAsyncValidate:$N,shouldValidate:JN,shouldError:eB,shouldWarn:tB,enableReinitialize:!1,keepDirtyOnReinitialize:!1,updateUnregisteredFields:!1,getFormState:function(e){return r(e,"form")},pure:!0,forceUnregisterOnUnmount:!1,submitAsSideEffect:!1},u);return function(u){var d=function(n){function a(){for(var a,s=arguments.length,u=new Array(s),l=0;l<s;l++)u[l]=arguments[l];return(a=n.call.apply(n,[this].concat(u))||this).wrapped=I().createRef(),a.destroyed=!1,a.fieldCounts={},a.fieldValidators={},a.lastFieldValidatorKeys=[],a.fieldWarners={},a.lastFieldWarnerKeys=[],a.innerOnSubmit=void 0,a.submitPromise=void 0,a.initIfNeeded=function(e){var n=a.props.enableReinitialize;if(e){if((n||!e.initialized)&&!t(a.props.initialValues,e.initialValues)){var r=e.initialized&&a.props.keepDirtyOnReinitialize;a.props.initialize(e.initialValues,r,{keepValues:e.keepValues,lastInitialValues:a.props.initialValues,updateUnregisteredFields:e.updateUnregisteredFields})}}else!a.props.initialValues||a.props.initialized&&!n||a.props.initialize(a.props.initialValues,a.props.keepDirtyOnReinitialize,{keepValues:a.props.keepValues,updateUnregisteredFields:a.props.updateUnregisteredFields})},a.updateSyncErrorsIfNeeded=function(e,t,n){var r=a.props,o=r.error,i=r.updateSyncErrors,c=!(n&&Object.keys(n).length||o),s=!(e&&Object.keys(e).length||t);c&&s||ox.deepEqual(n,e)&&ox.deepEqual(o,t)||i(e,t)},a.clearSubmitPromiseIfNeeded=function(e){var t=a.props.submitting;a.submitPromise&&t&&!e.submitting&&delete a.submitPromise},a.submitIfNeeded=function(e){var t=a.props,n=t.clearSubmit;!t.triggerSubmit&&e.triggerSubmit&&(n(),a.submit())},a.shouldErrorFunction=function(){var e=a.props,t=e.shouldValidate,n=e.shouldError;return t!==JN&&!(n!==eB)?t:n},a.validateIfNeeded=function(t){var n=a.props,r=n.validate,o=n.values,i=a.shouldErrorFunction(),c=a.generateValidator();if(r||c){var s=void 0===t,u=Object.keys(a.getValidators());if(i({values:o,nextProps:t,props:a.props,initialRender:s,lastFieldValidatorKeys:a.lastFieldValidatorKeys,fieldValidatorKeys:u,structure:e})){var l=s||!t?a.props:t,d=WN()(r&&r(l.values,l)||{},c&&c(l.values,l)||{}),f=d._error,p=Ux()(d,["_error"]);a.lastFieldValidatorKeys=u,a.updateSyncErrorsIfNeeded(p,f,l.syncErrors)}}else a.lastFieldValidatorKeys=[]},a.updateSyncWarningsIfNeeded=function(e,t,n){var r=a.props,o=r.warning,i=r.updateSyncWarnings,c=!(n&&Object.keys(n).length||o),s=!(e&&Object.keys(e).length||t);c&&s||ox.deepEqual(n,e)&&ox.deepEqual(o,t)||i(e,t)},a.shouldWarnFunction=function(){var e=a.props,t=e.shouldValidate,n=e.shouldWarn;return t!==JN&&!(n!==tB)?t:n},a.warnIfNeeded=function(t){var n=a.props,r=n.warn,o=n.values,i=a.shouldWarnFunction(),c=a.generateWarner();if(r||c){var s=void 0===t,u=Object.keys(a.getWarners());if(i({values:o,nextProps:t,props:a.props,initialRender:s,lastFieldValidatorKeys:a.lastFieldWarnerKeys,fieldValidatorKeys:u,structure:e})){var l=s||!t?a.props:t,d=WN()(r?r(l.values,l):{},c?c(l.values,l):{}),f=d._warning,p=Ux()(d,["_warning"]);a.lastFieldWarnerKeys=u,a.updateSyncWarningsIfNeeded(p,f,l.syncWarnings)}}},a.getValues=function(){return a.props.values},a.isValid=function(){return a.props.valid},a.isPristine=function(){return a.props.pristine},a.register=function(e,t,n,r){var o=(a.fieldCounts[e]||0)+1;a.fieldCounts[e]=o,a.props.registerField(e,t),n&&(a.fieldValidators[e]=n),r&&(a.fieldWarners[e]=r)},a.unregister=function(e){var t=a.fieldCounts[e];if(1===t?delete a.fieldCounts[e]:null!=t&&(a.fieldCounts[e]=t-1),!a.destroyed){var n=a.props,r=n.destroyOnUnmount,o=n.forceUnregisterOnUnmount,i=n.unregisterField;r||o?(i(e,r),a.fieldCounts[e]||(delete a.fieldValidators[e],delete a.fieldWarners[e],a.lastFieldValidatorKeys=a.lastFieldValidatorKeys.filter((function(t){return t!==e})))):i(e,!1)}},a.getFieldList=function(e){var t=a.props.registeredFields;if(!t)return[];var n=i(t);return e&&(e.excludeFieldArray&&(n=n.filter((function(e){return"FieldArray"!==r(t,"['"+e+"'].type")}))),e.excludeUnregistered&&(n=n.filter((function(e){return 0!==r(t,"['"+e+"'].count")})))),c(n)},a.getValidators=function(){var e={};return Object.keys(a.fieldValidators).forEach((function(t){var n=a.fieldValidators[t]();n&&(e[t]=n)})),e},a.generateValidator=function(){var t=a.getValidators();return Object.keys(t).length?iB(t,e):void 0},a.getWarners=function(){var e={};return Object.keys(a.fieldWarners).forEach((function(t){var n=a.fieldWarners[t]();n&&(e[t]=n)})),e},a.generateWarner=function(){var t=a.getWarners();return Object.keys(t).length?iB(t,e):void 0},a.asyncValidate=function(e,t,n){var i,c,s=a.props,u=s.asyncBlurFields,l=s.asyncChangeFields,d=s.asyncErrors,f=s.asyncValidate,p=s.dispatch,h=s.initialized,m=s.pristine,g=s.shouldAsyncValidate,v=s.startAsyncValidation,y=s.stopAsyncValidation,b=s.syncErrors,w=s.values,A=!e;if(f){var x=A?w:o(w,e,t),E=A||!r(b,e);if(i=u&&e&&~u.indexOf(e.replace(/\[[0-9]+]/g,"[]")),c=l&&e&&~l.indexOf(e.replace(/\[[0-9]+]/g,"[]")),(A||!u&&!l||("blur"===n?i:c))&&g({asyncErrors:d,initialized:h,trigger:A?"submit":n,blurredField:e,pristine:m,syncValidationPasses:E}))return KN((function(){return f(x,p,a.props,e)}),v,y,e)}},a.submitCompleted=function(e){return delete a.submitPromise,e},a.submitFailed=function(e){throw delete a.submitPromise,e},a.listenToSubmit=function(e){return XN()(e)?(a.submitPromise=e,e.then(a.submitCompleted,a.submitFailed)):e},a.submit=function(e){var t=a.props,n=t.onSubmit,r=t.blur,o=t.change,i=t.dispatch;return e&&!nB(e)?rB((function(){return!a.submitPromise&&a.listenToSubmit(cB(DB(e),oA()({},a.props,{},(0,by.DE)({blur:r,change:o},i)),a.props.validExceptSubmit,a.asyncValidate,a.getFieldList({excludeFieldArray:!0,excludeUnregistered:!0})))})):a.submitPromise?void 0:a.innerOnSubmit&&a.innerOnSubmit!==a.submit?a.innerOnSubmit():a.listenToSubmit(cB(DB(n),oA()({},a.props,{},(0,by.DE)({blur:r,change:o},i)),a.props.validExceptSubmit,a.asyncValidate,a.getFieldList({excludeFieldArray:!0,excludeUnregistered:!0})))},a.reset=function(){return a.props.reset()},a}Xb()(a,n);var s=a.prototype;return s.UNSAFE_componentWillMount=function(){(0,dB.Z)()||(this.initIfNeeded(),this.validateIfNeeded(),this.warnIfNeeded()),Lx()(this.props.shouldValidate,"shouldValidate() is deprecated and will be removed in v9.0.0. Use shouldWarn() or shouldError() instead.")},s.UNSAFE_componentWillReceiveProps=function(e){this.initIfNeeded(e),this.validateIfNeeded(e),this.warnIfNeeded(e),this.clearSubmitPromiseIfNeeded(e),this.submitIfNeeded(e);var n=e.onChange,r=e.values,o=e.dispatch;n&&!t(r,this.props.values)&&n(r,o,e,this.props.values)},s.shouldComponentUpdate=function(e){var n=this;if(!this.props.pure)return!0;var r=l.immutableProps,o=void 0===r?[]:r;return!!(this.props.children||e.children||Object.keys(e).some((function(r){return~o.indexOf(r)?n.props[r]!==e[r]:!~SB.indexOf(r)&&!t(n.props[r],e[r])})))},s.componentDidMount=function(){(0,dB.Z)()||(this.initIfNeeded(this.props),this.validateIfNeeded(),this.warnIfNeeded()),Lx()(this.props.shouldValidate,"shouldValidate() is deprecated and will be removed in v9.0.0. Use shouldWarn() or shouldError() instead.")},s.componentWillUnmount=function(){var e=this.props,t=e.destroyOnUnmount,n=e.destroy;t&&!(0,dB.Z)()&&(this.destroyed=!0,n())},s.render=function(){var e,t=this,n=this.props,o=n.anyTouched,i=n.array,a=(n.arrayInsert,n.arrayMove,n.arrayPop,n.arrayPush,n.arrayRemove,n.arrayRemoveAll,n.arrayShift,n.arraySplice,n.arraySwap,n.arrayUnshift,n.asyncErrors,n.asyncValidate,n.asyncValidating),c=n.blur,s=n.change,l=n.clearSubmit,d=n.destroy,f=(n.destroyOnUnmount,n.forceUnregisterOnUnmount,n.dirty),p=n.dispatch,h=(n.enableReinitialize,n.error),m=(n.focus,n.form),g=(n.getFormState,n.immutableProps,n.initialize),v=n.initialized,y=n.initialValues,b=n.invalid,w=(n.keepDirtyOnReinitialize,n.keepValues,n.updateUnregisteredFields,n.pristine),A=n.propNamespace,x=(n.registeredFields,n.registerField,n.reset),E=n.resetSection,O=(n.setSubmitFailed,n.setSubmitSucceeded,n.shouldAsyncValidate,n.shouldValidate,n.shouldError,n.shouldWarn,n.startAsyncValidation,n.startSubmit,n.stopAsyncValidation,n.stopSubmit,n.submitAsSideEffect),C=n.submitting,k=n.submitFailed,S=n.submitSucceeded,D=n.touch,P=(n.touchOnBlur,n.touchOnChange,n.persistentSubmitErrors,n.syncErrors,n.syncWarnings,n.unregisterField,n.untouch),_=(n.updateSyncErrors,n.updateSyncWarnings,n.valid),j=(n.validExceptSubmit,n.values,n.warning),T=Ux()(n,["anyTouched","array","arrayInsert","arrayMove","arrayPop","arrayPush","arrayRemove","arrayRemoveAll","arrayShift","arraySplice","arraySwap","arrayUnshift","asyncErrors","asyncValidate","asyncValidating","blur","change","clearSubmit","destroy","destroyOnUnmount","forceUnregisterOnUnmount","dirty","dispatch","enableReinitialize","error","focus","form","getFormState","immutableProps","initialize","initialized","initialValues","invalid","keepDirtyOnReinitialize","keepValues","updateUnregisteredFields","pristine","propNamespace","registeredFields","registerField","reset","resetSection","setSubmitFailed","setSubmitSucceeded","shouldAsyncValidate","shouldValidate","shouldError","shouldWarn","startAsyncValidation","startSubmit","stopAsyncValidation","stopSubmit","submitAsSideEffect","submitting","submitFailed","submitSucceeded","touch","touchOnBlur","touchOnChange","persistentSubmitErrors","syncErrors","syncWarnings","unregisterField","untouch","updateSyncErrors","updateSyncWarnings","valid","validExceptSubmit","values","warning"]),I=oA()({array:i,anyTouched:o,asyncValidate:this.asyncValidate,asyncValidating:a},(0,by.DE)({blur:c,change:s},p),{clearSubmit:l,destroy:d,dirty:f,dispatch:p,error:h,form:m,handleSubmit:this.submit,initialize:g,initialized:v,initialValues:y,invalid:b,pristine:w,reset:x,resetSection:E,submitting:C,submitAsSideEffect:O,submitFailed:k,submitSucceeded:S,touch:D,untouch:P,valid:_,warning:j}),M=oA()({},A?((e={})[A]=I,e):I,{},T);(function(e){return Boolean(e&&e.prototype&&"object"==typeof e.prototype.isReactComponent)})(u)&&(M.ref=this.wrapped);var N=oA()({},this.props,{getFormState:function(e){return r(t.props.getFormState(e),t.props.form)},asyncValidate:this.asyncValidate,getValues:this.getValues,sectionPrefix:void 0,register:this.register,unregister:this.unregister,registerInnerOnSubmit:function(e){return t.innerOnSubmit=e}});return(0,R.createElement)(cE.Provider,{value:N,children:(0,R.createElement)(u,M)})},a}(I().Component);d.displayName="Form("+lB(u)+")",d.WrappedComponent=u,d.propTypes={destroyOnUnmount:Zx().bool,forceUnregisterOnUnmount:Zx().bool,form:Zx().string.isRequired,immutableProps:Zx().arrayOf(Zx().string),initialValues:Zx().oneOfType([Zx().array,Zx().object]),getFormState:Zx().func,onSubmitFail:Zx().func,onSubmitSuccess:Zx().func,propNamespace:Zx().string,validate:Zx().func,warn:Zx().func,touchOnBlur:Zx().bool,touchOnChange:Zx().bool,triggerSubmit:Zx().bool,persistentSubmitErrors:Zx().bool,registeredFields:Zx().any};var f=(0,_.connect)((function(e,o){var i=o.form,a=o.getFormState,c=o.initialValues,u=o.enableReinitialize,l=o.keepDirtyOnReinitialize,d=r(a(e)||n,i)||n,f=r(d,"initial"),p=!!f,h=u&&p&&!t(c,f),m=h&&!l,g=c||f||n;h||(g=f||n);var v=r(d,"values")||g;m&&(v=g);var y=m||t(g,v),b=r(d,"asyncErrors"),w=r(d,"syncErrors")||ox.empty,A=r(d,"syncWarnings")||ox.empty,x=r(d,"registeredFields"),E=s(i,a,!1)(e),O=s(i,a,!0)(e),C=!!r(d,"anyTouched"),k=!!r(d,"submitting"),S=!!r(d,"submitFailed"),D=!!r(d,"submitSucceeded"),P=r(d,"error"),_=r(d,"warning"),j=r(d,"triggerSubmit");return{anyTouched:C,asyncErrors:b,asyncValidating:r(d,"asyncValidating")||!1,dirty:!y,error:P,initialized:p,invalid:!E,pristine:y,registeredFields:x,submitting:k,submitFailed:S,submitSucceeded:D,syncErrors:w,syncWarnings:A,triggerSubmit:j,values:v,valid:E,validExceptSubmit:O,warning:_}}),(function(e,t){var n=function(e){return e.bind(null,t.form)},r=YN()(CB,n),o=YN()(kB,n),i=n(OB),a=(0,by.DE)(r,e),c={insert:(0,by.DE)(o.arrayInsert,e),move:(0,by.DE)(o.arrayMove,e),pop:(0,by.DE)(o.arrayPop,e),push:(0,by.DE)(o.arrayPush,e),remove:(0,by.DE)(o.arrayRemove,e),removeAll:(0,by.DE)(o.arrayRemoveAll,e),shift:(0,by.DE)(o.arrayShift,e),splice:(0,by.DE)(o.arraySplice,e),swap:(0,by.DE)(o.arraySwap,e),unshift:(0,by.DE)(o.arrayUnshift,e)};return oA()({},a,{},o,{blur:function(e,n){return xB(t.form,e,n,!!t.touchOnBlur)},change:function(e,n){return EB(t.form,e,n,!!t.touchOnChange,!!t.persistentSubmitErrors)},array:c,focus:i,dispatch:e})}),void 0,{forwardRef:!0}),p=GN()(f(d),u);p.defaultProps=l;var h=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).ref=I().createRef(),t}Xb()(t,e);var r=t.prototype;return r.submit=function(){return this.ref.current&&this.ref.current.submit()},r.reset=function(){this.ref&&this.ref.current.reset()},r.render=function(){var e=this.props,t=e.initialValues,n=Ux()(e,["initialValues"]);return(0,R.createElement)(p,oA()({},n,{ref:this.ref,initialValues:a(t)}))},Nx()(t,[{key:"valid",get:function(){return!(!this.ref.current||!this.ref.current.isValid())}},{key:"invalid",get:function(){return!this.valid}},{key:"pristine",get:function(){return!(!this.ref.current||!this.ref.current.isPristine())}},{key:"dirty",get:function(){return!this.pristine}},{key:"values",get:function(){return this.ref.current?this.ref.current.getValues():n}},{key:"fieldList",get:function(){return this.ref.current?this.ref.current.getFieldList():[]}},{key:"wrappedInstance",get:function(){return this.ref.current&&this.ref.current.wrapped.current}}]),t}(I().Component),m=GN()(uE(h),u);return m.defaultProps=l,m}}}(ox);var _B,jB=b.ZP.div.withConfig({displayName:"StyledButtonsWrapper"})(_B||(_B=Ld()(["\n position: sticky;\n bottom: 0;\n display: flex;\n justify-content: flex-end;\n background-color: ",";\n z-index: 2; // higher than StyledIndicatorsContainerWrapper\n\n "," {\n margin-right: 0;\n }\n"])),Jm.Z.color("paper"),gd.Z);const TB=PB({form:"simpleForm",destroyOnUnmount:!1})((function(e){var t=e.initializeForm,n=e.intl,r=e.onCancel,o=e.onSubmit,i=e.handleSubmit,a=e.form,c=e.formDefinition,s=e.formValues,u=e.mappingType,l=e.mode,d=e.noButtons,f=e.submitting,p=e.submitText,h=e.cancelText,m=e.beforeRenderField,g=function(e){return n.formatMessage({id:e})},v=(0,R.useRef)(null);return H.Z.useAutofocus(v,{selectFulltextFields:!0},[c]),(0,R.useEffect)((function(){t()}),[t]),(0,S.jsxs)("form",{onSubmit:i((function(){return(e=400,new Promise((function(t){return setTimeout(t,e)}))).then((function(){return o()}));var e})),ref:v,children:[(0,S.jsx)(YI.FormBuilder,{entity:void 0,formName:a,formDefinition:c,formValues:s,fieldMappingType:u||"editable",mode:l,beforeRenderField:m}),!d&&(0,S.jsxs)(jB,{children:[(0,S.jsx)(pd.Z,{disabled:f,ink:"primary",label:p||g("client.simple-form.defaultOk"),pending:f,type:"submit"}),(0,S.jsx)(pd.Z,{disabled:f,label:h||g("client.simple-form.defaultCancel"),onClick:function(){return r()}})]})]})})),RB=TB;var IB="simpleForm/INITIALIZE_QUESTION_FORM",MB="simpleForm/SET_FIELD_DEFINITIONS",NB="simpleForm/SUBMIT",BB="simpleForm/CANCEL",ZB={initializeForm:function(){return{type:IB,payload:{}}},onSubmit:function(){return{type:NB}},onCancel:function(){return{type:BB}}};const FB=(0,_.connect)((function(e,t){return{noButtons:e.input.noButtons,title:e.input.title,description:e.input.description,submitText:e.input.submitText,cancelText:e.input.cancelText,formDefinition:e.input.form,beforeRenderField:e.input.beforeRenderField,formValues:ix("simpleForm")(e),validate:!1!==e.input.validate?YI.syncValidation(e.simpleForm.fieldDefinitions,e.input.form):function(){},listApp:e.input.listApp,mappingType:e.input.mappingType,mode:e.input.mode}}),ZB)((0,P.ZP)(RB));var LB=a(23560),HB=a.n(LB);const UB=function(e){var t=function(e){return function(t,n){return void 0!==e.getIn(t,n)}},n=e.deepEqual,r=e.empty,o=e.getIn,i=e.deleteIn,a=e.setIn;return function(c){void 0===c&&(c=t);return function t(s,u){if("]"===u[u.length-1]){var l=VA()(u);return l.pop(),o(s,l.join("."))?a(s,u):s}var d=s;c(e)(s,u)&&(d=i(s,u));var f=u.lastIndexOf(".");if(f>0){var p=u.substring(0,f);if("]"!==p[p.length-1]){var h=o(d,p);if(n(h,r))return t(d,p)}}return d}}};var zB=function(e){var t=e.getIn;return function(e,n){var r=null;/^values/.test(n)&&(r=n.replace("values","initial"));var o=!r||void 0===t(e,r);return void 0!==t(e,n)&&o}};const WB=function(e){var t,n=e.deepEqual,r=e.empty,o=e.forEach,i=e.getIn,a=e.setIn,c=e.deleteIn,s=e.fromJS,u=e.keys,l=e.size,d=e.some,f=e.splice,p=UB(e)(zB),h=UB(ox)(zB),m=function(e,t,n,r,o,c,s){var u=i(e,t+"."+n);return u||s?a(e,t+"."+n,f(u,r,o,c)):e},g=function(e,t,n,r,o,c,s){var u=i(e,t),l=ox.getIn(u,n);return l||s?a(e,t,ox.setIn(u,n,ox.splice(l,r,o,c))):e},v=["values","fields","submitErrors","asyncErrors"],y=function(e,t,n,o,i){var a=e,c=null!=i?r:void 0;return a=m(a,"values",t,n,o,i,!0),a=m(a,"fields",t,n,o,c),a=g(a,"syncErrors",t,n,o,void 0),a=g(a,"syncWarnings",t,n,o,void 0),a=m(a,"submitErrors",t,n,o,void 0),a=m(a,"asyncErrors",t,n,o,void 0)},b=((t={})[aA]=function(e,t){var n=t.meta,r=n.field,o=n.index,i=t.payload;return y(e,r,o,0,i)},t[cA]=function(e,t){var n=t.meta,r=n.field,o=n.from,c=n.to,s=i(e,"values."+r),u=s?l(s):0,d=e;return u&&v.forEach((function(e){var t=e+"."+r;if(i(d,t)){var n=i(d,t+"["+o+"]");d=a(d,t,f(i(d,t),o,1)),d=a(d,t,f(i(d,t),c,0,n))}})),d},t[sA]=function(e,t){var n=t.meta.field,r=i(e,"values."+n),o=r?l(r):0;return o?y(e,n,o-1,1):e},t[uA]=function(e,t){var n=t.meta.field,r=t.payload,o=i(e,"values."+n),a=o?l(o):0;return y(e,n,a,0,r)},t[lA]=function(e,t){var n=t.meta,r=n.field,o=n.index;return y(e,r,o,1)},t[dA]=function(e,t){var n=t.meta.field,r=i(e,"values."+n),o=r?l(r):0;return o?y(e,n,0,o):e},t[fA]=function(e,t){var n=t.meta.field;return y(e,n,0,1)},t[pA]=function(e,t){var n=t.meta,r=n.field,o=n.index,i=n.removeNum,a=t.payload;return y(e,r,o,i,a)},t[mA]=function(e,t){var n=t.meta,r=n.field,o=n.indexA,c=n.indexB,s=e;return v.forEach((function(e){var t=i(s,e+"."+r+"["+o+"]"),n=i(s,e+"."+r+"["+c+"]");void 0===t&&void 0===n||(s=a(s,e+"."+r+"["+o+"]",n),s=a(s,e+"."+r+"["+c+"]",t))})),s},t[hA]=function(e,t){var n=t.meta.field,r=t.payload;return y(e,n,0,0,r)},t[gA]=function(e,t){var n=t.meta.field,r=t.payload,o=e;return o=p(o,"asyncErrors."+n),o=p(o,"submitErrors."+n),o=a(o,"fields."+n+".autofilled",!0),o=a(o,"values."+n,r)},t[vA]=function(e,t){var n=t.meta,r=n.field,o=n.touch,s=t.payload,u=e;return void 0===i(u,"initial."+r)&&""===s?u=p(u,"values."+r):void 0!==s&&(u=a(u,"values."+r,s)),r===i(u,"active")&&(u=c(u,"active")),u=c(u,"fields."+r+".active"),o&&(u=a(u,"fields."+r+".touched",!0),u=a(u,"anyTouched",!0)),u},t[yA]=function(e,t){var n=t.meta,r=n.field,o=n.touch,c=n.persistentSubmitErrors,s=t.payload,u=e;if(void 0===i(u,"initial."+r)&&""===s||void 0===s)u=p(u,"values."+r);else if(HB()(s)){var l=i(e,"values."+r);u=a(u,"values."+r,s(l,e.values))}else u=a(u,"values."+r,s);return u=p(u,"asyncErrors."+r),c||(u=p(u,"submitErrors."+r)),u=p(u,"fields."+r+".autofilled"),o&&(u=a(u,"fields."+r+".touched",!0),u=a(u,"anyTouched",!0)),u},t[wA]=function(e){return c(e,"triggerSubmit")},t[AA]=function(e){var t=e;return t=p(t,"submitErrors"),t=c(t,"error")},t[xA]=function(e,t){var n=t.meta.field;return c(e,"asyncErrors."+n)},t[bA]=function(e,t){var n=t.meta,r=n.keepTouched,o=n.persistentSubmitErrors,s=n.fields,l=e;s.forEach((function(t){l=p(l,"asyncErrors."+t),o||(l=p(l,"submitErrors."+t)),l=p(l,"fields."+t+".autofilled"),r||(l=c(l,"fields."+t+".touched"));var n=i(e,"initial."+t);l=n?a(l,"values."+t,n):p(l,"values."+t)}));var f=d(u(i(l,"registeredFields")),(function(e){return i(l,"fields."+e+".touched")}));return l=f?a(l,"anyTouched",!0):c(l,"anyTouched")},t[OA]=function(e,t){var n=t.meta.field,r=e,o=i(e,"active");return r=c(r,"fields."+o+".active"),r=a(r,"fields."+n+".visited",!0),r=a(r,"fields."+n+".active",!0),r=a(r,"active",n)},t[CA]=function(e,t){var c=t.payload,l=t.meta,d=l.keepDirty,f=l.keepSubmitSucceeded,p=l.updateUnregisteredFields,h=l.keepValues,m=s(c),g=r,v=i(e,"warning");v&&(g=a(g,"warning",v));var y=i(e,"syncWarnings");y&&(g=a(g,"syncWarnings",y));var b=i(e,"error");b&&(g=a(g,"error",b));var w=i(e,"syncErrors");w&&(g=a(g,"syncErrors",w));var A=i(e,"registeredFields");A&&(g=a(g,"registeredFields",A));var x=i(e,"values"),E=i(e,"initial"),O=m,C=x;if(d&&A){if(!n(O,E)){var k=function(e){var t=i(E,e),r=i(x,e);if(n(r,t)){var o=i(O,e);i(C,e)!==o&&(C=a(C,e,o))}};p||o(u(A),(function(e){return k(e)})),o(u(O),(function(e){if(void 0===i(E,e)){var t=i(O,e);C=a(C,e,t)}p&&k(e)}))}}else C=O;return h&&(o(u(x),(function(e){var t=i(x,e);C=a(C,e,t)})),o(u(E),(function(e){var t=i(E,e);O=a(O,e,t)}))),f&&i(e,"submitSucceeded")&&(g=a(g,"submitSucceeded",!0)),g=a(g,"values",C),g=a(g,"initial",O)},t[kA]=function(e,t){var n=t.payload,r=n.name,o=n.type,c="registeredFields['"+r+"']",u=i(e,c);if(u){var l=i(u,"count")+1;u=a(u,"count",l)}else u=s({name:r,type:o,count:1});return a(e,c,u)},t[SA]=function(e){var t=r,n=i(e,"registeredFields");n&&(t=a(t,"registeredFields",n));var o=i(e,"initial");return o&&(t=a(t,"values",o),t=a(t,"initial",o)),t},t[DA]=function(e,t){var n=t.meta.sections,r=e;n.forEach((function(t){r=p(r,"asyncErrors."+t),r=p(r,"submitErrors."+t),r=p(r,"fields."+t);var n=i(e,"initial."+t);r=n?a(r,"values."+t,n):p(r,"values."+t)}));var o=d(u(i(r,"registeredFields")),(function(e){return i(r,"fields."+e+".touched")}));return r=o?a(r,"anyTouched",!0):c(r,"anyTouched")},t[MA]=function(e){return a(e,"triggerSubmit",!0)},t[jA]=function(e,t){var n=t.meta.field;return a(e,"asyncValidating",n||!0)},t[TA]=function(e){return a(e,"submitting",!0)},t[RA]=function(e,t){var n=t.payload,r=e;if(r=c(r,"asyncValidating"),n&&Object.keys(n).length){var o=n._error,i=Ux()(n,["_error"]);o&&(r=a(r,"error",o)),Object.keys(i).length&&(r=a(r,"asyncErrors",s(i)))}else r=c(r,"error"),r=c(r,"asyncErrors");return r},t[IA]=function(e,t){var n=t.payload,r=e;if(r=c(r,"submitting"),r=c(r,"submitFailed"),r=c(r,"submitSucceeded"),n&&Object.keys(n).length){var o=n._error,i=Ux()(n,["_error"]);r=o?a(r,"error",o):c(r,"error"),r=Object.keys(i).length?a(r,"submitErrors",s(i)):c(r,"submitErrors"),r=a(r,"submitFailed",!0)}else r=c(r,"error"),r=c(r,"submitErrors");return r},t[PA]=function(e,t){var n=t.meta.fields,r=e;return r=a(r,"submitFailed",!0),r=c(r,"submitSucceeded"),r=c(r,"submitting"),n.forEach((function(e){return r=a(r,"fields."+e+".touched",!0)})),n.length&&(r=a(r,"anyTouched",!0)),r},t[_A]=function(e){var t=e;return t=c(t,"submitFailed"),t=a(t,"submitSucceeded",!0)},t[NA]=function(e,t){var n=t.meta.fields,r=e;return n.forEach((function(e){return r=a(r,"fields."+e+".touched",!0)})),r=a(r,"anyTouched",!0)},t[BA]=function(e,t){var o=t.payload,s=o.name,u=o.destroyOnUnmount,l=e,d="registeredFields['"+s+"']",f=i(l,d);if(!f)return l;var m=i(f,"count")-1;if(m<=0&&u){l=c(l,d),n(i(l,"registeredFields"),r)&&(l=c(l,"registeredFields"));var g=i(l,"syncErrors");g&&(g=h(g,s),l=ox.deepEqual(g,ox.empty)?c(l,"syncErrors"):a(l,"syncErrors",g));var v=i(l,"syncWarnings");v&&(v=h(v,s),l=ox.deepEqual(v,ox.empty)?c(l,"syncWarnings"):a(l,"syncWarnings",v)),l=p(l,"submitErrors."+s),l=p(l,"asyncErrors."+s)}else f=a(f,"count",m),l=a(l,d,f);return l},t[ZA]=function(e,t){var n=t.meta.fields,r=e;n.forEach((function(e){return r=c(r,"fields."+e+".touched")}));var o=d(u(i(r,"registeredFields")),(function(e){return i(r,"fields."+e+".touched")}));return r=o?a(r,"anyTouched",!0):c(r,"anyTouched")},t[FA]=function(e,t){var n=t.payload,r=n.syncErrors,o=n.error,i=e;return o?(i=a(i,"error",o),i=a(i,"syncError",!0)):(i=c(i,"error"),i=c(i,"syncError")),i=Object.keys(r).length?a(i,"syncErrors",r):c(i,"syncErrors")},t[LA]=function(e,t){var n=t.payload,r=n.syncWarnings,o=n.warning,i=e;return i=o?a(i,"warning",o):c(i,"warning"),i=Object.keys(r).length?a(i,"syncWarnings",r):c(i,"syncWarnings")},t);return function e(t){return t.plugin=function(t,n){var o=this;return void 0===n&&(n={}),e((function(e,c){void 0===e&&(e=r),void 0===c&&(c={type:"NONE"});var s=function(n,r){var o=i(n,r),s=t[r](o,c,i(e,r));return s!==o?a(n,r,s):n},u=o(e,c),l=c&&c.meta&&c.meta.form;return l&&!n.receiveAllFormActions?t[l]?s(u,l):u:Object.keys(t).reduce(s,u)}))},t}(function(e){return function(t,n){void 0===t&&(t=r),void 0===n&&(n={type:"NONE"});var o=n&&n.meta&&n.meta.form;if(!o||!function(e){return e&&e.type&&e.type.length>iA.length&&e.type.substring(0,iA.length)===iA}(n))return t;if(n.type===EA&&n.meta&&n.meta.form)return n.meta.form.reduce((function(e,t){return p(e,t)}),t);var c=i(t,o),s=e(c,n);return s===c?t:a(t,o,s)}}((function(e,t){void 0===e&&(e=r);var n=b[t.type];return n?n(e,t):e})))},VB=WB(ox);var YB=L()({},MB,jf.Z.singleTransferReducer("fieldDefinitions")),qB={fieldDefinitions:null};const GB=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:qB,t=arguments.length>1?arguments[1]:void 0,n=YB[t.type];return n?n(e,t):e},QB=uB(ox);function XB(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function KB(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?XB(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):XB(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var $B=Zf().mark(aZ),JB=Zf().mark(cZ),eZ=Zf().mark(sZ),tZ=Zf().mark(uZ),nZ=Zf().mark(lZ),rZ=Zf().mark(dZ),oZ="simpleForm",iZ=function(e){return e.input};function aZ(){return Zf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Ff.$6)([(0,Ff.ib)(IB,cZ),(0,Ff.ib)(NB,sZ),(0,Ff.ib)(BB,uZ),(0,Ff.Fm)(yA,lZ),(0,Ff.Fm)(FA,lZ),(0,Ff.Fm)(CA,lZ)]);case 2:case"end":return e.stop()}}),$B)}function cZ(){var e,t,n,r,o;return Zf().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,(0,Ff.Ys)(iZ);case 2:return e=i.sent,t=e.form,n=e.defaultValues,i.next=7,(0,Ff.RE)(YI.getFieldDefinitions,t);case 7:return r=i.sent,i.next=10,(0,Ff.RE)(YI.getDefaultValues,r);case 10:return o=i.sent,i.next=13,(0,Ff.gz)(UA.initialize(oZ,KB(KB({},o),n)));case 13:case"end":return i.stop()}}),JB)}function sZ(){var e;return Zf().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,dZ();case 2:return e=t.sent,t.next=5,(0,Ff.gz)(h.Z.fireExternalEvent("onSubmit",{values:e}));case 5:case"end":return t.stop()}}),eZ)}function uZ(){var e;return Zf().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,dZ();case 2:return e=t.sent,t.next=5,(0,Ff.gz)(h.Z.fireExternalEvent("onCancel",{values:e}));case 5:case"end":return t.stop()}}),tZ)}function lZ(){var e,t;return Zf().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,dZ();case 2:return e=n.sent,n.next=5,(0,Ff.Ys)(QB(oZ));case 5:return t=n.sent,n.next=8,(0,Ff.gz)(h.Z.fireExternalEvent("onChange",{values:e,valid:t}));case 8:case"end":return n.stop()}}),nZ)}function dZ(){return Zf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=Object,e.next=3,(0,Ff.Ys)(ix(oZ));case 3:return e.t1=e.sent,e.abrupt("return",e.t0.entries.call(e.t0,e.t1).reduce((function(e,t){var n=T()(t,2),r=n[0],o=n[1];return KB(KB({},e),{},L()({},r.replace("--","."),o))}),{}));case 5:case"end":return e.stop()}}),rZ)}const fZ={simpleForm:GB,form:VB};var pZ,hZ=[aZ];function mZ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function gZ(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?mZ(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mZ(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var vZ="simple-form",yZ=["onSubmit","onCancel","onChange","emitAction"],bZ=function(e,t,n,r){var o,i=pZ||(pZ=(0,S.jsx)(FB,{})),a=s.Z.createStore(fZ,hZ,t,vZ);return d.Z.addToStore(a,(function(e){return e.input.emitAction})),h.Z.addToStore(a,(function(e){return s.Z.getEvents(yZ,e.input)})),yN.addToStore(a,(function(e){return{initialData:e.input.formData,listApp:e.input.listApp,docsApp:e.input.docsApp}})),m.Z.addToStore(a,!1),s.Z.createApp(vZ,i,a,{input:t,events:n,actions:[(o=YI.getFieldDefinitions(t.form),{type:MB,payload:{fieldDefinitions:o}})],publicPath:r,textResourceModules:["component","common"]})},wZ=function(e){return s.Z.useApp({initApp:bZ,props:e,packageName:vZ,externalEvents:yZ}).component};wZ.propTypes=gZ(gZ({noButtons:l().bool,submitText:l().string,cancelText:l().string,form:l().object.isRequired,validate:l().bool},yZ.reduce((function(e,t){return e[t]=l().func,e}),{})),{},{defaultValues:l().object,formData:l().object,beforeRenderField:l().func,docsApp:l().func,listApp:l().func,mappingType:l().oneOf(["editable","search","readonly"]),mode:l().oneOf(["list","detail","create","update","search"])});const AZ=wZ;var xZ="entityList/SET_INITIALIZED",EZ="entityList/SET_SEARCH_FORM_TYPE",OZ="entityList/SET_SEARCH_FORM_TYPE_FROM_INPUT",CZ="entityList/RELOAD_ALL",kZ="entityList/RELOAD_DATA",SZ="entityList/SET_SEARCH_FORM_COLLAPSED",DZ="entityList/SET_SEARCH_FORM_COLLAPSED_INITIAL_VALUE",PZ=function(e){return{type:EZ,payload:{searchFormType:e}}},_Z="preferences/LOAD_PREFERENCES",jZ="preferences/SET_POSITIONS",TZ="preferences/CHANGE_POSITION",RZ="preferences/SET_SORTING",IZ="preferences/SET_COLUMNS",MZ="preferences/CHANGE_WIDTH",NZ="preferences/RESET_SORTING",BZ="preferences/RESET_COLUMNS",ZZ="preferences/RESET_PREFERENCES",FZ="preferences/DISPLAY_COLUMN_MODAL",LZ="preferences/SET_PREFERENCES_LOADED",HZ=function(){return{type:_Z}},UZ=function(e){return{type:jZ,payload:{positions:e}}},zZ=function(e){return{type:IZ,payload:{columns:e}}},WZ=function(){return{type:NZ,payload:{}}},VZ="searchForm/SET_INITIALIZED",YZ="searchForm/INITIALIZE",qZ="searchForm/SET_FORM_DEFINITION",GZ="searchForm/EXECUTE_SEARCH",QZ="searchForm/RESET_SEARCH",XZ="searchForm/SET_SHOW_EXTENDED_SEARCH_FORM",KZ="searchForm/SET_SIMPLE_SEARCH_FIELDS",$Z="searchForm/SUBMIT_SEARCH_FORM",JZ="searchForm/SET_VALUES_INITIALIZED",eF="searchForm/SET_FORM_FIELDS_FLAT",tF="searchForm/SET_SEARCH_FILTERS",nF="searchForm/SET_SEARCH_FILTER_ACTIVE",rF="searchForm/DELETE_SEARCH_FILTER",oF="searchForm/SAVE_SEARCH_FILTER",iF="searchForm/SAVE_DEFAULT_SEARCH_FILTER",aF="searchForm/RESET_DEFAULT_SEARCH_FILTER",cF="searchForm/DISPLAY_SEARCH_FIELDS_MODAL",sF="searchForm/resetSearchFields",uF="searchForm/LOAD_SEARCH_AS_QUERY",lF="searchForm/SAVE_QUERY_AS_FILTER",dF="searchForm/SET_QUERY_VIEW_VISIBLE",fF="searchForm/SET_QUERY",pF="searchForm/SET_QUERY_ERROR",hF="searchForm/RUN_QUERY",mF="searchForm/CLEAR_QUERY",gF=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return{type:VZ,payload:{initialized:e}}},vF=function(){return{type:YZ}},yF=function(e){return{type:qZ,payload:{formDefinition:e}}},bF=function(){return{type:GZ}},wF=function(){return{type:$Z}},AF=function(e){return{type:eF,payload:{formFieldsFlat:e}}},xF=function(e){return{type:tF,payload:{searchFilters:e}}},EF=function(e,t,n){return{type:nF,payload:{searchFilterId:e,active:t,exclusive:n}}},OF=function(e){return{type:dF,payload:{queryViewVisible:e}}},CF=function(e){return{type:fF,payload:{query:e}}},kF=function(e){return{type:pF,payload:{queryError:e}}},SF=function(){return window.innerWidth},DF="top",PF="left",_F={sidepanelPosition:PF,isCollapsed:!1,toggleCollapse:function(){},scrollBehaviour:"none"},jF=I().createContext(_F),TF=function(){return(0,R.useContext)(jF)};const RF=function(e){var t=e.children,n=e.sidepanelPosition,r=void 0===n?DF:n,o=e.sidepanelCollapsed,i=void 0!==o&&o,a=e.setSidepanelCollapsed,c=void 0===a?function(){}:a,s=e.scrollBehaviour,u=void 0===s?"none":s,l=function(e,t){var n=(0,R.useState)(!1),r=(0,wd.Z)(n,2),o=r[0],i=r[1],a=(0,R.useState)(SF()),c=(0,wd.Z)(a,2),s=c[0],u=c[1];(0,R.useEffect)((function(){var e=function(){u(SF())};return window.addEventListener("resize",e),function(){return window.removeEventListener("resize",e)}}),[s]),(0,R.useEffect)((function(){i(s<768||e)}),[s,e]);var l=(0,R.useCallback)((function(){i(!o),SF()>768&&t(!o)}),[o,t]);return{isCollapsed:o,toggleCollapse:l}}(i,c),d=l.isCollapsed,f=l.toggleCollapse,p=(0,R.useMemo)((function(){return{sidepanelPosition:r,isCollapsed:r===PF&&d,toggleCollapse:f,scrollBehaviour:u}}),[d,f,r,u]);return(0,S.jsx)(jF.Provider,{value:p,children:t})};var IF,MF,NF,BF,ZF,FF,LF,HF,UF,zF,WF=b.ZP.div.withConfig({displayName:"TopPositioning"})(IF||(IF=(0,v.Z)(["\n height: 100%;\n width: 100%;\n display: grid;\n row-gap: 8px;\n grid-template-areas:\n 'sidepanel'\n 'content';\n grid-auto-rows: auto minmax(auto, 1fr);\n grid-template-columns: minmax(100%, 700px);\n"]))),VF=b.ZP.div.withConfig({displayName:"LeftPositioning"})(MF||(MF=(0,v.Z)(["\n display: grid;\n width: 100%;\n height: 100%;\n column-gap: 1rem;\n /* only show one panel at a time on screens <= 500px */\n grid: ",";\n\n @media (max-width: 600px) {\n column-gap: 8px;\n }\n"])),(function(e){var t=e.isCollapsed;return(e.windowWidth<=500&&!t?"'sidepanel content' / 100% 0":!t&&"'sidepanel content' / minmax(390px, 16%) auto")||"'sidepanel content' / 25px auto"})),YF=b.ZP.div.withConfig({displayName:"StyledSidepanel"})(NF||(NF=(0,v.Z)(["\n grid-area: sidepanel;\n min-height: 50px; /* prevent collapse on shorter screens */\n ","\n\n /* Limit height when positioned top */\n "," && {\n ","\n padding-right: ",";\n ","\n }\n"])),(function(e){return"inline"===e.scrollBehaviour&&"overflow-y: auto;"}),WF,(function(e){return"inline"===e.scrollBehaviour?"max-height: 200px;":"max-height: none;"}),x.Z.space(-.5),of.C),qF=b.ZP.div.withConfig({displayName:"StyledSidepanelMainContent"})(BF||(BF=(0,v.Z)(["\n grid-area: content;\n display: flex;\n"]))),GF=b.ZP.div.withConfig({displayName:"StyledSidepanelLeftContentWrapper"})(ZF||(ZF=(0,v.Z)(["\n display: flex; // enables StyledSidepanelCollapsed to take full height\n flex-direction: column;\n height: 100%;\n overflow-y: auto;\n overflow-x: hidden;\n background-color: ",";\n"])),Jm.Z.color("paper")),QF=b.ZP.div.withConfig({displayName:"StyledSidepanelTopContentWrapper"})(FF||(FF=(0,v.Z)([""]))),XF=b.ZP.div.withConfig({displayName:"StyledSidepanelContent"})(LF||(LF=(0,v.Z)(["\n display: ",";\n height: 100%;\n overflow: hidden;\n"])),(function(e){return e.isCollapsed?"none":"block"})),KF=b.ZP.div.withConfig({displayName:"StyledSidepanelCollapsed"})(HF||(HF=(0,v.Z)(["\n display: ",";\n flex: 1;\n align-items: flex-start;\n background: ",";\n padding-top: ",";\n padding-left: ",";\n\n &:hover {\n cursor: pointer;\n }\n"])),(function(e){return e.isCollapsed?"flex":"none"}),Jm.Z.color("paper"),x.Z.space(-.5),x.Z.space(-2.5)),$F=(0,b.ZP)(_O.Z).withConfig({displayName:"StyledToggleCollapseButton"})(UF||(UF=(0,v.Z)(["\n font-size: ",";\n margin-right: auto;\n position: relative;\n left: ",";\n\n &:hover,\n ",":hover & {\n background-color: transparent;\n color: ",";\n }\n"])),x.Z.font(0),(function(e){return e.isCollapsed?"0.5px":"-5px"}),KF,Jm.Z.color("secondaryLight")),JF=b.ZP.div.withConfig({displayName:"StyledSidepanelHeader"})(zF||(zF=(0,v.Z)(["\n background-color: ",";\n border-bottom: 3px solid ",";\n display: flex;\n justify-content: flex-end;\n padding: ",";\n position: relative;\n z-index: 2; // higher than StyledTether to prevent cover on scroll\n\n "," {\n z-index: 3; //higher than rest to lay over search filter list\n }\n"])),Jm.Z.color("paper"),Jm.Z.color("backgroundBody"),x.Z.space(-.53),Xv);const eL=function(e){var t=e.children,n=TF(),r=n.sidepanelPosition,o=n.isCollapsed,i="left"===r?VF:WF;return(0,S.jsx)(i,{windowWidth:window.innerWidth,isCollapsed:o,children:t})};const tL=function(e){var t=e.children,n=e.sidepanelPosition,r=e.sidepanelCollapsed,o=e.setSidepanelCollapsed,i=e.scrollBehaviour;return(0,S.jsx)(RF,{sidepanelPosition:n,sidepanelCollapsed:r,setSidepanelCollapsed:o,scrollBehaviour:i,children:(0,S.jsx)(eL,{children:t})})};const nL=function(e){var t=e.children,n=TF(),r=n.sidepanelPosition,o=n.isCollapsed,i=n.toggleCollapse,a=n.scrollBehaviour,c=r===PF?GF:QF;return(0,S.jsx)(YF,{sidepanelPosition:r,scrollBehaviour:a,children:(0,S.jsxs)(c,{children:[(0,S.jsx)(XF,{isCollapsed:o,children:t}),"left"===r&&(0,S.jsx)(KF,{onClick:i,isCollapsed:o,children:(0,S.jsx)($F,{icon:"chevron-right",isCollapsed:o})})]})})};const rL=function(e){var t=e.children;return(0,S.jsx)(qF,{children:t})};var oL={INLINE:"inline",NONE:"none"},iL="checked",aL="indeterminate",cL="unchecked";const sL=function(e){var t=e.value,n=e.id,r=e.onChange,o=e.label,i=(0,R.useRef)(null);return(0,R.useLayoutEffect)((function(){i.current.indeterminate=t===aL,i.current.checked=t===iL}),[t]),(0,S.jsx)("input",{ref:i,onChange:function(e){r(t===aL?cL:e.target.checked?iL:cL)},id:n,type:"checkbox","aria-checked":"checked"===t,"aria-label":o})},uL=sL;const lL=function(e){var t,n=e.rowData,r=e.isSelected,o=e.selectionChange,i=e.selectionFilterFn,a=e.rowIdx;return"function"!=typeof i||i(n)?(0,S.jsx)("div",{onClick:function(e){e.shiftKey&&o(n.__key,!0,!0),e.stopPropagation()},"data-cy":"list-selection-checkbox",children:(0,S.jsx)(uL,{value:(t=n,r(t.__key)?"checked":"unchecked"),onChange:function(e){return function(t){return o(e.__key,"checked"===t)}}(n),label:"".concat(n.__model," ").concat(a+1),id:"list-selection-checkbox "+n.__key})}):null};const dL=function(e){var t=e.data,n=e.isSelected,r=e.selectionChange,o=e.selectionFilterFn,i=t.filter((function(e){return"function"!=typeof o||o(e)})).map((function(e){return e.__key})),a=function(e,t){return e?"checked":t?"indeterminate":"unchecked"}(i.every((function(e){return n(e)})),i.some((function(e){return n(e)})));return 0===i.length?null:(0,S.jsx)(uL,{value:a,onChange:function(e){r(i,"checked"===e)}})};var fL={SINGLE:"single",MULTI:"multi",NONE:"none"};md().oneOf(Object.keys(fL).map((function(e){return fL[e]})));const pL=function(e){var t=e.rowData,n=e.isSelected,r=e.selectionChange,o=e.selectionFilterFn;return"function"!=typeof o||o(t)?(0,S.jsx)("div",{onClick:function(e){return e.stopPropagation()},children:(0,S.jsx)("input",{type:"radio",checked:n(t.__key),onChange:function(e){r(t.__key,e.target.value)}})}):null};function hL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function mL(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?hL(Object(n),!0).forEach((function(t){(0,Iv.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hL(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var gL=function(e,t,n){return{id:"single-selection",width:30,resizable:!1,fixedPosition:!0,dynamic:!0,sorting:{sortable:!1},HeaderRenderer:function(){return null},CellRenderer:function(r){return(0,S.jsx)(pL,mL(mL({},r),{},{isSelected:e,selectionChange:t,selectionFilterFn:n}))}}},vL=function(e,t,n){return{id:"multi-selection",dynamic:!0,resizable:!1,fixedPosition:!0,width:30,sorting:{sortable:!1},HeaderRenderer:function(r){return(0,S.jsx)(dL,mL(mL({},r),{},{isSelected:e,selectionChange:t,selectionFilterFn:n}))},CellRenderer:function(r){return(0,S.jsx)(lL,mL(mL({},r),{},{isSelected:e,selectionChange:t,selectionFilterFn:n}))}}};const yL=function(e,t,n){var r=(0,R.useState)(null),o=(0,wd.Z)(r,2),i=o[0],a=o[1],c=(0,R.useCallback)((function(t){return(e||[]).includes(t)}),[e]),s=(0,R.useCallback)((function(e,r,o){if(Array.isArray(e))n(e,r),a(null);else if(o){document.getSelection&&document.getSelection().removeAllRanges();var s=i?t.findIndex((function(e){return e===i})):0,u=t.findIndex((function(t){return t===e}));n(t.slice(Math.min(s,u),Math.max(s,u)+1),r)}else n([e],r||!c(e)),a(e)}),[t,n,c,i]);return{isSelected:c,selectionChange:s}};var bL,wL,AL,xL,EL,OL,CL,kL,SL,DL,PL,_L,jL,TL,RL,IL,ML,NL,BL,ZL,FL=a(28926),LL=a(40493),HL=function(e){var t=e.theme;return(0,rf.HO)(nf()(t,"colors.paper"),3)},UL=x.Z.space(-1.5),zL=b.ZP.div.withConfig({displayName:"StyledTableFooter"})(bL||(bL=(0,v.Z)(["\n grid-row-start: pagination-start;\n display: flex;\n align-items: flex-start;\n padding-top: ",";\n padding-bottom: ",";\n border-top: 1px solid ",";\n\n "," {\n margin-right: ",";\n }\n"])),x.Z.space(-.5),x.Z.space(-1),HL,FL.Z,x.Z.space(-1)),WL=b.ZP.td.withConfig({displayName:"StyledTableCell"})(wL||(wL=(0,v.Z)(["\n && {\n padding: ",";\n background-color: ",";\n border-bottom: 1px solid ",";\n align-content: center;\n box-sizing: content-box;\n text-align: ",";\n\n "," {\n display: inline-block;\n margin-right: ",";\n }\n }\n"])),UL,w.FS.color("paper"),HL,(function(e){var t=e.column;return null!=t&&t.rightAligned?"right":"left"}),LL.q,x.Z.space(-2)),VL=b.ZP.div.withConfig({displayName:"StyledDnD"})(AL||(AL=(0,v.Z)(["\n padding: ",";\n width: 100%;\n display: flex;\n align-items: center;\n opacity: ",";\n"])),UL,(function(e){return e.isDragged?.2:1})),YL=b.ZP.span.withConfig({displayName:"StyledResizeHandle"})(xL||(xL=(0,v.Z)(["\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n background: ",";\n opacity: 0;\n width: 3px;\n cursor: col-resize;\n"])),(function(e){var t=e.theme;return(0,rf.HO)(nf()(t,"colors.paper"),3)})),qL=b.ZP.th.withConfig({displayName:"StyledTableHeaderCell"})(EL||(EL=(0,v.Z)(["\n && {\n position: sticky;\n top: 0;\n background-color: ",";\n text-align: ",";\n border-bottom: 2px solid ",";\n ",";\n user-select: none;\n cursor: ",";\n white-space: nowrap;\n display: flex;\n border-right: ",";\n padding: 1px; /* default th padding */\n ",";\n ","\n ","\n ","\n }\n"])),w.FS.color("paper"),(function(e){return e.rightAligned?"right":"left"}),HL,(0,A.Z)({fontWeight:w.FS.fontWeight("bold")}),(function(e){return e.isSortable?"pointer":"auto"}),(function(e){var t=e.isDraggedOver,n=e.theme;return t?"3px solid ".concat(n.colors.text):"none"}),(function(e){return"header-cell-navigation-column"===e.id&&"z-index: 1"}),(function(e){var t=e.isResizingThisCell,n=e.theme;return t&&"\n background-color: ".concat((0,rf.xn)(n.colors.paper)[1],";\n\n > ").concat(YL," {\n opacity: 1;\n }\n ")}),(function(e){var t=e.isResizingAnyCell,n=e.theme;return!t&&"\n &:hover {\n background-color: ".concat((0,rf.xn)(n.colors.paper)[1],";\n\n > ").concat(YL," {\n opacity: 1;\n }\n }\n ")}),(function(e){var t=e.isResizingThisCell,n=e.isSortable,r=e.fixedPosition,o=e.theme;return n?!t&&!n&&!r&&"\n &:hover {\n background-color: transparent;\n }\n ":"\n &:hover {\n background-color: ".concat(o.colors.paper,";\n }\n ")})),GL=(0,b.iv)(OL||(OL=(0,v.Z)(["\n display: contents;\n ","\n\n &.selected {\n > "," {\n background-color: ",";\n }\n }\n\n &.selectableRow:not(.selected):hover {\n > "," {\n background-color: ",";\n }\n }\n"])),(function(e){return e.clickable&&"cursor: pointer;"}),WL,(function(e){var t=e.theme;return(0,rf.xn)(t.colors.paper)[2]}),WL,(function(e){var t=e.theme;return(0,rf.xn)(t.colors.paper)[1]})),QL=b.ZP.span.withConfig({displayName:"StyledSortingSpan"})(CL||(CL=(0,v.Z)(["\n height: 100%;\n margin-right: 2px;\n"]))),XL=b.ZP.span.withConfig({displayName:"StyledSortingRank"})(kL||(kL=(0,v.Z)(["\n position: relative;\n top: -0.5rem;\n font-weight: ",";\n"])),w.FS.fontWeight("regular")),KL=b.ZP.td.withConfig({displayName:"StyledFullRowProgress"})(SL||(SL=(0,v.Z)(["\n && {\n grid-column: 1 / -1;\n padding-top: "," 0 0 0;\n height: 50px;\n text-align: center;\n border: 0;\n }\n"])),UL),$L=b.ZP.td.withConfig({displayName:"StyledFullRow"})(DL||(DL=(0,v.Z)(["\n && {\n grid-column: 1 / -1;\n padding-top: "," 0 0 0;\n height: 50px;\n text-align: center;\n border: 0;\n ",";\n }\n"])),UL,(0,A.Z)()),JL=b.ZP.thead.withConfig({displayName:"StyledTableHead"})(PL||(PL=(0,v.Z)(["\n ","\n"])),GL),eH=b.ZP.tr.withConfig({displayName:"StyledTableRow"})(_L||(_L=(0,v.Z)(["\n ","\n\n &:nth-child(even) td {\n background-color: ",";\n }\n"])),GL,(function(e){var t=e.theme;return(0,y._j)(.05,t.colors.paper)})),tH=b.ZP.tbody.withConfig({displayName:"StyledTableBody"})(jL||(jL=(0,v.Z)(["\n ","\n"])),GL),nH=b.ZP.table.withConfig({displayName:"StyledTable"})(TL||(TL=(0,v.Z)(["\n overflow: auto;\n display: grid;\n border-collapse: collapse;\n grid-template-columns: ",";\n grid-auto-rows: min-content;\n min-width: 100%;\n ","\n ","\n"])),(function(e){return e.columns.map((function(e){return e.width?e.width+"px":e.shrinkToContent?"max-content":"minmax(100px, auto)"})).join(" ")}),(function(e){return e.scrollBehaviour===oL.INLINE&&(0,b.iv)(RL||(RL=(0,v.Z)(["\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n "])))}),of.C),rH=b.ZP.div.withConfig({displayName:"StretchingTableContainer"})(IL||(IL=(0,v.Z)(["\n grid-row-start: table-start;\n position: relative;\n overflow-x: auto;\n"]))),oH=b.ZP.div.withConfig({displayName:"StyledTableWrapper"})(ML||(ML=(0,v.Z)(["\n display: grid;\n background-color: ",";\n grid-template-rows: [table-start] 1fr [pagination-start] auto auto;\n grid-template-columns: 100%;\n height: 100%;\n\n // reset external styles in old client\n input[type='checkbox'],\n input[type='radio'] {\n margin: 3px 3px 3px 4px !important;\n min-width: 12px;\n }\n"])),w.FS.color("paper")),iH=b.ZP.div.withConfig({displayName:"StyledDraggable"})(NL||(NL=(0,v.Z)(["\n width: 100%;\n height: 100%;\n display: flex;\n"]))),aH=b.ZP.span.withConfig({displayName:"StyledHeaderContentWrapper"})(BL||(BL=(0,v.Z)(["\n display: flex;\n"]))),cH=b.ZP.div.withConfig({displayName:"StyledHeaderContent"})(ZL||(ZL=(0,v.Z)(["\n width: 100%;\n"]))),sH=md().oneOfType([md().string,md().number]),uH=md().shape({__key:sH}),lH=(md().arrayOf(uH),md().oneOf(Object.keys(oL).map((function(e){return oL[e]}))),md().shape({id:md().string.isRequired,label:md().string,sorting:md().shape({sortable:md().bool,sortRank:md().number,order:md().oneOf(["asc","desc"])}),resizable:md().bool,width:md().number,HeaderRenderer:md().elementType,CellRenderer:md().elementType,rightAligned:md().bool})),dH=I().memo((function(e){var t=e.column,n=e.rowData,r=e.rowIdx;return(0,S.jsx)(WL,{"data-cy":"list-cell",children:t.CellRenderer?(0,S.jsx)(t.CellRenderer,{rowData:n,column:t,rowIdx:r}):(0,S.jsx)(Zd.ZP.Span,{children:n[t.id]})})}));dH.propTypes={rowData:uH.isRequired,column:lH.isRequired,rowIdx:md().number};var fH=function(e,t){return!e.column.dynamic||0===Object.keys(UE.Z.difference(e,t)).length};const pH=I().memo(dH,fH);var hH,mH,gH,vH,yH=function(){return hH||(hH=(0,S.jsx)(eH,{children:(0,S.jsxs)(KL,{children:[(0,S.jsx)(ik.Z,{size:"20"}),(0,S.jsx)(Zd.ZP.P,{children:(0,S.jsx)(fd.Z,{id:"client.component.table.dataLoading"})})]})}))},bH=function(){return mH||(mH=(0,S.jsx)(eH,{children:(0,S.jsx)($L,{children:(0,S.jsx)(Zd.ZP.Span,{children:(0,S.jsx)(fd.Z,{id:"client.component.table.noData"})})})}))};const wH=function(e){var t=e.data,n=e.columns,r=e.isSelected,o=e.selectionChange,i=e.dataLoadingInProgress,a=e.onRowClick,c=e.clickable;return i?gH||(gH=(0,S.jsx)(tH,{children:(0,S.jsx)(yH,{})})):(0,S.jsx)(tH,{children:t.length>0?t.map((function(e,t){return(0,S.jsx)(eH,{className:"selectableRow ".concat(r(e.__key)&&"selected"),onClick:(i=e,function(e){e.shiftKey?o(i.__key,!0,!0):e.metaKey||e.ctrlKey?o(i.__key):c&&a&&a(i.__key)}),clickable:c,"data-cy":"list-row",children:n.map((function(n){return(0,S.jsx)(pH,{selected:r(e.__key),rowData:e,column:n,rowIdx:t},"table-static-cell-".concat(e.__key,"-").concat(n.id))}))},"list-row-".concat(e.__key));var i})):vH||(vH=(0,S.jsx)(bH,{}))})};var AH,xH,EH=b.ZP.div.withConfig({displayName:"StyledPagination"})(AH||(AH=(0,v.Z)(["\n display: flex;\n align-items: center;\n justify-content: flex-start;\n flex-wrap: wrap;\n gap: ",";\n margin-left: 5px;\n\n span {\n padding-right: 6px;\n }\n"])),x.Z.space(-1)),OH=(0,b.ZP)(pd.Z).withConfig({displayName:"StyledPaginationButton"})(xH||(xH=(0,v.Z)(["\n padding: "," ",";\n"])),x.Z.space(-2),x.Z.space(-.8));const CH=(0,P.ZP)((function(e){var t=e.totalCount,n=e.recordsPerPage,r=e.currentPage,o=e.onPageChange,i=e.intl,a=Math.ceil(t/n),c=Math.min((r-1)*n+1,t),s=Math.min(r*n,t),u=function(e){return i.formatMessage({id:e})};return(0,S.jsxs)(EH,{children:[(0,S.jsxs)(bd,{children:[(0,S.jsx)(OH,{disabled:1===r,label:u("client.component.pagination.firstPageTitle"),iconOnly:!0,icon:"chevron-double-left",onClick:function(){return o(1)}}),(0,S.jsx)(OH,{disabled:1===r,label:u("client.component.pagination.prePageTitle"),iconOnly:!0,icon:"chevron-left",onClick:function(){return o(r-1)}}),(0,S.jsx)(OH,{disabled:r>=a,label:u("client.component.pagination.nextPageTitle"),iconOnly:!0,icon:"chevron-right",onClick:function(){return o(r+1)}}),(0,S.jsx)(OH,{disabled:r>=a,label:u("client.component.pagination.lastPageTitle"),iconOnly:!0,icon:"chevron-double-right",onClick:function(){return o(a)}})]}),t>0&&(0,S.jsx)(Zd.ZP.Span,{children:(0,S.jsx)(fd.Z,{id:"client.component.pagination.text",values:{start:c,to:s,total:t}})})]})})),kH=CH;const SH=(0,P.ZP)((function(e){var t,n=e.onPageChange,r=e.onPageRefresh,o=e.paginationInfo,i=e.intl,a=Boolean(o),c="function"==typeof r;return a||c?(0,S.jsxs)(zL,{children:[a&&(0,S.jsx)(kH,{onPageChange:n,currentPage:o.currentPage,totalCount:o.totalCount,recordsPerPage:o.recordsPerPage}),c&&(0,S.jsx)(_O.Z,{type:"button",title:(t="client.component.table.refreshTitle",i.formatMessage({id:t})),icon:"sync",onClick:r})]}):null}));function DH(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function PH(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?DH(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):DH(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var _H={currentlyDragging:null,currentlyDragOver:null,dropPosition:null,offset:null},jH={Top:"Top",Bottom:"Bottom"};const TH=function(e){var t=(0,R.useState)(_H),n=T()(t,2),r=n[0],o=n[1],i=r.currentlyDragging,a=r.currentlyDragOver,c=r.dropPosition,s=r.offset;return{dndEvents:(0,R.useCallback)((function(t){return{onDragStart:function(e){o((function(e){return PH(PH({},e),{},{currentlyDragging:t})}));var n=e.target;n&&n.addEventListener("dragend",(function e(t){o(_H),t.stopPropagation(),n&&n.removeEventListener("dragend",e)}),!1),e.stopPropagation()},onDragEnter:function(e){if(i&&!Dp()(a,t)){var n=e.target?e.target.getBoundingClientRect():{},r=n.y+n.height/2;o((function(e){return PH(PH({},e),{},{currentlyDragOver:t,offset:r})}))}e.stopPropagation()},onDragOver:function(e){if(i){var t=e.clientY-s>0?jH.Bottom:jH.Top;return o((function(e){return PH(PH({},e),{},{dropPosition:t})})),e.preventDefault(),e.stopPropagation(),!0}},onDrop:function(t){i&&a&&(e(i,a,c),o(_H),t.stopPropagation())}}}),[a,i,c,s,e]),dndState:(0,R.useMemo)((function(){return{currentlyDragOver:a,currentlyDragging:i,dropPosition:c,offset:s}}),[a,i,c,s])}};const RH=function(e,t,n){var r=t-e;return Math.max(50,n+r)},IH=function(e,t,n){var r=(0,R.useState)(null),o=T()(r,2),i=o[0],a=o[1],c=(0,R.useRef)(null),s=(0,R.useRef)(),u=(0,R.useState)(!1),l=T()(u,2),d=l[0],f=l[1],p=(0,R.useState)(!1),h=T()(p,2),m=h[0],g=h[1],v=(0,R.useMemo)((function(){return{resizingElement:i,isResizing:d}}),[i,d]),y=(0,R.useCallback)((function(){i&&(n(i),g(!1),setTimeout((function(){f(!1),a(null),c.current=void 0}),0))}),[i,n]),b={onMouseMove:(0,R.useCallback)((function(n){i&&m&&(s.current=requestAnimationFrame((function(){if(c.current){var r=e(i),o=RH(c.current.y,n.clientY,r.clientHeight),a=RH(c.current.x,n.clientX,r.clientWidth);t(i,{height:o,width:a})}c.current={y:n.clientY,x:n.clientX}})))}),[i,t,m,e]),onMouseUp:y};return(0,R.useEffect)((function(){return m||cancelAnimationFrame(s.current),function(){cancelAnimationFrame(s.current)}}),[m]),{resizeState:v,startResize:function(e){return function(t){a(e),f(!0),g(!0),c.current=void 0,t.stopPropagation(),t.preventDefault()}},resizingEvents:b}};const MH=function(e){var t=e.column,n=e.startResize;return(0,S.jsx)(YL,{"data-cy":"header-cell-".concat(t.id,"-resizing-controller"),onMouseDown:n(t)})};const NH=(0,P.ZP)((function(e){var t,n,r,o=e.column,i=e.intl,a=o.sorting&&o.sorting.sortRank&&o.sorting.order,c=(null===(t=o.sorting)||void 0===t?void 0:t.sortRank)>1&&(0,S.jsx)(XL,{children:o.sorting.sortRank}),s="sort-".concat("asc"===(null===(n=o.sorting)||void 0===n?void 0:n.order)?"up":"down");return a?(0,S.jsxs)(QL,{title:(r="client.component.table.sortingTitle",i.formatMessage({id:r})),children:[(0,S.jsx)(B.Z,{icon:s}),c]}):null}));function BH(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ZH(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?BH(Object(n),!0).forEach((function(t){(0,Iv.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):BH(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var FH=function(e){var t=e.column,n=e.data;return t.HeaderRenderer?(0,S.jsx)(t.HeaderRenderer,{column:t,data:n}):(0,S.jsxs)(aH,{children:[(0,S.jsx)(cH,{title:t.label,dangerouslySetInnerHTML:{__html:t.label}}),(0,S.jsx)(NH,{column:t})]})};const LH=function(e){var t=e.columns,n=e.data,r=e.onColumnPositionChange,o=e.onSortingChange,i=e.tableEl,a=e.onColumnWidthChanging,c=e.onColumnWidthChanged,s=TH(r),u=s.dndEvents,l=s.dndState,d=(0,R.useCallback)((function(e){return i.current.querySelector("th[id='header-cell-".concat(e.id,"']"))}),[]),f=(0,R.useCallback)((function(e,t){var n=t.width;return a(e.id,n)}),[a]),p=(0,R.useCallback)((function(e){return c(e.id)}),[c]),h=IH(d,f,p),m=h.startResize,g=h.resizingEvents,v=h.resizeState,y=v.isResizing,b=v.resizingElement,w=function(e){return function(t){!y&&e.sorting&&e.sorting.sortable&&o(e.id,t.shiftKey)}},A=t.map((function(e){var t="header-cell-".concat(e.id),r="header-cell-drop-".concat(e.id),o=e.sorting&&e.sorting.sortable,i=y&&e.id===(null==b?void 0:b.id),a=l.currentlyDragOver===e.id&&l.currentlyDragging!==e.id,c=l.currentlyDragging===e.id;return(0,S.jsxs)(qL,{"data-cy":t,id:t,onClick:w(e),isResizingAnyCell:y,isResizingThisCell:i,isSortable:o,isDraggedOver:a,rightAligned:e.rightAligned,children:[(0,S.jsx)(iH,ZH(ZH({id:r},!e.fixedPosition&&ZH({draggable:!0},u(e.id))),{},{children:(0,S.jsx)(VL,{isDragged:c,children:(0,S.jsx)(FH,{column:e,data:n})})}),r),e.resizable&&(0,S.jsx)(MH,{column:e,startResize:m})]},t)}));return(0,S.jsx)(JL,ZH(ZH({},g),{},{children:(0,S.jsx)(eH,{children:A})}))};function HH(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function UH(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?HH(Object(n),!0).forEach((function(t){(0,Iv.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):HH(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var zH=function(e){var t=e.columns,n=e.selection,r=e.data,o=e.onSelectionChange,i=e.selectionStyle,a=e.paginationInfo,c=e.onColumnPositionChange,s=e.onSortingChange,u=e.dataLoadingInProgress,l=e.onRowClick,d=e.clickable,f=e.onPageChange,p=e.onPageRefresh,h=e.scrollBehaviour,m=void 0===h?oL.INLINE:h,g=e.onColumnWidthChange,v=e.selectionFilterFn,y=(0,R.useState)(t),b=(0,wd.Z)(y,2),w=b[0],A=b[1],x=(0,R.useRef)(null),E=(0,R.useCallback)((function(e){var t,n=null===(t=w.find((function(t){return t.id===e})))||void 0===t?void 0:t.width;g&&g(e,n)}),[w,g]),O=(0,R.useCallback)((function(e,t){A((0,RO.Z)(w.map((function(n){return n.id===e?UH(UH({},n),{},{width:t}):n}))))}),[w]),C=(0,R.useMemo)((function(){return r?r.map((function(e){return e.__key})):[]}),[r]),k=yL(n,C,o),D=k.isSelected,P=k.selectionChange;return(0,R.useEffect)((function(){var e=function(e,t,n,r,o){return e&&e!==fL.NONE?e===fL.MULTI?vL(n,r,o):gL(n,r,o):null}(i,0,D,P,v);A([].concat((0,RO.Z)(e?[e]:[]),(0,RO.Z)(t)))}),[t,n,D,P,v,i]),(0,S.jsxs)(oH,{children:[(0,S.jsx)(rH,{children:(0,S.jsxs)(nH,{ref:x,columns:w,scrollBehaviour:m,children:[(0,S.jsx)(LH,{columns:w,data:r,onColumnWidthChanging:O,onColumnWidthChanged:E,onColumnPositionChange:c,tableEl:x,onSortingChange:s}),(0,S.jsx)(wH,{columns:w,data:r,isSelected:D,selectionChange:P,dataLoadingInProgress:u,onRowClick:l,clickable:d})]})}),(0,S.jsx)(SH,{onPageChange:f,onPageRefresh:p,paginationInfo:a})]})},WH=function(e,t){return 0===Object.keys(UE.Z.difference(e,t)).length};const VH=I().memo(zH,WH);var YH,qH="list/INITIALIZE",GH="list/SET_ENTITIES",QH="list/SET_FORM_DEFINITION",XH="list/SET_SEARCH_LIST_FORM_DEFINITION",KH="list/SET_ENTITY_MODEL",$H="list/SET_SORTING",JH="list/SET_CURRENT_PAGE",eU="list/SET_ENTITY_COUNT",tU="list/ADD_ENTITIES_TO_STORE",nU="list/CLEAR_ENTITIES_CACHE",rU="list/SET_IN_PROGRESS",oU="list/CHANGE_PAGE",iU="list/REFRESH",aU="list/SET_SEARCH_FILTERS",cU="list/ON_ROW_CLICK",sU="entityList/NAVIGATE_TO_CREATE",uU="list/SET_LAZY_DATA",lU="list/NAVIGATE_TO_ACTION",dU="list/SET_SORTING_INTERACTIVE",fU="list/DEFINE_SORTING",pU="list/SET_CONSTRICTION",hU="list/SET_INITIALIZED",mU="list/SET_MARKED",gU="list/TOGGLE_MARKINGS",vU=function(){return{type:qH}},yU=function(e){return{type:GH,payload:{entities:e}}},bU=function(e,t){return{type:tU,payload:{page:e,entities:t}}},wU=function(e){return{type:eU,payload:{entityCount:e}}},AU=function(e){return{type:QH,payload:{formDefinition:e}}},xU=function(e){return{type:XH,payload:{searchListFormDefinition:e}}},EU=function(e){return{type:$H,payload:{sorting:e}}},OU=function(e){return{type:JH,payload:{currentPage:e}}},CU=function(e){return{type:rU,payload:{inProgress:e}}},kU=function(){return{type:iU}},SU=function(e,t,n){return{type:uU,payload:{type:e,id:t,values:n}}},DU=function(e,t){return{type:lU,payload:{definition:e,selection:t}}},PU=function(){return{type:fU}},_U=function(e){return{type:pU,payload:{constriction:e}}},jU=function(e){return{type:gU,payload:{selection:e}}},TU=b.ZP.span.withConfig({displayName:"StyledMarkingWrapper"})(YH||(YH=Ld()(["\n ","\n display: flex;\n height: 100%;\n flex-direction: column;\n align-items: center;\n\n &:hover {\n color: ",";\n }\n ","\n"])),(0,A.Z)(),w.FS.color("secondaryLight"),(function(e){var t=e.marked,n=e.theme;return t&&"color: ".concat(n.colors.secondary,";")})),RU={setMarked:function(e,t,n){return{type:mU,payload:{entityName:e,entityKey:t,marked:n}}}},IU=(0,_.connect)((function(e){return{markings:e.list.lazyData.markings}}),RU)((function(e){var t=e.rowData,n=e.markings,r=e.setMarked,o=(0,R.useState)(!1),i=T()(o,2),a=i[0],c=i[1],s=n&&n[t.__model]&&n[t.__model][t.__key];(0,R.useEffect)((function(){s||c(!1)}),[s]);return(0,S.jsx)(TU,{marked:s,onClick:function(e){e.stopPropagation(),r(t.__model,t.__key,!s)},onMouseEnter:function(){return c(!0)},onMouseLeave:function(){return c(!1)},children:(0,S.jsx)(B.Z,{icon:s||a?"star-full":"star"})})}));function MU(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function NU(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?MU(Object(n),!0).forEach((function(t){(0,Iv.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):MU(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const BU=function(e){var t=e.buttonProps,n=e.onOpen,r=e.children,o=(0,R.useRef)(null),i=(0,R.useState)(!1),a=(0,wd.Z)(i,2),c=a[0],s=a[1],u=(0,R.useState)(!1),l=(0,wd.Z)(u,2),d=l[0],f=l[1];return(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(_O.Z,NU(NU({},t),{},{onClick:function(e){s(!c),e.stopPropagation(),n&&!d&&(n(),f(!0))},ref:o})),c&&(0,S.jsx)(Xv,{referenceElement:o.current,open:c,onClose:function(){s(!1)},children:r})]})};var ZU,FU,LU,HU,UU={displayColumnModal:function(){return{type:FZ,payload:{}}},resetSorting:WZ,resetPreferences:function(){return{type:ZZ,payload:{}}},resetColumns:function(){return{type:BZ,payload:{}}}};const zU=(0,_.connect)((function(e,t){return{sortable:e.input.sortable,disablePreferencesMenu:e.list.disablePreferencesMenu}}),UU)((function(e){return e.disablePreferencesMenu?null:(0,S.jsxs)(BU,{buttonProps:{icon:"ellipsis-v"},children:[(0,S.jsx)(Yv,{onClick:e.displayColumnModal,children:ZU||(ZU=(0,S.jsx)(fd.Z,{id:"client.entity-list.preferences.columns"}))}),(0,S.jsx)(Yv,{onClick:e.resetColumns,children:FU||(FU=(0,S.jsx)(fd.Z,{id:"client.entity-list.preferences.columns.reset"}))}),e.sortable&&(0,S.jsx)(Yv,{onClick:e.resetSorting,children:LU||(LU=(0,S.jsx)(fd.Z,{id:"client.entity-list.sorting.reset"}))}),(0,S.jsx)(Yv,{onClick:e.resetPreferences,children:HU||(HU=(0,S.jsx)(fd.Z,{id:"client.entity-list.preferences.reset"}))})]})}));var WU;function VU(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function YU(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?VU(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):VU(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var qU=function(e){var t=e.showNavigation,n=e.rowData,r=e.navigationStrategy,o=e.parent;return t&&r.DetailLinkRelative?(0,S.jsx)("span",{onClick:function(e){return e.stopPropagation()},"data-cy":"list-navigation-arrow",children:(0,S.jsx)(r.DetailLinkRelative,YU(YU({entityKey:n.__key,entityModel:n.__model},o&&o.relationName&&{relation:o.relationName}),{},{children:WU||(WU=(0,S.jsx)(B.Z,{icon:"arrow-right"}))}))}):null},GU=function(e,t,n){return{id:"navigation-column",fixedPosition:!0,width:30,resizable:!1,dynamic:!1,HeaderRenderer:zU,CellRenderer:function(r){return(0,S.jsx)(qU,YU(YU({},r),{},{showNavigation:e,navigationStrategy:t,parent:n}))}}};function QU(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function XU(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?QU(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):QU(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var KU=function(e){var t=e.showLink,n=e.clickable,r=e.navigationStrategy,o=e.disablePreferencesMenu,i=e.parent,a=e.markable,c=e.columnDefinitions,s=e.widths,u=e.positions,l=e.entities,d=e.changeWidth,f=e.inProgress,p=e.currentPage,h=e.entityCount,m=e.limit,g=e.changePage,v=e.refresh,y=e.setSortingInteractive,b=e.tableSelectionStyle,w=e.onSelectChange,A=e.selection,x=e.selectionFilterFn,E=e.scrollBehaviour,O=e.onRowClick,C=e.changePosition,k=t&&n&&r&&!!r.DetailLinkRelative,D=!o,P=[].concat(z()(k||D?[GU(k,r,i)]:[]),z()(a?[{id:"mark-column",fixedPosition:!0,width:30,resizable:!1,dynamic:!1,CellRenderer:IU}]:[]),z()(c.map((function(e){return XU(XU({},e),{},{width:nf()(s,e.id)})})).sort((function(e,t){return nf()(u,[e.id])-nf()(u,[t.id])}))));return(0,S.jsx)(VH,{data:l,columns:P,onColumnWidthChange:d,dataLoadingInProgress:f,paginationInfo:{currentPage:p,totalCount:h,recordsPerPage:m},onPageChange:g,onPageRefresh:v,onSortingChange:y,selectionStyle:b,onSelectionChange:w,selection:A,selectionFilterFn:x,scrollBehaviour:E,onRowClick:O,clickable:n,onColumnPositionChange:function(e,t){return C(e,t,P)}})},$U=function(e,t){var n=UE.Z.difference(e,t);return 0===Object.keys(n).length};const JU=I().memo(KU,$U);var ez="list/ON_ROW_SELECT",tz="list/SET_SELECTION",nz="selection/CLEAR_SELECTION",rz="selection/SET_QUERY",oz="selection/SET_QUERY_COUNT",iz="selection/TOOGLE_SHOW_SELECTED_RECORDS",az="selection/RELOAD_DATA",cz=function(e){return{type:tz,payload:{selection:e}}},sz=function(e,t){return{type:ez,payload:{keys:e,isSelected:t}}},uz=function(){return{type:nz}},lz=function(e){return{type:rz,payload:{query:e}}};function dz(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function fz(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?dz(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dz(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var pz=function(e,t){return e?e.map((function(e){var n=nf()(t,["defaultDisplays",e.model,e.key],"");return fz(fz({},e),{},{display:n})})):e},hz=function(e,t){if(!e)return e;var n=nf()(t,["defaultDisplays",e.model,e.key],"");return fz(fz({},e),{},{display:n})},mz={"multi-select-box":pz,"multi-remote-field":pz,"single-select-box":hz,"single-remote-field":hz,displayExpression:function(e,t,n){return nf()(t,["displayExpressions",n.formName,n.key,n.path],"")}};const gz=function(e){var t=e.value,n=e.children;return I().cloneElement(n,{value:t})};const vz=(0,_.connect)((function(e,t){var n,r,o,i,a,c={path:t.path,formName:e.input.formName,key:t.entityKey};return{value:(n=t.value,r=t.type,o=e.list.lazyData,i=c,a=mz[r],a?a(n,o,i):n)}}),{})(gz);var yz,bz,wz,Az=b.ZP.div.withConfig({displayName:"StyledColumnContentWrapper"})(yz||(yz=Ld()(["\n display: flex;\n align-items: center;\n\n > * {\n margin-right: ",";\n }\n"])),x.Z.space(-2)),xz=b.ZP.span.withConfig({displayName:"StyledActionWrapper"})(bz||(bz=Ld()(["\n display: inline-block;\n\n "," {\n > * {\n overflow: hidden;\n }\n }\n"])),gd.Z),Ez=b.ZP.span.withConfig({displayName:"StyledSpan"})(wz||(wz=Ld()(["\n p {\n margin-block-start: 0; // reset user agent style to prevent margin within table\n }\n"])));function Oz(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Cz(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Oz(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Oz(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var kz=function(e){var t=e.value,n=e.type,r=e.formData,o=e.formField,i={targetEntity:t&&UE.Z.getOrFirst(t).model},a=(0,R.useMemo)((function(){return $T.factory("list",n)}),[n]);return(0,S.jsx)(vz,{value:t,type:n,children:(0,S.jsx)(a,{type:n,mappingType:"list",formField:o,modelField:i,value:t,formData:r,breakWords:!1})})};const Sz=function(e,t,n){var r=e.id,o=e.path,i=e.dataType,a=t[o],c=GR.isMultipleFields(a,i)?a:[a],s=$T.formattedComponentConfigs[i],u=s&&s.dataContainerProps?s.dataContainerProps({formField:e}):{},l=GR.enhanceMultipleFieldsWithSeparators(c.map((function(r,a){return(0,S.jsx)(yN.FormDataContainer,Cz(Cz({},u),{},{navigationStrategy:!0,children:(0,S.jsx)(kz,{type:i,value:r,intl:n,formField:e})}),"formDataContainer-".concat(t.__key,"-").concat(o,"-").concat(a))})));return(0,S.jsx)(Ez,{children:l},r)};var Dz=function(e,t){return(0,S.jsx)(vz,{path:e.id,entityKey:t.__key,type:"displayExpression",value:null,children:(0,S.jsx)(nl.Z,{type:"html",breakWords:!1,value:t[e.id]})},"action-"+e.id)},Pz=function(e,t,n){return(0,S.jsx)(xz,{onClick:function(e){e.stopPropagation()},children:(0,S.jsx)(my.Action,{definition:e,selection:my.getSingleEntitySelection(t.__model,t.__key),parent:n},"tableAction"+e.id)},"action-"+e.id)};function _z(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function jz(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_z(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_z(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Tz=function(e,t){return(t||e.selection.query).hasUserChanges&&e.list.searchListFormDefinition?e.list.searchListFormDefinition:e.list.formDefinition},Rz=function(e){return e.children.find((function(e){return e.componentType===YI.componentTypes.TABLE}))},Iz=function(e){var t=Rz(e);return t.sorting?t.sorting:[]},Mz=function(e){return!!e&&!1!==Rz(e).selectable},Nz=function(e){return!0===e.disablePreferencesMenu},Bz=function(e){var t=Rz(e);return(null==t?void 0:t.endpoint)||null},Zz=function(e){var t=Rz(e);return(null==t?void 0:t.searchEndpoint)||null},Fz=function(e){var t=Rz(e);return(null==t?void 0:t.constriction)||null},Lz=function(e){return!e.hidden},Hz=function(e,t){var n=t&&t.findIndex((function(t){return t.field===e.id}));return n>=0?{sortRank:n+1,order:t[n].order}:null},Uz=["counter","decimal","double","integer","latitude","long","longitude","moneyamount","percent","serial","sorting","version"],zz=function(e){return e.children&&1===e.children.length&&Uz.includes(e.children[0].dataType)},Wz=function(e){return e.length>1?(0,S.jsx)(Az,{children:e}):e},Vz=function(e,t,n){return function(r){return function(e,t,n,r){var o=e.componentType;return my.isAction(o)?Pz(e,t,n):o===YI.componentTypes.FIELD?Sz(e,t,r):o===YI.componentTypes.DISPLAY?Dz(e,t):void 0}(r,e,t,n)}},Yz=function(e){var t=e.cellRenderers,n=e.columnDefinition,r=e.parent,o=e.intl;return n.clientRenderer&&t[n.clientRenderer]?function(e,t,n){return function(r){var o=r.rowData,i=r.column;return e(o,i,Vz(o,t,n))}}(t[n.clientRenderer],r,o):n.children.some((function(e){return e.onlyShowOnEmptyColumn}))?function(e,t){return function(n){var r=n.rowData,o=n.column,i=o.children.some((function(e){return!e.onlyShowOnEmptyColumn&&e.path&&r[e.path]})),a=o.children.filter((function(e){return i===!e.onlyShowOnEmptyColumn})).map(Vz(r,e,t));return Wz(a)}}(r,o):function(e){var t=e.rowData,n=e.column;return Wz(n.children.map(Vz(t,r,o)))}},qz=function(e){var t=e.table,n=e.sorting,r=e.sortable,o=void 0===r||r,i=e.parent,a=e.intl,c=e.columnDisplayPreferences,s=void 0===c?{}:c,u=e.cellRenderers,l=void 0===u?{}:u;return t.children.filter((function(e){return Object.prototype.hasOwnProperty.call(s,e.id)?s[e.id]:!e.hidden})).filter((function(e){return!i||1!==e.children.length||e.children[0].path!==i.reverseRelationName})).filter((function(e){return e.children.filter(Lz).length>0})).map((function(e){return{id:e.id,label:e.label,sorting:jz({sortable:o&&e.sortable},Hz(e,n)),shrinkToContent:e.shrinkToContent||!1,children:e.children.filter(Lz),resizable:!e.widthFixed,rightAligned:zz(e),CellRenderer:Yz({cellRenderers:l,columnDefinition:e,parent:i,intl:a})}}))},Gz=function(e,t){var n=[],r=[],o=qz({table:Rz(e),columnDisplayPreferences:t}).reduce((function(e,t){return[].concat(z()(e),z()(t.children.filter((function(e){return!my.isAction(e.componentType)})).map((function(e){if(Lm.relationFieldTypes.includes(e.dataType))n.push(e.path);else if("display"===e.componentType)return r.push(e.id),null;return e.path})).filter((function(e){return e}))))}),[]);return{paths:wb()(o),relationFields:n,displayExpressionFields:r}},Qz=function(e){return Xz(e)},Xz=function e(t){return"field-set"===t.componentType?t.children.reduce((function(e,t){return jz(jz({},e),{},L()({},t.path||t.id,t.dataType))}),{}):t.children?t.children.reduce((function(t,n){return jz(jz({},t),e(n))}),{}):void 0},Kz=function e(t,n){if("field-set"===t.componentType){var r=t.children.some((function(e){return e.path===n}));return jz(jz(jz({},t),r&&{readonly:!0}),{},{children:t.children.map((function(e){return e.path===n?jz(jz({},e),{},{dataType:"single-select-box"}):e}))})}return t.children?jz(jz({},t),{},{children:t.children.map((function(t){return e(t,n)}))}):t},$z=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Rz(e).children.filter((function(e){return!t||1!==e.children.length||e.children[0].path!==t.reverseRelationName})).map((function(e){return jz(jz({},e),{},{hidden:Object.prototype.hasOwnProperty.call(n,e.id)?!n[e.id]:e.hidden})}))},Jz={SINGLE:"single",MULTI:"multi",MULTI_EXPLICIT:"multi_explicit",NONE:"none"};l().oneOf(Object.keys(Jz).map((function(e){return Jz[e]})));function eW(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return tW(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return tW(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){c=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(c)throw i}}}}function tW(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var nW=function(e,t){return e-t},rW=function(e,t,n){var r,o=e.slice(),i=eW(t);try{var a=function(){var e=r.value;n?o.push(e):o=o.filter((function(t){return t!==e}))};for(i.s();!(r=i.n()).done;)a()}catch(e){i.e(e)}finally{i.f()}return wb()(o).sort(nW)},oW={initialize:vU,changePage:function(e){return{type:oU,payload:{page:e}}},refresh:kU,setSortingInteractive:function(e,t){return{type:dU,payload:{field:e,add:t}}},onRowClick:function(e){return{type:cU,payload:{id:e}}},onSelectChange:sz,setSelection:cz,changePosition:function(e,t,n){return{type:TZ,payload:{field:e,afterFieldPosition:t,columns:n}}},resetSorting:WZ,changeWidth:function(e,t){return{type:MZ,payload:{field:e,width:t}}}};const iW=(0,_.connect)((function(e,t){return{currentPage:e.list.currentPage,entities:e.list.entities,entityCount:e.list.entityCount,limit:e.input.limit,inProgress:e.list.inProgress,tableSelectionStyle:(r=e.input.selectionStyle,o=Mz(Tz(e)),!1===o||r===Jz.NONE?Jz.NONE:r===Jz.SINGLE?Jz.SINGLE:Jz.MULTI),clickable:(n=Tz(e),!1!==Rz(n).clickable),selection:e.selection.selection,selectionFilterFn:e.input.selectionFilterFn,parent:e.input.parent,showLink:e.input.showLink,navigationStrategy:e.input.navigationStrategy,positions:e.preferences.positions,widths:e.preferences.widths,markable:e.list.entityModel.markable&&e.list.formDefinition.markable,disablePreferencesMenu:Nz(Tz(e)),scrollBehaviour:e.input.scrollBehaviour};var n,r,o}),oW)((0,P.ZP)(JU));var aW=function(e){var t=e.selection,n=e.input;return t.selection.length>0||"multi_explicit"===n.selectionStyle?{entityName:e.input.entityName,type:"ID",ids:t.selection,count:t.selection.length||0}:{entityName:e.input.entityName,type:"QUERY",query:t.query,count:t.queryCount||0}};const cW=(0,_.connect)((function(e,t){return{selection:aW(e)}}),{})(my.Action);var sW,uW;const lW=b.ZP.div(sW||(sW=Ld()(["\n display: flex;\n width: max-content;\n"])));var dW=b.ZP.span.withConfig({displayName:"StyledButton"})(uW||(uW=Ld()(["\n border-radius: ",";\n padding: 0.3rem 1.3rem;\n display: ",";\n margin-right: 1rem;\n align-items: center;\n cursor: pointer;\n background-color: ",";\n\n &:hover {\n background-color: ",";\n\n * {\n color: ",";\n }\n }\n\n && {\n * {\n color: ",";\n }\n\n button {\n background-color: transparent;\n margin-left: 0.5rem;\n margin-top: -0.2rem;\n margin-right: -0.8rem;\n\n &:hover * {\n color: ",";\n }\n }\n }\n"])),Jm.Z.radii("medium"),(function(e){return e.disabled?"none":"flex"}),(function(e){return e.active&&Jm.Z.color("secondary")}),Jm.Z.color("secondaryLight"),Jm.Z.color("paper"),(function(e){return e.active&&Jm.Z.color("paper")}),Jm.Z.color("secondary"));const fW=function(e){var t,n=e.intl,r=e.selection,o=e.showSelectedRecords,i=e.toggleShowSelectedRecords,a=e.queryCount,c=e.clearSelection,s=0!==r.length;return(0,S.jsxs)(lW,{children:[(0,S.jsx)(dW,{active:!o,onClick:function(){(o||s)&&i()},children:(0,S.jsx)(Zd.ZP.Span,{children:(0,S.jsx)(fd.Z,{id:"client.entity-list.selectionAll",values:{count:a}})})}),(0,S.jsx)(dW,{active:o,disabled:!s,onClick:function(){s&&i()},"data-cy":"selection-controller-selection",children:(0,S.jsxs)(Zd.ZP.Span,{children:[(0,S.jsx)(fd.Z,{id:"client.entity-list.selectionSelection",values:{count:r.length}}),r.length>0&&(0,S.jsx)(pd.Z,{"data-cy":"selection-controller-delete-selection",dense:!0,icon:"times",title:(t="client.entity-list.clearSelection",n.formatMessage({id:t})),onClick:function(e){e.stopPropagation(),o&&i(),c()}})]})})]})},pW=fW;var hW={clearSelection:uz,toggleShowSelectedRecords:function(){return{type:iz}}};const mW=(0,_.connect)((function(e,t){return{queryCount:e.selection.queryCount,selection:e.selection.selection,showSelectedRecords:e.selection.showSelectedRecords}}),hW)((0,P.ZP)(pW));var gW,vW,yW,bW,wW=function(e){var t=e.dataLoadingInProgress,n=e.formDefinition,r=e.parent,o=e.showSelectionController,i=e.showActions;if(n){var a=o?[gW||(gW=(0,S.jsx)(mW,{},"selectionController"))]:[],c=function(e){return e.children.find((function(e){return e.componentType===YI.componentTypes.ACTION_BAR}))}(n),s=!1!==i&&c?[(0,S.jsx)(cW,{definition:c,parent:r,disabled:t},"listAction-".concat(c.id))]:[];return{content:[].concat(a,s),actionBar:c}}return null},AW=b.ZP.div.withConfig({displayName:"StyledListWrapper"})(vW||(vW=Ld()(["\n grid-row-start: table-start;\n ","\n"])),(function(e){var t=e.tableMinHeight;return t&&"min-height: ".concat(t,";")})),xW=b.ZP.div.withConfig({displayName:"StyledActionWrapper"})(yW||(yW=Ld()(["\n display: flex;\n background-color: ",";\n margin-bottom: 3px;\n /* remove left padding on widget */\n padding: ",";\n grid-row-start: action-start;\n flex-wrap: wrap;\n\n & > * {\n margin-top: 8px;\n }\n"])),Jm.Z.color("paper"),(function(e){return"widget"===e.env?"0 0 8px 0":"0 8px 8px"})),EW=b.ZP.div.withConfig({displayName:"StyledListView"})(bW||(bW=Ld()(["\n display: grid;\n grid-template-rows: [action-start] auto [table-start] minmax(0, 1fr);\n height: 100%;\n"]))),OW=function(e){var t=e.dataLoadingInProgress,n=e.formDefinition,r=e.parent,o=e.searchFormPosition,i=e.showActions,a=e.showSelectionController,c=e.sorting,s=e.columnDisplayPreferences,u=e.cellRenderers,l=e.preferencesLoaded,d=e.intl,f=e.sortable,h=e.tableMinHeight,m=(0,R.useMemo)((function(){if(n&&l){var e=Rz(n),t=qz({table:e,sorting:c,sortable:f,parent:r,intl:d,columnDisplayPreferences:s,cellRenderers:u});return(0,S.jsx)(AW,{searchFormPosition:o,tableMinHeight:h,children:(0,S.jsx)(iW,{columnDefinitions:t},"table-".concat(e.id))},"tableWrapper-".concat(e.id))}}),[n,c,s,l,f,r,d,u,o,h]),g=(0,R.useMemo)((function(){if(n){var e=wW({formDefinition:n,parent:r,dataLoadingInProgress:t,showSelectionController:a,showActions:i})||{},o=e.content,c=e.actionBar;if(o.length>0&&c)return(0,S.jsx)(zE.ZP,{children:function(e){return(0,S.jsx)(xW,{ref:e,env:Hm.Z.getEmbedType(),children:o})}},"listActionWrapper-".concat(c.id))}}),[t,n,r,a,i]);return(0,S.jsx)(Z.Z,{required:[n],loadingText:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return d.formatMessage({id:e},t)}("client.entity-list.loadingText"),children:(0,S.jsxs)(EW,{children:[(0,S.jsx)(p.Z.ErrorBoundary,{children:g}),(0,S.jsx)(p.Z.ErrorBoundary,{children:m})]})})},CW=function(e,t){return 0===Object.keys(UE.Z.difference(e,t)).length};const kW=I().memo(OW,CW);const SW=(0,_.connect)((function(e,t){return{formDefinition:Tz(e),selection:e.selection.selection,currentPageIds:e.list.entities.map((function(e){return e.__key})),entityName:e.input.entityName,parent:e.input.parent,dataLoadingInProgress:e.list.inProgress,showSelectionController:(n=e.input.selectionStyle,r=e.input.disableSelectionController,o=Mz(Tz(e)),!0!==r&&(!n||n===Jz.MULTI)&&!1!==o),searchFormPosition:e.input.searchFormPosition,showActions:e.input.showActions,sorting:e.list.sorting,sortable:e.input.sortable,columnDisplayPreferences:e.preferences.columns,preferencesLoaded:e.preferences.preferencesLoaded,cellRenderers:e.input.cellRenderers,tableMinHeight:e.input.tableMinHeight};var n,r,o}),null)((0,P.ZP)(kW));var DW={NONE:"none",FULLTEXT:"fulltext",SIMPLE:"simple",SIMPLE_ADVANCED:"simple_advanced",ADVANCED:"advanced",ADMIN:"admin"};l().oneOf(Object.values(DW));const PW=DW;var _W,jW,TW=b.ZP.div.withConfig({displayName:"StyledBasicSearchForm"})(_W||(_W=Ld()(["\n ","\n\n && {\n "," {\n padding-bottom: 0;\n }\n }\n"])),of.C,RE),RW=b.ZP.div.withConfig({displayName:"StyledSearchFormButtons"})(jW||(jW=Ld()(["\n && {\n width: 100%;\n text-align: center;\n }\n"])));const IW=PB({form:"searchForm",destroyOnUnmount:!1})((function(e){var t=e.searchFormType,n=e.entity,r=e.form,o=e.formValues,i=e.intl,a=e.preselectedSearchFields,c=e.searchFormDefinition,s=e.setShowExtendedSearchForm,u=e.showExtendedSearchForm,l=e.simpleSearchFields,d=e.submitSearchForm,f=(0,R.useRef)(null);if(H.Z.useAutofocus(f,{selectFulltextFields:!0},[c]),!c.children)return null;var p,h=YI.getFieldDefinitions(c),m=l&&l.length>0?l:h.filter((function(e){return!0===e.simpleSearch})).map((function(e){return e.path||e.id})),g=!h.every((function(e){return m.includes(e.id)})),v=g&&t===PW.SIMPLE_ADVANCED;return(0,S.jsx)(TW,{ref:f,children:(0,S.jsxs)("form",{onSubmit:function(e){e.preventDefault(),e.stopPropagation(),d()},children:[v&&(0,S.jsx)(RW,{children:(0,S.jsx)(_O.Z,{"data-cy":"extend-search-button",icon:"chevron-".concat(u?"up":"down"),onClick:function(){s(!u)},title:(p="client.entity-list.extendedSearch",i.formatMessage({id:p}))})}),(0,S.jsx)(YI.FormBuilder,{entity:n,formName:r,formDefinition:c,formValues:o,fieldMappingType:"search",beforeRenderField:function(e){return!function(e,t){if(!e)return!1;var n=e.find((function(e){return e.id===t}));return n&&n.hidden}(a,e)&&(u||m.includes(e))},mode:"search"})]})})})),MW=IW;var NW={submitSearchForm:wF,setShowExtendedSearchForm:function(e){return{type:XZ,payload:{showExtendedSearchForm:e}}}};const BW=(0,_.connect)((function(e,t){return{searchFormDefinition:e.searchForm.formDefinition,entityModel:e.list.entityModel,searchInputs:e.searchForm.searchInputs,searchFormType:e.entityList.searchFormType,simpleSearchFields:e.searchForm.simpleSearchFields,showExtendedSearchForm:[PW.ADVANCED,PW.ADMIN].includes(e.entityList.searchFormType)||e.searchForm.showExtendedSearchForm,preselectedSearchFields:e.input.preselectedSearchFields}}),NW)((0,P.ZP)(MW));var ZW,FW,LW=b.ZP.div.withConfig({displayName:"StyledSearchBox"})(ZW||(ZW=(0,v.Z)(["\n && {\n margin-right: ",";\n margin-top: ",";\n margin-left: ",";\n\n "," {\n border: 0;\n width: 100%;\n border-bottom: 1px solid ",";\n padding-right: 0.3rem;\n\n /* clears the ‘X’ from Chrome */\n input[type='search']::-webkit-search-decoration,\n input[type='search']::-webkit-search-cancel-button,\n input[type='search']::-webkit-search-results-button,\n input[type='search']::-webkit-search-results-decoration {\n display: none;\n }\n\n &:focus {\n outline: none;\n }\n }\n }\n"])),x.Z.space(0),x.Z.space(-2.8),x.Z.space(-2.8),RR,Jm.Z.color("text")),HW=b.ZP.input.attrs((function(e){return{type:"search",placeholder:e.placeholder}})).withConfig({displayName:"StyledSearchBoxInput"})(FW||(FW=(0,v.Z)(["\n && {\n ","\n }\n"])),aS),UW=I().forwardRef((function(e,t){var n=e.value,r=e.minInputLength,o=e.onSearch,i=e.placeholder,a=(0,R.useState)(n||""),c=(0,wd.Z)(a,2),s=c[0],u=c[1];return(0,S.jsx)(LW,{children:(0,S.jsx)(FR,{hasValue:Boolean(s),children:(0,S.jsxs)(iS,{children:[(0,S.jsx)(HW,{"data-cy":"ui-search-box",ref:t,onChange:function(e){var t=e.target.value;u(t),(0===t.length||t.length>=r)&&o(t)},value:s,"aria-label":i,placeholder:i}),(null==s?void 0:s.length)>0&&(0,S.jsx)(_O.Z,{"data-cy":"reset-button",icon:"times",onClick:function(){u(""),o("")}})]})})})}));UW.defaultProps={debounce:200,minInputLength:3};const zW=H.Z.Debouncer(UW,100,"onSearch");const WW=PB({form:"searchForm",destroyOnUnmount:!1})((function(e){var t=e.submitSearchForm,n=e.intl,r=(0,R.useCallback)((function(e){return n.formatMessage({id:e})}),[n]),o=(0,R.useMemo)((function(){return function(e){var t=e.input;return(0,S.jsx)(zW,{value:t.value,liveSearch:!0,onSearch:function(e){return t.onChange(e)},placeholder:r("client.entity-list.fullTextPlaceholder")})}}),[r]);return(0,S.jsx)("form",{onSubmit:function(e){e.preventDefault(),e.stopPropagation(),t()},children:(0,S.jsx)(dE,{name:"txtFulltext",component:o})})})),VW=WW;var YW={submitSearchForm:wF};const qW=(0,_.connect)(null,YW)((0,P.ZP)(VW));const GW=function(e){return function(t,n){var r=function(e){var t=e.deepEqual,n=e.empty,r=e.getIn;return function(e,o){return function(i){for(var a=o||function(e){return r(e,"form")},c=a(i),s=arguments.length,u=new Array(s>1?s-1:0),l=1;l<s;l++)u[l-1]=arguments[l];if(u&&u.length)return u.every((function(n){var o=r(c,e+".initial."+n),i=r(c,e+".values."+n);return t(o,i)}));var d=r(c,e+".initial")||n,f=r(c,e+".values")||d;return t(d,f)}}}(e)(t,n);return function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];return!r.apply(void 0,[e].concat(n))}}}(ox);const QW=function(e){var t=e.children,n=TF(),r=n.sidepanelPosition,o=n.isCollapsed,i=n.toggleCollapse;return"left"!==r?null:(0,S.jsxs)(JF,{children:[(0,S.jsx)($F,{icon:"chevron-left",isCollapsed:o,onClick:i}),t]})};var XW="undefined"!=typeof window?window:null,KW=null===XW,$W=KW?void 0:XW.document,JW="horizontal",eV=function(){return!1},tV=KW?"calc":["","-webkit-","-moz-","-o-"].filter((function(e){var t=$W.createElement("div");return t.style.cssText="width:"+e+"calc(9px)",!!t.style.length})).shift()+"calc",nV=function(e){return"string"==typeof e||e instanceof String},rV=function(e){if(nV(e)){var t=$W.querySelector(e);if(!t)throw new Error("Selector "+e+" did not match a DOM element");return t}return e},oV=function(e,t,n){var r=e[t];return void 0!==r?r:n},iV=function(e,t,n,r){if(t){if("end"===r)return 0;if("center"===r)return e/2}else if(n){if("start"===r)return 0;if("center"===r)return e/2}return e},aV=function(e,t){var n=$W.createElement("div");return n.className="gutter gutter-"+t,n},cV=function(e,t,n){var r={};return nV(t)?r[e]=t:r[e]=tV+"("+t+"% - "+n+"px)",r},sV=function(e,t){var n;return(n={})[e]=t+"px",n};const uV=function(e,t){if(void 0===t&&(t={}),KW)return{};var n,r,o,i,a,c,s=e;Array.from&&(s=Array.from(s));var u=rV(s[0]).parentNode,l=getComputedStyle?getComputedStyle(u):null,d=l?l.flexDirection:null,f=oV(t,"sizes")||s.map((function(){return 100/s.length})),p=oV(t,"minSize",100),h=Array.isArray(p)?p:s.map((function(){return p})),m=oV(t,"maxSize",1/0),g=Array.isArray(m)?m:s.map((function(){return m})),v=oV(t,"expandToMin",!1),y=oV(t,"gutterSize",10),b=oV(t,"gutterAlign","center"),w=oV(t,"snapOffset",30),A=Array.isArray(w)?w:s.map((function(){return w})),x=oV(t,"dragInterval",1),E=oV(t,"direction",JW),O=oV(t,"cursor",E===JW?"col-resize":"row-resize"),C=oV(t,"gutter",aV),k=oV(t,"elementStyle",cV),S=oV(t,"gutterStyle",sV);function D(e,t,r,o){var i=k(n,t,r,o);Object.keys(i).forEach((function(t){e.style[t]=i[t]}))}function P(){return c.map((function(e){return e.size}))}function _(e){return"touches"in e?e.touches[0][r]:e[r]}function j(e){var t=c[this.a],n=c[this.b],r=t.size+n.size;t.size=e/this.size*r,n.size=r-e/this.size*r,D(t.element,t.size,this._b,t.i),D(n.element,n.size,this._c,n.i)}function T(e){var n,r=c[this.a],o=c[this.b];this.dragging&&(n=_(e)-this.start+(this._b-this.dragOffset),x>1&&(n=Math.round(n/x)*x),n<=r.minSize+r.snapOffset+this._b?n=r.minSize+this._b:n>=this.size-(o.minSize+o.snapOffset+this._c)&&(n=this.size-(o.minSize+this._c)),n>=r.maxSize-r.snapOffset+this._b?n=r.maxSize+this._b:n<=this.size-(o.maxSize-o.snapOffset+this._c)&&(n=this.size-(o.maxSize+this._c)),j.call(this,n),oV(t,"onDrag",eV)(P()))}function R(){var e=c[this.a].element,t=c[this.b].element,r=e.getBoundingClientRect(),a=t.getBoundingClientRect();this.size=r[n]+a[n]+this._b+this._c,this.start=r[o],this.end=r[i]}function I(e){var t=function(e){if(!getComputedStyle)return null;var t=getComputedStyle(e);if(!t)return null;var n=e[a];return 0===n?null:n-=E===JW?parseFloat(t.paddingLeft)+parseFloat(t.paddingRight):parseFloat(t.paddingTop)+parseFloat(t.paddingBottom)}(u);if(null===t)return e;if(h.reduce((function(e,t){return e+t}),0)>t)return e;var n=0,r=[],o=e.map((function(o,i){var a=t*o/100,c=iV(y,0===i,i===e.length-1,b),s=h[i]+c;return a<s?(n+=s-a,r.push(0),s):(r.push(a-s),a)}));return 0===n?e:o.map((function(e,o){var i=e;if(n>0&&r[o]-n>0){var a=Math.min(n,r[o]-n);n-=a,i=e-a}return i/t*100}))}function M(){var e=this,n=c[e.a].element,r=c[e.b].element;e.dragging&&oV(t,"onDragEnd",eV)(P()),e.dragging=!1,XW.removeEventListener("mouseup",e.stop),XW.removeEventListener("touchend",e.stop),XW.removeEventListener("touchcancel",e.stop),XW.removeEventListener("mousemove",e.move),XW.removeEventListener("touchmove",e.move),e.stop=null,e.move=null,n.removeEventListener("selectstart",eV),n.removeEventListener("dragstart",eV),r.removeEventListener("selectstart",eV),r.removeEventListener("dragstart",eV),n.style.userSelect="",n.style.webkitUserSelect="",n.style.MozUserSelect="",n.style.pointerEvents="",r.style.userSelect="",r.style.webkitUserSelect="",r.style.MozUserSelect="",r.style.pointerEvents="",e.gutter.style.cursor="",e.parent.style.cursor="",$W.body.style.cursor=""}function N(e){if(!("button"in e)||0===e.button){var n=this,r=c[n.a].element,o=c[n.b].element;n.dragging||oV(t,"onDragStart",eV)(P()),e.preventDefault(),n.dragging=!0,n.move=T.bind(n),n.stop=M.bind(n),XW.addEventListener("mouseup",n.stop),XW.addEventListener("touchend",n.stop),XW.addEventListener("touchcancel",n.stop),XW.addEventListener("mousemove",n.move),XW.addEventListener("touchmove",n.move),r.addEventListener("selectstart",eV),r.addEventListener("dragstart",eV),o.addEventListener("selectstart",eV),o.addEventListener("dragstart",eV),r.style.userSelect="none",r.style.webkitUserSelect="none",r.style.MozUserSelect="none",r.style.pointerEvents="none",o.style.userSelect="none",o.style.webkitUserSelect="none",o.style.MozUserSelect="none",o.style.pointerEvents="none",n.gutter.style.cursor=O,n.parent.style.cursor=O,$W.body.style.cursor=O,R.call(n),n.dragOffset=_(e)-n.end}}E===JW?(n="width",r="clientX",o="left",i="right",a="clientWidth"):"vertical"===E&&(n="height",r="clientY",o="top",i="bottom",a="clientHeight"),f=I(f);var B=[];function Z(e){var t=e.i===B.length,n=t?B[e.i-1]:B[e.i];R.call(n);var r=t?n.size-e.minSize-n._c:e.minSize+n._b;j.call(n,r)}return c=s.map((function(e,t){var r,o={element:rV(e),size:f[t],minSize:h[t],maxSize:g[t],snapOffset:A[t],i:t};if(t>0&&((r={a:t-1,b:t,dragging:!1,direction:E,parent:u})._b=iV(y,t-1==0,!1,b),r._c=iV(y,!1,t===s.length-1,b),"row-reverse"===d||"column-reverse"===d)){var i=r.a;r.a=r.b,r.b=i}if(t>0){var a=C(t,E,o.element);!function(e,t,r){var o=S(n,t,r);Object.keys(o).forEach((function(t){e.style[t]=o[t]}))}(a,y,t),r._a=N.bind(r),a.addEventListener("mousedown",r._a),a.addEventListener("touchstart",r._a),u.insertBefore(a,o.element),r.gutter=a}return D(o.element,o.size,iV(y,0===t,t===s.length-1,b),t),t>0&&B.push(r),o})),c.forEach((function(e){var t=e.element.getBoundingClientRect()[n];t<e.minSize&&(v?Z(e):e.minSize=t)})),{setSizes:function(e){var t=I(e);t.forEach((function(e,n){if(n>0){var r=B[n-1],o=c[r.a],i=c[r.b];o.size=t[n-1],i.size=e,D(o.element,o.size,r._b,o.i),D(i.element,i.size,r._c,i.i)}}))},getSizes:P,collapse:function(e){Z(c[e])},destroy:function(e,t){B.forEach((function(r){if(!0!==t?r.parent.removeChild(r.gutter):(r.gutter.removeEventListener("mousedown",r._a),r.gutter.removeEventListener("touchstart",r._a)),!0!==e){var o=k(n,r.a.size,r._b);Object.keys(o).forEach((function(e){c[r.a].element.style[e]="",c[r.b].element.style[e]=""}))}}))},parent:u,pairs:B}};function lV(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&-1===t.indexOf(r)&&(n[r]=e[r]);return n}var dV=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.componentDidMount=function(){var e=this.props;e.children;var t=e.gutter,n=lV(e,["children","gutter"]);n.gutter=function(e,n){var r;return t?r=t(e,n):(r=document.createElement("div")).className="gutter gutter-"+n,r.__isSplitGutter=!0,r},this.split=uV(this.parent.children,n)},t.prototype.componentDidUpdate=function(e){var t=this,n=this.props;n.children;var r=n.minSize,o=n.sizes,i=n.collapsed,a=lV(n,["children","minSize","sizes","collapsed"]),c=e.minSize,s=e.sizes,u=e.collapsed,l=["maxSize","expandToMin","gutterSize","gutterAlign","snapOffset","dragInterval","direction","cursor"].map((function(n){return t.props[n]!==e[n]})).reduce((function(e,t){return e||t}),!1);if(Array.isArray(r)&&Array.isArray(c)){var d=!1;r.forEach((function(e,t){d=d||e!==c[t]})),l=l||d}else l=!(!Array.isArray(r)&&!Array.isArray(c))||(l||r!==c);if(l)a.minSize=r,a.sizes=o||this.split.getSizes(),this.split.destroy(!0,!0),a.gutter=function(e,t,n){return n.previousSibling},this.split=uV(Array.from(this.parent.children).filter((function(e){return!e.__isSplitGutter})),a);else if(o){var f=!1;o.forEach((function(e,t){f=f||e!==s[t]})),f&&this.split.setSizes(this.props.sizes)}Number.isInteger(i)&&(i!==u||l)&&this.split.collapse(i)},t.prototype.componentWillUnmount=function(){this.split.destroy(),delete this.split},t.prototype.render=function(){var e=this,t=this.props;t.sizes,t.minSize,t.maxSize,t.expandToMin,t.gutterSize,t.gutterAlign,t.snapOffset,t.dragInterval,t.direction,t.cursor,t.gutter,t.elementStyle,t.gutterStyle,t.onDrag,t.onDragStart,t.onDragEnd,t.collapsed;var n=t.children,r=lV(t,["sizes","minSize","maxSize","expandToMin","gutterSize","gutterAlign","snapOffset","dragInterval","direction","cursor","gutter","elementStyle","gutterStyle","onDrag","onDragStart","onDragEnd","collapsed","children"]);return I().createElement("div",Object.assign({},{ref:function(t){e.parent=t}},r),n)},t}(I().Component);dV.propTypes={sizes:l().arrayOf(l().number),minSize:l().oneOfType([l().number,l().arrayOf(l().number)]),maxSize:l().oneOfType([l().number,l().arrayOf(l().number)]),expandToMin:l().bool,gutterSize:l().number,gutterAlign:l().string,snapOffset:l().oneOfType([l().number,l().arrayOf(l().number)]),dragInterval:l().number,direction:l().string,cursor:l().string,gutter:l().func,elementStyle:l().func,gutterStyle:l().func,onDrag:l().func,onDragStart:l().func,onDragEnd:l().func,collapsed:l().number,children:l().arrayOf(l().element)},dV.defaultProps={sizes:void 0,minSize:void 0,maxSize:void 0,expandToMin:void 0,gutterSize:void 0,gutterAlign:void 0,snapOffset:void 0,dragInterval:void 0,direction:void 0,cursor:void 0,gutter:void 0,elementStyle:void 0,gutterStyle:void 0,onDrag:void 0,onDragStart:void 0,onDragEnd:void 0,collapsed:void 0,children:void 0};const fV=dV;var pV,hV,mV,gV,vV,yV,bV,wV,AV=(0,b.ZP)(fV).withConfig({displayName:"StyledSplit"})(pV||(pV=Ld()(["\n height: calc(100% - 40px);\n display: flex;\n flex-direction: column;\n"]))),xV=b.ZP.div.withConfig({displayName:"StyledSplitWrapper"})(hV||(hV=Ld()(["\n height: 100%;\n"]))),EV=b.ZP.div.withConfig({displayName:"Box"})(mV||(mV=Ld()(["\n background-color: ",";\n overflow-y: auto;\n padding: "," "," 0 ",";\n position: relative;\n\n &:first-of-type {\n z-index: 2; // higher than StyledTether to prevent cover on scroll\n }\n ","\n"])),Jm.Z.color("paper"),x.Z.space(-1.1),x.Z.space(-.375),x.Z.space(-1.1),of.C),OV=b.ZP.div.withConfig({displayName:"StyledGutter"})(gV||(gV=Ld()(["\n background-color: ",";\n display: flex;\n padding-top: 3px;\n justify-content: center;\n align-items: center;\n height: calc(100% - 1px); //subtract border height from total height\n font-size: 20px;\n border-top: 1px solid ",";\n position: relative;\n z-index: 2;\n\n &:hover {\n cursor: row-resize;\n }\n"])),Jm.Z.color("paper"),Jm.Z.color("backgroundBody")),CV=b.ZP.div.withConfig({displayName:"StyledQueryBox"})(vV||(vV=Ld()(["\n height: 100%;\n background-color: ",";\n border-bottom: 3px solid ",";\n position: relative;\n z-index: 2; // higher than StyledTether to prevent cover on scroll\n overflow-y: auto;\n padding: "," "," 0 ",";\n\n "," {\n z-index: 3; //higher than rest to lay over query field\n }\n ","\n"])),Jm.Z.color("paper"),Jm.Z.color("backgroundBody"),x.Z.space(-1.1),x.Z.space(-.375),x.Z.space(-1.1),Xv,of.C),kV=b.ZP.pre.withConfig({displayName:"StyledErrorMessage"})(yV||(yV=Ld()(["\n && {\n ","\n margin-left: ",";\n white-space: pre-wrap;\n word-break: break-word;\n color: ",";\n }\n"])),(0,A.Z)({fontFamily:Jm.Z.fontFamily("monospace")}),x.Z.space(-1),Jm.Z.color("signal.danger.text"));const SV=function(e){var t=e.setQueryViewVisible,n=e.msg,r=e.entityModel,o=e.query,i=e.queryError,a=e.loadSearchAsQuery,c=e.saveQueryAsFilter,s=e.setQuery,u=e.runQuery,l=e.clearQuery,d=(0,R.useRef)(null);H.Z.useAutofocus(d);var f={onChange:s},p={mode:"tql",implicitModel:r},h=!(null==o||!o.trim().length)>0,m=i&&0!==Object.entries(i).length,g=!h||m,v=Object.values(i||{}),y=function(e,t){return e?"danger":t?"info":void 0}(m,h);return(0,S.jsxs)(S.Fragment,{children:[(0,S.jsxs)(QW,{children:[(0,S.jsx)(_O.Z,{"data-cy":"search-view-button",icon:"filter",onClick:function(){return t(!1)},title:n("client.entity-list.search_view")}),(0,S.jsx)(_O.Z,{"data-cy":"search-button",icon:"search",onClick:u,title:n("client.entity-list.query.search"),disabled:g}),(0,S.jsx)(_O.Z,{"data-cy":"clear-button",icon:"times",onClick:l,title:n("client.entity-list.reset"),disabled:!h}),(0,S.jsxs)(BU,{buttonProps:{icon:"ellipsis-v"},children:[(0,S.jsx)(Yv,{onClick:a,children:bV||(bV=(0,S.jsx)(fd.Z,{id:"client.entity-list.query.search.open"}))}),(0,S.jsx)(Yv,{onClick:c,disabled:g,children:wV||(wV=(0,S.jsx)(fd.Z,{id:"client.entity-list.query.filter.save"}))})]})]}),(0,S.jsxs)(CV,{ref:d,children:[(0,S.jsx)(FR,{isDisplay:!0,hasValue:!0,label:n("client.entity-list.query.entity-model"),children:(0,S.jsx)(nl.Z,{type:"string",value:r})}),(0,S.jsx)(FR,{touched:h,fixLabel:!0,hasValue:h,label:n("client.entity-list.query.editor"),signal:y,children:(0,S.jsx)(iT,{type:"code",value:o,options:p,events:f})}),v.map((function(e,t){return(0,S.jsx)(kV,{children:e},t)}))]})]})};var DV,PV,_V,jV,TV,RV,IV,MV,NV,BV,ZV,FV,LV=b.ZP.div.withConfig({displayName:"SearchFilterListWrapper"})(DV||(DV=Ld()(["\n margin-top: 0.4rem;\n margin-bottom: 0.4rem;\n"]))),HV=(0,b.ZP)(DP.Fe).withConfig({displayName:"StyledSpanSearchFilter"})(PV||(PV=Ld()(["\n width: 90%;\n"]))),UV=(0,b.ZP)(pd.Z).withConfig({displayName:"StyledAddRemoveButton"})(_V||(_V=Ld()(["\n && {\n background-color: transparent;\n border: 0;\n height: auto;\n border-radius: 0;\n padding: 0 "," 0 0;\n\n &:hover * {\n color: "," !important;\n }\n }\n"])),x.Z.space(-2.5),(function(e){return e.active?Jm.Z.color("paper"):Jm.Z.color("secondary")})),zV=b.ZP.div.withConfig({displayName:"StyledMenuWrapper"})(jV||(jV=Ld()(["\n &&& {\n button {\n background-color: transparent;\n padding: 0 "," 0 0;\n }\n\n &:hover button {\n color: ",";\n cursor: pointer;\n }\n }\n"])),x.Z.space(-1),(function(e){return e.active?Jm.Z.color("paper"):Jm.Z.color("secondary")})),WV=b.ZP.div.withConfig({displayName:"StyleButtonWrapper"})(TV||(TV=Ld()(["\n display: flex;\n "," button,\n "," * {\n color: transparent;\n }\n"])),zV,UV),VV=b.ZP.div.withConfig({displayName:"StyledSearchFilterButton"})(RV||(RV=Ld()(["\n border-radius: ",";\n display: flex;\n padding: 0.3rem 0 0.3rem 1rem;\n margin-bottom: 0.2rem;\n background-color: ",";\n justify-content: flex-end;\n\n && {\n *:not(",") {\n color: ",";\n }\n }\n ","\n ","\n"])),Jm.Z.radii("medium"),(function(e){return e.active&&Jm.Z.color("secondary")}),Uv,(function(e){return e.active&&Jm.Z.color("paper")}),!Nv.b&&(0,b.iv)(IV||(IV=Ld()(["\n &:hover {\n ",",\n "," button,\n "," * {\n color: ",";\n }\n background-color: ",";\n cursor: pointer;\n }\n "])),HV,zV,UV,Jm.Z.color("paper"),(function(e){return!e.active&&Jm.Z.color("secondaryLight")})),Nv.b&&(0,b.iv)(MV||(MV=Ld()(["\n ",",\n "," button,\n "," * {\n color: ",";\n }\n "])),HV,zV,UV,Jm.Z.color("secondary"))),YV=b.ZP.div.withConfig({displayName:"StyledMessageWrapper"})(NV||(NV=Ld()(["\n padding-left: 8px;\n"]))),qV=function(e,t){return e.defaultFilter||t.defaultFilter?e.defaultFilter?-1:1:(null===e.sorting)-(null===t.sorting)||e.sorting-t.sorting},GV=function(e){var t=e.canEdit,n=e.canDelete,r=e.navigationStrategy,o=e.deleteSearchFilter,i=e.primaryKey,a=e.active,c=[];return t&&c.push((0,S.jsx)(Yv,{onClick:function(){return r.openDetail("Search_filter",i)},children:BV||(BV=(0,S.jsx)(fd.Z,{id:"client.entity-list.search.settings.editFilter"}))},"edit-button")),n&&c.push((0,S.jsx)(Yv,{onClick:o,children:ZV||(ZV=(0,S.jsx)(fd.Z,{id:"client.entity-list.search.settings.deleteFilter"}))},"delete-button")),0===c.length?null:(0,S.jsx)(zV,{active:a,children:(0,S.jsx)(BU,{buttonProps:{icon:"ellipsis-v"},children:c})})},QV=function(e){var t=e.setActive,n=e.active,r=e.label,o=e.description,i=e.canEdit,a=e.canDelete,c=e.primaryKey,s=e.navigationStrategy,u=e.deleteSearchFilter;return(0,S.jsxs)(VV,{active:n,onClick:function(){return t(!n)},children:[(0,S.jsx)(HV,{title:o,children:r}),(0,S.jsxs)(WV,{children:[(0,S.jsx)(UV,{active:n,onClick:function(e){t(!1),e.stopPropagation()},icon:n?"minus":"plus",dense:!0}),(0,S.jsx)(GV,{canEdit:i,canDelete:a,navigationStrategy:s,deleteSearchFilter:u,primaryKey:c,active:n})]})]})};const XV=function(e){var t=e.searchFilters,n=e.setSearchFilterActive,r=e.executeSearch,o=e.navigationStrategy,i=e.deleteSearchFilter;return t?0===t.length?FV||(FV=(0,S.jsx)(YV,{children:(0,S.jsx)(Zd.ZP.I,{children:(0,S.jsx)(fd.Z,{id:"client.entity-list.noSearchFilters"})})})):(0,S.jsx)(LV,{children:z()(t).sort(qV).map((function(e){return(0,S.jsx)(QV,{primaryKey:e.key,active:e.active,label:e.label,description:e.description,setActive:function(t){n(e.uniqueId,!e.active,t),r()},canEdit:e.editAllowed,canDelete:e.deleteAllowed,navigationStrategy:o,deleteSearchFilter:function(){return i(e.key)}},e.uniqueId)}))}):null};var KV={setSearchFilterActive:EF,executeSearch:bF,deleteSearchFilter:function(e){return{type:rF,payload:{primaryKey:e}}}};const $V=(0,_.connect)((function(e,t){return{searchFilters:e.searchForm.searchFilters,navigationStrategy:e.input.navigationStrategy}}),KV)(XV);var JV,eY,tY,nY,rY,oY,iY,aY,cY,sY;const uY=function(e){var t=e.resetSearch,n=e.msg,r=e.searchFilters,o=e.saveSearchFilter,i=e.saveDefaultSearchFilter,a=e.resetDefaultSearchFilter,c=e.displaySearchFieldsModal,s=e.resetSearchFields,u=e.searchFormDirty,l=e.setQueryViewVisible,d=e.loadSearchAsQuery,f=(0,R.useRef)(null),p=(0,R.useState)([25,75]),h=T()(p,2),m=h[0],g=h[1],v=(0,R.useState)(!1),y=T()(v,2),b=y[0],w=y[1],A=(0,R.useState)(!1),x=T()(A,2),E=x[0],O=x[1];(0,R.useEffect)((function(){var e=r?28*r.length+10:28,t=f.current.clientHeight,n=Math.ceil(100/(t/e));!b&&n>30?(O(!0),g([25,75])):g([n,100-n])}),[r,b]);var C=1===(null==r?void 0:r.filter((function(e){return e.active})).length),k=b?"chevron-up":"chevron-down",D=n(b?"client.entity-list.contract":"client.entity-list.expand");return(0,S.jsxs)(S.Fragment,{children:[(0,S.jsxs)(QW,{children:[(0,S.jsx)(_O.Z,{"data-cy":"query-view-button",icon:"code",onClick:function(){return l(!0)},title:n("client.entity-list.query_view")}),E&&(0,S.jsx)(_O.Z,{icon:k,onClick:function(){return w(!b)},title:D}),(0,S.jsx)(_O.Z,{"data-cy":"reset-button",icon:"times",onClick:t,title:n("client.entity-list.reset")}),(0,S.jsxs)(BU,{buttonProps:{icon:"ellipsis-v"},children:[(0,S.jsx)(Yv,{disabled:!C,onClick:i,children:(0,S.jsx)(rl.Z,{content:!C&&(eY||(eY=(0,S.jsx)(fd.Z,{id:"client.entity-list.search.settings.defaultFilter.save.info"}))),children:tY||(tY=(0,S.jsx)(fd.Z,{id:"client.entity-list.search.settings.defaultFilter.save"}))})}),(0,S.jsx)(Yv,{onClick:a,children:nY||(nY=(0,S.jsx)(fd.Z,{id:"client.entity-list.search.settings.defaultFilter.reset"}))}),(0,S.jsx)(Yv,{onClick:o,disabled:!u,children:rY||(rY=(0,S.jsx)(fd.Z,{id:"client.entity-list.search.settings.saveAsFilter"}))}),(0,S.jsx)(Yv,{onClick:c,children:oY||(oY=(0,S.jsx)(fd.Z,{id:"client.entity-list.search.settings.searchForm.edit"}))}),(0,S.jsx)(Yv,{onClick:s,children:iY||(iY=(0,S.jsx)(fd.Z,{id:"client.entity-list.search.settings.searchForm.reset"}))}),(0,S.jsx)(Yv,{onClick:function(){l(!0),d()},children:aY||(aY=(0,S.jsx)(fd.Z,{id:"client.entity-list.query.search.open"}))})]})]}),(0,S.jsx)(xV,{ref:f,children:(0,S.jsxs)(AV,{direction:"vertical",gutterSize:20,sizes:m,minSize:[90,0],gutter:function(){var e=document.createElement("div");return N().render(JV||(JV=(0,S.jsx)(OV,{tabIndex:0,children:(0,S.jsx)(B.Z,{icon:"horizontal-rule"})})),e),e},children:[cY||(cY=(0,S.jsx)(EV,{children:(0,S.jsx)($V,{})})),sY||(sY=(0,S.jsx)(EV,{children:(0,S.jsx)(BW,{})}))]})})]})};function lY(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function dY(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?lY(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lY(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const fY=(0,P.ZP)((0,b.Zz)((function(e){var t=e.intl,n=e.queryViewVisible,r=function(e){return t.formatMessage({id:e})};return(0,S.jsxs)(S.Fragment,{children:[!n&&(0,S.jsx)(uY,dY({msg:r},e)),n&&(0,S.jsx)(SV,dY({msg:r},e))]})})));var pY={resetSearch:function(){return{type:QZ}},saveSearchFilter:function(){return{type:oF}},saveDefaultSearchFilter:function(){return{type:iF}},resetDefaultSearchFilter:function(){return{type:aF}},displaySearchFieldsModal:function(){return{type:cF}},resetSearchFields:function(){return{type:sF}},loadSearchAsQuery:function(){return{type:uF}},saveQueryAsFilter:function(){return{type:lF}},setQueryViewVisible:OF,setQuery:CF,runQuery:function(){return{type:hF}},clearQuery:function(){return{type:mF}}};const hY=(0,_.connect)((function(e){return{searchFilters:e.searchForm.searchFilters,searchFormDirty:GW("searchForm")(e),entityModel:e.input.entityName,queryViewVisible:e.searchForm.queryViewVisible,query:e.searchForm.query,queryError:e.searchForm.queryError}}),pY)(fY);var mY,gY,vY;const yY=function(e){var t=e.searchFormType;return t===PW.ADMIN?mY||(mY=(0,S.jsx)(p.Z.ErrorBoundary,{children:(0,S.jsx)(hY,{})})):(0,S.jsx)(p.Z.ErrorBoundary,{children:(0,S.jsx)(jE.Wrapper,{isToggleable:!1,isFramed:!1,children:(0,S.jsx)(jE.Body,{children:t===PW.FULLTEXT?gY||(gY=(0,S.jsx)(qW,{})):vY||(vY=(0,S.jsx)(BW,{}))})})})},bY=yY;const wY=(0,_.connect)((function(e,t){return{searchFormType:e.entityList.searchFormType}}),{})((0,P.ZP)(bY));var AY,xY,EY;const OY=function(e){var t=e.searchFormType,n=e.searchFormCollapsed,r=e.searchFormPosition,o=e.scrollBehaviour,i=e.setSearchFormCollapsed;return t===PW.NONE?AY||(AY=(0,S.jsx)(SW,{})):(0,S.jsxs)(tL,{sidepanelPosition:r,sidepanelCollapsed:n,setSidepanelCollapsed:i,scrollBehaviour:o,children:[xY||(xY=(0,S.jsx)(nL,{children:(0,S.jsx)(wY,{})})),EY||(EY=(0,S.jsx)(rL,{children:(0,S.jsx)(SW,{})}))]})};var CY={initialize:function(){return{type:"entityList/INITIALIZE"}},initializeSearchForm:vF,loadPreferences:HZ,setSearchFormCollapsed:function(e){return{type:SZ,payload:{searchFormCollapsed:e}}}};const kY=(0,_.connect)((function(e){return{searchFormType:e.entityList.searchFormType,searchFormPosition:e.input.searchFormPosition,searchFormCollapsed:e.input.searchFormCollapsed,scrollBehaviour:e.input.scrollBehaviour}}),CY)((0,P.ZP)(OY));var SY=function(e){return Sf(e,TY)},DY=3,PY=2,_Y=1,jY=function(e){return Object.keys(e).reduce((function(e,t){var n=TY.find((function(e){return e.name===t}));return n&&n.reload>e?n.reload:e}),_Y)},TY=[{name:"entityName",argsFactory:function(e){return[e.entityName]},reload:DY},{name:"formName",argsFactory:function(e){return[e.formName]},reload:DY},{name:"limit",argsFactory:function(e){return[e.limit]},reload:PY},{name:"scope",argsFactory:function(e){return[e.scope]},reload:DY},{name:"searchFilters",action:function(e){return{type:aU,payload:{searchFilters:e}}},argsFactory:function(e){return[e.searchFilters]},reload:PY},{name:"searchFormType",action:function(e){return{type:OZ,payload:{searchFormType:e}}},argsFactory:function(e){return[e.searchFormType]},reload:PY},{name:"searchFormPosition",argsFactory:function(e){return[e.searchFormPosition]},reload:PY},{name:"simpleSearchFields",action:function(e){return{type:KZ,payload:{simpleSearchFields:e}}},argsFactory:function(e){return[e.simpleSearchFields]},reload:PY},{name:"selection",type:"boolean",action:cz,argsFactory:function(e){return[e.selection]},reload:_Y},{name:"scrollBehaviour",argsFactory:function(e){return[e.scrollBehaviour]},reload:_Y},{name:"parent",argsFactory:function(e){return[e.parent]},reload:PY},{name:"listFormDefinition",action:AU,argsFactory:function(e){return[e.listFormDefinition]},reload:DY},{name:"showLink",argsFactory:function(e){return[e.showLink]},reload:_Y},{name:"sortable",argsFactory:function(e){return[e.sortable]},reload:_Y},{name:"tql",argsFactory:function(e){return[e.tql]},reload:PY},{name:"keys",argsFactory:function(e){return[e.keys]},reload:PY},{name:"searchFilters",argsFactory:function(e){return[e.searchFilters]},reload:PY},{name:"constriction",argsFactory:function(e){return[e.constriction]},reload:PY},{name:"searchFormCollapsed",action:function(e){return{type:DZ,payload:{searchFormCollapsed:e}}},argsFactory:function(e){return[e.searchFormCollapsed]},reload:_Y}],RY=a(93386),IY=a.n(RY),MY=function(e){return e.data.map((function(e){return Lm.getFlattenEntity(e)}))},NY=function(e){return e.data.map((function(e){return e.key}))};function BY(e,t){(0,il.Z)(2,arguments);var n=(0,sl.Z)(e),r=(0,ll.Z)(t);return isNaN(r)?new Date(NaN):r?(n.setDate(n.getDate()+r),n):n}function ZY(e,t){if(null==e)throw new TypeError("assign requires that input parameter not be null or undefined");for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}function FY(e){return FY="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},FY(e)}function LY(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&HY(e,t)}function HY(e,t){return HY=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},HY(e,t)}function UY(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=VY(e);if(t){var o=VY(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return zY(this,n)}}function zY(e,t){return!t||"object"!==FY(t)&&"function"!=typeof t?WY(e):t}function WY(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function VY(e){return VY=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},VY(e)}function YY(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qY(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function GY(e,t,n){return t&&qY(e.prototype,t),n&&qY(e,n),e}function QY(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var XY=function(){function e(){YY(this,e),QY(this,"subPriority",0)}return GY(e,[{key:"validate",value:function(e,t){return!0}}]),e}(),KY=function(e){LY(n,e);var t=UY(n);function n(e,r,o,i,a){var c;return YY(this,n),(c=t.call(this)).value=e,c.validateValue=r,c.setValue=o,c.priority=i,a&&(c.subPriority=a),c}return GY(n,[{key:"validate",value:function(e,t){return this.validateValue(e,this.value,t)}},{key:"set",value:function(e,t,n){return this.setValue(e,t,this.value,n)}}]),n}(XY),$Y=function(e){LY(n,e);var t=UY(n);function n(){var e;YY(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return QY(WY(e=t.call.apply(t,[this].concat(o))),"priority",10),QY(WY(e),"subPriority",-1),e}return GY(n,[{key:"set",value:function(e,t){if(t.timestampIsSet)return e;var n=new Date(0);return n.setFullYear(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()),n.setHours(e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()),n}}]),n}(XY);function JY(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var eq=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,r;return t=e,n=[{key:"run",value:function(e,t,n,r){var o=this.parse(e,t,n,r);return o?{setter:new KY(o.value,this.validate,this.set,this.priority,this.subPriority),rest:o.rest}:null}},{key:"validate",value:function(e,t,n){return!0}}],n&&JY(t.prototype,n),r&&JY(t,r),e}();function tq(e){return tq="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},tq(e)}function nq(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function rq(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function oq(e,t){return oq=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},oq(e,t)}function iq(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=sq(e);if(t){var o=sq(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return aq(this,n)}}function aq(e,t){return!t||"object"!==tq(t)&&"function"!=typeof t?cq(e):t}function cq(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function sq(e){return sq=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},sq(e)}function uq(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var lq=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&oq(e,t)}(i,e);var t,n,r,o=iq(i);function i(){var e;nq(this,i);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return uq(cq(e=o.call.apply(o,[this].concat(n))),"priority",140),uq(cq(e),"incompatibleTokens",["R","u","t","T"]),e}return t=i,n=[{key:"parse",value:function(e,t,n){switch(t){case"G":case"GG":case"GGG":return n.era(e,{width:"abbreviated"})||n.era(e,{width:"narrow"});case"GGGGG":return n.era(e,{width:"narrow"});default:return n.era(e,{width:"wide"})||n.era(e,{width:"abbreviated"})||n.era(e,{width:"narrow"})}}},{key:"set",value:function(e,t,n){return t.era=n,e.setUTCFullYear(n,0,1),e.setUTCHours(0,0,0,0),e}}],n&&rq(t.prototype,n),r&&rq(t,r),i}(eq),dq=(Math.pow(10,8),/^(1[0-2]|0?\d)/),fq=/^(3[0-1]|[0-2]?\d)/,pq=/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,hq=/^(5[0-3]|[0-4]?\d)/,mq=/^(2[0-3]|[0-1]?\d)/,gq=/^(2[0-4]|[0-1]?\d)/,vq=/^(1[0-1]|0?\d)/,yq=/^(1[0-2]|0?\d)/,bq=/^[0-5]?\d/,wq=/^[0-5]?\d/,Aq=/^\d/,xq=/^\d{1,2}/,Eq=/^\d{1,3}/,Oq=/^\d{1,4}/,Cq=/^-?\d+/,kq=/^-?\d/,Sq=/^-?\d{1,2}/,Dq=/^-?\d{1,3}/,Pq=/^-?\d{1,4}/,_q=/^([+-])(\d{2})(\d{2})?|Z/,jq=/^([+-])(\d{2})(\d{2})|Z/,Tq=/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,Rq=/^([+-])(\d{2}):(\d{2})|Z/,Iq=/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/;function Mq(e,t){return e?{value:t(e.value),rest:e.rest}:e}function Nq(e,t){var n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function Bq(e,t){var n=t.match(e);return n?"Z"===n[0]?{value:0,rest:t.slice(1)}:{value:("+"===n[1]?1:-1)*(36e5*(n[2]?parseInt(n[2],10):0)+6e4*(n[3]?parseInt(n[3],10):0)+1e3*(n[5]?parseInt(n[5],10):0)),rest:t.slice(n[0].length)}:null}function Zq(e){return Nq(Cq,e)}function Fq(e,t){switch(e){case 1:return Nq(Aq,t);case 2:return Nq(xq,t);case 3:return Nq(Eq,t);case 4:return Nq(Oq,t);default:return Nq(new RegExp("^\\d{1,"+e+"}"),t)}}function Lq(e,t){switch(e){case 1:return Nq(kq,t);case 2:return Nq(Sq,t);case 3:return Nq(Dq,t);case 4:return Nq(Pq,t);default:return Nq(new RegExp("^-?\\d{1,"+e+"}"),t)}}function Hq(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;default:return 0}}function Uq(e,t){var n,r=t>0,o=r?t:1-t;if(o<=50)n=e||100;else{var i=o+50;n=e+100*Math.floor(i/100)-(e>=i%100?100:0)}return r?n:1-n}function zq(e){return e%400==0||e%4==0&&e%100!=0}function Wq(e){return Wq="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Wq(e)}function Vq(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Yq(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function qq(e,t){return qq=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},qq(e,t)}function Gq(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Kq(e);if(t){var o=Kq(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Qq(this,n)}}function Qq(e,t){return!t||"object"!==Wq(t)&&"function"!=typeof t?Xq(e):t}function Xq(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Kq(e){return Kq=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Kq(e)}function $q(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Jq=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&qq(e,t)}(i,e);var t,n,r,o=Gq(i);function i(){var e;Vq(this,i);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return $q(Xq(e=o.call.apply(o,[this].concat(n))),"priority",130),$q(Xq(e),"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"]),e}return t=i,n=[{key:"parse",value:function(e,t,n){var r=function(e){return{year:e,isTwoDigitYear:"yy"===t}};switch(t){case"y":return Mq(Fq(4,e),r);case"yo":return Mq(n.ordinalNumber(e,{unit:"year"}),r);default:return Mq(Fq(t.length,e),r)}}},{key:"validate",value:function(e,t){return t.isTwoDigitYear||t.year>0}},{key:"set",value:function(e,t,n){var r=e.getUTCFullYear();if(n.isTwoDigitYear){var o=Uq(n.year,r);return e.setUTCFullYear(o,0,1),e.setUTCHours(0,0,0,0),e}var i="era"in t&&1!==t.era?1-n.year:n.year;return e.setUTCFullYear(i,0,1),e.setUTCHours(0,0,0,0),e}}],n&&Yq(t.prototype,n),r&&Yq(t,r),i}(eq);function eG(e){return eG="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},eG(e)}function tG(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function nG(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function rG(e,t){return rG=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},rG(e,t)}function oG(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=cG(e);if(t){var o=cG(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return iG(this,n)}}function iG(e,t){return!t||"object"!==eG(t)&&"function"!=typeof t?aG(e):t}function aG(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function cG(e){return cG=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},cG(e)}function sG(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var uG=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&rG(e,t)}(i,e);var t,n,r,o=oG(i);function i(){var e;tG(this,i);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return sG(aG(e=o.call.apply(o,[this].concat(n))),"priority",130),sG(aG(e),"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"]),e}return t=i,n=[{key:"parse",value:function(e,t,n){var r=function(e){return{year:e,isTwoDigitYear:"YY"===t}};switch(t){case"Y":return Mq(Fq(4,e),r);case"Yo":return Mq(n.ordinalNumber(e,{unit:"year"}),r);default:return Mq(Fq(t.length,e),r)}}},{key:"validate",value:function(e,t){return t.isTwoDigitYear||t.year>0}},{key:"set",value:function(e,t,n,r){var o=Al(e,r);if(n.isTwoDigitYear){var i=Uq(n.year,o);return e.setUTCFullYear(i,0,r.firstWeekContainsDate),e.setUTCHours(0,0,0,0),(0,bl.Z)(e,r)}var a="era"in t&&1!==t.era?1-n.year:n.year;return e.setUTCFullYear(a,0,r.firstWeekContainsDate),e.setUTCHours(0,0,0,0),(0,bl.Z)(e,r)}}],n&&nG(t.prototype,n),r&&nG(t,r),i}(eq);function lG(e){return lG="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},lG(e)}function dG(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fG(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function pG(e,t){return pG=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},pG(e,t)}function hG(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=vG(e);if(t){var o=vG(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return mG(this,n)}}function mG(e,t){return!t||"object"!==lG(t)&&"function"!=typeof t?gG(e):t}function gG(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function vG(e){return vG=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},vG(e)}function yG(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var bG=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&pG(e,t)}(i,e);var t,n,r,o=hG(i);function i(){var e;dG(this,i);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return yG(gG(e=o.call.apply(o,[this].concat(n))),"priority",130),yG(gG(e),"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]),e}return t=i,(n=[{key:"parse",value:function(e,t){return Lq("R"===t?4:t.length,e)}},{key:"set",value:function(e,t,n){var r=new Date(0);return r.setUTCFullYear(n,0,4),r.setUTCHours(0,0,0,0),hl(r)}}])&&fG(t.prototype,n),r&&fG(t,r),i}(eq);function wG(e){return wG="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},wG(e)}function AG(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xG(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function EG(e,t){return EG=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},EG(e,t)}function OG(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=SG(e);if(t){var o=SG(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return CG(this,n)}}function CG(e,t){return!t||"object"!==wG(t)&&"function"!=typeof t?kG(e):t}function kG(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function SG(e){return SG=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},SG(e)}function DG(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var PG=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&EG(e,t)}(i,e);var t,n,r,o=OG(i);function i(){var e;AG(this,i);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return DG(kG(e=o.call.apply(o,[this].concat(n))),"priority",130),DG(kG(e),"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"]),e}return t=i,n=[{key:"parse",value:function(e,t){return Lq("u"===t?4:t.length,e)}},{key:"set",value:function(e,t,n){return e.setUTCFullYear(n,0,1),e.setUTCHours(0,0,0,0),e}}],n&&xG(t.prototype,n),r&&xG(t,r),i}(eq);function _G(e){return _G="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_G(e)}function jG(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function TG(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function RG(e,t){return RG=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},RG(e,t)}function IG(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=BG(e);if(t){var o=BG(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return MG(this,n)}}function MG(e,t){return!t||"object"!==_G(t)&&"function"!=typeof t?NG(e):t}function NG(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function BG(e){return BG=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},BG(e)}function ZG(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var FG=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&RG(e,t)}(i,e);var t,n,r,o=IG(i);function i(){var e;jG(this,i);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return ZG(NG(e=o.call.apply(o,[this].concat(n))),"priority",120),ZG(NG(e),"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]),e}return t=i,n=[{key:"parse",value:function(e,t,n){switch(t){case"Q":case"QQ":return Fq(t.length,e);case"Qo":return n.ordinalNumber(e,{unit:"quarter"});case"QQQ":return n.quarter(e,{width:"abbreviated",context:"formatting"})||n.quarter(e,{width:"narrow",context:"formatting"});case"QQQQQ":return n.quarter(e,{width:"narrow",context:"formatting"});default:return n.quarter(e,{width:"wide",context:"formatting"})||n.quarter(e,{width:"abbreviated",context:"formatting"})||n.quarter(e,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(e,t){return t>=1&&t<=4}},{key:"set",value:function(e,t,n){return e.setUTCMonth(3*(n-1),1),e.setUTCHours(0,0,0,0),e}}],n&&TG(t.prototype,n),r&&TG(t,r),i}(eq);function LG(e){return LG="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},LG(e)}function HG(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function UG(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function zG(e,t){return zG=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},zG(e,t)}function WG(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=qG(e);if(t){var o=qG(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return VG(this,n)}}function VG(e,t){return!t||"object"!==LG(t)&&"function"!=typeof t?YG(e):t}function YG(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function qG(e){return qG=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},qG(e)}function GG(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var QG=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&zG(e,t)}(i,e);var t,n,r,o=WG(i);function i(){var e;HG(this,i);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return GG(YG(e=o.call.apply(o,[this].concat(n))),"priority",120),GG(YG(e),"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]),e}return t=i,n=[{key:"parse",value:function(e,t,n){switch(t){case"q":case"qq":return Fq(t.length,e);case"qo":return n.ordinalNumber(e,{unit:"quarter"});case"qqq":return n.quarter(e,{width:"abbreviated",context:"standalone"})||n.quarter(e,{width:"narrow",context:"standalone"});case"qqqqq":return n.quarter(e,{width:"narrow",context:"standalone"});default:return n.quarter(e,{width:"wide",context:"standalone"})||n.quarter(e,{width:"abbreviated",context:"standalone"})||n.quarter(e,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(e,t){return t>=1&&t<=4}},{key:"set",value:function(e,t,n){return e.setUTCMonth(3*(n-1),1),e.setUTCHours(0,0,0,0),e}}],n&&UG(t.prototype,n),r&&UG(t,r),i}(eq);function XG(e){return XG="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},XG(e)}function KG(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $G(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function JG(e,t){return JG=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},JG(e,t)}function eQ(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=rQ(e);if(t){var o=rQ(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return tQ(this,n)}}function tQ(e,t){return!t||"object"!==XG(t)&&"function"!=typeof t?nQ(e):t}function nQ(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function rQ(e){return rQ=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},rQ(e)}function oQ(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var iQ=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&JG(e,t)}(i,e);var t,n,r,o=eQ(i);function i(){var e;KG(this,i);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return oQ(nQ(e=o.call.apply(o,[this].concat(n))),"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),oQ(nQ(e),"priority",110),e}return t=i,n=[{key:"parse",value:function(e,t,n){var r=function(e){return e-1};switch(t){case"M":return Mq(Nq(dq,e),r);case"MM":return Mq(Fq(2,e),r);case"Mo":return Mq(n.ordinalNumber(e,{unit:"month"}),r);case"MMM":return n.month(e,{width:"abbreviated",context:"formatting"})||n.month(e,{width:"narrow",context:"formatting"});case"MMMMM":return n.month(e,{width:"narrow",context:"formatting"});default:return n.month(e,{width:"wide",context:"formatting"})||n.month(e,{width:"abbreviated",context:"formatting"})||n.month(e,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(e,t){return t>=0&&t<=11}},{key:"set",value:function(e,t,n){return e.setUTCMonth(n,1),e.setUTCHours(0,0,0,0),e}}],n&&$G(t.prototype,n),r&&$G(t,r),i}(eq);function aQ(e){return aQ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},aQ(e)}function cQ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function sQ(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function uQ(e,t){return uQ=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},uQ(e,t)}function lQ(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=pQ(e);if(t){var o=pQ(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return dQ(this,n)}}function dQ(e,t){return!t||"object"!==aQ(t)&&"function"!=typeof t?fQ(e):t}function fQ(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function pQ(e){return pQ=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},pQ(e)}function hQ(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var mQ=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&uQ(e,t)}(i,e);var t,n,r,o=lQ(i);function i(){var e;cQ(this,i);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return hQ(fQ(e=o.call.apply(o,[this].concat(n))),"priority",110),hQ(fQ(e),"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]),e}return t=i,n=[{key:"parse",value:function(e,t,n){var r=function(e){return e-1};switch(t){case"L":return Mq(Nq(dq,e),r);case"LL":return Mq(Fq(2,e),r);case"Lo":return Mq(n.ordinalNumber(e,{unit:"month"}),r);case"LLL":return n.month(e,{width:"abbreviated",context:"standalone"})||n.month(e,{width:"narrow",context:"standalone"});case"LLLLL":return n.month(e,{width:"narrow",context:"standalone"});default:return n.month(e,{width:"wide",context:"standalone"})||n.month(e,{width:"abbreviated",context:"standalone"})||n.month(e,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(e,t){return t>=0&&t<=11}},{key:"set",value:function(e,t,n){return e.setUTCMonth(n,1),e.setUTCHours(0,0,0,0),e}}],n&&sQ(t.prototype,n),r&&sQ(t,r),i}(eq);function gQ(e){return gQ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},gQ(e)}function vQ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function yQ(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function bQ(e,t){return bQ=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},bQ(e,t)}function wQ(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=EQ(e);if(t){var o=EQ(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return AQ(this,n)}}function AQ(e,t){return!t||"object"!==gQ(t)&&"function"!=typeof t?xQ(e):t}function xQ(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function EQ(e){return EQ=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},EQ(e)}function OQ(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var CQ=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&bQ(e,t)}(i,e);var t,n,r,o=wQ(i);function i(){var e;vQ(this,i);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return OQ(xQ(e=o.call.apply(o,[this].concat(n))),"priority",100),OQ(xQ(e),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"]),e}return t=i,n=[{key:"parse",value:function(e,t,n){switch(t){case"w":return Nq(hq,e);case"wo":return n.ordinalNumber(e,{unit:"week"});default:return Fq(t.length,e)}}},{key:"validate",value:function(e,t){return t>=1&&t<=53}},{key:"set",value:function(e,t,n,r){return(0,bl.Z)(function(e,t,n){(0,il.Z)(2,arguments);var r=(0,sl.Z)(e),o=(0,ll.Z)(t),i=Ol(r,n)-o;return r.setUTCDate(r.getUTCDate()-7*i),r}(e,n,r),r)}}],n&&yQ(t.prototype,n),r&&yQ(t,r),i}(eq);function kQ(e){return kQ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},kQ(e)}function SQ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function DQ(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function PQ(e,t){return PQ=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},PQ(e,t)}function _Q(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=RQ(e);if(t){var o=RQ(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return jQ(this,n)}}function jQ(e,t){return!t||"object"!==kQ(t)&&"function"!=typeof t?TQ(e):t}function TQ(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function RQ(e){return RQ=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},RQ(e)}function IQ(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var MQ=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&PQ(e,t)}(i,e);var t,n,r,o=_Q(i);function i(){var e;SQ(this,i);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return IQ(TQ(e=o.call.apply(o,[this].concat(n))),"priority",100),IQ(TQ(e),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]),e}return t=i,n=[{key:"parse",value:function(e,t,n){switch(t){case"I":return Nq(hq,e);case"Io":return n.ordinalNumber(e,{unit:"week"});default:return Fq(t.length,e)}}},{key:"validate",value:function(e,t){return t>=1&&t<=53}},{key:"set",value:function(e,t,n){return hl(function(e,t){(0,il.Z)(2,arguments);var n=(0,sl.Z)(e),r=(0,ll.Z)(t),o=yl(n)-r;return n.setUTCDate(n.getUTCDate()-7*o),n}(e,n))}}],n&&DQ(t.prototype,n),r&&DQ(t,r),i}(eq);function NQ(e){return NQ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},NQ(e)}function BQ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ZQ(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function FQ(e,t){return FQ=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},FQ(e,t)}function LQ(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=zQ(e);if(t){var o=zQ(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return HQ(this,n)}}function HQ(e,t){return!t||"object"!==NQ(t)&&"function"!=typeof t?UQ(e):t}function UQ(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function zQ(e){return zQ=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},zQ(e)}function WQ(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var VQ=[31,28,31,30,31,30,31,31,30,31,30,31],YQ=[31,29,31,30,31,30,31,31,30,31,30,31],qQ=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&FQ(e,t)}(i,e);var t,n,r,o=LQ(i);function i(){var e;BQ(this,i);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return WQ(UQ(e=o.call.apply(o,[this].concat(n))),"priority",90),WQ(UQ(e),"subPriority",1),WQ(UQ(e),"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"]),e}return t=i,n=[{key:"parse",value:function(e,t,n){switch(t){case"d":return Nq(fq,e);case"do":return n.ordinalNumber(e,{unit:"date"});default:return Fq(t.length,e)}}},{key:"validate",value:function(e,t){var n=zq(e.getUTCFullYear()),r=e.getUTCMonth();return n?t>=1&&t<=YQ[r]:t>=1&&t<=VQ[r]}},{key:"set",value:function(e,t,n){return e.setUTCDate(n),e.setUTCHours(0,0,0,0),e}}],n&&ZQ(t.prototype,n),r&&ZQ(t,r),i}(eq);function GQ(e){return GQ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},GQ(e)}function QQ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function XQ(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function KQ(e,t){return KQ=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},KQ(e,t)}function $Q(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=tX(e);if(t){var o=tX(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return JQ(this,n)}}function JQ(e,t){return!t||"object"!==GQ(t)&&"function"!=typeof t?eX(e):t}function eX(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function tX(e){return tX=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},tX(e)}function nX(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var rX=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&KQ(e,t)}(i,e);var t,n,r,o=$Q(i);function i(){var e;QQ(this,i);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return nX(eX(e=o.call.apply(o,[this].concat(n))),"priority",90),nX(eX(e),"subpriority",1),nX(eX(e),"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]),e}return t=i,n=[{key:"parse",value:function(e,t,n){switch(t){case"D":case"DD":return Nq(pq,e);case"Do":return n.ordinalNumber(e,{unit:"date"});default:return Fq(t.length,e)}}},{key:"validate",value:function(e,t){return zq(e.getUTCFullYear())?t>=1&&t<=366:t>=1&&t<=365}},{key:"set",value:function(e,t,n){return e.setUTCMonth(0,n),e.setUTCHours(0,0,0,0),e}}],n&&XQ(t.prototype,n),r&&XQ(t,r),i}(eq);function oX(e,t,n){var r,o,i,a,c,s,u,l;(0,il.Z)(2,arguments);var d=(0,wl.j)(),f=(0,ll.Z)(null!==(r=null!==(o=null!==(i=null!==(a=null==n?void 0:n.weekStartsOn)&&void 0!==a?a:null==n||null===(c=n.locale)||void 0===c||null===(s=c.options)||void 0===s?void 0:s.weekStartsOn)&&void 0!==i?i:d.weekStartsOn)&&void 0!==o?o:null===(u=d.locale)||void 0===u||null===(l=u.options)||void 0===l?void 0:l.weekStartsOn)&&void 0!==r?r:0);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=(0,sl.Z)(e),h=(0,ll.Z)(t),m=p.getUTCDay(),g=h%7,v=(g+7)%7,y=(v<f?7:0)+h-m;return p.setUTCDate(p.getUTCDate()+y),p}function iX(e){return iX="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},iX(e)}function aX(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function cX(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function sX(e,t){return sX=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},sX(e,t)}function uX(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=fX(e);if(t){var o=fX(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return lX(this,n)}}function lX(e,t){return!t||"object"!==iX(t)&&"function"!=typeof t?dX(e):t}function dX(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function fX(e){return fX=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},fX(e)}function pX(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var hX=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&sX(e,t)}(i,e);var t,n,r,o=uX(i);function i(){var e;aX(this,i);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return pX(dX(e=o.call.apply(o,[this].concat(n))),"priority",90),pX(dX(e),"incompatibleTokens",["D","i","e","c","t","T"]),e}return t=i,n=[{key:"parse",value:function(e,t,n){switch(t){case"E":case"EE":case"EEE":return n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"EEEEE":return n.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});default:return n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(e,t){return t>=0&&t<=6}},{key:"set",value:function(e,t,n,r){return(e=oX(e,n,r)).setUTCHours(0,0,0,0),e}}],n&&cX(t.prototype,n),r&&cX(t,r),i}(eq);function mX(e){return mX="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},mX(e)}function gX(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function vX(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function yX(e,t){return yX=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},yX(e,t)}function bX(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=xX(e);if(t){var o=xX(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return wX(this,n)}}function wX(e,t){return!t||"object"!==mX(t)&&"function"!=typeof t?AX(e):t}function AX(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function xX(e){return xX=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},xX(e)}function EX(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var OX=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&yX(e,t)}(i,e);var t,n,r,o=bX(i);function i(){var e;gX(this,i);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return EX(AX(e=o.call.apply(o,[this].concat(n))),"priority",90),EX(AX(e),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]),e}return t=i,n=[{key:"parse",value:function(e,t,n,r){var o=function(e){var t=7*Math.floor((e-1)/7);return(e+r.weekStartsOn+6)%7+t};switch(t){case"e":case"ee":return Mq(Fq(t.length,e),o);case"eo":return Mq(n.ordinalNumber(e,{unit:"day"}),o);case"eee":return n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"eeeee":return n.day(e,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});default:return n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(e,t){return t>=0&&t<=6}},{key:"set",value:function(e,t,n,r){return(e=oX(e,n,r)).setUTCHours(0,0,0,0),e}}],n&&vX(t.prototype,n),r&&vX(t,r),i}(eq);function CX(e){return CX="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},CX(e)}function kX(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function SX(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function DX(e,t){return DX=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},DX(e,t)}function PX(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=TX(e);if(t){var o=TX(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return _X(this,n)}}function _X(e,t){return!t||"object"!==CX(t)&&"function"!=typeof t?jX(e):t}function jX(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function TX(e){return TX=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},TX(e)}function RX(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var IX=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&DX(e,t)}(i,e);var t,n,r,o=PX(i);function i(){var e;kX(this,i);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return RX(jX(e=o.call.apply(o,[this].concat(n))),"priority",90),RX(jX(e),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]),e}return t=i,n=[{key:"parse",value:function(e,t,n,r){var o=function(e){var t=7*Math.floor((e-1)/7);return(e+r.weekStartsOn+6)%7+t};switch(t){case"c":case"cc":return Mq(Fq(t.length,e),o);case"co":return Mq(n.ordinalNumber(e,{unit:"day"}),o);case"ccc":return n.day(e,{width:"abbreviated",context:"standalone"})||n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"});case"ccccc":return n.day(e,{width:"narrow",context:"standalone"});case"cccccc":return n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"});default:return n.day(e,{width:"wide",context:"standalone"})||n.day(e,{width:"abbreviated",context:"standalone"})||n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(e,t){return t>=0&&t<=6}},{key:"set",value:function(e,t,n,r){return(e=oX(e,n,r)).setUTCHours(0,0,0,0),e}}],n&&SX(t.prototype,n),r&&SX(t,r),i}(eq);function MX(e){return MX="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},MX(e)}function NX(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function BX(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ZX(e,t){return ZX=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},ZX(e,t)}function FX(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=UX(e);if(t){var o=UX(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return LX(this,n)}}function LX(e,t){return!t||"object"!==MX(t)&&"function"!=typeof t?HX(e):t}function HX(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function UX(e){return UX=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},UX(e)}function zX(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var WX=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ZX(e,t)}(i,e);var t,n,r,o=FX(i);function i(){var e;NX(this,i);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return zX(HX(e=o.call.apply(o,[this].concat(n))),"priority",90),zX(HX(e),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]),e}return t=i,n=[{key:"parse",value:function(e,t,n){var r=function(e){return 0===e?7:e};switch(t){case"i":case"ii":return Fq(t.length,e);case"io":return n.ordinalNumber(e,{unit:"day"});case"iii":return Mq(n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),r);case"iiiii":return Mq(n.day(e,{width:"narrow",context:"formatting"}),r);case"iiiiii":return Mq(n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),r);default:return Mq(n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),r)}}},{key:"validate",value:function(e,t){return t>=1&&t<=7}},{key:"set",value:function(e,t,n){return e=function(e,t){(0,il.Z)(2,arguments);var n=(0,ll.Z)(t);n%7==0&&(n-=7);var r=1,o=(0,sl.Z)(e),i=o.getUTCDay(),a=((n%7+7)%7<r?7:0)+n-i;return o.setUTCDate(o.getUTCDate()+a),o}(e,n),e.setUTCHours(0,0,0,0),e}}],n&&BX(t.prototype,n),r&&BX(t,r),i}(eq);function VX(e){return VX="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},VX(e)}function YX(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qX(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function GX(e,t){return GX=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},GX(e,t)}function QX(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=$X(e);if(t){var o=$X(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return XX(this,n)}}function XX(e,t){return!t||"object"!==VX(t)&&"function"!=typeof t?KX(e):t}function KX(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function $X(e){return $X=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},$X(e)}function JX(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var eK=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&GX(e,t)}(i,e);var t,n,r,o=QX(i);function i(){var e;YX(this,i);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return JX(KX(e=o.call.apply(o,[this].concat(n))),"priority",80),JX(KX(e),"incompatibleTokens",["b","B","H","k","t","T"]),e}return t=i,n=[{key:"parse",value:function(e,t,n){switch(t){case"a":case"aa":case"aaa":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaaa":return n.dayPeriod(e,{width:"narrow",context:"formatting"});default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(e,t,n){return e.setUTCHours(Hq(n),0,0,0),e}}],n&&qX(t.prototype,n),r&&qX(t,r),i}(eq);function tK(e){return tK="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},tK(e)}function nK(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function rK(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function oK(e,t){return oK=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},oK(e,t)}function iK(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=sK(e);if(t){var o=sK(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return aK(this,n)}}function aK(e,t){return!t||"object"!==tK(t)&&"function"!=typeof t?cK(e):t}function cK(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function sK(e){return sK=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},sK(e)}function uK(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var lK=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&oK(e,t)}(i,e);var t,n,r,o=iK(i);function i(){var e;nK(this,i);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return uK(cK(e=o.call.apply(o,[this].concat(n))),"priority",80),uK(cK(e),"incompatibleTokens",["a","B","H","k","t","T"]),e}return t=i,n=[{key:"parse",value:function(e,t,n){switch(t){case"b":case"bb":case"bbb":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbbb":return n.dayPeriod(e,{width:"narrow",context:"formatting"});default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(e,t,n){return e.setUTCHours(Hq(n),0,0,0),e}}],n&&rK(t.prototype,n),r&&rK(t,r),i}(eq);function dK(e){return dK="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},dK(e)}function fK(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pK(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function hK(e,t){return hK=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},hK(e,t)}function mK(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=yK(e);if(t){var o=yK(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return gK(this,n)}}function gK(e,t){return!t||"object"!==dK(t)&&"function"!=typeof t?vK(e):t}function vK(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function yK(e){return yK=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},yK(e)}function bK(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var wK=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&hK(e,t)}(i,e);var t,n,r,o=mK(i);function i(){var e;fK(this,i);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return bK(vK(e=o.call.apply(o,[this].concat(n))),"priority",80),bK(vK(e),"incompatibleTokens",["a","b","t","T"]),e}return t=i,n=[{key:"parse",value:function(e,t,n){switch(t){case"B":case"BB":case"BBB":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBBB":return n.dayPeriod(e,{width:"narrow",context:"formatting"});default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(e,t,n){return e.setUTCHours(Hq(n),0,0,0),e}}],n&&pK(t.prototype,n),r&&pK(t,r),i}(eq);function AK(e){return AK="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},AK(e)}function xK(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function EK(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function OK(e,t){return OK=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},OK(e,t)}function CK(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=DK(e);if(t){var o=DK(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return kK(this,n)}}function kK(e,t){return!t||"object"!==AK(t)&&"function"!=typeof t?SK(e):t}function SK(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function DK(e){return DK=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},DK(e)}function PK(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var _K=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&OK(e,t)}(i,e);var t,n,r,o=CK(i);function i(){var e;xK(this,i);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return PK(SK(e=o.call.apply(o,[this].concat(n))),"priority",70),PK(SK(e),"incompatibleTokens",["H","K","k","t","T"]),e}return t=i,n=[{key:"parse",value:function(e,t,n){switch(t){case"h":return Nq(yq,e);case"ho":return n.ordinalNumber(e,{unit:"hour"});default:return Fq(t.length,e)}}},{key:"validate",value:function(e,t){return t>=1&&t<=12}},{key:"set",value:function(e,t,n){var r=e.getUTCHours()>=12;return r&&n<12?e.setUTCHours(n+12,0,0,0):r||12!==n?e.setUTCHours(n,0,0,0):e.setUTCHours(0,0,0,0),e}}],n&&EK(t.prototype,n),r&&EK(t,r),i}(eq);function jK(e){return jK="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},jK(e)}function TK(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function RK(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function IK(e,t){return IK=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},IK(e,t)}function MK(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ZK(e);if(t){var o=ZK(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return NK(this,n)}}function NK(e,t){return!t||"object"!==jK(t)&&"function"!=typeof t?BK(e):t}function BK(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ZK(e){return ZK=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},ZK(e)}function FK(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var LK=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&IK(e,t)}(i,e);var t,n,r,o=MK(i);function i(){var e;TK(this,i);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return FK(BK(e=o.call.apply(o,[this].concat(n))),"priority",70),FK(BK(e),"incompatibleTokens",["a","b","h","K","k","t","T"]),e}return t=i,n=[{key:"parse",value:function(e,t,n){switch(t){case"H":return Nq(mq,e);case"Ho":return n.ordinalNumber(e,{unit:"hour"});default:return Fq(t.length,e)}}},{key:"validate",value:function(e,t){return t>=0&&t<=23}},{key:"set",value:function(e,t,n){return e.setUTCHours(n,0,0,0),e}}],n&&RK(t.prototype,n),r&&RK(t,r),i}(eq);function HK(e){return HK="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},HK(e)}function UK(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function zK(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function WK(e,t){return WK=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},WK(e,t)}function VK(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=GK(e);if(t){var o=GK(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return YK(this,n)}}function YK(e,t){return!t||"object"!==HK(t)&&"function"!=typeof t?qK(e):t}function qK(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function GK(e){return GK=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},GK(e)}function QK(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var XK=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&WK(e,t)}(i,e);var t,n,r,o=VK(i);function i(){var e;UK(this,i);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return QK(qK(e=o.call.apply(o,[this].concat(n))),"priority",70),QK(qK(e),"incompatibleTokens",["h","H","k","t","T"]),e}return t=i,n=[{key:"parse",value:function(e,t,n){switch(t){case"K":return Nq(vq,e);case"Ko":return n.ordinalNumber(e,{unit:"hour"});default:return Fq(t.length,e)}}},{key:"validate",value:function(e,t){return t>=0&&t<=11}},{key:"set",value:function(e,t,n){return e.getUTCHours()>=12&&n<12?e.setUTCHours(n+12,0,0,0):e.setUTCHours(n,0,0,0),e}}],n&&zK(t.prototype,n),r&&zK(t,r),i}(eq);function KK(e){return KK="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},KK(e)}function $K(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function JK(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function e$(e,t){return e$=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},e$(e,t)}function t$(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=o$(e);if(t){var o=o$(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return n$(this,n)}}function n$(e,t){return!t||"object"!==KK(t)&&"function"!=typeof t?r$(e):t}function r$(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function o$(e){return o$=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},o$(e)}function i$(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var a$=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&e$(e,t)}(i,e);var t,n,r,o=t$(i);function i(){var e;$K(this,i);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return i$(r$(e=o.call.apply(o,[this].concat(n))),"priority",70),i$(r$(e),"incompatibleTokens",["a","b","h","H","K","t","T"]),e}return t=i,n=[{key:"parse",value:function(e,t,n){switch(t){case"k":return Nq(gq,e);case"ko":return n.ordinalNumber(e,{unit:"hour"});default:return Fq(t.length,e)}}},{key:"validate",value:function(e,t){return t>=1&&t<=24}},{key:"set",value:function(e,t,n){var r=n<=24?n%24:n;return e.setUTCHours(r,0,0,0),e}}],n&&JK(t.prototype,n),r&&JK(t,r),i}(eq);function c$(e){return c$="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c$(e)}function s$(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u$(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l$(e,t){return l$=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},l$(e,t)}function d$(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=h$(e);if(t){var o=h$(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return f$(this,n)}}function f$(e,t){return!t||"object"!==c$(t)&&"function"!=typeof t?p$(e):t}function p$(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function h$(e){return h$=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},h$(e)}function m$(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var g$=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l$(e,t)}(i,e);var t,n,r,o=d$(i);function i(){var e;s$(this,i);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return m$(p$(e=o.call.apply(o,[this].concat(n))),"priority",60),m$(p$(e),"incompatibleTokens",["t","T"]),e}return t=i,n=[{key:"parse",value:function(e,t,n){switch(t){case"m":return Nq(bq,e);case"mo":return n.ordinalNumber(e,{unit:"minute"});default:return Fq(t.length,e)}}},{key:"validate",value:function(e,t){return t>=0&&t<=59}},{key:"set",value:function(e,t,n){return e.setUTCMinutes(n,0,0),e}}],n&&u$(t.prototype,n),r&&u$(t,r),i}(eq);function v$(e){return v$="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},v$(e)}function y$(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function b$(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function w$(e,t){return w$=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},w$(e,t)}function A$(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=O$(e);if(t){var o=O$(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return x$(this,n)}}function x$(e,t){return!t||"object"!==v$(t)&&"function"!=typeof t?E$(e):t}function E$(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function O$(e){return O$=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},O$(e)}function C$(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var k$=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&w$(e,t)}(i,e);var t,n,r,o=A$(i);function i(){var e;y$(this,i);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return C$(E$(e=o.call.apply(o,[this].concat(n))),"priority",50),C$(E$(e),"incompatibleTokens",["t","T"]),e}return t=i,n=[{key:"parse",value:function(e,t,n){switch(t){case"s":return Nq(wq,e);case"so":return n.ordinalNumber(e,{unit:"second"});default:return Fq(t.length,e)}}},{key:"validate",value:function(e,t){return t>=0&&t<=59}},{key:"set",value:function(e,t,n){return e.setUTCSeconds(n,0),e}}],n&&b$(t.prototype,n),r&&b$(t,r),i}(eq);function S$(e){return S$="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},S$(e)}function D$(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function P$(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _$(e,t){return _$=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},_$(e,t)}function j$(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=I$(e);if(t){var o=I$(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return T$(this,n)}}function T$(e,t){return!t||"object"!==S$(t)&&"function"!=typeof t?R$(e):t}function R$(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function I$(e){return I$=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},I$(e)}function M$(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var N$=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_$(e,t)}(i,e);var t,n,r,o=j$(i);function i(){var e;D$(this,i);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return M$(R$(e=o.call.apply(o,[this].concat(n))),"priority",30),M$(R$(e),"incompatibleTokens",["t","T"]),e}return t=i,n=[{key:"parse",value:function(e,t){return Mq(Fq(t.length,e),(function(e){return Math.floor(e*Math.pow(10,3-t.length))}))}},{key:"set",value:function(e,t,n){return e.setUTCMilliseconds(n),e}}],n&&P$(t.prototype,n),r&&P$(t,r),i}(eq);function B$(e){return B$="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},B$(e)}function Z$(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function F$(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function L$(e,t){return L$=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},L$(e,t)}function H$(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=W$(e);if(t){var o=W$(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return U$(this,n)}}function U$(e,t){return!t||"object"!==B$(t)&&"function"!=typeof t?z$(e):t}function z$(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function W$(e){return W$=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},W$(e)}function V$(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Y$=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&L$(e,t)}(i,e);var t,n,r,o=H$(i);function i(){var e;Z$(this,i);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return V$(z$(e=o.call.apply(o,[this].concat(n))),"priority",10),V$(z$(e),"incompatibleTokens",["t","T","x"]),e}return t=i,n=[{key:"parse",value:function(e,t){switch(t){case"X":return Bq(_q,e);case"XX":return Bq(jq,e);case"XXXX":return Bq(Tq,e);case"XXXXX":return Bq(Iq,e);default:return Bq(Rq,e)}}},{key:"set",value:function(e,t,n){return t.timestampIsSet?e:new Date(e.getTime()-n)}}],n&&F$(t.prototype,n),r&&F$(t,r),i}(eq);function q$(e){return q$="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},q$(e)}function G$(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Q$(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function X$(e,t){return X$=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},X$(e,t)}function K$(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=eJ(e);if(t){var o=eJ(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return $$(this,n)}}function $$(e,t){return!t||"object"!==q$(t)&&"function"!=typeof t?J$(e):t}function J$(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function eJ(e){return eJ=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},eJ(e)}function tJ(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var nJ=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&X$(e,t)}(i,e);var t,n,r,o=K$(i);function i(){var e;G$(this,i);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return tJ(J$(e=o.call.apply(o,[this].concat(n))),"priority",10),tJ(J$(e),"incompatibleTokens",["t","T","X"]),e}return t=i,n=[{key:"parse",value:function(e,t){switch(t){case"x":return Bq(_q,e);case"xx":return Bq(jq,e);case"xxxx":return Bq(Tq,e);case"xxxxx":return Bq(Iq,e);default:return Bq(Rq,e)}}},{key:"set",value:function(e,t,n){return t.timestampIsSet?e:new Date(e.getTime()-n)}}],n&&Q$(t.prototype,n),r&&Q$(t,r),i}(eq);function rJ(e){return rJ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},rJ(e)}function oJ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function iJ(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function aJ(e,t){return aJ=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},aJ(e,t)}function cJ(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=lJ(e);if(t){var o=lJ(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return sJ(this,n)}}function sJ(e,t){return!t||"object"!==rJ(t)&&"function"!=typeof t?uJ(e):t}function uJ(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function lJ(e){return lJ=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},lJ(e)}function dJ(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var fJ=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&aJ(e,t)}(i,e);var t,n,r,o=cJ(i);function i(){var e;oJ(this,i);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return dJ(uJ(e=o.call.apply(o,[this].concat(n))),"priority",40),dJ(uJ(e),"incompatibleTokens","*"),e}return t=i,(n=[{key:"parse",value:function(e){return Zq(e)}},{key:"set",value:function(e,t,n){return[new Date(1e3*n),{timestampIsSet:!0}]}}])&&iJ(t.prototype,n),r&&iJ(t,r),i}(eq);function pJ(e){return pJ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},pJ(e)}function hJ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function mJ(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function gJ(e,t){return gJ=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},gJ(e,t)}function vJ(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=wJ(e);if(t){var o=wJ(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return yJ(this,n)}}function yJ(e,t){return!t||"object"!==pJ(t)&&"function"!=typeof t?bJ(e):t}function bJ(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function wJ(e){return wJ=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},wJ(e)}function AJ(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var xJ=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&gJ(e,t)}(i,e);var t,n,r,o=vJ(i);function i(){var e;hJ(this,i);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return AJ(bJ(e=o.call.apply(o,[this].concat(n))),"priority",20),AJ(bJ(e),"incompatibleTokens","*"),e}return t=i,(n=[{key:"parse",value:function(e){return Zq(e)}},{key:"set",value:function(e,t,n){return[new Date(n),{timestampIsSet:!0}]}}])&&mJ(t.prototype,n),r&&mJ(t,r),i}(eq),EJ={G:new lq,y:new Jq,Y:new uG,R:new bG,u:new PG,Q:new FG,q:new QG,M:new iQ,L:new mQ,w:new CQ,I:new MQ,d:new qQ,D:new rX,E:new hX,e:new OX,c:new IX,i:new WX,a:new eK,b:new lK,B:new wK,h:new _K,H:new LK,K:new XK,k:new a$,m:new g$,s:new k$,S:new N$,X:new Y$,x:new nJ,t:new fJ,T:new xJ};function OJ(e){return OJ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},OJ(e)}function CJ(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return kJ(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return kJ(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return a=e.done,e},e:function(e){c=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(c)throw i}}}}function kJ(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var SJ=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,DJ=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,PJ=/^'([^]*?)'?$/,_J=/''/g,jJ=/\S/,TJ=/[a-zA-Z]/;function RJ(e,t,n,r){var o,i,a,c,s,u,l,d,f,p,h,m,g,v,y,b,w,A;(0,il.Z)(3,arguments);var x=String(e),E=String(t),O=(0,wl.j)(),C=null!==(o=null!==(i=null==r?void 0:r.locale)&&void 0!==i?i:O.locale)&&void 0!==o?o:Gl;if(!C.match)throw new RangeError("locale must contain match property");var k=(0,ll.Z)(null!==(a=null!==(c=null!==(s=null!==(u=null==r?void 0:r.firstWeekContainsDate)&&void 0!==u?u:null==r||null===(l=r.locale)||void 0===l||null===(d=l.options)||void 0===d?void 0:d.firstWeekContainsDate)&&void 0!==s?s:O.firstWeekContainsDate)&&void 0!==c?c:null===(f=O.locale)||void 0===f||null===(p=f.options)||void 0===p?void 0:p.firstWeekContainsDate)&&void 0!==a?a:1);if(!(k>=1&&k<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var S=(0,ll.Z)(null!==(h=null!==(m=null!==(g=null!==(v=null==r?void 0:r.weekStartsOn)&&void 0!==v?v:null==r||null===(y=r.locale)||void 0===y||null===(b=y.options)||void 0===b?void 0:b.weekStartsOn)&&void 0!==g?g:O.weekStartsOn)&&void 0!==m?m:null===(w=O.locale)||void 0===w||null===(A=w.options)||void 0===A?void 0:A.weekStartsOn)&&void 0!==h?h:0);if(!(S>=0&&S<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(""===E)return""===x?(0,sl.Z)(n):new Date(NaN);var D,P={firstWeekContainsDate:k,weekStartsOn:S,locale:C},_=[new $Y],j=E.match(DJ).map((function(e){var t=e[0];return t in Hl?(0,Hl[t])(e,C.formatLong):e})).join("").match(SJ),T=[],R=CJ(j);try{var I=function(){var t=D.value;null!=r&&r.useAdditionalWeekYearTokens||!Yl(t)||ql(t,E,e),null!=r&&r.useAdditionalDayOfYearTokens||!Vl(t)||ql(t,E,e);var n=t[0],o=EJ[n];if(o){var i=o.incompatibleTokens;if(Array.isArray(i)){var a=T.find((function(e){return i.includes(e.token)||e.token===n}));if(a)throw new RangeError("The format string mustn't contain `".concat(a.fullToken,"` and `").concat(t,"` at the same time"))}else if("*"===o.incompatibleTokens&&T.length>0)throw new RangeError("The format string mustn't contain `".concat(t,"` and any other token at the same time"));T.push({token:n,fullToken:t});var c=o.run(x,t,C.match,P);if(!c)return{v:new Date(NaN)};_.push(c.setter),x=c.rest}else{if(n.match(TJ))throw new RangeError("Format string contains an unescaped latin alphabet character `"+n+"`");if("''"===t?t="'":"'"===n&&(t=IJ(t)),0!==x.indexOf(t))return{v:new Date(NaN)};x=x.slice(t.length)}};for(R.s();!(D=R.n()).done;){var M=I();if("object"===OJ(M))return M.v}}catch(e){R.e(e)}finally{R.f()}if(x.length>0&&jJ.test(x))return new Date(NaN);var N=_.map((function(e){return e.priority})).sort((function(e,t){return t-e})).filter((function(e,t,n){return n.indexOf(e)===t})).map((function(e){return _.filter((function(t){return t.priority===e})).sort((function(e,t){return t.subPriority-e.subPriority}))})).map((function(e){return e[0]})),B=(0,sl.Z)(n);if(isNaN(B.getTime()))return new Date(NaN);var Z,F=fl(B,Ul(B)),L={},H=CJ(N);try{for(H.s();!(Z=H.n()).done;){var U=Z.value;if(!U.validate(F,P))return new Date(NaN);var z=U.set(F,L,P);Array.isArray(z)?(F=z[0],ZY(L,z[1])):F=z}}catch(e){H.e(e)}finally{H.f()}return F}function IJ(e){return e.match(PJ)[1].replace(_J,"'")}function MJ(e,t,n){return(0,il.Z)(2,arguments),ul(RJ(e,t,new Date,n))}var NJ=a(70722),BJ="yyyy-MM-dd",ZJ="yyyy-MM-dd HH:mm",FJ=function(e){return MJ(e,BJ)?RJ(e,BJ,new Date):MJ(e,ZJ)?RJ(e,ZJ,new Date):MJ(e,"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")||MJ(e,"yyyy-MM-dd'T'HH:mm:ss.SSSxxx")?new Date(e):NaN},LJ=function(e){return null!=e&&""!==e},HJ=function(e,t,n){return[].concat(z()(LJ(e.from)?[t(n,e.from,">=")]:[]),z()(LJ(e.to)?[t(n,e.to,e.exclusive?"<":"<=")]:[])).join(" and ")},UJ=function(e){switch(e){case"datetime":case"createts":case"updatets":return function(e){var t=function(e){return nd(FJ(e))}(e);return isNaN(t)?e:{from:t.toISOString(),to:BY(t,1).toISOString(),isRangeValue:!0,exclusive:!0}};default:return function(e){return e}}},zJ=function(e){switch(e){case"multi-select-box":case"multi-remote-field":return function(e,t){return'KEYS("'.concat(e,'",').concat(t.map((function(e){return e.key})).join(","),")")};case"single-remote-field":case"single-select-box":return function(e,t){return"".concat(e,".pk == ").concat(t.key)};case"fulltext-search":return function(e,t){var n=function(e){return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}(t);return"txtFulltext"===e?'fulltext("('.concat(n,") OR (").concat(n,'*)")'):'fulltext("('.concat(n,") OR (").concat(n,'*)", ').concat(e,")")};case"birthdate":case"date":case"create_timestamp":return function(e,t,n){return"".concat(e," ").concat(n,' date:"').concat(t,'"')};case"datetime":case"createts":case"updatets":return function(e,t,n){return"".concat(e," ").concat(n,' datetime:"').concat(function(e){return(0,NJ.formatInTimeZone)(e,"UTC",ZJ)}(FJ(t)),'"')};case"time":return function(e,t,n){return"".concat(e," ").concat(n,' time:"').concat(function(e){return ed(e,"HH:mm:ss.SSS")}(function(e){return RJ(e,"HH:mm",new Date)}(t)),'"')};case"compressed-text":case"string":case"text":case"createuser":case"updateuser":case"login":return function(e,t){return"".concat(e,' ~= "*').concat(t,'*"')};case"boolean":return function(e,t){return LJ(t)?"".concat(e," == ").concat(t):null};case"marking":return function(e,t){return!1===t?"not exists(".concat(e,")"):"exists(".concat(e,")")};default:return function(e,t,n){return"".concat(e," ").concat(n," ").concat(t)}}},WJ=function(e){return wm()(e)&&e.key?"single-select-box":Array.isArray(e)&&e.every((function(e){return!!e.key}))?"multi-select-box":"string"};const VJ=function(e,t,n){if(!LJ(t))return null;var r=n||WJ(t),o=(t=UJ(r)(t))&&"object"===mw()(t)&&t.isRangeValue,i=zJ(r);return o?HJ(t,i,e):i(e,t,"==")};function YJ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function qJ(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?YJ(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):YJ(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var GJ,QJ,XJ,KJ,$J,JJ,e0,t0,n0=function(e){return Array.isArray(e)?e.map((function(e){return e.uniqueId})):[e.uniqueId]},r0=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Om()(e,(function(e,n,r){var o={};if("searchFilter"===r)n&&(o.filters=n0(n));else{var i=t[r],a=VJ(r,n,i);o.tql=[].concat(z()(e.tql?[e.tql]:[]),[a]).filter(Boolean).join(" and ")}return qJ(qJ({},e),o)}),{})},o0=b.ZP.div.withConfig({displayName:"StyledColumnPickerWrapper"})(GJ||(GJ=(0,v.Z)([""]))),i0=b.ZP.div.withConfig({displayName:"StyledControlsWrapper"})(QJ||(QJ=(0,v.Z)(["\n margin-top: ",";\n"])),x.Z.space(.7)),a0=b.ZP.ul.withConfig({displayName:"StyledUl"})(XJ||(XJ=(0,v.Z)(["\n list-style-type: none;\n margin-top: "," !important; // Nice2 Reset\n padding-left: 0 !important; // Nice2 Reset\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));\n\n "," {\n padding: 0 !important; // Nice2 Reset\n }\n"])),x.Z.space(-.5),DP.ar),c0=b.ZP.input.withConfig({displayName:"StyledCheckbox"})(KJ||(KJ=(0,v.Z)(["\n vertical-align: top;\n margin-right: "," !important; // Nice2 Reset\n\n &:hover {\n cursor: pointer;\n }\n"])),x.Z.space(-1)),s0=b.ZP.div.withConfig({displayName:"StyledButtonWrapper"})($J||($J=(0,v.Z)(["\n position: sticky;\n bottom: 0;\n padding-top: ",";\n background-color: ",";\n display: flex;\n justify-content: flex-end;\n\n "," {\n margin-right: 0;\n }\n"])),x.Z.space(0),w.FS.color("paper"),gd.Z),u0=b.ZP.span.withConfig({displayName:"StyledId"})(JJ||(JJ=(0,v.Z)(["\n color: ",";\n font-style: italic;\n"])),w.FS.color("text")),l0=(0,b.ZP)(aR.EF).withConfig({displayName:"StyledItem"})(e0||(e0=(0,v.Z)(["\n display: flex;\n padding: "," "," "," 0;\n border-right: ",";\n ","\n"])),x.Z.space(-2),x.Z.space(-2),x.Z.space(-2),(function(e){var t=e.isDraggedOver,n=e.theme;return t?"3px solid ".concat(n.colors.secondary):"none"}),(function(e){var t=e.draggable,n=e.theme;return t&&"\n &:hover {\n background-color: ".concat((0,rf.xn)(n.colors.paper)[1],";\n\n &,\n label {\n cursor: pointer;\n }\n }\n ")})),d0=b.ZP.span.withConfig({displayName:"StyledNumber"})(t0||(t0=(0,v.Z)(["\n display: inline-block;\n margin-right: ",";\n color: ",";\n font-size: ",";\n"])),x.Z.space(-1),w.FS.color("text"),x.Z.font(0));function f0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function p0(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f0(Object(n),!0).forEach((function(t){(0,Iv.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f0(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var h0=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"hidden";return e.sort((function(e,n){return e[t]-n[t]}))},m0=function(e,t){return e.filter((function(e){return null===t||e.label.match(new RegExp(t,"i"))}))};const g0=function(e){var t=e.onOk,n=e.dndEnabled,r=e.initialColumns,o=e.intl,i=e.buttonLabel,a=(0,R.useState)([]),c=(0,wd.Z)(a,2),s=c[0],u=c[1],l=h0(r);(0,R.useEffect)((function(){return u(l)}),[l]);var d=(0,R.useState)(null),f=(0,wd.Z)(d,2),p=f[0],h=f[1],m=(0,R.useCallback)((function(e,t){if(e!==t){var n=s.find((function(t){return t.id===e}));u((function(e){return e.filter((function(e){return e!==n})).reduce((function(e,r){return[].concat((0,RO.Z)(e),[r],(0,RO.Z)(r.id===t?[n]:[]))}),[])}))}}),[s]),g=TH(m),v=g.dndEvents,y=g.dndState,b=(0,R.useMemo)((function(){return m0(s,p)}),[s,p]),w=b.some((function(e){return e.hidden})),A=(0,R.useMemo)((function(){return b.map((function(e,t){var r=y.currentlyDragOver===e.id&&y.currentlyDragging!==e.id;return(0,S.jsxs)(l0,p0(p0({draggable:n,isDraggedOver:r},n&&p0({},v(e.id))),{},{children:[(0,S.jsx)(c0,{type:"checkbox",id:e.id,checked:!e.hidden,onChange:function(t){u((function(n){return h0(n.map((function(n){return n.id===e.id?p0(p0({},n),{},{hidden:!t.target.checked}):n})))}))}}),(0,S.jsxs)(Zd.ZP.Label,{for:e.id,children:[(0,S.jsxs)(d0,{children:[t+1,"."]}),e.label?(0,S.jsx)("span",{dangerouslySetInnerHTML:{__html:hk.Z.sanitizeHtml(e.label)}}):(0,S.jsx)(u0,{children:e.id})]})]}),e.id)}))}),[y,n,v,b]);return(0,S.jsxs)(o0,{children:[(0,S.jsx)(zW,{placeholder:o.formatMessage({id:"client.entity-list.preferences.columns.search"}),onSearch:h}),(0,S.jsxs)(i0,{children:[(0,S.jsx)(c0,{type:"checkbox",onChange:function(e){var t=e.target.checked;u((function(e){var n=m0(e,p);return h0((0,RO.Z)(e.map((function(e){return p0(p0({},e),{},{hidden:n.includes(e)?!t:e.hidden})}))))}))},checked:!w}),(0,S.jsx)(Zd.ZP.Span,{children:o.formatMessage({id:"client.entity-list.preferences.columns.selectDeselectAllCheckbox"})})]}),(0,S.jsx)(a0,{children:A}),(0,S.jsx)(s0,{children:(0,S.jsx)(pd.Z,{onClick:function(){return t(s)},look:"raised",children:i||o.formatMessage({id:"client.entity-list.preferences.columns.okButton"})})})]})};const v0=(0,_.connect)((function(e,t){return{columns:t.columns,onOk:t.onOk}}))((0,P.ZP)(g0));const y0=function(e){var t=e.indexOf("order by ");return t>=0?e.substring(t+"order by ".length).split(",").map((function(e){return e.trim()})).map((function(e){return e.split(/\s+/)})).map((function(e){var t=T()(e,2);return{field:t[0],order:t[1]||"asc"}})):[]};var b0,w0,A0=(0,b.ZP)(pd.Z).withConfig({displayName:"StyledButton"})(b0||(b0=Ld()(["\n float: right;\n margin-top: ",";\n margin-right: 0;\n"])),x.Z.space(0));const x0=(0,P.ZP)((function(e){var t=e.intl,n=e.onSave,r=(0,R.useState)(""),o=T()(r,2),i=o[0],a=o[1],c=(0,R.useRef)(null);H.Z.useAutofocus(c);var s;return(0,S.jsxs)("div",{ref:c,children:[(0,S.jsx)(FR,{label:(s="client.entity-list.search.settings.saveAsFilter.nameLabel",t.formatMessage({id:s})),children:(0,S.jsx)(iT,{type:"string",value:i,events:{onChange:a}})}),(0,S.jsx)(A0,{onClick:function(){return n(i)},look:"raised",ink:"primary",disabled:!i,children:w0||(w0=(0,S.jsx)(fd.Z,{id:"client.entity-list.search.settings.saveAsFilter.button"}))})]})})),E0=x0;var O0,C0=function(e,t){var n={};return ow()(e,(function(e,r){var o=S0.get(r);if(o||(o=D0(YI.transformFieldNameBack(r),t),S0.add(r,o)),o){var i=k0(e,o);i&&(n[r]=i)}})),n},k0=function(e,t){var n=t.dataType,r=_0[n];return r?r(e):null},S0=(O0={},{add:function(e,t){O0[e]=t},get:function(e){return O0[e]}}),D0=function e(t,n){if(n.id===t)return n.children[0];var r=null;return n.children&&n.children.forEach((function(n){var o=e(t,n);o&&(r=o)})),r},P0=function(e){if(e.length>0&&e.length<2)return{minLength:[(0,S.jsx)(fd.Z,{id:"client.entity-list.searchFormValidationMinLength",values:{minLength:2}},"minLength")]}},_0={string:P0,"fulltext-search":P0};function j0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function T0(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?j0(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):j0(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var R0=Zf().mark(h1),I0=Zf().mark(m1),M0=Zf().mark(g1),N0=Zf().mark(v1),B0=Zf().mark(y1),Z0=Zf().mark(w1),F0=Zf().mark(A1),L0=Zf().mark(x1),H0=Zf().mark(E1),U0=Zf().mark(O1),z0=Zf().mark(C1),W0=Zf().mark(k1),V0=Zf().mark(S1),Y0=Zf().mark(D1),q0=Zf().mark(P1),G0=Zf().mark(_1),Q0=Zf().mark(j1),X0=Zf().mark(T1),K0=Zf().mark(R1),$0=Zf().mark(I1),J0=Zf().mark(M1),e1=Zf().mark(N1),t1=Zf().mark(B1),n1=Zf().mark(Z1),r1=Zf().mark(F1),o1=Zf().mark(L1),i1=Zf().mark(H1),a1=Zf().mark(U1),c1=function(e){return e.input},s1=function(e){return e.searchForm},u1=function(e){return e.list},l1=function(e){return e.entityList},d1=function(e){return e.list.formDefinition},f1=ix("searchForm"),p1=(GW("searchForm"),"searchForm");function h1(){return Zf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Ff.$6)([(0,Ff.Fm)(YZ,m1),(0,Ff.Fm)(yA,w1),(0,Ff.Fm)($Z,w1),(0,Ff.Fm)(OZ,g1),(0,Ff.Fm)(QZ,k1),(0,Ff.Fm)(oF,D1),(0,Ff.Fm)(rF,T1),(0,Ff.Fm)(iF,R1),(0,Ff.Fm)(aF,I1),(0,Ff.Fm)(cF,M1),(0,Ff.Fm)(sF,B1),(0,Ff.Fm)(uF,Z1),(0,Ff.Fm)(lF,F1),(0,Ff.Fm)(hF,H1),(0,Ff.Fm)(mF,U1),(0,Ff.Fm)(dF,U1),(0,Ff.Ds)(500,fF,L1)]);case 2:case"end":return e.stop()}}),R0)}function m1(){var e,t,n,r,o,i;return Zf().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,(0,Ff.Ys)(c1);case 2:return e=a.sent,t=e.entityName,a.next=6,(0,Ff.Ys)(l1);case 6:return n=a.sent,r=n.searchFormType,o=r!==PW.NONE,a.next=11,(0,Ff.RE)(g1);case 11:return i=a.sent,a.next=14,(0,Ff.RE)(y1,o,i);case 14:if(r!==PW.ADMIN){a.next=17;break}return a.next=17,(0,Ff.RE)(A1,t);case 17:return a.next=19,(0,Ff.gz)(gF());case 19:case"end":return a.stop()}}),I0)}function g1(){var e,t,n;return Zf().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,(0,Ff.Ys)(l1);case 2:if(e=r.sent,t=e.searchFormType,!(t!==PW.NONE)){r.next=11;break}return r.next=8,(0,Ff.RE)(E1);case 8:r.t0=r.sent,r.next=12;break;case 11:r.t0=null;case 12:return n=r.t0,r.abrupt("return",n);case 14:case"end":return r.stop()}}),M0)}function v1(){var e,t;return Zf().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,Ff.Ys)(d1);case 2:if(e=n.sent){n.next=8;break}return n.next=6,(0,Ff.qn)(QH);case 6:return t=n.sent,n.abrupt("return",t.payload.formDefinition);case 8:return n.abrupt("return",e);case 9:case"end":return n.stop()}}),N0)}function y1(e,t){var n,r,o,i,a,c,s,u,l,d,f,p;return Zf().wrap((function(h){for(;;)switch(h.prev=h.next){case 0:return h.next=2,(0,Ff.Ys)(c1);case 2:if(n=h.sent,r=n.preselectedSearchFields,o=n.parent,i={},!r){h.next=19;break}return h.next=9,(0,Ff.RE)(O1);case 9:if(a=h.sent,!e){h.next=16;break}return h.next=13,(0,Ff.RE)(YI.transformInputValues,r,a);case 13:h.t0=h.sent,h.next=17;break;case 16:h.t0=r;case 17:c=h.t0,i=T0(T0({},i),c);case 19:if(!o||Object.prototype.hasOwnProperty.call(i,o.reverseRelationName)){h.next=31;break}return h.next=22,(0,Ff.RE)(v1);case 22:return s=h.sent,h.next=25,(0,Ff.RE)(Bz,s);case 25:if(h.sent){h.next=31;break}return h.next=29,(0,Ff.RE)(uh.Z.fetchDisplay,o.model,o.key);case 29:u=h.sent,i[o.reverseRelationName]={key:o.key,display:u};case 31:if(!e||!t){h.next=39;break}return h.next=34,(0,Ff.RE)(YI.getFieldDefinitions,t);case 34:return l=h.sent,h.next=37,(0,Ff.RE)(YI.getDefaultValues,l);case 37:d=h.sent,i=T0(T0({},d),i);case 39:return h.next=41,(0,Ff.RE)(b1,i);case 41:return f=h.sent,h.next=44,(0,Ff.Ys)(ix(p1));case 44:return p=h.sent,h.next=47,(0,Ff.gz)(UA.initialize(p1,f));case 47:if(!p){h.next=50;break}return h.next=50,(0,Ff.$6)(Object.keys(p).map((function(e){return(0,Ff.gz)(UA.change(p1,e,p[e]))})));case 50:return h.next=52,(0,Ff.gz)({type:JZ,payload:{valuesInitialized:!0}});case 52:case"end":return h.stop()}}),B0)}function b1(e){return Om()(e,(function(e,t,n){return T0(T0({},e),{},L()({},YI.transformFieldName(n),t))}),{})}function w1(){var e,t,n,r;return Zf().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,(0,Ff.Ys)(ix(p1));case 2:return e=o.sent,o.next=5,(0,Ff.Ys)(s1);case 5:return t=o.sent,n=t.formDefinition,o.next=9,(0,Ff.RE)(C0,e,n);case 9:if(r=o.sent,0!==Object.keys(r).length){o.next=13;break}return o.next=13,(0,Ff.gz)(bF());case 13:case"end":return o.stop()}}),Z0)}function A1(e){var t,n,r,o;return Zf().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,(0,Ff.RE)(uh.Z.fetchSearchFilters,e);case 2:return t=i.sent,i.next=5,(0,Ff.Ys)(c1);case 5:return n=i.sent,r=n.parent,o=!r,i.next=10,(0,Ff.gz)(xF(t.map((function(e){return T0(T0({},e),o&&e.defaultFilter&&{active:!0})}))));case 10:case"end":return i.stop()}}),F0)}function x1(){var e;return Zf().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e={txtFulltext:"fulltext-search"},t.next=3,(0,Ff.gz)(AF(e));case 3:case"end":return t.stop()}}),L0)}function E1(){var e,t,n,r,o,i,a,c=arguments;return Zf().wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return e=c.length>0&&void 0!==c[0]&&c[0],s.next=3,(0,Ff.Ys)(c1);case 3:return t=s.sent,n=t.formName,s.next=7,(0,Ff.Ys)(l1);case 7:if(r=s.sent,r.searchFormType!==PW.FULLTEXT){s.next=13;break}return s.next=12,(0,Ff.RE)(x1);case 12:return s.abrupt("return",null);case 13:return s.next=15,(0,Ff.RE)(uh.Z.fetchForm,n,"search",!0,e);case 15:if(!(o=s.sent)){s.next=32;break}return s.next=19,(0,Ff.Ys)(c1);case 19:if(i=s.sent,!(a=i.parent)||!a.reverseRelationName){s.next=25;break}return s.next=24,(0,Ff.RE)(Kz,o,a.reverseRelationName);case 24:o=s.sent;case 25:return s.next=27,(0,Ff.gz)(yF(o));case 27:return s.next=29,(0,Ff.gz)(AF(Qz(o)));case 29:return s.abrupt("return",o);case 32:return s.next=34,(0,Ff.gz)(PZ(PW.FULLTEXT));case 34:return s.next=36,(0,Ff.RE)(x1);case 36:return s.abrupt("return",null);case 37:case"end":return s.stop()}}),H0)}function O1(){var e,t,n;return Zf().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,(0,Ff.Ys)(u1);case 2:if(e=r.sent,0!==Object.keys(e.entityModel).length){r.next=6;break}return r.next=6,(0,Ff.qn)(KH);case 6:return r.next=8,(0,Ff.Ys)(u1);case 8:return t=r.sent,n=t.entityModel,r.abrupt("return",n);case 11:case"end":return r.stop()}}),U0)}function C1(){var e,t;return Zf().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,Ff.Ys)(s1);case 2:return e=n.sent,t=e.searchFilters,n.next=6,(0,Ff.gz)(xF(t.map((function(e){return T0(T0({},e),{},{active:e.defaultFilter})}))));case 6:case"end":return n.stop()}}),z0)}function k1(){return Zf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Ff.RE)(C1);case 2:return e.next=4,(0,Ff.gz)(UA.reset("searchForm"));case 4:return e.next=6,(0,Ff.RE)(w1);case 6:case"end":return e.stop()}}),W0)}function S1(){var e,t;return Zf().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,Ff.Ys)(s1);case 2:if(e=n.sent,e.valuesInitialized){n.next=7;break}return n.next=7,(0,Ff.qn)(JZ);case 7:return n.next=9,(0,Ff.Ys)(f1);case 9:return t=n.sent,n.abrupt("return",Om()(t,(function(e,t,n){return T0(T0({},e),!Array.isArray(t)||t.length?L()({},YI.transformFieldNameBack(n),t):{})}),{}));case 11:case"end":return n.stop()}}),V0)}function D1(){var e,t,n,r,o,i,a,c;return Zf().wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return s.next=2,(0,Ff.RE)(_1);case 2:return e=s.sent,s.next=5,(0,Ff.RE)(N2,!1);case 5:return t=s.sent,n=t.where,r=t.filter,s.next=10,(0,Ff.Ys)(u1);case 10:return o=s.sent,i=o.sorting,s.next=14,(0,Ff.Ys)(c1);case 14:return a=s.sent,c=a.entityName,s.next=18,(0,Ff.RE)(P1,e,c,n,i,r);case 18:case"end":return s.stop()}}),Y0)}function P1(e,t,n,r,o){var i;return Zf().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,(0,Ff.RE)(j1,e,t,n,r,o);case 2:return i=a.sent,a.next=5,(0,Ff.RE)(A1,t);case 5:return a.next=7,(0,Ff.RE)(k1);case 7:return a.next=9,(0,Ff.gz)(EF(i.uniqueId,!0,!0));case 9:case"end":return a.stop()}}),q0)}function _1(){var e;return Zf().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,Ff.RE)(yh.CE);case 2:return e=t.sent,t.next=5,(0,Ff.gz)(m.Z.modal("filter-save","client.entity-list.search.settings.saveAsFilter",null,(function(t){var n=t.close;return(0,S.jsx)(E0,{onSave:function(t){n(),e.put(t)}})}),!0));case 5:return t.next=7,(0,Ff.qn)(e);case 7:return t.abrupt("return",t.sent);case 8:case"end":return t.stop()}}),G0)}function j1(e,t,n,r,o){var i,a,c,s;return Zf().wrap((function(u){for(;;)switch(u.prev=u.next){case 0:return i=uh.Z.createSortingString(r),"client/searchfilters",a={name:e,query:n,entityName:t,order:i,filters:o},u.next=5,(0,Ff.RE)(uh.Z.requestSaga,"client/searchfilters",{method:"POST",body:a});case 5:return c=u.sent,s=c.body,u.abrupt("return",s);case 8:case"end":return u.stop()}}),Q0)}function T1(e){var t,n,r,o,i,a,c;return Zf().wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return t=e.payload.primaryKey,s.next=3,(0,Ff.Ys)(c1);case 3:return n=s.sent,r=n.actionAppComponent,o=n.navigationStrategy,s.next=8,(0,Ff.RE)(yh.CE);case 8:return i=s.sent,s.next=11,(0,Ff.gz)(m.Z.modal("filter-delete","client.actions.delete.title",null,(function(e){var n=e.close;return(0,S.jsx)(r,{appId:"delete",selection:{entityName:"Search_filter",ids:[t],type:"ID"},navigationStrategy:o,onSuccess:function(){i.put(!0),n()},onCancel:function(){i.put(!1),n()}})}),!0));case 11:return s.next=13,(0,Ff.qn)(i);case 13:if(!s.sent){s.next=23;break}return s.next=17,(0,Ff.Ys)(c1);case 17:return a=s.sent,c=a.entityName,s.next=21,(0,Ff.RE)(A1,c);case 21:return s.next=23,(0,Ff.RE)(k1);case 23:case"end":return s.stop()}}),X0)}function R1(){var e,t,n,r,o;return Zf().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,(0,Ff.Ys)(s1);case 2:return e=i.sent,t=e.searchFilters,n=e.formDefinition,r="".concat(n.modelName,".").concat(n.id,".searchfilter"),o=t.find((function(e){return e.active})).key,i.next=9,(0,Ff.RE)(uh.Z.savePreferences,L()({},r,o));case 9:return i.next=11,(0,Ff.gz)(m.Z.toaster({type:"success",title:"client.entity-list.search.settings.defaultFilter.save.success"}));case 11:case"end":return i.stop()}}),K0)}function I1(){var e,t;return Zf().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,Ff.Ys)(s1);case 2:return e=n.sent,t=e.formDefinition,n.next=6,(0,Ff.RE)(uh.Z.deleteUserPreferences,"".concat(t.modelName,".").concat(t.id,".searchfilter"));case 6:return n.next=8,(0,Ff.gz)(m.Z.toaster({type:"success",title:"client.entity-list.search.settings.defaultFilter.reset.success"}));case 8:case"end":return n.stop()}}),$0)}function M1(){var e,t,n,r,o;return Zf().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,(0,Ff.Ys)(s1);case 2:return e=i.sent,t=e.formDefinition,n=t.children.flatMap((function(e){return e.children})).map((function(e){return{id:e.id,label:e.label,hidden:!0===e.hidden}})),r=[].concat(z()(n.filter((function(e){return!e.hidden}))),z()(n.filter((function(e){return e.hidden})))),i.next=8,(0,Ff.RE)(yh.CE);case 8:return o=i.sent,i.next=11,(0,Ff.gz)(m.Z.modal("".concat(t.id,"-search-fields-selection"),"client.entity-list.search.settings.searchForm.edit",null,(function(e){var t=e.close;return(0,S.jsx)(v0,{initialColumns:r,onOk:function(e){t(),o.put(e)},dndEnabled:!0})}),!0));case 11:return i.next=13,(0,Ff.RE)(N1,t.modelName,o);case 13:return i.next=15,(0,Ff.RE)(E1,!0);case 15:return i.next=17,(0,Ff.RE)(k1);case 17:case"end":return i.stop()}}),J0)}function N1(e,t){var n,r,o;return Zf().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,(0,Ff.qn)(t);case 2:return n=i.sent,r="forms/".concat(e,"/search-fields"),o={method:"POST",body:{hiddenFields:n.filter((function(e){return e.hidden})).map((function(e){return e.id})),displayedFields:n.filter((function(e){return!e.hidden})).map((function(e){return e.id}))}},i.next=7,(0,Ff.RE)(uh.Z.requestSaga,r,o);case 7:case"end":return i.stop()}}),e1)}function B1(){var e,t,n,r;return Zf().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,(0,Ff.Ys)(s1);case 2:return e=o.sent,t=e.formDefinition,n="forms/".concat(t.modelName,"/search-fields/reset"),r={method:"POST"},o.next=8,(0,Ff.RE)(uh.Z.requestSaga,n,r);case 8:return o.next=10,(0,Ff.RE)(E1,!0);case 10:return o.next=12,(0,Ff.RE)(k1);case 12:case"end":return o.stop()}}),t1)}function Z1(){var e,t,n,r,o,i,a,c,s,u,l,d;return Zf().wrap((function(f){for(;;)switch(f.prev=f.next){case 0:return f.next=2,(0,Ff.RE)(Z2);case 2:return e=f.sent,t=e.where,n=e.filter,f.next=7,(0,Ff.Ys)(u1);case 7:return r=f.sent,o=r.sorting,i=o.map((function(e){var t=e.field,n=e.order;return"".concat(t," ").concat(n)})).join(", "),f.next=12,(0,Ff.Ys)(c1);case 12:return a=f.sent,c=a.entityName,s="client/query/".concat(c,"/build"),u={method:"POST",body:{condition:t,filters:n,sorting:i}},f.next=18,(0,Ff.RE)(uh.Z.requestSaga,s,u);case 18:return l=f.sent,d=l.body.query,f.next=22,(0,Ff.gz)(CF(d));case 22:return f.next=24,(0,Ff.RE)(L1);case 24:case"end":return f.stop()}}),n1)}function F1(){var e,t,n,r,o,i,a,c;return Zf().wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return s.next=2,(0,Ff.RE)(_1);case 2:return e=s.sent,s.next=5,(0,Ff.Ys)(s1);case 5:return t=s.sent,n=t.query,s.next=9,(0,Ff.Ys)(c1);case 9:return r=s.sent,o=r.entityName,i=y0(n),a=n.indexOf("order by"),c=a>=0?n.substring(0,a-1):n,s.next=16,(0,Ff.RE)(P1,e,o,c,i);case 16:return s.next=18,(0,Ff.gz)(OF(!1));case 18:case"end":return s.stop()}}),r1)}function L1(){var e,t,n,r,o,i,a,c,s,u;return Zf().wrap((function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,(0,Ff.Ys)(s1);case 2:return e=l.sent,t=e.query,l.next=6,(0,Ff.Ys)(c1);case 6:return n=l.sent,r=n.entityName,o="client/query/".concat(r,"/validation"),i={method:"POST",body:{condition:t}},l.next=12,(0,Ff.RE)(uh.Z.requestSaga,o,i);case 12:if(a=l.sent,c=a.body,s=c.valid,u=c.message,s){l.next=21;break}return l.next=19,(0,Ff.gz)(kF({error:[u]}));case 19:l.next=23;break;case 21:return l.next=23,(0,Ff.gz)(kF({}));case 23:case"end":return l.stop()}}),o1)}function H1(){var e,t,n,r;return Zf().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,(0,Ff.Ys)(s1);case 2:if(e=o.sent,t=e.query,(n=e.queryError)&&0!==Object.entries(n).length){o.next=13;break}if(!(t.indexOf("order by")>=0)){o.next=11;break}return r=y0(t),o.next=11,(0,Ff.gz)(EU(r));case 11:return o.next=13,(0,Ff.gz)(bF());case 13:case"end":return o.stop()}}),i1)}function U1(){return Zf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Ff.gz)(kU());case 2:case"end":return e.stop()}}),a1)}function z1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function W1(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?z1(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):z1(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var V1=Zf().mark(T2),Y1=Zf().mark(R2),q1=Zf().mark(I2),G1=Zf().mark(M2),Q1=Zf().mark(N2),X1=Zf().mark(B2),K1=Zf().mark(Z2),$1=Zf().mark(F2),J1=Zf().mark(L2),e2=Zf().mark(H2),t2=Zf().mark(U2),n2=Zf().mark(z2),r2=Zf().mark(W2),o2=Zf().mark(V2),i2=Zf().mark(q2),a2=Zf().mark(G2),c2=Zf().mark(Q2),s2=Zf().mark(X2),u2=Zf().mark(K2),l2=Zf().mark($2),d2=Zf().mark(J2),f2=Zf().mark(e3),p2=Zf().mark(t3),h2=Zf().mark(n3),m2=Zf().mark(r3),g2=Zf().mark(o3),v2=Zf().mark(a3),y2=Zf().mark(c3),b2=Zf().mark(s3),w2=Zf().mark(u3),A2=Zf().mark(l3),x2=Zf().mark(d3),E2=Zf().mark(f3),O2=Zf().mark(m3),C2=Zf().mark(g3),k2=function(e){return e},S2=function(e){return e.input},D2=function(e){return e.list},P2=function(e){return e.searchForm},_2=function(e){return e.selection},j2=function(e){return e.preferences};function T2(){return Zf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Ff.$6)([(0,Ff.Fm)(qH,R2),(0,Ff.Fm)(oU,H2),(0,Ff.Fm)(GZ,z2),(0,Ff.Fm)(GZ,I2),(0,Ff.Fm)(dU,z2),(0,Ff.Fm)(iU,U2),(0,Ff.Fm)(sU,d3),(0,Ff.Fm)(lU,f3),(0,Ff.Fm)(az,z2),(0,Ff.Fm)(cU,l3),(0,Ff.ib)(mh,m3),(0,Ff.Fm)(nF,a3),(0,Ff.Fm)(fU,a3),(0,Ff.Fm)(mU,X2),(0,Ff.Fm)(gU,K2)]);case 2:case"end":return e.stop()}}),V1)}function R2(){var e,t,n,r,o;return Zf().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,(0,Ff.Ys)(S2);case 2:return e=i.sent,t=e.entityName,n=e.formName,r=e.searchListFormName,o=e.scope,i.next=9,(0,Ff.$6)([(0,Ff.RE)(c3,n,o,AU),(0,Ff.RE)(u3,t),r?(0,Ff.RE)(c3,r,o,xU):void 0]);case 9:return i.next=11,(0,Ff.gz)({type:hU});case 11:case"end":return i.stop()}}),Y1)}function I2(){var e;return Zf().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,Ff.RE)(N2);case 2:return e=t.sent,t.next=5,(0,Ff.gz)(lz(e));case 5:return t.next=7,(0,Ff.gz)(h.Z.fireExternalEvent("onSearchChange",{query:e}));case 7:case"end":return t.stop()}}),q1)}function M2(e){return Zf().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,Ff.gz)(CU(!0));case 2:return t.next=4,(0,Ff.rM)(L2);case 4:return t.next=6,(0,Ff.gz)({type:nU});case 6:return t.next=8,(0,Ff.RE)(e3,e);case 8:return t.next=10,(0,Ff.gz)(CU(!1));case 10:case"end":return t.stop()}}),G1)}function N2(){var e,t,n,r,o,i=arguments;return Zf().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return e=!(i.length>0&&void 0!==i[0])||i[0],a.next=3,(0,Ff.Ys)(_2);case 3:if(t=a.sent,n=t.showSelectedRecords,r=t.selection,!e||!n){a.next=8;break}return a.abrupt("return",{keys:r});case 8:return a.next=10,(0,Ff.Ys)(P2);case 10:if(o=a.sent,!o.queryViewVisible){a.next=18;break}return a.next=15,(0,Ff.RE)(B2);case 15:case 20:return a.abrupt("return",a.sent);case 18:return a.next=20,(0,Ff.RE)(Z2);case 21:case"end":return a.stop()}}),Q1)}function B2(){var e,t,n,r,o,i,a,c,s,u;return Zf().wrap((function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,(0,Ff.Ys)(S2);case 2:return e=l.sent,t=e.keys,l.next=6,(0,Ff.Ys)(D2);case 6:return n=l.sent,r=n.constriction,l.next=10,(0,Ff.Ys)(P2);case 10:return o=l.sent,i=o.query,a=o.queryError,c=a&&0!==Object.entries(a).length,s=i.indexOf("order by"),u=s>=0?i.substring(0,s-1):i,l.abrupt("return",W1(W1(W1(W1({},!c&&{where:u}),r&&{constriction:r}),t?{keys:t}:{}),{},{hasUserChanges:!0}));case 17:case"end":return l.stop()}}),X1)}function Z2(){var e,t,n,r,o,i,a,c,s,u,l,d,f,p,h,m;return Zf().wrap((function(g){for(;;)switch(g.prev=g.next){case 0:return g.next=2,(0,Ff.Ys)(P2);case 2:return e=g.sent,t=e.formFieldsFlat,n=e.searchFilters,g.next=7,(0,Ff.Ys)(S2);case 7:return r=g.sent,o=r.searchFilters,i=r.tql,a=r.keys,c=r.constriction,g.next=14,(0,Ff.Ys)(D2);case 14:return s=g.sent,u=s.constriction,g.next=18,(0,Ff.RE)(S1);case 18:return l=g.sent,g.next=21,(0,Ff.RE)(r0,l,t);case 21:return d=g.sent,f=Rv()(d,["filters","tql"]),g.next=25,(0,Ff.RE)(W2,o,d.filters,n);case 25:return p=g.sent,g.next=28,(0,Ff.RE)(Y2,i,d.tql);case 28:return h=g.sent,m=Object.keys(f).length>0||!Dp()(o||[],p)||!!d.tql&&d.tql.length>0,g.abrupt("return",W1(W1(W1(W1(W1(W1({},f),p&&p.length>0?{filter:p}:{}),h?{where:h}:{}),c||u?{constriction:c||u}:{}),a?{keys:a}:{}),{},{hasUserChanges:m}));case 31:case"end":return g.stop()}}),K1)}function F2(e,t,n){var r,o,i,a;return Zf().wrap((function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,(0,Ff.Ys)(S2);case 2:return r=c.sent,o=r.parent,i=o?o.key:"",a=n&&t?t:e,c.abrupt("return",a?a.replace("{parentKey}",i):null);case 7:case"end":return c.stop()}}),$1)}function L2(){var e,t,n,r,o,i,a,c,s,u,l,d,f;return Zf().wrap((function(p){for(;;)switch(p.prev=p.next){case 0:return p.next=2,(0,Ff.Ys)(k2);case 2:return e=p.sent,t=e.input.entityName,n=e.selection,r=n.showSelectedRecords,o=n.selection,i=!r,p.next=8,(0,Ff.RE)(N2,i);case 8:return a=p.sent,c=Tz(e,a),s=Bz(c),u=Zz(c),p.next=14,(0,Ff.RE)(F2,s,u,a.hasUserChanges);case 14:return l=p.sent,d=W1({method:s?"GET":"POST"},l?{endpoint:l}:{}),p.next=18,(0,Ff.RE)(uh.Z.fetchEntityCount,t,a,d);case 18:if(f=p.sent,!r){p.next=24;break}return p.next=22,(0,Ff.gz)(wU(o.length));case 22:p.next=26;break;case 24:return p.next=26,(0,Ff.gz)(wU(f));case 26:return p.next=28,(0,Ff.gz)({type:oz,payload:{queryCount:f}});case 28:case"end":return p.stop()}}),J1)}function H2(e){var t,n;return Zf().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return t=e.payload,n=t.page,r.next=4,(0,Ff.gz)(CU(!0));case 4:return r.next=6,(0,Ff.gz)(OU(n));case 6:return r.next=8,(0,Ff.RE)(e3,n);case 8:return r.next=10,(0,Ff.gz)(CU(!1));case 10:case"end":return r.stop()}}),e2)}function U2(){var e,t;return Zf().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,Ff.Ys)(D2);case 2:return e=n.sent,t=e.currentPage,n.next=6,(0,Ff.RE)(M2,t);case 6:case"end":return n.stop()}}),t2)}function z2(){return Zf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Ff.gz)(OU(1));case 2:return e.next=4,(0,Ff.RE)(M2,1);case 4:case"end":return e.stop()}}),n2)}function W2(e,t){var n,r,o=arguments;return Zf().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return n=o.length>2&&void 0!==o[2]?o[2]:[],r=n&&n.filter((function(e){return e.active})).map((function(e){return e.uniqueId})),i.next=4,(0,Ff.RE)(IY(),e,t,r);case 4:return i.abrupt("return",i.sent);case 5:case"end":return i.stop()}}),r2)}function V2(){var e,t;return Zf().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,Ff.Ys)(P2);case 2:return e=n.sent,t=e.searchFilters,n.abrupt("return",t&&t.some((function(e){return e.active&&e.orderBy})));case 5:case"end":return n.stop()}}),o2)}var Y2=function(e,t){return[].concat(z()(e&&e.length>0?["(".concat(e,")")]:[]),z()(t&&t.length>0?["(".concat(t,")")]:[])).join(" and ")};function q2(e,t,n,r){var o,i,a;return Zf().wrap((function(c){for(;;)switch(c.prev=c.next){case 0:if(!(n&&n.length>0&&r.length>0)){c.next=8;break}return o=r.map((function(e){return e.__key})),i=r[0].__model,c.next=5,(0,Ff.RE)(uh.Z.fetchDisplayExpressions,e,t,o,n,i);case 5:return a=c.sent,c.next=8,(0,Ff.gz)(SU("displayExpressions",e,a));case 8:case"end":return c.stop()}}),i2)}function G2(e,t){var n,r,o,i;return Zf().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:if(!(e&&e.length>0)){a.next=13;break}return a.next=3,(0,Ff.Ys)(D2);case 3:return n=a.sent,r=n.lazyData,a.next=7,(0,Ff.RE)(Lm.getPathDisplayRequest,t,e,r);case 7:return o=a.sent,a.next=10,(0,Ff.RE)(uh.Z.fetchDisplays,o);case 10:return i=a.sent,a.next=13,(0,Ff.$6)(Object.keys(i).map((function(e){return(0,Ff.gz)(SU("defaultDisplays",e,i[e]))})));case 13:case"end":return a.stop()}}),a2)}function Q2(e){var t,n,r,o,i;return Zf().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,(0,Ff.Ys)(D2);case 2:if(t=a.sent,n=t.formDefinition,!((r=t.entityModel).markable&&n.markable&&e.length>0)){a.next=12;break}return o={type:"ID",entityName:r.name,ids:e.map((function(e){return e.__key}))},a.next=9,(0,Ff.RE)(uh.Z.fetchMarkings,o);case 9:return i=a.sent,a.next=12,(0,Ff.RE)($2,r.name,i);case 12:case"end":return a.stop()}}),c2)}function X2(e){var t,n,r,o;return Zf().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return t=e.payload,n=t.entityName,r=t.entityKey,o=t.marked,i.prev=1,i.next=4,(0,Ff.$6)([(0,Ff.RE)($2,n,L()({},r,o)),(0,Ff.RE)(uh.Z.setMarked,n,r,o)]);case 4:i.next=11;break;case 6:return i.prev=6,i.t0=i.catch(1),ol.Z.logError("Failed to set marked",i.t0),i.next=11,(0,Ff.RE)($2,n,L()({},r,!o));case 11:case"end":return i.stop()}}),s2,null,[[1,6]])}function K2(e){var t,n,r,o;return Zf().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return t=e.payload.selection,i.prev=1,i.next=4,(0,Ff.RE)(uh.Z.fetchMarkings,t);case 4:return n=i.sent,r=Object.values(n).includes(!1),i.next=8,(0,Ff.RE)(uh.Z.setSelectionMarked,t,r);case 8:return o=i.sent,i.next=11,(0,Ff.RE)($2,t.entityName,o);case 11:i.next=16;break;case 13:i.prev=13,i.t0=i.catch(1),ol.Z.logError("Failed to toggle markings",i.t0);case 16:case"end":return i.stop()}}),u2,null,[[1,13]])}function $2(e,t){var n,r,o,i;return Zf().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,(0,Ff.Ys)(D2);case 2:return n=a.sent,r=n.lazyData,o=r.markings&&r.markings[e]?r.markings[e]:{},i=W1(W1({},o),t),a.next=8,(0,Ff.gz)(SU("markings",e,i));case 8:case"end":return a.stop()}}),l2)}function J2(e){var t,n,r,o,i,a,c,s,u,l,d,f,p,h,m,g,v,y,b,w,A,x,E;return Zf().wrap((function(O){for(;;)switch(O.prev=O.next){case 0:return O.next=2,(0,Ff.Ys)(k2);case 2:if(t=O.sent,n=t.input,r=n.entityName,o=n.scope,i=n.limit,a=t.preferences.columns,c=t.list,s=c.entityStore,u=c.sorting,s[e]){O.next=36;break}return O.next=9,(0,Ff.RE)(N2);case 9:return l=O.sent,d=Tz(t,l),O.next=13,(0,Ff.RE)(Gz,d,a);case 13:return f=O.sent,p=f.paths,h=f.relationFields,m=f.displayExpressionFields,g=W1(W1({},l),{},{page:e,sorting:u,limit:i,paths:p}),v=Bz(d),y=Zz(d),C=d.id,k=void 0,k=C.lastIndexOf("_"),b={formName:C.substring(0,k),scope:C.substring(k+1)},w=b.formName,O.next=23,(0,Ff.RE)(F2,v,y,l.hasUserChanges);case 23:return A=O.sent,x=W1({method:v?"GET":"POST"},A?{endpoint:A}:{}),O.next=27,(0,Ff.RE)(uh.Z.fetchEntities,r,g,x,MY);case 27:return E=O.sent,O.next=30,(0,Ff.gz)(bU(e,E));case 30:return O.next=32,(0,Ff.Cs)(G2,h,E);case 32:return O.next=34,(0,Ff.Cs)(q2,w,o,m,E);case 34:return O.next=36,(0,Ff.Cs)(Q2,E);case 36:case"end":return O.stop()}var C,k}),d2)}function e3(e){var t;return Zf().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,Ff.Ys)(D2);case 2:if(t=n.sent,t.entityStore[e]){n.next=7;break}return n.next=7,(0,Ff.RE)(J2,e);case 7:return n.next=9,(0,Ff.RE)(r3,e);case 9:return n.next=11,(0,Ff.Cs)(t3,e);case 11:case"end":return n.stop()}}),f2)}function t3(e){return Zf().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,Ff.gw)(2e3);case 2:return t.next=4,(0,Ff.RE)(n3,e);case 4:case"end":return t.stop()}}),p2)}function n3(e){var t,n,r,o,i,a,c;return Zf().wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return s.next=2,(0,Ff.Ys)(S2);case 2:return t=s.sent,n=t.limit,s.next=6,(0,Ff.Ys)(D2);case 6:if(r=s.sent,o=r.entityStore,i=r.entityCount,a=e+1,null!=i){s.next=15;break}return s.next=13,(0,Ff.qn)(eU);case 13:c=s.sent,i=c.payload.entityCount;case 15:if(!(e*n<i)||o[a]){s.next=18;break}return s.next=18,(0,Ff.RE)(J2,a);case 18:case"end":return s.stop()}}),h2)}function r3(e){var t,n;return Zf().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,(0,Ff.Ys)(D2);case 2:return t=r.sent,n=t.entityStore[e],r.next=6,(0,Ff.gz)(yU(n));case 6:case"end":return r.stop()}}),m2)}function o3(){var e,t,n;return Zf().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,(0,Ff.Ys)(j2);case 2:if((e=r.sent).sorting){r.next=11;break}return r.next=6,(0,Ff.qn)(RZ);case 6:return t=r.sent,n=t.payload,r.abrupt("return",n.sorting);case 11:return r.abrupt("return",e.sorting);case 12:case"end":return r.stop()}}),g2)}var i3="update_timestamp";function a3(){var e,t,n,r,o,i,a,c;return Zf().wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return s.next=2,(0,Ff.Ys)(D2);case 2:return e=s.sent,t=e.formDefinition,n=e.entityModel,s.next=7,(0,Ff.Ys)(S2);case 7:return r=s.sent,o=r.sorting,s.next=11,(0,Ff.RE)(Iz,t);case 11:return i=s.sent,s.next=14,(0,Ff.RE)(o3);case 14:return a=s.sent,s.next=17,(0,Ff.RE)(V2);case 17:if(c=s.sent,!(a&&a.length>0)){s.next=23;break}return s.next=21,(0,Ff.gz)(EU(a));case 21:case 26:case 31:case 36:s.next=40;break;case 23:if(!(o&&o.length>0)){s.next=28;break}return s.next=26,(0,Ff.gz)(EU(o));case 28:if(!(i&&i.length>0)){s.next=33;break}return s.next=31,(0,Ff.gz)(EU(i));case 33:if(c||!n.paths.update_timestamp){s.next=38;break}return s.next=36,(0,Ff.gz)(EU([{field:i3,order:"desc"}]));case 38:return s.next=40,(0,Ff.gz)(EU([]));case 40:case"end":return s.stop()}}),v2)}function c3(e,t,n){var r,o,i,a,c,s,u,l,d,f,p;return Zf().wrap((function(h){for(;;)switch(h.prev=h.next){case 0:return h.next=2,(0,Ff.Ys)(D2);case 2:if(r=h.sent,(null==(o=r.formDefinition)?void 0:o.id)==="".concat(e,"_").concat(t)){h.next=32;break}return h.next=7,(0,Ff.Ys)(S2);case 7:return i=h.sent,a=i.modifyFormDefinition,c=i.reportIds,s=i.parent,h.next=13,(0,Ff.RE)(uh.Z.fetchForm,e,t);case 13:if(u=h.sent,!a){h.next=20;break}return h.next=17,(0,Ff.RE)(a,u,{parent:s});case 17:h.t0=h.sent,h.next=21;break;case 20:h.t0=u;case 21:return l=h.t0,d=Fz(l),h.next=25,(0,Ff.gz)(_U(d));case 25:return h.next=27,(0,Ff.RE)(s3,c,l);case 27:return f=h.sent,h.next=30,(0,Ff.gz)(n(f));case 30:h.next=35;break;case 32:return p=Fz(o),h.next=35,(0,Ff.gz)(_U(p));case 35:case"end":return h.stop()}}),y2)}function s3(e,t){var n,r;return Zf().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:if(!((null==e?void 0:e.length)>0)){o.next=12;break}return o.next=3,(0,Ff.gz)(HN(e,t.modelName,"list"));case 3:return o.next=5,(0,Ff.qn)(UN);case 5:return n=o.sent,r=n.payload,o.next=9,(0,Ff.RE)(YI.addReports,t,r.reports);case 9:return o.abrupt("return",o.sent);case 12:return o.abrupt("return",t);case 13:case"end":return o.stop()}}),b2)}function u3(e){var t;return Zf().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,Ff.RE)(uh.Z.fetchModel,e);case 2:return t=n.sent,n.next=5,(0,Ff.gz)({type:KH,payload:{entityModel:t}});case 5:case"end":return n.stop()}}),w2)}function l3(e){var t,n,r,o;return Zf().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return t=e.payload,i.next=3,(0,Ff.Ys)(S2);case 3:if(n=i.sent,!0!==n.selectOnRowClick){i.next=12;break}return i.next=8,(0,Ff.Ys)(_2);case 8:return r=i.sent,o=r.selection.includes(t.id),i.next=12,(0,Ff.gz)(sz([t.id],!o));case 12:return i.next=14,(0,Ff.gz)(h.Z.fireExternalEvent("onRowClick",{id:t.id}));case 14:case"end":return i.stop()}}),A2)}function d3(e){var t,n,r;return Zf().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return t=e.payload,o.next=3,(0,Ff.Ys)(S2);case 3:return n=o.sent,r=n.navigationStrategy,o.next=7,(0,Ff.RE)(r.navigateToCreateRelative,t.relationName);case 7:case"end":return o.stop()}}),x2)}function f3(e){var t,n,r,o,i;return Zf().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return t=e.payload,n=t.definition,r=t.selection,a.next=4,(0,Ff.Ys)(S2);case 4:return o=a.sent,i=o.navigationStrategy,a.next=8,(0,Ff.RE)(i.navigateToActionRelative,n,r);case 8:case"end":return a.stop()}}),E2)}var p3,h3=function(e,t){return!!e.payload.entities.find((function(e){return e.entityName===t}))};function m3(e){var t,n,r,o,i;return Zf().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return t=e.payload.event,a.next=3,(0,Ff.Ys)(D2);case 3:if(n=a.sent,r=n.entityModel,!["entity-create-event","entity-delete-event","entity-update-event"].includes(t.type)){a.next=9;break}if(!h3(t,r.name)){a.next=9;break}return a.next=9,(0,Ff.RE)(z2);case 9:if("action-trigger-event"!==t.type){a.next=12;break}return a.next=12,(0,Ff.gz)((o=t.payload).func.apply(o,z()(t.payload.args)));case 12:if("entity-delete-event"!==t.type){a.next=16;break}return i=t.payload.entities.filter((function(e){return e.entityName===r.name})).map((function(e){return e.key})),a.next=16,(0,Ff.gz)(sz(i,!1));case 16:return a.next=18,(0,Ff.gz)(d.Z.emitAction(e));case 18:case"end":return a.stop()}}),O2)}function g3(e){var t,n,r,o,i,a,c,s,u,l;return Zf().wrap((function(d){for(;;)switch(d.prev=d.next){case 0:if("QUERY"!==(t=e.selection).type){d.next=19;break}return d.next=4,(0,Ff.Ys)(k2);case 4:if(n=d.sent,r=Tz(n,t.query),!(o=Bz(r))){d.next=19;break}return i=Zz(r),d.next=11,(0,Ff.RE)(F2,o,i,t.query.hasUserChanges);case 11:return a=d.sent,c={method:"GET",endpoint:a,allKeys:!0},s=n.input.entityName,d.next=16,(0,Ff.RE)(uh.Z.fetchEntities,s,t.query,c,NY);case 16:return u=d.sent,l={type:"ID",entityName:s,ids:u},d.abrupt("return",{selection:l,abort:!1});case 19:return d.abrupt("return",{abort:!1});case 20:case"end":return d.stop()}}),C2)}function v3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function y3(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?v3(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v3(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var b3=function(e,t){var n=t.payload.searchFormType,r=Object.values(PW).find((function(e){return e===n}))||PW.SIMPLE_ADVANCED;return y3(y3({},e),{},{searchFormType:r})},w3=(p3={},L()(p3,xZ,jf.Z.singleTransferReducer("initialized")),L()(p3,EZ,b3),L()(p3,OZ,b3),L()(p3,SZ,jf.Z.singleTransferReducer("searchFormCollapsed")),L()(p3,DZ,jf.Z.singleTransferReducer("searchFormCollapsed")),p3),A3={initialized:!1,searchFormType:PW.SIMPLE_ADVANCED,searchFormCollapsed:!1};const x3=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:A3,t=arguments.length>1?arguments[1]:void 0,n=w3[t.type];return n?n(e,t):e};var E3,O3=Zf().mark(P3),C3=Zf().mark(_3),k3=Zf().mark(j3),S3=Zf().mark(T3),D3=Zf().mark(R3);function P3(){return Zf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Ff.$6)([(0,Ff.RE)(j3),(0,Ff.Fm)(s.Z.INPUT_CHANGED,_3),(0,Ff.Fm)(kZ,T3),(0,Ff.Fm)(CZ,j3,!1),(0,Ff.Fm)(SZ,R3)]);case 2:case"end":return e.stop()}}),O3)}function _3(e){var t,n,r,o,i;return Zf().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:if(t=e.payload,n=t.input,r=t.prevInput,o=jY(n),!(n.store&&void 0!==r.store||void 0===n.store&&void 0!==r.store)){a.next=5;break}return a.abrupt("return");case 5:return i=SY(n),a.next=8,(0,Ff.$6)(i.map((function(e){return(0,Ff.gz)(e)})));case 8:if(o!==DY){a.next=13;break}return a.next=11,(0,Ff.gz)({type:CZ});case 11:a.next=16;break;case 13:if(o!==PY){a.next=16;break}return a.next=16,(0,Ff.gz)({type:kZ});case 16:case"end":return a.stop()}}),C3)}function j3(){var e=arguments;return Zf().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(!(e.length>0&&void 0!==e[0])||e[0])){t.next=4;break}return t.next=4,(0,Ff.qn)(s.Z.INPUT_INITIALIZED);case 4:return t.next=6,(0,Ff.gz)(vU());case 6:return t.next=8,(0,Ff.qn)(hU);case 8:return t.next=10,(0,Ff.gz)(vF());case 10:return t.next=12,(0,Ff.qn)(VZ);case 12:return t.next=14,(0,Ff.gz)(HZ());case 14:return t.next=16,(0,Ff.qn)(LZ);case 16:return t.next=18,(0,Ff.gz)(PU());case 18:return t.next=20,(0,Ff.qn)($H);case 20:return t.next=22,(0,Ff.gz)(bF());case 22:case"end":return t.stop()}}),k3)}function T3(){return Zf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Ff.gz)(vF());case 2:return e.next=4,(0,Ff.$6)([(0,Ff.qn)(VZ)]);case 4:return e.next=6,(0,Ff.gz)(bF());case 6:case"end":return e.stop()}}),S3)}function R3(e){var t;return Zf().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return t=e.payload.searchFormCollapsed,n.next=3,(0,Ff.gz)(h.Z.fireExternalEvent("onSearchFormCollapsedChange",{collapsed:t}));case 3:case"end":return n.stop()}}),D3)}function I3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function M3(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?I3(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):I3(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var N3=function(e){return"asc"===e?"desc":"asc"},B3=(E3={},L()(E3,GH,jf.Z.singleTransferReducer("entities")),L()(E3,QH,jf.Z.singleTransferReducer("formDefinition")),L()(E3,XH,jf.Z.singleTransferReducer("searchListFormDefinition")),L()(E3,KH,jf.Z.singleTransferReducer("entityModel")),L()(E3,JH,jf.Z.singleTransferReducer("currentPage")),L()(E3,$H,jf.Z.singleTransferReducer("sorting")),L()(E3,dU,(function(e,t){var n=t.payload,r=n.field;if(n.add){var o=e.sorting.filter((function(e){return e.field===r})),i=o.length>0?N3(o[0].order):"asc";return M3(M3({},e),{},{sorting:[].concat(z()(e.sorting.filter((function(e){return e.field!==r}))),[{field:r,order:i}])})}var a=e.sorting,c=a.length>0&&a[0].field===r?N3(a[0].order):"asc";return M3(M3({},e),{},{sorting:[{field:r,order:c}]})})),L()(E3,eU,jf.Z.singleTransferReducer("entityCount")),L()(E3,tU,(function(e,t){var n=t.payload;return M3(M3({},e),{},{entityStore:M3(M3({},e.entityStore),{},L()({},n.page,n.entities))})})),L()(E3,uU,(function(e,t){var n=t.payload,r=n.type,o=n.id,i=n.values;return M3(M3({},e),{},{lazyData:M3(M3({},e.lazyData),{},L()({},r,M3(M3({},e.lazyData[r]),{},L()({},o,M3(M3({},nf()(e,["lazyData",r,o],{})),i)))))})})),L()(E3,nU,(function(e){return M3(M3({},e),{},{entityStore:{}})})),L()(E3,rU,jf.Z.singleTransferReducer("inProgress")),L()(E3,aU,jf.Z.singleTransferReducer("searchFilters")),L()(E3,pU,jf.Z.singleTransferReducer("constriction")),E3),Z3={entityModel:{},entities:[],currentPage:1,sorting:[],formDefinition:null,searchListFormDefinition:null,entityCount:null,entityStore:{},inProgress:!0,searchFilters:[],createPermission:!1,lazyData:{}};const F3=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Z3,t=arguments.length>1?arguments[1]:void 0,n=B3[t.type];return n?n(e,t):e};var L3;function H3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function U3(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?H3(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):H3(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var z3=(L3={},L()(L3,jZ,jf.Z.singleTransferReducer("positions")),L()(L3,RZ,jf.Z.singleTransferReducer("sorting")),L()(L3,IZ,jf.Z.singleTransferReducer("columns")),L()(L3,MZ,(function(e,t){var n=t.payload,r=n.field,o=n.width;return U3(U3({},e),{},{widths:U3(U3({},e.widths),{},L()({},r,o))})})),L()(L3,LZ,jf.Z.singleTransferReducer("preferencesLoaded")),L()(L3,NZ,(function(e){return U3(U3({},e),{},{sorting:[]})})),L()(L3,BZ,(function(e){return U3(U3({},e),{},{positions:{},columns:{}})})),L()(L3,ZZ,(function(e){return U3(U3({},e),{},{positions:{},sorting:[],columns:{}})})),L3),W3={positions:{},sorting:[],columns:{},widths:{},preferencesLoaded:!1};const V3=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:W3,t=arguments.length>1?arguments[1]:void 0,n=z3[t.type];return n?n(e,t):e};function Y3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function q3(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Y3(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Y3(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var G3=function(e){return Object.keys(e).filter((function(e){return e.endsWith(".position")})).reduce((function(t,n){var r=n.match(/.*\.([^.]+)\.position$/);return q3(q3({},t),{},L()({},r[1],Number(e[n])))}),{})},Q3=function(e){return e.filter((function(e){return!e.fixedPosition})).reduce((function(e,t,n){return q3(q3({},e),{},L()({},t.id,n))}),{})},X3=function(e,t,n){return Object.keys(e).sort((function(t,n){return e[t]-e[n]})).filter((function(e){return e!==t})).reduce((function(e,r){return[].concat(z()(e),[r],z()(r===n?[t]:[]))}),[]).reduce((function(e,t,n){return q3(q3({},e),{},L()({},t,n))}),{})},K3=function(e,t){return Object.keys(t).reduce((function(n,r){return q3(q3({},n),{},L()({},"".concat(e,".").concat(r,".position"),t[r].toString()))}),{})},$3=function(e){var t=/^.*\.sorting(Field|Direction)\.?([1-9]*)$/;return Object.entries(e).filter((function(e){var n=T()(e,1)[0];return t.test(n)})).map((function(e){var n=T()(e,2),r=n[0],o=n[1];return[J3(r.match(t)),o]})).reduce((function(e,t){var n=T()(t,2),r=n[0],o=n[1];return e[r.index]=q3(q3({},e[r.index]),{},L()({},r.field,o)),e}),[])},J3=function(e){return{field:e5(e[1]),index:e[2]?parseInt(e[2]):0}},e5=function(e){return"Direction"===e?"order":e.toLowerCase()},t5=function(e,t){var n;return n={},L()(n,"".concat(e,".sortingField"),t.field),L()(n,"".concat(e,".sortingDirection"),t.order),n},n5=function(e,t,n){var r;return r={},L()(r,"".concat(e,".sortingField.").concat(n),t.field),L()(r,"".concat(e,".sortingDirection.").concat(n),t.order),r},r5=function(e){var t=/^[^.]+\.(.+)\.hidden$/;return Object.entries(e).filter((function(e){var n=T()(e,1)[0];return t.test(n)})).reduce((function(e,n){var r=T()(n,2),o=r[0],i=r[1],a=o.match(t)[1];return q3(q3({},e),{},L()({},a,"false"===i))}),{})},o5=function(e,t){return Object.keys(t).reduce((function(n,r){return q3(q3({},n),{},L()({},"".concat(e,".").concat(r,".hidden"),(!t[r]).toString()))}),{})};function i5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function a5(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i5(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i5(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var c5,s5=Zf().mark(b5),u5=Zf().mark(w5),l5=Zf().mark(A5),d5=Zf().mark(x5),f5=Zf().mark(E5),p5=Zf().mark(O5),h5=Zf().mark(C5),m5=Zf().mark(k5),g5=Zf().mark(S5),v5=function(e){return e.input},y5=function(e){return e.preferences};function b5(){return Zf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Ff.$6)([(0,Ff.Fm)(_Z,w5),(0,Ff.Fm)(TZ,A5),(0,Ff.Fm)(dU,x5),(0,Ff.Fm)(NZ,E5),(0,Ff.Fm)(BZ,S5),(0,Ff.Fm)(ZZ,O5),(0,Ff.Fm)(FZ,C5)]);case 2:case"end":return e.stop()}}),s5)}function w5(){var e,t,n;return Zf().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,(0,Ff.Ys)(v5);case 2:return e=r.sent,t="".concat(e.formName,"_").concat(e.scope),r.next=6,(0,Ff.RE)(uh.Z.fetchUserPreferences,"".concat(t,"*"));case 6:return n=r.sent,r.next=9,(0,Ff.gz)(UZ(G3(n)));case 9:return r.next=11,(0,Ff.gz)((o=$3(n),{type:RZ,payload:{sorting:o}}));case 11:return r.next=13,(0,Ff.gz)(zZ(r5(n)));case 13:return r.next=15,(0,Ff.gz)({type:LZ,payload:{preferencesLoaded:!0}});case 15:case"end":return r.stop()}var o}),u5)}function A5(e){var t,n,r,o,i,a,c,s,u,l;return Zf().wrap((function(d){for(;;)switch(d.prev=d.next){case 0:return t=e.payload,n=t.field,r=t.afterFieldPosition,o=t.columns,d.next=4,(0,Ff.Ys)(y5);case 4:if(i=d.sent,a=i.positions,0!==Object.keys(a).length){d.next=10;break}return d.next=9,(0,Ff.RE)(Q3,o);case 9:a=d.sent;case 10:return d.next=12,(0,Ff.RE)(X3,a,n,r);case 12:return c=d.sent,d.next=15,(0,Ff.gz)(UZ(c));case 15:return d.next=17,(0,Ff.Ys)(v5);case 17:return s=d.sent,u="".concat(s.formName,"_").concat(s.scope),d.next=21,(0,Ff.RE)(uh.Z.deleteUserPreferences,"".concat(u,".*.positions"));case 21:return d.next=23,(0,Ff.RE)(K3,u,c);case 23:return l=d.sent,d.next=26,(0,Ff.RE)(uh.Z.savePreferences,l);case 26:case"end":return d.stop()}}),l5)}function x5(){var e,t,n,r,o;return Zf().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,(0,Ff.Ys)(D2);case 2:if(e=i.sent,!((t=e.sorting).length>0)){i.next=14;break}return i.next=7,(0,Ff.Ys)(v5);case 7:return n=i.sent,r="".concat(n.formName,"_").concat(n.scope),i.next=11,(0,Ff.$6)([(0,Ff.RE)(uh.Z.deleteUserPreferences,"".concat(r,".sortingField*")),(0,Ff.RE)(uh.Z.deleteUserPreferences,"".concat(r,".sortingDirection*"))]);case 11:return o=t.slice(1).map((function(e,t){return n5(r,e,t+1)})).reduce((function(e,t){return a5(a5({},e),t)}),t5(r,t[0])),i.next=14,(0,Ff.RE)(uh.Z.savePreferences,o);case 14:case"end":return i.stop()}}),d5)}function E5(){var e;return Zf().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,Ff.Ys)(v5);case 2:return e=t.sent,t.next=5,(0,Ff.$6)([(0,Ff.RE)(uh.Z.deleteUserPreferences,"".concat(e.formName,"_").concat(e.scope,".sortingField*")),(0,Ff.RE)(uh.Z.deleteUserPreferences,"".concat(e.formName,"_").concat(e.scope,".sortingDirection*"))]);case 5:return t.next=7,(0,Ff.RE)(a3);case 7:return t.next=9,(0,Ff.RE)(z2);case 9:case"end":return t.stop()}}),f5)}function O5(){var e;return Zf().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,Ff.Ys)(v5);case 2:return e=t.sent,t.next=5,(0,Ff.RE)(uh.Z.deleteUserPreferences,"".concat(e.formName,"_").concat(e.scope,".*"));case 5:return t.next=7,(0,Ff.RE)(a3);case 7:return t.next=9,(0,Ff.RE)(z2);case 9:case"end":return t.stop()}}),p5)}function C5(){var e,t,n,r,o,i,a,c;return Zf().wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return s.next=2,(0,Ff.Ys)(D2);case 2:return e=s.sent,t=e.formDefinition,s.next=6,(0,Ff.Ys)(y5);case 6:return n=s.sent,r=n.columns,s.next=10,(0,Ff.Ys)(v5);case 10:return o=s.sent,i=o.parent,a=$z(t,i,r),s.next=15,(0,Ff.RE)(yh.CE);case 15:return c=s.sent,s.next=18,(0,Ff.gz)(m.Z.modal("".concat(t.id,"-column-selection"),"client.entity-list.preferences.columns",null,(function(e){var t=e.close;return(0,S.jsx)(v0,{initialColumns:a,onOk:function(e){t(),c.put(e)},dndEnabled:!1})}),!0));case 18:return s.next=20,k5(c,r,t);case 20:case"end":return s.stop()}}),h5)}function k5(e,t,n){var r,o,i;return Zf().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,(0,Ff.qn)(e);case 2:return r=a.sent.reduce((function(e,t){return a5(a5({},e),{},L()({},t.id,!t.hidden))}),{}),o=Object.keys(r).reduce((function(e,n){return a5(a5({},e),r[n]!==t[n]?L()({},n,r[n]):{})}),{}),a.next=6,(0,Ff.gz)(zZ(r));case 6:if(!Object.entries(o).some((function(e){return T()(e,2)[1]}))){a.next=9;break}return a.next=9,(0,Ff.gz)(kU());case 9:return a.next=11,(0,Ff.RE)(o5,n.id,o);case 11:return i=a.sent,a.next=14,(0,Ff.RE)(uh.Z.savePreferences,i);case 14:case"end":return a.stop()}}),m5)}function S5(){var e;return Zf().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,Ff.Ys)(v5);case 2:return e=t.sent,t.next=5,(0,Ff.$6)([(0,Ff.RE)(uh.Z.deleteUserPreferences,"".concat(e.formName,"_").concat(e.scope,".*.position")),(0,Ff.RE)(uh.Z.deleteUserPreferences,"".concat(e.formName,"_").concat(e.scope,".*.hidden"))]);case 5:return t.next=7,(0,Ff.gz)(kU());case 7:case"end":return t.stop()}}),g5)}function D5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function P5(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?D5(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):D5(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var _5=(c5={},L()(c5,VZ,jf.Z.singleTransferReducer("initialized")),L()(c5,KZ,(function(e,t){var n=t.payload,r=n.simpleSearchFields.split(",").filter((function(e){return e})).map((function(e){return e.trim()}));return r.length>0?P5(P5({},e),{},{simpleSearchFields:r}):e})),L()(c5,qZ,jf.Z.singleTransferReducer("formDefinition")),L()(c5,XZ,jf.Z.singleTransferReducer("showExtendedSearchForm")),L()(c5,JZ,jf.Z.singleTransferReducer("valuesInitialized")),L()(c5,eF,jf.Z.singleTransferReducer("formFieldsFlat")),L()(c5,tF,jf.Z.singleTransferReducer("searchFilters")),L()(c5,nF,(function(e,t){var n=t.payload,r=n.searchFilterId,o=n.active,i=n.exclusive;return P5(P5({},e),{},{searchFilters:z()(e.searchFilters.map((function(e){var t=r===e.uniqueId;return P5(P5(P5({},e),t?{active:o}:{}),!t&&i?{active:!o}:{})})))})})),L()(c5,dF,jf.Z.singleTransferReducer("queryViewVisible")),L()(c5,fF,jf.Z.singleTransferReducer("query")),L()(c5,mF,(function(e){return P5(P5({},e),{},{query:""})})),L()(c5,pF,jf.Z.singleTransferReducer("queryError")),c5),j5={initialized:!1,formDefinition:{},showExtendedSearchForm:!1,simpleSearchFields:[],valuesInitialized:!1,searchFilters:null,queryViewVisible:!1,query:"",queryError:{}};const T5=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:j5,t=arguments.length>1?arguments[1]:void 0,n=_5[t.type];return n?n(e,t):e};var R5;function I5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function M5(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?I5(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):I5(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var N5=function(e,t){return e-t},B5=(R5={},L()(R5,iz,jf.Z.toggleReducer("showSelectedRecords")),L()(R5,tz,(function(e,t){var n=t.payload;return M5(M5({},e),{},{selection:wb()(n.selection).sort(N5)})})),L()(R5,nz,(function(e,t){t.payload;return M5(M5({},e),{},{selection:[],showSelectedRecords:!1})})),L()(R5,rz,jf.Z.singleTransferReducer("query")),L()(R5,oz,jf.Z.singleTransferReducer("queryCount")),R5),Z5={showSelectedRecords:!1,selection:[],query:{},queryCount:0};const F5=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Z5,t=arguments.length>1?arguments[1]:void 0,n=B5[t.type];return n?n(e,t):e};var L5=Zf().mark(q5),H5=Zf().mark(G5),U5=Zf().mark(Q5),z5=Zf().mark(X5),W5=Zf().mark(K5),V5=function(e){return e.input},Y5=function(e){return e.selection};function q5(){return Zf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Ff.$6)([(0,Ff.Fm)(iz,K5),(0,Ff.Fm)(ez,G5),(0,Ff.Fm)(nz,X5),(0,Ff.Fm)(my.actions.ACTION_INVOKED,Q5)]);case 2:case"end":return e.stop()}}),L5)}function G5(e){var t,n,r,o,i,a,c;return Zf().wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return t=e.payload,n=t.keys,r=t.isSelected,s.next=3,(0,Ff.Ys)(Y5);case 3:return o=s.sent,i=o.selection,s.next=7,(0,Ff.Ys)(V5);case 7:if(a=s.sent,a.selectionStyle!==Jz.SINGLE){s.next=13;break}s.t0=n,s.next=16;break;case 13:return s.next=15,(0,Ff.RE)(rW,i,n,r);case 15:s.t0=s.sent;case 16:return c=s.t0,s.next=19,(0,Ff.gz)(cz(c));case 19:return s.next=21,(0,Ff.gz)(h.Z.fireExternalEvent("onSelectChange",c));case 21:case"end":return s.stop()}}),H5)}function Q5(e){return Zf().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e.payload.response.clearSelection){t.next=4;break}return t.next=4,(0,Ff.gz)(uz());case 4:case"end":return t.stop()}}),U5)}function X5(){return Zf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Ff.gz)(h.Z.fireExternalEvent("onSelectChange",[]));case 2:case"end":return e.stop()}}),z5)}function K5(){return Zf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Ff.gz)({type:az});case 2:case"end":return e.stop()}}),W5)}const $5={entityList:x3,list:F3,searchForm:T5,form:VB,selection:F5,preferences:V3};var J5,e4=[P3,T2,h1,q5,b5];function t4(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function n4(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?t4(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):t4(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var r4="entity-list",o4=["onRowClick","emitAction","onSelectChange","onStoreCreate","onSearchChange","onSearchFormCollapsedChange"],i4=function(e,t,n,r){var o=J5||(J5=(0,S.jsx)(kY,{})),i=t.store,a=n4(n4({},function(e){return{new:Zf().mark((function t(){return Zf().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,Ff.gz)((n=e.parent&&e.parent.relationName,{type:sU,payload:{relationName:n}}));case 2:case"end":return t.stop()}var n}),t)})),fullscreen:Zf().mark((function e(t,n){return Zf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Ff.gz)(DU(t,n));case 2:case"end":return e.stop()}}),e)})),mark:Zf().mark((function e(t,n){return Zf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Ff.gz)(jU(n));case 2:case"end":return e.stop()}}),e)}))}}(t)),t.customActions||{});return i?i.dispatch(kU()):(i=s.Z.createStore($5,e4,n4(n4({},{limit:10,scope:"list",showLink:!1,sortable:!0,lazyData:{},tql:null,keys:null,searchFilters:null,constriction:null,entityName:"",formName:"",searchFormPosition:"top",parent:null,searchFormCollapsed:!1,scrollBehaviour:"inline"}),t),r4),h.Z.addToStore(i,(function(e){return s.Z.getEvents(o4,e.input)})),d.Z.addToStore(i,(function(e){return e.input.emitAction})),p.Z.addToStore(i,!1),m.Z.addToStore(i,!1),LN(i),my.addToStore(i,(function(e){return{formApp:AZ,listApp:a4,customActions:a,appComponent:e.input.actionAppComponent,navigationStrategy:e.input.navigationStrategy,context:n4({viewName:"list",formName:e.input.formName},e.input.contextParams||{}),customPreparationHandlers:[g3]}})),yN.addToStore(i,(function(e){return{listApp:a4,navigationStrategy:e.input.navigationStrategy}})),i.dispatch(h.Z.fireExternalEvent("onStoreCreate",i))),s.Z.createApp(r4,o,i,{input:t,events:n,actions:SY(t),publicPath:r,textResourceModules:["actiongroup","component","common"]})};s.Z.registerAppInRegistry(r4,i4);var a4=function(e){var t=(0,R.useReducer)((function(e){return e+1}),0),n=T()(t,2),r=n[0],o=n[1],i=s.Z.useApp({initApp:i4,props:e,packageName:e.id,externalEvents:o4}),a=i.component,c=i.setApp,u=H.Z.usePrevious(e);return H.Z.useDidUpdate((function(){(_p()(e,(function(e,t){return!Dp()(e,u[t])})).store&&void 0!==u.store||void 0===e.store&&void 0!==u.store)&&(c(i4(e.id,e,s.Z.getEvents(o4,e))),o())}),[e]),(0,S.jsx)(I().Fragment,{children:a},r)};const c4=a4;function s4(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u4(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s4(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s4(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var l4=function(e){var t=e.color,n=e.label;return(0,S.jsxs)(Zd.ZP.Span,{children:[(0,S.jsx)(B.Z,{icon:t?"square-full":"square","aria-hidden":"true",style:u4({},t?{color:t}:{}),position:zP.Z.position.PREPEND})," ",n]})},d4=function(e){var t=e.updateRequestedCalendars,n=e.locale,r=e.requestedCalendars,o=e.calendarTypes,i=e.emitAction,a=e.initialCalendarType,c=function(e){return function(n){t(e,n)}},s=a?o.findIndex((function(e){return e.name===a})):-1;return(0,S.jsx)(jE.Group,{initialOpenPanelIndex:s,children:o.map((function(e){return(0,S.jsxs)(jE.Wrapper,{children:[(0,S.jsx)(jE.Header,{children:(0,S.jsx)(l4,{color:e.color,label:e.label})}),(0,S.jsx)(jE.Body,{children:(0,S.jsx)(c4,{emitAction:i,locale:n,id:"search-panel-".concat(e.name),entityName:e.targetEntity,formName:e.formBase,limit:15,selectable:!0,selection:r&&r[e.name]||[],onSelectChange:c(e.name),simpleSearchFields:"txtFulltext, searchFilter",disableSelectionController:!0,showActions:!1,scrollBehaviour:"none"})})]},e.name)}))})};const f4=(0,R.memo)(d4);var p4,h4,m4,g4,v4,y4,b4,w4,A4,x4,E4,O4=b.ZP.div.withConfig({displayName:"StyledResourceSchedulerWrapper"})(p4||(p4=Ld()(["\n display: flex;\n height: 100%;\n"]))),C4=b.ZP.div.withConfig({displayName:"StyledSplitPanelWrapperLeft"})(h4||(h4=Ld()(["\n && {\n display: ",";\n background-color: ",";\n height: 100%;\n overflow: auto;\n padding-right: ",";\n padding-left: ",";\n padding-top: ",";\n ","\n }\n"])),(function(e){return e.isCollapsed?"none":"block"}),Jm.Z.color("paper"),x.Z.space(-1),x.Z.space(-1),x.Z.space(-1),of.C),k4=b.ZP.div.withConfig({displayName:"StyledSplitPanelWrapperRight"})(m4||(m4=Ld()(["\n && {\n background-color: ",";\n height: 100%;\n overflow: auto;\n padding-left: ",";\n padding-right: ",";\n ","\n }\n"])),Jm.Z.color("paper"),x.Z.space(-1),x.Z.space(-1),of.C),S4=b.ZP.div.withConfig({displayName:"StyledToggleCollapse"})(g4||(g4=Ld()(["\n display: flex;\n background-color: ",";\n padding: 0 "," "," ",";\n"])),Jm.Z.color("paper"),x.Z.space(-.53),x.Z.space(-.53),x.Z.space(-1.7)),D4=b.ZP.div.withConfig({displayName:"StyledPlaceHolder"})(v4||(v4=Ld()(["\n display: ",";\n ",";\n height: 100%;\n width: 25px;\n background: ",";\n padding-top: ",";\n align-items: flex-start;\n\n &:hover {\n cursor: pointer;\n }\n\n "," {\n padding: 0 0 "," ",";\n }\n"])),(function(e){return e.isCollapsed?"flex":"none"}),(function(e){return!e.isCollapsed&&"flex: 1"}),Jm.Z.color("paper"),x.Z.space(-.53),S4,x.Z.space(-.53),x.Z.space(-1.7)),P4=b.ZP.div.withConfig({displayName:"StyledGutter"})(y4||(y4=Ld()(["\n background-color: ",";\n background-repeat: no-repeat;\n background-position: 50%;\n background-image: url(",");\n height: 100%;\n\n &:hover {\n cursor: col-resize;\n }\n"])),Jm.Z.color("backgroundBody"),"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAeCAYAAADkftS9AAAAIklEQVQoU2M4c+bMfxAGAgYYmwGrIIiDjrELjpo5aiZeMwF+yNnOs5KSvgAAAABJRU5ErkJggg=="),_4=(0,b.ZP)(fV).withConfig({displayName:"StyledSplitPane"})(b4||(b4=Ld()(["\n display: flex;\n flex-direction: row;\n height: 100%;\n width: 100%;\n\n "," {\n display: ",";\n }\n"])),P4,(function(e){return e.isCollapsed?"none":"block"})),j4=(0,b.ZP)(pd.Z).withConfig({displayName:"StyledToggleCollapseButton"})(w4||(w4=Ld()(["\n font-size: ",";\n padding: 0;\n ","\n &:hover,\n &:focus,\n ",":hover & {\n background-color: transparent;\n color: ",";\n }\n"])),x.Z.font(0),(function(e){return!e.isCollapsed&&(0,b.iv)(A4||(A4=Ld()(["\n position: relative;\n left: -4px;\n top: 2px;\n "])))}),D4,Jm.Z.color("secondaryLight"));const T4=function(e){var t=e.initialize,n=e.locale,r=e.calendarTypes,o=e.updateRequestedCalendars,i=e.requestedCalendars,a=e.handleNotifications,c=e.emitAction,s=e.initialCalendarType;(0,R.useEffect)((function(){t()}),[t]);var u=(0,R.useState)(!1),l=T()(u,2),d=l[0],f=l[1],h=(0,R.useState)([20,80]),g=T()(h,2),v=g[0],y=g[1],b=(0,R.useState)([325,650]),w=T()(b,2),A=w[0],x=w[1],E=(0,R.useRef)(null),O=function(){f(!d),d?(y([20,80]),x([325,650])):(y([0,99]),x([0,975])),E.current&&E.current.updateSize()};return(0,S.jsxs)(O4,{children:[(0,S.jsx)(D4,{onClick:O,isCollapsed:d,children:(0,S.jsx)(S4,{isCollapsed:d,children:(0,S.jsx)(j4,{icon:"chevron-right",isCollapsed:d})})}),a&&(E4||(E4=(0,S.jsx)(m.Z.Notifications,{}))),(0,S.jsxs)(_4,{sizes:v,minSize:A,direction:"horizontal",cursor:"col-resize",gutter:function(){var e=document.createElement("div");return N().render(x4||(x4=(0,S.jsx)(P4,{tabIndex:0,children:(0,S.jsx)(B.Z,{icon:"vertical-rule"})})),e),e},isCollapsed:d,children:[(0,S.jsx)(C4,{isCollapsed:d,children:(0,S.jsxs)(p.Z.ErrorBoundary,{children:[(0,S.jsx)(S4,{children:(0,S.jsx)(j4,{icon:"chevron-left",onClick:O})}),(0,S.jsx)(Z.Z,{required:[r],children:(0,S.jsx)(f4,{locale:n,calendarTypes:r,updateRequestedCalendars:o,requestedCalendars:i,emitAction:c,initialCalendarType:s})})]})}),(0,S.jsx)(k4,{children:(0,S.jsx)(p.Z.ErrorBoundary,{children:(0,S.jsx)(kp,{schedulerRef:E})})})]})]})},R4=T4;var I4={initialize:function(){return{type:dp}},updateRequestedCalendars:Ap,setDateRange:Ep,removeRequestedCalendar:Op,emitAction:function(e){return d.Z.dispatchEmittedAction(e)}};const M4=(0,_.connect)((function(e){var t;return{initialCalendarType:null===(t=e.input.actionProperties)||void 0===t?void 0:t.calendarType,calendars:e.resourceScheduler.calendars,calendarTypes:e.resourceScheduler.calendarTypes,requestedCalendars:e.resourceScheduler.requestedCalendars,handleNotifications:e.resourceScheduler.handleNotifications,locale:e.intl.locale}}),I4)((0,P.ZP)(R4));var N4,B4=function(e,t){var n,r,o,i=[];null!==(n=e.actionProperties)&&void 0!==n&&n.calendarType&&((null===(r=e.selection)||void 0===r?void 0:r.type)===g.Z.selectionTypes.ID?i.push(Ap(e.actionProperties.calendarType,e.selection.ids)):(null===(o=e.selection)||void 0===o?void 0:o.type)===g.Z.selectionTypes.QUERY&&i.push(function(e,t){return{type:pp,payload:{calendarType:e,selection:t}}}(e.actionProperties.calendarType,e.selection)));return i.push(function(e){return{type:wp,payload:{handleNotifications:e}}}(t)),i};function Z4(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function F4(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Z4(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Z4(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var L4=(N4={},L()(N4,lp,jf.Z.singleTransferReducer("calendarTypes")),L()(N4,hp,jf.Z.singleTransferReducer("calendars")),L()(N4,mp,jf.Z.singleTransferReducer("dateRange")),L()(N4,wp,jf.Z.singleTransferReducer("handleNotifications")),L()(N4,fp,(function(e,t){var n=t.payload,r=n.ids,o=n.calendarType;return F4(F4({},e),{},{requestedCalendars:F4(F4({},Rv()(e.requestedCalendars,[o])),r.length>0?L()({},o,r):{})})})),L()(N4,gp,(function(e,t){var n=t.payload,r=n.id,o=n.entityModel,i=(e.calendarTypes||[]).filter((function(e){return e.targetEntity===o})).map((function(e){return e.name}));return F4(F4({},e),{},{requestedCalendars:F4({},Object.keys(e.requestedCalendars).reduce((function(t,n){var o=e.requestedCalendars[n].filter((function(e){return!i.includes(n)||e!==r}));return F4(F4({},t),o.length>0&&L()({},n,o))}),{}))})})),L()(N4,vp,(function(e){return F4(F4({},e),{},{requestedCalendars:{},calendars:[]})})),N4),H4={handleNotifications:!1,calendarTypes:null,requestedCalendars:{},calendars:[],dateRange:{}};const U4=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:H4,t=arguments.length>1?arguments[1]:void 0,n=L4[t.type];return n?n(e,t):e};var z4=function(e){return Om()(e,(function(e,t,n){return[].concat(z()(e),[{calendarTypeId:n,keys:t}])}),[])},W4=Zf().mark(K4),V4=Zf().mark($4),Y4=Zf().mark(J4),q4=Zf().mark(e6),G4=Zf().mark(t6),Q4=Zf().mark(n6),X4=function(e){return e.resourceScheduler};function K4(){return Zf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Ff.$6)([(0,Ff.Fm)(dp,$4),(0,Ff.Fm)(fp,e6),(0,Ff.Fm)(pp,t6),(0,Ff.Fm)(mp,e6),(0,Ff.Fm)(gp,e6),(0,Ff.Fm)(yp,n6),(0,Ff.Fm)(bp,e6)]);case 2:case"end":return e.stop()}}),W4)}function $4(){return Zf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Ff.RE)(J4);case 2:case"end":return e.stop()}}),V4)}function J4(){var e;return Zf().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,Ff.RE)(uh.Z.requestSaga,"calendar/types");case 2:return e=t.sent,t.next=5,(0,Ff.gz)((n=e.body.data||[],{type:lp,payload:{calendarTypes:n}}));case 5:case"end":return t.stop()}var n}),Y4)}function e6(){var e,t,n,r,o;return Zf().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,(0,Ff.Ys)(X4);case 2:if(e=i.sent,t=e.requestedCalendars,n=e.dateRange,!(Object.keys(t).length>0&&n.startDate&&n.endDate)){i.next=16;break}return i.next=8,(0,Ff.RE)(z4,t);case 8:return r=i.sent,i.next=11,(0,Ff.RE)(uh.Z.requestSaga,"calendar/events",{method:"POST",body:{calendars:r,start:n.startDate.getTime(),end:n.endDate.getTime()}});case 11:return o=i.sent,i.next=14,(0,Ff.gz)(xp(o.body.data));case 14:i.next=18;break;case 16:return i.next=18,(0,Ff.gz)(xp([]));case 18:case"end":return i.stop()}}),q4)}function t6(e){var t,n,r,o,i;return Zf().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return t=e.payload,n=t.selection,r=t.calendarType,a.next=3,(0,Ff.RE)(g.Z.getEntities,n,uh.Z.fetchEntities);case 3:return o=a.sent,i=o.keys,a.next=7,(0,Ff.gz)(Ap(r,i));case 7:case"end":return a.stop()}}),G4)}function n6(e){var t;return Zf().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return t=e.payload,n.next=3,(0,Ff.gz)(h.Z.fireExternalEvent("onEventClick",t));case 3:case"end":return n.stop()}}),Q4)}const r6={resourceScheduler:U4};var o6,i6,a6=[K4],c6="resource-scheduler",s6=["onEventClick"],u6=function(e,t,n,r){var o=(0,S.jsxs)(S.Fragment,{children:[o6||(o6=(0,S.jsx)(D,{})),i6||(i6=(0,S.jsx)(M4,{}))]}),i=s.Z.createStore(r6,a6,t,c6);h.Z.addToStore(i,(function(e){return s.Z.getEvents(s6,e.input)})),d.Z.addToStore(i,(function(e){return e.input.emitAction}));var a=!n.emitAction;return m.Z.addToStore(i,a),p.Z.addToStore(i,a,["console","remote","notification"]),f.Z.addToStore(i),s.Z.createApp(c6,o,i,{input:t,events:n,actions:B4(t,a),publicPath:r,textResourceModules:["component","common",c6,"entity-list","scheduler"]})},l6=function(e){return s.Z.useApp({initApp:u6,props:e,packageName:e.id,externalEvents:s6}).component};l6.propTypes={id:l().string,locale:l().string,onEventClick:l().func,selection:g.Z.propType,actionProperties:l().shape({calendarType:l().string})};var d6=s.Z.createBundleableApp(c6,u6,l6);s.Z.registerAppInRegistry(d6.name,d6.init)})(),c})()));
100
+ function _u(e){for(var t=e.depth,n=e.hasChildren,r=e.isExpanded,o=e.onExpanderClick,i=[],a=0;a<t;a+=1)i.push(xe("span",{className:"fc-icon"}));var c=["fc-icon"];return n&&(r?c.push("fc-icon-minus-square"):c.push("fc-icon-plus-square")),i.push(xe("span",{className:"fc-datagrid-expander"+(n?"":" fc-datagrid-expander-placeholder"),onClick:o},xe("span",{className:c.join(" ")}))),xe.apply(void 0,ae([Oe,{}],i))}function ju(e){return{resource:new su(e.context,e.resource),fieldValue:e.fieldValue,view:e.context.viewApi}}var Tu=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return oe(t,e),t.prototype.render=function(){var e=this.props;return xe(So,{hookProps:e.hookProps,content:e.colSpec.cellContent,defaultContent:Ru},(function(e,t){return xe("span",{className:"fc-datagrid-cell-main",ref:e},t)}))},t}(go);function Ru(e){return e.fieldValue||xe(Oe,null," ")}var Iu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.refineHookProps=Vt(ju),t.normalizeClassNames=_o(),t.onExpanderClick=function(e){var n=t.props;n.hasChildren&&t.context.dispatch({type:"SET_RESOURCE_ENTITY_EXPANDED",id:n.resource.id,isExpanded:!n.isExpanded})},t}return oe(t,e),t.prototype.render=function(){var e=this,t=this.props,n=this.context,r=t.colSpec,o=this.refineHookProps({resource:t.resource,fieldValue:t.fieldValue,context:n}),i=this.normalizeClassNames(r.cellClassNames,o);return xe(Po,{hookProps:o,didMount:r.cellDidMount,willUnmount:r.cellWillUnmount},(function(n){return xe("td",{ref:n,role:"gridcell","data-resource-id":t.resource.id,className:["fc-datagrid-cell","fc-resource"].concat(i).join(" ")},xe("div",{className:"fc-datagrid-cell-frame",style:{height:t.innerHeight}},xe("div",{className:"fc-datagrid-cell-cushion fc-scrollgrid-sync-inner"},r.isMain&&xe(_u,{depth:t.depth,hasChildren:t.hasChildren,isExpanded:t.isExpanded,onExpanderClick:e.onExpanderClick}),xe(Tu,{hookProps:o,colSpec:r}))))}))},t}(go),Mu=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return oe(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=e.colSpec,r={groupValue:e.fieldValue,view:t.viewApi};return xe(Co,{hookProps:r,classNames:n.cellClassNames,content:n.cellContent,defaultContent:Nu,didMount:n.cellDidMount,willUnmount:n.cellWillUnmount},(function(t,n,r,o){return xe("td",{ref:t,role:"gridcell",rowSpan:e.rowSpan,className:["fc-datagrid-cell","fc-resource-group"].concat(n).join(" ")},xe("div",{className:"fc-datagrid-cell-frame fc-datagrid-cell-frame-liquid"},xe("div",{className:"fc-datagrid-cell-cushion fc-sticky",ref:r},o)))}))},t}(go);function Nu(e){return e.groupValue||xe(Oe,null," ")}var Bu=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return oe(t,e),t.prototype.render=function(){var e=this.props,t=e.resource,n=e.rowSpans,r=e.depth,o=Su(t);return xe("tr",{role:"row"},e.colSpecs.map((function(i,a){var c=n[a];if(0===c)return null;null==c&&(c=1);var s=i.field?o[i.field]:t.title||iu(t.id);return c>1?xe(Mu,{key:a,colSpec:i,fieldValue:s,rowSpan:c}):xe(Iu,{key:a,colSpec:i,resource:t,fieldValue:s,depth:r,hasChildren:e.hasChildren,isExpanded:e.isExpanded,innerHeight:e.innerHeight})})))},t}(go);Bu.addPropsEquality({rowSpans:zt});var Zu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.innerInnerRef=Ee(),t.onExpanderClick=function(){var e=t.props;t.context.dispatch({type:"SET_RESOURCE_ENTITY_EXPANDED",id:e.id,isExpanded:!e.isExpanded})},t}return oe(t,e),t.prototype.render=function(){var e=this,t=this.props,n=this.context,r={groupValue:t.group.value,view:n.viewApi},o=t.group.spec;return xe("tr",{role:"row"},xe(Co,{hookProps:r,classNames:o.labelClassNames,content:o.labelContent,defaultContent:Fu,didMount:o.labelDidMount,willUnmount:o.labelWillUnmount},(function(r,o,i,a){return xe("th",{ref:r,role:"columnheader",scope:"colgroup",colSpan:t.spreadsheetColCnt,className:["fc-datagrid-cell","fc-resource-group",n.theme.getClass("tableCellShaded")].concat(o).join(" ")},xe("div",{className:"fc-datagrid-cell-frame",style:{height:t.innerHeight}},xe("div",{className:"fc-datagrid-cell-cushion fc-scrollgrid-sync-inner",ref:e.innerInnerRef},xe(_u,{depth:0,hasChildren:!0,isExpanded:t.isExpanded,onExpanderClick:e.onExpanderClick}),xe("span",{className:"fc-datagrid-cell-main",ref:i},a))))})))},t}(go);function Fu(e){return e.groupValue||xe(Oe,null," ")}Zu.addPropsEquality({group:function(e,t){return e.spec===t.spec&&e.value===t.value}});var Lu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.resizerElRefs=new ha(t._handleColResizerEl.bind(t)),t.colDraggings={},t}return oe(t,e),t.prototype.render=function(){var e=this,t=this.props,n=t.colSpecs,r=t.superHeaderRendering,o=t.rowInnerHeights,i={view:this.context.viewApi},a=[];if(o=o.slice(),r){var c=o.shift();a.push(xe("tr",{key:"row-super",role:"row"},xe(Co,{hookProps:i,classNames:r.headerClassNames,content:r.headerContent,didMount:r.headerDidMount,willUnmount:r.headerWillUnmount},(function(e,t,r,o){return xe("th",{ref:e,role:"columnheader",scope:"colgroup",colSpan:n.length,className:["fc-datagrid-cell","fc-datagrid-cell-super"].concat(t).join(" ")},xe("div",{className:"fc-datagrid-cell-frame",style:{height:c}},xe("div",{className:"fc-datagrid-cell-cushion fc-scrollgrid-sync-inner",ref:r},o)))}))))}var s=o.shift();return a.push(xe("tr",{key:"row",role:"row"},n.map((function(t,r){var o=r===n.length-1;return xe(Co,{key:r,hookProps:i,classNames:t.headerClassNames,content:t.headerContent,didMount:t.headerDidMount,willUnmount:t.headerWillUnmount},(function(n,i,a,c){return xe("th",{ref:n,role:"columnheader",className:["fc-datagrid-cell"].concat(i).join(" ")},xe("div",{className:"fc-datagrid-cell-frame",style:{height:s}},xe("div",{className:"fc-datagrid-cell-cushion fc-scrollgrid-sync-inner"},t.isMain&&xe("span",{className:"fc-datagrid-expander fc-datagrid-expander-placeholder"},xe("span",{className:"fc-icon"})),xe("span",{className:"fc-datagrid-cell-main",ref:a},c)),!o&&xe("div",{className:"fc-datagrid-cell-resizer",ref:e.resizerElRefs.createRef(r)})))}))})))),xe(Oe,null,a)},t.prototype._handleColResizerEl=function(e,t){var n,r=this.colDraggings;e?(n=this.initColResizing(e,parseInt(t,10)))&&(r[t]=n):(n=r[t])&&(n.destroy(),delete r[t])},t.prototype.initColResizing=function(e,t){var n=this.context,r=n.pluginHooks,o=n.isRtl,i=this.props.onColWidthChange,a=r.elementDraggingImpl;if(a){var c,s,u=new a(e);return u.emitter.on("dragstart",(function(){var n=Te(_e(e,"tr"),"th");s=n.map((function(e){return e.getBoundingClientRect().width})),c=s[t]})),u.emitter.on("dragmove",(function(e){s[t]=Math.max(c+e.deltaX*(o?-1:1),20),i&&i(s.slice())})),u.setAutoScrollEnabled(!1),u}return null},t}(go),Hu=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return oe(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n={resource:new su(t,e.resource)};return xe(So,{hookProps:n,content:t.options.resourceLaneContent},(function(e,t){return t&&xe("div",{className:"fc-timeline-lane-misc",ref:e},t)}))},t}(go),Uu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.refineHookProps=Vt(zu),t.normalizeClassNames=_o(),t.handleHeightChange=function(e,n){t.props.onHeightChange&&t.props.onHeightChange(_e(e,"tr"),n)},t}return oe(t,e),t.prototype.render=function(){var e=this,t=this.props,n=this.context,r=n.options,o=this.refineHookProps({resource:t.resource,context:n}),i=this.normalizeClassNames(r.resourceLaneClassNames,o);return xe("tr",{ref:t.elRef},xe(Po,{hookProps:o,didMount:r.resourceLaneDidMount,willUnmount:r.resourceLaneWillUnmount},(function(n){return xe("td",{ref:n,className:["fc-timeline-lane","fc-resource"].concat(i).join(" "),"data-resource-id":t.resource.id},xe("div",{className:"fc-timeline-lane-frame",style:{height:t.innerHeight}},xe(Hu,{resource:t.resource}),xe(Ns,{dateProfile:t.dateProfile,tDateProfile:t.tDateProfile,nowDate:t.nowDate,todayRange:t.todayRange,nextDayThreshold:t.nextDayThreshold,businessHours:t.businessHours,eventStore:t.eventStore,eventUiBases:t.eventUiBases,dateSelection:t.dateSelection,eventSelection:t.eventSelection,eventDrag:t.eventDrag,eventResize:t.eventResize,timelineCoords:t.timelineCoords,onHeightChange:e.handleHeightChange,resourceId:t.resource.id})))})))},t}(go);function zu(e){return{resource:new su(e.context,e.resource)}}var Wu=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return oe(t,e),t.prototype.render=function(){var e=this,t=this.props,n=this.props.renderingHooks,r={groupValue:t.groupValue,view:this.context.viewApi};return xe("tr",{ref:t.elRef},xe(Co,{hookProps:r,classNames:n.laneClassNames,content:n.laneContent,didMount:n.laneDidMount,willUnmount:n.laneWillUnmount},(function(n,r,o,i){return xe("td",{ref:n,className:["fc-timeline-lane","fc-resource-group",e.context.theme.getClass("tableCellShaded")].concat(r).join(" ")},xe("div",{style:{height:t.innerHeight},ref:o},i))})))},t}(go),Vu=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return oe(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=e.rowElRefs,r=e.innerHeights;return xe("tbody",null,e.rowNodes.map((function(o,i){if(o.group)return xe(Wu,{key:o.id,elRef:n.createRef(o.id),groupValue:o.group.value,renderingHooks:o.group.spec,innerHeight:r[i]||""});if(o.resource){var a=o.resource;return xe(Uu,ie({key:o.id,elRef:n.createRef(o.id)},e.splitProps[a.id],{resource:a,dateProfile:e.dateProfile,tDateProfile:e.tDateProfile,nowDate:e.nowDate,todayRange:e.todayRange,nextDayThreshold:t.options.nextDayThreshold,businessHours:a.businessHours||e.fallbackBusinessHours,innerHeight:r[i]||"",timelineCoords:e.slatCoords,onHeightChange:e.onRowHeightChange}))}return null})))},t}(go),Yu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rootElRef=Ee(),t.rowElRefs=new ha,t}return oe(t,e),t.prototype.render=function(){var e=this.props,t=this.context;return xe("table",{ref:this.rootElRef,"aria-hidden":!0,className:"fc-scrollgrid-sync-table "+t.theme.getClass("table"),style:{minWidth:e.tableMinWidth,width:e.clientWidth,height:e.minHeight}},xe(Vu,{rowElRefs:this.rowElRefs,rowNodes:e.rowNodes,dateProfile:e.dateProfile,tDateProfile:e.tDateProfile,nowDate:e.nowDate,todayRange:e.todayRange,splitProps:e.splitProps,fallbackBusinessHours:e.fallbackBusinessHours,slatCoords:e.slatCoords,innerHeights:e.innerHeights,onRowHeightChange:e.onRowHeightChange}))},t.prototype.componentDidMount=function(){this.updateCoords()},t.prototype.componentDidUpdate=function(){this.updateCoords()},t.prototype.componentWillUnmount=function(){this.props.onRowCoords&&this.props.onRowCoords(null)},t.prototype.updateCoords=function(){var e,t=this.props;t.onRowCoords&&null!==t.clientWidth&&this.props.onRowCoords(new ao(this.rootElRef.current,(e=this.rowElRefs.currentMap,t.rowNodes.map((function(t){return e[t.id]}))),!1,!0))},t}(go);var qu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.computeHasResourceBusinessHours=Wt(Gu),t.resourceSplitter=new uu,t.bgSlicer=new Ts,t.slatsRef=Ee(),t.state={slatCoords:null},t.handleEl=function(e){e?t.context.registerInteractiveComponent(t,{el:e}):t.context.unregisterInteractiveComponent(t)},t.handleSlatCoords=function(e){t.setState({slatCoords:e}),t.props.onSlatCoords&&t.props.onSlatCoords(e)},t.handleRowCoords=function(e){t.rowCoords=e,t.props.onRowCoords&&t.props.onRowCoords(e)},t}return oe(t,e),t.prototype.render=function(){var e=this,t=this,n=t.props,r=t.state,o=t.context,i=n.dateProfile,a=n.tDateProfile,c=Ft(a.slotDuration).unit,s=this.computeHasResourceBusinessHours(n.rowNodes),u=this.resourceSplitter.splitProps(n),l=u[""],d=this.bgSlicer.sliceProps(l,i,a.isTimeScale?null:n.nextDayThreshold,o,i,o.dateProfileGenerator,a,o.dateEnv),f=r.slatCoords&&r.slatCoords.dateProfile===n.dateProfile?r.slatCoords:null;return xe("div",{ref:this.handleEl,className:["fc-timeline-body",n.expandRows?"fc-timeline-body-expandrows":""].join(" "),style:{minWidth:n.tableMinWidth}},xe(ea,{unit:c},(function(t,r){return xe(Oe,null,xe(Ds,{ref:e.slatsRef,dateProfile:i,tDateProfile:a,nowDate:t,todayRange:r,clientWidth:n.clientWidth,tableColGroupNode:n.tableColGroupNode,tableMinWidth:n.tableMinWidth,onCoords:e.handleSlatCoords,onScrollLeftRequest:n.onScrollLeftRequest}),xe(js,{businessHourSegs:s?null:d.businessHourSegs,bgEventSegs:d.bgEventSegs,timelineCoords:f,eventResizeSegs:d.eventResize?d.eventResize.segs:[],dateSelectionSegs:d.dateSelectionSegs,nowDate:t,todayRange:r}),xe(Yu,{rowNodes:n.rowNodes,dateProfile:i,tDateProfile:n.tDateProfile,nowDate:t,todayRange:r,splitProps:u,fallbackBusinessHours:s?n.businessHours:null,clientWidth:n.clientWidth,minHeight:n.expandRows?n.clientHeight:"",tableMinWidth:n.tableMinWidth,innerHeights:n.rowInnerHeights,slatCoords:f,onRowCoords:e.handleRowCoords,onRowHeightChange:n.onRowHeightChange}),o.options.nowIndicator&&f&&f.isDateInRange(t)&&xe("div",{className:"fc-timeline-now-indicator-container"},xe(Ta,{isAxis:!1,date:t},(function(e,n,r,i){return xe("div",{ref:e,className:["fc-timeline-now-indicator-line"].concat(n).join(" "),style:Es(f.dateToCoord(t),o.isRtl)},i)}))))})))},t.prototype.queryHit=function(e,t){var n=this.rowCoords,r=n.topToIndex(t);if(null!=r){var o=this.props.rowNodes[r].resource;if(o){var i=this.slatsRef.current.positionToHit(e);if(i)return{dateProfile:this.props.dateProfile,dateSpan:{range:i.dateSpan.range,allDay:i.dateSpan.allDay,resourceId:o.id},rect:{left:i.left,right:i.right,top:n.tops[r],bottom:n.bottoms[r]},dayEl:i.dayEl,layer:0}}}return null},t}(wo);function Gu(e){for(var t=0,n=e;t<n.length;t++){var r=n[t].resource;if(r&&r.businessHours)return!0}return!1}var Qu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.scrollGridRef=Ee(),t.timeBodyScrollerElRef=Ee(),t.spreadsheetHeaderChunkElRef=Ee(),t.rootElRef=Ee(),t.ensureScrollGridResizeId=0,t.state={resourceAreaWidthOverride:null},t.ensureScrollGridResize=function(){t.ensureScrollGridResizeId&&clearTimeout(t.ensureScrollGridResizeId),t.ensureScrollGridResizeId=setTimeout((function(){t.scrollGridRef.current.handleSizing(!1)}),Ni.SCROLLGRID_RESIZE_INTERVAL+1)},t}return oe(t,e),t.prototype.render=function(){var e=this,t=e.props,n=e.state,r=e.context,o=r.options,i=!t.forPrint&&ka(o),a=!t.forPrint&&Sa(o),c=[{type:"header",key:"header",syncRowHeights:!0,isSticky:i,chunks:[{key:"datagrid",elRef:this.spreadsheetHeaderChunkElRef,tableClassName:"fc-datagrid-header",rowContent:t.spreadsheetHeaderRows},{key:"divider",outerContent:xe("td",{role:"presentation",className:"fc-resource-timeline-divider "+r.theme.getClass("tableCellShaded")})},{key:"timeline",content:t.timeHeaderContent}]},{type:"body",key:"body",syncRowHeights:!0,liquid:!0,expandRows:Boolean(o.expandRows),chunks:[{key:"datagrid",tableClassName:"fc-datagrid-body",rowContent:t.spreadsheetBodyRows},{key:"divider",outerContent:xe("td",{role:"presentation",className:"fc-resource-timeline-divider "+r.theme.getClass("tableCellShaded")})},{key:"timeline",scrollerElRef:this.timeBodyScrollerElRef,content:t.timeBodyContent}]}];a&&c.push({type:"footer",key:"footer",isSticky:!0,chunks:[{key:"datagrid",content:Ca},{key:"divider",outerContent:xe("td",{role:"presentation",className:"fc-resource-timeline-divider "+r.theme.getClass("tableCellShaded")})},{key:"timeline",content:Ca}]});var s=null!=n.resourceAreaWidthOverride?n.resourceAreaWidthOverride:o.resourceAreaWidth;return xe(Xc,{ref:this.scrollGridRef,elRef:this.rootElRef,liquid:!t.isHeightAuto&&!t.forPrint,collapsibleWidth:!1,colGroups:[{cols:t.spreadsheetCols,width:s},{cols:[]},{cols:t.timeCols}],sections:c})},t.prototype.forceTimeScroll=function(e){this.scrollGridRef.current.forceScrollLeft(2,e)},t.prototype.forceResourceScroll=function(e){this.scrollGridRef.current.forceScrollTop(1,e)},t.prototype.getResourceScroll=function(){return this.timeBodyScrollerElRef.current.scrollTop},t.prototype.componentDidMount=function(){this.initSpreadsheetResizing()},t.prototype.componentWillUnmount=function(){this.destroySpreadsheetResizing()},t.prototype.initSpreadsheetResizing=function(){var e=this,t=this.context,n=t.isRtl,r=t.pluginHooks.elementDraggingImpl,o=this.spreadsheetHeaderChunkElRef.current;if(r){var i,a,c=this.rootElRef.current,s=this.spreadsheetResizerDragging=new r(c,".fc-resource-timeline-divider");s.emitter.on("dragstart",(function(){i=o.getBoundingClientRect().width,a=c.getBoundingClientRect().width})),s.emitter.on("dragmove",(function(t){var r=i+t.deltaX*(n?-1:1);r=Math.max(r,30),r=Math.min(r,a-30),e.setState({resourceAreaWidthOverride:r},e.ensureScrollGridResize)})),s.setAutoScrollEnabled(!1)}},t.prototype.destroySpreadsheetResizing=function(){this.spreadsheetResizerDragging&&this.spreadsheetResizerDragging.destroy()},t}(go),Xu=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.processColOptions=Wt(el),r.buildTimelineDateProfile=Wt(us),r.hasNesting=Wt(Ju),r.buildRowNodes=Wt(Eu),r.layoutRef=Ee(),r.rowNodes=[],r.renderedRowNodes=[],r.buildRowIndex=Wt(Ku),r.handleSlatCoords=function(e){r.setState({slatCoords:e})},r.handleRowCoords=function(e){r.rowCoords=e,r.scrollResponder.update(!1)},r.handleMaxCushionWidth=function(e){r.setState({slotCushionMaxWidth:Math.ceil(e)})},r.handleScrollLeftRequest=function(e){r.layoutRef.current.forceTimeScroll(e)},r.handleScrollRequest=function(e){var t=r.rowCoords,n=r.layoutRef.current,o=e.rowId||e.resourceId;if(t){if(o){var i=r.buildRowIndex(r.renderedRowNodes)[o];if(null!=i){var a=null!=e.fromBottom?t.bottoms[i]-e.fromBottom:t.tops[i];n.forceResourceScroll(a)}}return!0}return null},r.handleColWidthChange=function(e){r.setState({spreadsheetColWidths:e})},r.state={resourceAreaWidth:n.options.resourceAreaWidth,spreadsheetColWidths:[]},r}return oe(t,e),t.prototype.render=function(){var e=this,t=this,n=t.props,r=t.state,o=t.context,i=o.options,a=o.viewSpec,c=this.processColOptions(o.options),s=c.superHeaderRendering,u=c.groupSpecs,l=c.orderSpecs,d=c.isVGrouping,f=c.colSpecs,p=this.buildTimelineDateProfile(n.dateProfile,o.dateEnv,i,o.dateProfileGenerator),h=this.rowNodes=this.buildRowNodes(n.resourceStore,u,l,d,n.resourceEntityExpansions,i.resourcesInitiallyExpanded),m=["fc-resource-timeline",this.hasNesting(h)?"":"fc-resource-timeline-flat","fc-timeline",!1===i.eventOverlap?"fc-timeline-overlap-disabled":"fc-timeline-overlap-enabled"],g=i.slotMinWidth,v=Fs(p,g||this.computeFallbackSlotMinWidth(p));return xe(Ro,{viewSpec:a},(function(t,i){return xe("div",{ref:t,className:m.concat(i).join(" ")},xe(Qu,{ref:e.layoutRef,forPrint:n.forPrint,isHeightAuto:n.isHeightAuto,spreadsheetCols:$u(f,r.spreadsheetColWidths,""),spreadsheetHeaderRows:function(t){return xe(Lu,{superHeaderRendering:s,colSpecs:f,onColWidthChange:e.handleColWidthChange,rowInnerHeights:t.rowSyncHeights})},spreadsheetBodyRows:function(t){return xe(Oe,null,e.renderSpreadsheetRows(h,f,t.rowSyncHeights))},timeCols:v,timeHeaderContent:function(t){return xe(Cs,{clientWidth:t.clientWidth,clientHeight:t.clientHeight,tableMinWidth:t.tableMinWidth,tableColGroupNode:t.tableColGroupNode,dateProfile:n.dateProfile,tDateProfile:p,slatCoords:r.slatCoords,rowInnerHeights:t.rowSyncHeights,onMaxCushionWidth:g?null:e.handleMaxCushionWidth})},timeBodyContent:function(t){return xe(qu,{dateProfile:n.dateProfile,clientWidth:t.clientWidth,clientHeight:t.clientHeight,tableMinWidth:t.tableMinWidth,tableColGroupNode:t.tableColGroupNode,expandRows:t.expandRows,tDateProfile:p,rowNodes:h,businessHours:n.businessHours,dateSelection:n.dateSelection,eventStore:n.eventStore,eventUiBases:n.eventUiBases,eventSelection:n.eventSelection,eventDrag:n.eventDrag,eventResize:n.eventResize,resourceStore:n.resourceStore,nextDayThreshold:o.options.nextDayThreshold,rowInnerHeights:t.rowSyncHeights,onSlatCoords:e.handleSlatCoords,onRowCoords:e.handleRowCoords,onScrollLeftRequest:e.handleScrollLeftRequest,onRowHeightChange:t.reportRowHeightChange})}}))}))},t.prototype.renderSpreadsheetRows=function(e,t,n){return e.map((function(e,r){return e.group?xe(Zu,{key:e.id,id:e.id,spreadsheetColCnt:t.length,isExpanded:e.isExpanded,group:e.group,innerHeight:n[r]||""}):e.resource?xe(Bu,{key:e.id,colSpecs:t,rowSpans:e.rowSpans,depth:e.depth,isExpanded:e.isExpanded,hasChildren:e.hasChildren,resource:e.resource,innerHeight:n[r]||""}):null}))},t.prototype.componentDidMount=function(){this.renderedRowNodes=this.rowNodes,this.scrollResponder=this.context.createScrollResponder(this.handleScrollRequest)},t.prototype.getSnapshotBeforeUpdate=function(){return this.props.forPrint?{}:{resourceScroll:this.queryResourceScroll()}},t.prototype.componentDidUpdate=function(e,t,n){this.renderedRowNodes=this.rowNodes,this.scrollResponder.update(e.dateProfile!==this.props.dateProfile),n.resourceScroll&&this.handleScrollRequest(n.resourceScroll)},t.prototype.componentWillUnmount=function(){this.scrollResponder.detach()},t.prototype.computeFallbackSlotMinWidth=function(e){return Math.max(30,(this.state.slotCushionMaxWidth||0)/e.slotsPerLabel)},t.prototype.queryResourceScroll=function(){var e=this.rowCoords,t=this.renderedRowNodes;if(e){for(var n=this.layoutRef.current,r=e.bottoms,o=n.getResourceScroll(),i={},a=0;a<r.length;a+=1){var c=t[a],s=r[a]-o;if(s>0){i.rowId=c.id,i.fromBottom=s;break}}return i}return null},t}(go);function Ku(e){for(var t={},n=0;n<e.length;n+=1)t[e[n].id]=n;return t}function $u(e,t,n){return void 0===n&&(n=""),e.map((function(e,r){return{className:e.isMain?"fc-main-col":"",width:t[r]||e.width||n}}))}function Ju(e){for(var t=0,n=e;t<n.length;t++){var r=n[t];if(r.group)return!0;if(r.resource&&r.hasChildren)return!0}return!1}function el(e){var t=e.resourceAreaColumns||[],n=null;t.length?e.resourceAreaHeaderContent&&(n={headerClassNames:e.resourceAreaHeaderClassNames,headerContent:e.resourceAreaHeaderContent,headerDidMount:e.resourceAreaHeaderDidMount,headerWillUnmount:e.resourceAreaHeaderWillUnmount}):t.push({headerClassNames:e.resourceAreaHeaderClassNames,headerContent:e.resourceAreaHeaderContent||"Resources",headerDidMount:e.resourceAreaHeaderDidMount,headerWillUnmount:e.resourceAreaHeaderWillUnmount});for(var r=[],o=[],i=[],a=!1,c=0,s=t;c<s.length;c++){var u=s[c];u.group?o.push(ie(ie({},u),{cellClassNames:u.cellClassNames||e.resourceGroupLabelClassNames,cellContent:u.cellContent||e.resourceGroupLabelContent,cellDidMount:u.cellDidMount||e.resourceGroupLabelDidMount,cellWillUnmount:u.cellWillUnmount||e.resourceGroupLaneWillUnmount})):r.push(u)}var l=r[0];if(l.isMain=!0,l.cellClassNames=l.cellClassNames||e.resourceLabelClassNames,l.cellContent=l.cellContent||e.resourceLabelContent,l.cellDidMount=l.cellDidMount||e.resourceLabelDidMount,l.cellWillUnmount=l.cellWillUnmount||e.resourceLabelWillUnmount,o.length)i=o,a=!0;else{var d=e.resourceGroupField;d&&i.push({field:d,labelClassNames:e.resourceGroupLabelClassNames,labelContent:e.resourceGroupLabelContent,labelDidMount:e.resourceGroupLabelDidMount,labelWillUnmount:e.resourceGroupLabelWillUnmount,laneClassNames:e.resourceGroupLaneClassNames,laneContent:e.resourceGroupLaneContent,laneDidMount:e.resourceGroupLaneDidMount,laneWillUnmount:e.resourceGroupLaneWillUnmount})}for(var f=[],p=0,h=e.resourceOrder||pu;p<h.length;p++){for(var m=h[p],g=!1,v=0,y=i;v<y.length;v++){var b=y[v];if(b.field===m.field){b.order=m.order,g=!0;break}}g||f.push(m)}return{superHeaderRendering:n,isVGrouping:a,groupSpecs:i,colSpecs:o.concat(r),orderSpecs:f}}Xu.addStateEquality({spreadsheetColWidths:zt});const tl=Ao({deps:[Ja,Pu,Ls],initialView:"resourceTimelineDay",views:{resourceTimeline:{type:"timeline",component:Xu,needsResourceData:!0,resourceAreaWidth:"30%",resourcesInitiallyExpanded:!0,eventResizableFromStart:!0},resourceTimelineDay:{type:"resourceTimeline",duration:{days:1}},resourceTimelineWeek:{type:"resourceTimeline",duration:{weeks:1}},resourceTimelineMonth:{type:"resourceTimeline",duration:{months:1}},resourceTimelineYear:{type:"resourceTimeline",duration:{years:1}}}});var nl=a(42060),rl=a(76791),ol=a(44759),il=a(13882);function al(e){return al="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},al(e)}function cl(e){return(0,il.Z)(1,arguments),e instanceof Date||"object"===al(e)&&"[object Date]"===Object.prototype.toString.call(e)}var sl=a(19013);function ul(e){if((0,il.Z)(1,arguments),!cl(e)&&"number"!=typeof e)return!1;var t=(0,sl.Z)(e);return!isNaN(Number(t))}var ll=a(83946);function dl(e,t){(0,il.Z)(2,arguments);var n=(0,sl.Z)(e).getTime(),r=(0,ll.Z)(t);return new Date(n+r)}function fl(e,t){(0,il.Z)(2,arguments);var n=(0,ll.Z)(t);return dl(e,-n)}var pl=864e5;function hl(e){(0,il.Z)(1,arguments);var t=1,n=(0,sl.Z)(e),r=n.getUTCDay(),o=(r<t?7:0)+r-t;return n.setUTCDate(n.getUTCDate()-o),n.setUTCHours(0,0,0,0),n}function ml(e){(0,il.Z)(1,arguments);var t=(0,sl.Z)(e),n=t.getUTCFullYear(),r=new Date(0);r.setUTCFullYear(n+1,0,4),r.setUTCHours(0,0,0,0);var o=hl(r),i=new Date(0);i.setUTCFullYear(n,0,4),i.setUTCHours(0,0,0,0);var a=hl(i);return t.getTime()>=o.getTime()?n+1:t.getTime()>=a.getTime()?n:n-1}function gl(e){(0,il.Z)(1,arguments);var t=ml(e),n=new Date(0);n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0);var r=hl(n);return r}var vl=6048e5;function yl(e){(0,il.Z)(1,arguments);var t=(0,sl.Z)(e),n=hl(t).getTime()-gl(t).getTime();return Math.round(n/vl)+1}var bl=a(59025),wl=a(84314);function Al(e,t){var n,r,o,i,a,c,s,u;(0,il.Z)(1,arguments);var l=(0,sl.Z)(e),d=l.getUTCFullYear(),f=(0,wl.j)(),p=(0,ll.Z)(null!==(n=null!==(r=null!==(o=null!==(i=null==t?void 0:t.firstWeekContainsDate)&&void 0!==i?i:null==t||null===(a=t.locale)||void 0===a||null===(c=a.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==o?o:f.firstWeekContainsDate)&&void 0!==r?r:null===(s=f.locale)||void 0===s||null===(u=s.options)||void 0===u?void 0:u.firstWeekContainsDate)&&void 0!==n?n:1);if(!(p>=1&&p<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var h=new Date(0);h.setUTCFullYear(d+1,0,p),h.setUTCHours(0,0,0,0);var m=(0,bl.Z)(h,t),g=new Date(0);g.setUTCFullYear(d,0,p),g.setUTCHours(0,0,0,0);var v=(0,bl.Z)(g,t);return l.getTime()>=m.getTime()?d+1:l.getTime()>=v.getTime()?d:d-1}function xl(e,t){var n,r,o,i,a,c,s,u;(0,il.Z)(1,arguments);var l=(0,wl.j)(),d=(0,ll.Z)(null!==(n=null!==(r=null!==(o=null!==(i=null==t?void 0:t.firstWeekContainsDate)&&void 0!==i?i:null==t||null===(a=t.locale)||void 0===a||null===(c=a.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==o?o:l.firstWeekContainsDate)&&void 0!==r?r:null===(s=l.locale)||void 0===s||null===(u=s.options)||void 0===u?void 0:u.firstWeekContainsDate)&&void 0!==n?n:1),f=Al(e,t),p=new Date(0);p.setUTCFullYear(f,0,d),p.setUTCHours(0,0,0,0);var h=(0,bl.Z)(p,t);return h}var El=6048e5;function Ol(e,t){(0,il.Z)(1,arguments);var n=(0,sl.Z)(e),r=(0,bl.Z)(n,t).getTime()-xl(n,t).getTime();return Math.round(r/El)+1}function Cl(e,t){for(var n=e<0?"-":"",r=Math.abs(e).toString();r.length<t;)r="0"+r;return n+r}var kl={y:function(e,t){var n=e.getUTCFullYear(),r=n>0?n:1-n;return Cl("yy"===t?r%100:r,t.length)},M:function(e,t){var n=e.getUTCMonth();return"M"===t?String(n+1):Cl(n+1,2)},d:function(e,t){return Cl(e.getUTCDate(),t.length)},a:function(e,t){var n=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return"am"===n?"a.m.":"p.m."}},h:function(e,t){return Cl(e.getUTCHours()%12||12,t.length)},H:function(e,t){return Cl(e.getUTCHours(),t.length)},m:function(e,t){return Cl(e.getUTCMinutes(),t.length)},s:function(e,t){return Cl(e.getUTCSeconds(),t.length)},S:function(e,t){var n=t.length,r=e.getUTCMilliseconds();return Cl(Math.floor(r*Math.pow(10,n-3)),t.length)}};const Sl=kl;var Dl="midnight",Pl="noon",_l="morning",jl="afternoon",Tl="evening",Rl="night",Il={G:function(e,t,n){var r=e.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if("yo"===t){var r=e.getUTCFullYear(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return Sl.y(e,t)},Y:function(e,t,n,r){var o=Al(e,r),i=o>0?o:1-o;return"YY"===t?Cl(i%100,2):"Yo"===t?n.ordinalNumber(i,{unit:"year"}):Cl(i,t.length)},R:function(e,t){return Cl(ml(e),t.length)},u:function(e,t){return Cl(e.getUTCFullYear(),t.length)},Q:function(e,t,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return Cl(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return Cl(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){var r=e.getUTCMonth();switch(t){case"M":case"MM":return Sl.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){var r=e.getUTCMonth();switch(t){case"L":return String(r+1);case"LL":return Cl(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){var o=Ol(e,r);return"wo"===t?n.ordinalNumber(o,{unit:"week"}):Cl(o,t.length)},I:function(e,t,n){var r=yl(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):Cl(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getUTCDate(),{unit:"date"}):Sl.d(e,t)},D:function(e,t,n){var r=function(e){(0,il.Z)(1,arguments);var t=(0,sl.Z)(e),n=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var r=t.getTime(),o=n-r;return Math.floor(o/pl)+1}(e);return"Do"===t?n.ordinalNumber(r,{unit:"dayOfYear"}):Cl(r,t.length)},E:function(e,t,n){var r=e.getUTCDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){var o=e.getUTCDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return Cl(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){var o=e.getUTCDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return Cl(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){var r=e.getUTCDay(),o=0===r?7:r;switch(t){case"i":return String(o);case"ii":return Cl(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){var r=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){var r,o=e.getUTCHours();switch(r=12===o?Pl:0===o?Dl:o/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(e,t,n){var r,o=e.getUTCHours();switch(r=o>=17?Tl:o>=12?jl:o>=4?_l:Rl,t){case"B":case"BB":case"BBB":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){var r=e.getUTCHours()%12;return 0===r&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Sl.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getUTCHours(),{unit:"hour"}):Sl.H(e,t)},K:function(e,t,n){var r=e.getUTCHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):Cl(r,t.length)},k:function(e,t,n){var r=e.getUTCHours();return 0===r&&(r=24),"ko"===t?n.ordinalNumber(r,{unit:"hour"}):Cl(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):Sl.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):Sl.s(e,t)},S:function(e,t){return Sl.S(e,t)},X:function(e,t,n,r){var o=(r._originalDate||e).getTimezoneOffset();if(0===o)return"Z";switch(t){case"X":return Nl(o);case"XXXX":case"XX":return Bl(o);default:return Bl(o,":")}},x:function(e,t,n,r){var o=(r._originalDate||e).getTimezoneOffset();switch(t){case"x":return Nl(o);case"xxxx":case"xx":return Bl(o);default:return Bl(o,":")}},O:function(e,t,n,r){var o=(r._originalDate||e).getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Ml(o,":");default:return"GMT"+Bl(o,":")}},z:function(e,t,n,r){var o=(r._originalDate||e).getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Ml(o,":");default:return"GMT"+Bl(o,":")}},t:function(e,t,n,r){var o=r._originalDate||e;return Cl(Math.floor(o.getTime()/1e3),t.length)},T:function(e,t,n,r){return Cl((r._originalDate||e).getTime(),t.length)}};function Ml(e,t){var n=e>0?"-":"+",r=Math.abs(e),o=Math.floor(r/60),i=r%60;if(0===i)return n+String(o);var a=t||"";return n+String(o)+a+Cl(i,2)}function Nl(e,t){return e%60==0?(e>0?"-":"+")+Cl(Math.abs(e)/60,2):Bl(e,t)}function Bl(e,t){var n=t||"",r=e>0?"-":"+",o=Math.abs(e);return r+Cl(Math.floor(o/60),2)+n+Cl(o%60,2)}const Zl=Il;var Fl=function(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},Ll=function(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}};const Hl={p:Ll,P:function(e,t){var n,r=e.match(/(P+)(p+)?/)||[],o=r[1],i=r[2];if(!i)return Fl(e,t);switch(o){case"P":n=t.dateTime({width:"short"});break;case"PP":n=t.dateTime({width:"medium"});break;case"PPP":n=t.dateTime({width:"long"});break;default:n=t.dateTime({width:"full"})}return n.replace("{{date}}",Fl(o,t)).replace("{{time}}",Ll(i,t))}};function Ul(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}var zl=["D","DD"],Wl=["YY","YYYY"];function Vl(e){return-1!==zl.indexOf(e)}function Yl(e){return-1!==Wl.indexOf(e)}function ql(e,t,n){if("YYYY"===e)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===e)throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===e)throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===e)throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}const Gl=a(41695).Z;var Ql=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Xl=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Kl=/^'([^]*?)'?$/,$l=/''/g,Jl=/[a-zA-Z]/;function ed(e,t,n){var r,o,i,a,c,s,u,l,d,f,p,h,m,g,v,y,b,w;(0,il.Z)(2,arguments);var A=String(t),x=(0,wl.j)(),E=null!==(r=null!==(o=null==n?void 0:n.locale)&&void 0!==o?o:x.locale)&&void 0!==r?r:Gl,O=(0,ll.Z)(null!==(i=null!==(a=null!==(c=null!==(s=null==n?void 0:n.firstWeekContainsDate)&&void 0!==s?s:null==n||null===(u=n.locale)||void 0===u||null===(l=u.options)||void 0===l?void 0:l.firstWeekContainsDate)&&void 0!==c?c:x.firstWeekContainsDate)&&void 0!==a?a:null===(d=x.locale)||void 0===d||null===(f=d.options)||void 0===f?void 0:f.firstWeekContainsDate)&&void 0!==i?i:1);if(!(O>=1&&O<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var C=(0,ll.Z)(null!==(p=null!==(h=null!==(m=null!==(g=null==n?void 0:n.weekStartsOn)&&void 0!==g?g:null==n||null===(v=n.locale)||void 0===v||null===(y=v.options)||void 0===y?void 0:y.weekStartsOn)&&void 0!==m?m:x.weekStartsOn)&&void 0!==h?h:null===(b=x.locale)||void 0===b||null===(w=b.options)||void 0===w?void 0:w.weekStartsOn)&&void 0!==p?p:0);if(!(C>=0&&C<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!E.localize)throw new RangeError("locale must contain localize property");if(!E.formatLong)throw new RangeError("locale must contain formatLong property");var k=(0,sl.Z)(e);if(!ul(k))throw new RangeError("Invalid time value");var S=Ul(k),D=fl(k,S),P={firstWeekContainsDate:O,weekStartsOn:C,locale:E,_originalDate:k},_=A.match(Xl).map((function(e){var t=e[0];return"p"===t||"P"===t?(0,Hl[t])(e,E.formatLong):e})).join("").match(Ql).map((function(r){if("''"===r)return"'";var o=r[0];if("'"===o)return td(r);var i=Zl[o];if(i)return null!=n&&n.useAdditionalWeekYearTokens||!Yl(r)||ql(r,t,String(e)),null!=n&&n.useAdditionalDayOfYearTokens||!Vl(r)||ql(r,t,String(e)),i(D,r,E.localize,P);if(o.match(Jl))throw new RangeError("Format string contains an unescaped latin alphabet character `"+o+"`");return r})).join("");return _}function td(e){var t=e.match(Kl);return t?t[1].replace($l,"'"):e}function nd(e){(0,il.Z)(1,arguments);var t=(0,sl.Z)(e);return t.setHours(0,0,0,0),t}var rd=864e5;function od(e,t){(0,il.Z)(2,arguments);var n=(0,sl.Z)(e),r=(0,sl.Z)(t);return n.getFullYear()-r.getFullYear()}function id(e,t){(0,il.Z)(2,arguments);var n=(0,sl.Z)(e),r=(0,sl.Z)(t),o=n.getTime()-r.getTime();return o<0?-1:o>0?1:o}var ad=a(82022),cd=function(e,t){return ed(t,"HH",{locale:ad.Z.getDateFnsLocale(e)})},sd=function(e,t,n){var r=function(e,t){(0,il.Z)(2,arguments);var n=nd(e),r=nd(t),o=n.getTime()-Ul(n),i=r.getTime()-Ul(r);return Math.round((o-i)/rd)}(n,t),o=function(e,t){(0,il.Z)(2,arguments);var n=(0,sl.Z)(e),r=(0,sl.Z)(t),o=id(n,r),i=Math.abs(od(n,r));n.setFullYear(1584),r.setFullYear(1584);var a=id(n,r)===-o,c=o*(i-Number(a));return 0===c?0:c}(n,t),i=r>0,a="d. LLLL".concat(o>0?" y":""),c="H:mm",s={locale:ad.Z.getDateFnsLocale(e)},u=ed(t,a,s),l=ed(n,a,s),d=ed(t,c,s),f=ed(n,c,s);return"".concat(u,", ").concat(d," - ").concat(i?"".concat(l,", "):"").concat(f)};const ud=function(e){var t=e.conflictStatus,n=e.intl;if(t!==X.ACCEPTED&&t!==X.EXISTING)return null;var r=t===X.ACCEPTED,o="client.scheduler.conflict".concat(r?"Accepted":"Existing"),i=r?"✓":"✕";return(0,S.jsxs)("span",{children:[i," ",n.formatMessage({id:o})]})},ld=ud;var dd,fd=a(44012),pd=a(65035),hd=a(46444),md=a.n(hd),gd=a(58129);const vd=b.ZP.div.withConfig({displayName:"StyledButtonGroup"})(dd||(dd=(0,v.Z)(["\n display: flex;\n\n &&& > "," {\n :not(:first-child) {\n margin-left: -1px;\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n }\n\n :not(:last-child) {\n margin-right: 0;\n border-right: 0;\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n }\n }\n"])),gd.Z);var yd=I().forwardRef((function(e,t){return(0,S.jsx)(vd,{ref:t,children:e.children})}));yd.propTypes={children:md().node};const bd=yd;var wd=a(68957),Ad=a(70807),xd={};xd.styleTagTransform=ye(),xd.setAttributes=he(),xd.insert=fe().bind(null,"head"),xd.domAPI=le(),xd.insertStyleElement=ge();se()(Ad.Z,xd);Ad.Z&&Ad.Z.locals&&Ad.Z.locals;var Ed,Od=a(12520),Cd=a.n(Od),kd=b.ZP.span.withConfig({displayName:"StyledChildrenWrapper"})(Ed||(Ed=(0,v.Z)(["\n cursor: pointer;\n user-select: none;\n"])));const Sd=function(e){var t=e.children,n=e.onOpen;return(0,S.jsx)(kd,{onClick:n,children:t})};var Dd=a(5429),Pd=function(){(0,Od.registerLocale)("en",ad.Z.getDateFnsLocale("en")),(0,Od.registerLocale)("en-US",ad.Z.getDateFnsLocale("en")),(0,Od.registerLocale)("de-CH",ad.Z.getDateFnsLocale("de-CH")),(0,Od.registerLocale)("de",ad.Z.getDateFnsLocale("de")),(0,Od.registerLocale)("fr",ad.Z.getDateFnsLocale("fr")),(0,Od.registerLocale)("fr-CH",ad.Z.getDateFnsLocale("fr")),(0,Od.registerLocale)("it",ad.Z.getDateFnsLocale("it")),(0,Od.registerLocale)("it-CH",ad.Z.getDateFnsLocale("it")),(0,Od.setDefaultLocale)("de")};Pd();const _d=(0,b.Zz)((0,P.ZP)((function(e){var t,n=e.children,r=e.value,o=e.onChange,i=e.intl,a=i.locale,c=(0,R.useRef)(null),s=(0,R.useState)(!1),u=(0,wd.Z)(s,2),l=u[0],d=u[1],f=function(e){var t,n;(d(e),null!==(t=c.current)&&void 0!==t&&t.setPreSelection)&&(null===(n=c.current)||void 0===n||n.setPreSelection(r))};return(0,S.jsx)(Cd(),{ref:c,selected:r,preSelection:null,onChange:o,showTimeInput:!1,dateFormat:"P",showMonthDropdown:!0,showYearDropdown:!0,scrollableYearDropdown:!0,fixedHeight:!0,showPopperArrow:!1,open:l,onFocus:function(){f(!0)},onClickOutside:function(){f(!1)},locale:a,enableTabLoop:!1,customInput:(0,S.jsx)(Sd,{onOpen:function(){f(!0)},children:n}),todayButton:(t="client.component.datePicker.todayLabel",i.formatMessage({id:t}))})})));var jd,Td,Rd,Id,Md,Nd,Bd,Zd=a(34206),Fd=a(28655),Ld=a.n(Fd),Hd=b.ZP.div.withConfig({displayName:"StyledNavigationFullCalendar"})(jd||(jd=Ld()(["\n display: flex;\n justify-content: space-between;\n margin: "," ",";\n\n > div {\n display: flex;\n align-items: center;\n }\n"])),x.Z.space(-1),x.Z.space(-2)),Ud=b.ZP.div.withConfig({displayName:"StyledButtonGroupReloadWrapper"})(Td||(Td=Ld()(["\n && {\n display: grid;\n grid-template-columns: auto 40px;\n }\n"]))),zd=b.ZP.div.withConfig({displayName:"StyledReloadButtonWrapper"})(Rd||(Rd=Ld()([""])));function Wd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Vd(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Wd(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wd(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Yd=function(e,t){return e===t?{ink:"secondary"}:{}},qd=function(e,t){return t.formatMessage({id:e})};const Gd=(0,P.ZP)((function(e){var t=e.date,n=e.changeRange,r=e.changeView,o=e.chooseNext,i=e.choosePrev,a=e.chooseToday,c=e.goToDate,s=e.intl,u=e.isLoading,l=e.refresh,d=e.title,f=e.type;return(0,S.jsxs)(Hd,{children:[(0,S.jsxs)("div",{children:[(0,S.jsx)(pd.Z,{look:"raised",onClick:function(){a(),n()},children:Id||(Id=(0,S.jsx)(fd.Z,{id:"client.scheduler.today"}))}),(0,S.jsxs)(bd,{children:[(0,S.jsx)(pd.Z,{look:"raised",onClick:function(){i(),n()},icon:"chevron-left",title:qd("client.scheduler.previous",s)}),(0,S.jsx)(pd.Z,{look:"raised",onClick:function(){o(),n()},icon:"chevron-right",title:qd("client.scheduler.next",s)})]}),(0,S.jsxs)(_d,{value:t,onChange:function(e){c(e),n()},children:[(0,S.jsx)(Zd.ZP.Span,{children:d}),(0,S.jsx)(B.Z,{style:{marginLeft:"5px"},icon:"chevron-down"})]})]}),(0,S.jsxs)(Ud,{children:[(0,S.jsxs)(bd,{children:[(0,S.jsx)(pd.Z,Vd(Vd({look:"raised"},Yd("dayView",f)),{},{onClick:function(){return r("dayView")},children:Md||(Md=(0,S.jsx)(fd.Z,{id:"client.scheduler.day"}))})),(0,S.jsx)(pd.Z,Vd(Vd(Vd({look:"raised"},Yd("weekView",f)),Yd("weekViewSimple",f)),{},{onClick:function(){return r("weekViewSimple"!==f?"weekViewSimple":"weekView")},children:Nd||(Nd=(0,S.jsx)(fd.Z,{id:"client.scheduler.week"}))})),(0,S.jsx)(pd.Z,Vd(Vd({look:"raised"},Yd("monthView",f)),{},{onClick:function(){return r("monthView")},children:Bd||(Bd=(0,S.jsx)(fd.Z,{id:"client.scheduler.month"}))}))]}),(0,S.jsx)(zd,{children:(0,S.jsx)(pd.Z,{icon:u?"":"sync",onClick:function(){u||l()},pending:u,title:qd("client.scheduler.reload",s)})})]})]})})),Qd=Gd;const Xd=function(e){var t=e.fieldValue,n=e.resource,r=e.onCalendarRemove;return(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)("input",{type:"checkbox",defaultChecked:!0,className:"remove-resource-checkbox",onClick:function(){return r(n.extendedProps.entityKey,n.extendedProps.entityModel)}}),t]})};var Kd,$d,Jd,ef,tf=a(27361),nf=a.n(tf),rf=a(58664),of=a(11347),af=b.ZP.div.withConfig({displayName:"StyledFullCalendarWrapper"})(Kd||(Kd=Ld()(["\n height: 100%;\n display: grid;\n grid-template-rows: auto 1fr;\n\n .fc {\n ",";\n\n table {\n font-size: ",";\n }\n\n // decrease header height\n .fc-datagrid-header {\n .fc-datagrid-cell-frame {\n height: 25px !important;\n }\n }\n\n .fc-timeline-event {\n overflow: hidden;\n }\n\n .fc-timeline-slot-frame a {\n text-decoration: none;\n }\n\n // decrease header height\n .fc-timeline-slot-frame.fc-timeline-slot-frame {\n height: 25px !important;\n }\n\n .remove-resource-checkbox {\n margin-right: 6px;\n }\n\n .fc-scrollgrid {\n border-top: 0; // remove top border as it otherwise causes a double border when not scrolling\n border-color: ",";\n }\n\n // prevent top border from disappearing on scroll\n & .fc-scroller-harness {\n border-top: 1px solid ",";\n }\n\n .fc-timeline-header-row {\n th {\n font-weight: ",";\n }\n }\n\n .fc-event {\n cursor: pointer;\n\n .dark {\n color: ",";\n }\n\n .bright {\n color: ",";\n }\n\n .conflict {\n border: 2px dashed ",";\n }\n\n .fc-event-time {\n overflow: visible;\n font-size: ",";\n font-weight: ",";\n }\n }\n\n .fc-event-title {\n font-size: ",";\n }\n }\n"])),(0,A.Z)(),x.Z.font(-2),(function(e){var t=e.theme;return(0,rf.HO)(nf()(t,"colors.paper"),1)}),(function(e){var t=e.theme;return(0,rf.HO)(nf()(t,"colors.paper"),1)}),w.FS.fontWeight("regular"),w.FS.color("text"),w.FS.color("paper"),w.FS.color("signal.danger.text"),x.Z.font(0),w.FS.fontWeight("regular"),x.Z.font(0)),cf=b.ZP.div.withConfig({displayName:"StyledMemoizedFullCalender"})($d||($d=Ld()(["\n overflow-y: auto;\n ","\n"])),of.C),sf=(0,b.vJ)(Jd||(Jd=Ld()(["\n @media print {\n body * {\n visibility: hidden;\n }\n\n #section-to-print,\n #section-to-print * {\n visibility: visible;\n color: ",";\n\n input[type='checkbox'] {\n visibility: hidden !important;\n }\n }\n\n #section-to-print {\n position: fixed;\n overflow: visible;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n\n & *:not(.fc-timeline-event-harness *) {\n overflow: visible;\n }\n }\n }\n"])),w.FS.color("text"));function uf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function lf(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?uf(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uf(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var df=(0,R.forwardRef)((function(e,t){var n=e.resources,r=e.events,o=e.onDateRangeChange,i=e.isLoading,a=e.onRefresh,c=e.onCalendarRemove,s=e.onCalendarRemoveAll,u=e.locale,l=e.onEventClick,d=e.intl,f=(0,R.useRef)(null),p=(0,R.useRef)(null),h=(0,R.useCallback)((function(){var e=f.current.getApi().view;o&&o({startDate:e.activeStart,endDate:e.activeEnd})}),[o]);(0,R.useEffect)((function(){h()}),[h,u]),(0,R.useEffect)((function(){var e=f.current.getApi();e.batchRendering((function(){e.getEventSources().forEach((function(e){return e.remove()})),e.addEventSource(r)}))}),[JSON.stringify(r)]),(0,R.useEffect)((function(){var e=f.current.getApi();e.batchRendering((function(){var t=e.getResources();t.forEach((function(e){n.find((function(t){return e.id===t.id}))||e.remove()})),n.forEach((function(n){t.find((function(e){return e.id===n.id}))||e.addResource(n)}))}))}),[JSON.stringify(n)]);var m=(0,S.jsx)("input",{type:"checkbox",checked:!0,onChange:function(){return s()},style:{visibility:n.length>0?"visible":"hidden"},className:"remove-all-checkbox"}),g=function(e){var t=sd(u,e.event.start,e.event.end||e.event.start),n=(0,S.jsxs)("div",{children:[(0,S.jsx)(nl.Z,{type:"html",value:e.event.extendedProps.description}),(0,S.jsx)("p",{children:t}),(0,S.jsx)("p",{children:(0,S.jsx)(ld,{conflictStatus:e.event.extendedProps.conflict,intl:d})})]}),r=e.event.extendedProps.styleAttr;return(0,S.jsx)(rl.Z,{content:n,isPlainHtml:!0,placement:"top",children:(0,S.jsxs)("div",{className:"fc-event-main-frame ".concat(r&&r.join(" ")),children:[e.timeText&&(0,S.jsx)("div",{className:"fc-event-time",children:e.timeText}),(0,S.jsx)("div",{className:"fc-event-title-container",children:(0,S.jsx)("div",{className:"fc-event-title fc-sticky",children:e.event.title||(0,S.jsx)(S.Fragment,{children:" "})})})]})})},v=(0,R.useMemo)((function(){return(0,S.jsx)(qa,{resourceOrder:"calendarType,title",schedulerLicenseKey:(e="MISSING_ENV_VAR".FULL_CALENDAR_LICENCE,e||(ol.Z.logWarning("This Version runs with the NonCommercial FullCalendar license."),"CC-Attribution-NonCommercial-NoDerivatives")),locale:u,plugins:[cc,tl,Ic],ref:f,initialView:"dayView",headerToolbar:!1,height:"auto",resourceAreaWidth:"15%",resourceAreaColumns:[{labelText:"",headerContent:m}],resourceLabelContent:function(e){return(0,S.jsx)(Xd,lf(lf({},e),{},{onCalendarRemove:c}))},eventClick:function(e){l(e.event)},eventContent:g,firstDay:1,slotMinTime:"06:00:00",slotMaxTime:"23:00:00",views:{dayView:{type:"resourceTimelineDay",slotLabelFormat:function(e){return cd(u,ne()(Date,z()(e.date.array)))}},weekView:{type:"resourceTimelineWeek",slotLabelFormat:[{weekday:"short",month:"numeric",day:"numeric"},function(e){return cd(u,ne()(Date,z()(e.date.array)))}]},weekViewSimple:{type:"resourceTimelineWeek",slotDuration:{day:1},slotLabelFormat:[{weekday:"short",month:"numeric",day:"numeric"}]},monthView:{type:"resourceTimelineMonth",slotLabelFormat:{weekday:"short",day:"numeric",omitCommas:!0}}}});var e}),[n.length]);return(0,R.useImperativeHandle)(t,(function(){return{updateSize:function(){setTimeout((function(){f.current.getApi().updateSize()}),0)}}})),(0,S.jsxs)(af,{ref:p,children:[ef||(ef=(0,S.jsx)(sf,{})),f.current&&(0,S.jsx)(Qd,{changeRange:h,changeView:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"timelineDay";f.current.getApi().changeView(e),h()},chooseNext:function(){return f.current.getApi().next()},choosePrev:function(){return f.current.getApi().prev()},chooseToday:function(){return f.current.getApi().today()},goToDate:function(e){return f.current.getApi().gotoDate(e)},date:f.current.getApi().getDate(),isLoading:i,refresh:a,title:f.current.getApi().view.title,type:f.current.getApi().view.type}),(0,S.jsx)(cf,{id:"section-to-print",children:v})]})}));df.defaultProps={locale:"en"},df.displayName="FullCalendar";const ff=df;const pf=function(e){return(0,S.jsx)(ff,{events:(t=e.calendars,t.reduce((function(e,t){return[].concat(z()(e),z()(t.events.map((function(e){return $($({entity:e.source,resourceId:J(t.key,t.model),title:e.label,start:e.start,end:e.end,description:e.description,conflict:e.conflict},e.color?{backgroundColor:e.color,borderColor:e.color}:{}),{},{styleAttr:[].concat(z()(e.conflict===X.EXISTING?["conflict"]:[]),[(n=e.color,Q(n,"bright","dark"))])});var n}))))}),[])),resources:ee(e.calendars),onDateRangeChange:e.onDateRangeChange,onCalendarRemove:e.onCalendarRemove,onCalendarRemoveAll:e.onCalendarRemoveAll,onEventClick:e.onEventClick,onRefresh:e.onRefresh,locale:e.locale,isLoading:e.isLoading,intl:e.intl,ref:e.schedulerRef});var t};var hf="scheduler/SET_CALENDARS",mf="scheduler/ON_DATE_RANGE_CHANGE",gf="scheduler/ON_CALENDAR_REMOVE",vf="scheduler/ON_CALENDARS_REMOVE_ALL",yf="scheduler/ON_EVENT_CLICK",bf="scheduler/ON_REFRESH",wf="scheduler/REMOVE_EVENTS",Af="scheduler/SET_IS_LOADING",xf=function(){return{type:wf}},Ef=function(e){return{type:Af,payload:{isLoading:e}}},Of={onDateRangeChange:function(e){return{type:mf,payload:{dateRange:e}}},onCalendarRemove:function(e,t){return{type:gf,payload:{id:e,entityModel:t}}},onCalendarRemoveAll:function(){return{type:vf}},onEventClick:function(e){return{type:yf,payload:{event:e}}},onRefresh:function(){return{type:bf}}};const Cf=(0,_.connect)((function(e,t){return{calendars:e.scheduler.calendars,locale:e.intl.locale,isLoading:e.scheduler.isLoading,schedulerRef:e.input.schedulerRef}}),Of)((0,P.ZP)(pf));var kf=function(e){return void 0!==e};const Sf=function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return t.reduce((function(t,r){return kf(e[r.name])&&"function"==typeof r.action?t.push(r.action.apply(r,z()(r.argsFactory(e)))):r.mandatory&&n&&ol.Z.logError("Mandatory field '".concat(r.name,"' not set in input")),t}),[])};var Df,Pf=function(e){return Sf(e,_f)},_f=[{name:"calendars",action:function(e){return{type:hf,payload:{calendars:e}}},argsFactory:function(e){return[e.calendars]}}],jf=a(81770);function Tf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Rf(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Tf(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Tf(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var If=(Df={},L()(Df,hf,jf.Z.singleTransferReducer("calendars")),L()(Df,Af,jf.Z.singleTransferReducer("isLoading")),L()(Df,wf,(function(e){return Rf(Rf({},e),{},{calendars:e.calendars.map((function(e){return Rf(Rf({},e),{},{events:[]})}))})})),Df),Mf={calendars:[],isLoading:!0};const Nf=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Mf,t=arguments.length>1?arguments[1]:void 0,n=If[t.type];return n?n(e,t):e};var Bf=a(87757),Zf=a.n(Bf),Ff=a(34857),Lf=Zf().mark(qf),Hf=Zf().mark(Gf),Uf=Zf().mark(Qf),zf=Zf().mark(Xf),Wf=Zf().mark(Kf),Vf=Zf().mark($f),Yf=Zf().mark(Jf);function qf(){return Zf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Ff.$6)([(0,Ff.Fm)(mf,Gf),(0,Ff.Fm)(gf,Qf),(0,Ff.Fm)(vf,Xf),(0,Ff.Fm)(yf,Kf),(0,Ff.Fm)(bf,$f),(0,Ff.Fm)(hf,Jf)]);case 2:case"end":return e.stop()}}),Lf)}function Gf(e){var t,n;return Zf().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return t=e.payload,r.next=3,(0,Ff.gz)(Ef(!0));case 3:return r.next=5,(0,Ff.gz)(xf());case 5:return n=t.dateRange,r.next=8,(0,Ff.gz)(h.Z.fireExternalEvent("onDateRangeChange",{dateRange:n}));case 8:case"end":return r.stop()}}),Hf)}function Qf(e){var t;return Zf().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return t=e.payload,n.next=3,(0,Ff.gz)(Ef(!0));case 3:return n.next=5,(0,Ff.gz)(h.Z.fireExternalEvent("onCalendarRemove",{id:t.id,entityModel:t.entityModel}));case 5:case"end":return n.stop()}}),Uf)}function Xf(){return Zf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Ff.gz)(Ef(!0));case 2:return e.next=4,(0,Ff.gz)(h.Z.fireExternalEvent("onCalendarRemoveAll"));case 4:case"end":return e.stop()}}),zf)}function Kf(e){var t,n;return Zf().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(t=e.payload,!(n=t.event.extendedProps.entity)){r.next=5;break}return r.next=5,(0,Ff.gz)(h.Z.fireExternalEvent("onEventClick",n));case 5:case"end":return r.stop()}}),Wf)}function $f(){return Zf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Ff.gz)(Ef(!0));case 2:return e.next=4,(0,Ff.gz)(xf());case 4:return e.next=6,(0,Ff.gz)(h.Z.fireExternalEvent("onRefresh"));case 6:case"end":return e.stop()}}),Vf)}function Jf(){return Zf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Ff.gz)(Ef(!1));case 2:case"end":return e.stop()}}),Yf)}const ep={scheduler:Nf};var tp,np=[qf];function rp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function op(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?rp(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rp(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ip="scheduler",ap=["onDateRangeChange","onCalendarRemove","onCalendarRemoveAll","onEventClick","onRefresh"],cp=function(e,t,n,r){var o=tp||(tp=(0,S.jsx)(Cf,{})),i=s.Z.createStore(ep,np,t,ip);return h.Z.addToStore(i,(function(e){return s.Z.getEvents(ap,e.input)})),s.Z.createApp(ip,o,i,{input:t,events:n,actions:Pf(t),publicPath:r,textResourceModules:["component","common",ip]})},sp=function(e){var t=s.Z.useApp({initApp:cp,props:e,packageName:ip,externalEvents:ap}),n=t.component,r=t.store;return H.Z.useDidUpdate((function(){Pf(e).forEach((function(e){null!=n&&r.dispatch(e)}))}),[e]),n};sp.propTypes=op(op({calendars:l().arrayOf(l().shape({calendarType:l().string.isRequired,events:l().arrayOf(l().shape({description:l().string,start:l().number,end:l().number,allDay:l().bool})),key:l().string.isRequired,label:l().string.isRequired,model:l().string.isRequired})),schedulerRef:l().object},ap.reduce((function(e,t){return op(op({},e),{},L()({},t,l().func))}),{})),{},{locale:l().string});const up=sp;var lp="resourceScheduler/SET_CALENDAR_TYPES",dp="resourceScheduler/INITIALIZE",fp="resourceScheduler/UPDATE_REQUESTED_CALENDARS",pp="resourceScheduler/LOAD_REQUESTED_CALENDARS",hp="resourceScheduler/SET_CALENDARS",mp="resourceScheduler/SET_DATE_RANGE",gp="resourceScheduler/REMOVE_REQUESTED_CALENDAR",vp="resourceScheduler/REMOVE_ALL_CALENDARS",yp="resourceScheduler/ON_EVENT_CLICK",bp="resourceScheduler/ON_REFRESH",wp="resourceScheduler/SET_HANDLE_NOTIFICATIONS",Ap=function(e,t){return{type:fp,payload:{calendarType:e,ids:t}}},xp=function(e){return{type:hp,payload:{calendars:e}}},Ep=function(e){return{type:mp,payload:{dateRange:e}}},Op=function(e,t){return{type:gp,payload:{entityModel:e,id:t}}},Cp={onDateRangeChange:function(e){var t=e.dateRange;return Ep(t)},onCalendarRemove:function(e){var t=e.entityModel,n=e.id;return Op(t,n)},onCalendarRemoveAll:function(){return{type:vp}},onEventClick:function(e){return function(e,t){return{type:yp,payload:{model:e,key:t}}}(e.model,e.key)},onRefresh:function(){return{type:bp}}};const kp=(0,_.connect)((function(e,t){return{calendars:e.resourceScheduler.calendars,locale:e.intl.locale}}),Cp)((0,P.ZP)(up));var Sp=a(18446),Dp=a.n(Sp),Pp=a(35937),_p=a.n(Pp),jp=a(6479),Tp=a.n(jp),Rp=a(48926),Ip=a.n(Rp),Mp=a(74133),Np=a(88001);const Bp=function(e){var t=e.packageName,n=e.appName;return"PRODUCTION"!==Np.Z.getRunEnv()?(0,S.jsxs)("div",{children:['Fehler beim Laden der "',n,'" App im Package "',t,'".']}):null};var Zp=function(e){return"/js/tocco-".concat(e,"/dist/")},Fp=function(e,t){var n=e!==t?t:"index";return"".concat(Zp(e)).concat(n,".js")},Lp=function(e){return new Promise((function(t,n){var r=document.createElement("script");r.src=e,r.async=!0,r.type="text/javascript",r.onload=function(){t()},r.onerror=function(){n(new Error("Could not load script."))},r.crossorogin=!0;var o=document.getElementsByTagName("script")[0];o.parentNode.insertBefore(r,o)}))},Hp=function(){var e=Ip()(Zf().mark((function e(t,n){var r,o;return Zf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r="tocco-".concat(n),o=window[r]){e.next=6;break}return e.next=5,Lp(Fp(t,n));case 5:o=window[r];case 6:return e.abrupt("return",o);case 7:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}();const Up={loadBundle:Hp,loadScriptAsync:Lp,getEntryFilePath:Fp,getDistPath:Zp};const zp=function(e){var t,n=e.packageName,r=e.appName,o=(0,R.useState)(null),i=T()(o,2),a=i[0],c=i[1];return(0,R.useEffect)((function(){var e=function(){var e=Ip()(Zf().mark((function e(){var o,i,a;return Zf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Up.loadBundle(n,r);case 3:o=e.sent,i=o.app,a=i.App,(0,i.setWebpacksPublicPath)(Up.getDistPath(n)),c((function(){return a})),e.next=13;break;case 9:e.prev=9,e.t0=e.catch(0),Mp.Z.logError(e.t0),c((function(){return function(){return t||(t=(0,S.jsx)(Bp,{packageName:n,appName:r}))}}));case 13:case"end":return e.stop()}}),e,null,[[0,9]])})));return function(){return e.apply(this,arguments)}}();e()}),[]),a};Up.loadBundle,Up.loadScriptAsync,Up.getEntryFilePath;var Wp,Vp=["packageName","appName"];function Yp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}const qp=function(e){var t=e.packageName,n=e.appName,r=Tp()(e,Vp),o=zp({packageName:t,appName:n});return o?(0,S.jsx)(o,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Yp(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Yp(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},r)):Wp||(Wp=(0,S.jsx)(Z.Z,{}))};var Gp,Qp="actions/FETCH_ACTION_PACKAGES",Xp="actions/SET_ACTION_PACKAGES",Kp=function(){return{type:Qp}},$p=["appId","fetchActionPackages","actionPackages"];function Jp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function eh(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Jp(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Jp(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var th=function(){return Gp||(Gp=(0,S.jsx)(Z.Z,{}))};const nh=function(e){var t={fetchActionPackages:Kp};return(0,_.connect)((function(e){return{actionPackages:e.dynamicActions.actionPackages}}),t)((function(t){var n=t.appId,r=t.fetchActionPackages,o=t.actionPackages,i=Tp()(t,$p),a=null!=o;if((0,R.useEffect)((function(){a||r()}),[r,a]),!a)return th();var c=e[n]||function(e){if(!e)return null;var t=e.packageName,n=e.appName;return function(e){return(0,S.jsx)(qp,eh(eh({},e),{},{packageName:t,appName:n}))}}(function(e,t){var n=e?e.filter((function(e){return e.actionName===t})):null;return n&&n.length>0?n[0]:null}(o,n));if(!c)return ol.Z.logError("no action found with id: ".concat(n)),null;var s=(0,_.connect)(null,{emitAction:function(e){return d.Z.dispatchEmittedAction(e)}})(c);return(0,S.jsx)(R.Suspense,{fallback:th(),children:(0,S.jsx)(s,eh({appId:n},i))})}))},rh=Object.freeze({ACTION:"action",REPORT:"report",ACTION_GROUP:"action-group",ACTION_BAR:"action-bar"});var oh=function(e){return!!e&&Object.values(rh).indexOf(e)>=0},ih=a(24688),ah=L()({},Xp,jf.Z.singleTransferReducer("actionPackages")),ch={actionPackages:null};function sh(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ch,t=arguments.length>1?arguments[1]:void 0,n=ah[t.type];return n?n(e,t):e}var uh=a(63094),lh=Zf().mark(fh),dh=Zf().mark(ph);function fh(){return Zf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Ff.$6)([(0,Ff.Fm)(Qp,ph)]);case 2:case"end":return e.stop()}}),lh)}function ph(){var e,t;return Zf().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,Ff.RE)(uh.Z.requestSaga,"/client/actionPackages",{method:"GET"});case 2:return t=n.sent,n.next=5,(0,Ff.gz)((r=(null===(e=t.body)||void 0===e?void 0:e.actionPackages)||[],{type:Xp,payload:{actionPackages:r}}));case 5:case"end":return n.stop()}var r}),dh)}var hh="remoteEvents/REMOTE_EVENT";const mh=hh,gh=function(e){return{type:hh,payload:{event:e}}},vh=Object.freeze({CUSTOM:"custom",SIMPLE:"simple",REPORT:"report",DIVIDER:"divider",LEGACY:"legacy"});var yh=a(44422),bh=a(2100),wh=Zf().mark(Ch),Ah=Zf().mark(Ph),xh=Zf().mark(_h),Eh=Zf().mark(jh),Oh=Zf().mark(Th);function Ch(e,t,n,r,o){var i;return Zf().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:if(!e.appId){a.next=21;break}if(!e.fullscreen){a.next=11;break}if(!o.customActions||!o.customActions.fullscreen){a.next=7;break}return a.next=5,(0,Ff.RE)(_h,{definition:e,selection:t,config:o});case 5:a.next=9;break;case 7:return a.next=9,(0,Ff.RE)(ol.Z.logError,"Unable to render custom action: No fullscreen handler provided");case 9:a.next=19;break;case 11:if(!o.appComponent){a.next=17;break}return a.next=14,(0,Ff.RE)(Ph,{definition:e,config:o,selection:t});case 14:case 25:return a.abrupt("return",a.sent);case 17:return a.next=19,(0,Ff.RE)(ol.Z.logError,"Unable to render custom action: No appComponent provided");case 19:a.next=30;break;case 21:if(!(i=o&&o.customActions&&o.customActions[e.id])){a.next=28;break}return a.next=25,(0,Ff.RE)(jh,{definition:e,selection:t,parent:n,params:r,config:o,handler:i});case 28:return a.next=30,(0,Ff.RE)(ol.Z.logError,"Unable to load custom action with id ".concat(e.id));case 30:case"end":return a.stop()}}),wh)}var kh="ok",Sh="not_ok",Dh="cancel";function Ph(e){var t,n,r,o,i,a,c,s,u,l;return Zf().wrap((function(d){for(;;)switch(d.prev=d.next){case 0:return t=e.definition,n=e.selection,r=e.config,d.next=3,(0,Ff.RE)(yh.CE);case 3:return o=d.sent,d.next=6,(0,Ff.Ys)(bh.Z.localeSelector);case 6:return i=d.sent,a=r.appComponent,d.next=10,(0,Ff.gz)(m.Z.modal("action-".concat(t.appId),"client.actions.".concat(t.appId,".title"),null,(function(e){var c=e.close;return(0,S.jsx)(a,{appId:t.appId,context:r.context,actionProperties:t.properties,selection:n,navigationStrategy:r.navigationStrategy||{},locale:i,onSuccess:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.title,n=e.message,r=e.remoteEvents;c(),o.put({status:kh,title:t,message:n,remoteEvents:r})},onError:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.title,n=e.message;c(),o.put({status:Sh,title:t,message:n})},onCancel:function(){c(),o.put({status:Dh})}})}),!0));case 10:return d.next=12,(0,Ff.qn)(o);case 12:if((c=d.sent).status!==Dh){d.next=15;break}return d.abrupt("return",null);case 15:if(s=c.status===kh,null===c.title){d.next=21;break}return u=s?"success":"error",l=c.title||"client.component.actions.successDefault",d.next=21,(0,Ff.gz)(m.Z.toaster({type:u,title:l,body:c.message}));case 21:return d.abrupt("return",{success:s,remoteEvents:c.remoteEvents});case 22:case"end":return d.stop()}}),Ah)}function _h(e){var t,n,r;return Zf().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return t=e.definition,n=e.selection,r=e.config,o.next=3,(0,Ff.RE)(r.customActions.fullscreen,t,n);case 3:case"end":return o.stop()}}),xh)}function jh(e){var t,n,r,o,i,a,c,s,u,l;return Zf().wrap((function(d){for(;;)switch(d.prev=d.next){case 0:return t=e.definition,n=e.selection,r=e.config,o=e.parent,i=e.params,a=e.handler,d.next=3,(0,Ff.RE)(yh.CE);case 3:return c=d.sent,s=function(e){var t=e.title,n=e.message,r=e.remoteEvents;c.put({status:kh,title:t,message:n,remoteEvents:r})},u=function(e){var t=e.title,n=e.message;c.put({status:Sh,title:t,message:n})},l=function(){c.put({status:Dh})},d.next=9,(0,Ff.RE)(a,t,n,o,i,r,s,u,l);case 9:return d.next=11,(0,Ff.RE)(Th,c);case 11:return d.abrupt("return",d.sent);case 12:case"end":return d.stop()}}),Eh)}function Th(e){var t,n,r,o;return Zf().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,(0,Ff.qn)(e);case 2:if((t=i.sent).status!==Dh){i.next=5;break}return i.abrupt("return",null);case 5:if(n=t.status===kh,!t.title){i.next=11;break}return r=n?"success":"error",o="default"===t.title?"client.component.actions.successDefault":t.title,i.next=11,(0,Ff.gz)(m.Z.toaster({type:r,title:o,body:t.message}));case 11:return i.abrupt("return",{success:n,remoteEvents:t.remoteEvents});case 12:case"end":return i.stop()}}),Oh)}var Rh=a(68630),Ih=a.n(Rh);function Mh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Nh(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Mh(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Mh(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Bh=Zf().mark($h),Zh=Zf().mark(tm),Fh=Zf().mark(nm),Lh=Zf().mark(rm),Hh=Zf().mark(om),Uh=Zf().mark(im),zh=Zf().mark(am),Wh=Zf().mark(fm),Vh=Zf().mark(pm),Yh=Zf().mark(hm);function qh(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return Gh(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Gh(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){c=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(c)throw i}}}}function Gh(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Qh=["Single selection only, aborting...","Nothing selected, aborting..."],Xh=function(e){return new Promise((function(t,n){var r=document.createElement("script");r.src=e,r.onload=t,r.onerror=n,document.head.appendChild(r)}))},Kh=function(e){return new Promise((function(t,n){var r=document.getElementsByTagName("head")[0],o=document.createElement("link");o.rel="stylesheet",o.type="text/css",o.href=e,o.media="all",o.onload=t,o.onerror=n,r.appendChild(o)}))};function $h(e){var t,n,r,o,i;return Zf().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return t=window.legacyActionEnv||"new",a.next=3,(0,Ff.RE)(uh.Z.fetchServerSettings);case 3:n=a.sent,r=qh(e),a.prev=5,r.s();case 7:if((o=r.n()).done){a.next=14;break}if(!(i=o.value).envs.includes(t)){a.next=12;break}return a.next=12,(0,Ff.RE)(i.handler,"".concat(i.src,"?v=").concat(n.niceRevision));case 12:a.next=7;break;case 14:a.next=19;break;case 16:a.prev=16,a.t0=a.catch(5),r.e(a.t0);case 19:return a.prev=19,r.f(),a.finish(19);case 22:case"end":return a.stop()}}),Bh,null,[[5,16,19,22]])}var Jh=[{src:"/nice2/javascript/lang.release.js",handler:Xh,envs:["new"]},{src:"/nice2/javascript/nice2-ext-newclient-actions.release.js",handler:Xh,envs:["new"]},{src:"/nice2/javascript/nice2-admin.release.js",handler:Xh,envs:["new"]},{src:"/nice2/javascript/nice2-newclient-actions-public.release.js",handler:Xh,envs:["legacy-public"]},{src:"/nice2/javascript/nice2-newclient-actions-setup.release.js",handler:Xh,envs:["legacy-public","legacy-admin","new"]},{src:"/nice2/dwr-all.js",handler:Xh,envs:["new"]},{src:"/js/ext-extensions/ckeditor/ckeditor/ckeditor.js",handler:Xh,envs:["new"]},{src:"/css/themes/blue-medium.css",handler:Kh,envs:["new"]},{src:"/css/nice2-admin.css",handler:Kh,envs:["new"]},{src:"/css/nice2-new-client-legacy-actions.css",handler:Kh,envs:["new"]}],em=function(e,t){return function(n){e.put(n),t&&t.put(n)}};function tm(e){var t,n;return Zf().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=3,(0,Ff.qn)(e);case 3:return t=r.sent,n=gh(t),r.next=7,(0,Ff.gz)(n);case 7:r.next=0;break;case 9:case"end":return r.stop()}}),Zh)}function nm(){var e,t,n,r;return Zf().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,(0,Ff.RE)([window.app,window.app.getDataRegistry]);case 2:if(!(e=o.sent).setNewClientCallback){o.next=18;break}return o.next=6,(0,Ff.RE)(yh.CE);case 6:return t=o.sent,o.next=9,(0,Ff.RE)(yh.CE);case 9:return n=o.sent,o.next=12,(0,Ff.RE)(em,t,n);case 12:return r=o.sent,o.next=15,(0,Ff.RE)([e,e.setNewClientCallback],r);case 15:return o.next=17,(0,Ff.Cs)(tm,t);case 17:return o.abrupt("return",n);case 18:case"end":return o.stop()}}),Fh)}function rm(e){var t,n;return Zf().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:t=e.message.replace(/&nbsp;/g," "),r.t0=e.level,r.next="ERROR"===r.t0?4:"INFO"===r.t0?6:8;break;case 4:return n=m.Z.toaster({type:"error",title:t}),r.abrupt("break",9);case 6:return n=m.Z.toaster({type:"info",title:t}),r.abrupt("break",9);case 8:throw new Error("Unsupported notification level: ".concat(e.level));case 9:if(!n){r.next=12;break}return r.next=12,(0,Ff.gz)(n);case 12:case"end":return r.stop()}}),Lh)}function om(e){var t;return Zf().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=3,(0,Ff.qn)(e);case 3:return t=n.sent,n.next=6,(0,Ff.RE)(rm,t);case 6:n.next=0;break;case 8:case"end":return n.stop()}}),Hh)}function im(){var e,t,n,r;return Zf().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,(0,Ff.RE)([window.app,window.app.getGui]);case 2:return e=o.sent,o.next=5,(0,Ff.RE)([e,e.getNotifier]);case 5:if(!(t=o.sent).setNewClientCallback){o.next=17;break}return o.next=9,(0,Ff.RE)(yh.CE);case 9:return n=o.sent,o.next=12,(0,Ff.RE)(em,n);case 12:return r=o.sent,o.next=15,(0,Ff.RE)([t,t.setNewClientCallback],r);case 15:return o.next=17,(0,Ff.Cs)(om,n);case 17:case"end":return o.stop()}}),Uh)}function am(){return Zf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!0===window.legacyActionsEnvInitialized){e.next=5;break}return e.next=3,(0,Ff.RE)($h,Jh);case 3:return e.next=5,(0,Ff.RE)(window.setUpLegacyActionsEnv);case 5:return e.next=7,(0,Ff.RE)(im);case 7:return e.next=9,(0,Ff.RE)(nm);case 9:return e.abrupt("return",e.sent);case 10:case"end":return e.stop()}}),zh)}var cm=function(e){return e.list},sm=function(e){return e.entityList?Nh(Nh({},e.input),e.entityList):void 0},um=function(e){return e.entityDetail?Nh(Nh({},e.input),e.entityDetail):void 0},lm=function(e){return Nh(Nh({},new window.nice2.netui.ManualQuery),{},{entityName:e.entityName,queryWhere:e.query.where})},dm=function(e){return Nh(Nh({},new window.form.FormIdentifier),{},{scope:"list",formName:e.formDefinition.id})};function fm(e){var t,n;return Zf().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(t={entityName:e.entityName},"ID"!==e.type){r.next=6;break}t.selectedEntities=e.ids,t.selectionType="SELECTION",r.next=17;break;case 6:if("QUERY"!==e.type){r.next=16;break}return r.next=9,(0,Ff.Ys)(cm);case 9:n=r.sent,t.selectionType="NEW_CLIENT_QUERY",t.manualQuery=lm(e),t.listForm=dm(n),t.searchFilters=e.query.filter,r.next=17;break;case 16:throw new Error("Unsupported selection type: ".concat(e.type));case 17:return r.abrupt("return",t);case 18:case"end":return r.stop()}}),Wh)}function pm(){var e,t;return Zf().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,Ff.Ys)(sm);case 2:return e=n.sent,n.next=5,(0,Ff.Ys)(um);case 5:if(t=n.sent,!e||!t){n.next=8;break}throw new Error("Unable to get form scope. Unexpected state: entityList and entityDetail exist");case 8:if(!e){n.next=10;break}return n.abrupt("return","list");case 10:if(!t){n.next=20;break}if("update"!==t.mode){n.next=15;break}return n.abrupt("return","detail");case 15:if("create"!==t.mode){n.next=19;break}return n.abrupt("return","create");case 19:throw new Error("Unable to get form scope. Unexpected detail mode: ".concat(t.mode));case 20:throw new Error("Unable to get form scope. Expected to find either entityList or entityDetail in state");case 21:case"end":return n.stop()}}),Vh)}function hm(e,t,n,r,o){var i,a,c,s,u,l,d,f,p,h;return Zf().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,Ff.RE)(am);case 2:if(i=n.sent,(a=new window.nice2.netui.actions.model.ClientActionDefinition(e.path,e.id)).setEnabled(!e.readOnly),!Ih()(e.properties)){n.next=9;break}return c=Object.entries(e.properties).map((function(e){var t=T()(e,2),n=t[0],r=t[1];return(0,Ff.RE)([a,a.setProperty],n,r)})),n.next=9,(0,Ff.$6)(c);case 9:if((s=new window.nice2.modules.NewClientLegacyActionsModule({entityName:t.entityName,formName:t.entityName})).init(),u=new window.nice2.modules.NewClientLegacyActionsPanel({entityName:t.entityName}),l=new window.nice2.modules.entityexplorer.EntityExplorerActionContext(s,u),"ID"===t.type&&1===t.ids.length&&(l.getRecord=function(){return{id:t.ids[0]}}),n.t0=t.entityName,n.t1=e.scope,n.t1){n.next=20;break}return n.next=19,(0,Ff.RE)(pm);case 19:n.t1=n.sent;case 20:return n.t2=n.t1,d={entityName:n.t0,scope:n.t2},f=window.NetuiActionRegistry.newActionFromDefinition(a,d,l),n.next=25,(0,Ff.RE)(fm,t);case 25:p=n.sent,f.getSelectionNumber=function(){return"ID"===t.type?t.ids.length:0},f.getSelection=function(){return p},n.prev=28,f.perform(),n.next=37;break;case 32:if(n.prev=32,n.t3=n.catch(28),h=n.t3 instanceof Error?n.t3.message:n.t3,Qh.includes(h)){n.next=37;break}throw n.t3;case 37:if(!i){n.next=41;break}return n.next=40,(0,Ff.qn)(i);case 40:return n.abrupt("return",{success:!0});case 41:case"end":return n.stop()}}),Yh,null,[[28,32]])}var mm=a(36968),gm=a.n(mm);function vm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ym(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?vm(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vm(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var bm=a(13218),wm=a.n(bm),Am=a(78718),xm=a.n(Am),Em=a(54061),Om=a.n(Em),Cm=a(87185),km=a.n(Cm);function Sm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Dm(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Sm(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Sm(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Pm={KEY:"__key",MODEL:"__model",VERSION:"__version"},_m=["key","display","model","version"],jm=function(e,t){switch(e){case"entity":return t?xm()(t,_m):null;case"entity-list":return t.length>0?t.map((function(e){return xm()(e,_m)})):null;case"login":return nf()(t,"username");case"longitude":case"latitude":return nf()(t,"value");default:return t}},Tm=function(e,t){return Om()(t,(function(e,t,n){var r=(Array.isArray(t)?t:[t]).filter((function(e){return null!==e}));return Dm(Dm({},e),{},L()({},n,km()([].concat(z()(e[n]||[]),z()(r)),Dp())))}),e)},Rm=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return Om()(t,(function(t,r,o){var i=[].concat(z()(n),[o]),a={};r.value&&(a=Array.isArray(r.value)?r.value.reduce((function(t,n){var r=e(n.paths,i);return Tm(t,r)}),{}):e(r.value.paths,i));var c=L()({},i.join("."),jm(r.type,r.value));return Dm(Dm(Dm({},t),c),a)}),{})};function Im(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Mm(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Im(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Im(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Nm=function(e){return!e.hidden},Bm=function(e,t){var n=t&&t.findIndex((function(t){return t.field===e.id}));return n>=0?{sortRank:n+1,order:t[n].order}:null},Zm=["counter","decimal","double","integer","latitude","long","longitude","moneyamount","percent","serial","sorting","version"],Fm=function(e){return e.children&&1===e.children.length&&Zm.includes(e.children[0].dataType)};const Lm={metaFields:Pm,relationFieldTypes:["single-select-box","multi-select-box","single-remote-field","multi-remote-field"],relevantRelationAttributes:_m,getFlattenEntity:function(e){var t;return Dm((t={},L()(t,Pm.KEY,e.key),L()(t,Pm.MODEL,e.model),L()(t,Pm.VERSION,e.version),t),Rm(e.paths))},flattenPaths:Rm,toEntity:function(e){var t=function e(t){return Array.isArray(t)?t.map((function(t){return e(t)})):wm()(t)?xm()(t,["key","version","id","resourceKey"]):t},n=Object.keys(e).reduce((function(n,r){if(i=r,!Object.values(Pm).includes(i)){var o=r.split(".").join(".paths.").split(".");return gm()(n,o,t(e[r]))}var i;return n}),{});return{model:e[Pm.MODEL],key:e[Pm.KEY],version:e[Pm.VERSION],paths:n}},getPathDisplayRequest:function(e,t,n){var r={};return e.forEach((function(e){t.forEach((function(t){if(e[t]){var o=e[t];(Array.isArray(o)?o:[o]).filter((function(e){return null!==e})).forEach((function(e){var t=e.model,o=e.key;(function(e,t,n){return!!nf()(n,["defaultDisplays",e,t],"")})(t,o,n)||function(e,t,n){return nf()(n,[e],[]).includes(t)}(t,o,r)||gm()(r,[t],[].concat(z()(nf()(r,[t],[])),[o]))}))}}))})),r},getDisplayRequest:function(e){return e.reduce((function(e,t){return ym(ym({},e),{},L()({},t.model,[].concat(z()(e[t.model]||[]),[t.key])))}),{})},getColumnDefinition:function(e,t,n){for(var r=arguments.length,o=new Array(r>3?r-3:0),i=3;i<r;i++)o[i-3]=arguments[i];return e?e.filter((function(e){return!e.hidden})).filter((function(e){return e.children.filter(Nm).length>0})).map((function(e,r){return{idx:r,id:e.id,label:e.label,sorting:Mm({sortable:e.sortable},Bm(e,t)),children:e.children.filter(Nm),resizable:!e.widthFixed,rightAligned:Fm(e),CellRenderer:function(e){var t=e.rowData;return e.column.children.map((function(e){return n.apply(void 0,[e,t].concat(o))}))}}})):[]}};var Hm=a(23369),Um=a(28721),zm={emitAction:function(e){return d.Z.dispatchEmittedAction(e)}};const Wm=(0,_.connect)(null,zm);function Vm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ym(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Vm(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Vm(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var qm,Gm,Qm,Xm="generalSettings",Km="recipientSettings",$m=(Object.freeze({DISPLAY:"display",DOWNLOAD:"download"}),function(e,t){var n=function(e){return t.formatMessage({id:e})},r=function(t){return(e[t]||[]).map((function(e){return{children:[Ym(Ym({componentType:"field",dataType:e.dataType,defaultValue:e.defaultValue,id:e.id,label:e.label||e.description,path:e.id},e.targetEntity?{targetEntity:e.targetEntity}:{}),e.validation?{validation:e.validation}:{})],componentType:"field-set",hidden:!1,id:e.id,label:e.label||e.description,readonly:e.disabled,scopes:[]}}))};return{componentType:"form",label:null,modelid:"Bill_report_settings",readonly:!1,children:[{componentType:"layout",id:"generalSettings",label:n("client.common.report.generalSettings"),layoutType:"vertical-box",children:r(Xm)},{componentType:"layout",id:"recipientSettings",label:n("client.common.report.recipientSettings"),layoutType:"vertical-box",children:r(Km)}]}}),Jm=(l().shape({customSettings:l().shape({form:l().object,entity:l().object}),generalSettings:l().array,recipient:l().array,description:l().shape({name:l().string.isRequired})}),a(88601)),eg=b.ZP.div.withConfig({displayName:"StyledReportSettings"})(qm||(qm=Ld()(["\n margin-bottom: ",";\n\n && {\n > div:first-of-type {\n margin-bottom: 10px;\n }\n }\n"])),x.Z.space(1)),tg=b.ZP.div.withConfig({displayName:"StyledStickyButtons"})(Gm||(Gm=Ld()(["\n position: absolute;\n bottom: 0;\n width: calc(100% - 2 * ",");\n padding: ",";\n background-color: ",";\n z-index: 1;\n display: flex;\n justify-content: flex-end;\n\n ",":last-child {\n margin-right: 0;\n }\n"])),x.Z.space(1),x.Z.space(0),Jm.Z.color("paper"),gd.Z);function ng(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function rg(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ng(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ng(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const og=(0,P.ZP)((function(e){var t=e.settingsDefinition,n=e.formApp,r=e.onSubmit,o=e.listApp,i=e.docsApp,a=e.intl,c=t.customSettings&&t.customSettings.entity,s=(0,R.useState)({valid:!1,customSettingsValid:!c}),u=T()(s,2),l=u[0],d=u[1],f=(0,R.useMemo)((function(){return Wm(n)}),[n]);return(0,S.jsxs)(eg,{children:[(0,S.jsx)(f,{listApp:o,docsApp:i,form:$m(t,a),noButtons:!0,onChange:function(e){var t=e.values,n=e.valid;d((function(e){return rg(rg({},e),{},{values:t,valid:n})}))},mode:"create"}),c&&(0,S.jsx)(f,{listApp:o,docsApp:i,form:t.customSettings.form.form,noButtons:!0,onChange:function(e){var t=e.values,n=e.valid;d((function(e){return rg(rg({},e),{},{customSettings:t,customSettingsValid:n})}))},mode:"create"}),(0,S.jsx)(tg,{children:(0,S.jsx)(pd.Z,{ink:"primary",disabled:!l.customSettingsValid||!l.valid,onClick:function(){var e,n,o=rg(rg({},function(e,t){var n=function(n){return L()({},n,(e[n]||[]).reduce((function(e,n){return Ym(Ym({},e),{},L()({},n.id,t[n.id]))}),{}))};return Ym(Ym({},n(Xm)),n(Km))}(t,(e=l.values,n=function(e){return e.key?e.key:e},Om()(e,(function(e,t,r){return Ym(Ym({},e),{},L()({},r,Array.isArray(t)?t.map(n):n(t)))}),{})))),{},{customSettings:l.customSettings});r(o)},look:"raised",children:Qm||(Qm=(0,S.jsx)(fd.Z,{id:"client.common.report.generate"}))})})]})}));var ig=a(28247);function ag(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return cg(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return cg(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){c=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(c)throw i}}}}function cg(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var sg=function(e){return Object.keys(e).length>=1?e[Object.keys(e)[0]]:void 0};const ug=function(e){var t,n=ag(e);try{for(n.s();!(t=n.n()).done;){var r=t.value;if(r.entityValidatorErrors)return sg(r.entityValidatorErrors)[0];if(r.paths)return sg(sg(r.paths))[0]}}catch(e){n.e(e)}finally{n.f()}return null};var lg=a(39916),dg=a(57170);function fg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function pg(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?fg(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fg(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var hg=Zf().mark(bg),mg=Zf().mark(wg),gg=Zf().mark(Ag),vg=Zf().mark(xg),yg=Zf().mark(Eg);function bg(e,t,n,r){var o,i;return Zf().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return o=e.runInBackgroundTask,i=o?wg:Ag,a.next=4,(0,Ff.RE)(i,e,t,n,r);case 4:return a.abrupt("return",a.sent);case 5:case"end":return a.stop()}}),hg)}function wg(e,t,n,r){var o;return Zf().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,(0,Ff.RE)(uh.Z.requestSaga,e.endpoint,{method:"POST",body:pg(pg({entity:t.entityName,selection:t,parent:n},r),{},{params:{background:!0},formProperties:e.properties}),acceptedErrorCodes:["VALIDATION_FAILED"]});case 2:if(!(o=i.sent).body||!1!==o.body.success){i.next=6;break}return i.next=6,(0,Ff.gz)(m.Z.toaster({type:"error",title:"client.common.unexpectedError",body:o.body.title||"client.component.actions.errorText"}));case 6:case"end":return i.stop()}}),mg)}function Ag(e,t,n,r){var o,i,a;return Zf().wrap((function(c){for(;;)switch(c.prev=c.next){case 0:return o=(0,Um.Z)(),i=e.progressMsg||"client.component.actions.defaultProgressMessage",c.next=4,(0,Ff.gz)(m.Z.blockingInfo(o,i));case 4:return c.next=6,(0,Ff.RE)(xg,e,t,n,r);case 6:return a=c.sent,c.next=9,(0,Ff.gz)(m.Z.removeBlockingInfo(o));case 9:return c.abrupt("return",pg(pg({},a),{},{remoteEvents:z()(a&&a.success?[{type:"entity-update-event",payload:{parent:n,entities:[{entityName:t.entityName}]}}]:[])}));case 10:case"end":return c.stop()}}),gg)}function xg(e,t,n,r){var o,i,a;return Zf().wrap((function(c){for(;;)switch(c.prev=c.next){case 0:return c.prev=0,c.next=3,(0,Ff.RE)(uh.Z.requestSaga,e.endpoint,{method:"POST",body:pg(pg({entity:t.entityName,selection:t,parent:n},r),{},{formProperties:e.properties}),acceptedErrorCodes:["VALIDATION_FAILED"]});case 3:if(!(o=c.sent).body||"VALIDATION_FAILED"!==o.body.errorCode){c.next=9;break}return c.next=7,(0,Ff.gz)(m.Z.toaster({type:"error",title:"client.component.actions.validationError",body:ug(o.body.errors)}));case 7:case 16:c.next=20;break;case 9:if(!(o.body&&o.body.params&&o.body.params.downloadUrl)){c.next=18;break}return i=ig.Z.getDownloadUrl(o.body.params.downloadUrl),c.next=13,(0,Ff.RE)(uh.Z.requestBytesSaga,i,{method:"POST",body:pg(pg({entity:t.entityName,selection:t,parent:n},r),{},{formProperties:e.properties})});case 13:return a=c.sent,c.next=16,(0,Ff.RE)(ig.Z.downloadReadableStream,a.body,o.body.params.filename);case 18:return c.next=20,(0,Ff.RE)(Eg,o,!0===o.body.success?"success":"warning");case 20:return c.abrupt("return",o.body);case 23:if(c.prev=23,c.t0=c.catch(0),c.t0 instanceof uh.Z.ClientQuestionCancelledException){c.next=28;break}return c.next=28,(0,Ff.gz)(p.Z.logError("client.common.unexpectedError","client.component.actions.errorText",c.t0));case 28:case"end":return c.stop()}}),vg,null,[[0,23]])}function Eg(e,t){var n,r,o,i,a;return Zf().wrap((function(c){for(;;)switch(c.prev=c.next){case 0:return n=e.body.title||"client.component.actions.successDefault",r=e.body.message,o=e.body.notificationKey?"".concat(dg.c).concat(e.body.notificationKey):void 0,i=e.body.result,a=function(e){var t=e.navigationStrategy,n=e.cancelTask;return(0,S.jsx)(lg.Z,{notification:{key:o,message:r,result:i},navigationStrategy:t,cancelTask:n})},c.next=7,(0,Ff.gz)(m.Z.toaster({type:t,title:n,message:r,body:a,key:o}));case 7:case"end":return c.stop()}}),yg)}function Og(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Cg(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Og(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Og(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var kg,Sg=Zf().mark(Tg),Dg=Zf().mark(Rg),Pg=Zf().mark(Ig),_g=Zf().mark(Mg),jg=Zf().mark(Ng);function Tg(e,t,n,r,o){var i,a;return Zf().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if("widget"!==Hm.Z.getEmbedType()){n.next=5;break}return n.next=3,(0,Ff.RE)(Ig,e,t);case 3:n.next=13;break;case 5:return n.next=7,(0,Ff.RE)(yh.CE);case 7:return i=n.sent,n.next=10,(0,Ff.RE)(Rg,e,t,i,o);case 10:return a=n.sent,n.next=13,(0,Ff.RE)(Ng,e,i,a,t);case 13:case"end":return n.stop()}}),Sg)}function Rg(e,t,n,r){var o,i,a;return Zf().wrap((function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,(0,Ff.RE)(Mg,e,t);case 2:return o=c.sent,i=function(e){return n.put({formValues:e,settingsDefinition:o})},c.next=6,(0,Ff.RE)(Um.Z);case 6:return a=c.sent,c.next=9,(0,Ff.gz)(m.Z.modal(a,o.description.name,null,(function(){return(0,S.jsx)(og,{listApp:r.listApp,docsApp:r.docsApp,formApp:r.formApp,onSubmit:i,settingsDefinition:o})}),!0));case 9:return c.abrupt("return",a);case 10:case"end":return c.stop()}}),Dg)}function Ig(e,t){var n,r,o;return Zf().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,(0,Ff.RE)(Mg,e,t);case 2:return n=i.sent,r=n.generalSettings.reduce((function(e,t){var n;return Cg(Cg({},e),{},L()({},t.id,(null===(n=t.defaultValue)||void 0===n?void 0:n.key)||t.defaultValue))}),{}),e.endpoint="report/generations",o={additionalProperties:{reportId:e.reportId,generalSettings:r,recipientSettings:{}},formData:null},i.next=8,(0,Ff.RE)(wg,e,t,null,o);case 8:case"end":return i.stop()}}),Pg)}function Mg(e,t){var n,r,o,i;return Zf().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return n={body:t,method:"POST"},r="report/".concat(e.reportId,"/settings"),a.next=4,(0,Ff.RE)(uh.Z.requestSaga,r,n);case 4:return o=a.sent,i=o.body,a.abrupt("return",i);case 7:case"end":return a.stop()}}),_g)}function Ng(e,t,n,r){var o,i,a,c,s,u,l,d;return Zf().wrap((function(f){for(;;)switch(f.prev=f.next){case 0:return f.next=3,(0,Ff.qn)(t);case 3:return o=f.sent,i=o.formValues,a=i.customSettings,c=i.generalSettings,s=i.recipientSettings,u=o.settingsDefinition,e.endpoint="report/generations",l=u.customSettings?Lm.toEntity(Cg({__model:u.customSettings.entity.name},a)):null,d={additionalProperties:{reportId:e.reportId,generalSettings:c,recipientSettings:s},formData:l},f.next=14,(0,Ff.RE)(wg,e,r,null,d);case 14:return f.next=16,(0,Ff.gz)(m.Z.removeModal(n));case 16:f.next=0;break;case 18:case"end":return f.stop()}}),jg)}const Bg=(kg={},L()(kg,vh.SIMPLE,bg),L()(kg,vh.REPORT,Tg),L()(kg,vh.CUSTOM,Ch),L()(kg,vh.LEGACY,hm),kg);var Zg,Fg,Lg="actions/ACTION_INVOKE",Hg="actions/ACTION_IN_PROGRESS",Ug="actions/ACTION_INVOKED",zg=function(e,t,n){return{type:Lg,payload:{definition:e,selection:t,parent:n}}},Wg=function(e,t,n){return{type:Ug,payload:{definition:e,selection:t,response:n}}},Vg=Zf().mark(qg),Yg=Zf().mark(Gg);function qg(e){var t,n;return Zf().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!(t=e.preparationResponse).preCheck||!t.preCheck.confirmMessage){r.next=6;break}return r.next=4,(0,Ff.RE)(Gg,t.preCheck.confirmMessage);case 4:return n=r.sent,r.abrupt("return",{abort:!n});case 6:return r.abrupt("return",{abort:!1});case 7:case"end":return r.stop()}}),Vg)}function Gg(e){var t,n,r;return Zf().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,(0,Ff.RE)(yh.CE);case 2:return t=o.sent,n=function(){return t.put(!0)},r=function(){return t.put(!1)},o.next=7,(0,Ff.gz)(m.Z.confirm("client.component.actions.confirmTitle",e,Zg||(Zg=(0,S.jsx)(fd.Z,{id:"client.common.yes"})),Fg||(Fg=(0,S.jsx)(fd.Z,{id:"client.common.cancel"})),n,r));case 7:return o.next=9,(0,Ff.qn)(t);case 9:return o.abrupt("return",o.sent);case 10:case"end":return o.stop()}}),Yg)}function Qg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Xg(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Qg(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qg(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Kg=Zf().mark(Jg),$g=Zf().mark(tv);function Jg(e){var t,n,r;return Zf().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:if(t=e.preparationResponse,n=e.config,!t.initialFormValues){o.next=6;break}return o.next=4,(0,Ff.RE)(tv,t.initialFormValues,n);case 4:return r=o.sent,o.abrupt("return",{abort:null===r,params:{formData:r}});case 6:return o.abrupt("return",{abort:!1});case 7:case"end":return o.stop()}}),Kg)}var ev=function(e){return{formValues:e}};function tv(e,t){var n,r,o,i,a,c,s,u,l,d,f,p,h;return Zf().wrap((function(g){for(;;)switch(g.prev=g.next){case 0:return n=e.formDefinition,r=e.defaultValues,o=e.conditions,i=e.formTitle,a=e.formMessage,g.next=3,(0,Ff.RE)(yh.CE);case 3:return c=g.sent,s=(new Date).valueOf(),u=function(e){var t=e.values;return c.put(ev(t))},l=function(){return c.put(ev(null))},d=Wm(t.formApp),f=iv(n.form,o),p=m.Z.modal(s,i,a,(function(){return(0,S.jsx)(d,{form:f,listApp:t.listApp,docsApp:t.docsApp,onSubmit:u,onCancel:l,defaultValues:r,mode:"create"})})),g.next=12,(0,Ff.gz)(p);case 12:return g.next=14,(0,Ff.qn)(c);case 14:return h=g.sent,g.next=17,(0,Ff.gz)(m.Z.removeModal(s));case 17:return g.abrupt("return",h.formValues?{model:n.model,paths:h.formValues}:null);case 18:case"end":return g.stop()}}),$g)}var nv,rv,ov,iv=function e(t,n){return n&&0!==Object.keys(n).length?Xg(Xg(Xg({},t),Lm.relationFieldTypes.includes(t.dataType)&&n[t.id]?{condition:n[t.id]}:{}),t.children?{children:t.children.map((function(t){return e(t,n)}))}:{}):t},av=Zf().mark(sv),cv=Zf().mark(uv);function sv(e){var t,n,r;return Zf().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:if(t=e.definition,n=e.selection,!(t.showConfirmation&&n&&n.count>t.confirmationThreshold)){o.next=6;break}return o.next=4,(0,Ff.RE)(uv,n.count);case 4:return r=o.sent,o.abrupt("return",{abort:!r});case 6:return o.abrupt("return",{abort:!1});case 7:case"end":return o.stop()}}),av)}function uv(e){var t,n,r;return Zf().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,(0,Ff.RE)(yh.CE);case 2:return t=o.sent,n=function(){return t.put(!0)},r=function(){return t.put(!1)},o.next=7,(0,Ff.gz)(m.Z.confirm(nv||(nv=(0,S.jsx)(fd.Z,{id:"client.component.actions.confirmTitle"})),(0,S.jsx)(fd.Z,{id:"client.component.actions.largeSelectionConfirm",values:{count:e}}),rv||(rv=(0,S.jsx)(fd.Z,{id:"client.common.yes"})),ov||(ov=(0,S.jsx)(fd.Z,{id:"client.common.cancel"})),n,r));case 7:return o.next=9,(0,Ff.qn)(t);case 9:return o.abrupt("return",o.sent);case 10:case"end":return o.stop()}}),cv)}var lv=Zf().mark(dv);function dv(e){var t;return Zf().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!(t=e.preparationResponse).preCheck||!1!==t.preCheck.success){n.next=3;break}return n.abrupt("return",{abort:!0,abortMessage:t.preCheck.message||"client.component.actions.errorText"});case 3:return n.abrupt("return",{abort:!1});case 4:case"end":return n.stop()}}),lv)}function fv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function pv(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?fv(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fv(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var hv=Zf().mark(gv),mv=Zf().mark(yv);function gv(e,t,n){var r;return Zf().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,(0,Ff.RE)(uh.Z.requestSaga,e.endpoint+"/check",{method:"POST",body:{selection:t,parent:n,formProperties:e.properties}});case 2:return r=o.sent,o.abrupt("return",r.body);case 4:case"end":return o.stop()}}),hv)}var vv=function(e){return[sv,dv,qg,Jg].concat(z()(e.customPreparationHandlers||[]))};function yv(e,t,n,r){var o,i,a,c,s,u,l,d,f,p;return Zf().wrap((function(h){for(;;)switch(h.prev=h.next){case 0:if(o=!1,i=null,a={},c=t,!e.endpoint){h.next=10;break}return h.next=7,(0,Ff.RE)(gv,e,t,n);case 7:h.t0=h.sent,h.next=11;break;case 10:h.t0={};case 11:return s=h.t0,h.next=14,(0,Ff.RE)(vv,r);case 14:u=h.sent,l=0;case 16:if(o||!u[l]){h.next=29;break}return d=u[l],f={preparationResponse:s,params:a,definition:e,selection:c,config:r},h.next=21,(0,Ff.RE)(d,f);case 21:p=h.sent,o=p.abort,a=pv(pv({},a),p.params),p.abortMessage&&(i=p.abortMessage),p.selection&&(c=p.selection),l++,h.next=16;break;case 29:return h.abrupt("return",{abort:o,abortMessage:i,params:a,selection:c});case 30:case"end":return h.stop()}}),mv)}const bv=yv;var wv=Zf().mark(xv),Av=Zf().mark(Ev);function xv(e){return Zf().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,Ff.$6)([(0,Ff.ib)(Lg,Ev,e)]);case 2:case"end":return t.stop()}}),wv)}function Ev(e,t){var n,r,o,i,a,c,s,u,l,d,f,p;return Zf().wrap((function(h){for(;;)switch(h.prev=h.next){case 0:return n=t.payload,r=n.definition,o=n.selection,i=n.parent,h.next=4,(0,Ff.Ys)(e);case 4:return a=h.sent,h.next=7,(0,Ff.RE)(bv,r,o,i,a);case 7:if(c=h.sent,s=c.abort,u=c.abortMessage,l=c.params,d=c.selection,s){h.next=25;break}return f=Bg[r.actionType],h.next=16,(0,Ff.RE)(f,r,d,i,l,a);case 16:if(!(p=h.sent)||!p.remoteEvents){h.next=20;break}return h.next=20,(0,Ff.$6)(p.remoteEvents.map((function(e){return(0,Ff.gz)(gh(e))})));case 20:if(!p||!p.success){h.next=23;break}return h.next=23,(0,Ff.gz)(Wg(r,d,p));case 23:h.next=28;break;case 25:if(!u){h.next=28;break}return h.next=28,(0,Ff.gz)(m.Z.toaster({type:"error",title:u}));case 28:case"end":return h.stop()}}),Av)}var Ov,Cv,kv,Sv,Dv,Pv,_v,jv,Tv=a(57557),Rv=a.n(Tv),Iv=a(46927),Mv=a(97388),Nv=a(84647),Bv=b.ZP.div.withConfig({displayName:"StyledIconWrapper"})(Ov||(Ov=(0,v.Z)(["\n margin-left: ",";\n margin-right: -",";\n"])),x.Z.space(-1.7),x.Z.space(-2.1)),Zv=(0,b.ZP)(pd.Z).withConfig({displayName:"StyledIconButtonWrapper"})(Cv||(Cv=(0,v.Z)(["\n padding-left: ",";\n padding-right: ",";\n"])),x.Z.space(-.5),x.Z.space(-.5)),Fv=b.ZP.div.withConfig({displayName:"StyledPopperWrapper"})(kv||(kv=(0,v.Z)(["\n position: relative;\n"]))),Lv=b.ZP.div.withConfig({displayName:"StyledPopper"})(Sv||(Sv=(0,v.Z)(["\n max-height: ","; // add 15px for small padding\n min-height: calc(2 * "," + ","); // min-height of 1 entry\n width: max-content;\n overflow-y: auto;\n overflow-x: hidden;\n background: ",";\n box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);\n border: 1px solid ",";\n z-index: 9999999; /* higher than StyledModalHolder */\n ","\n"])),(function(e){var t=e.rectBottom;return"calc(100vh - ".concat(t+15,"px)")}),x.Z.space(-1.4),x.Z.font(0),Jm.Z.color("paper"),Jm.Z.color("secondaryLight"),of.C),Hv=b.ZP.div.withConfig({displayName:"StyledMenuItem"})(Dv||(Dv=(0,v.Z)(["\n min-width: 200px;\n max-width: 300px;\n"]))),Uv=b.ZP.div.withConfig({displayName:"StyledItemLabel"})(Pv||(Pv=(0,v.Z)(["\n cursor: ",";\n ","\n ","\n /* increased padding on touchdevices */\n padding: ","\n calc("," + ",");\n font-weight: ",";\n box-shadow: none;\n"])),(function(e){return e.hasOnClick?"pointer":"default"}),(0,A.Z)(),Mv.Z,Nv.b?(0,b.iv)(_v||(_v=(0,v.Z)(["\n ","\n ","\n ","\n "])),x.Z.space(-1.4),x.Z.space(-.5),x.Z.space(-1.4)):(0,b.iv)(jv||(jv=(0,v.Z)(["\n ","\n ","\n ","\n "])),x.Z.space(-2),x.Z.space(-.5),x.Z.space(-2)),x.Z.space(-.5),(function(e){return 5*(e.level||0)+"px"}),(function(e){return e.isGroup?Jm.Z.fontWeight("bold"):Jm.Z.fontWeight("regular")}));function zv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Wv(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?zv(Object(n),!0).forEach((function(t){(0,Iv.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zv(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Vv=function(e){var t=e.children,n=e.onClick,r=e.onClose,o=e.disabled,i=e.closeOnClick,a=e.title,c=e.level,s=I().Children.toArray(t).filter(Boolean),u=s.length>1,l=Boolean(n),d=s.map((function(e,t){var n,s=c?c++:1;return"MenuItem"===(null===(n=e.type)||void 0===n?void 0:n.displayName)?I().cloneElement(e,Wv(Wv({},e.props),{},{onClose:r,closeOnClick:i,level:s,key:"menu-item-".concat(t,"-").concat(s)})):(0,S.jsx)(Uv,{hasOnClick:l,isGroup:u,title:a,disabled:o,look:"raised",level:c,children:e},"menu-item-label-".concat(t,"-").concat(s))}));return(0,S.jsx)(Hv,{onClick:function(e){l&&!o&&(n(),i&&r&&r()),e.stopPropagation()},level:c,children:d})};Vv.defaultProps={closeOnClick:!0},Vv.displayName="MenuItem";const Yv=Vv;var qv=a(32654);function Gv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Qv(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Gv(Object(n),!0).forEach((function(t){(0,Iv.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Gv(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const Xv=function(e){var t=e.referenceElement,n=e.onClose,r=e.open,o=e.children,i=(0,R.useRef)(null),a=(0,R.useState)(null),c=(0,wd.Z)(a,2),s=c[0],u=c[1],l=(0,R.useState)(0),d=(0,wd.Z)(l,2),f=d[0],p=d[1],h=(0,R.useCallback)((function(e){i&&i.current&&!i.current.contains(e.target)&&s&&!s.contains(e.target)&&t&&!t.contains(e.target)&&n()}),[t,s,n]);(0,R.useEffect)((function(){return i.current&&p(i.current.getBoundingClientRect().bottom),document.addEventListener("mousedown",h),function(){document.removeEventListener("mousedown",h)}}),[h]);var m=(0,qv.D)(t,s,{placement:"bottom-start",modifiers:[{name:"offset",options:{offset:[0,5]}}]}),g=m.styles,v=m.attributes;return r?(0,S.jsx)(Fv,{ref:i,children:o&&N().createPortal((0,S.jsx)(Lv,Qv(Qv({ref:u,style:g.popper},v.popper),{},{rectBottom:f,children:I().Children.map(o,(function(e){return e&&I().cloneElement(e,{onClose:n})}))})),document.body)}):null};function Kv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function $v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Kv(Object(n),!0).forEach((function(t){(0,Iv.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Kv(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const Jv=function(e){var t=e.onOpen,n=e.children,r=e.onClick,o=e.buttonProps,i=e.label,a=e.icon,c=(0,R.useRef)(null),s=(0,R.useState)(!1),u=(0,wd.Z)(s,2),l=u[0],d=u[1],f=(0,R.useState)(!1),p=(0,wd.Z)(f,2),h=p[0],m=p[1],g=function(){d(!l),t&&!h&&(t(),m(!0))},v=function(){d(!1)},y=l?"chevron-up":"chevron-down",b=function(){return(0,S.jsx)(Xv,{referenceElement:c.current,open:l,onClose:v,children:n})};return r?(0,S.jsxs)(S.Fragment,{children:[(0,S.jsxs)(bd,{ref:c,children:[(0,S.jsx)(pd.Z,$v($v({},o||{}),{},{onClick:r,label:i,"data-cy":e["data-cy"],icon:a})),(0,S.jsx)(Zv,$v({icon:y,onClick:g},o||{}))]}),l&&(0,S.jsx)(b,{})]}):(0,S.jsxs)(S.Fragment,{children:[(0,S.jsxs)(pd.Z,$v($v({"data-cy":e["data-cy"]},o||{}),{},{ref:c,onClick:g,icon:a,children:[(0,S.jsx)(gd.s,{children:i}),(0,S.jsx)(Bv,{children:(0,S.jsx)(B.Z,{icon:y})})]})),l&&(0,S.jsx)(b,{})]})};var ey=function(e,t){var n=t.minSelection,r=t.maxSelection;return!(ny(e,n)||ry(e,r))},ty=function(e,t,n){var r=t.minSelection,o=t.maxSelection;return ny(e,r)?n.formatMessage({id:"client.component.actions.notEnoughSelected"},{minSelection:r}):ry(e,o)?n.formatMessage({id:"client.component.actions.tooManySelected"},{maxSelection:o}):null},ny=function(e,t){return t&&e<t},ry=function(e,t){return t&&e>t};function oy(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function iy(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?oy(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oy(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ay=function e(t){var n=t.onClick,r=t.definition,o=t.selectedCount,i=t.intl,a=ey(o,r),c=!0===r.readonly||!a,s=ty(o,r,i),u="action-group"===r.componentType;return(0,R.createElement)(Yv,iy(iy({},!u&&!c&&{onClick:function(){return n(r)}}),{},{disabled:c,title:s,key:"MenuItem-".concat(r.id)}),(0,S.jsx)("span",{children:r.label}),"action-group"===r.componentType&&r.children.map((function(n){return e(iy(iy({},t),{},{definition:n}))})))};const cy=(0,P.ZP)((function(e){var t=e.definition,n=e.onClick,r=t.defaultAction&&Object.keys(t.defaultAction).length>0,o=r?t.defaultAction.label:t.label,i=r?function(){n(t.defaultAction)}:null,a=r?t.defaultAction.id:t.id;return(0,S.jsx)(Jv,{buttonProps:{look:"raised"},label:o,"data-cy":"action-".concat(a),onClick:i,icon:t.icon,children:t.children.map((function(t,n){return ay(iy(iy({},e),{},{definition:t}))}))})}));const sy=(0,P.ZP)((function(e){var t=e.definition,n=e.onClick,r=e.selectedCount,o=e.disabled,i=e.intl,a=function(e){return!("NO"===e.useLabel||"HIDE"===e.useLabel)},c=!0===t.readonly||!ey(r,t)||o,s=t.label&&a(t)?t.label:"",u=ty(r,t,i)||(a(t)?"":t.label);return(0,S.jsx)(pd.Z,{iconOnly:"ICON"===t.buttonType,"data-cy":"action-".concat(t.id),look:"ICON"===t.buttonType?"flat":"raised",withoutBackground:"ICON"===t.buttonType,onClick:function(e){n(t),e.stopPropagation()},icon:t.icon,label:s,title:u,disabled:c})}));function uy(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ly(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?uy(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uy(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var dy=function(e){var t=e.definition,n=e.onClick,r=e.selection,o=e.parent,i=e.mode,a=e.callback,c=e.disabled,s=e.customRenderedActions;if(s&&s[t.id])return s[t.id](t);if(!function(e,t){return!e||!t||t.length<0||t.includes(e)}(i,t.scopes))return null;var u=t.componentType===rh.ACTION_GROUP?cy:sy;return(0,S.jsx)(u,{definition:t,onClick:function(e){n(Rv()(e,["label"]),r,o,a)},selectedCount:r.count,disabled:c})};const fy=function(e){return e.definition.componentType===rh.ACTION_BAR?e.definition.children.map((function(t){return(0,S.jsx)(dy,ly(ly({},e),{},{definition:t}),"action-".concat(e.definition.id,"-").concat(t.id))})):(0,S.jsx)(dy,ly({},e))};var py={onClick:zg};const hy=(0,_.connect)(null,py)(fy);const my={isAction:oh,Action:hy,actionFactory:nh,addToStore:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){return{}};e.sagaMiddleware.run(ih.Z.autoRestartSaga(xv,t,p.Z.logError))},dynamicActionsAddToStore:function(e){jf.Z.injectReducers(e,{dynamicActions:sh}),e.sagaMiddleware.run(fh)},actions:e,getSingleEntitySelection:function(e,t){return{entityName:e,type:"ID",ids:[t],count:1}}};var gy,vy,yy,by=a(15857),wy="formData/CHANGE_FIELD_VALUE",Ay="formData/TOUCH_FIELD",xy=function(e,t,n){return{type:wy,payload:{formName:e,fieldName:t,value:n}}},Ey="formData/OPEN_ADVANCED_SEARCH",Oy="formData/OPEN_DOCS_TREE_SEARCH",Cy="formData/ADVANCED_SEARCH_UPDATE",ky="formData/ADVANCED_SEARCH_CLOSE",Sy=function(e){return{type:Cy,payload:{ids:e}}},Dy=function(){return{type:ky}},Py=b.ZP.div.withConfig({displayName:"StyledAdvancedSearch"})(gy||(gy=Ld()(["\n && {\n > *:not(:last-child) {\n margin-bottom: ",";\n }\n }\n"])),x.Z.space(-1)),_y=b.ZP.div.withConfig({displayName:"StyledAdvancedSearchButtonWrapper"})(vy||(vy=Ld()(["\n background: ",";\n padding-top: ",";\n padding-bottom: ",";\n z-index: 1;\n position: sticky;\n bottom: 0;\n display: flex;\n justify-content: flex-end;\n\n "," {\n margin-right: 0;\n }\n"])),Jm.Z.color("paper"),x.Z.space(.5),x.Z.space(-.1),gd.Z);const jy=function(e){var t=e.entityName,n=e.formName,r=e.listFormDefinition,o=e.onSelectionChange,i=e.selection,a=e.searchTerm,c=e.emitAction,s=e.multi,u=e.constriction,l=e.onOkClick,d=e.ListApp;return(0,S.jsxs)(Py,{children:[(0,S.jsx)(d,{id:"advancedSearch-".concat((0,Um.Z)()),entityName:t,formName:n,scope:"remotefield",listFormDefinition:r,limit:15,onSelectChange:o,selection:i,emitAction:c,selectionStyle:s?"multi":"single",selectOnRowClick:!0,disableSelectionController:!0,showActions:!1,scrollBehaviour:"inline",tableMinHeight:"400px",constriction:u,preselectedSearchFields:[{id:"txtFulltext",value:a,hidden:!1}]}),(0,S.jsx)(_y,{children:(0,S.jsx)(pd.Z,{look:"raised",onClick:l,children:yy||(yy=(0,S.jsx)(fd.Z,{id:"client.common.ok"}))})})]})};var Ty={emitAction:d.Z.dispatchEmittedAction};const Ry=(0,_.connect)(null,Ty)(jy);var Iy,My=function(e){return null===e?"DocsTreeSearch_root_docs_list_item":"DocsTreeSearch_docs_list_item"};const Ny=function(e){var t,n=e.entityName,r=e.onSelectionChange,o=e.selection,i=e.emitAction,a=e.multi,c=e.onOkClick,s=e.DocsApp,u=(0,R.useState)((t=o)?t.map((function(e){return"".concat(n,"/").concat(e)})):[]),l=T()(u,2),d=l[0],f=l[1];return(0,S.jsxs)(Py,{children:[(0,S.jsx)(s,{routerType:"routerless",listLimit:15,selectionStyle:a?"multi":"single",selection:d,selectionFilterFn:function(e){return(null==e?void 0:e.type)===n},searchFormType:"none",disableViewPersistor:!0,getListFormName:My,navigationStrategy:{},embedded:!0,noLeftPadding:!0,sortable:!1,scrollBehaviour:"none",onSelectChange:function(e){r(function(e){return e.map((function(e){var t=e.split("/"),n=T()(t,2);return{name:n[0],key:n[1]}})).filter((function(e){return e.name===n})).map((function(e){return e.key}))}(e)),f(e)},emitAction:i,openResource:function(){}}),(0,S.jsx)(_y,{children:(0,S.jsx)(pd.Z,{look:"raised",onClick:c,children:Iy||(Iy=(0,S.jsx)(fd.Z,{id:"client.common.ok"}))})})]})};var By={emitAction:d.Z.dispatchEmittedAction};const Zy=(0,_.connect)(null,By)(Ny);var Fy=function(e,t){return e?t?e.map((function(e){return e.key})):[e.key]:[]},Ly=function(e,t){return t?e:e.length>0?{key:e[0].key,display:e[0].display}:null},Hy=function(e,t,n,r,o,i,a,c,s,u,l){var d;return function(){return d||(d=(0,S.jsx)(Ry,{ListApp:e,entityName:t,formName:n,listFormDefinition:r,selection:o,onSelectionChange:i,onOkClick:a,field:c,multi:s,constriction:u,searchTerm:l}))}},Uy=function(e,t,n,r,o,i){var a;return function(){return a||(a=(0,S.jsx)(Zy,{DocsApp:e,entityName:t,selection:n,onSelectionChange:r,onOkClick:o,multi:i}))}};function zy(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Wy(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?zy(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zy(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Vy=Zf().mark(Ky),Yy=Zf().mark($y),qy=Zf().mark(Jy),Gy=Zf().mark(eb),Qy=Zf().mark(tb),Xy=Zf().mark(nb);function Ky(e){return Zf().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,Ff.$6)([(0,Ff.ib)(Ey,Jy,e),(0,Ff.ib)(Oy,$y,e)]);case 2:case"end":return t.stop()}}),Vy)}function $y(e,t){var n,r,o,i,a,c,s,u,l,d,f,p,h,g,v;return Zf().wrap((function(y){for(;;)switch(y.prev=y.next){case 0:return n=t.payload,y.next=3,(0,Ff.Ys)(e);case 3:return r=y.sent,o=r.docsApp,i=n.formName,a=n.formField,c=n.value,s=a.id,u=a.label,l=a.targetEntity,d=a.dataType,f="multi-remote-field"===d,y.next=10,(0,Ff.RE)(yh.CE);case 10:return p=y.sent,y.next=13,(0,Ff.RE)(Um.Z);case 13:return h=y.sent,y.next=16,(0,Ff.RE)(Fy,c,f);case 16:return g=y.sent,v=Uy(o,l,g,(function(e){p.put(Sy(e))}),(function(){p.put(Dy())}),f),y.next=22,(0,Ff.gz)(m.Z.modal(h,u,null,v,!0));case 22:return y.next=24,(0,Ff.Cs)(tb,p,h,s,i,l,f);case 24:case"end":return y.stop()}}),Yy)}function Jy(e,t){var n,r,o,i,a,c,s,u,l,d,f,p,h,g,v,y,b,w,A,x,E;return Zf().wrap((function(O){for(;;)switch(O.prev=O.next){case 0:return n=t.payload,O.next=3,(0,Ff.Ys)(e);case 3:return r=O.sent,o=r.listApp,i=n.formName,a=n.formField,c=n.searchTerm,s=n.value,u=a.id,l=a.label,d=a.formBase,f=a.targetEntity,p=a.dataType,h=a.formName,g=a.constriction,v="multi-remote-field"===p,y=h?"".concat(f,"_").concat(h):d||f,O.next=11,(0,Ff.RE)(uh.Z.fetchForm,y,"remotefield");case 11:return b=O.sent,O.next=14,(0,Ff.RE)(yh.CE);case 14:return w=O.sent,O.next=17,(0,Ff.RE)(Um.Z);case 17:return A=O.sent,O.next=20,(0,Ff.RE)(Fy,s,v);case 20:return x=O.sent,E=Hy(o,f,y,b,x,(function(e){w.put(Sy(e))}),(function(){w.put(Dy())}),u,v,g,c),O.next=24,(0,Ff.gz)(m.Z.modal(A,l,null,E,!0));case 24:return O.next=26,(0,Ff.Cs)(tb,w,A,u,i,f,v);case 26:case"end":return O.stop()}}),qy)}function eb(e){var t,n;return Zf().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,(0,Ff.RE)(Lm.getDisplayRequest,e);case 2:return t=r.sent,r.next=5,(0,Ff.RE)(uh.Z.fetchDisplays,t);case 5:return n=r.sent,r.abrupt("return",e.map((function(e){return Wy(Wy({},e),{},{display:n[e.model][e.key]})})));case 7:case"end":return r.stop()}}),Gy)}function tb(e,t,n,r,o,i){var a,c,s,u,l,d,f,p;return Zf().wrap((function(h){for(;;)switch(h.prev=h.next){case 0:a=!0;case 1:if(!a){h.next=37;break}return h.next=4,(0,Ff.qn)(e);case 4:if(c=h.sent,s=c.payload,(u=c.type)!==Cy){h.next=31;break}if(!((null===(l=s.ids)||void 0===l?void 0:l.length)>0)){h.next=23;break}return d={keys:s.ids},h.next=12,(0,Ff.RE)(uh.Z.fetchEntities,o,d);case 12:return f=h.sent,h.next=15,(0,Ff.RE)(eb,f);case 15:return f=h.sent,h.next=18,(0,Ff.RE)(Ly,f,i);case 18:return p=h.sent,h.next=21,(0,Ff.RE)(nb,r,n,p);case 21:h.next=25;break;case 23:return h.next=25,(0,Ff.RE)(nb,r,n,[]);case 25:if(i){h.next=29;break}return h.next=28,(0,Ff.gz)(m.Z.removeModal(t));case 28:a=!1;case 29:h.next=35;break;case 31:if(u!==ky){h.next=35;break}return h.next=34,(0,Ff.gz)(m.Z.removeModal(t));case 34:a=!1;case 35:h.next=1;break;case 37:case"end":return h.stop()}}),Qy)}function nb(e,t,n){return Zf().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,(0,Ff.gz)(xy(e,t,n));case 2:case"end":return r.stop()}}),Xy)}var rb="formData/SET_CONFIG_SELECTOR",ob=function(e){return{type:rb,payload:{configSelector:e}}},ib=L()({},rb,jf.Z.singleTransferReducer("configSelector")),ab={configSelector:function(){return{}}};function cb(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ab,t=arguments.length>1?arguments[1]:void 0,n=ib[t.type];return n?n(e,t):e}var sb,ub="formData/LOAD_LOCATION_SUGGESTIONS",lb="formData/SET_LOCATION_SUGGESTIONS",db="formData/SET_LOCATION_SUGGESTIONS_LOADING",fb=function(e,t){return{type:lb,payload:{field:e,suggestions:t}}},pb=function(e){return{type:db,payload:{field:e}}};function hb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function mb(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?hb(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hb(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var gb=(sb={},L()(sb,lb,(function(e,t){var n=t.payload,r=n.field,o=n.suggestions;return mb(mb({},e),{},L()({},r,{suggestions:o}))})),L()(sb,db,(function(e,t){var n=t.payload.field;return mb(mb({},e),{},L()({},n,{isLoading:!0}))})),sb),vb={};function yb(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:vb,t=arguments.length>1?arguments[1]:void 0,n=gb[t.type];return n?n(e,t):e}var bb=a(44908),wb=a.n(bb),Ab=Zf().mark(Pb),xb=Zf().mark(_b),Eb=Zf().mark(Tb),Ob=Zf().mark(Rb);function Cb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function kb(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Cb(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Cb(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Sb="iso2",Db={};function Pb(e){var t,n,r,o;return Zf().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:i.t0=Zf().keys(Db);case 1:if((i.t1=i.t0()).done){i.next=7;break}if(t=i.t1.value,Db[t].key!==e){i.next=5;break}return i.abrupt("return",t);case 5:i.next=1;break;case 7:return i.next=9,(0,Ff.RE)(uh.Z.fetchEntity,"Country",e,{paths:[Sb]});case 9:return n=i.sent,i.next=12,(0,Ff.RE)(uh.Z.fetchDisplay,"Country",e);case 12:return r=i.sent,o=nf()(n,["paths",Sb,"value"]),Db=kb(kb({},Db),{},L()({},o,{key:n.key,display:r})),i.abrupt("return",o);case 16:case"end":return i.stop()}}),Ab)}function _b(e){var t,n,r,o,i,a;return Zf().wrap((function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,(0,Ff.$6)(e.map((function(e){return e.country})));case 2:return t=c.sent,c.next=5,(0,Ff.RE)(wb(),t);case 5:return n=c.sent,c.next=8,(0,Ff.$6)(n.reduce((function(e,t){return[].concat(z()(e),z()(Db[t]?[]:[t]))}),[]));case 8:if(!((r=c.sent).length>0)){c.next=18;break}return o={conditions:L()({},Sb,r),paths:[Sb]},c.next=13,(0,Ff.RE)(uh.Z.fetchEntities,"Country",o,{method:"GET"});case 13:return i=c.sent,c.next=16,(0,Ff.RE)(uh.Z.fetchDisplays,Lm.getDisplayRequest(i));case 16:a=c.sent,Db=kb(kb({},Db),i.reduce((function(e,t){return kb(kb({},e),{},L()({},nf()(t,["paths",Sb,"value"]),{key:t.key,display:nf()(a,["Country",t.key])}))}),{}));case 18:return c.abrupt("return",Db);case 19:case"end":return c.stop()}}),xb)}var jb=function(e,t){return e.map((function(e){return kb(kb({},e),{},{country:t[e.country]})}))};function Tb(e,t,n){var r,o;return Zf().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return r={queryParams:kb(kb(kb({},e?{city:e}:{}),t?{postcode:t}:{}),n?{country:n}:{}),method:"GET"},i.next=3,(0,Ff.RE)(uh.Z.requestSaga,"location/suggestions",r);case 3:return o=i.sent,i.abrupt("return",o.body.data);case 5:case"end":return i.stop()}}),Eb)}function Rb(e,t){return Zf().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!e){n.next=6;break}return n.next=3,(0,Ff.RE)(Pb,e.key);case 3:n.t0=n.sent,n.next=7;break;case 6:n.t0=t;case 7:return n.abrupt("return",n.t0);case 8:case"end":return n.stop()}}),Ob)}var Ib=Zf().mark(Nb),Mb=Zf().mark(Bb);function Nb(){return Zf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Ff.$6)([(0,Ff.Fm)(ub,Bb)]);case 2:case"end":return e.stop()}}),Ib)}function Bb(e){var t,n,r,o,i,a,c,s,u,l,d;return Zf().wrap((function(f){for(;;)switch(f.prev=f.next){case 0:return t=e.payload,n=t.field,r=t.searchInput,o=t.countryValue,i=t.fieldCountries,f.next=3,(0,Ff.gz)(pb(n));case 3:return a=r.city,c=r.postcode,f.next=6,(0,Ff.RE)(Rb,o,i);case 6:return s=f.sent,f.next=9,(0,Ff.RE)(Tb,a,c,s);case 9:return u=f.sent,f.next=12,(0,Ff.RE)(_b,u);case 12:return l=f.sent,f.next=15,(0,Ff.RE)(jb,u,l);case 15:return d=f.sent,f.next=18,(0,Ff.gz)(fb(n,d));case 18:case"end":return f.stop()}}),Mb)}var Zb,Fb="formData/LOAD_RELATION_ENTITIES",Lb="formData/SET_RELATION_ENTITIES",Hb="formData/SET_RELATION_ENTITIES_LOADING",Ub=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return{type:Hb,payload:{fieldName:e,clearData:t}}},zb=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:void 0;return{type:Lb,payload:{fieldName:e,entities:t,searchTerm:r,moreEntitiesAvailable:n}}};function Wb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Vb(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Wb(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wb(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Yb=(Zb={},L()(Zb,Lb,(function(e,t){var n=t.payload,r=n.fieldName,o=n.entities,i=n.moreEntitiesAvailable,a=n.searchTerm;return Vb(Vb({},e),{},{data:Vb(Vb({},e.data),{},L()({},r,{data:o,isLoading:!1,moreEntitiesAvailable:i,searchTerm:a}))})})),L()(Zb,Hb,(function(e,t){var n,r,o=t.payload,i=o.fieldName,a=o.clearData;return Vb(Vb({},e),{},{data:Vb(Vb({},e.data),{},L()({},i,Vb(Vb({},a?{searchTerm:void 0,data:[]}:{searchTerm:null===(n=e.data[i])||void 0===n?void 0:n.searchTerm,data:(null===(r=e.data[i])||void 0===r?void 0:r.data)||[]}),{},{isLoading:!0})))})})),Zb),qb={data:{}};function Gb(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:qb,t=arguments.length>1?arguments[1]:void 0,n=Yb[t.type];return n?n(e,t):e}var Qb=a(85354),Xb=a.n(Qb);function Kb(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $b(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var Jb=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";Kb(this,t);var n=$b(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return Object.defineProperty(n,"message",{configurable:!0,enumerable:!1,value:e,writable:!0}),Object.defineProperty(n,"name",{configurable:!0,enumerable:!1,value:n.constructor.name,writable:!0}),Error.hasOwnProperty("captureStackTrace")?(Error.captureStackTrace(n,n.constructor),$b(n)):(Object.defineProperty(n,"stack",{configurable:!0,enumerable:!1,value:new Error(e).stack,writable:!0}),n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(function(e){function t(){e.apply(this,arguments)}return t.prototype=Object.create(e.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e,t}(Error));var ew="@@redux-form/submission-error-flag",tw=function(e){function t(t){var n;return(n=e.call(this,"Submit Validation Failed")||this).errors=t,n}return Xb()(t,e),t}(Jb);function nw(e){return!0===(e&&e.constructor&&e.constructor.__FLAG__===ew)}tw.__FLAG__=ew;var rw=a(2525),ow=a.n(rw);function iw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function aw(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?iw(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):iw(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var cw="_error",sw="entityValidatorErrors",uw="relatedEntityErrors",lw="outdatedError",dw=function(e){var t=aw({},e);return delete t._error,t},fw=function(e){return e._error};const pw={hasFieldErrors:function(e){return Object.keys(dw(e)).length>=1},getFieldErrors:dw,getValidatorErrors:function(e){var t=fw(e);return Om()(t.entityValidatorErrors,(function(e,t){return[].concat(z()(e),z()(t))}),[])},hasValidatorErrors:function(e){var t=fw(e);return!!(t&&t.entityValidatorErrors&&Object.keys(t.entityValidatorErrors).length>=1)},hasRelatedEntityErrors:function(e){var t=fw(e);return!!(t&&t.relatedEntityErrors&&t.relatedEntityErrors.length>=1)},hasOutdatedError:function(e){var t=fw(e);return!!(t&&t.outdatedError&&Object.keys(t.outdatedError).length>=1)},getFirstErrorField:function(e){return Object.keys(dw(e))[0]},getRelatedEntityErrorsCompact:function(e){var t=fw(e).relatedEntityErrors;return Om()(t,(function(e,t){var n=t.key,r=t.model,o=t.paths,i=t.entityValidatorErrors,a=z()(e);return ow()(o,(function(e,t){ow()(e,(function(e,o){a.push.apply(a,z()(e.map((function(e){return"".concat(e," (").concat(t,", ").concat(r,", ").concat(n,")")}))))}))})),i&&Object.keys(i).length>=1&&a.push.apply(a,z()(Om()(i,(function(e,t){return[].concat(z()(e),z()(t.map((function(e){return"".concat(e," (").concat(r,", ").concat(n,")")}))))}),[]))),a}),[])},addErrors:function(e,t,n){return aw(aw({},e),{},L()({},t,aw(aw({},e[t]||{}),n||{})))},outdatedResponseToFormError:function(e,t){return L()({},cw,L()({},lw,aw(aw({},xm()(e,["updateTimestamp","updateUser","key","model"])),{},{sameEntity:t.model===e.model&&t.key===e.key})))},getOutdatedError:function(e){return fw(e).outdatedError}};var hw=a(50008),mw=a.n(hw);const gw=Object.freeze({FIELD_SET:"field-set",FIELD:"field",ACTION:"action",ACTION_BAR:"action-bar",LAYOUT:"layout",TABLE:"table",SUB_TABLE:"sub-table",DISPLAY:"display"});function vw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function yw(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?vw(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vw(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var bw=function(e,t){return"input-".concat(e,"-").concat(t)},ww=[gw.FIELD,gw.DISPLAY],Aw=function e(t,n){for(var r=[],o=0;o<t.children.length;o++){t.children[o].children&&r.push.apply(r,z()(e(t.children[o],n)));var i=t.children[o].componentType;!ww.includes(i)||n&&!0===t.hidden||r.push(yw(yw({},t.children[o]),{},{readonly:t.readonly,ignoreCopy:t.ignoreCopy}))}return r},xw={location:function(e){var t=xm()(e.locationMapping,["postcode","city"]);return{mapping:t,paths:Object.values(t).filter(Boolean)}}};function Ew(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ow(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ew(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ew(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Cw=function(e){return 0===Object.keys(e).length},kw=function(e,t,n){var r=L()({},cw,L()({},uw,[]));return n?(n.forEach((function(t){t.model!==e.model||(e.key||t.key)&&t.key!==e.key?r._error.relatedEntityErrors.push(t):(r=Ow(Ow({},r),t.paths),Object.prototype.hasOwnProperty.call(t,sw)&&(r._error.entityValidatorErrors=t.entityValidatorErrors))})),function(e,t){return t.filter((function(e){return e.componentType===gw.FIELD})).reduce((function(e,t){if(xw[t.dataType]){var n=Ow({},xw[t.dataType](t).paths.reduce((function(t,n){return Ow(Ow({},t),e[n])}),{}));return Ow(Ow({},e),Cw(n)?{}:L()({},t.path||t.id,n))}return e}),e)}(r,t)):r},Sw="--",Dw=function(e){return e?e.replace(/\./g,Sw).replace(/\[/g,"=-=").replace(/\]/g,"=_="):e},Pw=function(e){return e?e.replace(new RegExp(Sw,"g"),".").replace(new RegExp("=-=","g"),"[").replace(new RegExp("=_=","g"),"]"):e},_w=function(e,t){return function(e,t){return t.filter((function(e){return e.componentType===gw.FIELD})).reduce((function(e,t){if(xw[t.dataType]){var n=xw[t.dataType](t).mapping,r=e[t.path||t.id],o=r?Ow({},Object.keys(n).reduce((function(e,t){var o=n[t];return Ow(Ow({},e),r[t]?L()({},o,r[t]):{})}),{})):{};return Ow(Ow({},Rv()(e,t.path||t.id)),Cw(o)?{}:o)}return e}),e)}(Om()(e,(function(e,t,n){return Ow(Ow({},e),{},L()({},Pw(n),t))}),{}),t)},jw=function(e,t,n){var r=function(e,t,n){var r=[];return ow()(t,(function(t,o){!n&&Dp()(t,e[o])||r.push(o)})),r}(e,t,n);return Object.keys(t).reduce((function(e,n){return Object.values(Lm.metaFields).includes(n)||r.some((function(e){return e===n||e.startsWith("".concat(n).concat(Sw))}))?Ow(Ow({},e),{},L()({},n,t[n])):e}),{})},Tw=function(e){return null==e||""===e||Array.isArray(e)&&0===e.length||"object"===mw()(e)&&0===Object.keys(e).length};function Rw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Iw(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Rw(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Rw(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Mw,Nw=function(e){var t=e.children.find((function(e){return!oh(e.componentType)}));return t?Iw(Iw({},t),xm()(e,["label","hidden","readonly","scopes"])):null},Bw=function(e){return Boolean(e)&&Object.keys(e).length>0},Zw=a(18721),Fw=a.n(Zw),Lw=function(){var e=Ip()(Zf().mark((function e(t){var n,r,o,i,c=arguments;return Zf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=c.length>1&&void 0!==c[1]?c[1]:{},e.next=3,Promise.all([a.e(817),a.e(877)]).then(a.bind(a,80446));case 3:return r=e.sent,o=n.customRegex&&t.match(n.customRegex),i=r.isValidNumber(t,n.defaultRegion||"CH"),e.abrupt("return",o||i?null:{phone:[Mw||(Mw=(0,S.jsx)(fd.Z,{id:"client.component.form.invalidPhoneNumber"},"invalidPhoneNumber"))]});case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();const Hw={phone:Lw};var Uw=function(e){return!(null==e||""===e||Array.isArray(e)&&0===e.length||"object"===mw()(e)&&0===Object.keys(e).length)},zw={mandatory:[(0,S.jsx)(fd.Z,{id:"client.component.form.syncValidationRequired"},"syncValidationRequired")]};function Ww(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return Vw(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Vw(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){c=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(c)throw i}}}}function Vw(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Yw=function(){var e=Ip()(Zf().mark((function e(t,n){var r,o,i,a,c,s,u,l,d;return Zf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r={},o=Ww(n),e.prev=2,o.s();case 4:if((i=o.n()).done){e.next=22;break}if(a=i.value,c=t[a.path],!Uw(c)){e.next=20;break}e.t0=Zf().keys(Hw);case 9:if((e.t1=e.t0()).done){e.next=20;break}if(s=e.t1.value,!Fw()(a,["validation",s])){e.next=18;break}return u=nf()(a,["validation",s]),l=Hw[s],e.next=16,l(c,u);case 16:(d=e.sent)&&(r=pw.addErrors(r,a.path,d));case 18:e.next=9;break;case 20:e.next=4;break;case 22:e.next=27;break;case 24:e.prev=24,e.t2=e.catch(2),o.e(e.t2);case 27:return e.prev=27,o.f(),e.finish(27);case 30:return e.abrupt("return",r);case 31:case"end":return e.stop()}}),e,null,[[2,24,27,30]])})));return function(t,n){return e.apply(this,arguments)}}();function qw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Gw(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qw(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qw(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Qw="OUTDATED_ENTITY",Xw=function(e,t,n,r,o){var i=jw(t,e,"create"===o),a=_w(i,n),c=Hm.Z.getWidgetConfigKey(),s=Lm.toEntity(a),u={queryParams:Gw({_validate:!0},c?{_widget_key:c}:{}),method:"create"===o?"POST":"PATCH",headers:{"X-Client":"rest"},body:s,acceptedStatusCodes:[403],acceptedErrorCodes:[Qw]},l=("create"===o?null==r?void 0:r.createEndpoint:void 0)||"entities/2.0/".concat(s.model).concat(s.key?"/".concat(s.key):"");return uh.Z.simpleRequest(l,u).then((function(e){var t=e.body;return 403===e.status||t.valid?{}:t.errorCode===Qw?pw.outdatedResponseToFormError(t,s):kw(s,n,t.errors)}))},Kw=function(){var e=Ip()(Zf().mark((function e(t,n,r,o,i){var a,c;return Zf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Yw(t,r);case 2:if(a=e.sent,!Bw(a)){e.next=5;break}throw a;case 5:return e.next=7,Xw(t,n,r,o,i);case 7:if(c=e.sent,!Bw(c)){e.next=10;break}throw c;case 10:case"end":return e.stop()}}),e)})));return function(t,n,r,o,i){return e.apply(this,arguments)}}();const $w=Object.freeze({VERTICAL_BOX:"vertical-box",HORIZONTAL_BOX:"horizontal-box"}),Jw=Object.freeze({CREATE:"create",UPDATE:"update"});var eA=function(e){var t=e.message;return(0,S.jsx)("div",{children:(0,S.jsx)(nl.Z,{type:"html",value:t})})},tA=a(34115),nA=a(48272),rA=a(67154),oA=a.n(rA),iA="@@redux-form/",aA=iA+"ARRAY_INSERT",cA=iA+"ARRAY_MOVE",sA=iA+"ARRAY_POP",uA=iA+"ARRAY_PUSH",lA=iA+"ARRAY_REMOVE",dA=iA+"ARRAY_REMOVE_ALL",fA=iA+"ARRAY_SHIFT",pA=iA+"ARRAY_SPLICE",hA=iA+"ARRAY_UNSHIFT",mA=iA+"ARRAY_SWAP",gA=iA+"AUTOFILL",vA=iA+"BLUR",yA=iA+"CHANGE",bA=iA+"CLEAR_FIELDS",wA=iA+"CLEAR_SUBMIT",AA=iA+"CLEAR_SUBMIT_ERRORS",xA=iA+"CLEAR_ASYNC_ERROR",EA=iA+"DESTROY",OA=iA+"FOCUS",CA=iA+"INITIALIZE",kA=iA+"REGISTER_FIELD",SA=iA+"RESET",DA=iA+"RESET_SECTION",PA=iA+"SET_SUBMIT_FAILED",_A=iA+"SET_SUBMIT_SUCCEEDED",jA=iA+"START_ASYNC_VALIDATION",TA=iA+"START_SUBMIT",RA=iA+"STOP_ASYNC_VALIDATION",IA=iA+"STOP_SUBMIT",MA=iA+"SUBMIT",NA=iA+"TOUCH",BA=iA+"UNREGISTER_FIELD",ZA=iA+"UNTOUCH",FA=iA+"UPDATE_SYNC_ERRORS",LA=iA+"UPDATE_SYNC_WARNINGS";var HA={arrayInsert:function(e,t,n,r){return{type:aA,meta:{form:e,field:t,index:n},payload:r}},arrayMove:function(e,t,n,r){return{type:cA,meta:{form:e,field:t,from:n,to:r}}},arrayPop:function(e,t){return{type:sA,meta:{form:e,field:t}}},arrayPush:function(e,t,n){return{type:uA,meta:{form:e,field:t},payload:n}},arrayRemove:function(e,t,n){return{type:lA,meta:{form:e,field:t,index:n}}},arrayRemoveAll:function(e,t){return{type:dA,meta:{form:e,field:t}}},arrayShift:function(e,t){return{type:fA,meta:{form:e,field:t}}},arraySplice:function(e,t,n,r,o){var i={type:pA,meta:{form:e,field:t,index:n,removeNum:r}};return void 0!==o&&(i.payload=o),i},arraySwap:function(e,t,n,r){if(n===r)throw new Error("Swap indices cannot be equal");if(n<0||r<0)throw new Error("Swap indices cannot be negative");return{type:mA,meta:{form:e,field:t,indexA:n,indexB:r}}},arrayUnshift:function(e,t,n){return{type:hA,meta:{form:e,field:t},payload:n}},autofill:function(e,t,n){return{type:gA,meta:{form:e,field:t},payload:n}},blur:function(e,t,n,r){return{type:vA,meta:{form:e,field:t,touch:r},payload:n}},change:function(e,t,n,r,o){return{type:yA,meta:{form:e,field:t,touch:r,persistentSubmitErrors:o},payload:n}},clearFields:function(e,t,n){for(var r=arguments.length,o=new Array(r>3?r-3:0),i=3;i<r;i++)o[i-3]=arguments[i];return{type:bA,meta:{form:e,keepTouched:t,persistentSubmitErrors:n,fields:o}}},clearSubmit:function(e){return{type:wA,meta:{form:e}}},clearSubmitErrors:function(e){return{type:AA,meta:{form:e}}},clearAsyncError:function(e,t){return{type:xA,meta:{form:e,field:t}}},destroy:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return{type:EA,meta:{form:t}}},focus:function(e,t){return{type:OA,meta:{form:e,field:t}}},initialize:function(e,t,n,r){return void 0===r&&(r={}),n instanceof Object&&(r=n,n=!1),{type:CA,meta:oA()({form:e,keepDirty:n},r),payload:t}},registerField:function(e,t,n){return{type:kA,meta:{form:e},payload:{name:t,type:n}}},reset:function(e){return{type:SA,meta:{form:e}}},resetSection:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return{type:DA,meta:{form:e,sections:n}}},startAsyncValidation:function(e,t){return{type:jA,meta:{form:e,field:t}}},startSubmit:function(e){return{type:TA,meta:{form:e}}},stopAsyncValidation:function(e,t){return{type:RA,meta:{form:e},payload:t,error:!(!t||!Object.keys(t).length)}},stopSubmit:function(e,t){return{type:IA,meta:{form:e},payload:t,error:!(!t||!Object.keys(t).length)}},submit:function(e){return{type:MA,meta:{form:e}}},setSubmitFailed:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return{type:PA,meta:{form:e,fields:n},error:!0}},setSubmitSucceeded:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return{type:_A,meta:{form:e,fields:n},error:!1}},touch:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return{type:NA,meta:{form:e,fields:n}}},unregisterField:function(e,t,n){return void 0===n&&(n=!0),{type:BA,meta:{form:e},payload:{name:t,destroyOnUnmount:n}}},untouch:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return{type:ZA,meta:{form:e,fields:n}}},updateSyncErrors:function(e,t,n){return void 0===t&&(t={}),{type:FA,meta:{form:e},payload:{syncErrors:t,error:n}}},updateSyncWarnings:function(e,t,n){return void 0===t&&(t={}),{type:LA,meta:{form:e},payload:{syncWarnings:t,warning:n}}}};const UA=HA;const zA=function(e,t,n,r){if(t<(e=e||[]).length){if(void 0===r&&!n){var o=[].concat(e);return o.splice(t,0,!0),o[t]=void 0,o}if(null!=r){var i=[].concat(e);return i.splice(t,n,r),i}var a=[].concat(e);return a.splice(t,n),a}if(n)return e;var c=[].concat(e);return c[t]=r,c};var WA=a(30084),VA=a.n(WA);const YA=function(e,t){if(!e)return e;var n=VA()(t),r=n.length;if(r){for(var o=e,i=0;i<r&&o;++i)o=o[n[i]];return o}};var qA=function e(t,n,r,o){var i;if(o>=r.length)return n;var a=r[o],c=e(t&&(Array.isArray(t)?t[Number(a)]:t[a]),n,r,o+1);if(!t){var s;if(isNaN(a))return(s={})[a]=c,s;var u=[];return u[parseInt(a,10)]=c,u}if(Array.isArray(t)){var l=[].concat(t);return l[parseInt(a,10)]=c,l}return oA()({},t,((i={})[a]=c,i))};const GA=function(e,t,n){return qA(e,n,VA()(t),0)};var QA=a(14293),XA=a.n(QA),KA=a(28368),$A=a.n(KA),JA=function(e){return XA()(e)||""===e||isNaN(e)},ex=function(e,t){return e===t||(e||t?(!e||!t||e._error===t._error)&&((!e||!t||e._warning===t._warning)&&(!I().isValidElement(e)&&!I().isValidElement(t)&&void 0)):JA(e)===JA(t))};function tx(e,t){if(null==e||null==t)return e;for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];if(r.length){if(Array.isArray(e)){if(isNaN(t))throw new Error('Must access array elements with a number, not "'+String(t)+'".');var i=Number(t);if(i<e.length){var a=tx.apply(void 0,[e&&e[i]].concat(r));if(a!==e[i]){var c=[].concat(e);return c[i]=a,c}}return e}if(t in e){var s,u=tx.apply(void 0,[e&&e[t]].concat(r));return e[t]===u?e:oA()({},e,((s={})[t]=u,s))}return e}if(Array.isArray(e)){if(isNaN(t))throw new Error('Cannot delete non-numerical index from an array. Given: "'+String(t));var l=Number(t);if(l<e.length){var d=[].concat(e);return d.splice(l,1),d}return e}if(t in e){var f=oA()({},e);return delete f[t],f}return e}const nx=function(e,t){return tx.apply(void 0,[e].concat(VA()(t)))};const rx=function(e){return e?Array.isArray(e)?e.map((function(e){return e.name})):Object.keys(e):[]};const ox={allowsArrayErrors:!0,empty:{},emptyList:[],getIn:YA,setIn:GA,deepEqual:function(e,t){return $A()(e,t,ex)},deleteIn:nx,forEach:function(e,t){return e.forEach(t)},fromJS:function(e){return e},keys:rx,size:function(e){return e?e.length:0},some:function(e,t){return e.some(t)},splice:zA,equals:function(e,t){return t.every((function(t){return~e.indexOf(t)}))},orderChanged:function(e,t){return t.some((function(t,n){return t!==e[n]}))},toJS:function(e){return e}},ix=function(e){var t=e.getIn;return function(e,n){return function(r){var o=n||function(e){return t(e,"form")};return t(o(r),e+".values")}}}(ox);const ax=function(e){var t=e.getIn;return function(e,n){return function(r){var o=n||function(e){return t(e,"form")};return t(o(r),e+".asyncErrors")}}}(ox);const cx=function(e){var t=e.getIn,n=e.empty;return function(e,r){return function(o){var i=r||function(e){return t(e,"form")};return t(i(o),e+".submitErrors")||n}}}(ox);const sx=function(e){var t=e.getIn,n=e.empty;return function(e,r){return function(o){var i=r||function(e){return t(e,"form")};return t(i(o),e+".syncErrors")||n}}}(ox);var ux=Zf().mark(wx),lx=Zf().mark(Ax),dx=Zf().mark(xx),fx=Zf().mark(Ex),px=Zf().mark(Ox),hx=Zf().mark(Cx),mx=Zf().mark(kx);function gx(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function vx(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?gx(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gx(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var yx=function(e,t){return e.form[t].initial};function bx(e,t){var n=e.formId,r=document.getElementById(bw(n,t));return!!r&&(r.focus(),!0)}function wx(e){var t;return Zf().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return t=e.formId,n.t0=vx,n.t1=vx,n.t2=vx,n.t3={},n.next=7,(0,Ff.Ys)(sx(t));case 7:return n.t4=n.sent,n.t5=(0,n.t2)(n.t3,n.t4),n.next=11,(0,Ff.Ys)(ax(t));case 11:return n.t6=n.sent,n.t7=(0,n.t1)(n.t5,n.t6),n.next=15,(0,Ff.Ys)(cx(t));case 15:return n.t8=n.sent,n.abrupt("return",(0,n.t0)(n.t7,n.t8));case 17:case"end":return n.stop()}}),ux)}function Ax(e){var t,n;return Zf().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,(0,Ff.RE)(wx,e);case 2:return t=r.sent,r.next=5,(0,Ff.RE)(pw.getFirstErrorField,t);case 5:if(!(n=r.sent)){r.next=9;break}return r.next=9,(0,Ff.RE)(bx,e,n);case 9:case"end":return r.stop()}}),lx)}function xx(e){var t,n,r,o;return Zf().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return t=e.formId,n=e.stateSelector,i.next=3,(0,Ff.Ys)(n);case 3:return r=i.sent,o=r.fieldDefinitions,i.next=7,(0,Ff.gz)(UA.touch.apply(UA,[t].concat(z()(o.map((function(e){return Dw(e.path||e.id)}))))));case 7:case"end":return i.stop()}}),dx)}function Ex(e){return Zf().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,Ff.RE)(xx,e);case 2:return t.next=4,(0,Ff.RE)(Ax,e);case 4:case"end":return t.stop()}}),fx)}function Ox(e){var t,n,r,o,i,a,c,s,u,l;return Zf().wrap((function(d){for(;;)switch(d.prev=d.next){case 0:return t=e.formId,n=e.stateSelector,d.next=3,(0,Ff.Ys)(ix(t));case 3:return r=d.sent,d.next=6,(0,Ff.Ys)(yx,t);case 6:return o=d.sent,d.next=9,(0,Ff.Ys)(n);case 9:return i=d.sent,a=i.mode,c=i.fieldDefinitions,s=i.formDefinition,u="create"===a?{}:o,d.next=16,(0,Ff.RE)(jw,u,r,"create"===a);case 16:return l=d.sent,d.abrupt("return",{formValues:r,initialValues:u,mode:a,fieldDefinitions:c,formDefinition:s,dirtyFormValues:l});case 18:case"end":return d.stop()}}),px)}function Cx(e){var t,n,r,o;return Zf().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,(0,Ff.RE)(Ox,e);case 2:return t=i.sent,n=t.dirtyFormValues,r=t.fieldDefinitions,i.next=7,(0,Ff.RE)(_w,n,r);case 7:return o=i.sent,i.next=10,(0,Ff.RE)(Lm.toEntity,o);case 10:return i.abrupt("return",i.sent);case 11:case"end":return i.stop()}}),hx)}function kx(e,t){var n,r,o;return Zf().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:if(n=e.formId,!(t instanceof tw)){i.next=14;break}return i.next=4,(0,Ff.gz)(UA.stopSubmit(n,t.errors));case 4:return i.next=6,(0,Ff.RE)(Ex,e);case 6:return i.next=8,(0,Ff.RE)(pw.getValidatorErrors,t.errors);case 8:return r=i.sent,o=r&&r.length>0?function(){return(0,S.jsx)(eA,{message:r.join("<br>")})}:"client.component.form.saveAbortedMessage",i.next=12,(0,Ff.gz)(m.Z.toaster({type:"warning",title:"client.component.form.saveAbortedTitle",body:o,duration:5e3}));case 12:case 19:case 26:case 31:i.next=37;break;case 14:if(!(t instanceof uh.Z.InformationError)){i.next=21;break}return i.next=17,(0,Ff.gz)(m.Z.toaster({type:"info",title:"client.component.form.saveAbortedTitle",body:t.message}));case 17:return i.next=19,(0,Ff.gz)(UA.stopSubmit(n));case 21:if(!(t instanceof uh.Z.ForbiddenException)){i.next=28;break}return i.next=24,(0,Ff.gz)(m.Z.toaster({type:"error",title:"client.component.form.saveAbortedTitle",body:"client.component.form.noPermission"}));case 24:return i.next=26,(0,Ff.gz)(UA.stopSubmit(n));case 28:if(!(t instanceof uh.Z.ClientQuestionCancelledException)){i.next=33;break}return i.next=31,(0,Ff.gz)(UA.stopSubmit(n));case 33:return i.next=35,(0,Ff.gz)(p.Z.logError("client.common.unexpectedError","client.component.form.saveError",t));case 35:return i.next=37,(0,Ff.gz)(UA.stopSubmit(n));case 37:case"end":return i.stop()}}),mx)}var Sx=Zf().mark(jx),Dx=Zf().mark(Tx),Px=Zf().mark(Rx),_x=Zf().mark(Ix);function jx(e){return Zf().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,Ff.$6)([(0,Ff.Ds)(500,yA,Rx,e),(0,Ff.ib)(RA,Ix)]);case 2:case"end":return t.stop()}}),Sx)}function Tx(e,t,n,r){var o,i,a,c,s;return Zf().wrap((function(u){for(;;)switch(u.prev=u.next){case 0:return o=e.formId,i={method:"POST",body:{triggerField:t,entity:n},acceptedStatusCodes:[403]},u.next=4,(0,Ff.RE)(uh.Z.requestSaga,r,i);case 4:return a=u.sent,c=nf()(a,"body.values",[]),u.next=8,(0,Ff.Ys)(ix(o));case 8:return s=u.sent,u.next=11,(0,Ff.$6)(Object.keys(c).map((function(e){var t=c[e],n=s[e];return"override"===t.mode||"if_empty"===t.mode&&Tw(n)?(0,Ff.gz)(UA.change(o,e,t.value)):null})));case 11:case"end":return u.stop()}}),Dx)}function Rx(e,t){var n,r,o,i,a;return Zf().wrap((function(c){for(;;)switch(c.prev=c.next){case 0:return n=t.meta,r=e.stateSelector,o=n.field,c.next=5,(0,Ff.Ys)(r);case 5:if(!(i=c.sent.fieldDefinitions.find((function(e){return e.id===o})))||!i.autoCompleteEndpoint){c.next=12;break}return c.next=9,(0,Ff.RE)(Cx,e);case 9:return a=c.sent,c.next=12,(0,Ff.RE)(Tx,e,o,a,i.autoCompleteEndpoint);case 12:case"end":return c.stop()}}),Px)}function Ix(e){var t,n,r,o,i,a;return Zf().wrap((function(c){for(;;)switch(c.prev=c.next){case 0:if(!(t=e.payload)){c.next=9;break}if(!pw.hasOutdatedError(t)){c.next=9;break}return n=pw.getOutdatedError(t),r=(0,tA.W)(new Date(n.updateTimestamp)),o=r.value,i=r.unit,a="client.component.form.".concat(n.sameEntity?"outdated":"relatedOutdated","ErrorTitle"),c.next=9,(0,Ff.gz)(m.Z.toaster({type:"warning",key:"outdated-warning",title:(0,S.jsx)(fd.Z,{id:a,values:{model:n.model,key:n.key}}),body:(0,S.jsx)(fd.Z,{id:"client.component.form.outdatedErrorDescription",values:{ago:(0,S.jsx)(nA.Z,{value:o,unit:i}),user:n.updateUser}})}));case 9:case"end":return c.stop()}}),_x)}var Mx=a(93913),Nx=a.n(Mx),Bx=a(93458),Zx=a.n(Bx),Fx=a(41143),Lx=a.n(Fx),Hx=a(37316),Ux=a.n(Hx),zx=function(e,t,n,r){var o=t.value;return"checkbox"===e?oA()({},t,{checked:!!o}):"radio"===e?oA()({},t,{checked:r(o,n),value:n}):"select-multiple"===e?oA()({},t,{value:o||[]}):"file"===e?oA()({},t,{value:o||void 0}):t};const Wx=function(e){return!!(e&&e.stopPropagation&&e.preventDefault)};const Vx=function(e,t){if(Wx(e)){if(!t&&e.nativeEvent&&void 0!==e.nativeEvent.text)return e.nativeEvent.text;if(t&&void 0!==e.nativeEvent)return e.nativeEvent.text;var n=e,r=n.target,o=r.type,i=r.value,a=r.checked,c=r.files,s=n.dataTransfer;return"checkbox"===o?!!a:"file"===o?c||s&&s.files:"select-multiple"===o?function(e){var t=[];if(e)for(var n=0;n<e.length;n++){var r=e[n];r.selected&&t.push(r.value)}return t}(e.target.options):i}return e};const Yx="undefined"!=typeof window&&window.navigator&&window.navigator.product&&"ReactNative"===window.navigator.product;const qx=function(e,t){var n=t.name,r=t.parse,o=t.normalize,i=Vx(e,Yx);return r&&(i=r(i,n)),o&&(i=o(n,i)),i};var Gx="text",Qx=a(59864);const Xx=function(e,t,n){return(0,Qx.isValidElementType)(e[t])?null:new Error("Invalid prop `"+t+"` supplied to `"+n+"`.")};var Kx=["_reduxForm"],$x=function(e){return e&&"object"==typeof e},Jx=function(e){return e&&"function"==typeof e},eE=function(e){$x(e)&&Jx(e.preventDefault)&&e.preventDefault()},tE=function(e,t){if($x(e)&&$x(e.dataTransfer)&&Jx(e.dataTransfer.getData))return e.dataTransfer.getData(t)},nE=function(e,t,n){$x(e)&&$x(e.dataTransfer)&&Jx(e.dataTransfer.setData)&&e.dataTransfer.setData(t,n)};const rE=function(e){var t=e.deepEqual,n=e.getIn,r=function(n){function r(){for(var e,t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];return(e=n.call.apply(n,[this].concat(r))||this).ref=I().createRef(),e.isPristine=function(){return e.props.pristine},e.getValue=function(){return e.props.value},e.handleChange=function(t){var n=e.props,r=n.name,o=n.dispatch,i=n.parse,a=n.normalize,c=n.onChange,s=n._reduxForm,u=n.value,l=qx(t,{name:r,parse:i,normalize:a}),d=!1;if(c)if(!Yx&&Wx(t))c(oA()({},t,{preventDefault:function(){return d=!0,eE(t)}}),l,u,r);else{var f=c(t,l,u,r);Yx&&(d=f)}d||(o(s.change(r,l)),s.asyncValidate&&s.asyncValidate(r,l,"change"))},e.handleFocus=function(t){var n=e.props,r=n.name,o=n.dispatch,i=n.onFocus,a=n._reduxForm,c=!1;i&&(Yx?c=i(t,r):i(oA()({},t,{preventDefault:function(){return c=!0,eE(t)}}),r)),c||o(a.focus(r))},e.handleBlur=function(t){var n=e.props,r=n.name,o=n.dispatch,i=n.parse,a=n.normalize,c=n.onBlur,s=n._reduxForm,u=n._value,l=n.value,d=qx(t,{name:r,parse:i,normalize:a});d===u&&void 0!==u&&(d=l);var f=!1;c&&(Yx?f=c(t,d,l,r):c(oA()({},t,{preventDefault:function(){return f=!0,eE(t)}}),d,l,r)),f||(o(s.blur(r,d)),s.asyncValidate&&s.asyncValidate(r,d,"blur"))},e.handleDragStart=function(t){var n=e.props,r=n.name,o=n.onDragStart,i=n.value;nE(t,Gx,null==i?"":i),o&&o(t,r)},e.handleDrop=function(t){var n=e.props,r=n.name,o=n.dispatch,i=n.onDrop,a=n._reduxForm,c=n.value,s=tE(t,Gx),u=!1;i&&i(oA()({},t,{preventDefault:function(){return u=!0,eE(t)}}),s,c,r),u||(o(a.change(r,s)),eE(t))},e}Xb()(r,n);var o=r.prototype;return o.shouldComponentUpdate=function(e){var n=this,r=Object.keys(e),o=Object.keys(this.props);return!!(this.props.children||e.children||r.length!==o.length||r.some((function(r){return~(e.immutableProps||[]).indexOf(r)?n.props[r]!==e[r]:!~Kx.indexOf(r)&&!t(n.props[r],e[r])})))},o.getRenderedComponent=function(){return this.ref.current},o.render=function(){var t=this.props,n=t.component,r=t.forwardRef,o=t.name,i=t._reduxForm,a=(t.normalize,t.onBlur,t.onChange,t.onFocus,t.onDragStart,t.onDrop,t.immutableProps,Ux()(t,["component","forwardRef","name","_reduxForm","normalize","onBlur","onChange","onFocus","onDragStart","onDrop","immutableProps"])),c=function(e,t,n){var r=e.getIn,o=e.toJS,i=e.deepEqual,a=n.asyncError,c=n.asyncValidating,s=n.onBlur,u=n.onChange,l=n.onDrop,d=n.onDragStart,f=n.dirty,p=n.dispatch,h=n.onFocus,m=n.form,g=n.format,v=n.initial,y=(n.parse,n.pristine),b=n.props,w=n.state,A=n.submitError,x=n.submitFailed,E=n.submitting,O=n.syncError,C=n.syncWarning,k=(n.validate,n.value),S=n._value,D=(n.warn,Ux()(n,["asyncError","asyncValidating","onBlur","onChange","onDrop","onDragStart","dirty","dispatch","onFocus","form","format","initial","parse","pristine","props","state","submitError","submitFailed","submitting","syncError","syncWarning","validate","value","_value","warn"])),P=O||a||A,_=C,j=function(e,n){if(null===n)return e;var r=null==e?"":e;return n?n(e,t):r}(k,g);return{input:zx(D.type,{name:t,onBlur:s,onChange:u,onDragStart:d,onDrop:l,onFocus:h,value:j},S,i),meta:oA()({},o(w),{active:!(!w||!r(w,"active")),asyncValidating:c,autofilled:!(!w||!r(w,"autofilled")),dirty:f,dispatch:p,error:P,form:m,initial:v,warning:_,invalid:!!P,pristine:y,submitting:!!E,submitFailed:!!x,touched:!(!w||!r(w,"touched")),valid:!P,visited:!(!w||!r(w,"visited"))}),custom:oA()({},D,{},b)}}(e,o,oA()({},a,{form:i.form,onBlur:this.handleBlur,onChange:this.handleChange,onDrop:this.handleDrop,onDragStart:this.handleDragStart,onFocus:this.handleFocus})),s=c.custom,u=Ux()(c,["custom"]);if(r&&(s.ref=this.ref),"string"==typeof n){var l=u.input;u.meta;return(0,R.createElement)(n,oA()({},l,{},s))}return(0,R.createElement)(n,oA()({},u,{},s))},r}(R.Component);r.propTypes={component:Xx,props:Zx().object};var o=(0,_.connect)((function(e,r){var o=r.name,i=r._reduxForm,a=i.initialValues,c=(0,i.getFormState)(e),s=n(c,"initial."+o),u=void 0!==s?s:a&&n(a,o),l=n(c,"values."+o),d=n(c,"submitting"),f=function(e,t){var n=ox.getIn(e,t);return n&&n._error?n._error:n}(n(c,"syncErrors"),o),p=function(e,t){var r=n(e,t);return r&&r._warning?r._warning:r}(n(c,"syncWarnings"),o),h=t(l,u);return{asyncError:n(c,"asyncErrors."+o),asyncValidating:n(c,"asyncValidating")===o,dirty:!h,pristine:h,state:n(c,"fields."+o),submitError:n(c,"submitErrors."+o),submitFailed:n(c,"submitFailed"),submitting:d,syncError:f,syncWarning:p,initial:u,value:l,_value:r.value}}),void 0,void 0,{forwardRef:!0});return o(r)};var oE=function(e,t,n,r,o,i){if(i)return e===t};const iE=function(e,t,n){var r=$A()(e.props,t,oE),o=$A()(e.state,n,oE);return!r||!o};const aE=function(e,t){var n=e._reduxForm.sectionPrefix;return n?n+"."+t:t};var cE=R.createContext(null),sE=function(e,t){var n=t.forwardedRef,r=Ux()(t,["forwardedRef"]);return function(t){return R.createElement(e,oA()({},r,{_reduxForm:t,ref:n}))}},uE=function(e){var t=function(t){function n(){return t.apply(this,arguments)||this}return Xb()(n,t),n.prototype.render=function(){return R.createElement(cE.Consumer,{children:sE(e,this.props)})},n}(R.Component),n=R.forwardRef((function(e,n){return R.createElement(t,oA()({},e,{forwardedRef:n}))}));return n.displayName=e.displayName||e.name||"Component",n};const lE=function(e){var t=rE(e),n=e.setIn,r=function(e){function r(t){var r;if((r=e.call(this,t)||this).ref=I().createRef(),r.normalize=function(e,t){var o=r.props.normalize;if(!o)return t;var i=r.props._reduxForm.getValues();return o(t,r.value,n(i,e,t),i,e)},!t._reduxForm)throw new Error("Field must be inside a component decorated with reduxForm()");return r}Xb()(r,e);var o=r.prototype;return o.componentDidMount=function(){var e=this;this.props._reduxForm.register(this.name,"Field",(function(){return e.props.validate}),(function(){return e.props.warn}))},o.shouldComponentUpdate=function(e,t){return iE(this,e,t)},o.UNSAFE_componentWillReceiveProps=function(e){var t=aE(this.props,this.props.name),n=aE(e,e.name);t===n&&ox.deepEqual(this.props.validate,e.validate)&&ox.deepEqual(this.props.warn,e.warn)||(this.props._reduxForm.unregister(t),this.props._reduxForm.register(n,"Field",(function(){return e.validate}),(function(){return e.warn})))},o.componentWillUnmount=function(){this.props._reduxForm.unregister(this.name)},o.getRenderedComponent=function(){return Lx()(this.props.forwardRef,"If you want to access getRenderedComponent(), you must specify a forwardRef prop to Field"),this.ref.current?this.ref.current.getRenderedComponent():void 0},o.render=function(){return(0,R.createElement)(t,oA()({},this.props,{name:this.name,normalize:this.normalize,ref:this.ref}))},Nx()(r,[{key:"name",get:function(){return aE(this.props,this.props.name)}},{key:"dirty",get:function(){return!this.pristine}},{key:"pristine",get:function(){return!(!this.ref.current||!this.ref.current.isPristine())}},{key:"value",get:function(){return this.ref.current&&this.ref.current.getValue()}}]),r}(R.Component);return r.propTypes={name:Zx().string.isRequired,component:Xx,format:Zx().func,normalize:Zx().func,onBlur:Zx().func,onChange:Zx().func,onFocus:Zx().func,onDragStart:Zx().func,onDrop:Zx().func,parse:Zx().func,props:Zx().object,validate:Zx().oneOfType([Zx().func,Zx().arrayOf(Zx().func)]),warn:Zx().oneOfType([Zx().func,Zx().arrayOf(Zx().func)]),forwardRef:Zx().bool,immutableProps:Zx().arrayOf(Zx().string),_reduxForm:Zx().object},uE(r)},dE=lE(ox);var fE,pE=b.ZP.div.withConfig({displayName:"StyledPanel"})(fE||(fE=(0,v.Z)(["\n && {\n background-color: ",";\n border: 1px "," ",";\n }\n"])),w.FS.color("paper"),(function(e){return e.isFramed?"solid":"none"}),(function(e){var t=e.theme;return(0,y.$n)(.93,t.colors.text)}));const hE=pE;const mE=function(e){var t=e.children,n=e.isFramed,r=void 0===n||n,o=e.controlledIsOpen,i=e.isOpenInitial,a=void 0===i||i,c=e.isToggleable,s=void 0===c||c,u=e.onToggle,l=(0,R.useState)(a),d=(0,wd.Z)(l,2),f=d[0],p=d[1],h="boolean"==typeof o,m=function(){s&&(h?"function"==typeof u&&u(!o):p(!f))};return(0,S.jsx)(hE,{isFramed:r,children:I().Children.map(t,(function(e){return I().cloneElement(e,{isFramed:r,isOpen:h?o:f,isToggleable:s,toggleOpenState:m})}))})};var gE,vE=b.ZP.div.withConfig({displayName:"StyledPanelBody"})(gE||(gE=(0,v.Z)(["\n && {\n padding: 0 ",";\n display: ",";\n\n > div {\n padding: "," 0 0 0;\n }\n }\n"])),(function(e){return e.isFramed?"10px":0}),(function(e){return e.isOpen?"block":"none"}),(function(e){return e.isFramed?"10px":0}));const yE=vE;const bE=function(e){var t=e.children,n=e.isFramed,r=e.isOpen;return(0,S.jsx)(yE,{isFramed:n,isOpen:r,children:(0,S.jsx)("div",{children:t})})};var wE;const AE=b.ZP.div.withConfig({displayName:"StyledPanelGroup"})(wE||(wE=(0,v.Z)(["\n margin-bottom: ",";\n\n && {\n ",":not(:last-child) {\n margin-bottom: ",";\n }\n }\n"])),x.Z.space(0),hE,x.Z.space(-1));const xE=function(e){var t=e.initialOpenPanelIndex,n=e.children,r=(0,R.useState)(t),o=(0,wd.Z)(r,2),i=o[0],a=o[1];return(0,S.jsx)(AE,{children:I().Children.map(n,(function(e,t){return I().cloneElement(e,{controlledIsOpen:i===t,onToggle:function(e){return function(e,t){a(!0===t?e:void 0)}(t,e)}})}))})};var EE,OE,CE,kE,SE=b.ZP.span.withConfig({displayName:"StyledIconWrapper"})(EE||(EE=(0,v.Z)(["\n font-size: ",";\n\n /* only hide arrow on non-touch devices */\n ","\n"])),x.Z.font(1),!Nv.b&&(0,b.iv)(OE||(OE=(0,v.Z)(["\n opacity: 0;\n\n &:hover {\n color: ",";\n }\n "])),w.FS.color("secondaryLight"))),DE=b.ZP.div.withConfig({displayName:"StyledPanelHeaderFooter"})(CE||(CE=(0,v.Z)(["\n && {\n background-color: #f2f2f2;\n display: flex;\n padding: ",";\n align-items: center;\n\n /* only apply arrow styles on non-touch devices */\n ","\n > div {\n flex: 1 1 auto;\n }\n ","\n }\n"])),(function(e){return e.isFramed?"4px 8px 4px 8px":0}),!Nv.b&&(0,b.iv)(kE||(kE=(0,v.Z)(["\n &:hover {\n cursor: pointer;\n\n "," {\n opacity: 1;\n }\n }\n "])),SE),(function(e){return function(e){var t=e.theme,n=e.isOpen,r=e.isFramed,o="\n &:first-child {\n border-bottom-color: ".concat((0,rf.HO)(nf()(t,"colors.paper"),1),";\n border-bottom-style: ").concat(r?"solid":"none",";\n }\n\n &:last-child,\n &:nth-child(3) {\n border-top-color: ").concat((0,rf.HO)(nf()(t,"colors.paper"),1),";\n border-top-style: ").concat(r?"solid":"none",";\n }\n ");return"\n ".concat(o,n?"\n &:first-child {\n border-bottom-width: 1px;\n }\n\n &:last-child,\n &:nth-child(3) {\n border-top-width: 1px;\n }\n ":"\n &:first-child {\n border-bottom-width: 0;\n }\n\n &:last-child {\n border-top-width: 0;\n }\n\n &:nth-child(3) {\n border-top-width: 1px;\n }\n ")}(e)}));const PE=DE;var _E=function(e){var t=e.children,n=e.isFramed,r=e.isOpen,o=e.isToggleable,i=e.showToggler,a=e.toggleOpenState,c=e.options;return(0,S.jsxs)(PE,{isFramed:n,isOpen:r,onClick:a,children:[(0,S.jsx)("div",{children:I().Children.map(t,(function(e){return I().cloneElement(e)}))}),o&&i&&(0,S.jsx)(SE,{children:(0,S.jsx)(B.Z,{icon:r?"chevron-up":"chevron-down",onClick:a,title:r?c.collapseButtonText:c.unfoldButtonText})})]})};_E.defaultProps={showToggler:!0,options:{collapseButtonText:"Hide information",unfoldButtonText:"Show more information"}};const jE={Body:bE,Footer:_E,Group:xE,Header:_E,Wrapper:mE};var TE;const RE=b.ZP.div.withConfig({displayName:"StyledLayoutBox"})(TE||(TE=(0,v.Z)(["\n height: fit-content;\n margin-bottom: ",";\n"])),x.Z.space(.25));var IE=function(e){var t=e.children;return(0,S.jsx)(RE,{children:t})};const ME=(0,R.memo)(IE);var NE,BE=b.ZP.div.withConfig({displayName:"StyledLayoutContainer"})(NE||(NE=(0,v.Z)(["\n display: grid;\n padding-right: ",";\n ",";\n ",";\n"])),x.Z.space(0),(function(e){var t=e.containerWidth,n=e.theme,r=e.minBoxWidth;return t<600?"grid-template-columns: 100%;":"grid-template-columns: repeat(auto-fit, minmax(".concat(r,"px, 1fr));\n grid-gap: ").concat(x.Z.space(.25)({theme:n}))}),(function(e){return e.occupiesRemainingHeight&&"\n flex: 1;\n "}));const ZE=BE;var FE=function(e){var t=e.children,n=e.occupiesRemainingHeight,r=e.minBoxWidth,o=(0,R.useRef)(null),i=(0,R.useState)(0),a=(0,wd.Z)(i,2),c=a[0],s=a[1],u=function(){s(o.current.offsetWidth)};return(0,R.useEffect)((function(){return u(),window.addEventListener("resize",u),function(){return window.removeEventListener("resize",u)}}),[]),(0,S.jsx)(ZE,{ref:o,containerWidth:c,occupiesRemainingHeight:n,minBoxWidth:r,children:t})};FE.defaultProps={minBoxWidth:250};const LE={Box:ME,Container:FE};var HE,UE=a(70696),zE=a(52058),WE=b.ZP.div.withConfig({displayName:"StyledActionsWrapper"})(HE||(HE=Ld()(["\n background-color: ",";\n padding-bottom: ",";\n display: flex;\n flex-wrap: wrap;\n z-index: 2; // Higher than StyledIndicatorsContainerWrapper\n position: sticky;\n top: 0;\n\n & > * {\n margin-top: ",";\n }\n"])),Jm.Z.color("paper"),x.Z.space(-.5),x.Z.space(-.5));const VE=function(e){var t=e.entityName,n=e.entityKey,r=e.mode,o=e.customRenderedActions,i=e.action;return(0,S.jsx)(zE.ZP,{children:function(e){return(0,S.jsx)(WE,{ref:e,children:(0,S.jsx)(my.Action,{definition:i,selection:my.getSingleEntitySelection(t,n),mode:r,customRenderedActions:o})})}})},YE={fixLabel:function(){return!0}},qE={getOptions:function(e){var t=e.formData;return{trueLabel:t.intl.formatMessage({id:"client.common.yes"}),falseLabel:t.intl.formatMessage({id:"client.common.no"})}},hasValue:function(e){var t=e.value;return!0===t||!1===t}};var GE=function(e,t){return{entityModel:e.model,key:e.key,field:t}},QE=function(e,t){if(e.implicitModelField&&t.formValues){var n=e.implicitModelField,r=n.indexOf(".");return r?function(e,t,n){var r=e.substring(0,t),o=e.substring(t+1),i=n.formValues[r];if(i){if(!Array.isArray(i))return GE(i,o);if(1===i.length)return GE(i[0],o)}return null}(n,r,t):t.formValues[n]}return e.implicitModel},XE=function(e){if(e.implicitModelField){var t=e.implicitModelField,n=t.indexOf(".");return n?[t.substring(0,n)]:[t]}return[]};const KE={fixLabel:function(){return!0},getOptions:function(e){var t=e.formField,n=e.formData;return{mode:t.mode,implicitModel:QE(t,n)}},dataContainerProps:function(e){var t=e.formField;return{formValues:{formName:e.formName,fields:XE(t)}}}};var $E=function(e){if(!e||isNaN(e))return null;var t=e.getFullYear(),n=e.getMonth()+1,r=e.getDate();return[t,(n>9?"":"0")+n,(r>9?"":"0")+r].join("-")};const JE={getOptions:function(){return{datePickerOptions:{dateToValue:$E}}}},eO={getOptions:function(e){var t=e.entityField;if("long"===(null==t?void 0:t.type))return{datePickerOptions:{valueToDate:function(e){var t=e?new Date(e):null;return isNaN(t)?null:t},dateToValue:function(e){return e?e.getTime():null}}}}},tO={getOptions:function(e){var t=e.formField;return{postPointDigits:nf()(t,"validation.decimalDigits.postPointDigits",null),prePointDigits:nf()(t,"validation.decimalDigits.prePointDigits",null),minValue:nf()(t,"validation.numberRange.fromIncluding",null),maxValue:nf()(t,"validation.numberRange.toIncluding",null),allowNegative:!0}}};function nO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function rO(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?nO(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nO(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const oO={getOptions:function(e){var t=e.formField,n=e.formName,r=e.formData;return rO(rO({upload:function(e){r.uploadDocument(n,t.id,e)}},r.chooseDocument?{choose:function(){return r.chooseDocument(r.setDocument,n,t.id)}}:{}),{},{uploadText:r.intl.formatMessage({id:"client.component.upload.upload"}),uploadingText:r.intl.formatMessage({id:"client.component.upload.uploading"}),downloadText:r.intl.formatMessage({id:"client.component.upload.downloadTitle"}),deleteText:r.intl.formatMessage({id:"client.component.upload.deleteTitle"})})},fixLabel:function(){return!0}};var iO=function(e){return!e.validation||!e.validation.numberRange||"number"!=typeof e.validation.numberRange.fromIncluding||e.validation.numberRange.fromIncluding<0};const aO={getOptions:function(e){var t=e.formField,n=e.formData;return{hoursLabel:n.intl.formatMessage({id:"client.component.duration.hoursLabel"}),minutesLabel:n.intl.formatMessage({id:"client.component.duration.minutesLabel"}),secondsLabel:n.intl.formatMessage({id:"client.component.duration.secondsLabel"}),allowNegative:iO(t)}}};var cO=function(e){if(!["email_editor","correspondence_editor"].includes(e))return{toolbar:{removeItems:["fontFamily","fontSize","fontColor"]}}};const sO={fixLabel:function(){return!0},getOptions:function(e){var t=e.formField;return{ckEditorConfig:cO(t.htmlconfig)}}},uO={getOptions:function(e){var t=e.formField;return{minValue:nf()(t,"validation.numberRange.fromIncluding",null),maxValue:nf()(t,"validation.numberRange.toIncluding",null)}}};function lO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function dO(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?lO(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lO(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const fO={hasValue:function(e){var t=e.formValues,n=e.formField.locationMapping;return!(!t[Dw(n.city)]&&!t[Dw(n.postcode)])},getValue:function(e){var t=e.formField,n=e.formData,r=t.locationMapping;return{postcode:n.formValues[Dw(r.postcode)],city:n.formValues[Dw(r.city)]}},getEvents:function(e){var t=e.formField,n=e.formName,r=e.formData,o=e.events,i=t.locationMapping||{};return dO(dO({},o),{},{onChange:function(e){for(var o in i)if(i[o]&&void 0!==e[o]){var a=null!==e[o]?e[o]:"";r.changeFieldValue(n,i[o],a)}var c=e.postcode,s=e.city;r.changeFieldValue(n,t.id,dO(dO({},void 0!==c?{postcode:c||""}:{}),void 0!==s?{city:s||""}:{}))},onBlur:function(){r.touchField(n,t.id)}})},dataContainerProps:function(e){var t=e.formField,n=e.formName;return{locations:[t.id],formValues:{formName:n,fields:t.locationMapping?Object.values(t.locationMapping).map((function(e){return Dw(e)})):{}}}},getOptions:function(e){var t=e.formField,n=e.formData;return{fetchSuggestions:function(e,r){return n.loadLocationsSuggestions(t.id,e,r,nf()(t,"countries"))},isLoading:nf()(n,["locations",t.id,"isLoading"],!1),suggestions:nf()(n,["locations",t.id,"suggestions"],null),mapButtonTitle:n.intl.formatMessage({id:"client.component.location.mapButtonTitle"}),locationValues:Object.keys(t.locationMapping||{}).reduce((function(e,r){return dO(dO({},e),{},L()({},r,n.formValues[Dw(t.locationMapping[r])]))}),{})}},getMandatoryValidation:function(e){var t,n,r=e.formField,o=r.locationMapping,i=null===(t=r.siblings.find((function(e){return e.id===o.city})))||void 0===t?void 0:t.validation,a=null===(n=r.siblings.find((function(e){return e.id===o.postcode})))||void 0===n?void 0:n.validation;return(null==i?void 0:i.mandatory)||(null==a?void 0:a.mandatory)}},pO={getOptions:function(e){var t=e.formField;return{postPointDigits:nf()(t,"validation.decimalDigits.postPointDigits",2),prePointDigits:nf()(t,"validation.decimalDigits.prePointDigits",null),minValue:nf()(t,"validation.numberRange.fromIncluding",null),maxValue:nf()(t,"validation.numberRange.toIncluding",null),allowNegative:!0,fixedDecimalScale:!0}}},hO={getOptions:function(e){var t=e.formField;return{prePointDigits:nf()(t,"validation.decimalDigits.prePointDigits",null),postPointDigits:nf()(t,"validation.decimalDigits.postPointDigits",null),minValue:nf()(t,"validation.numberRange.fromIncluding",null),maxValue:nf()(t,"validation.numberRange.toIncluding",null),allowNegative:!0}}},mO={getOptions:function(e){var t=e.formField;return{prePointDigits:nf()(t,"validation.decimalDigits.prePointDigits",null),postPointDigits:nf()(t,"validation.decimalDigits.postPointDigits",null),minValue:nf()(t,"validation.numberRange.fromIncluding",null),maxValue:nf()(t,"validation.numberRange.toIncluding",null),allowNegative:!1,suffix:"%"}}},gO={getOptions:function(e){var t=e.formField;return{customPhoneRegex:nf()(t,"validation.phone.customRegex",null),defaultCountry:nf()(t,"validation.phone.defaultRegion",null)}}};var vO=50,yO=10,bO=function(e){return e.filter(Boolean).join(" and ")},wO=function(e){return e&&Array.isArray(e)&&0!==e.length?"not KEYS(".concat(e.map((function(e){return e.key})).join(", "),")"):void 0};const AO={dataContainerProps:function(e){var t=e.formField;return{relationEntities:[t.id],tooltips:[t.targetEntity],navigationStrategy:!0}},getOptions:function(e){var t=e.formField,n=e.formName,r=e.formData;return{options:nf()(r,["relationEntities",t.id,"data"],[]),moreOptionsAvailable:nf()(r,["relationEntities",t.id,"moreEntitiesAvailable"],!1),isLoading:nf()(r,["relationEntities",t.id,"isLoading"],!1),fetchOptions:function(e){r.loadRelationEntities(t.id,t.targetEntity,{forceReload:!0,limit:yO,formBase:t.formBase,formName:t.formName,where:bO([t.condition,wO(e)]),loadRemoteFieldConfiguration:!0,constriction:t.constriction})},searchOptions:function(e,n){r.loadRelationEntities(t.id,t.targetEntity,{searchTerm:e,limit:vO,forceReload:!0,formBase:t.formBase,formName:t.formName,where:bO([t.condition,wO(n)]),loadRemoteFieldConfiguration:!0,constriction:t.constriction})},openDocsTreeSearch:t.displayDocsTree?function(e){return r.openDocsTreeSearch(n,t,e)}:void 0,openAdvancedSearch:!1===t.displayAdvancedSearch?void 0:function(e,o){return r.openAdvancedSearch(n,t,e,o)},tooltips:nf()(r.tooltips,t.targetEntity,null),loadTooltip:function(e){return r.loadTooltip(t.targetEntity,e)},noResultsText:r.intl.formatMessage({id:"client.component.remoteselect.noResultsText"}),moreOptionsAvailableText:r.intl.formatMessage({id:"client.component.remoteselect.moreOptionsAvailableText"}),DetailLink:r.navigationStrategy&&r.navigationStrategy.DetailLink?function(e){var n=e.entityKey,o=e.children;return(0,S.jsx)(r.navigationStrategy.DetailLink,{entityName:t.targetEntity,entityKey:n,children:o})}:null,createPermission:t.relationName&&nf()(r,["entityModel","paths",t.relationName,"createPermission"],!1),openRemoteCreate:function(e){return r.openRemoteCreate(t,n,e)}}}},xO={dataContainerProps:function(e){return{searchFilters:[e.formField.model]}},getOptions:function(e){var t=e.formField,n=e.formData;return{isMulti:t.multiple,options:nf()(n.searchFilters,t.model,null),fetchOptions:function(){return n.loadSearchFilters(t.model,t.group)},noResultsText:n.intl.formatMessage({id:"client.component.searchfilter.noResultsText"})}}};var EO=1e4;const OO={dataContainerProps:function(e){var t=e.formField;return{relationEntities:[t.id],tooltips:[t.targetEntity]}},getOptions:function(e){var t=e.formField,n=e.formData;return{options:nf()(n,["relationEntities",t.id,"data"],[]),isLoading:nf()(n,["relationEntities",t.id,"isLoading"],!1),tooltips:nf()(n.tooltips,t.targetEntity,null),loadTooltip:function(e){return n.loadTooltip(t.targetEntity,e)},noResultsText:n.intl.formatMessage({id:"client.component.remoteselect.noResultsText"}),fetchOptions:function(){return n.loadRelationEntities(t.id,t.targetEntity,{forceReload:!1,limit:EO,constriction:t.constriction,where:t.condition})}}}};function CO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function kO(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?CO(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):CO(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var SO={binary:oO,boolean:YE,code:KE,counter:hO,"data-amount":hO,datetime:eO,date:JE,birthdate:JE,"pulldown-date":JE,decimal:tO,document:oO,double:tO,duration:aO,html:sO,image:oO,integer:uO,location:fO,long:uO,moneyamount:pO,marking:YE,"multi-remote-field":AO,"multi-select-box":OO,"named-upload":oO,number:hO,phone:gO,"search-filter":xO,"single-remote-field":AO,"single-select-box":OO,sorting:hO,percent:mO},DO=kO({},SO);const PO={editable:SO,readOnly:kO({},SO),list:DO,search:kO(kO({},SO),{},{boolean:qE,marking:qE})};var _O=a(80470),jO=a(41609),TO=a.n(jO),RO=a(45915),IO=a(23493),MO=a.n(IO),NO=a(8486),BO=a(56315),ZO=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];var FO=a(3640),LO=a(11259),HO=a(44822),UO=a(32208),zO=a(19241);var WO=a(99357);function VO(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=(0,zO.Z)(e);if(t){var o=(0,zO.Z)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return(0,WO.Z)(this,n)}}var YO=a(13508),qO=a(89178),GO=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function QO(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(r=e[n],o=t[n],!(r===o||GO(r)&&GO(o)))return!1;var r,o;return!0}for(var XO={name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"},KO=function(e){return(0,qO.tZ)("span",(0,FO.Z)({css:XO},e))},$O={guidance:function(e){var t=e.isSearchable,n=e.isMulti,r=e.isDisabled,o=e.tabSelectsValue;switch(e.context){case"menu":return"Use Up and Down to choose options".concat(r?"":", press Enter to select the currently focused option",", press Escape to exit the menu").concat(o?", press Tab to select the option and exit the menu":"",".");case"input":return"".concat(e["aria-label"]||"Select"," is focused ").concat(t?",type to refine list":"",", press Down to open the menu, ").concat(n?" press left to focus selected values":"");case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function(e){var t=e.action,n=e.label,r=void 0===n?"":n,o=e.labels,i=e.isDisabled;switch(t){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(r,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(o.length>1?"s":""," ").concat(o.join(","),", selected.");case"select-option":return"option ".concat(r,i?" is disabled. Select another option.":", selected.");default:return""}},onFocus:function(e){var t=e.context,n=e.focused,r=e.options,o=e.label,i=void 0===o?"":o,a=e.selectValue,c=e.isDisabled,s=e.isSelected,u=function(e,t){return e&&e.length?"".concat(e.indexOf(t)+1," of ").concat(e.length):""};if("value"===t&&a)return"value ".concat(i," focused, ").concat(u(a,n),".");if("menu"===t){var l=c?" disabled":"",d="".concat(s?"selected":"focused").concat(l);return"option ".concat(i," ").concat(d,", ").concat(u(r,n),".")}return""},onFilter:function(e){var t=e.inputValue,n=e.resultsMessage;return"".concat(n).concat(t?" for search term "+t:"",".")}},JO=function(e){var t=e.ariaSelection,n=e.focusedOption,r=e.focusedValue,o=e.focusableOptions,i=e.isFocused,a=e.selectValue,c=e.selectProps,s=e.id,u=c.ariaLiveMessages,l=c.getOptionLabel,d=c.inputValue,f=c.isMulti,p=c.isOptionDisabled,h=c.isSearchable,m=c.menuIsOpen,g=c.options,v=c.screenReaderStatus,y=c.tabSelectsValue,b=c["aria-label"],w=c["aria-live"],A=(0,R.useMemo)((function(){return(0,NO.Z)((0,NO.Z)({},$O),u||{})}),[u]),x=(0,R.useMemo)((function(){var e,n="";if(t&&A.onChange){var r=t.option,o=t.options,i=t.removedValue,c=t.removedValues,s=t.value,u=i||r||(e=s,Array.isArray(e)?null:e),d=u?l(u):"",f=o||c||void 0,h=f?f.map(l):[],m=(0,NO.Z)({isDisabled:u&&p(u,a),label:d,labels:h},t);n=A.onChange(m)}return n}),[t,A,p,a,l]),E=(0,R.useMemo)((function(){var e="",t=n||r,o=!!(n&&a&&a.includes(n));if(t&&A.onFocus){var i={focused:t,label:l(t),isDisabled:p(t,a),isSelected:o,options:g,context:t===n?"menu":"value",selectValue:a};e=A.onFocus(i)}return e}),[n,r,l,p,A,g,a]),O=(0,R.useMemo)((function(){var e="";if(m&&g.length&&A.onFilter){var t=v({count:o.length});e=A.onFilter({inputValue:d,resultsMessage:t})}return e}),[o,d,m,A,g,v]),C=(0,R.useMemo)((function(){var e="";if(A.guidance){var t=r?"value":m?"menu":"input";e=A.guidance({"aria-label":b,context:t,isDisabled:n&&p(n,a),isMulti:f,isSearchable:h,tabSelectsValue:y})}return e}),[b,n,r,f,p,h,m,A,a,y]),k="".concat(E," ").concat(O," ").concat(C),S=(0,qO.tZ)(R.Fragment,null,(0,qO.tZ)("span",{id:"aria-selection"},x),(0,qO.tZ)("span",{id:"aria-context"},k)),D="initial-input-focus"===(null==t?void 0:t.action);return(0,qO.tZ)(R.Fragment,null,(0,qO.tZ)(KO,{id:s},D&&S),(0,qO.tZ)(KO,{"aria-live":w,"aria-atomic":"false","aria-relevant":"additions text"},i&&!D&&S))},eC=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],tC=new RegExp("["+eC.map((function(e){return e.letters})).join("")+"]","g"),nC={},rC=0;rC<eC.length;rC++)for(var oC=eC[rC],iC=0;iC<oC.letters.length;iC++)nC[oC.letters[iC]]=oC.base;var aC=function(e){return e.replace(tC,(function(e){return nC[e]}))},cC=function(e,t){void 0===t&&(t=QO);var n=null;function r(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];if(n&&n.lastThis===this&&t(r,n.lastArgs))return n.lastResult;var i=e.apply(this,r);return n={lastResult:i,lastArgs:r,lastThis:this},i}return r.clear=function(){n=null},r}(aC),sC=function(e){return e.replace(/^\s+|\s+$/g,"")},uC=function(e){return"".concat(e.label," ").concat(e.value)},lC=["innerRef"];function dC(e){var t=e.innerRef,n=(0,BO.Z)(e,lC),r=(0,YO.r)(n,"onExited","in","enter","exit","appear");return(0,qO.tZ)("input",(0,FO.Z)({ref:t},r,{css:(0,qO.iv)({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},"","")}))}var fC=["boxSizing","height","overflow","paddingRight","position"],pC={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function hC(e){e.preventDefault()}function mC(e){e.stopPropagation()}function gC(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;0===e?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function vC(){return"ontouchstart"in window||navigator.maxTouchPoints}var yC=!("undefined"==typeof window||!window.document||!window.document.createElement),bC=0,wC={capture:!1,passive:!1};var AC=function(){return document.activeElement&&document.activeElement.blur()},xC={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function EC(e){var t=e.children,n=e.lockEnabled,r=e.captureEnabled,o=function(e){var t=e.isEnabled,n=e.onBottomArrive,r=e.onBottomLeave,o=e.onTopArrive,i=e.onTopLeave,a=(0,R.useRef)(!1),c=(0,R.useRef)(!1),s=(0,R.useRef)(0),u=(0,R.useRef)(null),l=(0,R.useCallback)((function(e,t){if(null!==u.current){var s=u.current,l=s.scrollTop,d=s.scrollHeight,f=s.clientHeight,p=u.current,h=t>0,m=d-f-l,g=!1;m>t&&a.current&&(r&&r(e),a.current=!1),h&&c.current&&(i&&i(e),c.current=!1),h&&t>m?(n&&!a.current&&n(e),p.scrollTop=d,g=!0,a.current=!0):!h&&-t>l&&(o&&!c.current&&o(e),p.scrollTop=0,g=!0,c.current=!0),g&&function(e){e.preventDefault(),e.stopPropagation()}(e)}}),[n,r,o,i]),d=(0,R.useCallback)((function(e){l(e,e.deltaY)}),[l]),f=(0,R.useCallback)((function(e){s.current=e.changedTouches[0].clientY}),[]),p=(0,R.useCallback)((function(e){var t=s.current-e.changedTouches[0].clientY;l(e,t)}),[l]),h=(0,R.useCallback)((function(e){if(e){var t=!!YO.s&&{passive:!1};e.addEventListener("wheel",d,t),e.addEventListener("touchstart",f,t),e.addEventListener("touchmove",p,t)}}),[p,f,d]),m=(0,R.useCallback)((function(e){e&&(e.removeEventListener("wheel",d,!1),e.removeEventListener("touchstart",f,!1),e.removeEventListener("touchmove",p,!1))}),[p,f,d]);return(0,R.useEffect)((function(){if(t){var e=u.current;return h(e),function(){m(e)}}}),[t,h,m]),function(e){u.current=e}}({isEnabled:void 0===r||r,onBottomArrive:e.onBottomArrive,onBottomLeave:e.onBottomLeave,onTopArrive:e.onTopArrive,onTopLeave:e.onTopLeave}),i=function(e){var t=e.isEnabled,n=e.accountForScrollbars,r=void 0===n||n,o=(0,R.useRef)({}),i=(0,R.useRef)(null),a=(0,R.useCallback)((function(e){if(yC){var t=document.body,n=t&&t.style;if(r&&fC.forEach((function(e){var t=n&&n[e];o.current[e]=t})),r&&bC<1){var i=parseInt(o.current.paddingRight,10)||0,a=document.body?document.body.clientWidth:0,c=window.innerWidth-a+i||0;Object.keys(pC).forEach((function(e){var t=pC[e];n&&(n[e]=t)})),n&&(n.paddingRight="".concat(c,"px"))}t&&vC()&&(t.addEventListener("touchmove",hC,wC),e&&(e.addEventListener("touchstart",gC,wC),e.addEventListener("touchmove",mC,wC))),bC+=1}}),[r]),c=(0,R.useCallback)((function(e){if(yC){var t=document.body,n=t&&t.style;bC=Math.max(bC-1,0),r&&bC<1&&fC.forEach((function(e){var t=o.current[e];n&&(n[e]=t)})),t&&vC()&&(t.removeEventListener("touchmove",hC,wC),e&&(e.removeEventListener("touchstart",gC,wC),e.removeEventListener("touchmove",mC,wC)))}}),[r]);return(0,R.useEffect)((function(){if(t){var e=i.current;return a(e),function(){c(e)}}}),[t,a,c]),function(e){i.current=e}}({isEnabled:n});return(0,qO.tZ)(R.Fragment,null,n&&(0,qO.tZ)("div",{onClick:AC,css:xC}),t((function(e){o(e),i(e)})))}var OC={clearIndicator:YO.a,container:YO.b,control:YO.d,dropdownIndicator:YO.e,group:YO.g,groupHeading:YO.f,indicatorsContainer:YO.i,indicatorSeparator:YO.h,input:YO.j,loadingIndicator:YO.l,loadingMessage:YO.k,menu:YO.m,menuList:YO.n,menuPortal:YO.o,multiValue:YO.p,multiValueLabel:YO.q,multiValueRemove:YO.t,noOptionsMessage:YO.u,option:YO.v,placeholder:YO.w,singleValue:YO.x,valueContainer:YO.y};var CC={borderRadius:4,colors:{primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},spacing:{baseUnit:4,controlHeight:38,menuGutter:8}},kC={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:(0,YO.z)(),captureMenuScroll:!(0,YO.z)(),closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e){return function(t,n){if(t.data.__isNew__)return!0;var r=(0,NO.Z)({ignoreCase:!0,ignoreAccents:!0,stringify:uC,trim:!0,matchFrom:"any"},e),o=r.ignoreCase,i=r.ignoreAccents,a=r.stringify,c=r.trim,s=r.matchFrom,u=c?sC(n):n,l=c?sC(a(t)):a(t);return o&&(u=u.toLowerCase(),l=l.toLowerCase()),i&&(u=cC(u),l=aC(l)),"start"===s?l.substr(0,u.length)===u:l.indexOf(u)>-1}}(),formatGroupLabel:function(e){return e.label},getOptionLabel:function(e){return e.label},getOptionValue:function(e){return e.value},isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:function(e){return!!e.isDisabled},loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!(0,YO.A)(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return"".concat(t," result").concat(1!==t?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0};function SC(e,t,n,r){return{type:"option",data:t,isDisabled:RC(e,t,n),isSelected:IC(e,t,n),label:jC(e,t),value:TC(e,t),index:r}}function DC(e,t){return e.options.map((function(n,r){if("options"in n){var o=n.options.map((function(n,r){return SC(e,n,t,r)})).filter((function(t){return _C(e,t)}));return o.length>0?{type:"group",data:n,options:o,index:r}:void 0}var i=SC(e,n,t,r);return _C(e,i)?i:void 0})).filter(YO.G)}function PC(e){return e.reduce((function(e,t){return"group"===t.type?e.push.apply(e,(0,RO.Z)(t.options.map((function(e){return e.data})))):e.push(t.data),e}),[])}function _C(e,t){var n=e.inputValue,r=void 0===n?"":n,o=t.data,i=t.isSelected,a=t.label,c=t.value;return(!NC(e)||!i)&&MC(e,{label:a,value:c,data:o},r)}var jC=function(e,t){return e.getOptionLabel(t)},TC=function(e,t){return e.getOptionValue(t)};function RC(e,t,n){return"function"==typeof e.isOptionDisabled&&e.isOptionDisabled(t,n)}function IC(e,t,n){if(n.indexOf(t)>-1)return!0;if("function"==typeof e.isOptionSelected)return e.isOptionSelected(t,n);var r=TC(e,t);return n.some((function(t){return TC(e,t)===r}))}function MC(e,t,n){return!e.filterOption||e.filterOption(t,n)}var NC=function(e){var t=e.hideSelectedOptions,n=e.isMulti;return void 0===t?n:t},BC=1,ZC=function(e){(0,UO.Z)(n,e);var t=VO(n);function n(e){var r;return(0,LO.Z)(this,n),(r=t.call(this,e)).state={ariaSelection:null,focusedOption:null,focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0},r.blockOptionHover=!1,r.isComposing=!1,r.commonProps=void 0,r.initialTouchX=0,r.initialTouchY=0,r.instancePrefix="",r.openAfterFocus=!1,r.scrollToFocusedOptionOnUpdate=!1,r.userIsDragging=void 0,r.controlRef=null,r.getControlRef=function(e){r.controlRef=e},r.focusedOptionRef=null,r.getFocusedOptionRef=function(e){r.focusedOptionRef=e},r.menuListRef=null,r.getMenuListRef=function(e){r.menuListRef=e},r.inputRef=null,r.getInputRef=function(e){r.inputRef=e},r.focus=r.focusInput,r.blur=r.blurInput,r.onChange=function(e,t){var n=r.props,o=n.onChange,i=n.name;t.name=i,r.ariaOnChange(e,t),o(e,t)},r.setValue=function(e,t,n){var o=r.props,i=o.closeMenuOnSelect,a=o.isMulti,c=o.inputValue;r.onInputChange("",{action:"set-value",prevInputValue:c}),i&&(r.setState({inputIsHiddenAfterUpdate:!a}),r.onMenuClose()),r.setState({clearFocusValueOnUpdate:!0}),r.onChange(e,{action:t,option:n})},r.selectOption=function(e){var t=r.props,n=t.blurInputOnSelect,o=t.isMulti,i=t.name,a=r.state.selectValue,c=o&&r.isOptionSelected(e,a),s=r.isOptionDisabled(e,a);if(c){var u=r.getOptionValue(e);r.setValue((0,YO.B)(a.filter((function(e){return r.getOptionValue(e)!==u}))),"deselect-option",e)}else{if(s)return void r.ariaOnChange((0,YO.C)(e),{action:"select-option",option:e,name:i});o?r.setValue((0,YO.B)([].concat((0,RO.Z)(a),[e])),"select-option",e):r.setValue((0,YO.C)(e),"select-option")}n&&r.blurInput()},r.removeValue=function(e){var t=r.props.isMulti,n=r.state.selectValue,o=r.getOptionValue(e),i=n.filter((function(e){return r.getOptionValue(e)!==o})),a=(0,YO.D)(t,i,i[0]||null);r.onChange(a,{action:"remove-value",removedValue:e}),r.focusInput()},r.clearValue=function(){var e=r.state.selectValue;r.onChange((0,YO.D)(r.props.isMulti,[],null),{action:"clear",removedValues:e})},r.popValue=function(){var e=r.props.isMulti,t=r.state.selectValue,n=t[t.length-1],o=t.slice(0,t.length-1),i=(0,YO.D)(e,o,o[0]||null);r.onChange(i,{action:"pop-value",removedValue:n})},r.getValue=function(){return r.state.selectValue},r.cx=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return YO.E.apply(void 0,[r.props.classNamePrefix].concat(t))},r.getOptionLabel=function(e){return jC(r.props,e)},r.getOptionValue=function(e){return TC(r.props,e)},r.getStyles=function(e,t){var n=OC[e](t);n.boxSizing="border-box";var o=r.props.styles[e];return o?o(n,t):n},r.getElementId=function(e){return"".concat(r.instancePrefix,"-").concat(e)},r.getComponents=function(){return(0,YO.F)(r.props)},r.buildCategorizedOptions=function(){return DC(r.props,r.state.selectValue)},r.getCategorizedOptions=function(){return r.props.menuIsOpen?r.buildCategorizedOptions():[]},r.buildFocusableOptions=function(){return PC(r.buildCategorizedOptions())},r.getFocusableOptions=function(){return r.props.menuIsOpen?r.buildFocusableOptions():[]},r.ariaOnChange=function(e,t){r.setState({ariaSelection:(0,NO.Z)({value:e},t)})},r.onMenuMouseDown=function(e){0===e.button&&(e.stopPropagation(),e.preventDefault(),r.focusInput())},r.onMenuMouseMove=function(e){r.blockOptionHover=!1},r.onControlMouseDown=function(e){if(!e.defaultPrevented){var t=r.props.openMenuOnClick;r.state.isFocused?r.props.menuIsOpen?"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&r.onMenuClose():t&&r.openMenu("first"):(t&&(r.openAfterFocus=!0),r.focusInput()),"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&e.preventDefault()}},r.onDropdownIndicatorMouseDown=function(e){if(!(e&&"mousedown"===e.type&&0!==e.button||r.props.isDisabled)){var t=r.props,n=t.isMulti,o=t.menuIsOpen;r.focusInput(),o?(r.setState({inputIsHiddenAfterUpdate:!n}),r.onMenuClose()):r.openMenu("first"),e.preventDefault()}},r.onClearIndicatorMouseDown=function(e){e&&"mousedown"===e.type&&0!==e.button||(r.clearValue(),e.preventDefault(),r.openAfterFocus=!1,"touchend"===e.type?r.focusInput():setTimeout((function(){return r.focusInput()})))},r.onScroll=function(e){"boolean"==typeof r.props.closeMenuOnScroll?e.target instanceof HTMLElement&&(0,YO.H)(e.target)&&r.props.onMenuClose():"function"==typeof r.props.closeMenuOnScroll&&r.props.closeMenuOnScroll(e)&&r.props.onMenuClose()},r.onCompositionStart=function(){r.isComposing=!0},r.onCompositionEnd=function(){r.isComposing=!1},r.onTouchStart=function(e){var t=e.touches,n=t&&t.item(0);n&&(r.initialTouchX=n.clientX,r.initialTouchY=n.clientY,r.userIsDragging=!1)},r.onTouchMove=function(e){var t=e.touches,n=t&&t.item(0);if(n){var o=Math.abs(n.clientX-r.initialTouchX),i=Math.abs(n.clientY-r.initialTouchY);r.userIsDragging=o>5||i>5}},r.onTouchEnd=function(e){r.userIsDragging||(r.controlRef&&!r.controlRef.contains(e.target)&&r.menuListRef&&!r.menuListRef.contains(e.target)&&r.blurInput(),r.initialTouchX=0,r.initialTouchY=0)},r.onControlTouchEnd=function(e){r.userIsDragging||r.onControlMouseDown(e)},r.onClearIndicatorTouchEnd=function(e){r.userIsDragging||r.onClearIndicatorMouseDown(e)},r.onDropdownIndicatorTouchEnd=function(e){r.userIsDragging||r.onDropdownIndicatorMouseDown(e)},r.handleInputChange=function(e){var t=r.props.inputValue,n=e.currentTarget.value;r.setState({inputIsHiddenAfterUpdate:!1}),r.onInputChange(n,{action:"input-change",prevInputValue:t}),r.props.menuIsOpen||r.onMenuOpen()},r.onInputFocus=function(e){r.props.onFocus&&r.props.onFocus(e),r.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(r.openAfterFocus||r.props.openMenuOnFocus)&&r.openMenu("first"),r.openAfterFocus=!1},r.onInputBlur=function(e){var t=r.props.inputValue;r.menuListRef&&r.menuListRef.contains(document.activeElement)?r.inputRef.focus():(r.props.onBlur&&r.props.onBlur(e),r.onInputChange("",{action:"input-blur",prevInputValue:t}),r.onMenuClose(),r.setState({focusedValue:null,isFocused:!1}))},r.onOptionHover=function(e){r.blockOptionHover||r.state.focusedOption===e||r.setState({focusedOption:e})},r.shouldHideSelectedOptions=function(){return NC(r.props)},r.onKeyDown=function(e){var t=r.props,n=t.isMulti,o=t.backspaceRemovesValue,i=t.escapeClearsValue,a=t.inputValue,c=t.isClearable,s=t.isDisabled,u=t.menuIsOpen,l=t.onKeyDown,d=t.tabSelectsValue,f=t.openMenuOnFocus,p=r.state,h=p.focusedOption,m=p.focusedValue,g=p.selectValue;if(!(s||"function"==typeof l&&(l(e),e.defaultPrevented))){switch(r.blockOptionHover=!0,e.key){case"ArrowLeft":if(!n||a)return;r.focusValue("previous");break;case"ArrowRight":if(!n||a)return;r.focusValue("next");break;case"Delete":case"Backspace":if(a)return;if(m)r.removeValue(m);else{if(!o)return;n?r.popValue():c&&r.clearValue()}break;case"Tab":if(r.isComposing)return;if(e.shiftKey||!u||!d||!h||f&&r.isOptionSelected(h,g))return;r.selectOption(h);break;case"Enter":if(229===e.keyCode)break;if(u){if(!h)return;if(r.isComposing)return;r.selectOption(h);break}return;case"Escape":u?(r.setState({inputIsHiddenAfterUpdate:!1}),r.onInputChange("",{action:"menu-close",prevInputValue:a}),r.onMenuClose()):c&&i&&r.clearValue();break;case" ":if(a)return;if(!u){r.openMenu("first");break}if(!h)return;r.selectOption(h);break;case"ArrowUp":u?r.focusOption("up"):r.openMenu("last");break;case"ArrowDown":u?r.focusOption("down"):r.openMenu("first");break;case"PageUp":if(!u)return;r.focusOption("pageup");break;case"PageDown":if(!u)return;r.focusOption("pagedown");break;case"Home":if(!u)return;r.focusOption("first");break;case"End":if(!u)return;r.focusOption("last");break;default:return}e.preventDefault()}},r.instancePrefix="react-select-"+(r.props.instanceId||++BC),r.state.selectValue=(0,YO.I)(e.value),r}return(0,HO.Z)(n,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput()}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.isDisabled,r=t.menuIsOpen,o=this.state.isFocused;(o&&!n&&e.isDisabled||o&&r&&!e.menuIsOpen)&&this.focusInput(),o&&n&&!e.isDisabled?this.setState({isFocused:!1},this.onMenuClose):o||n||!e.isDisabled||this.inputRef!==document.activeElement||this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&((0,YO.J)(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(e,t){this.props.onInputChange(e,t)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(e){var t=this,n=this.state,r=n.selectValue,o=n.isFocused,i=this.buildFocusableOptions(),a="first"===e?0:i.length-1;if(!this.props.isMulti){var c=i.indexOf(r[0]);c>-1&&(a=c)}this.scrollToFocusedOptionOnUpdate=!(o&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:i[a]},(function(){return t.onMenuOpen()}))}},{key:"focusValue",value:function(e){var t=this.state,n=t.selectValue,r=t.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var o=n.indexOf(r);r||(o=-1);var i=n.length-1,a=-1;if(n.length){switch(e){case"previous":a=0===o?0:-1===o?i:o-1;break;case"next":o>-1&&o<i&&(a=o+1)}this.setState({inputIsHidden:-1!==a,focusedValue:n[a]})}}}},{key:"focusOption",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props.pageSize,n=this.state.focusedOption,r=this.getFocusableOptions();if(r.length){var o=0,i=r.indexOf(n);n||(i=-1),"up"===e?o=i>0?i-1:r.length-1:"down"===e?o=(i+1)%r.length:"pageup"===e?(o=i-t)<0&&(o=0):"pagedown"===e?(o=i+t)>r.length-1&&(o=r.length-1):"last"===e&&(o=r.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:r[o],focusedValue:null})}}},{key:"getTheme",value:function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(CC):(0,NO.Z)((0,NO.Z)({},CC),this.props.theme):CC}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.cx,n=this.getStyles,r=this.getValue,o=this.selectOption,i=this.setValue,a=this.props,c=a.isMulti,s=a.isRtl,u=a.options;return{clearValue:e,cx:t,getStyles:n,getValue:r,hasValue:this.hasValue(),isMulti:c,isRtl:s,options:u,selectOption:o,selectProps:a,setValue:i,theme:this.getTheme()}}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var e=this.props,t=e.isClearable,n=e.isMulti;return void 0===t?n:t}},{key:"isOptionDisabled",value:function(e,t){return RC(this.props,e,t)}},{key:"isOptionSelected",value:function(e,t){return IC(this.props,e,t)}},{key:"filterOption",value:function(e,t){return MC(this.props,e,t)}},{key:"formatOptionLabel",value:function(e,t){if("function"==typeof this.props.formatOptionLabel){var n=this.props.inputValue,r=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:r})}return this.getOptionLabel(e)}},{key:"formatGroupLabel",value:function(e){return this.props.formatGroupLabel(e)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var e=this.props,t=e.isDisabled,n=e.isSearchable,r=e.inputId,o=e.inputValue,i=e.tabIndex,a=e.form,c=e.menuIsOpen,s=this.getComponents().Input,u=this.state,l=u.inputIsHidden,d=u.ariaSelection,f=this.commonProps,p=r||this.getElementId("input"),h=(0,NO.Z)((0,NO.Z)((0,NO.Z)({"aria-autocomplete":"list","aria-expanded":c,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],role:"combobox"},c&&{"aria-controls":this.getElementId("listbox"),"aria-owns":this.getElementId("listbox")}),!n&&{"aria-readonly":!0}),this.hasValue()?"initial-input-focus"===(null==d?void 0:d.action)&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return n?R.createElement(s,(0,FO.Z)({},f,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:p,innerRef:this.getInputRef,isDisabled:t,isHidden:l,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:i,form:a,type:"text",value:o},h)):R.createElement(dC,(0,FO.Z)({id:p,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:YO.K,onFocus:this.onInputFocus,disabled:t,tabIndex:i,inputMode:"none",form:a,value:""},h))}},{key:"renderPlaceholderOrValue",value:function(){var e=this,t=this.getComponents(),n=t.MultiValue,r=t.MultiValueContainer,o=t.MultiValueLabel,i=t.MultiValueRemove,a=t.SingleValue,c=t.Placeholder,s=this.commonProps,u=this.props,l=u.controlShouldRenderValue,d=u.isDisabled,f=u.isMulti,p=u.inputValue,h=u.placeholder,m=this.state,g=m.selectValue,v=m.focusedValue,y=m.isFocused;if(!this.hasValue()||!l)return p?null:R.createElement(c,(0,FO.Z)({},s,{key:"placeholder",isDisabled:d,isFocused:y,innerProps:{id:this.getElementId("placeholder")}}),h);if(f)return g.map((function(t,a){var c=t===v,u="".concat(e.getOptionLabel(t),"-").concat(e.getOptionValue(t));return R.createElement(n,(0,FO.Z)({},s,{components:{Container:r,Label:o,Remove:i},isFocused:c,isDisabled:d,key:u,index:a,removeProps:{onClick:function(){return e.removeValue(t)},onTouchEnd:function(){return e.removeValue(t)},onMouseDown:function(e){e.preventDefault()}},data:t}),e.formatOptionLabel(t,"value"))}));if(p)return null;var b=g[0];return R.createElement(a,(0,FO.Z)({},s,{data:b,isDisabled:d}),this.formatOptionLabel(b,"value"))}},{key:"renderClearIndicator",value:function(){var e=this.getComponents().ClearIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,o=n.isLoading,i=this.state.isFocused;if(!this.isClearable()||!e||r||!this.hasValue()||o)return null;var a={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return R.createElement(e,(0,FO.Z)({},t,{innerProps:a,isFocused:i}))}},{key:"renderLoadingIndicator",value:function(){var e=this.getComponents().LoadingIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,o=n.isLoading,i=this.state.isFocused;if(!e||!o)return null;return R.createElement(e,(0,FO.Z)({},t,{innerProps:{"aria-hidden":"true"},isDisabled:r,isFocused:i}))}},{key:"renderIndicatorSeparator",value:function(){var e=this.getComponents(),t=e.DropdownIndicator,n=e.IndicatorSeparator;if(!t||!n)return null;var r=this.commonProps,o=this.props.isDisabled,i=this.state.isFocused;return R.createElement(n,(0,FO.Z)({},r,{isDisabled:o,isFocused:i}))}},{key:"renderDropdownIndicator",value:function(){var e=this.getComponents().DropdownIndicator;if(!e)return null;var t=this.commonProps,n=this.props.isDisabled,r=this.state.isFocused,o={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return R.createElement(e,(0,FO.Z)({},t,{innerProps:o,isDisabled:n,isFocused:r}))}},{key:"renderMenu",value:function(){var e=this,t=this.getComponents(),n=t.Group,r=t.GroupHeading,o=t.Menu,i=t.MenuList,a=t.MenuPortal,c=t.LoadingMessage,s=t.NoOptionsMessage,u=t.Option,l=this.commonProps,d=this.state.focusedOption,f=this.props,p=f.captureMenuScroll,h=f.inputValue,m=f.isLoading,g=f.loadingMessage,v=f.minMenuHeight,y=f.maxMenuHeight,b=f.menuIsOpen,w=f.menuPlacement,A=f.menuPosition,x=f.menuPortalTarget,E=f.menuShouldBlockScroll,O=f.menuShouldScrollIntoView,C=f.noOptionsMessage,k=f.onMenuScrollToTop,S=f.onMenuScrollToBottom;if(!b)return null;var D,P=function(t,n){var r=t.type,o=t.data,i=t.isDisabled,a=t.isSelected,c=t.label,s=t.value,f=d===o,p=i?void 0:function(){return e.onOptionHover(o)},h=i?void 0:function(){return e.selectOption(o)},m="".concat(e.getElementId("option"),"-").concat(n),g={id:m,onClick:h,onMouseMove:p,onMouseOver:p,tabIndex:-1};return R.createElement(u,(0,FO.Z)({},l,{innerProps:g,data:o,isDisabled:i,isSelected:a,key:m,label:c,type:r,value:s,isFocused:f,innerRef:f?e.getFocusedOptionRef:void 0}),e.formatOptionLabel(t.data,"menu"))};if(this.hasOptions())D=this.getCategorizedOptions().map((function(t){if("group"===t.type){var o=t.data,i=t.options,a=t.index,c="".concat(e.getElementId("group"),"-").concat(a),s="".concat(c,"-heading");return R.createElement(n,(0,FO.Z)({},l,{key:c,data:o,options:i,Heading:r,headingProps:{id:s,data:t.data},label:e.formatGroupLabel(t.data)}),t.options.map((function(e){return P(e,"".concat(a,"-").concat(e.index))})))}if("option"===t.type)return P(t,"".concat(t.index))}));else if(m){var _=g({inputValue:h});if(null===_)return null;D=R.createElement(c,l,_)}else{var j=C({inputValue:h});if(null===j)return null;D=R.createElement(s,l,j)}var T={minMenuHeight:v,maxMenuHeight:y,menuPlacement:w,menuPosition:A,menuShouldScrollIntoView:O},I=R.createElement(YO.M,(0,FO.Z)({},l,T),(function(t){var n=t.ref,r=t.placerProps,a=r.placement,c=r.maxHeight;return R.createElement(o,(0,FO.Z)({},l,T,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove,id:e.getElementId("listbox")},isLoading:m,placement:a}),R.createElement(EC,{captureEnabled:p,onTopArrive:k,onBottomArrive:S,lockEnabled:E},(function(t){return R.createElement(i,(0,FO.Z)({},l,{innerRef:function(n){e.getMenuListRef(n),t(n)},isLoading:m,maxHeight:c,focusedOption:d}),D)})))}));return x||"fixed"===A?R.createElement(a,(0,FO.Z)({},l,{appendTo:x,controlElement:this.controlRef,menuPlacement:w,menuPosition:A}),I):I}},{key:"renderFormField",value:function(){var e=this,t=this.props,n=t.delimiter,r=t.isDisabled,o=t.isMulti,i=t.name,a=this.state.selectValue;if(i&&!r){if(o){if(n){var c=a.map((function(t){return e.getOptionValue(t)})).join(n);return R.createElement("input",{name:i,type:"hidden",value:c})}var s=a.length>0?a.map((function(t,n){return R.createElement("input",{key:"i-".concat(n),name:i,type:"hidden",value:e.getOptionValue(t)})})):R.createElement("input",{name:i,type:"hidden"});return R.createElement("div",null,s)}var u=a[0]?this.getOptionValue(a[0]):"";return R.createElement("input",{name:i,type:"hidden",value:u})}}},{key:"renderLiveRegion",value:function(){var e=this.commonProps,t=this.state,n=t.ariaSelection,r=t.focusedOption,o=t.focusedValue,i=t.isFocused,a=t.selectValue,c=this.getFocusableOptions();return R.createElement(JO,(0,FO.Z)({},e,{id:this.getElementId("live-region"),ariaSelection:n,focusedOption:r,focusedValue:o,isFocused:i,selectValue:a,focusableOptions:c}))}},{key:"render",value:function(){var e=this.getComponents(),t=e.Control,n=e.IndicatorsContainer,r=e.SelectContainer,o=e.ValueContainer,i=this.props,a=i.className,c=i.id,s=i.isDisabled,u=i.menuIsOpen,l=this.state.isFocused,d=this.commonProps=this.getCommonProps();return R.createElement(r,(0,FO.Z)({},d,{className:a,innerProps:{id:c,onKeyDown:this.onKeyDown},isDisabled:s,isFocused:l}),this.renderLiveRegion(),R.createElement(t,(0,FO.Z)({},d,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:s,isFocused:l,menuIsOpen:u}),R.createElement(o,(0,FO.Z)({},d,{isDisabled:s}),this.renderPlaceholderOrValue(),this.renderInput()),R.createElement(n,(0,FO.Z)({},d,{isDisabled:s}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.prevProps,r=t.clearFocusValueOnUpdate,o=t.inputIsHiddenAfterUpdate,i=t.ariaSelection,a=t.isFocused,c=t.prevWasFocused,s=e.options,u=e.value,l=e.menuIsOpen,d=e.inputValue,f=e.isMulti,p=(0,YO.I)(u),h={};if(n&&(u!==n.value||s!==n.options||l!==n.menuIsOpen||d!==n.inputValue)){var m=l?function(e,t){return PC(DC(e,t))}(e,p):[],g=r?function(e,t){var n=e.focusedValue,r=e.selectValue.indexOf(n);if(r>-1){if(t.indexOf(n)>-1)return n;if(r<t.length)return t[r]}return null}(t,p):null,v=function(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}(t,m);h={selectValue:p,focusedOption:v,focusedValue:g,clearFocusValueOnUpdate:!1}}var y=null!=o&&e!==n?{inputIsHidden:o,inputIsHiddenAfterUpdate:void 0}:{},b=i,w=a&&c;return a&&!w&&(b={value:(0,YO.D)(f,p,p[0]||null),options:p,action:"initial-input-focus"},w=!c),"initial-input-focus"===(null==i?void 0:i.action)&&(b=null),(0,NO.Z)((0,NO.Z)((0,NO.Z)({},h),y),{},{prevProps:e,ariaSelection:b,prevWasFocused:w})}}]),n}(R.Component);ZC.defaultProps=kC;Math.abs,String.fromCharCode;a(6919);var FC=(0,R.forwardRef)((function(e,t){var n=function(e){var t=e.defaultInputValue,n=void 0===t?"":t,r=e.defaultMenuIsOpen,o=void 0!==r&&r,i=e.defaultValue,a=void 0===i?null:i,c=e.inputValue,s=e.menuIsOpen,u=e.onChange,l=e.onInputChange,d=e.onMenuClose,f=e.onMenuOpen,p=e.value,h=(0,BO.Z)(e,ZO),m=(0,R.useState)(void 0!==c?c:n),g=(0,wd.Z)(m,2),v=g[0],y=g[1],b=(0,R.useState)(void 0!==s?s:o),w=(0,wd.Z)(b,2),A=w[0],x=w[1],E=(0,R.useState)(void 0!==p?p:a),O=(0,wd.Z)(E,2),C=O[0],k=O[1],S=(0,R.useCallback)((function(e,t){"function"==typeof u&&u(e,t),k(e)}),[u]),D=(0,R.useCallback)((function(e,t){var n;"function"==typeof l&&(n=l(e,t)),y(void 0!==n?n:e)}),[l]),P=(0,R.useCallback)((function(){"function"==typeof f&&f(),x(!0)}),[f]),_=(0,R.useCallback)((function(){"function"==typeof d&&d(),x(!1)}),[d]),j=void 0!==c?c:v,T=void 0!==s?s:A,I=void 0!==p?p:C;return(0,NO.Z)((0,NO.Z)({},h),{},{inputValue:j,menuIsOpen:T,onChange:S,onInputChange:D,onMenuClose:_,onMenuOpen:P,value:I})}(e);return R.createElement(ZC,(0,FO.Z)({ref:t},n))}));const LC=FC;function HC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function UC(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?HC(Object(n),!0).forEach((function(t){(0,Iv.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):HC(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const zC=(0,P.ZP)((function(e){var t;return(0,S.jsx)("span",UC(UC({},e.innerProps),{},{children:(0,S.jsx)(_O.Z,{icon:"times",tabIndex:-1,"aria-label":(t="client.component.select.clearFieldLabel",e.intl.formatMessage({id:t}))})}))}));var WC=a(87186);function VC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function YC(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?VC(Object(n),!0).forEach((function(t){(0,Iv.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):VC(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const qC=function(e){var t=e.selectProps,n=t.isDisabled,r=t.menuIsOpen;return n?null:(0,S.jsx)(YO.c.DropdownIndicator,YC(YC({},e),{},{children:(0,S.jsxs)(WC.M6,{children:[(0,S.jsx)(WC.A,{icon:"chevron-down",visible:!r,tabIndex:-1}),(0,S.jsx)(WC.A,{icon:"chevron-up",visible:r,tabIndex:-1})]})}))};var GC,QC,XC;function KC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function $C(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?KC(Object(n),!0).forEach((function(t){(0,Iv.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):KC(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var JC=function(e,t,n){return function(r){r.stopPropagation(),e(t,n)}},ek=function(e,t){return function(n){n.stopPropagation(),e(t)}},tk=function(e,t){return function(n){n.stopPropagation(),e(t)}},nk=function(e){e.stopPropagation()};const rk=function(e){var t=e.selectProps,n=t.openDocsTreeSearch,r=t.openAdvancedSearch,o=t.openRemoteCreate,i=t.isDisabled,a=t.hasDocsTreeSearch,c=t.hasAdvancedSearch,s=t.createPermission,u=t.value,l=t.isMulti,d=t.inputValue,f=l&&(c||a);return(0,S.jsx)(WC.HO,{isTopAligned:f,children:(0,S.jsxs)(YO.c.IndicatorsContainer,$C($C({},e),{},{children:[e.children,n&&!i&&(0,S.jsx)("span",{onTouchEnd:nk,onMouseDown:ek(n,u),children:GC||(GC=(0,S.jsx)(_O.Z,{icon:"folder",tabIndex:-1}))}),r&&!i&&(0,S.jsx)("span",{onTouchEnd:nk,onMouseDown:JC(r,d,u),children:QC||(QC=(0,S.jsx)(_O.Z,{icon:"search",tabIndex:-1}))}),s&&!i&&(0,S.jsx)("span",{onTouchEnd:nk,onMouseDown:tk(o,u),children:XC||(XC=(0,S.jsx)(_O.Z,{icon:"plus",tabIndex:-1}))})]}))})};var ok,ik=a(93235);const ak=function(){return ok||(ok=(0,S.jsx)("span",{children:(0,S.jsx)(ik.Z,{size:"1.8rem"})}))};function ck(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function sk(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ck(Object(n),!0).forEach((function(t){(0,Iv.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ck(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const uk=function(e){var t=e.selectProps,n=e.children;return(0,S.jsx)(WC._M,{attachment:"top left",targetAttachment:"bottom left",constraints:[{to:"window",attachment:"together"}],renderTarget:function(e){return(0,S.jsx)("div",{ref:e})},renderElement:function(r){return(0,S.jsx)("div",{ref:r,children:(0,S.jsx)(WC.l2,sk(sk({},Rv()(e,["innerRef"])),{},{wrapperWidth:t.wrapperWidth,wrapperHeight:t.wrapperHeight,children:n}))})}})};function lk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function dk(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?lk(Object(n),!0).forEach((function(t){(0,Iv.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lk(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const fk=function(e){var t=e.selectProps,n=e.children,r=e.theme,o=t.moreOptionsAvailable,i=t.moreOptionsAvailableText;return(0,S.jsxs)(YO.c.MenuList,dk(dk({},e),{},{className:"MenuList",children:[n,o&&(0,S.jsx)(WC.OA,{reactSelectTheme:r,children:i})]}))};var pk,hk=a(10535);const mk=b.ZP.span(pk||(pk=(0,v.Z)(["\n pointer-events: auto;\n cursor: pointer;\n"])));function gk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function vk(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?gk(Object(n),!0).forEach((function(t){(0,Iv.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gk(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const yk=function(e){var t=e.data,n=e.innerProps,r=e.children,o=e.selectProps,i=o.tooltips,a=o.loadTooltip,c=o.DetailLink,s=nf()(i,t.key,null),u=(0,S.jsx)("span",vk(vk({},n),{},{children:r})),l=c?(0,S.jsx)(mk,{onMouseDown:function(e){e.stopPropagation(),e.preventDefault()},children:(0,S.jsx)(c,{entityKey:t.key,children:(0,S.jsx)(rl.Z,{content:s?(0,S.jsx)("div",{dangerouslySetInnerHTML:{__html:hk.Z.sanitizeHtml(s)}}):null,children:(0,S.jsx)("span",{onMouseOver:function(){return a&&!s&&a(t.key)},children:u})})})}):u;return(0,S.jsx)(WC.B1,{children:l})};var bk=a(47037),wk=a.n(bk),Ak=a(14176),xk=a.n(Ak);function Ek(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ok(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ek(Object(n),!0).forEach((function(t){(0,Iv.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ek(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ck=["linkComp"],kk=function(e,t){var n=UE.Z.difference(e,t),r=xk()(Rv()(n,Ck),(function(e){return 0===Object.keys(e).length}));return 0===Object.entries(r).length},Sk=(0,R.memo)((function(e){var t=e.linkComp,n=e.entityKey,r=e.children;return t&&wk()(n)?(0,S.jsx)(mk,{onMouseDown:function(e){e.stopPropagation(),e.preventDefault()},children:(0,S.jsx)(t,{entityKey:n,children:r})}):r}),kk);Sk.propTypes={children:md().node,entityKey:md().any,linkComp:md().func};const Dk=function(e){var t=e.data,n=e.selectProps,r=e.isDisabled,o=e.children,i=n.tooltips,a=n.loadTooltip,c=n.DetailLink,s=nf()(i,t.key,null);return(0,S.jsx)(YO.c.SingleValue,Ok(Ok({},e),{},{children:(0,S.jsx)(WC.xq,{onMouseOver:function(){return a&&!s&&a(t.key)},isDisabled:r,children:(0,S.jsx)(rl.Z,{content:s?(0,S.jsx)("div",{dangerouslySetInnerHTML:{__html:hk.Z.sanitizeHtml(s)}}):null,children:(0,S.jsx)(Sk,{linkComp:c,entityKey:t.key,children:o})})})}))};function Pk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var _k=function(e){var t;return"Input"===(null==e||null===(t=e.type)||void 0===t?void 0:t.name)};const jk=function(e){var t=e.selectProps,n=e.hasValue,r=e.children,o=t.isMulti,i=t.hasAdvancedSearch,a=t.hasDocsTreeSearch,c=t.isDisabled;if(!(o&&(i||a)))return(0,S.jsx)(YO.c.ValueContainer,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Pk(Object(n),!0).forEach((function(t){(0,Iv.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Pk(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e));var s=R.Children.map(r,(function(e){return _k(e)?e:null})),u=R.Children.map(r,(function(e){return _k(e)?null:e})),l=c&&n;return(0,S.jsxs)(S.Fragment,{children:[!l&&(0,S.jsx)(S.Fragment,{children:s}),(0,S.jsx)(WC.eQ,{children:u})]})};function Tk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Rk(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Tk(Object(n),!0).forEach((function(t){(0,Iv.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Tk(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const Ik=(0,b.Zz)((function(e){var t=e.fetchOptions,n=e.id,r=e.immutable,o=e.isLoading,i=e.isMulti,a=e.loadTooltip,c=e.moreOptionsAvailable,s=e.moreOptionsAvailableText,u=e.noResultsText,l=e.onChange,d=e.openDocsTreeSearch,f=e.openAdvancedSearch,p=e.options,h=e.searchOptions,m=e.theme,g=e.tooltips,v=e.value,y=e.DetailLink,b=e.createPermission,w=e.openRemoteCreate,A=(0,R.useRef)(null),x=(0,R.useRef)(null),E=function(){var e;return(null===(e=x.current)||void 0===e?void 0:e.clientWidth)||300},O=function(){var e;return(null===(e=x.current)||void 0===e?void 0:e.clientHeight)||35},C=(0,R.useState)(E()),k=(0,wd.Z)(C,2),D=k[0],P=k[1],_=(0,R.useState)(O()),j=(0,wd.Z)(_,2),T=j[0],I=j[1],M=function(e){t&&t(e)},N=(0,R.useCallback)(h||function(){},[]),B=(0,R.useCallback)(MO()(N,800,{trailing:!0}),[]),Z=Boolean(f),F=Boolean(d),L=Boolean(b);return(0,S.jsx)(WC.sP,{tabIndex:"-1",id:n,onFocus:function(){A.current.focus(),setTimeout((function(){P(E()),I(O())}),0)},children:(0,S.jsx)(WC.RU,{ref:x,children:(0,S.jsx)(LC,Rk(Rk({getOptionLabel:function(e){return e.display},getOptionValue:function(e){return e.key},wrapperWidth:D,wrapperHeight:T,components:{ClearIndicator:zC,LoadingIndicator:ak,DropdownIndicator:qC,IndicatorsContainer:rk,IndicatorSeparator:null,Menu:uk,MenuList:fk,MultiValueLabel:yk,SingleValue:Dk,ValueContainer:jk},noOptionsMessage:function(){return u||" - "},isMulti:i,closeMenuOnSelect:!i,isSearchable:!0},h?{filterOption:function(){return!0}}:{}),{},{isClearable:!0,loadingMessage:function(){return null},placeholder:"",menuShouldScrollIntoView:!1,autoFocus:!1,value:v||null,onChange:function(e){l(e),M(e)},onInputChange:function(e,t){var n=t.action;h&&e&&B(e,v),""===e&&"input-change"===n&&M(v)},options:(0,RO.Z)(p||[]),isLoading:o,isDisabled:r,ref:A,onMenuOpen:function(){M(v)},styles:(0,WC.i4)(m),theme:function(e){return(0,WC.$p)(e,m)},loadTooltip:a,tooltips:g,DetailLink:y,hasDocsTreeSearch:F,openDocsTreeSearch:d,hasAdvancedSearch:Z,openAdvancedSearch:f,moreOptionsAvailable:c,moreOptionsAvailableText:s,blurInputOnSelect:!1,hasCreatePermission:L,createPermission:b,openRemoteCreate:w,closeMenuOnScroll:function(e){var t;return!(null!==(t=e.target.classList)&&void 0!==t&&t.contains("MenuList"))}}))})})}));const Mk=function(e){var t=e.id,n=e.immutable,r=e.value,o=e.options,i=o.trueLabel,a=o.falseLabel,c=e.onChange;return(0,S.jsx)(Ik,{id:t,immutable:n,isMulti:!1,onChange:function(e){return c(e?e.key:null)},value:XA()(r)?r:{key:r,display:r?i:a},openMenuOnClick:!0,options:[{key:!0,display:i},{key:!1,display:a}]})};var Nk,Bk=b.ZP.div.withConfig({displayName:"StyledBoolEdit"})(Nk||(Nk=(0,v.Z)(["\n margin: 5px 0;\n"])));const Zk=function(e){return(0,S.jsx)(Bk,{children:(0,S.jsx)("input",{type:"checkbox",checked:e.value||!1,name:e.name,onChange:function(t){e.onChange&&e.onChange(t.target.checked)},id:e.id,disabled:e.immutable})})};var Fk=a(23279),Lk=a.n(Fk);function Hk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Uk(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Hk(Object(n),!0).forEach((function(t){(0,Iv.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Hk(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var zk=(0,R.lazy)((function(){return Promise.all([a.e(414),a.e(85)]).then(a.bind(a,30919))}));const Wk=function(e){return(0,S.jsx)(R.Suspense,{fallback:(t=e.value,(0,S.jsx)("div",{children:(0,S.jsx)("p",{children:t})})),children:(0,S.jsx)(zk,Uk({},e))});var t};var Vk,Yk=b.ZP.div.withConfig({displayName:"EditorWrapper"})(Vk||(Vk=(0,v.Z)(["\n margin-top: 5px;\n"])));const qk=function(e){var t=e.value,n=e.onChange,r=e.immutable,o=e.options;return(0,S.jsx)(Yk,{children:(0,S.jsx)(Wk,{value:t,onChange:Lk()(n,1e3),mode:o.mode,theme:"textmate",showGutter:!0,editorOptions:{enableBasicAutocompletion:!0,enableLiveAutocompletion:!0,enableSnippets:!0,minLines:5,maxLines:50,readOnly:r,wrap:!0,indentedSoftWrap:!1},implicitModel:o.implicitModel})})};var Gk,Qk,Xk,Kk,$k,Jk,eS,tS,nS,rS=a(86896),oS=(0,b.iv)(Gk||(Gk=(0,v.Z)(["\n align-items: center;\n cursor: ",";\n display: flex;\n"])),(function(e){return e.immutable?"not-allowed":"default"})),iS=b.ZP.label.withConfig({displayName:"StyledEditableWrapper"})(Qk||(Qk=(0,v.Z)(["\n &&& {\n margin: 0; /* reset Bootstrap and Ext JS */\n padding: 0; /* reset Ext JS */\n ","\n }\n"])),oS),aS=(0,b.iv)(Xk||(Xk=(0,v.Z)(["\n background-color: transparent;\n border: 0;\n cursor: ",";\n flex-grow: 1;\n min-height: 2.6rem;\n min-width: 0;\n outline: 0;\n padding: 0;\n ","\n &::-ms-clear {\n display: none;\n }\n\n &::-webkit-clear-button {\n display: none;\n }\n\n &::-webkit-inner-spin-button {\n display: none;\n }\n\n &[type='number'] {\n appearance: textfield;\n }\n\n &[type='search'] {\n appearance: none;\n }\n\n &:disabled {\n -webkit-text-fill-color: ","; // Safari fix\n opacity: 1; // iOS fix\n }\n\n /* remove indicators */\n &[type='date'],\n &[type='datetime-local'],\n &[type='month'],\n &[type='time'],\n &[type='week'] {\n appearance: none;\n display: flex;\n\n /* reset margin on smaller screens */\n ::-webkit-date-and-time-value {\n ","\n }\n }\n\n // allow pointer event only on touch devices\n @media (pointer: coarse) {\n pointer-events: ",";\n }\n"])),(function(e){return e.immutable?"not-allowed":"default"}),(function(){return(0,A.Z)({color:Jm.Z.color("text")})}),Jm.Z.color("text"),(function(e){return e.immutable&&"margin: unset;"}),(function(e){return e.immutable?"none":"auto"})),cS=(0,b.iv)(Kk||(Kk=(0,v.Z)(["\n display: flex;\n align-items: center;\n"]))),sS=b.ZP.div.withConfig({displayName:"StyledEditableControl"})($k||($k=(0,v.Z)(["\n &&& {\n ","\n }\n"])),cS),uS=b.ZP.span.withConfig({displayName:"StyledEditableValue"})(Jk||(Jk=(0,v.Z)(["\n width: 100%;\n\n && {\n //url\n [type='url'] + .input-group-addon > a {\n color: inherit; // reset bootstrap default\n }\n\n //url\n [type='tel'] + .input-group-addon > a {\n color: inherit; // reset bootstrap default\n }\n\n //date\n .date-edit {\n .input-group-addon {\n cursor: pointer;\n }\n\n input {\n z-index: 0;\n }\n\n &.disabled {\n input {\n cursor: not-allowed;\n }\n }\n\n .right-addon {\n position: relative;\n }\n\n .right-addon input {\n padding-right: 30px;\n }\n\n .reset {\n position: absolute;\n padding-right: 10px;\n padding-top: 5px;\n right: 0;\n color: #999;\n font-size: 18px;\n font-style: normal;\n cursor: pointer;\n }\n\n .reset:hover {\n color: ",";\n }\n }\n }\n"])),Jm.Z.color("signal.danger.text")),lS=b.ZP.div.withConfig({displayName:"StyledDatePickerOuterWrapper"})(eS||(eS=(0,v.Z)(["\n outline: ",";\n"])),(function(e){return e.immutable?0:"initial"})),dS=b.ZP.div.withConfig({displayName:"StyledDatePickerWrapper"})(tS||(tS=(0,v.Z)(["\n &&&& {\n ","\n\n & .react-datepicker__input-container {\n & input {\n ","\n width: calc(100% - 5px);\n }\n }\n\n & .react-datepicker {\n & .react-datepicker__today-button {\n ","\n }\n }\n }\n"])),oS,aS,(function(e){return e.hasTime&&"border-bottom: 1px solid #aeaeae;"})),fS=b.ZP.input.withConfig({displayName:"StyledTimeInput"})(nS||(nS=(0,v.Z)(["\n ","\n border: none;\n outline: none;\n min-height: 2.6rem;\n"])),(0,A.Z)()),pS=a(80877),hS=a(31712),mS=a(83167),gS=a(65809),vS=a(94712),yS=a(38466),bS=a(75502),wS="react-datepicker-time__input",AS="react-datepicker__day",xS="react-datepicker__input",ES=function(e){return e.classList.contains(AS)},OS=function(e){return e.classList.contains(wS)},CS=function(e){return e.classList.contains(xS)},kS=function(e,t){var n=t.hour,r=void 0===n?0:n,o=t.minute,i=void 0===o?0:o,a=t.second,c=void 0===a?0:a;return(0,pS.default)((0,hS.default)((0,mS.default)(e,c),i),r)},SS=function(e){setTimeout((function(){if(e){var t=e.querySelector(".".concat(AS,'[tabindex="0"]'));t&&t.focus({preventScroll:!0})}}),0)},DS=function(e){setTimeout((function(){e&&e.focus({preventScroll:!0})}),0)},PS=function(e){var t=(0,Dd.default)(e);return isNaN(t)?null:t},_S=function(e){return e?e.toISOString():null};const jS=function(e,t,n){var r=n.minDate,o=n.maxDate,i=n.hasTime,a=n.valueToDate,c=void 0===a?PS:a,s=n.dateToValue,u=void 0===s?_S:s,l=(0,R.useRef)(null),d=(0,R.useState)(!1),f=(0,wd.Z)(d,2),p=f[0],h=f[1],m=c(e),g=r?c(r):void 0,v=o?c(o):void 0;(0,R.useEffect)((function(){l.current&&"function"==typeof l.current.setOpen&&l.current.setOpen(p)}),[p]);var y=function(){return h(!1)},b=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(l.current&&"function"==typeof l.current.getPreSelection){var t,n=e?l.current.getPreSelection():null;return(null===(t=l.current.state)||void 0===t?void 0:t.preSelection)||n}return null},w=function(e){l.current&&"function"==typeof l.current.setPreSelection&&l.current.setPreSelection(e)},A=function(){t(null),w(null)},x=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=b(!1);if(n){var r=m||new Date,o=t?kS(n,{hour:(0,gS.default)(r),minute:(0,vS.default)(r),second:(0,yS.default)(r)}):n;E(o,e)}},E=function(n,r){if(n){var o=!e&&n,a=(0,bS.default)(n),c=(0,gS.default)(n)!==(0,gS.default)(a)||(0,vS.default)(n)!==(0,vS.default)(a);o&&i&&!c&&(n=ad.Z.setCurrentTime(n)),t(u(n))}else A();var s;i||"click"!==(null==r?void 0:r.type)||(y(),DS(null===(s=l.current)||void 0===s?void 0:s.input))},O=function(e){if("Tab"===e.key)if(e.shiftKey)if(CS(e.target))y();else if(OS(e.target)){var t,n;w(m||b(!0)),SS(null===(t=l.current)||void 0===t||null===(n=t.calendar)||void 0===n?void 0:n.componentNode)}else ES(e.target)&&y();else if(CS(e.target)&&p)x(e),y();else if(OS(e.target))y();else if(ES(e.target)){var r,o;if(i)x(e,!0),w(null),a=null===(r=l.current)||void 0===r||null===(o=r.calendar)||void 0===o?void 0:o.componentNode,setTimeout((function(){if(a){var e=a.querySelector("input.".concat(wS));e&&e.focus({preventScroll:!0})}}),0);else x(e),y()}var a,c;"Enter"===e.key&&(y(),e.preventDefault(),e.stopPropagation(),DS(null===(c=l.current)||void 0===c?void 0:c.input));if(["ArrowDown","ArrowUp","Enter"].includes(e.key))if(p){if(p&&null===b(!1)){var s,u;w(m||b(!0)),SS(null===(s=l.current)||void 0===s||null===(u=s.calendar)||void 0===u?void 0:u.componentNode)}}else h(!0),e.key="Handled".concat(e.key)},C=function(){var e;h((function(e){return!e})),w(null),DS(null===(e=l.current)||void 0===e?void 0:e.input)};return{reactDatePickerProps:{closeOnScroll:function(){return y(),!0},onClickOutside:y,onInputClick:C,onKeyDown:O,onChange:E,onCalendarOpen:function(){w(null)},preventOpenOnFocus:!0,enableTabLoop:!1,shouldCloseOnSelect:!1,open:p,selected:m,showTimeInput:i,minDate:g,maxDate:v,ref:l,className:xS},timeInputProps:{onKeyDown:O,className:wS},clearButtonProps:{onMouseDown:function(e){e.preventDefault(),A()}},calendarButtonProps:{onClick:C,className:p?"react-datepicker-ignore-onclickoutside":""}}};var TS=a(81084),RS=a(4284),IS=a(50946);function MS(e,t,n){return(0,IS.Z)(2,arguments),(0,RS.default)((0,TS.default)(e,t,new Date,n))}var NS=a(95395),BS="HH:mm:ss",ZS="HH:mm",FS=function(e){return MS(e,ZS)},LS=function(e){var t=function(e){return MS(e,BS)?(0,TS.default)(e,BS,new Date):MS(e,ZS)?(0,TS.default)(e,ZS,new Date):MS(e,"HH:")?(0,TS.default)(e,"HH:",new Date):MS(e,"H")?(0,TS.default)(e,"H",new Date):null}(e);return t&&!isNaN(t)?function(e){return(0,NS.default)(e,ZS)}(t):""};const HS=function(e,t){var n=LS(e),r=(0,R.useState)(n),o=(0,wd.Z)(r,2),i=o[0],a=o[1],c=(0,R.useRef)(i),s=H.Z.usePrevious(n);(0,R.useEffect)((function(){s!==n&&i===s&&a(n)}),[n,i,s]);var u={onChange:function(e){if(e.target.value!==i&&function(e){return/^(\d{0,2}|\d{1,2}:\d{0,2})$/.test(e)}(e.target.value)){var n=function(e,t){return e&&t?2!==e.length||3===t.length||e.includes(":")?e.length+1===t.length&&t.indexOf(":")===t.length-1?e.slice(0,-1):e:"".concat(e,":"):e}(e.target.value,c.current),r=n.indexOf(":"),o=n.substring(0,r),s=n.substring(r+1),u=parseInt(o,10),l=parseInt(s,10),d=!o||!Number.isNaN(u)&&u<24,f=!s||!Number.isNaN(l)&&l<60;if(!d||!f)return!1;c.current=n,a(n),n&&!FS(n)||t(n)}},onBlur:function(){if(i!==n){var e=LS(i);e&&FS(e)?(c.current=e,a(e),t(e)):a(n)}},onFocus:function(e){i&&"function"==typeof e.target.select&&e.target.select()},value:i||""};return{inputProps:u,clearButtonProps:{onClick:function(){t(""),a("")}}}};var US=["value","onChange","onKeyDown"];function zS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function WS(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?zS(Object(n),!0).forEach((function(t){(0,Iv.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zS(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}Pd();var VS=function(e){var t=e.onChange,n=e.label;return(0,S.jsx)(pd.Z,{onMouseDown:function(e){e.preventDefault(),t(null)},tabIndex:-1,children:n})},YS=function(e){var t=e.value,n=e.onChange,r=e.onKeyDown,o=(0,BO.Z)(e,US),i=HS(t,(function(e){n&&n(e||"00:00")})).inputProps;return(0,S.jsx)(fS,WS(WS(WS({},i),o),{},{type:"text",onKeyDown:r,onClick:function(e){e.target.focus()}}))},qS={strategy:"fixed"};const GS=(0,b.Zz)((0,P.ZP)((function(e){var t=e.immutable,n=e.id,r=e.value,o=e.minDate,i=e.maxDate,a=e.valueToDate,c=e.dateToValue,s=e.onChange,u=e.intl,l=e.placeholder,d=e.hasTime,f=e.dateFormat,p=e.events,h=(0,R.useRef)(void 0),m=u.locale,g=function(e){return u.formatMessage({id:e})},v=(0,R.useRef)(null),y=Boolean(r),b=!t&&y,w=function(e){h.current=e,s(e)},A=jS(r,w,{minDate:o,maxDate:i,valueToDate:a,dateToValue:c,hasTime:d}),x=A.reactDatePickerProps,E=A.timeInputProps,O=A.clearButtonProps,C=A.calendarButtonProps;return(0,S.jsx)(lS,{immutable:t,id:n,tabIndex:"-1",children:(0,S.jsxs)(dS,{immutable:t,ref:v,hasTime:d,onBlur:function(e){if("function"==typeof(null==p?void 0:p.onBlur)){var t=void 0!==h.current?h.current:r;p.onBlur(t)}e.stopPropagation()},children:[(0,S.jsx)(Cd(),WS(WS({},x),{},{disabled:t,dateFormat:f,placeholderText:l,showMonthDropdown:!0,showYearDropdown:!0,scrollableYearDropdown:!1,fixedHeight:!0,showPopperArrow:!1,locale:m,customTimeInput:(0,S.jsx)(YS,WS({},E)),timeInputLabel:"",popperProps:qS,todayButton:(0,S.jsx)(VS,{onChange:w,label:g("client.component.datePicker.todayLabel")})})),b&&(0,S.jsx)(_O.Z,WS({icon:"times",tabIndex:-1,"aria-label":g("client.component.datePicker.clearDateLabel")},O)),!t&&(0,S.jsx)(_O.Z,WS({icon:"calendar",tabIndex:-1},C))]})})})));function QS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}const XS=function(e){var t=e.onChange,n=e.options,r=e.id,o=e.value,i=e.immutable,a=e.events,c=e.placeholder,s=(0,rS.Z)(),u=(null==n?void 0:n.datePickerOptions)||{},l=ad.Z.getLocalizedDateFormatWithoutPunctuation(s.locale),d=["P",l,ad.Z.useTwoDigitYear("P"),ad.Z.useTwoDigitYear(l)];return(0,S.jsx)(GS,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?QS(Object(n),!0).forEach((function(t){(0,Iv.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):QS(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({id:r,value:o,onChange:t,dateFormat:d,hasTime:!1,immutable:i,placeholder:c,events:a},u))};function KS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var $S="P HH:mm";const JS=(0,P.ZP)((function(e){var t=e.onChange,n=e.options,r=e.value,o=e.immutable,i=e.placeholder,a=(0,rS.Z)(),c=(null==n?void 0:n.datePickerOptions)||{},s=ad.Z.getLocalizedDateTimeFormatWithoutPunctuation(a.locale),u=[$S,s,ad.Z.useTwoDigitYear($S),ad.Z.useTwoDigitYear(s)];return(0,S.jsx)(GS,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?KS(Object(n),!0).forEach((function(t){(0,Iv.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):KS(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({value:r,onChange:t,dateFormat:u,hasTime:!0,immutable:o,placeholder:i},c))}));var eD=a(74870),tD=a.n(eD);function nD(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(e){i(e)}}function c(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,c)}s((r=r.apply(e,t||[])).next())}))}function rD(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}}Object.create;function oD(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function iD(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}Object.create;var aD=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function cD(e,t){var n=function(e){var t=e.name;if(t&&-1!==t.lastIndexOf(".")&&!e.type){var n=t.split(".").pop().toLowerCase(),r=aD.get(n);r&&Object.defineProperty(e,"type",{value:r,writable:!1,configurable:!1,enumerable:!0})}return e}(e);if("string"!=typeof n.path){var r=e.webkitRelativePath;Object.defineProperty(n,"path",{value:"string"==typeof t?t:"string"==typeof r&&r.length>0?r:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}var sD=[".DS_Store","Thumbs.db"];function uD(e){return"object"==typeof e&&null!==e}function lD(e){return hD(e.target.files).map((function(e){return cD(e)}))}function dD(e){return nD(this,void 0,void 0,(function(){return rD(this,(function(t){switch(t.label){case 0:return[4,Promise.all(e.map((function(e){return e.getFile()})))];case 1:return[2,t.sent().map((function(e){return cD(e)}))]}}))}))}function fD(e,t){return nD(this,void 0,void 0,(function(){var n;return rD(this,(function(r){switch(r.label){case 0:return e.items?(n=hD(e.items).filter((function(e){return"file"===e.kind})),"drop"!==t?[2,n]:[4,Promise.all(n.map(mD))]):[3,2];case 1:return[2,pD(gD(r.sent()))];case 2:return[2,pD(hD(e.files).map((function(e){return cD(e)})))]}}))}))}function pD(e){return e.filter((function(e){return-1===sD.indexOf(e.name)}))}function hD(e){if(null===e)return[];for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push(r)}return t}function mD(e){if("function"!=typeof e.webkitGetAsEntry)return vD(e);var t=e.webkitGetAsEntry();return t&&t.isDirectory?bD(t):vD(e)}function gD(e){return e.reduce((function(e,t){return iD(iD([],oD(e),!1),oD(Array.isArray(t)?gD(t):[t]),!1)}),[])}function vD(e){var t=e.getAsFile();if(!t)return Promise.reject("".concat(e," is not a File"));var n=cD(t);return Promise.resolve(n)}function yD(e){return nD(this,void 0,void 0,(function(){return rD(this,(function(t){return[2,e.isDirectory?bD(e):wD(e)]}))}))}function bD(e){var t=e.createReader();return new Promise((function(e,n){var r=[];!function o(){var i=this;t.readEntries((function(t){return nD(i,void 0,void 0,(function(){var i,a,c;return rD(this,(function(s){switch(s.label){case 0:if(t.length)return[3,5];s.label=1;case 1:return s.trys.push([1,3,,4]),[4,Promise.all(r)];case 2:return i=s.sent(),e(i),[3,4];case 3:return a=s.sent(),n(a),[3,4];case 4:return[3,6];case 5:c=Promise.all(t.map(yD)),r.push(c),o(),s.label=6;case 6:return[2]}}))}))}),(function(e){n(e)}))}()}))}function wD(e){return nD(this,void 0,void 0,(function(){return rD(this,(function(t){return[2,new Promise((function(t,n){e.file((function(n){var r=cD(n,e.fullPath);t(r)}),(function(e){n(e)}))}))]}))}))}var AD=a(91073);function xD(e){return function(e){if(Array.isArray(e))return DD(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||SD(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ED(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function OD(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ED(Object(n),!0).forEach((function(t){CD(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ED(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function CD(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kD(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,c=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){c=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(c)throw o}}return i}(e,t)||SD(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function SD(e,t){if(e){if("string"==typeof e)return DD(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?DD(e,t):void 0}}function DD(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var PD="file-invalid-type",_D="file-too-large",jD="file-too-small",TD="too-many-files",RD=function(e){e=Array.isArray(e)&&1===e.length?e[0]:e;var t=Array.isArray(e)?"one of ".concat(e.join(", ")):e;return{code:PD,message:"File type must be ".concat(t)}},ID=function(e){return{code:_D,message:"File is larger than ".concat(e," ").concat(1===e?"byte":"bytes")}},MD=function(e){return{code:jD,message:"File is smaller than ".concat(e," ").concat(1===e?"byte":"bytes")}},ND={code:TD,message:"Too many files"};function BD(e,t){var n="application/x-moz-file"===e.type||(0,AD.Z)(e,t);return[n,n?null:RD(t)]}function ZD(e,t,n){if(FD(e.size))if(FD(t)&&FD(n)){if(e.size>n)return[!1,ID(n)];if(e.size<t)return[!1,MD(t)]}else{if(FD(t)&&e.size<t)return[!1,MD(t)];if(FD(n)&&e.size>n)return[!1,ID(n)]}return[!0,null]}function FD(e){return null!=e}function LD(e){var t=e.files,n=e.accept,r=e.minSize,o=e.maxSize,i=e.multiple,a=e.maxFiles,c=e.validator;return!(!i&&t.length>1||i&&a>=1&&t.length>a)&&t.every((function(e){var t=kD(BD(e,n),1)[0],i=kD(ZD(e,r,o),1)[0],a=c?c(e):null;return t&&i&&!a}))}function HD(e){return"function"==typeof e.isPropagationStopped?e.isPropagationStopped():void 0!==e.cancelBubble&&e.cancelBubble}function UD(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,(function(e){return"Files"===e||"application/x-moz-file"===e})):!!e.target&&!!e.target.files}function zD(e){e.preventDefault()}function WD(e){return-1!==e.indexOf("MSIE")||-1!==e.indexOf("Trident/")}function VD(e){return-1!==e.indexOf("Edge/")}function YD(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.navigator.userAgent;return WD(e)||VD(e)}function qD(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return t.some((function(t){return!HD(e)&&t&&t.apply(void 0,[e].concat(r)),HD(e)}))}}function GD(){return"showOpenFilePicker"in window}function QD(e){if(FD(e)){var t=Object.entries(e).filter((function(e){var t=kD(e,2),n=t[0],r=t[1],o=!0;return JD(n)||(console.warn('Skipped "'.concat(n,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),o=!1),Array.isArray(r)&&r.every(eP)||(console.warn('Skipped "'.concat(n,'" because an invalid file extension was provided.')),o=!1),o})).reduce((function(e,t){var n=kD(t,2),r=n[0],o=n[1];return OD(OD({},e),{},CD({},r,o))}),{});return[{description:"Files",accept:t}]}return e}function XD(e){if(FD(e))return Object.entries(e).reduce((function(e,t){var n=kD(t,2),r=n[0],o=n[1];return[].concat(xD(e),[r],xD(o))}),[]).filter((function(e){return JD(e)||eP(e)})).join(",")}function KD(e){return e instanceof DOMException&&("AbortError"===e.name||e.code===e.ABORT_ERR)}function $D(e){return e instanceof DOMException&&("SecurityError"===e.name||e.code===e.SECURITY_ERR)}function JD(e){return"audio/*"===e||"video/*"===e||"image/*"===e||"text/*"===e||/\w+\/[-+.\w]+/g.test(e)}function eP(e){return/^.*\.[\w]+$/.test(e)}var tP=["children"],nP=["open"],rP=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],oP=["refKey","onChange","onClick"];function iP(e){return function(e){if(Array.isArray(e))return sP(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||cP(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function aP(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,c=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){c=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(c)throw o}}return i}(e,t)||cP(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function cP(e,t){if(e){if("string"==typeof e)return sP(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?sP(e,t):void 0}}function sP(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function uP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function lP(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?uP(Object(n),!0).forEach((function(t){dP(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uP(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function dP(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fP(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var pP=(0,R.forwardRef)((function(e,t){var n=e.children,r=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=lP(lP({},hP),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,i=t.maxSize,a=t.minSize,c=t.multiple,s=t.maxFiles,u=t.onDragEnter,l=t.onDragLeave,d=t.onDragOver,f=t.onDrop,p=t.onDropAccepted,h=t.onDropRejected,m=t.onFileDialogCancel,g=t.onFileDialogOpen,v=t.useFsAccessApi,y=t.autoFocus,b=t.preventDropOnDocument,w=t.noClick,A=t.noKeyboard,x=t.noDrag,E=t.noDragEventsBubbling,O=t.onError,C=t.validator,k=(0,R.useMemo)((function(){return XD(n)}),[n]),S=(0,R.useMemo)((function(){return QD(n)}),[n]),D=(0,R.useMemo)((function(){return"function"==typeof g?g:yP}),[g]),P=(0,R.useMemo)((function(){return"function"==typeof m?m:yP}),[m]),_=(0,R.useRef)(null),j=(0,R.useRef)(null),T=aP((0,R.useReducer)(vP,gP),2),I=T[0],M=T[1],N=I.isFocused,B=I.isFileDialogActive,Z=(0,R.useRef)("undefined"!=typeof window&&window.isSecureContext&&v&&GD()),F=function(){!Z.current&&B&&setTimeout((function(){j.current&&(j.current.files.length||(M({type:"closeDialog"}),P()))}),300)};(0,R.useEffect)((function(){return window.addEventListener("focus",F,!1),function(){window.removeEventListener("focus",F,!1)}}),[j,B,P,Z]);var L=(0,R.useRef)([]),H=function(e){_.current&&_.current.contains(e.target)||(e.preventDefault(),L.current=[])};(0,R.useEffect)((function(){return b&&(document.addEventListener("dragover",zD,!1),document.addEventListener("drop",H,!1)),function(){b&&(document.removeEventListener("dragover",zD),document.removeEventListener("drop",H))}}),[_,b]),(0,R.useEffect)((function(){return!r&&y&&_.current&&_.current.focus(),function(){}}),[_,y,r]);var U=(0,R.useCallback)((function(e){O?O(e):console.error(e)}),[O]),z=(0,R.useCallback)((function(e){e.preventDefault(),e.persist(),ne(e),L.current=[].concat(iP(L.current),[e.target]),UD(e)&&Promise.resolve(o(e)).then((function(t){if(!HD(e)||E){var n=t.length,r=n>0&&LD({files:t,accept:k,minSize:a,maxSize:i,multiple:c,maxFiles:s,validator:C});M({isDragAccept:r,isDragReject:n>0&&!r,isDragActive:!0,type:"setDraggedFiles"}),u&&u(e)}})).catch((function(e){return U(e)}))}),[o,u,U,E,k,a,i,c,s,C]),W=(0,R.useCallback)((function(e){e.preventDefault(),e.persist(),ne(e);var t=UD(e);if(t&&e.dataTransfer)try{e.dataTransfer.dropEffect="copy"}catch(e){}return t&&d&&d(e),!1}),[d,E]),V=(0,R.useCallback)((function(e){e.preventDefault(),e.persist(),ne(e);var t=L.current.filter((function(e){return _.current&&_.current.contains(e)})),n=t.indexOf(e.target);-1!==n&&t.splice(n,1),L.current=t,t.length>0||(M({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),UD(e)&&l&&l(e))}),[_,l,E]),Y=(0,R.useCallback)((function(e,t){var n=[],r=[];e.forEach((function(e){var t=aP(BD(e,k),2),o=t[0],c=t[1],s=aP(ZD(e,a,i),2),u=s[0],l=s[1],d=C?C(e):null;if(o&&u&&!d)n.push(e);else{var f=[c,l];d&&(f=f.concat(d)),r.push({file:e,errors:f.filter((function(e){return e}))})}})),(!c&&n.length>1||c&&s>=1&&n.length>s)&&(n.forEach((function(e){r.push({file:e,errors:[ND]})})),n.splice(0)),M({acceptedFiles:n,fileRejections:r,type:"setFiles"}),f&&f(n,r,t),r.length>0&&h&&h(r,t),n.length>0&&p&&p(n,t)}),[M,c,k,a,i,s,f,p,h,C]),q=(0,R.useCallback)((function(e){e.preventDefault(),e.persist(),ne(e),L.current=[],UD(e)&&Promise.resolve(o(e)).then((function(t){HD(e)&&!E||Y(t,e)})).catch((function(e){return U(e)})),M({type:"reset"})}),[o,Y,U,E]),G=(0,R.useCallback)((function(){if(Z.current){M({type:"openDialog"}),D();var e={multiple:c,types:S};window.showOpenFilePicker(e).then((function(e){return o(e)})).then((function(e){Y(e,null),M({type:"closeDialog"})})).catch((function(e){KD(e)?(P(e),M({type:"closeDialog"})):$D(e)?(Z.current=!1,j.current?(j.current.value=null,j.current.click()):U(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):U(e)}))}else j.current&&(M({type:"openDialog"}),D(),j.current.value=null,j.current.click())}),[M,D,P,v,Y,U,S,c]),Q=(0,R.useCallback)((function(e){_.current&&_.current.isEqualNode(e.target)&&(" "!==e.key&&"Enter"!==e.key&&32!==e.keyCode&&13!==e.keyCode||(e.preventDefault(),G()))}),[_,G]),X=(0,R.useCallback)((function(){M({type:"focus"})}),[]),K=(0,R.useCallback)((function(){M({type:"blur"})}),[]),$=(0,R.useCallback)((function(){w||(YD()?setTimeout(G,0):G())}),[w,G]),J=function(e){return r?null:e},ee=function(e){return A?null:J(e)},te=function(e){return x?null:J(e)},ne=function(e){E&&e.stopPropagation()},re=(0,R.useMemo)((function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.refKey,n=void 0===t?"ref":t,o=e.role,i=e.onKeyDown,a=e.onFocus,c=e.onBlur,s=e.onClick,u=e.onDragEnter,l=e.onDragOver,d=e.onDragLeave,f=e.onDrop,p=fP(e,rP);return lP(lP(dP({onKeyDown:ee(qD(i,Q)),onFocus:ee(qD(a,X)),onBlur:ee(qD(c,K)),onClick:J(qD(s,$)),onDragEnter:te(qD(u,z)),onDragOver:te(qD(l,W)),onDragLeave:te(qD(d,V)),onDrop:te(qD(f,q)),role:"string"==typeof o&&""!==o?o:"presentation"},n,_),r||A?{}:{tabIndex:0}),p)}}),[_,Q,X,K,$,z,W,V,q,A,x,r]),oe=(0,R.useCallback)((function(e){e.stopPropagation()}),[]),ie=(0,R.useMemo)((function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.refKey,n=void 0===t?"ref":t,r=e.onChange,o=e.onClick,i=fP(e,oP);return lP(lP({},dP({accept:k,multiple:c,type:"file",style:{display:"none"},onChange:J(qD(r,q)),onClick:J(qD(o,oe)),tabIndex:-1},n,j)),i)}}),[j,n,c,q,r]);return lP(lP({},I),{},{isFocused:N&&!r,getRootProps:re,getInputProps:ie,rootRef:_,inputRef:j,open:J(G)})}(fP(e,tP)),o=r.open,i=fP(r,nP);return(0,R.useImperativeHandle)(t,(function(){return{open:o}}),[o]),I().createElement(R.Fragment,null,n(lP(lP({},i),{},{open:o})))}));pP.displayName="Dropzone";var hP={disabled:!1,getFilesFromEvent:function(e){return nD(this,void 0,void 0,(function(){return rD(this,(function(t){return uD(e)&&uD(e.dataTransfer)?[2,fD(e.dataTransfer,e.type)]:function(e){return uD(e)&&uD(e.target)}(e)?[2,lD(e)]:Array.isArray(e)&&e.every((function(e){return"getFile"in e&&"function"==typeof e.getFile}))?[2,dD(e)]:[2,[]]}))}))},maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};pP.defaultProps=hP,pP.propTypes={children:tD().func,accept:tD().objectOf(tD().arrayOf(tD().string)),multiple:tD().bool,preventDropOnDocument:tD().bool,noClick:tD().bool,noKeyboard:tD().bool,noDrag:tD().bool,noDragEventsBubbling:tD().bool,minSize:tD().number,maxSize:tD().number,maxFiles:tD().number,disabled:tD().bool,getFilesFromEvent:tD().func,onFileDialogCancel:tD().func,onFileDialogOpen:tD().func,useFsAccessApi:tD().bool,autoFocus:tD().bool,onDragEnter:tD().func,onDragLeave:tD().func,onDragOver:tD().func,onDrop:tD().func,onDropAccepted:tD().func,onDropRejected:tD().func,onError:tD().func,validator:tD().func};const mP=pP;var gP={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function vP(e,t){switch(t.type){case"focus":return lP(lP({},e),{},{isFocused:!0});case"blur":return lP(lP({},e),{},{isFocused:!1});case"openDialog":return lP(lP({},gP),{},{isFileDialogActive:!0});case"closeDialog":return lP(lP({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return lP(lP({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return lP(lP({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return lP({},gP);default:return e}}function yP(){}var bP,wP,AP,xP,EP,OP,CP,kP,SP,DP=a(69829),PP={shade0:function(e){var t=e.theme;return nf()(t,"colors.text")},shade1:function(e){var t=e.theme;return(0,rf.HO)(nf()(t,"colors.text"),3.5)},shade2:function(e){var t=e.theme;return(0,rf.HO)(nf()(t,"colors.text"),5.5)},signal:function(e){var t=e.theme,n=e.signal;return nf()(t,"colors.signal.".concat(n,".text"))},hasValue:function(e){var t=e.theme;return nf()(t,"colors.signal.info.text")}},_P={shade0:function(e){var t=e.theme;return nf()(t,"colors.paper")},shade1:function(e){var t=e.theme;return(0,rf.HO)(nf()(t,"colors.paper"),2)},shade2:function(e){var t=e.theme;return(0,rf.HO)(nf()(t,"colors.paper"),4)},signal:function(e){var t=e.theme,n=e.signal;return nf()(t,"colors.signal.".concat(n,".text"))},isDirty:function(e){var t=e.theme;return nf()(t,"colors.secondaryLight")},transparent:function(){return"transparent"}},jP=b.ZP.section.withConfig({displayName:"StyledSection"})(bP||(bP=(0,v.Z)(["\n flex: 1;\n display: flex;\n justify-content: flex-end;\n"]))),TP=b.ZP.div.withConfig({displayName:"StyledButtonsWrapper"})(wP||(wP=(0,v.Z)(["\n display: flex;\n align-items: center;\n\n "," {\n margin: 0;\n border-radius: 50%;\n padding: ",";\n\n a:hover {\n color: unset;\n }\n }\n"])),gd.Z,x.Z.space(-2)),RP=b.ZP.div.withConfig({displayName:"StyledDropzone"})(AP||(AP=(0,v.Z)(["\n width: 100%;\n\n &:hover {\n "," {\n background-color: ",";\n }\n }\n"])),gd.Z,(function(e){var t=e.theme;return(0,y._j)(.1,t.colors.paper)})),IP=b.ZP.div.withConfig({displayName:"StyledUploadInput"})(xP||(xP=(0,v.Z)(["\n ","\n cursor: ",";\n background-color: ",";\n color: ",";\n padding: "," 0 0 0;\n display: flex;\n\n "," {\n float: right;\n position: relative;\n top: -",";\n margin: 0;\n border-radius: 50%;\n padding: ",";\n }\n"])),(0,A.Z)(),(function(e){return e.immutable?"not-allowed":"pointer"}),w.FS.color("paper"),(function(e){return e.immutable?PP.shade2(e):PP.shade0(e)}),x.Z.space(-2),gd.Z,x.Z.space(-3.1),x.Z.space(-1.5)),MP=b.ZP.div.withConfig({displayName:"StyledUploadProgress"})(EP||(EP=(0,v.Z)(["\n && {\n padding-top: ",";\n text-align: center;\n display: inline-block;\n }\n"])),x.Z.space(-2)),NP=(0,b.ZP)(DP.Fe).withConfig({displayName:"StyledUploadProgressText"})(OP||(OP=(0,v.Z)(["\n && {\n ","\n }\n"])),(0,A.Z)({fontSize:x.Z.font(-1)})),BP=b.ZP.div.withConfig({displayName:"StyledUploadProgressIconAndText"})(CP||(CP=(0,v.Z)(["\n && {\n display: flex;\n justify-content: center;\n align-items: center;\n\n span {\n margin-left: ",";\n }\n }\n"])),x.Z.space(-2)),ZP=b.ZP.div.withConfig({displayName:"StyledView"})(kP||(kP=(0,v.Z)(["\n display: flex;\n justify-content: space-between;\n padding-top: ",";\n"])),x.Z.space(-2));function FP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function LP(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?FP(Object(n),!0).forEach((function(t){(0,Iv.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):FP(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const HP=function(e){var t=e.onDrop,n=e.immutable,r=e.text,o=e.onChoose;return(0,S.jsxs)(IP,{immutable:n,children:[(0,S.jsx)(mP,{onDrop:function(e){var n=e.map((function(e){return Object.assign(e,{preview:URL.createObjectURL(e)})}));t(n[0])},multiple:!1,disabled:n,title:r||"drag and drop or click",children:function(e){var t=e.getRootProps,n=e.getInputProps;return(0,S.jsx)(jP,{children:(0,S.jsxs)(RP,LP(LP({},t()),{},{children:[(0,S.jsx)("input",LP({},n())),SP||(SP=(0,S.jsx)(pd.Z,{icon:"arrow-to-top"}))]}))})}}),o&&(0,S.jsx)(pd.Z,{onClick:function(e){o(),e.stopPropagation()},icon:"folder",label:"browse docs",iconOnly:!0})]})};var UP=a(73906),zP=a(78958),WP=function(e){var t=Math.floor(Math.log(e)/Math.log(1024));return"".concat(1*(e/Math.pow(1024,t)).toFixed(2)," ").concat(["Bytes","KB","MB","GB","TB"][t])};const VP=function(e){var t=e.file,n=e.text;return(0,S.jsxs)(MP,{children:[(0,S.jsx)(UP.Z,{alt:t.name,caption:t.name,maxDimensionX:"96px",maxDimensionY:"96px",srcUrl:t.preview,thumbnailUrl:t.type.startsWith("image")?t.preview:null}),(0,S.jsxs)(BP,{children:[(0,S.jsx)(ik.Z,{position:zP.Z.position.PREPEND}),(0,S.jsxs)(NP,{children:[n||"uploading"," (",WP(t.size),")"]})]})]})};var YP=a(41291);function qP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function GP(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qP(Object(n),!0).forEach((function(t){(0,Iv.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qP(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const QP=function(e){var t,n=e.value,r=e.downloadTitle,o=e.immutable,i=e.onUpload,a=e.deleteTitle,c=null===(t=n.binaryLink)||void 0===t?void 0:t.startsWith("blob:");return(0,S.jsxs)(ZP,{className:"StyledView",children:[(0,S.jsx)(UP.Z,GP(GP({alt:n.fileName},c&&{caption:n.fileName}),{},{fileName:n.fileName,maxDimensionX:"96px",maxDimensionY:"96px",srcUrl:n.binaryLink,thumbnailUrl:n.thumbnailLink})),(0,S.jsxs)(TP,{children:[!o&&(0,S.jsx)(pd.Z,{icon:"trash",onClick:function(){return i(null)},tabIndex:-1,title:a||"delete"}),(0,S.jsx)(pd.Z,{children:(0,S.jsx)(YP.Z,{neutral:!0,icon:"arrow-to-bottom",target:"_blank",href:ig.Z.getDownloadUrl(n.binaryLink),tabIndex:-1,title:r||"download"})})]})]})};function XP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function KP(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?XP(Object(n),!0).forEach((function(t){(0,Iv.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):XP(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var $P=function(e){var t=e.value,n=e.textResources,r=e.onUpload,o=e.onChoose,i=(0,R.useRef)(t),a=(0,R.useState)({isUploading:!1,previewFile:null}),c=(0,wd.Z)(a,2),s=c[0],u=c[1];return(0,R.useEffect)((function(){Dp()(i.current,t)||u({isUploading:!1,previewFile:null}),i.current=t}),[t]),null!=t&&t.binaryLink?(0,S.jsx)(QP,KP(KP({},e),{},{deleteTitle:n.delete,downloadTitle:n.download})):s.isUploading?(0,S.jsx)(VP,KP({file:s.previewFile,text:n.uploading},e)):(0,S.jsx)(HP,KP(KP({},e),{},{onDrop:function(e){!function(e){u({isUploading:!0,previewFile:e})}(e),r(e)},onChoose:o}))};$P.defaultProps={textResources:{}};const JP=$P;var e_=function(e){return(0,S.jsx)(JP,{onUpload:function(t){null===t?e.onChange&&e.onChange(null):e.options.upload&&e.options.upload(t)},onChoose:e.options.choose,immutable:e.immutable,textResources:{upload:e.options.uploadText,uploading:e.options.uploadingText,delete:e.options.deleteText,download:e.options.downloadText},value:e.value?e.value:null})};e_.defaultProps={options:{}};const t_=e_;var n_,r_,o_=function(e){return-1*Math.abs(e)},i_=b.ZP.input.withConfig({displayName:"StyledDurationEdit"})(n_||(n_=(0,v.Z)(["\n &&&& {\n ","\n flex-grow: 0;\n width: ","px;\n min-width: 2.5ch;\n }\n"])),aS,(function(e){return e.width})),a_=b.ZP.label.withConfig({displayName:"StyledDurationEditFocusable"})(r_||(r_=(0,v.Z)(["\n &&& {\n align-items: center;\n display: flex;\n flex-wrap: nowrap;\n margin-bottom: 0; /* reset bootstrap */\n margin-left: ",";\n\n &:first-child {\n margin-left: 0;\n }\n\n > span {\n color: ",";\n cursor: ",";\n }\n }\n"])),x.Z.space(1),(function(e){return e.immutable?(0,rf.iy)(nf()(e.theme,"colors.text")):Jm.Z.color("text")}),(function(e){return e.immutable?"not-allowed":"default"})),c_=function(e){var t=e.value,n=e.immutable,r=e.onChange,o=e.options,i=ad.Z.millisecondsToDuration(t),a=(0,R.useState)(!1),c=(0,wd.Z)(a,2),s=c[0],u=c[1],l=function(e,t){var n,o,a=null!==t?t:i.minutes,c=null!==e?e:i.hours;""!==a||""!==c?(a>=60&&(c=0),r((o=a,(n=c)||o?((n<0||o<0)&&(n=o_(n),o=o_(o)),60*(n||0)*6e4+6e4*(o||0)):null))):r(null)},d=function(){u(!0)},f=function(e){e.charCode>=48&&e.charCode<=57||45===e.charCode&&!0===o.allowNegative||e.preventDefault()},p=function(){return!0===o.allowNegative?"-?d+":"d+"},h=function(){return s||"number"==typeof t},m=function(e){return 9*(e+"").length},g=n&&Boolean(i.seconds);return(0,S.jsxs)(iS,{onBlur:function(){u(!1)},immutable:n,children:[(0,S.jsxs)(a_,{immutable:n,children:[(0,S.jsx)(i_,{disabled:n,immutable:n,min:!0===o.allowNegative?void 0:0,onChange:function(){},onFocus:d,onInput:function(e){var t=e.target.value.replace(/[^-\d]/g,"");l(t,null)},onKeyPress:f,pattern:p(),step:1,width:m(i.hours),type:"number",value:"number"!=typeof i.hours||0===i.hours&&!n?"":i.hours+""}),h()&&(0,S.jsx)(Zd.ZP.Span,{children:o.hoursLabel})]}),(0,S.jsxs)(a_,{immutable:n,children:[(0,S.jsx)(i_,{disabled:n,immutable:n,min:!0!==o.allowNegative||null!==i.hours&&0!==i.hours?0:void 0,onChange:function(){},onFocus:d,onInput:function(e){var t=e.target.value.replace(/[^-\d]/g,"");l(null,t)},onKeyPress:f,pattern:p(),step:1,width:m(i.minutes),type:"number",value:i.minutes+""}),h()&&(0,S.jsx)(Zd.ZP.Span,{children:o.minutesLabel})]}),g&&(0,S.jsxs)(a_,{immutable:n,children:[(0,S.jsx)(i_,{disabled:n,immutable:n,onChange:function(){},width:m(i.seconds),type:"number",value:i.seconds+""}),h()&&(0,S.jsx)(Zd.ZP.Span,{children:o.secondsLabel})]})]})};c_.defaultProps={options:{hoursLabel:"hrs",minutesLabel:"min",secondsLabel:"s"}};const s_=c_;var u_;const l_=b.ZP.input.attrs((function(e){return{type:"text"}})).withConfig({displayName:"StyledStringEdit"})(u_||(u_=(0,v.Z)(["\n &&&& {\n ","\n }\n"])),aS);const d_=H.Z.Debouncer((function(e){return(0,S.jsxs)(iS,{immutable:e.immutable,children:[(0,S.jsx)(l_,{disabled:e.immutable,id:e.id,name:e.name,onChange:function(t){return e.onChange(t.target.value)},immutable:e.immutable,value:e.value||""}),e.value&&(0,S.jsx)(sS,{children:(0,S.jsx)(YP.Z,{href:"mailto:".concat(e.value.toString()),icon:"envelope",look:"ball",tabIndex:-1,target:"_blank",neutral:!0})})]})}));var f_,p_=(0,R.lazy)((function(){return Promise.all([a.e(288),a.e(759),a.e(85)]).then(a.bind(a,17676))})),h_=function(e){var t=e.onChange,n=e.immutable,r=e.value,o=e.options;if(n)return(0,S.jsx)(Zd.ZP.Span,{children:(0,S.jsx)("div",{dangerouslySetInnerHTML:{__html:r}})});var i=o||{},a=i.contentLang,c=i.ckEditorConfig;return(0,S.jsx)(R.Suspense,{fallback:f_||(f_=(0,S.jsx)("i",{})),children:(0,S.jsx)(p_,{onChange:function(e){t&&t(e)},value:r,contentLang:a,ckEditorConfig:c})})};h_.defaultProps={value:""};const m_=h_;function g_(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}var v_;function y_(){}function b_(e){return!!(e||"").match(/\d/)}function w_(e){return null==e}function A_(e){return"number"==typeof e&&isNaN(e)}function x_(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function E_(e,t){void 0===t&&(t=!0);var n="-"===e[0],r=n&&t,o=(e=e.replace("-","")).split(".");return{beforeDecimal:o[0],afterDecimal:o[1]||"",hasNegation:n,addNegation:r}}function O_(e,t,n){for(var r="",o=n?"0":"",i=0;i<=t-1;i++)r+=e[i]||o;return r}function C_(e,t){return Array(t+1).join(e)}function k_(e){var t=e+"",n="-"===t[0]?"-":"";n&&(t=t.substring(1));var r=t.split(/[eE]/g),o=r[0],i=r[1];if(!(i=Number(i)))return n+o;var a=1+i,c=(o=o.replace(".","")).length;return a<0?o="0."+C_("0",Math.abs(a))+o:a>=c?o+=C_("0",a-c):o=(o.substring(0,a)||"0")+"."+o.substring(a),n+o}function S_(e,t,n){if(-1!==["","-"].indexOf(e))return e;var r=(-1!==e.indexOf(".")||n)&&t,o=E_(e),i=o.beforeDecimal,a=o.afterDecimal,c=o.hasNegation,s=parseFloat("0."+(a||"0")),u=(a.length<=t?"0."+a:s.toFixed(t)).split(".");return""+(c?"-":"")+i.split("").reverse().reduce((function(e,t,n){return e.length>n?(Number(e[0])+Number(t)).toString()+e.substring(1,e.length):t+e}),u[0])+(r?".":"")+O_(u[1]||"",t,n)}function D_(e,t){if(e.value=e.value,null!==e){if(e.createTextRange){var n=e.createTextRange();return n.move("character",t),n.select(),!0}return e.selectionStart||0===e.selectionStart?(e.focus(),e.setSelectionRange(t,t),!0):(e.focus(),!1)}}function P_(e){return{from:{start:0,end:0},to:{start:0,end:e.length},lastValue:""}}function __(e,t,n,r){var o,i,a,c=e.length;if(o=t,i=0,a=c,t=Math.min(Math.max(o,i),a),"left"===r){for(;t>=0&&!n[t];)t--;-1===t&&(t=n.indexOf(!0))}else{for(;t<=c&&!n[t];)t++;t>c&&(t=n.lastIndexOf(!0))}return-1===t&&(t=c),t}function j_(e){for(var t=Array.from({length:e.length+1}).map((function(){return!0})),n=0,r=t.length;n<r;n++)t[n]=Boolean(b_(e[n])||b_(e[n-1]));return t}function T_(e,t,n,r,o,i){void 0===i&&(i=y_);var a=(0,R.useRef)(),c=function(e){var t=(0,R.useRef)(e);t.current=e;var n=(0,R.useRef)((function(){for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];return t.current.apply(t,e)}));return n.current}((function(e){var t,i;return w_(e)||A_(e)?(i="",t=""):"number"==typeof e||n?(i="number"==typeof e?k_(e):e,t=r(i)):(i=o(e,void 0),t=e),{formattedValue:t,numAsString:i}})),s=(0,R.useState)((function(){return c(t)})),u=s[0],l=s[1];return(0,R.useMemo)((function(){w_(e)?a.current=void 0:(a.current=c(e),l(a.current))}),[e,c]),[u,function(e,t){l({formattedValue:e.formattedValue,numAsString:e.value}),i(e,t)}]}function R_(e){return e.replace(/[^0-9]/g,"")}function I_(e){return e}function M_(e){var t=e.type;void 0===t&&(t="text");var n=e.displayType;void 0===n&&(n="input");var r=e.customInput,o=e.renderText,i=e.getInputRef,a=e.format;void 0===a&&(a=I_);var c=e.removeFormatting;void 0===c&&(c=R_);var s=e.defaultValue,u=e.valueIsNumericString,l=e.onValueChange,d=e.isAllowed,f=e.onChange;void 0===f&&(f=y_);var p=e.onKeyDown;void 0===p&&(p=y_);var h=e.onMouseUp;void 0===h&&(h=y_);var m=e.onFocus;void 0===m&&(m=y_);var g=e.onBlur;void 0===g&&(g=y_);var v=e.value,y=e.getCaretBoundary;void 0===y&&(y=j_);var b=e.isValidInputCharacter;void 0===b&&(b=b_);var w=g_(e,["type","displayType","customInput","renderText","getInputRef","format","removeFormatting","defaultValue","valueIsNumericString","onValueChange","isAllowed","onChange","onKeyDown","onMouseUp","onFocus","onBlur","value","getCaretBoundary","isValidInputCharacter"]),A=T_(v,s,Boolean(u),a,c,l),x=A[0],E=x.formattedValue,O=x.numAsString,C=A[1],k=(0,R.useRef)();(0,R.useEffect)((function(){var e=a(O);if(void 0===k.current||e!==k.current){var t=_.current;F({formattedValue:e,numAsString:O,input:t,setCaretPosition:!0,source:v_.props,event:void 0})}}));var S=(0,R.useState)(!1),D=S[0],P=S[1],_=(0,R.useRef)(null),j=(0,R.useRef)({setCaretTimeout:null,focusTimeout:null});(0,R.useEffect)((function(){return P(!0),function(){clearTimeout(j.current.setCaretTimeout),clearTimeout(j.current.focusTimeout)}}),[]);var T=a,M=function(e,t){var n=parseFloat(t);return{formattedValue:e,value:t,floatValue:isNaN(n)?void 0:n}},N=function(e,t,n){D_(e,t),j.current.setCaretTimeout=setTimeout((function(){e.value===n&&D_(e,t)}),0)},B=function(e,t,n){return __(e,t,y(e),n)},Z=function(e,t,n){var r=y(t),o=function(e,t,n,r,o,i){var a=o.findIndex((function(e){return e})),c=e.slice(0,a);t||n.startsWith(c)||(n=c+n,r+=c.length);for(var s=n.length,u=e.length,l={},d=new Array(s),f=0;f<s;f++){d[f]=-1;for(var p=0,h=u;p<h;p++)if(n[f]===e[p]&&!0!==l[p]){d[f]=p,l[p]=!0;break}}for(var m=r;m<s&&(-1===d[m]||!i(n[m]));)m++;var g=m===s||-1===d[m]?u:d[m];for(m=r-1;m>0&&-1===d[m];)m--;var v=-1===m||-1===d[m]?0:d[m]+1;return v>g?g:r-v<g-r?v:g}(t,E,e,n,r,b);return o=__(t,o,r)},F=function(e){var t=e.formattedValue;void 0===t&&(t="");var n=e.input,r=e.setCaretPosition;void 0===r&&(r=!0);var o,i=e.source,a=e.event,c=e.numAsString,s=e.caretPos;if(n){if(void 0===s&&r){var u=e.inputValue||n.value,l=(o=n,Math.max(o.selectionStart,o.selectionEnd));n.value=t,s=Z(u,t,l)}n.value=t,r&&void 0!==s&&N(n,s,t)}t!==E&&function(e,t){k.current=e.formattedValue,C(e,t)}(M(t,c),{event:a,source:i})},L=!D||"undefined"==typeof navigator||navigator.platform&&/iPhone|iPod/.test(navigator.platform)?void 0:"numeric",H=Object.assign({inputMode:L},w,{type:t,value:E,onChange:function(e){var t=function(e,t,n){var r=function(e,t){for(var n=0,r=0,o=e.length,i=t.length;e[n]===t[n]&&n<o;)n++;for(;e[o-1-r]===t[i-1-r]&&i-r>n&&o-r>n;)r++;return{from:{start:n,end:o-r},to:{start:n,end:i-r}}}(E,e),o=Object.assign(Object.assign({},r),{lastValue:E}),i=c(e,o),a=T(i);return!(d&&!d(M(a,i))||(F({formattedValue:a,numAsString:i,inputValue:e,event:t,source:n,setCaretPosition:!0,input:t.target}),0))}(e.target.value,e,v_.event);t&&f(e)},onKeyDown:function(e){var t,n=e.target,r=e.key,o=n.selectionStart,i=n.selectionEnd,a=n.value;if(void 0===a&&(a=""),"ArrowLeft"===r||"Backspace"===r?t=Math.max(o-1,0):"ArrowRight"===r?t=Math.min(o+1,a.length):"Delete"===r&&(t=o),void 0!==t&&o===i){var c=t;if("ArrowLeft"===r||"ArrowRight"===r)c=B(a,t,"ArrowLeft"===r?"left":"right");else"Delete"!==r||b(a[t])?"Backspace"!==r||b(a[t])||(c=B(a,t,"left")):c=B(a,t,"right");c!==t&&N(n,c,a),e.isUnitTestRun&&N(n,c,a),p(e)}else p(e)},onMouseUp:function(e){var t=e.target,n=t.selectionStart,r=t.selectionEnd,o=t.value;if(void 0===o&&(o=""),n===r){var i=B(o,n);i!==n&&N(t,i,o)}h(e)},onFocus:function(e){e.persist();var t=e.target;_.current=t,j.current.focusTimeout=setTimeout((function(){var n=t.selectionStart,r=t.selectionEnd,o=t.value;void 0===o&&(o="");var i=B(o,n);i===n||0===n&&r===o.length||N(t,i,o),m(e)}),0)},onBlur:function(e){_.current=null,clearTimeout(j.current.focusTimeout),clearTimeout(j.current.setCaretTimeout),g(e)}});if("text"===n)return o?I().createElement(I().Fragment,null,o(E,w)||null):I().createElement("span",Object.assign({},w,{ref:i}),E);if(r){var U=r;return I().createElement(U,Object.assign({},H,{ref:i}))}return I().createElement("input",Object.assign({},H,{ref:i}))}function N_(e,t){var n=t.decimalScale,r=t.fixedDecimalScale,o=t.prefix;void 0===o&&(o="");var i=t.suffix;void 0===i&&(i="");var a=t.allowNegative;void 0===a&&(a=!0);var c=t.thousandsGroupStyle;if(void 0===c&&(c="thousand"),""===e||"-"===e)return e;var s=B_(t),u=s.thousandSeparator,l=s.decimalSeparator,d=0!==n&&-1!==e.indexOf(".")||n&&r,f=E_(e,a),p=f.beforeDecimal,h=f.afterDecimal,m=f.addNegation;return void 0!==n&&(h=O_(h,n,!!r)),u&&(p=function(e,t,n){var r=function(e){switch(e){case"lakh":return/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;case"wan":return/(\d)(?=(\d{4})+(?!\d))/g;default:return/(\d)(?=(\d{3})+(?!\d))/g}}(n),o=e.search(/[1-9]/);return o=-1===o?e.length:o,e.substring(0,o)+e.substring(o,e.length).replace(r,"$1"+t)}(p,u,c)),o&&(p=o+p),i&&(h+=i),m&&(p="-"+p),e=p+(d&&l||"")+h}function B_(e){var t=e.decimalSeparator;void 0===t&&(t=".");var n=e.thousandSeparator,r=e.allowedDecimalSeparators;return!0===n&&(n=","),r||(r=[t,"."]),{decimalSeparator:t,thousandSeparator:n,allowedDecimalSeparators:r}}function Z_(e,t,n){void 0===t&&(t=P_(e));var r=n.allowNegative;void 0===r&&(r=!0);var o=n.prefix;void 0===o&&(o="");var i=n.suffix;void 0===i&&(i="");var a=n.decimalScale,c=t.from,s=t.to,u=s.start,l=s.end,d=B_(n),f=d.allowedDecimalSeparators,p=d.decimalSeparator,h=e[l]===p;if(l-u==1&&-1!==f.indexOf(e[u])){var m=0===a?"":p;e=e.substring(0,u)+m+e.substring(u+1,e.length)}var g=!1;o.startsWith("-")?g=e.startsWith("--"):i.startsWith("-")&&e.length===i.length?g=!1:"-"===e[0]&&(g=!0),g&&(e=e.substring(1),u-=1,l-=1);var v=0;e.startsWith(o)?v+=o.length:u<o.length&&(v=u),l-=v;var y=(e=e.substring(v)).length,b=e.length-i.length;e.endsWith(i)?y=b:l>e.length-i.length&&(y=l),e=e.substring(0,y),e=function(e,t){void 0===e&&(e="");var n=new RegExp("(-)"),r=new RegExp("(-)(.)*(-)"),o=n.test(e),i=r.test(e);return e=e.replace(/-/g,""),o&&!i&&t&&(e="-"+e),e}(g?"-"+e:e,r),e=(e.match(function(e,t){return new RegExp("(^-)|[0-9]|"+x_(e),t?"g":void 0)}(p,!0))||[]).join("");var w=e.indexOf(p),A=E_(e=e.replace(new RegExp(x_(p),"g"),(function(e,t){return t===w?".":""})),r),x=A.beforeDecimal,E=A.afterDecimal,O=A.addNegation;return s.end-s.start<c.end-c.start&&""===x&&h&&!parseFloat(E)&&(e=O?"-":""),e}function F_(e){var t=e.decimalSeparator;void 0===t&&(t=".");e.allowedDecimalSeparators,e.thousandsGroupStyle,e.suffix,e.allowNegative;var n=e.allowLeadingZeros,r=e.onKeyDown;void 0===r&&(r=y_);var o=e.onBlur;void 0===o&&(o=y_);var i=e.thousandSeparator,a=e.decimalScale,c=e.fixedDecimalScale,s=e.prefix;void 0===s&&(s="");var u=e.defaultValue,l=e.value,d=e.valueIsNumericString,f=e.onValueChange,p=g_(e,["decimalSeparator","allowedDecimalSeparators","thousandsGroupStyle","suffix","allowNegative","allowLeadingZeros","onKeyDown","onBlur","thousandSeparator","decimalScale","fixedDecimalScale","prefix","defaultValue","value","valueIsNumericString","onValueChange"]);!function(e){var t=B_(e),n=t.thousandSeparator,r=t.decimalSeparator;if(n===r)throw new Error("\n Decimal separator can't be same as thousand separator.\n thousandSeparator: "+n+' (thousandSeparator = {true} is same as thousandSeparator = ",")\n decimalSeparator: '+r+" (default value for decimalSeparator is .)\n ")}(e);var h=function(t){return N_(t,e)},m=function(t,n){return Z_(t,n,e)},g=d;w_(l)?w_(u)||(g=null!=d?d:"number"==typeof u):g=null!=d?d:"number"==typeof l;var v=function(e){return w_(e)||A_(e)?e:("number"==typeof e&&(e=k_(e)),g&&"number"==typeof a?S_(e,a,Boolean(c)):e)},y=T_(v(l),v(u),Boolean(g),h,m,f),b=y[0],w=b.numAsString,A=b.formattedValue,x=y[1];return Object.assign(Object.assign({},p),{value:A,valueIsNumericString:!1,isValidInputCharacter:function(e){return e===t||b_(e)},onValueChange:x,format:h,removeFormatting:m,getCaretBoundary:function(t){return function(e,t){var n=t.prefix;void 0===n&&(n="");var r=t.suffix;void 0===r&&(r="");var o=Array.from({length:e.length+1}).map((function(){return!0})),i="-"===e[0];o.fill(!1,0,n.length+(i?1:0));var a=e.length;return o.fill(!1,a-r.length+1,a+1),o}(t,e)},onKeyDown:function(t){var n=t.target,o=t.key,u=n.selectionStart,l=n.selectionEnd,d=n.value;if(void 0===d&&(d=""),u===l){"Backspace"===o&&"-"===d[0]&&u===s.length+1&&D_(n,1);var f=B_(e).decimalSeparator;"Backspace"===o&&d[u-1]===f&&a&&c&&(D_(n,u-1),t.preventDefault());var p=!0===i?",":i;"Backspace"===o&&d[u-1]===p&&D_(n,u-1),"Delete"===o&&d[u]===p&&D_(n,u+1),r(t)}else r(t)},onBlur:function(t){var r=w;if(r.match(/\d/g)||(r=""),n||(r=function(e){if(!e)return e;var t="-"===e[0];t&&(e=e.substring(1,e.length));var n=e.split("."),r=n[0].replace(/^0+/,"")||"0",o=n[1]||"";return(t?"-":"")+r+(o?"."+o:"")}(r)),c&&a&&(r=S_(r,a,c)),r!==w){var i=N_(r,e);x({formattedValue:i,value:r,floatValue:parseFloat(r)},{event:t,source:v_.event})}o(t)}})}function L_(e){var t=F_(e);return I().createElement(M_,Object.assign({},t))}!function(e){e.event="event",e.props="prop"}(v_||(v_={}));var H_,U_=["immutable"];function z_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var W_=(0,b.ZP)((function(e){e.immutable;var t=(0,BO.Z)(e,U_);return(0,S.jsx)(L_,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?z_(Object(n),!0).forEach((function(t){(0,Iv.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):z_(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},t))})).withConfig({displayName:"StyledNumberEdit"})(H_||(H_=(0,v.Z)(["\n &&&& {\n ","\n }\n"])),aS);const V_=W_;function Y_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function q_(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Y_(Object(n),!0).forEach((function(t){(0,Iv.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Y_(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var G_=function(e){return 0!==e?Math.ceil(Math.log10(Math.abs(e)+1)):1},Q_=function(e){return null!=e&&!isNaN(parseFloat(e))},X_=function(e,t,n){return!Q_(n)||!(Q_(t)&&n>t)&&!(Q_(e)&&n<e)},K_=function(e,t){return function(n){var r=n.floatValue;return G_(r)<G_(e)||X_(e,t,r)}};const $_=(0,P.ZP)(H.Z.Debouncer((function(e){var t,n=(t=e.intl.locale,{thousandSeparator:1111..toLocaleString(t).replace(/1/g,""),decimalSeparator:1.1.toLocaleString(t).replace(/1/g,"")}),r=n.thousandSeparator,o=n.decimalSeparator,i=e.options||{},a=i.prePointDigits,c=i.postPointDigits,s=i.minValue,u=i.maxValue,l=i.allowNegative,d=i.fixedDecimalScale,f=i.suffix,p=i.prefix,h=i.format,m=function(e,t,n){if(e){var r=Math.pow(10,e)-(t?1/Math.pow(10,t):1);return n&&n>r?n:r}return n}(a,c,u),g=q_(q_({isAllowed:K_(s,m),allowNegative:!!l},isNaN(c)?{}:{decimalScale:c}),{},{fixedDecimalScale:!!d});return(0,S.jsx)(iS,{immutable:e.immutable,children:(0,S.jsx)(V_,q_(q_({decimalSeparator:o,disabled:e.immutable,id:e.id,valueIsNumericString:!0,name:e.name,onValueChange:function(t){e.onChange&&X_(s,m,t.floatValue)&&e.onChange(void 0!==t.floatValue?t.floatValue:null)},immutable:e.immutable,thousandSeparator:r,value:e.value,suffix:f,prefix:p},g),{},{format:h,placeholder:e.placeholder,onBlur:function(t){var n,r=!(n=t.target.value)||isNaN(n)?null:parseFloat(n);e.onChange&&!X_(s,m,r)&&(t.target.value=null)}}))})}),800));const J_=H.Z.Debouncer((function(e){var t=e.value,n=e.onChange,r=e.options,o=e.immutable,i=e.name,a=e.id,c=e.placeholder,s=r||{},u=s.minValue,l=s.maxValue,d=s.format,f=s.allowLeadingZeros;return(0,S.jsx)(iS,{immutable:o,children:(0,S.jsx)(V_,{isAllowed:K_(u,l),allowNegative:!0,decimalScale:0,disabled:o,id:a,name:i,onValueChange:function(e){var t=e.value,r=e.floatValue,o=f?t:r;void 0===o&&(o=null),X_(u,l,r)&&n(o)},value:t,allowLeadingZeros:f,format:d,placeholder:c})})}),800);var ej=a(73891),tj=a(52931),nj=a.n(tj),rj=a(66462),oj=a.n(rj),ij=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},aj=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},cj=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},sj={outline:"none"},uj=function(e){function t(){var n,r;ij(this,t);for(var o=arguments.length,i=Array(o),a=0;a<o;a++)i[a]=arguments[a];return n=r=cj(this,e.call.apply(e,[this].concat(i))),r.state={focused:!1},r._isMounted=!1,r._lastBlurEvent=null,r.ref=I().createRef(),r._onFocusIn=function(){r._isMounted&&r._lastBlurEvent&&r.isInsideNode(r.ref.current,r._lastBlurEvent.target)&&!r.isInsideNode(r.ref.current,document.activeElement)&&r.setState({focused:!1},(function(){document.removeEventListener("focusin",r._onFocusIn),r.props.onBlur(r._lastBlurEvent)}))},r.onFocus=function(e){var t=r.props.onFocus;r.state.focused||r.setState({focused:!0},(function(){document.addEventListener("focusin",r._onFocusIn),t(e)}))},r.onBlur=function(e){e.persist(),r._lastBlurEvent=e},r.isInsideNode=function(e,t){return null!=e&&e.contains(t)},cj(r,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.componentDidMount=function(){null!=document&&document.querySelector("body").setAttribute("tabindex","-1"),this._isMounted=!0},t.prototype.componentWillUnmount=function(){this._isMounted=!1,document.removeEventListener("focusin",this._onFocusIn)},t.prototype.focus=function(){var e=this.ref.current;null!=e&&"function"==typeof e.focus&&e.focus()},t.prototype.render=function(){var e=this.props.children,t=this.state.focused,n={onFocus:this.onFocus,onBlur:this.onBlur};return"function"==typeof e?I().cloneElement(e({focused:t,getRef:this.ref}),n):I().createElement("div",aj({ref:this.ref,style:sj},n),e)},t}(I().Component);uj.propTypes={children:oj().oneOfType([oj().node,oj().func]).isRequired,onBlur:oj().func,onFocus:oj().func},uj.defaultProps={onBlur:function(){},onFocus:function(){}};const lj=uj;var dj,fj,pj,hj=b.ZP.div.withConfig({displayName:"StyledLocationEdit"})(dj||(dj=(0,v.Z)(["\n && {\n ","\n position: relative;\n\n div {\n :nth-of-type(1) {\n flex: 0 0 13ch;\n margin-right: ",";\n }\n\n :nth-of-type(2) {\n flex: 1 1 auto;\n }\n }\n\n > span {\n flex: 0 0 auto;\n margin-right: ",";\n color: ",";\n }\n\n .react-autosuggest__input {\n ","\n width: 100%;\n }\n\n .react-autosuggest__suggestions-container--open {\n width: calc(100% + 17.5px);\n background-color: ",";\n box-shadow: 0 0 6px ",";\n border: 1px solid ",";\n bottom: -9px;\n left: -10px;\n max-height: 300px;\n overflow-y: auto;\n position: absolute;\n transform: translateY(100%);\n z-index: 2; // higher than StyledIndicatorsContainerWrapper\n }\n\n .react-autosuggest__suggestions-list {\n margin: 0;\n padding: 0;\n list-style-type: none;\n }\n\n .react-autosuggest__suggestion {\n cursor: pointer;\n padding: 8px 12px;\n }\n\n .react-autosuggest__suggestion--highlighted {\n background-color: ",";\n }\n }\n"])),oS,x.Z.space(-2),x.Z.space(-2),(function(e){var t=e.immutable,n=e.theme;return t?(0,rf.iy)(nf()(n,"colors.text")):nf()(n,"colors.text")}),aS,w.FS.color("paper"),w.FS.color("signal.info.text"),w.FS.color("secondaryLight"),(function(e){var t=e.theme;return(0,rf.HO)(nf()(t,"colors.paper"),1)}));function mj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function gj(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?mj(Object(n),!0).forEach((function(t){(0,Iv.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mj(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const vj=function(e){var t=e.onChange,n=e.options,r=e.value,o=e.id,i=e.immutable,a=e.name,c=function(e){return function(t){return t[e]}},s=function(e){var t=e.state,n=e.country,r=e.postcode,o=e.city,i=t?"- ".concat(t):"",a=n?"/ ".concat(n.display):"";return(0,S.jsxs)(Zd.ZP.Span,{children:[r," ",o," ",i," ",a]})},u=function(e){return function(n,o){var i=o.newValue;t(gj(gj({},r),{},(0,Iv.Z)({},e,i)))}},l=function(e,n){var r=n.suggestion;t(r)},d=function(e){return function(t){var r=t.value;n.fetchSuggestions((0,Iv.Z)({},e,r),n.locationValues.country)}},f={id:o,value:r.postcode||"",onChange:u("postcode"),disabled:i},p={value:r.city||"",onChange:u("city"),disabled:i};return(0,S.jsx)(lj,{children:function(e){var t,o,u,h=e.focused,m=e.getRef;return(0,S.jsxs)(hj,{immutable:i,name:a,ref:m,children:[(0,S.jsx)(nj(),{suggestions:n.suggestions||[],onSuggestionsFetchRequested:d("postcode"),getSuggestionValue:c("postcode"),renderSuggestion:s,onSuggestionsClearRequested:function(){},inputProps:f,onSuggestionSelected:l,focusInputOnSuggestionClick:!1,shouldRenderSuggestions:function(e){return e&&!i}}),(h||r.city||r.postcode)&&(fj||(fj=(0,S.jsx)(Zd.ZP.Span,{children:"/"}))),(0,S.jsx)(nj(),{suggestions:n.suggestions||[],onSuggestionsFetchRequested:d("city"),getSuggestionValue:c("city"),renderSuggestion:s,onSuggestionsClearRequested:function(){},inputProps:p,onSuggestionSelected:l,focusInputOnSuggestionClick:!1,shouldRenderSuggestions:function(e){return e&&!i}}),(0,S.jsxs)(sS,{children:[n.isLoading&&(pj||(pj=(0,S.jsx)(ik.Z,{size:"1.8rem"}))),(u=n.locationValues,Boolean(u.city||u.postcode)&&(0,S.jsx)(YP.Z,{href:(t=n.locationValues,o=t?Object.values(t).filter(Boolean).map((function(e){return"object"===(0,ej.Z)(e)&&e.display?e.display:e})).join("+"):"","".concat("https://www.google.com/maps/search/?api=1&query=").concat(o)),icon:"map-marked",tabIndex:-1,target:"_blank",dense:!1,title:n.mapButtonTitle||"Show on map",neutral:!0}))]})]})}})};function yj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}const bj=function(e){return(0,S.jsx)(Ik,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?yj(Object(n),!0).forEach((function(t){(0,Iv.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yj(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({id:e.id,isMulti:!0,immutable:e.immutable,onChange:e.onChange,value:e.value},e.options))};function wj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}const Aj=function(e){return(0,S.jsx)(Ik,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?wj(Object(n),!0).forEach((function(t){(0,Iv.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wj(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({id:e.id,isMulti:!0,immutable:e.immutable,onChange:e.onChange,value:e.value,openMenuOnClick:!0},e.options))};function xj(e,t,n,r,o,i,a){try{var c=e[i](a),s=c.value}catch(e){return void n(e)}c.done?t(s):Promise.resolve(s).then(r,o)}var Ej,Oj=a(92546),Cj=a.n(Oj);const kj=b.ZP.input.attrs((function(e){return{type:"tel"}})).withConfig({displayName:"StyledPhoneEdit"})(Ej||(Ej=(0,v.Z)(["\n &&&& {\n ","\n }\n"])),aS);const Sj=function(e){var t=e.onChange,n=e.value,r=e.immutable,o=e.id,i=e.onLibLoaded,c=nf()(e,"options.defaultCountry")||"CH",s=(0,R.useState)(null),u=(0,wd.Z)(s,2),l=u[0],d=u[1],f=I().createRef();(0,R.useEffect)((function(){var e=function(){var e,t=(e=Cj().mark((function e(){var t;return Cj().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([a.e(817),a.e(877)]).then(a.bind(a,80446));case 2:t=e.sent,d(t),i&&i();case 5:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){xj(i,r,o,a,c,"next",e)}function c(e){xj(i,r,o,a,c,"throw",e)}a(void 0)}))});return function(){return t.apply(this,arguments)}}();e()}),[i]);var p=function(e,t){var n=e.substring(0,t-1).match(/\s/g);return(null==n?void 0:n.length)||0},h=n&&null!=l&&l.AsYouType?new l.AsYouType(c).input(n):n||"";return(0,S.jsxs)(iS,{immutable:r,children:[(0,S.jsx)(kj,{disabled:r||!l,id:o,name,onChange:function(e){var r=e.target.value,o=l?l.parseNumber(r,c):r,i=TO()(o)?new l.AsYouType(c).input(r).replace(/\s/g,""):l.formatNumber(o,"E.164");t(i);var a=e.target.selectionStart;!function(e,t,n){if(n&&e.length!==n){var r=new l.AsYouType(c).input(t),o=new l.AsYouType(c).input(e),i=p(r,n),a=p(o,n)-i;window.requestAnimationFrame(function(){var e=n+a;this.setSelectionRange(e,e)}.bind(f.current))}}(r,n,a)},immutable:r||!l,ref:f,value:h}),h&&(0,S.jsx)(sS,{children:(0,S.jsx)(YP.Z,{href:"tel:".concat(n),icon:"phone",tabIndex:-1,neutral:!0})})]})};function Dj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}const Pj=function(e){return(0,S.jsx)(Ik,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Dj(Object(n),!0).forEach((function(t){(0,Iv.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Dj(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({id:e.id,isMulti:!1,immutable:e.immutable,onChange:e.onChange,value:e.value},e.options))};function _j(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}const jj=function(e){return(0,S.jsx)(Ik,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_j(Object(n),!0).forEach((function(t){(0,Iv.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_j(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({immutable:e.immutable,onChange:e.onChange,value:e.value},e.options))};function Tj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}const Rj=function(e){return(0,S.jsx)(Ik,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Tj(Object(n),!0).forEach((function(t){(0,Iv.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Tj(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({id:e.id,immutable:e.immutable,isMulti:!1,onChange:e.onChange,value:e.value,openMenuOnClick:!0},e.options))};const Ij=H.Z.Debouncer((function(e){return(0,S.jsx)(iS,{immutable:e.immutable,children:(0,S.jsx)(l_,{disabled:e.immutable,id:e.id,name:e.name,onChange:function(t){return e.onChange(t.target.value)},immutable:e.immutable,value:e.value||""})})}));const Mj=function(){var e,t=(null===(e=navigator)||void 0===e?void 0:e.userAgent)||"";return/^((?!chrome|android).)*safari/i.test(t)};var Nj,Bj,Zj,Fj=(0,b.iv)(Nj||(Nj=(0,v.Z)(["\n ","\n width: 100%;\n grid-area: 1 / 1 / 2 / 2;\n max-height: 25rem;\n box-sizing: border-box;\n"])),aS),Lj=b.ZP.div.withConfig({displayName:"StyledSizeWrapper"})(Bj||(Bj=(0,v.Z)(["\n display: grid;\n width: 100%;\n\n &:after {\n content: attr(data-replicated-value) ' ';\n white-space: pre-wrap;\n word-break: break-all;\n visibility: hidden;\n ","\n\n /* prevent scrollbar on Firefox */\n padding-right: 15px;\n }\n"])),Fj),Hj=b.ZP.textarea.withConfig({displayName:"StyledTextarea"})(Zj||(Zj=(0,v.Z)(["\n ","\n resize: none;\n margin: 0;\n min-height: 4em;\n"])),Fj);function Uj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function zj(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Uj(Object(n),!0).forEach((function(t){(0,Iv.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Uj(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const Wj=function(e){var t=e.value,n=e.onChange,r=e.name,o=e.id,i=e.disabled,a=e.immutable,c=(0,R.useState)(t),s=(0,wd.Z)(c,2),u=s[0],l=s[1],d=!Mj(),f=(0,R.useCallback)(MO()(l,500,{trailing:!0}),[]);return(0,R.useEffect)((function(){d&&f(t)}),[t,d,f]),(0,S.jsx)(Lj,zj(zj({"data-testid":"replicated-test"},d?{"data-replicated-value":u}:{}),{},{children:(0,S.jsx)(Hj,{value:t,name:r,id:o,onChange:n,disabled:i,immutable:a,rows:"1"})}))};const Vj=H.Z.Debouncer((function(e){return(0,S.jsx)(iS,{immutable:e.immutable,children:(0,S.jsx)(Wj,{id:e.id,immutable:e.immutable,maxRows:20,name:e.name,onChange:function(t){return e.onChange(t.target.value)},disabled:e.immutable,rows:2,value:e.value})})}));var Yj;const qj=b.ZP.input.withConfig({displayName:"StyledTimeEdit"})(Yj||(Yj=(0,v.Z)(["\n &&&& {\n ","\n }\n"])),aS);function Gj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Qj(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Gj(Object(n),!0).forEach((function(t){(0,Iv.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Gj(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const Xj=function(e){var t=e.onChange,n=e.value,r=e.immutable,o=e.id,i=e.name,a=HS(n,t),c=a.inputProps,s=a.clearButtonProps,u=n&&!r;return(0,S.jsxs)(iS,{immutable:r,children:[(0,S.jsx)(qj,Qj({type:"text",disabled:r,id:o,immutable:r,name:i},c)),u&&(0,S.jsx)(sS,{children:(0,S.jsx)(_O.Z,Qj(Qj({icon:"times"},s),{},{tabIndex:-1}))})]})};var Kj;const $j=b.ZP.input.attrs((function(e){return{type:"url"}})).withConfig({displayName:"StyledUrlEdit"})(Kj||(Kj=(0,v.Z)(["\n &&&& {\n ","\n }\n"])),aS);function Jj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function eT(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Jj(Object(n),!0).forEach((function(t){(0,Iv.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Jj(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var tT={boolean:Zk,"boolean-select":Mk,code:qk,date:XS,datetime:JS,document:t_,duration:s_,email:d_,html:m_,integer:J_,location:vj,"multi-remote":bj,"multi-select":Aj,number:$_,phone:Sj,remote:Pj,"search-filter":jj,"single-select":Rj,string:Ij,text:Vj,url:H.Z.Debouncer((function(e){return(0,S.jsxs)(iS,{immutable:e.immutable,children:[(0,S.jsx)($j,{disabled:e.immutable,id:e.id,immutable:e.immutable,name:e.name,onChange:function(t){return e.onChange(((n=(n=t.target.value).toLowerCase()).indexOf(".")>0&&!/^[a-z0-9]+:\/\//.test(n)&&(n="https://".concat(n)),n));var n},value:e.value}),e.value&&(0,S.jsx)(sS,{children:(0,S.jsx)(YP.Z,{href:e.value,icon:"external-link",look:"ball",tabIndex:-1,target:"_blank",neutral:!0})})]})})),time:Xj};const nT=function(e){var t=e.componentType,n=e.value,r=e.options,o=e.id,i=e.events,a=e.placeholder,c=e.readOnly,s=void 0!==c&&c;if(tT[t]){var u=tT[t],l=eT(eT({},Rv()(i,"onChange")),{},{onBlur:function(){"function"==typeof(null==i?void 0:i.onBlur)&&i.onBlur(n)}});return(0,S.jsx)("div",eT(eT({},l),{},{"data-cy":"form-field",children:(0,S.jsx)(u,eT(eT({value:n,onChange:null==i?void 0:i.onChange},TO()(r)?{}:{options:r}),{},{id:o,immutable:s,placeholder:a,events:i}))}))}return console.log("No type-editor defined for component type",t),null};function rT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function oT(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?rT(Object(n),!0).forEach((function(t){(0,Iv.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rT(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const iT=function(e){return(0,S.jsx)(uS,{children:(0,S.jsx)(nT,oT({componentType:e.type},Rv()(e,"type")))})};var aT=a(87486);function cT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function sT(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?cT(Object(n),!0).forEach((function(t){(0,Iv.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cT(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var uT="yyyy-MM-dd",lT=function(e){return MS(e,uT)?(0,TS.default)(e,uT,new Date):MS(e,"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")||MS(e,"yyyy-MM-dd'T'HH:mm:ss.SSSxxx")?(0,bS.default)(new Date(e)):null},dT={number:{icons:{range:"square-plus",single:"square-minus"}},integer:{icons:{range:"square-plus",single:"square-minus"}},datetime:{type:"date",icons:{range:"calendar-plus",single:"calendar-minus"},toRange:function(e){return{from:e?lT(e).toISOString():null,to:e?(0,aT.default)(lT(e),1).toISOString():null,isRangeValue:!0}},fromRange:function(e){return e&&e.from?(0,NS.default)(new Date(e.from),uT):e&&e.to?(0,NS.default)(new Date(e.to),uT):null},getToOptions:function(e,t){return sT(sT({},e),{},{datePickerOptions:sT({minDate:t},null==e?void 0:e.datePickerOptions)})},getFromOptions:function(e,t){return sT(sT({},e),{},{datePickerOptions:sT({maxDate:t},null==e?void 0:e.datePickerOptions)})}},date:{icons:{range:"calendar-plus",single:"calendar-minus"},getToOptions:function(e,t){return sT(sT({},e),{},{datePickerOptions:sT({minDate:t},null==e?void 0:e.datePickerOptions)})},getFromOptions:function(e,t){return sT(sT({},e),{},{datePickerOptions:sT({maxDate:t},null==e?void 0:e.datePickerOptions)})}}};const fT=dT;var pT,hT,mT,gT,vT,yT,bT,wT=b.ZP.div.withConfig({displayName:"StyledInputWrapper"})(pT||(pT=(0,v.Z)(["\n width: calc(100% - 25px); // subtract extender width\n"]))),AT=b.ZP.div.withConfig({displayName:"StyledInputItemWrapper"})(hT||(hT=(0,v.Z)(["\n display: inline-block;\n width: 50%;\n\n * {\n text-align: center;\n }\n"]))),xT=b.ZP.div.withConfig({displayName:"StyledIconWrapper"})(mT||(mT=(0,v.Z)(["\n font-size: ",";\n display: flex;\n align-items: center;\n padding-left: ",";\n padding-right: ",";\n"])),x.Z.font(-2.7),x.Z.space(-.5),x.Z.space(-.9)),ET=b.ZP.div.withConfig({displayName:"StyledRange"})(gT||(gT=(0,v.Z)(["\n display: flex;\n"]))),OT=b.ZP.div.withConfig({displayName:"StyledInput"})(vT||(vT=(0,v.Z)(["\n flex: 1;\n display: flex;\n justify-content: space-between;\n align-items: baseline;\n"]))),CT=b.ZP.div.withConfig({displayName:"StyledExtender"})(yT||(yT=(0,v.Z)(["\n display: flex;\n align-items: center;\n position: relative;\n left: 2px;\n z-index: 1;\n"])));function kT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ST(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?kT(Object(n),!0).forEach((function(t){(0,Iv.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kT(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var DT="expanded_initial",PT="expanded",_T="collapsed";const jT=function(e){var t,n,r=e.value,o=e.events,i=e.readOnly,a=e.type,c=e.options,s=e.fromText,u=e.toText,l=e.expanded?DT:_T,d=(0,R.useState)(l),f=(0,wd.Z)(d,2),p=f[0],h=f[1],m=fT[a];(0,R.useEffect)((function(){var e,t=p===DT&&r&&!r.isRangeValue,n=p===PT&&!(null!=r&&r.isRangeValue),i=p===_T&&(null==r?void 0:r.isRangeValue);t?o.onChange({from:r,to:void 0,isRangeValue:!0}):n?o.onChange((e=r,null!=m&&m.toRange?m.toRange(e):{from:e,to:e,isRangeValue:!0})):i&&o.onChange(function(e){return null!=m&&m.fromRange?m.fromRange(e):(null==e?void 0:e.from)||(null==e?void 0:e.to)||null}(r))}),[p,r,o,m]);var g=(null==r?void 0:r.isRangeValue)||!1,v=(0,R.useRef)(r);v.current=r;var y,b,w=(0,R.useMemo)((function(){return ST(ST({},o),{},{onChange:o.onChange})}),[o]),A={onChange:function(e){o.onChange(ST(ST({},v.current),{},{to:e}))}},x={onChange:function(e){o.onChange(ST(ST({},v.current),{},{from:e}))}},E=(null==m||null===(t=m.icons)||void 0===t?void 0:t.range)||"chevron-down",O=(null==m||null===(n=m.icons)||void 0===n?void 0:n.single)||"chevron-left",C=(null==m?void 0:m.type)||a;return(0,S.jsxs)(ET,{children:[(0,S.jsx)(wT,{children:g?(0,S.jsxs)(OT,{children:[(0,S.jsx)(AT,{children:(0,S.jsx)(iT,ST(ST({},e),{},{options:(y=c,b=r.to,null!=m&&m.getFromOptions?m.getFromOptions(y,b):y),value:(null==r?void 0:r.from)||null,events:x,placeholder:s}))}),bT||(bT=(0,S.jsx)(xT,{children:(0,S.jsx)(B.Z,{icon:"horizontal-rule"})})),(0,S.jsx)(AT,{children:(0,S.jsx)(iT,ST(ST({},e),{},{options:function(e,t){return null!=m&&m.getToOptions?m.getToOptions(e,t):e}(c,r.from),value:(null==r?void 0:r.to)||null,events:A,placeholder:u}))})]}):(0,S.jsx)(iT,ST(ST({type:C},Rv()(e,["type"])),{},{events:w}))}),(0,S.jsx)(CT,{children:(0,S.jsx)(_O.Z,{disabled:i,icon:g?O:E,onClick:function(){h(g?_T:PT)}})})]})};function TT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function RT(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?TT(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):TT(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var IT=function(e){var t,n=e.componentType,r=e.mappingType,o=e.range,i=e.formField,a=e.entityField,c=e.formName,s=e.value,u=e.info,l=e.events,d=e.formData,f=i.dataType||i.componentType,p=null===(t=PO[r||"editable"])||void 0===t?void 0:t[f],h=function(e,t,n,r,o){return null!=e&&e.getOptions?e.getOptions({formField:t,formName:n,formData:r,entityField:o}):{}}(p,i,c,d,a),m=function(e,t,n,r,o,i){return null!=e&&e.getValue?e.getValue({formField:t,formName:n,formData:r,entityField:o,value:i}):i}(p,i,c,d,a,s),g=function(e,t,n,r,o,i){return null!=e&&e.getEvents?e.getEvents({formField:t,formName:n,formData:r,entityField:o,events:i}):i}(p,i,c,d,a,l),v=o?jT:iT;return(0,S.jsx)(v,RT(RT({type:n,events:g,value:m},u),{},{options:h},o&&{fromText:d.intl.formatMessage({id:"client.component.range.from"}),toText:d.intl.formatMessage({id:"client.component.range.to"}),expanded:i.expanded}))};const MT=function(e,t){return function(n){return(0,S.jsx)(IT,RT({componentType:e,range:t},n))}},NT={dataContainerProps:function(){return{tooltips:["Resource"],navigationStrategy:!0}},getOptions:function(e){var t=e.formData;return t?{downloadTitle:t.intl.formatMessage({id:"client.component.upload.downloadTitle"}),tooltips:nf()(t.tooltips,"Resource",null),loadTooltip:function(e){return t.loadTooltip("Resource",e)}}:{}}},BT={getOptions:function(e){var t=e.formField;return{postPointDigits:nf()(t,"validation.decimalDigits.postPointDigits",2)}}},ZT={getOptions:function(e){var t=e.formField;return{postPointDigits:nf()(t,"validation.decimalDigits.postPointDigits",null)}}},FT={getValue:function(e){return e.value/100},getOptions:function(e){var t=e.formField;return{postPointDigits:nf()(t,"validation.decimalDigits.postPointDigits",null)}}},LT={dataContainerProps:function(e){return{tooltips:[e.formField.targetEntity],navigationStrategy:!0}},getOptions:function(e){var t=e.formField,n=e.formData;return{tooltips:nf()(n.tooltips,t.targetEntity,null),loadTooltip:function(e){return n.loadTooltip(t.targetEntity,e)},navigationStrategy:n.navigationStrategy,linkProps:{entityName:t.targetEntity}}}},HT={binary:NT,document:NT,image:NT,"multi-remote-field":LT,"single-remote-field":LT,description:{getOptions:function(e){var t=e.formField;return{mode:t.mode,title:t.title}},getValue:function(e){return e.formField.text}},number:ZT,moneyamount:BT,percent:FT};function UT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function zT(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?UT(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):UT(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var WT=function(e){var t=e.componentType,n=e.formField,r=e.value,o=e.formData,i=e.key,a=e.breakWords,c=n.dataType||n.componentType,s=HT[c],u=function(e,t,n){return null!=e&&e.getOptions?e.getOptions({formField:t,formData:n}):{}}(s,n,o),l=function(e,t,n,r){return null!=e&&e.getValue?e.getValue({formField:t,formData:n,value:r}):r}(s,n,o,r);return(0,S.jsx)(nl.Z,{type:t,value:l,options:u,breakWords:a},i)};const VT=function(e){return function(t){return(0,S.jsx)(WT,zT(zT({},t),{},{componentType:e}))}};function YT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function qT(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?YT(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):YT(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var GT={binary:MT("document"),birthdate:MT("date"),boolean:MT("boolean"),char:MT("string"),code:MT("code"),count:MT("string"),counter:MT("integer"),createts:MT("datetime"),createuser:MT("string"),"compressed-text":MT("text"),date:MT("date"),datetime:MT("datetime"),decimal:MT("number"),display:VT("html"),description:VT("description"),document:MT("document"),double:MT("number"),duration:MT("duration"),email:MT("email"),"fulltext-search":MT("string"),html:MT("html"),image:MT("document"),identifier:MT("string"),integer:MT("integer"),ipaddress:MT("string"),latitude:MT("string"),location:MT("location"),login:MT("string"),long:MT("integer"),longitude:MT("string"),marking:MT("boolean"),moneyamount:MT("number"),"multi-remote-field":MT("multi-remote"),"multi-select-box":MT("multi-select"),"named-upload":MT("document"),percent:MT("number"),phone:MT("phone"),postcode:MT("string"),"pulldown-date":MT("date"),"search-filter":MT("search-filter"),serial:MT("string"),"single-remote-field":MT("remote"),"single-select-box":MT("single-select"),sorting:MT("integer"),string:MT("string"),text:MT("text"),"text-area":MT("text"),time:MT("time"),updatets:MT("datetime"),updateuser:MT("string"),upload:MT("document"),url:MT("url"),uuid:MT("string"),version:MT("integer")},QT={binary:VT("document"),birthdate:VT("date"),boolean:VT("boolean"),code:VT("text"),char:VT("string"),counter:VT("integer"),createuser:VT("string"),createts:VT("datetime"),"compressed-text":VT("text"),"data-amount":VT("number"),date:VT("date"),datetime:VT("datetime"),decimal:VT("number"),display:VT("html"),description:VT("description"),duration:VT("duration"),document:VT("document"),double:VT("number"),email:VT("email"),html:VT("html"),image:VT("document"),ipaddress:VT("string"),identifier:VT("string"),latitude:VT("string"),login:VT("string"),long:VT("integer"),longitude:VT("string"),moneyamount:VT("number"),"multi-remote-field":VT("multi-remote"),"multi-select-box":VT("multi-select"),"named-upload":VT("document"),integer:VT("integer"),percent:VT("percent"),phone:VT("phone"),postcode:VT("string"),"pulldown-date":VT("date"),remote:VT("remote"),"search-filter":VT("search-filter"),serial:VT("string"),"single-remote-field":VT("remote"),"single-select-box":VT("single-select"),sorting:VT("integer"),string:VT("string"),text:VT("text"),"text-area":VT("text"),time:VT("time"),updatets:VT("datetime"),updateuser:VT("string"),upload:VT("document"),url:VT("url"),uuid:VT("string"),version:VT("integer")};const XT={editable:GT,readOnly:QT,list:qT(qT({},QT),{},{binary:VT("document-compact"),document:VT("document-compact"),image:VT("document-compact")}),search:qT(qT({},GT),{},{text:MT("string"),birthdate:MT("date",!0),code:VT("text",!0),date:MT("date",!0),updatets:MT("datetime",!0),createts:MT("datetime",!0),datetime:MT("datetime",!0),moneyamount:MT("number",!0),percent:MT("number",!0),long:MT("integer",!0),integer:MT("integer",!0),decimal:MT("number",!0),counter:MT("integer",!0),time:MT("time",!0),boolean:MT("boolean-select"),marking:MT("boolean-select")})};var KT;const $T={factory:function(e,t){return XT[e]&&XT[e][t]?XT[e][t]:(ol.Z.log("Unable to display field: unknown mapping type combination (".concat(e," / ").concat(t,")")),function(){return KT||(KT=(0,S.jsx)("span",{}))})},editableComponentConfigs:PO,formattedComponentConfigs:HT};var JT;const eR=function(){return JT||(JT=(0,S.jsx)(Zd.ZP.Span,{children:", "}))};var tR=["multi-select-box","multi-remote-field","search-filter"],nR=function(e,t){return Array.isArray(e)&&!tR.includes(t)},rR=function(e){return e.reduce((function(e,t,n){return[].concat(z()(e),z()(e.length>0?[(0,S.jsx)(eR,{},"sep".concat(n))]:[]),[t])}),[])};const oR=function(e){var t=e.fieldMappingType,n=e.formName,r=e.formField,o=e.entityField,i=e.value,a=e.info,c=e.events,s=e.formData,u=r.dataType||r.componentType,l=(0,R.useMemo)((function(){return $T.factory(t,u)}),[t,u]);return nR(i,r.dataType)?rR(i.map((function(e,i){return(0,S.jsx)(l,{formField:r,entityField:o,formName:n,mappingType:t,value:e,info:a,events:c,formData:s},"valueField-"+r.id+i)}))):(0,S.jsx)(l,{formField:r,entityField:o,formName:n,mappingType:t,value:i,info:a,events:c,formData:s})};var iR,aR=a(37188);const cR=(0,b.ZP)(aR.hc).withConfig({displayName:"StyledSignalList"})(iR||(iR=(0,v.Z)(["\n && {\n list-style-type: none;\n }\n"])));const sR=function(e){return(0,S.jsx)(cR,{as:"ul",children:I().Children.map(e.children,(function(e){return I().cloneElement(e)}))})};var uR,lR,dR=(uR={},(0,Iv.Z)(uR,zP.Z.condition.BASE,"inherit"),(0,Iv.Z)(uR,zP.Z.condition.DANGER,Jm.Z.color("signal.danger.text")),(0,Iv.Z)(uR,zP.Z.condition.PRIMARY,(function(e){return(0,rf.HO)(nf()(e.theme,"colors.primary"),1)})),(0,Iv.Z)(uR,zP.Z.condition.SUCCESS,Jm.Z.color("signal.success.text")),(0,Iv.Z)(uR,zP.Z.condition.WARNING,Jm.Z.color("signal.warning.text")),(0,Iv.Z)(uR,zP.Z.condition.INFO,Jm.Z.color("signal.info.text")),uR),fR=(0,b.ZP)(aR.EF).withConfig({displayName:"StyledSignalListItem"})(lR||(lR=(0,v.Z)(["\n && {\n color: ",";\n position: relative;\n\n > i,\n > svg {\n position: absolute;\n left: -1.6rem;\n text-align: left;\n }\n\n > svg {\n top: 0.2em;\n }\n }\n"])),(function(e){return function(e){return dR[e.condition]||"inherit"}(e)}));fR.propTypes={condition:zP.Z.conditionPropTypes(dR)};const pR=fR;var hR,mR,gR=(hR={},(0,Iv.Z)(hR,zP.Z.condition.BASE,!1),(0,Iv.Z)(hR,zP.Z.condition.PRIMARY,!1),(0,Iv.Z)(hR,zP.Z.condition.DANGER,"times"),(0,Iv.Z)(hR,zP.Z.condition.SUCCESS,"check"),(0,Iv.Z)(hR,zP.Z.condition.WARNING,"exclamation-triangle"),(0,Iv.Z)(hR,zP.Z.condition.INFO,"info"),hR),vR=function(e){var t=gR[e.condition];return t?(0,S.jsx)(B.Z,{icon:t,position:zP.Z.position.SOLE}):mR||(mR=(0,S.jsx)("i",{children:"•"}))},yR=function(e){return(0,S.jsxs)(pR,{condition:e.condition,children:[vR(e),e.label,I().Children.map(e.children,(function(e){return I().cloneElement(e)}))]})};yR.defaultProps={condition:zP.Z.condition.BASE};const bR={List:sR,Item:yR};const wR=function(e){if(!e.error)return null;var t=[];return Object.keys(e.error).forEach((function(n){t.push.apply(t,(0,RO.Z)(e.error[n]))})),(0,S.jsx)(bR.List,{children:t.map((function(e,t){return(0,S.jsx)(bR.Item,{condition:"danger",label:e},t)}))})};var AR,xR,ER,OR,CR,kR,SR,DR=a(79686),PR="1.1px",_R=function(e){var t=e.isDisplay,n=e.immutable;return"cursor: ".concat(!t&&n?"not-allowed":"auto",";")},jR=b.ZP.div.withConfig({displayName:"StyledLabelWrapper"})(AR||(AR=(0,v.Z)(["\n width: calc(100% - ",");\n"])),x.Z.space(.5)),TR=b.ZP.label.withConfig({displayName:"StyledStatedValueLabel"})(xR||(xR=(0,v.Z)(["\n &&& {\n ","\n background-color: ",";\n color: ",";\n left: ",";\n margin: calc("," / -2) 0 0;\n padding: 0 "," 0 ","; // if immutable remove left padding\n position: absolute;\n width: auto;\n height: calc("," + 1px);\n overflow: hidden;\n top: 0;\n pointer-events: auto;\n ","\n\n span {\n white-space: nowrap;\n }\n }\n"])),(0,A.Z)({fontWeight:function(e){return e.dirty?Jm.Z.fontWeight("bold"):Jm.Z.fontWeight("regular")},lineHeight:Jm.Z.lineHeight("dense")}),Jm.Z.color("paper"),(function(e){return PP[function(e){var t=e.isDisplay,n=e.immutable,r=e.signal,o=e.hasValue;return r?"signal":o?"hasValue":t?"shade1":n?"shade0":"shade1"}(e)](e)}),x.Z.space(-2),x.Z.font(0),x.Z.space(-2),(function(e){return e.immutable&&"0"}),x.Z.font(0),(function(e){return _R(e)})),RR=b.ZP.div.withConfig({displayName:"StyledStatedValueBox"})(ER||(ER=(0,v.Z)(["\n &&& {\n border: "," solid ",";\n padding: "," "," "," ",";\n position: relative;\n margin-top: ",";\n padding-left: ",";\n padding-top: ",";\n ","\n ","\n\n * {\n padding-left: ",";\n margin-bottom: 0;\n }\n\n > "," {\n padding-top: ",";\n position: relative;\n top: 5px;\n\n p:first-of-type {\n margin-top: 0;\n }\n }\n }\n"])),PR,(function(e){return _P[function(e){var t=e.immutable,n=e.isDisplay,r=e.signal;return e.isDirty?"isDirty":n||t?"transparent":r?"signal":"shade1"}(e)](e)}),x.Z.space(-1),x.Z.space(-1),x.Z.space(-2),x.Z.space(-1),(function(e){return e.isDisplay&&x.Z.space(-1)}),(function(e){return e.immutable&&x.Z.space(-2)}),(function(e){var t=e.isDisplay,n=e.immutable;return t&&n&&x.Z.space(-1)}),(function(e){return!e.immutable&&(0,rf.kk)(e)}),(function(e){return _R(e)}),(function(e){return e.isDisplay&&"0"}),DR.j,(function(e){return e.isDisplay&&x.Z.space(-1)})),IR=b.ZP.p.withConfig({displayName:"StyledStatedValueDescription"})(OR||(OR=(0,v.Z)(["\n &&& {\n ","\n }\n"])),(0,A.Z)({fontSize:x.Z.font(-1)})),MR=b.ZP.div.withConfig({displayName:"StyledStatedValueError"})(CR||(CR=(0,v.Z)([""]))),NR=b.ZP.div.withConfig({displayName:"StyledStatedValueWrapper"})(kR||(kR=(0,v.Z)(["\n &&& {\n margin-bottom: ",";\n padding-top: ",";\n\n ",",\n ",",\n "," {\n margin-bottom: ",";\n\n &:last-child {\n margin-bottom: 0;\n }\n }\n\n ",",\n "," {\n margin-left: calc("," + ",");\n\n "," {\n margin-left: -",";\n }\n }\n }\n"])),x.Z.space(-1),x.Z.space(-1.5),RR,IR,MR,x.Z.space(-2),IR,MR,x.Z.space(-1),PR,aR.hc,x.Z.space(-2));b.ZP.input.withConfig({displayName:"StyledInput"})(SR||(SR=(0,v.Z)(["\n border: 0;\n cursor: ",";\n color: ",";\n outline: 0;\n transition: color 200ms;\n width: 100%;\n"])),(function(e){var t=e.args;return t.immutable&&!t.isDisplay?"not-allowed":"auto"}),(function(e){var t=e.args;return t.immutable&&!t.isDisplay?"#545454":"#000"}));function BR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ZR(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?BR(Object(n),!0).forEach((function(t){(0,Iv.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):BR(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const FR=function(e){var t,n,r,o=e.children,i=e.description,a=e.dirty,c=e.isDisplay,s=e.error,u=e.hasValue,l=e.id,d=e.label,f=e.mandatory,p=e.mandatoryTitle,h=e.immutable,m=e.touched,g=e.signal,v=!h&&m&&s&&Object.keys(s).length>0,y="".concat(UE.Z.adjustedHTMLString(d)).concat(f&&p?", ".concat(p):""),b=g||function(e,t,n,r){return t?zP.Z.condition.DANGER:e?zP.Z.condition.INFO:n&&!r?zP.Z.condition.WARNING:void 0}(a,v,f,u),w={__html:"".concat(hk.Z.sanitizeHtml(d)).concat(f?" *":"")},A=!c&&!h&&{htmlFor:l};return(0,S.jsx)(lj,{children:function(e){var l=e.getRef;return(0,S.jsxs)(NR,{ref:l,children:[(0,S.jsxs)(RR,{hasValue:u,immutable:h,isDisplay:c,signal:b,children:[o,d&&(0,S.jsx)(jR,{children:(0,S.jsx)(TR,ZR(ZR({},A),{},{hasValue:u,dirty:a,title:y,immutable:h,isDisplay:c,signal:b,children:t||(t=(0,S.jsx)("span",{dangerouslySetInnerHTML:w}))}))})]}),i&&(n||(n=(0,S.jsx)(IR,{children:i}))),v&&(r||(r=(0,S.jsx)(MR,{children:(0,S.jsx)(wR,{error:s})})))]})}})};function LR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function HR(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?LR(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):LR(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const UR=function(e){var t=e.typeEditable,n=e.value,r=e.formData,o=e.formField,i=e.dirty,a=e.error,c=e.children,s=t&&t.hasValue?t.hasValue({formValues:r.formValues,formField:o,value:n}):null!=n&&!1!==n&&(void 0===n.length||n.length>0);return(0,S.jsx)(FR,HR(HR({},e),{},{dirty:r.isDirty||i,error:r.errors||a,hasValue:s,children:I().cloneElement(c,{formData:r})}))};var zR;function WR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function VR(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?WR(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):WR(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var YR=["display","description"];const qR=function(e){var t=e.fieldMappingType,n=e.data,r=e.resources,o=void 0===r?{}:r;try{var i,a,c=n.formDefinitionField,s=n.entityField,u=n.id,l=n.value,d=n.dirty,f=n.touched,p=n.events,h=n.error,m=n.submitting,g=n.parentReadOnly,v=n.formName,y=n.mode,b=c.componentType,w=c.dataType,A=c.readonly,x=g||A||m||!nf()(s,"writable",!0),E=function(e,t,n,r){return!!r||!!YR.includes(t)||!!nR(e,n)}(l,b,w,g),O=c.dataType||c.componentType,C=null===(i=$T.editableComponentConfigs[t])||void 0===i?void 0:i[O];C&&C.dataContainerProps&&(a=C.dataContainerProps({formField:c,formName:v}));var k=nf()(c,"validation.mandatory",!1);C&&C.getMandatoryValidation&&(k=C.getMandatoryValidation({formField:c})||!1);var D=!x&&k&&"search"!==y,P=C&&C.fixLabel&&C.fixLabel();return(0,S.jsx)(yN.FormDataContainer,VR(VR({},a),{},{children:(0,S.jsx)(UR,{typeEditable:C,dirty:d,error:h,value:l,id:u,immutable:x,isDisplay:E,label:c.label,mandatory:D,mandatoryTitle:o.mandatoryTitle,touched:f,fixLabel:P,formField:c,children:(0,S.jsx)(oR,{fieldMappingType:E?"readOnly":t,formName:v,formField:c,entityField:s,value:l,info:{id:u,readOnly:x,mandatory:D},events:p})},u)}))}catch(e){return ol.Z.logError("Error creating formField",e),zR||(zR=(0,S.jsx)("span",{}))}},GR={FormField:qR,MultipleFieldsSeparator:eR,isMultipleFields:nR,enhanceMultipleFieldsWithSeparators:rR};const QR=(0,P.ZP)((function(e){var t=e.input,n=e.meta,r=n.dirty,o=n.touched,i=n.error,a=n.submitting,c=e.id,s=e.formDefinitionField,u=e.entityField,l=e.parentReadOnly,d=e.formName,f=e.mode,p=function(e){return Rv()(e,["name","value"])}(t),h={formDefinitionField:s,id:c,formName:d,value:t.value,dirty:r,touched:o,submitting:a,events:p,error:i,entityField:u,parentReadOnly:l,mode:f},m={mandatoryTitle:e.intl.formatMessage({id:"client.component.form.mandatoryFieldTitle"})};return(0,S.jsx)(GR.FormField,{fieldMappingType:e.fieldMappingType,data:h,resources:m})}));function XR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function KR(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?XR(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):XR(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function $R(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return JR(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return JR(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){c=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(c)throw i}}}}function JR(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var eI=function(e,t){return!e||!t||0===t.length||t.includes(e)},tI=function(e){var t=e.componentMapping,n=e.entity,r=e.mode,o=e.beforeRenderField,i=e.formDefinition,a=e.formValues,c=e.formName,s=e.fieldMappingType,u=e.customRenderedActions,l=e.readonly,d=function(e){var n,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=[],i=$R(e);try{for(i.s();!(n=i.n()).done;){var a=n.value;if(a.componentType===gw.LAYOUT)o.push(h(a,a.layoutType,r));else if(oh(a.componentType))o.push(p(a));else if(a.componentType===gw.FIELD_SET)o.push(f(a,r,e));else if(t&&t[a.componentType])return m(a)}}catch(e){i.e(e)}finally{i.f()}return o},f=function(e,t,i){var u=Nw(e);if(!u)return null;var l=KR(KR({},u),{},{siblings:i.map(Nw).filter(Boolean)}),d=l.path||l.id,f="paths.".concat(d.split(".").join(".value.paths.")).split("."),p=nf()(n,f);return function(e){var t=e.formDefinitionField,n=e.formDefinition,r=e.entityField,o=e.parentReadOnly,i=e.beforeRenderField,a=e.fieldName,c=e.formValues,s=e.mode,u=e.fieldMappingType;if(!eI(s,t.scopes))return!1;if(t.hidden)return!1;if(i&&!i(a))return!1;if("search"===u)return!0;var l=Dw(a);return!((o||n.readonly||r&&!1===r.writable||"create"!==s&&!r&&"description"!==t.componentType&&"location"!==t.dataType||t.readonly||"display"===t.componentType)&&function(){if(Object.prototype.hasOwnProperty.call(c||{},l)){var e=c[l];return null==e||""===e||Array.isArray(e)&&0===e.length}return!0}())}({parentReadOnly:t,formDefinition:u,formDefinitionField:l,entityField:p,beforeRenderField:o,fieldName:d,formValues:a,mode:r,fieldMappingType:s})?(0,S.jsx)(dE,{parentReadOnly:t,name:Dw(d),id:bw(c,d),formName:c,component:QR,formDefinitionField:l,entityField:p,fieldMappingType:s,format:null,mode:r},"field-".concat(d)):null},p=function(t){var n=nf()(e,"entity.model"),o=nf()(e,"entity.key");return(0,S.jsx)(VE,{action:t,entityKey:o,entityName:n,mode:r,customRenderedActions:u},"action-".concat(t.id))},h=function(e,t,n){var r,o=d(e.children,n||e.readonly);if(Array.isArray(o)&&(o=o.filter(Boolean)),!o||Array.isArray(o)&&0===o.length)return null;var i=e.label?(0,S.jsxs)(jE.Wrapper,{isFramed:!0,isOpen:!0,children:[(0,S.jsx)(jE.Header,{children:(0,S.jsx)(Zd.ZP.H4,{children:e.label})}),(0,S.jsx)(jE.Body,{children:o})]}):o,a=(r={},L()(r,$w.HORIZONTAL_BOX,LE.Container),L()(r,$w.VERTICAL_BOX,LE.Box),r)[t],c="layoutcomponent-".concat(e.id,"-").concat(e.layoutType);return a?(0,S.jsx)(a,{occupiesRemainingHeight:e.occupiesRemainingHeight,children:i},c):(ol.Z.logWarning('Layout type "'.concat(t,'" for box "').concat(e.id,'" is unknown.')),null)},m=function(e){if(!eI(r,e.scopes))return null;var n="custom-component-".concat(e.id,"-").concat(e.layoutType);return(0,t[e.componentType])(e,n)};return d(i.children,l||i.readonly)},nI=function(e,t){return 0===Object.keys(UE.Z.difference(e,t)).length};const rI=I().memo(tI,nI);function oI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function iI(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?oI(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oI(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var aI="main-action-bar",cI="action-bar",sI="action-group",uI="layout",lI="table",dI="createcopy",fI=function e(t,n){return iI(iI({},t),{},{children:t.children.filter((function(e){return e.componentType===uI||e.componentType===lI||!n(e,t)})).map((function(t){return t.componentType===uI||t.componentType===lI?e(t,n):t}))})},pI=function e(t,n,r){return iI(iI({},t),{},{children:t.children.map((function(t){return t.componentType===cI||t.componentType===sI?e(t,n,r):t})).map((function(e){return"action"===e.componentType&&n.includes(e.id)?r(e):e})).filter((function(e){return e})).filter((function(e){var t;return e.componentType!==cI&&e.componentType!==sI||(null===(t=e.children)||void 0===t?void 0:t.length)>0}))})},hI=function(e){if(e.children.filter((function(e){return e.id===aI})).length>0)return e;var t={id:aI,componentType:cI,children:[]};return iI(iI({},e),{},{children:[t].concat(z()(e.children))})};function mI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function gI(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?mI(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mI(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var vI=function e(t,n){return n.id===t?Nw(n):n.children&&0!==n.children.length?n.children.reduce((function(n,r){return n||e(t,r)}),null):null};const yI={location:function(e,t,n,r){var o=t.locationMapping,i=vI(o.city,n),a=vI(o.postcode,n),c=SI(i,r[Dw(i.path)],{}),s=SI(a,r[Dw(a.path)],{});return Bw(c)||Bw(s)?L()({},t.id,gI(gI({},c[i.path]),s[a.path])):{}}};var bI,wI,AI=a(23065),xI=a.n(AI),EI=a(38186),OI=a.n(EI),CI=function(e){return null!=e};const kI={"length.fromIncluding":function(e,t){return CI(t)&&e.length<t?{minLength:[(0,S.jsx)(fd.Z,{id:"client.component.form.syncValidationMinLength",values:{minLength:t}},"syncValidationMinLength")]}:null},"length.toIncluding":function(e,t){return CI(t)&&e.length>t?{maxLength:[(0,S.jsx)(fd.Z,{id:"client.component.form.syncValidationMaxLength",values:{maxLength:t}},"syncValidationMaxLength")]}:null},"numberRange.fromIncluding":function(e,t){return CI(t)&&e<t?{maxNumber:[(0,S.jsx)(fd.Z,{id:"client.component.form.syncValidationMinNumber",values:{minValue:t}},"syncValidationMaxNumber")]}:null},"numberRange.toIncluding":function(e,t){return CI(t)&&e>t?{maxNumber:[(0,S.jsx)(fd.Z,{id:"client.component.form.syncValidationMaxNumber",values:{maxValue:t}},"syncValidationMaxNumber")]}:null},"decimalDigits.postPointDigits":function(e,t){return e.toString().includes(".")&&e.toString().split(".")[1].length>t?{prePoint:[(0,S.jsx)(fd.Z,{id:"client.component.form.syncValidationPrePoint",values:{limit:t}},"syncValidationPrePoint")]}:null},"decimalDigits.prePointDigits":function(e,t){return t>0&&e.toString().split(".")[0].length>t?{prePoint:[(0,S.jsx)(fd.Z,{id:"client.component.form.syncValidationPrePoint",values:{limit:t}},"syncValidationPrePoint")]}:null},"regex.pattern":function(e,t){return RegExp(t).test(e)?null:{prePoint:[(0,S.jsx)(fd.Z,{id:"client.component.form.syncValidationRegexPattern",values:{pattern:t}},"syncValidationRegexPattern")]}},email:function(e){return xI()(e)?null:{format:[bI||(bI=(0,S.jsx)(fd.Z,{id:"client.component.form.invalidEmail"},"invalidEmail"))]}},url:function(e){return OI()(e)||e.includes("localhost")&&OI()(e,{require_tld:!1})?null:{format:[wI||(wI=(0,S.jsx)(fd.Z,{id:"client.component.form.invalidUrl"},"invalidUrl"))]}}};var SI=function(e,t){var n={};return Uw(t)?Object.keys(kI).forEach((function(r){if(Fw()(e,["validation"].concat(z()(r.split("."))))){var o=nf()(e,["validation"].concat(z()(r.split(".")))),i=(0,kI[r])(t,o);i&&(n=pw.addErrors(n,e.path,i))}})):e.validation&&e.validation.mandatory&&(n=pw.addErrors(n,e.path,zw)),n},DI=function(e,t,n,r){var o=r.dataType,i=yI[o];return i?i(n,r,t,e):{}};function PI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _I(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?PI(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):PI(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const jI=function(e,t){return function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.reduce((function(e,r){var o=n[r.path];return _I(_I(_I({},e),SI(r,o)),DI(n,t,o,r))}),{})}};var TI=function(e){var t=e.fieldDefinitions,n=e.formDefinition,r=(0,R.useRef)(null);return r.current||TO()(t)||(r.current=jI(t,n)),r.current},RI=function(e){var t=e.formInitialValues,n=e.fieldDefinitions,r=e.formDefinition,o=e.mode;return function(e){return Kw(e,"create"===o?{}:t,n,r,o)}},II=function(e){var t=e.submitForm;return{onSubmit:function(e){e.preventDefault(),t()},onKeyDown:function(e){"Enter"===e.key&&"TEXTAREA"!==e.target.tagName&&e.preventDefault()}}};function MI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function NI(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?MI(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):MI(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const BI={getFormErrors:function(e){return function(t){return NI(NI(NI(NI({},sx(e)(t)),ax(e)(t)),cx(e)(t)),{},{_error:(n=e,function(e){return nf()(e,"form.".concat(n,".error"),{})})(t)});var n}}};var ZI=Zf().mark(UI),FI=Zf().mark(VI);function LI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function HI(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?LI(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):LI(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function UI(e,t){var n;return Zf().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(n=e.reduce((function(e,n){var r=n.id,o=n.value,i=nf()(t,["paths",r]);if(i&&"relation"===i.type){var a=i.targetEntity,c=Array.isArray(o)?o:[o];return HI(HI({},e),{},L()({},a,[].concat(z()(e[a]||[]),z()(c))))}return e}),{}),0!==Object.keys(n).length){r.next=3;break}return r.abrupt("return",null);case 3:return r.next=5,(0,Ff.RE)(uh.Z.fetchDisplays,n);case 5:return r.abrupt("return",r.sent);case 6:case"end":return r.stop()}}),ZI)}var zI=function(e,t,n){return{key:e,display:nf()(t,[n,e],"??")}},WI=function(e,t,n){if(t&&"relation"===t.type){var r=t.targetEntity;return t.multi?e.map((function(e){return zI(e,n,r)})):zI(e,n,r)}return e};function VI(e,t){var n;return Zf().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,(0,Ff.RE)(UI,e,t);case 2:return n=r.sent,r.abrupt("return",e.reduce((function(e,r){var o=r.id,i=r.value,a=nf()(t,["paths",o]);return HI(HI({},e),{},L()({},o,WI(i,a,n)))}),{}));case 4:case"end":return r.stop()}}),FI)}const YI={formErrorsUtil:pw,FormBuilder:rI,getFieldId:bw,getFieldDefinitions:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return Aw(e,t)},getDefaultValues:function(e){return e.filter((function(e){return null!==e.defaultValue&&void 0!==e.defaultValue})).reduce((function(e,t){return yw(yw({},e),{},L()({},t.path||t.id,t.defaultValue))}),{})},getUsedPaths:function(e){return wb()(e.filter((function(e){return e.componentType===gw.FIELD})).reduce((function(e,t){return[].concat(z()(e),z()(xw[t.dataType]?xw[t.dataType](t).paths:[t.path||t.id]))}),[]))},formValuesToFlattenEntity:_w,entityToFormValues:function(e,t){return function(e,t){return t.filter((function(e){return e.componentType===gw.FIELD})).reduce((function(e,t){if(xw[t.dataType]){var n=xw[t.dataType](t).mapping,r=Ow({},Object.keys(n).reduce((function(t,r){var o=n[r];return Ow(Ow({},t),e[o]?L()({},r,e[o]):{})}),{}));return Ow(Ow({},e),Cw(r)?{}:L()({},t.path||t.id,r))}return e}),e)}(Om()(e,(function(e,t,n){return Ow(Ow({},e),{},L()({},Dw(n),t))}),{}),t)},getDirtyFormValues:jw,validationErrorToFormError:kw,transformFieldName:Dw,transformFieldNameBack:Pw,syncValidation:jI,componentTypes:gw,layoutTypes:$w,scopes:Jw,validators:{syncValidators:kI,asyncTypeValidators:Hw,syncTypeValidators:yI,mandatoryError:zw,valueDefined:Uw},transformInputValues:VI,asyncValidation:Kw,submitValidation:function(e,t,n,r,o){return Xw(e,t,n,r,o).then((function(e){if(Bw(e))throw new tw(e)}))},isValueEmpty:Tw,typeFieldMapping:xw,sagas:n,sagasUtils:t,addToStore:function(e,t){e.sagaMiddleware.run(jx,t)},ErrorItem:eA,hooks:r,selectors:BI,addCreate:function(e,t){if(e.id.endsWith("_create"))return e;var n=hI(e),r={id:"new",label:t.formatMessage({id:"client.actions.create"}),componentType:"action",children:[],actionType:"custom",useLabel:"YES",buttonType:"REGULAR",icon:"plus"};return iI(iI({},n),{},{children:n.children.map((function(e){return e.id===aI?e.children.some((function(e){return dI===e.id}))?e:iI(iI({},e),{},{children:[r].concat(z()(e.children))}):e}))})},addBack:function(e,t){var n=hI(e),r={id:"back",label:t.formatMessage({id:"client.actions.back"}),componentType:"action",children:[],actionType:"custom",useLabel:"YES",buttonType:"REGULAR",icon:"arrow-left"};return iI(iI({},n),{},{children:n.children.map((function(e){return e.id===aI?iI(iI({},e),{},{children:[r].concat(z()(e.children))}):e}))})},addReports:function(e,t){if(0===(null==t?void 0:t.length))return e;var n=hI(e),r=[dI,"delete","save"];return iI(iI({},n),{},{children:n.children.map((function(e){return e.id===aI?iI(iI({},e),{},{children:[].concat(z()(e.children.filter((function(e){return r.includes(e.id)}))),z()(t),z()(e.children.filter((function(e){return!r.includes(e.id)}))))}):e}))})},removeBoxes:function e(t,n){return iI(iI({},t),{},{children:t.children.filter((function(e){return e.componentType!==uI||!n.includes(e.id)})).map((function(t){return t.componentType===uI?e(t,n):t}))})},removeFields:function(e,t){return fI(e,(function(e){return t.includes(e.id)}))},removeFieldsByPredicate:fI,removeActions:function(e,t){return pI(e,t,(function(){return!1}))},adjustActions:pI};function qI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function GI(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qI(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qI(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var QI=Zf().mark(JI),XI=Zf().mark(eM),KI=Zf().mark(tM),$I=Zf().mark(nM);function JI(){return Zf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Ff.$6)([(0,Ff.ib)(Fb,tM)]);case 2:case"end":return e.stop()}}),QI)}function eM(e){var t,n;return Zf().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,(0,Ff.RE)(Lm.getDisplayRequest,e);case 2:return t=r.sent,r.next=5,(0,Ff.RE)(uh.Z.fetchDisplays,t,"remote");case 5:return n=r.sent,r.abrupt("return",e.map((function(e){return GI(GI({},e),{},{display:n[e.model][e.key]})})));case 7:case"end":return r.stop()}}),XI)}function tM(e){var t,n,r,o,i,a,c,s,u,l,d,f,p;return Zf().wrap((function(h){for(;;)switch(h.prev=h.next){case 0:return t=e.payload,n=t.fieldName,r=t.entityName,o=t.options,i=void 0===o?{}:o,h.next=3,(0,Ff.Ys)(aM,n);case 3:if(a=h.sent,cM(a)&&!i.forceReload){h.next=29;break}return h.next=7,(0,Ff.RE)(nM,r,i);case 7:return c=h.sent,s=(null==a?void 0:a.searchTerm)!==c.searchTerm,h.next=11,(0,Ff.gz)(Ub(n,s));case 11:return h.next=13,(0,Ff.RE)(sM,c);case 13:return u=h.sent,l={method:"GET"},h.next=17,(0,Ff.RE)(uh.Z.fetchModel,r);case 17:return d=h.sent,"boolean"===nf()(d,"paths.active.type")&&(u.where=u.where?"".concat(u.where," and active"):"active"),h.next=21,(0,Ff.RE)(uh.Z.fetchEntities,r,u,l);case 21:return f=h.sent,h.next=24,(0,Ff.RE)(eM,f);case 24:return f=(f=h.sent).map((function(e){return xm()(e,Lm.relevantRelationAttributes)})),p=!!c.limit&&f.length>c.limit,h.next=29,(0,Ff.gz)(zb(n,c.limit?f.splice(0,c.limit):f,p,c.searchTerm));case 29:case"end":return h.stop()}}),KI)}function nM(e,t){var n,r,o,i,a,c;return Zf().wrap((function(s){for(;;)switch(s.prev=s.next){case 0:if(!t.loadRemoteFieldConfiguration||t.constriction&&t.sorting){s.next=7;break}return n=t.formName,r=t.formBase,o=t.constriction,i=t.sorting,a=n?"".concat(e,"_").concat(n):r||e,s.next=5,(0,Ff.RE)(uh.Z.fetchForm,a,"remotefield");case 5:return c=s.sent,s.abrupt("return",GI(GI({},t),{},{constriction:o||oM(c),sorting:i||rM(c)||[{field:"update_timestamp",order:"desc"}]}));case 7:return s.abrupt("return",t);case 8:case"end":return s.stop()}}),$I)}var rM=function(e){var t=iM(e);return(null==t?void 0:t.sorting)||null},oM=function(e){var t=iM(e);return(null==t?void 0:t.constriction)||null},iM=function(e){return e.children.find((function(e){return e.componentType===YI.componentTypes.TABLE}))},aM=function(e,t){return e.formData.relationEntities.data[t]},cM=function(e){var t;return!(null==e||null===(t=e.data)||void 0===t||!t.length)>0},sM=function(e){return GI(GI(GI(GI(GI(GI({},e.limit?{limit:e.limit+1}:{}),e.searchTerm?{search:e.searchTerm}:{}),e.sorting?{sorting:e.sorting}:{}),e.constriction?{constriction:e.constriction}:{}),e.formName?{form:e.formName}:{}),e.where?{where:e.where}:{})},uM="formData/OPEN_REMOTE_CREATE",lM=function(e,t){return function(n){e(),t.put(n)}};const dM=function(e){var t=e.DetailApp,n=e.targetEntity,r=e.answerChannel,o=e.close,i=e.emitAction;return(0,S.jsx)(t,{entityName:n,formName:n,mode:"create",onEntityCreated:lM(o,r),emitAction:i})};var fM={emitAction:d.Z.dispatchEmittedAction};const pM=(0,_.connect)(null,fM)(dM);var hM=Zf().mark(gM),mM=Zf().mark(vM);function gM(e){return Zf().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,Ff.$6)([(0,Ff.ib)(uM,vM,e)]);case 2:case"end":return t.stop()}}),hM)}function vM(e,t){var n,r,o,i,a,c,s,u,l,d,f,p,h,g;return Zf().wrap((function(v){for(;;)switch(v.prev=v.next){case 0:return n=t.payload,r=n.formName,o=n.formField,i=n.value,v.next=3,(0,Ff.Ys)(e);case 3:return a=v.sent,c=a.detailApp,v.next=7,(0,Ff.RE)(yh.CE);case 7:return s=v.sent,v.next=10,(0,Ff.RE)(Um.Z);case 10:return u=v.sent,l=function(e){var t=e.close;return(0,S.jsx)(pM,{targetEntity:o.targetEntity,answerChannel:s,close:t,DetailApp:c})},v.next=14,(0,Ff.gz)(m.Z.modal(u,o.label,null,l,!0));case 14:return v.next=16,(0,Ff.qn)(s);case 16:return d=v.sent,f=d.id,v.next=20,(0,Ff.RE)(uh.Z.fetchDisplay,o.targetEntity,f);case 20:return p=v.sent,h={key:f,model:o.targetEntity,version:0,display:p},g="multi-remote-field"===o.dataType?[].concat(z()(i||[]),[h]):h,v.next=25,(0,Ff.gz)(xy(r,o.path,g));case 25:case"end":return v.stop()}}),mM)}var yM="formData/LOAD_SEARCH_FILTERS",bM="formData/SET_SEARCH_FILTER",wM=function(e,t){return{type:bM,payload:{entity:e,filters:t}}};function AM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function xM(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?AM(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):AM(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var EM=L()({},bM,(function(e,t){var n=t.payload,r=n.entity,o=n.filters;return xM(xM({},e),{},L()({},r,o))})),OM={};function CM(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:OM,t=arguments.length>1?arguments[1]:void 0,n=EM[t.type];return n?n(e,t):e}var kM=function(e){return e.body.filters.map((function(e){return{uniqueId:e.uniqueId,display:e.label,key:e.key}}))};function SM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function DM(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?SM(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):SM(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var PM=Zf().mark(jM),_M=Zf().mark(RM);function jM(){return Zf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Ff.$6)([(0,Ff.Fm)(yM,RM)]);case 2:case"end":return e.stop()}}),PM)}var TM=function(e){return e.formData.searchFilters};function RM(e){var t,n,r,o,i;return Zf().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return t=e.payload,n=t.entity,r=t.group,a.next=4,(0,Ff.Ys)(TM);case 4:if(a.sent[n]){a.next=14;break}return a.next=8,(0,Ff.RE)(uh.Z.requestSaga,"client/searchfilters/".concat(n),DM({},r?{queryParams:{group:r}}:{}));case 8:return o=a.sent,a.next=11,(0,Ff.RE)(kM,o);case 11:return i=a.sent,a.next=14,(0,Ff.gz)(wM(n,i));case 14:case"end":return a.stop()}}),_M)}var IM="formData/LOAD_TOOLTIP",MM="formData/SET_TOOLTIP",NM=function(e,t,n){return{type:MM,payload:{entity:e,id:t,tooltip:n}}};function BM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ZM(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?BM(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):BM(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var FM=L()({},MM,(function(e,t){var n=t.payload,r=n.entity,o=n.id,i=n.tooltip;return ZM(ZM({},e),{},{data:ZM(ZM({},e.data),{},L()({},r,ZM(ZM({},e.data[r]),{},L()({},o,i))))})})),LM={data:{}};function HM(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:LM,t=arguments.length>1?arguments[1]:void 0,n=FM[t.type];return n?n(e,t):e}var UM=Zf().mark(WM),zM=Zf().mark(YM);function WM(){return Zf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Ff.$6)([(0,Ff.ib)(IM,YM)]);case 2:case"end":return e.stop()}}),UM)}var VM=function(e,t,n){return nf()(e,"formData.tooltips.data.".concat(t,".").concat(n),null)};function YM(e){var t,n,r,o;return Zf().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:if(t=e.payload,n=t.entity,r=t.id,!n){i.next=11;break}return i.next=4,(0,Ff.Ys)(VM,n,r);case 4:if(null!=i.sent){i.next=11;break}return i.next=8,(0,Ff.RE)(uh.Z.fetchDisplay,n,r,"tooltip",!0);case 8:return o=i.sent,i.next=11,(0,Ff.gz)(NM(n,r,o));case 11:case"end":return i.stop()}}),zM)}var qM="formData/UPLOAD_DOCUMENT",GM="formData/SET_DOCUMENT",QM=a(54159);function XM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function KM(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?XM(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):XM(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var $M=function(e){var t=new FormData;t.append("file",e);var n={method:"POST",body:t};return QM.Z.executeRequest("upload",n).then(QM.Z.extractBody)},JM=function(e,t){var n=xm()(e,["id","fileName"]),r=e.contentType;return KM(KM({},n),{},{binaryLink:t.preview,thumbnailLink:r.startsWith("image")?t.preview:null})};function eN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function tN(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?eN(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eN(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var nN=Zf().mark(iN),rN=Zf().mark(aN),oN=Zf().mark(cN);function iN(){return Zf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Ff.$6)([(0,Ff.ib)(qM,aN),(0,Ff.ib)(GM,cN)]);case 2:case"end":return e.stop()}}),nN)}function aN(e){var t,n,r,o,i,a;return Zf().wrap((function(c){for(;;)switch(c.prev=c.next){case 0:return t=e.payload,n=t.formName,r=t.file,o=t.field,c.prev=2,c.next=5,(0,Ff.RE)($M,r);case 5:if(!(i=c.sent).success){c.next=14;break}return c.next=9,(0,Ff.RE)(JM,i,r);case 9:return a=c.sent,c.next=12,(0,Ff.gz)(UA.change(n,YI.transformFieldName(o),a));case 12:c.next=15;break;case 14:throw new Error("upload not successful: ".concat(JSON.stringify(i)));case 15:c.next=23;break;case 17:return c.prev=17,c.t0=c.catch(2),c.next=21,(0,Ff.gz)(UA.change(n,o,{id:null,timestamp:Date.now()}));case 21:return c.next=23,(0,Ff.gz)(p.Z.logError("client.component.form.uploadFailedTitle","client.component.form.uploadFailedMessage",c.t0));case 23:case"end":return c.stop()}}),rN,null,[[2,17]])}function cN(e){var t,n,r,o,i,a;return Zf().wrap((function(c){for(;;)switch(c.prev=c.next){case 0:return t=e.payload,n=t.formName,r=t.field,o=t.resourceId,c.next=4,(0,Ff.RE)(uh.Z.fetchEntity,"Resource",o,{paths:["relContent.data"]});case 4:return i=c.sent,a=tN(tN({},i.paths.relContent.value.paths.data.value),{},{resourceKey:o}),c.next=8,(0,Ff.gz)(UA.change(n,YI.transformFieldName(r),a));case 8:case"end":return c.stop()}}),oN)}var sN=Zf().mark(dN),uN=Zf().mark(fN),lN=Zf().mark(pN);function dN(){return Zf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Ff.$6)([(0,Ff.ib)(wy,fN),(0,Ff.ib)(Ay,pN)]);case 2:case"end":return e.stop()}}),sN)}function fN(e){var t,n,r,o;return Zf().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return t=e.payload,n=t.formName,r=t.fieldName,o=t.value,i.next=3,(0,Ff.gz)(UA.change(n,YI.transformFieldName(r),o));case 3:case"end":return i.stop()}}),uN)}function pN(e){var t,n,r;return Zf().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return t=e.payload,n=t.formName,r=t.fieldName,o.next=3,(0,Ff.gz)(UA.touch(n,YI.transformFieldName(r)));case 3:case"end":return o.stop()}}),lN)}l().shape({relationEntities:l().objectOf(l().array)});function hN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function mN(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?hN(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hN(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var gN={loadRelationEntities:function(e,t,n){return{type:Fb,payload:{fieldName:e,entityName:t,options:n}}},loadTooltip:function(e,t){return{type:IM,payload:{entity:e,id:t}}},openAdvancedSearch:function(e,t,n,r){return{type:Ey,payload:{formName:e,formField:t,searchTerm:n,value:r}}},openDocsTreeSearch:function(e,t,n){return{type:Oy,payload:{formName:e,formField:t,value:n}}},uploadDocument:function(e,t,n){return{type:qM,payload:{formName:e,file:n,field:t}}},setDocument:function(e,t,n){return{type:GM,payload:{formName:e,field:t,resourceId:n}}},changeFieldValue:xy,touchField:function(e,t){return{type:Ay,payload:{formName:e,fieldName:t}}},loadSearchFilters:function(e,t){return{type:yM,payload:{entity:e,group:t}}},loadLocationsSuggestions:function(e,t,n,r){return{type:ub,payload:{field:e,searchInput:t,countryValue:n,fieldCountries:r}}},openRemoteCreate:function(e,t,n){return{type:uM,payload:{formField:e,formName:t,value:n}}}},vN=(0,_.connect)((function(e,t){var n,r=t.formValues,o=t.tooltips,i=t.locations,a=t.relationEntities,c=t.searchFilters,s=t.navigationStrategy,u=function(e){return(0,e.formData.config.configSelector)(e)}(e);return mN(mN(mN(mN(mN(mN(mN(mN({},a?{relationEntities:xm()(e.formData.relationEntities.data,a)}:{}),o?{tooltips:xm()(null===(n=e.formData.tooltips)||void 0===n?void 0:n.data,o)}:{}),c?{searchFilters:xm()(e.formData.searchFilters,c)}:{}),i?{locations:xm()(e.formData.locations,i)}:{}),r&&e.form[r.formName]?{formValues:xm()(e.form[r.formName].values,r.fields)}:{}),s&&u.navigationStrategy?{navigationStrategy:u.navigationStrategy}:{}),u.chooseDocument?{chooseDocument:u.chooseDocument}:{}),{},{entityModel:nf()(e,"entityDetail.entityModel")})}),gN,null,{areStatePropsEqual:Dp()})((0,P.ZP)((function(e){return(0,S.jsx)(I().Fragment,{children:I().cloneElement(e.children,{formData:e})})})));const yN={addToStore:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){return{}};jf.Z.injectReducers(e,{formData:(0,by.UY)({relationEntities:Gb,tooltips:HM,searchFilters:CM,locations:yb,config:cb})}),e.sagaMiddleware.run(JI),e.sagaMiddleware.run(WM),e.sagaMiddleware.run(Ky,t),e.sagaMiddleware.run(dN),e.sagaMiddleware.run(iN),e.sagaMiddleware.run(jM),e.sagaMiddleware.run(Nb),e.sagaMiddleware.run(gM,t),e.dispatch(ob(t));var n=e.getState(),r=nf()(t(n),"initialData.relationEntities",null);null!==r&&Object.keys(r).forEach((function(t){e.dispatch(zb(t,r[t],!1,void 0))}))},FormDataContainer:vN};var bN,wN="formData/LOAD_REPORTS",AN="formData/SET_REPORTS",xN="formData/SET_REPORT_ICONS",EN=function(e){return{type:AN,payload:{reports:e}}},ON=function(e){return{type:xN,payload:{reportIcons:e}}},CN=(bN={},L()(bN,AN,jf.Z.singleTransferReducer("reports")),L()(bN,xN,jf.Z.singleTransferReducer("reportIcons")),bN),kN={reports:null,reportIcons:null};function SN(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:kN,t=arguments.length>1?arguments[1]:void 0,n=CN[t.type];return n?n(e,t):e}var DN=Zf().mark(IN),PN=Zf().mark(MN),_N=Zf().mark(NN),jN=Zf().mark(BN),TN=Zf().mark(ZN),RN=function(e){return e.reports};function IN(){return Zf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Ff.$6)([(0,Ff.Fm)(wN,MN)]);case 2:case"end":return e.stop()}}),DN)}function MN(e){var t,n,r,o,i,a,c,s;return Zf().wrap((function(u){for(;;)switch(u.prev=u.next){case 0:if(t=e.payload,n=t.reportIds,r=t.entityName,o=t.scope,0!==n.length){u.next=5;break}return u.next=4,(0,Ff.gz)(EN([]));case 4:return u.abrupt("return");case 5:return i=FN(n,r,o),a={where:i,paths:"unique_id,label,ignore_selection,relOutput_template.relReport_file_format.unique_id"},u.next=9,(0,Ff.RE)(uh.Z.fetchEntities,"Report",a,{method:"GET"});case 9:return c=u.sent,u.next=12,(0,Ff.$6)(c.map((function(e){return Lm.getFlattenEntity(e)})).map((function(e){return(0,Ff.RE)(NN,e)})));case 12:return s=u.sent,u.next=15,(0,Ff.gz)(EN(s));case 15:case"end":return u.stop()}}),PN)}function NN(e){return Zf().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.t0=e.ignore_selection?null:100,t.t1=e.unique_id,t.t2=e.label,t.t3=e.unique_id,t.t4=!e.ignore_selection,t.next=7,(0,Ff.RE)(BN,e);case 7:return t.t5=t.sent,t.abrupt("return",{actionType:"report",componentType:"report",confirmationThreshold:t.t0,id:t.t1,label:t.t2,reportId:t.t3,showConfirmation:t.t4,icon:t.t5});case 9:case"end":return t.stop()}}),_N)}function BN(e){var t,n;return Zf().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,(0,Ff.RE)(ZN);case 2:return t=r.sent,n=e["relOutput_template.relReport_file_format.unique_id"],r.abrupt("return",t[n]);case 5:case"end":return r.stop()}}),jN)}function ZN(){var e,t,n,r;return Zf().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,(0,Ff.Ys)(RN);case 2:if(e=o.sent,t=e.reportIcons){o.next=14;break}return o.next=7,(0,Ff.RE)(uh.Z.requestSaga,"/client/report-icons",{method:"GET"});case 7:return n=o.sent,r=n.body,o.next=11,(0,Ff.gz)(ON(r));case 11:return o.abrupt("return",r);case 14:return o.abrupt("return",t);case 15:case"end":return o.stop()}}),TN)}var FN=function(e,t,n){var r=[];return r.push("IN (unique_id,".concat(e.map((function(e){return'"'.concat(e,'"')})).join(","),")")),t&&n?r.push('exists (\n relReport_placement where entity_model == "'.concat(t,'"\n and relReport_location.unique_id == "').concat(n,'"\n )')):t?r.push('exists (relReport_placement where entity_model == "'.concat(t,'")')):n&&r.push('exists (relReport_placement where relReport_location.unique_id == "'.concat(n,'")')),r.join(" and ")};const LN=function(e){jf.Z.injectReducers(e,{reports:SN}),e.sagaMiddleware.run(IN)},HN=function(e,t,n){return{type:wN,payload:{reportIds:e,entityName:t,scope:n}}},UN=AN;var zN=a(82492),WN=a.n(zN),VN=a(66604),YN=a.n(VN),qN=a(8679),GN=a.n(qN),QN=a(66141),XN=a.n(QN);const KN=function(e,t,n,r){t(r);var o=e();if(!XN()(o))throw new Error("asyncValidate function passed to reduxForm must return a promise");var i=function(e){return function(t){if(e){if(t&&Object.keys(t).length)return n(t),t;throw n(),new Error("Asynchronous validation promise was rejected without errors.")}return n(),Promise.resolve()}};return o.then(i(!1),i(!0))};const $N=function(e){var t=e.initialized,n=e.trigger,r=e.pristine;if(!e.syncValidationPasses)return!1;switch(n){case"blur":case"change":return!0;case"submit":return!r||!t;default:return!1}};const JN=function(e){var t=e.values,n=e.nextProps,r=e.initialRender,o=e.lastFieldValidatorKeys,i=e.fieldValidatorKeys,a=e.structure;return!!r||(!a.deepEqual(t,n&&n.values)||!a.deepEqual(o,i))};const eB=function(e){var t=e.values,n=e.nextProps,r=e.initialRender,o=e.lastFieldValidatorKeys,i=e.fieldValidatorKeys,a=e.structure;return!!r||(!a.deepEqual(t,n&&n.values)||!a.deepEqual(o,i))};const tB=function(e){var t=e.values,n=e.nextProps,r=e.initialRender,o=e.lastFieldValidatorKeys,i=e.fieldValidatorKeys,a=e.structure;return!!r||(!a.deepEqual(t,n&&n.values)||!a.deepEqual(o,i))};const nB=function(e){var t=Wx(e);return t&&e.preventDefault(),t};const rB=function(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return nB(t)?e.apply(void 0,r):e.apply(void 0,[t].concat(r))}};var oB=function(e,t,n,r,o){for(var i=function(e){return Array.isArray(e)?e:[e]}(r),a=0;a<i.length;a++){var c=i[a](e,t,n,o);if(c)return c}};function iB(e,t){var n=t.getIn;return function(t,r){var o={};return Object.keys(e).forEach((function(i){var a=n(t,i),c=oB(a,t,r,e[i],i);c&&(o=ox.setIn(o,i,c))})),o}}var aB=function(e,t,n){var r,o=n.dispatch,i=n.submitAsSideEffect,a=n.onSubmitFail,c=n.onSubmitSuccess,s=n.startSubmit,u=n.stopSubmit,l=n.setSubmitFailed,d=n.setSubmitSucceeded,f=n.values;try{r=e(f,o,n)}catch(e){var p=nw(e)?e.errors:void 0;if(u(p),l.apply(void 0,t),a&&a(p,o,e,n),p||a)return p;throw e}if(i)r&&o(r);else{if(XN()(r))return s(),r.then((function(e){return u(),d(),c&&c(e,o,n),e}),(function(e){var r=nw(e)?e.errors:void 0;if(u(r),l.apply(void 0,t),a&&a(r,o,e,n),r||a)return r;throw e}));d(),c&&c(r,o,n)}return r};const cB=function(e,t,n,r,o){var i=t.dispatch,a=t.onSubmitFail,c=t.setSubmitFailed,s=t.syncErrors,u=t.asyncErrors,l=t.touch,d=t.persistentSubmitErrors;if(l.apply(void 0,o),n||d){var f=r&&r();return f?f.then((function(n){if(n)throw n;return aB(e,o,t)})).catch((function(e){return c.apply(void 0,o),a&&a(e,i,null,t),Promise.reject(e)})):aB(e,o,t)}c.apply(void 0,o);var p=function(e){var t=e.asyncErrors,n=e.syncErrors;return t&&"function"==typeof t.merge?t.merge(n).toJS():oA()({},t,{},n)}({asyncErrors:u,syncErrors:s});return a&&a(p,i,null,t),p};function sB(e){var t=e.getIn;return function(e,n,r,o){return!!(n||r||o)&&function(e,t){switch(t){case"Field":return[e,e+"._error"];case"FieldArray":return[e+"._error"];default:throw new Error("Unknown field type")}}(t(e,"name"),t(e,"type")).some((function(e){return t(n,e)||t(r,e)||t(o,e)}))}}function uB(e){var t=e.getIn,n=e.keys,r=sB(e);return function(e,o,i){return void 0===i&&(i=!1),function(a){var c=o||function(e){return t(e,"form")},s=c(a);if(t(s,e+".syncError"))return!1;if(!i&&t(s,e+".error"))return!1;var u=t(s,e+".syncErrors"),l=t(s,e+".asyncErrors"),d=i?void 0:t(s,e+".submitErrors");if(!u&&!l&&!d)return!0;var f=t(s,e+".registeredFields");return!f||!n(f).filter((function(e){return t(f,"['"+e+"'].count")>0})).some((function(e){return r(t(f,"['"+e+"']"),u,l,d)}))}}}const lB=function(e){return e.displayName||e.name||"Component"};var dB=a(65078),fB=UA.arrayInsert,pB=UA.arrayMove,hB=UA.arrayPop,mB=UA.arrayPush,gB=UA.arrayRemove,vB=UA.arrayRemoveAll,yB=UA.arrayShift,bB=UA.arraySplice,wB=UA.arraySwap,AB=UA.arrayUnshift,xB=UA.blur,EB=UA.change,OB=UA.focus,CB=Ux()(UA,["arrayInsert","arrayMove","arrayPop","arrayPush","arrayRemove","arrayRemoveAll","arrayShift","arraySplice","arraySwap","arrayUnshift","blur","change","focus"]),kB={arrayInsert:fB,arrayMove:pB,arrayPop:hB,arrayPush:mB,arrayRemove:gB,arrayRemoveAll:vB,arrayShift:yB,arraySplice:bB,arraySwap:wB,arrayUnshift:AB},SB=[].concat(Object.keys(UA),["array","asyncErrors","initialValues","syncErrors","syncWarnings","values","registeredFields"]),DB=function(e){if(!e||"function"!=typeof e)throw new Error("You must either pass handleSubmit() an onSubmit function or pass onSubmit as a prop");return e};const PB=function(e){var t=e.deepEqual,n=e.empty,r=e.getIn,o=e.setIn,i=e.keys,a=e.fromJS,c=e.toJS,s=uB(e);return function(u){var l=oA()({touchOnBlur:!0,touchOnChange:!1,persistentSubmitErrors:!1,destroyOnUnmount:!0,shouldAsyncValidate:$N,shouldValidate:JN,shouldError:eB,shouldWarn:tB,enableReinitialize:!1,keepDirtyOnReinitialize:!1,updateUnregisteredFields:!1,getFormState:function(e){return r(e,"form")},pure:!0,forceUnregisterOnUnmount:!1,submitAsSideEffect:!1},u);return function(u){var d=function(n){function a(){for(var a,s=arguments.length,u=new Array(s),l=0;l<s;l++)u[l]=arguments[l];return(a=n.call.apply(n,[this].concat(u))||this).wrapped=I().createRef(),a.destroyed=!1,a.fieldCounts={},a.fieldValidators={},a.lastFieldValidatorKeys=[],a.fieldWarners={},a.lastFieldWarnerKeys=[],a.innerOnSubmit=void 0,a.submitPromise=void 0,a.initIfNeeded=function(e){var n=a.props.enableReinitialize;if(e){if((n||!e.initialized)&&!t(a.props.initialValues,e.initialValues)){var r=e.initialized&&a.props.keepDirtyOnReinitialize;a.props.initialize(e.initialValues,r,{keepValues:e.keepValues,lastInitialValues:a.props.initialValues,updateUnregisteredFields:e.updateUnregisteredFields})}}else!a.props.initialValues||a.props.initialized&&!n||a.props.initialize(a.props.initialValues,a.props.keepDirtyOnReinitialize,{keepValues:a.props.keepValues,updateUnregisteredFields:a.props.updateUnregisteredFields})},a.updateSyncErrorsIfNeeded=function(e,t,n){var r=a.props,o=r.error,i=r.updateSyncErrors,c=!(n&&Object.keys(n).length||o),s=!(e&&Object.keys(e).length||t);c&&s||ox.deepEqual(n,e)&&ox.deepEqual(o,t)||i(e,t)},a.clearSubmitPromiseIfNeeded=function(e){var t=a.props.submitting;a.submitPromise&&t&&!e.submitting&&delete a.submitPromise},a.submitIfNeeded=function(e){var t=a.props,n=t.clearSubmit;!t.triggerSubmit&&e.triggerSubmit&&(n(),a.submit())},a.shouldErrorFunction=function(){var e=a.props,t=e.shouldValidate,n=e.shouldError;return t!==JN&&!(n!==eB)?t:n},a.validateIfNeeded=function(t){var n=a.props,r=n.validate,o=n.values,i=a.shouldErrorFunction(),c=a.generateValidator();if(r||c){var s=void 0===t,u=Object.keys(a.getValidators());if(i({values:o,nextProps:t,props:a.props,initialRender:s,lastFieldValidatorKeys:a.lastFieldValidatorKeys,fieldValidatorKeys:u,structure:e})){var l=s||!t?a.props:t,d=WN()(r&&r(l.values,l)||{},c&&c(l.values,l)||{}),f=d._error,p=Ux()(d,["_error"]);a.lastFieldValidatorKeys=u,a.updateSyncErrorsIfNeeded(p,f,l.syncErrors)}}else a.lastFieldValidatorKeys=[]},a.updateSyncWarningsIfNeeded=function(e,t,n){var r=a.props,o=r.warning,i=r.updateSyncWarnings,c=!(n&&Object.keys(n).length||o),s=!(e&&Object.keys(e).length||t);c&&s||ox.deepEqual(n,e)&&ox.deepEqual(o,t)||i(e,t)},a.shouldWarnFunction=function(){var e=a.props,t=e.shouldValidate,n=e.shouldWarn;return t!==JN&&!(n!==tB)?t:n},a.warnIfNeeded=function(t){var n=a.props,r=n.warn,o=n.values,i=a.shouldWarnFunction(),c=a.generateWarner();if(r||c){var s=void 0===t,u=Object.keys(a.getWarners());if(i({values:o,nextProps:t,props:a.props,initialRender:s,lastFieldValidatorKeys:a.lastFieldWarnerKeys,fieldValidatorKeys:u,structure:e})){var l=s||!t?a.props:t,d=WN()(r?r(l.values,l):{},c?c(l.values,l):{}),f=d._warning,p=Ux()(d,["_warning"]);a.lastFieldWarnerKeys=u,a.updateSyncWarningsIfNeeded(p,f,l.syncWarnings)}}},a.getValues=function(){return a.props.values},a.isValid=function(){return a.props.valid},a.isPristine=function(){return a.props.pristine},a.register=function(e,t,n,r){var o=(a.fieldCounts[e]||0)+1;a.fieldCounts[e]=o,a.props.registerField(e,t),n&&(a.fieldValidators[e]=n),r&&(a.fieldWarners[e]=r)},a.unregister=function(e){var t=a.fieldCounts[e];if(1===t?delete a.fieldCounts[e]:null!=t&&(a.fieldCounts[e]=t-1),!a.destroyed){var n=a.props,r=n.destroyOnUnmount,o=n.forceUnregisterOnUnmount,i=n.unregisterField;r||o?(i(e,r),a.fieldCounts[e]||(delete a.fieldValidators[e],delete a.fieldWarners[e],a.lastFieldValidatorKeys=a.lastFieldValidatorKeys.filter((function(t){return t!==e})))):i(e,!1)}},a.getFieldList=function(e){var t=a.props.registeredFields;if(!t)return[];var n=i(t);return e&&(e.excludeFieldArray&&(n=n.filter((function(e){return"FieldArray"!==r(t,"['"+e+"'].type")}))),e.excludeUnregistered&&(n=n.filter((function(e){return 0!==r(t,"['"+e+"'].count")})))),c(n)},a.getValidators=function(){var e={};return Object.keys(a.fieldValidators).forEach((function(t){var n=a.fieldValidators[t]();n&&(e[t]=n)})),e},a.generateValidator=function(){var t=a.getValidators();return Object.keys(t).length?iB(t,e):void 0},a.getWarners=function(){var e={};return Object.keys(a.fieldWarners).forEach((function(t){var n=a.fieldWarners[t]();n&&(e[t]=n)})),e},a.generateWarner=function(){var t=a.getWarners();return Object.keys(t).length?iB(t,e):void 0},a.asyncValidate=function(e,t,n){var i,c,s=a.props,u=s.asyncBlurFields,l=s.asyncChangeFields,d=s.asyncErrors,f=s.asyncValidate,p=s.dispatch,h=s.initialized,m=s.pristine,g=s.shouldAsyncValidate,v=s.startAsyncValidation,y=s.stopAsyncValidation,b=s.syncErrors,w=s.values,A=!e;if(f){var x=A?w:o(w,e,t),E=A||!r(b,e);if(i=u&&e&&~u.indexOf(e.replace(/\[[0-9]+]/g,"[]")),c=l&&e&&~l.indexOf(e.replace(/\[[0-9]+]/g,"[]")),(A||!u&&!l||("blur"===n?i:c))&&g({asyncErrors:d,initialized:h,trigger:A?"submit":n,blurredField:e,pristine:m,syncValidationPasses:E}))return KN((function(){return f(x,p,a.props,e)}),v,y,e)}},a.submitCompleted=function(e){return delete a.submitPromise,e},a.submitFailed=function(e){throw delete a.submitPromise,e},a.listenToSubmit=function(e){return XN()(e)?(a.submitPromise=e,e.then(a.submitCompleted,a.submitFailed)):e},a.submit=function(e){var t=a.props,n=t.onSubmit,r=t.blur,o=t.change,i=t.dispatch;return e&&!nB(e)?rB((function(){return!a.submitPromise&&a.listenToSubmit(cB(DB(e),oA()({},a.props,{},(0,by.DE)({blur:r,change:o},i)),a.props.validExceptSubmit,a.asyncValidate,a.getFieldList({excludeFieldArray:!0,excludeUnregistered:!0})))})):a.submitPromise?void 0:a.innerOnSubmit&&a.innerOnSubmit!==a.submit?a.innerOnSubmit():a.listenToSubmit(cB(DB(n),oA()({},a.props,{},(0,by.DE)({blur:r,change:o},i)),a.props.validExceptSubmit,a.asyncValidate,a.getFieldList({excludeFieldArray:!0,excludeUnregistered:!0})))},a.reset=function(){return a.props.reset()},a}Xb()(a,n);var s=a.prototype;return s.UNSAFE_componentWillMount=function(){(0,dB.Z)()||(this.initIfNeeded(),this.validateIfNeeded(),this.warnIfNeeded()),Lx()(this.props.shouldValidate,"shouldValidate() is deprecated and will be removed in v9.0.0. Use shouldWarn() or shouldError() instead.")},s.UNSAFE_componentWillReceiveProps=function(e){this.initIfNeeded(e),this.validateIfNeeded(e),this.warnIfNeeded(e),this.clearSubmitPromiseIfNeeded(e),this.submitIfNeeded(e);var n=e.onChange,r=e.values,o=e.dispatch;n&&!t(r,this.props.values)&&n(r,o,e,this.props.values)},s.shouldComponentUpdate=function(e){var n=this;if(!this.props.pure)return!0;var r=l.immutableProps,o=void 0===r?[]:r;return!!(this.props.children||e.children||Object.keys(e).some((function(r){return~o.indexOf(r)?n.props[r]!==e[r]:!~SB.indexOf(r)&&!t(n.props[r],e[r])})))},s.componentDidMount=function(){(0,dB.Z)()||(this.initIfNeeded(this.props),this.validateIfNeeded(),this.warnIfNeeded()),Lx()(this.props.shouldValidate,"shouldValidate() is deprecated and will be removed in v9.0.0. Use shouldWarn() or shouldError() instead.")},s.componentWillUnmount=function(){var e=this.props,t=e.destroyOnUnmount,n=e.destroy;t&&!(0,dB.Z)()&&(this.destroyed=!0,n())},s.render=function(){var e,t=this,n=this.props,o=n.anyTouched,i=n.array,a=(n.arrayInsert,n.arrayMove,n.arrayPop,n.arrayPush,n.arrayRemove,n.arrayRemoveAll,n.arrayShift,n.arraySplice,n.arraySwap,n.arrayUnshift,n.asyncErrors,n.asyncValidate,n.asyncValidating),c=n.blur,s=n.change,l=n.clearSubmit,d=n.destroy,f=(n.destroyOnUnmount,n.forceUnregisterOnUnmount,n.dirty),p=n.dispatch,h=(n.enableReinitialize,n.error),m=(n.focus,n.form),g=(n.getFormState,n.immutableProps,n.initialize),v=n.initialized,y=n.initialValues,b=n.invalid,w=(n.keepDirtyOnReinitialize,n.keepValues,n.updateUnregisteredFields,n.pristine),A=n.propNamespace,x=(n.registeredFields,n.registerField,n.reset),E=n.resetSection,O=(n.setSubmitFailed,n.setSubmitSucceeded,n.shouldAsyncValidate,n.shouldValidate,n.shouldError,n.shouldWarn,n.startAsyncValidation,n.startSubmit,n.stopAsyncValidation,n.stopSubmit,n.submitAsSideEffect),C=n.submitting,k=n.submitFailed,S=n.submitSucceeded,D=n.touch,P=(n.touchOnBlur,n.touchOnChange,n.persistentSubmitErrors,n.syncErrors,n.syncWarnings,n.unregisterField,n.untouch),_=(n.updateSyncErrors,n.updateSyncWarnings,n.valid),j=(n.validExceptSubmit,n.values,n.warning),T=Ux()(n,["anyTouched","array","arrayInsert","arrayMove","arrayPop","arrayPush","arrayRemove","arrayRemoveAll","arrayShift","arraySplice","arraySwap","arrayUnshift","asyncErrors","asyncValidate","asyncValidating","blur","change","clearSubmit","destroy","destroyOnUnmount","forceUnregisterOnUnmount","dirty","dispatch","enableReinitialize","error","focus","form","getFormState","immutableProps","initialize","initialized","initialValues","invalid","keepDirtyOnReinitialize","keepValues","updateUnregisteredFields","pristine","propNamespace","registeredFields","registerField","reset","resetSection","setSubmitFailed","setSubmitSucceeded","shouldAsyncValidate","shouldValidate","shouldError","shouldWarn","startAsyncValidation","startSubmit","stopAsyncValidation","stopSubmit","submitAsSideEffect","submitting","submitFailed","submitSucceeded","touch","touchOnBlur","touchOnChange","persistentSubmitErrors","syncErrors","syncWarnings","unregisterField","untouch","updateSyncErrors","updateSyncWarnings","valid","validExceptSubmit","values","warning"]),I=oA()({array:i,anyTouched:o,asyncValidate:this.asyncValidate,asyncValidating:a},(0,by.DE)({blur:c,change:s},p),{clearSubmit:l,destroy:d,dirty:f,dispatch:p,error:h,form:m,handleSubmit:this.submit,initialize:g,initialized:v,initialValues:y,invalid:b,pristine:w,reset:x,resetSection:E,submitting:C,submitAsSideEffect:O,submitFailed:k,submitSucceeded:S,touch:D,untouch:P,valid:_,warning:j}),M=oA()({},A?((e={})[A]=I,e):I,{},T);(function(e){return Boolean(e&&e.prototype&&"object"==typeof e.prototype.isReactComponent)})(u)&&(M.ref=this.wrapped);var N=oA()({},this.props,{getFormState:function(e){return r(t.props.getFormState(e),t.props.form)},asyncValidate:this.asyncValidate,getValues:this.getValues,sectionPrefix:void 0,register:this.register,unregister:this.unregister,registerInnerOnSubmit:function(e){return t.innerOnSubmit=e}});return(0,R.createElement)(cE.Provider,{value:N,children:(0,R.createElement)(u,M)})},a}(I().Component);d.displayName="Form("+lB(u)+")",d.WrappedComponent=u,d.propTypes={destroyOnUnmount:Zx().bool,forceUnregisterOnUnmount:Zx().bool,form:Zx().string.isRequired,immutableProps:Zx().arrayOf(Zx().string),initialValues:Zx().oneOfType([Zx().array,Zx().object]),getFormState:Zx().func,onSubmitFail:Zx().func,onSubmitSuccess:Zx().func,propNamespace:Zx().string,validate:Zx().func,warn:Zx().func,touchOnBlur:Zx().bool,touchOnChange:Zx().bool,triggerSubmit:Zx().bool,persistentSubmitErrors:Zx().bool,registeredFields:Zx().any};var f=(0,_.connect)((function(e,o){var i=o.form,a=o.getFormState,c=o.initialValues,u=o.enableReinitialize,l=o.keepDirtyOnReinitialize,d=r(a(e)||n,i)||n,f=r(d,"initial"),p=!!f,h=u&&p&&!t(c,f),m=h&&!l,g=c||f||n;h||(g=f||n);var v=r(d,"values")||g;m&&(v=g);var y=m||t(g,v),b=r(d,"asyncErrors"),w=r(d,"syncErrors")||ox.empty,A=r(d,"syncWarnings")||ox.empty,x=r(d,"registeredFields"),E=s(i,a,!1)(e),O=s(i,a,!0)(e),C=!!r(d,"anyTouched"),k=!!r(d,"submitting"),S=!!r(d,"submitFailed"),D=!!r(d,"submitSucceeded"),P=r(d,"error"),_=r(d,"warning"),j=r(d,"triggerSubmit");return{anyTouched:C,asyncErrors:b,asyncValidating:r(d,"asyncValidating")||!1,dirty:!y,error:P,initialized:p,invalid:!E,pristine:y,registeredFields:x,submitting:k,submitFailed:S,submitSucceeded:D,syncErrors:w,syncWarnings:A,triggerSubmit:j,values:v,valid:E,validExceptSubmit:O,warning:_}}),(function(e,t){var n=function(e){return e.bind(null,t.form)},r=YN()(CB,n),o=YN()(kB,n),i=n(OB),a=(0,by.DE)(r,e),c={insert:(0,by.DE)(o.arrayInsert,e),move:(0,by.DE)(o.arrayMove,e),pop:(0,by.DE)(o.arrayPop,e),push:(0,by.DE)(o.arrayPush,e),remove:(0,by.DE)(o.arrayRemove,e),removeAll:(0,by.DE)(o.arrayRemoveAll,e),shift:(0,by.DE)(o.arrayShift,e),splice:(0,by.DE)(o.arraySplice,e),swap:(0,by.DE)(o.arraySwap,e),unshift:(0,by.DE)(o.arrayUnshift,e)};return oA()({},a,{},o,{blur:function(e,n){return xB(t.form,e,n,!!t.touchOnBlur)},change:function(e,n){return EB(t.form,e,n,!!t.touchOnChange,!!t.persistentSubmitErrors)},array:c,focus:i,dispatch:e})}),void 0,{forwardRef:!0}),p=GN()(f(d),u);p.defaultProps=l;var h=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).ref=I().createRef(),t}Xb()(t,e);var r=t.prototype;return r.submit=function(){return this.ref.current&&this.ref.current.submit()},r.reset=function(){this.ref&&this.ref.current.reset()},r.render=function(){var e=this.props,t=e.initialValues,n=Ux()(e,["initialValues"]);return(0,R.createElement)(p,oA()({},n,{ref:this.ref,initialValues:a(t)}))},Nx()(t,[{key:"valid",get:function(){return!(!this.ref.current||!this.ref.current.isValid())}},{key:"invalid",get:function(){return!this.valid}},{key:"pristine",get:function(){return!(!this.ref.current||!this.ref.current.isPristine())}},{key:"dirty",get:function(){return!this.pristine}},{key:"values",get:function(){return this.ref.current?this.ref.current.getValues():n}},{key:"fieldList",get:function(){return this.ref.current?this.ref.current.getFieldList():[]}},{key:"wrappedInstance",get:function(){return this.ref.current&&this.ref.current.wrapped.current}}]),t}(I().Component),m=GN()(uE(h),u);return m.defaultProps=l,m}}}(ox);var _B,jB=b.ZP.div.withConfig({displayName:"StyledButtonsWrapper"})(_B||(_B=Ld()(["\n position: sticky;\n bottom: 0;\n display: flex;\n justify-content: flex-end;\n background-color: ",";\n z-index: 2; // higher than StyledIndicatorsContainerWrapper\n\n "," {\n margin-right: 0;\n }\n"])),Jm.Z.color("paper"),gd.Z);const TB=PB({form:"simpleForm",destroyOnUnmount:!1})((function(e){var t=e.initializeForm,n=e.intl,r=e.onCancel,o=e.onSubmit,i=e.handleSubmit,a=e.form,c=e.formDefinition,s=e.formValues,u=e.mappingType,l=e.mode,d=e.noButtons,f=e.submitting,p=e.submitText,h=e.cancelText,m=e.beforeRenderField,g=function(e){return n.formatMessage({id:e})},v=(0,R.useRef)(null);return H.Z.useAutofocus(v,{selectFulltextFields:!0},[c]),(0,R.useEffect)((function(){t()}),[t]),(0,S.jsxs)("form",{onSubmit:i((function(){return(e=400,new Promise((function(t){return setTimeout(t,e)}))).then((function(){return o()}));var e})),ref:v,children:[(0,S.jsx)(YI.FormBuilder,{entity:void 0,formName:a,formDefinition:c,formValues:s,fieldMappingType:u||"editable",mode:l,beforeRenderField:m}),!d&&(0,S.jsxs)(jB,{children:[(0,S.jsx)(pd.Z,{disabled:f,ink:"primary",label:p||g("client.simple-form.defaultOk"),pending:f,type:"submit"}),(0,S.jsx)(pd.Z,{disabled:f,label:h||g("client.simple-form.defaultCancel"),onClick:function(){return r()}})]})]})})),RB=TB;var IB="simpleForm/INITIALIZE_QUESTION_FORM",MB="simpleForm/SET_FIELD_DEFINITIONS",NB="simpleForm/SUBMIT",BB="simpleForm/CANCEL",ZB={initializeForm:function(){return{type:IB,payload:{}}},onSubmit:function(){return{type:NB}},onCancel:function(){return{type:BB}}};const FB=(0,_.connect)((function(e,t){return{noButtons:e.input.noButtons,title:e.input.title,description:e.input.description,submitText:e.input.submitText,cancelText:e.input.cancelText,formDefinition:e.input.form,beforeRenderField:e.input.beforeRenderField,formValues:ix("simpleForm")(e),validate:!1!==e.input.validate?YI.syncValidation(e.simpleForm.fieldDefinitions,e.input.form):function(){},listApp:e.input.listApp,mappingType:e.input.mappingType,mode:e.input.mode}}),ZB)((0,P.ZP)(RB));var LB=a(23560),HB=a.n(LB);const UB=function(e){var t=function(e){return function(t,n){return void 0!==e.getIn(t,n)}},n=e.deepEqual,r=e.empty,o=e.getIn,i=e.deleteIn,a=e.setIn;return function(c){void 0===c&&(c=t);return function t(s,u){if("]"===u[u.length-1]){var l=VA()(u);return l.pop(),o(s,l.join("."))?a(s,u):s}var d=s;c(e)(s,u)&&(d=i(s,u));var f=u.lastIndexOf(".");if(f>0){var p=u.substring(0,f);if("]"!==p[p.length-1]){var h=o(d,p);if(n(h,r))return t(d,p)}}return d}}};var zB=function(e){var t=e.getIn;return function(e,n){var r=null;/^values/.test(n)&&(r=n.replace("values","initial"));var o=!r||void 0===t(e,r);return void 0!==t(e,n)&&o}};const WB=function(e){var t,n=e.deepEqual,r=e.empty,o=e.forEach,i=e.getIn,a=e.setIn,c=e.deleteIn,s=e.fromJS,u=e.keys,l=e.size,d=e.some,f=e.splice,p=UB(e)(zB),h=UB(ox)(zB),m=function(e,t,n,r,o,c,s){var u=i(e,t+"."+n);return u||s?a(e,t+"."+n,f(u,r,o,c)):e},g=function(e,t,n,r,o,c,s){var u=i(e,t),l=ox.getIn(u,n);return l||s?a(e,t,ox.setIn(u,n,ox.splice(l,r,o,c))):e},v=["values","fields","submitErrors","asyncErrors"],y=function(e,t,n,o,i){var a=e,c=null!=i?r:void 0;return a=m(a,"values",t,n,o,i,!0),a=m(a,"fields",t,n,o,c),a=g(a,"syncErrors",t,n,o,void 0),a=g(a,"syncWarnings",t,n,o,void 0),a=m(a,"submitErrors",t,n,o,void 0),a=m(a,"asyncErrors",t,n,o,void 0)},b=((t={})[aA]=function(e,t){var n=t.meta,r=n.field,o=n.index,i=t.payload;return y(e,r,o,0,i)},t[cA]=function(e,t){var n=t.meta,r=n.field,o=n.from,c=n.to,s=i(e,"values."+r),u=s?l(s):0,d=e;return u&&v.forEach((function(e){var t=e+"."+r;if(i(d,t)){var n=i(d,t+"["+o+"]");d=a(d,t,f(i(d,t),o,1)),d=a(d,t,f(i(d,t),c,0,n))}})),d},t[sA]=function(e,t){var n=t.meta.field,r=i(e,"values."+n),o=r?l(r):0;return o?y(e,n,o-1,1):e},t[uA]=function(e,t){var n=t.meta.field,r=t.payload,o=i(e,"values."+n),a=o?l(o):0;return y(e,n,a,0,r)},t[lA]=function(e,t){var n=t.meta,r=n.field,o=n.index;return y(e,r,o,1)},t[dA]=function(e,t){var n=t.meta.field,r=i(e,"values."+n),o=r?l(r):0;return o?y(e,n,0,o):e},t[fA]=function(e,t){var n=t.meta.field;return y(e,n,0,1)},t[pA]=function(e,t){var n=t.meta,r=n.field,o=n.index,i=n.removeNum,a=t.payload;return y(e,r,o,i,a)},t[mA]=function(e,t){var n=t.meta,r=n.field,o=n.indexA,c=n.indexB,s=e;return v.forEach((function(e){var t=i(s,e+"."+r+"["+o+"]"),n=i(s,e+"."+r+"["+c+"]");void 0===t&&void 0===n||(s=a(s,e+"."+r+"["+o+"]",n),s=a(s,e+"."+r+"["+c+"]",t))})),s},t[hA]=function(e,t){var n=t.meta.field,r=t.payload;return y(e,n,0,0,r)},t[gA]=function(e,t){var n=t.meta.field,r=t.payload,o=e;return o=p(o,"asyncErrors."+n),o=p(o,"submitErrors."+n),o=a(o,"fields."+n+".autofilled",!0),o=a(o,"values."+n,r)},t[vA]=function(e,t){var n=t.meta,r=n.field,o=n.touch,s=t.payload,u=e;return void 0===i(u,"initial."+r)&&""===s?u=p(u,"values."+r):void 0!==s&&(u=a(u,"values."+r,s)),r===i(u,"active")&&(u=c(u,"active")),u=c(u,"fields."+r+".active"),o&&(u=a(u,"fields."+r+".touched",!0),u=a(u,"anyTouched",!0)),u},t[yA]=function(e,t){var n=t.meta,r=n.field,o=n.touch,c=n.persistentSubmitErrors,s=t.payload,u=e;if(void 0===i(u,"initial."+r)&&""===s||void 0===s)u=p(u,"values."+r);else if(HB()(s)){var l=i(e,"values."+r);u=a(u,"values."+r,s(l,e.values))}else u=a(u,"values."+r,s);return u=p(u,"asyncErrors."+r),c||(u=p(u,"submitErrors."+r)),u=p(u,"fields."+r+".autofilled"),o&&(u=a(u,"fields."+r+".touched",!0),u=a(u,"anyTouched",!0)),u},t[wA]=function(e){return c(e,"triggerSubmit")},t[AA]=function(e){var t=e;return t=p(t,"submitErrors"),t=c(t,"error")},t[xA]=function(e,t){var n=t.meta.field;return c(e,"asyncErrors."+n)},t[bA]=function(e,t){var n=t.meta,r=n.keepTouched,o=n.persistentSubmitErrors,s=n.fields,l=e;s.forEach((function(t){l=p(l,"asyncErrors."+t),o||(l=p(l,"submitErrors."+t)),l=p(l,"fields."+t+".autofilled"),r||(l=c(l,"fields."+t+".touched"));var n=i(e,"initial."+t);l=n?a(l,"values."+t,n):p(l,"values."+t)}));var f=d(u(i(l,"registeredFields")),(function(e){return i(l,"fields."+e+".touched")}));return l=f?a(l,"anyTouched",!0):c(l,"anyTouched")},t[OA]=function(e,t){var n=t.meta.field,r=e,o=i(e,"active");return r=c(r,"fields."+o+".active"),r=a(r,"fields."+n+".visited",!0),r=a(r,"fields."+n+".active",!0),r=a(r,"active",n)},t[CA]=function(e,t){var c=t.payload,l=t.meta,d=l.keepDirty,f=l.keepSubmitSucceeded,p=l.updateUnregisteredFields,h=l.keepValues,m=s(c),g=r,v=i(e,"warning");v&&(g=a(g,"warning",v));var y=i(e,"syncWarnings");y&&(g=a(g,"syncWarnings",y));var b=i(e,"error");b&&(g=a(g,"error",b));var w=i(e,"syncErrors");w&&(g=a(g,"syncErrors",w));var A=i(e,"registeredFields");A&&(g=a(g,"registeredFields",A));var x=i(e,"values"),E=i(e,"initial"),O=m,C=x;if(d&&A){if(!n(O,E)){var k=function(e){var t=i(E,e),r=i(x,e);if(n(r,t)){var o=i(O,e);i(C,e)!==o&&(C=a(C,e,o))}};p||o(u(A),(function(e){return k(e)})),o(u(O),(function(e){if(void 0===i(E,e)){var t=i(O,e);C=a(C,e,t)}p&&k(e)}))}}else C=O;return h&&(o(u(x),(function(e){var t=i(x,e);C=a(C,e,t)})),o(u(E),(function(e){var t=i(E,e);O=a(O,e,t)}))),f&&i(e,"submitSucceeded")&&(g=a(g,"submitSucceeded",!0)),g=a(g,"values",C),g=a(g,"initial",O)},t[kA]=function(e,t){var n=t.payload,r=n.name,o=n.type,c="registeredFields['"+r+"']",u=i(e,c);if(u){var l=i(u,"count")+1;u=a(u,"count",l)}else u=s({name:r,type:o,count:1});return a(e,c,u)},t[SA]=function(e){var t=r,n=i(e,"registeredFields");n&&(t=a(t,"registeredFields",n));var o=i(e,"initial");return o&&(t=a(t,"values",o),t=a(t,"initial",o)),t},t[DA]=function(e,t){var n=t.meta.sections,r=e;n.forEach((function(t){r=p(r,"asyncErrors."+t),r=p(r,"submitErrors."+t),r=p(r,"fields."+t);var n=i(e,"initial."+t);r=n?a(r,"values."+t,n):p(r,"values."+t)}));var o=d(u(i(r,"registeredFields")),(function(e){return i(r,"fields."+e+".touched")}));return r=o?a(r,"anyTouched",!0):c(r,"anyTouched")},t[MA]=function(e){return a(e,"triggerSubmit",!0)},t[jA]=function(e,t){var n=t.meta.field;return a(e,"asyncValidating",n||!0)},t[TA]=function(e){return a(e,"submitting",!0)},t[RA]=function(e,t){var n=t.payload,r=e;if(r=c(r,"asyncValidating"),n&&Object.keys(n).length){var o=n._error,i=Ux()(n,["_error"]);o&&(r=a(r,"error",o)),Object.keys(i).length&&(r=a(r,"asyncErrors",s(i)))}else r=c(r,"error"),r=c(r,"asyncErrors");return r},t[IA]=function(e,t){var n=t.payload,r=e;if(r=c(r,"submitting"),r=c(r,"submitFailed"),r=c(r,"submitSucceeded"),n&&Object.keys(n).length){var o=n._error,i=Ux()(n,["_error"]);r=o?a(r,"error",o):c(r,"error"),r=Object.keys(i).length?a(r,"submitErrors",s(i)):c(r,"submitErrors"),r=a(r,"submitFailed",!0)}else r=c(r,"error"),r=c(r,"submitErrors");return r},t[PA]=function(e,t){var n=t.meta.fields,r=e;return r=a(r,"submitFailed",!0),r=c(r,"submitSucceeded"),r=c(r,"submitting"),n.forEach((function(e){return r=a(r,"fields."+e+".touched",!0)})),n.length&&(r=a(r,"anyTouched",!0)),r},t[_A]=function(e){var t=e;return t=c(t,"submitFailed"),t=a(t,"submitSucceeded",!0)},t[NA]=function(e,t){var n=t.meta.fields,r=e;return n.forEach((function(e){return r=a(r,"fields."+e+".touched",!0)})),r=a(r,"anyTouched",!0)},t[BA]=function(e,t){var o=t.payload,s=o.name,u=o.destroyOnUnmount,l=e,d="registeredFields['"+s+"']",f=i(l,d);if(!f)return l;var m=i(f,"count")-1;if(m<=0&&u){l=c(l,d),n(i(l,"registeredFields"),r)&&(l=c(l,"registeredFields"));var g=i(l,"syncErrors");g&&(g=h(g,s),l=ox.deepEqual(g,ox.empty)?c(l,"syncErrors"):a(l,"syncErrors",g));var v=i(l,"syncWarnings");v&&(v=h(v,s),l=ox.deepEqual(v,ox.empty)?c(l,"syncWarnings"):a(l,"syncWarnings",v)),l=p(l,"submitErrors."+s),l=p(l,"asyncErrors."+s)}else f=a(f,"count",m),l=a(l,d,f);return l},t[ZA]=function(e,t){var n=t.meta.fields,r=e;n.forEach((function(e){return r=c(r,"fields."+e+".touched")}));var o=d(u(i(r,"registeredFields")),(function(e){return i(r,"fields."+e+".touched")}));return r=o?a(r,"anyTouched",!0):c(r,"anyTouched")},t[FA]=function(e,t){var n=t.payload,r=n.syncErrors,o=n.error,i=e;return o?(i=a(i,"error",o),i=a(i,"syncError",!0)):(i=c(i,"error"),i=c(i,"syncError")),i=Object.keys(r).length?a(i,"syncErrors",r):c(i,"syncErrors")},t[LA]=function(e,t){var n=t.payload,r=n.syncWarnings,o=n.warning,i=e;return i=o?a(i,"warning",o):c(i,"warning"),i=Object.keys(r).length?a(i,"syncWarnings",r):c(i,"syncWarnings")},t);return function e(t){return t.plugin=function(t,n){var o=this;return void 0===n&&(n={}),e((function(e,c){void 0===e&&(e=r),void 0===c&&(c={type:"NONE"});var s=function(n,r){var o=i(n,r),s=t[r](o,c,i(e,r));return s!==o?a(n,r,s):n},u=o(e,c),l=c&&c.meta&&c.meta.form;return l&&!n.receiveAllFormActions?t[l]?s(u,l):u:Object.keys(t).reduce(s,u)}))},t}(function(e){return function(t,n){void 0===t&&(t=r),void 0===n&&(n={type:"NONE"});var o=n&&n.meta&&n.meta.form;if(!o||!function(e){return e&&e.type&&e.type.length>iA.length&&e.type.substring(0,iA.length)===iA}(n))return t;if(n.type===EA&&n.meta&&n.meta.form)return n.meta.form.reduce((function(e,t){return p(e,t)}),t);var c=i(t,o),s=e(c,n);return s===c?t:a(t,o,s)}}((function(e,t){void 0===e&&(e=r);var n=b[t.type];return n?n(e,t):e})))},VB=WB(ox);var YB=L()({},MB,jf.Z.singleTransferReducer("fieldDefinitions")),qB={fieldDefinitions:null};const GB=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:qB,t=arguments.length>1?arguments[1]:void 0,n=YB[t.type];return n?n(e,t):e},QB=uB(ox);function XB(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function KB(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?XB(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):XB(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var $B=Zf().mark(aZ),JB=Zf().mark(cZ),eZ=Zf().mark(sZ),tZ=Zf().mark(uZ),nZ=Zf().mark(lZ),rZ=Zf().mark(dZ),oZ="simpleForm",iZ=function(e){return e.input};function aZ(){return Zf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Ff.$6)([(0,Ff.ib)(IB,cZ),(0,Ff.ib)(NB,sZ),(0,Ff.ib)(BB,uZ),(0,Ff.Fm)(yA,lZ),(0,Ff.Fm)(FA,lZ),(0,Ff.Fm)(CA,lZ)]);case 2:case"end":return e.stop()}}),$B)}function cZ(){var e,t,n,r,o;return Zf().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,(0,Ff.Ys)(iZ);case 2:return e=i.sent,t=e.form,n=e.defaultValues,i.next=7,(0,Ff.RE)(YI.getFieldDefinitions,t);case 7:return r=i.sent,i.next=10,(0,Ff.RE)(YI.getDefaultValues,r);case 10:return o=i.sent,i.next=13,(0,Ff.gz)(UA.initialize(oZ,KB(KB({},o),n)));case 13:case"end":return i.stop()}}),JB)}function sZ(){var e;return Zf().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,dZ();case 2:return e=t.sent,t.next=5,(0,Ff.gz)(h.Z.fireExternalEvent("onSubmit",{values:e}));case 5:case"end":return t.stop()}}),eZ)}function uZ(){var e;return Zf().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,dZ();case 2:return e=t.sent,t.next=5,(0,Ff.gz)(h.Z.fireExternalEvent("onCancel",{values:e}));case 5:case"end":return t.stop()}}),tZ)}function lZ(){var e,t;return Zf().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,dZ();case 2:return e=n.sent,n.next=5,(0,Ff.Ys)(QB(oZ));case 5:return t=n.sent,n.next=8,(0,Ff.gz)(h.Z.fireExternalEvent("onChange",{values:e,valid:t}));case 8:case"end":return n.stop()}}),nZ)}function dZ(){return Zf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=Object,e.next=3,(0,Ff.Ys)(ix(oZ));case 3:return e.t1=e.sent,e.abrupt("return",e.t0.entries.call(e.t0,e.t1).reduce((function(e,t){var n=T()(t,2),r=n[0],o=n[1];return KB(KB({},e),{},L()({},r.replace("--","."),o))}),{}));case 5:case"end":return e.stop()}}),rZ)}const fZ={simpleForm:GB,form:VB};var pZ,hZ=[aZ];function mZ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function gZ(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?mZ(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mZ(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var vZ="simple-form",yZ=["onSubmit","onCancel","onChange","emitAction"],bZ=function(e,t,n,r){var o,i=pZ||(pZ=(0,S.jsx)(FB,{})),a=s.Z.createStore(fZ,hZ,t,vZ);return d.Z.addToStore(a,(function(e){return e.input.emitAction})),h.Z.addToStore(a,(function(e){return s.Z.getEvents(yZ,e.input)})),yN.addToStore(a,(function(e){return{initialData:e.input.formData,listApp:e.input.listApp,docsApp:e.input.docsApp}})),m.Z.addToStore(a,!1),s.Z.createApp(vZ,i,a,{input:t,events:n,actions:[(o=YI.getFieldDefinitions(t.form),{type:MB,payload:{fieldDefinitions:o}})],publicPath:r,textResourceModules:["component","common"]})},wZ=function(e){return s.Z.useApp({initApp:bZ,props:e,packageName:vZ,externalEvents:yZ}).component};wZ.propTypes=gZ(gZ({noButtons:l().bool,submitText:l().string,cancelText:l().string,form:l().object.isRequired,validate:l().bool},yZ.reduce((function(e,t){return e[t]=l().func,e}),{})),{},{defaultValues:l().object,formData:l().object,beforeRenderField:l().func,docsApp:l().func,listApp:l().func,mappingType:l().oneOf(["editable","search","readonly"]),mode:l().oneOf(["list","detail","create","update","search"])});const AZ=wZ;var xZ="entityList/SET_INITIALIZED",EZ="entityList/SET_SEARCH_FORM_TYPE",OZ="entityList/SET_SEARCH_FORM_TYPE_FROM_INPUT",CZ="entityList/RELOAD_ALL",kZ="entityList/RELOAD_DATA",SZ="entityList/SET_SEARCH_FORM_COLLAPSED",DZ="entityList/SET_SEARCH_FORM_COLLAPSED_INITIAL_VALUE",PZ=function(e){return{type:EZ,payload:{searchFormType:e}}},_Z="preferences/LOAD_PREFERENCES",jZ="preferences/SET_POSITIONS",TZ="preferences/CHANGE_POSITION",RZ="preferences/SET_SORTING",IZ="preferences/SET_COLUMNS",MZ="preferences/CHANGE_WIDTH",NZ="preferences/RESET_SORTING",BZ="preferences/RESET_COLUMNS",ZZ="preferences/RESET_PREFERENCES",FZ="preferences/DISPLAY_COLUMN_MODAL",LZ="preferences/SET_PREFERENCES_LOADED",HZ=function(){return{type:_Z}},UZ=function(e){return{type:jZ,payload:{positions:e}}},zZ=function(e){return{type:IZ,payload:{columns:e}}},WZ=function(){return{type:NZ,payload:{}}},VZ="searchForm/SET_INITIALIZED",YZ="searchForm/INITIALIZE",qZ="searchForm/SET_FORM_DEFINITION",GZ="searchForm/EXECUTE_SEARCH",QZ="searchForm/RESET_SEARCH",XZ="searchForm/SET_SHOW_EXTENDED_SEARCH_FORM",KZ="searchForm/SET_SIMPLE_SEARCH_FIELDS",$Z="searchForm/SUBMIT_SEARCH_FORM",JZ="searchForm/SET_VALUES_INITIALIZED",eF="searchForm/SET_FORM_FIELDS_FLAT",tF="searchForm/SET_SEARCH_FILTERS",nF="searchForm/SET_SEARCH_FILTER_ACTIVE",rF="searchForm/DELETE_SEARCH_FILTER",oF="searchForm/SAVE_SEARCH_FILTER",iF="searchForm/SAVE_DEFAULT_SEARCH_FILTER",aF="searchForm/RESET_DEFAULT_SEARCH_FILTER",cF="searchForm/DISPLAY_SEARCH_FIELDS_MODAL",sF="searchForm/resetSearchFields",uF="searchForm/LOAD_SEARCH_AS_QUERY",lF="searchForm/SAVE_QUERY_AS_FILTER",dF="searchForm/SET_QUERY_VIEW_VISIBLE",fF="searchForm/SET_QUERY",pF="searchForm/SET_QUERY_ERROR",hF="searchForm/RUN_QUERY",mF="searchForm/CLEAR_QUERY",gF=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return{type:VZ,payload:{initialized:e}}},vF=function(){return{type:YZ}},yF=function(e){return{type:qZ,payload:{formDefinition:e}}},bF=function(){return{type:GZ}},wF=function(){return{type:$Z}},AF=function(e){return{type:eF,payload:{formFieldsFlat:e}}},xF=function(e){return{type:tF,payload:{searchFilters:e}}},EF=function(e,t,n){return{type:nF,payload:{searchFilterId:e,active:t,exclusive:n}}},OF=function(e){return{type:dF,payload:{queryViewVisible:e}}},CF=function(e){return{type:fF,payload:{query:e}}},kF=function(e){return{type:pF,payload:{queryError:e}}},SF=function(){return window.innerWidth},DF="top",PF="left",_F={sidepanelPosition:PF,isCollapsed:!1,toggleCollapse:function(){},scrollBehaviour:"none"},jF=I().createContext(_F),TF=function(){return(0,R.useContext)(jF)};const RF=function(e){var t=e.children,n=e.sidepanelPosition,r=void 0===n?DF:n,o=e.sidepanelCollapsed,i=void 0!==o&&o,a=e.setSidepanelCollapsed,c=void 0===a?function(){}:a,s=e.scrollBehaviour,u=void 0===s?"none":s,l=function(e,t){var n=(0,R.useState)(!1),r=(0,wd.Z)(n,2),o=r[0],i=r[1],a=(0,R.useState)(SF()),c=(0,wd.Z)(a,2),s=c[0],u=c[1];(0,R.useEffect)((function(){var e=function(){u(SF())};return window.addEventListener("resize",e),function(){return window.removeEventListener("resize",e)}}),[s]),(0,R.useEffect)((function(){i(s<768||e)}),[s,e]);var l=(0,R.useCallback)((function(){i(!o),SF()>768&&t(!o)}),[o,t]);return{isCollapsed:o,toggleCollapse:l}}(i,c),d=l.isCollapsed,f=l.toggleCollapse,p=(0,R.useMemo)((function(){return{sidepanelPosition:r,isCollapsed:r===PF&&d,toggleCollapse:f,scrollBehaviour:u}}),[d,f,r,u]);return(0,S.jsx)(jF.Provider,{value:p,children:t})};var IF,MF,NF,BF,ZF,FF,LF,HF,UF,zF,WF=b.ZP.div.withConfig({displayName:"TopPositioning"})(IF||(IF=(0,v.Z)(["\n height: 100%;\n width: 100%;\n display: grid;\n row-gap: 8px;\n grid-template-areas:\n 'sidepanel'\n 'content';\n grid-auto-rows: auto minmax(auto, 1fr);\n grid-template-columns: minmax(100%, 700px);\n"]))),VF=b.ZP.div.withConfig({displayName:"LeftPositioning"})(MF||(MF=(0,v.Z)(["\n display: grid;\n width: 100%;\n height: 100%;\n column-gap: 1rem;\n /* only show one panel at a time on screens <= 500px */\n grid: ",";\n\n @media (max-width: 600px) {\n column-gap: 8px;\n }\n"])),(function(e){var t=e.isCollapsed;return(e.windowWidth<=500&&!t?"'sidepanel content' / 100% 0":!t&&"'sidepanel content' / minmax(390px, 16%) auto")||"'sidepanel content' / 25px auto"})),YF=b.ZP.div.withConfig({displayName:"StyledSidepanel"})(NF||(NF=(0,v.Z)(["\n grid-area: sidepanel;\n min-height: 50px; /* prevent collapse on shorter screens */\n ","\n\n /* Limit height when positioned top */\n "," && {\n ","\n padding-right: ",";\n ","\n }\n"])),(function(e){return"inline"===e.scrollBehaviour&&"overflow-y: auto;"}),WF,(function(e){return"inline"===e.scrollBehaviour?"max-height: 200px;":"max-height: none;"}),x.Z.space(-.5),of.C),qF=b.ZP.div.withConfig({displayName:"StyledSidepanelMainContent"})(BF||(BF=(0,v.Z)(["\n grid-area: content;\n display: flex;\n"]))),GF=b.ZP.div.withConfig({displayName:"StyledSidepanelLeftContentWrapper"})(ZF||(ZF=(0,v.Z)(["\n display: flex; // enables StyledSidepanelCollapsed to take full height\n flex-direction: column;\n height: 100%;\n overflow-y: auto;\n overflow-x: hidden;\n background-color: ",";\n"])),Jm.Z.color("paper")),QF=b.ZP.div.withConfig({displayName:"StyledSidepanelTopContentWrapper"})(FF||(FF=(0,v.Z)([""]))),XF=b.ZP.div.withConfig({displayName:"StyledSidepanelContent"})(LF||(LF=(0,v.Z)(["\n display: ",";\n height: 100%;\n overflow: hidden;\n"])),(function(e){return e.isCollapsed?"none":"block"})),KF=b.ZP.div.withConfig({displayName:"StyledSidepanelCollapsed"})(HF||(HF=(0,v.Z)(["\n display: ",";\n flex: 1;\n align-items: flex-start;\n background: ",";\n padding-top: ",";\n padding-left: ",";\n\n &:hover {\n cursor: pointer;\n }\n"])),(function(e){return e.isCollapsed?"flex":"none"}),Jm.Z.color("paper"),x.Z.space(-.5),x.Z.space(-2.5)),$F=(0,b.ZP)(_O.Z).withConfig({displayName:"StyledToggleCollapseButton"})(UF||(UF=(0,v.Z)(["\n font-size: ",";\n margin-right: auto;\n position: relative;\n left: ",";\n\n &:hover,\n ",":hover & {\n background-color: transparent;\n color: ",";\n }\n"])),x.Z.font(0),(function(e){return e.isCollapsed?"0.5px":"-5px"}),KF,Jm.Z.color("secondaryLight")),JF=b.ZP.div.withConfig({displayName:"StyledSidepanelHeader"})(zF||(zF=(0,v.Z)(["\n background-color: ",";\n border-bottom: 3px solid ",";\n display: flex;\n justify-content: flex-end;\n padding: ",";\n position: relative;\n z-index: 2; // higher than StyledTether to prevent cover on scroll\n\n "," {\n z-index: 3; //higher than rest to lay over search filter list\n }\n"])),Jm.Z.color("paper"),Jm.Z.color("backgroundBody"),x.Z.space(-.53),Xv);const eL=function(e){var t=e.children,n=TF(),r=n.sidepanelPosition,o=n.isCollapsed,i="left"===r?VF:WF;return(0,S.jsx)(i,{windowWidth:window.innerWidth,isCollapsed:o,children:t})};const tL=function(e){var t=e.children,n=e.sidepanelPosition,r=e.sidepanelCollapsed,o=e.setSidepanelCollapsed,i=e.scrollBehaviour;return(0,S.jsx)(RF,{sidepanelPosition:n,sidepanelCollapsed:r,setSidepanelCollapsed:o,scrollBehaviour:i,children:(0,S.jsx)(eL,{children:t})})};const nL=function(e){var t=e.children,n=TF(),r=n.sidepanelPosition,o=n.isCollapsed,i=n.toggleCollapse,a=n.scrollBehaviour,c=r===PF?GF:QF;return(0,S.jsx)(YF,{sidepanelPosition:r,scrollBehaviour:a,children:(0,S.jsxs)(c,{children:[(0,S.jsx)(XF,{isCollapsed:o,children:t}),"left"===r&&(0,S.jsx)(KF,{onClick:i,isCollapsed:o,children:(0,S.jsx)($F,{icon:"chevron-right",isCollapsed:o})})]})})};const rL=function(e){var t=e.children;return(0,S.jsx)(qF,{children:t})};var oL={INLINE:"inline",NONE:"none"},iL="checked",aL="indeterminate",cL="unchecked";const sL=function(e){var t=e.value,n=e.id,r=e.onChange,o=e.label,i=(0,R.useRef)(null);return(0,R.useLayoutEffect)((function(){i.current.indeterminate=t===aL,i.current.checked=t===iL}),[t]),(0,S.jsx)("input",{ref:i,onChange:function(e){r(t===aL?cL:e.target.checked?iL:cL)},id:n,type:"checkbox","aria-checked":"checked"===t,"aria-label":o})},uL=sL;const lL=function(e){var t,n=e.rowData,r=e.isSelected,o=e.selectionChange,i=e.selectionFilterFn,a=e.rowIdx;return"function"!=typeof i||i(n)?(0,S.jsx)("div",{onClick:function(e){e.shiftKey&&o(n.__key,!0,!0),e.stopPropagation()},"data-cy":"list-selection-checkbox",children:(0,S.jsx)(uL,{value:(t=n,r(t.__key)?"checked":"unchecked"),onChange:function(e){return function(t){return o(e.__key,"checked"===t)}}(n),label:"".concat(n.__model," ").concat(a+1),id:"list-selection-checkbox "+n.__key})}):null};const dL=function(e){var t=e.data,n=e.isSelected,r=e.selectionChange,o=e.selectionFilterFn,i=t.filter((function(e){return"function"!=typeof o||o(e)})).map((function(e){return e.__key})),a=function(e,t){return e?"checked":t?"indeterminate":"unchecked"}(i.every((function(e){return n(e)})),i.some((function(e){return n(e)})));return 0===i.length?null:(0,S.jsx)(uL,{value:a,onChange:function(e){r(i,"checked"===e)}})};var fL={SINGLE:"single",MULTI:"multi",NONE:"none"};md().oneOf(Object.keys(fL).map((function(e){return fL[e]})));const pL=function(e){var t=e.rowData,n=e.isSelected,r=e.selectionChange,o=e.selectionFilterFn;return"function"!=typeof o||o(t)?(0,S.jsx)("div",{onClick:function(e){return e.stopPropagation()},children:(0,S.jsx)("input",{type:"radio",checked:n(t.__key),onChange:function(e){r(t.__key,e.target.value)}})}):null};function hL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function mL(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?hL(Object(n),!0).forEach((function(t){(0,Iv.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hL(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var gL=function(e,t,n){return{id:"single-selection",width:30,resizable:!1,fixedPosition:!0,dynamic:!0,sorting:{sortable:!1},HeaderRenderer:function(){return null},CellRenderer:function(r){return(0,S.jsx)(pL,mL(mL({},r),{},{isSelected:e,selectionChange:t,selectionFilterFn:n}))}}},vL=function(e,t,n){return{id:"multi-selection",dynamic:!0,resizable:!1,fixedPosition:!0,width:30,sorting:{sortable:!1},HeaderRenderer:function(r){return(0,S.jsx)(dL,mL(mL({},r),{},{isSelected:e,selectionChange:t,selectionFilterFn:n}))},CellRenderer:function(r){return(0,S.jsx)(lL,mL(mL({},r),{},{isSelected:e,selectionChange:t,selectionFilterFn:n}))}}};const yL=function(e,t,n){var r=(0,R.useState)(null),o=(0,wd.Z)(r,2),i=o[0],a=o[1],c=(0,R.useCallback)((function(t){return(e||[]).includes(t)}),[e]),s=(0,R.useCallback)((function(e,r,o){if(Array.isArray(e))n(e,r),a(null);else if(o){document.getSelection&&document.getSelection().removeAllRanges();var s=i?t.findIndex((function(e){return e===i})):0,u=t.findIndex((function(t){return t===e}));n(t.slice(Math.min(s,u),Math.max(s,u)+1),r)}else n([e],r||!c(e)),a(e)}),[t,n,c,i]);return{isSelected:c,selectionChange:s}};var bL,wL,AL,xL,EL,OL,CL,kL,SL,DL,PL,_L,jL,TL,RL,IL,ML,NL,BL,ZL,FL=a(28926),LL=a(40493),HL=function(e){var t=e.theme;return(0,rf.HO)(nf()(t,"colors.paper"),3)},UL=x.Z.space(-1.5),zL=b.ZP.div.withConfig({displayName:"StyledTableFooter"})(bL||(bL=(0,v.Z)(["\n grid-row-start: pagination-start;\n display: flex;\n align-items: flex-start;\n padding-top: ",";\n padding-bottom: ",";\n border-top: 1px solid ",";\n\n "," {\n margin-right: ",";\n }\n"])),x.Z.space(-.5),x.Z.space(-1),HL,FL.Z,x.Z.space(-1)),WL=b.ZP.td.withConfig({displayName:"StyledTableCell"})(wL||(wL=(0,v.Z)(["\n && {\n padding: ",";\n background-color: ",";\n border-bottom: 1px solid ",";\n align-content: center;\n box-sizing: content-box;\n text-align: ",";\n\n "," {\n display: inline-block;\n margin-right: ",";\n }\n }\n"])),UL,w.FS.color("paper"),HL,(function(e){var t=e.column;return null!=t&&t.rightAligned?"right":"left"}),LL.q,x.Z.space(-2)),VL=b.ZP.div.withConfig({displayName:"StyledDnD"})(AL||(AL=(0,v.Z)(["\n padding: ",";\n width: 100%;\n display: flex;\n align-items: center;\n opacity: ",";\n"])),UL,(function(e){return e.isDragged?.2:1})),YL=b.ZP.span.withConfig({displayName:"StyledResizeHandle"})(xL||(xL=(0,v.Z)(["\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n background: ",";\n opacity: 0;\n width: 3px;\n cursor: col-resize;\n"])),(function(e){var t=e.theme;return(0,rf.HO)(nf()(t,"colors.paper"),3)})),qL=b.ZP.th.withConfig({displayName:"StyledTableHeaderCell"})(EL||(EL=(0,v.Z)(["\n && {\n position: sticky;\n top: 0;\n background-color: ",";\n text-align: ",";\n border-bottom: 2px solid ",";\n ",";\n user-select: none;\n cursor: ",";\n white-space: nowrap;\n display: flex;\n border-right: ",";\n padding: 1px; /* default th padding */\n ",";\n ","\n ","\n ","\n }\n"])),w.FS.color("paper"),(function(e){return e.rightAligned?"right":"left"}),HL,(0,A.Z)({fontWeight:w.FS.fontWeight("bold")}),(function(e){return e.isSortable?"pointer":"auto"}),(function(e){var t=e.isDraggedOver,n=e.theme;return t?"3px solid ".concat(n.colors.text):"none"}),(function(e){return"header-cell-navigation-column"===e.id&&"z-index: 1"}),(function(e){var t=e.isResizingThisCell,n=e.theme;return t&&"\n background-color: ".concat((0,rf.xn)(n.colors.paper)[1],";\n\n > ").concat(YL," {\n opacity: 1;\n }\n ")}),(function(e){var t=e.isResizingAnyCell,n=e.theme;return!t&&"\n &:hover {\n background-color: ".concat((0,rf.xn)(n.colors.paper)[1],";\n\n > ").concat(YL," {\n opacity: 1;\n }\n }\n ")}),(function(e){var t=e.isResizingThisCell,n=e.isSortable,r=e.fixedPosition,o=e.theme;return n?!t&&!n&&!r&&"\n &:hover {\n background-color: transparent;\n }\n ":"\n &:hover {\n background-color: ".concat(o.colors.paper,";\n }\n ")})),GL=(0,b.iv)(OL||(OL=(0,v.Z)(["\n display: contents;\n ","\n\n &.selected {\n > "," {\n background-color: ",";\n }\n }\n\n &.selectableRow:not(.selected):hover {\n > "," {\n background-color: ",";\n }\n }\n"])),(function(e){return e.clickable&&"cursor: pointer;"}),WL,(function(e){var t=e.theme;return(0,rf.xn)(t.colors.paper)[2]}),WL,(function(e){var t=e.theme;return(0,rf.xn)(t.colors.paper)[1]})),QL=b.ZP.span.withConfig({displayName:"StyledSortingSpan"})(CL||(CL=(0,v.Z)(["\n height: 100%;\n margin-right: 2px;\n"]))),XL=b.ZP.span.withConfig({displayName:"StyledSortingRank"})(kL||(kL=(0,v.Z)(["\n position: relative;\n top: -0.5rem;\n font-weight: ",";\n"])),w.FS.fontWeight("regular")),KL=b.ZP.td.withConfig({displayName:"StyledFullRowProgress"})(SL||(SL=(0,v.Z)(["\n && {\n grid-column: 1 / -1;\n padding-top: "," 0 0 0;\n height: 50px;\n text-align: center;\n border: 0;\n }\n"])),UL),$L=b.ZP.td.withConfig({displayName:"StyledFullRow"})(DL||(DL=(0,v.Z)(["\n && {\n grid-column: 1 / -1;\n padding-top: "," 0 0 0;\n height: 50px;\n text-align: center;\n border: 0;\n ",";\n }\n"])),UL,(0,A.Z)()),JL=b.ZP.thead.withConfig({displayName:"StyledTableHead"})(PL||(PL=(0,v.Z)(["\n ","\n"])),GL),eH=b.ZP.tr.withConfig({displayName:"StyledTableRow"})(_L||(_L=(0,v.Z)(["\n ","\n\n &:nth-child(even) td {\n background-color: ",";\n }\n"])),GL,(function(e){var t=e.theme;return(0,y._j)(.05,t.colors.paper)})),tH=b.ZP.tbody.withConfig({displayName:"StyledTableBody"})(jL||(jL=(0,v.Z)(["\n ","\n"])),GL),nH=b.ZP.table.withConfig({displayName:"StyledTable"})(TL||(TL=(0,v.Z)(["\n overflow: auto;\n display: grid;\n border-collapse: collapse;\n grid-template-columns: ",";\n grid-auto-rows: min-content;\n min-width: 100%;\n ","\n ","\n"])),(function(e){return e.columns.map((function(e){return e.width?e.width+"px":e.shrinkToContent?"max-content":"minmax(100px, auto)"})).join(" ")}),(function(e){return e.scrollBehaviour===oL.INLINE&&(0,b.iv)(RL||(RL=(0,v.Z)(["\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n "])))}),of.C),rH=b.ZP.div.withConfig({displayName:"StretchingTableContainer"})(IL||(IL=(0,v.Z)(["\n grid-row-start: table-start;\n position: relative;\n overflow-x: auto;\n"]))),oH=b.ZP.div.withConfig({displayName:"StyledTableWrapper"})(ML||(ML=(0,v.Z)(["\n display: grid;\n background-color: ",";\n grid-template-rows: [table-start] 1fr [pagination-start] auto auto;\n grid-template-columns: 100%;\n height: 100%;\n\n // reset external styles in old client\n input[type='checkbox'],\n input[type='radio'] {\n margin: 3px 3px 3px 4px !important;\n min-width: 12px;\n }\n"])),w.FS.color("paper")),iH=b.ZP.div.withConfig({displayName:"StyledDraggable"})(NL||(NL=(0,v.Z)(["\n width: 100%;\n height: 100%;\n display: flex;\n"]))),aH=b.ZP.span.withConfig({displayName:"StyledHeaderContentWrapper"})(BL||(BL=(0,v.Z)(["\n display: flex;\n"]))),cH=b.ZP.div.withConfig({displayName:"StyledHeaderContent"})(ZL||(ZL=(0,v.Z)(["\n width: 100%;\n"]))),sH=md().oneOfType([md().string,md().number]),uH=md().shape({__key:sH}),lH=(md().arrayOf(uH),md().oneOf(Object.keys(oL).map((function(e){return oL[e]}))),md().shape({id:md().string.isRequired,label:md().string,sorting:md().shape({sortable:md().bool,sortRank:md().number,order:md().oneOf(["asc","desc"])}),resizable:md().bool,width:md().number,HeaderRenderer:md().elementType,CellRenderer:md().elementType,rightAligned:md().bool})),dH=I().memo((function(e){var t=e.column,n=e.rowData,r=e.rowIdx;return(0,S.jsx)(WL,{"data-cy":"list-cell",children:t.CellRenderer?(0,S.jsx)(t.CellRenderer,{rowData:n,column:t,rowIdx:r}):(0,S.jsx)(Zd.ZP.Span,{children:n[t.id]})})}));dH.propTypes={rowData:uH.isRequired,column:lH.isRequired,rowIdx:md().number};var fH=function(e,t){return!e.column.dynamic||0===Object.keys(UE.Z.difference(e,t)).length};const pH=I().memo(dH,fH);var hH,mH,gH,vH,yH=function(){return hH||(hH=(0,S.jsx)(eH,{children:(0,S.jsxs)(KL,{children:[(0,S.jsx)(ik.Z,{size:"20"}),(0,S.jsx)(Zd.ZP.P,{children:(0,S.jsx)(fd.Z,{id:"client.component.table.dataLoading"})})]})}))},bH=function(){return mH||(mH=(0,S.jsx)(eH,{children:(0,S.jsx)($L,{children:(0,S.jsx)(Zd.ZP.Span,{children:(0,S.jsx)(fd.Z,{id:"client.component.table.noData"})})})}))};const wH=function(e){var t=e.data,n=e.columns,r=e.isSelected,o=e.selectionChange,i=e.dataLoadingInProgress,a=e.onRowClick,c=e.clickable;return i?gH||(gH=(0,S.jsx)(tH,{children:(0,S.jsx)(yH,{})})):(0,S.jsx)(tH,{children:t.length>0?t.map((function(e,t){return(0,S.jsx)(eH,{className:"selectableRow ".concat(r(e.__key)&&"selected"),onClick:(i=e,function(e){e.shiftKey?o(i.__key,!0,!0):e.metaKey||e.ctrlKey?o(i.__key):c&&a&&a(i.__key)}),clickable:c,"data-cy":"list-row",children:n.map((function(n){return(0,S.jsx)(pH,{selected:r(e.__key),rowData:e,column:n,rowIdx:t},"table-static-cell-".concat(e.__key,"-").concat(n.id))}))},"list-row-".concat(e.__key));var i})):vH||(vH=(0,S.jsx)(bH,{}))})};var AH,xH,EH=b.ZP.div.withConfig({displayName:"StyledPagination"})(AH||(AH=(0,v.Z)(["\n display: flex;\n align-items: center;\n justify-content: flex-start;\n flex-wrap: wrap;\n gap: ",";\n margin-left: 5px;\n\n span {\n padding-right: 6px;\n }\n"])),x.Z.space(-1)),OH=(0,b.ZP)(pd.Z).withConfig({displayName:"StyledPaginationButton"})(xH||(xH=(0,v.Z)(["\n padding: "," ",";\n"])),x.Z.space(-2),x.Z.space(-.8));const CH=(0,P.ZP)((function(e){var t=e.totalCount,n=e.recordsPerPage,r=e.currentPage,o=e.onPageChange,i=e.intl,a=Math.ceil(t/n),c=Math.min((r-1)*n+1,t),s=Math.min(r*n,t),u=function(e){return i.formatMessage({id:e})};return(0,S.jsxs)(EH,{children:[(0,S.jsxs)(bd,{children:[(0,S.jsx)(OH,{disabled:1===r,label:u("client.component.pagination.firstPageTitle"),iconOnly:!0,icon:"chevron-double-left",onClick:function(){return o(1)}}),(0,S.jsx)(OH,{disabled:1===r,label:u("client.component.pagination.prePageTitle"),iconOnly:!0,icon:"chevron-left",onClick:function(){return o(r-1)}}),(0,S.jsx)(OH,{disabled:r>=a,label:u("client.component.pagination.nextPageTitle"),iconOnly:!0,icon:"chevron-right",onClick:function(){return o(r+1)}}),(0,S.jsx)(OH,{disabled:r>=a,label:u("client.component.pagination.lastPageTitle"),iconOnly:!0,icon:"chevron-double-right",onClick:function(){return o(a)}})]}),t>0&&(0,S.jsx)(Zd.ZP.Span,{children:(0,S.jsx)(fd.Z,{id:"client.component.pagination.text",values:{start:c,to:s,total:t}})})]})})),kH=CH;const SH=(0,P.ZP)((function(e){var t,n=e.onPageChange,r=e.onPageRefresh,o=e.paginationInfo,i=e.intl,a=Boolean(o),c="function"==typeof r;return a||c?(0,S.jsxs)(zL,{children:[a&&(0,S.jsx)(kH,{onPageChange:n,currentPage:o.currentPage,totalCount:o.totalCount,recordsPerPage:o.recordsPerPage}),c&&(0,S.jsx)(_O.Z,{type:"button",title:(t="client.component.table.refreshTitle",i.formatMessage({id:t})),icon:"sync",onClick:r})]}):null}));function DH(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function PH(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?DH(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):DH(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var _H={currentlyDragging:null,currentlyDragOver:null,dropPosition:null,offset:null},jH={Top:"Top",Bottom:"Bottom"};const TH=function(e){var t=(0,R.useState)(_H),n=T()(t,2),r=n[0],o=n[1],i=r.currentlyDragging,a=r.currentlyDragOver,c=r.dropPosition,s=r.offset;return{dndEvents:(0,R.useCallback)((function(t){return{onDragStart:function(e){o((function(e){return PH(PH({},e),{},{currentlyDragging:t})}));var n=e.target;n&&n.addEventListener("dragend",(function e(t){o(_H),t.stopPropagation(),n&&n.removeEventListener("dragend",e)}),!1),e.stopPropagation()},onDragEnter:function(e){if(i&&!Dp()(a,t)){var n=e.target?e.target.getBoundingClientRect():{},r=n.y+n.height/2;o((function(e){return PH(PH({},e),{},{currentlyDragOver:t,offset:r})}))}e.stopPropagation()},onDragOver:function(e){if(i){var t=e.clientY-s>0?jH.Bottom:jH.Top;return o((function(e){return PH(PH({},e),{},{dropPosition:t})})),e.preventDefault(),e.stopPropagation(),!0}},onDrop:function(t){i&&a&&(e(i,a,c),o(_H),t.stopPropagation())}}}),[a,i,c,s,e]),dndState:(0,R.useMemo)((function(){return{currentlyDragOver:a,currentlyDragging:i,dropPosition:c,offset:s}}),[a,i,c,s])}};const RH=function(e,t,n){var r=t-e;return Math.max(50,n+r)},IH=function(e,t,n){var r=(0,R.useState)(null),o=T()(r,2),i=o[0],a=o[1],c=(0,R.useRef)(null),s=(0,R.useRef)(),u=(0,R.useState)(!1),l=T()(u,2),d=l[0],f=l[1],p=(0,R.useState)(!1),h=T()(p,2),m=h[0],g=h[1],v=(0,R.useMemo)((function(){return{resizingElement:i,isResizing:d}}),[i,d]),y=(0,R.useCallback)((function(){i&&(n(i),g(!1),setTimeout((function(){f(!1),a(null),c.current=void 0}),0))}),[i,n]),b={onMouseMove:(0,R.useCallback)((function(n){i&&m&&(s.current=requestAnimationFrame((function(){if(c.current){var r=e(i),o=RH(c.current.y,n.clientY,r.clientHeight),a=RH(c.current.x,n.clientX,r.clientWidth);t(i,{height:o,width:a})}c.current={y:n.clientY,x:n.clientX}})))}),[i,t,m,e]),onMouseUp:y};return(0,R.useEffect)((function(){return m||cancelAnimationFrame(s.current),function(){cancelAnimationFrame(s.current)}}),[m]),{resizeState:v,startResize:function(e){return function(t){a(e),f(!0),g(!0),c.current=void 0,t.stopPropagation(),t.preventDefault()}},resizingEvents:b}};const MH=function(e){var t=e.column,n=e.startResize;return(0,S.jsx)(YL,{"data-cy":"header-cell-".concat(t.id,"-resizing-controller"),onMouseDown:n(t)})};const NH=(0,P.ZP)((function(e){var t,n,r,o=e.column,i=e.intl,a=o.sorting&&o.sorting.sortRank&&o.sorting.order,c=(null===(t=o.sorting)||void 0===t?void 0:t.sortRank)>1&&(0,S.jsx)(XL,{children:o.sorting.sortRank}),s="sort-".concat("asc"===(null===(n=o.sorting)||void 0===n?void 0:n.order)?"up":"down");return a?(0,S.jsxs)(QL,{title:(r="client.component.table.sortingTitle",i.formatMessage({id:r})),children:[(0,S.jsx)(B.Z,{icon:s}),c]}):null}));function BH(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ZH(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?BH(Object(n),!0).forEach((function(t){(0,Iv.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):BH(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var FH=function(e){var t=e.column,n=e.data;return t.HeaderRenderer?(0,S.jsx)(t.HeaderRenderer,{column:t,data:n}):(0,S.jsxs)(aH,{children:[(0,S.jsx)(cH,{title:t.label,dangerouslySetInnerHTML:{__html:t.label}}),(0,S.jsx)(NH,{column:t})]})};const LH=function(e){var t=e.columns,n=e.data,r=e.onColumnPositionChange,o=e.onSortingChange,i=e.tableEl,a=e.onColumnWidthChanging,c=e.onColumnWidthChanged,s=TH(r),u=s.dndEvents,l=s.dndState,d=(0,R.useCallback)((function(e){return i.current.querySelector("th[id='header-cell-".concat(e.id,"']"))}),[]),f=(0,R.useCallback)((function(e,t){var n=t.width;return a(e.id,n)}),[a]),p=(0,R.useCallback)((function(e){return c(e.id)}),[c]),h=IH(d,f,p),m=h.startResize,g=h.resizingEvents,v=h.resizeState,y=v.isResizing,b=v.resizingElement,w=function(e){return function(t){!y&&e.sorting&&e.sorting.sortable&&o(e.id,t.shiftKey)}},A=t.map((function(e){var t="header-cell-".concat(e.id),r="header-cell-drop-".concat(e.id),o=e.sorting&&e.sorting.sortable,i=y&&e.id===(null==b?void 0:b.id),a=l.currentlyDragOver===e.id&&l.currentlyDragging!==e.id,c=l.currentlyDragging===e.id;return(0,S.jsxs)(qL,{"data-cy":t,id:t,onClick:w(e),isResizingAnyCell:y,isResizingThisCell:i,isSortable:o,isDraggedOver:a,rightAligned:e.rightAligned,children:[(0,S.jsx)(iH,ZH(ZH({id:r},!e.fixedPosition&&ZH({draggable:!0},u(e.id))),{},{children:(0,S.jsx)(VL,{isDragged:c,children:(0,S.jsx)(FH,{column:e,data:n})})}),r),e.resizable&&(0,S.jsx)(MH,{column:e,startResize:m})]},t)}));return(0,S.jsx)(JL,ZH(ZH({},g),{},{children:(0,S.jsx)(eH,{children:A})}))};function HH(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function UH(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?HH(Object(n),!0).forEach((function(t){(0,Iv.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):HH(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var zH=function(e){var t=e.columns,n=e.selection,r=e.data,o=e.onSelectionChange,i=e.selectionStyle,a=e.paginationInfo,c=e.onColumnPositionChange,s=e.onSortingChange,u=e.dataLoadingInProgress,l=e.onRowClick,d=e.clickable,f=e.onPageChange,p=e.onPageRefresh,h=e.scrollBehaviour,m=void 0===h?oL.INLINE:h,g=e.onColumnWidthChange,v=e.selectionFilterFn,y=(0,R.useState)(t),b=(0,wd.Z)(y,2),w=b[0],A=b[1],x=(0,R.useRef)(null),E=(0,R.useCallback)((function(e){var t,n=null===(t=w.find((function(t){return t.id===e})))||void 0===t?void 0:t.width;g&&g(e,n)}),[w,g]),O=(0,R.useCallback)((function(e,t){A((0,RO.Z)(w.map((function(n){return n.id===e?UH(UH({},n),{},{width:t}):n}))))}),[w]),C=(0,R.useMemo)((function(){return r?r.map((function(e){return e.__key})):[]}),[r]),k=yL(n,C,o),D=k.isSelected,P=k.selectionChange;return(0,R.useEffect)((function(){var e=function(e,t,n,r,o){return e&&e!==fL.NONE?e===fL.MULTI?vL(n,r,o):gL(n,r,o):null}(i,0,D,P,v);A([].concat((0,RO.Z)(e?[e]:[]),(0,RO.Z)(t)))}),[t,n,D,P,v,i]),(0,S.jsxs)(oH,{children:[(0,S.jsx)(rH,{children:(0,S.jsxs)(nH,{ref:x,columns:w,scrollBehaviour:m,children:[(0,S.jsx)(LH,{columns:w,data:r,onColumnWidthChanging:O,onColumnWidthChanged:E,onColumnPositionChange:c,tableEl:x,onSortingChange:s}),(0,S.jsx)(wH,{columns:w,data:r,isSelected:D,selectionChange:P,dataLoadingInProgress:u,onRowClick:l,clickable:d})]})}),(0,S.jsx)(SH,{onPageChange:f,onPageRefresh:p,paginationInfo:a})]})},WH=function(e,t){return 0===Object.keys(UE.Z.difference(e,t)).length};const VH=I().memo(zH,WH);var YH,qH="list/INITIALIZE",GH="list/SET_ENTITIES",QH="list/SET_FORM_DEFINITION",XH="list/SET_SEARCH_LIST_FORM_DEFINITION",KH="list/SET_ENTITY_MODEL",$H="list/SET_SORTING",JH="list/SET_CURRENT_PAGE",eU="list/SET_ENTITY_COUNT",tU="list/ADD_ENTITIES_TO_STORE",nU="list/CLEAR_ENTITIES_CACHE",rU="list/SET_IN_PROGRESS",oU="list/CHANGE_PAGE",iU="list/REFRESH",aU="list/SET_SEARCH_FILTERS",cU="list/ON_ROW_CLICK",sU="entityList/NAVIGATE_TO_CREATE",uU="list/SET_LAZY_DATA",lU="list/NAVIGATE_TO_ACTION",dU="list/SET_SORTING_INTERACTIVE",fU="list/DEFINE_SORTING",pU="list/SET_CONSTRICTION",hU="list/SET_INITIALIZED",mU="list/SET_MARKED",gU="list/TOGGLE_MARKINGS",vU=function(){return{type:qH}},yU=function(e){return{type:GH,payload:{entities:e}}},bU=function(e,t){return{type:tU,payload:{page:e,entities:t}}},wU=function(e){return{type:eU,payload:{entityCount:e}}},AU=function(e){return{type:QH,payload:{formDefinition:e}}},xU=function(e){return{type:XH,payload:{searchListFormDefinition:e}}},EU=function(e){return{type:$H,payload:{sorting:e}}},OU=function(e){return{type:JH,payload:{currentPage:e}}},CU=function(e){return{type:rU,payload:{inProgress:e}}},kU=function(){return{type:iU}},SU=function(e,t,n){return{type:uU,payload:{type:e,id:t,values:n}}},DU=function(e,t){return{type:lU,payload:{definition:e,selection:t}}},PU=function(){return{type:fU}},_U=function(e){return{type:pU,payload:{constriction:e}}},jU=function(e){return{type:gU,payload:{selection:e}}},TU=b.ZP.span.withConfig({displayName:"StyledMarkingWrapper"})(YH||(YH=Ld()(["\n ","\n display: flex;\n height: 100%;\n flex-direction: column;\n align-items: center;\n\n &:hover {\n color: ",";\n }\n ","\n"])),(0,A.Z)(),w.FS.color("secondaryLight"),(function(e){var t=e.marked,n=e.theme;return t&&"color: ".concat(n.colors.secondary,";")})),RU={setMarked:function(e,t,n){return{type:mU,payload:{entityName:e,entityKey:t,marked:n}}}},IU=(0,_.connect)((function(e){return{markings:e.list.lazyData.markings}}),RU)((function(e){var t=e.rowData,n=e.markings,r=e.setMarked,o=(0,R.useState)(!1),i=T()(o,2),a=i[0],c=i[1],s=n&&n[t.__model]&&n[t.__model][t.__key];(0,R.useEffect)((function(){s||c(!1)}),[s]);return(0,S.jsx)(TU,{marked:s,onClick:function(e){e.stopPropagation(),r(t.__model,t.__key,!s)},onMouseEnter:function(){return c(!0)},onMouseLeave:function(){return c(!1)},children:(0,S.jsx)(B.Z,{icon:s||a?"star-full":"star"})})}));function MU(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function NU(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?MU(Object(n),!0).forEach((function(t){(0,Iv.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):MU(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const BU=function(e){var t=e.buttonProps,n=e.onOpen,r=e.children,o=(0,R.useRef)(null),i=(0,R.useState)(!1),a=(0,wd.Z)(i,2),c=a[0],s=a[1],u=(0,R.useState)(!1),l=(0,wd.Z)(u,2),d=l[0],f=l[1];return(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(_O.Z,NU(NU({},t),{},{onClick:function(e){s(!c),e.stopPropagation(),n&&!d&&(n(),f(!0))},ref:o})),c&&(0,S.jsx)(Xv,{referenceElement:o.current,open:c,onClose:function(){s(!1)},children:r})]})};var ZU,FU,LU,HU,UU={displayColumnModal:function(){return{type:FZ,payload:{}}},resetSorting:WZ,resetPreferences:function(){return{type:ZZ,payload:{}}},resetColumns:function(){return{type:BZ,payload:{}}}};const zU=(0,_.connect)((function(e,t){return{sortable:e.input.sortable,disablePreferencesMenu:e.list.disablePreferencesMenu}}),UU)((function(e){return e.disablePreferencesMenu?null:(0,S.jsxs)(BU,{buttonProps:{icon:"ellipsis-v"},children:[(0,S.jsx)(Yv,{onClick:e.displayColumnModal,children:ZU||(ZU=(0,S.jsx)(fd.Z,{id:"client.entity-list.preferences.columns"}))}),(0,S.jsx)(Yv,{onClick:e.resetColumns,children:FU||(FU=(0,S.jsx)(fd.Z,{id:"client.entity-list.preferences.columns.reset"}))}),e.sortable&&(0,S.jsx)(Yv,{onClick:e.resetSorting,children:LU||(LU=(0,S.jsx)(fd.Z,{id:"client.entity-list.sorting.reset"}))}),(0,S.jsx)(Yv,{onClick:e.resetPreferences,children:HU||(HU=(0,S.jsx)(fd.Z,{id:"client.entity-list.preferences.reset"}))})]})}));var WU;function VU(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function YU(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?VU(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):VU(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var qU=function(e){var t=e.showNavigation,n=e.rowData,r=e.navigationStrategy,o=e.parent;return t&&r.DetailLinkRelative?(0,S.jsx)("span",{onClick:function(e){return e.stopPropagation()},"data-cy":"list-navigation-arrow",children:(0,S.jsx)(r.DetailLinkRelative,YU(YU({entityKey:n.__key,entityModel:n.__model},o&&o.relationName&&{relation:o.relationName}),{},{children:WU||(WU=(0,S.jsx)(B.Z,{icon:"arrow-right"}))}))}):null},GU=function(e,t,n){return{id:"navigation-column",fixedPosition:!0,width:30,resizable:!1,dynamic:!1,HeaderRenderer:zU,CellRenderer:function(r){return(0,S.jsx)(qU,YU(YU({},r),{},{showNavigation:e,navigationStrategy:t,parent:n}))}}};function QU(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function XU(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?QU(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):QU(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var KU=function(e){var t=e.showLink,n=e.clickable,r=e.navigationStrategy,o=e.disablePreferencesMenu,i=e.parent,a=e.markable,c=e.columnDefinitions,s=e.widths,u=e.positions,l=e.entities,d=e.changeWidth,f=e.inProgress,p=e.currentPage,h=e.entityCount,m=e.limit,g=e.changePage,v=e.refresh,y=e.setSortingInteractive,b=e.tableSelectionStyle,w=e.onSelectChange,A=e.selection,x=e.selectionFilterFn,E=e.scrollBehaviour,O=e.onRowClick,C=e.changePosition,k=t&&n&&r&&!!r.DetailLinkRelative,D=!o,P=[].concat(z()(k||D?[GU(k,r,i)]:[]),z()(a?[{id:"mark-column",fixedPosition:!0,width:30,resizable:!1,dynamic:!1,CellRenderer:IU}]:[]),z()(c.map((function(e){return XU(XU({},e),{},{width:nf()(s,e.id)})})).sort((function(e,t){return nf()(u,[e.id])-nf()(u,[t.id])}))));return(0,S.jsx)(VH,{data:l,columns:P,onColumnWidthChange:d,dataLoadingInProgress:f,paginationInfo:{currentPage:p,totalCount:h,recordsPerPage:m},onPageChange:g,onPageRefresh:v,onSortingChange:y,selectionStyle:b,onSelectionChange:w,selection:A,selectionFilterFn:x,scrollBehaviour:E,onRowClick:O,clickable:n,onColumnPositionChange:function(e,t){return C(e,t,P)}})},$U=function(e,t){var n=UE.Z.difference(e,t);return 0===Object.keys(n).length};const JU=I().memo(KU,$U);var ez="list/ON_ROW_SELECT",tz="list/SET_SELECTION",nz="selection/CLEAR_SELECTION",rz="selection/SET_QUERY",oz="selection/SET_QUERY_COUNT",iz="selection/TOOGLE_SHOW_SELECTED_RECORDS",az="selection/RELOAD_DATA",cz=function(e){return{type:tz,payload:{selection:e}}},sz=function(e,t){return{type:ez,payload:{keys:e,isSelected:t}}},uz=function(){return{type:nz}},lz=function(e){return{type:rz,payload:{query:e}}};function dz(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function fz(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?dz(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dz(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var pz=function(e,t){return e?e.map((function(e){var n=nf()(t,["defaultDisplays",e.model,e.key],"");return fz(fz({},e),{},{display:n})})):e},hz=function(e,t){if(!e)return e;var n=nf()(t,["defaultDisplays",e.model,e.key],"");return fz(fz({},e),{},{display:n})},mz={"multi-select-box":pz,"multi-remote-field":pz,"single-select-box":hz,"single-remote-field":hz,displayExpression:function(e,t,n){return nf()(t,["displayExpressions",n.formName,n.key,n.path],"")}};const gz=function(e){var t=e.value,n=e.children;return I().cloneElement(n,{value:t})};const vz=(0,_.connect)((function(e,t){var n,r,o,i,a,c={path:t.path,formName:e.input.formName,key:t.entityKey};return{value:(n=t.value,r=t.type,o=e.list.lazyData,i=c,a=mz[r],a?a(n,o,i):n)}}),{})(gz);var yz,bz,wz,Az=b.ZP.div.withConfig({displayName:"StyledColumnContentWrapper"})(yz||(yz=Ld()(["\n display: flex;\n align-items: center;\n\n > * {\n margin-right: ",";\n }\n"])),x.Z.space(-2)),xz=b.ZP.span.withConfig({displayName:"StyledActionWrapper"})(bz||(bz=Ld()(["\n display: inline-block;\n\n "," {\n > * {\n overflow: hidden;\n }\n }\n"])),gd.Z),Ez=b.ZP.span.withConfig({displayName:"StyledSpan"})(wz||(wz=Ld()(["\n p {\n margin-block-start: 0; // reset user agent style to prevent margin within table\n }\n"])));function Oz(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Cz(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Oz(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Oz(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var kz=function(e){var t=e.value,n=e.type,r=e.formData,o=e.formField,i={targetEntity:t&&UE.Z.getOrFirst(t).model},a=(0,R.useMemo)((function(){return $T.factory("list",n)}),[n]);return(0,S.jsx)(vz,{value:t,type:n,children:(0,S.jsx)(a,{type:n,mappingType:"list",formField:o,modelField:i,value:t,formData:r,breakWords:!1})})};const Sz=function(e,t,n){var r=e.id,o=e.path,i=e.dataType,a=t[o],c=GR.isMultipleFields(a,i)?a:[a],s=$T.formattedComponentConfigs[i],u=s&&s.dataContainerProps?s.dataContainerProps({formField:e}):{},l=GR.enhanceMultipleFieldsWithSeparators(c.map((function(r,a){return(0,S.jsx)(yN.FormDataContainer,Cz(Cz({},u),{},{navigationStrategy:!0,children:(0,S.jsx)(kz,{type:i,value:r,intl:n,formField:e})}),"formDataContainer-".concat(t.__key,"-").concat(o,"-").concat(a))})));return(0,S.jsx)(Ez,{children:l},r)};var Dz=function(e,t){return(0,S.jsx)(vz,{path:e.id,entityKey:t.__key,type:"displayExpression",value:null,children:(0,S.jsx)(nl.Z,{type:"html",breakWords:!1,value:t[e.id]})},"action-"+e.id)},Pz=function(e,t,n){return(0,S.jsx)(xz,{onClick:function(e){e.stopPropagation()},children:(0,S.jsx)(my.Action,{definition:e,selection:my.getSingleEntitySelection(t.__model,t.__key),parent:n},"tableAction"+e.id)},"action-"+e.id)};function _z(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function jz(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_z(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_z(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Tz=function(e,t){return(t||e.selection.query).hasUserChanges&&e.list.searchListFormDefinition?e.list.searchListFormDefinition:e.list.formDefinition},Rz=function(e){return e.children.find((function(e){return e.componentType===YI.componentTypes.TABLE}))},Iz=function(e){var t=Rz(e);return t.sorting?t.sorting:[]},Mz=function(e){return!!e&&!1!==Rz(e).selectable},Nz=function(e){return!0===e.disablePreferencesMenu},Bz=function(e){var t=Rz(e);return(null==t?void 0:t.endpoint)||null},Zz=function(e){var t=Rz(e);return(null==t?void 0:t.searchEndpoint)||null},Fz=function(e){var t=Rz(e);return(null==t?void 0:t.constriction)||null},Lz=function(e){return!e.hidden},Hz=function(e,t){var n=t&&t.findIndex((function(t){return t.field===e.id}));return n>=0?{sortRank:n+1,order:t[n].order}:null},Uz=["counter","decimal","double","integer","latitude","long","longitude","moneyamount","percent","serial","sorting","version"],zz=function(e){return e.children&&1===e.children.length&&Uz.includes(e.children[0].dataType)},Wz=function(e){return e.length>1?(0,S.jsx)(Az,{children:e}):e},Vz=function(e,t,n){return function(r){return function(e,t,n,r){var o=e.componentType;return my.isAction(o)?Pz(e,t,n):o===YI.componentTypes.FIELD?Sz(e,t,r):o===YI.componentTypes.DISPLAY?Dz(e,t):void 0}(r,e,t,n)}},Yz=function(e){var t=e.cellRenderers,n=e.columnDefinition,r=e.parent,o=e.intl;return n.clientRenderer&&t[n.clientRenderer]?function(e,t,n){return function(r){var o=r.rowData,i=r.column;return e(o,i,Vz(o,t,n))}}(t[n.clientRenderer],r,o):n.children.some((function(e){return e.onlyShowOnEmptyColumn}))?function(e,t){return function(n){var r=n.rowData,o=n.column,i=o.children.some((function(e){return!e.onlyShowOnEmptyColumn&&e.path&&r[e.path]})),a=o.children.filter((function(e){return i===!e.onlyShowOnEmptyColumn})).map(Vz(r,e,t));return Wz(a)}}(r,o):function(e){var t=e.rowData,n=e.column;return Wz(n.children.map(Vz(t,r,o)))}},qz=function(e){var t=e.table,n=e.sorting,r=e.sortable,o=void 0===r||r,i=e.parent,a=e.intl,c=e.columnDisplayPreferences,s=void 0===c?{}:c,u=e.cellRenderers,l=void 0===u?{}:u;return t.children.filter((function(e){return Object.prototype.hasOwnProperty.call(s,e.id)?s[e.id]:!e.hidden})).filter((function(e){return!i||1!==e.children.length||e.children[0].path!==i.reverseRelationName})).filter((function(e){return e.children.filter(Lz).length>0})).map((function(e){return{id:e.id,label:e.label,sorting:jz({sortable:o&&e.sortable},Hz(e,n)),shrinkToContent:e.shrinkToContent||!1,children:e.children.filter(Lz),resizable:!e.widthFixed,rightAligned:zz(e),CellRenderer:Yz({cellRenderers:l,columnDefinition:e,parent:i,intl:a})}}))},Gz=function(e,t){var n=[],r=[],o=qz({table:Rz(e),columnDisplayPreferences:t}).reduce((function(e,t){return[].concat(z()(e),z()(t.children.filter((function(e){return!my.isAction(e.componentType)})).map((function(e){if(Lm.relationFieldTypes.includes(e.dataType))n.push(e.path);else if("display"===e.componentType)return r.push(e.id),null;return e.path})).filter((function(e){return e}))))}),[]);return{paths:wb()(o),relationFields:n,displayExpressionFields:r}},Qz=function(e){return Xz(e)},Xz=function e(t){return"field-set"===t.componentType?t.children.reduce((function(e,t){return jz(jz({},e),{},L()({},t.path||t.id,t.dataType))}),{}):t.children?t.children.reduce((function(t,n){return jz(jz({},t),e(n))}),{}):void 0},Kz=function e(t,n){if("field-set"===t.componentType){var r=t.children.some((function(e){return e.path===n}));return jz(jz(jz({},t),r&&{readonly:!0}),{},{children:t.children.map((function(e){return e.path===n?jz(jz({},e),{},{dataType:"single-select-box"}):e}))})}return t.children?jz(jz({},t),{},{children:t.children.map((function(t){return e(t,n)}))}):t},$z=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Rz(e).children.filter((function(e){return!t||1!==e.children.length||e.children[0].path!==t.reverseRelationName})).map((function(e){return jz(jz({},e),{},{hidden:Object.prototype.hasOwnProperty.call(n,e.id)?!n[e.id]:e.hidden})}))},Jz={SINGLE:"single",MULTI:"multi",MULTI_EXPLICIT:"multi_explicit",NONE:"none"};l().oneOf(Object.keys(Jz).map((function(e){return Jz[e]})));function eW(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return tW(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return tW(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){c=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(c)throw i}}}}function tW(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var nW=function(e,t){return e-t},rW=function(e,t,n){var r,o=e.slice(),i=eW(t);try{var a=function(){var e=r.value;n?o.push(e):o=o.filter((function(t){return t!==e}))};for(i.s();!(r=i.n()).done;)a()}catch(e){i.e(e)}finally{i.f()}return wb()(o).sort(nW)},oW={initialize:vU,changePage:function(e){return{type:oU,payload:{page:e}}},refresh:kU,setSortingInteractive:function(e,t){return{type:dU,payload:{field:e,add:t}}},onRowClick:function(e){return{type:cU,payload:{id:e}}},onSelectChange:sz,setSelection:cz,changePosition:function(e,t,n){return{type:TZ,payload:{field:e,afterFieldPosition:t,columns:n}}},resetSorting:WZ,changeWidth:function(e,t){return{type:MZ,payload:{field:e,width:t}}}};const iW=(0,_.connect)((function(e,t){return{currentPage:e.list.currentPage,entities:e.list.entities,entityCount:e.list.entityCount,limit:e.input.limit,inProgress:e.list.inProgress,tableSelectionStyle:(r=e.input.selectionStyle,o=Mz(Tz(e)),!1===o||r===Jz.NONE?Jz.NONE:r===Jz.SINGLE?Jz.SINGLE:Jz.MULTI),clickable:(n=Tz(e),!1!==Rz(n).clickable),selection:e.selection.selection,selectionFilterFn:e.input.selectionFilterFn,parent:e.input.parent,showLink:e.input.showLink,navigationStrategy:e.input.navigationStrategy,positions:e.preferences.positions,widths:e.preferences.widths,markable:e.list.entityModel.markable&&e.list.formDefinition.markable,disablePreferencesMenu:Nz(Tz(e)),scrollBehaviour:e.input.scrollBehaviour};var n,r,o}),oW)((0,P.ZP)(JU));var aW=function(e){var t=e.selection,n=e.input;return t.selection.length>0||"multi_explicit"===n.selectionStyle?{entityName:e.input.entityName,type:"ID",ids:t.selection,count:t.selection.length||0}:{entityName:e.input.entityName,type:"QUERY",query:t.query,count:t.queryCount||0}};const cW=(0,_.connect)((function(e,t){return{selection:aW(e)}}),{})(my.Action);var sW,uW;const lW=b.ZP.div(sW||(sW=Ld()(["\n display: flex;\n width: max-content;\n"])));var dW=b.ZP.span.withConfig({displayName:"StyledButton"})(uW||(uW=Ld()(["\n border-radius: ",";\n padding: 0.3rem 1.3rem;\n display: ",";\n margin-right: 1rem;\n align-items: center;\n cursor: pointer;\n background-color: ",";\n\n &:hover {\n background-color: ",";\n\n * {\n color: ",";\n }\n }\n\n && {\n * {\n color: ",";\n }\n\n button {\n background-color: transparent;\n margin-left: 0.5rem;\n margin-top: -0.2rem;\n margin-right: -0.8rem;\n\n &:hover * {\n color: ",";\n }\n }\n }\n"])),Jm.Z.radii("medium"),(function(e){return e.disabled?"none":"flex"}),(function(e){return e.active&&Jm.Z.color("secondary")}),Jm.Z.color("secondaryLight"),Jm.Z.color("paper"),(function(e){return e.active&&Jm.Z.color("paper")}),Jm.Z.color("secondary"));const fW=function(e){var t,n=e.intl,r=e.selection,o=e.showSelectedRecords,i=e.toggleShowSelectedRecords,a=e.queryCount,c=e.clearSelection,s=0!==r.length;return(0,S.jsxs)(lW,{children:[(0,S.jsx)(dW,{active:!o,onClick:function(){(o||s)&&i()},children:(0,S.jsx)(Zd.ZP.Span,{children:(0,S.jsx)(fd.Z,{id:"client.entity-list.selectionAll",values:{count:a}})})}),(0,S.jsx)(dW,{active:o,disabled:!s,onClick:function(){s&&i()},"data-cy":"selection-controller-selection",children:(0,S.jsxs)(Zd.ZP.Span,{children:[(0,S.jsx)(fd.Z,{id:"client.entity-list.selectionSelection",values:{count:r.length}}),r.length>0&&(0,S.jsx)(pd.Z,{"data-cy":"selection-controller-delete-selection",dense:!0,icon:"times",title:(t="client.entity-list.clearSelection",n.formatMessage({id:t})),onClick:function(e){e.stopPropagation(),o&&i(),c()}})]})})]})},pW=fW;var hW={clearSelection:uz,toggleShowSelectedRecords:function(){return{type:iz}}};const mW=(0,_.connect)((function(e,t){return{queryCount:e.selection.queryCount,selection:e.selection.selection,showSelectedRecords:e.selection.showSelectedRecords}}),hW)((0,P.ZP)(pW));var gW,vW,yW,bW,wW=function(e){var t=e.dataLoadingInProgress,n=e.formDefinition,r=e.parent,o=e.showSelectionController,i=e.showActions;if(n){var a=o?[gW||(gW=(0,S.jsx)(mW,{},"selectionController"))]:[],c=function(e){return e.children.find((function(e){return e.componentType===YI.componentTypes.ACTION_BAR}))}(n),s=!1!==i&&c?[(0,S.jsx)(cW,{definition:c,parent:r,disabled:t},"listAction-".concat(c.id))]:[];return{content:[].concat(a,s),actionBar:c}}return null},AW=b.ZP.div.withConfig({displayName:"StyledListWrapper"})(vW||(vW=Ld()(["\n grid-row-start: table-start;\n ","\n"])),(function(e){var t=e.tableMinHeight;return t&&"min-height: ".concat(t,";")})),xW=b.ZP.div.withConfig({displayName:"StyledActionWrapper"})(yW||(yW=Ld()(["\n display: flex;\n background-color: ",";\n margin-bottom: 3px;\n /* remove left padding on widget */\n padding: ",";\n grid-row-start: action-start;\n flex-wrap: wrap;\n\n & > * {\n margin-top: 8px;\n }\n"])),Jm.Z.color("paper"),(function(e){return"widget"===e.env?"0 0 8px 0":"0 8px 8px"})),EW=b.ZP.div.withConfig({displayName:"StyledListView"})(bW||(bW=Ld()(["\n display: grid;\n grid-template-rows: [action-start] auto [table-start] minmax(0, 1fr);\n height: 100%;\n"]))),OW=function(e){var t=e.dataLoadingInProgress,n=e.formDefinition,r=e.parent,o=e.searchFormPosition,i=e.showActions,a=e.showSelectionController,c=e.sorting,s=e.columnDisplayPreferences,u=e.cellRenderers,l=e.preferencesLoaded,d=e.intl,f=e.sortable,h=e.tableMinHeight,m=(0,R.useMemo)((function(){if(n&&l){var e=Rz(n),t=qz({table:e,sorting:c,sortable:f,parent:r,intl:d,columnDisplayPreferences:s,cellRenderers:u});return(0,S.jsx)(AW,{searchFormPosition:o,tableMinHeight:h,children:(0,S.jsx)(iW,{columnDefinitions:t},"table-".concat(e.id))},"tableWrapper-".concat(e.id))}}),[n,c,s,l,f,r,d,u,o,h]),g=(0,R.useMemo)((function(){if(n){var e=wW({formDefinition:n,parent:r,dataLoadingInProgress:t,showSelectionController:a,showActions:i})||{},o=e.content,c=e.actionBar;if(o.length>0&&c)return(0,S.jsx)(zE.ZP,{children:function(e){return(0,S.jsx)(xW,{ref:e,env:Hm.Z.getEmbedType(),children:o})}},"listActionWrapper-".concat(c.id))}}),[t,n,r,a,i]);return(0,S.jsx)(Z.Z,{required:[n],loadingText:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return d.formatMessage({id:e},t)}("client.entity-list.loadingText"),children:(0,S.jsxs)(EW,{children:[(0,S.jsx)(p.Z.ErrorBoundary,{children:g}),(0,S.jsx)(p.Z.ErrorBoundary,{children:m})]})})},CW=function(e,t){return 0===Object.keys(UE.Z.difference(e,t)).length};const kW=I().memo(OW,CW);const SW=(0,_.connect)((function(e,t){return{formDefinition:Tz(e),selection:e.selection.selection,currentPageIds:e.list.entities.map((function(e){return e.__key})),entityName:e.input.entityName,parent:e.input.parent,dataLoadingInProgress:e.list.inProgress,showSelectionController:(n=e.input.selectionStyle,r=e.input.disableSelectionController,o=Mz(Tz(e)),!0!==r&&(!n||n===Jz.MULTI)&&!1!==o),searchFormPosition:e.input.searchFormPosition,showActions:e.input.showActions,sorting:e.list.sorting,sortable:e.input.sortable,columnDisplayPreferences:e.preferences.columns,preferencesLoaded:e.preferences.preferencesLoaded,cellRenderers:e.input.cellRenderers,tableMinHeight:e.input.tableMinHeight};var n,r,o}),null)((0,P.ZP)(kW));var DW={NONE:"none",FULLTEXT:"fulltext",SIMPLE:"simple",SIMPLE_ADVANCED:"simple_advanced",ADVANCED:"advanced",ADMIN:"admin"};l().oneOf(Object.values(DW));const PW=DW;var _W,jW,TW=b.ZP.div.withConfig({displayName:"StyledBasicSearchForm"})(_W||(_W=Ld()(["\n ","\n\n && {\n "," {\n padding-bottom: 0;\n }\n }\n"])),of.C,RE),RW=b.ZP.div.withConfig({displayName:"StyledSearchFormButtons"})(jW||(jW=Ld()(["\n && {\n width: 100%;\n text-align: center;\n }\n"])));const IW=PB({form:"searchForm",destroyOnUnmount:!1})((function(e){var t=e.searchFormType,n=e.entity,r=e.form,o=e.formValues,i=e.intl,a=e.preselectedSearchFields,c=e.searchFormDefinition,s=e.setShowExtendedSearchForm,u=e.showExtendedSearchForm,l=e.simpleSearchFields,d=e.submitSearchForm,f=(0,R.useRef)(null);if(H.Z.useAutofocus(f,{selectFulltextFields:!0},[c]),!c.children)return null;var p,h=YI.getFieldDefinitions(c),m=l&&l.length>0?l:h.filter((function(e){return!0===e.simpleSearch})).map((function(e){return e.path||e.id})),g=!h.every((function(e){return m.includes(e.id)})),v=g&&t===PW.SIMPLE_ADVANCED;return(0,S.jsx)(TW,{ref:f,children:(0,S.jsxs)("form",{onSubmit:function(e){e.preventDefault(),e.stopPropagation(),d()},children:[v&&(0,S.jsx)(RW,{children:(0,S.jsx)(_O.Z,{"data-cy":"extend-search-button",icon:"chevron-".concat(u?"up":"down"),onClick:function(){s(!u)},title:(p="client.entity-list.extendedSearch",i.formatMessage({id:p}))})}),(0,S.jsx)(YI.FormBuilder,{entity:n,formName:r,formDefinition:c,formValues:o,fieldMappingType:"search",beforeRenderField:function(e){return!function(e,t){if(!e)return!1;var n=e.find((function(e){return e.id===t}));return n&&n.hidden}(a,e)&&(u||m.includes(e))},mode:"search"})]})})})),MW=IW;var NW={submitSearchForm:wF,setShowExtendedSearchForm:function(e){return{type:XZ,payload:{showExtendedSearchForm:e}}}};const BW=(0,_.connect)((function(e,t){return{searchFormDefinition:e.searchForm.formDefinition,entityModel:e.list.entityModel,searchInputs:e.searchForm.searchInputs,searchFormType:e.entityList.searchFormType,simpleSearchFields:e.searchForm.simpleSearchFields,showExtendedSearchForm:[PW.ADVANCED,PW.ADMIN].includes(e.entityList.searchFormType)||e.searchForm.showExtendedSearchForm,preselectedSearchFields:e.input.preselectedSearchFields}}),NW)((0,P.ZP)(MW));var ZW,FW,LW=b.ZP.div.withConfig({displayName:"StyledSearchBox"})(ZW||(ZW=(0,v.Z)(["\n && {\n margin-right: ",";\n margin-top: ",";\n margin-left: ",";\n\n "," {\n border: 0;\n width: 100%;\n border-bottom: 1px solid ",";\n padding-right: 0.3rem;\n\n /* clears the ‘X’ from Chrome */\n input[type='search']::-webkit-search-decoration,\n input[type='search']::-webkit-search-cancel-button,\n input[type='search']::-webkit-search-results-button,\n input[type='search']::-webkit-search-results-decoration {\n display: none;\n }\n\n &:focus {\n outline: none;\n }\n }\n }\n"])),x.Z.space(0),x.Z.space(-2.8),x.Z.space(-2.8),RR,Jm.Z.color("text")),HW=b.ZP.input.attrs((function(e){return{type:"search",placeholder:e.placeholder}})).withConfig({displayName:"StyledSearchBoxInput"})(FW||(FW=(0,v.Z)(["\n &&&& {\n ","\n }\n"])),aS),UW=I().forwardRef((function(e,t){var n=e.value,r=e.minInputLength,o=e.onSearch,i=e.placeholder,a=(0,R.useState)(n||""),c=(0,wd.Z)(a,2),s=c[0],u=c[1];return(0,S.jsx)(LW,{children:(0,S.jsx)(FR,{hasValue:Boolean(s),children:(0,S.jsxs)(iS,{children:[(0,S.jsx)(HW,{"data-cy":"ui-search-box",ref:t,onChange:function(e){var t=e.target.value;u(t),(0===t.length||t.length>=r)&&o(t)},value:s,"aria-label":i,placeholder:i}),(null==s?void 0:s.length)>0&&(0,S.jsx)(_O.Z,{"data-cy":"reset-button",icon:"times",onClick:function(){u(""),o("")}})]})})})}));UW.defaultProps={debounce:200,minInputLength:3};const zW=H.Z.Debouncer(UW,100,"onSearch");const WW=PB({form:"searchForm",destroyOnUnmount:!1})((function(e){var t=e.submitSearchForm,n=e.intl,r=(0,R.useCallback)((function(e){return n.formatMessage({id:e})}),[n]),o=(0,R.useMemo)((function(){return function(e){var t=e.input;return(0,S.jsx)(zW,{value:t.value,liveSearch:!0,onSearch:function(e){return t.onChange(e)},placeholder:r("client.entity-list.fullTextPlaceholder")})}}),[r]);return(0,S.jsx)("form",{onSubmit:function(e){e.preventDefault(),e.stopPropagation(),t()},children:(0,S.jsx)(dE,{name:"txtFulltext",component:o})})})),VW=WW;var YW={submitSearchForm:wF};const qW=(0,_.connect)(null,YW)((0,P.ZP)(VW));const GW=function(e){return function(t,n){var r=function(e){var t=e.deepEqual,n=e.empty,r=e.getIn;return function(e,o){return function(i){for(var a=o||function(e){return r(e,"form")},c=a(i),s=arguments.length,u=new Array(s>1?s-1:0),l=1;l<s;l++)u[l-1]=arguments[l];if(u&&u.length)return u.every((function(n){var o=r(c,e+".initial."+n),i=r(c,e+".values."+n);return t(o,i)}));var d=r(c,e+".initial")||n,f=r(c,e+".values")||d;return t(d,f)}}}(e)(t,n);return function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];return!r.apply(void 0,[e].concat(n))}}}(ox);const QW=function(e){var t=e.children,n=TF(),r=n.sidepanelPosition,o=n.isCollapsed,i=n.toggleCollapse;return"left"!==r?null:(0,S.jsxs)(JF,{children:[(0,S.jsx)($F,{icon:"chevron-left",isCollapsed:o,onClick:i}),t]})};var XW="undefined"!=typeof window?window:null,KW=null===XW,$W=KW?void 0:XW.document,JW="horizontal",eV=function(){return!1},tV=KW?"calc":["","-webkit-","-moz-","-o-"].filter((function(e){var t=$W.createElement("div");return t.style.cssText="width:"+e+"calc(9px)",!!t.style.length})).shift()+"calc",nV=function(e){return"string"==typeof e||e instanceof String},rV=function(e){if(nV(e)){var t=$W.querySelector(e);if(!t)throw new Error("Selector "+e+" did not match a DOM element");return t}return e},oV=function(e,t,n){var r=e[t];return void 0!==r?r:n},iV=function(e,t,n,r){if(t){if("end"===r)return 0;if("center"===r)return e/2}else if(n){if("start"===r)return 0;if("center"===r)return e/2}return e},aV=function(e,t){var n=$W.createElement("div");return n.className="gutter gutter-"+t,n},cV=function(e,t,n){var r={};return nV(t)?r[e]=t:r[e]=tV+"("+t+"% - "+n+"px)",r},sV=function(e,t){var n;return(n={})[e]=t+"px",n};const uV=function(e,t){if(void 0===t&&(t={}),KW)return{};var n,r,o,i,a,c,s=e;Array.from&&(s=Array.from(s));var u=rV(s[0]).parentNode,l=getComputedStyle?getComputedStyle(u):null,d=l?l.flexDirection:null,f=oV(t,"sizes")||s.map((function(){return 100/s.length})),p=oV(t,"minSize",100),h=Array.isArray(p)?p:s.map((function(){return p})),m=oV(t,"maxSize",1/0),g=Array.isArray(m)?m:s.map((function(){return m})),v=oV(t,"expandToMin",!1),y=oV(t,"gutterSize",10),b=oV(t,"gutterAlign","center"),w=oV(t,"snapOffset",30),A=Array.isArray(w)?w:s.map((function(){return w})),x=oV(t,"dragInterval",1),E=oV(t,"direction",JW),O=oV(t,"cursor",E===JW?"col-resize":"row-resize"),C=oV(t,"gutter",aV),k=oV(t,"elementStyle",cV),S=oV(t,"gutterStyle",sV);function D(e,t,r,o){var i=k(n,t,r,o);Object.keys(i).forEach((function(t){e.style[t]=i[t]}))}function P(){return c.map((function(e){return e.size}))}function _(e){return"touches"in e?e.touches[0][r]:e[r]}function j(e){var t=c[this.a],n=c[this.b],r=t.size+n.size;t.size=e/this.size*r,n.size=r-e/this.size*r,D(t.element,t.size,this._b,t.i),D(n.element,n.size,this._c,n.i)}function T(e){var n,r=c[this.a],o=c[this.b];this.dragging&&(n=_(e)-this.start+(this._b-this.dragOffset),x>1&&(n=Math.round(n/x)*x),n<=r.minSize+r.snapOffset+this._b?n=r.minSize+this._b:n>=this.size-(o.minSize+o.snapOffset+this._c)&&(n=this.size-(o.minSize+this._c)),n>=r.maxSize-r.snapOffset+this._b?n=r.maxSize+this._b:n<=this.size-(o.maxSize-o.snapOffset+this._c)&&(n=this.size-(o.maxSize+this._c)),j.call(this,n),oV(t,"onDrag",eV)(P()))}function R(){var e=c[this.a].element,t=c[this.b].element,r=e.getBoundingClientRect(),a=t.getBoundingClientRect();this.size=r[n]+a[n]+this._b+this._c,this.start=r[o],this.end=r[i]}function I(e){var t=function(e){if(!getComputedStyle)return null;var t=getComputedStyle(e);if(!t)return null;var n=e[a];return 0===n?null:n-=E===JW?parseFloat(t.paddingLeft)+parseFloat(t.paddingRight):parseFloat(t.paddingTop)+parseFloat(t.paddingBottom)}(u);if(null===t)return e;if(h.reduce((function(e,t){return e+t}),0)>t)return e;var n=0,r=[],o=e.map((function(o,i){var a=t*o/100,c=iV(y,0===i,i===e.length-1,b),s=h[i]+c;return a<s?(n+=s-a,r.push(0),s):(r.push(a-s),a)}));return 0===n?e:o.map((function(e,o){var i=e;if(n>0&&r[o]-n>0){var a=Math.min(n,r[o]-n);n-=a,i=e-a}return i/t*100}))}function M(){var e=this,n=c[e.a].element,r=c[e.b].element;e.dragging&&oV(t,"onDragEnd",eV)(P()),e.dragging=!1,XW.removeEventListener("mouseup",e.stop),XW.removeEventListener("touchend",e.stop),XW.removeEventListener("touchcancel",e.stop),XW.removeEventListener("mousemove",e.move),XW.removeEventListener("touchmove",e.move),e.stop=null,e.move=null,n.removeEventListener("selectstart",eV),n.removeEventListener("dragstart",eV),r.removeEventListener("selectstart",eV),r.removeEventListener("dragstart",eV),n.style.userSelect="",n.style.webkitUserSelect="",n.style.MozUserSelect="",n.style.pointerEvents="",r.style.userSelect="",r.style.webkitUserSelect="",r.style.MozUserSelect="",r.style.pointerEvents="",e.gutter.style.cursor="",e.parent.style.cursor="",$W.body.style.cursor=""}function N(e){if(!("button"in e)||0===e.button){var n=this,r=c[n.a].element,o=c[n.b].element;n.dragging||oV(t,"onDragStart",eV)(P()),e.preventDefault(),n.dragging=!0,n.move=T.bind(n),n.stop=M.bind(n),XW.addEventListener("mouseup",n.stop),XW.addEventListener("touchend",n.stop),XW.addEventListener("touchcancel",n.stop),XW.addEventListener("mousemove",n.move),XW.addEventListener("touchmove",n.move),r.addEventListener("selectstart",eV),r.addEventListener("dragstart",eV),o.addEventListener("selectstart",eV),o.addEventListener("dragstart",eV),r.style.userSelect="none",r.style.webkitUserSelect="none",r.style.MozUserSelect="none",r.style.pointerEvents="none",o.style.userSelect="none",o.style.webkitUserSelect="none",o.style.MozUserSelect="none",o.style.pointerEvents="none",n.gutter.style.cursor=O,n.parent.style.cursor=O,$W.body.style.cursor=O,R.call(n),n.dragOffset=_(e)-n.end}}E===JW?(n="width",r="clientX",o="left",i="right",a="clientWidth"):"vertical"===E&&(n="height",r="clientY",o="top",i="bottom",a="clientHeight"),f=I(f);var B=[];function Z(e){var t=e.i===B.length,n=t?B[e.i-1]:B[e.i];R.call(n);var r=t?n.size-e.minSize-n._c:e.minSize+n._b;j.call(n,r)}return c=s.map((function(e,t){var r,o={element:rV(e),size:f[t],minSize:h[t],maxSize:g[t],snapOffset:A[t],i:t};if(t>0&&((r={a:t-1,b:t,dragging:!1,direction:E,parent:u})._b=iV(y,t-1==0,!1,b),r._c=iV(y,!1,t===s.length-1,b),"row-reverse"===d||"column-reverse"===d)){var i=r.a;r.a=r.b,r.b=i}if(t>0){var a=C(t,E,o.element);!function(e,t,r){var o=S(n,t,r);Object.keys(o).forEach((function(t){e.style[t]=o[t]}))}(a,y,t),r._a=N.bind(r),a.addEventListener("mousedown",r._a),a.addEventListener("touchstart",r._a),u.insertBefore(a,o.element),r.gutter=a}return D(o.element,o.size,iV(y,0===t,t===s.length-1,b),t),t>0&&B.push(r),o})),c.forEach((function(e){var t=e.element.getBoundingClientRect()[n];t<e.minSize&&(v?Z(e):e.minSize=t)})),{setSizes:function(e){var t=I(e);t.forEach((function(e,n){if(n>0){var r=B[n-1],o=c[r.a],i=c[r.b];o.size=t[n-1],i.size=e,D(o.element,o.size,r._b,o.i),D(i.element,i.size,r._c,i.i)}}))},getSizes:P,collapse:function(e){Z(c[e])},destroy:function(e,t){B.forEach((function(r){if(!0!==t?r.parent.removeChild(r.gutter):(r.gutter.removeEventListener("mousedown",r._a),r.gutter.removeEventListener("touchstart",r._a)),!0!==e){var o=k(n,r.a.size,r._b);Object.keys(o).forEach((function(e){c[r.a].element.style[e]="",c[r.b].element.style[e]=""}))}}))},parent:u,pairs:B}};function lV(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&-1===t.indexOf(r)&&(n[r]=e[r]);return n}var dV=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.componentDidMount=function(){var e=this.props;e.children;var t=e.gutter,n=lV(e,["children","gutter"]);n.gutter=function(e,n){var r;return t?r=t(e,n):(r=document.createElement("div")).className="gutter gutter-"+n,r.__isSplitGutter=!0,r},this.split=uV(this.parent.children,n)},t.prototype.componentDidUpdate=function(e){var t=this,n=this.props;n.children;var r=n.minSize,o=n.sizes,i=n.collapsed,a=lV(n,["children","minSize","sizes","collapsed"]),c=e.minSize,s=e.sizes,u=e.collapsed,l=["maxSize","expandToMin","gutterSize","gutterAlign","snapOffset","dragInterval","direction","cursor"].map((function(n){return t.props[n]!==e[n]})).reduce((function(e,t){return e||t}),!1);if(Array.isArray(r)&&Array.isArray(c)){var d=!1;r.forEach((function(e,t){d=d||e!==c[t]})),l=l||d}else l=!(!Array.isArray(r)&&!Array.isArray(c))||(l||r!==c);if(l)a.minSize=r,a.sizes=o||this.split.getSizes(),this.split.destroy(!0,!0),a.gutter=function(e,t,n){return n.previousSibling},this.split=uV(Array.from(this.parent.children).filter((function(e){return!e.__isSplitGutter})),a);else if(o){var f=!1;o.forEach((function(e,t){f=f||e!==s[t]})),f&&this.split.setSizes(this.props.sizes)}Number.isInteger(i)&&(i!==u||l)&&this.split.collapse(i)},t.prototype.componentWillUnmount=function(){this.split.destroy(),delete this.split},t.prototype.render=function(){var e=this,t=this.props;t.sizes,t.minSize,t.maxSize,t.expandToMin,t.gutterSize,t.gutterAlign,t.snapOffset,t.dragInterval,t.direction,t.cursor,t.gutter,t.elementStyle,t.gutterStyle,t.onDrag,t.onDragStart,t.onDragEnd,t.collapsed;var n=t.children,r=lV(t,["sizes","minSize","maxSize","expandToMin","gutterSize","gutterAlign","snapOffset","dragInterval","direction","cursor","gutter","elementStyle","gutterStyle","onDrag","onDragStart","onDragEnd","collapsed","children"]);return I().createElement("div",Object.assign({},{ref:function(t){e.parent=t}},r),n)},t}(I().Component);dV.propTypes={sizes:l().arrayOf(l().number),minSize:l().oneOfType([l().number,l().arrayOf(l().number)]),maxSize:l().oneOfType([l().number,l().arrayOf(l().number)]),expandToMin:l().bool,gutterSize:l().number,gutterAlign:l().string,snapOffset:l().oneOfType([l().number,l().arrayOf(l().number)]),dragInterval:l().number,direction:l().string,cursor:l().string,gutter:l().func,elementStyle:l().func,gutterStyle:l().func,onDrag:l().func,onDragStart:l().func,onDragEnd:l().func,collapsed:l().number,children:l().arrayOf(l().element)},dV.defaultProps={sizes:void 0,minSize:void 0,maxSize:void 0,expandToMin:void 0,gutterSize:void 0,gutterAlign:void 0,snapOffset:void 0,dragInterval:void 0,direction:void 0,cursor:void 0,gutter:void 0,elementStyle:void 0,gutterStyle:void 0,onDrag:void 0,onDragStart:void 0,onDragEnd:void 0,collapsed:void 0,children:void 0};const fV=dV;var pV,hV,mV,gV,vV,yV,bV,wV,AV=(0,b.ZP)(fV).withConfig({displayName:"StyledSplit"})(pV||(pV=Ld()(["\n height: calc(100% - 40px);\n display: flex;\n flex-direction: column;\n"]))),xV=b.ZP.div.withConfig({displayName:"StyledSplitWrapper"})(hV||(hV=Ld()(["\n height: 100%;\n"]))),EV=b.ZP.div.withConfig({displayName:"Box"})(mV||(mV=Ld()(["\n background-color: ",";\n overflow-y: auto;\n padding: "," "," 0 ",";\n position: relative;\n\n &:first-of-type {\n z-index: 2; // higher than StyledTether to prevent cover on scroll\n }\n ","\n"])),Jm.Z.color("paper"),x.Z.space(-1.1),x.Z.space(-.375),x.Z.space(-1.1),of.C),OV=b.ZP.div.withConfig({displayName:"StyledGutter"})(gV||(gV=Ld()(["\n background-color: ",";\n display: flex;\n padding-top: 3px;\n justify-content: center;\n align-items: center;\n height: calc(100% - 1px); //subtract border height from total height\n font-size: 20px;\n border-top: 1px solid ",";\n position: relative;\n z-index: 2;\n\n &:hover {\n cursor: row-resize;\n }\n"])),Jm.Z.color("paper"),Jm.Z.color("backgroundBody")),CV=b.ZP.div.withConfig({displayName:"StyledQueryBox"})(vV||(vV=Ld()(["\n height: 100%;\n background-color: ",";\n border-bottom: 3px solid ",";\n position: relative;\n z-index: 2; // higher than StyledTether to prevent cover on scroll\n overflow-y: auto;\n padding: "," "," 0 ",";\n\n "," {\n z-index: 3; //higher than rest to lay over query field\n }\n ","\n"])),Jm.Z.color("paper"),Jm.Z.color("backgroundBody"),x.Z.space(-1.1),x.Z.space(-.375),x.Z.space(-1.1),Xv,of.C),kV=b.ZP.pre.withConfig({displayName:"StyledErrorMessage"})(yV||(yV=Ld()(["\n && {\n ","\n margin-left: ",";\n white-space: pre-wrap;\n word-break: break-word;\n color: ",";\n }\n"])),(0,A.Z)({fontFamily:Jm.Z.fontFamily("monospace")}),x.Z.space(-1),Jm.Z.color("signal.danger.text"));const SV=function(e){var t=e.setQueryViewVisible,n=e.msg,r=e.entityModel,o=e.query,i=e.queryError,a=e.loadSearchAsQuery,c=e.saveQueryAsFilter,s=e.setQuery,u=e.runQuery,l=e.clearQuery,d=(0,R.useRef)(null);H.Z.useAutofocus(d);var f={onChange:s},p={mode:"tql",implicitModel:r},h=!(null==o||!o.trim().length)>0,m=i&&0!==Object.entries(i).length,g=!h||m,v=Object.values(i||{}),y=function(e,t){return e?"danger":t?"info":void 0}(m,h);return(0,S.jsxs)(S.Fragment,{children:[(0,S.jsxs)(QW,{children:[(0,S.jsx)(_O.Z,{"data-cy":"search-view-button",icon:"filter",onClick:function(){return t(!1)},title:n("client.entity-list.search_view")}),(0,S.jsx)(_O.Z,{"data-cy":"search-button",icon:"search",onClick:u,title:n("client.entity-list.query.search"),disabled:g}),(0,S.jsx)(_O.Z,{"data-cy":"clear-button",icon:"times",onClick:l,title:n("client.entity-list.reset"),disabled:!h}),(0,S.jsxs)(BU,{buttonProps:{icon:"ellipsis-v"},children:[(0,S.jsx)(Yv,{onClick:a,children:bV||(bV=(0,S.jsx)(fd.Z,{id:"client.entity-list.query.search.open"}))}),(0,S.jsx)(Yv,{onClick:c,disabled:g,children:wV||(wV=(0,S.jsx)(fd.Z,{id:"client.entity-list.query.filter.save"}))})]})]}),(0,S.jsxs)(CV,{ref:d,children:[(0,S.jsx)(FR,{isDisplay:!0,hasValue:!0,label:n("client.entity-list.query.entity-model"),children:(0,S.jsx)(nl.Z,{type:"string",value:r})}),(0,S.jsx)(FR,{touched:h,fixLabel:!0,hasValue:h,label:n("client.entity-list.query.editor"),signal:y,children:(0,S.jsx)(iT,{type:"code",value:o,options:p,events:f})}),v.map((function(e,t){return(0,S.jsx)(kV,{children:e},t)}))]})]})};var DV,PV,_V,jV,TV,RV,IV,MV,NV,BV,ZV,FV,LV=b.ZP.div.withConfig({displayName:"SearchFilterListWrapper"})(DV||(DV=Ld()(["\n margin-top: 0.4rem;\n margin-bottom: 0.4rem;\n"]))),HV=(0,b.ZP)(DP.Fe).withConfig({displayName:"StyledSpanSearchFilter"})(PV||(PV=Ld()(["\n width: 90%;\n"]))),UV=(0,b.ZP)(pd.Z).withConfig({displayName:"StyledAddRemoveButton"})(_V||(_V=Ld()(["\n && {\n background-color: transparent;\n border: 0;\n height: auto;\n border-radius: 0;\n padding: 0 "," 0 0;\n\n &:hover * {\n color: "," !important;\n }\n }\n"])),x.Z.space(-2.5),(function(e){return e.active?Jm.Z.color("paper"):Jm.Z.color("secondary")})),zV=b.ZP.div.withConfig({displayName:"StyledMenuWrapper"})(jV||(jV=Ld()(["\n &&& {\n button {\n background-color: transparent;\n padding: 0 "," 0 0;\n }\n\n &:hover button {\n color: ",";\n cursor: pointer;\n }\n }\n"])),x.Z.space(-1),(function(e){return e.active?Jm.Z.color("paper"):Jm.Z.color("secondary")})),WV=b.ZP.div.withConfig({displayName:"StyleButtonWrapper"})(TV||(TV=Ld()(["\n display: flex;\n "," button,\n "," * {\n color: transparent;\n }\n"])),zV,UV),VV=b.ZP.div.withConfig({displayName:"StyledSearchFilterButton"})(RV||(RV=Ld()(["\n border-radius: ",";\n display: flex;\n padding: 0.3rem 0 0.3rem 1rem;\n margin-bottom: 0.2rem;\n background-color: ",";\n justify-content: flex-end;\n\n && {\n *:not(",") {\n color: ",";\n }\n }\n ","\n ","\n"])),Jm.Z.radii("medium"),(function(e){return e.active&&Jm.Z.color("secondary")}),Uv,(function(e){return e.active&&Jm.Z.color("paper")}),!Nv.b&&(0,b.iv)(IV||(IV=Ld()(["\n &:hover {\n ",",\n "," button,\n "," * {\n color: ",";\n }\n background-color: ",";\n cursor: pointer;\n }\n "])),HV,zV,UV,Jm.Z.color("paper"),(function(e){return!e.active&&Jm.Z.color("secondaryLight")})),Nv.b&&(0,b.iv)(MV||(MV=Ld()(["\n ",",\n "," button,\n "," * {\n color: ",";\n }\n "])),HV,zV,UV,Jm.Z.color("secondary"))),YV=b.ZP.div.withConfig({displayName:"StyledMessageWrapper"})(NV||(NV=Ld()(["\n padding-left: 8px;\n"]))),qV=function(e,t){return e.defaultFilter||t.defaultFilter?e.defaultFilter?-1:1:(null===e.sorting)-(null===t.sorting)||e.sorting-t.sorting},GV=function(e){var t=e.canEdit,n=e.canDelete,r=e.navigationStrategy,o=e.deleteSearchFilter,i=e.primaryKey,a=e.active,c=[];return t&&c.push((0,S.jsx)(Yv,{onClick:function(){return r.openDetail("Search_filter",i)},children:BV||(BV=(0,S.jsx)(fd.Z,{id:"client.entity-list.search.settings.editFilter"}))},"edit-button")),n&&c.push((0,S.jsx)(Yv,{onClick:o,children:ZV||(ZV=(0,S.jsx)(fd.Z,{id:"client.entity-list.search.settings.deleteFilter"}))},"delete-button")),0===c.length?null:(0,S.jsx)(zV,{active:a,children:(0,S.jsx)(BU,{buttonProps:{icon:"ellipsis-v"},children:c})})},QV=function(e){var t=e.setActive,n=e.active,r=e.label,o=e.description,i=e.canEdit,a=e.canDelete,c=e.primaryKey,s=e.navigationStrategy,u=e.deleteSearchFilter;return(0,S.jsxs)(VV,{active:n,onClick:function(){return t(!n)},children:[(0,S.jsx)(HV,{title:o,children:r}),(0,S.jsxs)(WV,{children:[(0,S.jsx)(UV,{active:n,onClick:function(e){t(!1),e.stopPropagation()},icon:n?"minus":"plus",dense:!0}),(0,S.jsx)(GV,{canEdit:i,canDelete:a,navigationStrategy:s,deleteSearchFilter:u,primaryKey:c,active:n})]})]})};const XV=function(e){var t=e.searchFilters,n=e.setSearchFilterActive,r=e.executeSearch,o=e.navigationStrategy,i=e.deleteSearchFilter;return t?0===t.length?FV||(FV=(0,S.jsx)(YV,{children:(0,S.jsx)(Zd.ZP.I,{children:(0,S.jsx)(fd.Z,{id:"client.entity-list.noSearchFilters"})})})):(0,S.jsx)(LV,{children:z()(t).sort(qV).map((function(e){return(0,S.jsx)(QV,{primaryKey:e.key,active:e.active,label:e.label,description:e.description,setActive:function(t){n(e.uniqueId,!e.active,t),r()},canEdit:e.editAllowed,canDelete:e.deleteAllowed,navigationStrategy:o,deleteSearchFilter:function(){return i(e.key)}},e.uniqueId)}))}):null};var KV={setSearchFilterActive:EF,executeSearch:bF,deleteSearchFilter:function(e){return{type:rF,payload:{primaryKey:e}}}};const $V=(0,_.connect)((function(e,t){return{searchFilters:e.searchForm.searchFilters,navigationStrategy:e.input.navigationStrategy}}),KV)(XV);var JV,eY,tY,nY,rY,oY,iY,aY,cY,sY;const uY=function(e){var t=e.resetSearch,n=e.msg,r=e.searchFilters,o=e.saveSearchFilter,i=e.saveDefaultSearchFilter,a=e.resetDefaultSearchFilter,c=e.displaySearchFieldsModal,s=e.resetSearchFields,u=e.searchFormDirty,l=e.setQueryViewVisible,d=e.loadSearchAsQuery,f=(0,R.useRef)(null),p=(0,R.useState)([25,75]),h=T()(p,2),m=h[0],g=h[1],v=(0,R.useState)(!1),y=T()(v,2),b=y[0],w=y[1],A=(0,R.useState)(!1),x=T()(A,2),E=x[0],O=x[1];(0,R.useEffect)((function(){var e=r?28*r.length+10:28,t=f.current.clientHeight,n=Math.ceil(100/(t/e));!b&&n>30?(O(!0),g([25,75])):g([n,100-n])}),[r,b]);var C=1===(null==r?void 0:r.filter((function(e){return e.active})).length),k=b?"chevron-up":"chevron-down",D=n(b?"client.entity-list.contract":"client.entity-list.expand");return(0,S.jsxs)(S.Fragment,{children:[(0,S.jsxs)(QW,{children:[(0,S.jsx)(_O.Z,{"data-cy":"query-view-button",icon:"code",onClick:function(){return l(!0)},title:n("client.entity-list.query_view")}),E&&(0,S.jsx)(_O.Z,{icon:k,onClick:function(){return w(!b)},title:D}),(0,S.jsx)(_O.Z,{"data-cy":"reset-button",icon:"times",onClick:t,title:n("client.entity-list.reset")}),(0,S.jsxs)(BU,{buttonProps:{icon:"ellipsis-v"},children:[(0,S.jsx)(Yv,{disabled:!C,onClick:i,children:(0,S.jsx)(rl.Z,{content:!C&&(eY||(eY=(0,S.jsx)(fd.Z,{id:"client.entity-list.search.settings.defaultFilter.save.info"}))),children:tY||(tY=(0,S.jsx)(fd.Z,{id:"client.entity-list.search.settings.defaultFilter.save"}))})}),(0,S.jsx)(Yv,{onClick:a,children:nY||(nY=(0,S.jsx)(fd.Z,{id:"client.entity-list.search.settings.defaultFilter.reset"}))}),(0,S.jsx)(Yv,{onClick:o,disabled:!u,children:rY||(rY=(0,S.jsx)(fd.Z,{id:"client.entity-list.search.settings.saveAsFilter"}))}),(0,S.jsx)(Yv,{onClick:c,children:oY||(oY=(0,S.jsx)(fd.Z,{id:"client.entity-list.search.settings.searchForm.edit"}))}),(0,S.jsx)(Yv,{onClick:s,children:iY||(iY=(0,S.jsx)(fd.Z,{id:"client.entity-list.search.settings.searchForm.reset"}))}),(0,S.jsx)(Yv,{onClick:function(){l(!0),d()},children:aY||(aY=(0,S.jsx)(fd.Z,{id:"client.entity-list.query.search.open"}))})]})]}),(0,S.jsx)(xV,{ref:f,children:(0,S.jsxs)(AV,{direction:"vertical",gutterSize:20,sizes:m,minSize:[90,0],gutter:function(){var e=document.createElement("div");return N().render(JV||(JV=(0,S.jsx)(OV,{tabIndex:0,children:(0,S.jsx)(B.Z,{icon:"horizontal-rule"})})),e),e},children:[cY||(cY=(0,S.jsx)(EV,{children:(0,S.jsx)($V,{})})),sY||(sY=(0,S.jsx)(EV,{children:(0,S.jsx)(BW,{})}))]})})]})};function lY(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function dY(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?lY(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lY(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const fY=(0,P.ZP)((0,b.Zz)((function(e){var t=e.intl,n=e.queryViewVisible,r=function(e){return t.formatMessage({id:e})};return(0,S.jsxs)(S.Fragment,{children:[!n&&(0,S.jsx)(uY,dY({msg:r},e)),n&&(0,S.jsx)(SV,dY({msg:r},e))]})})));var pY={resetSearch:function(){return{type:QZ}},saveSearchFilter:function(){return{type:oF}},saveDefaultSearchFilter:function(){return{type:iF}},resetDefaultSearchFilter:function(){return{type:aF}},displaySearchFieldsModal:function(){return{type:cF}},resetSearchFields:function(){return{type:sF}},loadSearchAsQuery:function(){return{type:uF}},saveQueryAsFilter:function(){return{type:lF}},setQueryViewVisible:OF,setQuery:CF,runQuery:function(){return{type:hF}},clearQuery:function(){return{type:mF}}};const hY=(0,_.connect)((function(e){return{searchFilters:e.searchForm.searchFilters,searchFormDirty:GW("searchForm")(e),entityModel:e.input.entityName,queryViewVisible:e.searchForm.queryViewVisible,query:e.searchForm.query,queryError:e.searchForm.queryError}}),pY)(fY);var mY,gY,vY;const yY=function(e){var t=e.searchFormType;return t===PW.ADMIN?mY||(mY=(0,S.jsx)(p.Z.ErrorBoundary,{children:(0,S.jsx)(hY,{})})):(0,S.jsx)(p.Z.ErrorBoundary,{children:(0,S.jsx)(jE.Wrapper,{isToggleable:!1,isFramed:!1,children:(0,S.jsx)(jE.Body,{children:t===PW.FULLTEXT?gY||(gY=(0,S.jsx)(qW,{})):vY||(vY=(0,S.jsx)(BW,{}))})})})},bY=yY;const wY=(0,_.connect)((function(e,t){return{searchFormType:e.entityList.searchFormType}}),{})((0,P.ZP)(bY));var AY,xY,EY;const OY=function(e){var t=e.searchFormType,n=e.searchFormCollapsed,r=e.searchFormPosition,o=e.scrollBehaviour,i=e.setSearchFormCollapsed;return t===PW.NONE?AY||(AY=(0,S.jsx)(SW,{})):(0,S.jsxs)(tL,{sidepanelPosition:r,sidepanelCollapsed:n,setSidepanelCollapsed:i,scrollBehaviour:o,children:[xY||(xY=(0,S.jsx)(nL,{children:(0,S.jsx)(wY,{})})),EY||(EY=(0,S.jsx)(rL,{children:(0,S.jsx)(SW,{})}))]})};var CY={initialize:function(){return{type:"entityList/INITIALIZE"}},initializeSearchForm:vF,loadPreferences:HZ,setSearchFormCollapsed:function(e){return{type:SZ,payload:{searchFormCollapsed:e}}}};const kY=(0,_.connect)((function(e){return{searchFormType:e.entityList.searchFormType,searchFormPosition:e.input.searchFormPosition,searchFormCollapsed:e.input.searchFormCollapsed,scrollBehaviour:e.input.scrollBehaviour}}),CY)((0,P.ZP)(OY));var SY=function(e){return Sf(e,TY)},DY=3,PY=2,_Y=1,jY=function(e){return Object.keys(e).reduce((function(e,t){var n=TY.find((function(e){return e.name===t}));return n&&n.reload>e?n.reload:e}),_Y)},TY=[{name:"entityName",argsFactory:function(e){return[e.entityName]},reload:DY},{name:"formName",argsFactory:function(e){return[e.formName]},reload:DY},{name:"limit",argsFactory:function(e){return[e.limit]},reload:PY},{name:"scope",argsFactory:function(e){return[e.scope]},reload:DY},{name:"searchFilters",action:function(e){return{type:aU,payload:{searchFilters:e}}},argsFactory:function(e){return[e.searchFilters]},reload:PY},{name:"searchFormType",action:function(e){return{type:OZ,payload:{searchFormType:e}}},argsFactory:function(e){return[e.searchFormType]},reload:PY},{name:"searchFormPosition",argsFactory:function(e){return[e.searchFormPosition]},reload:PY},{name:"simpleSearchFields",action:function(e){return{type:KZ,payload:{simpleSearchFields:e}}},argsFactory:function(e){return[e.simpleSearchFields]},reload:PY},{name:"selection",type:"boolean",action:cz,argsFactory:function(e){return[e.selection]},reload:_Y},{name:"scrollBehaviour",argsFactory:function(e){return[e.scrollBehaviour]},reload:_Y},{name:"parent",argsFactory:function(e){return[e.parent]},reload:PY},{name:"listFormDefinition",action:AU,argsFactory:function(e){return[e.listFormDefinition]},reload:DY},{name:"showLink",argsFactory:function(e){return[e.showLink]},reload:_Y},{name:"sortable",argsFactory:function(e){return[e.sortable]},reload:_Y},{name:"tql",argsFactory:function(e){return[e.tql]},reload:PY},{name:"keys",argsFactory:function(e){return[e.keys]},reload:PY},{name:"searchFilters",argsFactory:function(e){return[e.searchFilters]},reload:PY},{name:"constriction",argsFactory:function(e){return[e.constriction]},reload:PY},{name:"searchFormCollapsed",action:function(e){return{type:DZ,payload:{searchFormCollapsed:e}}},argsFactory:function(e){return[e.searchFormCollapsed]},reload:_Y}],RY=a(93386),IY=a.n(RY),MY=function(e){return e.data.map((function(e){return Lm.getFlattenEntity(e)}))},NY=function(e){return e.data.map((function(e){return e.key}))};function BY(e,t){(0,il.Z)(2,arguments);var n=(0,sl.Z)(e),r=(0,ll.Z)(t);return isNaN(r)?new Date(NaN):r?(n.setDate(n.getDate()+r),n):n}function ZY(e,t){if(null==e)throw new TypeError("assign requires that input parameter not be null or undefined");for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}function FY(e){return FY="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},FY(e)}function LY(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&HY(e,t)}function HY(e,t){return HY=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},HY(e,t)}function UY(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=VY(e);if(t){var o=VY(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return zY(this,n)}}function zY(e,t){return!t||"object"!==FY(t)&&"function"!=typeof t?WY(e):t}function WY(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function VY(e){return VY=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},VY(e)}function YY(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qY(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function GY(e,t,n){return t&&qY(e.prototype,t),n&&qY(e,n),e}function QY(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var XY=function(){function e(){YY(this,e),QY(this,"subPriority",0)}return GY(e,[{key:"validate",value:function(e,t){return!0}}]),e}(),KY=function(e){LY(n,e);var t=UY(n);function n(e,r,o,i,a){var c;return YY(this,n),(c=t.call(this)).value=e,c.validateValue=r,c.setValue=o,c.priority=i,a&&(c.subPriority=a),c}return GY(n,[{key:"validate",value:function(e,t){return this.validateValue(e,this.value,t)}},{key:"set",value:function(e,t,n){return this.setValue(e,t,this.value,n)}}]),n}(XY),$Y=function(e){LY(n,e);var t=UY(n);function n(){var e;YY(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return QY(WY(e=t.call.apply(t,[this].concat(o))),"priority",10),QY(WY(e),"subPriority",-1),e}return GY(n,[{key:"set",value:function(e,t){if(t.timestampIsSet)return e;var n=new Date(0);return n.setFullYear(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()),n.setHours(e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()),n}}]),n}(XY);function JY(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var eq=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,r;return t=e,n=[{key:"run",value:function(e,t,n,r){var o=this.parse(e,t,n,r);return o?{setter:new KY(o.value,this.validate,this.set,this.priority,this.subPriority),rest:o.rest}:null}},{key:"validate",value:function(e,t,n){return!0}}],n&&JY(t.prototype,n),r&&JY(t,r),e}();function tq(e){return tq="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},tq(e)}function nq(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function rq(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function oq(e,t){return oq=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},oq(e,t)}function iq(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=sq(e);if(t){var o=sq(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return aq(this,n)}}function aq(e,t){return!t||"object"!==tq(t)&&"function"!=typeof t?cq(e):t}function cq(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function sq(e){return sq=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},sq(e)}function uq(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var lq=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&oq(e,t)}(i,e);var t,n,r,o=iq(i);function i(){var e;nq(this,i);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return uq(cq(e=o.call.apply(o,[this].concat(n))),"priority",140),uq(cq(e),"incompatibleTokens",["R","u","t","T"]),e}return t=i,n=[{key:"parse",value:function(e,t,n){switch(t){case"G":case"GG":case"GGG":return n.era(e,{width:"abbreviated"})||n.era(e,{width:"narrow"});case"GGGGG":return n.era(e,{width:"narrow"});default:return n.era(e,{width:"wide"})||n.era(e,{width:"abbreviated"})||n.era(e,{width:"narrow"})}}},{key:"set",value:function(e,t,n){return t.era=n,e.setUTCFullYear(n,0,1),e.setUTCHours(0,0,0,0),e}}],n&&rq(t.prototype,n),r&&rq(t,r),i}(eq),dq=(Math.pow(10,8),/^(1[0-2]|0?\d)/),fq=/^(3[0-1]|[0-2]?\d)/,pq=/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,hq=/^(5[0-3]|[0-4]?\d)/,mq=/^(2[0-3]|[0-1]?\d)/,gq=/^(2[0-4]|[0-1]?\d)/,vq=/^(1[0-1]|0?\d)/,yq=/^(1[0-2]|0?\d)/,bq=/^[0-5]?\d/,wq=/^[0-5]?\d/,Aq=/^\d/,xq=/^\d{1,2}/,Eq=/^\d{1,3}/,Oq=/^\d{1,4}/,Cq=/^-?\d+/,kq=/^-?\d/,Sq=/^-?\d{1,2}/,Dq=/^-?\d{1,3}/,Pq=/^-?\d{1,4}/,_q=/^([+-])(\d{2})(\d{2})?|Z/,jq=/^([+-])(\d{2})(\d{2})|Z/,Tq=/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,Rq=/^([+-])(\d{2}):(\d{2})|Z/,Iq=/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/;function Mq(e,t){return e?{value:t(e.value),rest:e.rest}:e}function Nq(e,t){var n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function Bq(e,t){var n=t.match(e);return n?"Z"===n[0]?{value:0,rest:t.slice(1)}:{value:("+"===n[1]?1:-1)*(36e5*(n[2]?parseInt(n[2],10):0)+6e4*(n[3]?parseInt(n[3],10):0)+1e3*(n[5]?parseInt(n[5],10):0)),rest:t.slice(n[0].length)}:null}function Zq(e){return Nq(Cq,e)}function Fq(e,t){switch(e){case 1:return Nq(Aq,t);case 2:return Nq(xq,t);case 3:return Nq(Eq,t);case 4:return Nq(Oq,t);default:return Nq(new RegExp("^\\d{1,"+e+"}"),t)}}function Lq(e,t){switch(e){case 1:return Nq(kq,t);case 2:return Nq(Sq,t);case 3:return Nq(Dq,t);case 4:return Nq(Pq,t);default:return Nq(new RegExp("^-?\\d{1,"+e+"}"),t)}}function Hq(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;default:return 0}}function Uq(e,t){var n,r=t>0,o=r?t:1-t;if(o<=50)n=e||100;else{var i=o+50;n=e+100*Math.floor(i/100)-(e>=i%100?100:0)}return r?n:1-n}function zq(e){return e%400==0||e%4==0&&e%100!=0}function Wq(e){return Wq="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Wq(e)}function Vq(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Yq(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function qq(e,t){return qq=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},qq(e,t)}function Gq(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Kq(e);if(t){var o=Kq(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Qq(this,n)}}function Qq(e,t){return!t||"object"!==Wq(t)&&"function"!=typeof t?Xq(e):t}function Xq(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Kq(e){return Kq=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Kq(e)}function $q(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Jq=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&qq(e,t)}(i,e);var t,n,r,o=Gq(i);function i(){var e;Vq(this,i);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return $q(Xq(e=o.call.apply(o,[this].concat(n))),"priority",130),$q(Xq(e),"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"]),e}return t=i,n=[{key:"parse",value:function(e,t,n){var r=function(e){return{year:e,isTwoDigitYear:"yy"===t}};switch(t){case"y":return Mq(Fq(4,e),r);case"yo":return Mq(n.ordinalNumber(e,{unit:"year"}),r);default:return Mq(Fq(t.length,e),r)}}},{key:"validate",value:function(e,t){return t.isTwoDigitYear||t.year>0}},{key:"set",value:function(e,t,n){var r=e.getUTCFullYear();if(n.isTwoDigitYear){var o=Uq(n.year,r);return e.setUTCFullYear(o,0,1),e.setUTCHours(0,0,0,0),e}var i="era"in t&&1!==t.era?1-n.year:n.year;return e.setUTCFullYear(i,0,1),e.setUTCHours(0,0,0,0),e}}],n&&Yq(t.prototype,n),r&&Yq(t,r),i}(eq);function eG(e){return eG="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},eG(e)}function tG(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function nG(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function rG(e,t){return rG=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},rG(e,t)}function oG(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=cG(e);if(t){var o=cG(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return iG(this,n)}}function iG(e,t){return!t||"object"!==eG(t)&&"function"!=typeof t?aG(e):t}function aG(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function cG(e){return cG=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},cG(e)}function sG(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var uG=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&rG(e,t)}(i,e);var t,n,r,o=oG(i);function i(){var e;tG(this,i);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return sG(aG(e=o.call.apply(o,[this].concat(n))),"priority",130),sG(aG(e),"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"]),e}return t=i,n=[{key:"parse",value:function(e,t,n){var r=function(e){return{year:e,isTwoDigitYear:"YY"===t}};switch(t){case"Y":return Mq(Fq(4,e),r);case"Yo":return Mq(n.ordinalNumber(e,{unit:"year"}),r);default:return Mq(Fq(t.length,e),r)}}},{key:"validate",value:function(e,t){return t.isTwoDigitYear||t.year>0}},{key:"set",value:function(e,t,n,r){var o=Al(e,r);if(n.isTwoDigitYear){var i=Uq(n.year,o);return e.setUTCFullYear(i,0,r.firstWeekContainsDate),e.setUTCHours(0,0,0,0),(0,bl.Z)(e,r)}var a="era"in t&&1!==t.era?1-n.year:n.year;return e.setUTCFullYear(a,0,r.firstWeekContainsDate),e.setUTCHours(0,0,0,0),(0,bl.Z)(e,r)}}],n&&nG(t.prototype,n),r&&nG(t,r),i}(eq);function lG(e){return lG="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},lG(e)}function dG(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fG(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function pG(e,t){return pG=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},pG(e,t)}function hG(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=vG(e);if(t){var o=vG(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return mG(this,n)}}function mG(e,t){return!t||"object"!==lG(t)&&"function"!=typeof t?gG(e):t}function gG(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function vG(e){return vG=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},vG(e)}function yG(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var bG=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&pG(e,t)}(i,e);var t,n,r,o=hG(i);function i(){var e;dG(this,i);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return yG(gG(e=o.call.apply(o,[this].concat(n))),"priority",130),yG(gG(e),"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]),e}return t=i,(n=[{key:"parse",value:function(e,t){return Lq("R"===t?4:t.length,e)}},{key:"set",value:function(e,t,n){var r=new Date(0);return r.setUTCFullYear(n,0,4),r.setUTCHours(0,0,0,0),hl(r)}}])&&fG(t.prototype,n),r&&fG(t,r),i}(eq);function wG(e){return wG="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},wG(e)}function AG(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xG(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function EG(e,t){return EG=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},EG(e,t)}function OG(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=SG(e);if(t){var o=SG(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return CG(this,n)}}function CG(e,t){return!t||"object"!==wG(t)&&"function"!=typeof t?kG(e):t}function kG(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function SG(e){return SG=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},SG(e)}function DG(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var PG=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&EG(e,t)}(i,e);var t,n,r,o=OG(i);function i(){var e;AG(this,i);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return DG(kG(e=o.call.apply(o,[this].concat(n))),"priority",130),DG(kG(e),"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"]),e}return t=i,n=[{key:"parse",value:function(e,t){return Lq("u"===t?4:t.length,e)}},{key:"set",value:function(e,t,n){return e.setUTCFullYear(n,0,1),e.setUTCHours(0,0,0,0),e}}],n&&xG(t.prototype,n),r&&xG(t,r),i}(eq);function _G(e){return _G="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_G(e)}function jG(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function TG(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function RG(e,t){return RG=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},RG(e,t)}function IG(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=BG(e);if(t){var o=BG(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return MG(this,n)}}function MG(e,t){return!t||"object"!==_G(t)&&"function"!=typeof t?NG(e):t}function NG(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function BG(e){return BG=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},BG(e)}function ZG(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var FG=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&RG(e,t)}(i,e);var t,n,r,o=IG(i);function i(){var e;jG(this,i);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return ZG(NG(e=o.call.apply(o,[this].concat(n))),"priority",120),ZG(NG(e),"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]),e}return t=i,n=[{key:"parse",value:function(e,t,n){switch(t){case"Q":case"QQ":return Fq(t.length,e);case"Qo":return n.ordinalNumber(e,{unit:"quarter"});case"QQQ":return n.quarter(e,{width:"abbreviated",context:"formatting"})||n.quarter(e,{width:"narrow",context:"formatting"});case"QQQQQ":return n.quarter(e,{width:"narrow",context:"formatting"});default:return n.quarter(e,{width:"wide",context:"formatting"})||n.quarter(e,{width:"abbreviated",context:"formatting"})||n.quarter(e,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(e,t){return t>=1&&t<=4}},{key:"set",value:function(e,t,n){return e.setUTCMonth(3*(n-1),1),e.setUTCHours(0,0,0,0),e}}],n&&TG(t.prototype,n),r&&TG(t,r),i}(eq);function LG(e){return LG="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},LG(e)}function HG(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function UG(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function zG(e,t){return zG=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},zG(e,t)}function WG(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=qG(e);if(t){var o=qG(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return VG(this,n)}}function VG(e,t){return!t||"object"!==LG(t)&&"function"!=typeof t?YG(e):t}function YG(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function qG(e){return qG=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},qG(e)}function GG(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var QG=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&zG(e,t)}(i,e);var t,n,r,o=WG(i);function i(){var e;HG(this,i);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return GG(YG(e=o.call.apply(o,[this].concat(n))),"priority",120),GG(YG(e),"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]),e}return t=i,n=[{key:"parse",value:function(e,t,n){switch(t){case"q":case"qq":return Fq(t.length,e);case"qo":return n.ordinalNumber(e,{unit:"quarter"});case"qqq":return n.quarter(e,{width:"abbreviated",context:"standalone"})||n.quarter(e,{width:"narrow",context:"standalone"});case"qqqqq":return n.quarter(e,{width:"narrow",context:"standalone"});default:return n.quarter(e,{width:"wide",context:"standalone"})||n.quarter(e,{width:"abbreviated",context:"standalone"})||n.quarter(e,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(e,t){return t>=1&&t<=4}},{key:"set",value:function(e,t,n){return e.setUTCMonth(3*(n-1),1),e.setUTCHours(0,0,0,0),e}}],n&&UG(t.prototype,n),r&&UG(t,r),i}(eq);function XG(e){return XG="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},XG(e)}function KG(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $G(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function JG(e,t){return JG=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},JG(e,t)}function eQ(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=rQ(e);if(t){var o=rQ(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return tQ(this,n)}}function tQ(e,t){return!t||"object"!==XG(t)&&"function"!=typeof t?nQ(e):t}function nQ(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function rQ(e){return rQ=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},rQ(e)}function oQ(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var iQ=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&JG(e,t)}(i,e);var t,n,r,o=eQ(i);function i(){var e;KG(this,i);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return oQ(nQ(e=o.call.apply(o,[this].concat(n))),"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),oQ(nQ(e),"priority",110),e}return t=i,n=[{key:"parse",value:function(e,t,n){var r=function(e){return e-1};switch(t){case"M":return Mq(Nq(dq,e),r);case"MM":return Mq(Fq(2,e),r);case"Mo":return Mq(n.ordinalNumber(e,{unit:"month"}),r);case"MMM":return n.month(e,{width:"abbreviated",context:"formatting"})||n.month(e,{width:"narrow",context:"formatting"});case"MMMMM":return n.month(e,{width:"narrow",context:"formatting"});default:return n.month(e,{width:"wide",context:"formatting"})||n.month(e,{width:"abbreviated",context:"formatting"})||n.month(e,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(e,t){return t>=0&&t<=11}},{key:"set",value:function(e,t,n){return e.setUTCMonth(n,1),e.setUTCHours(0,0,0,0),e}}],n&&$G(t.prototype,n),r&&$G(t,r),i}(eq);function aQ(e){return aQ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},aQ(e)}function cQ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function sQ(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function uQ(e,t){return uQ=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},uQ(e,t)}function lQ(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=pQ(e);if(t){var o=pQ(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return dQ(this,n)}}function dQ(e,t){return!t||"object"!==aQ(t)&&"function"!=typeof t?fQ(e):t}function fQ(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function pQ(e){return pQ=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},pQ(e)}function hQ(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var mQ=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&uQ(e,t)}(i,e);var t,n,r,o=lQ(i);function i(){var e;cQ(this,i);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return hQ(fQ(e=o.call.apply(o,[this].concat(n))),"priority",110),hQ(fQ(e),"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]),e}return t=i,n=[{key:"parse",value:function(e,t,n){var r=function(e){return e-1};switch(t){case"L":return Mq(Nq(dq,e),r);case"LL":return Mq(Fq(2,e),r);case"Lo":return Mq(n.ordinalNumber(e,{unit:"month"}),r);case"LLL":return n.month(e,{width:"abbreviated",context:"standalone"})||n.month(e,{width:"narrow",context:"standalone"});case"LLLLL":return n.month(e,{width:"narrow",context:"standalone"});default:return n.month(e,{width:"wide",context:"standalone"})||n.month(e,{width:"abbreviated",context:"standalone"})||n.month(e,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(e,t){return t>=0&&t<=11}},{key:"set",value:function(e,t,n){return e.setUTCMonth(n,1),e.setUTCHours(0,0,0,0),e}}],n&&sQ(t.prototype,n),r&&sQ(t,r),i}(eq);function gQ(e){return gQ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},gQ(e)}function vQ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function yQ(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function bQ(e,t){return bQ=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},bQ(e,t)}function wQ(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=EQ(e);if(t){var o=EQ(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return AQ(this,n)}}function AQ(e,t){return!t||"object"!==gQ(t)&&"function"!=typeof t?xQ(e):t}function xQ(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function EQ(e){return EQ=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},EQ(e)}function OQ(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var CQ=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&bQ(e,t)}(i,e);var t,n,r,o=wQ(i);function i(){var e;vQ(this,i);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return OQ(xQ(e=o.call.apply(o,[this].concat(n))),"priority",100),OQ(xQ(e),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"]),e}return t=i,n=[{key:"parse",value:function(e,t,n){switch(t){case"w":return Nq(hq,e);case"wo":return n.ordinalNumber(e,{unit:"week"});default:return Fq(t.length,e)}}},{key:"validate",value:function(e,t){return t>=1&&t<=53}},{key:"set",value:function(e,t,n,r){return(0,bl.Z)(function(e,t,n){(0,il.Z)(2,arguments);var r=(0,sl.Z)(e),o=(0,ll.Z)(t),i=Ol(r,n)-o;return r.setUTCDate(r.getUTCDate()-7*i),r}(e,n,r),r)}}],n&&yQ(t.prototype,n),r&&yQ(t,r),i}(eq);function kQ(e){return kQ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},kQ(e)}function SQ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function DQ(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function PQ(e,t){return PQ=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},PQ(e,t)}function _Q(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=RQ(e);if(t){var o=RQ(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return jQ(this,n)}}function jQ(e,t){return!t||"object"!==kQ(t)&&"function"!=typeof t?TQ(e):t}function TQ(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function RQ(e){return RQ=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},RQ(e)}function IQ(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var MQ=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&PQ(e,t)}(i,e);var t,n,r,o=_Q(i);function i(){var e;SQ(this,i);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return IQ(TQ(e=o.call.apply(o,[this].concat(n))),"priority",100),IQ(TQ(e),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]),e}return t=i,n=[{key:"parse",value:function(e,t,n){switch(t){case"I":return Nq(hq,e);case"Io":return n.ordinalNumber(e,{unit:"week"});default:return Fq(t.length,e)}}},{key:"validate",value:function(e,t){return t>=1&&t<=53}},{key:"set",value:function(e,t,n){return hl(function(e,t){(0,il.Z)(2,arguments);var n=(0,sl.Z)(e),r=(0,ll.Z)(t),o=yl(n)-r;return n.setUTCDate(n.getUTCDate()-7*o),n}(e,n))}}],n&&DQ(t.prototype,n),r&&DQ(t,r),i}(eq);function NQ(e){return NQ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},NQ(e)}function BQ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ZQ(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function FQ(e,t){return FQ=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},FQ(e,t)}function LQ(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=zQ(e);if(t){var o=zQ(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return HQ(this,n)}}function HQ(e,t){return!t||"object"!==NQ(t)&&"function"!=typeof t?UQ(e):t}function UQ(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function zQ(e){return zQ=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},zQ(e)}function WQ(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var VQ=[31,28,31,30,31,30,31,31,30,31,30,31],YQ=[31,29,31,30,31,30,31,31,30,31,30,31],qQ=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&FQ(e,t)}(i,e);var t,n,r,o=LQ(i);function i(){var e;BQ(this,i);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return WQ(UQ(e=o.call.apply(o,[this].concat(n))),"priority",90),WQ(UQ(e),"subPriority",1),WQ(UQ(e),"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"]),e}return t=i,n=[{key:"parse",value:function(e,t,n){switch(t){case"d":return Nq(fq,e);case"do":return n.ordinalNumber(e,{unit:"date"});default:return Fq(t.length,e)}}},{key:"validate",value:function(e,t){var n=zq(e.getUTCFullYear()),r=e.getUTCMonth();return n?t>=1&&t<=YQ[r]:t>=1&&t<=VQ[r]}},{key:"set",value:function(e,t,n){return e.setUTCDate(n),e.setUTCHours(0,0,0,0),e}}],n&&ZQ(t.prototype,n),r&&ZQ(t,r),i}(eq);function GQ(e){return GQ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},GQ(e)}function QQ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function XQ(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function KQ(e,t){return KQ=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},KQ(e,t)}function $Q(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=tX(e);if(t){var o=tX(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return JQ(this,n)}}function JQ(e,t){return!t||"object"!==GQ(t)&&"function"!=typeof t?eX(e):t}function eX(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function tX(e){return tX=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},tX(e)}function nX(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var rX=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&KQ(e,t)}(i,e);var t,n,r,o=$Q(i);function i(){var e;QQ(this,i);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return nX(eX(e=o.call.apply(o,[this].concat(n))),"priority",90),nX(eX(e),"subpriority",1),nX(eX(e),"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]),e}return t=i,n=[{key:"parse",value:function(e,t,n){switch(t){case"D":case"DD":return Nq(pq,e);case"Do":return n.ordinalNumber(e,{unit:"date"});default:return Fq(t.length,e)}}},{key:"validate",value:function(e,t){return zq(e.getUTCFullYear())?t>=1&&t<=366:t>=1&&t<=365}},{key:"set",value:function(e,t,n){return e.setUTCMonth(0,n),e.setUTCHours(0,0,0,0),e}}],n&&XQ(t.prototype,n),r&&XQ(t,r),i}(eq);function oX(e,t,n){var r,o,i,a,c,s,u,l;(0,il.Z)(2,arguments);var d=(0,wl.j)(),f=(0,ll.Z)(null!==(r=null!==(o=null!==(i=null!==(a=null==n?void 0:n.weekStartsOn)&&void 0!==a?a:null==n||null===(c=n.locale)||void 0===c||null===(s=c.options)||void 0===s?void 0:s.weekStartsOn)&&void 0!==i?i:d.weekStartsOn)&&void 0!==o?o:null===(u=d.locale)||void 0===u||null===(l=u.options)||void 0===l?void 0:l.weekStartsOn)&&void 0!==r?r:0);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=(0,sl.Z)(e),h=(0,ll.Z)(t),m=p.getUTCDay(),g=h%7,v=(g+7)%7,y=(v<f?7:0)+h-m;return p.setUTCDate(p.getUTCDate()+y),p}function iX(e){return iX="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},iX(e)}function aX(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function cX(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function sX(e,t){return sX=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},sX(e,t)}function uX(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=fX(e);if(t){var o=fX(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return lX(this,n)}}function lX(e,t){return!t||"object"!==iX(t)&&"function"!=typeof t?dX(e):t}function dX(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function fX(e){return fX=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},fX(e)}function pX(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var hX=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&sX(e,t)}(i,e);var t,n,r,o=uX(i);function i(){var e;aX(this,i);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return pX(dX(e=o.call.apply(o,[this].concat(n))),"priority",90),pX(dX(e),"incompatibleTokens",["D","i","e","c","t","T"]),e}return t=i,n=[{key:"parse",value:function(e,t,n){switch(t){case"E":case"EE":case"EEE":return n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"EEEEE":return n.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});default:return n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(e,t){return t>=0&&t<=6}},{key:"set",value:function(e,t,n,r){return(e=oX(e,n,r)).setUTCHours(0,0,0,0),e}}],n&&cX(t.prototype,n),r&&cX(t,r),i}(eq);function mX(e){return mX="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},mX(e)}function gX(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function vX(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function yX(e,t){return yX=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},yX(e,t)}function bX(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=xX(e);if(t){var o=xX(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return wX(this,n)}}function wX(e,t){return!t||"object"!==mX(t)&&"function"!=typeof t?AX(e):t}function AX(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function xX(e){return xX=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},xX(e)}function EX(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var OX=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&yX(e,t)}(i,e);var t,n,r,o=bX(i);function i(){var e;gX(this,i);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return EX(AX(e=o.call.apply(o,[this].concat(n))),"priority",90),EX(AX(e),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]),e}return t=i,n=[{key:"parse",value:function(e,t,n,r){var o=function(e){var t=7*Math.floor((e-1)/7);return(e+r.weekStartsOn+6)%7+t};switch(t){case"e":case"ee":return Mq(Fq(t.length,e),o);case"eo":return Mq(n.ordinalNumber(e,{unit:"day"}),o);case"eee":return n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"eeeee":return n.day(e,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});default:return n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(e,t){return t>=0&&t<=6}},{key:"set",value:function(e,t,n,r){return(e=oX(e,n,r)).setUTCHours(0,0,0,0),e}}],n&&vX(t.prototype,n),r&&vX(t,r),i}(eq);function CX(e){return CX="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},CX(e)}function kX(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function SX(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function DX(e,t){return DX=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},DX(e,t)}function PX(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=TX(e);if(t){var o=TX(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return _X(this,n)}}function _X(e,t){return!t||"object"!==CX(t)&&"function"!=typeof t?jX(e):t}function jX(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function TX(e){return TX=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},TX(e)}function RX(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var IX=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&DX(e,t)}(i,e);var t,n,r,o=PX(i);function i(){var e;kX(this,i);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return RX(jX(e=o.call.apply(o,[this].concat(n))),"priority",90),RX(jX(e),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]),e}return t=i,n=[{key:"parse",value:function(e,t,n,r){var o=function(e){var t=7*Math.floor((e-1)/7);return(e+r.weekStartsOn+6)%7+t};switch(t){case"c":case"cc":return Mq(Fq(t.length,e),o);case"co":return Mq(n.ordinalNumber(e,{unit:"day"}),o);case"ccc":return n.day(e,{width:"abbreviated",context:"standalone"})||n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"});case"ccccc":return n.day(e,{width:"narrow",context:"standalone"});case"cccccc":return n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"});default:return n.day(e,{width:"wide",context:"standalone"})||n.day(e,{width:"abbreviated",context:"standalone"})||n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(e,t){return t>=0&&t<=6}},{key:"set",value:function(e,t,n,r){return(e=oX(e,n,r)).setUTCHours(0,0,0,0),e}}],n&&SX(t.prototype,n),r&&SX(t,r),i}(eq);function MX(e){return MX="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},MX(e)}function NX(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function BX(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ZX(e,t){return ZX=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},ZX(e,t)}function FX(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=UX(e);if(t){var o=UX(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return LX(this,n)}}function LX(e,t){return!t||"object"!==MX(t)&&"function"!=typeof t?HX(e):t}function HX(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function UX(e){return UX=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},UX(e)}function zX(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var WX=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ZX(e,t)}(i,e);var t,n,r,o=FX(i);function i(){var e;NX(this,i);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return zX(HX(e=o.call.apply(o,[this].concat(n))),"priority",90),zX(HX(e),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]),e}return t=i,n=[{key:"parse",value:function(e,t,n){var r=function(e){return 0===e?7:e};switch(t){case"i":case"ii":return Fq(t.length,e);case"io":return n.ordinalNumber(e,{unit:"day"});case"iii":return Mq(n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),r);case"iiiii":return Mq(n.day(e,{width:"narrow",context:"formatting"}),r);case"iiiiii":return Mq(n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),r);default:return Mq(n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),r)}}},{key:"validate",value:function(e,t){return t>=1&&t<=7}},{key:"set",value:function(e,t,n){return e=function(e,t){(0,il.Z)(2,arguments);var n=(0,ll.Z)(t);n%7==0&&(n-=7);var r=1,o=(0,sl.Z)(e),i=o.getUTCDay(),a=((n%7+7)%7<r?7:0)+n-i;return o.setUTCDate(o.getUTCDate()+a),o}(e,n),e.setUTCHours(0,0,0,0),e}}],n&&BX(t.prototype,n),r&&BX(t,r),i}(eq);function VX(e){return VX="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},VX(e)}function YX(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qX(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function GX(e,t){return GX=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},GX(e,t)}function QX(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=$X(e);if(t){var o=$X(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return XX(this,n)}}function XX(e,t){return!t||"object"!==VX(t)&&"function"!=typeof t?KX(e):t}function KX(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function $X(e){return $X=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},$X(e)}function JX(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var eK=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&GX(e,t)}(i,e);var t,n,r,o=QX(i);function i(){var e;YX(this,i);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return JX(KX(e=o.call.apply(o,[this].concat(n))),"priority",80),JX(KX(e),"incompatibleTokens",["b","B","H","k","t","T"]),e}return t=i,n=[{key:"parse",value:function(e,t,n){switch(t){case"a":case"aa":case"aaa":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaaa":return n.dayPeriod(e,{width:"narrow",context:"formatting"});default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(e,t,n){return e.setUTCHours(Hq(n),0,0,0),e}}],n&&qX(t.prototype,n),r&&qX(t,r),i}(eq);function tK(e){return tK="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},tK(e)}function nK(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function rK(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function oK(e,t){return oK=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},oK(e,t)}function iK(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=sK(e);if(t){var o=sK(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return aK(this,n)}}function aK(e,t){return!t||"object"!==tK(t)&&"function"!=typeof t?cK(e):t}function cK(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function sK(e){return sK=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},sK(e)}function uK(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var lK=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&oK(e,t)}(i,e);var t,n,r,o=iK(i);function i(){var e;nK(this,i);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return uK(cK(e=o.call.apply(o,[this].concat(n))),"priority",80),uK(cK(e),"incompatibleTokens",["a","B","H","k","t","T"]),e}return t=i,n=[{key:"parse",value:function(e,t,n){switch(t){case"b":case"bb":case"bbb":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbbb":return n.dayPeriod(e,{width:"narrow",context:"formatting"});default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(e,t,n){return e.setUTCHours(Hq(n),0,0,0),e}}],n&&rK(t.prototype,n),r&&rK(t,r),i}(eq);function dK(e){return dK="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},dK(e)}function fK(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pK(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function hK(e,t){return hK=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},hK(e,t)}function mK(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=yK(e);if(t){var o=yK(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return gK(this,n)}}function gK(e,t){return!t||"object"!==dK(t)&&"function"!=typeof t?vK(e):t}function vK(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function yK(e){return yK=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},yK(e)}function bK(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var wK=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&hK(e,t)}(i,e);var t,n,r,o=mK(i);function i(){var e;fK(this,i);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return bK(vK(e=o.call.apply(o,[this].concat(n))),"priority",80),bK(vK(e),"incompatibleTokens",["a","b","t","T"]),e}return t=i,n=[{key:"parse",value:function(e,t,n){switch(t){case"B":case"BB":case"BBB":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBBB":return n.dayPeriod(e,{width:"narrow",context:"formatting"});default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(e,t,n){return e.setUTCHours(Hq(n),0,0,0),e}}],n&&pK(t.prototype,n),r&&pK(t,r),i}(eq);function AK(e){return AK="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},AK(e)}function xK(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function EK(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function OK(e,t){return OK=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},OK(e,t)}function CK(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=DK(e);if(t){var o=DK(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return kK(this,n)}}function kK(e,t){return!t||"object"!==AK(t)&&"function"!=typeof t?SK(e):t}function SK(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function DK(e){return DK=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},DK(e)}function PK(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var _K=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&OK(e,t)}(i,e);var t,n,r,o=CK(i);function i(){var e;xK(this,i);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return PK(SK(e=o.call.apply(o,[this].concat(n))),"priority",70),PK(SK(e),"incompatibleTokens",["H","K","k","t","T"]),e}return t=i,n=[{key:"parse",value:function(e,t,n){switch(t){case"h":return Nq(yq,e);case"ho":return n.ordinalNumber(e,{unit:"hour"});default:return Fq(t.length,e)}}},{key:"validate",value:function(e,t){return t>=1&&t<=12}},{key:"set",value:function(e,t,n){var r=e.getUTCHours()>=12;return r&&n<12?e.setUTCHours(n+12,0,0,0):r||12!==n?e.setUTCHours(n,0,0,0):e.setUTCHours(0,0,0,0),e}}],n&&EK(t.prototype,n),r&&EK(t,r),i}(eq);function jK(e){return jK="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},jK(e)}function TK(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function RK(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function IK(e,t){return IK=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},IK(e,t)}function MK(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ZK(e);if(t){var o=ZK(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return NK(this,n)}}function NK(e,t){return!t||"object"!==jK(t)&&"function"!=typeof t?BK(e):t}function BK(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ZK(e){return ZK=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},ZK(e)}function FK(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var LK=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&IK(e,t)}(i,e);var t,n,r,o=MK(i);function i(){var e;TK(this,i);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return FK(BK(e=o.call.apply(o,[this].concat(n))),"priority",70),FK(BK(e),"incompatibleTokens",["a","b","h","K","k","t","T"]),e}return t=i,n=[{key:"parse",value:function(e,t,n){switch(t){case"H":return Nq(mq,e);case"Ho":return n.ordinalNumber(e,{unit:"hour"});default:return Fq(t.length,e)}}},{key:"validate",value:function(e,t){return t>=0&&t<=23}},{key:"set",value:function(e,t,n){return e.setUTCHours(n,0,0,0),e}}],n&&RK(t.prototype,n),r&&RK(t,r),i}(eq);function HK(e){return HK="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},HK(e)}function UK(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function zK(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function WK(e,t){return WK=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},WK(e,t)}function VK(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=GK(e);if(t){var o=GK(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return YK(this,n)}}function YK(e,t){return!t||"object"!==HK(t)&&"function"!=typeof t?qK(e):t}function qK(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function GK(e){return GK=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},GK(e)}function QK(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var XK=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&WK(e,t)}(i,e);var t,n,r,o=VK(i);function i(){var e;UK(this,i);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return QK(qK(e=o.call.apply(o,[this].concat(n))),"priority",70),QK(qK(e),"incompatibleTokens",["h","H","k","t","T"]),e}return t=i,n=[{key:"parse",value:function(e,t,n){switch(t){case"K":return Nq(vq,e);case"Ko":return n.ordinalNumber(e,{unit:"hour"});default:return Fq(t.length,e)}}},{key:"validate",value:function(e,t){return t>=0&&t<=11}},{key:"set",value:function(e,t,n){return e.getUTCHours()>=12&&n<12?e.setUTCHours(n+12,0,0,0):e.setUTCHours(n,0,0,0),e}}],n&&zK(t.prototype,n),r&&zK(t,r),i}(eq);function KK(e){return KK="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},KK(e)}function $K(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function JK(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function e$(e,t){return e$=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},e$(e,t)}function t$(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=o$(e);if(t){var o=o$(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return n$(this,n)}}function n$(e,t){return!t||"object"!==KK(t)&&"function"!=typeof t?r$(e):t}function r$(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function o$(e){return o$=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},o$(e)}function i$(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var a$=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&e$(e,t)}(i,e);var t,n,r,o=t$(i);function i(){var e;$K(this,i);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return i$(r$(e=o.call.apply(o,[this].concat(n))),"priority",70),i$(r$(e),"incompatibleTokens",["a","b","h","H","K","t","T"]),e}return t=i,n=[{key:"parse",value:function(e,t,n){switch(t){case"k":return Nq(gq,e);case"ko":return n.ordinalNumber(e,{unit:"hour"});default:return Fq(t.length,e)}}},{key:"validate",value:function(e,t){return t>=1&&t<=24}},{key:"set",value:function(e,t,n){var r=n<=24?n%24:n;return e.setUTCHours(r,0,0,0),e}}],n&&JK(t.prototype,n),r&&JK(t,r),i}(eq);function c$(e){return c$="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c$(e)}function s$(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u$(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l$(e,t){return l$=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},l$(e,t)}function d$(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=h$(e);if(t){var o=h$(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return f$(this,n)}}function f$(e,t){return!t||"object"!==c$(t)&&"function"!=typeof t?p$(e):t}function p$(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function h$(e){return h$=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},h$(e)}function m$(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var g$=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l$(e,t)}(i,e);var t,n,r,o=d$(i);function i(){var e;s$(this,i);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return m$(p$(e=o.call.apply(o,[this].concat(n))),"priority",60),m$(p$(e),"incompatibleTokens",["t","T"]),e}return t=i,n=[{key:"parse",value:function(e,t,n){switch(t){case"m":return Nq(bq,e);case"mo":return n.ordinalNumber(e,{unit:"minute"});default:return Fq(t.length,e)}}},{key:"validate",value:function(e,t){return t>=0&&t<=59}},{key:"set",value:function(e,t,n){return e.setUTCMinutes(n,0,0),e}}],n&&u$(t.prototype,n),r&&u$(t,r),i}(eq);function v$(e){return v$="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},v$(e)}function y$(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function b$(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function w$(e,t){return w$=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},w$(e,t)}function A$(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=O$(e);if(t){var o=O$(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return x$(this,n)}}function x$(e,t){return!t||"object"!==v$(t)&&"function"!=typeof t?E$(e):t}function E$(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function O$(e){return O$=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},O$(e)}function C$(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var k$=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&w$(e,t)}(i,e);var t,n,r,o=A$(i);function i(){var e;y$(this,i);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return C$(E$(e=o.call.apply(o,[this].concat(n))),"priority",50),C$(E$(e),"incompatibleTokens",["t","T"]),e}return t=i,n=[{key:"parse",value:function(e,t,n){switch(t){case"s":return Nq(wq,e);case"so":return n.ordinalNumber(e,{unit:"second"});default:return Fq(t.length,e)}}},{key:"validate",value:function(e,t){return t>=0&&t<=59}},{key:"set",value:function(e,t,n){return e.setUTCSeconds(n,0),e}}],n&&b$(t.prototype,n),r&&b$(t,r),i}(eq);function S$(e){return S$="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},S$(e)}function D$(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function P$(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _$(e,t){return _$=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},_$(e,t)}function j$(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=I$(e);if(t){var o=I$(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return T$(this,n)}}function T$(e,t){return!t||"object"!==S$(t)&&"function"!=typeof t?R$(e):t}function R$(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function I$(e){return I$=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},I$(e)}function M$(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var N$=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_$(e,t)}(i,e);var t,n,r,o=j$(i);function i(){var e;D$(this,i);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return M$(R$(e=o.call.apply(o,[this].concat(n))),"priority",30),M$(R$(e),"incompatibleTokens",["t","T"]),e}return t=i,n=[{key:"parse",value:function(e,t){return Mq(Fq(t.length,e),(function(e){return Math.floor(e*Math.pow(10,3-t.length))}))}},{key:"set",value:function(e,t,n){return e.setUTCMilliseconds(n),e}}],n&&P$(t.prototype,n),r&&P$(t,r),i}(eq);function B$(e){return B$="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},B$(e)}function Z$(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function F$(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function L$(e,t){return L$=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},L$(e,t)}function H$(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=W$(e);if(t){var o=W$(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return U$(this,n)}}function U$(e,t){return!t||"object"!==B$(t)&&"function"!=typeof t?z$(e):t}function z$(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function W$(e){return W$=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},W$(e)}function V$(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Y$=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&L$(e,t)}(i,e);var t,n,r,o=H$(i);function i(){var e;Z$(this,i);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return V$(z$(e=o.call.apply(o,[this].concat(n))),"priority",10),V$(z$(e),"incompatibleTokens",["t","T","x"]),e}return t=i,n=[{key:"parse",value:function(e,t){switch(t){case"X":return Bq(_q,e);case"XX":return Bq(jq,e);case"XXXX":return Bq(Tq,e);case"XXXXX":return Bq(Iq,e);default:return Bq(Rq,e)}}},{key:"set",value:function(e,t,n){return t.timestampIsSet?e:new Date(e.getTime()-n)}}],n&&F$(t.prototype,n),r&&F$(t,r),i}(eq);function q$(e){return q$="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},q$(e)}function G$(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Q$(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function X$(e,t){return X$=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},X$(e,t)}function K$(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=eJ(e);if(t){var o=eJ(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return $$(this,n)}}function $$(e,t){return!t||"object"!==q$(t)&&"function"!=typeof t?J$(e):t}function J$(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function eJ(e){return eJ=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},eJ(e)}function tJ(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var nJ=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&X$(e,t)}(i,e);var t,n,r,o=K$(i);function i(){var e;G$(this,i);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return tJ(J$(e=o.call.apply(o,[this].concat(n))),"priority",10),tJ(J$(e),"incompatibleTokens",["t","T","X"]),e}return t=i,n=[{key:"parse",value:function(e,t){switch(t){case"x":return Bq(_q,e);case"xx":return Bq(jq,e);case"xxxx":return Bq(Tq,e);case"xxxxx":return Bq(Iq,e);default:return Bq(Rq,e)}}},{key:"set",value:function(e,t,n){return t.timestampIsSet?e:new Date(e.getTime()-n)}}],n&&Q$(t.prototype,n),r&&Q$(t,r),i}(eq);function rJ(e){return rJ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},rJ(e)}function oJ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function iJ(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function aJ(e,t){return aJ=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},aJ(e,t)}function cJ(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=lJ(e);if(t){var o=lJ(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return sJ(this,n)}}function sJ(e,t){return!t||"object"!==rJ(t)&&"function"!=typeof t?uJ(e):t}function uJ(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function lJ(e){return lJ=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},lJ(e)}function dJ(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var fJ=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&aJ(e,t)}(i,e);var t,n,r,o=cJ(i);function i(){var e;oJ(this,i);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return dJ(uJ(e=o.call.apply(o,[this].concat(n))),"priority",40),dJ(uJ(e),"incompatibleTokens","*"),e}return t=i,(n=[{key:"parse",value:function(e){return Zq(e)}},{key:"set",value:function(e,t,n){return[new Date(1e3*n),{timestampIsSet:!0}]}}])&&iJ(t.prototype,n),r&&iJ(t,r),i}(eq);function pJ(e){return pJ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},pJ(e)}function hJ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function mJ(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function gJ(e,t){return gJ=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},gJ(e,t)}function vJ(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=wJ(e);if(t){var o=wJ(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return yJ(this,n)}}function yJ(e,t){return!t||"object"!==pJ(t)&&"function"!=typeof t?bJ(e):t}function bJ(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function wJ(e){return wJ=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},wJ(e)}function AJ(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var xJ=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&gJ(e,t)}(i,e);var t,n,r,o=vJ(i);function i(){var e;hJ(this,i);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return AJ(bJ(e=o.call.apply(o,[this].concat(n))),"priority",20),AJ(bJ(e),"incompatibleTokens","*"),e}return t=i,(n=[{key:"parse",value:function(e){return Zq(e)}},{key:"set",value:function(e,t,n){return[new Date(n),{timestampIsSet:!0}]}}])&&mJ(t.prototype,n),r&&mJ(t,r),i}(eq),EJ={G:new lq,y:new Jq,Y:new uG,R:new bG,u:new PG,Q:new FG,q:new QG,M:new iQ,L:new mQ,w:new CQ,I:new MQ,d:new qQ,D:new rX,E:new hX,e:new OX,c:new IX,i:new WX,a:new eK,b:new lK,B:new wK,h:new _K,H:new LK,K:new XK,k:new a$,m:new g$,s:new k$,S:new N$,X:new Y$,x:new nJ,t:new fJ,T:new xJ};function OJ(e){return OJ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},OJ(e)}function CJ(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return kJ(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return kJ(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return a=e.done,e},e:function(e){c=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(c)throw i}}}}function kJ(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var SJ=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,DJ=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,PJ=/^'([^]*?)'?$/,_J=/''/g,jJ=/\S/,TJ=/[a-zA-Z]/;function RJ(e,t,n,r){var o,i,a,c,s,u,l,d,f,p,h,m,g,v,y,b,w,A;(0,il.Z)(3,arguments);var x=String(e),E=String(t),O=(0,wl.j)(),C=null!==(o=null!==(i=null==r?void 0:r.locale)&&void 0!==i?i:O.locale)&&void 0!==o?o:Gl;if(!C.match)throw new RangeError("locale must contain match property");var k=(0,ll.Z)(null!==(a=null!==(c=null!==(s=null!==(u=null==r?void 0:r.firstWeekContainsDate)&&void 0!==u?u:null==r||null===(l=r.locale)||void 0===l||null===(d=l.options)||void 0===d?void 0:d.firstWeekContainsDate)&&void 0!==s?s:O.firstWeekContainsDate)&&void 0!==c?c:null===(f=O.locale)||void 0===f||null===(p=f.options)||void 0===p?void 0:p.firstWeekContainsDate)&&void 0!==a?a:1);if(!(k>=1&&k<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var S=(0,ll.Z)(null!==(h=null!==(m=null!==(g=null!==(v=null==r?void 0:r.weekStartsOn)&&void 0!==v?v:null==r||null===(y=r.locale)||void 0===y||null===(b=y.options)||void 0===b?void 0:b.weekStartsOn)&&void 0!==g?g:O.weekStartsOn)&&void 0!==m?m:null===(w=O.locale)||void 0===w||null===(A=w.options)||void 0===A?void 0:A.weekStartsOn)&&void 0!==h?h:0);if(!(S>=0&&S<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(""===E)return""===x?(0,sl.Z)(n):new Date(NaN);var D,P={firstWeekContainsDate:k,weekStartsOn:S,locale:C},_=[new $Y],j=E.match(DJ).map((function(e){var t=e[0];return t in Hl?(0,Hl[t])(e,C.formatLong):e})).join("").match(SJ),T=[],R=CJ(j);try{var I=function(){var t=D.value;null!=r&&r.useAdditionalWeekYearTokens||!Yl(t)||ql(t,E,e),null!=r&&r.useAdditionalDayOfYearTokens||!Vl(t)||ql(t,E,e);var n=t[0],o=EJ[n];if(o){var i=o.incompatibleTokens;if(Array.isArray(i)){var a=T.find((function(e){return i.includes(e.token)||e.token===n}));if(a)throw new RangeError("The format string mustn't contain `".concat(a.fullToken,"` and `").concat(t,"` at the same time"))}else if("*"===o.incompatibleTokens&&T.length>0)throw new RangeError("The format string mustn't contain `".concat(t,"` and any other token at the same time"));T.push({token:n,fullToken:t});var c=o.run(x,t,C.match,P);if(!c)return{v:new Date(NaN)};_.push(c.setter),x=c.rest}else{if(n.match(TJ))throw new RangeError("Format string contains an unescaped latin alphabet character `"+n+"`");if("''"===t?t="'":"'"===n&&(t=IJ(t)),0!==x.indexOf(t))return{v:new Date(NaN)};x=x.slice(t.length)}};for(R.s();!(D=R.n()).done;){var M=I();if("object"===OJ(M))return M.v}}catch(e){R.e(e)}finally{R.f()}if(x.length>0&&jJ.test(x))return new Date(NaN);var N=_.map((function(e){return e.priority})).sort((function(e,t){return t-e})).filter((function(e,t,n){return n.indexOf(e)===t})).map((function(e){return _.filter((function(t){return t.priority===e})).sort((function(e,t){return t.subPriority-e.subPriority}))})).map((function(e){return e[0]})),B=(0,sl.Z)(n);if(isNaN(B.getTime()))return new Date(NaN);var Z,F=fl(B,Ul(B)),L={},H=CJ(N);try{for(H.s();!(Z=H.n()).done;){var U=Z.value;if(!U.validate(F,P))return new Date(NaN);var z=U.set(F,L,P);Array.isArray(z)?(F=z[0],ZY(L,z[1])):F=z}}catch(e){H.e(e)}finally{H.f()}return F}function IJ(e){return e.match(PJ)[1].replace(_J,"'")}function MJ(e,t,n){return(0,il.Z)(2,arguments),ul(RJ(e,t,new Date,n))}var NJ=a(70722),BJ="yyyy-MM-dd",ZJ="yyyy-MM-dd HH:mm",FJ=function(e){return MJ(e,BJ)?RJ(e,BJ,new Date):MJ(e,ZJ)?RJ(e,ZJ,new Date):MJ(e,"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")||MJ(e,"yyyy-MM-dd'T'HH:mm:ss.SSSxxx")?new Date(e):NaN},LJ=function(e){return null!=e&&""!==e},HJ=function(e,t,n){return[].concat(z()(LJ(e.from)?[t(n,e.from,">=")]:[]),z()(LJ(e.to)?[t(n,e.to,e.exclusive?"<":"<=")]:[])).join(" and ")},UJ=function(e){switch(e){case"datetime":case"createts":case"updatets":return function(e){var t=function(e){return nd(FJ(e))}(e);return isNaN(t)?e:{from:t.toISOString(),to:BY(t,1).toISOString(),isRangeValue:!0,exclusive:!0}};default:return function(e){return e}}},zJ=function(e){switch(e){case"multi-select-box":case"multi-remote-field":return function(e,t){return'KEYS("'.concat(e,'",').concat(t.map((function(e){return e.key})).join(","),")")};case"single-remote-field":case"single-select-box":return function(e,t){return"".concat(e,".pk == ").concat(t.key)};case"fulltext-search":return function(e,t){var n=function(e){return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}(t);return"txtFulltext"===e?'fulltext("('.concat(n,") OR (").concat(n,'*)")'):'fulltext("('.concat(n,") OR (").concat(n,'*)", ').concat(e,")")};case"birthdate":case"date":case"create_timestamp":return function(e,t,n){return"".concat(e," ").concat(n,' date:"').concat(t,'"')};case"datetime":case"createts":case"updatets":return function(e,t,n){return"".concat(e," ").concat(n,' datetime:"').concat(function(e){return(0,NJ.formatInTimeZone)(e,"UTC",ZJ)}(FJ(t)),'"')};case"time":return function(e,t,n){return"".concat(e," ").concat(n,' time:"').concat(function(e){return ed(e,"HH:mm:ss.SSS")}(function(e){return RJ(e,"HH:mm",new Date)}(t)),'"')};case"compressed-text":case"identifier":case"string":case"text":case"createuser":case"updateuser":case"login":return function(e,t){return"".concat(e,' ~= "*').concat(t,'*"')};case"boolean":return function(e,t){return LJ(t)?"".concat(e," == ").concat(t):null};case"marking":return function(e,t){return!1===t?"not exists(".concat(e,")"):"exists(".concat(e,")")};default:return function(e,t,n){return"".concat(e," ").concat(n," ").concat(t)}}},WJ=function(e){return wm()(e)&&e.key?"single-select-box":Array.isArray(e)&&e.every((function(e){return!!e.key}))?"multi-select-box":"string"};const VJ=function(e,t,n){if(!LJ(t))return null;var r=n||WJ(t),o=(t=UJ(r)(t))&&"object"===mw()(t)&&t.isRangeValue,i=zJ(r);return o?HJ(t,i,e):i(e,t,"==")};function YJ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function qJ(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?YJ(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):YJ(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var GJ,QJ,XJ,KJ,$J,JJ,e0,t0,n0=function(e){return Array.isArray(e)?e.map((function(e){return e.uniqueId})):[e.uniqueId]},r0=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Om()(e,(function(e,n,r){var o={};if("searchFilter"===r)n&&(o.filters=n0(n));else{var i=t[r],a=VJ(r,n,i);o.tql=[].concat(z()(e.tql?[e.tql]:[]),[a]).filter(Boolean).join(" and ")}return qJ(qJ({},e),o)}),{})},o0=b.ZP.div.withConfig({displayName:"StyledColumnPickerWrapper"})(GJ||(GJ=(0,v.Z)([""]))),i0=b.ZP.div.withConfig({displayName:"StyledControlsWrapper"})(QJ||(QJ=(0,v.Z)(["\n margin-top: ",";\n"])),x.Z.space(.7)),a0=b.ZP.ul.withConfig({displayName:"StyledUl"})(XJ||(XJ=(0,v.Z)(["\n list-style-type: none;\n margin-top: "," !important; // Nice2 Reset\n padding-left: 0 !important; // Nice2 Reset\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));\n\n "," {\n padding: 0 !important; // Nice2 Reset\n }\n"])),x.Z.space(-.5),DP.ar),c0=b.ZP.input.withConfig({displayName:"StyledCheckbox"})(KJ||(KJ=(0,v.Z)(["\n vertical-align: top;\n margin-right: "," !important; // Nice2 Reset\n\n &:hover {\n cursor: pointer;\n }\n"])),x.Z.space(-1)),s0=b.ZP.div.withConfig({displayName:"StyledButtonWrapper"})($J||($J=(0,v.Z)(["\n position: sticky;\n bottom: 0;\n padding-top: ",";\n background-color: ",";\n display: flex;\n justify-content: flex-end;\n\n "," {\n margin-right: 0;\n }\n"])),x.Z.space(0),w.FS.color("paper"),gd.Z),u0=b.ZP.span.withConfig({displayName:"StyledId"})(JJ||(JJ=(0,v.Z)(["\n color: ",";\n font-style: italic;\n"])),w.FS.color("text")),l0=(0,b.ZP)(aR.EF).withConfig({displayName:"StyledItem"})(e0||(e0=(0,v.Z)(["\n display: flex;\n padding: "," "," "," 0;\n border-right: ",";\n ","\n"])),x.Z.space(-2),x.Z.space(-2),x.Z.space(-2),(function(e){var t=e.isDraggedOver,n=e.theme;return t?"3px solid ".concat(n.colors.secondary):"none"}),(function(e){var t=e.draggable,n=e.theme;return t&&"\n &:hover {\n background-color: ".concat((0,rf.xn)(n.colors.paper)[1],";\n\n &,\n label {\n cursor: pointer;\n }\n }\n ")})),d0=b.ZP.span.withConfig({displayName:"StyledNumber"})(t0||(t0=(0,v.Z)(["\n display: inline-block;\n margin-right: ",";\n color: ",";\n font-size: ",";\n"])),x.Z.space(-1),w.FS.color("text"),x.Z.font(0));function f0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function p0(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f0(Object(n),!0).forEach((function(t){(0,Iv.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f0(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var h0=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"hidden";return e.sort((function(e,n){return e[t]-n[t]}))},m0=function(e,t){return e.filter((function(e){return null===t||e.label.match(new RegExp(t,"i"))}))};const g0=function(e){var t=e.onOk,n=e.dndEnabled,r=e.initialColumns,o=e.intl,i=e.buttonLabel,a=(0,R.useState)([]),c=(0,wd.Z)(a,2),s=c[0],u=c[1],l=h0(r);(0,R.useEffect)((function(){return u(l)}),[l]);var d=(0,R.useState)(null),f=(0,wd.Z)(d,2),p=f[0],h=f[1],m=(0,R.useCallback)((function(e,t){if(e!==t){var n=s.find((function(t){return t.id===e}));u((function(e){return e.filter((function(e){return e!==n})).reduce((function(e,r){return[].concat((0,RO.Z)(e),[r],(0,RO.Z)(r.id===t?[n]:[]))}),[])}))}}),[s]),g=TH(m),v=g.dndEvents,y=g.dndState,b=(0,R.useMemo)((function(){return m0(s,p)}),[s,p]),w=b.some((function(e){return e.hidden})),A=(0,R.useMemo)((function(){return b.map((function(e,t){var r=y.currentlyDragOver===e.id&&y.currentlyDragging!==e.id;return(0,S.jsxs)(l0,p0(p0({draggable:n,isDraggedOver:r},n&&p0({},v(e.id))),{},{children:[(0,S.jsx)(c0,{type:"checkbox",id:e.id,checked:!e.hidden,onChange:function(t){u((function(n){return h0(n.map((function(n){return n.id===e.id?p0(p0({},n),{},{hidden:!t.target.checked}):n})))}))}}),(0,S.jsxs)(Zd.ZP.Label,{for:e.id,children:[(0,S.jsxs)(d0,{children:[t+1,"."]}),e.label?(0,S.jsx)("span",{dangerouslySetInnerHTML:{__html:hk.Z.sanitizeHtml(e.label)}}):(0,S.jsx)(u0,{children:e.id})]})]}),e.id)}))}),[y,n,v,b]);return(0,S.jsxs)(o0,{children:[(0,S.jsx)(zW,{placeholder:o.formatMessage({id:"client.entity-list.preferences.columns.search"}),onSearch:h}),(0,S.jsxs)(i0,{children:[(0,S.jsx)(c0,{type:"checkbox",onChange:function(e){var t=e.target.checked;u((function(e){var n=m0(e,p);return h0((0,RO.Z)(e.map((function(e){return p0(p0({},e),{},{hidden:n.includes(e)?!t:e.hidden})}))))}))},checked:!w}),(0,S.jsx)(Zd.ZP.Span,{children:o.formatMessage({id:"client.entity-list.preferences.columns.selectDeselectAllCheckbox"})})]}),(0,S.jsx)(a0,{children:A}),(0,S.jsx)(s0,{children:(0,S.jsx)(pd.Z,{onClick:function(){return t(s)},look:"raised",children:i||o.formatMessage({id:"client.entity-list.preferences.columns.okButton"})})})]})};const v0=(0,_.connect)((function(e,t){return{columns:t.columns,onOk:t.onOk}}))((0,P.ZP)(g0));const y0=function(e){var t=e.indexOf("order by ");return t>=0?e.substring(t+"order by ".length).split(",").map((function(e){return e.trim()})).map((function(e){return e.split(/\s+/)})).map((function(e){var t=T()(e,2);return{field:t[0],order:t[1]||"asc"}})):[]};var b0,w0,A0=(0,b.ZP)(pd.Z).withConfig({displayName:"StyledButton"})(b0||(b0=Ld()(["\n float: right;\n margin-top: ",";\n margin-right: 0;\n"])),x.Z.space(0));const x0=(0,P.ZP)((function(e){var t=e.intl,n=e.onSave,r=(0,R.useState)(""),o=T()(r,2),i=o[0],a=o[1],c=(0,R.useRef)(null);H.Z.useAutofocus(c);var s;return(0,S.jsxs)("div",{ref:c,children:[(0,S.jsx)(FR,{label:(s="client.entity-list.search.settings.saveAsFilter.nameLabel",t.formatMessage({id:s})),children:(0,S.jsx)(iT,{type:"string",value:i,events:{onChange:a}})}),(0,S.jsx)(A0,{onClick:function(){return n(i)},look:"raised",ink:"primary",disabled:!i,children:w0||(w0=(0,S.jsx)(fd.Z,{id:"client.entity-list.search.settings.saveAsFilter.button"}))})]})})),E0=x0;var O0,C0=function(e,t){var n={};return ow()(e,(function(e,r){var o=S0.get(r);if(o||(o=D0(YI.transformFieldNameBack(r),t),S0.add(r,o)),o){var i=k0(e,o);i&&(n[r]=i)}})),n},k0=function(e,t){var n=t.dataType,r=_0[n];return r?r(e):null},S0=(O0={},{add:function(e,t){O0[e]=t},get:function(e){return O0[e]}}),D0=function e(t,n){if(n.id===t)return n.children[0];var r=null;return n.children&&n.children.forEach((function(n){var o=e(t,n);o&&(r=o)})),r},P0=function(e){if(e.length>0&&e.length<2)return{minLength:[(0,S.jsx)(fd.Z,{id:"client.entity-list.searchFormValidationMinLength",values:{minLength:2}},"minLength")]}},_0={string:P0,"fulltext-search":P0};function j0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function T0(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?j0(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):j0(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var R0=Zf().mark(h1),I0=Zf().mark(m1),M0=Zf().mark(g1),N0=Zf().mark(v1),B0=Zf().mark(y1),Z0=Zf().mark(w1),F0=Zf().mark(A1),L0=Zf().mark(x1),H0=Zf().mark(E1),U0=Zf().mark(O1),z0=Zf().mark(C1),W0=Zf().mark(k1),V0=Zf().mark(S1),Y0=Zf().mark(D1),q0=Zf().mark(P1),G0=Zf().mark(_1),Q0=Zf().mark(j1),X0=Zf().mark(T1),K0=Zf().mark(R1),$0=Zf().mark(I1),J0=Zf().mark(M1),e1=Zf().mark(N1),t1=Zf().mark(B1),n1=Zf().mark(Z1),r1=Zf().mark(F1),o1=Zf().mark(L1),i1=Zf().mark(H1),a1=Zf().mark(U1),c1=function(e){return e.input},s1=function(e){return e.searchForm},u1=function(e){return e.list},l1=function(e){return e.entityList},d1=function(e){return e.list.formDefinition},f1=ix("searchForm"),p1=(GW("searchForm"),"searchForm");function h1(){return Zf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Ff.$6)([(0,Ff.Fm)(YZ,m1),(0,Ff.Fm)(yA,w1),(0,Ff.Fm)($Z,w1),(0,Ff.Fm)(OZ,g1),(0,Ff.Fm)(QZ,k1),(0,Ff.Fm)(oF,D1),(0,Ff.Fm)(rF,T1),(0,Ff.Fm)(iF,R1),(0,Ff.Fm)(aF,I1),(0,Ff.Fm)(cF,M1),(0,Ff.Fm)(sF,B1),(0,Ff.Fm)(uF,Z1),(0,Ff.Fm)(lF,F1),(0,Ff.Fm)(hF,H1),(0,Ff.Fm)(mF,U1),(0,Ff.Fm)(dF,U1),(0,Ff.Ds)(500,fF,L1)]);case 2:case"end":return e.stop()}}),R0)}function m1(){var e,t,n,r,o,i;return Zf().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,(0,Ff.Ys)(c1);case 2:return e=a.sent,t=e.entityName,a.next=6,(0,Ff.Ys)(l1);case 6:return n=a.sent,r=n.searchFormType,o=r!==PW.NONE,a.next=11,(0,Ff.RE)(g1);case 11:return i=a.sent,a.next=14,(0,Ff.RE)(y1,o,i);case 14:if(r!==PW.ADMIN){a.next=17;break}return a.next=17,(0,Ff.RE)(A1,t);case 17:return a.next=19,(0,Ff.gz)(gF());case 19:case"end":return a.stop()}}),I0)}function g1(){var e,t,n;return Zf().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,(0,Ff.Ys)(l1);case 2:if(e=r.sent,t=e.searchFormType,!(t!==PW.NONE)){r.next=11;break}return r.next=8,(0,Ff.RE)(E1);case 8:r.t0=r.sent,r.next=12;break;case 11:r.t0=null;case 12:return n=r.t0,r.abrupt("return",n);case 14:case"end":return r.stop()}}),M0)}function v1(){var e,t;return Zf().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,Ff.Ys)(d1);case 2:if(e=n.sent){n.next=8;break}return n.next=6,(0,Ff.qn)(QH);case 6:return t=n.sent,n.abrupt("return",t.payload.formDefinition);case 8:return n.abrupt("return",e);case 9:case"end":return n.stop()}}),N0)}function y1(e,t){var n,r,o,i,a,c,s,u,l,d,f,p;return Zf().wrap((function(h){for(;;)switch(h.prev=h.next){case 0:return h.next=2,(0,Ff.Ys)(c1);case 2:if(n=h.sent,r=n.preselectedSearchFields,o=n.parent,i={},!r){h.next=19;break}return h.next=9,(0,Ff.RE)(O1);case 9:if(a=h.sent,!e){h.next=16;break}return h.next=13,(0,Ff.RE)(YI.transformInputValues,r,a);case 13:h.t0=h.sent,h.next=17;break;case 16:h.t0=r;case 17:c=h.t0,i=T0(T0({},i),c);case 19:if(!o||Object.prototype.hasOwnProperty.call(i,o.reverseRelationName)){h.next=31;break}return h.next=22,(0,Ff.RE)(v1);case 22:return s=h.sent,h.next=25,(0,Ff.RE)(Bz,s);case 25:if(h.sent){h.next=31;break}return h.next=29,(0,Ff.RE)(uh.Z.fetchDisplay,o.model,o.key);case 29:u=h.sent,i[o.reverseRelationName]={key:o.key,display:u};case 31:if(!e||!t){h.next=39;break}return h.next=34,(0,Ff.RE)(YI.getFieldDefinitions,t);case 34:return l=h.sent,h.next=37,(0,Ff.RE)(YI.getDefaultValues,l);case 37:d=h.sent,i=T0(T0({},d),i);case 39:return h.next=41,(0,Ff.RE)(b1,i);case 41:return f=h.sent,h.next=44,(0,Ff.Ys)(ix(p1));case 44:return p=h.sent,h.next=47,(0,Ff.gz)(UA.initialize(p1,f));case 47:if(!p){h.next=50;break}return h.next=50,(0,Ff.$6)(Object.keys(p).map((function(e){return(0,Ff.gz)(UA.change(p1,e,p[e]))})));case 50:return h.next=52,(0,Ff.gz)({type:JZ,payload:{valuesInitialized:!0}});case 52:case"end":return h.stop()}}),B0)}function b1(e){return Om()(e,(function(e,t,n){return T0(T0({},e),{},L()({},YI.transformFieldName(n),t))}),{})}function w1(){var e,t,n,r;return Zf().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,(0,Ff.Ys)(ix(p1));case 2:return e=o.sent,o.next=5,(0,Ff.Ys)(s1);case 5:return t=o.sent,n=t.formDefinition,o.next=9,(0,Ff.RE)(C0,e,n);case 9:if(r=o.sent,0!==Object.keys(r).length){o.next=13;break}return o.next=13,(0,Ff.gz)(bF());case 13:case"end":return o.stop()}}),Z0)}function A1(e){var t,n,r,o;return Zf().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,(0,Ff.RE)(uh.Z.fetchSearchFilters,e);case 2:return t=i.sent,i.next=5,(0,Ff.Ys)(c1);case 5:return n=i.sent,r=n.parent,o=!r,i.next=10,(0,Ff.gz)(xF(t.map((function(e){return T0(T0({},e),o&&e.defaultFilter&&{active:!0})}))));case 10:case"end":return i.stop()}}),F0)}function x1(){var e;return Zf().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e={txtFulltext:"fulltext-search"},t.next=3,(0,Ff.gz)(AF(e));case 3:case"end":return t.stop()}}),L0)}function E1(){var e,t,n,r,o,i,a,c=arguments;return Zf().wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return e=c.length>0&&void 0!==c[0]&&c[0],s.next=3,(0,Ff.Ys)(c1);case 3:return t=s.sent,n=t.formName,s.next=7,(0,Ff.Ys)(l1);case 7:if(r=s.sent,r.searchFormType!==PW.FULLTEXT){s.next=13;break}return s.next=12,(0,Ff.RE)(x1);case 12:return s.abrupt("return",null);case 13:return s.next=15,(0,Ff.RE)(uh.Z.fetchForm,n,"search",!0,e);case 15:if(!(o=s.sent)){s.next=32;break}return s.next=19,(0,Ff.Ys)(c1);case 19:if(i=s.sent,!(a=i.parent)||!a.reverseRelationName){s.next=25;break}return s.next=24,(0,Ff.RE)(Kz,o,a.reverseRelationName);case 24:o=s.sent;case 25:return s.next=27,(0,Ff.gz)(yF(o));case 27:return s.next=29,(0,Ff.gz)(AF(Qz(o)));case 29:return s.abrupt("return",o);case 32:return s.next=34,(0,Ff.gz)(PZ(PW.FULLTEXT));case 34:return s.next=36,(0,Ff.RE)(x1);case 36:return s.abrupt("return",null);case 37:case"end":return s.stop()}}),H0)}function O1(){var e,t,n;return Zf().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,(0,Ff.Ys)(u1);case 2:if(e=r.sent,0!==Object.keys(e.entityModel).length){r.next=6;break}return r.next=6,(0,Ff.qn)(KH);case 6:return r.next=8,(0,Ff.Ys)(u1);case 8:return t=r.sent,n=t.entityModel,r.abrupt("return",n);case 11:case"end":return r.stop()}}),U0)}function C1(){var e,t;return Zf().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,Ff.Ys)(s1);case 2:return e=n.sent,t=e.searchFilters,n.next=6,(0,Ff.gz)(xF(t.map((function(e){return T0(T0({},e),{},{active:e.defaultFilter})}))));case 6:case"end":return n.stop()}}),z0)}function k1(){return Zf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Ff.RE)(C1);case 2:return e.next=4,(0,Ff.gz)(UA.reset("searchForm"));case 4:return e.next=6,(0,Ff.RE)(w1);case 6:case"end":return e.stop()}}),W0)}function S1(){var e,t;return Zf().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,Ff.Ys)(s1);case 2:if(e=n.sent,e.valuesInitialized){n.next=7;break}return n.next=7,(0,Ff.qn)(JZ);case 7:return n.next=9,(0,Ff.Ys)(f1);case 9:return t=n.sent,n.abrupt("return",Om()(t,(function(e,t,n){return T0(T0({},e),!Array.isArray(t)||t.length?L()({},YI.transformFieldNameBack(n),t):{})}),{}));case 11:case"end":return n.stop()}}),V0)}function D1(){var e,t,n,r,o,i,a,c;return Zf().wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return s.next=2,(0,Ff.RE)(_1);case 2:return e=s.sent,s.next=5,(0,Ff.RE)(N2,!1);case 5:return t=s.sent,n=t.where,r=t.filter,s.next=10,(0,Ff.Ys)(u1);case 10:return o=s.sent,i=o.sorting,s.next=14,(0,Ff.Ys)(c1);case 14:return a=s.sent,c=a.entityName,s.next=18,(0,Ff.RE)(P1,e,c,n,i,r);case 18:case"end":return s.stop()}}),Y0)}function P1(e,t,n,r,o){var i;return Zf().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,(0,Ff.RE)(j1,e,t,n,r,o);case 2:return i=a.sent,a.next=5,(0,Ff.RE)(A1,t);case 5:return a.next=7,(0,Ff.RE)(k1);case 7:return a.next=9,(0,Ff.gz)(EF(i.uniqueId,!0,!0));case 9:case"end":return a.stop()}}),q0)}function _1(){var e;return Zf().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,Ff.RE)(yh.CE);case 2:return e=t.sent,t.next=5,(0,Ff.gz)(m.Z.modal("filter-save","client.entity-list.search.settings.saveAsFilter",null,(function(t){var n=t.close;return(0,S.jsx)(E0,{onSave:function(t){n(),e.put(t)}})}),!0));case 5:return t.next=7,(0,Ff.qn)(e);case 7:return t.abrupt("return",t.sent);case 8:case"end":return t.stop()}}),G0)}function j1(e,t,n,r,o){var i,a,c,s;return Zf().wrap((function(u){for(;;)switch(u.prev=u.next){case 0:return i=uh.Z.createSortingString(r),"client/searchfilters",a={name:e,query:n,entityName:t,order:i,filters:o},u.next=5,(0,Ff.RE)(uh.Z.requestSaga,"client/searchfilters",{method:"POST",body:a});case 5:return c=u.sent,s=c.body,u.abrupt("return",s);case 8:case"end":return u.stop()}}),Q0)}function T1(e){var t,n,r,o,i,a,c;return Zf().wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return t=e.payload.primaryKey,s.next=3,(0,Ff.Ys)(c1);case 3:return n=s.sent,r=n.actionAppComponent,o=n.navigationStrategy,s.next=8,(0,Ff.RE)(yh.CE);case 8:return i=s.sent,s.next=11,(0,Ff.gz)(m.Z.modal("filter-delete","client.actions.delete.title",null,(function(e){var n=e.close;return(0,S.jsx)(r,{appId:"delete",selection:{entityName:"Search_filter",ids:[t],type:"ID"},navigationStrategy:o,onSuccess:function(){i.put(!0),n()},onCancel:function(){i.put(!1),n()}})}),!0));case 11:return s.next=13,(0,Ff.qn)(i);case 13:if(!s.sent){s.next=23;break}return s.next=17,(0,Ff.Ys)(c1);case 17:return a=s.sent,c=a.entityName,s.next=21,(0,Ff.RE)(A1,c);case 21:return s.next=23,(0,Ff.RE)(k1);case 23:case"end":return s.stop()}}),X0)}function R1(){var e,t,n,r,o;return Zf().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,(0,Ff.Ys)(s1);case 2:return e=i.sent,t=e.searchFilters,n=e.formDefinition,r="".concat(n.modelName,".").concat(n.id,".searchfilter"),o=t.find((function(e){return e.active})).key,i.next=9,(0,Ff.RE)(uh.Z.savePreferences,L()({},r,o));case 9:return i.next=11,(0,Ff.gz)(m.Z.toaster({type:"success",title:"client.entity-list.search.settings.defaultFilter.save.success"}));case 11:case"end":return i.stop()}}),K0)}function I1(){var e,t;return Zf().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,Ff.Ys)(s1);case 2:return e=n.sent,t=e.formDefinition,n.next=6,(0,Ff.RE)(uh.Z.deleteUserPreferences,"".concat(t.modelName,".").concat(t.id,".searchfilter"));case 6:return n.next=8,(0,Ff.gz)(m.Z.toaster({type:"success",title:"client.entity-list.search.settings.defaultFilter.reset.success"}));case 8:case"end":return n.stop()}}),$0)}function M1(){var e,t,n,r,o;return Zf().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,(0,Ff.Ys)(s1);case 2:return e=i.sent,t=e.formDefinition,n=t.children.flatMap((function(e){return e.children})).map((function(e){return{id:e.id,label:e.label,hidden:!0===e.hidden}})),r=[].concat(z()(n.filter((function(e){return!e.hidden}))),z()(n.filter((function(e){return e.hidden})))),i.next=8,(0,Ff.RE)(yh.CE);case 8:return o=i.sent,i.next=11,(0,Ff.gz)(m.Z.modal("".concat(t.id,"-search-fields-selection"),"client.entity-list.search.settings.searchForm.edit",null,(function(e){var t=e.close;return(0,S.jsx)(v0,{initialColumns:r,onOk:function(e){t(),o.put(e)},dndEnabled:!0})}),!0));case 11:return i.next=13,(0,Ff.RE)(N1,t.modelName,o);case 13:return i.next=15,(0,Ff.RE)(E1,!0);case 15:return i.next=17,(0,Ff.RE)(k1);case 17:case"end":return i.stop()}}),J0)}function N1(e,t){var n,r,o;return Zf().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,(0,Ff.qn)(t);case 2:return n=i.sent,r="forms/".concat(e,"/search-fields"),o={method:"POST",body:{hiddenFields:n.filter((function(e){return e.hidden})).map((function(e){return e.id})),displayedFields:n.filter((function(e){return!e.hidden})).map((function(e){return e.id}))}},i.next=7,(0,Ff.RE)(uh.Z.requestSaga,r,o);case 7:case"end":return i.stop()}}),e1)}function B1(){var e,t,n,r;return Zf().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,(0,Ff.Ys)(s1);case 2:return e=o.sent,t=e.formDefinition,n="forms/".concat(t.modelName,"/search-fields/reset"),r={method:"POST"},o.next=8,(0,Ff.RE)(uh.Z.requestSaga,n,r);case 8:return o.next=10,(0,Ff.RE)(E1,!0);case 10:return o.next=12,(0,Ff.RE)(k1);case 12:case"end":return o.stop()}}),t1)}function Z1(){var e,t,n,r,o,i,a,c,s,u,l,d;return Zf().wrap((function(f){for(;;)switch(f.prev=f.next){case 0:return f.next=2,(0,Ff.RE)(Z2);case 2:return e=f.sent,t=e.where,n=e.filter,f.next=7,(0,Ff.Ys)(u1);case 7:return r=f.sent,o=r.sorting,i=o.map((function(e){var t=e.field,n=e.order;return"".concat(t," ").concat(n)})).join(", "),f.next=12,(0,Ff.Ys)(c1);case 12:return a=f.sent,c=a.entityName,s="client/query/".concat(c,"/build"),u={method:"POST",body:{condition:t,filters:n,sorting:i}},f.next=18,(0,Ff.RE)(uh.Z.requestSaga,s,u);case 18:return l=f.sent,d=l.body.query,f.next=22,(0,Ff.gz)(CF(d));case 22:return f.next=24,(0,Ff.RE)(L1);case 24:case"end":return f.stop()}}),n1)}function F1(){var e,t,n,r,o,i,a,c;return Zf().wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return s.next=2,(0,Ff.RE)(_1);case 2:return e=s.sent,s.next=5,(0,Ff.Ys)(s1);case 5:return t=s.sent,n=t.query,s.next=9,(0,Ff.Ys)(c1);case 9:return r=s.sent,o=r.entityName,i=y0(n),a=n.indexOf("order by"),c=a>=0?n.substring(0,a-1):n,s.next=16,(0,Ff.RE)(P1,e,o,c,i);case 16:return s.next=18,(0,Ff.gz)(OF(!1));case 18:case"end":return s.stop()}}),r1)}function L1(){var e,t,n,r,o,i,a,c,s,u;return Zf().wrap((function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,(0,Ff.Ys)(s1);case 2:return e=l.sent,t=e.query,l.next=6,(0,Ff.Ys)(c1);case 6:return n=l.sent,r=n.entityName,o="client/query/".concat(r,"/validation"),i={method:"POST",body:{condition:t}},l.next=12,(0,Ff.RE)(uh.Z.requestSaga,o,i);case 12:if(a=l.sent,c=a.body,s=c.valid,u=c.message,s){l.next=21;break}return l.next=19,(0,Ff.gz)(kF({error:[u]}));case 19:l.next=23;break;case 21:return l.next=23,(0,Ff.gz)(kF({}));case 23:case"end":return l.stop()}}),o1)}function H1(){var e,t,n,r;return Zf().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,(0,Ff.Ys)(s1);case 2:if(e=o.sent,t=e.query,(n=e.queryError)&&0!==Object.entries(n).length){o.next=13;break}if(!(t.indexOf("order by")>=0)){o.next=11;break}return r=y0(t),o.next=11,(0,Ff.gz)(EU(r));case 11:return o.next=13,(0,Ff.gz)(bF());case 13:case"end":return o.stop()}}),i1)}function U1(){return Zf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Ff.gz)(kU());case 2:case"end":return e.stop()}}),a1)}function z1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function W1(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?z1(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):z1(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var V1=Zf().mark(T2),Y1=Zf().mark(R2),q1=Zf().mark(I2),G1=Zf().mark(M2),Q1=Zf().mark(N2),X1=Zf().mark(B2),K1=Zf().mark(Z2),$1=Zf().mark(F2),J1=Zf().mark(L2),e2=Zf().mark(H2),t2=Zf().mark(U2),n2=Zf().mark(z2),r2=Zf().mark(W2),o2=Zf().mark(V2),i2=Zf().mark(q2),a2=Zf().mark(G2),c2=Zf().mark(Q2),s2=Zf().mark(X2),u2=Zf().mark(K2),l2=Zf().mark($2),d2=Zf().mark(J2),f2=Zf().mark(e3),p2=Zf().mark(t3),h2=Zf().mark(n3),m2=Zf().mark(r3),g2=Zf().mark(o3),v2=Zf().mark(a3),y2=Zf().mark(c3),b2=Zf().mark(s3),w2=Zf().mark(u3),A2=Zf().mark(l3),x2=Zf().mark(d3),E2=Zf().mark(f3),O2=Zf().mark(m3),C2=Zf().mark(g3),k2=function(e){return e},S2=function(e){return e.input},D2=function(e){return e.list},P2=function(e){return e.searchForm},_2=function(e){return e.selection},j2=function(e){return e.preferences};function T2(){return Zf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Ff.$6)([(0,Ff.Fm)(qH,R2),(0,Ff.Fm)(oU,H2),(0,Ff.Fm)(GZ,z2),(0,Ff.Fm)(GZ,I2),(0,Ff.Fm)(dU,z2),(0,Ff.Fm)(iU,U2),(0,Ff.Fm)(sU,d3),(0,Ff.Fm)(lU,f3),(0,Ff.Fm)(az,z2),(0,Ff.Fm)(cU,l3),(0,Ff.ib)(mh,m3),(0,Ff.Fm)(nF,a3),(0,Ff.Fm)(fU,a3),(0,Ff.Fm)(mU,X2),(0,Ff.Fm)(gU,K2)]);case 2:case"end":return e.stop()}}),V1)}function R2(){var e,t,n,r,o;return Zf().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,(0,Ff.Ys)(S2);case 2:return e=i.sent,t=e.entityName,n=e.formName,r=e.searchListFormName,o=e.scope,i.next=9,(0,Ff.$6)([(0,Ff.RE)(c3,n,o,AU),(0,Ff.RE)(u3,t),r?(0,Ff.RE)(c3,r,o,xU):void 0]);case 9:return i.next=11,(0,Ff.gz)({type:hU});case 11:case"end":return i.stop()}}),Y1)}function I2(){var e;return Zf().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,Ff.RE)(N2);case 2:return e=t.sent,t.next=5,(0,Ff.gz)(lz(e));case 5:return t.next=7,(0,Ff.gz)(h.Z.fireExternalEvent("onSearchChange",{query:e}));case 7:case"end":return t.stop()}}),q1)}function M2(e){return Zf().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,Ff.gz)(CU(!0));case 2:return t.next=4,(0,Ff.rM)(L2);case 4:return t.next=6,(0,Ff.gz)({type:nU});case 6:return t.next=8,(0,Ff.RE)(e3,e);case 8:return t.next=10,(0,Ff.gz)(CU(!1));case 10:case"end":return t.stop()}}),G1)}function N2(){var e,t,n,r,o,i=arguments;return Zf().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return e=!(i.length>0&&void 0!==i[0])||i[0],a.next=3,(0,Ff.Ys)(_2);case 3:if(t=a.sent,n=t.showSelectedRecords,r=t.selection,!e||!n){a.next=8;break}return a.abrupt("return",{keys:r});case 8:return a.next=10,(0,Ff.Ys)(P2);case 10:if(o=a.sent,!o.queryViewVisible){a.next=18;break}return a.next=15,(0,Ff.RE)(B2);case 15:case 20:return a.abrupt("return",a.sent);case 18:return a.next=20,(0,Ff.RE)(Z2);case 21:case"end":return a.stop()}}),Q1)}function B2(){var e,t,n,r,o,i,a,c,s,u;return Zf().wrap((function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,(0,Ff.Ys)(S2);case 2:return e=l.sent,t=e.keys,l.next=6,(0,Ff.Ys)(D2);case 6:return n=l.sent,r=n.constriction,l.next=10,(0,Ff.Ys)(P2);case 10:return o=l.sent,i=o.query,a=o.queryError,c=a&&0!==Object.entries(a).length,s=i.indexOf("order by"),u=s>=0?i.substring(0,s-1):i,l.abrupt("return",W1(W1(W1(W1({},!c&&{where:u}),r&&{constriction:r}),t?{keys:t}:{}),{},{hasUserChanges:!0}));case 17:case"end":return l.stop()}}),X1)}function Z2(){var e,t,n,r,o,i,a,c,s,u,l,d,f,p,h,m;return Zf().wrap((function(g){for(;;)switch(g.prev=g.next){case 0:return g.next=2,(0,Ff.Ys)(P2);case 2:return e=g.sent,t=e.formFieldsFlat,n=e.searchFilters,g.next=7,(0,Ff.Ys)(S2);case 7:return r=g.sent,o=r.searchFilters,i=r.tql,a=r.keys,c=r.constriction,g.next=14,(0,Ff.Ys)(D2);case 14:return s=g.sent,u=s.constriction,g.next=18,(0,Ff.RE)(S1);case 18:return l=g.sent,g.next=21,(0,Ff.RE)(r0,l,t);case 21:return d=g.sent,f=Rv()(d,["filters","tql"]),g.next=25,(0,Ff.RE)(W2,o,d.filters,n);case 25:return p=g.sent,g.next=28,(0,Ff.RE)(Y2,i,d.tql);case 28:return h=g.sent,m=Object.keys(f).length>0||!Dp()(o||[],p)||!!d.tql&&d.tql.length>0,g.abrupt("return",W1(W1(W1(W1(W1(W1({},f),p&&p.length>0?{filter:p}:{}),h?{where:h}:{}),c||u?{constriction:c||u}:{}),a?{keys:a}:{}),{},{hasUserChanges:m}));case 31:case"end":return g.stop()}}),K1)}function F2(e,t,n){var r,o,i,a;return Zf().wrap((function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,(0,Ff.Ys)(S2);case 2:return r=c.sent,o=r.parent,i=o?o.key:"",a=n&&t?t:e,c.abrupt("return",a?a.replace("{parentKey}",i):null);case 7:case"end":return c.stop()}}),$1)}function L2(){var e,t,n,r,o,i,a,c,s,u,l,d,f;return Zf().wrap((function(p){for(;;)switch(p.prev=p.next){case 0:return p.next=2,(0,Ff.Ys)(k2);case 2:return e=p.sent,t=e.input.entityName,n=e.selection,r=n.showSelectedRecords,o=n.selection,i=!r,p.next=8,(0,Ff.RE)(N2,i);case 8:return a=p.sent,c=Tz(e,a),s=Bz(c),u=Zz(c),p.next=14,(0,Ff.RE)(F2,s,u,a.hasUserChanges);case 14:return l=p.sent,d=W1({method:s?"GET":"POST"},l?{endpoint:l}:{}),p.next=18,(0,Ff.RE)(uh.Z.fetchEntityCount,t,a,d);case 18:if(f=p.sent,!r){p.next=24;break}return p.next=22,(0,Ff.gz)(wU(o.length));case 22:p.next=26;break;case 24:return p.next=26,(0,Ff.gz)(wU(f));case 26:return p.next=28,(0,Ff.gz)({type:oz,payload:{queryCount:f}});case 28:case"end":return p.stop()}}),J1)}function H2(e){var t,n;return Zf().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return t=e.payload,n=t.page,r.next=4,(0,Ff.gz)(CU(!0));case 4:return r.next=6,(0,Ff.gz)(OU(n));case 6:return r.next=8,(0,Ff.RE)(e3,n);case 8:return r.next=10,(0,Ff.gz)(CU(!1));case 10:case"end":return r.stop()}}),e2)}function U2(){var e,t;return Zf().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,Ff.Ys)(D2);case 2:return e=n.sent,t=e.currentPage,n.next=6,(0,Ff.RE)(M2,t);case 6:case"end":return n.stop()}}),t2)}function z2(){return Zf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Ff.gz)(OU(1));case 2:return e.next=4,(0,Ff.RE)(M2,1);case 4:case"end":return e.stop()}}),n2)}function W2(e,t){var n,r,o=arguments;return Zf().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return n=o.length>2&&void 0!==o[2]?o[2]:[],r=n&&n.filter((function(e){return e.active})).map((function(e){return e.uniqueId})),i.next=4,(0,Ff.RE)(IY(),e,t,r);case 4:return i.abrupt("return",i.sent);case 5:case"end":return i.stop()}}),r2)}function V2(){var e,t;return Zf().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,Ff.Ys)(P2);case 2:return e=n.sent,t=e.searchFilters,n.abrupt("return",t&&t.some((function(e){return e.active&&e.orderBy})));case 5:case"end":return n.stop()}}),o2)}var Y2=function(e,t){return[].concat(z()(e&&e.length>0?["(".concat(e,")")]:[]),z()(t&&t.length>0?["(".concat(t,")")]:[])).join(" and ")};function q2(e,t,n,r){var o,i,a;return Zf().wrap((function(c){for(;;)switch(c.prev=c.next){case 0:if(!(n&&n.length>0&&r.length>0)){c.next=8;break}return o=r.map((function(e){return e.__key})),i=r[0].__model,c.next=5,(0,Ff.RE)(uh.Z.fetchDisplayExpressions,e,t,o,n,i);case 5:return a=c.sent,c.next=8,(0,Ff.gz)(SU("displayExpressions",e,a));case 8:case"end":return c.stop()}}),i2)}function G2(e,t){var n,r,o,i;return Zf().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:if(!(e&&e.length>0)){a.next=13;break}return a.next=3,(0,Ff.Ys)(D2);case 3:return n=a.sent,r=n.lazyData,a.next=7,(0,Ff.RE)(Lm.getPathDisplayRequest,t,e,r);case 7:return o=a.sent,a.next=10,(0,Ff.RE)(uh.Z.fetchDisplays,o);case 10:return i=a.sent,a.next=13,(0,Ff.$6)(Object.keys(i).map((function(e){return(0,Ff.gz)(SU("defaultDisplays",e,i[e]))})));case 13:case"end":return a.stop()}}),a2)}function Q2(e){var t,n,r,o,i;return Zf().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,(0,Ff.Ys)(D2);case 2:if(t=a.sent,n=t.formDefinition,!((r=t.entityModel).markable&&n.markable&&e.length>0)){a.next=12;break}return o={type:"ID",entityName:r.name,ids:e.map((function(e){return e.__key}))},a.next=9,(0,Ff.RE)(uh.Z.fetchMarkings,o);case 9:return i=a.sent,a.next=12,(0,Ff.RE)($2,r.name,i);case 12:case"end":return a.stop()}}),c2)}function X2(e){var t,n,r,o;return Zf().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return t=e.payload,n=t.entityName,r=t.entityKey,o=t.marked,i.prev=1,i.next=4,(0,Ff.$6)([(0,Ff.RE)($2,n,L()({},r,o)),(0,Ff.RE)(uh.Z.setMarked,n,r,o)]);case 4:i.next=11;break;case 6:return i.prev=6,i.t0=i.catch(1),ol.Z.logError("Failed to set marked",i.t0),i.next=11,(0,Ff.RE)($2,n,L()({},r,!o));case 11:case"end":return i.stop()}}),s2,null,[[1,6]])}function K2(e){var t,n,r,o;return Zf().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return t=e.payload.selection,i.prev=1,i.next=4,(0,Ff.RE)(uh.Z.fetchMarkings,t);case 4:return n=i.sent,r=Object.values(n).includes(!1),i.next=8,(0,Ff.RE)(uh.Z.setSelectionMarked,t,r);case 8:return o=i.sent,i.next=11,(0,Ff.RE)($2,t.entityName,o);case 11:i.next=16;break;case 13:i.prev=13,i.t0=i.catch(1),ol.Z.logError("Failed to toggle markings",i.t0);case 16:case"end":return i.stop()}}),u2,null,[[1,13]])}function $2(e,t){var n,r,o,i;return Zf().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,(0,Ff.Ys)(D2);case 2:return n=a.sent,r=n.lazyData,o=r.markings&&r.markings[e]?r.markings[e]:{},i=W1(W1({},o),t),a.next=8,(0,Ff.gz)(SU("markings",e,i));case 8:case"end":return a.stop()}}),l2)}function J2(e){var t,n,r,o,i,a,c,s,u,l,d,f,p,h,m,g,v,y,b,w,A,x,E;return Zf().wrap((function(O){for(;;)switch(O.prev=O.next){case 0:return O.next=2,(0,Ff.Ys)(k2);case 2:if(t=O.sent,n=t.input,r=n.entityName,o=n.scope,i=n.limit,a=t.preferences.columns,c=t.list,s=c.entityStore,u=c.sorting,s[e]){O.next=36;break}return O.next=9,(0,Ff.RE)(N2);case 9:return l=O.sent,d=Tz(t,l),O.next=13,(0,Ff.RE)(Gz,d,a);case 13:return f=O.sent,p=f.paths,h=f.relationFields,m=f.displayExpressionFields,g=W1(W1({},l),{},{page:e,sorting:u,limit:i,paths:p}),v=Bz(d),y=Zz(d),C=d.id,k=void 0,k=C.lastIndexOf("_"),b={formName:C.substring(0,k),scope:C.substring(k+1)},w=b.formName,O.next=23,(0,Ff.RE)(F2,v,y,l.hasUserChanges);case 23:return A=O.sent,x=W1({method:v?"GET":"POST"},A?{endpoint:A}:{}),O.next=27,(0,Ff.RE)(uh.Z.fetchEntities,r,g,x,MY);case 27:return E=O.sent,O.next=30,(0,Ff.gz)(bU(e,E));case 30:return O.next=32,(0,Ff.Cs)(G2,h,E);case 32:return O.next=34,(0,Ff.Cs)(q2,w,o,m,E);case 34:return O.next=36,(0,Ff.Cs)(Q2,E);case 36:case"end":return O.stop()}var C,k}),d2)}function e3(e){var t;return Zf().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,Ff.Ys)(D2);case 2:if(t=n.sent,t.entityStore[e]){n.next=7;break}return n.next=7,(0,Ff.RE)(J2,e);case 7:return n.next=9,(0,Ff.RE)(r3,e);case 9:return n.next=11,(0,Ff.Cs)(t3,e);case 11:case"end":return n.stop()}}),f2)}function t3(e){return Zf().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,Ff.gw)(2e3);case 2:return t.next=4,(0,Ff.RE)(n3,e);case 4:case"end":return t.stop()}}),p2)}function n3(e){var t,n,r,o,i,a,c;return Zf().wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return s.next=2,(0,Ff.Ys)(S2);case 2:return t=s.sent,n=t.limit,s.next=6,(0,Ff.Ys)(D2);case 6:if(r=s.sent,o=r.entityStore,i=r.entityCount,a=e+1,null!=i){s.next=15;break}return s.next=13,(0,Ff.qn)(eU);case 13:c=s.sent,i=c.payload.entityCount;case 15:if(!(e*n<i)||o[a]){s.next=18;break}return s.next=18,(0,Ff.RE)(J2,a);case 18:case"end":return s.stop()}}),h2)}function r3(e){var t,n;return Zf().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,(0,Ff.Ys)(D2);case 2:return t=r.sent,n=t.entityStore[e],r.next=6,(0,Ff.gz)(yU(n));case 6:case"end":return r.stop()}}),m2)}function o3(){var e,t,n;return Zf().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,(0,Ff.Ys)(j2);case 2:if((e=r.sent).sorting){r.next=11;break}return r.next=6,(0,Ff.qn)(RZ);case 6:return t=r.sent,n=t.payload,r.abrupt("return",n.sorting);case 11:return r.abrupt("return",e.sorting);case 12:case"end":return r.stop()}}),g2)}var i3="update_timestamp";function a3(){var e,t,n,r,o,i,a,c;return Zf().wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return s.next=2,(0,Ff.Ys)(D2);case 2:return e=s.sent,t=e.formDefinition,n=e.entityModel,s.next=7,(0,Ff.Ys)(S2);case 7:return r=s.sent,o=r.sorting,s.next=11,(0,Ff.RE)(Iz,t);case 11:return i=s.sent,s.next=14,(0,Ff.RE)(o3);case 14:return a=s.sent,s.next=17,(0,Ff.RE)(V2);case 17:if(c=s.sent,!(a&&a.length>0)){s.next=23;break}return s.next=21,(0,Ff.gz)(EU(a));case 21:case 26:case 31:case 36:s.next=40;break;case 23:if(!(o&&o.length>0)){s.next=28;break}return s.next=26,(0,Ff.gz)(EU(o));case 28:if(!(i&&i.length>0)){s.next=33;break}return s.next=31,(0,Ff.gz)(EU(i));case 33:if(c||!n.paths.update_timestamp){s.next=38;break}return s.next=36,(0,Ff.gz)(EU([{field:i3,order:"desc"}]));case 38:return s.next=40,(0,Ff.gz)(EU([]));case 40:case"end":return s.stop()}}),v2)}function c3(e,t,n){var r,o,i,a,c,s,u,l,d,f,p;return Zf().wrap((function(h){for(;;)switch(h.prev=h.next){case 0:return h.next=2,(0,Ff.Ys)(D2);case 2:if(r=h.sent,(null==(o=r.formDefinition)?void 0:o.id)==="".concat(e,"_").concat(t)){h.next=32;break}return h.next=7,(0,Ff.Ys)(S2);case 7:return i=h.sent,a=i.modifyFormDefinition,c=i.reportIds,s=i.parent,h.next=13,(0,Ff.RE)(uh.Z.fetchForm,e,t);case 13:if(u=h.sent,!a){h.next=20;break}return h.next=17,(0,Ff.RE)(a,u,{parent:s});case 17:h.t0=h.sent,h.next=21;break;case 20:h.t0=u;case 21:return l=h.t0,d=Fz(l),h.next=25,(0,Ff.gz)(_U(d));case 25:return h.next=27,(0,Ff.RE)(s3,c,l);case 27:return f=h.sent,h.next=30,(0,Ff.gz)(n(f));case 30:h.next=35;break;case 32:return p=Fz(o),h.next=35,(0,Ff.gz)(_U(p));case 35:case"end":return h.stop()}}),y2)}function s3(e,t){var n,r;return Zf().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:if(!((null==e?void 0:e.length)>0)){o.next=12;break}return o.next=3,(0,Ff.gz)(HN(e,t.modelName,"list"));case 3:return o.next=5,(0,Ff.qn)(UN);case 5:return n=o.sent,r=n.payload,o.next=9,(0,Ff.RE)(YI.addReports,t,r.reports);case 9:return o.abrupt("return",o.sent);case 12:return o.abrupt("return",t);case 13:case"end":return o.stop()}}),b2)}function u3(e){var t;return Zf().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,Ff.RE)(uh.Z.fetchModel,e);case 2:return t=n.sent,n.next=5,(0,Ff.gz)({type:KH,payload:{entityModel:t}});case 5:case"end":return n.stop()}}),w2)}function l3(e){var t,n,r,o;return Zf().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return t=e.payload,i.next=3,(0,Ff.Ys)(S2);case 3:if(n=i.sent,!0!==n.selectOnRowClick){i.next=12;break}return i.next=8,(0,Ff.Ys)(_2);case 8:return r=i.sent,o=r.selection.includes(t.id),i.next=12,(0,Ff.gz)(sz([t.id],!o));case 12:return i.next=14,(0,Ff.gz)(h.Z.fireExternalEvent("onRowClick",{id:t.id}));case 14:case"end":return i.stop()}}),A2)}function d3(e){var t,n,r;return Zf().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return t=e.payload,o.next=3,(0,Ff.Ys)(S2);case 3:return n=o.sent,r=n.navigationStrategy,o.next=7,(0,Ff.RE)(r.navigateToCreateRelative,t.relationName);case 7:case"end":return o.stop()}}),x2)}function f3(e){var t,n,r,o,i;return Zf().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return t=e.payload,n=t.definition,r=t.selection,a.next=4,(0,Ff.Ys)(S2);case 4:return o=a.sent,i=o.navigationStrategy,a.next=8,(0,Ff.RE)(i.navigateToActionRelative,n,r);case 8:case"end":return a.stop()}}),E2)}var p3,h3=function(e,t){return!!e.payload.entities.find((function(e){return e.entityName===t}))};function m3(e){var t,n,r,o,i;return Zf().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return t=e.payload.event,a.next=3,(0,Ff.Ys)(D2);case 3:if(n=a.sent,r=n.entityModel,!["entity-create-event","entity-delete-event","entity-update-event"].includes(t.type)){a.next=9;break}if(!h3(t,r.name)){a.next=9;break}return a.next=9,(0,Ff.RE)(z2);case 9:if("action-trigger-event"!==t.type){a.next=12;break}return a.next=12,(0,Ff.gz)((o=t.payload).func.apply(o,z()(t.payload.args)));case 12:if("entity-delete-event"!==t.type){a.next=16;break}return i=t.payload.entities.filter((function(e){return e.entityName===r.name})).map((function(e){return e.key})),a.next=16,(0,Ff.gz)(sz(i,!1));case 16:return a.next=18,(0,Ff.gz)(d.Z.emitAction(e));case 18:case"end":return a.stop()}}),O2)}function g3(e){var t,n,r,o,i,a,c,s,u,l;return Zf().wrap((function(d){for(;;)switch(d.prev=d.next){case 0:if("QUERY"!==(t=e.selection).type){d.next=19;break}return d.next=4,(0,Ff.Ys)(k2);case 4:if(n=d.sent,r=Tz(n,t.query),!(o=Bz(r))){d.next=19;break}return i=Zz(r),d.next=11,(0,Ff.RE)(F2,o,i,t.query.hasUserChanges);case 11:return a=d.sent,c={method:"GET",endpoint:a,allKeys:!0},s=n.input.entityName,d.next=16,(0,Ff.RE)(uh.Z.fetchEntities,s,t.query,c,NY);case 16:return u=d.sent,l={type:"ID",entityName:s,ids:u},d.abrupt("return",{selection:l,abort:!1});case 19:return d.abrupt("return",{abort:!1});case 20:case"end":return d.stop()}}),C2)}function v3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function y3(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?v3(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v3(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var b3=function(e,t){var n=t.payload.searchFormType,r=Object.values(PW).find((function(e){return e===n}))||PW.SIMPLE_ADVANCED;return y3(y3({},e),{},{searchFormType:r})},w3=(p3={},L()(p3,xZ,jf.Z.singleTransferReducer("initialized")),L()(p3,EZ,b3),L()(p3,OZ,b3),L()(p3,SZ,jf.Z.singleTransferReducer("searchFormCollapsed")),L()(p3,DZ,jf.Z.singleTransferReducer("searchFormCollapsed")),p3),A3={initialized:!1,searchFormType:PW.SIMPLE_ADVANCED,searchFormCollapsed:!1};const x3=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:A3,t=arguments.length>1?arguments[1]:void 0,n=w3[t.type];return n?n(e,t):e};var E3,O3=Zf().mark(P3),C3=Zf().mark(_3),k3=Zf().mark(j3),S3=Zf().mark(T3),D3=Zf().mark(R3);function P3(){return Zf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Ff.$6)([(0,Ff.RE)(j3),(0,Ff.Fm)(s.Z.INPUT_CHANGED,_3),(0,Ff.Fm)(kZ,T3),(0,Ff.Fm)(CZ,j3,!1),(0,Ff.Fm)(SZ,R3)]);case 2:case"end":return e.stop()}}),O3)}function _3(e){var t,n,r,o,i;return Zf().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:if(t=e.payload,n=t.input,r=t.prevInput,o=jY(n),!(n.store&&void 0!==r.store||void 0===n.store&&void 0!==r.store)){a.next=5;break}return a.abrupt("return");case 5:return i=SY(n),a.next=8,(0,Ff.$6)(i.map((function(e){return(0,Ff.gz)(e)})));case 8:if(o!==DY){a.next=13;break}return a.next=11,(0,Ff.gz)({type:CZ});case 11:a.next=16;break;case 13:if(o!==PY){a.next=16;break}return a.next=16,(0,Ff.gz)({type:kZ});case 16:case"end":return a.stop()}}),C3)}function j3(){var e=arguments;return Zf().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(!(e.length>0&&void 0!==e[0])||e[0])){t.next=4;break}return t.next=4,(0,Ff.qn)(s.Z.INPUT_INITIALIZED);case 4:return t.next=6,(0,Ff.gz)(vU());case 6:return t.next=8,(0,Ff.qn)(hU);case 8:return t.next=10,(0,Ff.gz)(vF());case 10:return t.next=12,(0,Ff.qn)(VZ);case 12:return t.next=14,(0,Ff.gz)(HZ());case 14:return t.next=16,(0,Ff.qn)(LZ);case 16:return t.next=18,(0,Ff.gz)(PU());case 18:return t.next=20,(0,Ff.qn)($H);case 20:return t.next=22,(0,Ff.gz)(bF());case 22:case"end":return t.stop()}}),k3)}function T3(){return Zf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Ff.gz)(vF());case 2:return e.next=4,(0,Ff.$6)([(0,Ff.qn)(VZ)]);case 4:return e.next=6,(0,Ff.gz)(bF());case 6:case"end":return e.stop()}}),S3)}function R3(e){var t;return Zf().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return t=e.payload.searchFormCollapsed,n.next=3,(0,Ff.gz)(h.Z.fireExternalEvent("onSearchFormCollapsedChange",{collapsed:t}));case 3:case"end":return n.stop()}}),D3)}function I3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function M3(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?I3(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):I3(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var N3=function(e){return"asc"===e?"desc":"asc"},B3=(E3={},L()(E3,GH,jf.Z.singleTransferReducer("entities")),L()(E3,QH,jf.Z.singleTransferReducer("formDefinition")),L()(E3,XH,jf.Z.singleTransferReducer("searchListFormDefinition")),L()(E3,KH,jf.Z.singleTransferReducer("entityModel")),L()(E3,JH,jf.Z.singleTransferReducer("currentPage")),L()(E3,$H,jf.Z.singleTransferReducer("sorting")),L()(E3,dU,(function(e,t){var n=t.payload,r=n.field;if(n.add){var o=e.sorting.filter((function(e){return e.field===r})),i=o.length>0?N3(o[0].order):"asc";return M3(M3({},e),{},{sorting:[].concat(z()(e.sorting.filter((function(e){return e.field!==r}))),[{field:r,order:i}])})}var a=e.sorting,c=a.length>0&&a[0].field===r?N3(a[0].order):"asc";return M3(M3({},e),{},{sorting:[{field:r,order:c}]})})),L()(E3,eU,jf.Z.singleTransferReducer("entityCount")),L()(E3,tU,(function(e,t){var n=t.payload;return M3(M3({},e),{},{entityStore:M3(M3({},e.entityStore),{},L()({},n.page,n.entities))})})),L()(E3,uU,(function(e,t){var n=t.payload,r=n.type,o=n.id,i=n.values;return M3(M3({},e),{},{lazyData:M3(M3({},e.lazyData),{},L()({},r,M3(M3({},e.lazyData[r]),{},L()({},o,M3(M3({},nf()(e,["lazyData",r,o],{})),i)))))})})),L()(E3,nU,(function(e){return M3(M3({},e),{},{entityStore:{}})})),L()(E3,rU,jf.Z.singleTransferReducer("inProgress")),L()(E3,aU,jf.Z.singleTransferReducer("searchFilters")),L()(E3,pU,jf.Z.singleTransferReducer("constriction")),E3),Z3={entityModel:{},entities:[],currentPage:1,sorting:[],formDefinition:null,searchListFormDefinition:null,entityCount:null,entityStore:{},inProgress:!0,searchFilters:[],createPermission:!1,lazyData:{}};const F3=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Z3,t=arguments.length>1?arguments[1]:void 0,n=B3[t.type];return n?n(e,t):e};var L3;function H3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function U3(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?H3(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):H3(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var z3=(L3={},L()(L3,jZ,jf.Z.singleTransferReducer("positions")),L()(L3,RZ,jf.Z.singleTransferReducer("sorting")),L()(L3,IZ,jf.Z.singleTransferReducer("columns")),L()(L3,MZ,(function(e,t){var n=t.payload,r=n.field,o=n.width;return U3(U3({},e),{},{widths:U3(U3({},e.widths),{},L()({},r,o))})})),L()(L3,LZ,jf.Z.singleTransferReducer("preferencesLoaded")),L()(L3,NZ,(function(e){return U3(U3({},e),{},{sorting:[]})})),L()(L3,BZ,(function(e){return U3(U3({},e),{},{positions:{},columns:{}})})),L()(L3,ZZ,(function(e){return U3(U3({},e),{},{positions:{},sorting:[],columns:{}})})),L3),W3={positions:{},sorting:[],columns:{},widths:{},preferencesLoaded:!1};const V3=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:W3,t=arguments.length>1?arguments[1]:void 0,n=z3[t.type];return n?n(e,t):e};function Y3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function q3(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Y3(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Y3(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var G3=function(e){return Object.keys(e).filter((function(e){return e.endsWith(".position")})).reduce((function(t,n){var r=n.match(/.*\.([^.]+)\.position$/);return q3(q3({},t),{},L()({},r[1],Number(e[n])))}),{})},Q3=function(e){return e.filter((function(e){return!e.fixedPosition})).reduce((function(e,t,n){return q3(q3({},e),{},L()({},t.id,n))}),{})},X3=function(e,t,n){return Object.keys(e).sort((function(t,n){return e[t]-e[n]})).filter((function(e){return e!==t})).reduce((function(e,r){return[].concat(z()(e),[r],z()(r===n?[t]:[]))}),[]).reduce((function(e,t,n){return q3(q3({},e),{},L()({},t,n))}),{})},K3=function(e,t){return Object.keys(t).reduce((function(n,r){return q3(q3({},n),{},L()({},"".concat(e,".").concat(r,".position"),t[r].toString()))}),{})},$3=function(e){var t=/^.*\.sorting(Field|Direction)\.?([1-9]*)$/;return Object.entries(e).filter((function(e){var n=T()(e,1)[0];return t.test(n)})).map((function(e){var n=T()(e,2),r=n[0],o=n[1];return[J3(r.match(t)),o]})).reduce((function(e,t){var n=T()(t,2),r=n[0],o=n[1];return e[r.index]=q3(q3({},e[r.index]),{},L()({},r.field,o)),e}),[])},J3=function(e){return{field:e5(e[1]),index:e[2]?parseInt(e[2]):0}},e5=function(e){return"Direction"===e?"order":e.toLowerCase()},t5=function(e,t){var n;return n={},L()(n,"".concat(e,".sortingField"),t.field),L()(n,"".concat(e,".sortingDirection"),t.order),n},n5=function(e,t,n){var r;return r={},L()(r,"".concat(e,".sortingField.").concat(n),t.field),L()(r,"".concat(e,".sortingDirection.").concat(n),t.order),r},r5=function(e){var t=/^[^.]+\.(.+)\.hidden$/;return Object.entries(e).filter((function(e){var n=T()(e,1)[0];return t.test(n)})).reduce((function(e,n){var r=T()(n,2),o=r[0],i=r[1],a=o.match(t)[1];return q3(q3({},e),{},L()({},a,"false"===i))}),{})},o5=function(e,t){return Object.keys(t).reduce((function(n,r){return q3(q3({},n),{},L()({},"".concat(e,".").concat(r,".hidden"),(!t[r]).toString()))}),{})};function i5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function a5(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i5(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i5(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var c5,s5=Zf().mark(b5),u5=Zf().mark(w5),l5=Zf().mark(A5),d5=Zf().mark(x5),f5=Zf().mark(E5),p5=Zf().mark(O5),h5=Zf().mark(C5),m5=Zf().mark(k5),g5=Zf().mark(S5),v5=function(e){return e.input},y5=function(e){return e.preferences};function b5(){return Zf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Ff.$6)([(0,Ff.Fm)(_Z,w5),(0,Ff.Fm)(TZ,A5),(0,Ff.Fm)(dU,x5),(0,Ff.Fm)(NZ,E5),(0,Ff.Fm)(BZ,S5),(0,Ff.Fm)(ZZ,O5),(0,Ff.Fm)(FZ,C5)]);case 2:case"end":return e.stop()}}),s5)}function w5(){var e,t,n;return Zf().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,(0,Ff.Ys)(v5);case 2:return e=r.sent,t="".concat(e.formName,"_").concat(e.scope),r.next=6,(0,Ff.RE)(uh.Z.fetchUserPreferences,"".concat(t,"*"));case 6:return n=r.sent,r.next=9,(0,Ff.gz)(UZ(G3(n)));case 9:return r.next=11,(0,Ff.gz)((o=$3(n),{type:RZ,payload:{sorting:o}}));case 11:return r.next=13,(0,Ff.gz)(zZ(r5(n)));case 13:return r.next=15,(0,Ff.gz)({type:LZ,payload:{preferencesLoaded:!0}});case 15:case"end":return r.stop()}var o}),u5)}function A5(e){var t,n,r,o,i,a,c,s,u,l;return Zf().wrap((function(d){for(;;)switch(d.prev=d.next){case 0:return t=e.payload,n=t.field,r=t.afterFieldPosition,o=t.columns,d.next=4,(0,Ff.Ys)(y5);case 4:if(i=d.sent,a=i.positions,0!==Object.keys(a).length){d.next=10;break}return d.next=9,(0,Ff.RE)(Q3,o);case 9:a=d.sent;case 10:return d.next=12,(0,Ff.RE)(X3,a,n,r);case 12:return c=d.sent,d.next=15,(0,Ff.gz)(UZ(c));case 15:return d.next=17,(0,Ff.Ys)(v5);case 17:return s=d.sent,u="".concat(s.formName,"_").concat(s.scope),d.next=21,(0,Ff.RE)(uh.Z.deleteUserPreferences,"".concat(u,".*.positions"));case 21:return d.next=23,(0,Ff.RE)(K3,u,c);case 23:return l=d.sent,d.next=26,(0,Ff.RE)(uh.Z.savePreferences,l);case 26:case"end":return d.stop()}}),l5)}function x5(){var e,t,n,r,o;return Zf().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,(0,Ff.Ys)(D2);case 2:if(e=i.sent,!((t=e.sorting).length>0)){i.next=14;break}return i.next=7,(0,Ff.Ys)(v5);case 7:return n=i.sent,r="".concat(n.formName,"_").concat(n.scope),i.next=11,(0,Ff.$6)([(0,Ff.RE)(uh.Z.deleteUserPreferences,"".concat(r,".sortingField*")),(0,Ff.RE)(uh.Z.deleteUserPreferences,"".concat(r,".sortingDirection*"))]);case 11:return o=t.slice(1).map((function(e,t){return n5(r,e,t+1)})).reduce((function(e,t){return a5(a5({},e),t)}),t5(r,t[0])),i.next=14,(0,Ff.RE)(uh.Z.savePreferences,o);case 14:case"end":return i.stop()}}),d5)}function E5(){var e;return Zf().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,Ff.Ys)(v5);case 2:return e=t.sent,t.next=5,(0,Ff.$6)([(0,Ff.RE)(uh.Z.deleteUserPreferences,"".concat(e.formName,"_").concat(e.scope,".sortingField*")),(0,Ff.RE)(uh.Z.deleteUserPreferences,"".concat(e.formName,"_").concat(e.scope,".sortingDirection*"))]);case 5:return t.next=7,(0,Ff.RE)(a3);case 7:return t.next=9,(0,Ff.RE)(z2);case 9:case"end":return t.stop()}}),f5)}function O5(){var e;return Zf().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,Ff.Ys)(v5);case 2:return e=t.sent,t.next=5,(0,Ff.RE)(uh.Z.deleteUserPreferences,"".concat(e.formName,"_").concat(e.scope,".*"));case 5:return t.next=7,(0,Ff.RE)(a3);case 7:return t.next=9,(0,Ff.RE)(z2);case 9:case"end":return t.stop()}}),p5)}function C5(){var e,t,n,r,o,i,a,c;return Zf().wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return s.next=2,(0,Ff.Ys)(D2);case 2:return e=s.sent,t=e.formDefinition,s.next=6,(0,Ff.Ys)(y5);case 6:return n=s.sent,r=n.columns,s.next=10,(0,Ff.Ys)(v5);case 10:return o=s.sent,i=o.parent,a=$z(t,i,r),s.next=15,(0,Ff.RE)(yh.CE);case 15:return c=s.sent,s.next=18,(0,Ff.gz)(m.Z.modal("".concat(t.id,"-column-selection"),"client.entity-list.preferences.columns",null,(function(e){var t=e.close;return(0,S.jsx)(v0,{initialColumns:a,onOk:function(e){t(),c.put(e)},dndEnabled:!1})}),!0));case 18:return s.next=20,k5(c,r,t);case 20:case"end":return s.stop()}}),h5)}function k5(e,t,n){var r,o,i;return Zf().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,(0,Ff.qn)(e);case 2:return r=a.sent.reduce((function(e,t){return a5(a5({},e),{},L()({},t.id,!t.hidden))}),{}),o=Object.keys(r).reduce((function(e,n){return a5(a5({},e),r[n]!==t[n]?L()({},n,r[n]):{})}),{}),a.next=6,(0,Ff.gz)(zZ(r));case 6:if(!Object.entries(o).some((function(e){return T()(e,2)[1]}))){a.next=9;break}return a.next=9,(0,Ff.gz)(kU());case 9:return a.next=11,(0,Ff.RE)(o5,n.id,o);case 11:return i=a.sent,a.next=14,(0,Ff.RE)(uh.Z.savePreferences,i);case 14:case"end":return a.stop()}}),m5)}function S5(){var e;return Zf().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,Ff.Ys)(v5);case 2:return e=t.sent,t.next=5,(0,Ff.$6)([(0,Ff.RE)(uh.Z.deleteUserPreferences,"".concat(e.formName,"_").concat(e.scope,".*.position")),(0,Ff.RE)(uh.Z.deleteUserPreferences,"".concat(e.formName,"_").concat(e.scope,".*.hidden"))]);case 5:return t.next=7,(0,Ff.gz)(kU());case 7:case"end":return t.stop()}}),g5)}function D5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function P5(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?D5(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):D5(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var _5=(c5={},L()(c5,VZ,jf.Z.singleTransferReducer("initialized")),L()(c5,KZ,(function(e,t){var n=t.payload,r=n.simpleSearchFields.split(",").filter((function(e){return e})).map((function(e){return e.trim()}));return r.length>0?P5(P5({},e),{},{simpleSearchFields:r}):e})),L()(c5,qZ,jf.Z.singleTransferReducer("formDefinition")),L()(c5,XZ,jf.Z.singleTransferReducer("showExtendedSearchForm")),L()(c5,JZ,jf.Z.singleTransferReducer("valuesInitialized")),L()(c5,eF,jf.Z.singleTransferReducer("formFieldsFlat")),L()(c5,tF,jf.Z.singleTransferReducer("searchFilters")),L()(c5,nF,(function(e,t){var n=t.payload,r=n.searchFilterId,o=n.active,i=n.exclusive;return P5(P5({},e),{},{searchFilters:z()(e.searchFilters.map((function(e){var t=r===e.uniqueId;return P5(P5(P5({},e),t?{active:o}:{}),!t&&i?{active:!o}:{})})))})})),L()(c5,dF,jf.Z.singleTransferReducer("queryViewVisible")),L()(c5,fF,jf.Z.singleTransferReducer("query")),L()(c5,mF,(function(e){return P5(P5({},e),{},{query:""})})),L()(c5,pF,jf.Z.singleTransferReducer("queryError")),c5),j5={initialized:!1,formDefinition:{},showExtendedSearchForm:!1,simpleSearchFields:[],valuesInitialized:!1,searchFilters:null,queryViewVisible:!1,query:"",queryError:{}};const T5=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:j5,t=arguments.length>1?arguments[1]:void 0,n=_5[t.type];return n?n(e,t):e};var R5;function I5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function M5(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?I5(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):I5(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var N5=function(e,t){return e-t},B5=(R5={},L()(R5,iz,jf.Z.toggleReducer("showSelectedRecords")),L()(R5,tz,(function(e,t){var n=t.payload;return M5(M5({},e),{},{selection:wb()(n.selection).sort(N5)})})),L()(R5,nz,(function(e,t){t.payload;return M5(M5({},e),{},{selection:[],showSelectedRecords:!1})})),L()(R5,rz,jf.Z.singleTransferReducer("query")),L()(R5,oz,jf.Z.singleTransferReducer("queryCount")),R5),Z5={showSelectedRecords:!1,selection:[],query:{},queryCount:0};const F5=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Z5,t=arguments.length>1?arguments[1]:void 0,n=B5[t.type];return n?n(e,t):e};var L5=Zf().mark(q5),H5=Zf().mark(G5),U5=Zf().mark(Q5),z5=Zf().mark(X5),W5=Zf().mark(K5),V5=function(e){return e.input},Y5=function(e){return e.selection};function q5(){return Zf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Ff.$6)([(0,Ff.Fm)(iz,K5),(0,Ff.Fm)(ez,G5),(0,Ff.Fm)(nz,X5),(0,Ff.Fm)(my.actions.ACTION_INVOKED,Q5)]);case 2:case"end":return e.stop()}}),L5)}function G5(e){var t,n,r,o,i,a,c;return Zf().wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return t=e.payload,n=t.keys,r=t.isSelected,s.next=3,(0,Ff.Ys)(Y5);case 3:return o=s.sent,i=o.selection,s.next=7,(0,Ff.Ys)(V5);case 7:if(a=s.sent,a.selectionStyle!==Jz.SINGLE){s.next=13;break}s.t0=n,s.next=16;break;case 13:return s.next=15,(0,Ff.RE)(rW,i,n,r);case 15:s.t0=s.sent;case 16:return c=s.t0,s.next=19,(0,Ff.gz)(cz(c));case 19:return s.next=21,(0,Ff.gz)(h.Z.fireExternalEvent("onSelectChange",c));case 21:case"end":return s.stop()}}),H5)}function Q5(e){return Zf().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e.payload.response.clearSelection){t.next=4;break}return t.next=4,(0,Ff.gz)(uz());case 4:case"end":return t.stop()}}),U5)}function X5(){return Zf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Ff.gz)(h.Z.fireExternalEvent("onSelectChange",[]));case 2:case"end":return e.stop()}}),z5)}function K5(){return Zf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Ff.gz)({type:az});case 2:case"end":return e.stop()}}),W5)}const $5={entityList:x3,list:F3,searchForm:T5,form:VB,selection:F5,preferences:V3};var J5,e4=[P3,T2,h1,q5,b5];function t4(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function n4(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?t4(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):t4(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var r4="entity-list",o4=["onRowClick","emitAction","onSelectChange","onStoreCreate","onSearchChange","onSearchFormCollapsedChange"],i4=function(e,t,n,r){var o=J5||(J5=(0,S.jsx)(kY,{})),i=t.store,a=n4(n4({},function(e){return{new:Zf().mark((function t(){return Zf().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,Ff.gz)((n=e.parent&&e.parent.relationName,{type:sU,payload:{relationName:n}}));case 2:case"end":return t.stop()}var n}),t)})),fullscreen:Zf().mark((function e(t,n){return Zf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Ff.gz)(DU(t,n));case 2:case"end":return e.stop()}}),e)})),mark:Zf().mark((function e(t,n){return Zf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Ff.gz)(jU(n));case 2:case"end":return e.stop()}}),e)}))}}(t)),t.customActions||{});return i?i.dispatch(kU()):(i=s.Z.createStore($5,e4,n4(n4({},{limit:10,scope:"list",showLink:!1,sortable:!0,lazyData:{},tql:null,keys:null,searchFilters:null,constriction:null,entityName:"",formName:"",searchFormPosition:"top",parent:null,searchFormCollapsed:!1,scrollBehaviour:"inline"}),t),r4),h.Z.addToStore(i,(function(e){return s.Z.getEvents(o4,e.input)})),d.Z.addToStore(i,(function(e){return e.input.emitAction})),p.Z.addToStore(i,!1),m.Z.addToStore(i,!1),LN(i),my.addToStore(i,(function(e){return{formApp:AZ,listApp:a4,customActions:a,appComponent:e.input.actionAppComponent,navigationStrategy:e.input.navigationStrategy,context:n4({viewName:"list",formName:e.input.formName},e.input.contextParams||{}),customPreparationHandlers:[g3]}})),yN.addToStore(i,(function(e){return{listApp:a4,navigationStrategy:e.input.navigationStrategy}})),i.dispatch(h.Z.fireExternalEvent("onStoreCreate",i))),s.Z.createApp(r4,o,i,{input:t,events:n,actions:SY(t),publicPath:r,textResourceModules:["actiongroup","component","common"]})};s.Z.registerAppInRegistry(r4,i4);var a4=function(e){var t=(0,R.useReducer)((function(e){return e+1}),0),n=T()(t,2),r=n[0],o=n[1],i=s.Z.useApp({initApp:i4,props:e,packageName:e.id,externalEvents:o4}),a=i.component,c=i.setApp,u=H.Z.usePrevious(e);return H.Z.useDidUpdate((function(){(_p()(e,(function(e,t){return!Dp()(e,u[t])})).store&&void 0!==u.store||void 0===e.store&&void 0!==u.store)&&(c(i4(e.id,e,s.Z.getEvents(o4,e))),o())}),[e]),(0,S.jsx)(I().Fragment,{children:a},r)};const c4=a4;function s4(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u4(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s4(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s4(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var l4=function(e){var t=e.color,n=e.label;return(0,S.jsxs)(Zd.ZP.Span,{children:[(0,S.jsx)(B.Z,{icon:t?"square-full":"square","aria-hidden":"true",style:u4({},t?{color:t}:{}),position:zP.Z.position.PREPEND})," ",n]})},d4=function(e){var t=e.updateRequestedCalendars,n=e.locale,r=e.requestedCalendars,o=e.calendarTypes,i=e.emitAction,a=e.initialCalendarType,c=function(e){return function(n){t(e,n)}},s=a?o.findIndex((function(e){return e.name===a})):-1;return(0,S.jsx)(jE.Group,{initialOpenPanelIndex:s,children:o.map((function(e){return(0,S.jsxs)(jE.Wrapper,{children:[(0,S.jsx)(jE.Header,{children:(0,S.jsx)(l4,{color:e.color,label:e.label})}),(0,S.jsx)(jE.Body,{children:(0,S.jsx)(c4,{emitAction:i,locale:n,id:"search-panel-".concat(e.name),entityName:e.targetEntity,formName:e.formBase,limit:15,selectable:!0,selection:r&&r[e.name]||[],onSelectChange:c(e.name),simpleSearchFields:"txtFulltext, searchFilter",disableSelectionController:!0,showActions:!1,scrollBehaviour:"none"})})]},e.name)}))})};const f4=(0,R.memo)(d4);var p4,h4,m4,g4,v4,y4,b4,w4,A4,x4,E4,O4=b.ZP.div.withConfig({displayName:"StyledResourceSchedulerWrapper"})(p4||(p4=Ld()(["\n display: flex;\n height: 100%;\n"]))),C4=b.ZP.div.withConfig({displayName:"StyledSplitPanelWrapperLeft"})(h4||(h4=Ld()(["\n && {\n display: ",";\n background-color: ",";\n height: 100%;\n overflow: auto;\n padding-right: ",";\n padding-left: ",";\n padding-top: ",";\n ","\n }\n"])),(function(e){return e.isCollapsed?"none":"block"}),Jm.Z.color("paper"),x.Z.space(-1),x.Z.space(-1),x.Z.space(-1),of.C),k4=b.ZP.div.withConfig({displayName:"StyledSplitPanelWrapperRight"})(m4||(m4=Ld()(["\n && {\n background-color: ",";\n height: 100%;\n overflow: auto;\n padding-left: ",";\n padding-right: ",";\n ","\n }\n"])),Jm.Z.color("paper"),x.Z.space(-1),x.Z.space(-1),of.C),S4=b.ZP.div.withConfig({displayName:"StyledToggleCollapse"})(g4||(g4=Ld()(["\n display: flex;\n background-color: ",";\n padding: 0 "," "," ",";\n"])),Jm.Z.color("paper"),x.Z.space(-.53),x.Z.space(-.53),x.Z.space(-1.7)),D4=b.ZP.div.withConfig({displayName:"StyledPlaceHolder"})(v4||(v4=Ld()(["\n display: ",";\n ",";\n height: 100%;\n width: 25px;\n background: ",";\n padding-top: ",";\n align-items: flex-start;\n\n &:hover {\n cursor: pointer;\n }\n\n "," {\n padding: 0 0 "," ",";\n }\n"])),(function(e){return e.isCollapsed?"flex":"none"}),(function(e){return!e.isCollapsed&&"flex: 1"}),Jm.Z.color("paper"),x.Z.space(-.53),S4,x.Z.space(-.53),x.Z.space(-1.7)),P4=b.ZP.div.withConfig({displayName:"StyledGutter"})(y4||(y4=Ld()(["\n background-color: ",";\n background-repeat: no-repeat;\n background-position: 50%;\n background-image: url(",");\n height: 100%;\n\n &:hover {\n cursor: col-resize;\n }\n"])),Jm.Z.color("backgroundBody"),"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAeCAYAAADkftS9AAAAIklEQVQoU2M4c+bMfxAGAgYYmwGrIIiDjrELjpo5aiZeMwF+yNnOs5KSvgAAAABJRU5ErkJggg=="),_4=(0,b.ZP)(fV).withConfig({displayName:"StyledSplitPane"})(b4||(b4=Ld()(["\n display: flex;\n flex-direction: row;\n height: 100%;\n width: 100%;\n\n "," {\n display: ",";\n }\n"])),P4,(function(e){return e.isCollapsed?"none":"block"})),j4=(0,b.ZP)(pd.Z).withConfig({displayName:"StyledToggleCollapseButton"})(w4||(w4=Ld()(["\n font-size: ",";\n padding: 0;\n ","\n &:hover,\n &:focus,\n ",":hover & {\n background-color: transparent;\n color: ",";\n }\n"])),x.Z.font(0),(function(e){return!e.isCollapsed&&(0,b.iv)(A4||(A4=Ld()(["\n position: relative;\n left: -4px;\n top: 2px;\n "])))}),D4,Jm.Z.color("secondaryLight"));const T4=function(e){var t=e.initialize,n=e.locale,r=e.calendarTypes,o=e.updateRequestedCalendars,i=e.requestedCalendars,a=e.handleNotifications,c=e.emitAction,s=e.initialCalendarType;(0,R.useEffect)((function(){t()}),[t]);var u=(0,R.useState)(!1),l=T()(u,2),d=l[0],f=l[1],h=(0,R.useState)([20,80]),g=T()(h,2),v=g[0],y=g[1],b=(0,R.useState)([325,650]),w=T()(b,2),A=w[0],x=w[1],E=(0,R.useRef)(null),O=function(){f(!d),d?(y([20,80]),x([325,650])):(y([0,99]),x([0,975])),E.current&&E.current.updateSize()};return(0,S.jsxs)(O4,{children:[(0,S.jsx)(D4,{onClick:O,isCollapsed:d,children:(0,S.jsx)(S4,{isCollapsed:d,children:(0,S.jsx)(j4,{icon:"chevron-right",isCollapsed:d})})}),a&&(E4||(E4=(0,S.jsx)(m.Z.Notifications,{}))),(0,S.jsxs)(_4,{sizes:v,minSize:A,direction:"horizontal",cursor:"col-resize",gutter:function(){var e=document.createElement("div");return N().render(x4||(x4=(0,S.jsx)(P4,{tabIndex:0,children:(0,S.jsx)(B.Z,{icon:"vertical-rule"})})),e),e},isCollapsed:d,children:[(0,S.jsx)(C4,{isCollapsed:d,children:(0,S.jsxs)(p.Z.ErrorBoundary,{children:[(0,S.jsx)(S4,{children:(0,S.jsx)(j4,{icon:"chevron-left",onClick:O})}),(0,S.jsx)(Z.Z,{required:[r],children:(0,S.jsx)(f4,{locale:n,calendarTypes:r,updateRequestedCalendars:o,requestedCalendars:i,emitAction:c,initialCalendarType:s})})]})}),(0,S.jsx)(k4,{children:(0,S.jsx)(p.Z.ErrorBoundary,{children:(0,S.jsx)(kp,{schedulerRef:E})})})]})]})},R4=T4;var I4={initialize:function(){return{type:dp}},updateRequestedCalendars:Ap,setDateRange:Ep,removeRequestedCalendar:Op,emitAction:function(e){return d.Z.dispatchEmittedAction(e)}};const M4=(0,_.connect)((function(e){var t;return{initialCalendarType:null===(t=e.input.actionProperties)||void 0===t?void 0:t.calendarType,calendars:e.resourceScheduler.calendars,calendarTypes:e.resourceScheduler.calendarTypes,requestedCalendars:e.resourceScheduler.requestedCalendars,handleNotifications:e.resourceScheduler.handleNotifications,locale:e.intl.locale}}),I4)((0,P.ZP)(R4));var N4,B4=function(e,t){var n,r,o,i=[];null!==(n=e.actionProperties)&&void 0!==n&&n.calendarType&&((null===(r=e.selection)||void 0===r?void 0:r.type)===g.Z.selectionTypes.ID?i.push(Ap(e.actionProperties.calendarType,e.selection.ids)):(null===(o=e.selection)||void 0===o?void 0:o.type)===g.Z.selectionTypes.QUERY&&i.push(function(e,t){return{type:pp,payload:{calendarType:e,selection:t}}}(e.actionProperties.calendarType,e.selection)));return i.push(function(e){return{type:wp,payload:{handleNotifications:e}}}(t)),i};function Z4(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function F4(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Z4(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Z4(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var L4=(N4={},L()(N4,lp,jf.Z.singleTransferReducer("calendarTypes")),L()(N4,hp,jf.Z.singleTransferReducer("calendars")),L()(N4,mp,jf.Z.singleTransferReducer("dateRange")),L()(N4,wp,jf.Z.singleTransferReducer("handleNotifications")),L()(N4,fp,(function(e,t){var n=t.payload,r=n.ids,o=n.calendarType;return F4(F4({},e),{},{requestedCalendars:F4(F4({},Rv()(e.requestedCalendars,[o])),r.length>0?L()({},o,r):{})})})),L()(N4,gp,(function(e,t){var n=t.payload,r=n.id,o=n.entityModel,i=(e.calendarTypes||[]).filter((function(e){return e.targetEntity===o})).map((function(e){return e.name}));return F4(F4({},e),{},{requestedCalendars:F4({},Object.keys(e.requestedCalendars).reduce((function(t,n){var o=e.requestedCalendars[n].filter((function(e){return!i.includes(n)||e!==r}));return F4(F4({},t),o.length>0&&L()({},n,o))}),{}))})})),L()(N4,vp,(function(e){return F4(F4({},e),{},{requestedCalendars:{},calendars:[]})})),N4),H4={handleNotifications:!1,calendarTypes:null,requestedCalendars:{},calendars:[],dateRange:{}};const U4=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:H4,t=arguments.length>1?arguments[1]:void 0,n=L4[t.type];return n?n(e,t):e};var z4=function(e){return Om()(e,(function(e,t,n){return[].concat(z()(e),[{calendarTypeId:n,keys:t}])}),[])},W4=Zf().mark(K4),V4=Zf().mark($4),Y4=Zf().mark(J4),q4=Zf().mark(e6),G4=Zf().mark(t6),Q4=Zf().mark(n6),X4=function(e){return e.resourceScheduler};function K4(){return Zf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Ff.$6)([(0,Ff.Fm)(dp,$4),(0,Ff.Fm)(fp,e6),(0,Ff.Fm)(pp,t6),(0,Ff.Fm)(mp,e6),(0,Ff.Fm)(gp,e6),(0,Ff.Fm)(yp,n6),(0,Ff.Fm)(bp,e6)]);case 2:case"end":return e.stop()}}),W4)}function $4(){return Zf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Ff.RE)(J4);case 2:case"end":return e.stop()}}),V4)}function J4(){var e;return Zf().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,Ff.RE)(uh.Z.requestSaga,"calendar/types");case 2:return e=t.sent,t.next=5,(0,Ff.gz)((n=e.body.data||[],{type:lp,payload:{calendarTypes:n}}));case 5:case"end":return t.stop()}var n}),Y4)}function e6(){var e,t,n,r,o;return Zf().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,(0,Ff.Ys)(X4);case 2:if(e=i.sent,t=e.requestedCalendars,n=e.dateRange,!(Object.keys(t).length>0&&n.startDate&&n.endDate)){i.next=16;break}return i.next=8,(0,Ff.RE)(z4,t);case 8:return r=i.sent,i.next=11,(0,Ff.RE)(uh.Z.requestSaga,"calendar/events",{method:"POST",body:{calendars:r,start:n.startDate.getTime(),end:n.endDate.getTime()}});case 11:return o=i.sent,i.next=14,(0,Ff.gz)(xp(o.body.data));case 14:i.next=18;break;case 16:return i.next=18,(0,Ff.gz)(xp([]));case 18:case"end":return i.stop()}}),q4)}function t6(e){var t,n,r,o,i;return Zf().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return t=e.payload,n=t.selection,r=t.calendarType,a.next=3,(0,Ff.RE)(g.Z.getEntities,n,uh.Z.fetchEntities);case 3:return o=a.sent,i=o.keys,a.next=7,(0,Ff.gz)(Ap(r,i));case 7:case"end":return a.stop()}}),G4)}function n6(e){var t;return Zf().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return t=e.payload,n.next=3,(0,Ff.gz)(h.Z.fireExternalEvent("onEventClick",t));case 3:case"end":return n.stop()}}),Q4)}const r6={resourceScheduler:U4};var o6,i6,a6=[K4],c6="resource-scheduler",s6=["onEventClick"],u6=function(e,t,n,r){var o=(0,S.jsxs)(S.Fragment,{children:[o6||(o6=(0,S.jsx)(D,{})),i6||(i6=(0,S.jsx)(M4,{}))]}),i=s.Z.createStore(r6,a6,t,c6);h.Z.addToStore(i,(function(e){return s.Z.getEvents(s6,e.input)})),d.Z.addToStore(i,(function(e){return e.input.emitAction}));var a=!n.emitAction;return m.Z.addToStore(i,a),p.Z.addToStore(i,a,["console","remote","notification"]),f.Z.addToStore(i),s.Z.createApp(c6,o,i,{input:t,events:n,actions:B4(t,a),publicPath:r,textResourceModules:["component","common",c6,"entity-list","scheduler"]})},l6=function(e){return s.Z.useApp({initApp:u6,props:e,packageName:e.id,externalEvents:s6}).component};l6.propTypes={id:l().string,locale:l().string,onEventClick:l().func,selection:g.Z.propType,actionProperties:l().shape({calendarType:l().string})};var d6=s.Z.createBundleableApp(c6,u6,l6);s.Z.registerAppInRegistry(d6.name,d6.init)})(),c})()));