"use strict";(self.webpackChunkCustomerApp=self.webpackChunkCustomerApp||[]).push([[7097],{87097:(e,n,t)=>{t.r(n),t.d(n,{default:()=>he});var o=t(57078),r=t(89172),u=t(32330),l=t(16528),s=t(13145),a=()=>{};var i=function(){var e=!1;if(s.Z)try{var n={};Object.defineProperty(n,"passive",{get:()=>(e=!0,!1)}),window.addEventListener("test",null,n),window.removeEventListener("test",null,n)}catch(e){}return e}();function c(){return this.cancelBubble}function d(){return this.defaultPrevented}function v(e,n){var t=function(e){return null!=e&&(i?e:Boolean(e.capture))}(n);return function(n,o){if(null==n||"function"!=typeof n.addEventListener)throw new Error("createEventHandle: called on an invalid target.");var r=n;if(null!=o){var u=e=>{return o(((n=e).nativeEvent=n,n.persist=a,n.isDefaultPrevented=d,n.isPropagationStopped=c,n));var n};return r.addEventListener(e,u,t),function(){null!=r&&r.removeEventListener(e,u,t)}}return a}}var f,p,y="keyboard",m="keyboard",h=!1,P=new Set,b="keyboard",w="mouse",E="touch",g="contextmenu",C="mousedown",k="mousemove",H="mouseup",L="pointerdown",O="pointermove",M="scroll",Z="selectionchange",S="touchcancel",x="touchmove",K="touchstart",D={passive:!0},I={capture:!0,passive:!0},T=v("blur",D),B=v("focus",D),_=v("visibilitychange",I),A=v("keydown",I),F=v(L,I),R=v(O,I),j=v(g,I),N=v(C,I),U=v(k,I),X=v(H,I),Y=v(M,I),q=v(Z,I),z=v(S,I),G=v(x,I),J=v(K,I);function Q(){null==f&&null==p||(null!=f&&(m=f,f=null),null!=p&&(y=p,p=null),W())}function V(e){var n=e.type;if("undefined"!=typeof window&&null!=window.PointerEvent){if(n===L)return void(y!==e.pointerType&&(m=e.pointerType,y=e.pointerType,W()));if(n===O)return void(m!==e.pointerType&&(m=e.pointerType,W()))}else{if(h||(n===C&&y!==w&&(m=w,y=w,W()),n===k&&m!==w&&(m=w,W())),n===K)return h=!0,e.touches&&e.touches.length>1&&(h=!1),void(y!==E&&(m=E,y=E,W()));n!==g&&n!==H&&n!==Z&&n!==M&&n!==S&&n!==x||(h=!1)}}function W(){var e={activeModality:y,modality:m};P.forEach((n=>{n(e)}))}s.Z&&(T(window,(function(){f=m,p=y,y=b,m=b,W(),h=!1})),B(window,(function(){Q()})),A(document,(function(e){e.metaKey||e.altKey||e.ctrlKey||m!==b&&(m=b,y=b,W())})),F(document,V),R(document,V),_(document,(function(){"hidden"!==document.visibilityState&&Q()})),j(document,V),N(document,V),U(document,V),X(document,V),z(document,V),G(document,V),J(document,V),q(document,V),Y(document,V));var $=t(39863),ee=t(57771);function ne(e,n){var t=(0,ee.Z)((()=>new Map)),o=(0,ee.Z)((()=>{var o=v(e,n);return(e,n)=>{var r=t.get(e);null!=r&&r(),null==n&&t.delete(e);var u=o(e,n);return t.set(e,u),u}}));return(0,$.Z)((()=>()=>{t.forEach((e=>{e()})),t.clear()}),[t]),o}var te={},oe={passive:!0},re="react-gui:hover:lock",ue="react-gui:hover:unlock",le=()=>!("undefined"==typeof window||null==window.PointerEvent);function se(e,n,t){var o=document.createEvent("CustomEvent"),r=t||te,u=r.bubbles,l=void 0===u||u,s=r.cancelable,a=void 0===s||s,i=r.detail;o.initCustomEvent(n,l,a,i),e.dispatchEvent(o)}function ae(e){var n=e.pointerType;return null!=n?n:m}var ie=t(36560),ce=t(73457),de=t(67177),ve=["children","delayLongPress","delayPressIn","delayPressOut","disabled","focusable","onBlur","onContextMenu","onFocus","onHoverIn","onHoverOut","onKeyDown","onLongPress","onPress","onPressMove","onPressIn","onPressOut","style","testOnly_hovered","testOnly_pressed"];function fe(e,n){var t=e.children,s=e.delayLongPress,a=e.delayPressIn,i=e.delayPressOut,c=e.disabled,d=e.focusable,v=e.onBlur,f=e.onContextMenu,p=e.onFocus,y=e.onHoverIn,m=e.onHoverOut,h=e.onKeyDown,P=e.onLongPress,b=e.onPress,w=e.onPressMove,E=e.onPressIn,g=e.onPressOut,C=e.style,k=e.testOnly_hovered,H=e.testOnly_pressed,L=(0,r.Z)(e,ve),O=pe(!0===k),M=O[0],Z=O[1],S=pe(!1),x=S[0],K=S[1],D=pe(!0===H),I=D[0],T=D[1],B=(0,u.useRef)(null),_=(0,l.Z)(n,B),A=(0,u.useMemo)((()=>({delayLongPress:s,delayPressStart:a,delayPressEnd:i,disabled:c,onLongPress:P,onPress:b,onPressChange:T,onPressStart:E,onPressMove:w,onPressEnd:g})),[s,a,i,c,P,b,E,w,g,T]),F=(0,ie.Z)(B,A),R=F.onContextMenu,j=F.onKeyDown;!function(e,n){var t=n.contain,o=n.disabled,r=n.onHoverStart,u=n.onHoverChange,l=n.onHoverUpdate,s=n.onHoverEnd,a=le(),i=ne(a?"pointermove":"mousemove",oe),c=ne(a?"pointerenter":"mouseenter",oe),d=ne(a?"pointerleave":"mouseleave",oe),v=ne(re,oe),f=ne(ue,oe);(0,$.Z)((()=>{var n=e.current;if(null!==n){var a=function(e){null!=s&&s(e),null!=u&&u(!1),i(n,null),d(n,null)},p=function(n){var o=e.current;null!=o&&"touch"!==ae(n)&&(t&&se(o,ue),a(n))},y=function(e){"touch"!==ae(e)&&null!=l&&(null==e.x&&(e.x=e.clientX),null==e.y&&(e.y=e.clientY),l(e))},m=function(e){null!=r&&r(e),null!=u&&u(!0),null!=l&&i(n,o?null:y),d(n,o?null:p)};c(n,o?null:function(n){var r=e.current;null!=r&&"touch"!==ae(n)&&(t&&se(r,re),m(n),v(r,o?null:function(e){e.target!==r&&a(n)}),f(r,o?null:function(e){e.target!==r&&m(n)}))})}}),[c,i,d,v,f,t,o,r,u,l,s,e])}(B,{contain:!0,disabled:c,onHoverChange:Z,onHoverStart:y,onHoverEnd:m});var N={hovered:M,focused:x,pressed:I},U=u.useCallback((e=>{e.nativeEvent.target===B.current&&(K(!1),null!=v&&v(e))}),[B,K,v]),X=u.useCallback((e=>{e.nativeEvent.target===B.current&&(K(!0),null!=p&&p(e))}),[B,K,p]),Y=u.useCallback((e=>{null!=R&&R(e),null!=f&&f(e)}),[f,R]),q=u.useCallback((e=>{null!=j&&j(e),null!=h&&h(e)}),[h,j]);return u.createElement(de.default,(0,o.Z)({},L,F,{accessibilityDisabled:c,focusable:!c&&!1!==d,onBlur:U,onContextMenu:Y,onFocus:X,onKeyDown:q,pointerEvents:c?"none":L.pointerEvents,ref:_,style:[!c&&ye.root,"function"==typeof C?C(N):C]}),"function"==typeof t?t(N):t)}function pe(e){var n=(0,u.useState)(!1);return[n[0]||e,n[1]]}var ye=ce.default.create({root:{cursor:"pointer",touchAction:"manipulation"}}),me=(0,u.memo)((0,u.forwardRef)(fe));me.displayName="Pressable";const he=me}}]);