UNPKG

@esri/calcite-components

Version:

Web Components for Esri's Calcite Design System.

1 lines • 20.7 kB
System.register(["./p-60d9e7d4.system.js"],(function(e){"use strict";var t;return{setters:[function(e){t=e.g}],execute:function(){e({c:ot,u:ft});var r="top";var n="bottom";var a="right";var i="left";var o="auto";var f=[r,n,a,i];var s="start";var c="end";var u="clippingParents";var v="viewport";var p="popper";var l="reference";var d=f.reduce((function(e,t){return e.concat([t+"-"+s,t+"-"+c])}),[]);var m=[].concat(f,[o]).reduce((function(e,t){return e.concat([t,t+"-"+s,t+"-"+c])}),[]);var h="beforeRead";var g="read";var y="afterRead";var b="beforeMain";var w="main";var x="afterMain";var O="beforeWrite";var j="write";var E="afterWrite";var D=[h,g,y,b,w,x,O,j,E];function M(e){return e?(e.nodeName||"").toLowerCase():null}function k(e){if(e==null){return window}if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t?t.defaultView||window:window}return e}function L(e){var t=k(e).Element;return e instanceof t||e instanceof Element}function P(e){var t=k(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function A(e){if(typeof ShadowRoot==="undefined"){return false}var t=k(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function W(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var r=t.styles[e]||{};var n=t.attributes[e]||{};var a=t.elements[e];if(!P(a)||!M(a)){return}Object.assign(a.style,r);Object.keys(n).forEach((function(e){var t=n[e];if(t===false){a.removeAttribute(e)}else{a.setAttribute(e,t===true?"":t)}}))}))}function B(e){var t=e.state;var r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(t.elements.popper.style,r.popper);t.styles=r;if(t.elements.arrow){Object.assign(t.elements.arrow.style,r.arrow)}return function(){Object.keys(t.elements).forEach((function(e){var n=t.elements[e];var a=t.attributes[e]||{};var i=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:r[e]);var o=i.reduce((function(e,t){e[t]="";return e}),{});if(!P(n)||!M(n)){return}Object.assign(n.style,o);Object.keys(a).forEach((function(e){n.removeAttribute(e)}))}))}}var H={name:"applyStyles",enabled:true,phase:"write",fn:W,effect:B,requires:["computeStyles"]};function R(e){return e.split("-")[0]}function T(e){var t=e.getBoundingClientRect();return{width:t.width,height:t.height,top:t.top,right:t.right,bottom:t.bottom,left:t.left,x:t.left,y:t.top}}function S(e){var t=T(e);var r=e.offsetWidth;var n=e.offsetHeight;if(Math.abs(t.width-r)<=1){r=t.width}if(Math.abs(t.height-n)<=1){n=t.height}return{x:e.offsetLeft,y:e.offsetTop,width:r,height:n}}function q(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t)){return true}else if(r&&A(r)){var n=t;do{if(n&&e.isSameNode(n)){return true}n=n.parentNode||n.host}while(n)}return false}function C(e){return k(e).getComputedStyle(e)}function N(e){return["table","td","th"].indexOf(M(e))>=0}function V(e){return((L(e)?e.ownerDocument:e.document)||window.document).documentElement}function I(e){if(M(e)==="html"){return e}return e.assignedSlot||e.parentNode||(A(e)?e.host:null)||V(e)}function U(e){if(!P(e)||C(e).position==="fixed"){return null}return e.offsetParent}function z(e){var t=navigator.userAgent.toLowerCase().indexOf("firefox")!==-1;var r=navigator.userAgent.indexOf("Trident")!==-1;if(r&&P(e)){var n=C(e);if(n.position==="fixed"){return null}}var a=I(e);while(P(a)&&["html","body"].indexOf(M(a))<0){var i=C(a);if(i.transform!=="none"||i.perspective!=="none"||i.contain==="paint"||["transform","perspective"].indexOf(i.willChange)!==-1||t&&i.willChange==="filter"||t&&i.filter&&i.filter!=="none"){return a}else{a=a.parentNode}}return null}function _(e){var t=k(e);var r=U(e);while(r&&N(r)&&C(r).position==="static"){r=U(r)}if(r&&(M(r)==="html"||M(r)==="body"&&C(r).position==="static")){return t}return r||z(e)||t}function F(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}var X=Math.max;var Y=Math.min;var G=Math.round;function J(e,t,r){return X(e,Y(t,r))}function K(){return{top:0,right:0,bottom:0,left:0}}function Q(e){return Object.assign({},K(),e)}function Z(e,t){return t.reduce((function(t,r){t[r]=e;return t}),{})}var $=function e(t,r){t=typeof t==="function"?t(Object.assign({},r.rects,{placement:r.placement})):t;return Q(typeof t!=="number"?t:Z(t,f))};function ee(e){var t;var o=e.state,f=e.name,s=e.options;var c=o.elements.arrow;var u=o.modifiersData.popperOffsets;var v=R(o.placement);var p=F(v);var l=[i,a].indexOf(v)>=0;var d=l?"height":"width";if(!c||!u){return}var m=$(s.padding,o);var h=S(c);var g=p==="y"?r:i;var y=p==="y"?n:a;var b=o.rects.reference[d]+o.rects.reference[p]-u[p]-o.rects.popper[d];var w=u[p]-o.rects.reference[p];var x=_(c);var O=x?p==="y"?x.clientHeight||0:x.clientWidth||0:0;var j=b/2-w/2;var E=m[g];var D=O-h[d]-m[y];var M=O/2-h[d]/2+j;var k=J(E,M,D);var L=p;o.modifiersData[f]=(t={},t[L]=k,t.centerOffset=k-M,t)}function te(e){var t=e.state,r=e.options;var n=r.element,a=n===void 0?"[data-popper-arrow]":n;if(a==null){return}if(typeof a==="string"){a=t.elements.popper.querySelector(a);if(!a){return}}if(!q(t.elements.popper,a)){return}t.elements.arrow=a}var re={name:"arrow",enabled:true,phase:"main",fn:ee,effect:te,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};var ne={top:"auto",right:"auto",bottom:"auto",left:"auto"};function ae(e){var t=e.x,r=e.y;var n=window;var a=n.devicePixelRatio||1;return{x:G(G(t*a)/a)||0,y:G(G(r*a)/a)||0}}function ie(e){var t;var o=e.popper,f=e.popperRect,s=e.placement,c=e.offsets,u=e.position,v=e.gpuAcceleration,p=e.adaptive,l=e.roundOffsets;var d=l===true?ae(c):typeof l==="function"?l(c):c,m=d.x,h=m===void 0?0:m,g=d.y,y=g===void 0?0:g;var b=c.hasOwnProperty("x");var w=c.hasOwnProperty("y");var x=i;var O=r;var j=window;if(p){var E=_(o);var D="clientHeight";var M="clientWidth";if(E===k(o)){E=V(o);if(C(E).position!=="static"){D="scrollHeight";M="scrollWidth"}}E=E;if(s===r){O=n;y-=E[D]-f.height;y*=v?1:-1}if(s===i){x=a;h-=E[M]-f.width;h*=v?1:-1}}var L=Object.assign({position:u},p&&ne);if(v){var P;return Object.assign({},L,(P={},P[O]=w?"0":"",P[x]=b?"0":"",P.transform=(j.devicePixelRatio||1)<2?"translate("+h+"px, "+y+"px)":"translate3d("+h+"px, "+y+"px, 0)",P))}return Object.assign({},L,(t={},t[O]=w?y+"px":"",t[x]=b?h+"px":"",t.transform="",t))}function oe(e){var t=e.state,r=e.options;var n=r.gpuAcceleration,a=n===void 0?true:n,i=r.adaptive,o=i===void 0?true:i,f=r.roundOffsets,s=f===void 0?true:f;var c={placement:R(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:a};if(t.modifiersData.popperOffsets!=null){t.styles.popper=Object.assign({},t.styles.popper,ie(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o,roundOffsets:s})))}if(t.modifiersData.arrow!=null){t.styles.arrow=Object.assign({},t.styles.arrow,ie(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:false,roundOffsets:s})))}t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}var fe={name:"computeStyles",enabled:true,phase:"beforeWrite",fn:oe,data:{}};var se={passive:true};function ce(e){var t=e.state,r=e.instance,n=e.options;var a=n.scroll,i=a===void 0?true:a,o=n.resize,f=o===void 0?true:o;var s=k(t.elements.popper);var c=[].concat(t.scrollParents.reference,t.scrollParents.popper);if(i){c.forEach((function(e){e.addEventListener("scroll",r.update,se)}))}if(f){s.addEventListener("resize",r.update,se)}return function(){if(i){c.forEach((function(e){e.removeEventListener("scroll",r.update,se)}))}if(f){s.removeEventListener("resize",r.update,se)}}}var ue={name:"eventListeners",enabled:true,phase:"write",fn:function e(){},effect:ce,data:{}};var ve={left:"right",right:"left",bottom:"top",top:"bottom"};function pe(e){return e.replace(/left|right|bottom|top/g,(function(e){return ve[e]}))}var le={start:"end",end:"start"};function de(e){return e.replace(/start|end/g,(function(e){return le[e]}))}function me(e){var t=k(e);var r=t.pageXOffset;var n=t.pageYOffset;return{scrollLeft:r,scrollTop:n}}function he(e){return T(V(e)).left+me(e).scrollLeft}function ge(e){var t=k(e);var r=V(e);var n=t.visualViewport;var a=r.clientWidth;var i=r.clientHeight;var o=0;var f=0;if(n){a=n.width;i=n.height;if(!/^((?!chrome|android).)*safari/i.test(navigator.userAgent)){o=n.offsetLeft;f=n.offsetTop}}return{width:a,height:i,x:o+he(e),y:f}}function ye(e){var t;var r=V(e);var n=me(e);var a=(t=e.ownerDocument)==null?void 0:t.body;var i=X(r.scrollWidth,r.clientWidth,a?a.scrollWidth:0,a?a.clientWidth:0);var o=X(r.scrollHeight,r.clientHeight,a?a.scrollHeight:0,a?a.clientHeight:0);var f=-n.scrollLeft+he(e);var s=-n.scrollTop;if(C(a||r).direction==="rtl"){f+=X(r.clientWidth,a?a.clientWidth:0)-i}return{width:i,height:o,x:f,y:s}}function be(e){var t=C(e),r=t.overflow,n=t.overflowX,a=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+a+n)}function we(e){if(["html","body","#document"].indexOf(M(e))>=0){return e.ownerDocument.body}if(P(e)&&be(e)){return e}return we(I(e))}function xe(e,t){var r;if(t===void 0){t=[]}var n=we(e);var a=n===((r=e.ownerDocument)==null?void 0:r.body);var i=k(n);var o=a?[i].concat(i.visualViewport||[],be(n)?n:[]):n;var f=t.concat(o);return a?f:f.concat(xe(I(o)))}function Oe(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function je(e){var t=T(e);t.top=t.top+e.clientTop;t.left=t.left+e.clientLeft;t.bottom=t.top+e.clientHeight;t.right=t.left+e.clientWidth;t.width=e.clientWidth;t.height=e.clientHeight;t.x=t.left;t.y=t.top;return t}function Ee(e,t){return t===v?Oe(ge(e)):P(t)?je(t):Oe(ye(V(e)))}function De(e){var t=xe(I(e));var r=["absolute","fixed"].indexOf(C(e).position)>=0;var n=r&&P(e)?_(e):e;if(!L(n)){return[]}return t.filter((function(e){return L(e)&&q(e,n)&&M(e)!=="body"}))}function Me(e,t,r){var n=t==="clippingParents"?De(e):[].concat(t);var a=[].concat(n,[r]);var i=a[0];var o=a.reduce((function(t,r){var n=Ee(e,r);t.top=X(n.top,t.top);t.right=Y(n.right,t.right);t.bottom=Y(n.bottom,t.bottom);t.left=X(n.left,t.left);return t}),Ee(e,i));o.width=o.right-o.left;o.height=o.bottom-o.top;o.x=o.left;o.y=o.top;return o}function ke(e){return e.split("-")[1]}function Le(e){var t=e.reference,o=e.element,f=e.placement;var u=f?R(f):null;var v=f?ke(f):null;var p=t.x+t.width/2-o.width/2;var l=t.y+t.height/2-o.height/2;var d;switch(u){case r:d={x:p,y:t.y-o.height};break;case n:d={x:p,y:t.y+t.height};break;case a:d={x:t.x+t.width,y:l};break;case i:d={x:t.x-o.width,y:l};break;default:d={x:t.x,y:t.y}}var m=u?F(u):null;if(m!=null){var h=m==="y"?"height":"width";switch(v){case s:d[m]=d[m]-(t[h]/2-o[h]/2);break;case c:d[m]=d[m]+(t[h]/2-o[h]/2);break}}return d}function Pe(e,t){if(t===void 0){t={}}var i=t,o=i.placement,s=o===void 0?e.placement:o,c=i.boundary,d=c===void 0?u:c,m=i.rootBoundary,h=m===void 0?v:m,g=i.elementContext,y=g===void 0?p:g,b=i.altBoundary,w=b===void 0?false:b,x=i.padding,O=x===void 0?0:x;var j=Q(typeof O!=="number"?O:Z(O,f));var E=y===p?l:p;var D=e.elements.reference;var M=e.rects.popper;var k=e.elements[w?E:y];var P=Me(L(k)?k:k.contextElement||V(e.elements.popper),d,h);var A=T(D);var W=Le({reference:A,element:M,strategy:"absolute",placement:s});var B=Oe(Object.assign({},M,W));var H=y===p?B:A;var R={top:P.top-H.top+j.top,bottom:H.bottom-P.bottom+j.bottom,left:P.left-H.left+j.left,right:H.right-P.right+j.right};var S=e.modifiersData.offset;if(y===p&&S){var q=S[s];Object.keys(R).forEach((function(e){var t=[a,n].indexOf(e)>=0?1:-1;var i=[r,n].indexOf(e)>=0?"y":"x";R[e]+=q[i]*t}))}return R}function Ae(e,t){if(t===void 0){t={}}var r=t,n=r.placement,a=r.boundary,i=r.rootBoundary,o=r.padding,s=r.flipVariations,c=r.allowedAutoPlacements,u=c===void 0?m:c;var v=ke(n);var p=v?s?d:d.filter((function(e){return ke(e)===v})):f;var l=p.filter((function(e){return u.indexOf(e)>=0}));if(l.length===0){l=p}var h=l.reduce((function(t,r){t[r]=Pe(e,{placement:r,boundary:a,rootBoundary:i,padding:o})[R(r)];return t}),{});return Object.keys(h).sort((function(e,t){return h[e]-h[t]}))}function We(e){if(R(e)===o){return[]}var t=pe(e);return[de(e),t,de(t)]}function Be(e){var t=e.state,f=e.options,c=e.name;if(t.modifiersData[c]._skip){return}var u=f.mainAxis,v=u===void 0?true:u,p=f.altAxis,l=p===void 0?true:p,d=f.fallbackPlacements,m=f.padding,h=f.boundary,g=f.rootBoundary,y=f.altBoundary,b=f.flipVariations,w=b===void 0?true:b,x=f.allowedAutoPlacements;var O=t.options.placement;var j=R(O);var E=j===O;var D=d||(E||!w?[pe(O)]:We(O));var M=[O].concat(D).reduce((function(e,r){return e.concat(R(r)===o?Ae(t,{placement:r,boundary:h,rootBoundary:g,padding:m,flipVariations:w,allowedAutoPlacements:x}):r)}),[]);var k=t.rects.reference;var L=t.rects.popper;var P=new Map;var A=true;var W=M[0];for(var B=0;B<M.length;B++){var H=M[B];var T=R(H);var S=ke(H)===s;var q=[r,n].indexOf(T)>=0;var C=q?"width":"height";var N=Pe(t,{placement:H,boundary:h,rootBoundary:g,altBoundary:y,padding:m});var V=q?S?a:i:S?n:r;if(k[C]>L[C]){V=pe(V)}var I=pe(V);var U=[];if(v){U.push(N[T]<=0)}if(l){U.push(N[V]<=0,N[I]<=0)}if(U.every((function(e){return e}))){W=H;A=false;break}P.set(H,U)}if(A){var z=w?3:1;var _=function e(t){var r=M.find((function(e){var r=P.get(e);if(r){return r.slice(0,t).every((function(e){return e}))}}));if(r){W=r;return"break"}};for(var F=z;F>0;F--){var X=_(F);if(X==="break")break}}if(t.placement!==W){t.modifiersData[c]._skip=true;t.placement=W;t.reset=true}}var He={name:"flip",enabled:true,phase:"main",fn:Be,requiresIfExists:["offset"],data:{_skip:false}};function Re(e,t,r){if(r===void 0){r={x:0,y:0}}return{top:e.top-t.height-r.y,right:e.right-t.width+r.x,bottom:e.bottom-t.height+r.y,left:e.left-t.width-r.x}}function Te(e){return[r,a,n,i].some((function(t){return e[t]>=0}))}function Se(e){var t=e.state,r=e.name;var n=t.rects.reference;var a=t.rects.popper;var i=t.modifiersData.preventOverflow;var o=Pe(t,{elementContext:"reference"});var f=Pe(t,{altBoundary:true});var s=Re(o,n);var c=Re(f,a,i);var u=Te(s);var v=Te(c);t.modifiersData[r]={referenceClippingOffsets:s,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:v};t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":v})}var qe={name:"hide",enabled:true,phase:"main",requiresIfExists:["preventOverflow"],fn:Se};function Ce(e,t,n){var o=R(e);var f=[i,r].indexOf(o)>=0?-1:1;var s=typeof n==="function"?n(Object.assign({},t,{placement:e})):n,c=s[0],u=s[1];c=c||0;u=(u||0)*f;return[i,a].indexOf(o)>=0?{x:u,y:c}:{x:c,y:u}}function Ne(e){var t=e.state,r=e.options,n=e.name;var a=r.offset,i=a===void 0?[0,0]:a;var o=m.reduce((function(e,r){e[r]=Ce(r,t.rects,i);return e}),{});var f=o[t.placement],s=f.x,c=f.y;if(t.modifiersData.popperOffsets!=null){t.modifiersData.popperOffsets.x+=s;t.modifiersData.popperOffsets.y+=c}t.modifiersData[n]=o}var Ve={name:"offset",enabled:true,phase:"main",requires:["popperOffsets"],fn:Ne};function Ie(e){var t=e.state,r=e.name;t.modifiersData[r]=Le({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}var Ue={name:"popperOffsets",enabled:true,phase:"read",fn:Ie,data:{}};function ze(e){return e==="x"?"y":"x"}function _e(e){var t=e.state,o=e.options,f=e.name;var c=o.mainAxis,u=c===void 0?true:c,v=o.altAxis,p=v===void 0?false:v,l=o.boundary,d=o.rootBoundary,m=o.altBoundary,h=o.padding,g=o.tether,y=g===void 0?true:g,b=o.tetherOffset,w=b===void 0?0:b;var x=Pe(t,{boundary:l,rootBoundary:d,padding:h,altBoundary:m});var O=R(t.placement);var j=ke(t.placement);var E=!j;var D=F(O);var M=ze(D);var k=t.modifiersData.popperOffsets;var L=t.rects.reference;var P=t.rects.popper;var A=typeof w==="function"?w(Object.assign({},t.rects,{placement:t.placement})):w;var W={x:0,y:0};if(!k){return}if(u||p){var B=D==="y"?r:i;var H=D==="y"?n:a;var T=D==="y"?"height":"width";var q=k[D];var C=k[D]+x[B];var N=k[D]-x[H];var V=y?-P[T]/2:0;var I=j===s?L[T]:P[T];var U=j===s?-P[T]:-L[T];var z=t.elements.arrow;var G=y&&z?S(z):{width:0,height:0};var Q=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:K();var Z=Q[B];var $=Q[H];var ee=J(0,L[T],G[T]);var te=E?L[T]/2-V-ee-Z-A:I-ee-Z-A;var re=E?-L[T]/2+V+ee+$+A:U+ee+$+A;var ne=t.elements.arrow&&_(t.elements.arrow);var ae=ne?D==="y"?ne.clientTop||0:ne.clientLeft||0:0;var ie=t.modifiersData.offset?t.modifiersData.offset[t.placement][D]:0;var oe=k[D]+te-ie-ae;var fe=k[D]+re-ie;if(u){var se=J(y?Y(C,oe):C,q,y?X(N,fe):N);k[D]=se;W[D]=se-q}if(p){var ce=D==="x"?r:i;var ue=D==="x"?n:a;var ve=k[M];var pe=ve+x[ce];var le=ve-x[ue];var de=J(y?Y(pe,oe):pe,ve,y?X(le,fe):le);k[M]=de;W[M]=de-ve}}t.modifiersData[f]=W}var Fe={name:"preventOverflow",enabled:true,phase:"main",fn:_e,requiresIfExists:["offset"]};function Xe(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function Ye(e){if(e===k(e)||!P(e)){return me(e)}else{return Xe(e)}}function Ge(e,t,r){if(r===void 0){r=false}var n=V(t);var a=T(e);var i=P(t);var o={scrollLeft:0,scrollTop:0};var f={x:0,y:0};if(i||!i&&!r){if(M(t)!=="body"||be(n)){o=Ye(t)}if(P(t)){f=T(t);f.x+=t.clientLeft;f.y+=t.clientTop}else if(n){f.x=he(n)}}return{x:a.left+o.scrollLeft-f.x,y:a.top+o.scrollTop-f.y,width:a.width,height:a.height}}function Je(e){var t=new Map;var r=new Set;var n=[];e.forEach((function(e){t.set(e.name,e)}));function a(e){r.add(e.name);var i=[].concat(e.requires||[],e.requiresIfExists||[]);i.forEach((function(e){if(!r.has(e)){var n=t.get(e);if(n){a(n)}}}));n.push(e)}e.forEach((function(e){if(!r.has(e.name)){a(e)}}));return n}function Ke(e){var t=Je(e);return D.reduce((function(e,r){return e.concat(t.filter((function(e){return e.phase===r})))}),[])}function Qe(e){var t;return function(){if(!t){t=new Promise((function(r){Promise.resolve().then((function(){t=undefined;r(e())}))}))}return t}}function Ze(e){var t=e.reduce((function(e,t){var r=e[t.name];e[t.name]=r?Object.assign({},r,t,{options:Object.assign({},r.options,t.options),data:Object.assign({},r.data,t.data)}):t;return e}),{});return Object.keys(t).map((function(e){return t[e]}))}var $e={placement:"bottom",modifiers:[],strategy:"absolute"};function et(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++){t[r]=arguments[r]}return!t.some((function(e){return!(e&&typeof e.getBoundingClientRect==="function")}))}function tt(e){if(e===void 0){e={}}var t=e,r=t.defaultModifiers,n=r===void 0?[]:r,a=t.defaultOptions,i=a===void 0?$e:a;return function e(t,r,a){if(a===void 0){a=i}var o={placement:"bottom",orderedModifiers:[],options:Object.assign({},$e,i),modifiersData:{},elements:{reference:t,popper:r},attributes:{},styles:{}};var f=[];var s=false;var c={state:o,setOptions:function e(a){v();o.options=Object.assign({},i,o.options,a);o.scrollParents={reference:L(t)?xe(t):t.contextElement?xe(t.contextElement):[],popper:xe(r)};var f=Ke(Ze([].concat(n,o.options.modifiers)));o.orderedModifiers=f.filter((function(e){return e.enabled}));u();return c.update()},forceUpdate:function e(){if(s){return}var t=o.elements,r=t.reference,n=t.popper;if(!et(r,n)){return}o.rects={reference:Ge(r,_(n),o.options.strategy==="fixed"),popper:S(n)};o.reset=false;o.placement=o.options.placement;o.orderedModifiers.forEach((function(e){return o.modifiersData[e.name]=Object.assign({},e.data)}));for(var a=0;a<o.orderedModifiers.length;a++){if(o.reset===true){o.reset=false;a=-1;continue}var i=o.orderedModifiers[a],f=i.fn,u=i.options,v=u===void 0?{}:u,p=i.name;if(typeof f==="function"){o=f({state:o,options:v,name:p,instance:c})||o}}},update:Qe((function(){return new Promise((function(e){c.forceUpdate();e(o)}))})),destroy:function e(){v();s=true}};if(!et(t,r)){return c}c.setOptions(a).then((function(e){if(!s&&a.onFirstUpdate){a.onFirstUpdate(e)}}));function u(){o.orderedModifiers.forEach((function(e){var t=e.name,r=e.options,n=r===void 0?{}:r,a=e.effect;if(typeof a==="function"){var i=a({state:o,name:t,instance:c,options:n});var s=function e(){};f.push(i||s)}}))}function v(){f.forEach((function(e){return e()}));f=[]}return c}}var rt=[ue,Ue,fe,H,Ve,He,Fe,re,qe];var nt=tt({defaultModifiers:rt});var at=e("C",{animation:"calcite-popper-anim",animationActive:"calcite-popper-anim--active"});function it(e,r){var n=["left","right"];var a=["start","end"];if(t(e)==="rtl"){n.reverse();a.reverse()}return r.replace(/-leading/gi,"-"+a[0]).replace(/-trailing/gi,"-"+a[1]).replace(/leading/gi,n[0]).replace(/trailing/gi,n[1])}function ot(e){var t=e.referenceEl,r=e.el,n=e.placement,a=e.overlayPositioning,i=a===void 0?"absolute":a,o=e.modifiers;if(!t){return null}return nt(t,r,{strategy:i,placement:it(r,n),modifiers:o})}function ft(e){var t=e.el,r=e.modifiers,n=e.placement,a=e.popper;var i=it(t,n);a.setOptions({modifiers:r,placement:i})}function st(e,t){return Math.sqrt(Math.pow(e,2)+Math.pow(t,2))}var ct=4;var ut=e("d",Math.ceil(st(ct,ct)))}}}));