@airporting/integrations-app 0.4.0 → 0.4.2

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.
Files changed (73) hide show
  1. package/dist/mf/124.js +1 -0
  2. package/dist/mf/{193.js → 134.js} +6042 -5952
  3. package/dist/mf/{193.js.LICENSE.txt → 134.js.LICENSE.txt} +1 -1
  4. package/dist/mf/{110.js → 170.js} +2 -2
  5. package/dist/mf/{182.js → 18.js} +3 -3
  6. package/dist/mf/{378.js → 235.js} +3 -3
  7. package/dist/mf/285.js +1 -0
  8. package/dist/mf/{436.js → 330.js} +3 -3
  9. package/dist/mf/37.js +10 -0
  10. package/dist/mf/447.js +1 -0
  11. package/dist/mf/{588.js → 473.js} +3 -3
  12. package/dist/mf/475.js +1 -0
  13. package/dist/mf/476.js +1 -0
  14. package/dist/mf/{80.js → 49.js} +1 -1
  15. package/dist/mf/{14.js → 616.js} +3 -3
  16. package/dist/mf/625.js +1 -0
  17. package/dist/mf/{622.js → 637.js} +3 -3
  18. package/dist/mf/{548.js → 666.js} +3 -3
  19. package/dist/mf/70.css +9567 -0
  20. package/dist/mf/70.js +26 -0
  21. package/dist/mf/702.js +1 -0
  22. package/dist/mf/711.js +10 -0
  23. package/dist/mf/741.js +1 -0
  24. package/dist/mf/755.js +14 -0
  25. package/dist/mf/756.js +18 -0
  26. package/dist/mf/854.js +10 -0
  27. package/dist/mf/{906.js → 857.js} +1 -1
  28. package/dist/mf/949.js +10 -0
  29. package/dist/mf/978.js +33 -0
  30. package/dist/mf/@mf-types/compiled-types/hooks/useAppConfig.d.ts +0 -1
  31. package/dist/mf/@mf-types/compiled-types/hooks/useAppConfigConnectorSingle.d.ts +10 -0
  32. package/dist/mf/@mf-types/connectors.d.ts +2 -0
  33. package/dist/mf/@mf-types/single-connector.d.ts +2 -0
  34. package/dist/mf/@mf-types.d.ts +3 -0
  35. package/dist/mf/@mf-types.zip +0 -0
  36. package/dist/mf/__federation_expose_connectors.js +2 -2
  37. package/dist/mf/__federation_expose_single_connector.js +2 -2
  38. package/dist/mf/index.css +0 -9566
  39. package/dist/mf/index.js +6 -30
  40. package/dist/mf/integrations_app.js +6 -5
  41. package/dist/mf/mf-manifest.json +48 -48
  42. package/dist/mf/mf-stats.json +55 -51
  43. package/package.json +44 -45
  44. package/dist/mf/119.js +0 -1
  45. package/dist/mf/153.js +0 -10
  46. package/dist/mf/186.js +0 -1
  47. package/dist/mf/214.js +0 -18
  48. package/dist/mf/260.js +0 -1
  49. package/dist/mf/364.js +0 -14
  50. package/dist/mf/380.js +0 -1
  51. package/dist/mf/541.js +0 -1
  52. package/dist/mf/659.js +0 -1
  53. package/dist/mf/724.js +0 -1
  54. package/dist/mf/732.js +0 -10
  55. package/dist/mf/772.js +0 -10
  56. package/dist/mf/832.js +0 -10
  57. package/dist/mf/880.js +0 -1
  58. package/dist/mf/955.js +0 -33
  59. /package/dist/mf/{110.js.LICENSE.txt → 170.js.LICENSE.txt} +0 -0
  60. /package/dist/mf/{182.js.LICENSE.txt → 18.js.LICENSE.txt} +0 -0
  61. /package/dist/mf/{14.js.LICENSE.txt → 235.js.LICENSE.txt} +0 -0
  62. /package/dist/mf/{378.js.LICENSE.txt → 330.js.LICENSE.txt} +0 -0
  63. /package/dist/mf/{153.js.LICENSE.txt → 37.js.LICENSE.txt} +0 -0
  64. /package/dist/mf/{436.js.LICENSE.txt → 473.js.LICENSE.txt} +0 -0
  65. /package/dist/mf/{548.js.LICENSE.txt → 616.js.LICENSE.txt} +0 -0
  66. /package/dist/mf/{622.js.LICENSE.txt → 637.js.LICENSE.txt} +0 -0
  67. /package/dist/mf/{588.js.LICENSE.txt → 666.js.LICENSE.txt} +0 -0
  68. /package/dist/mf/{index.js.LICENSE.txt → 70.js.LICENSE.txt} +0 -0
  69. /package/dist/mf/{732.js.LICENSE.txt → 711.js.LICENSE.txt} +0 -0
  70. /package/dist/mf/{214.js.LICENSE.txt → 756.js.LICENSE.txt} +0 -0
  71. /package/dist/mf/{772.js.LICENSE.txt → 854.js.LICENSE.txt} +0 -0
  72. /package/dist/mf/{832.js.LICENSE.txt → 949.js.LICENSE.txt} +0 -0
  73. /package/dist/mf/{955.js.LICENSE.txt → 978.js.LICENSE.txt} +0 -0
