New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@bpui/popover

Package Overview
Dependencies
Maintainers
1
Versions
69
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bpui/popover - npm Package Compare versions

Comparing version 0.1.10 to 0.1.11

4

dist/index.common.js
/*!
* bpui popover v0.1.10
* Copyright (c) 2020 Copyright bpoint.lee@live.com All Rights Reserved.
* bpui popover v0.1.11
* Copyright (c) 2021 Copyright bpoint.lee@live.com All Rights Reserved.
* Released under the MIT License.

@@ -5,0 +5,0 @@ */

/*!
* bpui popover v0.1.10
* Copyright (c) 2020 Copyright bpoint.lee@live.com All Rights Reserved.
* bpui popover v0.1.11
* Copyright (c) 2021 Copyright bpoint.lee@live.com All Rights Reserved.
* Released under the MIT License.
*/
"use strict";function t(t){return t&&"object"==typeof t&&"default"in t?t.default:t}var e=t(require("@bpui/libs")),r=t(require("@bpui/dialog")),o="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function n(t,e){return t(e={exports:{}},e.exports),e.exports}var i=function(t){return t&&t.Math==Math&&t},f=i("object"==typeof globalThis&&globalThis)||i("object"==typeof window&&window)||i("object"==typeof self&&self)||i("object"==typeof o&&o)||Function("return this")(),s=function(t){try{return!!t()}catch(t){return!0}},c=!s((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),u={}.propertyIsEnumerable,a=Object.getOwnPropertyDescriptor,l={f:a&&!u.call({1:2},1)?function(t){var e=a(this,t);return!!e&&e.enumerable}:u},h=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},p={}.toString,d=function(t){return p.call(t).slice(8,-1)},g="".split,v=s((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==d(t)?g.call(t,""):Object(t)}:Object,b=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},y=function(t){return v(b(t))},w=function(t){return"object"==typeof t?null!==t:"function"==typeof t},m=function(t,e){if(!w(t))return t;var r,o;if(e&&"function"==typeof(r=t.toString)&&!w(o=r.call(t)))return o;if("function"==typeof(r=t.valueOf)&&!w(o=r.call(t)))return o;if(!e&&"function"==typeof(r=t.toString)&&!w(o=r.call(t)))return o;throw TypeError("Can't convert object to primitive value")},_={}.hasOwnProperty,T=function(t,e){return _.call(t,e)},O=f.document,S=w(O)&&w(O.createElement),j=!c&&!s((function(){return 7!=Object.defineProperty((t="div",S?O.createElement(t):{}),"a",{get:function(){return 7}}).a;var t})),A=Object.getOwnPropertyDescriptor,E={f:c?A:function(t,e){if(t=y(t),e=m(e,!0),j)try{return A(t,e)}catch(t){}if(T(t,e))return h(!l.f.call(t,e),t[e])}},L=function(t){if(!w(t))throw TypeError(String(t)+" is not an object");return t},P=Object.defineProperty,x={f:c?P:function(t,e,r){if(L(t),e=m(e,!0),L(r),j)try{return P(t,e,r)}catch(t){}if("get"in r||"set"in r)throw TypeError("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},k=c?function(t,e,r){return x.f(t,e,h(1,r))}:function(t,e,r){return t[e]=r,t},C=function(t,e){try{k(f,t,e)}catch(r){f[t]=e}return e},I=f["__core-js_shared__"]||C("__core-js_shared__",{}),R=Function.toString;"function"!=typeof I.inspectSource&&(I.inspectSource=function(t){return R.call(t)});var D,M,B,H,F=I.inspectSource,N=f.WeakMap,V="function"==typeof N&&/native code/.test(F(N)),W=n((function(t){(t.exports=function(t,e){return I[t]||(I[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.6.5",mode:"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})})),q=0,z=Math.random(),U=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++q+z).toString(36)},G=W("keys"),X={},K=f.WeakMap;if(V){var Y=new K,J=Y.get,Q=Y.has,Z=Y.set;D=function(t,e){return Z.call(Y,t,e),e},M=function(t){return J.call(Y,t)||{}},B=function(t){return Q.call(Y,t)}}else{var tt=G[H="state"]||(G[H]=U(H));X[tt]=!0,D=function(t,e){return k(t,tt,e),e},M=function(t){return T(t,tt)?t[tt]:{}},B=function(t){return T(t,tt)}}var et,rt,ot={set:D,get:M,has:B,enforce:function(t){return B(t)?M(t):D(t,{})},getterFor:function(t){return function(e){var r;if(!w(e)||(r=M(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return r}}},nt=n((function(t){var e=ot.get,r=ot.enforce,o=String(String).split("String");(t.exports=function(t,e,n,i){var s=!!i&&!!i.unsafe,c=!!i&&!!i.enumerable,u=!!i&&!!i.noTargetGet;"function"==typeof n&&("string"!=typeof e||T(n,"name")||k(n,"name",e),r(n).source=o.join("string"==typeof e?e:"")),t!==f?(s?!u&&t[e]&&(c=!0):delete t[e],c?t[e]=n:k(t,e,n)):c?t[e]=n:C(e,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&e(this).source||F(this)}))})),it=f,ft=function(t){return"function"==typeof t?t:void 0},st=function(t,e){return arguments.length<2?ft(it[t])||ft(f[t]):it[t]&&it[t][e]||f[t]&&f[t][e]},ct=Math.ceil,ut=Math.floor,at=function(t){return isNaN(t=+t)?0:(t>0?ut:ct)(t)},lt=Math.min,ht=function(t){return t>0?lt(at(t),9007199254740991):0},pt=Math.max,dt=Math.min,gt=function(t){return function(e,r,o){var n,i=y(e),f=ht(i.length),s=function(t,e){var r=at(t);return r<0?pt(r+e,0):dt(r,e)}(o,f);if(t&&r!=r){for(;f>s;)if((n=i[s++])!=n)return!0}else for(;f>s;s++)if((t||s in i)&&i[s]===r)return t||s||0;return!t&&-1}},vt={includes:gt(!0),indexOf:gt(!1)}.indexOf,bt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"].concat("length","prototype"),yt={f:Object.getOwnPropertyNames||function(t){return function(t,e){var r,o=y(t),n=0,i=[];for(r in o)!T(X,r)&&T(o,r)&&i.push(r);for(;e.length>n;)T(o,r=e[n++])&&(~vt(i,r)||i.push(r));return i}(t,bt)}},wt={f:Object.getOwnPropertySymbols},mt=st("Reflect","ownKeys")||function(t){var e=yt.f(L(t)),r=wt.f;return r?e.concat(r(t)):e},_t=function(t,e){for(var r=mt(e),o=x.f,n=E.f,i=0;i<r.length;i++){var f=r[i];T(t,f)||o(t,f,n(e,f))}},Tt=/#|\.prototype\./,Ot=function(t,e){var r=jt[St(t)];return r==Et||r!=At&&("function"==typeof e?s(e):!!e)},St=Ot.normalize=function(t){return String(t).replace(Tt,".").toLowerCase()},jt=Ot.data={},At=Ot.NATIVE="N",Et=Ot.POLYFILL="P",$t=Ot,Lt=E.f,Pt=Array.isArray||function(t){return"Array"==d(t)},xt=function(t){return Object(b(t))},kt=function(t,e,r){var o=m(e);o in t?x.f(t,o,h(0,r)):t[o]=r},Ct=!!Object.getOwnPropertySymbols&&!s((function(){return!String(Symbol())})),It=Ct&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Rt=W("wks"),Dt=f.Symbol,Mt=It?Dt:Dt&&Dt.withoutSetter||U,Bt=function(t){return T(Rt,t)||(Ct&&T(Dt,t)?Rt[t]=Dt[t]:Rt[t]=Mt("Symbol."+t)),Rt[t]},Ht=Bt("species"),Ft=function(t,e){var r;return Pt(t)&&("function"!=typeof(r=t.constructor)||r!==Array&&!Pt(r.prototype)?w(r)&&null===(r=r[Ht])&&(r=void 0):r=void 0),new(void 0===r?Array:r)(0===e?0:e)},Nt=st("navigator","userAgent")||"",Vt=f.process,Wt=Vt&&Vt.versions,qt=Wt&&Wt.v8;qt?rt=(et=qt.split("."))[0]+et[1]:Nt&&(!(et=Nt.match(/Edge\/(\d+)/))||et[1]>=74)&&(et=Nt.match(/Chrome\/(\d+)/))&&(rt=et[1]);var zt,Ut=rt&&+rt,Gt=Bt("species"),Xt=Bt("isConcatSpreadable"),Kt=Ut>=51||!s((function(){var t=[];return t[Xt]=!1,t.concat()[0]!==t})),Yt=(zt="concat",Ut>=51||!s((function(){var t=[];return(t.constructor={})[Gt]=function(){return{foo:1}},1!==t[zt](Boolean).foo}))),Jt=function(t){if(!w(t))return!1;var e=t[Xt];return void 0!==e?!!e:Pt(t)};function Qt(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Zt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,o)}return r}function te(t,e){if(t!==e)throw new TypeError("Cannot instantiate an arrow function")}function ee(t,e,r,o,n,i,f,s,c,u){"boolean"!=typeof f&&(c=s,s=f,f=!1);var a,l="function"==typeof r?r.options:r;if(t&&t.render&&(l.render=t.render,l.staticRenderFns=t.staticRenderFns,l._compiled=!0,n&&(l.functional=!0)),o&&(l._scopeId=o),i?(a=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),e&&e.call(this,c(t)),t&&t._registeredComponents&&t._registeredComponents.add(i)},l._ssrRegister=a):e&&(a=f?function(t){e.call(this,u(t,this.$root.$options.shadowRoot))}:function(t){e.call(this,s(t))}),a)if(l.functional){var h=l.render;l.render=function(t,e){return a.call(e),h(t,e)}}else{var p=l.beforeCreate;l.beforeCreate=p?[].concat(p,a):[a]}return r}!function(t,e){var r,o,n,i,s,c=t.target,u=t.global,a=t.stat;if(r=u?f:a?f[c]||C(c,{}):(f[c]||{}).prototype)for(o in e){if(i=e[o],n=t.noTargetGet?(s=Lt(r,o))&&s.value:r[o],!$t(u?o:c+(a?".":"#")+o,t.forced)&&void 0!==n){if(typeof i==typeof n)continue;_t(i,n)}(t.sham||n&&n.sham)&&k(i,"sham",!0),nt(r,o,i,t)}}({target:"Array",proto:!0,forced:!Kt||!Yt},{concat:function(t){var e,r,o,n,i,f=xt(this),s=Ft(f,0),c=0;for(e=-1,o=arguments.length;e<o;e++)if(Jt(i=-1===e?f:arguments[e])){if(c+(n=ht(i.length))>9007199254740991)throw TypeError("Maximum allowed index exceeded");for(r=0;r<n;r++,c++)r in i&&kt(s,c,i[r])}else{if(c>=9007199254740991)throw TypeError("Maximum allowed index exceeded");kt(s,c++,i)}return s.length=c,s}});var re={components:{widget:r.bpWidget},props:{visible:Boolean,mask:{default:!1,type:Boolean},maskClose:{default:!0,type:Boolean},pageClass:String|Array,pageStyle:String|Array|Object,direction:{default:"auto",type:String},trigger:{type:String},bind:{}},computed:{pStyle:function(){return this.pageStyle?"string"==typeof this.pageStyle?"left:".concat(this.offsetLeft,";top:").concat(this.offsetTop,";")+this.pageStyle:function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Zt(Object(r),!0).forEach((function(e){Qt(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Zt(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({left:this.offsetLeft,top:this.offsetTop},this.pageStyle):{left:this.offsetLeft,top:this.offsetTop}}},data:function(){return{visibleReal:!1,directionData:"auto",offsetTop:0,offsetLeft:0,offsetArrowLeft:null,offsetArrowTop:null,offsetArrowBottom:null,offsetArrowRight:null}},watch:{visible:function(t,e){this.visibleReal!=t&&(this.visibleReal=t,t!=e&&t&&this._show(this.direction))},visibleReal:function(t){this.$emit("update:visible",t)},bind:function(t,e){this._removeEvent(e),this._bindEvent(t)}},beforeMount:function(){this.visibleReal=this.visible},beforeDestroy:function(){$("body").off("click",this._hide)},mounted:function(){var t=this;this.$nextTick(function(){te(this,t),this.$parent.$forceUpdate()}.bind(this))},methods:{show:function(){return this.$refs.widget.show()},hide:function(){return this.$refs.widget.hide()},_removeEvent:function(t){var r;t&&(r=e.dom.isVueObject(t)?t.$el:t,$(r).off("mouseover",this._onTrigger),$(r).off("mouseleave",this._onTriggerHide),$(r).off("click",this._onTrigger))},_bindEvent:function(t){var r;if(this._removeEvent(t),t)if(r=e.dom.isVueObject(t)?t.$el:t,"hover"==this.trigger)e.device.browserIsMobile()?$(r).on("click",this._onTrigger):($(r).on("mouseover",this._onTrigger),$(r).on("mouseleave",this._onTriggerHide));else if("click"==this.trigger){var o=(e.device.browserIsMobile(),"click");$(r).off(o,this._onTrigger).on(o,this._onTrigger)}},_onTrigger:function(t){var e=this;this.visibleReal=!0,setTimeout(function(){te(this,e),$("body").off("click",this._hide).on("click",this._hide)}.bind(this),10),this._show(this.direction)},_onTriggerHide:function(t){this.visibleReal=!1,$("body").off("click",this._hide)},_show:function(t){var r=this,o=this.bind;if(this.bind){var n;n=e.dom.isVueObject(o)?o.$el:o;var i=e.dom.getElementOffset(n),f={};f.height=n.clientHeight,f.width=n.clientWidth;var s,c=e.dom.getViewPort(),u=e.dom.getDocumentOffset();this.offsetTop=i.top+u.top,"top"==t?(this.directionData="top",this.offsetTop-=f.height,this.offsetTop-=8):"bottom"==t?(this.directionData="bottom",this.offsetTop+=f.height):"left"==t?(this.directionData="left",this.offsetLeft=i.left+f.width):"right"==t?(this.directionData="right",this.offsetLeft=i.left+f.width):i.top+f.height/2>c.height/2?(this.directionData="top",this.offsetTop-=f.height,this.offsetTop-=8):(this.directionData="bottom",this.offsetTop+=f.height),this.offsetTop=parseInt(this.offsetTop),this.offsetTop+="px",s="left"==t||"right"==t?parseInt(i.top+f.height/2):parseInt(i.left+f.width/2);var a=this.$refs.main;e.dom.probeDom(400,function(){return te(this,r),a.clientWidth>0}.bind(this),function(){if(te(this,r),"left"==t||"right"==t){var e=parseInt(s-a.clientHeight/2);e<10&&(e=10),e+a.clientHeight>c.height-10&&(e=c.height-10-a.clientHeight),this.offsetTop=parseInt(e+u.top)+"px",this.offsetLeft="right"==t?i.left+f.width-6:i.left-a.clientWidth-6,this.offsetLeft+=u.left,this.offsetLeft=parseInt(this.offsetLeft),this.offsetLeft+="px",this.offsetArrowLeft=null,this.offsetArrowBottom=null,this.offsetArrowTop=parseInt(s-e-6),this.offsetArrowTop<10?this.offsetArrowTop=10:this.offsetArrowTop>a.clientHeight-22&&(this.offsetArrowTop=parseInt(a.clientHeight-22)),this.offsetArrowTop+="px",this.offsetArrowRight=null}else{var o=parseInt(a.clientWidth||50),n=parseInt(s-o/2);n<10&&(n=10),n+o>c.width-10&&(n=c.width-10-o),this.offsetLeft=parseInt(n)+"px",this.offsetArrowLeft=parseInt(s-n)-6,this.offsetArrowLeft<10?this.offsetArrowLeft=10:this.offsetArrowLeft>o-22&&(this.offsetArrowLeft=o-22),this.offsetArrowLeft+="px",this.offsetArrowBottom=null,this.offsetArrowTop=null,this.offsetArrowRight=null}}.bind(this))}},_hide:function(){var t=this;$("body").off("click",this._hide),this.hide().then(function(e){te(this,t)}.bind(this))}}},oe=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("widget",{ref:"widget",staticClass:"bp-popover",attrs:{visible:t.visibleReal,maskClose:t.maskClose,mask:t.mask,preventEvent:!1,hideBodyScroll:!1},on:{"update:visible":function(e){t.visibleReal=e}}},[r("div",{ref:"main",staticClass:"bp-popover__main",class:t.pageClass,style:t.pStyle,attrs:{direction:t.directionData}},[t._t("default"),t._v(" "),r("div",{staticClass:"bp-popover__arrow",style:{left:t.offsetArrowLeft,top:t.offsetArrowTop,right:t.offsetArrowRight,bottom:t.offsetArrowBottom}})],2)])};oe._withStripped=!0;var ne={bpPopover:ee({render:oe,staticRenderFns:[]},void 0,re,void 0,!1,void 0,!1,void 0,void 0,void 0)};module.exports=ne;
/*!
* bpui popover v0.1.10
* Copyright (c) 2020 Copyright bpoint.lee@live.com All Rights Reserved.
* bpui popover v0.1.11
* Copyright (c) 2021 Copyright bpoint.lee@live.com All Rights Reserved.
* Released under the MIT License.

@@ -5,0 +5,0 @@ */

