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