package/dist/mf/625.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";(globalThis["chunk_integrations_app"]=globalThis["chunk_integrations_app"]||[]).push([["625"],{7216:function(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__){__webpack_require__.r(__webpack_exports__);__webpack_require__.d(__webpack_exports__,{useOrientation:()=>useOrientation,clamp:()=>clamp,useDebouncedValue:()=>useDebouncedValue,useMutationObserver:()=>useMutationObserver,useResizeObserver:()=>useResizeObserver,useSet:()=>useSet,randomId:()=>randomId,useShallowEffect:()=>useShallowEffect,useThrottledState:()=>useThrottledState,mergeRefs:()=>mergeRefs,usePrevious:()=>usePrevious,useLongPress:()=>useLongPress,useReducedMotion:()=>useReducedMotion,useSetState:()=>useSetState,readLocalStorageValue:()=>readLocalStorageValue,useCounter:()=>useCounter,useValidatedState:()=>useValidatedState,useDebouncedState:()=>useDebouncedState,useMove:()=>useMove,useFileDialog:()=>useFileDialog,useClipboard:()=>useClipboard,useIsomorphicEffect:()=>useIsomorphicEffect,useLogger:()=>useLogger,useIdle:()=>useIdle,useElementSize:()=>useElementSize,useClickOutside:()=>useClickOutside,shallowEqual:()=>shallowEqual,useNetwork:()=>useNetwork,useEyeDropper:()=>useEyeDropper,useId:()=>useId,range:()=>range,useMediaQuery:()=>useMediaQuery,useRadialMove:()=>useRadialMove,useHotkeys:()=>useHotkeys,useSelection:()=>useSelection,useWindowEvent:()=>useWindowEvent,useInterval:()=>useInterval,useHeadroom:()=>useHeadroom,useSessionStorage:()=>useSessionStorage,useDebouncedCallback:()=>useDebouncedCallback,useDocumentTitle:()=>useDocumentTitle,useFocusTrap:()=>useFocusTrap,useHash:()=>useHash,upperFirst:()=>upperFirst,useThrottledValue:()=>useThrottledValue,useOs:()=>useOs,normalizeRadialValue:()=>normalizeRadialValue,useDocumentVisibility:()=>useDocumentVisibility,useHover:()=>useHover,useMap:()=>useMap,useScrollIntoView:()=>useScrollIntoView,useFocusReturn:()=>useFocusReturn,usePageLeave:()=>usePageLeave,useMergedRef:()=>useMergedRef,useDidUpdate:()=>useDidUpdate,useInViewport:()=>useInViewport,useIsFirstRender:()=>useIsFirstRender,usePagination:()=>usePagination,useMouse:()=>useMouse,useFavicon:()=>useFavicon,useQueue:()=>useQueue,useTimeout:()=>useTimeout,useToggle:()=>useToggle,useColorScheme:()=>useColorScheme,useEventListener:()=>useEventListener,useFullscreen:()=>useFullscreen,useIntersection:()=>useIntersection,useLocalStorage:()=>useLocalStorage,useFocusWithin:()=>useFocusWithin,useMounted:()=>useMounted,assignRef:()=>assignRef,useThrottledCallback:()=>useThrottledCallback,useStateHistory:()=>useStateHistory,useViewportSize:()=>useViewportSize,getHotkeyHandler:()=>getHotkeyHandler,useCallbackRef:()=>useCallbackRef,useTextSelection:()=>useTextSelection,useWindowScroll:()=>useWindowScroll,useDisclosure:()=>useDisclosure,readSessionStorageValue:()=>readSessionStorageValue,clampUseMovePosition:()=>clampUseMovePosition,useInputState:()=>useInputState,useForceUpdate:()=>useForceUpdate,useFetch:()=>useFetch,useListState:()=>useListState,lowerFirst:()=>lowerFirst,useScrollSpy:()=>useScrollSpy,useUncontrolled:()=>useUncontrolled});"use client";function clamp(value,min,max){if(void 0===min&&void 0===max)return value;if(void 0!==min&&void 0===max)return Math.max(value,min);if(void 0===min&&void 0!==max)return Math.min(value,max);return Math.min(Math.max(value,min),max)}"use client";function lowerFirst(value){return"string"!=typeof value?"":value.charAt(0).toLowerCase()+value.slice(1)}"use client";function randomId(prefix="mantine-"){return`${prefix}${Math.random().toString(36).slice(2,11)}`}"use client";function range(start,end){const length=Math.abs(end-start)+1;const reversed=start>end;if(!reversed)return Array.from({length},(_,index)=>index+start);return Array.from({length},(_,index)=>start-index)}"use client";function shallowEqual(a,b){if(a===b)return true;if(Number.isNaN(a)&&Number.isNaN(b))return true;if(!(a instanceof Object)||!(b instanceof Object))return false;const keys=Object.keys(a);const{length}=keys;if(length!==Object.keys(b).length)return false;for(let i=0;i<length;i+=1){const key=keys[i];if(!(key in b))return false;if(a[key]!==b[key]&&!(Number.isNaN(a[key])&&Number.isNaN(b[key])))return false}return true}"use client";function upperFirst(value){return"string"!=typeof value?"":value.charAt(0).toUpperCase()+value.slice(1)}var index_js_=__webpack_require__(3620);"use client";function useCallbackRef(callback){const callbackRef=(0,index_js_.useRef)(callback);(0,index_js_.useEffect)(()=>{callbackRef.current=callback});return(0,index_js_.useMemo)(()=>(...args)=>callbackRef.current?.(...args),[])}"use client";function useDebouncedCallback(callback,options){const{delay,flushOnUnmount,leading}="number"==typeof options?{delay:options,flushOnUnmount:false,leading:false}:options;const handleCallback=useCallbackRef(callback);const debounceTimerRef=(0,index_js_.useRef)(0);const lastCallback=(0,index_js_.useMemo)(()=>{const currentCallback=Object.assign((...args)=>{window.clearTimeout(debounceTimerRef.current);const isFirstCall=currentCallback._isFirstCall;currentCallback._isFirstCall=false;function clearTimeoutAndLeadingRef(){window.clearTimeout(debounceTimerRef.current);debounceTimerRef.current=0;currentCallback._isFirstCall=true}if(leading&&isFirstCall){handleCallback(...args);const resetLeadingState=()=>{clearTimeoutAndLeadingRef()};const flush2=()=>{if(0!==debounceTimerRef.current){clearTimeoutAndLeadingRef();handleCallback(...args)}};const cancel2=()=>{clearTimeoutAndLeadingRef()};currentCallback.flush=flush2;currentCallback.cancel=cancel2;debounceTimerRef.current=window.setTimeout(resetLeadingState,delay);return}if(leading&&!isFirstCall){const flush2=()=>{if(0!==debounceTimerRef.current){clearTimeoutAndLeadingRef();handleCallback(...args)}};const cancel2=()=>{clearTimeoutAndLeadingRef()};currentCallback.flush=flush2;currentCallback.cancel=cancel2;const resetLeadingState=()=>{clearTimeoutAndLeadingRef()};debounceTimerRef.current=window.setTimeout(resetLeadingState,delay);return}const flush=()=>{if(0!==debounceTimerRef.current){clearTimeoutAndLeadingRef();handleCallback(...args)}};const cancel=()=>{clearTimeoutAndLeadingRef()};currentCallback.flush=flush;currentCallback.cancel=cancel;debounceTimerRef.current=window.setTimeout(flush,delay)},{flush:()=>{},cancel:()=>{},_isFirstCall:true});return currentCallback},[handleCallback,delay,leading]);(0,index_js_.useEffect)(()=>()=>{if(flushOnUnmount)lastCallback.flush();else lastCallback.cancel()},[lastCallback,flushOnUnmount]);return lastCallback}"use client";const DEFAULT_EVENTS=["mousedown","touchstart"];function useClickOutside(callback,events,nodes){const ref=(0,index_js_.useRef)(null);const eventsList=events||DEFAULT_EVENTS;(0,index_js_.useEffect)(()=>{const listener=event=>{const{target}=event??{};if(Array.isArray(nodes)){const shouldIgnore=!document.body.contains(target)&&target?.tagName!=="HTML";const shouldTrigger=nodes.every(node=>!!node&&!event.composedPath().includes(node));shouldTrigger&&!shouldIgnore&&callback(event)}else if(ref.current&&!ref.current.contains(target))callback(event)};eventsList.forEach(fn=>document.addEventListener(fn,listener));return()=>{eventsList.forEach(fn=>document.removeEventListener(fn,listener))}},[ref,callback,nodes]);return ref}"use client";function useClipboard(options={timeout:2e3}){const[error,setError]=(0,index_js_.useState)(null);const[copied,setCopied]=(0,index_js_.useState)(false);const[copyTimeout,setCopyTimeout]=(0,index_js_.useState)(null);const handleCopyResult=value=>{window.clearTimeout(copyTimeout);setCopyTimeout(window.setTimeout(()=>setCopied(false),options.timeout));setCopied(value)};const copy=value=>{if("clipboard"in navigator)navigator.clipboard.writeText(value).then(()=>handleCopyResult(true)).catch(err=>setError(err));else setError(new Error("useClipboard: navigator.clipboard is not supported"))};const reset=()=>{setCopied(false);setError(null);window.clearTimeout(copyTimeout)};return{copy,reset,error,copied}}"use client";function attachMediaListener(query,callback){try{query.addEventListener("change",callback);return()=>query.removeEventListener("change",callback)}catch(e){query.addListener(callback);return()=>query.removeListener(callback)}}function getInitialValue(query,initialValue){if("undefined"!=typeof window&&"matchMedia"in window)return window.matchMedia(query).matches;return false}function useMediaQuery(query,initialValue,{getInitialValueInEffect}={getInitialValueInEffect:true}){const[matches,setMatches]=(0,index_js_.useState)(getInitialValueInEffect?initialValue:getInitialValue(query));(0,index_js_.useEffect)(()=>{try{const mediaQuery=window.matchMedia(query);setMatches(mediaQuery.matches);return attachMediaListener(mediaQuery,event=>setMatches(event.matches))}catch(e){return}},[query]);return matches||false}"use client";function useColorScheme(initialValue,options){return useMediaQuery("(prefers-color-scheme: dark)","dark"===initialValue,options)?"dark":"light"}"use client";const DEFAULT_OPTIONS={min:-1/0,max:1/0};function useCounter(initialValue=0,options){const{min,max}={...DEFAULT_OPTIONS,...options};const[count,setCount]=(0,index_js_.useState)(clamp(initialValue,min,max));const increment=(0,index_js_.useCallback)(()=>setCount(current=>clamp(current+1,min,max)),[min,max]);const decrement=(0,index_js_.useCallback)(()=>setCount(current=>clamp(current-1,min,max)),[min,max]);const set=(0,index_js_.useCallback)(value=>setCount(clamp(value,min,max)),[min,max]);const reset=(0,index_js_.useCallback)(()=>setCount(clamp(initialValue,min,max)),[initialValue,min,max]);return[count,{increment,decrement,set,reset}]}"use client";function useDebouncedState(defaultValue,wait,options={leading:false}){const[value,setValue]=(0,index_js_.useState)(defaultValue);const timeoutRef=(0,index_js_.useRef)(null);const leadingRef=(0,index_js_.useRef)(true);const clearTimeout1=()=>window.clearTimeout(timeoutRef.current);(0,index_js_.useEffect)(()=>clearTimeout1,[]);const debouncedSetValue=(0,index_js_.useCallback)(newValue=>{clearTimeout1();if(leadingRef.current&&options.leading)setValue(newValue);else timeoutRef.current=window.setTimeout(()=>{leadingRef.current=true;setValue(newValue)},wait);leadingRef.current=false},[options.leading]);return[value,debouncedSetValue]}"use client";function useDebouncedValue(value,wait,options={leading:false}){const[_value,setValue]=(0,index_js_.useState)(value);const mountedRef=(0,index_js_.useRef)(false);const timeoutRef=(0,index_js_.useRef)(null);const cooldownRef=(0,index_js_.useRef)(false);const cancel=(0,index_js_.useCallback)(()=>window.clearTimeout(timeoutRef.current),[]);(0,index_js_.useEffect)(()=>{if(mountedRef.current)if(!cooldownRef.current&&options.leading){cooldownRef.current=true;setValue(value)}else{cancel();timeoutRef.current=window.setTimeout(()=>{cooldownRef.current=false;setValue(value)},wait)}},[value,options.leading,wait]);(0,index_js_.useEffect)(()=>{mountedRef.current=true;return cancel},[]);return[_value,cancel]}"use client";const useIsomorphicEffect="undefined"!=typeof document?index_js_.useLayoutEffect:index_js_.useEffect;"use client";function useDocumentTitle(title){useIsomorphicEffect(()=>{if("string"==typeof title&&title.trim().length>0)document.title=title.trim()},[title])}"use client";function useDocumentVisibility(){const[documentVisibility,setDocumentVisibility]=(0,index_js_.useState)("visible");(0,index_js_.useEffect)(()=>{setDocumentVisibility(document.visibilityState);const listener=()=>setDocumentVisibility(document.visibilityState);document.addEventListener("visibilitychange",listener);return()=>document.removeEventListener("visibilitychange",listener)},[]);return documentVisibility}"use client";function useDidUpdate(fn,dependencies){const mounted=(0,index_js_.useRef)(false);(0,index_js_.useEffect)(()=>()=>{mounted.current=false},[]);(0,index_js_.useEffect)(()=>{if(mounted.current)return fn();mounted.current=true},dependencies)}"use client";function useFocusReturn({opened,shouldReturnFocus=true}){const lastActiveElement=(0,index_js_.useRef)(null);const returnFocus=()=>{if(lastActiveElement.current&&"focus"in lastActiveElement.current&&"function"==typeof lastActiveElement.current.focus)lastActiveElement.current?.focus({preventScroll:true})};useDidUpdate(()=>{let timeout=-1;const clearFocusTimeout=event=>{if("Tab"===event.key)window.clearTimeout(timeout)};document.addEventListener("keydown",clearFocusTimeout);if(opened)lastActiveElement.current=document.activeElement;else if(shouldReturnFocus)timeout=window.setTimeout(returnFocus,10);return()=>{window.clearTimeout(timeout);document.removeEventListener("keydown",clearFocusTimeout)}},[opened,shouldReturnFocus]);return returnFocus}"use client";const TABBABLE_NODES=/input|select|textarea|button|object/;const FOCUS_SELECTOR="a, input, select, textarea, button, object, [tabindex]";function tabbable_hidden(element){return"none"===element.style.display}function visible(element){const isHidden=element.getAttribute("aria-hidden")||element.getAttribute("hidden")||"hidden"===element.getAttribute("type");if(isHidden)return false;let parentElement=element;while(parentElement){if(parentElement===document.body||11===parentElement.nodeType)break;if(tabbable_hidden(parentElement))return false;parentElement=parentElement.parentNode}return true}function getElementTabIndex(element){let tabIndex=element.getAttribute("tabindex");if(null===tabIndex)tabIndex=void 0;return parseInt(tabIndex,10)}function focusable(element){const nodeName=element.nodeName.toLowerCase();const isTabIndexNotNaN=!Number.isNaN(getElementTabIndex(element));const res=TABBABLE_NODES.test(nodeName)&&!element.disabled||(element instanceof HTMLAnchorElement?element.href||isTabIndexNotNaN:isTabIndexNotNaN);return res&&visible(element)}function tabbable_tabbable(element){const tabIndex=getElementTabIndex(element);const isTabIndexNaN=Number.isNaN(tabIndex);return(isTabIndexNaN||tabIndex>=0)&&focusable(element)}function findTabbableDescendants(element){return Array.from(element.querySelectorAll(FOCUS_SELECTOR)).filter(tabbable_tabbable)}"use client";function scopeTab(node,event){const tabbable=findTabbableDescendants(node);if(!tabbable.length)return void event.preventDefault();const finalTabbable=tabbable[event.shiftKey?0:tabbable.length-1];const root=node.getRootNode();let leavingFinalTabbable=finalTabbable===root.activeElement||node===root.activeElement;const activeElement=root.activeElement;const activeElementIsRadio="INPUT"===activeElement.tagName&&"radio"===activeElement.getAttribute("type");if(activeElementIsRadio){const activeRadioGroup=tabbable.filter(element=>"radio"===element.getAttribute("type")&&element.getAttribute("name")===activeElement.getAttribute("name"));leavingFinalTabbable=activeRadioGroup.includes(finalTabbable)}if(!leavingFinalTabbable)return;event.preventDefault();const target=tabbable[event.shiftKey?tabbable.length-1:0];if(target)target.focus()}"use client";function useFocusTrap(active=true){const ref=(0,index_js_.useRef)(null);const focusNode=node=>{let focusElement=node.querySelector("[data-autofocus]");if(!focusElement){const children=Array.from(node.querySelectorAll(FOCUS_SELECTOR));focusElement=children.find(tabbable_tabbable)||children.find(focusable)||null;if(!focusElement&&focusable(node))focusElement=node}if(focusElement)focusElement.focus({preventScroll:true})};const setRef=(0,index_js_.useCallback)(node=>{if(!active)return;if(null===node)return;if(ref.current===node)return;if(node){setTimeout(()=>{if(node.getRootNode())focusNode(node)});ref.current=node}else ref.current=null},[active]);(0,index_js_.useEffect)(()=>{if(!active)return;ref.current&&setTimeout(()=>focusNode(ref.current));const handleKeyDown=event=>{if("Tab"===event.key&&ref.current)scopeTab(ref.current,event)};document.addEventListener("keydown",handleKeyDown);return()=>document.removeEventListener("keydown",handleKeyDown)},[active]);return setRef}"use client";const reducer=value=>(value+1)%1e6;function useForceUpdate(){const[,update]=(0,index_js_.useReducer)(reducer,0);return update}"use client";const __useId=index_js_["useId".toString()]||(()=>void 0);function useReactId(){const id=__useId();return id?`mantine-${id.replace(/:/g,"")}`:""}"use client";function useId(staticId){const reactId=useReactId();const[uuid,setUuid]=(0,index_js_.useState)(reactId);useIsomorphicEffect(()=>{setUuid(randomId())},[]);if("string"==typeof staticId)return staticId;if("undefined"==typeof window)return reactId;return uuid}"use client";const use_idle_DEFAULT_OPTIONS={events:["keydown","mousemove","touchmove","click","scroll","wheel"],initialState:true};function useIdle(timeout,options){const{events,initialState}={...use_idle_DEFAULT_OPTIONS,...options};const[idle,setIdle]=(0,index_js_.useState)(initialState);const timer=(0,index_js_.useRef)(-1);(0,index_js_.useEffect)(()=>{const handleEvents=()=>{setIdle(false);if(timer.current)window.clearTimeout(timer.current);timer.current=window.setTimeout(()=>{setIdle(true)},timeout)};events.forEach(event=>document.addEventListener(event,handleEvents));timer.current=window.setTimeout(()=>{setIdle(true)},timeout);return()=>{events.forEach(event=>document.removeEventListener(event,handleEvents));window.clearTimeout(timer.current);timer.current=-1}},[timeout]);return idle}"use client";function useInterval(fn,interval,{autoInvoke=false}={}){const[active,setActive]=(0,index_js_.useState)(false);const intervalRef=(0,index_js_.useRef)(null);const fnRef=(0,index_js_.useRef)(null);const start=(0,index_js_.useCallback)(()=>{setActive(old=>{if(!old&&(!intervalRef.current||-1===intervalRef.current))intervalRef.current=window.setInterval(fnRef.current,interval);return true})},[]);const stop=(0,index_js_.useCallback)(()=>{setActive(false);window.clearInterval(intervalRef.current||-1);intervalRef.current=-1},[]);const toggle=(0,index_js_.useCallback)(()=>{if(active)stop();else start()},[active]);(0,index_js_.useEffect)(()=>{fnRef.current=fn;active&&start();return stop},[fn,active,interval]);(0,index_js_.useEffect)(()=>{if(autoInvoke)start()},[]);return{start,stop,toggle,active}}"use client";function useListState(initialValue=[]){const[state,setState]=(0,index_js_.useState)(initialValue);const append=(...items)=>setState(current=>[...current,...items]);const prepend=(...items)=>setState(current=>[...items,...current]);const insert=(index,...items)=>setState(current=>[...current.slice(0,index),...items,...current.slice(index)]);const apply=fn=>setState(current=>current.map((item,index)=>fn(item,index)));const remove=(...indices)=>setState(current=>current.filter((_,index)=>!indices.includes(index)));const pop=()=>setState(current=>{const cloned=[...current];cloned.pop();return cloned});const shift=()=>setState(current=>{const cloned=[...current];cloned.shift();return cloned});const reorder=({from,to})=>setState(current=>{const cloned=[...current];const item=current[from];cloned.splice(from,1);cloned.splice(to,0,item);return cloned});const swap=({from,to})=>setState(current=>{const cloned=[...current];const fromItem=cloned[from];const toItem=cloned[to];cloned.splice(to,1,fromItem);cloned.splice(from,1,toItem);return cloned});const setItem=(index,item)=>setState(current=>{const cloned=[...current];cloned[index]=item;return cloned});const setItemProp=(index,prop,value)=>setState(current=>{const cloned=[...current];cloned[index]={...cloned[index],[prop]:value};return cloned});const applyWhere=(condition,fn)=>setState(current=>current.map((item,index)=>condition(item,index)?fn(item,index):item));const filter=fn=>{setState(current=>current.filter(fn))};return[state,{setState,append,prepend,insert,pop,shift,apply,applyWhere,remove,reorder,swap,setItem,setItemProp,filter}]}"use client";function useWindowEvent(type,listener,options){(0,index_js_.useEffect)(()=>{window.addEventListener(type,listener,options);return()=>window.removeEventListener(type,listener,options)},[type,listener])}"use client";function serializeJSON(value,hookName="use-local-storage"){try{return JSON.stringify(value)}catch(error){throw new Error(`@mantine/hooks ${hookName}: Failed to serialize the value`)}}function deserializeJSON(value){try{return value&&JSON.parse(value)}catch{return value}}function createStorageHandler(type){const getItem=key=>{try{return window[type].getItem(key)}catch(error){console.warn("use-local-storage: Failed to get value from storage, localStorage is blocked");return null}};const setItem=(key,value)=>{try{window[type].setItem(key,value)}catch(error){console.warn("use-local-storage: Failed to set value to storage, localStorage is blocked")}};const removeItem=key=>{try{window[type].removeItem(key)}catch(error){console.warn("use-local-storage: Failed to remove value from storage, localStorage is blocked")}};return{getItem,setItem,removeItem}}function createStorage(type,hookName){const eventName="localStorage"===type?"mantine-local-storage":"mantine-session-storage";const{getItem,setItem,removeItem}=createStorageHandler(type);return function({key,defaultValue,getInitialValueInEffect=true,sync=true,deserialize=deserializeJSON,serialize=value=>serializeJSON(value,hookName)}){const readStorageValue=(0,index_js_.useCallback)(skipStorage=>{let storageBlockedOrSkipped;try{storageBlockedOrSkipped="undefined"==typeof window||!(type in window)||null===window[type]||!!skipStorage}catch(_e){storageBlockedOrSkipped=true}if(storageBlockedOrSkipped)return defaultValue;const storageValue=getItem(key);return null!==storageValue?deserialize(storageValue):defaultValue},[key,defaultValue]);const[value,setValue]=(0,index_js_.useState)(readStorageValue(getInitialValueInEffect));const setStorageValue=(0,index_js_.useCallback)(val=>{if(val instanceof Function)setValue(current=>{const result=val(current);setItem(key,serialize(result));queueMicrotask(()=>{window.dispatchEvent(new CustomEvent(eventName,{detail:{key,value:val(current)}}))});return result});else{setItem(key,serialize(val));window.dispatchEvent(new CustomEvent(eventName,{detail:{key,value:val}}));setValue(val)}},[key]);const removeStorageValue=(0,index_js_.useCallback)(()=>{removeItem(key);setValue(defaultValue);window.dispatchEvent(new CustomEvent(eventName,{detail:{key,value:defaultValue}}))},[key,defaultValue]);useWindowEvent("storage",event=>{if(sync){if(event.storageArea===window[type]&&event.key===key)setValue(deserialize(event.newValue??void 0))}});useWindowEvent(eventName,event=>{if(sync){if(event.detail.key===key)setValue(event.detail.value)}});(0,index_js_.useEffect)(()=>{if(void 0!==defaultValue&&void 0===value)setStorageValue(defaultValue)},[defaultValue,value,setStorageValue]);(0,index_js_.useEffect)(()=>{const val=readStorageValue();void 0!==val&&setStorageValue(val)},[key]);return[void 0===value?defaultValue:value,setStorageValue,removeStorageValue]}}function readValue(type){const{getItem}=createStorageHandler(type);return function({key,defaultValue,deserialize=deserializeJSON}){let storageBlockedOrSkipped;try{storageBlockedOrSkipped="undefined"==typeof window||!(type in window)||null===window[type]}catch(_e){storageBlockedOrSkipped=true}if(storageBlockedOrSkipped)return defaultValue;const storageValue=getItem(key);return null!==storageValue?deserialize(storageValue):defaultValue}}"use client";function useLocalStorage(props){return createStorage("localStorage","use-local-storage")(props)}const readLocalStorageValue=readValue("localStorage");"use client";function useSessionStorage(props){return createStorage("sessionStorage","use-session-storage")(props)}const readSessionStorageValue=readValue("sessionStorage");"use client";function assignRef(ref,value){if("function"==typeof ref)return ref(value);if("object"==typeof ref&&null!==ref&&"current"in ref)ref.current=value}function mergeRefs(...refs){const cleanupMap=/* @__PURE__ */new Map;return node=>{refs.forEach(ref=>{const cleanup=assignRef(ref,node);if(cleanup)cleanupMap.set(ref,cleanup)});if(cleanupMap.size>0)return()=>{refs.forEach(ref=>{const cleanup=cleanupMap.get(ref);if(cleanup&&"function"==typeof cleanup)cleanup();else assignRef(ref,null)});cleanupMap.clear()}}}function useMergedRef(...refs){return(0,index_js_.useCallback)(mergeRefs(...refs),refs)}"use client";function useMouse(options={resetOnExit:false}){const[position,setPosition]=(0,index_js_.useState)({x:0,y:0});const ref=(0,index_js_.useRef)(null);const setMousePosition=event=>{if(ref.current){const rect=event.currentTarget.getBoundingClientRect();const x=Math.max(0,Math.round(event.pageX-rect.left-(window.scrollX||window.scrollX)));const y=Math.max(0,Math.round(event.pageY-rect.top-(window.scrollY||window.scrollY)));setPosition({x,y})}else setPosition({x:event.clientX,y:event.clientY})};const resetMousePosition=()=>setPosition({x:0,y:0});(0,index_js_.useEffect)(()=>{const element=ref?.current?ref.current:document;element.addEventListener("mousemove",setMousePosition);if(options.resetOnExit)element.addEventListener("mouseleave",resetMousePosition);return()=>{element.removeEventListener("mousemove",setMousePosition);if(options.resetOnExit)element.removeEventListener("mouseleave",resetMousePosition)}},[ref.current]);return{ref,...position}}"use client";function clampUseMovePosition(position){return{x:clamp(position.x,0,1),y:clamp(position.y,0,1)}}function useMove(onChange,handlers,dir="ltr"){const mounted=(0,index_js_.useRef)(false);const isSliding=(0,index_js_.useRef)(false);const frame=(0,index_js_.useRef)(0);const[active,setActive]=(0,index_js_.useState)(false);const cleanupRef=(0,index_js_.useRef)(null);(0,index_js_.useEffect)(()=>{mounted.current=true},[]);const refCallback=(0,index_js_.useCallback)(node=>{if(cleanupRef.current){cleanupRef.current();cleanupRef.current=null}if(!node)return;const onScrub=({x,y})=>{cancelAnimationFrame(frame.current);frame.current=requestAnimationFrame(()=>{if(mounted.current&&node){node.style.userSelect="none";const rect=node.getBoundingClientRect();if(rect.width&&rect.height){const _x=clamp((x-rect.left)/rect.width,0,1);onChange({x:"ltr"===dir?_x:1-_x,y:clamp((y-rect.top)/rect.height,0,1)})}}})};const bindEvents=()=>{document.addEventListener("mousemove",onMouseMove);document.addEventListener("mouseup",stopScrubbing);document.addEventListener("touchmove",onTouchMove,{passive:false});document.addEventListener("touchend",stopScrubbing)};const unbindEvents=()=>{document.removeEventListener("mousemove",onMouseMove);document.removeEventListener("mouseup",stopScrubbing);document.removeEventListener("touchmove",onTouchMove);document.removeEventListener("touchend",stopScrubbing)};const startScrubbing=()=>{if(!isSliding.current&&mounted.current){isSliding.current=true;"function"==typeof handlers?.onScrubStart&&handlers.onScrubStart();setActive(true);bindEvents()}};const stopScrubbing=()=>{if(isSliding.current&&mounted.current){isSliding.current=false;setActive(false);unbindEvents();setTimeout(()=>{"function"==typeof handlers?.onScrubEnd&&handlers.onScrubEnd()},0)}};const onMouseDown=event=>{startScrubbing();event.preventDefault();onMouseMove(event)};const onMouseMove=event=>onScrub({x:event.clientX,y:event.clientY});const onTouchStart=event=>{if(event.cancelable)event.preventDefault();startScrubbing();onTouchMove(event)};const onTouchMove=event=>{if(event.cancelable)event.preventDefault();onScrub({x:event.changedTouches[0].clientX,y:event.changedTouches[0].clientY})};node.addEventListener("mousedown",onMouseDown);node.addEventListener("touchstart",onTouchStart,{passive:false});cleanupRef.current=()=>{node.removeEventListener("mousedown",onMouseDown);node.removeEventListener("touchstart",onTouchStart)}},[dir,onChange]);return{ref:refCallback,active}}"use client";function useUncontrolled({value,defaultValue,finalValue,onChange=()=>{}}){const[uncontrolledValue,setUncontrolledValue]=(0,index_js_.useState)(void 0!==defaultValue?defaultValue:finalValue);const handleUncontrolledChange=(val,...payload)=>{setUncontrolledValue(val);onChange?.(val,...payload)};if(void 0!==value)return[value,onChange,true];return[uncontrolledValue,handleUncontrolledChange,false]}"use client";function use_pagination_range(start,end){const length=end-start+1;return Array.from({length},(_,index)=>index+start)}const DOTS="dots";function usePagination({total,siblings=1,boundaries=1,page,initialPage=1,onChange}){const _total=Math.max(Math.trunc(total),0);const[activePage,setActivePage]=useUncontrolled({value:page,onChange,defaultValue:initialPage,finalValue:initialPage});const setPage=pageNumber=>{if(pageNumber<=0)setActivePage(1);else pageNumber>_total?setActivePage(_total):setActivePage(pageNumber)};const next=()=>setPage(activePage+1);const previous=()=>setPage(activePage-1);const first=()=>setPage(1);const last=()=>setPage(_total);const paginationRange=(0,index_js_.useMemo)(()=>{const totalPageNumbers=2*siblings+3+2*boundaries;if(totalPageNumbers>=_total)return use_pagination_range(1,_total);const leftSiblingIndex=Math.max(activePage-siblings,boundaries);const rightSiblingIndex=Math.min(activePage+siblings,_total-boundaries);const shouldShowLeftDots=leftSiblingIndex>boundaries+2;const shouldShowRightDots=rightSiblingIndex<_total-(boundaries+1);if(!shouldShowLeftDots&&shouldShowRightDots){const leftItemCount=2*siblings+boundaries+2;return[...use_pagination_range(1,leftItemCount),DOTS,...use_pagination_range(_total-(boundaries-1),_total)]}if(shouldShowLeftDots&&!shouldShowRightDots){const rightItemCount=boundaries+1+2*siblings;return[...use_pagination_range(1,boundaries),DOTS,...use_pagination_range(_total-rightItemCount,_total)]}return[...use_pagination_range(1,boundaries),DOTS,...use_pagination_range(leftSiblingIndex,rightSiblingIndex),DOTS,...use_pagination_range(_total-boundaries+1,_total)]},[_total,siblings,activePage]);return{range:paginationRange,active:activePage,setPage,next,previous,first,last}}"use client";function useQueue({initialValues=[],limit}){const[state,setState]=(0,index_js_.useState)({state:initialValues.slice(0,limit),queue:initialValues.slice(limit)});const add=(...items)=>setState(current=>{const results=[...current.state,...current.queue,...items];return{state:results.slice(0,limit),queue:results.slice(limit)}});const update=fn=>setState(current=>{const results=fn([...current.state,...current.queue]);return{state:results.slice(0,limit),queue:results.slice(limit)}});const cleanQueue=()=>setState(current=>({state:current.state,queue:[]}));return{state:state.state,queue:state.queue,add,update,cleanQueue}}"use client";function usePageLeave(onPageLeave){(0,index_js_.useEffect)(()=>{document.documentElement.addEventListener("mouseleave",onPageLeave);return()=>document.documentElement.removeEventListener("mouseleave",onPageLeave)},[])}"use client";function useReducedMotion(initialValue,options){return useMediaQuery("(prefers-reduced-motion: reduce)",initialValue,options)}"use client";function useScrollIntoView({duration=1250,axis="y",onScrollFinish,easing=easeInOutQuad,offset=0,cancelable=true,isList=false}={}){const frameID=(0,index_js_.useRef)(0);const startTime=(0,index_js_.useRef)(0);const shouldStop=(0,index_js_.useRef)(false);const scrollableRef=(0,index_js_.useRef)(null);const targetRef=(0,index_js_.useRef)(null);const reducedMotion=useReducedMotion();const cancel=()=>{if(frameID.current)cancelAnimationFrame(frameID.current)};const scrollIntoView=(0,index_js_.useCallback)(({alignment="start"}={})=>{shouldStop.current=false;if(frameID.current)cancel();const start=getScrollStart({parent:scrollableRef.current,axis})??0;const change=getRelativePosition({parent:scrollableRef.current,target:targetRef.current,axis,alignment,offset,isList})-(scrollableRef.current?0:start);function animateScroll(){if(0===startTime.current)startTime.current=performance.now();const now=performance.now();const elapsed=now-startTime.current;const t=reducedMotion||0===duration?1:elapsed/duration;const distance=start+change*easing(t);setScrollParam({parent:scrollableRef.current,axis,distance});if(!shouldStop.current&&t<1)frameID.current=requestAnimationFrame(animateScroll);else{"function"==typeof onScrollFinish&&onScrollFinish();startTime.current=0;frameID.current=0;cancel()}}animateScroll()},[axis,duration,easing,isList,offset,onScrollFinish,reducedMotion]);const handleStop=()=>{if(cancelable)shouldStop.current=true};useWindowEvent("wheel",handleStop,{passive:true});useWindowEvent("touchmove",handleStop,{passive:true});(0,index_js_.useEffect)(()=>cancel,[]);return{scrollableRef,targetRef,scrollIntoView,cancel}}function easeInOutQuad(t){return t<.5?2*t*t:-1+(4-2*t)*t}function getRelativePosition({axis,target,parent,alignment,offset,isList}){if(!target||!parent&&"undefined"==typeof document)return 0;const isCustomParent=!!parent;const parentElement=parent||document.body;const parentPosition=parentElement.getBoundingClientRect();const targetPosition=target.getBoundingClientRect();const getDiff=property=>targetPosition[property]-parentPosition[property];if("y"===axis){const diff=getDiff("top");if(0===diff)return 0;if("start"===alignment){const distance=diff-offset;const shouldScroll=distance<=targetPosition.height*(isList?0:1)||!isList;return shouldScroll?distance:0}const parentHeight=isCustomParent?parentPosition.height:window.innerHeight;if("end"===alignment){const distance=diff+offset-parentHeight+targetPosition.height;const shouldScroll=distance>=-targetPosition.height*(isList?0:1)||!isList;return shouldScroll?distance:0}if("center"===alignment)return diff-parentHeight/2+targetPosition.height/2;return 0}if("x"===axis){const diff=getDiff("left");if(0===diff)return 0;if("start"===alignment){const distance=diff-offset;const shouldScroll=distance<=targetPosition.width||!isList;return shouldScroll?distance:0}const parentWidth=isCustomParent?parentPosition.width:window.innerWidth;if("end"===alignment){const distance=diff+offset-parentWidth+targetPosition.width;const shouldScroll=distance>=-targetPosition.width||!isList;return shouldScroll?distance:0}if("center"===alignment)return diff-parentWidth/2+targetPosition.width/2}return 0}function getScrollStart({axis,parent}){if(!parent&&"undefined"==typeof document)return 0;const method="y"===axis?"scrollTop":"scrollLeft";if(parent)return parent[method];const{body,documentElement}=document;return body[method]+documentElement[method]}function setScrollParam({axis,parent,distance}){if(!parent&&"undefined"==typeof document)return;const method="y"===axis?"scrollTop":"scrollLeft";if(parent)parent[method]=distance;else{const{body,documentElement}=document;body[method]=distance;documentElement[method]=distance}}"use client";const defaultState={x:0,y:0,width:0,height:0,top:0,left:0,bottom:0,right:0};function useResizeObserver(options){const frameID=(0,index_js_.useRef)(0);const ref=(0,index_js_.useRef)(null);const[rect,setRect]=(0,index_js_.useState)(defaultState);const observer=(0,index_js_.useMemo)(()=>"undefined"!=typeof window?new ResizeObserver(entries=>{const entry=entries[0];if(entry){cancelAnimationFrame(frameID.current);frameID.current=requestAnimationFrame(()=>{if(ref.current){const boxSize=entry.borderBoxSize?.[0]||entry.contentBoxSize?.[0];if(boxSize){const width=boxSize.inlineSize;const height=boxSize.blockSize;setRect({width,height,x:entry.contentRect.x,y:entry.contentRect.y,top:entry.contentRect.top,left:entry.contentRect.left,bottom:entry.contentRect.bottom,right:entry.contentRect.right})}else setRect(entry.contentRect)}})}}):null,[]);(0,index_js_.useEffect)(()=>{if(ref.current)observer?.observe(ref.current,options);return()=>{observer?.disconnect();if(frameID.current)cancelAnimationFrame(frameID.current)}},[ref.current]);return[ref,rect]}function useElementSize(options){const[ref,{width,height}]=useResizeObserver(options);return{ref,width,height}}"use client";function shallowCompare(prevValue,currValue){if(!prevValue||!currValue)return false;if(prevValue===currValue)return true;if(prevValue.length!==currValue.length)return false;for(let i=0;i<prevValue.length;i+=1)if(!shallowEqual(prevValue[i],currValue[i]))return false;return true}function useShallowCompare(dependencies){const ref=(0,index_js_.useRef)([]);const updateRef=(0,index_js_.useRef)(0);if(!shallowCompare(ref.current,dependencies)){ref.current=dependencies;updateRef.current+=1}return[updateRef.current]}function useShallowEffect(cb,dependencies){(0,index_js_.useEffect)(cb,useShallowCompare(dependencies))}"use client";function useToggle(options=[false,true]){const[[option],toggle]=(0,index_js_.useReducer)((state,action)=>{const value=action instanceof Function?action(state[0]):action;const index=Math.abs(state.indexOf(value));return state.slice(index).concat(state.slice(0,index))},options);return[option,toggle]}"use client";const eventListerOptions={passive:true};function useViewportSize(){const[windowSize,setWindowSize]=(0,index_js_.useState)({width:0,height:0});const setSize=(0,index_js_.useCallback)(()=>{setWindowSize({width:window.innerWidth||0,height:window.innerHeight||0})},[]);useWindowEvent("resize",setSize,eventListerOptions);useWindowEvent("orientationchange",setSize,eventListerOptions);(0,index_js_.useEffect)(setSize,[]);return windowSize}"use client";function getScrollPosition(){return"undefined"!=typeof window?{x:window.scrollX,y:window.scrollY}:{x:0,y:0}}function scrollTo({x,y}){if("undefined"!=typeof window){const scrollOptions={behavior:"smooth"};if("number"==typeof x)scrollOptions.left=x;if("number"==typeof y)scrollOptions.top=y;window.scrollTo(scrollOptions)}}function useWindowScroll(){const[position,setPosition]=(0,index_js_.useState)({x:0,y:0});useWindowEvent("scroll",()=>setPosition(getScrollPosition()));useWindowEvent("resize",()=>setPosition(getScrollPosition()));(0,index_js_.useEffect)(()=>{setPosition(getScrollPosition())},[]);return[position,scrollTo]}"use client";function useIntersection(options){const[entry,setEntry]=(0,index_js_.useState)(null);const observer=(0,index_js_.useRef)(null);const ref=(0,index_js_.useCallback)(element=>{if(observer.current){observer.current.disconnect();observer.current=null}if(null===element)return void setEntry(null);observer.current=new IntersectionObserver(([_entry])=>{setEntry(_entry)},options);observer.current.observe(element)},[options?.rootMargin,options?.root,options?.threshold]);return{ref,entry}}"use client";function useHash({getInitialValueInEffect=true}={}){const[hash,setHash]=(0,index_js_.useState)(getInitialValueInEffect?"":window.location.hash||"");const setHashHandler=value=>{const valueWithHash=value.startsWith("#")?value:`#${value}`;window.location.hash=valueWithHash;setHash(valueWithHash)};useWindowEvent("hashchange",()=>{const newHash=window.location.hash;if(hash!==newHash)setHash(newHash)});(0,index_js_.useEffect)(()=>{if(getInitialValueInEffect)setHash(window.location.hash)},[]);return[hash,setHashHandler]}"use client";const keyNameMap={" ":"space",ArrowLeft:"arrowleft",ArrowRight:"arrowright",ArrowUp:"arrowup",ArrowDown:"arrowdown",Escape:"escape",Esc:"escape",esc:"escape",Enter:"enter",Tab:"tab",Backspace:"backspace",Delete:"delete",Insert:"insert",Home:"home",End:"end",PageUp:"pageup",PageDown:"pagedown","+":"plus","-":"minus","*":"asterisk","/":"slash"};function normalizeKey(key){const lowerKey=key.replace("Key","").toLowerCase();return keyNameMap[key]||lowerKey}function parseHotkey(hotkey){const keys=hotkey.toLowerCase().split("+").map(part=>part.trim());const modifiers={alt:keys.includes("alt"),ctrl:keys.includes("ctrl"),meta:keys.includes("meta"),mod:keys.includes("mod"),shift:keys.includes("shift"),plus:keys.includes("[plus]")};const reservedKeys=["alt","ctrl","meta","shift","mod"];const freeKey=keys.find(key=>!reservedKeys.includes(key));return{...modifiers,key:"[plus]"===freeKey?"+":freeKey}}function isExactHotkey(hotkey,event,usePhysicalKeys){const{alt,ctrl,meta,mod,shift,key}=hotkey;const{altKey,ctrlKey,metaKey,shiftKey,key:pressedKey,code:pressedCode}=event;if(alt!==altKey)return false;if(mod){if(!ctrlKey&&!metaKey)return false}else{if(ctrl!==ctrlKey)return false;if(meta!==metaKey)return false}if(shift!==shiftKey)return false;if(key&&(usePhysicalKeys?normalizeKey(pressedCode)===normalizeKey(key):normalizeKey(pressedKey??pressedCode)===normalizeKey(key)))return true;return false}function getHotkeyMatcher(hotkey,usePhysicalKeys){return event=>isExactHotkey(parseHotkey(hotkey),event,usePhysicalKeys)}function getHotkeyHandler(hotkeys){return event=>{const _event="nativeEvent"in event?event.nativeEvent:event;hotkeys.forEach(([hotkey,handler,options={preventDefault:true,usePhysicalKeys:false}])=>{if(getHotkeyMatcher(hotkey,options.usePhysicalKeys)(_event)){if(options.preventDefault)event.preventDefault();handler(_event)}})}}"use client";function shouldFireEvent(event,tagsToIgnore,triggerOnContentEditable=false){if(event.target instanceof HTMLElement){if(triggerOnContentEditable)return!tagsToIgnore.includes(event.target.tagName);return!event.target.isContentEditable&&!tagsToIgnore.includes(event.target.tagName)}return true}function useHotkeys(hotkeys,tagsToIgnore=["INPUT","TEXTAREA","SELECT"],triggerOnContentEditable=false){(0,index_js_.useEffect)(()=>{const keydownListener=event=>{hotkeys.forEach(([hotkey,handler,options={preventDefault:true,usePhysicalKeys:false}])=>{if(getHotkeyMatcher(hotkey,options.usePhysicalKeys)(event)&&shouldFireEvent(event,tagsToIgnore,triggerOnContentEditable)){if(options.preventDefault)event.preventDefault();handler(event)}})};document.documentElement.addEventListener("keydown",keydownListener);return()=>document.documentElement.removeEventListener("keydown",keydownListener)},[hotkeys])}"use client";function getFullscreenElement(){const _document=window.document;const fullscreenElement=_document.fullscreenElement||_document.webkitFullscreenElement||_document.mozFullScreenElement||_document.msFullscreenElement;return fullscreenElement}function exitFullscreen(){const _document=window.document;if("function"==typeof _document.exitFullscreen)return _document.exitFullscreen();if("function"==typeof _document.msExitFullscreen)return _document.msExitFullscreen();if("function"==typeof _document.webkitExitFullscreen)return _document.webkitExitFullscreen();if("function"==typeof _document.mozCancelFullScreen)return _document.mozCancelFullScreen();return null}function enterFullScreen(element){const _element=element;return _element.requestFullscreen?.()||_element.msRequestFullscreen?.()||_element.webkitEnterFullscreen?.()||_element.webkitRequestFullscreen?.()||_element.mozRequestFullscreen?.()}const prefixes=["","webkit","moz","ms"];function addEvents(element,{onFullScreen,onError}){prefixes.forEach(prefix=>{element.addEventListener(`${prefix}fullscreenchange`,onFullScreen);element.addEventListener(`${prefix}fullscreenerror`,onError)});return()=>{prefixes.forEach(prefix=>{element.removeEventListener(`${prefix}fullscreenchange`,onFullScreen);element.removeEventListener(`${prefix}fullscreenerror`,onError)})}}function useFullscreen(){const[fullscreen,setFullscreen]=(0,index_js_.useState)(false);const _ref=(0,index_js_.useRef)(null);const handleFullscreenChange=(0,index_js_.useCallback)(event=>{setFullscreen(event.target===getFullscreenElement())},[setFullscreen]);const handleFullscreenError=(0,index_js_.useCallback)(event=>{setFullscreen(false);console.error(`[@mantine/hooks] use-fullscreen: Error attempting full-screen mode method: ${event} (${event.target})`)},[setFullscreen]);const toggle=(0,index_js_.useCallback)(async()=>{if(getFullscreenElement())await exitFullscreen();else await enterFullScreen(_ref.current)},[]);const ref=(0,index_js_.useCallback)(element=>{if(null===element)_ref.current=window.document.documentElement;else _ref.current=element},[]);(0,index_js_.useEffect)(()=>{if(!_ref.current&&window.document){_ref.current=window.document.documentElement;return addEvents(_ref.current,{onFullScreen:handleFullscreenChange,onError:handleFullscreenError})}if(_ref.current)return addEvents(_ref.current,{onFullScreen:handleFullscreenChange,onError:handleFullscreenError})},[_ref.current]);return{ref,toggle,fullscreen}}"use client";function useLogger(componentName,props){(0,index_js_.useEffect)(()=>{console.log(`${componentName} mounted`,...props);return()=>console.log(`${componentName} unmounted`)},[]);useDidUpdate(()=>{console.log(`${componentName} updated`,...props)},props);return null}"use client";function useHover(){const[hovered,setHovered]=(0,index_js_.useState)(false);const previousNode=(0,index_js_.useRef)(null);const handleMouseEnter=(0,index_js_.useCallback)(()=>{setHovered(true)},[]);const handleMouseLeave=(0,index_js_.useCallback)(()=>{setHovered(false)},[]);const ref=(0,index_js_.useCallback)(node=>{if(previousNode.current){previousNode.current.removeEventListener("mouseenter",handleMouseEnter);previousNode.current.removeEventListener("mouseleave",handleMouseLeave)}if(node){node.addEventListener("mouseenter",handleMouseEnter);node.addEventListener("mouseleave",handleMouseLeave)}previousNode.current=node},[handleMouseEnter,handleMouseLeave]);return{ref,hovered}}"use client";function useValidatedState(initialValue,validate,initialValidationState){const[value,setValue]=(0,index_js_.useState)(initialValue);const[lastValidValue,setLastValidValue]=(0,index_js_.useState)(validate(initialValue)?initialValue:void 0);const[valid,setValid]=(0,index_js_.useState)("boolean"==typeof initialValidationState?initialValidationState:validate(initialValue));const onChange=val=>{if(validate(val)){setLastValidValue(val);setValid(true)}else setValid(false);setValue(val)};return[{value,lastValidValue,valid},onChange]}"use client";function isMacOS(userAgent){const macosPattern=/(Macintosh)|(MacIntel)|(MacPPC)|(Mac68K)/i;return macosPattern.test(userAgent)}function isIOS(userAgent){const iosPattern=/(iPhone)|(iPad)|(iPod)/i;return iosPattern.test(userAgent)}function isWindows(userAgent){const windowsPattern=/(Win32)|(Win64)|(Windows)|(WinCE)/i;return windowsPattern.test(userAgent)}function isAndroid(userAgent){const androidPattern=/Android/i;return androidPattern.test(userAgent)}function isLinux(userAgent){const linuxPattern=/Linux/i;return linuxPattern.test(userAgent)}function isChromeOS(userAgent){const chromePattern=/CrOS/i;return chromePattern.test(userAgent)}function getOS(){if("undefined"==typeof window)return"undetermined";const{userAgent}=window.navigator;if(isIOS(userAgent)||isMacOS(userAgent)&&"ontouchend"in document)return"ios";if(isMacOS(userAgent))return"macos";if(isWindows(userAgent))return"windows";if(isAndroid(userAgent))return"android";if(isLinux(userAgent))return"linux";if(isChromeOS(userAgent))return"chromeos";return"undetermined"}function useOs(options={getValueInEffect:true}){const[value,setValue]=(0,index_js_.useState)(options.getValueInEffect?"undetermined":getOS());useIsomorphicEffect(()=>{if(options.getValueInEffect)setValue(getOS)},[]);return value}"use client";function useSetState(initialState){const[state,setState]=(0,index_js_.useState)(initialState);const _setState=(0,index_js_.useCallback)(statePartial=>setState(current=>({...current,..."function"==typeof statePartial?statePartial(current):statePartial})),[]);return[state,_setState]}"use client";function getInputOnChange(setValue){return val=>{if(val)if("function"==typeof val)setValue(val);else if("object"==typeof val&&"nativeEvent"in val){const{currentTarget}=val;"checkbox"===currentTarget.type?setValue(currentTarget.checked):setValue(currentTarget.value)}else setValue(val);else setValue(val)}}function useInputState(initialState){const[value,setValue]=(0,index_js_.useState)(initialState);return[value,getInputOnChange(setValue)]}"use client";function useEventListener(type,listener,options){const previousListener=(0,index_js_.useRef)(null);const previousNode=(0,index_js_.useRef)(null);const callbackRef=(0,index_js_.useCallback)(node=>{if(!node)return;if(previousNode.current&&previousListener.current)previousNode.current.removeEventListener(type,previousListener.current,options);node.addEventListener(type,listener,options);previousNode.current=node;previousListener.current=listener},[type,listener,options]);(0,index_js_.useEffect)(()=>()=>{if(previousNode.current&&previousListener.current)previousNode.current.removeEventListener(type,previousListener.current,options)},[type,options]);return callbackRef}"use client";function useDisclosure(initialState=false,options={}){const[opened,setOpened]=(0,index_js_.useState)(initialState);const open=(0,index_js_.useCallback)(()=>{setOpened(isOpened=>{if(!isOpened){options.onOpen?.();return true}return isOpened})},[options.onOpen]);const close=(0,index_js_.useCallback)(()=>{setOpened(isOpened=>{if(isOpened){options.onClose?.();return false}return isOpened})},[options.onClose]);const toggle=(0,index_js_.useCallback)(()=>{opened?close():open()},[close,open,opened]);return[opened,{open,close,toggle}]}"use client";function containsRelatedTarget(event){if(event.currentTarget instanceof HTMLElement&&event.relatedTarget instanceof HTMLElement)return event.currentTarget.contains(event.relatedTarget);return false}function useFocusWithin({onBlur,onFocus}={}){const[focused,setFocused]=(0,index_js_.useState)(false);const focusedRef=(0,index_js_.useRef)(false);const previousNode=(0,index_js_.useRef)(null);const _setFocused=(0,index_js_.useCallback)(value=>{setFocused(value);focusedRef.current=value},[]);const handleFocusIn=(0,index_js_.useCallback)(event=>{if(!focusedRef.current){_setFocused(true);onFocus?.(event)}},[onFocus]);const handleFocusOut=(0,index_js_.useCallback)(event=>{if(focusedRef.current&&!containsRelatedTarget(event)){_setFocused(false);onBlur?.(event)}},[onBlur]);const callbackRef=(0,index_js_.useCallback)(node=>{if(!node)return;if(previousNode.current){previousNode.current.removeEventListener("focusin",handleFocusIn);previousNode.current.removeEventListener("focusout",handleFocusOut)}node.addEventListener("focusin",handleFocusIn);node.addEventListener("focusout",handleFocusOut)},[handleFocusIn,handleFocusOut]);(0,index_js_.useEffect)(()=>()=>{if(previousNode.current){previousNode.current.removeEventListener("focusin",handleFocusIn);previousNode.current.removeEventListener("focusout",handleFocusOut)}},[]);return{ref:callbackRef,focused}}"use client";function getConnection(){if("undefined"==typeof navigator)return{};const _navigator=navigator;const connection=_navigator.connection||_navigator.mozConnection||_navigator.webkitConnection;if(!connection)return{};return{downlink:connection?.downlink,downlinkMax:connection?.downlinkMax,effectiveType:connection?.effectiveType,rtt:connection?.rtt,saveData:connection?.saveData,type:connection?.type}}function useNetwork(){const[status,setStatus]=(0,index_js_.useState)({online:true});const handleConnectionChange=(0,index_js_.useCallback)(()=>setStatus(current=>({...current,...getConnection()})),[]);useWindowEvent("online",()=>setStatus({online:true,...getConnection()}));useWindowEvent("offline",()=>setStatus({online:false,...getConnection()}));(0,index_js_.useEffect)(()=>{const _navigator=navigator;if(_navigator.connection){setStatus({online:_navigator.onLine,...getConnection()});_navigator.connection.addEventListener("change",handleConnectionChange);return()=>_navigator.connection.removeEventListener("change",handleConnectionChange)}if("boolean"==typeof _navigator.onLine)setStatus(current=>({...current,online:_navigator.onLine}))},[]);return status}"use client";function useTimeout(callback,delay,options={autoInvoke:false}){const timeoutRef=(0,index_js_.useRef)(null);const start=(0,index_js_.useCallback)((...args)=>{if(!timeoutRef.current)timeoutRef.current=window.setTimeout(()=>{callback(args);timeoutRef.current=null},delay)},[delay]);const clear=(0,index_js_.useCallback)(()=>{if(timeoutRef.current){window.clearTimeout(timeoutRef.current);timeoutRef.current=null}},[]);(0,index_js_.useEffect)(()=>{if(options.autoInvoke)start();return clear},[clear,start]);return{start,clear}}"use client";function useTextSelection(){const forceUpdate=useForceUpdate();const[selection,setSelection]=(0,index_js_.useState)(null);const handleSelectionChange=()=>{setSelection(document.getSelection());forceUpdate()};(0,index_js_.useEffect)(()=>{setSelection(document.getSelection());document.addEventListener("selectionchange",handleSelectionChange);return()=>document.removeEventListener("selectionchange",handleSelectionChange)},[]);return selection}"use client";function usePrevious(value){const ref=(0,index_js_.useRef)(void 0);(0,index_js_.useEffect)(()=>{ref.current=value},[value]);return ref.current}"use client";const MIME_TYPES={ico:"image/x-icon",png:"image/png",svg:"image/svg+xml",gif:"image/gif"};function useFavicon(url){const link=(0,index_js_.useRef)(null);useIsomorphicEffect(()=>{if(!url)return;if(!link.current){const existingElements=document.querySelectorAll('link[rel*="icon"]');existingElements.forEach(element2=>document.head.removeChild(element2));const element=document.createElement("link");element.rel="shortcut icon";link.current=element;document.querySelector("head").appendChild(element)}const splittedUrl=url.split(".");link.current.setAttribute("type",MIME_TYPES[splittedUrl[splittedUrl.length-1].toLowerCase()]);link.current.setAttribute("href",url)},[url])}"use client";const isFixed=(current,fixedAt)=>current<=fixedAt;const isPinnedOrReleased=(current,fixedAt,isCurrentlyPinnedRef,isScrollingUp,onPin,onRelease)=>{const isInFixedPosition=isFixed(current,fixedAt);if(isInFixedPosition&&!isCurrentlyPinnedRef.current){isCurrentlyPinnedRef.current=true;onPin?.()}else if(isInFixedPosition||!isScrollingUp||isCurrentlyPinnedRef.current){if(!isInFixedPosition&&isCurrentlyPinnedRef.current){isCurrentlyPinnedRef.current=false;onRelease?.()}}else{isCurrentlyPinnedRef.current=true;onPin?.()}};const useScrollDirection=()=>{const[lastScrollTop,setLastScrollTop]=(0,index_js_.useState)(0);const[isScrollingUp,setIsScrollingUp]=(0,index_js_.useState)(false);const[isResizing,setIsResizing]=(0,index_js_.useState)(false);(0,index_js_.useEffect)(()=>{let resizeTimer;const onResize=()=>{setIsResizing(true);clearTimeout(resizeTimer);resizeTimer=setTimeout(()=>{setIsResizing(false)},300)};const onScroll=()=>{if(isResizing)return;const currentScrollTop=window.scrollY||document.documentElement.scrollTop;setIsScrollingUp(currentScrollTop<lastScrollTop);setLastScrollTop(currentScrollTop)};window.addEventListener("scroll",onScroll);window.addEventListener("resize",onResize);return()=>{window.removeEventListener("scroll",onScroll);window.removeEventListener("resize",onResize)}},[lastScrollTop,isResizing]);return isScrollingUp};function useHeadroom({fixedAt=0,onPin,onFix,onRelease}={}){const isCurrentlyPinnedRef=(0,index_js_.useRef)(false);const isScrollingUp=useScrollDirection();const[{y:scrollPosition}]=useWindowScroll();useIsomorphicEffect(()=>{isPinnedOrReleased(scrollPosition,fixedAt,isCurrentlyPinnedRef,isScrollingUp,onPin,onRelease)},[scrollPosition]);useIsomorphicEffect(()=>{if(isFixed(scrollPosition,fixedAt))onFix?.()},[scrollPosition,fixedAt,onFix]);if(isFixed(scrollPosition,fixedAt)||isScrollingUp)return true;return false}"use client";function useEyeDropper(){const[supported,setSupported]=(0,index_js_.useState)(false);useIsomorphicEffect(()=>{setSupported("undefined"!=typeof window&&!isOpera()&&"EyeDropper"in window)},[]);const open=(0,index_js_.useCallback)((options={})=>{if(supported){const eyeDropper=new window.EyeDropper;return eyeDropper.open(options)}return Promise.resolve(void 0)},[supported]);return{supported,open}}function isOpera(){return navigator.userAgent.includes("OPR")}"use client";function useInViewport(){const observer=(0,index_js_.useRef)(null);const[inViewport,setInViewport]=(0,index_js_.useState)(false);const ref=(0,index_js_.useCallback)(node=>{if("undefined"!=typeof IntersectionObserver){if(node&&!observer.current)observer.current=new IntersectionObserver(entries=>setInViewport(entries.some(entry=>entry.isIntersecting)));else observer.current?.disconnect();if(node)observer.current?.observe(node);else setInViewport(false)}},[]);return{ref,inViewport}}"use client";function useMutationObserver(callback,options,target){const observer=(0,index_js_.useRef)(null);const ref=(0,index_js_.useRef)(null);(0,index_js_.useEffect)(()=>{const targetElement="function"==typeof target?target():target;if(targetElement||ref.current){observer.current=new MutationObserver(callback);observer.current.observe(targetElement||ref.current,options)}return()=>{observer.current?.disconnect()}},[callback,options]);return ref}"use client";function useMounted(){const[mounted,setMounted]=(0,index_js_.useState)(false);(0,index_js_.useEffect)(()=>setMounted(true),[]);return mounted}"use client";function useStateHistory(initialValue){const[state,setState]=(0,index_js_.useState)({history:[initialValue],current:0});const set=(0,index_js_.useCallback)(val=>setState(currentState=>{const nextState=[...currentState.history.slice(0,currentState.current+1),val];return{history:nextState,current:nextState.length-1}}),[]);const back=(0,index_js_.useCallback)((steps=1)=>setState(currentState=>({history:currentState.history,current:Math.max(0,currentState.current-steps)})),[]);const forward=(0,index_js_.useCallback)((steps=1)=>setState(currentState=>({history:currentState.history,current:Math.min(currentState.history.length-1,currentState.current+steps)})),[]);const reset=(0,index_js_.useCallback)(()=>{setState({history:[initialValue],current:0})},[initialValue]);const handlers=(0,index_js_.useMemo)(()=>({back,forward,reset,set}),[back,forward,reset,set]);return[state.history[state.current],handlers,state]}"use client";function useMap(initialState){const mapRef=(0,index_js_.useRef)(new Map(initialState));const forceUpdate=useForceUpdate();mapRef.current.set=(...args)=>{Map.prototype.set.apply(mapRef.current,args);forceUpdate();return mapRef.current};mapRef.current.clear=(...args)=>{Map.prototype.clear.apply(mapRef.current,args);forceUpdate()};mapRef.current.delete=(...args)=>{const res=Map.prototype.delete.apply(mapRef.current,args);forceUpdate();return res};return mapRef.current}"use client";function readonlySetLikeToSet(input){if(input instanceof Set)return input;const result=/* @__PURE__ */new Set;for(const item of input)result.add(item);return result}function useSet(values){const setRef=(0,index_js_.useRef)(new Set(values));const forceUpdate=useForceUpdate();setRef.current.add=(...args)=>{const res=Set.prototype.add.apply(setRef.current,args);forceUpdate();return res};setRef.current.clear=(...args)=>{Set.prototype.clear.apply(setRef.current,args);forceUpdate()};setRef.current.delete=(...args)=>{const res=Set.prototype.delete.apply(setRef.current,args);forceUpdate();return res};setRef.current.union=other=>{const result=new Set(setRef.current);readonlySetLikeToSet(other).forEach(item=>result.add(item));return result};setRef.current.intersection=other=>{const result=/* @__PURE__ */new Set;const otherSet=readonlySetLikeToSet(other);setRef.current.forEach(item=>{if(otherSet.has(item))result.add(item)});return result};setRef.current.difference=other=>{const result=/* @__PURE__ */new Set;const otherSet=readonlySetLikeToSet(other);setRef.current.forEach(item=>{if(!otherSet.has(item))result.add(item)});return result};setRef.current.symmetricDifference=other=>{const result=/* @__PURE__ */new Set;const otherSet=readonlySetLikeToSet(other);setRef.current.forEach(item=>{if(!otherSet.has(item))result.add(item)});otherSet.forEach(item=>{if(!setRef.current.has(item))result.add(item)});return result};return setRef.current}"use client";function useThrottledCallbackWithClearTimeout(callback,wait){const handleCallback=useCallbackRef(callback);const latestInArgsRef=(0,index_js_.useRef)(null);const latestOutArgsRef=(0,index_js_.useRef)(null);const active=(0,index_js_.useRef)(true);const waitRef=(0,index_js_.useRef)(wait);const timeoutRef=(0,index_js_.useRef)(-1);const clearTimeout1=()=>window.clearTimeout(timeoutRef.current);const callThrottledCallback=(0,index_js_.useCallback)((...args)=>{handleCallback(...args);latestInArgsRef.current=args;latestOutArgsRef.current=args;active.current=false},[handleCallback]);const timerCallback=(0,index_js_.useCallback)(()=>{if(latestInArgsRef.current&&latestInArgsRef.current!==latestOutArgsRef.current){callThrottledCallback(...latestInArgsRef.current);timeoutRef.current=window.setTimeout(timerCallback,waitRef.current)}else active.current=true},[callThrottledCallback]);const throttled=(0,index_js_.useCallback)((...args)=>{if(active.current){callThrottledCallback(...args);timeoutRef.current=window.setTimeout(timerCallback,waitRef.current)}else latestInArgsRef.current=args},[callThrottledCallback,timerCallback]);(0,index_js_.useEffect)(()=>{waitRef.current=wait},[wait]);return[throttled,clearTimeout1]}function useThrottledCallback(callback,wait){return useThrottledCallbackWithClearTimeout(callback,wait)[0]}"use client";function useThrottledState(defaultValue,wait){const[value,setValue]=(0,index_js_.useState)(defaultValue);const[setThrottledValue,clearTimeout1]=useThrottledCallbackWithClearTimeout(setValue,wait);(0,index_js_.useEffect)(()=>clearTimeout1,[]);return[value,setThrottledValue]}"use client";function useThrottledValue(value,wait){const[throttledValue,setThrottledValue]=(0,index_js_.useState)(value);const valueRef=(0,index_js_.useRef)(value);const[throttledSetValue,clearTimeout1]=useThrottledCallbackWithClearTimeout(setThrottledValue,wait);(0,index_js_.useEffect)(()=>{if(value!==valueRef.current){valueRef.current=value;throttledSetValue(value)}},[throttledSetValue,value]);(0,index_js_.useEffect)(()=>clearTimeout1,[]);return throttledValue}"use client";function useIsFirstRender(){const renderRef=(0,index_js_.useRef)(true);if(true===renderRef.current){renderRef.current=false;return true}return renderRef.current}"use client";function use_orientation_getInitialValue(initialValue,getInitialValueInEffect){if(getInitialValueInEffect)return initialValue;if("undefined"!=typeof window&&"screen"in window)return{angle:window.screen.orientation?.angle??initialValue.angle,type:window.screen.orientation?.type??initialValue.type};return initialValue}function useOrientation({defaultAngle=0,defaultType="landscape-primary",getInitialValueInEffect=true}={}){const[orientation,setOrientation]=(0,index_js_.useState)(use_orientation_getInitialValue({angle:defaultAngle,type:defaultType},getInitialValueInEffect));const handleOrientationChange=event=>{const target=event.currentTarget;setOrientation({angle:target?.angle||0,type:target?.type||"landscape-primary"})};useIsomorphicEffect(()=>{window.screen.orientation?.addEventListener("change",handleOrientationChange);return()=>window.screen.orientation?.removeEventListener("change",handleOrientationChange)},[]);return orientation}"use client";function useFetch(url,{autoInvoke=true,...options}={}){const[data,setData]=(0,index_js_.useState)(null);const[loading,setLoading]=(0,index_js_.useState)(false);const[error,setError]=(0,index_js_.useState)(null);const controller=(0,index_js_.useRef)(null);const refetch=(0,index_js_.useCallback)(()=>{if(controller.current)controller.current.abort();controller.current=new AbortController;setLoading(true);return fetch(url,{signal:controller.current.signal,...options}).then(res=>res.json()).then(res=>{setData(res);setLoading(false);return res}).catch(err=>{setLoading(false);if("AbortError"!==err.name)setError(err);return err})},[url]);const abort=(0,index_js_.useCallback)(()=>{if(controller.current)controller.current?.abort("")},[]);(0,index_js_.useEffect)(()=>{if(autoInvoke)refetch();return()=>{if(controller.current)controller.current.abort("")}},[refetch,autoInvoke]);return{data,loading,error,refetch,abort}}"use client";function radiansToDegrees(radians){return 180/Math.PI*radians}function getElementCenter(element){const rect=element.getBoundingClientRect();return[rect.left+rect.width/2,rect.top+rect.height/2]}function getAngle(coordinates,element){const center=getElementCenter(element);const x=coordinates[0]-center[0];const y=coordinates[1]-center[1];const deg=radiansToDegrees(Math.atan2(x,y))+180;return 360-deg}function toFixed(value,digits){return parseFloat(value.toFixed(digits))}function getDigitsAfterDot(value){return value.toString().split(".")[1]?.length||0}function normalizeRadialValue(degree,step){const clamped=clamp(degree,0,360);const high=Math.ceil(clamped/step);const low=Math.round(clamped/step);return toFixed(high>=clamped/step?high*step===360?0:high*step:low*step,getDigitsAfterDot(step))}function useRadialMove(onChange,{step=.01,onChangeEnd,onScrubStart,onScrubEnd}={}){const mounted=(0,index_js_.useRef)(false);const[active,setActive]=(0,index_js_.useState)(false);(0,index_js_.useEffect)(()=>{mounted.current=true},[]);const refCallback=(0,index_js_.useCallback)(node=>{const update=(event,done=false)=>{if(node){node.style.userSelect="none";const deg=getAngle([event.clientX,event.clientY],node);const newValue=normalizeRadialValue(deg,step||1);onChange(newValue);done&&onChangeEnd?.(newValue)}};const beginTracking=()=>{onScrubStart?.();setActive(true);document.addEventListener("mousemove",handleMouseMove,false);document.addEventListener("mouseup",handleMouseUp,false);document.addEventListener("touchmove",handleTouchMove,{passive:false});document.addEventListener("touchend",handleTouchEnd,false)};const endTracking=()=>{onScrubEnd?.();setActive(false);document.removeEventListener("mousemove",handleMouseMove,false);document.removeEventListener("mouseup",handleMouseUp,false);document.removeEventListener("touchmove",handleTouchMove,false);document.removeEventListener("touchend",handleTouchEnd,false)};const onMouseDown=event=>{beginTracking();update(event)};const handleMouseMove=event=>{update(event)};const handleMouseUp=event=>{update(event,true);endTracking()};const handleTouchMove=event=>{event.preventDefault();update(event.touches[0])};const handleTouchEnd=event=>{update(event.changedTouches[0],true);endTracking()};const handleTouchStart=event=>{event.preventDefault();beginTracking();update(event.touches[0])};node?.addEventListener("mousedown",onMouseDown);node?.addEventListener("touchstart",handleTouchStart,{passive:false});return()=>{if(node){node.removeEventListener("mousedown",onMouseDown);node.removeEventListener("touchstart",handleTouchStart)}}},[onChange]);return{ref:refCallback,active}}"use client";function getHeadingsData(headings,getDepth,getValue){const result=[];for(let i=0;i<headings.length;i+=1){const heading=headings[i];result.push({depth:getDepth(heading),value:getValue(heading),id:heading.id||randomId(),getNode:()=>heading.id?document.getElementById(heading.id):heading})}return result}function getActiveElement(rects,offset=0){if(0===rects.length)return -1;const closest=rects.reduce((acc,item,index)=>{if(Math.abs(acc.position-offset)<Math.abs(item.y-offset))return acc;return{index,position:item.y}},{index:0,position:rects[0].y});return closest.index}function getDefaultDepth(element){return Number(element.tagName[1])}function getDefaultValue(element){return element.textContent||""}function useScrollSpy({selector="h1, h2, h3, h4, h5, h6",getDepth=getDefaultDepth,getValue=getDefaultValue,offset=0,scrollHost}={}){const[active,setActive]=(0,index_js_.useState)(-1);const[initialized,setInitialized]=(0,index_js_.useState)(false);const[data,setData]=(0,index_js_.useState)([]);const headingsRef=(0,index_js_.useRef)([]);const handleScroll=()=>{setActive(getActiveElement(headingsRef.current.map(d=>d.getNode().getBoundingClientRect()),offset))};const initialize=()=>{const headings=getHeadingsData(Array.from(document.querySelectorAll(selector)),getDepth,getValue);headingsRef.current=headings;setInitialized(true);setData(headings);setActive(getActiveElement(headings.map(d=>d.getNode().getBoundingClientRect()),offset))};(0,index_js_.useEffect)(()=>{initialize();const _scrollHost=scrollHost||window;_scrollHost.addEventListener("scroll",handleScroll);return()=>_scrollHost.removeEventListener("scroll",handleScroll)},[scrollHost]);return{reinitialize:initialize,active,initialized,data}}"use client";const defaultOptions={multiple:true,accept:"*"};function getInitialFilesList(files){if(!files)return null;if(files instanceof FileList)return files;const result=new DataTransfer;for(const file of files)result.items.add(file);return result.files}function createInput(options){if("undefined"==typeof document)return null;const input=document.createElement("input");input.type="file";if(options.accept)input.accept=options.accept;if(options.multiple)input.multiple=options.multiple;if(options.capture)input.capture=options.capture;if(options.directory)input.webkitdirectory=options.directory;input.style.display="none";return input}function useFileDialog(input={}){const options={...defaultOptions,...input};const[files,setFiles]=(0,index_js_.useState)(getInitialFilesList(options.initialFiles));const inputRef=(0,index_js_.useRef)(null);const handleChange=(0,index_js_.useCallback)(event=>{const target=event.target;if(target?.files){setFiles(target.files);options.onChange?.(target.files)}},[options.onChange]);const createAndSetupInput=(0,index_js_.useCallback)(()=>{inputRef.current?.remove();inputRef.current=createInput(options);if(inputRef.current){inputRef.current.addEventListener("change",handleChange,{once:true});document.body.appendChild(inputRef.current)}},[options,handleChange]);useIsomorphicEffect(()=>{createAndSetupInput();return()=>inputRef.current?.remove()},[]);const reset=(0,index_js_.useCallback)(()=>{setFiles(null);options.onChange?.(null)},[options.onChange]);const open=(0,index_js_.useCallback)(()=>{if(options.resetOnOpen)reset();createAndSetupInput();inputRef.current?.click()},[options.resetOnOpen,reset,createAndSetupInput]);return{files,open,reset}}"use client";function useLongPress(onLongPress,options={}){const{threshold=400,onStart,onFinish,onCancel}=options;const isLongPressActive=(0,index_js_.useRef)(false);const isPressed=(0,index_js_.useRef)(false);const timeout=(0,index_js_.useRef)(-1);(0,index_js_.useEffect)(()=>()=>window.clearTimeout(timeout.current),[]);return(0,index_js_.useMemo)(()=>{if("function"!=typeof onLongPress)return{};const start=event=>{if(!isMouseEvent(event)&&!isTouchEvent(event))return;if(onStart)onStart(event);isPressed.current=true;timeout.current=window.setTimeout(()=>{onLongPress(event);isLongPressActive.current=true},threshold)};const cancel=event=>{if(!isMouseEvent(event)&&!isTouchEvent(event))return;if(isLongPressActive.current){if(onFinish)onFinish(event)}else if(isPressed.current){if(onCancel)onCancel(event)}isLongPressActive.current=false;isPressed.current=false;if(timeout.current)window.clearTimeout(timeout.current)};return{onMouseDown:start,onMouseUp:cancel,onMouseLeave:cancel,onTouchStart:start,onTouchEnd:cancel}},[onLongPress,threshold,onCancel,onFinish,onStart])}function isTouchEvent(event){return window.TouchEvent?event.nativeEvent instanceof TouchEvent:"touches"in event.nativeEvent}function isMouseEvent(event){return event.nativeEvent instanceof MouseEvent}"use client";function useSelection(input){const[selectionSet,setSelectionSet]=(0,index_js_.useState)(new Set(input.defaultSelection||[]));useDidUpdate(()=>{if(input.resetSelectionOnDataChange)setSelectionSet(/* @__PURE__ */new Set)},[input.data,input.resetSelectionOnDataChange]);const select=(0,index_js_.useCallback)(selected=>{setSelectionSet(state=>{if(!state.has(selected)){const newSet=new Set(state);newSet.add(selected);return newSet}return state})},[]);const deselect=(0,index_js_.useCallback)(deselected=>{setSelectionSet(state=>{if(state.has(deselected)){const newSet=new Set(state);newSet.delete(deselected);return newSet}return state})},[]);const toggle=(0,index_js_.useCallback)(toggled=>{setSelectionSet(state=>{const newSet=new Set(state);if(state.has(toggled))newSet.delete(toggled);else newSet.add(toggled);return newSet})},[]);const resetSelection=(0,index_js_.useCallback)(()=>{setSelectionSet(/* @__PURE__ */new Set)},[]);const setSelection=(0,index_js_.useCallback)(selection=>{setSelectionSet(new Set(selection))},[]);const isAllSelected=(0,index_js_.useCallback)(()=>{if(0===input.data.length)return false;return input.data.every(item=>selectionSet.has(item))},[selectionSet,input.data]);const isSomeSelected=(0,index_js_.useCallback)(()=>input.data.some(item=>selectionSet.has(item)),[selectionSet,input.data]);return[Array.from(selectionSet),{select,deselect,toggle,isAllSelected,isSomeSelected,setSelection,resetSelection}]}}}]);
@@ -1,5 +1,5 @@
1
- /*! For license information please see 622.js.LICENSE.txt */
2
- "use strict";(globalThis["chunk_integrations_app"]=globalThis["chunk_integrations_app"]||[]).push([["622"],{7015:function(__unused_webpack_module,exports,__webpack_require__){/**
1
+ /*! For license information please see 637.js.LICENSE.txt */
2
+ "use strict";(globalThis["chunk_integrations_app"]=globalThis["chunk_integrations_app"]||[]).push([["637"],{6545:function(module,__unused_webpack_exports,__webpack_require__){function checkDCE(){if("undefined"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__||"function"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)return;try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE)}catch(err){console.error(err)}}checkDCE();module.exports=__webpack_require__(6221)},6221:function(__unused_webpack_module,exports,__webpack_require__){/**
3
3
  * @license React
4
4
  * react-dom.production.js
5
5
  *
@@ -7,4 +7,4 @@
7
7
  *
8
8
  * This source code is licensed under the MIT license found in the
9
9
  * LICENSE file in the root directory of this source tree.
10
- */var React=__webpack_require__(9063);function formatProdErrorMessage(code){var url="https://react.dev/errors/"+code;if(1<arguments.length){url+="?args[]="+encodeURIComponent(arguments[1]);for(var i=2;i<arguments.length;i++)url+="&args[]="+encodeURIComponent(arguments[i])}return"Minified React error #"+code+"; visit "+url+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function noop(){}var Internals={d:{f:noop,r:function(){throw Error(formatProdErrorMessage(522))},D:noop,C:noop,L:noop,m:noop,X:noop,S:noop,M:noop},p:0,findDOMNode:null},REACT_PORTAL_TYPE=Symbol.for("react.portal");function createPortal$1(children,containerInfo,implementation){var key=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:REACT_PORTAL_TYPE,key:null==key?null:""+key,children:children,containerInfo:containerInfo,implementation:implementation}}var ReactSharedInternals=React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function getCrossOriginStringAs(as,input){if("font"===as)return"";if("string"==typeof input)return"use-credentials"===input?input:""}exports.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Internals;exports.createPortal=function(children,container){var key=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!container||1!==container.nodeType&&9!==container.nodeType&&11!==container.nodeType)throw Error(formatProdErrorMessage(299));return createPortal$1(children,container,null,key)};exports.flushSync=function(fn){var previousTransition=ReactSharedInternals.T,previousUpdatePriority=Internals.p;try{if(ReactSharedInternals.T=null,Internals.p=2,fn)return fn()}finally{ReactSharedInternals.T=previousTransition,Internals.p=previousUpdatePriority,Internals.d.f()}};exports.preconnect=function(href,options){"string"==typeof href&&(options?(options=options.crossOrigin,options="string"==typeof options?"use-credentials"===options?options:"":void 0):options=null,Internals.d.C(href,options))};exports.prefetchDNS=function(href){"string"==typeof href&&Internals.d.D(href)};exports.preinit=function(href,options){if("string"==typeof href&&options&&"string"==typeof options.as){var as=options.as,crossOrigin=getCrossOriginStringAs(as,options.crossOrigin),integrity="string"==typeof options.integrity?options.integrity:void 0,fetchPriority="string"==typeof options.fetchPriority?options.fetchPriority:void 0;"style"===as?Internals.d.S(href,"string"==typeof options.precedence?options.precedence:void 0,{crossOrigin:crossOrigin,integrity:integrity,fetchPriority:fetchPriority}):"script"===as&&Internals.d.X(href,{crossOrigin:crossOrigin,integrity:integrity,fetchPriority:fetchPriority,nonce:"string"==typeof options.nonce?options.nonce:void 0})}};exports.preinitModule=function(href,options){if("string"==typeof href)if("object"==typeof options&&null!==options){if(null==options.as||"script"===options.as){var crossOrigin=getCrossOriginStringAs(options.as,options.crossOrigin);Internals.d.M(href,{crossOrigin:crossOrigin,integrity:"string"==typeof options.integrity?options.integrity:void 0,nonce:"string"==typeof options.nonce?options.nonce:void 0})}}else null==options&&Internals.d.M(href)};exports.preload=function(href,options){if("string"==typeof href&&"object"==typeof options&&null!==options&&"string"==typeof options.as){var as=options.as,crossOrigin=getCrossOriginStringAs(as,options.crossOrigin);Internals.d.L(href,as,{crossOrigin:crossOrigin,integrity:"string"==typeof options.integrity?options.integrity:void 0,nonce:"string"==typeof options.nonce?options.nonce:void 0,type:"string"==typeof options.type?options.type:void 0,fetchPriority:"string"==typeof options.fetchPriority?options.fetchPriority:void 0,referrerPolicy:"string"==typeof options.referrerPolicy?options.referrerPolicy:void 0,imageSrcSet:"string"==typeof options.imageSrcSet?options.imageSrcSet:void 0,imageSizes:"string"==typeof options.imageSizes?options.imageSizes:void 0,media:"string"==typeof options.media?options.media:void 0})}};exports.preloadModule=function(href,options){if("string"==typeof href)if(options){var crossOrigin=getCrossOriginStringAs(options.as,options.crossOrigin);Internals.d.m(href,{as:"string"==typeof options.as&&"script"!==options.as?options.as:void 0,crossOrigin:crossOrigin,integrity:"string"==typeof options.integrity?options.integrity:void 0})}else Internals.d.m(href)};exports.requestFormReset=function(form){Internals.d.r(form)};exports.unstable_batchedUpdates=function(fn,a){return fn(a)};exports.useFormState=function(action,initialState,permalink){return ReactSharedInternals.H.useFormState(action,initialState,permalink)};exports.useFormStatus=function(){return ReactSharedInternals.H.useHostTransitionStatus()};exports.version="19.1.1"},5970:function(module,__unused_webpack_exports,__webpack_require__){function checkDCE(){if("undefined"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__||"function"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)return;try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE)}catch(err){console.error(err)}}checkDCE();module.exports=__webpack_require__(7015)}}]);
10
+ */var React=__webpack_require__(3620);function formatProdErrorMessage(code){var url="https://react.dev/errors/"+code;if(1<arguments.length){url+="?args[]="+encodeURIComponent(arguments[1]);for(var i=2;i<arguments.length;i++)url+="&args[]="+encodeURIComponent(arguments[i])}return"Minified React error #"+code+"; visit "+url+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function noop(){}var Internals={d:{f:noop,r:function(){throw Error(formatProdErrorMessage(522))},D:noop,C:noop,L:noop,m:noop,X:noop,S:noop,M:noop},p:0,findDOMNode:null},REACT_PORTAL_TYPE=Symbol.for("react.portal");function createPortal$1(children,containerInfo,implementation){var key=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:REACT_PORTAL_TYPE,key:null==key?null:""+key,children:children,containerInfo:containerInfo,implementation:implementation}}var ReactSharedInternals=React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function getCrossOriginStringAs(as,input){if("font"===as)return"";if("string"==typeof input)return"use-credentials"===input?input:""}exports.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Internals;exports.createPortal=function(children,container){var key=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!container||1!==container.nodeType&&9!==container.nodeType&&11!==container.nodeType)throw Error(formatProdErrorMessage(299));return createPortal$1(children,container,null,key)};exports.flushSync=function(fn){var previousTransition=ReactSharedInternals.T,previousUpdatePriority=Internals.p;try{if(ReactSharedInternals.T=null,Internals.p=2,fn)return fn()}finally{ReactSharedInternals.T=previousTransition,Internals.p=previousUpdatePriority,Internals.d.f()}};exports.preconnect=function(href,options){"string"==typeof href&&(options?(options=options.crossOrigin,options="string"==typeof options?"use-credentials"===options?options:"":void 0):options=null,Internals.d.C(href,options))};exports.prefetchDNS=function(href){"string"==typeof href&&Internals.d.D(href)};exports.preinit=function(href,options){if("string"==typeof href&&options&&"string"==typeof options.as){var as=options.as,crossOrigin=getCrossOriginStringAs(as,options.crossOrigin),integrity="string"==typeof options.integrity?options.integrity:void 0,fetchPriority="string"==typeof options.fetchPriority?options.fetchPriority:void 0;"style"===as?Internals.d.S(href,"string"==typeof options.precedence?options.precedence:void 0,{crossOrigin:crossOrigin,integrity:integrity,fetchPriority:fetchPriority}):"script"===as&&Internals.d.X(href,{crossOrigin:crossOrigin,integrity:integrity,fetchPriority:fetchPriority,nonce:"string"==typeof options.nonce?options.nonce:void 0})}};exports.preinitModule=function(href,options){if("string"==typeof href)if("object"==typeof options&&null!==options){if(null==options.as||"script"===options.as){var crossOrigin=getCrossOriginStringAs(options.as,options.crossOrigin);Internals.d.M(href,{crossOrigin:crossOrigin,integrity:"string"==typeof options.integrity?options.integrity:void 0,nonce:"string"==typeof options.nonce?options.nonce:void 0})}}else null==options&&Internals.d.M(href)};exports.preload=function(href,options){if("string"==typeof href&&"object"==typeof options&&null!==options&&"string"==typeof options.as){var as=options.as,crossOrigin=getCrossOriginStringAs(as,options.crossOrigin);Internals.d.L(href,as,{crossOrigin:crossOrigin,integrity:"string"==typeof options.integrity?options.integrity:void 0,nonce:"string"==typeof options.nonce?options.nonce:void 0,type:"string"==typeof options.type?options.type:void 0,fetchPriority:"string"==typeof options.fetchPriority?options.fetchPriority:void 0,referrerPolicy:"string"==typeof options.referrerPolicy?options.referrerPolicy:void 0,imageSrcSet:"string"==typeof options.imageSrcSet?options.imageSrcSet:void 0,imageSizes:"string"==typeof options.imageSizes?options.imageSizes:void 0,media:"string"==typeof options.media?options.media:void 0})}};exports.preloadModule=function(href,options){if("string"==typeof href)if(options){var crossOrigin=getCrossOriginStringAs(options.as,options.crossOrigin);Internals.d.m(href,{as:"string"==typeof options.as&&"script"!==options.as?options.as:void 0,crossOrigin:crossOrigin,integrity:"string"==typeof options.integrity?options.integrity:void 0})}else Internals.d.m(href)};exports.requestFormReset=function(form){Internals.d.r(form)};exports.unstable_batchedUpdates=function(fn,a){return fn(a)};exports.useFormState=function(action,initialState,permalink){return ReactSharedInternals.H.useFormState(action,initialState,permalink)};exports.useFormStatus=function(){return ReactSharedInternals.H.useHostTransitionStatus()};exports.version="19.2.0"}}]);
@@ -1,5 +1,5 @@
1
- /*! For license information please see 548.js.LICENSE.txt */
2
- "use strict";(globalThis["chunk_integrations_app"]=globalThis["chunk_integrations_app"]||[]).push([["548"],{631:function(__unused_webpack_module,exports){/**
1
+ /*! For license information please see 666.js.LICENSE.txt */
2
+ "use strict";(globalThis["chunk_integrations_app"]=globalThis["chunk_integrations_app"]||[]).push([["666"],{9698:function(__unused_webpack_module,exports){/**
3
3
  * @license React
4
4
  * react-jsx-runtime.production.js
5
5
  *
@@ -7,4 +7,4 @@
7
7
  *
8
8
  * This source code is licensed under the MIT license found in the
9
9
  * LICENSE file in the root directory of this source tree.
10
- */var REACT_ELEMENT_TYPE=Symbol.for("react.transitional.element"),REACT_FRAGMENT_TYPE=Symbol.for("react.fragment");function jsxProd(type,config,maybeKey){var key=null;void 0!==maybeKey&&(key=""+maybeKey);void 0!==config.key&&(key=""+config.key);if("key"in config){maybeKey={};for(var propName in config)"key"!==propName&&(maybeKey[propName]=config[propName])}else maybeKey=config;config=maybeKey.ref;return{$$typeof:REACT_ELEMENT_TYPE,type:type,key:key,ref:void 0!==config?config:null,props:maybeKey}}exports.Fragment=REACT_FRAGMENT_TYPE;exports.jsx=jsxProd;exports.jsxs=jsxProd},5893:function(module,__unused_webpack_exports,__webpack_require__){module.exports=__webpack_require__(631)},3308:function(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__){__webpack_require__.r(__webpack_exports__);__webpack_require__.d(__webpack_exports__,{updateContextModal:()=>events_updateContextModal,closeAllModals:()=>closeAllModals,updateModal:()=>events_updateModal,ModalsProvider:()=>ModalsProvider,openContextModal:()=>events_openContextModal,openConfirmModal:()=>events_openConfirmModal,closeModal:()=>events_closeModal,modals:()=>events_modals,openModal:()=>events_openModal,useModals:()=>useModals});var jsx_runtime=__webpack_require__(5893);var index_js_=__webpack_require__(9063);var index_mjs_=__webpack_require__(3215);var esm_index_mjs_=__webpack_require__(3828);"use client";const ModalsContext=(0,index_js_.createContext)(null);ModalsContext.displayName="@mantine/modals/ModalsContext";"use client";function useModals(){const ctx=(0,index_js_.useContext)(ModalsContext);if(!ctx)throw new Error("[@mantine/modals] useModals hook was called outside of context, wrap your app with ModalsProvider component");return ctx}"use client";function ConfirmModal({id,cancelProps,confirmProps,labels={cancel:"",confirm:""},closeOnConfirm=true,closeOnCancel=true,groupProps,onCancel,onConfirm,children}){const{cancel:cancelLabel,confirm:confirmLabel}=labels;const ctx=useModals();const handleCancel=event=>{"function"==typeof cancelProps?.onClick&&cancelProps?.onClick(event);"function"==typeof onCancel&&onCancel();closeOnCancel&&ctx.closeModal(id)};const handleConfirm=event=>{"function"==typeof confirmProps?.onClick&&confirmProps?.onClick(event);"function"==typeof onConfirm&&onConfirm();closeOnConfirm&&ctx.closeModal(id)};return/* @__PURE__ */(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[children&&/* @__PURE__ */(0,jsx_runtime.jsx)(index_mjs_.Box,{mb:"md",children}),/* @__PURE__ */(0,jsx_runtime.jsxs)(index_mjs_.Group,{mt:children?0:"md",justify:"flex-end",...groupProps,children:[/* @__PURE__ */(0,jsx_runtime.jsx)(index_mjs_.Button,{variant:"default",...cancelProps,onClick:handleCancel,children:cancelProps?.children||cancelLabel}),/* @__PURE__ */(0,jsx_runtime.jsx)(index_mjs_.Button,{...confirmProps,onClick:handleConfirm,children:confirmProps?.children||confirmLabel})]})]})}"use client";const[useModalsEvents,createEvent]=(0,index_mjs_.createUseExternalEvents)("mantine-modals");const events_openModal=payload=>{const id=payload.modalId||(0,esm_index_mjs_.randomId)();createEvent("openModal")({...payload,modalId:id});return id};const events_openConfirmModal=payload=>{const id=payload.modalId||(0,esm_index_mjs_.randomId)();createEvent("openConfirmModal")({...payload,modalId:id});return id};const events_openContextModal=payload=>{const id=payload.modalId||(0,esm_index_mjs_.randomId)();createEvent("openContextModal")({...payload,modalId:id});return id};const events_closeModal=createEvent("closeModal");const closeAllModals=createEvent("closeAllModals");const events_updateModal=payload=>createEvent("updateModal")(payload);const events_updateContextModal=payload=>createEvent("updateContextModal")(payload);const events_modals={open:events_openModal,close:events_closeModal,closeAll:closeAllModals,openConfirmModal:events_openConfirmModal,openContextModal:events_openContextModal,updateModal:events_updateModal,updateContextModal:events_updateContextModal};"use client";function handleCloseModal(modal,canceled){if(canceled&&"confirm"===modal.type)modal.props.onCancel?.();modal.props.onClose?.()}function modalsReducer(state,action){switch(action.type){case"OPEN":return{current:action.modal,modals:[...state.modals,action.modal]};case"CLOSE":{const modal=state.modals.find(m=>m.id===action.modalId);if(!modal)return state;handleCloseModal(modal,action.canceled);const remainingModals=state.modals.filter(m=>m.id!==action.modalId);return{current:remainingModals[remainingModals.length-1]||state.current,modals:remainingModals}}case"CLOSE_ALL":if(!state.modals.length)return state;state.modals.concat().reverse().forEach(modal=>{handleCloseModal(modal,action.canceled)});return{current:state.current,modals:[]};case"UPDATE":{const{modalId,newProps}=action;const updatedModals=state.modals.map(modal=>{if(modal.id!==modalId)return modal;if("content"===modal.type||"confirm"===modal.type)return{...modal,props:{...modal.props,...newProps}};if("context"===modal.type)return{...modal,props:{...modal.props,...newProps,innerProps:{...modal.props.innerProps,...newProps.innerProps}}};return modal});const currentModal=state.current?.id===modalId?updatedModals.find(modal=>modal.id===modalId)||state.current:state.current;return{...state,modals:updatedModals,current:currentModal}}default:return state}}"use client";function separateConfirmModalProps(props){if(!props)return{confirmProps:{},modalProps:{}};const{id,children,onCancel,onConfirm,closeOnConfirm,closeOnCancel,cancelProps,confirmProps,groupProps,labels,...others}=props;return{confirmProps:{id,children,onCancel,onConfirm,closeOnConfirm,closeOnCancel,cancelProps,confirmProps,groupProps,labels},modalProps:{id,...others}}}function ModalsProvider({children,modalProps,labels,modals}){const[state,dispatch]=(0,index_js_.useReducer)(modalsReducer,{modals:[],current:null});const stateRef=(0,index_js_.useRef)(state);stateRef.current=state;const closeAll=(0,index_js_.useCallback)(canceled=>{dispatch({type:"CLOSE_ALL",canceled})},[stateRef,dispatch]);const openModal=(0,index_js_.useCallback)(({modalId,...props})=>{const id=modalId||(0,esm_index_mjs_.randomId)();dispatch({type:"OPEN",modal:{id,type:"content",props}});return id},[dispatch]);const openConfirmModal=(0,index_js_.useCallback)(({modalId,...props})=>{const id=modalId||(0,esm_index_mjs_.randomId)();dispatch({type:"OPEN",modal:{id,type:"confirm",props}});return id},[dispatch]);const openContextModal=(0,index_js_.useCallback)((modal,{modalId,...props})=>{const id=modalId||(0,esm_index_mjs_.randomId)();dispatch({type:"OPEN",modal:{id,type:"context",props,ctx:modal}});return id},[dispatch]);const closeModal=(0,index_js_.useCallback)((id,canceled)=>{dispatch({type:"CLOSE",modalId:id,canceled})},[stateRef,dispatch]);const updateModal=(0,index_js_.useCallback)(({modalId,...newProps})=>{dispatch({type:"UPDATE",modalId,newProps})},[dispatch]);const updateContextModal=(0,index_js_.useCallback)(({modalId,...newProps})=>{dispatch({type:"UPDATE",modalId,newProps})},[dispatch]);useModalsEvents({openModal,openConfirmModal,openContextModal:({modal,...payload})=>openContextModal(modal,payload),closeModal,closeContextModal:closeModal,closeAllModals:closeAll,updateModal,updateContextModal});const ctx={modalProps:modalProps||{},modals:state.modals,openModal,openConfirmModal,openContextModal,closeModal,closeContextModal:closeModal,closeAll,updateModal,updateContextModal};const getCurrentModal=()=>{const currentModal=stateRef.current.current;switch(currentModal?.type){case"context":{const{innerProps,...rest}=currentModal.props;const ContextModal=modals[currentModal.ctx];return{modalProps:rest,content:/* @__PURE__ */(0,jsx_runtime.jsx)(ContextModal,{innerProps,context:ctx,id:currentModal.id})}}case"confirm":{const{modalProps:separatedModalProps,confirmProps:separatedConfirmProps}=separateConfirmModalProps(currentModal.props);return{modalProps:separatedModalProps,content:/* @__PURE__ */(0,jsx_runtime.jsx)(ConfirmModal,{...separatedConfirmProps,id:currentModal.id,labels:currentModal.props.labels||labels})}}case"content":{const{children:currentModalChildren,...rest}=currentModal.props;return{modalProps:rest,content:currentModalChildren}}default:return{modalProps:{},content:null}}};const{modalProps:currentModalProps,content}=getCurrentModal();return/* @__PURE__ */(0,jsx_runtime.jsxs)(ModalsContext.Provider,{value:ctx,children:[/* @__PURE__ */(0,jsx_runtime.jsx)(index_mjs_.Modal,{zIndex:(0,index_mjs_.getDefaultZIndex)("modal")+1,...modalProps,...currentModalProps,opened:state.modals.length>0,onClose:()=>closeModal(state.current?.id),children:content}),children]})}}}]);
10
+ */var REACT_ELEMENT_TYPE=Symbol.for("react.transitional.element"),REACT_FRAGMENT_TYPE=Symbol.for("react.fragment");function jsxProd(type,config,maybeKey){var key=null;void 0!==maybeKey&&(key=""+maybeKey);void 0!==config.key&&(key=""+config.key);if("key"in config){maybeKey={};for(var propName in config)"key"!==propName&&(maybeKey[propName]=config[propName])}else maybeKey=config;config=maybeKey.ref;return{$$typeof:REACT_ELEMENT_TYPE,type:type,key:key,ref:void 0!==config?config:null,props:maybeKey}}exports.Fragment=REACT_FRAGMENT_TYPE;exports.jsx=jsxProd;exports.jsxs=jsxProd},4848:function(module,__unused_webpack_exports,__webpack_require__){module.exports=__webpack_require__(9698)},2004:function(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__){__webpack_require__.r(__webpack_exports__);__webpack_require__.d(__webpack_exports__,{updateContextModal:()=>events_updateContextModal,closeAllModals:()=>closeAllModals,updateModal:()=>events_updateModal,ModalsProvider:()=>ModalsProvider,openContextModal:()=>events_openContextModal,openConfirmModal:()=>events_openConfirmModal,closeModal:()=>events_closeModal,modals:()=>events_modals,openModal:()=>events_openModal,useModals:()=>useModals});var jsx_runtime=__webpack_require__(4848);var index_js_=__webpack_require__(3620);var index_mjs_=__webpack_require__(9389);var esm_index_mjs_=__webpack_require__(207);"use client";const ModalsContext=(0,index_js_.createContext)(null);ModalsContext.displayName="@mantine/modals/ModalsContext";"use client";function useModals(){const ctx=(0,index_js_.useContext)(ModalsContext);if(!ctx)throw new Error("[@mantine/modals] useModals hook was called outside of context, wrap your app with ModalsProvider component");return ctx}"use client";function ConfirmModal({id,cancelProps,confirmProps,labels={cancel:"",confirm:""},closeOnConfirm=true,closeOnCancel=true,groupProps,onCancel,onConfirm,children}){const{cancel:cancelLabel,confirm:confirmLabel}=labels;const ctx=useModals();const handleCancel=event=>{"function"==typeof cancelProps?.onClick&&cancelProps?.onClick(event);"function"==typeof onCancel&&onCancel();closeOnCancel&&ctx.closeModal(id)};const handleConfirm=event=>{"function"==typeof confirmProps?.onClick&&confirmProps?.onClick(event);"function"==typeof onConfirm&&onConfirm();closeOnConfirm&&ctx.closeModal(id)};return/* @__PURE__ */(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[children&&/* @__PURE__ */(0,jsx_runtime.jsx)(index_mjs_.Box,{mb:"md",children}),/* @__PURE__ */(0,jsx_runtime.jsxs)(index_mjs_.Group,{mt:children?0:"md",justify:"flex-end",...groupProps,children:[/* @__PURE__ */(0,jsx_runtime.jsx)(index_mjs_.Button,{variant:"default",...cancelProps,onClick:handleCancel,children:cancelProps?.children||cancelLabel}),/* @__PURE__ */(0,jsx_runtime.jsx)(index_mjs_.Button,{...confirmProps,onClick:handleConfirm,children:confirmProps?.children||confirmLabel})]})]})}"use client";const[useModalsEvents,createEvent]=(0,index_mjs_.createUseExternalEvents)("mantine-modals");const events_openModal=payload=>{const id=payload.modalId||(0,esm_index_mjs_.randomId)();createEvent("openModal")({...payload,modalId:id});return id};const events_openConfirmModal=payload=>{const id=payload.modalId||(0,esm_index_mjs_.randomId)();createEvent("openConfirmModal")({...payload,modalId:id});return id};const events_openContextModal=payload=>{const id=payload.modalId||(0,esm_index_mjs_.randomId)();createEvent("openContextModal")({...payload,modalId:id});return id};const events_closeModal=createEvent("closeModal");const closeAllModals=createEvent("closeAllModals");const events_updateModal=payload=>createEvent("updateModal")(payload);const events_updateContextModal=payload=>createEvent("updateContextModal")(payload);const events_modals={open:events_openModal,close:events_closeModal,closeAll:closeAllModals,openConfirmModal:events_openConfirmModal,openContextModal:events_openContextModal,updateModal:events_updateModal,updateContextModal:events_updateContextModal};"use client";function handleCloseModal(modal,canceled){if(canceled&&"confirm"===modal.type)modal.props.onCancel?.();modal.props.onClose?.()}function modalsReducer(state,action){switch(action.type){case"OPEN":return{current:action.modal,modals:[...state.modals,action.modal]};case"CLOSE":{const modal=state.modals.find(m=>m.id===action.modalId);if(!modal)return state;handleCloseModal(modal,action.canceled);const remainingModals=state.modals.filter(m=>m.id!==action.modalId);return{current:remainingModals[remainingModals.length-1]||state.current,modals:remainingModals}}case"CLOSE_ALL":if(!state.modals.length)return state;state.modals.concat().reverse().forEach(modal=>{handleCloseModal(modal,action.canceled)});return{current:state.current,modals:[]};case"UPDATE":{const{modalId,newProps}=action;const updatedModals=state.modals.map(modal=>{if(modal.id!==modalId)return modal;if("content"===modal.type||"confirm"===modal.type)return{...modal,props:{...modal.props,...newProps}};if("context"===modal.type)return{...modal,props:{...modal.props,...newProps,innerProps:{...modal.props.innerProps,...newProps.innerProps}}};return modal});const currentModal=state.current?.id===modalId?updatedModals.find(modal=>modal.id===modalId)||state.current:state.current;return{...state,modals:updatedModals,current:currentModal}}default:return state}}"use client";function separateConfirmModalProps(props){if(!props)return{confirmProps:{},modalProps:{}};const{id,children,onCancel,onConfirm,closeOnConfirm,closeOnCancel,cancelProps,confirmProps,groupProps,labels,...others}=props;return{confirmProps:{id,children,onCancel,onConfirm,closeOnConfirm,closeOnCancel,cancelProps,confirmProps,groupProps,labels},modalProps:{id,...others}}}function ModalsProvider({children,modalProps,labels,modals}){const[state,dispatch]=(0,index_js_.useReducer)(modalsReducer,{modals:[],current:null});const stateRef=(0,index_js_.useRef)(state);stateRef.current=state;const closeAll=(0,index_js_.useCallback)(canceled=>{dispatch({type:"CLOSE_ALL",canceled})},[stateRef,dispatch]);const openModal=(0,index_js_.useCallback)(({modalId,...props})=>{const id=modalId||(0,esm_index_mjs_.randomId)();dispatch({type:"OPEN",modal:{id,type:"content",props}});return id},[dispatch]);const openConfirmModal=(0,index_js_.useCallback)(({modalId,...props})=>{const id=modalId||(0,esm_index_mjs_.randomId)();dispatch({type:"OPEN",modal:{id,type:"confirm",props}});return id},[dispatch]);const openContextModal=(0,index_js_.useCallback)((modal,{modalId,...props})=>{const id=modalId||(0,esm_index_mjs_.randomId)();dispatch({type:"OPEN",modal:{id,type:"context",props,ctx:modal}});return id},[dispatch]);const closeModal=(0,index_js_.useCallback)((id,canceled)=>{dispatch({type:"CLOSE",modalId:id,canceled})},[stateRef,dispatch]);const updateModal=(0,index_js_.useCallback)(({modalId,...newProps})=>{dispatch({type:"UPDATE",modalId,newProps})},[dispatch]);const updateContextModal=(0,index_js_.useCallback)(({modalId,...newProps})=>{dispatch({type:"UPDATE",modalId,newProps})},[dispatch]);useModalsEvents({openModal,openConfirmModal,openContextModal:({modal,...payload})=>openContextModal(modal,payload),closeModal,closeContextModal:closeModal,closeAllModals:closeAll,updateModal,updateContextModal});const ctx={modalProps:modalProps||{},modals:state.modals,openModal,openConfirmModal,openContextModal,closeModal,closeContextModal:closeModal,closeAll,updateModal,updateContextModal};const getCurrentModal=()=>{const currentModal=stateRef.current.current;switch(currentModal?.type){case"context":{const{innerProps,...rest}=currentModal.props;const ContextModal=modals[currentModal.ctx];return{modalProps:rest,content:/* @__PURE__ */(0,jsx_runtime.jsx)(ContextModal,{innerProps,context:ctx,id:currentModal.id})}}case"confirm":{const{modalProps:separatedModalProps,confirmProps:separatedConfirmProps}=separateConfirmModalProps(currentModal.props);return{modalProps:separatedModalProps,content:/* @__PURE__ */(0,jsx_runtime.jsx)(ConfirmModal,{...separatedConfirmProps,id:currentModal.id,labels:currentModal.props.labels||labels})}}case"content":{const{children:currentModalChildren,...rest}=currentModal.props;return{modalProps:rest,content:currentModalChildren}}default:return{modalProps:{},content:null}}};const{modalProps:currentModalProps,content}=getCurrentModal();return/* @__PURE__ */(0,jsx_runtime.jsxs)(ModalsContext.Provider,{value:ctx,children:[/* @__PURE__ */(0,jsx_runtime.jsx)(index_mjs_.Modal,{zIndex:(0,index_mjs_.getDefaultZIndex)("modal")+1,...modalProps,...currentModalProps,opened:state.modals.length>0,onClose:()=>closeModal(state.current?.id),children:content}),children]})}}}]);