/*!
* bpui popover v0.1.10
* Copyright (c) 2020 Copyright bpoint.lee@live.com All Rights Reserved.
* bpui popover v0.1.11
* Copyright (c) 2021 Copyright bpoint.lee@live.com All Rights Reserved.
* Released under the MIT License.
*/
import t from"@bpui/libs";import e from"@bpui/dialog";var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function o(t,e){return t(e={exports:{}},e.exports),e.exports}var n=function(t){return t&&t.Math==Math&&t},i=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof r&&r)||Function("return this")(),f=function(t){try{return!!t()}catch(t){return!0}},s=!f((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),c={}.propertyIsEnumerable,a=Object.getOwnPropertyDescriptor,u={f:a&&!c.call({1:2},1)?function(t){var e=a(this,t);return!!e&&e.enumerable}:c},l=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},h={}.toString,p=function(t){return h.call(t).slice(8,-1)},d="".split,g=f((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==p(t)?d.call(t,""):Object(t)}:Object,v=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},b=function(t){return g(v(t))},y=function(t){return"object"==typeof t?null!==t:"function"==typeof t},m=function(t,e){if(!y(t))return t;var r,o;if(e&&"function"==typeof(r=t.toString)&&!y(o=r.call(t)))return o;if("function"==typeof(r=t.valueOf)&&!y(o=r.call(t)))return o;if(!e&&"function"==typeof(r=t.toString)&&!y(o=r.call(t)))return o;throw TypeError("Can't convert object to primitive value")},w={}.hasOwnProperty,_=function(t,e){return w.call(t,e)},T=i.document,O=y(T)&&y(T.createElement),S=!s&&!f((function(){return 7!=Object.defineProperty((t="div",O?T.createElement(t):{}),"a",{get:function(){return 7}}).a;var t})),j=Object.getOwnPropertyDescriptor,A={f:s?j:function(t,e){if(t=b(t),e=m(e,!0),S)try{return j(t,e)}catch(t){}if(_(t,e))return l(!u.f.call(t,e),t[e])}},E=function(t){if(!y(t))throw TypeError(String(t)+" is not an object");return t},L=Object.defineProperty,P={f:s?L:function(t,e,r){if(E(t),e=m(e,!0),E(r),S)try{return L(t,e,r)}catch(t){}if("get"in r||"set"in r)throw TypeError("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},x=s?function(t,e,r){return P.f(t,e,l(1,r))}:function(t,e,r){return t[e]=r,t},k=function(t,e){try{x(i,t,e)}catch(r){i[t]=e}return e},C=i["__core-js_shared__"]||k("__core-js_shared__",{}),I=Function.toString;"function"!=typeof C.inspectSource&&(C.inspectSource=function(t){return I.call(t)});var R,D,M,B,H=C.inspectSource,F=i.WeakMap,N="function"==typeof F&&/native code/.test(H(F)),V=o((function(t){(t.exports=function(t,e){return C[t]||(C[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.6.5",mode:"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})})),W=0,z=Math.random(),U=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++W+z).toString(36)},G=V("keys"),X={},q=i.WeakMap;if(N){var K=new q,Y=K.get,J=K.has,Q=K.set;R=function(t,e){return Q.call(K,t,e),e},D=function(t){return Y.call(K,t)||{}},M=function(t){return J.call(K,t)}}else{var Z=G[B="state"]||(G[B]=U(B));X[Z]=!0,R=function(t,e){return x(t,Z,e),e},D=function(t){return _(t,Z)?t[Z]:{}},M=function(t){return _(t,Z)}}var tt,et,rt={set:R,get:D,has:M,enforce:function(t){return M(t)?D(t):R(t,{})},getterFor:function(t){return function(e){var r;if(!y(e)||(r=D(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return r}}},ot=o((function(t){var e=rt.get,r=rt.enforce,o=String(String).split("String");(t.exports=function(t,e,n,f){var s=!!f&&!!f.unsafe,c=!!f&&!!f.enumerable,a=!!f&&!!f.noTargetGet;"function"==typeof n&&("string"!=typeof e||_(n,"name")||x(n,"name",e),r(n).source=o.join("string"==typeof e?e:"")),t!==i?(s?!a&&t[e]&&(c=!0):delete t[e],c?t[e]=n:x(t,e,n)):c?t[e]=n:k(e,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&e(this).source||H(this)}))})),nt=i,it=function(t){return"function"==typeof t?t:void 0},ft=function(t,e){return arguments.length<2?it(nt[t])||it(i[t]):nt[t]&&nt[t][e]||i[t]&&i[t][e]},st=Math.ceil,ct=Math.floor,at=function(t){return isNaN(t=+t)?0:(t>0?ct:st)(t)},ut=Math.min,lt=function(t){return t>0?ut(at(t),9007199254740991):0},ht=Math.max,pt=Math.min,dt=function(t){return function(e,r,o){var n,i=b(e),f=lt(i.length),s=function(t,e){var r=at(t);return r<0?ht(r+e,0):pt(r,e)}(o,f);if(t&&r!=r){for(;f>s;)if((n=i[s++])!=n)return!0}else for(;f>s;s++)if((t||s in i)&&i[s]===r)return t||s||0;return!t&&-1}},gt={includes:dt(!0),indexOf:dt(!1)}.indexOf,vt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"].concat("length","prototype"),bt={f:Object.getOwnPropertyNames||function(t){return function(t,e){var r,o=b(t),n=0,i=[];for(r in o)!_(X,r)&&_(o,r)&&i.push(r);for(;e.length>n;)_(o,r=e[n++])&&(~gt(i,r)||i.push(r));return i}(t,vt)}},yt={f:Object.getOwnPropertySymbols},mt=ft("Reflect","ownKeys")||function(t){var e=bt.f(E(t)),r=yt.f;return r?e.concat(r(t)):e},wt=function(t,e){for(var r=mt(e),o=P.f,n=A.f,i=0;i<r.length;i++){var f=r[i];_(t,f)||o(t,f,n(e,f))}},_t=/#|\.prototype\./,Tt=function(t,e){var r=St[Ot(t)];return r==At||r!=jt&&("function"==typeof e?f(e):!!e)},Ot=Tt.normalize=function(t){return String(t).replace(_t,".").toLowerCase()},St=Tt.data={},jt=Tt.NATIVE="N",At=Tt.POLYFILL="P",Et=Tt,$t=A.f,Lt=Array.isArray||function(t){return"Array"==p(t)},Pt=function(t){return Object(v(t))},xt=function(t,e,r){var o=m(e);o in t?P.f(t,o,l(0,r)):t[o]=r},kt=!!Object.getOwnPropertySymbols&&!f((function(){return!String(Symbol())})),Ct=kt&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,It=V("wks"),Rt=i.Symbol,Dt=Ct?Rt:Rt&&Rt.withoutSetter||U,Mt=function(t){return _(It,t)||(kt&&_(Rt,t)?It[t]=Rt[t]:It[t]=Dt("Symbol."+t)),It[t]},Bt=Mt("species"),Ht=function(t,e){var r;return Lt(t)&&("function"!=typeof(r=t.constructor)||r!==Array&&!Lt(r.prototype)?y(r)&&null===(r=r[Bt])&&(r=void 0):r=void 0),new(void 0===r?Array:r)(0===e?0:e)},Ft=ft("navigator","userAgent")||"",Nt=i.process,Vt=Nt&&Nt.versions,Wt=Vt&&Vt.v8;Wt?et=(tt=Wt.split("."))[0]+tt[1]:Ft&&(!(tt=Ft.match(/Edge\/(\d+)/))||tt[1]>=74)&&(tt=Ft.match(/Chrome\/(\d+)/))&&(et=tt[1]);var zt,Ut=et&&+et,Gt=Mt("species"),Xt=Mt("isConcatSpreadable"),qt=Ut>=51||!f((function(){var t=[];return t[Xt]=!1,t.concat()[0]!==t})),Kt=(zt="concat",Ut>=51||!f((function(){var t=[];return(t.constructor={})[Gt]=function(){return{foo:1}},1!==t[zt](Boolean).foo}))),Yt=function(t){if(!y(t))return!1;var e=t[Xt];return void 0!==e?!!e:Lt(t)};function Jt(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Qt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,o)}return r}function Zt(t,e){if(t!==e)throw new TypeError("Cannot instantiate an arrow function")}function te(t,e,r,o,n,i,f,s,c,a){"boolean"!=typeof f&&(c=s,s=f,f=!1);var u,l="function"==typeof r?r.options:r;if(t&&t.render&&(l.render=t.render,l.staticRenderFns=t.staticRenderFns,l._compiled=!0,n&&(l.functional=!0)),o&&(l._scopeId=o),i?(u=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),e&&e.call(this,c(t)),t&&t._registeredComponents&&t._registeredComponents.add(i)},l._ssrRegister=u):e&&(u=f?function(t){e.call(this,a(t,this.$root.$options.shadowRoot))}:function(t){e.call(this,s(t))}),u)if(l.functional){var h=l.render;l.render=function(t,e){return u.call(e),h(t,e)}}else{var p=l.beforeCreate;l.beforeCreate=p?[].concat(p,u):[u]}return r}!function(t,e){var r,o,n,f,s,c=t.target,a=t.global,u=t.stat;if(r=a?i:u?i[c]||k(c,{}):(i[c]||{}).prototype)for(o in e){if(f=e[o],n=t.noTargetGet?(s=$t(r,o))&&s.value:r[o],!Et(a?o:c+(u?".":"#")+o,t.forced)&&void 0!==n){if(typeof f==typeof n)continue;wt(f,n)}(t.sham||n&&n.sham)&&x(f,"sham",!0),ot(r,o,f,t)}}({target:"Array",proto:!0,forced:!qt||!Kt},{concat:function(t){var e,r,o,n,i,f=Pt(this),s=Ht(f,0),c=0;for(e=-1,o=arguments.length;e<o;e++)if(Yt(i=-1===e?f:arguments[e])){if(c+(n=lt(i.length))>9007199254740991)throw TypeError("Maximum allowed index exceeded");for(r=0;r<n;r++,c++)r in i&&xt(s,c,i[r])}else{if(c>=9007199254740991)throw TypeError("Maximum allowed index exceeded");xt(s,c++,i)}return s.length=c,s}});var ee={components:{widget:e.bpWidget},props:{visible:Boolean,mask:{default:!1,type:Boolean},maskClose:{default:!0,type:Boolean},pageClass:String|Array,pageStyle:String|Array|Object,direction:{default:"auto",type:String},trigger:{type:String},bind:{}},computed:{pStyle:function(){return this.pageStyle?"string"==typeof this.pageStyle?"left:".concat(this.offsetLeft,";top:").concat(this.offsetTop,";")+this.pageStyle:function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Qt(Object(r),!0).forEach((function(e){Jt(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Qt(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({left:this.offsetLeft,top:this.offsetTop},this.pageStyle):{left:this.offsetLeft,top:this.offsetTop}}},data:function(){return{visibleReal:!1,directionData:"auto",offsetTop:0,offsetLeft:0,offsetArrowLeft:null,offsetArrowTop:null,offsetArrowBottom:null,offsetArrowRight:null}},watch:{visible:function(t,e){this.visibleReal!=t&&(this.visibleReal=t,t!=e&&t&&this._show(this.direction))},visibleReal:function(t){this.$emit("update:visible",t)},bind:function(t,e){this._removeEvent(e),this._bindEvent(t)}},beforeMount:function(){this.visibleReal=this.visible},beforeDestroy:function(){$("body").off("click",this._hide)},mounted:function(){var t=this;this.$nextTick(function(){Zt(this,t),this.$parent.$forceUpdate()}.bind(this))},methods:{show:function(){return this.$refs.widget.show()},hide:function(){return this.$refs.widget.hide()},_removeEvent:function(e){var r;e&&(r=t.dom.isVueObject(e)?e.$el:e,$(r).off("mouseover",this._onTrigger),$(r).off("mouseleave",this._onTriggerHide),$(r).off("click",this._onTrigger))},_bindEvent:function(e){var r;if(this._removeEvent(e),e)if(r=t.dom.isVueObject(e)?e.$el:e,"hover"==this.trigger)t.device.browserIsMobile()?$(r).on("click",this._onTrigger):($(r).on("mouseover",this._onTrigger),$(r).on("mouseleave",this._onTriggerHide));else if("click"==this.trigger){var o=(t.device.browserIsMobile(),"click");$(r).off(o,this._onTrigger).on(o,this._onTrigger)}},_onTrigger:function(t){var e=this;this.visibleReal=!0,setTimeout(function(){Zt(this,e),$("body").off("click",this._hide).on("click",this._hide)}.bind(this),10),this._show(this.direction)},_onTriggerHide:function(t){this.visibleReal=!1,$("body").off("click",this._hide)},_show:function(e){var r=this,o=this.bind;if(this.bind){var n;n=t.dom.isVueObject(o)?o.$el:o;var i=t.dom.getElementOffset(n),f={};f.height=n.clientHeight,f.width=n.clientWidth;var s,c=t.dom.getViewPort(),a=t.dom.getDocumentOffset();this.offsetTop=i.top+a.top,"top"==e?(this.directionData="top",this.offsetTop-=f.height,this.offsetTop-=8):"bottom"==e?(this.directionData="bottom",this.offsetTop+=f.height):"left"==e?(this.directionData="left",this.offsetLeft=i.left+f.width):"right"==e?(this.directionData="right",this.offsetLeft=i.left+f.width):i.top+f.height/2>c.height/2?(this.directionData="top",this.offsetTop-=f.height,this.offsetTop-=8):(this.directionData="bottom",this.offsetTop+=f.height),this.offsetTop=parseInt(this.offsetTop),this.offsetTop+="px",s="left"==e||"right"==e?parseInt(i.top+f.height/2):parseInt(i.left+f.width/2);var u=this.$refs.main;t.dom.probeDom(400,function(){return Zt(this,r),u.clientWidth>0}.bind(this),function(){if(Zt(this,r),"left"==e||"right"==e){var t=parseInt(s-u.clientHeight/2);t<10&&(t=10),t+u.clientHeight>c.height-10&&(t=c.height-10-u.clientHeight),this.offsetTop=parseInt(t+a.top)+"px",this.offsetLeft="right"==e?i.left+f.width-6:i.left-u.clientWidth-6,this.offsetLeft+=a.left,this.offsetLeft=parseInt(this.offsetLeft),this.offsetLeft+="px",this.offsetArrowLeft=null,this.offsetArrowBottom=null,this.offsetArrowTop=parseInt(s-t-6),this.offsetArrowTop<10?this.offsetArrowTop=10:this.offsetArrowTop>u.clientHeight-22&&(this.offsetArrowTop=parseInt(u.clientHeight-22)),this.offsetArrowTop+="px",this.offsetArrowRight=null}else{var o=parseInt(u.clientWidth||50),n=parseInt(s-o/2);n<10&&(n=10),n+o>c.width-10&&(n=c.width-10-o),this.offsetLeft=parseInt(n)+"px",this.offsetArrowLeft=parseInt(s-n)-6,this.offsetArrowLeft<10?this.offsetArrowLeft=10:this.offsetArrowLeft>o-22&&(this.offsetArrowLeft=o-22),this.offsetArrowLeft+="px",this.offsetArrowBottom=null,this.offsetArrowTop=null,this.offsetArrowRight=null}}.bind(this))}},_hide:function(){var t=this;$("body").off("click",this._hide),this.hide().then(function(e){Zt(this,t)}.bind(this))}}},re=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("widget",{ref:"widget",staticClass:"bp-popover",attrs:{visible:t.visibleReal,maskClose:t.maskClose,mask:t.mask,preventEvent:!1,hideBodyScroll:!1},on:{"update:visible":function(e){t.visibleReal=e}}},[r("div",{ref:"main",staticClass:"bp-popover__main",class:t.pageClass,style:t.pStyle,attrs:{direction:t.directionData}},[t._t("default"),t._v(" "),r("div",{staticClass:"bp-popover__arrow",style:{left:t.offsetArrowLeft,top:t.offsetArrowTop,right:t.offsetArrowRight,bottom:t.offsetArrowBottom}})],2)])};re._withStripped=!0;var oe={bpPopover:te({render:re,staticRenderFns:[]},void 0,ee,void 0,!1,void 0,!1,void 0,void 0,void 0)};export default oe;
/*!
* bpui popover v0.1.10
* Copyright (c) 2020 Copyright bpoint.lee@live.com All Rights Reserved.
* bpui popover v0.1.11
* Copyright (c) 2021 Copyright bpoint.lee@live.com All Rights Reserved.
* Released under the MIT License.

@@ -5,0 +5,0 @@ */

/*!
* bpui popover v0.1.10
* Copyright (c) 2020 Copyright bpoint.lee@live.com All Rights Reserved.
* bpui popover v0.1.11
* Copyright (c) 2021 Copyright bpoint.lee@live.com All Rights Reserved.
* Released under the MIT License.
*/
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("@bpui/libs"),require("@bpui/dialog")):"function"==typeof define&&define.amd?define(["@bpui/libs","@bpui/dialog"],e):(t=t||self).bpPopover=e(t.bpLibs,t.bpDialog)}(this,(function(t,e){"use strict";t=t&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t,e=e&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e;var o="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function r(t,e){return t(e={exports:{}},e.exports),e.exports}var n=function(t){return t&&t.Math==Math&&t},i=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof o&&o)||Function("return this")(),f=function(t){try{return!!t()}catch(t){return!0}},s=!f((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),c={}.propertyIsEnumerable,u=Object.getOwnPropertyDescriptor,a={f:u&&!c.call({1:2},1)?function(t){var e=u(this,t);return!!e&&e.enumerable}:c},l=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},h={}.toString,p=function(t){return h.call(t).slice(8,-1)},d="".split,g=f((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==p(t)?d.call(t,""):Object(t)}:Object,b=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},v=function(t){return g(b(t))},y=function(t){return"object"==typeof t?null!==t:"function"==typeof t},w=function(t,e){if(!y(t))return t;var o,r;if(e&&"function"==typeof(o=t.toString)&&!y(r=o.call(t)))return r;if("function"==typeof(o=t.valueOf)&&!y(r=o.call(t)))return r;if(!e&&"function"==typeof(o=t.toString)&&!y(r=o.call(t)))return r;throw TypeError("Can't convert object to primitive value")},m={}.hasOwnProperty,_=function(t,e){return m.call(t,e)},O=i.document,T=y(O)&&y(O.createElement),S=!s&&!f((function(){return 7!=Object.defineProperty((t="div",T?O.createElement(t):{}),"a",{get:function(){return 7}}).a;var t})),j=Object.getOwnPropertyDescriptor,A={f:s?j:function(t,e){if(t=v(t),e=w(e,!0),S)try{return j(t,e)}catch(t){}if(_(t,e))return l(!a.f.call(t,e),t[e])}},E=function(t){if(!y(t))throw TypeError(String(t)+" is not an object");return t},P=Object.defineProperty,L={f:s?P:function(t,e,o){if(E(t),e=w(e,!0),E(o),S)try{return P(t,e,o)}catch(t){}if("get"in o||"set"in o)throw TypeError("Accessors not supported");return"value"in o&&(t[e]=o.value),t}},x=s?function(t,e,o){return L.f(t,e,l(1,o))}:function(t,e,o){return t[e]=o,t},k=function(t,e){try{x(i,t,e)}catch(o){i[t]=e}return e},C=i["__core-js_shared__"]||k("__core-js_shared__",{}),I=Function.toString;"function"!=typeof C.inspectSource&&(C.inspectSource=function(t){return I.call(t)});var R,D,M,B,H=C.inspectSource,F=i.WeakMap,N="function"==typeof F&&/native code/.test(H(F)),V=r((function(t){(t.exports=function(t,e){return C[t]||(C[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.6.5",mode:"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})})),W=0,q=Math.random(),z=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++W+q).toString(36)},U=V("keys"),G={},X=i.WeakMap;if(N){var K=new X,Y=K.get,J=K.has,Q=K.set;R=function(t,e){return Q.call(K,t,e),e},D=function(t){return Y.call(K,t)||{}},M=function(t){return J.call(K,t)}}else{var Z=U[B="state"]||(U[B]=z(B));G[Z]=!0,R=function(t,e){return x(t,Z,e),e},D=function(t){return _(t,Z)?t[Z]:{}},M=function(t){return _(t,Z)}}var tt,et,ot={set:R,get:D,has:M,enforce:function(t){return M(t)?D(t):R(t,{})},getterFor:function(t){return function(e){var o;if(!y(e)||(o=D(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return o}}},rt=r((function(t){var e=ot.get,o=ot.enforce,r=String(String).split("String");(t.exports=function(t,e,n,f){var s=!!f&&!!f.unsafe,c=!!f&&!!f.enumerable,u=!!f&&!!f.noTargetGet;"function"==typeof n&&("string"!=typeof e||_(n,"name")||x(n,"name",e),o(n).source=r.join("string"==typeof e?e:"")),t!==i?(s?!u&&t[e]&&(c=!0):delete t[e],c?t[e]=n:x(t,e,n)):c?t[e]=n:k(e,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&e(this).source||H(this)}))})),nt=i,it=function(t){return"function"==typeof t?t:void 0},ft=function(t,e){return arguments.length<2?it(nt[t])||it(i[t]):nt[t]&&nt[t][e]||i[t]&&i[t][e]},st=Math.ceil,ct=Math.floor,ut=function(t){return isNaN(t=+t)?0:(t>0?ct:st)(t)},at=Math.min,lt=function(t){return t>0?at(ut(t),9007199254740991):0},ht=Math.max,pt=Math.min,dt=function(t){return function(e,o,r){var n,i=v(e),f=lt(i.length),s=function(t,e){var o=ut(t);return o<0?ht(o+e,0):pt(o,e)}(r,f);if(t&&o!=o){for(;f>s;)if((n=i[s++])!=n)return!0}else for(;f>s;s++)if((t||s in i)&&i[s]===o)return t||s||0;return!t&&-1}},gt={includes:dt(!0),indexOf:dt(!1)}.indexOf,bt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"].concat("length","prototype"),vt={f:Object.getOwnPropertyNames||function(t){return function(t,e){var o,r=v(t),n=0,i=[];for(o in r)!_(G,o)&&_(r,o)&&i.push(o);for(;e.length>n;)_(r,o=e[n++])&&(~gt(i,o)||i.push(o));return i}(t,bt)}},yt={f:Object.getOwnPropertySymbols},wt=ft("Reflect","ownKeys")||function(t){var e=vt.f(E(t)),o=yt.f;return o?e.concat(o(t)):e},mt=function(t,e){for(var o=wt(e),r=L.f,n=A.f,i=0;i<o.length;i++){var f=o[i];_(t,f)||r(t,f,n(e,f))}},_t=/#|\.prototype\./,Ot=function(t,e){var o=St[Tt(t)];return o==At||o!=jt&&("function"==typeof e?f(e):!!e)},Tt=Ot.normalize=function(t){return String(t).replace(_t,".").toLowerCase()},St=Ot.data={},jt=Ot.NATIVE="N",At=Ot.POLYFILL="P",Et=Ot,Pt=A.f,$t=Array.isArray||function(t){return"Array"==p(t)},Lt=function(t){return Object(b(t))},xt=function(t,e,o){var r=w(e);r in t?L.f(t,r,l(0,o)):t[r]=o},kt=!!Object.getOwnPropertySymbols&&!f((function(){return!String(Symbol())})),Ct=kt&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,It=V("wks"),Rt=i.Symbol,Dt=Ct?Rt:Rt&&Rt.withoutSetter||z,Mt=function(t){return _(It,t)||(kt&&_(Rt,t)?It[t]=Rt[t]:It[t]=Dt("Symbol."+t)),It[t]},Bt=Mt("species"),Ht=function(t,e){var o;return $t(t)&&("function"!=typeof(o=t.constructor)||o!==Array&&!$t(o.prototype)?y(o)&&null===(o=o[Bt])&&(o=void 0):o=void 0),new(void 0===o?Array:o)(0===e?0:e)},Ft=ft("navigator","userAgent")||"",Nt=i.process,Vt=Nt&&Nt.versions,Wt=Vt&&Vt.v8;Wt?et=(tt=Wt.split("."))[0]+tt[1]:Ft&&(!(tt=Ft.match(/Edge\/(\d+)/))||tt[1]>=74)&&(tt=Ft.match(/Chrome\/(\d+)/))&&(et=tt[1]);var qt,zt=et&&+et,Ut=Mt("species"),Gt=Mt("isConcatSpreadable"),Xt=zt>=51||!f((function(){var t=[];return t[Gt]=!1,t.concat()[0]!==t})),Kt=(qt="concat",zt>=51||!f((function(){var t=[];return(t.constructor={})[Ut]=function(){return{foo:1}},1!==t[qt](Boolean).foo}))),Yt=function(t){if(!y(t))return!1;var e=t[Gt];return void 0!==e?!!e:$t(t)};function Jt(t,e,o){return e in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function Qt(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),o.push.apply(o,r)}return o}function Zt(t,e){if(t!==e)throw new TypeError("Cannot instantiate an arrow function")}function te(t,e,o,r,n,i,f,s,c,u){"boolean"!=typeof f&&(c=s,s=f,f=!1);var a,l="function"==typeof o?o.options:o;if(t&&t.render&&(l.render=t.render,l.staticRenderFns=t.staticRenderFns,l._compiled=!0,n&&(l.functional=!0)),r&&(l._scopeId=r),i?(a=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),e&&e.call(this,c(t)),t&&t._registeredComponents&&t._registeredComponents.add(i)},l._ssrRegister=a):e&&(a=f?function(t){e.call(this,u(t,this.$root.$options.shadowRoot))}:function(t){e.call(this,s(t))}),a)if(l.functional){var h=l.render;l.render=function(t,e){return a.call(e),h(t,e)}}else{var p=l.beforeCreate;l.beforeCreate=p?[].concat(p,a):[a]}return o}!function(t,e){var o,r,n,f,s,c=t.target,u=t.global,a=t.stat;if(o=u?i:a?i[c]||k(c,{}):(i[c]||{}).prototype)for(r in e){if(f=e[r],n=t.noTargetGet?(s=Pt(o,r))&&s.value:o[r],!Et(u?r:c+(a?".":"#")+r,t.forced)&&void 0!==n){if(typeof f==typeof n)continue;mt(f,n)}(t.sham||n&&n.sham)&&x(f,"sham",!0),rt(o,r,f,t)}}({target:"Array",proto:!0,forced:!Xt||!Kt},{concat:function(t){var e,o,r,n,i,f=Lt(this),s=Ht(f,0),c=0;for(e=-1,r=arguments.length;e<r;e++)if(Yt(i=-1===e?f:arguments[e])){if(c+(n=lt(i.length))>9007199254740991)throw TypeError("Maximum allowed index exceeded");for(o=0;o<n;o++,c++)o in i&&xt(s,c,i[o])}else{if(c>=9007199254740991)throw TypeError("Maximum allowed index exceeded");xt(s,c++,i)}return s.length=c,s}});var ee={components:{widget:e.bpWidget},props:{visible:Boolean,mask:{default:!1,type:Boolean},maskClose:{default:!0,type:Boolean},pageClass:String|Array,pageStyle:String|Array|Object,direction:{default:"auto",type:String},trigger:{type:String},bind:{}},computed:{pStyle:function(){return this.pageStyle?"string"==typeof this.pageStyle?"left:".concat(this.offsetLeft,";top:").concat(this.offsetTop,";")+this.pageStyle:function(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?Qt(Object(o),!0).forEach((function(e){Jt(t,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):Qt(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}({left:this.offsetLeft,top:this.offsetTop},this.pageStyle):{left:this.offsetLeft,top:this.offsetTop}}},data:function(){return{visibleReal:!1,directionData:"auto",offsetTop:0,offsetLeft:0,offsetArrowLeft:null,offsetArrowTop:null,offsetArrowBottom:null,offsetArrowRight:null}},watch:{visible:function(t,e){this.visibleReal!=t&&(this.visibleReal=t,t!=e&&t&&this._show(this.direction))},visibleReal:function(t){this.$emit("update:visible",t)},bind:function(t,e){this._removeEvent(e),this._bindEvent(t)}},beforeMount:function(){this.visibleReal=this.visible},beforeDestroy:function(){$("body").off("click",this._hide)},mounted:function(){var t=this;this.$nextTick(function(){Zt(this,t),this.$parent.$forceUpdate()}.bind(this))},methods:{show:function(){return this.$refs.widget.show()},hide:function(){return this.$refs.widget.hide()},_removeEvent:function(e){var o;e&&(o=t.dom.isVueObject(e)?e.$el:e,$(o).off("mouseover",this._onTrigger),$(o).off("mouseleave",this._onTriggerHide),$(o).off("click",this._onTrigger))},_bindEvent:function(e){var o;if(this._removeEvent(e),e)if(o=t.dom.isVueObject(e)?e.$el:e,"hover"==this.trigger)t.device.browserIsMobile()?$(o).on("click",this._onTrigger):($(o).on("mouseover",this._onTrigger),$(o).on("mouseleave",this._onTriggerHide));else if("click"==this.trigger){var r=(t.device.browserIsMobile(),"click");$(o).off(r,this._onTrigger).on(r,this._onTrigger)}},_onTrigger:function(t){var e=this;this.visibleReal=!0,setTimeout(function(){Zt(this,e),$("body").off("click",this._hide).on("click",this._hide)}.bind(this),10),this._show(this.direction)},_onTriggerHide:function(t){this.visibleReal=!1,$("body").off("click",this._hide)},_show:function(e){var o=this,r=this.bind;if(this.bind){var n;n=t.dom.isVueObject(r)?r.$el:r;var i=t.dom.getElementOffset(n),f={};f.height=n.clientHeight,f.width=n.clientWidth;var s,c=t.dom.getViewPort(),u=t.dom.getDocumentOffset();this.offsetTop=i.top+u.top,"top"==e?(this.directionData="top",this.offsetTop-=f.height,this.offsetTop-=8):"bottom"==e?(this.directionData="bottom",this.offsetTop+=f.height):"left"==e?(this.directionData="left",this.offsetLeft=i.left+f.width):"right"==e?(this.directionData="right",this.offsetLeft=i.left+f.width):i.top+f.height/2>c.height/2?(this.directionData="top",this.offsetTop-=f.height,this.offsetTop-=8):(this.directionData="bottom",this.offsetTop+=f.height),this.offsetTop=parseInt(this.offsetTop),this.offsetTop+="px",s="left"==e||"right"==e?parseInt(i.top+f.height/2):parseInt(i.left+f.width/2);var a=this.$refs.main;t.dom.probeDom(400,function(){return Zt(this,o),a.clientWidth>0}.bind(this),function(){if(Zt(this,o),"left"==e||"right"==e){var t=parseInt(s-a.clientHeight/2);t<10&&(t=10),t+a.clientHeight>c.height-10&&(t=c.height-10-a.clientHeight),this.offsetTop=parseInt(t+u.top)+"px",this.offsetLeft="right"==e?i.left+f.width-6:i.left-a.clientWidth-6,this.offsetLeft+=u.left,this.offsetLeft=parseInt(this.offsetLeft),this.offsetLeft+="px",this.offsetArrowLeft=null,this.offsetArrowBottom=null,this.offsetArrowTop=parseInt(s-t-6),this.offsetArrowTop<10?this.offsetArrowTop=10:this.offsetArrowTop>a.clientHeight-22&&(this.offsetArrowTop=parseInt(a.clientHeight-22)),this.offsetArrowTop+="px",this.offsetArrowRight=null}else{var r=parseInt(a.clientWidth||50),n=parseInt(s-r/2);n<10&&(n=10),n+r>c.width-10&&(n=c.width-10-r),this.offsetLeft=parseInt(n)+"px",this.offsetArrowLeft=parseInt(s-n)-6,this.offsetArrowLeft<10?this.offsetArrowLeft=10:this.offsetArrowLeft>r-22&&(this.offsetArrowLeft=r-22),this.offsetArrowLeft+="px",this.offsetArrowBottom=null,this.offsetArrowTop=null,this.offsetArrowRight=null}}.bind(this))}},_hide:function(){var t=this;$("body").off("click",this._hide),this.hide().then(function(e){Zt(this,t)}.bind(this))}}},oe=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("widget",{ref:"widget",staticClass:"bp-popover",attrs:{visible:t.visibleReal,maskClose:t.maskClose,mask:t.mask,preventEvent:!1,hideBodyScroll:!1},on:{"update:visible":function(e){t.visibleReal=e}}},[o("div",{ref:"main",staticClass:"bp-popover__main",class:t.pageClass,style:t.pStyle,attrs:{direction:t.directionData}},[t._t("default"),t._v(" "),o("div",{staticClass:"bp-popover__arrow",style:{left:t.offsetArrowLeft,top:t.offsetArrowTop,right:t.offsetArrowRight,bottom:t.offsetArrowBottom}})],2)])};oe._withStripped=!0;return{bpPopover:te({render:oe,staticRenderFns:[]},void 0,ee,void 0,!1,void 0,!1,void 0,void 0,void 0)}}));
{
"description": "popover",
"dependencies": {
"@bpui/dialog": "^0.1.27",
"@bpui/dialog": "^0.1.28",
"@bpui/libs": "^0.2.21"

@@ -38,3 +38,3 @@ },

"name": "@bpui/popover",
"version": "0.1.10"
"version": "0.1.11"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc