@worldresources/wri-design-systems 2.154.0 → 2.154.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +91 -80
- package/dist/index.esm.js +87 -76
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -2407,7 +2407,18 @@ PERFORMANCE OF THIS SOFTWARE.
|
|
|
2407
2407
|
* focus-trap 6.9.4
|
|
2408
2408
|
* @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
|
|
2409
2409
|
*/
|
|
2410
|
-
function Ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Xd(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ud(Object(n),!0).forEach((function(t){Yd(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ud(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Yd(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Kd,Jd=(Kd=[],{activateTrap:function(e){if(Kd.length>0){var t=Kd[Kd.length-1];t!==e&&t.pause()}var n=Kd.indexOf(e);-1===n||Kd.splice(n,1),Kd.push(e)},deactivateTrap:function(e){var t=Kd.indexOf(e);-1!==t&&Kd.splice(t,1),Kd.length>0&&Kd[Kd.length-1].unpause()}}),Qd=function(e){return setTimeout(e,0)},ep=function(e,t){var n=-1;return e.every((function(e,r){return!t(e)||(n=r,!1)})),n},tp=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return"function"==typeof e?e.apply(void 0,n):e},np=function(e){return e.target.shadowRoot&&"function"==typeof e.composedPath?e.composedPath()[0]:e.target},rp=function(e,t){var n,r=(null==t?void 0:t.document)||document,o=Xd({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0},t),i={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0},a=function(e,t,n){return e&&void 0!==e[t]?e[t]:o[n||t]},s=function(e){return i.containerGroups.findIndex((function(t){var n=t.container,r=t.tabbableNodes;return n.contains(e)||r.find((function(t){return t===e}))}))},l=function(e){var t=o[e];if("function"==typeof t){for(var n=arguments.length,i=new Array(n>1?n-1:0),a=1;a<n;a++)i[a-1]=arguments[a];t=t.apply(void 0,i)}if(!0===t&&(t=void 0),!t){if(void 0===t||!1===t)return t;throw new Error("`".concat(e,"` was specified but was not a node, or did not return a node"))}var s=t;if("string"==typeof t&&!(s=r.querySelector(t)))throw new Error("`".concat(e,"` as selector refers to no known node"));return s},c=function(){var e=l("initialFocus");if(!1===e)return!1;if(void 0===e)if(s(r.activeElement)>=0)e=r.activeElement;else{var t=i.tabbableGroups[0];e=t&&t.firstTabbableNode||l("fallbackFocus")}if(!e)throw new Error("Your focus-trap needs to have at least one focusable element");return e},u=function(){if(i.containerGroups=i.containers.map((function(e){var t,n,r=Zd(e,o.tabbableOptions),i=(t=e,(n=(n=o.tabbableOptions)||{}).getShadowRoot?_d([t],n.includeContainer,{filter:zd.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):Md(t,n.includeContainer,zd.bind(null,n)));return{container:e,tabbableNodes:r,focusableNodes:i,firstTabbableNode:r.length>0?r[0]:null,lastTabbableNode:r.length>0?r[r.length-1]:null,nextTabbableNode:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=i.findIndex((function(t){return t===e}));if(!(n<0))return t?i.slice(n+1).find((function(e){return Wd(e,o.tabbableOptions)})):i.slice(0,n).reverse().find((function(e){return Wd(e,o.tabbableOptions)}))}}})),i.tabbableGroups=i.containerGroups.filter((function(e){return e.tabbableNodes.length>0})),i.tabbableGroups.length<=0&&!l("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times")},d=function e(t){!1!==t&&t!==r.activeElement&&(t&&t.focus?(t.focus({preventScroll:!!o.preventScroll}),i.mostRecentlyFocusedNode=t,function(e){return e.tagName&&"input"===e.tagName.toLowerCase()&&"function"==typeof e.select}(t)&&t.select()):e(c()))},p=function(e){var t=l("setReturnFocus",e);return t||!1!==t&&e},h=function(e){var t=np(e);s(t)>=0||(tp(o.clickOutsideDeactivates,e)?n.deactivate({returnFocus:o.returnFocusOnDeactivate&&!qd(t,o.tabbableOptions)}):tp(o.allowOutsideClick,e)||e.preventDefault())},f=function(e){var t=np(e),n=s(t)>=0;n||t instanceof Document?n&&(i.mostRecentlyFocusedNode=t):(e.stopImmediatePropagation(),d(i.mostRecentlyFocusedNode||c()))},x=function(e){if(function(e){return"Escape"===e.key||"Esc"===e.key||27===e.keyCode}(e)&&!1!==tp(o.escapeDeactivates,e))return e.preventDefault(),void n.deactivate();(function(e){return"Tab"===e.key||9===e.keyCode})(e)&&function(e){var t=np(e);u();var n=null;if(i.tabbableGroups.length>0){var r=s(t),a=r>=0?i.containerGroups[r]:void 0;if(r<0)n=e.shiftKey?i.tabbableGroups[i.tabbableGroups.length-1].lastTabbableNode:i.tabbableGroups[0].firstTabbableNode;else if(e.shiftKey){var c=ep(i.tabbableGroups,(function(e){var n=e.firstTabbableNode;return t===n}));if(c<0&&(a.container===t||qd(t,o.tabbableOptions)&&!Wd(t,o.tabbableOptions)&&!a.nextTabbableNode(t,!1))&&(c=r),c>=0){var p=0===c?i.tabbableGroups.length-1:c-1;n=i.tabbableGroups[p].lastTabbableNode}}else{var h=ep(i.tabbableGroups,(function(e){var n=e.lastTabbableNode;return t===n}));if(h<0&&(a.container===t||qd(t,o.tabbableOptions)&&!Wd(t,o.tabbableOptions)&&!a.nextTabbableNode(t))&&(h=r),h>=0){var f=h===i.tabbableGroups.length-1?0:h+1;n=i.tabbableGroups[f].firstTabbableNode}}}else n=l("fallbackFocus");n&&(e.preventDefault(),d(n))}(e)},g=function(e){var t=np(e);s(t)>=0||tp(o.clickOutsideDeactivates,e)||tp(o.allowOutsideClick,e)||(e.preventDefault(),e.stopImmediatePropagation())},v=function(){if(i.active)return Jd.activateTrap(n),i.delayInitialFocusTimer=o.delayInitialFocus?Qd((function(){d(c())})):d(c()),r.addEventListener("focusin",f,!0),r.addEventListener("mousedown",h,{capture:!0,passive:!1}),r.addEventListener("touchstart",h,{capture:!0,passive:!1}),r.addEventListener("click",g,{capture:!0,passive:!1}),r.addEventListener("keydown",x,{capture:!0,passive:!1}),n},m=function(){if(i.active)return r.removeEventListener("focusin",f,!0),r.removeEventListener("mousedown",h,!0),r.removeEventListener("touchstart",h,!0),r.removeEventListener("click",g,!0),r.removeEventListener("keydown",x,!0),n};return(n={get active(){return i.active},get paused(){return i.paused},activate:function(e){if(i.active)return this;var t=a(e,"onActivate"),n=a(e,"onPostActivate"),o=a(e,"checkCanFocusTrap");o||u(),i.active=!0,i.paused=!1,i.nodeFocusedBeforeActivation=r.activeElement,t&&t();var s=function(){o&&u(),v(),n&&n()};return o?(o(i.containers.concat()).then(s,s),this):(s(),this)},deactivate:function(e){if(!i.active)return this;var t=Xd({onDeactivate:o.onDeactivate,onPostDeactivate:o.onPostDeactivate,checkCanReturnFocus:o.checkCanReturnFocus},e);clearTimeout(i.delayInitialFocusTimer),i.delayInitialFocusTimer=void 0,m(),i.active=!1,i.paused=!1,Jd.deactivateTrap(n);var r=a(t,"onDeactivate"),s=a(t,"onPostDeactivate"),l=a(t,"checkCanReturnFocus"),c=a(t,"returnFocus","returnFocusOnDeactivate");r&&r();var u=function(){Qd((function(){c&&d(p(i.nodeFocusedBeforeActivation)),s&&s()}))};return c&&l?(l(p(i.nodeFocusedBeforeActivation)).then(u,u),this):(u(),this)},pause:function(){return i.paused||!i.active||(i.paused=!0,m()),this},unpause:function(){return i.paused&&i.active?(i.paused=!1,u(),v(),this):this},updateContainerElements:function(e){var t=[].concat(e).filter(Boolean);return i.containers=t.map((function(e){return"string"==typeof e?r.querySelector(e):e})),i.active&&u(),this}}).updateContainerElements(e),n};var op=!1;if("undefined"!=typeof window){var ip={get passive(){op=!0}};window.addEventListener("testPassive",null,ip),window.removeEventListener("testPassive",null,ip)}var ap,sp="undefined"!=typeof window&&window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||"MacIntel"===window.navigator.platform&&window.navigator.maxTouchPoints>1),lp=[],cp=!1,up=-1,dp=void 0,pp=void 0,hp=function(e){return lp.some((function(t){return!(!t.options.allowTouchMove||!t.options.allowTouchMove(e))}))},fp=function(e){var t=e||window.event;return!!hp(t.target)||(t.touches.length>1||(t.preventDefault&&t.preventDefault(),!1))},xp=function(e,t){if(e){if(!lp.some((function(t){return t.targetElement===e}))){var n={targetElement:e,options:t||{}};lp=[].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(lp),[n]),sp?(e.ontouchstart=function(e){1===e.targetTouches.length&&(up=e.targetTouches[0].clientY)},e.ontouchmove=function(t){1===t.targetTouches.length&&function(e,t){var n=e.targetTouches[0].clientY-up;!hp(e.target)&&(t&&0===t.scrollTop&&n>0||function(e){return!!e&&e.scrollHeight-e.scrollTop<=e.clientHeight}(t)&&n<0?fp(e):e.stopPropagation())}(t,e)},cp||(document.addEventListener("touchmove",fp,op?{passive:!1}:void 0),cp=!0)):function(e){if(void 0===pp){var t=!!e&&!0===e.reserveScrollBarGap,n=window.innerWidth-document.documentElement.clientWidth;t&&n>0&&(pp=document.body.style.paddingRight,document.body.style.paddingRight=n+"px")}void 0===dp&&(dp=document.body.style.overflow,document.body.style.overflow="hidden")}(t)}}else console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.")},gp=function(e){e?(lp=lp.filter((function(t){return t.targetElement!==e})),sp?(e.ontouchstart=null,e.ontouchmove=null,cp&&0===lp.length&&(document.removeEventListener("touchmove",fp,op?{passive:!1}:void 0),cp=!1)):lp.length||(void 0!==pp&&(document.body.style.paddingRight=pp,pp=void 0),void 0!==dp&&(document.body.style.overflow=dp,dp=void 0))):console.error("enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.")},vp=[],mp="ResizeObserver loop completed with undelivered notifications.";!function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"}(ap||(ap={}));var bp,yp=function(e){return Object.freeze(e)},wp=function(e,t){this.inlineSize=e,this.blockSize=t,yp(this)},Cp=function(){function e(e,t,n,r){return this.x=e,this.y=t,this.width=n,this.height=r,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,yp(this)}return e.prototype.toJSON=function(){var e=this;return{x:e.x,y:e.y,top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:e.width,height:e.height}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e}(),jp=function(e){return e instanceof SVGElement&&"getBBox"in e},kp=function(e){if(jp(e)){var t=e.getBBox(),n=t.width,r=t.height;return!n&&!r}var o=e,i=o.offsetWidth,a=o.offsetHeight;return!(i||a||e.getClientRects().length)},$p=function(e){var t;if(e instanceof Element)return!0;var n=null===(t=null==e?void 0:e.ownerDocument)||void 0===t?void 0:t.defaultView;return!!(n&&e instanceof n.Element)},Sp="undefined"!=typeof window?window:{},Ep=new WeakMap,Rp=/auto|scroll/,Op=/^tb|vertical/,Lp=/msie|trident/i.test(Sp.navigator&&Sp.navigator.userAgent),Tp=function(e){return parseFloat(e||"0")},Pp=function(e,t,n){return void 0===e&&(e=0),void 0===t&&(t=0),void 0===n&&(n=!1),new wp((n?t:e)||0,(n?e:t)||0)},Mp=yp({devicePixelContentBoxSize:Pp(),borderBoxSize:Pp(),contentBoxSize:Pp(),contentRect:new Cp(0,0,0,0)}),_p=function(e,t){if(void 0===t&&(t=!1),Ep.has(e)&&!t)return Ep.get(e);if(kp(e))return Ep.set(e,Mp),Mp;var n=getComputedStyle(e),r=jp(e)&&e.ownerSVGElement&&e.getBBox(),o=!Lp&&"border-box"===n.boxSizing,i=Op.test(n.writingMode||""),a=!r&&Rp.test(n.overflowY||""),s=!r&&Rp.test(n.overflowX||""),l=r?0:Tp(n.paddingTop),c=r?0:Tp(n.paddingRight),u=r?0:Tp(n.paddingBottom),d=r?0:Tp(n.paddingLeft),p=r?0:Tp(n.borderTopWidth),h=r?0:Tp(n.borderRightWidth),f=r?0:Tp(n.borderBottomWidth),x=d+c,g=l+u,v=(r?0:Tp(n.borderLeftWidth))+h,m=p+f,b=s?e.offsetHeight-m-e.clientHeight:0,y=a?e.offsetWidth-v-e.clientWidth:0,w=o?x+v:0,C=o?g+m:0,j=r?r.width:Tp(n.width)-w-y,k=r?r.height:Tp(n.height)-C-b,$=j+x+y+v,S=k+g+b+m,E=yp({devicePixelContentBoxSize:Pp(Math.round(j*devicePixelRatio),Math.round(k*devicePixelRatio),i),borderBoxSize:Pp($,S,i),contentBoxSize:Pp(j,k,i),contentRect:new Cp(d,l,j,k)});return Ep.set(e,E),E},Dp=function(e,t,n){var r=_p(e,n),o=r.borderBoxSize,i=r.contentBoxSize,a=r.devicePixelContentBoxSize;switch(t){case ap.DEVICE_PIXEL_CONTENT_BOX:return a;case ap.BORDER_BOX:return o;default:return i}},Ip=function(e){var t=_p(e);this.target=e,this.contentRect=t.contentRect,this.borderBoxSize=yp([t.borderBoxSize]),this.contentBoxSize=yp([t.contentBoxSize]),this.devicePixelContentBoxSize=yp([t.devicePixelContentBoxSize])},Vp=function(e){if(kp(e))return 1/0;for(var t=0,n=e.parentNode;n;)t+=1,n=n.parentNode;return t},Np=function(){var e=1/0,t=[];vp.forEach((function(n){if(0!==n.activeTargets.length){var r=[];n.activeTargets.forEach((function(t){var n=new Ip(t.target),o=Vp(t.target);r.push(n),t.lastReportedSize=Dp(t.target,t.observedBox),o<e&&(e=o)})),t.push((function(){n.callback.call(n.observer,r,n.observer)})),n.activeTargets.splice(0,n.activeTargets.length)}}));for(var n=0,r=t;n<r.length;n++){(0,r[n])()}return e},Ap=function(e){vp.forEach((function(t){t.activeTargets.splice(0,t.activeTargets.length),t.skippedTargets.splice(0,t.skippedTargets.length),t.observationTargets.forEach((function(n){n.isActive()&&(Vp(n.target)>e?t.activeTargets.push(n):t.skippedTargets.push(n))}))}))},zp=function(){var e=0;for(Ap(e);vp.some((function(e){return e.activeTargets.length>0}));)e=Np(),Ap(e);return vp.some((function(e){return e.skippedTargets.length>0}))&&function(){var e;"function"==typeof ErrorEvent?e=new ErrorEvent("error",{message:mp}):((e=document.createEvent("Event")).initEvent("error",!1,!1),e.message=mp),window.dispatchEvent(e)}(),e>0},Bp=[],Hp=function(e){if(!bp){var t=0,n=document.createTextNode("");new MutationObserver((function(){return Bp.splice(0).forEach((function(e){return e()}))})).observe(n,{characterData:!0}),bp=function(){n.textContent="".concat(t?t--:t++)}}Bp.push(e),bp()},Fp=0,Zp={attributes:!0,characterData:!0,childList:!0,subtree:!0},Wp=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],Gp=function(e){return void 0===e&&(e=0),Date.now()+e},qp=!1,Up=new(function(){function e(){var e=this;this.stopped=!0,this.listener=function(){return e.schedule()}}return e.prototype.run=function(e){var t=this;if(void 0===e&&(e=250),!qp){qp=!0;var n,r=Gp(e);n=function(){var n=!1;try{n=zp()}finally{if(qp=!1,e=r-Gp(),!Fp)return;n?t.run(1e3):e>0?t.run(e):t.start()}},Hp((function(){requestAnimationFrame(n)}))}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var e=this,t=function(){return e.observer&&e.observer.observe(document.body,Zp)};document.body?t():Sp.addEventListener("DOMContentLoaded",t)},e.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),Wp.forEach((function(t){return Sp.addEventListener(t,e.listener,!0)})))},e.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),Wp.forEach((function(t){return Sp.removeEventListener(t,e.listener,!0)})),this.stopped=!0)},e}()),Xp=function(e){!Fp&&e>0&&Up.start(),!(Fp+=e)&&Up.stop()},Yp=function(){function e(e,t){this.target=e,this.observedBox=t||ap.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var e=Dp(this.target,this.observedBox,!0);return function(e){return!jp(e)&&!function(e){switch(e.tagName){case"INPUT":if("image"!==e.type)break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1}(e)&&"inline"===getComputedStyle(e).display}(this.target)&&(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},e}(),Kp=function(e,t){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=t},Jp=new WeakMap,Qp=function(e,t){for(var n=0;n<e.length;n+=1)if(e[n].target===t)return n;return-1},eh=function(){function e(){}return e.connect=function(e,t){var n=new Kp(e,t);Jp.set(e,n)},e.observe=function(e,t,n){var r=Jp.get(e),o=0===r.observationTargets.length;Qp(r.observationTargets,t)<0&&(o&&vp.push(r),r.observationTargets.push(new Yp(t,n&&n.box)),Xp(1),Up.schedule())},e.unobserve=function(e,t){var n=Jp.get(e),r=Qp(n.observationTargets,t),o=1===n.observationTargets.length;r>=0&&(o&&vp.splice(vp.indexOf(n),1),n.observationTargets.splice(r,1),Xp(-1))},e.disconnect=function(e){var t=this,n=Jp.get(e);n.observationTargets.slice().forEach((function(n){return t.unobserve(e,n.target)})),n.activeTargets.splice(0,n.activeTargets.length)},e}(),th=function(){function e(e){if(0===arguments.length)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if("function"!=typeof e)throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");eh.connect(this,e)}return e.prototype.observe=function(e,t){if(0===arguments.length)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!$p(e))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");eh.observe(this,e,t)},e.prototype.unobserve=function(e){if(0===arguments.length)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!$p(e))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");eh.unobserve(this,e)},e.prototype.disconnect=function(){eh.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e}();function nh(){return nh=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},nh.apply(this,arguments)}function rh(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)t.indexOf(n=i[r])>=0||(o[n]=e[n]);return o}var oh="undefined"!=typeof window?n.useLayoutEffect:n.useEffect;function ih(e,t,n){return t=(t=+t)==t?t:0,n=(n=+n)==n?n:0,(e=+e)==e&&(e=(e=e<=n?e:n)>=t?e:t),e}function ah(e){var t=Math.round(e);if(Number.isNaN(e))throw new TypeError("Found a NaN! Check your snapPoints / defaultSnap / snapTo ");return t}var sh={box:"border-box"};function lh(e,t){var r=t.label,o=t.enabled,i=t.resizeSourceRef,a=n.useState(0),s=a[0],l=a[1];n.useDebugValue(r+": "+s);var c=n.useCallback((function(e){l(e[0].borderBoxSize[0].blockSize),i.current="element"}),[i]);return oh((function(){if(e.current&&o){var t=new th(c);return t.observe(e.current,sh),function(){t.disconnect()}}}),[e,c,o]),o?s:0}function ch(e){return void 0===e&&(e=1e3),new Promise((function(t){return setTimeout(t,e)}))}var uh={DRAG:{target:"#overlay.dragging",actions:"onOpenEnd"}},dh={RESIZE:{target:"#overlay.resizing",actions:"onOpenEnd"}},ph=function(e,t,n){return void 0===n&&(n=e.context),new gc(e,t,n)}({id:"overlay",initial:"closed",context:{initialState:"CLOSED"},states:{closed:{on:{OPEN:"opening",CLOSE:void 0}},opening:{initial:"start",states:{start:{invoke:{src:"onOpenStart",onDone:"transition"}},transition:{always:[{target:"immediately",cond:"initiallyOpen"},{target:"smoothly",cond:"initiallyClosed"}]},immediately:{initial:"open",states:{open:{invoke:{src:"openImmediately",onDone:"activating"}},activating:{invoke:{src:"activate",onDone:"#overlay.opening.end"},on:nh({},uh,dh)}}},smoothly:{initial:"visuallyHidden",states:{visuallyHidden:{invoke:{src:"renderVisuallyHidden",onDone:"activating"}},activating:{invoke:{src:"activate",onDone:"open"}},open:{invoke:{src:"openSmoothly",onDone:"#overlay.opening.end"},on:nh({},uh,dh)}}},end:{invoke:{src:"onOpenEnd",onDone:"done"},on:{CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:nh({},{CLOSE:{target:"#overlay.closing",actions:"onOpenCancel"}}),onDone:"open"},open:{on:{DRAG:"#overlay.dragging",SNAP:"snapping",RESIZE:"resizing"}},dragging:{on:{SNAP:"snapping"}},snapping:{initial:"start",states:{start:{invoke:{src:"onSnapStart",onDone:"snappingSmoothly"},entry:[mc({y:function(e,t){return t.payload.y},velocity:function(e,t){return t.payload.velocity},snapSource:function(e,t){var n=t.payload.source;return void 0===n?"custom":n}})]},snappingSmoothly:{invoke:{src:"snapSmoothly",onDone:"end"}},end:{invoke:{src:"onSnapEnd",onDone:"done"},on:{RESIZE:"#overlay.resizing",SNAP:"#overlay.snapping",CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:{SNAP:{target:"snapping",actions:"onSnapEnd"},RESIZE:{target:"#overlay.resizing",actions:"onSnapCancel"},DRAG:{target:"#overlay.dragging",actions:"onSnapCancel"},CLOSE:{target:"#overlay.closing",actions:"onSnapCancel"}},onDone:"open"},resizing:{initial:"start",states:{start:{invoke:{src:"onResizeStart",onDone:"resizingSmoothly"}},resizingSmoothly:{invoke:{src:"resizeSmoothly",onDone:"end"}},end:{invoke:{src:"onResizeEnd",onDone:"done"},on:{SNAP:"#overlay.snapping",CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:{RESIZE:{target:"resizing",actions:"onResizeEnd"},SNAP:{target:"snapping",actions:"onResizeCancel"},DRAG:{target:"#overlay.dragging",actions:"onResizeCancel"},CLOSE:{target:"#overlay.closing",actions:"onResizeCancel"}},onDone:"open"},closing:{initial:"start",states:{start:{invoke:{src:"onCloseStart",onDone:"deactivating"},on:{OPEN:{target:"#overlay.open",actions:"onCloseCancel"}}},deactivating:{invoke:{src:"deactivate",onDone:"closingSmoothly"}},closingSmoothly:{invoke:{src:"closeSmoothly",onDone:"end"}},end:{invoke:{src:"onCloseEnd",onDone:"done"},on:{OPEN:{target:"#overlay.opening",actions:"onCloseCancel"}}},done:{type:"final"}},on:{CLOSE:void 0,OPEN:{target:"#overlay.opening",actions:"onCloseCancel"}},onDone:"closed"}},on:{CLOSE:"closing"}},{actions:{onOpenCancel:function(e,t){},onSnapCancel:function(e,t){},onResizeCancel:function(e,t){},onCloseCancel:function(e,t){},onOpenEnd:function(e,t){},onSnapEnd:function(e,t){},onRezizeEnd:function(e,t){}},services:{onSnapStart:function(){try{return Promise.resolve(ch()).then((function(){}))}catch(e){return Promise.reject(e)}},onOpenStart:function(){try{return Promise.resolve(ch()).then((function(){}))}catch(e){return Promise.reject(e)}},onCloseStart:function(){try{return Promise.resolve(ch()).then((function(){}))}catch(e){return Promise.reject(e)}},onResizeStart:function(){try{return Promise.resolve(ch()).then((function(){}))}catch(e){return Promise.reject(e)}},onSnapEnd:function(){try{return Promise.resolve(ch()).then((function(){}))}catch(e){return Promise.reject(e)}},onOpenEnd:function(){try{return Promise.resolve(ch()).then((function(){}))}catch(e){return Promise.reject(e)}},onCloseEnd:function(){try{return Promise.resolve(ch()).then((function(){}))}catch(e){return Promise.reject(e)}},onResizeEnd:function(){try{return Promise.resolve(ch()).then((function(){}))}catch(e){return Promise.reject(e)}},renderVisuallyHidden:function(e,t){try{return Promise.resolve(ch()).then((function(){}))}catch(e){return Promise.reject(e)}},activate:function(e,t){try{return Promise.resolve(ch()).then((function(){}))}catch(e){return Promise.reject(e)}},deactivate:function(e,t){try{return Promise.resolve(ch()).then((function(){}))}catch(e){return Promise.reject(e)}},openSmoothly:function(e,t){try{return Promise.resolve(ch()).then((function(){}))}catch(e){return Promise.reject(e)}},openImmediately:function(e,t){try{return Promise.resolve(ch()).then((function(){}))}catch(e){return Promise.reject(e)}},snapSmoothly:function(e,t){try{return Promise.resolve(ch()).then((function(){}))}catch(e){return Promise.reject(e)}},resizeSmoothly:function(e,t){try{return Promise.resolve(ch()).then((function(){}))}catch(e){return Promise.reject(e)}},closeSmoothly:function(e,t){try{return Promise.resolve(ch()).then((function(){}))}catch(e){return Promise.reject(e)}}},guards:{initiallyClosed:function(e){return"CLOSED"===e.initialState},initiallyOpen:function(e){return"OPEN"===e.initialState}}}),hh=["children","sibling","className","footer","header","open","initialState","lastSnapRef","initialFocusRef","onDismiss","maxHeight","defaultSnap","snapPoints","blocking","scrollLocking","style","onSpringStart","onSpringCancel","onSpringEnd","reserveScrollBarGap","expandOnContentDrag"],fh=["velocity"],xh=["onRest","config"],gh={tension:170,friction:26},vh=gh.tension,mh=gh.friction,bh=n.forwardRef((function(e,t){var r=e.children,o=e.sibling,i=e.className,a=e.footer,s=e.header,l=e.open,c=e.initialState,u=e.lastSnapRef,d=e.initialFocusRef,p=e.onDismiss,h=e.maxHeight,f=e.defaultSnap,x=void 0===f?wh:f,g=e.snapPoints,v=void 0===g?Ch:g,m=e.blocking,b=void 0===m||m,y=e.scrollLocking,w=void 0===y||y,C=e.style,j=e.onSpringStart,k=e.onSpringCancel,$=e.onSpringEnd,S=e.reserveScrollBarGap,E=void 0===S?b:S,R=e.expandOnContentDrag,O=void 0!==R&&R,L=rh(e,hh),T=function(){var e=n.useState(!1),t=e[0],r=e[1],o=n.useState({}),i=o[0],a=o[1],s=n.useCallback((function(e){return a((function(t){var n;return nh({},t,((n={})[e]=!1,n))})),function(){a((function(t){var n;return nh({},t,((n={})[e]=!0,n))}))}}),[]);return n.useEffect((function(){var e=Object.values(i);0!==e.length&&e.every(Boolean)&&r(!0)}),[i]),{ready:t,registerReady:s}}(),P=T.ready,M=T.registerReady,_=n.useRef(!1),D=n.useRef(j),I=n.useRef(k),V=n.useRef($);n.useEffect((function(){D.current=j,I.current=k,V.current=$}),[k,j,$]);var N,A,z=au((function(){return{y:0,ready:0,maxHeight:0,minSnap:0,maxSnap:0}})),B=z[0],H=z[1],F=n.useRef(null),Z=n.useRef(null),W=n.useRef(null),G=n.useRef(null),q=n.useRef(null),U=n.useRef(null),X=n.useRef(0),Y=n.useRef(),K=n.useRef(!1),J=(N=n.useMemo((function(){return"undefined"!=typeof window?window.matchMedia("(prefers-reduced-motion: reduce)"):null}),[]),A=n.useRef(null==N?void 0:N.matches),n.useDebugValue(A.current?"reduce":"no-preference"),n.useEffect((function(){var e=function(e){A.current=e.matches};return null==N||N.addListener(e),function(){return null==N?void 0:N.removeListener(e)}}),[N]),A),Q=function(e){var t=e.targetRef,r=e.enabled,o=e.reserveScrollBarGap,i=n.useRef({activate:function(){throw new TypeError("Tried to activate scroll lock too early")},deactivate:function(){}});return n.useDebugValue(r?"Enabled":"Disabled"),n.useEffect((function(){if(!r)return i.current.deactivate(),void(i.current={activate:function(){},deactivate:function(){}});var e=t.current,n=!1;i.current={activate:function(){n||(n=!0,xp(e,{allowTouchMove:function(e){return e.closest("[data-body-scroll-lock-ignore]")},reserveScrollBarGap:o}))},deactivate:function(){n&&(n=!1,gp(e))}}}),[r,t,o]),i}({targetRef:Z,enabled:P&&w,reserveScrollBarGap:E}),ee=function(e){var t=e.targetRef,r=e.enabled,o=n.useRef({activate:function(){throw new TypeError("Tried to activate aria hider too early")},deactivate:function(){}});return n.useDebugValue(r?"Enabled":"Disabled"),n.useEffect((function(){if(!r)return o.current.deactivate(),void(o.current={activate:function(){},deactivate:function(){}});var e=t.current,n=!1,i=[],a=[];o.current={activate:function(){if(!n){n=!0;var t=e.parentNode;document.querySelectorAll("body > *").forEach((function(e){if(e!==t){var n=e.getAttribute("aria-hidden");null!==n&&"false"!==n||(i.push(n),a.push(e),e.setAttribute("aria-hidden","true"))}}))}},deactivate:function(){n&&(n=!1,a.forEach((function(e,t){var n=i[t];null===n?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",n)})),i=[],a=[])}}}),[t,r]),o}({targetRef:F,enabled:P&&b}),te=function(e){var t=e.targetRef,r=e.fallbackRef,o=e.initialFocusRef,i=e.enabled,a=n.useRef({activate:function(){throw new TypeError("Tried to activate focus trap too early")},deactivate:function(){}});return n.useDebugValue(i?"Enabled":"Disabled"),n.useEffect((function(){if(!i)return a.current.deactivate(),void(a.current={activate:function(){},deactivate:function(){}});var e=r.current,n=rp(t.current,{onActivate:void 0,initialFocus:o?function(){return(null==o?void 0:o.current)||e}:void 0,fallbackFocus:e,escapeDeactivates:!1,clickOutsideDeactivates:!1}),s=!1;a.current={activate:function(){try{return s?Promise.resolve():(s=!0,Promise.resolve(n.activate()).then((function(){return Promise.resolve(new Promise((function(e){return setTimeout((function(){return e(void 0)}),0)}))).then((function(){}))})))}catch(e){return Promise.reject(e)}},deactivate:function(){s&&(s=!1,n.deactivate())}}}),[i,r,o,t]),a}({targetRef:F,fallbackRef:U,initialFocusRef:d||void 0,enabled:P&&b&&!1!==d}),ne=function(e){var t=e.getSnapPoints,r=e.heightRef,o=e.lastSnapRef,i=e.ready,a=function(e){var t=e.contentRef,r=e.controlledMaxHeight,o=e.footerEnabled,i=e.footerRef,a=e.headerEnabled,s=e.headerRef,l=e.registerReady,c=e.resizeSourceRef,u=n.useMemo((function(){return l("contentHeight")}),[l]),d=function(e,t,r){var o=n.useMemo((function(){return t("maxHeight")}),[t]),i=n.useState((function(){return ah(e)||"undefined"!=typeof window?window.innerHeight:0})),a=i[0],s=i[1],l=a>0,c=n.useRef(0);return n.useDebugValue(e?"controlled":"auto"),n.useEffect((function(){l&&o()}),[l,o]),oh((function(){if(e)return s(ah(e)),void(r.current="maxheightprop");var t=function(){c.current||(c.current=requestAnimationFrame((function(){s(window.innerHeight),r.current="window",c.current=0})))};return window.addEventListener("resize",t),s(window.innerHeight),r.current="window",o(),function(){window.removeEventListener("resize",t),cancelAnimationFrame(c.current)}}),[e,o,r]),a}(r,l,c),p=lh(s,{label:"headerHeight",enabled:a,resizeSourceRef:c}),h=lh(t,{label:"contentHeight",enabled:!0,resizeSourceRef:c}),f=lh(i,{label:"footerHeight",enabled:o,resizeSourceRef:c}),x=Math.min(d-p-f,h)+p+f;n.useDebugValue("minHeight: "+x);var g=h>0;return n.useEffect((function(){g&&u()}),[g,u]),{maxHeight:d,minHeight:x,headerHeight:p,footerHeight:f}}({contentRef:e.contentRef,controlledMaxHeight:e.controlledMaxHeight,footerEnabled:e.footerEnabled,footerRef:e.footerRef,headerEnabled:e.headerEnabled,headerRef:e.headerRef,registerReady:e.registerReady,resizeSourceRef:e.resizeSourceRef}),s=a.maxHeight,l=a.minHeight,c=a.headerHeight,u=a.footerHeight,d=function(e,t){var n=[].concat(e).map(ah).reduce((function(e,n){return e.add(ih(n,0,t)),e}),new Set),r=Array.from(n),o=Math.min.apply(Math,r);if(Number.isNaN(o))throw new TypeError("minSnap is NaN");var i=Math.max.apply(Math,r);if(Number.isNaN(i))throw new TypeError("maxSnap is NaN");return{snapPoints:r,minSnap:o,maxSnap:i}}(i?t({height:r.current,footerHeight:u,headerHeight:c,minHeight:l,maxHeight:s}):[0],s),p=d.snapPoints,h=d.minSnap,f=d.maxSnap;return n.useDebugValue("minSnap: "+h+", maxSnap:"+f),{minSnap:h,maxSnap:f,findSnap:function(e){var t=ah("function"==typeof e?e({footerHeight:u,headerHeight:c,height:r.current,minHeight:l,maxHeight:s,snapPoints:p,lastSnap:o.current}):e);return p.reduce((function(e,n){return Math.abs(n-t)<Math.abs(e-t)?n:e}),h)},maxHeight:s}}({contentRef:W,controlledMaxHeight:h,footerEnabled:!!a,footerRef:q,getSnapPoints:v,headerEnabled:!1!==s,headerRef:G,heightRef:X,lastSnapRef:u,ready:P,registerReady:M,resizeSourceRef:Y}),re=ne.minSnap,oe=ne.maxSnap,ie=ne.maxHeight,ae=ne.findSnap,se=n.useRef(ie),le=n.useRef(re),ce=n.useRef(oe),ue=n.useRef(ae),de=n.useRef(0);oh((function(){se.current=ie,ce.current=oe,le.current=re,ue.current=ae,de.current=ae(x)}),[ae,x,ie,oe,re]);var pe=n.useCallback((function(e){var t=e.onRest,n=e.config,r=(n=void 0===n?{}:n).velocity,o=void 0===r?1:r,i=rh(n,fh),a=rh(e,xh);return new Promise((function(e){return H(nh({},a,{config:nh({velocity:o},i,{mass:1,tension:vh,friction:Math.max(mh,mh+(mh-mh*o))}),onRest:function(){var n=[].slice.call(arguments);e.apply(void 0,n),null==t||t.apply(void 0,n)}}))}))}),[H]),he=Tc(ph,{devTools:!1,actions:{onOpenCancel:n.useCallback((function(){return null==I.current?void 0:I.current({type:"OPEN"})}),[]),onSnapCancel:n.useCallback((function(e){return null==I.current?void 0:I.current({type:"SNAP",source:e.snapSource})}),[]),onCloseCancel:n.useCallback((function(){return null==I.current?void 0:I.current({type:"CLOSE"})}),[]),onResizeCancel:n.useCallback((function(){return null==I.current?void 0:I.current({type:"RESIZE",source:Y.current})}),[]),onOpenEnd:n.useCallback((function(){return null==V.current?void 0:V.current({type:"OPEN"})}),[]),onSnapEnd:n.useCallback((function(e,t){return null==V.current?void 0:V.current({type:"SNAP",source:e.snapSource})}),[]),onResizeEnd:n.useCallback((function(){return null==V.current?void 0:V.current({type:"RESIZE",source:Y.current})}),[])},context:{initialState:c},services:{onSnapStart:n.useCallback((function(e,t){try{return Promise.resolve(null==D.current?void 0:D.current({type:"SNAP",source:t.payload.source||"custom"}))}catch(e){return Promise.reject(e)}}),[]),onOpenStart:n.useCallback((function(){try{return Promise.resolve(null==D.current?void 0:D.current({type:"OPEN"}))}catch(e){return Promise.reject(e)}}),[]),onCloseStart:n.useCallback((function(){try{return Promise.resolve(null==D.current?void 0:D.current({type:"CLOSE"}))}catch(e){return Promise.reject(e)}}),[]),onResizeStart:n.useCallback((function(){try{return Promise.resolve(null==D.current?void 0:D.current({type:"RESIZE",source:Y.current}))}catch(e){return Promise.reject(e)}}),[]),onSnapEnd:n.useCallback((function(e,t){try{return Promise.resolve(null==V.current?void 0:V.current({type:"SNAP",source:e.snapSource}))}catch(e){return Promise.reject(e)}}),[]),onOpenEnd:n.useCallback((function(){try{return Promise.resolve(null==V.current?void 0:V.current({type:"OPEN"}))}catch(e){return Promise.reject(e)}}),[]),onCloseEnd:n.useCallback((function(){try{return Promise.resolve(null==V.current?void 0:V.current({type:"CLOSE"}))}catch(e){return Promise.reject(e)}}),[]),onResizeEnd:n.useCallback((function(){try{return Promise.resolve(null==V.current?void 0:V.current({type:"RESIZE",source:Y.current}))}catch(e){return Promise.reject(e)}}),[]),renderVisuallyHidden:n.useCallback((function(e,t){try{return Promise.resolve(pe({y:de.current,ready:0,maxHeight:se.current,maxSnap:ce.current,minSnap:de.current,immediate:!0})).then((function(){}))}catch(e){return Promise.reject(e)}}),[pe]),activate:n.useCallback((function(e,t){try{return _.current=!0,Promise.resolve(Promise.all([Q.current.activate(),te.current.activate(),ee.current.activate()])).then((function(){}))}catch(e){return Promise.reject(e)}}),[ee,te,Q]),deactivate:n.useCallback((function(){try{return Q.current.deactivate(),te.current.deactivate(),ee.current.deactivate(),_.current=!1,Promise.resolve()}catch(e){return Promise.reject(e)}}),[ee,te,Q]),openImmediately:n.useCallback((function(){try{return X.current=de.current,Promise.resolve(pe({y:de.current,ready:1,maxHeight:se.current,maxSnap:ce.current,minSnap:de.current,immediate:!0})).then((function(){}))}catch(e){return Promise.reject(e)}}),[pe]),openSmoothly:n.useCallback((function(){try{return Promise.resolve(pe({y:0,ready:1,maxHeight:se.current,maxSnap:ce.current,minSnap:de.current,immediate:!0})).then((function(){return X.current=de.current,Promise.resolve(pe({y:de.current,ready:1,maxHeight:se.current,maxSnap:ce.current,minSnap:de.current,immediate:J.current})).then((function(){}))}))}catch(e){return Promise.reject(e)}}),[pe,J]),snapSmoothly:n.useCallback((function(e,t){try{var n=ue.current(e.y);return X.current=n,u.current=n,Promise.resolve(pe({y:n,ready:1,maxHeight:se.current,maxSnap:ce.current,minSnap:le.current,immediate:J.current,config:{velocity:e.velocity}})).then((function(){}))}catch(e){return Promise.reject(e)}}),[pe,u,J]),resizeSmoothly:n.useCallback((function(){try{var e=ue.current(X.current);return X.current=e,u.current=e,Promise.resolve(pe({y:e,ready:1,maxHeight:se.current,maxSnap:ce.current,minSnap:le.current,immediate:"element"!==Y.current||J.current})).then((function(){}))}catch(e){return Promise.reject(e)}}),[pe,u,J]),closeSmoothly:n.useCallback((function(e,t){try{return pe({minSnap:X.current,immediate:!0}),X.current=0,Promise.resolve(pe({y:0,maxHeight:se.current,maxSnap:ce.current,immediate:J.current})).then((function(){return Promise.resolve(pe({ready:0,immediate:!0})).then((function(){}))}))}catch(e){return Promise.reject(e)}}),[pe,J])}}),fe=he[0],xe=he[1];n.useEffect((function(){P&&xe(l?"OPEN":"CLOSE")}),[l,xe,P]),oh((function(){(ie||oe||re)&&xe("RESIZE")}),[ie,oe,re,xe]),n.useEffect((function(){return function(){Q.current.deactivate(),te.current.deactivate(),ee.current.deactivate()}}),[ee,te,Q]),n.useImperativeHandle(t,(function(){return{snapTo:function(e,t){var n=void 0===t?{}:t,r=n.velocity,o=void 0===r?1:r,i=n.source,a=void 0===i?"custom":i;xe("SNAP",{payload:{y:ue.current(e),velocity:o,source:a}})},get height(){return X.current}}}),[xe]),n.useEffect((function(){var e=Z.current,t=function(e){K.current&&e.preventDefault()},n=function(t){e.scrollTop<0&&(requestAnimationFrame((function(){e.style.overflow="hidden",e.scrollTop=0,e.style.removeProperty("overflow")})),t.preventDefault())};return O&&(e.addEventListener("scroll",t),e.addEventListener("touchmove",t),e.addEventListener("touchstart",n)),function(){e.removeEventListener("scroll",t),e.removeEventListener("touchmove",t),e.removeEventListener("touchstart",n)}}),[O,Z]);var ge=Ed((function(e){var t=e.args,n=(t=void 0===t?[]:t)[0],r=(n=void 0===n?{}:n).closeOnTap,o=void 0!==r&&r,i=n.isContentDragging,a=void 0!==i&&i,s=e.cancel,l=e.direction[1],c=e.down,u=e.first,d=e.last,h=e.memo,f=void 0===h?B.y.getValue():h,x=e.tap,g=e.velocity,v=-1*e.movement[1];if(!_.current)return s(),f;if(p&&o&&x)return s(),setTimeout((function(){return p()}),0),f;if(x)return f;var m=f+v,b=v*g,y=Math.max(le.current,Math.min(ce.current,m+2*b));if(!c&&p&&l>0&&m+b<le.current/2)return s(),p(),f;var w=c?p||le.current!==ce.current?Hu(m,p?0:le.current,ce.current,.55):m<le.current?Hu(m,le.current,2*ce.current,.55):Hu(m,le.current/2,ce.current,.55):y;return O&&a?(w>=ce.current&&(w=ce.current),f===ce.current&&Z.current.scrollTop>0&&(w=ce.current),K.current=w<ce.current):K.current=!1,u&&xe("DRAG"),d?(xe("SNAP",{payload:{y:w,velocity:g>.05?g:1,source:"dragging"}}),f):(H({y:w,ready:1,maxHeight:se.current,maxSnap:ce.current,minSnap:le.current,immediate:!0,config:{velocity:g}}),f)}),{filterTaps:!0});if(Number.isNaN(ce.current))throw new TypeError("maxSnapRef is NaN!!");if(Number.isNaN(le.current))throw new TypeError("minSnapRef is NaN!!");var ve=function(e){var t,n=e.spring,r=eu([n.y,n.maxHeight],(function(e,t){return Math.round(ih(t-e,0,16))+"px"})),o=eu([n.y,n.minSnap,n.maxSnap],(function(e,t,n){return ih(e,t,n)+"px"})),i=eu([n.y,n.minSnap,n.maxSnap],(function(e,t,n){return e<t?t-e+"px":e>n?n-e+"px":"0px"})),a=eu([n.y,n.maxSnap],(function(e,t){return e>=t?Math.ceil(e-t):0})),s=eu([n.y,n.minSnap],(function(e,t){if(!t)return 0;var n=Math.max(t/2-45,0);return ih((e-n)*(1/(Math.min(t/2+45,t)-n)+0),0,1)})),l=eu([n.y,n.minSnap],(function(e,t){return t?ih(e/t,0,1):0}));return(t={})["--rsbs-content-opacity"]=s,t["--rsbs-backdrop-opacity"]=l,t["--rsbs-antigap-scale-y"]=a,t["--rsbs-overlay-translate-y"]=i,t["--rsbs-overlay-rounded"]=r,t["--rsbs-overlay-h"]=o,t}({spring:B});return n.createElement(Iu.div,nh({},L,{"data-rsbs-root":!0,"data-rsbs-state":yh.find(fe.matches),"data-rsbs-is-blocking":b,"data-rsbs-is-dismissable":!!p,"data-rsbs-has-header":!!s,"data-rsbs-has-footer":!!a,className:i,ref:F,style:nh({},ve,C,{opacity:B.ready})}),o,b&&n.createElement("div",nh({key:"backdrop","data-rsbs-backdrop":!0},ge({closeOnTap:!0}))),n.createElement("div",{key:"overlay","aria-modal":"true",role:"dialog","data-rsbs-overlay":!0,tabIndex:-1,ref:U,onKeyDown:function(e){"Escape"===e.key&&(e.stopPropagation(),p&&p())}},!1!==s&&n.createElement("div",nh({key:"header","data-rsbs-header":!0,ref:G},ge()),s),n.createElement("div",nh({key:"scroll","data-rsbs-scroll":!0,ref:Z},O?ge({isContentDragging:!0}):{}),n.createElement("div",{"data-rsbs-content":!0,ref:W},r)),a&&n.createElement("div",nh({key:"footer",ref:q,"data-rsbs-footer":!0},ge()),a)))})),yh=["closed","opening","open","closing","dragging","snapping","resizing"];function wh(e){var t=e.lastSnap;return null!=t?t:Math.min.apply(Math,e.snapPoints)}function Ch(e){return e.minHeight}var jh=["onSpringStart","onSpringEnd","skipInitialTransition"],kh=n.forwardRef((function(e,t){var r=e.onSpringStart,o=e.onSpringEnd,i=e.skipInitialTransition,a=rh(e,jh),s=n.useState(!1),l=s[0],c=s[1],u=n.useRef(),d=n.useRef(null),p=n.useRef(i&&a.open?"OPEN":"CLOSED");oh((function(){if(a.open)return cancelAnimationFrame(u.current),c(!0),function(){p.current="CLOSED"}}),[a.open]);var h=n.useCallback((function(e){return Promise.resolve(null==r?void 0:r(e)).then((function(){"OPEN"===e.type&&cancelAnimationFrame(u.current)}))}),[r]),f=n.useCallback((function(e){return Promise.resolve(null==o?void 0:o(e)).then((function(){"CLOSE"===e.type&&(u.current=requestAnimationFrame((function(){return c(!1)})))}))}),[o]);return l?n.createElement(ys,{"data-rsbs-portal":!0},n.createElement(bh,nh({},a,{lastSnapRef:d,ref:t,initialState:p.current,onSpringStart:h,onSpringEnd:f}))):null}));const $h=(e,t)=>r.css`
|
|
2410
|
+
function Ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Xd(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ud(Object(n),!0).forEach((function(t){Yd(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ud(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Yd(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Kd,Jd=(Kd=[],{activateTrap:function(e){if(Kd.length>0){var t=Kd[Kd.length-1];t!==e&&t.pause()}var n=Kd.indexOf(e);-1===n||Kd.splice(n,1),Kd.push(e)},deactivateTrap:function(e){var t=Kd.indexOf(e);-1!==t&&Kd.splice(t,1),Kd.length>0&&Kd[Kd.length-1].unpause()}}),Qd=function(e){return setTimeout(e,0)},ep=function(e,t){var n=-1;return e.every((function(e,r){return!t(e)||(n=r,!1)})),n},tp=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return"function"==typeof e?e.apply(void 0,n):e},np=function(e){return e.target.shadowRoot&&"function"==typeof e.composedPath?e.composedPath()[0]:e.target},rp=function(e,t){var n,r=(null==t?void 0:t.document)||document,o=Xd({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0},t),i={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0},a=function(e,t,n){return e&&void 0!==e[t]?e[t]:o[n||t]},s=function(e){return i.containerGroups.findIndex((function(t){var n=t.container,r=t.tabbableNodes;return n.contains(e)||r.find((function(t){return t===e}))}))},l=function(e){var t=o[e];if("function"==typeof t){for(var n=arguments.length,i=new Array(n>1?n-1:0),a=1;a<n;a++)i[a-1]=arguments[a];t=t.apply(void 0,i)}if(!0===t&&(t=void 0),!t){if(void 0===t||!1===t)return t;throw new Error("`".concat(e,"` was specified but was not a node, or did not return a node"))}var s=t;if("string"==typeof t&&!(s=r.querySelector(t)))throw new Error("`".concat(e,"` as selector refers to no known node"));return s},c=function(){var e=l("initialFocus");if(!1===e)return!1;if(void 0===e)if(s(r.activeElement)>=0)e=r.activeElement;else{var t=i.tabbableGroups[0];e=t&&t.firstTabbableNode||l("fallbackFocus")}if(!e)throw new Error("Your focus-trap needs to have at least one focusable element");return e},u=function(){if(i.containerGroups=i.containers.map((function(e){var t,n,r=Zd(e,o.tabbableOptions),i=(t=e,(n=(n=o.tabbableOptions)||{}).getShadowRoot?_d([t],n.includeContainer,{filter:zd.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):Md(t,n.includeContainer,zd.bind(null,n)));return{container:e,tabbableNodes:r,focusableNodes:i,firstTabbableNode:r.length>0?r[0]:null,lastTabbableNode:r.length>0?r[r.length-1]:null,nextTabbableNode:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=i.findIndex((function(t){return t===e}));if(!(n<0))return t?i.slice(n+1).find((function(e){return Wd(e,o.tabbableOptions)})):i.slice(0,n).reverse().find((function(e){return Wd(e,o.tabbableOptions)}))}}})),i.tabbableGroups=i.containerGroups.filter((function(e){return e.tabbableNodes.length>0})),i.tabbableGroups.length<=0&&!l("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times")},d=function e(t){!1!==t&&t!==r.activeElement&&(t&&t.focus?(t.focus({preventScroll:!!o.preventScroll}),i.mostRecentlyFocusedNode=t,function(e){return e.tagName&&"input"===e.tagName.toLowerCase()&&"function"==typeof e.select}(t)&&t.select()):e(c()))},p=function(e){var t=l("setReturnFocus",e);return t||!1!==t&&e},h=function(e){var t=np(e);s(t)>=0||(tp(o.clickOutsideDeactivates,e)?n.deactivate({returnFocus:o.returnFocusOnDeactivate&&!qd(t,o.tabbableOptions)}):tp(o.allowOutsideClick,e)||e.preventDefault())},f=function(e){var t=np(e),n=s(t)>=0;n||t instanceof Document?n&&(i.mostRecentlyFocusedNode=t):(e.stopImmediatePropagation(),d(i.mostRecentlyFocusedNode||c()))},x=function(e){if(function(e){return"Escape"===e.key||"Esc"===e.key||27===e.keyCode}(e)&&!1!==tp(o.escapeDeactivates,e))return e.preventDefault(),void n.deactivate();(function(e){return"Tab"===e.key||9===e.keyCode})(e)&&function(e){var t=np(e);u();var n=null;if(i.tabbableGroups.length>0){var r=s(t),a=r>=0?i.containerGroups[r]:void 0;if(r<0)n=e.shiftKey?i.tabbableGroups[i.tabbableGroups.length-1].lastTabbableNode:i.tabbableGroups[0].firstTabbableNode;else if(e.shiftKey){var c=ep(i.tabbableGroups,(function(e){var n=e.firstTabbableNode;return t===n}));if(c<0&&(a.container===t||qd(t,o.tabbableOptions)&&!Wd(t,o.tabbableOptions)&&!a.nextTabbableNode(t,!1))&&(c=r),c>=0){var p=0===c?i.tabbableGroups.length-1:c-1;n=i.tabbableGroups[p].lastTabbableNode}}else{var h=ep(i.tabbableGroups,(function(e){var n=e.lastTabbableNode;return t===n}));if(h<0&&(a.container===t||qd(t,o.tabbableOptions)&&!Wd(t,o.tabbableOptions)&&!a.nextTabbableNode(t))&&(h=r),h>=0){var f=h===i.tabbableGroups.length-1?0:h+1;n=i.tabbableGroups[f].firstTabbableNode}}}else n=l("fallbackFocus");n&&(e.preventDefault(),d(n))}(e)},g=function(e){var t=np(e);s(t)>=0||tp(o.clickOutsideDeactivates,e)||tp(o.allowOutsideClick,e)||(e.preventDefault(),e.stopImmediatePropagation())},v=function(){if(i.active)return Jd.activateTrap(n),i.delayInitialFocusTimer=o.delayInitialFocus?Qd((function(){d(c())})):d(c()),r.addEventListener("focusin",f,!0),r.addEventListener("mousedown",h,{capture:!0,passive:!1}),r.addEventListener("touchstart",h,{capture:!0,passive:!1}),r.addEventListener("click",g,{capture:!0,passive:!1}),r.addEventListener("keydown",x,{capture:!0,passive:!1}),n},m=function(){if(i.active)return r.removeEventListener("focusin",f,!0),r.removeEventListener("mousedown",h,!0),r.removeEventListener("touchstart",h,!0),r.removeEventListener("click",g,!0),r.removeEventListener("keydown",x,!0),n};return(n={get active(){return i.active},get paused(){return i.paused},activate:function(e){if(i.active)return this;var t=a(e,"onActivate"),n=a(e,"onPostActivate"),o=a(e,"checkCanFocusTrap");o||u(),i.active=!0,i.paused=!1,i.nodeFocusedBeforeActivation=r.activeElement,t&&t();var s=function(){o&&u(),v(),n&&n()};return o?(o(i.containers.concat()).then(s,s),this):(s(),this)},deactivate:function(e){if(!i.active)return this;var t=Xd({onDeactivate:o.onDeactivate,onPostDeactivate:o.onPostDeactivate,checkCanReturnFocus:o.checkCanReturnFocus},e);clearTimeout(i.delayInitialFocusTimer),i.delayInitialFocusTimer=void 0,m(),i.active=!1,i.paused=!1,Jd.deactivateTrap(n);var r=a(t,"onDeactivate"),s=a(t,"onPostDeactivate"),l=a(t,"checkCanReturnFocus"),c=a(t,"returnFocus","returnFocusOnDeactivate");r&&r();var u=function(){Qd((function(){c&&d(p(i.nodeFocusedBeforeActivation)),s&&s()}))};return c&&l?(l(p(i.nodeFocusedBeforeActivation)).then(u,u),this):(u(),this)},pause:function(){return i.paused||!i.active||(i.paused=!0,m()),this},unpause:function(){return i.paused&&i.active?(i.paused=!1,u(),v(),this):this},updateContainerElements:function(e){var t=[].concat(e).filter(Boolean);return i.containers=t.map((function(e){return"string"==typeof e?r.querySelector(e):e})),i.active&&u(),this}}).updateContainerElements(e),n};var op=!1;if("undefined"!=typeof window){var ip={get passive(){op=!0}};window.addEventListener("testPassive",null,ip),window.removeEventListener("testPassive",null,ip)}var ap,sp="undefined"!=typeof window&&window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||"MacIntel"===window.navigator.platform&&window.navigator.maxTouchPoints>1),lp=[],cp=!1,up=-1,dp=void 0,pp=void 0,hp=function(e){return lp.some((function(t){return!(!t.options.allowTouchMove||!t.options.allowTouchMove(e))}))},fp=function(e){var t=e||window.event;return!!hp(t.target)||(t.touches.length>1||(t.preventDefault&&t.preventDefault(),!1))},xp=function(e,t){if(e){if(!lp.some((function(t){return t.targetElement===e}))){var n={targetElement:e,options:t||{}};lp=[].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(lp),[n]),sp?(e.ontouchstart=function(e){1===e.targetTouches.length&&(up=e.targetTouches[0].clientY)},e.ontouchmove=function(t){1===t.targetTouches.length&&function(e,t){var n=e.targetTouches[0].clientY-up;!hp(e.target)&&(t&&0===t.scrollTop&&n>0||function(e){return!!e&&e.scrollHeight-e.scrollTop<=e.clientHeight}(t)&&n<0?fp(e):e.stopPropagation())}(t,e)},cp||(document.addEventListener("touchmove",fp,op?{passive:!1}:void 0),cp=!0)):function(e){if(void 0===pp){var t=!!e&&!0===e.reserveScrollBarGap,n=window.innerWidth-document.documentElement.clientWidth;t&&n>0&&(pp=document.body.style.paddingRight,document.body.style.paddingRight=n+"px")}void 0===dp&&(dp=document.body.style.overflow,document.body.style.overflow="hidden")}(t)}}else console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.")},gp=function(e){e?(lp=lp.filter((function(t){return t.targetElement!==e})),sp?(e.ontouchstart=null,e.ontouchmove=null,cp&&0===lp.length&&(document.removeEventListener("touchmove",fp,op?{passive:!1}:void 0),cp=!1)):lp.length||(void 0!==pp&&(document.body.style.paddingRight=pp,pp=void 0),void 0!==dp&&(document.body.style.overflow=dp,dp=void 0))):console.error("enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.")},vp=[],mp="ResizeObserver loop completed with undelivered notifications.";!function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"}(ap||(ap={}));var bp,yp=function(e){return Object.freeze(e)},wp=function(e,t){this.inlineSize=e,this.blockSize=t,yp(this)},Cp=function(){function e(e,t,n,r){return this.x=e,this.y=t,this.width=n,this.height=r,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,yp(this)}return e.prototype.toJSON=function(){var e=this;return{x:e.x,y:e.y,top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:e.width,height:e.height}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e}(),jp=function(e){return e instanceof SVGElement&&"getBBox"in e},kp=function(e){if(jp(e)){var t=e.getBBox(),n=t.width,r=t.height;return!n&&!r}var o=e,i=o.offsetWidth,a=o.offsetHeight;return!(i||a||e.getClientRects().length)},$p=function(e){var t;if(e instanceof Element)return!0;var n=null===(t=null==e?void 0:e.ownerDocument)||void 0===t?void 0:t.defaultView;return!!(n&&e instanceof n.Element)},Sp="undefined"!=typeof window?window:{},Ep=new WeakMap,Rp=/auto|scroll/,Op=/^tb|vertical/,Lp=/msie|trident/i.test(Sp.navigator&&Sp.navigator.userAgent),Tp=function(e){return parseFloat(e||"0")},Pp=function(e,t,n){return void 0===e&&(e=0),void 0===t&&(t=0),void 0===n&&(n=!1),new wp((n?t:e)||0,(n?e:t)||0)},Mp=yp({devicePixelContentBoxSize:Pp(),borderBoxSize:Pp(),contentBoxSize:Pp(),contentRect:new Cp(0,0,0,0)}),_p=function(e,t){if(void 0===t&&(t=!1),Ep.has(e)&&!t)return Ep.get(e);if(kp(e))return Ep.set(e,Mp),Mp;var n=getComputedStyle(e),r=jp(e)&&e.ownerSVGElement&&e.getBBox(),o=!Lp&&"border-box"===n.boxSizing,i=Op.test(n.writingMode||""),a=!r&&Rp.test(n.overflowY||""),s=!r&&Rp.test(n.overflowX||""),l=r?0:Tp(n.paddingTop),c=r?0:Tp(n.paddingRight),u=r?0:Tp(n.paddingBottom),d=r?0:Tp(n.paddingLeft),p=r?0:Tp(n.borderTopWidth),h=r?0:Tp(n.borderRightWidth),f=r?0:Tp(n.borderBottomWidth),x=d+c,g=l+u,v=(r?0:Tp(n.borderLeftWidth))+h,m=p+f,b=s?e.offsetHeight-m-e.clientHeight:0,y=a?e.offsetWidth-v-e.clientWidth:0,w=o?x+v:0,C=o?g+m:0,j=r?r.width:Tp(n.width)-w-y,k=r?r.height:Tp(n.height)-C-b,$=j+x+y+v,S=k+g+b+m,E=yp({devicePixelContentBoxSize:Pp(Math.round(j*devicePixelRatio),Math.round(k*devicePixelRatio),i),borderBoxSize:Pp($,S,i),contentBoxSize:Pp(j,k,i),contentRect:new Cp(d,l,j,k)});return Ep.set(e,E),E},Dp=function(e,t,n){var r=_p(e,n),o=r.borderBoxSize,i=r.contentBoxSize,a=r.devicePixelContentBoxSize;switch(t){case ap.DEVICE_PIXEL_CONTENT_BOX:return a;case ap.BORDER_BOX:return o;default:return i}},Ip=function(e){var t=_p(e);this.target=e,this.contentRect=t.contentRect,this.borderBoxSize=yp([t.borderBoxSize]),this.contentBoxSize=yp([t.contentBoxSize]),this.devicePixelContentBoxSize=yp([t.devicePixelContentBoxSize])},Vp=function(e){if(kp(e))return 1/0;for(var t=0,n=e.parentNode;n;)t+=1,n=n.parentNode;return t},Np=function(){var e=1/0,t=[];vp.forEach((function(n){if(0!==n.activeTargets.length){var r=[];n.activeTargets.forEach((function(t){var n=new Ip(t.target),o=Vp(t.target);r.push(n),t.lastReportedSize=Dp(t.target,t.observedBox),o<e&&(e=o)})),t.push((function(){n.callback.call(n.observer,r,n.observer)})),n.activeTargets.splice(0,n.activeTargets.length)}}));for(var n=0,r=t;n<r.length;n++){(0,r[n])()}return e},Ap=function(e){vp.forEach((function(t){t.activeTargets.splice(0,t.activeTargets.length),t.skippedTargets.splice(0,t.skippedTargets.length),t.observationTargets.forEach((function(n){n.isActive()&&(Vp(n.target)>e?t.activeTargets.push(n):t.skippedTargets.push(n))}))}))},zp=function(){var e=0;for(Ap(e);vp.some((function(e){return e.activeTargets.length>0}));)e=Np(),Ap(e);return vp.some((function(e){return e.skippedTargets.length>0}))&&function(){var e;"function"==typeof ErrorEvent?e=new ErrorEvent("error",{message:mp}):((e=document.createEvent("Event")).initEvent("error",!1,!1),e.message=mp),window.dispatchEvent(e)}(),e>0},Bp=[],Hp=function(e){if(!bp){var t=0,n=document.createTextNode("");new MutationObserver((function(){return Bp.splice(0).forEach((function(e){return e()}))})).observe(n,{characterData:!0}),bp=function(){n.textContent="".concat(t?t--:t++)}}Bp.push(e),bp()},Fp=0,Zp={attributes:!0,characterData:!0,childList:!0,subtree:!0},Wp=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],Gp=function(e){return void 0===e&&(e=0),Date.now()+e},qp=!1,Up=new(function(){function e(){var e=this;this.stopped=!0,this.listener=function(){return e.schedule()}}return e.prototype.run=function(e){var t=this;if(void 0===e&&(e=250),!qp){qp=!0;var n,r=Gp(e);n=function(){var n=!1;try{n=zp()}finally{if(qp=!1,e=r-Gp(),!Fp)return;n?t.run(1e3):e>0?t.run(e):t.start()}},Hp((function(){requestAnimationFrame(n)}))}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var e=this,t=function(){return e.observer&&e.observer.observe(document.body,Zp)};document.body?t():Sp.addEventListener("DOMContentLoaded",t)},e.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),Wp.forEach((function(t){return Sp.addEventListener(t,e.listener,!0)})))},e.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),Wp.forEach((function(t){return Sp.removeEventListener(t,e.listener,!0)})),this.stopped=!0)},e}()),Xp=function(e){!Fp&&e>0&&Up.start(),!(Fp+=e)&&Up.stop()},Yp=function(){function e(e,t){this.target=e,this.observedBox=t||ap.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var e=Dp(this.target,this.observedBox,!0);return function(e){return!jp(e)&&!function(e){switch(e.tagName){case"INPUT":if("image"!==e.type)break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1}(e)&&"inline"===getComputedStyle(e).display}(this.target)&&(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},e}(),Kp=function(e,t){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=t},Jp=new WeakMap,Qp=function(e,t){for(var n=0;n<e.length;n+=1)if(e[n].target===t)return n;return-1},eh=function(){function e(){}return e.connect=function(e,t){var n=new Kp(e,t);Jp.set(e,n)},e.observe=function(e,t,n){var r=Jp.get(e),o=0===r.observationTargets.length;Qp(r.observationTargets,t)<0&&(o&&vp.push(r),r.observationTargets.push(new Yp(t,n&&n.box)),Xp(1),Up.schedule())},e.unobserve=function(e,t){var n=Jp.get(e),r=Qp(n.observationTargets,t),o=1===n.observationTargets.length;r>=0&&(o&&vp.splice(vp.indexOf(n),1),n.observationTargets.splice(r,1),Xp(-1))},e.disconnect=function(e){var t=this,n=Jp.get(e);n.observationTargets.slice().forEach((function(n){return t.unobserve(e,n.target)})),n.activeTargets.splice(0,n.activeTargets.length)},e}(),th=function(){function e(e){if(0===arguments.length)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if("function"!=typeof e)throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");eh.connect(this,e)}return e.prototype.observe=function(e,t){if(0===arguments.length)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!$p(e))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");eh.observe(this,e,t)},e.prototype.unobserve=function(e){if(0===arguments.length)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!$p(e))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");eh.unobserve(this,e)},e.prototype.disconnect=function(){eh.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e}();function nh(){return nh=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},nh.apply(this,arguments)}function rh(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)t.indexOf(n=i[r])>=0||(o[n]=e[n]);return o}var oh="undefined"!=typeof window?n.useLayoutEffect:n.useEffect;function ih(e,t,n){return t=(t=+t)==t?t:0,n=(n=+n)==n?n:0,(e=+e)==e&&(e=(e=e<=n?e:n)>=t?e:t),e}function ah(e){var t=Math.round(e);if(Number.isNaN(e))throw new TypeError("Found a NaN! Check your snapPoints / defaultSnap / snapTo ");return t}var sh={box:"border-box"};function lh(e,t){var r=t.label,o=t.enabled,i=t.resizeSourceRef,a=n.useState(0),s=a[0],l=a[1];n.useDebugValue(r+": "+s);var c=n.useCallback((function(e){l(e[0].borderBoxSize[0].blockSize),i.current="element"}),[i]);return oh((function(){if(e.current&&o){var t=new th(c);return t.observe(e.current,sh),function(){t.disconnect()}}}),[e,c,o]),o?s:0}function ch(e){return void 0===e&&(e=1e3),new Promise((function(t){return setTimeout(t,e)}))}var uh={DRAG:{target:"#overlay.dragging",actions:"onOpenEnd"}},dh={RESIZE:{target:"#overlay.resizing",actions:"onOpenEnd"}},ph=function(e,t,n){return void 0===n&&(n=e.context),new gc(e,t,n)}({id:"overlay",initial:"closed",context:{initialState:"CLOSED"},states:{closed:{on:{OPEN:"opening",CLOSE:void 0}},opening:{initial:"start",states:{start:{invoke:{src:"onOpenStart",onDone:"transition"}},transition:{always:[{target:"immediately",cond:"initiallyOpen"},{target:"smoothly",cond:"initiallyClosed"}]},immediately:{initial:"open",states:{open:{invoke:{src:"openImmediately",onDone:"activating"}},activating:{invoke:{src:"activate",onDone:"#overlay.opening.end"},on:nh({},uh,dh)}}},smoothly:{initial:"visuallyHidden",states:{visuallyHidden:{invoke:{src:"renderVisuallyHidden",onDone:"activating"}},activating:{invoke:{src:"activate",onDone:"open"}},open:{invoke:{src:"openSmoothly",onDone:"#overlay.opening.end"},on:nh({},uh,dh)}}},end:{invoke:{src:"onOpenEnd",onDone:"done"},on:{CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:nh({},{CLOSE:{target:"#overlay.closing",actions:"onOpenCancel"}}),onDone:"open"},open:{on:{DRAG:"#overlay.dragging",SNAP:"snapping",RESIZE:"resizing"}},dragging:{on:{SNAP:"snapping"}},snapping:{initial:"start",states:{start:{invoke:{src:"onSnapStart",onDone:"snappingSmoothly"},entry:[mc({y:function(e,t){return t.payload.y},velocity:function(e,t){return t.payload.velocity},snapSource:function(e,t){var n=t.payload.source;return void 0===n?"custom":n}})]},snappingSmoothly:{invoke:{src:"snapSmoothly",onDone:"end"}},end:{invoke:{src:"onSnapEnd",onDone:"done"},on:{RESIZE:"#overlay.resizing",SNAP:"#overlay.snapping",CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:{SNAP:{target:"snapping",actions:"onSnapEnd"},RESIZE:{target:"#overlay.resizing",actions:"onSnapCancel"},DRAG:{target:"#overlay.dragging",actions:"onSnapCancel"},CLOSE:{target:"#overlay.closing",actions:"onSnapCancel"}},onDone:"open"},resizing:{initial:"start",states:{start:{invoke:{src:"onResizeStart",onDone:"resizingSmoothly"}},resizingSmoothly:{invoke:{src:"resizeSmoothly",onDone:"end"}},end:{invoke:{src:"onResizeEnd",onDone:"done"},on:{SNAP:"#overlay.snapping",CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:{RESIZE:{target:"resizing",actions:"onResizeEnd"},SNAP:{target:"snapping",actions:"onResizeCancel"},DRAG:{target:"#overlay.dragging",actions:"onResizeCancel"},CLOSE:{target:"#overlay.closing",actions:"onResizeCancel"}},onDone:"open"},closing:{initial:"start",states:{start:{invoke:{src:"onCloseStart",onDone:"deactivating"},on:{OPEN:{target:"#overlay.open",actions:"onCloseCancel"}}},deactivating:{invoke:{src:"deactivate",onDone:"closingSmoothly"}},closingSmoothly:{invoke:{src:"closeSmoothly",onDone:"end"}},end:{invoke:{src:"onCloseEnd",onDone:"done"},on:{OPEN:{target:"#overlay.opening",actions:"onCloseCancel"}}},done:{type:"final"}},on:{CLOSE:void 0,OPEN:{target:"#overlay.opening",actions:"onCloseCancel"}},onDone:"closed"}},on:{CLOSE:"closing"}},{actions:{onOpenCancel:function(e,t){},onSnapCancel:function(e,t){},onResizeCancel:function(e,t){},onCloseCancel:function(e,t){},onOpenEnd:function(e,t){},onSnapEnd:function(e,t){},onRezizeEnd:function(e,t){}},services:{onSnapStart:function(){try{return Promise.resolve(ch()).then((function(){}))}catch(e){return Promise.reject(e)}},onOpenStart:function(){try{return Promise.resolve(ch()).then((function(){}))}catch(e){return Promise.reject(e)}},onCloseStart:function(){try{return Promise.resolve(ch()).then((function(){}))}catch(e){return Promise.reject(e)}},onResizeStart:function(){try{return Promise.resolve(ch()).then((function(){}))}catch(e){return Promise.reject(e)}},onSnapEnd:function(){try{return Promise.resolve(ch()).then((function(){}))}catch(e){return Promise.reject(e)}},onOpenEnd:function(){try{return Promise.resolve(ch()).then((function(){}))}catch(e){return Promise.reject(e)}},onCloseEnd:function(){try{return Promise.resolve(ch()).then((function(){}))}catch(e){return Promise.reject(e)}},onResizeEnd:function(){try{return Promise.resolve(ch()).then((function(){}))}catch(e){return Promise.reject(e)}},renderVisuallyHidden:function(e,t){try{return Promise.resolve(ch()).then((function(){}))}catch(e){return Promise.reject(e)}},activate:function(e,t){try{return Promise.resolve(ch()).then((function(){}))}catch(e){return Promise.reject(e)}},deactivate:function(e,t){try{return Promise.resolve(ch()).then((function(){}))}catch(e){return Promise.reject(e)}},openSmoothly:function(e,t){try{return Promise.resolve(ch()).then((function(){}))}catch(e){return Promise.reject(e)}},openImmediately:function(e,t){try{return Promise.resolve(ch()).then((function(){}))}catch(e){return Promise.reject(e)}},snapSmoothly:function(e,t){try{return Promise.resolve(ch()).then((function(){}))}catch(e){return Promise.reject(e)}},resizeSmoothly:function(e,t){try{return Promise.resolve(ch()).then((function(){}))}catch(e){return Promise.reject(e)}},closeSmoothly:function(e,t){try{return Promise.resolve(ch()).then((function(){}))}catch(e){return Promise.reject(e)}}},guards:{initiallyClosed:function(e){return"CLOSED"===e.initialState},initiallyOpen:function(e){return"OPEN"===e.initialState}}}),hh=["children","sibling","className","footer","header","open","initialState","lastSnapRef","initialFocusRef","onDismiss","maxHeight","defaultSnap","snapPoints","blocking","scrollLocking","style","onSpringStart","onSpringCancel","onSpringEnd","reserveScrollBarGap","expandOnContentDrag"],fh=["velocity"],xh=["onRest","config"],gh={tension:170,friction:26},vh=gh.tension,mh=gh.friction,bh=n.forwardRef((function(e,t){var r=e.children,o=e.sibling,i=e.className,a=e.footer,s=e.header,l=e.open,c=e.initialState,u=e.lastSnapRef,d=e.initialFocusRef,p=e.onDismiss,h=e.maxHeight,f=e.defaultSnap,x=void 0===f?wh:f,g=e.snapPoints,v=void 0===g?Ch:g,m=e.blocking,b=void 0===m||m,y=e.scrollLocking,w=void 0===y||y,C=e.style,j=e.onSpringStart,k=e.onSpringCancel,$=e.onSpringEnd,S=e.reserveScrollBarGap,E=void 0===S?b:S,R=e.expandOnContentDrag,O=void 0!==R&&R,L=rh(e,hh),T=function(){var e=n.useState(!1),t=e[0],r=e[1],o=n.useState({}),i=o[0],a=o[1],s=n.useCallback((function(e){return a((function(t){var n;return nh({},t,((n={})[e]=!1,n))})),function(){a((function(t){var n;return nh({},t,((n={})[e]=!0,n))}))}}),[]);return n.useEffect((function(){var e=Object.values(i);0!==e.length&&e.every(Boolean)&&r(!0)}),[i]),{ready:t,registerReady:s}}(),P=T.ready,M=T.registerReady,_=n.useRef(!1),D=n.useRef(j),I=n.useRef(k),V=n.useRef($);n.useEffect((function(){D.current=j,I.current=k,V.current=$}),[k,j,$]);var N,A,z=au((function(){return{y:0,ready:0,maxHeight:0,minSnap:0,maxSnap:0}})),B=z[0],H=z[1],F=n.useRef(null),Z=n.useRef(null),W=n.useRef(null),G=n.useRef(null),q=n.useRef(null),U=n.useRef(null),X=n.useRef(0),Y=n.useRef(),K=n.useRef(!1),J=(N=n.useMemo((function(){return"undefined"!=typeof window?window.matchMedia("(prefers-reduced-motion: reduce)"):null}),[]),A=n.useRef(null==N?void 0:N.matches),n.useDebugValue(A.current?"reduce":"no-preference"),n.useEffect((function(){var e=function(e){A.current=e.matches};return null==N||N.addListener(e),function(){return null==N?void 0:N.removeListener(e)}}),[N]),A),Q=function(e){var t=e.targetRef,r=e.enabled,o=e.reserveScrollBarGap,i=n.useRef({activate:function(){throw new TypeError("Tried to activate scroll lock too early")},deactivate:function(){}});return n.useDebugValue(r?"Enabled":"Disabled"),n.useEffect((function(){if(!r)return i.current.deactivate(),void(i.current={activate:function(){},deactivate:function(){}});var e=t.current,n=!1;i.current={activate:function(){n||(n=!0,xp(e,{allowTouchMove:function(e){return e.closest("[data-body-scroll-lock-ignore]")},reserveScrollBarGap:o}))},deactivate:function(){n&&(n=!1,gp(e))}}}),[r,t,o]),i}({targetRef:Z,enabled:P&&w,reserveScrollBarGap:E}),ee=function(e){var t=e.targetRef,r=e.enabled,o=n.useRef({activate:function(){throw new TypeError("Tried to activate aria hider too early")},deactivate:function(){}});return n.useDebugValue(r?"Enabled":"Disabled"),n.useEffect((function(){if(!r)return o.current.deactivate(),void(o.current={activate:function(){},deactivate:function(){}});var e=t.current,n=!1,i=[],a=[];o.current={activate:function(){if(!n){n=!0;var t=e.parentNode;document.querySelectorAll("body > *").forEach((function(e){if(e!==t){var n=e.getAttribute("aria-hidden");null!==n&&"false"!==n||(i.push(n),a.push(e),e.setAttribute("aria-hidden","true"))}}))}},deactivate:function(){n&&(n=!1,a.forEach((function(e,t){var n=i[t];null===n?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",n)})),i=[],a=[])}}}),[t,r]),o}({targetRef:F,enabled:P&&b}),te=function(e){var t=e.targetRef,r=e.fallbackRef,o=e.initialFocusRef,i=e.enabled,a=n.useRef({activate:function(){throw new TypeError("Tried to activate focus trap too early")},deactivate:function(){}});return n.useDebugValue(i?"Enabled":"Disabled"),n.useEffect((function(){if(!i)return a.current.deactivate(),void(a.current={activate:function(){},deactivate:function(){}});var e=r.current,n=rp(t.current,{onActivate:void 0,initialFocus:o?function(){return(null==o?void 0:o.current)||e}:void 0,fallbackFocus:e,escapeDeactivates:!1,clickOutsideDeactivates:!1}),s=!1;a.current={activate:function(){try{return s?Promise.resolve():(s=!0,Promise.resolve(n.activate()).then((function(){return Promise.resolve(new Promise((function(e){return setTimeout((function(){return e(void 0)}),0)}))).then((function(){}))})))}catch(e){return Promise.reject(e)}},deactivate:function(){s&&(s=!1,n.deactivate())}}}),[i,r,o,t]),a}({targetRef:F,fallbackRef:U,initialFocusRef:d||void 0,enabled:P&&b&&!1!==d}),ne=function(e){var t=e.getSnapPoints,r=e.heightRef,o=e.lastSnapRef,i=e.ready,a=function(e){var t=e.contentRef,r=e.controlledMaxHeight,o=e.footerEnabled,i=e.footerRef,a=e.headerEnabled,s=e.headerRef,l=e.registerReady,c=e.resizeSourceRef,u=n.useMemo((function(){return l("contentHeight")}),[l]),d=function(e,t,r){var o=n.useMemo((function(){return t("maxHeight")}),[t]),i=n.useState((function(){return ah(e)||"undefined"!=typeof window?window.innerHeight:0})),a=i[0],s=i[1],l=a>0,c=n.useRef(0);return n.useDebugValue(e?"controlled":"auto"),n.useEffect((function(){l&&o()}),[l,o]),oh((function(){if(e)return s(ah(e)),void(r.current="maxheightprop");var t=function(){c.current||(c.current=requestAnimationFrame((function(){s(window.innerHeight),r.current="window",c.current=0})))};return window.addEventListener("resize",t),s(window.innerHeight),r.current="window",o(),function(){window.removeEventListener("resize",t),cancelAnimationFrame(c.current)}}),[e,o,r]),a}(r,l,c),p=lh(s,{label:"headerHeight",enabled:a,resizeSourceRef:c}),h=lh(t,{label:"contentHeight",enabled:!0,resizeSourceRef:c}),f=lh(i,{label:"footerHeight",enabled:o,resizeSourceRef:c}),x=Math.min(d-p-f,h)+p+f;n.useDebugValue("minHeight: "+x);var g=h>0;return n.useEffect((function(){g&&u()}),[g,u]),{maxHeight:d,minHeight:x,headerHeight:p,footerHeight:f}}({contentRef:e.contentRef,controlledMaxHeight:e.controlledMaxHeight,footerEnabled:e.footerEnabled,footerRef:e.footerRef,headerEnabled:e.headerEnabled,headerRef:e.headerRef,registerReady:e.registerReady,resizeSourceRef:e.resizeSourceRef}),s=a.maxHeight,l=a.minHeight,c=a.headerHeight,u=a.footerHeight,d=function(e,t){var n=[].concat(e).map(ah).reduce((function(e,n){return e.add(ih(n,0,t)),e}),new Set),r=Array.from(n),o=Math.min.apply(Math,r);if(Number.isNaN(o))throw new TypeError("minSnap is NaN");var i=Math.max.apply(Math,r);if(Number.isNaN(i))throw new TypeError("maxSnap is NaN");return{snapPoints:r,minSnap:o,maxSnap:i}}(i?t({height:r.current,footerHeight:u,headerHeight:c,minHeight:l,maxHeight:s}):[0],s),p=d.snapPoints,h=d.minSnap,f=d.maxSnap;return n.useDebugValue("minSnap: "+h+", maxSnap:"+f),{minSnap:h,maxSnap:f,findSnap:function(e){var t=ah("function"==typeof e?e({footerHeight:u,headerHeight:c,height:r.current,minHeight:l,maxHeight:s,snapPoints:p,lastSnap:o.current}):e);return p.reduce((function(e,n){return Math.abs(n-t)<Math.abs(e-t)?n:e}),h)},maxHeight:s}}({contentRef:W,controlledMaxHeight:h,footerEnabled:!!a,footerRef:q,getSnapPoints:v,headerEnabled:!1!==s,headerRef:G,heightRef:X,lastSnapRef:u,ready:P,registerReady:M,resizeSourceRef:Y}),re=ne.minSnap,oe=ne.maxSnap,ie=ne.maxHeight,ae=ne.findSnap,se=n.useRef(ie),le=n.useRef(re),ce=n.useRef(oe),ue=n.useRef(ae),de=n.useRef(0);oh((function(){se.current=ie,ce.current=oe,le.current=re,ue.current=ae,de.current=ae(x)}),[ae,x,ie,oe,re]);var pe=n.useCallback((function(e){var t=e.onRest,n=e.config,r=(n=void 0===n?{}:n).velocity,o=void 0===r?1:r,i=rh(n,fh),a=rh(e,xh);return new Promise((function(e){return H(nh({},a,{config:nh({velocity:o},i,{mass:1,tension:vh,friction:Math.max(mh,mh+(mh-mh*o))}),onRest:function(){var n=[].slice.call(arguments);e.apply(void 0,n),null==t||t.apply(void 0,n)}}))}))}),[H]),he=Tc(ph,{devTools:!1,actions:{onOpenCancel:n.useCallback((function(){return null==I.current?void 0:I.current({type:"OPEN"})}),[]),onSnapCancel:n.useCallback((function(e){return null==I.current?void 0:I.current({type:"SNAP",source:e.snapSource})}),[]),onCloseCancel:n.useCallback((function(){return null==I.current?void 0:I.current({type:"CLOSE"})}),[]),onResizeCancel:n.useCallback((function(){return null==I.current?void 0:I.current({type:"RESIZE",source:Y.current})}),[]),onOpenEnd:n.useCallback((function(){return null==V.current?void 0:V.current({type:"OPEN"})}),[]),onSnapEnd:n.useCallback((function(e,t){return null==V.current?void 0:V.current({type:"SNAP",source:e.snapSource})}),[]),onResizeEnd:n.useCallback((function(){return null==V.current?void 0:V.current({type:"RESIZE",source:Y.current})}),[])},context:{initialState:c},services:{onSnapStart:n.useCallback((function(e,t){try{return Promise.resolve(null==D.current?void 0:D.current({type:"SNAP",source:t.payload.source||"custom"}))}catch(e){return Promise.reject(e)}}),[]),onOpenStart:n.useCallback((function(){try{return Promise.resolve(null==D.current?void 0:D.current({type:"OPEN"}))}catch(e){return Promise.reject(e)}}),[]),onCloseStart:n.useCallback((function(){try{return Promise.resolve(null==D.current?void 0:D.current({type:"CLOSE"}))}catch(e){return Promise.reject(e)}}),[]),onResizeStart:n.useCallback((function(){try{return Promise.resolve(null==D.current?void 0:D.current({type:"RESIZE",source:Y.current}))}catch(e){return Promise.reject(e)}}),[]),onSnapEnd:n.useCallback((function(e,t){try{return Promise.resolve(null==V.current?void 0:V.current({type:"SNAP",source:e.snapSource}))}catch(e){return Promise.reject(e)}}),[]),onOpenEnd:n.useCallback((function(){try{return Promise.resolve(null==V.current?void 0:V.current({type:"OPEN"}))}catch(e){return Promise.reject(e)}}),[]),onCloseEnd:n.useCallback((function(){try{return Promise.resolve(null==V.current?void 0:V.current({type:"CLOSE"}))}catch(e){return Promise.reject(e)}}),[]),onResizeEnd:n.useCallback((function(){try{return Promise.resolve(null==V.current?void 0:V.current({type:"RESIZE",source:Y.current}))}catch(e){return Promise.reject(e)}}),[]),renderVisuallyHidden:n.useCallback((function(e,t){try{return Promise.resolve(pe({y:de.current,ready:0,maxHeight:se.current,maxSnap:ce.current,minSnap:de.current,immediate:!0})).then((function(){}))}catch(e){return Promise.reject(e)}}),[pe]),activate:n.useCallback((function(e,t){try{return _.current=!0,Promise.resolve(Promise.all([Q.current.activate(),te.current.activate(),ee.current.activate()])).then((function(){}))}catch(e){return Promise.reject(e)}}),[ee,te,Q]),deactivate:n.useCallback((function(){try{return Q.current.deactivate(),te.current.deactivate(),ee.current.deactivate(),_.current=!1,Promise.resolve()}catch(e){return Promise.reject(e)}}),[ee,te,Q]),openImmediately:n.useCallback((function(){try{return X.current=de.current,Promise.resolve(pe({y:de.current,ready:1,maxHeight:se.current,maxSnap:ce.current,minSnap:de.current,immediate:!0})).then((function(){}))}catch(e){return Promise.reject(e)}}),[pe]),openSmoothly:n.useCallback((function(){try{return Promise.resolve(pe({y:0,ready:1,maxHeight:se.current,maxSnap:ce.current,minSnap:de.current,immediate:!0})).then((function(){return X.current=de.current,Promise.resolve(pe({y:de.current,ready:1,maxHeight:se.current,maxSnap:ce.current,minSnap:de.current,immediate:J.current})).then((function(){}))}))}catch(e){return Promise.reject(e)}}),[pe,J]),snapSmoothly:n.useCallback((function(e,t){try{var n=ue.current(e.y);return X.current=n,u.current=n,Promise.resolve(pe({y:n,ready:1,maxHeight:se.current,maxSnap:ce.current,minSnap:le.current,immediate:J.current,config:{velocity:e.velocity}})).then((function(){}))}catch(e){return Promise.reject(e)}}),[pe,u,J]),resizeSmoothly:n.useCallback((function(){try{var e=ue.current(X.current);return X.current=e,u.current=e,Promise.resolve(pe({y:e,ready:1,maxHeight:se.current,maxSnap:ce.current,minSnap:le.current,immediate:"element"!==Y.current||J.current})).then((function(){}))}catch(e){return Promise.reject(e)}}),[pe,u,J]),closeSmoothly:n.useCallback((function(e,t){try{return pe({minSnap:X.current,immediate:!0}),X.current=0,Promise.resolve(pe({y:0,maxHeight:se.current,maxSnap:ce.current,immediate:J.current})).then((function(){return Promise.resolve(pe({ready:0,immediate:!0})).then((function(){}))}))}catch(e){return Promise.reject(e)}}),[pe,J])}}),fe=he[0],xe=he[1];n.useEffect((function(){P&&xe(l?"OPEN":"CLOSE")}),[l,xe,P]),oh((function(){(ie||oe||re)&&xe("RESIZE")}),[ie,oe,re,xe]),n.useEffect((function(){return function(){Q.current.deactivate(),te.current.deactivate(),ee.current.deactivate()}}),[ee,te,Q]),n.useImperativeHandle(t,(function(){return{snapTo:function(e,t){var n=void 0===t?{}:t,r=n.velocity,o=void 0===r?1:r,i=n.source,a=void 0===i?"custom":i;xe("SNAP",{payload:{y:ue.current(e),velocity:o,source:a}})},get height(){return X.current}}}),[xe]),n.useEffect((function(){var e=Z.current,t=function(e){K.current&&e.preventDefault()},n=function(t){e.scrollTop<0&&(requestAnimationFrame((function(){e.style.overflow="hidden",e.scrollTop=0,e.style.removeProperty("overflow")})),t.preventDefault())};return O&&(e.addEventListener("scroll",t),e.addEventListener("touchmove",t),e.addEventListener("touchstart",n)),function(){e.removeEventListener("scroll",t),e.removeEventListener("touchmove",t),e.removeEventListener("touchstart",n)}}),[O,Z]);var ge=Ed((function(e){var t=e.args,n=(t=void 0===t?[]:t)[0],r=(n=void 0===n?{}:n).closeOnTap,o=void 0!==r&&r,i=n.isContentDragging,a=void 0!==i&&i,s=e.cancel,l=e.direction[1],c=e.down,u=e.first,d=e.last,h=e.memo,f=void 0===h?B.y.getValue():h,x=e.tap,g=e.velocity,v=-1*e.movement[1];if(!_.current)return s(),f;if(p&&o&&x)return s(),setTimeout((function(){return p()}),0),f;if(x)return f;var m=f+v,b=v*g,y=Math.max(le.current,Math.min(ce.current,m+2*b));if(!c&&p&&l>0&&m+b<le.current/2)return s(),p(),f;var w=c?p||le.current!==ce.current?Hu(m,p?0:le.current,ce.current,.55):m<le.current?Hu(m,le.current,2*ce.current,.55):Hu(m,le.current/2,ce.current,.55):y;return O&&a?(w>=ce.current&&(w=ce.current),f===ce.current&&Z.current.scrollTop>0&&(w=ce.current),K.current=w<ce.current):K.current=!1,u&&xe("DRAG"),d?(xe("SNAP",{payload:{y:w,velocity:g>.05?g:1,source:"dragging"}}),f):(H({y:w,ready:1,maxHeight:se.current,maxSnap:ce.current,minSnap:le.current,immediate:!0,config:{velocity:g}}),f)}),{filterTaps:!0});if(Number.isNaN(ce.current))throw new TypeError("maxSnapRef is NaN!!");if(Number.isNaN(le.current))throw new TypeError("minSnapRef is NaN!!");var ve=function(e){var t,n=e.spring,r=eu([n.y,n.maxHeight],(function(e,t){return Math.round(ih(t-e,0,16))+"px"})),o=eu([n.y,n.minSnap,n.maxSnap],(function(e,t,n){return ih(e,t,n)+"px"})),i=eu([n.y,n.minSnap,n.maxSnap],(function(e,t,n){return e<t?t-e+"px":e>n?n-e+"px":"0px"})),a=eu([n.y,n.maxSnap],(function(e,t){return e>=t?Math.ceil(e-t):0})),s=eu([n.y,n.minSnap],(function(e,t){if(!t)return 0;var n=Math.max(t/2-45,0);return ih((e-n)*(1/(Math.min(t/2+45,t)-n)+0),0,1)})),l=eu([n.y,n.minSnap],(function(e,t){return t?ih(e/t,0,1):0}));return(t={})["--rsbs-content-opacity"]=s,t["--rsbs-backdrop-opacity"]=l,t["--rsbs-antigap-scale-y"]=a,t["--rsbs-overlay-translate-y"]=i,t["--rsbs-overlay-rounded"]=r,t["--rsbs-overlay-h"]=o,t}({spring:B});return n.createElement(Iu.div,nh({},L,{"data-rsbs-root":!0,"data-rsbs-state":yh.find(fe.matches),"data-rsbs-is-blocking":b,"data-rsbs-is-dismissable":!!p,"data-rsbs-has-header":!!s,"data-rsbs-has-footer":!!a,className:i,ref:F,style:nh({},ve,C,{opacity:B.ready})}),o,b&&n.createElement("div",nh({key:"backdrop","data-rsbs-backdrop":!0},ge({closeOnTap:!0}))),n.createElement("div",{key:"overlay","aria-modal":"true",role:"dialog","data-rsbs-overlay":!0,tabIndex:-1,ref:U,onKeyDown:function(e){"Escape"===e.key&&(e.stopPropagation(),p&&p())}},!1!==s&&n.createElement("div",nh({key:"header","data-rsbs-header":!0,ref:G},ge()),s),n.createElement("div",nh({key:"scroll","data-rsbs-scroll":!0,ref:Z},O?ge({isContentDragging:!0}):{}),n.createElement("div",{"data-rsbs-content":!0,ref:W},r)),a&&n.createElement("div",nh({key:"footer",ref:q,"data-rsbs-footer":!0},ge()),a)))})),yh=["closed","opening","open","closing","dragging","snapping","resizing"];function wh(e){var t=e.lastSnap;return null!=t?t:Math.min.apply(Math,e.snapPoints)}function Ch(e){return e.minHeight}var jh=["onSpringStart","onSpringEnd","skipInitialTransition"],kh=n.forwardRef((function(e,t){var r=e.onSpringStart,o=e.onSpringEnd,i=e.skipInitialTransition,a=rh(e,jh),s=n.useState(!1),l=s[0],c=s[1],u=n.useRef(),d=n.useRef(null),p=n.useRef(i&&a.open?"OPEN":"CLOSED");oh((function(){if(a.open)return cancelAnimationFrame(u.current),c(!0),function(){p.current="CLOSED"}}),[a.open]);var h=n.useCallback((function(e){return Promise.resolve(null==r?void 0:r(e)).then((function(){"OPEN"===e.type&&cancelAnimationFrame(u.current)}))}),[r]),f=n.useCallback((function(e){return Promise.resolve(null==o?void 0:o(e)).then((function(){"CLOSE"===e.type&&(u.current=requestAnimationFrame((function(){return c(!1)})))}))}),[o]);return l?n.createElement(ys,{"data-rsbs-portal":!0},n.createElement(bh,nh({},a,{lastSnapRef:d,ref:t,initialState:p.current,onSpringStart:h,onSpringEnd:f}))):null}));const $h=r.css`
|
|
2411
|
+
width: 40px;
|
|
2412
|
+
height: 6px;
|
|
2413
|
+
border-color: ${h("neutral",300)};
|
|
2414
|
+
border-radius: 4px;
|
|
2415
|
+
margin: 8px auto;
|
|
2416
|
+
cursor: grab;
|
|
2417
|
+
border: 2px;
|
|
2418
|
+
&:focus {
|
|
2419
|
+
outline-color: ${h("primary",700)};
|
|
2420
|
+
}
|
|
2421
|
+
`,Sh=(e,t)=>r.css`
|
|
2411
2422
|
[data-rsbs-overlay] {
|
|
2412
2423
|
border-top-left-radius: 16px;
|
|
2413
2424
|
border-top-right-radius: 16px;
|
|
@@ -2436,7 +2447,7 @@ function Ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2436
2447
|
padding: 0px;
|
|
2437
2448
|
min-height: 64px;
|
|
2438
2449
|
}
|
|
2439
|
-
`;!function(e,t){void 0===t&&(t={});var n=t.insertAt;if("undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}("[data-rsbs-overlay] {\n border-top-left-radius: 16px;\n border-top-left-radius: var(--rsbs-overlay-rounded,16px);\n border-top-right-radius: 16px;\n border-top-right-radius: var(--rsbs-overlay-rounded,16px);\n display: flex;\n background: #fff;\n background: var(--rsbs-bg,#fff);\n flex-direction: column;\n height: 0px;\n height: var(--rsbs-overlay-h,0px);\n transform: translate3d(0, 0px, 0);\n transform: translate3d(0, var(--rsbs-overlay-translate-y,0px), 0);\n will-change: height;\n}\n\n[data-rsbs-overlay]:focus {\n outline: none;\n}\n\n[data-rsbs-is-blocking='false'] [data-rsbs-overlay] {\n box-shadow: 0 -5px 60px 0 rgba(38, 89, 115, 0.11),\n 0 -1px 0 rgba(38, 89, 115, 0.05);\n}\n\n[data-rsbs-overlay],\n[data-rsbs-root]:after {\n max-width: auto;\n max-width: var(--rsbs-max-w,auto);\n margin-left: env(safe-area-inset-left);\n margin-left: var(--rsbs-ml,env(safe-area-inset-left));\n margin-right: env(safe-area-inset-right);\n margin-right: var(--rsbs-mr,env(safe-area-inset-right));\n}\n\n[data-rsbs-overlay],\n[data-rsbs-backdrop],\n[data-rsbs-root]:after {\n z-index: 3;\n -ms-scroll-chaining: none;\n overscroll-behavior: none;\n touch-action: none;\n position: fixed;\n right: 0;\n bottom: 0;\n left: 0;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n -webkit-touch-callout: none;\n}\n\n[data-rsbs-backdrop] {\n top: -60px;\n bottom: -60px;\n background-color: rgba(0, 0, 0, 0.6);\n background-color: var(--rsbs-backdrop-bg,rgba(0, 0, 0, 0.6));\n will-change: opacity;\n cursor: pointer;\n opacity: 1;\n}\n\n[data-rsbs-is-dismissable='false'] [data-rsbs-backdrop] {\n cursor: ns-resize;\n}\n\n[data-rsbs-root]:after {\n content: '';\n pointer-events: none;\n background: #fff;\n background: var(--rsbs-bg,#fff);\n height: 1px;\n transform-origin: bottom;\n transform: scale3d(1, 0, 1);\n transform: scale3d(1, var(--rsbs-antigap-scale-y,0), 1);\n will-change: transform;\n}\n\n[data-rsbs-footer],\n[data-rsbs-header] {\n flex-shrink: 0;\n cursor: ns-resize;\n padding: 16px;\n}\n\n[data-rsbs-header] {\n text-align: center;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n box-shadow: 0 1px 0\n rgba(46, 59, 66, calc(1 * 0.125));\n box-shadow: 0 1px 0\n rgba(46, 59, 66, calc(var(--rsbs-content-opacity,1) * 0.125));\n z-index: 1;\n padding-top: calc(20px + env(safe-area-inset-top));\n padding-bottom: 8px;\n}\n\n[data-rsbs-header]:before {\n position: absolute;\n content: '';\n display: block;\n width: 36px;\n height: 4px;\n top: calc(8px + env(safe-area-inset-top));\n left: 50%;\n transform: translateX(-50%);\n border-radius: 2px;\n background-color: hsla(0, 0%, 0%, 0.14);\n background-color: var(--rsbs-handle-bg,hsla(0, 0%, 0%, 0.14));\n}\n\n@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 2dppx) {\n [data-rsbs-header]:before {\n transform: translateX(-50%) scaleY(0.75);\n }\n}\n\n[data-rsbs-has-header='false'] [data-rsbs-header] {\n box-shadow: none;\n padding-top: calc(12px + env(safe-area-inset-top));\n}\n\n[data-rsbs-scroll] {\n flex-shrink: 1;\n flex-grow: 1;\n -webkit-tap-highlight-color: revert;\n -webkit-touch-callout: revert;\n -webkit-user-select: auto;\n -ms-user-select: auto;\n -moz-user-select: auto;\n user-select: auto;\n overflow: auto;\n -ms-scroll-chaining: none;\n overscroll-behavior: contain;\n -webkit-overflow-scrolling: touch;\n}\n\n[data-rsbs-scroll]:focus {\n outline: none;\n}\n\n[data-rsbs-has-footer='false'] [data-rsbs-content] {\n padding-bottom: env(safe-area-inset-bottom);\n}\n\n[data-rsbs-content] {\n /* The overflow hidden is to ensure any margin on child nodes are included when the resize observer is measuring the height */\n overflow: hidden;\n}\n\n[data-rsbs-footer] {\n box-shadow: 0 -1px 0 rgba(46, 59, 66, calc(1 * 0.125)),\n 0 2px 0 #fff;\n box-shadow: 0 -1px 0 rgba(46, 59, 66, calc(var(--rsbs-content-opacity,1) * 0.125)),\n 0 2px 0 var(--rsbs-bg,#fff);\n overflow: hidden;\n z-index: 1;\n padding-bottom: calc(16px + env(safe-area-inset-bottom));\n}\n\n[data-rsbs-is-dismissable='true'] [data-rsbs-header] > *, [data-rsbs-is-dismissable='true'] [data-rsbs-scroll] > *, [data-rsbs-is-dismissable='true'] [data-rsbs-footer] > *, [data-rsbs-is-dismissable='false'][data-rsbs-state='opening'] [data-rsbs-header] > *, [data-rsbs-is-dismissable='false'][data-rsbs-state='closing'] [data-rsbs-header] > *, [data-rsbs-is-dismissable='false'][data-rsbs-state='opening'] [data-rsbs-scroll] > *, [data-rsbs-is-dismissable='false'][data-rsbs-state='closing'] [data-rsbs-scroll] > *, [data-rsbs-is-dismissable='false'][data-rsbs-state='opening'] [data-rsbs-footer] > *, [data-rsbs-is-dismissable='false'][data-rsbs-state='closing'] [data-rsbs-footer] > * {\n opacity: 1;\n opacity: var(--rsbs-content-opacity,1);\n }\n\n[data-rsbs-is-dismissable='true'] [data-rsbs-backdrop], [data-rsbs-is-dismissable='false'][data-rsbs-state='opening'] [data-rsbs-backdrop], [data-rsbs-is-dismissable='false'][data-rsbs-state='closing'] [data-rsbs-backdrop] {\n opacity: 1;\n opacity: var(--rsbs-backdrop-opacity,1);\n }\n\n[data-rsbs-state='closed'],\n[data-rsbs-state='closing'] {\n /* Allows interactions on the rest of the page before the close transition is finished */\n pointer-events: none;\n}\n");const
|
|
2450
|
+
`;!function(e,t){void 0===t&&(t={});var n=t.insertAt;if("undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}("[data-rsbs-overlay] {\n border-top-left-radius: 16px;\n border-top-left-radius: var(--rsbs-overlay-rounded,16px);\n border-top-right-radius: 16px;\n border-top-right-radius: var(--rsbs-overlay-rounded,16px);\n display: flex;\n background: #fff;\n background: var(--rsbs-bg,#fff);\n flex-direction: column;\n height: 0px;\n height: var(--rsbs-overlay-h,0px);\n transform: translate3d(0, 0px, 0);\n transform: translate3d(0, var(--rsbs-overlay-translate-y,0px), 0);\n will-change: height;\n}\n\n[data-rsbs-overlay]:focus {\n outline: none;\n}\n\n[data-rsbs-is-blocking='false'] [data-rsbs-overlay] {\n box-shadow: 0 -5px 60px 0 rgba(38, 89, 115, 0.11),\n 0 -1px 0 rgba(38, 89, 115, 0.05);\n}\n\n[data-rsbs-overlay],\n[data-rsbs-root]:after {\n max-width: auto;\n max-width: var(--rsbs-max-w,auto);\n margin-left: env(safe-area-inset-left);\n margin-left: var(--rsbs-ml,env(safe-area-inset-left));\n margin-right: env(safe-area-inset-right);\n margin-right: var(--rsbs-mr,env(safe-area-inset-right));\n}\n\n[data-rsbs-overlay],\n[data-rsbs-backdrop],\n[data-rsbs-root]:after {\n z-index: 3;\n -ms-scroll-chaining: none;\n overscroll-behavior: none;\n touch-action: none;\n position: fixed;\n right: 0;\n bottom: 0;\n left: 0;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n -webkit-touch-callout: none;\n}\n\n[data-rsbs-backdrop] {\n top: -60px;\n bottom: -60px;\n background-color: rgba(0, 0, 0, 0.6);\n background-color: var(--rsbs-backdrop-bg,rgba(0, 0, 0, 0.6));\n will-change: opacity;\n cursor: pointer;\n opacity: 1;\n}\n\n[data-rsbs-is-dismissable='false'] [data-rsbs-backdrop] {\n cursor: ns-resize;\n}\n\n[data-rsbs-root]:after {\n content: '';\n pointer-events: none;\n background: #fff;\n background: var(--rsbs-bg,#fff);\n height: 1px;\n transform-origin: bottom;\n transform: scale3d(1, 0, 1);\n transform: scale3d(1, var(--rsbs-antigap-scale-y,0), 1);\n will-change: transform;\n}\n\n[data-rsbs-footer],\n[data-rsbs-header] {\n flex-shrink: 0;\n cursor: ns-resize;\n padding: 16px;\n}\n\n[data-rsbs-header] {\n text-align: center;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n box-shadow: 0 1px 0\n rgba(46, 59, 66, calc(1 * 0.125));\n box-shadow: 0 1px 0\n rgba(46, 59, 66, calc(var(--rsbs-content-opacity,1) * 0.125));\n z-index: 1;\n padding-top: calc(20px + env(safe-area-inset-top));\n padding-bottom: 8px;\n}\n\n[data-rsbs-header]:before {\n position: absolute;\n content: '';\n display: block;\n width: 36px;\n height: 4px;\n top: calc(8px + env(safe-area-inset-top));\n left: 50%;\n transform: translateX(-50%);\n border-radius: 2px;\n background-color: hsla(0, 0%, 0%, 0.14);\n background-color: var(--rsbs-handle-bg,hsla(0, 0%, 0%, 0.14));\n}\n\n@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 2dppx) {\n [data-rsbs-header]:before {\n transform: translateX(-50%) scaleY(0.75);\n }\n}\n\n[data-rsbs-has-header='false'] [data-rsbs-header] {\n box-shadow: none;\n padding-top: calc(12px + env(safe-area-inset-top));\n}\n\n[data-rsbs-scroll] {\n flex-shrink: 1;\n flex-grow: 1;\n -webkit-tap-highlight-color: revert;\n -webkit-touch-callout: revert;\n -webkit-user-select: auto;\n -ms-user-select: auto;\n -moz-user-select: auto;\n user-select: auto;\n overflow: auto;\n -ms-scroll-chaining: none;\n overscroll-behavior: contain;\n -webkit-overflow-scrolling: touch;\n}\n\n[data-rsbs-scroll]:focus {\n outline: none;\n}\n\n[data-rsbs-has-footer='false'] [data-rsbs-content] {\n padding-bottom: env(safe-area-inset-bottom);\n}\n\n[data-rsbs-content] {\n /* The overflow hidden is to ensure any margin on child nodes are included when the resize observer is measuring the height */\n overflow: hidden;\n}\n\n[data-rsbs-footer] {\n box-shadow: 0 -1px 0 rgba(46, 59, 66, calc(1 * 0.125)),\n 0 2px 0 #fff;\n box-shadow: 0 -1px 0 rgba(46, 59, 66, calc(var(--rsbs-content-opacity,1) * 0.125)),\n 0 2px 0 var(--rsbs-bg,#fff);\n overflow: hidden;\n z-index: 1;\n padding-bottom: calc(16px + env(safe-area-inset-bottom));\n}\n\n[data-rsbs-is-dismissable='true'] [data-rsbs-header] > *, [data-rsbs-is-dismissable='true'] [data-rsbs-scroll] > *, [data-rsbs-is-dismissable='true'] [data-rsbs-footer] > *, [data-rsbs-is-dismissable='false'][data-rsbs-state='opening'] [data-rsbs-header] > *, [data-rsbs-is-dismissable='false'][data-rsbs-state='closing'] [data-rsbs-header] > *, [data-rsbs-is-dismissable='false'][data-rsbs-state='opening'] [data-rsbs-scroll] > *, [data-rsbs-is-dismissable='false'][data-rsbs-state='closing'] [data-rsbs-scroll] > *, [data-rsbs-is-dismissable='false'][data-rsbs-state='opening'] [data-rsbs-footer] > *, [data-rsbs-is-dismissable='false'][data-rsbs-state='closing'] [data-rsbs-footer] > * {\n opacity: 1;\n opacity: var(--rsbs-content-opacity,1);\n }\n\n[data-rsbs-is-dismissable='true'] [data-rsbs-backdrop], [data-rsbs-is-dismissable='false'][data-rsbs-state='opening'] [data-rsbs-backdrop], [data-rsbs-is-dismissable='false'][data-rsbs-state='closing'] [data-rsbs-backdrop] {\n opacity: 1;\n opacity: var(--rsbs-backdrop-opacity,1);\n }\n\n[data-rsbs-state='closed'],\n[data-rsbs-state='closing'] {\n /* Allows interactions on the rest of the page before the close transition is finished */\n pointer-events: none;\n}\n");const Eh=r.css`
|
|
2440
2451
|
a,
|
|
2441
2452
|
p {
|
|
2442
2453
|
font-size: 16px;
|
|
@@ -2468,19 +2479,19 @@ function Ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2468
2479
|
a:hover {
|
|
2469
2480
|
text-decoration: underline;
|
|
2470
2481
|
}
|
|
2471
|
-
`,
|
|
2482
|
+
`,Rh=r.css`
|
|
2472
2483
|
svg {
|
|
2473
2484
|
height: 12px;
|
|
2474
2485
|
width: 12px;
|
|
2475
2486
|
color: ${h("neutral",600)};
|
|
2476
2487
|
}
|
|
2477
|
-
`,
|
|
2488
|
+
`,Oh=r.css`
|
|
2478
2489
|
cursor: pointer;
|
|
2479
2490
|
color: ${h("neutral",600)};
|
|
2480
2491
|
display: flex;
|
|
2481
2492
|
justify-content: center;
|
|
2482
2493
|
align-items: center;
|
|
2483
|
-
`,
|
|
2494
|
+
`,Lh=(e,t)=>r.css`
|
|
2484
2495
|
min-height: 56px;
|
|
2485
2496
|
width: 100vw;
|
|
2486
2497
|
position: ${e?"sticky":"absolute"};
|
|
@@ -2490,7 +2501,7 @@ function Ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2490
2501
|
background-color: ${h("neutral",t?200:100)};
|
|
2491
2502
|
border-top: 1px solid ${h("neutral",400)};
|
|
2492
2503
|
z-index: 101;
|
|
2493
|
-
`,
|
|
2504
|
+
`,Th=e=>r.css`
|
|
2494
2505
|
height: 100%;
|
|
2495
2506
|
width: 100%;
|
|
2496
2507
|
max-width: ${e?`${e}px`:"100%"};
|
|
@@ -2505,7 +2516,7 @@ function Ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2505
2516
|
flex-direction: column;
|
|
2506
2517
|
align-items: flex-start;
|
|
2507
2518
|
}
|
|
2508
|
-
`,
|
|
2519
|
+
`,Ph=r.css`
|
|
2509
2520
|
display: flex;
|
|
2510
2521
|
align-items: center;
|
|
2511
2522
|
flex-wrap: wrap;
|
|
@@ -2518,7 +2529,7 @@ function Ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2518
2529
|
color: ${h("neutral",700)};
|
|
2519
2530
|
text-decoration: underline;
|
|
2520
2531
|
}
|
|
2521
|
-
`,
|
|
2532
|
+
`,Mh=r.css`
|
|
2522
2533
|
width: 240px;
|
|
2523
2534
|
font-size: 14px;
|
|
2524
2535
|
line-height: 20px;
|
|
@@ -2529,13 +2540,13 @@ function Ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2529
2540
|
@media screen and (max-width: 768px) {
|
|
2530
2541
|
text-align: left;
|
|
2531
2542
|
}
|
|
2532
|
-
`,
|
|
2543
|
+
`,_h=r.css`
|
|
2533
2544
|
width: 100%;
|
|
2534
2545
|
display: flex;
|
|
2535
2546
|
align-items: center;
|
|
2536
2547
|
height: 56px;
|
|
2537
2548
|
background-color: ${h("neutral",200)};
|
|
2538
|
-
`,
|
|
2549
|
+
`,Dh=r.css`
|
|
2539
2550
|
height: 56px;
|
|
2540
2551
|
width: 99%;
|
|
2541
2552
|
background-color: ${h("neutral",200)};
|
|
@@ -2629,9 +2640,9 @@ function Ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2629
2640
|
opacity: 1;
|
|
2630
2641
|
}
|
|
2631
2642
|
}
|
|
2632
|
-
`,Dh=r.css`
|
|
2633
|
-
position: relative;
|
|
2634
2643
|
`,Ih=r.css`
|
|
2644
|
+
position: relative;
|
|
2645
|
+
`,Vh=r.css`
|
|
2635
2646
|
position: absolute;
|
|
2636
2647
|
top: -5px;
|
|
2637
2648
|
right: -5px;
|
|
@@ -2646,7 +2657,7 @@ function Ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2646
2657
|
display: flex;
|
|
2647
2658
|
justify-content: center;
|
|
2648
2659
|
align-items: center;
|
|
2649
|
-
`,
|
|
2660
|
+
`,Nh=(e,t)=>Math.max(0,e.findIndex((e=>e.value===t))),Ah=(e,t)=>r.css`
|
|
2650
2661
|
height: ${e?"96px":"48px"};
|
|
2651
2662
|
width: 100%;
|
|
2652
2663
|
background-color: ${h("neutral",100)};
|
|
@@ -2655,7 +2666,7 @@ function Ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2655
2666
|
left: 0;
|
|
2656
2667
|
z-index: 102;
|
|
2657
2668
|
border-bottom: 1px solid ${h("neutral",400)};
|
|
2658
|
-
`,
|
|
2669
|
+
`,zh=r.css`
|
|
2659
2670
|
height: 48px;
|
|
2660
2671
|
width: 100%;
|
|
2661
2672
|
background-color: ${h("neutral",100)};
|
|
@@ -2665,7 +2676,7 @@ function Ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2665
2676
|
justify-content: flex-start;
|
|
2666
2677
|
gap: 0px;
|
|
2667
2678
|
padding: 8px 16px;
|
|
2668
|
-
`,
|
|
2679
|
+
`,Bh=(e,t)=>r.css`
|
|
2669
2680
|
height: 48px;
|
|
2670
2681
|
width: 100%;
|
|
2671
2682
|
max-width: ${t?`${t}px`:"100%"};
|
|
@@ -2675,7 +2686,7 @@ function Ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2675
2686
|
justify-content: space-between;
|
|
2676
2687
|
margin: 0 auto;
|
|
2677
2688
|
padding: 8px 16px;
|
|
2678
|
-
`,
|
|
2689
|
+
`,Hh=r.css`
|
|
2679
2690
|
outline: none;
|
|
2680
2691
|
a {
|
|
2681
2692
|
&:focus-visible {
|
|
@@ -2686,12 +2697,12 @@ function Ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2686
2697
|
outline-width: 2px;
|
|
2687
2698
|
}
|
|
2688
2699
|
}
|
|
2689
|
-
`,
|
|
2700
|
+
`,Fh=e=>r.css`
|
|
2690
2701
|
display: ${e?"none":"flex"};
|
|
2691
2702
|
align-items: center;
|
|
2692
2703
|
justify-content: flex-start;
|
|
2693
2704
|
gap: 0px;
|
|
2694
|
-
`,
|
|
2705
|
+
`,Zh=e=>r.css`
|
|
2695
2706
|
font-size: 16px;
|
|
2696
2707
|
line-height: 24px;
|
|
2697
2708
|
font-weight: 400;
|
|
@@ -2716,12 +2727,12 @@ function Ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2716
2727
|
font-weight: 700;
|
|
2717
2728
|
color: ${h("accessible","controls-on-neutral-lights")};
|
|
2718
2729
|
`:""}
|
|
2719
|
-
`,
|
|
2730
|
+
`,Wh=r.css`
|
|
2720
2731
|
height: 48px;
|
|
2721
2732
|
display: flex;
|
|
2722
2733
|
align-items: center;
|
|
2723
2734
|
justify-content: flex-end;
|
|
2724
|
-
`,
|
|
2735
|
+
`,Gh=e=>r.css`
|
|
2725
2736
|
height: 100%;
|
|
2726
2737
|
font-size: 16px;
|
|
2727
2738
|
line-height: 24px;
|
|
@@ -2740,7 +2751,7 @@ function Ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2740
2751
|
}
|
|
2741
2752
|
}
|
|
2742
2753
|
`:""}
|
|
2743
|
-
`,
|
|
2754
|
+
`,qh=e=>r.css`
|
|
2744
2755
|
height: 100%;
|
|
2745
2756
|
display: flex;
|
|
2746
2757
|
align-items: center;
|
|
@@ -2748,7 +2759,7 @@ function Ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2748
2759
|
gap: 20px;
|
|
2749
2760
|
padding-left: 16px;
|
|
2750
2761
|
border-left: 1px solid ${h("neutral",e?700:300)};
|
|
2751
|
-
`,
|
|
2762
|
+
`,Uh=r.css`
|
|
2752
2763
|
background-color: none;
|
|
2753
2764
|
border: none;
|
|
2754
2765
|
cursor: pointer;
|
|
@@ -2773,7 +2784,7 @@ function Ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2773
2784
|
outline-width: 2px;
|
|
2774
2785
|
background-color: ${h("neutral",200)};
|
|
2775
2786
|
}
|
|
2776
|
-
`,
|
|
2787
|
+
`,Xh=e=>r.css`
|
|
2777
2788
|
position: absolute;
|
|
2778
2789
|
top: 48px;
|
|
2779
2790
|
right: 0;
|
|
@@ -2786,10 +2797,10 @@ function Ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2786
2797
|
justify-content: flex-start;
|
|
2787
2798
|
gap: 16px;
|
|
2788
2799
|
transition: width 0.5s ease-in-out;
|
|
2789
|
-
`,
|
|
2800
|
+
`,Yh=r.css`
|
|
2790
2801
|
height: 100%;
|
|
2791
2802
|
width: 100%;
|
|
2792
|
-
`,
|
|
2803
|
+
`,Kh=r.css`
|
|
2793
2804
|
background-color: ${h("neutral",200)};
|
|
2794
2805
|
border-bottom: 1px solid ${h("neutral",300)};
|
|
2795
2806
|
|
|
@@ -2809,13 +2820,13 @@ function Ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2809
2820
|
margin-left: -12px;
|
|
2810
2821
|
}
|
|
2811
2822
|
}
|
|
2812
|
-
`,Kh=r.css`
|
|
2813
|
-
background-color: ${h("neutral",100)};
|
|
2814
2823
|
`,Jh=r.css`
|
|
2824
|
+
background-color: ${h("neutral",100)};
|
|
2825
|
+
`,Qh=r.css`
|
|
2815
2826
|
min-height: 100vh;
|
|
2816
2827
|
width: 100%;
|
|
2817
2828
|
overflow-y: scroll;
|
|
2818
|
-
`;r.css``;const
|
|
2829
|
+
`;r.css``;const ef=e=>r.css`
|
|
2819
2830
|
display: inline-block;
|
|
2820
2831
|
width: 100%;
|
|
2821
2832
|
padding: 12px 16px;
|
|
@@ -2844,7 +2855,7 @@ function Ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2844
2855
|
outline-width: 2px;
|
|
2845
2856
|
background-color: ${h("neutral",200)};
|
|
2846
2857
|
}
|
|
2847
|
-
`,
|
|
2858
|
+
`,tf=r.css`
|
|
2848
2859
|
width: 100%;
|
|
2849
2860
|
padding: 12px 16px;
|
|
2850
2861
|
display: flex;
|
|
@@ -2868,7 +2879,7 @@ function Ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2868
2879
|
outline-width: 2px;
|
|
2869
2880
|
background-color: ${h("neutral",200)};
|
|
2870
2881
|
}
|
|
2871
|
-
`,
|
|
2882
|
+
`,nf=e=>r.css`
|
|
2872
2883
|
position: absolute;
|
|
2873
2884
|
top: 0px;
|
|
2874
2885
|
right: 0;
|
|
@@ -2880,7 +2891,7 @@ function Ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2880
2891
|
align-items: flex-start;
|
|
2881
2892
|
justify-content: flex-start;
|
|
2882
2893
|
transition: width 0.5s ease-in-out;
|
|
2883
|
-
`,
|
|
2894
|
+
`,rf=r.css`
|
|
2884
2895
|
height: 48px;
|
|
2885
2896
|
width: 100%;
|
|
2886
2897
|
display: flex;
|
|
@@ -2891,7 +2902,7 @@ function Ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2891
2902
|
position: relative;
|
|
2892
2903
|
top: 0;
|
|
2893
2904
|
left: 0;
|
|
2894
|
-
`,
|
|
2905
|
+
`,of=r.css`
|
|
2895
2906
|
position: absolute;
|
|
2896
2907
|
bottom: 0;
|
|
2897
2908
|
left: 0;
|
|
@@ -2906,7 +2917,7 @@ function Ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2906
2917
|
button {
|
|
2907
2918
|
width: calc(48% - 24px);
|
|
2908
2919
|
}
|
|
2909
|
-
`,
|
|
2920
|
+
`,af=({navigationSection:e,utilitySection:r,actionsSection:o,linkRouter:i,isOpen:a,setIsOpen:s,pathname:l})=>{const[c,u]=n.useState(void 0),[d,p]=n.useState(-1),h=n.useRef(null),f=n.useRef([]),x=i;return t.jsxs(t.Fragment,{children:[t.jsx("div",{css:Xh(a),children:a&&t.jsxs("div",{css:Yh,children:[t.jsxs("div",{style:{overflowY:"scroll",width:"100%",height:"100%",paddingBottom:"72px"},children:[r?t.jsx("div",{css:Kh,children:r?.map((e=>t.jsx("div",{className:"ds-utility-item",children:e})))}):null,e?t.jsx("div",{css:Jh,children:e.map(((e,n)=>e.link?t.jsx(x,{to:e.link,href:e.link,onClick:()=>{u(void 0),p(-1),s(!1)},css:ef(l===e.link),children:e.label},e.label):t.jsxs("button",{css:tf,type:"button",ref:e=>f.current[n]=e,onClick:()=>{e.items&&(u(e),p(n),setTimeout((()=>{h.current?.focus()}),100))},children:[e.label,e.items?t.jsx($,{rotate:"270",color:"var(--chakra-colors-neutral-700)"}):null]},e.label)))}):null]}),o?t.jsx("div",{css:of,children:o.map((e=>t.jsx(b,{label:e.label,onClick:()=>{e?.onClick?.(),u(void 0),p(-1),s(!1)}},e.label)))}):null]})}),t.jsx("div",{css:nf(!!c?.items),children:c?.items?t.jsxs(t.Fragment,{children:[t.jsxs("div",{css:rf,children:[t.jsxs("button",{type:"button",onClick:()=>{u(void 0),p(-1),f.current[d]?.focus()},"aria-label":"Go back",css:Uh,ref:h,children:[t.jsx($,{rotate:"90",color:"var(--chakra-colors-neutral-700)"}),c?.label]}),t.jsxs("button",{type:"button",onClick:()=>{u(void 0),p(-1),s(!1)},"aria-label":"Close menu",css:Uh,children:["Close",t.jsx(E,{height:"16px",width:"16px"})]})]}),t.jsx("div",{css:Qh,children:c?.items?.map((e=>t.jsx(x,{to:e.link,href:e.link,css:ef(),onClick:()=>{u(void 0),p(-1),s(!1)},children:e.label},e.label)))})]}):null})]})},sf=1023,lf=r.css`
|
|
2910
2921
|
width: 64px;
|
|
2911
2922
|
height: 100%;
|
|
2912
2923
|
z-index: 100;
|
|
@@ -2915,7 +2926,7 @@ function Ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2915
2926
|
display: flex;
|
|
2916
2927
|
flex-direction: column;
|
|
2917
2928
|
justify-content: space-between;
|
|
2918
|
-
`,
|
|
2929
|
+
`,cf=r.css`
|
|
2919
2930
|
width: 64px;
|
|
2920
2931
|
height: 64px;
|
|
2921
2932
|
background-color: ${h("neutral",200)};
|
|
@@ -3005,7 +3016,7 @@ function Ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3005
3016
|
}
|
|
3006
3017
|
}
|
|
3007
3018
|
}
|
|
3008
|
-
`,
|
|
3019
|
+
`,uf=r.css`
|
|
3009
3020
|
display: flex;
|
|
3010
3021
|
justify-content: center;
|
|
3011
3022
|
align-items: center;
|
|
@@ -3018,7 +3029,7 @@ function Ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3018
3029
|
fill: ${h("neutral",600)};
|
|
3019
3030
|
}
|
|
3020
3031
|
}
|
|
3021
|
-
`,
|
|
3032
|
+
`,df=r.css`
|
|
3022
3033
|
width: 64px;
|
|
3023
3034
|
height: 64px;
|
|
3024
3035
|
background-color: ${h("neutral",200)};
|
|
@@ -3056,7 +3067,7 @@ function Ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3056
3067
|
text-align: center;
|
|
3057
3068
|
color: ${h("neutral",600)};
|
|
3058
3069
|
}
|
|
3059
|
-
`,
|
|
3070
|
+
`,pf=r.css`
|
|
3060
3071
|
width: 320px;
|
|
3061
3072
|
height: 100%;
|
|
3062
3073
|
z-index: 100;
|
|
@@ -3065,14 +3076,14 @@ function Ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3065
3076
|
overflow-y: auto;
|
|
3066
3077
|
overflow-x: hidden;
|
|
3067
3078
|
border-right: 1px solid ${h("neutral",300)};
|
|
3068
|
-
`,
|
|
3079
|
+
`,hf=e=>r.css`
|
|
3069
3080
|
width: 100%;
|
|
3070
3081
|
display: flex;
|
|
3071
3082
|
align-items: center;
|
|
3072
3083
|
height: 40px;
|
|
3073
3084
|
|
|
3074
3085
|
${"view"===e&&`\n border: 1px solid ${h("neutral",400)};\n background-color: ${h("neutral",200)};\n border-radius: 4px;\n padding: 4px;\n `}
|
|
3075
|
-
`,
|
|
3086
|
+
`,ff=r.css`
|
|
3076
3087
|
width: 99%;
|
|
3077
3088
|
height: 40px;
|
|
3078
3089
|
padding: 8px 16px;
|
|
@@ -3088,7 +3099,7 @@ function Ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3088
3099
|
&:focus-visible {
|
|
3089
3100
|
box-shadow: none;
|
|
3090
3101
|
}
|
|
3091
|
-
`,
|
|
3102
|
+
`,xf=r.css`
|
|
3092
3103
|
background-color: ${h("neutral",200)};
|
|
3093
3104
|
color: ${h("neutral",700)};
|
|
3094
3105
|
|
|
@@ -3145,11 +3156,11 @@ function Ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3145
3156
|
opacity: 1;
|
|
3146
3157
|
}
|
|
3147
3158
|
}
|
|
3148
|
-
`,
|
|
3159
|
+
`,gf=r.css`
|
|
3149
3160
|
width: 4px;
|
|
3150
3161
|
height: 24px;
|
|
3151
3162
|
background-color: ${h("neutral",400)};
|
|
3152
|
-
`,
|
|
3163
|
+
`,vf=r.css`
|
|
3153
3164
|
height: 32px;
|
|
3154
3165
|
border-radius: 2px;
|
|
3155
3166
|
background-color: ${h("neutral",200)};
|
|
@@ -3222,7 +3233,7 @@ function Ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3222
3233
|
opacity: 1;
|
|
3223
3234
|
}
|
|
3224
3235
|
}
|
|
3225
|
-
`,
|
|
3236
|
+
`,mf=(e,t)=>Math.max(0,e.findIndex((e=>e.value===t))),bf=e=>1===e?"none":2===e?"left":"right",yf={small:"16px",medium:"24px",large:"40px",default:"16px"};function wf(e,t,n,o){const i=function(e,t){return"string"==typeof t&&""!==t.trim()?t:e&&yf[e]?yf[e]:yf.default}(e,t),a=n?h("neutral",200):h("primary",300),s=o??a,l=o&&n?"opacity: 0.7;":"",c=h("neutral",n?400:800);return r.css`
|
|
3226
3237
|
height: ${i};
|
|
3227
3238
|
width: ${i};
|
|
3228
3239
|
border-radius: 50%;
|
|
@@ -3254,12 +3265,12 @@ function Ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3254
3265
|
background-color: ${h("primary",500)};
|
|
3255
3266
|
}
|
|
3256
3267
|
}
|
|
3257
|
-
`}const
|
|
3268
|
+
`}const Cf=e=>r.css`
|
|
3258
3269
|
width: ${e||"16px"};
|
|
3259
3270
|
position: absolute;
|
|
3260
3271
|
top: -8px;
|
|
3261
3272
|
left: 15px;
|
|
3262
|
-
`,
|
|
3273
|
+
`,jf=n.forwardRef((({name:n,ariaLabel:o,size:i="medium",customSize:a="",src:s,srcSet:l,onClick:c,notificationCount:u,disabled:d=!0,customBackgroundColor:p=""},f)=>{const x=()=>{d||c?.()},g=(()=>{let e="";return u&&u>0&&(e=`${u>99?"99+":u}`),e})();let v="16px";u&&u>99?v="28px":u&&u>9&&(v="22px");const m=!!s||!!l,b=c&&!d;return t.jsxs(e.Avatar.Root,{"aria-label":o||n,ref:f,css:wf(i,a,d,p),onClick:x,onKeyDown:e=>{d||"Enter"!==e.key||x()},role:b?"button":void 0,tabIndex:b?0:void 0,"aria-disabled":d,children:[m?t.jsx(e.Avatar.Image,{src:s,srcSet:l}):t.jsx(Q,{size:"100%",style:{padding:"15%",color:d?h("neutral",400):void 0}}),g.length>0?t.jsx("div",{css:Cf(v),children:t.jsx("div",{css:r.css`
|
|
3263
3274
|
height: 16px;
|
|
3264
3275
|
width: auto;
|
|
3265
3276
|
background-color: ${h("error",500)};
|
|
@@ -3271,16 +3282,16 @@ function Ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3271
3282
|
font-size: 12px;
|
|
3272
3283
|
font-weight: 700;
|
|
3273
3284
|
color: ${h("error",100)};
|
|
3274
|
-
`,children:t.jsx("p",{"aria-label":`${u} unread message`,children:g})})}):null]})})),
|
|
3285
|
+
`,children:t.jsx("p",{"aria-label":`${u} unread message`,children:g})})}):null]})})),kf=r.css`
|
|
3275
3286
|
display: flex;
|
|
3276
3287
|
justify-content: flex-start;
|
|
3277
3288
|
align-items: center;
|
|
3278
3289
|
gap: 8px;
|
|
3279
|
-
|
|
3290
|
+
`,$f=e=>r.css`
|
|
3280
3291
|
width: ${e||"16px"};
|
|
3281
3292
|
position: relative;
|
|
3282
3293
|
display: flex;
|
|
3283
|
-
|
|
3294
|
+
`,Sf=r.css`
|
|
3284
3295
|
height: 4px;
|
|
3285
3296
|
width: 4px;
|
|
3286
3297
|
background-color: ${h("error",500)};
|
|
@@ -3288,7 +3299,7 @@ function Ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3288
3299
|
position: absolute;
|
|
3289
3300
|
top: 0px;
|
|
3290
3301
|
right: 0px;
|
|
3291
|
-
`,
|
|
3302
|
+
`,Ef=r.css`
|
|
3292
3303
|
height: 10px;
|
|
3293
3304
|
background-color: ${h("error",500)};
|
|
3294
3305
|
padding: 0 3px 1px 3px;
|
|
@@ -3299,11 +3310,11 @@ function Ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3299
3310
|
position: absolute;
|
|
3300
3311
|
top: -2px;
|
|
3301
3312
|
left: 9px;
|
|
3302
|
-
`,
|
|
3313
|
+
`,Rf=r.css`
|
|
3303
3314
|
font-size: 9px;
|
|
3304
3315
|
font-weight: 700;
|
|
3305
3316
|
color: ${h("error",100)};
|
|
3306
|
-
`,
|
|
3317
|
+
`,Of=r.css`
|
|
3307
3318
|
height: 16px;
|
|
3308
3319
|
min-width: 16px;
|
|
3309
3320
|
background-color: ${h("error",500)};
|
|
@@ -3312,11 +3323,11 @@ function Ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3312
3323
|
justify-content: center;
|
|
3313
3324
|
align-items: center;
|
|
3314
3325
|
padding: 0px 4px 1px 4px;
|
|
3315
|
-
`,
|
|
3326
|
+
`,Lf=r.css`
|
|
3316
3327
|
font-size: 16px;
|
|
3317
3328
|
font-weight: 700;
|
|
3318
3329
|
color: ${h("error",100)};
|
|
3319
|
-
`,
|
|
3330
|
+
`,Tf=(e,t)=>r.css`
|
|
3320
3331
|
width: 100%;
|
|
3321
3332
|
max-width: ${"small"===e?"234px":"320px"};
|
|
3322
3333
|
border-radius: 4px;
|
|
@@ -3331,7 +3342,7 @@ function Ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3331
3342
|
button {
|
|
3332
3343
|
margin-left: ${t?0:"24px"};
|
|
3333
3344
|
}
|
|
3334
|
-
`,
|
|
3345
|
+
`,Pf=r.css`
|
|
3335
3346
|
display: flex;
|
|
3336
3347
|
align-items: flex-start;
|
|
3337
3348
|
gap: 8px;
|
|
@@ -3339,28 +3350,28 @@ function Ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3339
3350
|
svg {
|
|
3340
3351
|
margin-top: 6px;
|
|
3341
3352
|
}
|
|
3342
|
-
`,
|
|
3353
|
+
`,Mf=e=>r.css`
|
|
3343
3354
|
color: ${h("neutral",800)};
|
|
3344
3355
|
font-size: ${"small"===e?"14px":"18px"};
|
|
3345
3356
|
line-height: ${"small"===e?"20px":"28px"};
|
|
3346
3357
|
font-weight: 400;
|
|
3347
3358
|
text-align: left;
|
|
3348
|
-
`,
|
|
3359
|
+
`,_f=e=>r.css`
|
|
3349
3360
|
color: ${h("neutral",700)};
|
|
3350
3361
|
font-size: ${"small"===e?"12px":"16px"};
|
|
3351
3362
|
line-height: ${"small"===e?"16px":"24px"};
|
|
3352
3363
|
font-weight: 400;
|
|
3353
3364
|
margin-left: 24px;
|
|
3354
3365
|
text-align: left;
|
|
3355
|
-
`,
|
|
3366
|
+
`,Df=r.css`
|
|
3356
3367
|
background-color: ${h("neutral",100)};
|
|
3357
3368
|
border: 1px solid ${h("neutral",300)};
|
|
3358
3369
|
color: ${h("neutral",700)};
|
|
3359
|
-
`,
|
|
3370
|
+
`,If=r.css`
|
|
3360
3371
|
background-color: ${h("neutral",200)};
|
|
3361
3372
|
border: 1px solid ${h("neutral",300)};
|
|
3362
3373
|
color: ${h("neutral",700)};
|
|
3363
|
-
`,
|
|
3374
|
+
`,Vf=r.css`
|
|
3364
3375
|
background-color: ${h("success",100)};
|
|
3365
3376
|
border: 1px solid ${h("success",300)};
|
|
3366
3377
|
color: ${h("success",500)};
|
|
@@ -3368,7 +3379,7 @@ function Ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3368
3379
|
p {
|
|
3369
3380
|
color: ${h("success",900)};
|
|
3370
3381
|
}
|
|
3371
|
-
`,
|
|
3382
|
+
`,Nf=r.css`
|
|
3372
3383
|
background-color: ${h("warning",100)};
|
|
3373
3384
|
border: 1px solid ${h("warning",300)};
|
|
3374
3385
|
color: ${h("warning",500)};
|
|
@@ -3376,7 +3387,7 @@ function Ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3376
3387
|
p {
|
|
3377
3388
|
color: ${h("warning",900)};
|
|
3378
3389
|
}
|
|
3379
|
-
`,
|
|
3390
|
+
`,Af=r.css`
|
|
3380
3391
|
background-color: ${h("error",100)};
|
|
3381
3392
|
border: 1px solid ${h("error",300)};
|
|
3382
3393
|
color: ${h("error",500)};
|
|
@@ -3384,32 +3395,32 @@ function Ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3384
3395
|
p {
|
|
3385
3396
|
color: ${h("error",900)};
|
|
3386
3397
|
}
|
|
3387
|
-
`,
|
|
3398
|
+
`,zf=r.css`
|
|
3388
3399
|
height: 8px;
|
|
3389
3400
|
width: 100%;
|
|
3390
3401
|
background-color: ${h("neutral",300)};
|
|
3391
3402
|
display: flex;
|
|
3392
3403
|
align-items: center;
|
|
3393
3404
|
justify-content: flex-start;
|
|
3394
|
-
`,
|
|
3405
|
+
`,Bf=e=>r.css`
|
|
3395
3406
|
height: 100%;
|
|
3396
3407
|
width: ${e}%;
|
|
3397
3408
|
background-color: ${h("primary",500)};
|
|
3398
3409
|
transition: width 0.5s ease-in-out;
|
|
3399
|
-
`,
|
|
3410
|
+
`,Hf=r.css`
|
|
3400
3411
|
width: 100%;
|
|
3401
3412
|
display: flex;
|
|
3402
3413
|
align-items: center;
|
|
3403
3414
|
justify-content: space-between;
|
|
3404
3415
|
position: relative;
|
|
3405
|
-
`,
|
|
3416
|
+
`,Ff=r.css`
|
|
3406
3417
|
height: 60px;
|
|
3407
3418
|
width: 80px;
|
|
3408
3419
|
display: flex;
|
|
3409
3420
|
flex-direction: column;
|
|
3410
3421
|
align-items: center;
|
|
3411
3422
|
justify-content: space-between;
|
|
3412
|
-
`,
|
|
3423
|
+
`,Zf=(e,t)=>r.css`
|
|
3413
3424
|
height: 32px;
|
|
3414
3425
|
width: 32px;
|
|
3415
3426
|
display: flex;
|
|
@@ -3445,12 +3456,12 @@ function Ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3445
3456
|
}
|
|
3446
3457
|
|
|
3447
3458
|
${t?`\n background-color: ${h("neutral",300)};\n \n &:hover {\n background-color: ${h("neutral",300)};\n box-shadow: none;\n }\n `:""}
|
|
3448
|
-
`,
|
|
3459
|
+
`,Wf=e=>r.css`
|
|
3449
3460
|
color: ${h("neutral",e?800:600)};
|
|
3450
3461
|
font-size: 14px;
|
|
3451
3462
|
line-height: 20px;
|
|
3452
3463
|
font-weight: 400;
|
|
3453
|
-
`,
|
|
3464
|
+
`,Gf=r.css`
|
|
3454
3465
|
height: 1px;
|
|
3455
3466
|
width: 100%;
|
|
3456
3467
|
padding: 0 30px;
|
|
@@ -3458,11 +3469,11 @@ function Ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3458
3469
|
top: 16px;
|
|
3459
3470
|
left: 0;
|
|
3460
3471
|
z-index: -1;
|
|
3461
|
-
`,
|
|
3472
|
+
`,qf=r.css`
|
|
3462
3473
|
height: 1px;
|
|
3463
3474
|
width: 100%;
|
|
3464
3475
|
background-color: ${h("neutral",400)};
|
|
3465
|
-
`,
|
|
3476
|
+
`,Uf=r.css`
|
|
3466
3477
|
justify-content: space-between;
|
|
3467
3478
|
align-items: center;
|
|
3468
3479
|
gap: 8px;
|
|
@@ -3505,21 +3516,21 @@ function Ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3505
3516
|
color: ${h("error",900)};
|
|
3506
3517
|
}
|
|
3507
3518
|
}
|
|
3508
|
-
`,
|
|
3519
|
+
`,Xf=r.css`
|
|
3509
3520
|
font-size: 18px;
|
|
3510
3521
|
line-height: 28px;
|
|
3511
3522
|
font-weight: 400;
|
|
3512
3523
|
color: ${h("neutral",800)};
|
|
3513
|
-
`,
|
|
3524
|
+
`,Yf=r.css`
|
|
3514
3525
|
font-size: 16px;
|
|
3515
3526
|
line-height: 24px;
|
|
3516
3527
|
font-weight: 400;
|
|
3517
3528
|
color: ${h("neutral",700)};
|
|
3518
|
-
`,Yf=r.css`
|
|
3519
|
-
padding: 6px;
|
|
3520
3529
|
`,Kf=r.css`
|
|
3521
3530
|
padding: 6px;
|
|
3522
|
-
`,Jf=
|
|
3531
|
+
`,Jf=r.css`
|
|
3532
|
+
padding: 6px;
|
|
3533
|
+
`,Qf={pauseOnPageIdle:!0,offsets:"24px"},ex={"top-start":e.createToaster({placement:"top-start",...Qf}),"top-end":e.createToaster({placement:"top-end",...Qf}),"bottom-start":e.createToaster({placement:"bottom-start",...Qf}),"bottom-end":e.createToaster({placement:"bottom-end",...Qf})};exports.AnalysisWidget=({children:r,header:o,footer:i,expanded:a=!0,collapsible:s=!0,actions:l,showFooterOnCollapsed:c=!1})=>{const u="analysis-widget-item",[d,p]=n.useState(a),h=`analysis-widget-header-${u}`;return t.jsx(e.Box,{as:"section","aria-labelledby":h,css:oa,children:t.jsxs(e.Accordion.Root,{multiple:!0,value:s?void 0:[u],defaultValue:a?[u]:[],children:[t.jsxs(e.Accordion.Item,{css:aa,value:u,children:[o&&t.jsx(e.Accordion.ItemTrigger,{id:h,role:"button","aria-expanded":d,tabIndex:0,css:ia,pointerEvents:s?"auto":"none",onClick:s?()=>{p(!d)}:void 0,children:t.jsxs(e.Flex,{gap:3,flex:"1",overflow:"hidden",alignItems:"top",justifyContent:"space-between",children:[o,l&&l.map((e=>t.jsx(b,{variant:"secondary",size:"small",label:e.label,onClick:t=>{e.onClick(),t.preventDefault(),t.stopPropagation()},leftIcon:e?.icon},e.label))),s&&t.jsx(e.Accordion.ItemIndicator,{height:"16px",display:"flex",children:t.jsx($,{"aria-label":"Toggle section",color:"var(--chakra-colors-neutral-700)",height:"16px",width:"16px"})})]})}),t.jsxs("div",{className:d?"item-content-open":"item-content-closed","aria-hidden":!d,children:[r,!c&&i&&t.jsx(e.Box,{css:sa,children:i})]})]}),c&&i&&t.jsx(e.Box,{css:sa,children:i})]})})},exports.Avatar=jf,exports.Badge=({hasNotification:e,notificationCount:r,label:o})=>{const[i,a]=n.useState(!1);n.useEffect((()=>{const e=()=>{window.innerWidth<1024?a(!0):a(!1)};return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[]);const s=(()=>{let e="";return r&&r>0&&(e=`${r>99?"99+":r}`),e})();let l="16px";return r&&r>99?l="28px":r&&r>9&&(l="22px"),i?t.jsxs("div",{css:kf,role:"status","aria-live":"polite",children:[t.jsxs("div",{css:$f(),children:[t.jsx(I,{color:"currentColor",height:"16px",width:"16px"}),!e||r||o?null:t.jsx("div",{css:Sf,"aria-hidden":!0})]}),o?t.jsx("p",{children:o}):null,s.length>0?t.jsx("div",{css:Of,children:t.jsx("p",{css:Lf,"aria-label":`${r} unread message`,children:s})}):null]}):t.jsxs("div",{css:kf,role:"status","aria-live":"polite",children:[o?t.jsx("p",{children:o}):null,t.jsxs("div",{css:$f(l),children:[s.length>0?t.jsx("div",{css:Ef,children:t.jsx("p",{css:Rf,"aria-label":`${r} unread message`,children:s})}):null,e&&!r?t.jsx("div",{css:Sf,"aria-hidden":!0}):null,t.jsx(I,{color:"currentColor",height:"16px",width:"16px"})]})]})},exports.BaseMap=({title:e,caption:o,additionalSettings:i,options:a,onOptionSelected:s,maxHeight:l="400px",maxWidth:c="260px"})=>{const u=n.useRef(null),d=n.useRef(null);return n.useEffect((()=>{const e=u.current,t=d.current;if(!e||!t)return;const n=()=>{e.focus()};if("undefined"!=typeof IntersectionObserver){let e=!1;const r=new IntersectionObserver((([t])=>{t?.isIntersecting?(e||n(),e=!0):e=!1}),{threshold:.01});return r.observe(t),()=>r.disconnect()}const r=window.setTimeout(n,0);return()=>window.clearTimeout(r)}),[]),t.jsx("div",{ref:d,css:bn(l,c),children:t.jsxs("div",{className:"ds-base-map-scroll-content",children:[t.jsxs("div",{css:yn,children:[t.jsx("h2",{ref:u,className:"ds-base-map-header-title",tabIndex:-1,children:e}),t.jsx("p",{className:"ds-base-map-header-caption",children:o})]}),t.jsxs("div",{css:wn,children:[i?t.jsx("div",{css:Cn,children:i.map((e=>t.jsxs("div",{children:[t.jsx(Re,{css:{},checked:e.checked,onCheckedChange:({checked:t})=>e.onCheckedChange({checked:Boolean(t)}),children:e.label}),e.checked&&e.children?t.jsx("div",{css:jn,children:e.children}):null]},e.label)))}):null,a?t.jsx("div",{css:kn,children:a.map((e=>{return t.jsxs("div",{css:$n(e.active),role:"button",onClick:()=>s?.(e),tabIndex:0,onKeyDown:t=>{"Enter"!==t.key&&" "!==t.key||s?.(e)},children:[t.jsx("div",{css:(n=e.imageUrl,r.css`
|
|
3523
3534
|
height: 32px;
|
|
3524
3535
|
width: 32px;
|
|
3525
3536
|
border: 1px solid ${h("neutral",300)};
|
|
@@ -3527,7 +3538,7 @@ function Ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3527
3538
|
background-image: url(${n});
|
|
3528
3539
|
background-size: cover;
|
|
3529
3540
|
background-position: center;
|
|
3530
|
-
`)}),t.jsxs("div",{css:Sn,children:[t.jsxs("div",{className:"ds-base-map-title-container",children:[t.jsx("p",{className:"ds-base-map-title",children:e.label}),e.active?t.jsx(Zt,{label:"Active",variant:"warning",size:"small",icon:t.jsx(C,{})}):null]}),t.jsx("p",{className:"ds-base-map-caption",children:e.caption}),e.active&&e.children?t.jsx("div",{className:"ds-base-map-children",children:e.children}):null]})]},e.label);var n}))}):null]})]})})},exports.Breadcrumb=({links:r,separator:o,maxItems:i=99,linkRouter:a})=>{const[s,l]=n.useState(r.length>i);n.useEffect((()=>{l(r.length>i)}),[r.length]);const c=a;return t.jsx(e.Breadcrumb.Root,{children:t.jsx(e.Breadcrumb.List,{gap:"16px",children:s?t.jsxs(t.Fragment,{children:[t.jsx(e.Breadcrumb.Item,{css:
|
|
3541
|
+
`)}),t.jsxs("div",{css:Sn,children:[t.jsxs("div",{className:"ds-base-map-title-container",children:[t.jsx("p",{className:"ds-base-map-title",children:e.label}),e.active?t.jsx(Zt,{label:"Active",variant:"warning",size:"small",icon:t.jsx(C,{})}):null]}),t.jsx("p",{className:"ds-base-map-caption",children:e.caption}),e.active&&e.children?t.jsx("div",{className:"ds-base-map-children",children:e.children}):null]})]},e.label);var n}))}):null]})]})})},exports.Breadcrumb=({links:r,separator:o,maxItems:i=99,linkRouter:a})=>{const[s,l]=n.useState(r.length>i);n.useEffect((()=>{l(r.length>i)}),[r.length]);const c=a;return t.jsx(e.Breadcrumb.Root,{children:t.jsx(e.Breadcrumb.List,{gap:"16px",children:s?t.jsxs(t.Fragment,{children:[t.jsx(e.Breadcrumb.Item,{css:Eh,children:t.jsxs(c,{to:r[0].link,href:r[0].link,children:[r[0].icon,r[0].label]})}),t.jsx(e.Breadcrumb.Separator,{css:Rh,children:o||t.jsx($,{rotate:"270"})}),t.jsx("li",{className:"chakra-breadcrumb__item",children:t.jsx("button",{css:Oh,type:"button",onClick:()=>l(!1),children:"..."})}),t.jsx(e.Breadcrumb.Separator,{css:Rh,children:o||t.jsx($,{rotate:"270"})}),t.jsx(e.Breadcrumb.Item,{css:Eh,children:t.jsxs("p",{"aria-current":"page","aria-label":r[r.length-1].label,children:[r[r.length-1].icon,r[r.length-1].label]})})]}):r.map(((i,a)=>i?.label?t.jsxs(n.Fragment,{children:[t.jsx(e.Breadcrumb.Item,{css:Eh,children:a<r.length-1?t.jsxs(c,{to:i.link,href:i.link,children:[i.icon,i.label]}):t.jsxs("p",{"aria-current":"page","aria-label":i.label,children:[i.label&&i.icon?i.icon:"",i.label]})}),a<r.length-1?t.jsx(e.Breadcrumb.Separator,{css:Rh,children:o||t.jsx($,{rotate:"270"})}):null]},i.label):null))})})},exports.Button=b,exports.Checkbox=Re,exports.CheckboxList=({label:o,caption:i,checkboxes:a,defaultValue:s,onCheckedChange:l,errorMessage:c,horizontal:u,required:d})=>{const[p,h]=n.useState(s?{[s]:!0}:{}),f=`${o}. ${i?`${i}.`:""} ${d?"Required.":"Optional"} ${c?`Error: ${c}.`:""} `;return t.jsxs(e.Group,{css:rt,"aria-label":f,children:[c?t.jsx("div",{css:st}):null,t.jsxs("div",{css:(x=!!c,r.css`
|
|
3531
3542
|
margin-left: ${x?"19px":"0px"};
|
|
3532
3543
|
`),children:[t.jsxs("p",{css:ot,"aria-label":o,children:[d&&t.jsx("span",{"aria-label":"required",children:"*"}),o]}),t.jsx("p",{css:it,"aria-label":i,children:i}),c?t.jsx("p",{css:lt,"aria-label":c,children:c}):null,t.jsx("div",{css:at(u),children:a.map((e=>t.jsx(Re,{css:{},defaultChecked:s===e.value,onCheckedChange:({checked:t})=>((e,t)=>{const n={...p};t&&(n[t]=e,h(n)),l&&l(n)})(t,e.name),...e},e.name)))})]})]});var x},exports.CheckboxOptionCard=({defaultValue:n,items:o,onValueChange:i})=>t.jsx(e.CheckboxGroup,{defaultValue:n,onValueChange:i,children:t.jsx(e.HStack,{alignItems:"flex-start",flexWrap:"wrap",gap:"12px",children:o.map((o=>{return t.jsxs(e.CheckboxCard.Root,{css:Oe,defaultChecked:-1!==n?.indexOf(o.value),disabled:o.disabled,value:o.value,children:[t.jsx(e.CheckboxCard.HiddenInput,{}),t.jsxs(e.CheckboxCard.Control,{css:Le,children:[t.jsxs(e.CheckboxCard.Content,{css:(a=o.variant,r.css`
|
|
3533
3544
|
width: 100%;
|
|
@@ -3542,13 +3553,13 @@ function Ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3542
3553
|
padding: 0px;
|
|
3543
3554
|
padding-top: 8px;
|
|
3544
3555
|
color: ${i?h("neutral",500):"inherit"};
|
|
3545
|
-
`),children:o.children}):null]},`${o.label}-${o.value}`);var i,a}))})}),exports.CloseButton=ae,exports.ClusterPoint=({onClick:e,triggerRef:t,showFocusState:n,count:r,mode:i,variant:a="cluster"})=>o.jsx(Rn,{count:r,mode:i,onClick:e,ref:t,showFocusState:n,variant:a}),exports.ExtendableCard=({children:n,header:r,footer:o})=>t.jsx(e.Box,{css:na,children:t.jsx(e.Accordion.Root,{multiple:!0,children:t.jsxs(e.Accordion.Item,{value:"extendable-card-item",children:[t.jsxs(e.Accordion.ItemTrigger,{css:ra,alignItems:"center",children:[t.jsx(e.Flex,{gap:3,flex:"1",overflow:"hidden",alignItems:"center",children:r}),t.jsx(e.Accordion.ItemIndicator,{children:t.jsx($,{color:"var(--chakra-colors-neutral-700)",height:"16px",width:"16px"})})]}),t.jsxs(e.Accordion.ItemContent,{children:[n,o]})]})})}),exports.Footer=({children:e,label:n="© World Resources Institute",fixed:r,filled:o,maxWidth:i})=>{const a=(new Date).getFullYear();return t.jsx("footer",{css:Oh(r,o),children:t.jsxs("div",{css:Lh(i),children:[t.jsx("div",{children:t.jsx(D,{height:"32px",width:"91px"})}),t.jsx("div",{css:Th,children:e}),t.jsx("div",{children:t.jsxs("p",{css:Ph,children:[n," ",a]})})]})})},exports.IconButton=ie,exports.InlineMessage=({label:e,caption:n,variant:r,size:o="large",icon:i=t.jsx(k,{height:"16px",width:"16px"}),onActionClick:a,actionLabel:s,isButtonRight:l})=>{let c=_f;return"info-grey"===r?c=Df:"success"===r?c=If:"warning"===r?c=Vf:"error"===r&&(c=Nf),t.jsxs("div",{css:[Lf(o,l),c],"aria-roledescription":"Note",children:[t.jsxs("div",{children:[t.jsxs("div",{css:Tf,children:[i,t.jsx("p",{css:Pf(o),children:e})]}),t.jsx("p",{css:Mf(o),children:n})]}),s?t.jsx(b,{label:s,variant:"info-white"===r||"info-grey"===r?"primary":"secondary",size:"large"===o?"default":"small",onClick:a}):null]})},exports.InputWithUnits=({label:r,caption:o,errorMessage:i,units:a,unitsPosition:s="end",defaultUnit:l="",defaultValue:c="",onChange:u,required:d,disabled:p})=>{const[h,f]=n.useState(c),[x,g]=n.useState(l?[l]:[a[0].value]),v=(e,t)=>{u&&u("end"===s?""+(t?`${h} ${e}`:`${e} ${x}`):""+(t?`${e} ${h}`:`${x} ${e}`))};return t.jsxs("div",{css:ct,children:[i?t.jsx("div",{css:pt}):null,t.jsxs("div",{style:{marginLeft:i?"19px":"0px"},children:[t.jsxs("p",{css:ut(p),"aria-label":r,children:[d?t.jsx("span",{children:"*"}):null,r]}),t.jsx("p",{css:dt(p),"aria-label":o,children:o}),i?t.jsx("p",{css:ht,"aria-label":i,children:i}):null,t.jsxs(e.Group,{css:ft(!!i,s),attached:!0,children:["start"===s?t.jsx(qt,{placeholder:"",value:x,items:a,disabled:p,onChange:e=>{g(e),v(e?.[0],!0)}}):null,t.jsx(wt,{type:"number",value:h,disabled:p,onChange:e=>{f(e.target.value),v(e.target.value)}}),"end"===s?t.jsx(qt,{placeholder:"",value:x,items:a,disabled:p,onChange:e=>{g(e),v(e?.[0],!0)}}):null]})]})]})},exports.ItemCount=Mi,exports.LayerGroup=({label:r,caption:o,value:i,layerItems:a,onChangeForRadioVariant:s})=>{const[l,c]=n.useState({}),[u]=n.useState((e=>{const t=e.find((e=>"radio"===e.variant&&e.isDefaultSelected));return t?.name})(a));n.useEffect((()=>{let e={...l};a.forEach((t=>{t.isDefaultSelected&&(e={...e,["radio"===t.variant?r:t.name]:t.isDefaultSelected})})),c(e)}),[]);const d=(e,t,n,r)=>{const o={...l,[e]:t};c(o),n&&n(e,t,r)},p=Object.values(l).filter((e=>!0===e)).length,h=`${r}, ${p} Active layers on the map${o?`, ${o}`:""}`;return t.jsxs(e.Accordion.Item,{value:i,width:"100%",children:[t.jsxs(e.Accordion.ItemTrigger,{css:Go,alignItems:"flex-start","aria-label":h,children:[t.jsxs(e.Box,{width:"full",display:"flex",flexDirection:"column",alignItems:"flex-start",children:[t.jsxs("span",{css:qo,children:[r,t.jsx(Zt,{label:`${p} Active`,size:"small",variant:p>0?"success":"info-grey"})]}),t.jsx("div",{css:Uo,children:o})]}),t.jsx(e.Accordion.ItemIndicator,{display:"flex",children:t.jsx($,{color:"var(--chakra-colors-neutral-700)",height:"16px",width:"16px"})})]}),t.jsx(e.Accordion.ItemContent,{paddingLeft:"16px",paddingRight:"16px",children:t.jsx(We,{name:r,defaultValue:u,customGap:"0px",onChange:(e,t)=>d(e,!!t,s,t),children:a.map((e=>t.jsx(ei,{...e,onChange:(t,n)=>d(t,n,e.onChange)},e.label)))})})]})},exports.LayerGroupContainer=({children:n,defaultValue:r,...o})=>t.jsx("div",{css:Wo,style:{width:"100%"},children:t.jsx(e.Accordion.Root,{css:{},defaultValue:r,multiple:!0,...o,children:n})}),exports.LayerItem=ei,exports.LayerParameters=({label:r,children:o,openedByDefault:i})=>t.jsx("div",{children:t.jsx(e.Accordion.Root,{defaultValue:i?[r]:[],multiple:!0,children:t.jsxs(e.Accordion.Item,{css:ti,value:r,children:[t.jsxs(e.Accordion.ItemTrigger,{css:ni,children:[t.jsx(e.Box,{width:"full",display:"flex",flexDirection:"column",alignItems:"flex-start",children:t.jsx("p",{css:ri,children:r})}),t.jsx(e.Accordion.ItemIndicator,{display:"flex",children:t.jsx($,{color:"var(--chakra-colors-neutral-700)",height:"16px",width:"16px"})})]}),t.jsx(e.Accordion.ItemContent,{css:oi,children:n.Children.map(o,(e=>t.jsx("div",{className:"ds-layer-parameters-item-child",children:e})))})]})})}),exports.LegendItem=({layerName:e,dataUnit:n,onDrag:r,onUpClick:o,onDownClick:i,onRemoveClick:a,children:s,onInfoClick:l,onOpacityChanged:c})=>t.jsxs("div",{css:ii,children:[t.jsxs("div",{css:ai,children:[t.jsx(ie,{icon:t.jsx(T,{}),"aria-label":"Drag and drop","aria-hidden":!0,onClick:r,style:{display:"none",marginBottom:"12px"}}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"12px"},children:[t.jsx(ie,{icon:t.jsx($,{rotate:"180"}),"aria-label":"Up",onClick:o}),t.jsx(ie,{icon:t.jsx($,{}),"aria-label":"Down",onClick:i})]})]}),t.jsxs("div",{style:{width:"100%"},children:[t.jsxs("div",{css:si,children:[t.jsxs("div",{children:[t.jsx("h3",{css:li,children:e}),t.jsx("p",{css:ci,children:n})]}),t.jsx(b,{label:"Remove",size:"small",variant:"secondary",rightIcon:t.jsx(E,{}),onClick:a})]}),s,t.jsxs("div",{css:ui,children:[t.jsx(b,{label:"About data",size:"small",variant:"secondary",leftIcon:t.jsx(k,{}),onClick:l}),t.jsx(xi,{defaultValue:80,onOpacityChanged:c})]})]})]}),exports.List=({items:n,noBorder:r})=>t.jsx(e.Box,{css:_i(r),children:n.map((e=>t.jsx(Bi,{id:e.id,icon:e.icon,label:e.label,caption:e.caption,value:e.value,variant:e.variant??"data",onItemClick:e.onItemClick},e.id??e.label)))}),exports.MapControlsToolbar=({onZoomInClick:e,onZoomOutClick:t,onExpandClick:n,onShareClick:r,onPrintClick:i,onSettingsClick:a,onQuestionClick:s,vertical:l,expanded:c,showExpandedToggle:u,ariaLabel:d})=>{const p=[{icon:o.jsx(V,{}),label:"Zoom in",ariaLabel:"zoom in",onClick:e},{icon:o.jsx(N,{}),label:"Zoom out",ariaLabel:"zoom out",onClick:t,gap:!0},{icon:o.jsx(A,{}),label:"Expand",ariaLabel:"expand",onClick:n,gap:!0},{icon:o.jsx(z,{}),label:"Share",ariaLabel:"share",onClick:r,gap:!0},{icon:o.jsx(B,{}),label:"Print",ariaLabel:"print",onClick:i,gap:!0},{icon:o.jsx(H,{}),label:"Settings",ariaLabel:"settings",onClick:a,gap:!0},{icon:o.jsx(F,{}),label:"Help",ariaLabel:"question",onClick:s}];return o.jsx(he,{items:p,vertical:l,expanded:c,showExpandedToggle:u,ariaLabel:d||"Map controls toolbar"})},exports.MapMarker=Rn,exports.MapMarkers=On,exports.MapPopUp=({open:e,onOpenChange:r,anchorRef:o,header:i,content:a,footer:s,placement:c="bottom",offset:u=30,closeOnEscape:d=!0,closeOnOutsideClick:p=!1})=>{const h=n.useRef(null),{refs:f,floatingStyles:x,context:g,middlewareData:v,placement:m}=Io({open:e,onOpenChange:r,placement:c,whileElementsMounted:ro,middleware:[go(u),(b={fallbackAxisSideDirection:"start"},{...ao(b),options:[b,y]}),vo({padding:8}),mo({element:h})]});var b,y;n.useEffect((()=>{o?.current&&f.setReference(o.current)}),[o,f]);const w=function(e,t){void 0===t&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:i}=e,{enabled:a=!0,escapeKey:s=!0,outsidePress:c=!0,outsidePressEvent:u="pointerdown",referencePress:d=!1,referencePressEvent:p="pointerdown",ancestorScroll:h=!1,bubbles:f,capture:x}=t,g=To(),v=Ir("function"==typeof c?c:()=>!1),m="function"==typeof c?v:c,b=l.useRef(!1),{escapeKey:y,outsidePress:w}=_o(f),{escapeKey:C,outsidePress:j}=_o(x),k=l.useRef(!1),$=Ir((e=>{var t;if(!n||!a||!s||"Escape"!==e.key)return;if(k.current)return;const o=null==(t=i.current.floatingContext)?void 0:t.nodeId,l=g?Mr(g.nodesRef.current,o):[];if(!y&&(e.stopPropagation(),l.length>0)){let e=!0;if(l.forEach((t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__escapeKeyBubbles||(e=!1)})),!e)return}r(!1,function(e){return"nativeEvent"in e}(e)?e.nativeEvent:e,"escape-key")})),S=Ir((e=>{var t;const n=()=>{var t;$(e),null==(t=Lr(e))||t.removeEventListener("keydown",n)};null==(t=Lr(e))||t.addEventListener("keydown",n)})),E=Ir((e=>{var t;const n=i.current.insideReactTree;i.current.insideReactTree=!1;const a=b.current;if(b.current=!1,"click"===u&&a)return;if(n)return;if("function"==typeof m&&!m(e))return;const s=Lr(e),l="[data-floating-ui-inert]",c=Pr(o.floating).querySelectorAll(l);let d=Dn(s)?s:null;for(;d&&!Yn(d);){const e=Qn(d);if(Yn(e)||!Dn(e))break;d=e}if(c.length&&Dn(s)&&!s.matches("html,body")&&!Or(s,o.floating)&&Array.from(c).every((e=>!Or(d,e))))return;if(In(s)&&L){const t=Yn(s),n=Kn(s),r=/auto|scroll/,o=t||r.test(n.overflowX),i=t||r.test(n.overflowY),a=o&&s.clientWidth>0&&s.scrollWidth>s.clientWidth,l=i&&s.clientHeight>0&&s.scrollHeight>s.clientHeight,c="rtl"===n.direction,u=l&&(c?e.offsetX<=s.offsetWidth-s.clientWidth:e.offsetX>s.clientWidth),d=a&&e.offsetY>s.clientHeight;if(u||d)return}const p=null==(t=i.current.floatingContext)?void 0:t.nodeId,h=g&&Mr(g.nodesRef.current,p).some((t=>{var n;return Tr(e,null==(n=t.context)?void 0:n.elements.floating)}));if(Tr(e,o.floating)||Tr(e,o.domReference)||h)return;const f=g?Mr(g.nodesRef.current,p):[];if(f.length>0){let e=!0;if(f.forEach((t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__outsidePressBubbles||(e=!1)})),!e)return}r(!1,e,"outside-press")})),R=Ir((e=>{var t;const n=()=>{var t;E(e),null==(t=Lr(e))||t.removeEventListener(u,n)};null==(t=Lr(e))||t.addEventListener(u,n)}));l.useEffect((()=>{if(!n||!a)return;i.current.__escapeKeyBubbles=y,i.current.__outsidePressBubbles=w;let e=-1;function t(e){r(!1,e,"ancestor-scroll")}function l(){window.clearTimeout(e),k.current=!0}function c(){e=window.setTimeout((()=>{k.current=!1}),Un()?5:0)}const d=Pr(o.floating);s&&(d.addEventListener("keydown",C?S:$,C),d.addEventListener("compositionstart",l),d.addEventListener("compositionend",c)),m&&d.addEventListener(u,j?R:E,j);let p=[];return h&&(Dn(o.domReference)&&(p=tr(o.domReference)),Dn(o.floating)&&(p=p.concat(tr(o.floating))),!Dn(o.reference)&&o.reference&&o.reference.contextElement&&(p=p.concat(tr(o.reference.contextElement)))),p=p.filter((e=>{var t;return e!==(null==(t=d.defaultView)?void 0:t.visualViewport)})),p.forEach((e=>{e.addEventListener("scroll",t,{passive:!0})})),()=>{s&&(d.removeEventListener("keydown",C?S:$,C),d.removeEventListener("compositionstart",l),d.removeEventListener("compositionend",c)),m&&d.removeEventListener(u,j?R:E,j),p.forEach((e=>{e.removeEventListener("scroll",t)})),window.clearTimeout(e)}}),[i,o,s,m,u,n,r,h,a,y,w,$,C,S,E,j,R]),l.useEffect((()=>{i.current.insideReactTree=!1}),[i,m,u]);const O=l.useMemo((()=>({onKeyDown:$,...d&&{[Po[p]]:e=>{r(!1,e.nativeEvent,"reference-press")},..."click"!==p&&{onClick(e){r(!1,e.nativeEvent,"reference-press")}}}})),[$,r,d,p]),L=l.useMemo((()=>({onKeyDown:$,onMouseDown(){b.current=!0},onMouseUp(){b.current=!0},[Mo[u]]:()=>{i.current.insideReactTree=!0}})),[$,u,i]);return l.useMemo((()=>a?{reference:O,floating:L}:{}),[a,O,L])}(g,{escapeKey:d,outsidePress:p}),C=Ao(g,{role:"dialog"}),{getFloatingProps:j}=function(e){void 0===e&&(e=[]);const t=e.map((e=>null==e?void 0:e.reference)),n=e.map((e=>null==e?void 0:e.floating)),r=e.map((e=>null==e?void 0:e.item)),o=l.useCallback((t=>Vo(t,e,"reference")),t),i=l.useCallback((t=>Vo(t,e,"floating")),n),a=l.useCallback((t=>Vo(t,e,"item")),r);return l.useMemo((()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:a})),[o,i,a])}([w,C]),{x:k,y:$}=v.arrow??{x:null,y:null},S={top:"bottom",right:"left",bottom:"top",left:"right"}[m.split("-")[0]];if(!e)return null;let E=u-1,R=4;return"left"!==S&&"right"!==S||(E=4,R=u-1),t.jsxs(t.Fragment,{children:[t.jsxs("div",{ref:f.setFloating,style:x,"aria-modal":!0,...j(),css:zo,children:[t.jsxs("div",{css:Bo,children:[i,t.jsx(ae,{onClick:()=>r(!1),className:"ds-map-pop-up-close-button","aria-label":"Close"})]}),t.jsx("div",{css:Ho,children:a}),s?t.jsx("div",{css:Fo,children:s}):null,t.jsx("div",{ref:h,css:Zo(E,R,k,$,S,u)})]}),t.jsx("div",{className:"fixed inset-0 z-[999] bg-black/20 backdrop-blur-[1px]",onClick:()=>p&&r(!1)})]})},exports.Menu=we,exports.MobileTabBar=({defaultValue:r,tabs:o,onTabClick:i,hideLabels:a,activationMode:s="manual"})=>{const l=o.length,[c,u]=n.useState((()=>Vh(o,r)));return t.jsx("div",{css:Mh,children:t.jsx(e.Tabs.Root,{width:"full",defaultValue:r||o?.[0]?.value,onValueChange:({value:e})=>(e=>{const t=Vh(o,e);u(t),i&&i(e)})(e),activationMode:s,children:t.jsx(e.Tabs.List,{alignItems:"center",border:"none",children:o.map(((n,r)=>{const{label:o,icon:i,bagdeCount:s,"aria-label":u,"aria-describedby":d,disabled:p,...h}=n,f=`${n.value}-str-status`,x=[`tab ${r+1} of ${l}`,c===r?"selected":"not selected"];p&&x.push("disabled");const g=[d,f].filter(Boolean).join(" ")||void 0;return t.jsxs(e.Tabs.Trigger,{css:_h,"aria-label":u||o,"aria-disabled":!!p||void 0,"aria-describedby":g,disabled:p,...h,children:[t.jsxs("div",{css:Dh,children:[i,s?t.jsx("div",{css:Ih,className:"ds-badge-count",children:s}):null]}),a?null:t.jsx("p",{children:o}),t.jsx(e.VisuallyHidden,{id:f,children:x.join(", ")})]},n.value)}))})})})},exports.Modal=({header:n,content:r,footer:o,size:i="medium",draggable:a,blocking:s,open:l,onClose:c})=>l?t.jsx(e.Dialog.Root,{open:l,onOpenChange:c,placement:"center",scrollBehavior:"inside",closeOnInteractOutside:!a&&!s,preventScroll:!a&&!s,closeOnEscape:!s,defaultOpen:!0,children:t.jsxs(e.Portal,{children:[a?null:t.jsx(e.Dialog.Backdrop,{}),t.jsx(is,{disabled:!a,children:t.jsx(e.Dialog.Positioner,{children:t.jsxs(e.Dialog.Content,{css:as(i),children:[t.jsxs(e.Dialog.Header,{css:ss,children:[n,s?null:t.jsx(e.Dialog.CloseTrigger,{css:ls,asChild:!0,children:t.jsx(ae,{})})]}),t.jsx(e.Dialog.Body,{css:cs,children:r}),o?t.jsx(e.Dialog.Footer,{padding:"12px",children:o}):null]})})})]})}):null,exports.MultiActionButton=({variant:r="primary",size:o="default",mainActionLabel:i,mainActionOnClick:a=()=>{},otherActions:s=[],disabled:l,...c})=>{const[u,d]=n.useState(!1),p=l?`${i} action button with menu, disabled`:void 0;return t.jsxs(e.Group,{css:$e,attached:!0,tabIndex:l?0:void 0,"aria-disabled":l,"aria-label":p,role:"group",children:[t.jsx(b,{css:{},label:i,variant:r,size:o,onClick:a,disabled:l,...c}),t.jsxs(e.Menu.Root,{onOpenChange:({open:e})=>d(e),positioning:{placement:"bottom-end"},children:[t.jsx(e.Menu.Trigger,{css:je(r),"data-group-item":!0,"data-last":!0,asChild:!0,children:t.jsx(b,{variant:r,size:o,leftIcon:t.jsx($,{rotate:u?"180":"0",color:h("accessible","text-on-primary-mids")||h("primary",900)}),disabled:l})}),t.jsx(Se,{children:s.map((({label:n,value:r,onClick:i})=>t.jsx(e.Menu.Item,{css:ke(o),onClick:i,value:r,children:n},r)))})]})]})},exports.Navbar=({logo:e,linkRouter:o,pathname:i,navigationSection:a,utilitySection:s,actionsSection:l,maxWidth:c,fixed:u,onNavbarHeightChange:d})=>{const p=n.useRef(null),f=n.useRef(null),x=n.useRef(null),[g,v]=n.useState(!1),[m,y]=n.useState(-1),[w,C]=n.useState("undefined"!=typeof window&&window?.innerWidth<=af),[j,k]=n.useState(!1),$=o,S=n.useCallback((()=>{if(f.current&&p.current&&x.current){const e=p.current.getBoundingClientRect(),t=f.current.getBoundingClientRect(),n=x.current.getBoundingClientRect();t.width,e.width,window.innerWidth<=af||window.innerWidth<=m?(d?.(96),v(!0)):window.innerWidth>af&&window.innerWidth<=1440?e.right>=t.left?(d?.(96),v(!0),y(window.innerWidth)):window.innerWidth>m&&(d?.(48),v(!1),y(-1)):(d?.(48),v(!1),y(-1)),g&&(window.innerWidth<=af||n.right>=t.left?(C(!0),d?.(48)):(C(!1),d?.(96)))}}),[m,g]);return n.useEffect((()=>(S(),window.addEventListener("resize",S),()=>{window.removeEventListener("resize",S)})),[S]),t.jsxs("nav",{css:Nh(g&&!w,u),children:[t.jsxs("div",{css:zh(g&&!w,c),children:[t.jsxs("div",{css:(R=g&&!w,r.css`
|
|
3556
|
+
`),children:o.children}):null]},`${o.label}-${o.value}`);var i,a}))})}),exports.CloseButton=ae,exports.ClusterPoint=({onClick:e,triggerRef:t,showFocusState:n,count:r,mode:i,variant:a="cluster"})=>o.jsx(Rn,{count:r,mode:i,onClick:e,ref:t,showFocusState:n,variant:a}),exports.ExtendableCard=({children:n,header:r,footer:o})=>t.jsx(e.Box,{css:na,children:t.jsx(e.Accordion.Root,{multiple:!0,children:t.jsxs(e.Accordion.Item,{value:"extendable-card-item",children:[t.jsxs(e.Accordion.ItemTrigger,{css:ra,alignItems:"center",children:[t.jsx(e.Flex,{gap:3,flex:"1",overflow:"hidden",alignItems:"center",children:r}),t.jsx(e.Accordion.ItemIndicator,{children:t.jsx($,{color:"var(--chakra-colors-neutral-700)",height:"16px",width:"16px"})})]}),t.jsxs(e.Accordion.ItemContent,{children:[n,o]})]})})}),exports.Footer=({children:e,label:n="© World Resources Institute",fixed:r,filled:o,maxWidth:i})=>{const a=(new Date).getFullYear();return t.jsx("footer",{css:Lh(r,o),children:t.jsxs("div",{css:Th(i),children:[t.jsx("div",{children:t.jsx(D,{height:"32px",width:"91px"})}),t.jsx("div",{css:Ph,children:e}),t.jsx("div",{children:t.jsxs("p",{css:Mh,children:[n," ",a]})})]})})},exports.IconButton=ie,exports.InlineMessage=({label:e,caption:n,variant:r,size:o="large",icon:i=t.jsx(k,{height:"16px",width:"16px"}),onActionClick:a,actionLabel:s,isButtonRight:l})=>{let c=Df;return"info-grey"===r?c=If:"success"===r?c=Vf:"warning"===r?c=Nf:"error"===r&&(c=Af),t.jsxs("div",{css:[Tf(o,l),c],"aria-roledescription":"Note",children:[t.jsxs("div",{children:[t.jsxs("div",{css:Pf,children:[i,t.jsx("p",{css:Mf(o),children:e})]}),t.jsx("p",{css:_f(o),children:n})]}),s?t.jsx(b,{label:s,variant:"info-white"===r||"info-grey"===r?"primary":"secondary",size:"large"===o?"default":"small",onClick:a}):null]})},exports.InputWithUnits=({label:r,caption:o,errorMessage:i,units:a,unitsPosition:s="end",defaultUnit:l="",defaultValue:c="",onChange:u,required:d,disabled:p})=>{const[h,f]=n.useState(c),[x,g]=n.useState(l?[l]:[a[0].value]),v=(e,t)=>{u&&u("end"===s?""+(t?`${h} ${e}`:`${e} ${x}`):""+(t?`${e} ${h}`:`${x} ${e}`))};return t.jsxs("div",{css:ct,children:[i?t.jsx("div",{css:pt}):null,t.jsxs("div",{style:{marginLeft:i?"19px":"0px"},children:[t.jsxs("p",{css:ut(p),"aria-label":r,children:[d?t.jsx("span",{children:"*"}):null,r]}),t.jsx("p",{css:dt(p),"aria-label":o,children:o}),i?t.jsx("p",{css:ht,"aria-label":i,children:i}):null,t.jsxs(e.Group,{css:ft(!!i,s),attached:!0,children:["start"===s?t.jsx(qt,{placeholder:"",value:x,items:a,disabled:p,onChange:e=>{g(e),v(e?.[0],!0)}}):null,t.jsx(wt,{type:"number",value:h,disabled:p,onChange:e=>{f(e.target.value),v(e.target.value)}}),"end"===s?t.jsx(qt,{placeholder:"",value:x,items:a,disabled:p,onChange:e=>{g(e),v(e?.[0],!0)}}):null]})]})]})},exports.ItemCount=Mi,exports.LayerGroup=({label:r,caption:o,value:i,layerItems:a,onChangeForRadioVariant:s})=>{const[l,c]=n.useState({}),[u]=n.useState((e=>{const t=e.find((e=>"radio"===e.variant&&e.isDefaultSelected));return t?.name})(a));n.useEffect((()=>{let e={...l};a.forEach((t=>{t.isDefaultSelected&&(e={...e,["radio"===t.variant?r:t.name]:t.isDefaultSelected})})),c(e)}),[]);const d=(e,t,n,r)=>{const o={...l,[e]:t};c(o),n&&n(e,t,r)},p=Object.values(l).filter((e=>!0===e)).length,h=`${r}, ${p} Active layers on the map${o?`, ${o}`:""}`;return t.jsxs(e.Accordion.Item,{value:i,width:"100%",children:[t.jsxs(e.Accordion.ItemTrigger,{css:Go,alignItems:"flex-start","aria-label":h,children:[t.jsxs(e.Box,{width:"full",display:"flex",flexDirection:"column",alignItems:"flex-start",children:[t.jsxs("span",{css:qo,children:[r,t.jsx(Zt,{label:`${p} Active`,size:"small",variant:p>0?"success":"info-grey"})]}),t.jsx("div",{css:Uo,children:o})]}),t.jsx(e.Accordion.ItemIndicator,{display:"flex",children:t.jsx($,{color:"var(--chakra-colors-neutral-700)",height:"16px",width:"16px"})})]}),t.jsx(e.Accordion.ItemContent,{paddingLeft:"16px",paddingRight:"16px",children:t.jsx(We,{name:r,defaultValue:u,customGap:"0px",onChange:(e,t)=>d(e,!!t,s,t),children:a.map((e=>t.jsx(ei,{...e,onChange:(t,n)=>d(t,n,e.onChange)},e.label)))})})]})},exports.LayerGroupContainer=({children:n,defaultValue:r,...o})=>t.jsx("div",{css:Wo,style:{width:"100%"},children:t.jsx(e.Accordion.Root,{css:{},defaultValue:r,multiple:!0,...o,children:n})}),exports.LayerItem=ei,exports.LayerParameters=({label:r,children:o,openedByDefault:i})=>t.jsx("div",{children:t.jsx(e.Accordion.Root,{defaultValue:i?[r]:[],multiple:!0,children:t.jsxs(e.Accordion.Item,{css:ti,value:r,children:[t.jsxs(e.Accordion.ItemTrigger,{css:ni,children:[t.jsx(e.Box,{width:"full",display:"flex",flexDirection:"column",alignItems:"flex-start",children:t.jsx("p",{css:ri,children:r})}),t.jsx(e.Accordion.ItemIndicator,{display:"flex",children:t.jsx($,{color:"var(--chakra-colors-neutral-700)",height:"16px",width:"16px"})})]}),t.jsx(e.Accordion.ItemContent,{css:oi,children:n.Children.map(o,(e=>t.jsx("div",{className:"ds-layer-parameters-item-child",children:e})))})]})})}),exports.LegendItem=({layerName:e,dataUnit:n,onDrag:r,onUpClick:o,onDownClick:i,onRemoveClick:a,children:s,onInfoClick:l,onOpacityChanged:c})=>t.jsxs("div",{css:ii,children:[t.jsxs("div",{css:ai,children:[t.jsx(ie,{icon:t.jsx(T,{}),"aria-label":"Drag and drop","aria-hidden":!0,onClick:r,style:{display:"none",marginBottom:"12px"}}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"12px"},children:[t.jsx(ie,{icon:t.jsx($,{rotate:"180"}),"aria-label":"Up",onClick:o}),t.jsx(ie,{icon:t.jsx($,{}),"aria-label":"Down",onClick:i})]})]}),t.jsxs("div",{style:{width:"100%"},children:[t.jsxs("div",{css:si,children:[t.jsxs("div",{children:[t.jsx("h3",{css:li,children:e}),t.jsx("p",{css:ci,children:n})]}),t.jsx(b,{label:"Remove",size:"small",variant:"secondary",rightIcon:t.jsx(E,{}),onClick:a})]}),s,t.jsxs("div",{css:ui,children:[t.jsx(b,{label:"About data",size:"small",variant:"secondary",leftIcon:t.jsx(k,{}),onClick:l}),t.jsx(xi,{defaultValue:80,onOpacityChanged:c})]})]})]}),exports.List=({items:n,noBorder:r})=>t.jsx(e.Box,{css:_i(r),children:n.map((e=>t.jsx(Bi,{id:e.id,icon:e.icon,label:e.label,caption:e.caption,value:e.value,variant:e.variant??"data",onItemClick:e.onItemClick},e.id??e.label)))}),exports.MapControlsToolbar=({onZoomInClick:e,onZoomOutClick:t,onExpandClick:n,onShareClick:r,onPrintClick:i,onSettingsClick:a,onQuestionClick:s,vertical:l,expanded:c,showExpandedToggle:u,ariaLabel:d})=>{const p=[{icon:o.jsx(V,{}),label:"Zoom in",ariaLabel:"zoom in",onClick:e},{icon:o.jsx(N,{}),label:"Zoom out",ariaLabel:"zoom out",onClick:t,gap:!0},{icon:o.jsx(A,{}),label:"Expand",ariaLabel:"expand",onClick:n,gap:!0},{icon:o.jsx(z,{}),label:"Share",ariaLabel:"share",onClick:r,gap:!0},{icon:o.jsx(B,{}),label:"Print",ariaLabel:"print",onClick:i,gap:!0},{icon:o.jsx(H,{}),label:"Settings",ariaLabel:"settings",onClick:a,gap:!0},{icon:o.jsx(F,{}),label:"Help",ariaLabel:"question",onClick:s}];return o.jsx(he,{items:p,vertical:l,expanded:c,showExpandedToggle:u,ariaLabel:d||"Map controls toolbar"})},exports.MapMarker=Rn,exports.MapMarkers=On,exports.MapPopUp=({open:e,onOpenChange:r,anchorRef:o,header:i,content:a,footer:s,placement:c="bottom",offset:u=30,closeOnEscape:d=!0,closeOnOutsideClick:p=!1})=>{const h=n.useRef(null),{refs:f,floatingStyles:x,context:g,middlewareData:v,placement:m}=Io({open:e,onOpenChange:r,placement:c,whileElementsMounted:ro,middleware:[go(u),(b={fallbackAxisSideDirection:"start"},{...ao(b),options:[b,y]}),vo({padding:8}),mo({element:h})]});var b,y;n.useEffect((()=>{o?.current&&f.setReference(o.current)}),[o,f]);const w=function(e,t){void 0===t&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:i}=e,{enabled:a=!0,escapeKey:s=!0,outsidePress:c=!0,outsidePressEvent:u="pointerdown",referencePress:d=!1,referencePressEvent:p="pointerdown",ancestorScroll:h=!1,bubbles:f,capture:x}=t,g=To(),v=Ir("function"==typeof c?c:()=>!1),m="function"==typeof c?v:c,b=l.useRef(!1),{escapeKey:y,outsidePress:w}=_o(f),{escapeKey:C,outsidePress:j}=_o(x),k=l.useRef(!1),$=Ir((e=>{var t;if(!n||!a||!s||"Escape"!==e.key)return;if(k.current)return;const o=null==(t=i.current.floatingContext)?void 0:t.nodeId,l=g?Mr(g.nodesRef.current,o):[];if(!y&&(e.stopPropagation(),l.length>0)){let e=!0;if(l.forEach((t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__escapeKeyBubbles||(e=!1)})),!e)return}r(!1,function(e){return"nativeEvent"in e}(e)?e.nativeEvent:e,"escape-key")})),S=Ir((e=>{var t;const n=()=>{var t;$(e),null==(t=Lr(e))||t.removeEventListener("keydown",n)};null==(t=Lr(e))||t.addEventListener("keydown",n)})),E=Ir((e=>{var t;const n=i.current.insideReactTree;i.current.insideReactTree=!1;const a=b.current;if(b.current=!1,"click"===u&&a)return;if(n)return;if("function"==typeof m&&!m(e))return;const s=Lr(e),l="[data-floating-ui-inert]",c=Pr(o.floating).querySelectorAll(l);let d=Dn(s)?s:null;for(;d&&!Yn(d);){const e=Qn(d);if(Yn(e)||!Dn(e))break;d=e}if(c.length&&Dn(s)&&!s.matches("html,body")&&!Or(s,o.floating)&&Array.from(c).every((e=>!Or(d,e))))return;if(In(s)&&L){const t=Yn(s),n=Kn(s),r=/auto|scroll/,o=t||r.test(n.overflowX),i=t||r.test(n.overflowY),a=o&&s.clientWidth>0&&s.scrollWidth>s.clientWidth,l=i&&s.clientHeight>0&&s.scrollHeight>s.clientHeight,c="rtl"===n.direction,u=l&&(c?e.offsetX<=s.offsetWidth-s.clientWidth:e.offsetX>s.clientWidth),d=a&&e.offsetY>s.clientHeight;if(u||d)return}const p=null==(t=i.current.floatingContext)?void 0:t.nodeId,h=g&&Mr(g.nodesRef.current,p).some((t=>{var n;return Tr(e,null==(n=t.context)?void 0:n.elements.floating)}));if(Tr(e,o.floating)||Tr(e,o.domReference)||h)return;const f=g?Mr(g.nodesRef.current,p):[];if(f.length>0){let e=!0;if(f.forEach((t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__outsidePressBubbles||(e=!1)})),!e)return}r(!1,e,"outside-press")})),R=Ir((e=>{var t;const n=()=>{var t;E(e),null==(t=Lr(e))||t.removeEventListener(u,n)};null==(t=Lr(e))||t.addEventListener(u,n)}));l.useEffect((()=>{if(!n||!a)return;i.current.__escapeKeyBubbles=y,i.current.__outsidePressBubbles=w;let e=-1;function t(e){r(!1,e,"ancestor-scroll")}function l(){window.clearTimeout(e),k.current=!0}function c(){e=window.setTimeout((()=>{k.current=!1}),Un()?5:0)}const d=Pr(o.floating);s&&(d.addEventListener("keydown",C?S:$,C),d.addEventListener("compositionstart",l),d.addEventListener("compositionend",c)),m&&d.addEventListener(u,j?R:E,j);let p=[];return h&&(Dn(o.domReference)&&(p=tr(o.domReference)),Dn(o.floating)&&(p=p.concat(tr(o.floating))),!Dn(o.reference)&&o.reference&&o.reference.contextElement&&(p=p.concat(tr(o.reference.contextElement)))),p=p.filter((e=>{var t;return e!==(null==(t=d.defaultView)?void 0:t.visualViewport)})),p.forEach((e=>{e.addEventListener("scroll",t,{passive:!0})})),()=>{s&&(d.removeEventListener("keydown",C?S:$,C),d.removeEventListener("compositionstart",l),d.removeEventListener("compositionend",c)),m&&d.removeEventListener(u,j?R:E,j),p.forEach((e=>{e.removeEventListener("scroll",t)})),window.clearTimeout(e)}}),[i,o,s,m,u,n,r,h,a,y,w,$,C,S,E,j,R]),l.useEffect((()=>{i.current.insideReactTree=!1}),[i,m,u]);const O=l.useMemo((()=>({onKeyDown:$,...d&&{[Po[p]]:e=>{r(!1,e.nativeEvent,"reference-press")},..."click"!==p&&{onClick(e){r(!1,e.nativeEvent,"reference-press")}}}})),[$,r,d,p]),L=l.useMemo((()=>({onKeyDown:$,onMouseDown(){b.current=!0},onMouseUp(){b.current=!0},[Mo[u]]:()=>{i.current.insideReactTree=!0}})),[$,u,i]);return l.useMemo((()=>a?{reference:O,floating:L}:{}),[a,O,L])}(g,{escapeKey:d,outsidePress:p}),C=Ao(g,{role:"dialog"}),{getFloatingProps:j}=function(e){void 0===e&&(e=[]);const t=e.map((e=>null==e?void 0:e.reference)),n=e.map((e=>null==e?void 0:e.floating)),r=e.map((e=>null==e?void 0:e.item)),o=l.useCallback((t=>Vo(t,e,"reference")),t),i=l.useCallback((t=>Vo(t,e,"floating")),n),a=l.useCallback((t=>Vo(t,e,"item")),r);return l.useMemo((()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:a})),[o,i,a])}([w,C]),{x:k,y:$}=v.arrow??{x:null,y:null},S={top:"bottom",right:"left",bottom:"top",left:"right"}[m.split("-")[0]];if(!e)return null;let E=u-1,R=4;return"left"!==S&&"right"!==S||(E=4,R=u-1),t.jsxs(t.Fragment,{children:[t.jsxs("div",{ref:f.setFloating,style:x,"aria-modal":!0,...j(),css:zo,children:[t.jsxs("div",{css:Bo,children:[i,t.jsx(ae,{onClick:()=>r(!1),className:"ds-map-pop-up-close-button","aria-label":"Close"})]}),t.jsx("div",{css:Ho,children:a}),s?t.jsx("div",{css:Fo,children:s}):null,t.jsx("div",{ref:h,css:Zo(E,R,k,$,S,u)})]}),t.jsx("div",{className:"fixed inset-0 z-[999] bg-black/20 backdrop-blur-[1px]",onClick:()=>p&&r(!1)})]})},exports.Menu=we,exports.MobileTabBar=({defaultValue:r,tabs:o,onTabClick:i,hideLabels:a,activationMode:s="manual"})=>{const l=o.length,[c,u]=n.useState((()=>Nh(o,r)));return t.jsx("div",{css:_h,children:t.jsx(e.Tabs.Root,{width:"full",defaultValue:r||o?.[0]?.value,onValueChange:({value:e})=>(e=>{const t=Nh(o,e);u(t),i&&i(e)})(e),activationMode:s,children:t.jsx(e.Tabs.List,{alignItems:"center",border:"none",children:o.map(((n,r)=>{const{label:o,icon:i,bagdeCount:s,"aria-label":u,"aria-describedby":d,disabled:p,...h}=n,f=`${n.value}-str-status`,x=[`tab ${r+1} of ${l}`,c===r?"selected":"not selected"];p&&x.push("disabled");const g=[d,f].filter(Boolean).join(" ")||void 0;return t.jsxs(e.Tabs.Trigger,{css:Dh,"aria-label":u||o,"aria-disabled":!!p||void 0,"aria-describedby":g,disabled:p,...h,children:[t.jsxs("div",{css:Ih,children:[i,s?t.jsx("div",{css:Vh,className:"ds-badge-count",children:s}):null]}),a?null:t.jsx("p",{children:o}),t.jsx(e.VisuallyHidden,{id:f,children:x.join(", ")})]},n.value)}))})})})},exports.Modal=({header:n,content:r,footer:o,size:i="medium",draggable:a,blocking:s,open:l,onClose:c})=>l?t.jsx(e.Dialog.Root,{open:l,onOpenChange:c,placement:"center",scrollBehavior:"inside",closeOnInteractOutside:!a&&!s,preventScroll:!a&&!s,closeOnEscape:!s,defaultOpen:!0,children:t.jsxs(e.Portal,{children:[a?null:t.jsx(e.Dialog.Backdrop,{}),t.jsx(is,{disabled:!a,children:t.jsx(e.Dialog.Positioner,{children:t.jsxs(e.Dialog.Content,{css:as(i),children:[t.jsxs(e.Dialog.Header,{css:ss,children:[n,s?null:t.jsx(e.Dialog.CloseTrigger,{css:ls,asChild:!0,children:t.jsx(ae,{})})]}),t.jsx(e.Dialog.Body,{css:cs,children:r}),o?t.jsx(e.Dialog.Footer,{padding:"12px",children:o}):null]})})})]})}):null,exports.MultiActionButton=({variant:r="primary",size:o="default",mainActionLabel:i,mainActionOnClick:a=()=>{},otherActions:s=[],disabled:l,...c})=>{const[u,d]=n.useState(!1),p=l?`${i} action button with menu, disabled`:void 0;return t.jsxs(e.Group,{css:$e,attached:!0,tabIndex:l?0:void 0,"aria-disabled":l,"aria-label":p,role:"group",children:[t.jsx(b,{css:{},label:i,variant:r,size:o,onClick:a,disabled:l,...c}),t.jsxs(e.Menu.Root,{onOpenChange:({open:e})=>d(e),positioning:{placement:"bottom-end"},children:[t.jsx(e.Menu.Trigger,{css:je(r),"data-group-item":!0,"data-last":!0,asChild:!0,children:t.jsx(b,{variant:r,size:o,leftIcon:t.jsx($,{rotate:u?"180":"0",color:h("accessible","text-on-primary-mids")||h("primary",900)}),disabled:l})}),t.jsx(Se,{children:s.map((({label:n,value:r,onClick:i})=>t.jsx(e.Menu.Item,{css:ke(o),onClick:i,value:r,children:n},r)))})]})]})},exports.Navbar=({logo:e,linkRouter:o,pathname:i,navigationSection:a,utilitySection:s,actionsSection:l,maxWidth:c,fixed:u,onNavbarHeightChange:d})=>{const p=n.useRef(null),f=n.useRef(null),x=n.useRef(null),[g,v]=n.useState(!1),[m,y]=n.useState(-1),[w,C]=n.useState("undefined"!=typeof window&&window?.innerWidth<=sf),[j,k]=n.useState(!1),$=o,S=n.useCallback((()=>{if(f.current&&p.current&&x.current){const e=p.current.getBoundingClientRect(),t=f.current.getBoundingClientRect(),n=x.current.getBoundingClientRect();t.width,e.width,window.innerWidth<=sf||window.innerWidth<=m?(d?.(96),v(!0)):window.innerWidth>sf&&window.innerWidth<=1440?e.right>=t.left?(d?.(96),v(!0),y(window.innerWidth)):window.innerWidth>m&&(d?.(48),v(!1),y(-1)):(d?.(48),v(!1),y(-1)),g&&(window.innerWidth<=sf||n.right>=t.left?(C(!0),d?.(48)):(C(!1),d?.(96)))}}),[m,g]);return n.useEffect((()=>(S(),window.addEventListener("resize",S),()=>{window.removeEventListener("resize",S)})),[S]),t.jsxs("nav",{css:Ah(g&&!w,u),children:[t.jsxs("div",{css:Bh(g&&!w,c),children:[t.jsxs("div",{css:(R=g&&!w,r.css`
|
|
3546
3557
|
display: flex;
|
|
3547
3558
|
align-items: center;
|
|
3548
3559
|
justify-content: flex-start;
|
|
3549
3560
|
gap: 12px;
|
|
3550
3561
|
color: ${h("neutral",R?100:900)};
|
|
3551
|
-
`),ref:p,children:[e?t.jsx("div",{ref:x,css:
|
|
3562
|
+
`),ref:p,children:[e?t.jsx("div",{ref:x,css:Hh,children:e}):null,t.jsx("div",{css:Fh(g),children:a?.map((e=>e.link?t.jsx($,{to:e.link,href:e.link,css:Zh(i===e.link),children:e.label},e.label):t.jsx(we,{label:e.label,items:e.items||[]},e.label)))})]}),t.jsx("div",{css:Wh,ref:f,children:w?t.jsxs("button",{type:"button",onClick:()=>k(!j),"aria-label":"Open menu",css:Uh,children:[j?"Close":"Menu",j?t.jsx(E,{height:"16px",width:"16px"}):t.jsx(J,{height:"16px",width:"16px"})]}):t.jsxs(t.Fragment,{children:[t.jsx("div",{css:Wh,children:s?.map(((e,n)=>t.jsx("div",{css:Gh(g),children:e},n)))}),l?t.jsx("div",{css:qh(g),children:l.map((e=>t.jsx(b,{...e},e.label)))}):null]})})]}),g&&!w?t.jsx("div",{css:zh,children:a?.map((e=>e.link?t.jsx($,{to:e.link,href:e.link,css:Zh(i===e.link),children:e.label},e.label):t.jsx(we,{label:e.label,items:e.items||[]},e.label)))}):null,w?t.jsx(af,{navigationSection:a,utilitySection:s,actionsSection:l,linkRouter:o,isOpen:j,setIsOpen:k,pathname:i}):null]});var R},exports.NavigationRail=({tabs:r=[],defaultValue:o,onTabClick:i,children:a,onOpenChange:s})=>{const[l,c]=n.useState(!1),[u,d]=n.useState(o||r?.[0]?.value),p=e=>{d(e),i&&i(e)},[f]=e.useMediaQuery(["(max-width: 768px)"]);return f?t.jsxs(e.Tabs.Root,{defaultValue:u,onValueChange:({value:e})=>p(e),children:[t.jsx(e.Tabs.List,{style:{display:"flex",overflowX:"auto",whiteSpace:"nowrap",padding:"8px",gap:"8px"},children:r.map((n=>t.jsx(e.Tabs.Trigger,{value:n.value,css:{"--indicator-color":h("primary",500),flexShrink:0,padding:"10px 16px",color:h("neutral",600),"&[data-selected]":{color:h("neutral",800),fontWeight:600}},children:n.label},n.value)))}),r.map((n=>t.jsx(e.Tabs.Content,{value:n.value,children:a},n.value)))]}):t.jsxs("div",{style:{height:"calc(100vh - 48px - 56px)",position:"fixed",top:"48px",left:0,display:"flex"},children:[t.jsxs("div",{css:lf,children:[t.jsx(e.Tabs.Root,{defaultValue:o||r?.[0]?.value,orientation:"horizontal",width:"full",onValueChange:({value:e})=>{p(e)},role:"tablist",children:t.jsx(e.Tabs.List,{alignItems:"center",border:"none",style:{flexDirection:"column"},children:r.map((n=>t.jsx(e.Tabs.Trigger,{css:cf,"aria-label":n["aria-label"]||n.label,...n,children:t.jsxs(e.Box,{display:"flex",alignItems:"center",flexDirection:"column",gap:"5px",className:"ds-tab-label",children:[n.icon?t.jsx("div",{css:uf,children:n.icon}):null,t.jsx("p",{children:n.label})]})},n.label)))})}),a?t.jsx(e.Collapsible.Root,{onOpenChange:({open:e})=>{c(e),s&&s(!e)},children:t.jsxs(e.Collapsible.Trigger,{css:df,children:[t.jsx("div",{css:uf,children:l?t.jsx(w,{}):t.jsx(y,{})}),t.jsxs("div",{className:"ds-tab-label",children:[t.jsx("p",{children:l?"Show":"Hide"}),t.jsx("p",{children:"Sidebar"})]})]})}):null]}),a?t.jsx(e.Collapsible.Root,{defaultOpen:!0,open:!l,children:t.jsx(e.Collapsible.Content,{height:"100%",children:t.jsx("div",{css:pf,role:"tabpanel","aria-labelledby":u,children:a})})}):null]})},exports.OptionCard=({defaultValue:n,items:o,onValueChange:i})=>t.jsx(e.RadioCard.Root,{defaultValue:n,onValueChange:i,children:t.jsx(e.HStack,{alignItems:"flex-start",flexWrap:"wrap",gap:"12px",children:o.map((n=>{return t.jsxs(e.RadioCard.Item,{css:De,value:n.value,disabled:n.disabled,children:[t.jsx(e.RadioCard.ItemHiddenInput,{}),t.jsxs(e.RadioCard.ItemControl,{css:Ie,children:[t.jsxs("div",{css:(i=n.variant,r.css`
|
|
3552
3563
|
width: 100%;
|
|
3553
3564
|
display: flex;
|
|
3554
3565
|
flex-direction: ${"centered"===i?"column":"row"};
|
|
@@ -3572,7 +3583,7 @@ function Ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3572
3583
|
font-weight: 700;
|
|
3573
3584
|
color: ${h("Medium"===v?"warning":"Strong"===v||"Very Strong"===v?"success":"error",900)};
|
|
3574
3585
|
}
|
|
3575
|
-
`),"aria-live":"polite",role:"status",children:["Password Strength: ",t.jsx("span",{children:x.strength})]}),t.jsx("div",{css:Qt(x.strength),children:t.jsx("div",{})}),t.jsxs("div",{css:en(x.length),"aria-label":`Use a minimum of ${l} characters. ${x.length?"Requirement met.":"Requirement not met."}`,children:[t.jsx("div",{children:x.length?t.jsx(C,{color:"var(--chakra-colors-success-500)",height:"8px",width:"8px"}):t.jsx(E,{color:"var(--chakra-colors-error-900)",height:"8px",width:"8px"})}),t.jsxs("p",{children:["Use a minimum of ",l," characters"]})]}),a?.uppercase?null:t.jsxs("div",{css:en(x.uppercase),"aria-label":"Use an uppercase letter. "+(x.uppercase?"Requirement met.":"Requirement not met."),children:[t.jsx("div",{children:x.uppercase?t.jsx(C,{color:"var(--chakra-colors-success-500)",height:"8px",width:"8px"}):t.jsx(E,{color:"var(--chakra-colors-error-900)",height:"8px",width:"8px"})}),t.jsx("p",{children:"Use an uppercase letter"})]}),a?.lowercase?null:t.jsxs("div",{css:en(x.lowercase),"aria-label":"Use a lowercase letter. "+(x.lowercase?"Requirement met.":"Requirement not met."),children:[t.jsx("div",{children:x.lowercase?t.jsx(C,{color:"var(--chakra-colors-success-500)",height:"8px",width:"8px"}):t.jsx(E,{color:"var(--chakra-colors-error-900)",height:"8px",width:"8px"})}),t.jsx("p",{children:"Use a lowercase letter"})]}),a?.numbers?null:t.jsxs("div",{css:en(x.numbers),"aria-label":"Use a number. "+(x.numbers?"Requirement met.":"Requirement not met."),children:[t.jsx("div",{children:x.numbers?t.jsx(C,{color:"var(--chakra-colors-success-500)",height:"8px",width:"8px"}):t.jsx(E,{color:"var(--chakra-colors-error-900)",height:"8px",width:"8px"})}),t.jsx("p",{children:"Use a number"})]}),a?.specialCharacters?null:t.jsxs("div",{css:en(x.specialCharacters),"aria-label":"Use a special character. "+(x.specialCharacters?"Requirement met.":"Requirement not met."),children:[t.jsx("div",{children:x.specialCharacters?t.jsx(C,{color:"var(--chakra-colors-success-500)",height:"8px",width:"8px"}):t.jsx(E,{color:"var(--chakra-colors-error-900)",height:"8px",width:"8px"})}),t.jsx("p",{children:"Use a special character"})]})]}):null]});var v},exports.ProgressBar=({progress:e})=>{let n=e;return n>100&&(n=100),n<0&&(n=0),t.jsx("div",{css:
|
|
3586
|
+
`),"aria-live":"polite",role:"status",children:["Password Strength: ",t.jsx("span",{children:x.strength})]}),t.jsx("div",{css:Qt(x.strength),children:t.jsx("div",{})}),t.jsxs("div",{css:en(x.length),"aria-label":`Use a minimum of ${l} characters. ${x.length?"Requirement met.":"Requirement not met."}`,children:[t.jsx("div",{children:x.length?t.jsx(C,{color:"var(--chakra-colors-success-500)",height:"8px",width:"8px"}):t.jsx(E,{color:"var(--chakra-colors-error-900)",height:"8px",width:"8px"})}),t.jsxs("p",{children:["Use a minimum of ",l," characters"]})]}),a?.uppercase?null:t.jsxs("div",{css:en(x.uppercase),"aria-label":"Use an uppercase letter. "+(x.uppercase?"Requirement met.":"Requirement not met."),children:[t.jsx("div",{children:x.uppercase?t.jsx(C,{color:"var(--chakra-colors-success-500)",height:"8px",width:"8px"}):t.jsx(E,{color:"var(--chakra-colors-error-900)",height:"8px",width:"8px"})}),t.jsx("p",{children:"Use an uppercase letter"})]}),a?.lowercase?null:t.jsxs("div",{css:en(x.lowercase),"aria-label":"Use a lowercase letter. "+(x.lowercase?"Requirement met.":"Requirement not met."),children:[t.jsx("div",{children:x.lowercase?t.jsx(C,{color:"var(--chakra-colors-success-500)",height:"8px",width:"8px"}):t.jsx(E,{color:"var(--chakra-colors-error-900)",height:"8px",width:"8px"})}),t.jsx("p",{children:"Use a lowercase letter"})]}),a?.numbers?null:t.jsxs("div",{css:en(x.numbers),"aria-label":"Use a number. "+(x.numbers?"Requirement met.":"Requirement not met."),children:[t.jsx("div",{children:x.numbers?t.jsx(C,{color:"var(--chakra-colors-success-500)",height:"8px",width:"8px"}):t.jsx(E,{color:"var(--chakra-colors-error-900)",height:"8px",width:"8px"})}),t.jsx("p",{children:"Use a number"})]}),a?.specialCharacters?null:t.jsxs("div",{css:en(x.specialCharacters),"aria-label":"Use a special character. "+(x.specialCharacters?"Requirement met.":"Requirement not met."),children:[t.jsx("div",{children:x.specialCharacters?t.jsx(C,{color:"var(--chakra-colors-success-500)",height:"8px",width:"8px"}):t.jsx(E,{color:"var(--chakra-colors-error-900)",height:"8px",width:"8px"})}),t.jsx("p",{children:"Use a special character"})]})]}):null]});var v},exports.ProgressBar=({progress:e})=>{let n=e;return n>100&&(n=100),n<0&&(n=0),t.jsx("div",{css:zf,role:"progressbar","aria-label":`Progress: ${n}%`,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":n,children:t.jsx("div",{css:Bf(n)})})},exports.QualitativeAttribute=({type:e,label:r,caption:o,color:i,onActionClick:a,showActionButton:s,pointIcon:l=t.jsx(Z,{color:"#006D2C"}),ariaLabelType:c=""})=>{const[u,d]=n.useState(!0),p=n.useId(),h=n.useId(),f="raster"===e,x="line"===e,g="point"===e,v=n.useId(),m=n.useMemo((()=>`${c??`${c},`} ${r}${o?`, ${o}`:""}. Currently ${u?"visible":"hidden"}.`),[u,e,r,o]),y=u?"Hide":"Show";return t.jsxs("div",{css:bi,children:[t.jsx("p",{id:v,css:{position:"absolute",width:1,height:1,margin:-1,padding:0,border:0,clip:"rect(0 0 0 0)",overflow:"hidden"},children:m}),t.jsxs("div",{css:yi,children:[t.jsxs("div",{children:[f&&t.jsx("div",{css:gi(i)}),x&&t.jsx("div",{css:vi(i)}),g&&t.jsx("div",{css:mi(i),children:l})]}),t.jsxs("div",{children:[t.jsx("p",{id:p,css:wi,children:r}),o?t.jsx("p",{id:h,css:Ci,children:o}):null]})]}),a&&s?t.jsx("div",{css:ji,children:t.jsx(b,{type:"button",variant:"borderless",label:y,rightIcon:u?t.jsx(L,{}):t.jsx(O,{}),"aria-pressed":u,"aria-labelledby":`${v} ${p}`,onClick:()=>{d((e=>!e)),a?.()}})}):null]})},exports.Radio=Ze,exports.RadioGroup=We,exports.RadioList=({label:n,caption:o,name:i,radios:a,defaultValue:s,onCheckedChange:l,errorMessage:c,horizontal:u,variant:d="default",required:p})=>{const h=`${n}. ${o?`${o}.`:""} ${p?"Required.":"Optional."} ${c?`Error: ${c}.`:""} `;return t.jsxs(e.Group,{css:tn,"aria-roledescription":"group","aria-label":h,children:[c?t.jsx("div",{css:an}):null,t.jsxs("div",{css:(f=!!c,r.css`
|
|
3576
3587
|
margin-left: ${f?"19px":"0px"};
|
|
3577
3588
|
`),children:[t.jsxs("p",{css:nn,"aria-label":n,children:[p&&t.jsx("span",{"aria-label":"required",children:"*"}),n]}),t.jsx("p",{css:rn,"aria-label":o,children:o}),c?t.jsx("p",{css:sn,"aria-label":c,children:c}):null,t.jsx("div",{css:on,children:t.jsx(We,{name:i,defaultValue:s,onChange:l,horizontal:u&&"card"!==d,children:a.map((e=>t.jsx(Ze,{css:"card"===d?ln:{},...e},e.value)))})})]})]});var f},exports.SSOButtons=ne,exports.ScaleBar=({colors:e,values:n,subLabels:o,isGradient:i})=>{return t.jsxs("div",{css:ki,children:[i?t.jsx("div",{css:(a=Oi(e),r.css`
|
|
3578
3589
|
height: 20px;
|
|
@@ -3581,4 +3592,4 @@ function Ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3581
3592
|
border: 1px solid ${h("neutral",300)};
|
|
3582
3593
|
border-radius: 4px;
|
|
3583
3594
|
${a?`background: ${a};`:""}
|
|
3584
|
-
`)}):t.jsx("div",{css:$i,children:e?.map(((e,r)=>t.jsx("div",{"data-test":`${e}-${n?.[r]}`,style:{backgroundColor:e,width:"100%",height:"100%"}},`${e}-${n?.[r]}`)))}),t.jsx("div",{css:Si,children:n?.map((e=>t.jsx("div",{style:{width:i?"auto":`calc(100% / ${n.length})`,display:"flex",justifyContent:"center"},children:t.jsx("p",{css:Ei,children:e})},e)))}),o&&o.length?t.jsx("div",{css:Si,children:o.map((e=>t.jsx("div",{style:{width:i?"auto":`calc(100% / ${n.length})`,display:"flex",justifyContent:"center"},children:t.jsx("p",{css:Ri,style:{width:"100%"},children:e})},e)))}):null]});var a},exports.Select=qt,exports.Sheet=({header:e,content:n,footer:r,open:o=!1,onClose:i,minimizedHeight:a,midHeight:s=200,maxFullHeight:l,defaultSnap:c="minimized",className:u,blocking:d,zIndex:p=1e3})=>t.jsx(kh,{css:$h(!!e,p),className:u,open:o,onDismiss:i,header:e,footer:r,snapPoints:({headerHeight:e,maxHeight:t,footerHeight:n})=>[20,a||e,s+(r?n:0),l||t-t/6],defaultSnap:({headerHeight:e,maxHeight:t,footerHeight:n})=>{let o=20;return"minimized"===c?o=a||e:"mid"===c?o=s+(r?n:0):"full"===c&&(o=l||t-t/6),o},blocking:d,children:n}),exports.SimpleMapPin=({onClick:e,triggerRef:t,showFocusState:n,count:r,mode:i,variant:a="simple-pin"})=>o.jsx(Rn,{count:r,mode:i,onClick:e,ref:t,showFocusState:n,variant:a}),exports.Slider=et,exports.SliderInput=({label:e,caption:r,size:o="default",sliderItem:i,required:a,onChange:s})=>{const[l,c]=n.useState(i.value||[]),u=(e,t)=>{const n=e.target.value,r=[...l];let o=n?parseInt(n,10):n;const a=i.min||0,s=i.max||100;o=Number.isNaN(o)?a:o,o=o<a?a:o,o=o>s?s:o,r[t]=o,c(r)},d=(e,t)=>{const n=e.target.value||"0",r=[...l];let o=parseInt(n,10);const a=i.min||0,u=i.max||100;if(o=Number.isNaN(o)?a:o,o=o<a?a:o,o=o>u?u:o,2===l?.length){o=Number.isNaN(o)?a:o;const e=l[0],n=l[1];0===t?(o=o<a?a:o,o=o>n?n:o):1===t&&(o=o<e?e:o,o=o>u?u:o)}r[t]=o,c(r),s&&s(r)};return t.jsxs("div",{children:[t.jsxs("p",{css:cn(o),"aria-label":e,children:[a?t.jsx("span",{children:"*"}):null,e]}),r?t.jsx("p",{css:un(o),"aria-label":r,children:r}):null,t.jsxs("div",{css:dn,children:[i.step&&i.marks?t.jsx(qt,{items:i.marks.map((e=>({label:`${e.label}`,value:`${e.value}`}))),placeholder:"",style:{width:"90px"},value:[`${l?.[0]}`],onChange:e=>{const t=e.map((e=>parseInt(e,10)));c(t),s&&s(t)}}):t.jsx(wt,{"aria-label":e,min:i.min,max:i.max,value:l?.[0],type:"number",onChange:e=>u(e,0),onBlur:e=>d(e,0),className:"ds-opacity-control-text-input",onClick:e=>e.target.select()}),t.jsx(et,{css:{},...i,value:l,onValueChangeEnd:e=>{c(e.value),s&&s(e.value)}}),2===l?.length?t.jsx(wt,{"aria-label":e,min:i.min,max:i.max,value:l?.[1],type:"number",onChange:e=>u(e,1),onBlur:e=>d(e,1),className:"ds-opacity-control-text-input",onClick:e=>e.target.select()}):null]})]})},exports.StepProgressIndicator=({steps:e,currentStep:n})=>t.jsxs("div",{css:Bf,children:[e.map(((e,r)=>t.jsxs("div",{css:Hf,children:[t.jsx("button",{css:Ff(n>=r+1,n<r+1),type:"button",onClick:e.onClick,"aria-current":n===r+1,"aria-disabled":n<r+1,disabled:n<r+1,"aria-label":`Current Step ${r}${e.label?` ${e.label}`:""}`,"data-active":n>=r+1,children:n>r+1?t.jsx(C,{height:"16px",width:"16px"}):r+1}),e.label?t.jsx("p",{css:Zf(n===r+1),children:e.label}):null]},`${e.label}-${r}`))),t.jsx("div",{css:Wf,children:t.jsx("div",{css:Gf})})]}),exports.Switch=nt,exports.TabBar=({variant:r="panel",defaultValue:o,tabs:i,onTabClick:a,activationMode:s="manual"})=>{const[l,c]=n.useState(vf(i,o)||0),u="view"===r;return t.jsx("div",{css:pf(r),children:t.jsx(e.Tabs.Root,{width:"full",defaultValue:o||i?.[0]?.value,onValueChange:({value:e})=>{return c(vf(i,t=e)),void(a&&a(t));var t},activationMode:s,children:t.jsx(e.Tabs.List,{alignItems:"center",border:"none",children:i.map(((r,o)=>t.jsxs(n.Fragment,{children:[u&&1===o&&"left"===mf(l)?t.jsx("div",{css:xf}):null,t.jsx(e.Tabs.Trigger,{css:[hf,u?gf:ff],"aria-label":r["aria-label"]||r.label,...r,children:t.jsxs(e.Box,{display:"flex",alignItems:"center",gap:"5px",children:[r.icon,r.label]})},r.label),u&&1===o&&"right"===mf(l)?t.jsx("div",{css:xf}):null]},r.label)))})})})},exports.Table=({columns:r,data:o,renderRow:i,striped:a,stickyHeader:s,pagination:l,selectable:c,selectedRows:u,onSortColumn:d,onPageSizeChange:p,onPageChange:h,onAllItemsSelected:f})=>{const[x,g]=n.useState({key:"",order:""}),{totalItems:v=o.length,currentPage:m=1,pageSize:b=10,showItemCount:y,showItemCountText:w}=l||{},C=(e,t)=>{g({key:e,order:t}),d&&d({key:e,order:t})},j=u?.length===o?.length,k=u&&u.length>0&&!j;return t.jsxs("div",{children:[t.jsxs(e.Table.Root,{css:qi,striped:a,stickyHeader:s,interactive:!0,children:[t.jsx(e.Table.Header,{css:Ui,children:t.jsxs(e.Table.Row,{children:[c?t.jsx(e.Table.ColumnHeader,{children:t.jsx(Re,{name:"header-checkbox",checked:j,indeterminate:k,onCheckedChange:({checked:e})=>{f&&f(e)}})}):null,r.map((n=>t.jsx(e.Table.ColumnHeader,{role:n.sortable?"columnheader":void 0,"aria-sort":n.sortable&&"asc"===x.order?"ascending":n.sortable&&"desc"===x.order?"descending":void 0,children:t.jsxs("div",{css:Xi,children:[n.label,n.sortable?t.jsxs("div",{css:Yi,children:[t.jsx(ie,{css:Ki(x.key===n.key&&"asc"===x.order),icon:t.jsx($,{style:{transform:"rotate(180deg)"}}),onClick:()=>C(n.key,"asc"),"aria-label":"Ascending"}),t.jsx(ie,{css:Ki(x.key===n.key&&"desc"===x.order),icon:t.jsx($,{}),onClick:()=>C(n.key,"desc"),"aria-label":"Descending"})]}):null]})},n.key)))]})}),t.jsx(e.Table.Body,{children:o.map((e=>t.jsx(n.Fragment,{children:i(e)},e.id)))})]}),t.jsxs("div",{css:Ji,children:[t.jsx("div",{children:y?t.jsx(Mi,{pageSize:b,currentPage:m,totalItems:v,onPageSizeChange:p,showItemCountText:w}):null}),l?t.jsx("div",{css:Qi,children:t.jsx(Gi,{totalItems:v,pageSize:b,currentPage:m,onPageChange:h})}):null]})]})},exports.TableCell=ta,exports.TableRow=ea,exports.Tag=Zt,exports.TextInput=wt,exports.Textarea=({label:r,caption:o,placeholder:i,errorMessage:a,required:s,disabled:l,size:c="default",defaultValue:u="",onChange:d,minLength:p,maxLength:h,...f})=>{const[x,g]=n.useState(u),[v,m]=n.useState(!1),[b,y]=n.useState(!1),[w,C]=n.useState(""),j=n.useId(),k=n.useId(),$=n.useId();n.useEffect((()=>{const{length:e}=u;p&&e<p&&e>0?(m(e<p),y(!1),C(`Enter at least ${p-e} characters`)):p&&0===e&&C(`Min ${p} characters`),h&&e>0?(m(!1),y(e>h),C(`You have ${h-e} characters remaining`)):h&&0===e&&C(`Max ${h} characters`)}),[]);const S=!!a||v||b,E=[o?j:null,S?k:null,w?$:null].filter(Boolean).join(" ")||void 0;return t.jsxs("div",{css:pn(c),children:[S?t.jsx("div",{css:hn}):null,t.jsxs(e.Field.Root,{required:s,invalid:S,gap:"0",style:{marginLeft:S?"19px":"0px"},children:[r?t.jsxs(e.Field.Label,{css:fn(c,l),"aria-label":r,children:[t.jsx(e.Field.RequiredIndicator,{"aria-label":"required"}),r,s?"":t.jsx("span",{children:" (Optional)"})]}):null,o?t.jsx(e.Field.HelperText,{id:j,css:xn(c,l),children:o}):null,a?t.jsx(e.Field.ErrorText,{id:k,css:vn,"aria-label":`Error: ${a}`,"aria-live":"polite",children:a}):null,t.jsx(e.Textarea,{placeholder:i,disabled:l,css:mn(c,x,u),onChange:e=>{g(e.target.value);const{length:t}=e.target.value;p&&h?(m(t<p),y(t>h),C(`You have ${h-t} characters remaining`)):p?(m(t<p),y(!1),C(t<p?`Enter at least ${p-t} characters`:"")):h&&(y(t>h),m(!1),C(`You have ${h-t} characters remaining`)),d&&d(e)},value:x,"aria-describedby":E,_placeholder:{color:"var(--chakra-colors-neutral-500)"},...f}),v&&p?t.jsxs(e.Field.ErrorText,{id:k,css:vn,style:{marginTop:"8px",fontSize:"12px",lineHeight:"16px"},"aria-live":"polite",children:["You need ",p-x.length," more characters"]}):null,b&&h?t.jsxs(e.Field.ErrorText,{id:k,css:vn,style:{marginTop:"8px",fontSize:"12px",lineHeight:"16px"},"aria-live":"polite",children:["You have ",x.length-h," characters too many"]}):null,!w||b||v?null:t.jsx(e.Field.HelperText,{id:$,css:gn,"aria-live":"polite",children:w})]})]})},exports.Toast=()=>Object.keys(Qf).map((n=>t.jsx(e.Portal,{children:t.jsx(e.Toaster,{toaster:Qf[n],insetInline:{mdDown:"4"},children:r=>t.jsxs(e.Toast.Root,{css:qf,width:{md:"sm"},children:[t.jsxs(e.Stack,{flexDirection:"row",className:"ds-toast-icon-container",children:["info"===r.type?r.meta?.icon?r.meta.icon:t.jsx(k,{color:"var(--chakra-colors-neutral-700)"}):null,"loading"===r.type?t.jsx(e.Spinner,{size:"lg",borderWidth:"3px",color:"var(--chakra-colors-primary-500)"}):null,"success"===r.type?r.meta?.icon?r.meta.icon:t.jsx(P,{color:"var(--chakra-colors-success-500)"}):null,"warning"===r.type?r.meta?.icon?r.meta.icon:t.jsx(M,{color:"var(--chakra-colors-warning-500)"}):null,"error"===r.type?r.meta?.icon?r.meta.icon:t.jsx(_,{color:"var(--chakra-colors-error-500)"}):null,t.jsxs(e.Stack,{gap:"1",flex:"1",maxWidth:"100%",children:[t.jsx(e.Toast.Title,{css:Uf,"aria-label":`${r.title}`,children:r.title}),r.description?t.jsx(e.Toast.Title,{css:Xf,"aria-label":`${r.description}`,children:r.description}):null]})]}),r.action||r.meta?.closable?t.jsxs(e.Stack,{flexDirection:"row",children:[r.action?t.jsx(b,{css:Yf,label:r.action.label,size:"small",variant:"info"===r.type?"primary":"secondary",onClick:()=>{r?.action?.onClick&&r.action.onClick(),Qf[n].dismiss()}}):null,r.meta?.closable?t.jsx(b,{css:Kf,label:r.meta.closableLabel,"aria-label":r.meta?.closableLabel||"Dismiss",leftIcon:t.jsx(E,{height:"10px!",width:"10px!"}),size:"small",variant:"secondary",onClick:()=>Qf[n].dismiss()}):null]}):null]})})},n))),exports.Toolbar=he,exports.Tooltip=de,exports.designSystemStyles=p,exports.designSystemStylesForTailwind=d,exports.getThemedColor=h,exports.showToast=e=>{Qf[e.placement].create({title:e.label,description:e.caption,duration:e.duration||5e3,meta:{closable:e.closable,icon:e.icon,closableLabel:e.closableLabel},...e})};
|
|
3595
|
+
`)}):t.jsx("div",{css:$i,children:e?.map(((e,r)=>t.jsx("div",{"data-test":`${e}-${n?.[r]}`,style:{backgroundColor:e,width:"100%",height:"100%"}},`${e}-${n?.[r]}`)))}),t.jsx("div",{css:Si,children:n?.map((e=>t.jsx("div",{style:{width:i?"auto":`calc(100% / ${n.length})`,display:"flex",justifyContent:"center"},children:t.jsx("p",{css:Ei,children:e})},e)))}),o&&o.length?t.jsx("div",{css:Si,children:o.map((e=>t.jsx("div",{style:{width:i?"auto":`calc(100% / ${n.length})`,display:"flex",justifyContent:"center"},children:t.jsx("p",{css:Ri,style:{width:"100%"},children:e})},e)))}):null]});var a},exports.Select=qt,exports.Sheet=({header:e,content:r,footer:o,open:i=!1,onClose:a,minimizedHeight:s,midHeight:l=200,maxFullHeight:c,defaultSnap:u="minimized",className:d,blocking:p,zIndex:h=1e3})=>{const f=n.useRef(null),x=n.useRef([]),[g,v]=n.useState(null),m=window.innerWidth>768,b=x.current;let y="Expand sheet";if(null!=g){const e=b.indexOf(g);e>0&&e<b.length-1?y="Make full screen":e===b.length-1&&(y="Expand sheet")}return t.jsx(kh,{ref:f,css:Sh(!!e,h),className:d,open:i,onDismiss:a,header:t.jsxs("div",{children:[t.jsx("div",{tabIndex:0,role:"button","aria-label":y,"aria-expanded":i,css:$h,onKeyDown:e=>{if("Enter"!==e.key&&" "!==e.key)return;e.preventDefault();const t=b[b.length-1];if(m)return void f.current?.snapTo?.((()=>t));const n=g??b[0];let r=b.findIndex((e=>e>n));-1===r&&(r=b.length-1);const o=b[r];f.current?.snapTo?.((()=>o))}}),e]}),footer:o,snapPoints:({headerHeight:e,maxHeight:t,footerHeight:n})=>{const r=[20,s||e,l+(o?n:0),c||t-t/6];return x.current=r,r},onSpringEnd:()=>{const e=f.current?.height;e&&v(e)},defaultSnap:({headerHeight:e,maxHeight:t,footerHeight:n})=>{let r=20;return"minimized"===u?r=s||e:"mid"===u?r=l+(o?n:0):"full"===u&&(r=c||t-t/6),r},blocking:p,children:i?r:null})},exports.SimpleMapPin=({onClick:e,triggerRef:t,showFocusState:n,count:r,mode:i,variant:a="simple-pin"})=>o.jsx(Rn,{count:r,mode:i,onClick:e,ref:t,showFocusState:n,variant:a}),exports.Slider=et,exports.SliderInput=({label:e,caption:r,size:o="default",sliderItem:i,required:a,onChange:s})=>{const[l,c]=n.useState(i.value||[]),u=(e,t)=>{const n=e.target.value,r=[...l];let o=n?parseInt(n,10):n;const a=i.min||0,s=i.max||100;o=Number.isNaN(o)?a:o,o=o<a?a:o,o=o>s?s:o,r[t]=o,c(r)},d=(e,t)=>{const n=e.target.value||"0",r=[...l];let o=parseInt(n,10);const a=i.min||0,u=i.max||100;if(o=Number.isNaN(o)?a:o,o=o<a?a:o,o=o>u?u:o,2===l?.length){o=Number.isNaN(o)?a:o;const e=l[0],n=l[1];0===t?(o=o<a?a:o,o=o>n?n:o):1===t&&(o=o<e?e:o,o=o>u?u:o)}r[t]=o,c(r),s&&s(r)};return t.jsxs("div",{children:[t.jsxs("p",{css:cn(o),"aria-label":e,children:[a?t.jsx("span",{children:"*"}):null,e]}),r?t.jsx("p",{css:un(o),"aria-label":r,children:r}):null,t.jsxs("div",{css:dn,children:[i.step&&i.marks?t.jsx(qt,{items:i.marks.map((e=>({label:`${e.label}`,value:`${e.value}`}))),placeholder:"",style:{width:"90px"},value:[`${l?.[0]}`],onChange:e=>{const t=e.map((e=>parseInt(e,10)));c(t),s&&s(t)}}):t.jsx(wt,{"aria-label":e,min:i.min,max:i.max,value:l?.[0],type:"number",onChange:e=>u(e,0),onBlur:e=>d(e,0),className:"ds-opacity-control-text-input",onClick:e=>e.target.select()}),t.jsx(et,{css:{},...i,value:l,onValueChangeEnd:e=>{c(e.value),s&&s(e.value)}}),2===l?.length?t.jsx(wt,{"aria-label":e,min:i.min,max:i.max,value:l?.[1],type:"number",onChange:e=>u(e,1),onBlur:e=>d(e,1),className:"ds-opacity-control-text-input",onClick:e=>e.target.select()}):null]})]})},exports.StepProgressIndicator=({steps:e,currentStep:n})=>t.jsxs("div",{css:Hf,children:[e.map(((e,r)=>t.jsxs("div",{css:Ff,children:[t.jsx("button",{css:Zf(n>=r+1,n<r+1),type:"button",onClick:e.onClick,"aria-current":n===r+1,"aria-disabled":n<r+1,disabled:n<r+1,"aria-label":`Current Step ${r}${e.label?` ${e.label}`:""}`,"data-active":n>=r+1,children:n>r+1?t.jsx(C,{height:"16px",width:"16px"}):r+1}),e.label?t.jsx("p",{css:Wf(n===r+1),children:e.label}):null]},`${e.label}-${r}`))),t.jsx("div",{css:Gf,children:t.jsx("div",{css:qf})})]}),exports.Switch=nt,exports.TabBar=({variant:r="panel",defaultValue:o,tabs:i,onTabClick:a,activationMode:s="manual"})=>{const[l,c]=n.useState(mf(i,o)||0),u="view"===r;return t.jsx("div",{css:hf(r),children:t.jsx(e.Tabs.Root,{width:"full",defaultValue:o||i?.[0]?.value,onValueChange:({value:e})=>{return c(mf(i,t=e)),void(a&&a(t));var t},activationMode:s,children:t.jsx(e.Tabs.List,{alignItems:"center",border:"none",children:i.map(((r,o)=>t.jsxs(n.Fragment,{children:[u&&1===o&&"left"===bf(l)?t.jsx("div",{css:gf}):null,t.jsx(e.Tabs.Trigger,{css:[ff,u?vf:xf],"aria-label":r["aria-label"]||r.label,...r,children:t.jsxs(e.Box,{display:"flex",alignItems:"center",gap:"5px",children:[r.icon,r.label]})},r.label),u&&1===o&&"right"===bf(l)?t.jsx("div",{css:gf}):null]},r.label)))})})})},exports.Table=({columns:r,data:o,renderRow:i,striped:a,stickyHeader:s,pagination:l,selectable:c,selectedRows:u,onSortColumn:d,onPageSizeChange:p,onPageChange:h,onAllItemsSelected:f})=>{const[x,g]=n.useState({key:"",order:""}),{totalItems:v=o.length,currentPage:m=1,pageSize:b=10,showItemCount:y,showItemCountText:w}=l||{},C=(e,t)=>{g({key:e,order:t}),d&&d({key:e,order:t})},j=u?.length===o?.length,k=u&&u.length>0&&!j;return t.jsxs("div",{children:[t.jsxs(e.Table.Root,{css:qi,striped:a,stickyHeader:s,interactive:!0,children:[t.jsx(e.Table.Header,{css:Ui,children:t.jsxs(e.Table.Row,{children:[c?t.jsx(e.Table.ColumnHeader,{children:t.jsx(Re,{name:"header-checkbox",checked:j,indeterminate:k,onCheckedChange:({checked:e})=>{f&&f(e)}})}):null,r.map((n=>t.jsx(e.Table.ColumnHeader,{role:n.sortable?"columnheader":void 0,"aria-sort":n.sortable&&"asc"===x.order?"ascending":n.sortable&&"desc"===x.order?"descending":void 0,children:t.jsxs("div",{css:Xi,children:[n.label,n.sortable?t.jsxs("div",{css:Yi,children:[t.jsx(ie,{css:Ki(x.key===n.key&&"asc"===x.order),icon:t.jsx($,{style:{transform:"rotate(180deg)"}}),onClick:()=>C(n.key,"asc"),"aria-label":"Ascending"}),t.jsx(ie,{css:Ki(x.key===n.key&&"desc"===x.order),icon:t.jsx($,{}),onClick:()=>C(n.key,"desc"),"aria-label":"Descending"})]}):null]})},n.key)))]})}),t.jsx(e.Table.Body,{children:o.map((e=>t.jsx(n.Fragment,{children:i(e)},e.id)))})]}),t.jsxs("div",{css:Ji,children:[t.jsx("div",{children:y?t.jsx(Mi,{pageSize:b,currentPage:m,totalItems:v,onPageSizeChange:p,showItemCountText:w}):null}),l?t.jsx("div",{css:Qi,children:t.jsx(Gi,{totalItems:v,pageSize:b,currentPage:m,onPageChange:h})}):null]})]})},exports.TableCell=ta,exports.TableRow=ea,exports.Tag=Zt,exports.TextInput=wt,exports.Textarea=({label:r,caption:o,placeholder:i,errorMessage:a,required:s,disabled:l,size:c="default",defaultValue:u="",onChange:d,minLength:p,maxLength:h,...f})=>{const[x,g]=n.useState(u),[v,m]=n.useState(!1),[b,y]=n.useState(!1),[w,C]=n.useState(""),j=n.useId(),k=n.useId(),$=n.useId();n.useEffect((()=>{const{length:e}=u;p&&e<p&&e>0?(m(e<p),y(!1),C(`Enter at least ${p-e} characters`)):p&&0===e&&C(`Min ${p} characters`),h&&e>0?(m(!1),y(e>h),C(`You have ${h-e} characters remaining`)):h&&0===e&&C(`Max ${h} characters`)}),[]);const S=!!a||v||b,E=[o?j:null,S?k:null,w?$:null].filter(Boolean).join(" ")||void 0;return t.jsxs("div",{css:pn(c),children:[S?t.jsx("div",{css:hn}):null,t.jsxs(e.Field.Root,{required:s,invalid:S,gap:"0",style:{marginLeft:S?"19px":"0px"},children:[r?t.jsxs(e.Field.Label,{css:fn(c,l),"aria-label":r,children:[t.jsx(e.Field.RequiredIndicator,{"aria-label":"required"}),r,s?"":t.jsx("span",{children:" (Optional)"})]}):null,o?t.jsx(e.Field.HelperText,{id:j,css:xn(c,l),children:o}):null,a?t.jsx(e.Field.ErrorText,{id:k,css:vn,"aria-label":`Error: ${a}`,"aria-live":"polite",children:a}):null,t.jsx(e.Textarea,{placeholder:i,disabled:l,css:mn(c,x,u),onChange:e=>{g(e.target.value);const{length:t}=e.target.value;p&&h?(m(t<p),y(t>h),C(`You have ${h-t} characters remaining`)):p?(m(t<p),y(!1),C(t<p?`Enter at least ${p-t} characters`:"")):h&&(y(t>h),m(!1),C(`You have ${h-t} characters remaining`)),d&&d(e)},value:x,"aria-describedby":E,_placeholder:{color:"var(--chakra-colors-neutral-500)"},...f}),v&&p?t.jsxs(e.Field.ErrorText,{id:k,css:vn,style:{marginTop:"8px",fontSize:"12px",lineHeight:"16px"},"aria-live":"polite",children:["You need ",p-x.length," more characters"]}):null,b&&h?t.jsxs(e.Field.ErrorText,{id:k,css:vn,style:{marginTop:"8px",fontSize:"12px",lineHeight:"16px"},"aria-live":"polite",children:["You have ",x.length-h," characters too many"]}):null,!w||b||v?null:t.jsx(e.Field.HelperText,{id:$,css:gn,"aria-live":"polite",children:w})]})]})},exports.Toast=()=>Object.keys(ex).map((n=>t.jsx(e.Portal,{children:t.jsx(e.Toaster,{toaster:ex[n],insetInline:{mdDown:"4"},children:r=>t.jsxs(e.Toast.Root,{css:Uf,width:{md:"sm"},children:[t.jsxs(e.Stack,{flexDirection:"row",className:"ds-toast-icon-container",children:["info"===r.type?r.meta?.icon?r.meta.icon:t.jsx(k,{color:"var(--chakra-colors-neutral-700)"}):null,"loading"===r.type?t.jsx(e.Spinner,{size:"lg",borderWidth:"3px",color:"var(--chakra-colors-primary-500)"}):null,"success"===r.type?r.meta?.icon?r.meta.icon:t.jsx(P,{color:"var(--chakra-colors-success-500)"}):null,"warning"===r.type?r.meta?.icon?r.meta.icon:t.jsx(M,{color:"var(--chakra-colors-warning-500)"}):null,"error"===r.type?r.meta?.icon?r.meta.icon:t.jsx(_,{color:"var(--chakra-colors-error-500)"}):null,t.jsxs(e.Stack,{gap:"1",flex:"1",maxWidth:"100%",children:[t.jsx(e.Toast.Title,{css:Xf,"aria-label":`${r.title}`,children:r.title}),r.description?t.jsx(e.Toast.Title,{css:Yf,"aria-label":`${r.description}`,children:r.description}):null]})]}),r.action||r.meta?.closable?t.jsxs(e.Stack,{flexDirection:"row",children:[r.action?t.jsx(b,{css:Kf,label:r.action.label,size:"small",variant:"info"===r.type?"primary":"secondary",onClick:()=>{r?.action?.onClick&&r.action.onClick(),ex[n].dismiss()}}):null,r.meta?.closable?t.jsx(b,{css:Jf,label:r.meta.closableLabel,"aria-label":r.meta?.closableLabel||"Dismiss",leftIcon:t.jsx(E,{height:"10px!",width:"10px!"}),size:"small",variant:"secondary",onClick:()=>ex[n].dismiss()}):null]}):null]})})},n))),exports.Toolbar=he,exports.Tooltip=de,exports.designSystemStyles=p,exports.designSystemStylesForTailwind=d,exports.getThemedColor=h,exports.showToast=e=>{ex[e.placement].create({title:e.label,description:e.caption,duration:e.duration||5e3,meta:{closable:e.closable,icon:e.icon,closableLabel:e.closableLabel},...e})};
|