vue3-popper
Advanced tools
Comparing version 0.3.0 to 0.4.0
@@ -1,1 +0,1 @@ | ||
var Popper=function(e){"use strict";function t(e,t,r,n,o,a,i){try{var p=e[a](i),s=p.value}catch(e){return void r(e)}p.done?t(s):Promise.resolve(s).then(n,o)}function r(e){return function(){var r=this,n=arguments;return new Promise((function(o,a){var i=e.apply(r,n);function p(e){t(i,o,a,p,s,"next",e)}function s(e){t(i,o,a,p,s,"throw",e)}p(void 0)}))}}function n(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==r)return;var n,o,a=[],i=!0,p=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);i=!0);}catch(e){p=!0,o=e}finally{try{i||null==r.return||r.return()}finally{if(p)throw o}}return a}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return o(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function a(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 i(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function p(e){var t=i(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function s(e){return e instanceof i(e).Element||e instanceof Element}function c(e){return e instanceof i(e).HTMLElement||e instanceof HTMLElement}function f(e){return"undefined"!=typeof ShadowRoot&&(e instanceof i(e).ShadowRoot||e instanceof ShadowRoot)}function l(e){return e?(e.nodeName||"").toLowerCase():null}function d(e){return((s(e)?e.ownerDocument:e.document)||window.document).documentElement}function u(e){return a(d(e)).left+p(e).scrollLeft}function v(e){return i(e).getComputedStyle(e)}function h(e){var t=v(e),r=t.overflow,n=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+o+n)}function m(e,t,r){void 0===r&&(r=!1);var n,o,s=d(t),f=a(e),v=c(t),m={scrollLeft:0,scrollTop:0},b={x:0,y:0};return(v||!v&&!r)&&(("body"!==l(t)||h(s))&&(m=(n=t)!==i(n)&&c(n)?{scrollLeft:(o=n).scrollLeft,scrollTop:o.scrollTop}:p(n)),c(t)?((b=a(t)).x+=t.clientLeft,b.y+=t.clientTop):s&&(b.x=u(s))),{x:f.left+m.scrollLeft-b.x,y:f.top+m.scrollTop-b.y,width:f.width,height:f.height}}function b(e){var t=a(e),r=e.offsetWidth,n=e.offsetHeight;return Math.abs(t.width-r)<=1&&(r=t.width),Math.abs(t.height-n)<=1&&(n=t.height),{x:e.offsetLeft,y:e.offsetTop,width:r,height:n}}function y(e){return"html"===l(e)?e:e.assignedSlot||e.parentNode||(f(e)?e.host:null)||d(e)}function g(e){return["html","body","#document"].indexOf(l(e))>=0?e.ownerDocument.body:c(e)&&h(e)?e:g(y(e))}function w(e,t){var r;void 0===t&&(t=[]);var n=g(e),o=n===(null==(r=e.ownerDocument)?void 0:r.body),a=i(n),p=o?[a].concat(a.visualViewport||[],h(n)?n:[]):n,s=t.concat(p);return o?s:s.concat(w(y(p)))}function x(e){return["table","td","th"].indexOf(l(e))>=0}function O(e){return c(e)&&"fixed"!==v(e).position?e.offsetParent:null}function k(e){for(var t=i(e),r=O(e);r&&x(r)&&"static"===v(r).position;)r=O(r);return r&&("html"===l(r)||"body"===l(r)&&"static"===v(r).position)?t:r||function(e){var t=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&c(e)&&"fixed"===v(e).position)return null;for(var r=y(e);c(r)&&["html","body"].indexOf(l(r))<0;){var n=v(r);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||t&&"filter"===n.willChange||t&&n.filter&&"none"!==n.filter)return r;r=r.parentNode}return null}(e)||t}var j="top",E="bottom",D="right",P="left",A="auto",S=[j,E,D,P],B="start",C="end",T="viewport",L="popper",M=S.reduce((function(e,t){return e.concat([t+"-"+B,t+"-"+C])}),[]),N=[].concat(S,[A]).reduce((function(e,t){return e.concat([t,t+"-"+B,t+"-"+C])}),[]),R=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function W(e){var t=new Map,r=new Set,n=[];function o(e){r.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!r.has(e)){var n=t.get(e);n&&o(n)}})),n.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){r.has(e.name)||o(e)})),n}function H(e){return e.split("-")[0]}var I=Math.max,V=Math.min,_=Math.round;function q(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&f(r)){var n=t;do{if(n&&e.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function Y(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function U(e,t){return t===T?Y(function(e){var t=i(e),r=d(e),n=t.visualViewport,o=r.clientWidth,a=r.clientHeight,p=0,s=0;return n&&(o=n.width,a=n.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(p=n.offsetLeft,s=n.offsetTop)),{width:o,height:a,x:p+u(e),y:s}}(e)):c(t)?function(e){var t=a(e);return 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,t}(t):Y(function(e){var t,r=d(e),n=p(e),o=null==(t=e.ownerDocument)?void 0:t.body,a=I(r.scrollWidth,r.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),i=I(r.scrollHeight,r.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),s=-n.scrollLeft+u(e),c=-n.scrollTop;return"rtl"===v(o||r).direction&&(s+=I(r.clientWidth,o?o.clientWidth:0)-a),{width:a,height:i,x:s,y:c}}(d(e)))}function X(e,t,r){var n="clippingParents"===t?function(e){var t=w(y(e)),r=["absolute","fixed"].indexOf(v(e).position)>=0&&c(e)?k(e):e;return s(r)?t.filter((function(e){return s(e)&&q(e,r)&&"body"!==l(e)})):[]}(e):[].concat(t),o=[].concat(n,[r]),a=o[0],i=o.reduce((function(t,r){var n=U(e,r);return t.top=I(n.top,t.top),t.right=V(n.right,t.right),t.bottom=V(n.bottom,t.bottom),t.left=I(n.left,t.left),t}),U(e,a));return i.width=i.right-i.left,i.height=i.bottom-i.top,i.x=i.left,i.y=i.top,i}function z(e){return e.split("-")[1]}function F(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function $(e){var t,r=e.reference,n=e.element,o=e.placement,a=o?H(o):null,i=o?z(o):null,p=r.x+r.width/2-n.width/2,s=r.y+r.height/2-n.height/2;switch(a){case j:t={x:p,y:r.y-n.height};break;case E:t={x:p,y:r.y+r.height};break;case D:t={x:r.x+r.width,y:s};break;case P:t={x:r.x-n.width,y:s};break;default:t={x:r.x,y:r.y}}var c=a?F(a):null;if(null!=c){var f="y"===c?"height":"width";switch(i){case B:t[c]=t[c]-(r[f]/2-n[f]/2);break;case C:t[c]=t[c]+(r[f]/2-n[f]/2)}}return t}function K(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function G(e,t){return t.reduce((function(t,r){return t[r]=e,t}),{})}function J(e,t){void 0===t&&(t={});var r=t,n=r.placement,o=void 0===n?e.placement:n,i=r.boundary,p=void 0===i?"clippingParents":i,c=r.rootBoundary,f=void 0===c?T:c,l=r.elementContext,u=void 0===l?L:l,v=r.altBoundary,h=void 0!==v&&v,m=r.padding,b=void 0===m?0:m,y=K("number"!=typeof b?b:G(b,S)),g=u===L?"reference":L,w=e.elements.reference,x=e.rects.popper,O=e.elements[h?g:u],k=X(s(O)?O:O.contextElement||d(e.elements.popper),p,f),P=a(w),A=$({reference:P,element:x,strategy:"absolute",placement:o}),B=Y(Object.assign({},x,A)),C=u===L?B:P,M={top:k.top-C.top+y.top,bottom:C.bottom-k.bottom+y.bottom,left:k.left-C.left+y.left,right:C.right-k.right+y.right},N=e.modifiersData.offset;if(u===L&&N){var R=N[o];Object.keys(M).forEach((function(e){var t=[D,E].indexOf(e)>=0?1:-1,r=[j,E].indexOf(e)>=0?"y":"x";M[e]+=R[r]*t}))}return M}var Q={placement:"bottom",modifiers:[],strategy:"absolute"};function Z(){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&&"function"==typeof e.getBoundingClientRect)}))}function ee(e){void 0===e&&(e={});var t=e,r=t.defaultModifiers,n=void 0===r?[]:r,o=t.defaultOptions,a=void 0===o?Q:o;return function(e,t,r){void 0===r&&(r=a);var o,i,p={placement:"bottom",orderedModifiers:[],options:Object.assign({},Q,a),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},c=[],f=!1,l={state:p,setOptions:function(r){d(),p.options=Object.assign({},a,p.options,r),p.scrollParents={reference:s(e)?w(e):e.contextElement?w(e.contextElement):[],popper:w(t)};var o,i,f=function(e){var t=W(e);return R.reduce((function(e,r){return e.concat(t.filter((function(e){return e.phase===r})))}),[])}((o=[].concat(n,p.options.modifiers),i=o.reduce((function(e,t){var r=e[t.name];return e[t.name]=r?Object.assign({},r,t,{options:Object.assign({},r.options,t.options),data:Object.assign({},r.data,t.data)}):t,e}),{}),Object.keys(i).map((function(e){return i[e]}))));return p.orderedModifiers=f.filter((function(e){return e.enabled})),p.orderedModifiers.forEach((function(e){var t=e.name,r=e.options,n=void 0===r?{}:r,o=e.effect;if("function"==typeof o){var a=o({state:p,name:t,instance:l,options:n}),i=function(){};c.push(a||i)}})),l.update()},forceUpdate:function(){if(!f){var e=p.elements,t=e.reference,r=e.popper;if(Z(t,r)){p.rects={reference:m(t,k(r),"fixed"===p.options.strategy),popper:b(r)},p.reset=!1,p.placement=p.options.placement,p.orderedModifiers.forEach((function(e){return p.modifiersData[e.name]=Object.assign({},e.data)}));for(var n=0;n<p.orderedModifiers.length;n++)if(!0!==p.reset){var o=p.orderedModifiers[n],a=o.fn,i=o.options,s=void 0===i?{}:i,c=o.name;"function"==typeof a&&(p=a({state:p,options:s,name:c,instance:l})||p)}else p.reset=!1,n=-1}}},update:(o=function(){return new Promise((function(e){l.forceUpdate(),e(p)}))},function(){return i||(i=new Promise((function(e){Promise.resolve().then((function(){i=void 0,e(o())}))}))),i}),destroy:function(){d(),f=!0}};if(!Z(e,t))return l;function d(){c.forEach((function(e){return e()})),c=[]}return l.setOptions(r).then((function(e){!f&&r.onFirstUpdate&&r.onFirstUpdate(e)})),l}}var te={passive:!0};var re={top:"auto",right:"auto",bottom:"auto",left:"auto"};function ne(e){var t,r=e.popper,n=e.popperRect,o=e.placement,a=e.offsets,p=e.position,s=e.gpuAcceleration,c=e.adaptive,f=e.roundOffsets,l=!0===f?function(e){var t=e.x,r=e.y,n=window.devicePixelRatio||1;return{x:_(_(t*n)/n)||0,y:_(_(r*n)/n)||0}}(a):"function"==typeof f?f(a):a,u=l.x,h=void 0===u?0:u,m=l.y,b=void 0===m?0:m,y=a.hasOwnProperty("x"),g=a.hasOwnProperty("y"),w=P,x=j,O=window;if(c){var A=k(r),S="clientHeight",B="clientWidth";A===i(r)&&"static"!==v(A=d(r)).position&&(S="scrollHeight",B="scrollWidth"),A=A,o===j&&(x=E,b-=A[S]-n.height,b*=s?1:-1),o===P&&(w=D,h-=A[B]-n.width,h*=s?1:-1)}var C,T=Object.assign({position:p},c&&re);return s?Object.assign({},T,((C={})[x]=g?"0":"",C[w]=y?"0":"",C.transform=(O.devicePixelRatio||1)<2?"translate("+h+"px, "+b+"px)":"translate3d("+h+"px, "+b+"px, 0)",C)):Object.assign({},T,((t={})[x]=g?b+"px":"",t[w]=y?h+"px":"",t.transform="",t))}var oe=ee({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,r=e.instance,n=e.options,o=n.scroll,a=void 0===o||o,p=n.resize,s=void 0===p||p,c=i(t.elements.popper),f=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&f.forEach((function(e){e.addEventListener("scroll",r.update,te)})),s&&c.addEventListener("resize",r.update,te),function(){a&&f.forEach((function(e){e.removeEventListener("scroll",r.update,te)})),s&&c.removeEventListener("resize",r.update,te)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,r=e.name;t.modifiersData[r]=$({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,r=e.options,n=r.gpuAcceleration,o=void 0===n||n,a=r.adaptive,i=void 0===a||a,p=r.roundOffsets,s=void 0===p||p,c={placement:H(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,ne(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:i,roundOffsets:s})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,ne(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:s})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var r=t.styles[e]||{},n=t.attributes[e]||{},o=t.elements[e];c(o)&&l(o)&&(Object.assign(o.style,r),Object.keys(n).forEach((function(e){var t=n[e];!1===t?o.removeAttribute(e):o.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow),function(){Object.keys(t.elements).forEach((function(e){var n=t.elements[e],o=t.attributes[e]||{},a=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:r[e]).reduce((function(e,t){return e[t]="",e}),{});c(n)&&l(n)&&(Object.assign(n.style,a),Object.keys(o).forEach((function(e){n.removeAttribute(e)})))}))}},requires:["computeStyles"]}]});function ae(e,t,r){return I(e,V(t,r))}var ie={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,r=e.options,n=e.name,o=r.mainAxis,a=void 0===o||o,i=r.altAxis,p=void 0!==i&&i,s=r.boundary,c=r.rootBoundary,f=r.altBoundary,l=r.padding,d=r.tether,u=void 0===d||d,v=r.tetherOffset,h=void 0===v?0:v,m=J(t,{boundary:s,rootBoundary:c,padding:l,altBoundary:f}),y=H(t.placement),g=z(t.placement),w=!g,x=F(y),O="x"===x?"y":"x",A=t.modifiersData.popperOffsets,S=t.rects.reference,C=t.rects.popper,T="function"==typeof h?h(Object.assign({},t.rects,{placement:t.placement})):h,L={x:0,y:0};if(A){if(a||p){var M="y"===x?j:P,N="y"===x?E:D,R="y"===x?"height":"width",W=A[x],_=A[x]+m[M],q=A[x]-m[N],Y=u?-C[R]/2:0,U=g===B?S[R]:C[R],X=g===B?-C[R]:-S[R],$=t.elements.arrow,K=u&&$?b($):{width:0,height:0},G=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},Q=G[M],Z=G[N],ee=ae(0,S[R],K[R]),te=w?S[R]/2-Y-ee-Q-T:U-ee-Q-T,re=w?-S[R]/2+Y+ee+Z+T:X+ee+Z+T,ne=t.elements.arrow&&k(t.elements.arrow),oe=ne?"y"===x?ne.clientTop||0:ne.clientLeft||0:0,ie=t.modifiersData.offset?t.modifiersData.offset[t.placement][x]:0,pe=A[x]+te-ie-oe,se=A[x]+re-ie;if(a){var ce=ae(u?V(_,pe):_,W,u?I(q,se):q);A[x]=ce,L[x]=ce-W}if(p){var fe="x"===x?j:P,le="x"===x?E:D,de=A[O],ue=de+m[fe],ve=de-m[le],he=ae(u?V(ue,pe):ue,de,u?I(ve,se):ve);A[O]=he,L[O]=he-de}}t.modifiersData[n]=L}},requiresIfExists:["offset"]},pe={left:"right",right:"left",bottom:"top",top:"bottom"};function se(e){return e.replace(/left|right|bottom|top/g,(function(e){return pe[e]}))}var ce={start:"end",end:"start"};function fe(e){return e.replace(/start|end/g,(function(e){return ce[e]}))}function le(e,t){void 0===t&&(t={});var r=t,n=r.placement,o=r.boundary,a=r.rootBoundary,i=r.padding,p=r.flipVariations,s=r.allowedAutoPlacements,c=void 0===s?N:s,f=z(n),l=f?p?M:M.filter((function(e){return z(e)===f})):S,d=l.filter((function(e){return c.indexOf(e)>=0}));0===d.length&&(d=l);var u=d.reduce((function(t,r){return t[r]=J(e,{placement:r,boundary:o,rootBoundary:a,padding:i})[H(r)],t}),{});return Object.keys(u).sort((function(e,t){return u[e]-u[t]}))}var de={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,r=e.options,n=e.name;if(!t.modifiersData[n]._skip){for(var o=r.mainAxis,a=void 0===o||o,i=r.altAxis,p=void 0===i||i,s=r.fallbackPlacements,c=r.padding,f=r.boundary,l=r.rootBoundary,d=r.altBoundary,u=r.flipVariations,v=void 0===u||u,h=r.allowedAutoPlacements,m=t.options.placement,b=H(m),y=s||(b===m||!v?[se(m)]:function(e){if(H(e)===A)return[];var t=se(e);return[fe(e),t,fe(t)]}(m)),g=[m].concat(y).reduce((function(e,r){return e.concat(H(r)===A?le(t,{placement:r,boundary:f,rootBoundary:l,padding:c,flipVariations:v,allowedAutoPlacements:h}):r)}),[]),w=t.rects.reference,x=t.rects.popper,O=new Map,k=!0,S=g[0],C=0;C<g.length;C++){var T=g[C],L=H(T),M=z(T)===B,N=[j,E].indexOf(L)>=0,R=N?"width":"height",W=J(t,{placement:T,boundary:f,rootBoundary:l,altBoundary:d,padding:c}),I=N?M?D:P:M?E:j;w[R]>x[R]&&(I=se(I));var V=se(I),_=[];if(a&&_.push(W[L]<=0),p&&_.push(W[I]<=0,W[V]<=0),_.every((function(e){return e}))){S=T,k=!1;break}O.set(T,_)}if(k)for(var q=function(e){var t=g.find((function(t){var r=O.get(t);if(r)return r.slice(0,e).every((function(e){return e}))}));if(t)return S=t,"break"},Y=v?3:1;Y>0;Y--){if("break"===q(Y))break}t.placement!==S&&(t.modifiersData[n]._skip=!0,t.placement=S,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};var ue={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,r=e.options,n=e.name,o=r.offset,a=void 0===o?[0,0]:o,i=N.reduce((function(e,r){return e[r]=function(e,t,r){var n=H(e),o=[P,j].indexOf(n)>=0?-1:1,a="function"==typeof r?r(Object.assign({},t,{placement:e})):r,i=a[0],p=a[1];return i=i||0,p=(p||0)*o,[P,D].indexOf(n)>=0?{x:p,y:i}:{x:i,y:p}}(r,t.rects,a),e}),{}),p=i[t.placement],s=p.x,c=p.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=s,t.modifiersData.popperOffsets.y+=c),t.modifiersData[n]=i}};var ve={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,r=e.state,n=e.name,o=e.options,a=r.elements.arrow,i=r.modifiersData.popperOffsets,p=H(r.placement),s=F(p),c=[P,D].indexOf(p)>=0?"height":"width";if(a&&i){var f=function(e,t){return K("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:G(e,S))}(o.padding,r),l=b(a),d="y"===s?j:P,u="y"===s?E:D,v=r.rects.reference[c]+r.rects.reference[s]-i[s]-r.rects.popper[c],h=i[s]-r.rects.reference[s],m=k(a),y=m?"y"===s?m.clientHeight||0:m.clientWidth||0:0,g=v/2-h/2,w=f[d],x=y-l[c]-f[u],O=y/2-l[c]/2+g,A=ae(w,O,x),B=s;r.modifiersData[n]=((t={})[B]=A,t.centerOffset=A-O,t)}},effect:function(e){var t=e.state,r=e.options.element,n=void 0===r?"[data-popper-arrow]":r;null!=n&&("string"!=typeof n||(n=t.elements.popper.querySelector(n)))&&q(t.elements.popper,n)&&(t.elements.arrow=n)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},he=function(e){return parseInt(e,10)};var me={beforeMount:function(e,t){e.clickAwayEvent=function(r){e!=r.target&&!e.contains(r.target)&&t.value.enabled&&t.value.handler()},document.addEventListener("click",e.clickAwayEvent)},unmounted:function(e){document.removeEventListener("click",e.clickAwayEvent)}},be=function(e){return new Promise((function(t){return setTimeout(t,e)}))},ye=e.defineComponent({name:"Popper",emits:["open:popper","close:popper"],directives:{clickAway:me},props:{placement:{type:String,default:"bottom",validator:function(e){return["auto","auto-start","auto-end","top","top-start","top-end","bottom","bottom-start","bottom-end","right","right-start","right-end","left","left-start","left-end"].includes(e)}},disableClickAway:{type:Boolean,default:!1},offsetX:{type:String,default:"0"},offsetY:{type:String,default:"12"},hover:{type:Boolean,default:!1},disabled:{type:Boolean,default:null},openDelay:{type:[Number,String],default:0},closeDelay:{type:[Number,String],default:0},arrow:{type:Boolean,default:!1},arrowPadding:{type:String,default:"0"}},setup:function(t,o){var a=o.slots,i=o.emit,p=a.default();if(p&&p.length>1)return console.error("[Popper]: The <Popper> component expects only one child element at its root. You passed ".concat(p.length," child nodes."));var s=e.toRefs(t),c=s.offsetX,f=s.offsetY,l=s.arrowPadding,d=s.placement,u=s.disabled,v=s.disableClickAway,h=s.openDelay,m=s.closeDelay,b=function(t){var o=t.placement,a=t.arrowPadding,i=t.offsetX,p=t.offsetY,s=t.emit,c=e.ref(!1),f=e.ref(null),l=e.ref(null),d=e.ref(null);e.watch([c,o],function(){var t=r(regeneratorRuntime.mark((function t(r){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!n(r,1)[0]){t.next=5;break}return t.next=4,e.nextTick();case 4:u();case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}());var u=function(){f.value=oe(d.value,l.value,{placement:o.value,modifiers:[ie,de,ve,{name:"arrow",options:{padding:he(a.value)}},ue,{name:"offset",options:{offset:[he(i.value),he(p.value)]}}]}),f.value.update()};return e.onBeforeUnmount((function(){f.value&&f.value.destroy()})),{popperNode:l,triggerNode:d,isOpen:c,open:function(){c.value||(c.value=!0,s("open:popper"))},close:function(){c.value&&(c.value=!1,s("close:popper"))}}}({offsetX:c,offsetY:f,arrowPadding:l,placement:d,emit:i}),y=b.popperNode,g=b.triggerNode,w=b.isOpen,x=b.open,O=b.close,k=function(){var e=r(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!u.value){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,be(h.value);case 4:x();case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),j=function(){var e=r(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,be(m.value);case 2:O();case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),E=e.computed((function(){return u.value?(O(),!1):w.value&&(null===(e=a.content)||void 0===e?void 0:e.call(a).length);var e})),D=e.computed((function(){return!v.value}));return{popperNode:y,triggerNode:g,isOpen:w,close:O,handleToggle:function(){w.value?j():k()},handleOpen:k,handleClose:j,showPopper:E,enableClickAway:D}}}),ge=e.withScopeId("data-v-b6d99566");e.pushScopeId("data-v-b6d99566");var we={key:0,id:"arrow","data-popper-arrow":""};e.popScopeId();var xe=ge((function(t,r,n,o,a,i){var p=e.resolveDirective("click-away");return e.withDirectives((e.openBlock(),e.createBlock("div",null,[e.createVNode("div",{ref:"triggerNode",onMouseover:r[1]||(r[1]=function(e){return t.hover&&t.handleOpen()}),onMouseleave:r[2]||(r[2]=function(e){return t.hover&&t.handleClose()}),onClick:r[3]||(r[3]=function(){return t.handleToggle&&t.handleToggle.apply(t,arguments)}),onFocus:r[4]||(r[4]=function(){return t.handleOpen&&t.handleOpen.apply(t,arguments)}),onBlur:r[5]||(r[5]=function(){return t.handleClose&&t.handleClose.apply(t,arguments)}),onKeyup:r[6]||(r[6]=e.withKeys((function(){return t.handleClose&&t.handleClose.apply(t,arguments)}),["esc"])),class:"inline-block"},[e.renderSlot(t.$slots,"default")],544),e.createVNode(e.Transition,{name:"fade"},{default:ge((function(){return[e.withDirectives(e.createVNode("div",{class:["popper",t.showPopper?"inline-block":null],ref:"popperNode"},[e.renderSlot(t.$slots,"content",{close:t.close}),t.arrow?(e.openBlock(),e.createBlock("div",we)):e.createCommentVNode("",!0)],2),[[e.vShow,t.showPopper]])]})),_:3})],512)),[[p,{handler:t.handleClose,enabled:t.enableClickAway}]])}));!function(e,t){void 0===t&&(t={});var r=t.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===r&&n.firstChild?n.insertBefore(o,n.firstChild):n.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}('\n#arrow[data-v-b6d99566],\n #arrow[data-v-b6d99566]::before {\n position: absolute;\n width: calc(10px - var(--popper-theme-border-width, 0px));\n height: calc(10px - var(--popper-theme-border-width, 0px));\n box-sizing: border-box;\n background: var(--popper-theme-background-color);\n}\n#arrow[data-v-b6d99566] {\n visibility: hidden;\n}\n#arrow[data-v-b6d99566]::before {\n visibility: visible;\n content: "";\n transform: rotate(45deg);\n}\n\n /* Top arrow */\n.popper[data-popper-placement^="top"] > #arrow[data-v-b6d99566] {\n bottom: -5px;\n}\n.popper[data-popper-placement^="top"] > #arrow[data-v-b6d99566]::before {\n border-right: var(--popper-theme-border-width)\n var(--popper-theme-border-style) var(--popper-theme-border-color);\n border-bottom: var(--popper-theme-border-width)\n var(--popper-theme-border-style) var(--popper-theme-border-color);\n}\n\n /* Bottom arrow */\n.popper[data-popper-placement^="bottom"] > #arrow[data-v-b6d99566] {\n top: -5px;\n}\n.popper[data-popper-placement^="bottom"] > #arrow[data-v-b6d99566]::before {\n border-left: var(--popper-theme-border-width)\n var(--popper-theme-border-style) var(--popper-theme-border-color);\n border-top: var(--popper-theme-border-width)\n var(--popper-theme-border-style) var(--popper-theme-border-color);\n}\n\n /* Left arrow */\n.popper[data-popper-placement^="left"] > #arrow[data-v-b6d99566] {\n right: -5px;\n}\n.popper[data-popper-placement^="left"] > #arrow[data-v-b6d99566]::before {\n border-right: var(--popper-theme-border-width)\n var(--popper-theme-border-style) var(--popper-theme-border-color);\n border-top: var(--popper-theme-border-width)\n var(--popper-theme-border-style) var(--popper-theme-border-color);\n}\n\n /* Right arrow */\n.popper[data-popper-placement^="right"] > #arrow[data-v-b6d99566] {\n left: -5px;\n}\n.popper[data-popper-placement^="right"] > #arrow[data-v-b6d99566]::before {\n border-left: var(--popper-theme-border-width)\n var(--popper-theme-border-style) var(--popper-theme-border-color);\n border-bottom: var(--popper-theme-border-width)\n var(--popper-theme-border-style) var(--popper-theme-border-color);\n}\n.popper[data-v-b6d99566] {\n background: var(--popper-theme-background-color);\n padding: var(--popper-theme-padding);\n color: var(--popper-theme-text-color);\n border-radius: var(--popper-theme-border-radius);\n border-width: var(--popper-theme-border-width);\n border-style: var(--popper-theme-border-style);\n border-color: var(--popper-theme-border-color);\n box-shadow: var(--popper-theme-box-shadow);\n}\n.popper[data-v-b6d99566]:hover,\n .popper:hover > #arrow[data-v-b6d99566]::before {\n background: var(--popper-theme-background-color-hover);\n}\n.inline-block[data-v-b6d99566] {\n display: inline-block;\n}\n.fade-enter-active[data-v-b6d99566],\n .fade-leave-active[data-v-b6d99566] {\n transition: opacity 0.2s ease;\n}\n.fade-enter-from[data-v-b6d99566],\n .fade-leave-to[data-v-b6d99566] {\n opacity: 0;\n}\n'),ye.render=xe,ye.__scopeId="data-v-b6d99566";var Oe=function(){var e=ye;return e.install=function(t){t.component("Popper",e)},e}(),ke=Object.freeze({__proto__:null,default:Oe});return Object.entries(ke).forEach((function(e){var t=n(e,2),r=t[0],o=t[1];"default"!==r&&(Oe[r]=o)})),Oe}(Vue); | ||
var Popper=function(e){"use strict";function t(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function r(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?t(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):t(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function n(e,t,r,n,o,a,i){try{var p=e[a](i),c=p.value}catch(e){return void r(e)}p.done?t(c):Promise.resolve(c).then(n,o)}function o(e){return function(){var t=this,r=arguments;return new Promise((function(o,a){var i=e.apply(t,r);function p(e){n(i,o,a,p,c,"next",e)}function c(e){n(i,o,a,p,c,"throw",e)}p(void 0)}))}}function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==r)return;var n,o,a=[],i=!0,p=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);i=!0);}catch(e){p=!0,o=e}finally{try{i||null==r.return||r.return()}finally{if(p)throw o}}return a}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return p(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return p(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function c(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){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function f(e){var t=s(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function u(e){return e instanceof s(e).Element||e instanceof Element}function l(e){return e instanceof s(e).HTMLElement||e instanceof HTMLElement}function d(e){return"undefined"!=typeof ShadowRoot&&(e instanceof s(e).ShadowRoot||e instanceof ShadowRoot)}function v(e){return e?(e.nodeName||"").toLowerCase():null}function h(e){return((u(e)?e.ownerDocument:e.document)||window.document).documentElement}function m(e){return c(h(e)).left+f(e).scrollLeft}function b(e){return s(e).getComputedStyle(e)}function y(e){var t=b(e),r=t.overflow,n=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+o+n)}function g(e,t,r){void 0===r&&(r=!1);var n,o,a=h(t),i=c(e),p=l(t),u={scrollLeft:0,scrollTop:0},d={x:0,y:0};return(p||!p&&!r)&&(("body"!==v(t)||y(a))&&(u=(n=t)!==s(n)&&l(n)?{scrollLeft:(o=n).scrollLeft,scrollTop:o.scrollTop}:f(n)),l(t)?((d=c(t)).x+=t.clientLeft,d.y+=t.clientTop):a&&(d.x=m(a))),{x:i.left+u.scrollLeft-d.x,y:i.top+u.scrollTop-d.y,width:i.width,height:i.height}}function w(e){var t=c(e),r=e.offsetWidth,n=e.offsetHeight;return Math.abs(t.width-r)<=1&&(r=t.width),Math.abs(t.height-n)<=1&&(n=t.height),{x:e.offsetLeft,y:e.offsetTop,width:r,height:n}}function O(e){return"html"===v(e)?e:e.assignedSlot||e.parentNode||(d(e)?e.host:null)||h(e)}function x(e){return["html","body","#document"].indexOf(v(e))>=0?e.ownerDocument.body:l(e)&&y(e)?e:x(O(e))}function k(e,t){var r;void 0===t&&(t=[]);var n=x(e),o=n===(null==(r=e.ownerDocument)?void 0:r.body),a=s(n),i=o?[a].concat(a.visualViewport||[],y(n)?n:[]):n,p=t.concat(i);return o?p:p.concat(k(O(i)))}function j(e){return["table","td","th"].indexOf(v(e))>=0}function P(e){return l(e)&&"fixed"!==b(e).position?e.offsetParent:null}function E(e){for(var t=s(e),r=P(e);r&&j(r)&&"static"===b(r).position;)r=P(r);return r&&("html"===v(r)||"body"===v(r)&&"static"===b(r).position)?t:r||function(e){var t=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&l(e)&&"fixed"===b(e).position)return null;for(var r=O(e);l(r)&&["html","body"].indexOf(v(r))<0;){var n=b(r);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||t&&"filter"===n.willChange||t&&n.filter&&"none"!==n.filter)return r;r=r.parentNode}return null}(e)||t}var D="top",S="bottom",A="right",B="left",C="auto",T=[D,S,A,B],L="start",M="end",N="viewport",R="popper",W=T.reduce((function(e,t){return e.concat([t+"-"+L,t+"-"+M])}),[]),I=[].concat(T,[C]).reduce((function(e,t){return e.concat([t,t+"-"+L,t+"-"+M])}),[]),H=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function V(e){var t=new Map,r=new Set,n=[];function o(e){r.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!r.has(e)){var n=t.get(e);n&&o(n)}})),n.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){r.has(e.name)||o(e)})),n}function _(e){return e.split("-")[0]}var q=Math.max,U=Math.min,Y=Math.round;function X(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&d(r)){var n=t;do{if(n&&e.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function z(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function F(e,t){return t===N?z(function(e){var t=s(e),r=h(e),n=t.visualViewport,o=r.clientWidth,a=r.clientHeight,i=0,p=0;return n&&(o=n.width,a=n.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(i=n.offsetLeft,p=n.offsetTop)),{width:o,height:a,x:i+m(e),y:p}}(e)):l(t)?function(e){var t=c(e);return 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,t}(t):z(function(e){var t,r=h(e),n=f(e),o=null==(t=e.ownerDocument)?void 0:t.body,a=q(r.scrollWidth,r.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),i=q(r.scrollHeight,r.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),p=-n.scrollLeft+m(e),c=-n.scrollTop;return"rtl"===b(o||r).direction&&(p+=q(r.clientWidth,o?o.clientWidth:0)-a),{width:a,height:i,x:p,y:c}}(h(e)))}function $(e,t,r){var n="clippingParents"===t?function(e){var t=k(O(e)),r=["absolute","fixed"].indexOf(b(e).position)>=0&&l(e)?E(e):e;return u(r)?t.filter((function(e){return u(e)&&X(e,r)&&"body"!==v(e)})):[]}(e):[].concat(t),o=[].concat(n,[r]),a=o[0],i=o.reduce((function(t,r){var n=F(e,r);return t.top=q(n.top,t.top),t.right=U(n.right,t.right),t.bottom=U(n.bottom,t.bottom),t.left=q(n.left,t.left),t}),F(e,a));return i.width=i.right-i.left,i.height=i.bottom-i.top,i.x=i.left,i.y=i.top,i}function K(e){return e.split("-")[1]}function G(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function J(e){var t,r=e.reference,n=e.element,o=e.placement,a=o?_(o):null,i=o?K(o):null,p=r.x+r.width/2-n.width/2,c=r.y+r.height/2-n.height/2;switch(a){case D:t={x:p,y:r.y-n.height};break;case S:t={x:p,y:r.y+r.height};break;case A:t={x:r.x+r.width,y:c};break;case B:t={x:r.x-n.width,y:c};break;default:t={x:r.x,y:r.y}}var s=a?G(a):null;if(null!=s){var f="y"===s?"height":"width";switch(i){case L:t[s]=t[s]-(r[f]/2-n[f]/2);break;case M:t[s]=t[s]+(r[f]/2-n[f]/2)}}return t}function Q(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function Z(e,t){return t.reduce((function(t,r){return t[r]=e,t}),{})}function ee(e,t){void 0===t&&(t={});var r=t,n=r.placement,o=void 0===n?e.placement:n,a=r.boundary,i=void 0===a?"clippingParents":a,p=r.rootBoundary,s=void 0===p?N:p,f=r.elementContext,l=void 0===f?R:f,d=r.altBoundary,v=void 0!==d&&d,m=r.padding,b=void 0===m?0:m,y=Q("number"!=typeof b?b:Z(b,T)),g=l===R?"reference":R,w=e.elements.reference,O=e.rects.popper,x=e.elements[v?g:l],k=$(u(x)?x:x.contextElement||h(e.elements.popper),i,s),j=c(w),P=J({reference:j,element:O,strategy:"absolute",placement:o}),E=z(Object.assign({},O,P)),B=l===R?E:j,C={top:k.top-B.top+y.top,bottom:B.bottom-k.bottom+y.bottom,left:k.left-B.left+y.left,right:B.right-k.right+y.right},L=e.modifiersData.offset;if(l===R&&L){var M=L[o];Object.keys(C).forEach((function(e){var t=[A,S].indexOf(e)>=0?1:-1,r=[D,S].indexOf(e)>=0?"y":"x";C[e]+=M[r]*t}))}return C}var te={placement:"bottom",modifiers:[],strategy:"absolute"};function re(){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&&"function"==typeof e.getBoundingClientRect)}))}function ne(e){void 0===e&&(e={});var t=e,r=t.defaultModifiers,n=void 0===r?[]:r,o=t.defaultOptions,a=void 0===o?te:o;return function(e,t,r){void 0===r&&(r=a);var o,i,p={placement:"bottom",orderedModifiers:[],options:Object.assign({},te,a),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},c=[],s=!1,f={state:p,setOptions:function(r){l(),p.options=Object.assign({},a,p.options,r),p.scrollParents={reference:u(e)?k(e):e.contextElement?k(e.contextElement):[],popper:k(t)};var o,i,s=function(e){var t=V(e);return H.reduce((function(e,r){return e.concat(t.filter((function(e){return e.phase===r})))}),[])}((o=[].concat(n,p.options.modifiers),i=o.reduce((function(e,t){var r=e[t.name];return e[t.name]=r?Object.assign({},r,t,{options:Object.assign({},r.options,t.options),data:Object.assign({},r.data,t.data)}):t,e}),{}),Object.keys(i).map((function(e){return i[e]}))));return p.orderedModifiers=s.filter((function(e){return e.enabled})),p.orderedModifiers.forEach((function(e){var t=e.name,r=e.options,n=void 0===r?{}:r,o=e.effect;if("function"==typeof o){var a=o({state:p,name:t,instance:f,options:n}),i=function(){};c.push(a||i)}})),f.update()},forceUpdate:function(){if(!s){var e=p.elements,t=e.reference,r=e.popper;if(re(t,r)){p.rects={reference:g(t,E(r),"fixed"===p.options.strategy),popper:w(r)},p.reset=!1,p.placement=p.options.placement,p.orderedModifiers.forEach((function(e){return p.modifiersData[e.name]=Object.assign({},e.data)}));for(var n=0;n<p.orderedModifiers.length;n++)if(!0!==p.reset){var o=p.orderedModifiers[n],a=o.fn,i=o.options,c=void 0===i?{}:i,u=o.name;"function"==typeof a&&(p=a({state:p,options:c,name:u,instance:f})||p)}else p.reset=!1,n=-1}}},update:(o=function(){return new Promise((function(e){f.forceUpdate(),e(p)}))},function(){return i||(i=new Promise((function(e){Promise.resolve().then((function(){i=void 0,e(o())}))}))),i}),destroy:function(){l(),s=!0}};if(!re(e,t))return f;function l(){c.forEach((function(e){return e()})),c=[]}return f.setOptions(r).then((function(e){!s&&r.onFirstUpdate&&r.onFirstUpdate(e)})),f}}var oe={passive:!0};var ae={top:"auto",right:"auto",bottom:"auto",left:"auto"};function ie(e){var t,r=e.popper,n=e.popperRect,o=e.placement,a=e.offsets,i=e.position,p=e.gpuAcceleration,c=e.adaptive,f=e.roundOffsets,u=!0===f?function(e){var t=e.x,r=e.y,n=window.devicePixelRatio||1;return{x:Y(Y(t*n)/n)||0,y:Y(Y(r*n)/n)||0}}(a):"function"==typeof f?f(a):a,l=u.x,d=void 0===l?0:l,v=u.y,m=void 0===v?0:v,y=a.hasOwnProperty("x"),g=a.hasOwnProperty("y"),w=B,O=D,x=window;if(c){var k=E(r),j="clientHeight",P="clientWidth";k===s(r)&&"static"!==b(k=h(r)).position&&(j="scrollHeight",P="scrollWidth"),k=k,o===D&&(O=S,m-=k[j]-n.height,m*=p?1:-1),o===B&&(w=A,d-=k[P]-n.width,d*=p?1:-1)}var C,T=Object.assign({position:i},c&&ae);return p?Object.assign({},T,((C={})[O]=g?"0":"",C[w]=y?"0":"",C.transform=(x.devicePixelRatio||1)<2?"translate("+d+"px, "+m+"px)":"translate3d("+d+"px, "+m+"px, 0)",C)):Object.assign({},T,((t={})[O]=g?m+"px":"",t[w]=y?d+"px":"",t.transform="",t))}var pe=ne({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,r=e.instance,n=e.options,o=n.scroll,a=void 0===o||o,i=n.resize,p=void 0===i||i,c=s(t.elements.popper),f=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&f.forEach((function(e){e.addEventListener("scroll",r.update,oe)})),p&&c.addEventListener("resize",r.update,oe),function(){a&&f.forEach((function(e){e.removeEventListener("scroll",r.update,oe)})),p&&c.removeEventListener("resize",r.update,oe)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,r=e.name;t.modifiersData[r]=J({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,r=e.options,n=r.gpuAcceleration,o=void 0===n||n,a=r.adaptive,i=void 0===a||a,p=r.roundOffsets,c=void 0===p||p,s={placement:_(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,ie(Object.assign({},s,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:i,roundOffsets:c})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,ie(Object.assign({},s,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var r=t.styles[e]||{},n=t.attributes[e]||{},o=t.elements[e];l(o)&&v(o)&&(Object.assign(o.style,r),Object.keys(n).forEach((function(e){var t=n[e];!1===t?o.removeAttribute(e):o.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow),function(){Object.keys(t.elements).forEach((function(e){var n=t.elements[e],o=t.attributes[e]||{},a=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:r[e]).reduce((function(e,t){return e[t]="",e}),{});l(n)&&v(n)&&(Object.assign(n.style,a),Object.keys(o).forEach((function(e){n.removeAttribute(e)})))}))}},requires:["computeStyles"]}]});function ce(e,t,r){return q(e,U(t,r))}var se={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,r=e.options,n=e.name,o=r.mainAxis,a=void 0===o||o,i=r.altAxis,p=void 0!==i&&i,c=r.boundary,s=r.rootBoundary,f=r.altBoundary,u=r.padding,l=r.tether,d=void 0===l||l,v=r.tetherOffset,h=void 0===v?0:v,m=ee(t,{boundary:c,rootBoundary:s,padding:u,altBoundary:f}),b=_(t.placement),y=K(t.placement),g=!y,O=G(b),x="x"===O?"y":"x",k=t.modifiersData.popperOffsets,j=t.rects.reference,P=t.rects.popper,C="function"==typeof h?h(Object.assign({},t.rects,{placement:t.placement})):h,T={x:0,y:0};if(k){if(a||p){var M="y"===O?D:B,N="y"===O?S:A,R="y"===O?"height":"width",W=k[O],I=k[O]+m[M],H=k[O]-m[N],V=d?-P[R]/2:0,Y=y===L?j[R]:P[R],X=y===L?-P[R]:-j[R],z=t.elements.arrow,F=d&&z?w(z):{width:0,height:0},$=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},J=$[M],Q=$[N],Z=ce(0,j[R],F[R]),te=g?j[R]/2-V-Z-J-C:Y-Z-J-C,re=g?-j[R]/2+V+Z+Q+C:X+Z+Q+C,ne=t.elements.arrow&&E(t.elements.arrow),oe=ne?"y"===O?ne.clientTop||0:ne.clientLeft||0:0,ae=t.modifiersData.offset?t.modifiersData.offset[t.placement][O]:0,ie=k[O]+te-ae-oe,pe=k[O]+re-ae;if(a){var se=ce(d?U(I,ie):I,W,d?q(H,pe):H);k[O]=se,T[O]=se-W}if(p){var fe="x"===O?D:B,ue="x"===O?S:A,le=k[x],de=le+m[fe],ve=le-m[ue],he=ce(d?U(de,ie):de,le,d?q(ve,pe):ve);k[x]=he,T[x]=he-le}}t.modifiersData[n]=T}},requiresIfExists:["offset"]},fe={left:"right",right:"left",bottom:"top",top:"bottom"};function ue(e){return e.replace(/left|right|bottom|top/g,(function(e){return fe[e]}))}var le={start:"end",end:"start"};function de(e){return e.replace(/start|end/g,(function(e){return le[e]}))}function ve(e,t){void 0===t&&(t={});var r=t,n=r.placement,o=r.boundary,a=r.rootBoundary,i=r.padding,p=r.flipVariations,c=r.allowedAutoPlacements,s=void 0===c?I:c,f=K(n),u=f?p?W:W.filter((function(e){return K(e)===f})):T,l=u.filter((function(e){return s.indexOf(e)>=0}));0===l.length&&(l=u);var d=l.reduce((function(t,r){return t[r]=ee(e,{placement:r,boundary:o,rootBoundary:a,padding:i})[_(r)],t}),{});return Object.keys(d).sort((function(e,t){return d[e]-d[t]}))}var he={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,r=e.options,n=e.name;if(!t.modifiersData[n]._skip){for(var o=r.mainAxis,a=void 0===o||o,i=r.altAxis,p=void 0===i||i,c=r.fallbackPlacements,s=r.padding,f=r.boundary,u=r.rootBoundary,l=r.altBoundary,d=r.flipVariations,v=void 0===d||d,h=r.allowedAutoPlacements,m=t.options.placement,b=_(m),y=c||(b===m||!v?[ue(m)]:function(e){if(_(e)===C)return[];var t=ue(e);return[de(e),t,de(t)]}(m)),g=[m].concat(y).reduce((function(e,r){return e.concat(_(r)===C?ve(t,{placement:r,boundary:f,rootBoundary:u,padding:s,flipVariations:v,allowedAutoPlacements:h}):r)}),[]),w=t.rects.reference,O=t.rects.popper,x=new Map,k=!0,j=g[0],P=0;P<g.length;P++){var E=g[P],T=_(E),M=K(E)===L,N=[D,S].indexOf(T)>=0,R=N?"width":"height",W=ee(t,{placement:E,boundary:f,rootBoundary:u,altBoundary:l,padding:s}),I=N?M?A:B:M?S:D;w[R]>O[R]&&(I=ue(I));var H=ue(I),V=[];if(a&&V.push(W[T]<=0),p&&V.push(W[I]<=0,W[H]<=0),V.every((function(e){return e}))){j=E,k=!1;break}x.set(E,V)}if(k)for(var q=function(e){var t=g.find((function(t){var r=x.get(t);if(r)return r.slice(0,e).every((function(e){return e}))}));if(t)return j=t,"break"},U=v?3:1;U>0;U--){if("break"===q(U))break}t.placement!==j&&(t.modifiersData[n]._skip=!0,t.placement=j,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};var me={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,r=e.options,n=e.name,o=r.offset,a=void 0===o?[0,0]:o,i=I.reduce((function(e,r){return e[r]=function(e,t,r){var n=_(e),o=[B,D].indexOf(n)>=0?-1:1,a="function"==typeof r?r(Object.assign({},t,{placement:e})):r,i=a[0],p=a[1];return i=i||0,p=(p||0)*o,[B,A].indexOf(n)>=0?{x:p,y:i}:{x:i,y:p}}(r,t.rects,a),e}),{}),p=i[t.placement],c=p.x,s=p.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=s),t.modifiersData[n]=i}};var be={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,r=e.state,n=e.name,o=e.options,a=r.elements.arrow,i=r.modifiersData.popperOffsets,p=_(r.placement),c=G(p),s=[B,A].indexOf(p)>=0?"height":"width";if(a&&i){var f=function(e,t){return Q("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:Z(e,T))}(o.padding,r),u=w(a),l="y"===c?D:B,d="y"===c?S:A,v=r.rects.reference[s]+r.rects.reference[c]-i[c]-r.rects.popper[s],h=i[c]-r.rects.reference[c],m=E(a),b=m?"y"===c?m.clientHeight||0:m.clientWidth||0:0,y=v/2-h/2,g=f[l],O=b-u[s]-f[d],x=b/2-u[s]/2+y,k=ce(g,x,O),j=c;r.modifiersData[n]=((t={})[j]=k,t.centerOffset=k-x,t)}},effect:function(e){var t=e.state,r=e.options.element,n=void 0===r?"[data-popper-arrow]":r;null!=n&&("string"!=typeof n||(n=t.elements.popper.querySelector(n)))&&X(t.elements.popper,n)&&(t.elements.arrow=n)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},ye=function(e){return parseInt(e,10)};var ge={beforeMount:function(e,t){e.clickAwayEvent=function(r){e!=r.target&&!e.contains(r.target)&&t.value.enabled&&t.value.handler()},document.addEventListener("click",e.clickAwayEvent)},unmounted:function(e){document.removeEventListener("click",e.clickAwayEvent)}},we=function(e){return new Promise((function(t){return setTimeout(t,e)}))},Oe=e.defineComponent({name:"Popper",emits:["open:popper","close:popper"],directives:{clickAway:ge},props:{placement:{type:String,default:"bottom",validator:function(e){return["auto","auto-start","auto-end","top","top-start","top-end","bottom","bottom-start","bottom-end","right","right-start","right-end","left","left-start","left-end"].includes(e)}},disableClickAway:{type:Boolean,default:!1},offsetX:{type:String,default:"0"},offsetY:{type:String,default:"12"},hover:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},openDelay:{type:[Number,String],default:0},closeDelay:{type:[Number,String],default:0},arrow:{type:Boolean,default:!1},arrowPadding:{type:String,default:"0"}},setup:function(t,n){var a=n.slots,p=n.emit,c=a.default();if(c&&c.length>1)return console.error("[Popper]: The <Popper> component expects only one child element at its root. You passed ".concat(c.length," child nodes."));var s=e.toRefs(t),f=s.offsetX,u=s.offsetY,l=s.arrowPadding,d=s.placement,v=s.disabled,h=s.disableClickAway,m=s.openDelay,b=s.closeDelay,y=function(t){var n=t.placement,a=t.arrowPadding,p=t.offsetX,c=t.offsetY,s=t.emit,f=e.reactive({isOpen:!1,popperInstance:null,popperNode:null,triggerNode:null});e.watch([function(){return f.isOpen},n],function(){var t=o(regeneratorRuntime.mark((function t(r){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!i(r,1)[0]){t.next=5;break}return t.next=4,e.nextTick();case 4:u();case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}());var u=function(){f.popperInstance=pe(f.triggerNode,f.popperNode,{placement:n.value,modifiers:[se,he,be,{name:"arrow",options:{padding:ye(a.value)}},me,{name:"offset",options:{offset:[ye(p.value),ye(c.value)]}}]}),f.popperInstance.update()};return e.onBeforeUnmount((function(){var e;null===(e=f.popperInstance)||void 0===e||e.destroy()})),r(r({},e.toRefs(f)),{},{open:function(){f.isOpen||(f.isOpen=!0,s("open:popper"))},close:function(){f.isOpen&&(f.isOpen=!1,s("close:popper"))}})}({offsetX:f,offsetY:u,arrowPadding:l,placement:d,emit:p}),g=y.popperNode,w=y.triggerNode,O=y.isOpen,x=y.open,k=y.close,j=function(t,r){var n=e.ref(null),o=e.ref(!1);e.onMounted((function(){void 0!==t.content&&(o.value=!0),n.value=new MutationObserver(a),n.value.observe(r.value,{childList:!0,subtree:!0})})),e.onBeforeUnmount((function(){return n.value.disconnect()}));var a=function(){t.content?o.value=!0:o.value=!1};return{hasContent:o}}(a,g).hasContent;e.watch([j,v],(function(e){var t=i(e,2),r=t[0],n=t[1];!O.value||r&&!n||k()}));var P=function(){var e=o(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!D.value){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,we(m.value);case 4:x();case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),E=function(){var e=o(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,we(b.value);case 2:k();case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),D=e.computed((function(){return v.value||!j.value})),S=e.computed((function(){return O.value&&!D.value})),A=e.computed((function(){return!h.value}));return{popperNode:g,triggerNode:w,isOpen:O,close:k,handleToggle:function(){O.value?E():P()},handleOpen:P,handleClose:E,shouldShowPopper:S,enableClickAway:A}}}),xe=e.withScopeId("data-v-2677458a");e.pushScopeId("data-v-2677458a");var ke={key:0,id:"arrow","data-popper-arrow":""};e.popScopeId();var je=xe((function(t,r,n,o,a,i){var p=e.resolveDirective("click-away");return e.withDirectives((e.openBlock(),e.createBlock("div",null,[e.createVNode("div",{ref:"triggerNode",onMouseover:r[1]||(r[1]=function(e){return t.hover&&t.handleOpen()}),onMouseleave:r[2]||(r[2]=function(e){return t.hover&&t.handleClose()}),onClick:r[3]||(r[3]=function(){return t.handleToggle&&t.handleToggle.apply(t,arguments)}),onFocus:r[4]||(r[4]=function(){return t.handleOpen&&t.handleOpen.apply(t,arguments)}),onBlur:r[5]||(r[5]=function(){return t.handleClose&&t.handleClose.apply(t,arguments)}),onKeyup:r[6]||(r[6]=e.withKeys((function(){return t.handleClose&&t.handleClose.apply(t,arguments)}),["esc"])),class:"inline-block"},[e.renderSlot(t.$slots,"default")],544),e.createVNode(e.Transition,{name:"fade"},{default:xe((function(){return[e.withDirectives(e.createVNode("div",{class:["popper",t.shouldShowPopper?"inline-block":null],ref:"popperNode"},[e.renderSlot(t.$slots,"content",{close:t.close}),t.arrow?(e.openBlock(),e.createBlock("div",ke)):e.createCommentVNode("",!0)],2),[[e.vShow,t.shouldShowPopper]])]})),_:3})],512)),[[p,{handler:t.handleClose,enabled:t.enableClickAway}]])}));!function(e,t){void 0===t&&(t={});var r=t.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===r&&n.firstChild?n.insertBefore(o,n.firstChild):n.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}('\n#arrow[data-v-2677458a],\n #arrow[data-v-2677458a]::before {\n transition: background 250ms ease-in-out;\n position: absolute;\n width: calc(10px - var(--popper-theme-border-width, 0px));\n height: calc(10px - var(--popper-theme-border-width, 0px));\n box-sizing: border-box;\n background: var(--popper-theme-background-color);\n}\n#arrow[data-v-2677458a] {\n visibility: hidden;\n}\n#arrow[data-v-2677458a]::before {\n visibility: visible;\n content: "";\n transform: rotate(45deg);\n}\n\n /* Top arrow */\n.popper[data-popper-placement^="top"] > #arrow[data-v-2677458a] {\n bottom: -5px;\n}\n.popper[data-popper-placement^="top"] > #arrow[data-v-2677458a]::before {\n border-right: var(--popper-theme-border-width)\n var(--popper-theme-border-style) var(--popper-theme-border-color);\n border-bottom: var(--popper-theme-border-width)\n var(--popper-theme-border-style) var(--popper-theme-border-color);\n}\n\n /* Bottom arrow */\n.popper[data-popper-placement^="bottom"] > #arrow[data-v-2677458a] {\n top: -5px;\n}\n.popper[data-popper-placement^="bottom"] > #arrow[data-v-2677458a]::before {\n border-left: var(--popper-theme-border-width)\n var(--popper-theme-border-style) var(--popper-theme-border-color);\n border-top: var(--popper-theme-border-width)\n var(--popper-theme-border-style) var(--popper-theme-border-color);\n}\n\n /* Left arrow */\n.popper[data-popper-placement^="left"] > #arrow[data-v-2677458a] {\n right: -5px;\n}\n.popper[data-popper-placement^="left"] > #arrow[data-v-2677458a]::before {\n border-right: var(--popper-theme-border-width)\n var(--popper-theme-border-style) var(--popper-theme-border-color);\n border-top: var(--popper-theme-border-width)\n var(--popper-theme-border-style) var(--popper-theme-border-color);\n}\n\n /* Right arrow */\n.popper[data-popper-placement^="right"] > #arrow[data-v-2677458a] {\n left: -5px;\n}\n.popper[data-popper-placement^="right"] > #arrow[data-v-2677458a]::before {\n border-left: var(--popper-theme-border-width)\n var(--popper-theme-border-style) var(--popper-theme-border-color);\n border-bottom: var(--popper-theme-border-width)\n var(--popper-theme-border-style) var(--popper-theme-border-color);\n}\n.popper[data-v-2677458a] {\n transition: background 250ms ease-in-out;\n background: var(--popper-theme-background-color);\n padding: var(--popper-theme-padding);\n color: var(--popper-theme-text-color);\n border-radius: var(--popper-theme-border-radius);\n border-width: var(--popper-theme-border-width);\n border-style: var(--popper-theme-border-style);\n border-color: var(--popper-theme-border-color);\n box-shadow: var(--popper-theme-box-shadow);\n}\n.popper[data-v-2677458a]:hover,\n .popper:hover > #arrow[data-v-2677458a]::before {\n background: var(--popper-theme-background-color-hover);\n}\n.inline-block[data-v-2677458a] {\n display: inline-block;\n}\n.fade-enter-active[data-v-2677458a],\n .fade-leave-active[data-v-2677458a] {\n transition: opacity 0.2s ease;\n}\n.fade-enter-from[data-v-2677458a],\n .fade-leave-to[data-v-2677458a] {\n opacity: 0;\n}\n'),Oe.render=je,Oe.__scopeId="data-v-2677458a";var Pe=function(){var e=Oe;return e.install=function(t){t.component("Popper",e)},e}(),Ee=Object.freeze({__proto__:null,default:Pe});return Object.entries(Ee).forEach((function(e){var t=i(e,2),r=t[0],n=t[1];"default"!==r&&(Pe[r]=n)})),Pe}(Vue); |
{ | ||
"name": "vue3-popper", | ||
"version": "0.3.0", | ||
"version": "0.4.0", | ||
"author": { | ||
@@ -5,0 +5,0 @@ "name": "Valgeir Björnsson", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
182618
3582