tmagic-editor/playground/assets/throttle-BTdJsWpk.js
2026-04-17 07:25:29 +00:00

2 lines
20 KiB
JavaScript

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