@bpui/popover
Advanced tools
Comparing version 0.1.15 to 0.1.16
/*! | ||
* bpui popover v0.1.15 | ||
* bpui popover v0.1.16 | ||
* Copyright (c) 2021 Copyright bpoint.lee@live.com All Rights Reserved. | ||
@@ -14,2 +14,61 @@ * Released under the MIT License. | ||
function ownKeys(object, enumerableOnly) { | ||
var keys = Object.keys(object); | ||
if (Object.getOwnPropertySymbols) { | ||
var symbols = Object.getOwnPropertySymbols(object); | ||
if (enumerableOnly) { | ||
symbols = symbols.filter(function (sym) { | ||
return Object.getOwnPropertyDescriptor(object, sym).enumerable; | ||
}); | ||
} | ||
keys.push.apply(keys, symbols); | ||
} | ||
return keys; | ||
} | ||
function _objectSpread2(target) { | ||
for (var i = 1; i < arguments.length; i++) { | ||
var source = arguments[i] != null ? arguments[i] : {}; | ||
if (i % 2) { | ||
ownKeys(Object(source), true).forEach(function (key) { | ||
_defineProperty(target, key, source[key]); | ||
}); | ||
} else if (Object.getOwnPropertyDescriptors) { | ||
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); | ||
} else { | ||
ownKeys(Object(source)).forEach(function (key) { | ||
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); | ||
}); | ||
} | ||
} | ||
return target; | ||
} | ||
function _defineProperty(obj, key, value) { | ||
if (key in obj) { | ||
Object.defineProperty(obj, key, { | ||
value: value, | ||
enumerable: true, | ||
configurable: true, | ||
writable: true | ||
}); | ||
} else { | ||
obj[key] = value; | ||
} | ||
return obj; | ||
} | ||
function _newArrowCheck(innerThis, boundThis) { | ||
if (innerThis !== boundThis) { | ||
throw new TypeError("Cannot instantiate an arrow function"); | ||
} | ||
} | ||
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; | ||
@@ -27,9 +86,10 @@ | ||
var global_1 = | ||
// eslint-disable-next-line no-undef | ||
// eslint-disable-next-line es/no-global-this -- safe | ||
check(typeof globalThis == 'object' && globalThis) || | ||
check(typeof window == 'object' && window) || | ||
// eslint-disable-next-line no-restricted-globals -- safe | ||
check(typeof self == 'object' && self) || | ||
check(typeof commonjsGlobal == 'object' && commonjsGlobal) || | ||
// eslint-disable-next-line no-new-func | ||
Function('return this')(); | ||
// eslint-disable-next-line no-new-func -- fallback | ||
(function () { return this; })() || Function('return this')(); | ||
@@ -44,19 +104,21 @@ var fails = function (exec) { | ||
// Thank's IE8 for his funny defineProperty | ||
// Detect IE8's incomplete defineProperty implementation | ||
var descriptors = !fails(function () { | ||
// eslint-disable-next-line es/no-object-defineproperty -- required for testing | ||
return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7; | ||
}); | ||
var nativePropertyIsEnumerable = {}.propertyIsEnumerable; | ||
var $propertyIsEnumerable = {}.propertyIsEnumerable; | ||
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe | ||
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; | ||
// Nashorn ~ JDK8 bug | ||
var NASHORN_BUG = getOwnPropertyDescriptor && !nativePropertyIsEnumerable.call({ 1: 2 }, 1); | ||
var NASHORN_BUG = getOwnPropertyDescriptor && !$propertyIsEnumerable.call({ 1: 2 }, 1); | ||
// `Object.prototype.propertyIsEnumerable` method implementation | ||
// https://tc39.github.io/ecma262/#sec-object.prototype.propertyisenumerable | ||
// https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable | ||
var f = NASHORN_BUG ? function propertyIsEnumerable(V) { | ||
var descriptor = getOwnPropertyDescriptor(this, V); | ||
return !!descriptor && descriptor.enumerable; | ||
} : nativePropertyIsEnumerable; | ||
} : $propertyIsEnumerable; | ||
@@ -87,3 +149,3 @@ var objectPropertyIsEnumerable = { | ||
// throws an error in rhino, see https://github.com/mozilla/rhino/issues/346 | ||
// eslint-disable-next-line no-prototype-builtins | ||
// eslint-disable-next-line no-prototype-builtins -- safe | ||
return !Object('z').propertyIsEnumerable(0); | ||
@@ -95,3 +157,3 @@ }) ? function (it) { | ||
// `RequireObjectCoercible` abstract operation | ||
// https://tc39.github.io/ecma262/#sec-requireobjectcoercible | ||
// https://tc39.es/ecma262/#sec-requireobjectcoercible | ||
var requireObjectCoercible = function (it) { | ||
@@ -115,3 +177,3 @@ if (it == undefined) throw TypeError("Can't call method on " + it); | ||
// `ToPrimitive` abstract operation | ||
// https://tc39.github.io/ecma262/#sec-toprimitive | ||
// https://tc39.es/ecma262/#sec-toprimitive | ||
// instead of the ES6 spec version, we didn't implement @@toPrimitive case | ||
@@ -128,6 +190,12 @@ // and the second argument - flag - preferred type is a string | ||
// `ToObject` abstract operation | ||
// https://tc39.es/ecma262/#sec-toobject | ||
var toObject = function (argument) { | ||
return Object(requireObjectCoercible(argument)); | ||
}; | ||
var hasOwnProperty = {}.hasOwnProperty; | ||
var has = function (it, key) { | ||
return hasOwnProperty.call(it, key); | ||
var has = Object.hasOwn || function hasOwn(it, key) { | ||
return hasOwnProperty.call(toObject(it), key); | ||
}; | ||
@@ -145,2 +213,3 @@ | ||
var ie8DomDefine = !descriptors && !fails(function () { | ||
// eslint-disable-next-line es/no-object-defineproperty -- requied for testing | ||
return Object.defineProperty(documentCreateElement('div'), 'a', { | ||
@@ -151,11 +220,12 @@ get: function () { return 7; } | ||
var nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; | ||
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe | ||
var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; | ||
// `Object.getOwnPropertyDescriptor` method | ||
// https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptor | ||
var f$1 = descriptors ? nativeGetOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) { | ||
// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor | ||
var f$1 = descriptors ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) { | ||
O = toIndexedObject(O); | ||
P = toPrimitive(P, true); | ||
if (ie8DomDefine) try { | ||
return nativeGetOwnPropertyDescriptor(O, P); | ||
return $getOwnPropertyDescriptor(O, P); | ||
} catch (error) { /* empty */ } | ||
@@ -175,7 +245,8 @@ if (has(O, P)) return createPropertyDescriptor(!objectPropertyIsEnumerable.f.call(O, P), O[P]); | ||
var nativeDefineProperty = Object.defineProperty; | ||
// eslint-disable-next-line es/no-object-defineproperty -- safe | ||
var $defineProperty = Object.defineProperty; | ||
// `Object.defineProperty` method | ||
// https://tc39.github.io/ecma262/#sec-object.defineproperty | ||
var f$2 = descriptors ? nativeDefineProperty : function defineProperty(O, P, Attributes) { | ||
// https://tc39.es/ecma262/#sec-object.defineproperty | ||
var f$2 = descriptors ? $defineProperty : function defineProperty(O, P, Attributes) { | ||
anObject(O); | ||
@@ -185,3 +256,3 @@ P = toPrimitive(P, true); | ||
if (ie8DomDefine) try { | ||
return nativeDefineProperty(O, P, Attributes); | ||
return $defineProperty(O, P, Attributes); | ||
} catch (error) { /* empty */ } | ||
@@ -219,3 +290,3 @@ if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported'); | ||
// this helper broken in `3.4.1-3.4.4`, so we can't use `shared` helper | ||
// this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper | ||
if (typeof sharedStore.inspectSource != 'function') { | ||
@@ -237,5 +308,5 @@ sharedStore.inspectSource = function (it) { | ||
})('versions', []).push({ | ||
version: '3.6.5', | ||
version: '3.15.2', | ||
mode: 'global', | ||
copyright: '© 2020 Denis Pushkarev (zloirock.ru)' | ||
copyright: '© 2021 Denis Pushkarev (zloirock.ru)' | ||
}); | ||
@@ -259,2 +330,3 @@ }); | ||
var OBJECT_ALREADY_INITIALIZED = 'Object already initialized'; | ||
var WeakMap$1 = global_1.WeakMap; | ||
@@ -276,4 +348,4 @@ var set, get, has$1; | ||
if (nativeWeakMap) { | ||
var store$1 = new WeakMap$1(); | ||
if (nativeWeakMap || sharedStore.state) { | ||
var store$1 = sharedStore.state || (sharedStore.state = new WeakMap$1()); | ||
var wmget = store$1.get; | ||
@@ -283,2 +355,4 @@ var wmhas = store$1.has; | ||
set = function (it, metadata) { | ||
if (wmhas.call(store$1, it)) throw new TypeError(OBJECT_ALREADY_INITIALIZED); | ||
metadata.facade = it; | ||
wmset.call(store$1, it, metadata); | ||
@@ -297,2 +371,4 @@ return metadata; | ||
set = function (it, metadata) { | ||
if (has(it, STATE)) throw new TypeError(OBJECT_ALREADY_INITIALIZED); | ||
metadata.facade = it; | ||
createNonEnumerableProperty(it, STATE, metadata); | ||
@@ -326,5 +402,11 @@ return metadata; | ||
var noTargetGet = options ? !!options.noTargetGet : false; | ||
var state; | ||
if (typeof value == 'function') { | ||
if (typeof key == 'string' && !has(value, 'name')) createNonEnumerableProperty(value, 'name', key); | ||
enforceInternalState(value).source = TEMPLATE.join(typeof key == 'string' ? key : ''); | ||
if (typeof key == 'string' && !has(value, 'name')) { | ||
createNonEnumerableProperty(value, 'name', key); | ||
} | ||
state = enforceInternalState(value); | ||
if (!state.source) { | ||
state.source = TEMPLATE.join(typeof key == 'string' ? key : ''); | ||
} | ||
} | ||
@@ -363,3 +445,3 @@ if (O === global_1) { | ||
// `ToInteger` abstract operation | ||
// https://tc39.github.io/ecma262/#sec-tointeger | ||
// https://tc39.es/ecma262/#sec-tointeger | ||
var toInteger = function (argument) { | ||
@@ -372,3 +454,3 @@ return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument); | ||
// `ToLength` abstract operation | ||
// https://tc39.github.io/ecma262/#sec-tolength | ||
// https://tc39.es/ecma262/#sec-tolength | ||
var toLength = function (argument) { | ||
@@ -397,6 +479,6 @@ return argument > 0 ? min(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991 | ||
// Array#includes uses SameValueZero equality algorithm | ||
// eslint-disable-next-line no-self-compare | ||
// eslint-disable-next-line no-self-compare -- NaN check | ||
if (IS_INCLUDES && el != el) while (length > index) { | ||
value = O[index++]; | ||
// eslint-disable-next-line no-self-compare | ||
// eslint-disable-next-line no-self-compare -- NaN check | ||
if (value != value) return true; | ||
@@ -412,6 +494,6 @@ // Array#indexOf ignores holes, Array#includes - not | ||
// `Array.prototype.includes` method | ||
// https://tc39.github.io/ecma262/#sec-array.prototype.includes | ||
// https://tc39.es/ecma262/#sec-array.prototype.includes | ||
includes: createMethod(true), | ||
// `Array.prototype.indexOf` method | ||
// https://tc39.github.io/ecma262/#sec-array.prototype.indexof | ||
// https://tc39.es/ecma262/#sec-array.prototype.indexof | ||
indexOf: createMethod(false) | ||
@@ -450,3 +532,4 @@ }; | ||
// `Object.getOwnPropertyNames` method | ||
// https://tc39.github.io/ecma262/#sec-object.getownpropertynames | ||
// https://tc39.es/ecma262/#sec-object.getownpropertynames | ||
// eslint-disable-next-line es/no-object-getownpropertynames -- safe | ||
var f$3 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { | ||
@@ -460,2 +543,3 @@ return objectKeysInternal(O, hiddenKeys$1); | ||
// eslint-disable-next-line es/no-object-getownpropertysymbols -- safe | ||
var f$4 = Object.getOwnPropertySymbols; | ||
@@ -468,3 +552,3 @@ | ||
// all object keys, includes non-enumerable and symbols | ||
var ownKeys = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) { | ||
var ownKeys$1 = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) { | ||
var keys = objectGetOwnPropertyNames.f(anObject(it)); | ||
@@ -476,3 +560,3 @@ var getOwnPropertySymbols = objectGetOwnPropertySymbols.f; | ||
var copyConstructorProperties = function (target, source) { | ||
var keys = ownKeys(source); | ||
var keys = ownKeys$1(source); | ||
var defineProperty = objectDefineProperty.f; | ||
@@ -561,3 +645,4 @@ var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f; | ||
// `IsArray` abstract operation | ||
// https://tc39.github.io/ecma262/#sec-isarray | ||
// https://tc39.es/ecma262/#sec-isarray | ||
// eslint-disable-next-line es/no-array-isarray -- safe | ||
var isArray = Array.isArray || function isArray(arg) { | ||
@@ -567,8 +652,2 @@ return classofRaw(arg) == 'Array'; | ||
// `ToObject` abstract operation | ||
// https://tc39.github.io/ecma262/#sec-toobject | ||
var toObject = function (argument) { | ||
return Object(requireObjectCoercible(argument)); | ||
}; | ||
var createProperty = function (object, key, value) { | ||
@@ -580,12 +659,41 @@ var propertyKey = toPrimitive(key); | ||
var engineUserAgent = getBuiltIn('navigator', 'userAgent') || ''; | ||
var process = global_1.process; | ||
var versions = process && process.versions; | ||
var v8 = versions && versions.v8; | ||
var match, version; | ||
if (v8) { | ||
match = v8.split('.'); | ||
version = match[0] < 4 ? 1 : match[0] + match[1]; | ||
} else if (engineUserAgent) { | ||
match = engineUserAgent.match(/Edge\/(\d+)/); | ||
if (!match || match[1] >= 74) { | ||
match = engineUserAgent.match(/Chrome\/(\d+)/); | ||
if (match) version = match[1]; | ||
} | ||
} | ||
var engineV8Version = version && +version; | ||
/* eslint-disable es/no-symbol -- required for testing */ | ||
// eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing | ||
var nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () { | ||
var symbol = Symbol(); | ||
// Chrome 38 Symbol has incorrect toString conversion | ||
// eslint-disable-next-line no-undef | ||
return !String(Symbol()); | ||
// `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances | ||
return !String(symbol) || !(Object(symbol) instanceof Symbol) || | ||
// Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances | ||
!Symbol.sham && engineV8Version && engineV8Version < 41; | ||
}); | ||
/* eslint-disable es/no-symbol -- required for testing */ | ||
var useSymbolAsUid = nativeSymbol | ||
// eslint-disable-next-line no-undef | ||
&& !Symbol.sham | ||
// eslint-disable-next-line no-undef | ||
&& typeof Symbol.iterator == 'symbol'; | ||
@@ -598,5 +706,8 @@ | ||
var wellKnownSymbol = function (name) { | ||
if (!has(WellKnownSymbolsStore, name)) { | ||
if (nativeSymbol && has(Symbol$1, name)) WellKnownSymbolsStore[name] = Symbol$1[name]; | ||
else WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name); | ||
if (!has(WellKnownSymbolsStore, name) || !(nativeSymbol || typeof WellKnownSymbolsStore[name] == 'string')) { | ||
if (nativeSymbol && has(Symbol$1, name)) { | ||
WellKnownSymbolsStore[name] = Symbol$1[name]; | ||
} else { | ||
WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name); | ||
} | ||
} return WellKnownSymbolsStore[name]; | ||
@@ -608,3 +719,3 @@ }; | ||
// `ArraySpeciesCreate` abstract operation | ||
// https://tc39.github.io/ecma262/#sec-arrayspeciescreate | ||
// https://tc39.es/ecma262/#sec-arrayspeciescreate | ||
var arraySpeciesCreate = function (originalArray, length) { | ||
@@ -623,22 +734,2 @@ var C; | ||
var engineUserAgent = getBuiltIn('navigator', 'userAgent') || ''; | ||
var process = global_1.process; | ||
var versions = process && process.versions; | ||
var v8 = versions && versions.v8; | ||
var match, version; | ||
if (v8) { | ||
match = v8.split('.'); | ||
version = match[0] + match[1]; | ||
} else if (engineUserAgent) { | ||
match = engineUserAgent.match(/Edge\/(\d+)/); | ||
if (!match || match[1] >= 74) { | ||
match = engineUserAgent.match(/Chrome\/(\d+)/); | ||
if (match) version = match[1]; | ||
} | ||
} | ||
var engineV8Version = version && +version; | ||
var SPECIES$1 = wellKnownSymbol('species'); | ||
@@ -684,6 +775,7 @@ | ||
// `Array.prototype.concat` method | ||
// https://tc39.github.io/ecma262/#sec-array.prototype.concat | ||
// https://tc39.es/ecma262/#sec-array.prototype.concat | ||
// with adding support of @@isConcatSpreadable and @@species | ||
_export({ target: 'Array', proto: true, forced: FORCED }, { | ||
concat: function concat(arg) { // eslint-disable-line no-unused-vars | ||
// eslint-disable-next-line no-unused-vars -- required for `.length` | ||
concat: function concat(arg) { | ||
var O = toObject(this); | ||
@@ -709,57 +801,2 @@ var A = arraySpeciesCreate(O, 0); | ||
function _defineProperty(obj, key, value) { | ||
if (key in obj) { | ||
Object.defineProperty(obj, key, { | ||
value: value, | ||
enumerable: true, | ||
configurable: true, | ||
writable: true | ||
}); | ||
} else { | ||
obj[key] = value; | ||
} | ||
return obj; | ||
} | ||
function ownKeys$1(object, enumerableOnly) { | ||
var keys = Object.keys(object); | ||
if (Object.getOwnPropertySymbols) { | ||
var symbols = Object.getOwnPropertySymbols(object); | ||
if (enumerableOnly) symbols = symbols.filter(function (sym) { | ||
return Object.getOwnPropertyDescriptor(object, sym).enumerable; | ||
}); | ||
keys.push.apply(keys, symbols); | ||
} | ||
return keys; | ||
} | ||
function _objectSpread2(target) { | ||
for (var i = 1; i < arguments.length; i++) { | ||
var source = arguments[i] != null ? arguments[i] : {}; | ||
if (i % 2) { | ||
ownKeys$1(Object(source), true).forEach(function (key) { | ||
_defineProperty(target, key, source[key]); | ||
}); | ||
} else if (Object.getOwnPropertyDescriptors) { | ||
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); | ||
} else { | ||
ownKeys$1(Object(source)).forEach(function (key) { | ||
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); | ||
}); | ||
} | ||
} | ||
return target; | ||
} | ||
function _newArrowCheck(innerThis, boundThis) { | ||
if (innerThis !== boundThis) { | ||
throw new TypeError("Cannot instantiate an arrow function"); | ||
} | ||
} | ||
var script = { | ||
@@ -766,0 +803,0 @@ components: { |
/*! | ||
* bpui popover v0.1.15 | ||
* bpui popover v0.1.16 | ||
* 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]})),a={}.propertyIsEnumerable,u=Object.getOwnPropertyDescriptor,l={f:u&&!a.call({1:2},1)?function(t){var e=u(this,t);return!!e&&e.enumerable}:a},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,a=!!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?!a&&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,at=Math.floor,ut=function(t){return isNaN(t=+t)?0:(t>0?at:ct)(t)},lt=Math.min,ht=function(t){return t>0?lt(ut(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=ut(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,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,i,s,c=t.target,a=t.global,u=t.stat;if(r=a?f:u?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(a?o:c+(u?".":"#")+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(),a=e.dom.getDocumentOffset();this.offsetTop=i.top+a.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 u=this.$refs.main;e.dom.probeDom(400,function(){return te(this,r),u.clientWidth>0}.bind(this),function(){if(te(this,r),"left"==t||"right"==t){var e=parseInt(s-u.clientHeight/2);e<10&&(e=10),e+u.clientHeight>c.height-10&&(e=c.height-10-u.clientHeight),this.offsetTop=parseInt(e+a.top)+"px",this.offsetLeft="right"==t?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-e-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){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,appendToBody:!0},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; | ||
"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"));function o(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 n(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function i(t,e){if(t!==e)throw new TypeError("Cannot instantiate an arrow function")}var f="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function s(t,e){return t(e={exports:{}},e.exports),e.exports}var c=function(t){return t&&t.Math==Math&&t},a=c("object"==typeof globalThis&&globalThis)||c("object"==typeof window&&window)||c("object"==typeof self&&self)||c("object"==typeof f&&f)||function(){return this}()||Function("return this")(),u=function(t){try{return!!t()}catch(t){return!0}},l=!u((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),h={}.propertyIsEnumerable,p=Object.getOwnPropertyDescriptor,d={f:p&&!h.call({1:2},1)?function(t){var e=p(this,t);return!!e&&e.enumerable}:h},g=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},v={}.toString,b=function(t){return v.call(t).slice(8,-1)},y="".split,w=u((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==b(t)?y.call(t,""):Object(t)}:Object,m=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},_=function(t){return w(m(t))},T=function(t){return"object"==typeof t?null!==t:"function"==typeof t},O=function(t,e){if(!T(t))return t;var r,o;if(e&&"function"==typeof(r=t.toString)&&!T(o=r.call(t)))return o;if("function"==typeof(r=t.valueOf)&&!T(o=r.call(t)))return o;if(!e&&"function"==typeof(r=t.toString)&&!T(o=r.call(t)))return o;throw TypeError("Can't convert object to primitive value")},S=function(t){return Object(m(t))},j={}.hasOwnProperty,A=Object.hasOwn||function(t,e){return j.call(S(t),e)},E=a.document,L=T(E)&&T(E.createElement),P=!l&&!u((function(){return 7!=Object.defineProperty((t="div",L?E.createElement(t):{}),"a",{get:function(){return 7}}).a;var t})),x=Object.getOwnPropertyDescriptor,k={f:l?x:function(t,e){if(t=_(t),e=O(e,!0),P)try{return x(t,e)}catch(t){}if(A(t,e))return g(!d.f.call(t,e),t[e])}},C=function(t){if(!T(t))throw TypeError(String(t)+" is not an object");return t},I=Object.defineProperty,R={f:l?I:function(t,e,r){if(C(t),e=O(e,!0),C(r),P)try{return I(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}},D=l?function(t,e,r){return R.f(t,e,g(1,r))}:function(t,e,r){return t[e]=r,t},M=function(t,e){try{D(a,t,e)}catch(r){a[t]=e}return e},B=a["__core-js_shared__"]||M("__core-js_shared__",{}),H=Function.toString;"function"!=typeof B.inspectSource&&(B.inspectSource=function(t){return H.call(t)});var F,N,V,W,z=B.inspectSource,q=a.WeakMap,U="function"==typeof q&&/native code/.test(z(q)),G=s((function(t){(t.exports=function(t,e){return B[t]||(B[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.15.2",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})})),X=0,K=Math.random(),Y=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++X+K).toString(36)},J=G("keys"),Q={},Z=a.WeakMap;if(U||B.state){var tt=B.state||(B.state=new Z),et=tt.get,rt=tt.has,ot=tt.set;F=function(t,e){if(rt.call(tt,t))throw new TypeError("Object already initialized");return e.facade=t,ot.call(tt,t,e),e},N=function(t){return et.call(tt,t)||{}},V=function(t){return rt.call(tt,t)}}else{var nt=J[W="state"]||(J[W]=Y(W));Q[nt]=!0,F=function(t,e){if(A(t,nt))throw new TypeError("Object already initialized");return e.facade=t,D(t,nt,e),e},N=function(t){return A(t,nt)?t[nt]:{}},V=function(t){return A(t,nt)}}var it,ft,st={set:F,get:N,has:V,enforce:function(t){return V(t)?N(t):F(t,{})},getterFor:function(t){return function(e){var r;if(!T(e)||(r=N(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return r}}},ct=s((function(t){var e=st.get,r=st.enforce,o=String(String).split("String");(t.exports=function(t,e,n,i){var f,s=!!i&&!!i.unsafe,c=!!i&&!!i.enumerable,u=!!i&&!!i.noTargetGet;"function"==typeof n&&("string"!=typeof e||A(n,"name")||D(n,"name",e),(f=r(n)).source||(f.source=o.join("string"==typeof e?e:""))),t!==a?(s?!u&&t[e]&&(c=!0):delete t[e],c?t[e]=n:D(t,e,n)):c?t[e]=n:M(e,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&e(this).source||z(this)}))})),at=a,ut=function(t){return"function"==typeof t?t:void 0},lt=function(t,e){return arguments.length<2?ut(at[t])||ut(a[t]):at[t]&&at[t][e]||a[t]&&a[t][e]},ht=Math.ceil,pt=Math.floor,dt=function(t){return isNaN(t=+t)?0:(t>0?pt:ht)(t)},gt=Math.min,vt=function(t){return t>0?gt(dt(t),9007199254740991):0},bt=Math.max,yt=Math.min,wt=function(t){return function(e,r,o){var n,i=_(e),f=vt(i.length),s=function(t,e){var r=dt(t);return r<0?bt(r+e,0):yt(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}},mt={includes:wt(!0),indexOf:wt(!1)}.indexOf,_t=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"].concat("length","prototype"),Tt={f:Object.getOwnPropertyNames||function(t){return function(t,e){var r,o=_(t),n=0,i=[];for(r in o)!A(Q,r)&&A(o,r)&&i.push(r);for(;e.length>n;)A(o,r=e[n++])&&(~mt(i,r)||i.push(r));return i}(t,_t)}},Ot={f:Object.getOwnPropertySymbols},St=lt("Reflect","ownKeys")||function(t){var e=Tt.f(C(t)),r=Ot.f;return r?e.concat(r(t)):e},jt=function(t,e){for(var r=St(e),o=R.f,n=k.f,i=0;i<r.length;i++){var f=r[i];A(t,f)||o(t,f,n(e,f))}},At=/#|\.prototype\./,Et=function(t,e){var r=Lt[$t(t)];return r==xt||r!=Pt&&("function"==typeof e?u(e):!!e)},$t=Et.normalize=function(t){return String(t).replace(At,".").toLowerCase()},Lt=Et.data={},Pt=Et.NATIVE="N",xt=Et.POLYFILL="P",kt=Et,Ct=k.f,It=Array.isArray||function(t){return"Array"==b(t)},Rt=function(t,e,r){var o=O(e);o in t?R.f(t,o,g(0,r)):t[o]=r},Dt=lt("navigator","userAgent")||"",Mt=a.process,Bt=Mt&&Mt.versions,Ht=Bt&&Bt.v8;Ht?ft=(it=Ht.split("."))[0]<4?1:it[0]+it[1]:Dt&&(!(it=Dt.match(/Edge\/(\d+)/))||it[1]>=74)&&(it=Dt.match(/Chrome\/(\d+)/))&&(ft=it[1]);var Ft,Nt=ft&&+ft,Vt=!!Object.getOwnPropertySymbols&&!u((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&Nt&&Nt<41})),Wt=Vt&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,zt=G("wks"),qt=a.Symbol,Ut=Wt?qt:qt&&qt.withoutSetter||Y,Gt=function(t){return A(zt,t)&&(Vt||"string"==typeof zt[t])||(Vt&&A(qt,t)?zt[t]=qt[t]:zt[t]=Ut("Symbol."+t)),zt[t]},Xt=Gt("species"),Kt=function(t,e){var r;return It(t)&&("function"!=typeof(r=t.constructor)||r!==Array&&!It(r.prototype)?T(r)&&null===(r=r[Xt])&&(r=void 0):r=void 0),new(void 0===r?Array:r)(0===e?0:e)},Yt=Gt("species"),Jt=Gt("isConcatSpreadable"),Qt=Nt>=51||!u((function(){var t=[];return t[Jt]=!1,t.concat()[0]!==t})),Zt=(Ft="concat",Nt>=51||!u((function(){var t=[];return(t.constructor={})[Yt]=function(){return{foo:1}},1!==t[Ft](Boolean).foo}))),te=function(t){if(!T(t))return!1;var e=t[Jt];return void 0!==e?!!e:It(t)};function ee(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,i,f,s=t.target,c=t.global,u=t.stat;if(r=c?a:u?a[s]||M(s,{}):(a[s]||{}).prototype)for(o in e){if(i=e[o],n=t.noTargetGet?(f=Ct(r,o))&&f.value:r[o],!kt(c?o:s+(u?".":"#")+o,t.forced)&&void 0!==n){if(typeof i==typeof n)continue;jt(i,n)}(t.sham||n&&n.sham)&&D(i,"sham",!0),ct(r,o,i,t)}}({target:"Array",proto:!0,forced:!Qt||!Zt},{concat:function(t){var e,r,o,n,i,f=S(this),s=Kt(f,0),c=0;for(e=-1,o=arguments.length;e<o;e++)if(te(i=-1===e?f:arguments[e])){if(c+(n=vt(i.length))>9007199254740991)throw TypeError("Maximum allowed index exceeded");for(r=0;r<n;r++,c++)r in i&&Rt(s,c,i[r])}else{if(c>=9007199254740991)throw TypeError("Maximum allowed index exceeded");Rt(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?o(Object(r),!0).forEach((function(e){n(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):o(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(){i(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(){i(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 f=e.dom.getElementOffset(n),s={};s.height=n.clientHeight,s.width=n.clientWidth;var c,a=e.dom.getViewPort(),u=e.dom.getDocumentOffset();this.offsetTop=f.top+u.top,"top"==t?(this.directionData="top",this.offsetTop-=s.height,this.offsetTop-=8):"bottom"==t?(this.directionData="bottom",this.offsetTop+=s.height):"left"==t?(this.directionData="left",this.offsetLeft=f.left+s.width):"right"==t?(this.directionData="right",this.offsetLeft=f.left+s.width):f.top+s.height/2>a.height/2?(this.directionData="top",this.offsetTop-=s.height,this.offsetTop-=8):(this.directionData="bottom",this.offsetTop+=s.height),this.offsetTop=parseInt(this.offsetTop),this.offsetTop+="px",c="left"==t||"right"==t?parseInt(f.top+s.height/2):parseInt(f.left+s.width/2);var l=this.$refs.main;e.dom.probeDom(400,function(){return i(this,r),l.clientWidth>0}.bind(this),function(){if(i(this,r),"left"==t||"right"==t){var e=parseInt(c-l.clientHeight/2);e<10&&(e=10),e+l.clientHeight>a.height-10&&(e=a.height-10-l.clientHeight),this.offsetTop=parseInt(e+u.top)+"px",this.offsetLeft="right"==t?f.left+s.width-6:f.left-l.clientWidth-6,this.offsetLeft+=u.left,this.offsetLeft=parseInt(this.offsetLeft),this.offsetLeft+="px",this.offsetArrowLeft=null,this.offsetArrowBottom=null,this.offsetArrowTop=parseInt(c-e-6),this.offsetArrowTop<10?this.offsetArrowTop=10:this.offsetArrowTop>l.clientHeight-22&&(this.offsetArrowTop=parseInt(l.clientHeight-22)),this.offsetArrowTop+="px",this.offsetArrowRight=null}else{var o=parseInt(l.clientWidth||50),n=parseInt(c-o/2);n<10&&(n=10),n+o>a.width-10&&(n=a.width-10-o),this.offsetLeft=parseInt(n)+"px",this.offsetArrowLeft=parseInt(c-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){i(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,appendToBody:!0},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.15 | ||
* bpui popover v0.1.16 | ||
* Copyright (c) 2021 Copyright bpoint.lee@live.com All Rights Reserved. | ||
@@ -10,2 +10,61 @@ * Released under the MIT License. | ||
function ownKeys(object, enumerableOnly) { | ||
var keys = Object.keys(object); | ||
if (Object.getOwnPropertySymbols) { | ||
var symbols = Object.getOwnPropertySymbols(object); | ||
if (enumerableOnly) { | ||
symbols = symbols.filter(function (sym) { | ||
return Object.getOwnPropertyDescriptor(object, sym).enumerable; | ||
}); | ||
} | ||
keys.push.apply(keys, symbols); | ||
} | ||
return keys; | ||
} | ||
function _objectSpread2(target) { | ||
for (var i = 1; i < arguments.length; i++) { | ||
var source = arguments[i] != null ? arguments[i] : {}; | ||
if (i % 2) { | ||
ownKeys(Object(source), true).forEach(function (key) { | ||
_defineProperty(target, key, source[key]); | ||
}); | ||
} else if (Object.getOwnPropertyDescriptors) { | ||
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); | ||
} else { | ||
ownKeys(Object(source)).forEach(function (key) { | ||
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); | ||
}); | ||
} | ||
} | ||
return target; | ||
} | ||
function _defineProperty(obj, key, value) { | ||
if (key in obj) { | ||
Object.defineProperty(obj, key, { | ||
value: value, | ||
enumerable: true, | ||
configurable: true, | ||
writable: true | ||
}); | ||
} else { | ||
obj[key] = value; | ||
} | ||
return obj; | ||
} | ||
function _newArrowCheck(innerThis, boundThis) { | ||
if (innerThis !== boundThis) { | ||
throw new TypeError("Cannot instantiate an arrow function"); | ||
} | ||
} | ||
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; | ||
@@ -23,9 +82,10 @@ | ||
var global_1 = | ||
// eslint-disable-next-line no-undef | ||
// eslint-disable-next-line es/no-global-this -- safe | ||
check(typeof globalThis == 'object' && globalThis) || | ||
check(typeof window == 'object' && window) || | ||
// eslint-disable-next-line no-restricted-globals -- safe | ||
check(typeof self == 'object' && self) || | ||
check(typeof commonjsGlobal == 'object' && commonjsGlobal) || | ||
// eslint-disable-next-line no-new-func | ||
Function('return this')(); | ||
// eslint-disable-next-line no-new-func -- fallback | ||
(function () { return this; })() || Function('return this')(); | ||
@@ -40,19 +100,21 @@ var fails = function (exec) { | ||
// Thank's IE8 for his funny defineProperty | ||
// Detect IE8's incomplete defineProperty implementation | ||
var descriptors = !fails(function () { | ||
// eslint-disable-next-line es/no-object-defineproperty -- required for testing | ||
return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7; | ||
}); | ||
var nativePropertyIsEnumerable = {}.propertyIsEnumerable; | ||
var $propertyIsEnumerable = {}.propertyIsEnumerable; | ||
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe | ||
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; | ||
// Nashorn ~ JDK8 bug | ||
var NASHORN_BUG = getOwnPropertyDescriptor && !nativePropertyIsEnumerable.call({ 1: 2 }, 1); | ||
var NASHORN_BUG = getOwnPropertyDescriptor && !$propertyIsEnumerable.call({ 1: 2 }, 1); | ||
// `Object.prototype.propertyIsEnumerable` method implementation | ||
// https://tc39.github.io/ecma262/#sec-object.prototype.propertyisenumerable | ||
// https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable | ||
var f = NASHORN_BUG ? function propertyIsEnumerable(V) { | ||
var descriptor = getOwnPropertyDescriptor(this, V); | ||
return !!descriptor && descriptor.enumerable; | ||
} : nativePropertyIsEnumerable; | ||
} : $propertyIsEnumerable; | ||
@@ -83,3 +145,3 @@ var objectPropertyIsEnumerable = { | ||
// throws an error in rhino, see https://github.com/mozilla/rhino/issues/346 | ||
// eslint-disable-next-line no-prototype-builtins | ||
// eslint-disable-next-line no-prototype-builtins -- safe | ||
return !Object('z').propertyIsEnumerable(0); | ||
@@ -91,3 +153,3 @@ }) ? function (it) { | ||
// `RequireObjectCoercible` abstract operation | ||
// https://tc39.github.io/ecma262/#sec-requireobjectcoercible | ||
// https://tc39.es/ecma262/#sec-requireobjectcoercible | ||
var requireObjectCoercible = function (it) { | ||
@@ -111,3 +173,3 @@ if (it == undefined) throw TypeError("Can't call method on " + it); | ||
// `ToPrimitive` abstract operation | ||
// https://tc39.github.io/ecma262/#sec-toprimitive | ||
// https://tc39.es/ecma262/#sec-toprimitive | ||
// instead of the ES6 spec version, we didn't implement @@toPrimitive case | ||
@@ -124,6 +186,12 @@ // and the second argument - flag - preferred type is a string | ||
// `ToObject` abstract operation | ||
// https://tc39.es/ecma262/#sec-toobject | ||
var toObject = function (argument) { | ||
return Object(requireObjectCoercible(argument)); | ||
}; | ||
var hasOwnProperty = {}.hasOwnProperty; | ||
var has = function (it, key) { | ||
return hasOwnProperty.call(it, key); | ||
var has = Object.hasOwn || function hasOwn(it, key) { | ||
return hasOwnProperty.call(toObject(it), key); | ||
}; | ||
@@ -141,2 +209,3 @@ | ||
var ie8DomDefine = !descriptors && !fails(function () { | ||
// eslint-disable-next-line es/no-object-defineproperty -- requied for testing | ||
return Object.defineProperty(documentCreateElement('div'), 'a', { | ||
@@ -147,11 +216,12 @@ get: function () { return 7; } | ||
var nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; | ||
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe | ||
var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; | ||
// `Object.getOwnPropertyDescriptor` method | ||
// https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptor | ||
var f$1 = descriptors ? nativeGetOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) { | ||
// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor | ||
var f$1 = descriptors ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) { | ||
O = toIndexedObject(O); | ||
P = toPrimitive(P, true); | ||
if (ie8DomDefine) try { | ||
return nativeGetOwnPropertyDescriptor(O, P); | ||
return $getOwnPropertyDescriptor(O, P); | ||
} catch (error) { /* empty */ } | ||
@@ -171,7 +241,8 @@ if (has(O, P)) return createPropertyDescriptor(!objectPropertyIsEnumerable.f.call(O, P), O[P]); | ||
var nativeDefineProperty = Object.defineProperty; | ||
// eslint-disable-next-line es/no-object-defineproperty -- safe | ||
var $defineProperty = Object.defineProperty; | ||
// `Object.defineProperty` method | ||
// https://tc39.github.io/ecma262/#sec-object.defineproperty | ||
var f$2 = descriptors ? nativeDefineProperty : function defineProperty(O, P, Attributes) { | ||
// https://tc39.es/ecma262/#sec-object.defineproperty | ||
var f$2 = descriptors ? $defineProperty : function defineProperty(O, P, Attributes) { | ||
anObject(O); | ||
@@ -181,3 +252,3 @@ P = toPrimitive(P, true); | ||
if (ie8DomDefine) try { | ||
return nativeDefineProperty(O, P, Attributes); | ||
return $defineProperty(O, P, Attributes); | ||
} catch (error) { /* empty */ } | ||
@@ -215,3 +286,3 @@ if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported'); | ||
// this helper broken in `3.4.1-3.4.4`, so we can't use `shared` helper | ||
// this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper | ||
if (typeof sharedStore.inspectSource != 'function') { | ||
@@ -233,5 +304,5 @@ sharedStore.inspectSource = function (it) { | ||
})('versions', []).push({ | ||
version: '3.6.5', | ||
version: '3.15.2', | ||
mode: 'global', | ||
copyright: '© 2020 Denis Pushkarev (zloirock.ru)' | ||
copyright: '© 2021 Denis Pushkarev (zloirock.ru)' | ||
}); | ||
@@ -255,2 +326,3 @@ }); | ||
var OBJECT_ALREADY_INITIALIZED = 'Object already initialized'; | ||
var WeakMap$1 = global_1.WeakMap; | ||
@@ -272,4 +344,4 @@ var set, get, has$1; | ||
if (nativeWeakMap) { | ||
var store$1 = new WeakMap$1(); | ||
if (nativeWeakMap || sharedStore.state) { | ||
var store$1 = sharedStore.state || (sharedStore.state = new WeakMap$1()); | ||
var wmget = store$1.get; | ||
@@ -279,2 +351,4 @@ var wmhas = store$1.has; | ||
set = function (it, metadata) { | ||
if (wmhas.call(store$1, it)) throw new TypeError(OBJECT_ALREADY_INITIALIZED); | ||
metadata.facade = it; | ||
wmset.call(store$1, it, metadata); | ||
@@ -293,2 +367,4 @@ return metadata; | ||
set = function (it, metadata) { | ||
if (has(it, STATE)) throw new TypeError(OBJECT_ALREADY_INITIALIZED); | ||
metadata.facade = it; | ||
createNonEnumerableProperty(it, STATE, metadata); | ||
@@ -322,5 +398,11 @@ return metadata; | ||
var noTargetGet = options ? !!options.noTargetGet : false; | ||
var state; | ||
if (typeof value == 'function') { | ||
if (typeof key == 'string' && !has(value, 'name')) createNonEnumerableProperty(value, 'name', key); | ||
enforceInternalState(value).source = TEMPLATE.join(typeof key == 'string' ? key : ''); | ||
if (typeof key == 'string' && !has(value, 'name')) { | ||
createNonEnumerableProperty(value, 'name', key); | ||
} | ||
state = enforceInternalState(value); | ||
if (!state.source) { | ||
state.source = TEMPLATE.join(typeof key == 'string' ? key : ''); | ||
} | ||
} | ||
@@ -359,3 +441,3 @@ if (O === global_1) { | ||
// `ToInteger` abstract operation | ||
// https://tc39.github.io/ecma262/#sec-tointeger | ||
// https://tc39.es/ecma262/#sec-tointeger | ||
var toInteger = function (argument) { | ||
@@ -368,3 +450,3 @@ return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument); | ||
// `ToLength` abstract operation | ||
// https://tc39.github.io/ecma262/#sec-tolength | ||
// https://tc39.es/ecma262/#sec-tolength | ||
var toLength = function (argument) { | ||
@@ -393,6 +475,6 @@ return argument > 0 ? min(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991 | ||
// Array#includes uses SameValueZero equality algorithm | ||
// eslint-disable-next-line no-self-compare | ||
// eslint-disable-next-line no-self-compare -- NaN check | ||
if (IS_INCLUDES && el != el) while (length > index) { | ||
value = O[index++]; | ||
// eslint-disable-next-line no-self-compare | ||
// eslint-disable-next-line no-self-compare -- NaN check | ||
if (value != value) return true; | ||
@@ -408,6 +490,6 @@ // Array#indexOf ignores holes, Array#includes - not | ||
// `Array.prototype.includes` method | ||
// https://tc39.github.io/ecma262/#sec-array.prototype.includes | ||
// https://tc39.es/ecma262/#sec-array.prototype.includes | ||
includes: createMethod(true), | ||
// `Array.prototype.indexOf` method | ||
// https://tc39.github.io/ecma262/#sec-array.prototype.indexof | ||
// https://tc39.es/ecma262/#sec-array.prototype.indexof | ||
indexOf: createMethod(false) | ||
@@ -446,3 +528,4 @@ }; | ||
// `Object.getOwnPropertyNames` method | ||
// https://tc39.github.io/ecma262/#sec-object.getownpropertynames | ||
// https://tc39.es/ecma262/#sec-object.getownpropertynames | ||
// eslint-disable-next-line es/no-object-getownpropertynames -- safe | ||
var f$3 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { | ||
@@ -456,2 +539,3 @@ return objectKeysInternal(O, hiddenKeys$1); | ||
// eslint-disable-next-line es/no-object-getownpropertysymbols -- safe | ||
var f$4 = Object.getOwnPropertySymbols; | ||
@@ -464,3 +548,3 @@ | ||
// all object keys, includes non-enumerable and symbols | ||
var ownKeys = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) { | ||
var ownKeys$1 = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) { | ||
var keys = objectGetOwnPropertyNames.f(anObject(it)); | ||
@@ -472,3 +556,3 @@ var getOwnPropertySymbols = objectGetOwnPropertySymbols.f; | ||
var copyConstructorProperties = function (target, source) { | ||
var keys = ownKeys(source); | ||
var keys = ownKeys$1(source); | ||
var defineProperty = objectDefineProperty.f; | ||
@@ -557,3 +641,4 @@ var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f; | ||
// `IsArray` abstract operation | ||
// https://tc39.github.io/ecma262/#sec-isarray | ||
// https://tc39.es/ecma262/#sec-isarray | ||
// eslint-disable-next-line es/no-array-isarray -- safe | ||
var isArray = Array.isArray || function isArray(arg) { | ||
@@ -563,8 +648,2 @@ return classofRaw(arg) == 'Array'; | ||
// `ToObject` abstract operation | ||
// https://tc39.github.io/ecma262/#sec-toobject | ||
var toObject = function (argument) { | ||
return Object(requireObjectCoercible(argument)); | ||
}; | ||
var createProperty = function (object, key, value) { | ||
@@ -576,12 +655,41 @@ var propertyKey = toPrimitive(key); | ||
var engineUserAgent = getBuiltIn('navigator', 'userAgent') || ''; | ||
var process = global_1.process; | ||
var versions = process && process.versions; | ||
var v8 = versions && versions.v8; | ||
var match, version; | ||
if (v8) { | ||
match = v8.split('.'); | ||
version = match[0] < 4 ? 1 : match[0] + match[1]; | ||
} else if (engineUserAgent) { | ||
match = engineUserAgent.match(/Edge\/(\d+)/); | ||
if (!match || match[1] >= 74) { | ||
match = engineUserAgent.match(/Chrome\/(\d+)/); | ||
if (match) version = match[1]; | ||
} | ||
} | ||
var engineV8Version = version && +version; | ||
/* eslint-disable es/no-symbol -- required for testing */ | ||
// eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing | ||
var nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () { | ||
var symbol = Symbol(); | ||
// Chrome 38 Symbol has incorrect toString conversion | ||
// eslint-disable-next-line no-undef | ||
return !String(Symbol()); | ||
// `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances | ||
return !String(symbol) || !(Object(symbol) instanceof Symbol) || | ||
// Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances | ||
!Symbol.sham && engineV8Version && engineV8Version < 41; | ||
}); | ||
/* eslint-disable es/no-symbol -- required for testing */ | ||
var useSymbolAsUid = nativeSymbol | ||
// eslint-disable-next-line no-undef | ||
&& !Symbol.sham | ||
// eslint-disable-next-line no-undef | ||
&& typeof Symbol.iterator == 'symbol'; | ||
@@ -594,5 +702,8 @@ | ||
var wellKnownSymbol = function (name) { | ||
if (!has(WellKnownSymbolsStore, name)) { | ||
if (nativeSymbol && has(Symbol$1, name)) WellKnownSymbolsStore[name] = Symbol$1[name]; | ||
else WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name); | ||
if (!has(WellKnownSymbolsStore, name) || !(nativeSymbol || typeof WellKnownSymbolsStore[name] == 'string')) { | ||
if (nativeSymbol && has(Symbol$1, name)) { | ||
WellKnownSymbolsStore[name] = Symbol$1[name]; | ||
} else { | ||
WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name); | ||
} | ||
} return WellKnownSymbolsStore[name]; | ||
@@ -604,3 +715,3 @@ }; | ||
// `ArraySpeciesCreate` abstract operation | ||
// https://tc39.github.io/ecma262/#sec-arrayspeciescreate | ||
// https://tc39.es/ecma262/#sec-arrayspeciescreate | ||
var arraySpeciesCreate = function (originalArray, length) { | ||
@@ -619,22 +730,2 @@ var C; | ||
var engineUserAgent = getBuiltIn('navigator', 'userAgent') || ''; | ||
var process = global_1.process; | ||
var versions = process && process.versions; | ||
var v8 = versions && versions.v8; | ||
var match, version; | ||
if (v8) { | ||
match = v8.split('.'); | ||
version = match[0] + match[1]; | ||
} else if (engineUserAgent) { | ||
match = engineUserAgent.match(/Edge\/(\d+)/); | ||
if (!match || match[1] >= 74) { | ||
match = engineUserAgent.match(/Chrome\/(\d+)/); | ||
if (match) version = match[1]; | ||
} | ||
} | ||
var engineV8Version = version && +version; | ||
var SPECIES$1 = wellKnownSymbol('species'); | ||
@@ -680,6 +771,7 @@ | ||
// `Array.prototype.concat` method | ||
// https://tc39.github.io/ecma262/#sec-array.prototype.concat | ||
// https://tc39.es/ecma262/#sec-array.prototype.concat | ||
// with adding support of @@isConcatSpreadable and @@species | ||
_export({ target: 'Array', proto: true, forced: FORCED }, { | ||
concat: function concat(arg) { // eslint-disable-line no-unused-vars | ||
// eslint-disable-next-line no-unused-vars -- required for `.length` | ||
concat: function concat(arg) { | ||
var O = toObject(this); | ||
@@ -705,57 +797,2 @@ var A = arraySpeciesCreate(O, 0); | ||
function _defineProperty(obj, key, value) { | ||
if (key in obj) { | ||
Object.defineProperty(obj, key, { | ||
value: value, | ||
enumerable: true, | ||
configurable: true, | ||
writable: true | ||
}); | ||
} else { | ||
obj[key] = value; | ||
} | ||
return obj; | ||
} | ||
function ownKeys$1(object, enumerableOnly) { | ||
var keys = Object.keys(object); | ||
if (Object.getOwnPropertySymbols) { | ||
var symbols = Object.getOwnPropertySymbols(object); | ||
if (enumerableOnly) symbols = symbols.filter(function (sym) { | ||
return Object.getOwnPropertyDescriptor(object, sym).enumerable; | ||
}); | ||
keys.push.apply(keys, symbols); | ||
} | ||
return keys; | ||
} | ||
function _objectSpread2(target) { | ||
for (var i = 1; i < arguments.length; i++) { | ||
var source = arguments[i] != null ? arguments[i] : {}; | ||
if (i % 2) { | ||
ownKeys$1(Object(source), true).forEach(function (key) { | ||
_defineProperty(target, key, source[key]); | ||
}); | ||
} else if (Object.getOwnPropertyDescriptors) { | ||
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); | ||
} else { | ||
ownKeys$1(Object(source)).forEach(function (key) { | ||
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); | ||
}); | ||
} | ||
} | ||
return target; | ||
} | ||
function _newArrowCheck(innerThis, boundThis) { | ||
if (innerThis !== boundThis) { | ||
throw new TypeError("Cannot instantiate an arrow function"); | ||
} | ||
} | ||
var script = { | ||
@@ -762,0 +799,0 @@ components: { |
/*! | ||
* bpui popover v0.1.15 | ||
* bpui popover v0.1.16 | ||
* 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 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,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 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")},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,o){if(E(t),e=m(e,!0),E(o),S)try{return L(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 P.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,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,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,a=!!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?!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,o,r){var n,i=b(e),f=lt(i.length),s=function(t,e){var o=at(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,vt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"].concat("length","prototype"),bt={f:Object.getOwnPropertyNames||function(t){return function(t,e){var o,r=b(t),n=0,i=[];for(o in r)!_(X,o)&&_(r,o)&&i.push(o);for(;e.length>n;)_(r,o=e[n++])&&(~gt(i,o)||i.push(o));return i}(t,vt)}},yt={f:Object.getOwnPropertySymbols},mt=ft("Reflect","ownKeys")||function(t){var e=bt.f(E(t)),o=yt.f;return o?e.concat(o(t)):e},wt=function(t,e){for(var o=mt(e),r=P.f,n=A.f,i=0;i<o.length;i++){var f=o[i];_(t,f)||r(t,f,n(e,f))}},_t=/#|\.prototype\./,Tt=function(t,e){var o=St[Ot(t)];return o==At||o!=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,o){var r=m(e);r in t?P.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||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 o;return Lt(t)&&("function"!=typeof(o=t.constructor)||o!==Array&&!Lt(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 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,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,a){"boolean"!=typeof f&&(c=s,s=f,f=!1);var u,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?(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 o}!function(t,e){var o,r,n,f,s,c=t.target,a=t.global,u=t.stat;if(o=a?i:u?i[c]||k(c,{}):(i[c]||{}).prototype)for(r in e){if(f=e[r],n=t.noTargetGet?(s=$t(o,r))&&s.value:o[r],!Et(a?r:c+(u?".":"#")+r,t.forced)&&void 0!==n){if(typeof f==typeof n)continue;wt(f,n)}(t.sham||n&&n.sham)&&x(f,"sham",!0),rt(o,r,f,t)}}({target:"Array",proto:!0,forced:!qt||!Kt},{concat:function(t){var e,o,r,n,i,f=Pt(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(),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,o),u.clientWidth>0}.bind(this),function(){if(Zt(this,o),"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 r=parseInt(u.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,appendToBody:!0},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;var re={bpPopover:te({render:oe,staticRenderFns:[]},void 0,ee,void 0,!1,void 0,!1,void 0,void 0,void 0)};export default re; | ||
import t from"@bpui/libs";import e from"@bpui/dialog";function r(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 o(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function n(t,e){if(t!==e)throw new TypeError("Cannot instantiate an arrow function")}var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function f(t,e){return t(e={exports:{}},e.exports),e.exports}var s=function(t){return t&&t.Math==Math&&t},c=s("object"==typeof globalThis&&globalThis)||s("object"==typeof window&&window)||s("object"==typeof self&&self)||s("object"==typeof i&&i)||function(){return this}()||Function("return this")(),a=function(t){try{return!!t()}catch(t){return!0}},u=!a((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),l={}.propertyIsEnumerable,h=Object.getOwnPropertyDescriptor,p={f:h&&!l.call({1:2},1)?function(t){var e=h(this,t);return!!e&&e.enumerable}:l},d=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},g={}.toString,v=function(t){return g.call(t).slice(8,-1)},b="".split,y=a((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==v(t)?b.call(t,""):Object(t)}:Object,m=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},w=function(t){return y(m(t))},_=function(t){return"object"==typeof t?null!==t:"function"==typeof t},T=function(t,e){if(!_(t))return t;var r,o;if(e&&"function"==typeof(r=t.toString)&&!_(o=r.call(t)))return o;if("function"==typeof(r=t.valueOf)&&!_(o=r.call(t)))return o;if(!e&&"function"==typeof(r=t.toString)&&!_(o=r.call(t)))return o;throw TypeError("Can't convert object to primitive value")},O=function(t){return Object(m(t))},S={}.hasOwnProperty,j=Object.hasOwn||function(t,e){return S.call(O(t),e)},A=c.document,E=_(A)&&_(A.createElement),L=!u&&!a((function(){return 7!=Object.defineProperty((t="div",E?A.createElement(t):{}),"a",{get:function(){return 7}}).a;var t})),P=Object.getOwnPropertyDescriptor,x={f:u?P:function(t,e){if(t=w(t),e=T(e,!0),L)try{return P(t,e)}catch(t){}if(j(t,e))return d(!p.f.call(t,e),t[e])}},k=function(t){if(!_(t))throw TypeError(String(t)+" is not an object");return t},C=Object.defineProperty,I={f:u?C:function(t,e,r){if(k(t),e=T(e,!0),k(r),L)try{return C(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}},R=u?function(t,e,r){return I.f(t,e,d(1,r))}:function(t,e,r){return t[e]=r,t},D=function(t,e){try{R(c,t,e)}catch(r){c[t]=e}return e},M=c["__core-js_shared__"]||D("__core-js_shared__",{}),B=Function.toString;"function"!=typeof M.inspectSource&&(M.inspectSource=function(t){return B.call(t)});var H,F,N,V,W=M.inspectSource,z=c.WeakMap,U="function"==typeof z&&/native code/.test(W(z)),G=f((function(t){(t.exports=function(t,e){return M[t]||(M[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.15.2",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})})),X=0,q=Math.random(),K=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++X+q).toString(36)},Y=G("keys"),J={},Q=c.WeakMap;if(U||M.state){var Z=M.state||(M.state=new Q),tt=Z.get,et=Z.has,rt=Z.set;H=function(t,e){if(et.call(Z,t))throw new TypeError("Object already initialized");return e.facade=t,rt.call(Z,t,e),e},F=function(t){return tt.call(Z,t)||{}},N=function(t){return et.call(Z,t)}}else{var ot=Y[V="state"]||(Y[V]=K(V));J[ot]=!0,H=function(t,e){if(j(t,ot))throw new TypeError("Object already initialized");return e.facade=t,R(t,ot,e),e},F=function(t){return j(t,ot)?t[ot]:{}},N=function(t){return j(t,ot)}}var nt,it,ft={set:H,get:F,has:N,enforce:function(t){return N(t)?F(t):H(t,{})},getterFor:function(t){return function(e){var r;if(!_(e)||(r=F(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return r}}},st=f((function(t){var e=ft.get,r=ft.enforce,o=String(String).split("String");(t.exports=function(t,e,n,i){var f,s=!!i&&!!i.unsafe,a=!!i&&!!i.enumerable,u=!!i&&!!i.noTargetGet;"function"==typeof n&&("string"!=typeof e||j(n,"name")||R(n,"name",e),(f=r(n)).source||(f.source=o.join("string"==typeof e?e:""))),t!==c?(s?!u&&t[e]&&(a=!0):delete t[e],a?t[e]=n:R(t,e,n)):a?t[e]=n:D(e,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&e(this).source||W(this)}))})),ct=c,at=function(t){return"function"==typeof t?t:void 0},ut=function(t,e){return arguments.length<2?at(ct[t])||at(c[t]):ct[t]&&ct[t][e]||c[t]&&c[t][e]},lt=Math.ceil,ht=Math.floor,pt=function(t){return isNaN(t=+t)?0:(t>0?ht:lt)(t)},dt=Math.min,gt=function(t){return t>0?dt(pt(t),9007199254740991):0},vt=Math.max,bt=Math.min,yt=function(t){return function(e,r,o){var n,i=w(e),f=gt(i.length),s=function(t,e){var r=pt(t);return r<0?vt(r+e,0):bt(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}},mt={includes:yt(!0),indexOf:yt(!1)}.indexOf,wt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"].concat("length","prototype"),_t={f:Object.getOwnPropertyNames||function(t){return function(t,e){var r,o=w(t),n=0,i=[];for(r in o)!j(J,r)&&j(o,r)&&i.push(r);for(;e.length>n;)j(o,r=e[n++])&&(~mt(i,r)||i.push(r));return i}(t,wt)}},Tt={f:Object.getOwnPropertySymbols},Ot=ut("Reflect","ownKeys")||function(t){var e=_t.f(k(t)),r=Tt.f;return r?e.concat(r(t)):e},St=function(t,e){for(var r=Ot(e),o=I.f,n=x.f,i=0;i<r.length;i++){var f=r[i];j(t,f)||o(t,f,n(e,f))}},jt=/#|\.prototype\./,At=function(t,e){var r=$t[Et(t)];return r==Pt||r!=Lt&&("function"==typeof e?a(e):!!e)},Et=At.normalize=function(t){return String(t).replace(jt,".").toLowerCase()},$t=At.data={},Lt=At.NATIVE="N",Pt=At.POLYFILL="P",xt=At,kt=x.f,Ct=Array.isArray||function(t){return"Array"==v(t)},It=function(t,e,r){var o=T(e);o in t?I.f(t,o,d(0,r)):t[o]=r},Rt=ut("navigator","userAgent")||"",Dt=c.process,Mt=Dt&&Dt.versions,Bt=Mt&&Mt.v8;Bt?it=(nt=Bt.split("."))[0]<4?1:nt[0]+nt[1]:Rt&&(!(nt=Rt.match(/Edge\/(\d+)/))||nt[1]>=74)&&(nt=Rt.match(/Chrome\/(\d+)/))&&(it=nt[1]);var Ht,Ft=it&&+it,Nt=!!Object.getOwnPropertySymbols&&!a((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&Ft&&Ft<41})),Vt=Nt&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Wt=G("wks"),zt=c.Symbol,Ut=Vt?zt:zt&&zt.withoutSetter||K,Gt=function(t){return j(Wt,t)&&(Nt||"string"==typeof Wt[t])||(Nt&&j(zt,t)?Wt[t]=zt[t]:Wt[t]=Ut("Symbol."+t)),Wt[t]},Xt=Gt("species"),qt=function(t,e){var r;return Ct(t)&&("function"!=typeof(r=t.constructor)||r!==Array&&!Ct(r.prototype)?_(r)&&null===(r=r[Xt])&&(r=void 0):r=void 0),new(void 0===r?Array:r)(0===e?0:e)},Kt=Gt("species"),Yt=Gt("isConcatSpreadable"),Jt=Ft>=51||!a((function(){var t=[];return t[Yt]=!1,t.concat()[0]!==t})),Qt=(Ht="concat",Ft>=51||!a((function(){var t=[];return(t.constructor={})[Kt]=function(){return{foo:1}},1!==t[Ht](Boolean).foo}))),Zt=function(t){if(!_(t))return!1;var e=t[Yt];return void 0!==e?!!e:Ct(t)};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,i,f,s=t.target,a=t.global,u=t.stat;if(r=a?c:u?c[s]||D(s,{}):(c[s]||{}).prototype)for(o in e){if(i=e[o],n=t.noTargetGet?(f=kt(r,o))&&f.value:r[o],!xt(a?o:s+(u?".":"#")+o,t.forced)&&void 0!==n){if(typeof i==typeof n)continue;St(i,n)}(t.sham||n&&n.sham)&&R(i,"sham",!0),st(r,o,i,t)}}({target:"Array",proto:!0,forced:!Jt||!Qt},{concat:function(t){var e,r,o,n,i,f=O(this),s=qt(f,0),c=0;for(e=-1,o=arguments.length;e<o;e++)if(Zt(i=-1===e?f:arguments[e])){if(c+(n=gt(i.length))>9007199254740991)throw TypeError("Maximum allowed index exceeded");for(r=0;r<n;r++,c++)r in i&&It(s,c,i[r])}else{if(c>=9007199254740991)throw TypeError("Maximum allowed index exceeded");It(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 n=null!=arguments[e]?arguments[e]:{};e%2?r(Object(n),!0).forEach((function(e){o(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,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(){n(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(){n(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 i;i=t.dom.isVueObject(o)?o.$el:o;var f=t.dom.getElementOffset(i),s={};s.height=i.clientHeight,s.width=i.clientWidth;var c,a=t.dom.getViewPort(),u=t.dom.getDocumentOffset();this.offsetTop=f.top+u.top,"top"==e?(this.directionData="top",this.offsetTop-=s.height,this.offsetTop-=8):"bottom"==e?(this.directionData="bottom",this.offsetTop+=s.height):"left"==e?(this.directionData="left",this.offsetLeft=f.left+s.width):"right"==e?(this.directionData="right",this.offsetLeft=f.left+s.width):f.top+s.height/2>a.height/2?(this.directionData="top",this.offsetTop-=s.height,this.offsetTop-=8):(this.directionData="bottom",this.offsetTop+=s.height),this.offsetTop=parseInt(this.offsetTop),this.offsetTop+="px",c="left"==e||"right"==e?parseInt(f.top+s.height/2):parseInt(f.left+s.width/2);var l=this.$refs.main;t.dom.probeDom(400,function(){return n(this,r),l.clientWidth>0}.bind(this),function(){if(n(this,r),"left"==e||"right"==e){var t=parseInt(c-l.clientHeight/2);t<10&&(t=10),t+l.clientHeight>a.height-10&&(t=a.height-10-l.clientHeight),this.offsetTop=parseInt(t+u.top)+"px",this.offsetLeft="right"==e?f.left+s.width-6:f.left-l.clientWidth-6,this.offsetLeft+=u.left,this.offsetLeft=parseInt(this.offsetLeft),this.offsetLeft+="px",this.offsetArrowLeft=null,this.offsetArrowBottom=null,this.offsetArrowTop=parseInt(c-t-6),this.offsetArrowTop<10?this.offsetArrowTop=10:this.offsetArrowTop>l.clientHeight-22&&(this.offsetArrowTop=parseInt(l.clientHeight-22)),this.offsetArrowTop+="px",this.offsetArrowRight=null}else{var o=parseInt(l.clientWidth||50),i=parseInt(c-o/2);i<10&&(i=10),i+o>a.width-10&&(i=a.width-10-o),this.offsetLeft=parseInt(i)+"px",this.offsetArrowLeft=parseInt(c-i)-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){n(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,appendToBody:!0},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; |
2035
dist/index.js
/*! | ||
* bpui popover v0.1.15 | ||
* bpui popover v0.1.16 | ||
* Copyright (c) 2021 Copyright bpoint.lee@live.com All Rights Reserved. | ||
@@ -8,1197 +8,1234 @@ * Released under the MIT License. | ||
(function (global, factory) { | ||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('@bpui/libs'), require('@bpui/dialog')) : | ||
typeof define === 'function' && define.amd ? define(['@bpui/libs', '@bpui/dialog'], factory) : | ||
(global = global || self, global.bpPopover = factory(global.bpLibs, global.bpDialog)); | ||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('@bpui/libs'), require('@bpui/dialog')) : | ||
typeof define === 'function' && define.amd ? define(['@bpui/libs', '@bpui/dialog'], factory) : | ||
(global = global || self, global.bpPopover = factory(global.bpLibs, global.bpDialog)); | ||
}(this, (function (bpLibs, bpDialog) { 'use strict'; | ||
bpLibs = bpLibs && Object.prototype.hasOwnProperty.call(bpLibs, 'default') ? bpLibs['default'] : bpLibs; | ||
bpDialog = bpDialog && Object.prototype.hasOwnProperty.call(bpDialog, 'default') ? bpDialog['default'] : bpDialog; | ||
bpLibs = bpLibs && Object.prototype.hasOwnProperty.call(bpLibs, 'default') ? bpLibs['default'] : bpLibs; | ||
bpDialog = bpDialog && Object.prototype.hasOwnProperty.call(bpDialog, 'default') ? bpDialog['default'] : bpDialog; | ||
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; | ||
function ownKeys(object, enumerableOnly) { | ||
var keys = Object.keys(object); | ||
function createCommonjsModule(fn, module) { | ||
return module = { exports: {} }, fn(module, module.exports), module.exports; | ||
} | ||
if (Object.getOwnPropertySymbols) { | ||
var symbols = Object.getOwnPropertySymbols(object); | ||
var check = function (it) { | ||
return it && it.Math == Math && it; | ||
}; | ||
if (enumerableOnly) { | ||
symbols = symbols.filter(function (sym) { | ||
return Object.getOwnPropertyDescriptor(object, sym).enumerable; | ||
}); | ||
} | ||
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 | ||
var global_1 = | ||
// eslint-disable-next-line no-undef | ||
check(typeof globalThis == 'object' && globalThis) || | ||
check(typeof window == 'object' && window) || | ||
check(typeof self == 'object' && self) || | ||
check(typeof commonjsGlobal == 'object' && commonjsGlobal) || | ||
// eslint-disable-next-line no-new-func | ||
Function('return this')(); | ||
keys.push.apply(keys, symbols); | ||
} | ||
var fails = function (exec) { | ||
try { | ||
return !!exec(); | ||
} catch (error) { | ||
return true; | ||
} | ||
}; | ||
return keys; | ||
} | ||
// Thank's IE8 for his funny defineProperty | ||
var descriptors = !fails(function () { | ||
return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7; | ||
}); | ||
function _objectSpread2(target) { | ||
for (var i = 1; i < arguments.length; i++) { | ||
var source = arguments[i] != null ? arguments[i] : {}; | ||
var nativePropertyIsEnumerable = {}.propertyIsEnumerable; | ||
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; | ||
if (i % 2) { | ||
ownKeys(Object(source), true).forEach(function (key) { | ||
_defineProperty(target, key, source[key]); | ||
}); | ||
} else if (Object.getOwnPropertyDescriptors) { | ||
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); | ||
} else { | ||
ownKeys(Object(source)).forEach(function (key) { | ||
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); | ||
}); | ||
} | ||
} | ||
// Nashorn ~ JDK8 bug | ||
var NASHORN_BUG = getOwnPropertyDescriptor && !nativePropertyIsEnumerable.call({ 1: 2 }, 1); | ||
return target; | ||
} | ||
// `Object.prototype.propertyIsEnumerable` method implementation | ||
// https://tc39.github.io/ecma262/#sec-object.prototype.propertyisenumerable | ||
var f = NASHORN_BUG ? function propertyIsEnumerable(V) { | ||
var descriptor = getOwnPropertyDescriptor(this, V); | ||
return !!descriptor && descriptor.enumerable; | ||
} : nativePropertyIsEnumerable; | ||
function _defineProperty(obj, key, value) { | ||
if (key in obj) { | ||
Object.defineProperty(obj, key, { | ||
value: value, | ||
enumerable: true, | ||
configurable: true, | ||
writable: true | ||
}); | ||
} else { | ||
obj[key] = value; | ||
} | ||
var objectPropertyIsEnumerable = { | ||
f: f | ||
}; | ||
return obj; | ||
} | ||
var createPropertyDescriptor = function (bitmap, value) { | ||
return { | ||
enumerable: !(bitmap & 1), | ||
configurable: !(bitmap & 2), | ||
writable: !(bitmap & 4), | ||
value: value | ||
}; | ||
}; | ||
function _newArrowCheck(innerThis, boundThis) { | ||
if (innerThis !== boundThis) { | ||
throw new TypeError("Cannot instantiate an arrow function"); | ||
} | ||
} | ||
var toString = {}.toString; | ||
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; | ||
var classofRaw = function (it) { | ||
return toString.call(it).slice(8, -1); | ||
}; | ||
function createCommonjsModule(fn, module) { | ||
return module = { exports: {} }, fn(module, module.exports), module.exports; | ||
} | ||
var split = ''.split; | ||
var check = function (it) { | ||
return it && it.Math == Math && it; | ||
}; | ||
// fallback for non-array-like ES3 and non-enumerable old V8 strings | ||
var indexedObject = fails(function () { | ||
// throws an error in rhino, see https://github.com/mozilla/rhino/issues/346 | ||
// eslint-disable-next-line no-prototype-builtins | ||
return !Object('z').propertyIsEnumerable(0); | ||
}) ? function (it) { | ||
return classofRaw(it) == 'String' ? split.call(it, '') : Object(it); | ||
} : Object; | ||
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 | ||
var global_1 = | ||
// eslint-disable-next-line es/no-global-this -- safe | ||
check(typeof globalThis == 'object' && globalThis) || | ||
check(typeof window == 'object' && window) || | ||
// eslint-disable-next-line no-restricted-globals -- safe | ||
check(typeof self == 'object' && self) || | ||
check(typeof commonjsGlobal == 'object' && commonjsGlobal) || | ||
// eslint-disable-next-line no-new-func -- fallback | ||
(function () { return this; })() || Function('return this')(); | ||
// `RequireObjectCoercible` abstract operation | ||
// https://tc39.github.io/ecma262/#sec-requireobjectcoercible | ||
var requireObjectCoercible = function (it) { | ||
if (it == undefined) throw TypeError("Can't call method on " + it); | ||
return it; | ||
}; | ||
var fails = function (exec) { | ||
try { | ||
return !!exec(); | ||
} catch (error) { | ||
return true; | ||
} | ||
}; | ||
// toObject with fallback for non-array-like ES3 strings | ||
// Detect IE8's incomplete defineProperty implementation | ||
var descriptors = !fails(function () { | ||
// eslint-disable-next-line es/no-object-defineproperty -- required for testing | ||
return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7; | ||
}); | ||
var $propertyIsEnumerable = {}.propertyIsEnumerable; | ||
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe | ||
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; | ||
// Nashorn ~ JDK8 bug | ||
var NASHORN_BUG = getOwnPropertyDescriptor && !$propertyIsEnumerable.call({ 1: 2 }, 1); | ||
var toIndexedObject = function (it) { | ||
return indexedObject(requireObjectCoercible(it)); | ||
}; | ||
// `Object.prototype.propertyIsEnumerable` method implementation | ||
// https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable | ||
var f = NASHORN_BUG ? function propertyIsEnumerable(V) { | ||
var descriptor = getOwnPropertyDescriptor(this, V); | ||
return !!descriptor && descriptor.enumerable; | ||
} : $propertyIsEnumerable; | ||
var isObject = function (it) { | ||
return typeof it === 'object' ? it !== null : typeof it === 'function'; | ||
}; | ||
var objectPropertyIsEnumerable = { | ||
f: f | ||
}; | ||
// `ToPrimitive` abstract operation | ||
// https://tc39.github.io/ecma262/#sec-toprimitive | ||
// instead of the ES6 spec version, we didn't implement @@toPrimitive case | ||
// and the second argument - flag - preferred type is a string | ||
var toPrimitive = function (input, PREFERRED_STRING) { | ||
if (!isObject(input)) return input; | ||
var fn, val; | ||
if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val; | ||
if (typeof (fn = input.valueOf) == 'function' && !isObject(val = fn.call(input))) return val; | ||
if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val; | ||
throw TypeError("Can't convert object to primitive value"); | ||
}; | ||
var createPropertyDescriptor = function (bitmap, value) { | ||
return { | ||
enumerable: !(bitmap & 1), | ||
configurable: !(bitmap & 2), | ||
writable: !(bitmap & 4), | ||
value: value | ||
}; | ||
}; | ||
var hasOwnProperty = {}.hasOwnProperty; | ||
var toString = {}.toString; | ||
var has = function (it, key) { | ||
return hasOwnProperty.call(it, key); | ||
}; | ||
var classofRaw = function (it) { | ||
return toString.call(it).slice(8, -1); | ||
}; | ||
var document = global_1.document; | ||
// typeof document.createElement is 'object' in old IE | ||
var EXISTS = isObject(document) && isObject(document.createElement); | ||
var split = ''.split; | ||
var documentCreateElement = function (it) { | ||
return EXISTS ? document.createElement(it) : {}; | ||
}; | ||
// fallback for non-array-like ES3 and non-enumerable old V8 strings | ||
var indexedObject = fails(function () { | ||
// throws an error in rhino, see https://github.com/mozilla/rhino/issues/346 | ||
// eslint-disable-next-line no-prototype-builtins -- safe | ||
return !Object('z').propertyIsEnumerable(0); | ||
}) ? function (it) { | ||
return classofRaw(it) == 'String' ? split.call(it, '') : Object(it); | ||
} : Object; | ||
// Thank's IE8 for his funny defineProperty | ||
var ie8DomDefine = !descriptors && !fails(function () { | ||
return Object.defineProperty(documentCreateElement('div'), 'a', { | ||
get: function () { return 7; } | ||
}).a != 7; | ||
}); | ||
// `RequireObjectCoercible` abstract operation | ||
// https://tc39.es/ecma262/#sec-requireobjectcoercible | ||
var requireObjectCoercible = function (it) { | ||
if (it == undefined) throw TypeError("Can't call method on " + it); | ||
return it; | ||
}; | ||
var nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; | ||
// toObject with fallback for non-array-like ES3 strings | ||
// `Object.getOwnPropertyDescriptor` method | ||
// https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptor | ||
var f$1 = descriptors ? nativeGetOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) { | ||
O = toIndexedObject(O); | ||
P = toPrimitive(P, true); | ||
if (ie8DomDefine) try { | ||
return nativeGetOwnPropertyDescriptor(O, P); | ||
} catch (error) { /* empty */ } | ||
if (has(O, P)) return createPropertyDescriptor(!objectPropertyIsEnumerable.f.call(O, P), O[P]); | ||
}; | ||
var objectGetOwnPropertyDescriptor = { | ||
f: f$1 | ||
}; | ||
var anObject = function (it) { | ||
if (!isObject(it)) { | ||
throw TypeError(String(it) + ' is not an object'); | ||
} return it; | ||
}; | ||
var toIndexedObject = function (it) { | ||
return indexedObject(requireObjectCoercible(it)); | ||
}; | ||
var nativeDefineProperty = Object.defineProperty; | ||
var isObject = function (it) { | ||
return typeof it === 'object' ? it !== null : typeof it === 'function'; | ||
}; | ||
// `Object.defineProperty` method | ||
// https://tc39.github.io/ecma262/#sec-object.defineproperty | ||
var f$2 = descriptors ? nativeDefineProperty : function defineProperty(O, P, Attributes) { | ||
anObject(O); | ||
P = toPrimitive(P, true); | ||
anObject(Attributes); | ||
if (ie8DomDefine) try { | ||
return nativeDefineProperty(O, P, Attributes); | ||
} catch (error) { /* empty */ } | ||
if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported'); | ||
if ('value' in Attributes) O[P] = Attributes.value; | ||
return O; | ||
}; | ||
// `ToPrimitive` abstract operation | ||
// https://tc39.es/ecma262/#sec-toprimitive | ||
// instead of the ES6 spec version, we didn't implement @@toPrimitive case | ||
// and the second argument - flag - preferred type is a string | ||
var toPrimitive = function (input, PREFERRED_STRING) { | ||
if (!isObject(input)) return input; | ||
var fn, val; | ||
if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val; | ||
if (typeof (fn = input.valueOf) == 'function' && !isObject(val = fn.call(input))) return val; | ||
if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val; | ||
throw TypeError("Can't convert object to primitive value"); | ||
}; | ||
var objectDefineProperty = { | ||
f: f$2 | ||
}; | ||
// `ToObject` abstract operation | ||
// https://tc39.es/ecma262/#sec-toobject | ||
var toObject = function (argument) { | ||
return Object(requireObjectCoercible(argument)); | ||
}; | ||
var createNonEnumerableProperty = descriptors ? function (object, key, value) { | ||
return objectDefineProperty.f(object, key, createPropertyDescriptor(1, value)); | ||
} : function (object, key, value) { | ||
object[key] = value; | ||
return object; | ||
}; | ||
var hasOwnProperty = {}.hasOwnProperty; | ||
var setGlobal = function (key, value) { | ||
try { | ||
createNonEnumerableProperty(global_1, key, value); | ||
} catch (error) { | ||
global_1[key] = value; | ||
} return value; | ||
}; | ||
var has = Object.hasOwn || function hasOwn(it, key) { | ||
return hasOwnProperty.call(toObject(it), key); | ||
}; | ||
var SHARED = '__core-js_shared__'; | ||
var store = global_1[SHARED] || setGlobal(SHARED, {}); | ||
var document = global_1.document; | ||
// typeof document.createElement is 'object' in old IE | ||
var EXISTS = isObject(document) && isObject(document.createElement); | ||
var sharedStore = store; | ||
var documentCreateElement = function (it) { | ||
return EXISTS ? document.createElement(it) : {}; | ||
}; | ||
var functionToString = Function.toString; | ||
// Thank's IE8 for his funny defineProperty | ||
var ie8DomDefine = !descriptors && !fails(function () { | ||
// eslint-disable-next-line es/no-object-defineproperty -- requied for testing | ||
return Object.defineProperty(documentCreateElement('div'), 'a', { | ||
get: function () { return 7; } | ||
}).a != 7; | ||
}); | ||
// this helper broken in `3.4.1-3.4.4`, so we can't use `shared` helper | ||
if (typeof sharedStore.inspectSource != 'function') { | ||
sharedStore.inspectSource = function (it) { | ||
return functionToString.call(it); | ||
}; | ||
} | ||
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe | ||
var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; | ||
var inspectSource = sharedStore.inspectSource; | ||
// `Object.getOwnPropertyDescriptor` method | ||
// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor | ||
var f$1 = descriptors ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) { | ||
O = toIndexedObject(O); | ||
P = toPrimitive(P, true); | ||
if (ie8DomDefine) try { | ||
return $getOwnPropertyDescriptor(O, P); | ||
} catch (error) { /* empty */ } | ||
if (has(O, P)) return createPropertyDescriptor(!objectPropertyIsEnumerable.f.call(O, P), O[P]); | ||
}; | ||
var WeakMap = global_1.WeakMap; | ||
var objectGetOwnPropertyDescriptor = { | ||
f: f$1 | ||
}; | ||
var nativeWeakMap = typeof WeakMap === 'function' && /native code/.test(inspectSource(WeakMap)); | ||
var anObject = function (it) { | ||
if (!isObject(it)) { | ||
throw TypeError(String(it) + ' is not an object'); | ||
} return it; | ||
}; | ||
var shared = createCommonjsModule(function (module) { | ||
(module.exports = function (key, value) { | ||
return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {}); | ||
})('versions', []).push({ | ||
version: '3.6.5', | ||
mode: 'global', | ||
copyright: '© 2020 Denis Pushkarev (zloirock.ru)' | ||
}); | ||
}); | ||
// eslint-disable-next-line es/no-object-defineproperty -- safe | ||
var $defineProperty = Object.defineProperty; | ||
var id = 0; | ||
var postfix = Math.random(); | ||
// `Object.defineProperty` method | ||
// https://tc39.es/ecma262/#sec-object.defineproperty | ||
var f$2 = descriptors ? $defineProperty : function defineProperty(O, P, Attributes) { | ||
anObject(O); | ||
P = toPrimitive(P, true); | ||
anObject(Attributes); | ||
if (ie8DomDefine) try { | ||
return $defineProperty(O, P, Attributes); | ||
} catch (error) { /* empty */ } | ||
if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported'); | ||
if ('value' in Attributes) O[P] = Attributes.value; | ||
return O; | ||
}; | ||
var uid = function (key) { | ||
return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36); | ||
}; | ||
var objectDefineProperty = { | ||
f: f$2 | ||
}; | ||
var keys = shared('keys'); | ||
var createNonEnumerableProperty = descriptors ? function (object, key, value) { | ||
return objectDefineProperty.f(object, key, createPropertyDescriptor(1, value)); | ||
} : function (object, key, value) { | ||
object[key] = value; | ||
return object; | ||
}; | ||
var sharedKey = function (key) { | ||
return keys[key] || (keys[key] = uid(key)); | ||
}; | ||
var setGlobal = function (key, value) { | ||
try { | ||
createNonEnumerableProperty(global_1, key, value); | ||
} catch (error) { | ||
global_1[key] = value; | ||
} return value; | ||
}; | ||
var hiddenKeys = {}; | ||
var SHARED = '__core-js_shared__'; | ||
var store = global_1[SHARED] || setGlobal(SHARED, {}); | ||
var WeakMap$1 = global_1.WeakMap; | ||
var set, get, has$1; | ||
var sharedStore = store; | ||
var enforce = function (it) { | ||
return has$1(it) ? get(it) : set(it, {}); | ||
}; | ||
var functionToString = Function.toString; | ||
var getterFor = function (TYPE) { | ||
return function (it) { | ||
var state; | ||
if (!isObject(it) || (state = get(it)).type !== TYPE) { | ||
throw TypeError('Incompatible receiver, ' + TYPE + ' required'); | ||
} return state; | ||
}; | ||
}; | ||
// this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper | ||
if (typeof sharedStore.inspectSource != 'function') { | ||
sharedStore.inspectSource = function (it) { | ||
return functionToString.call(it); | ||
}; | ||
} | ||
if (nativeWeakMap) { | ||
var store$1 = new WeakMap$1(); | ||
var wmget = store$1.get; | ||
var wmhas = store$1.has; | ||
var wmset = store$1.set; | ||
set = function (it, metadata) { | ||
wmset.call(store$1, it, metadata); | ||
return metadata; | ||
}; | ||
get = function (it) { | ||
return wmget.call(store$1, it) || {}; | ||
}; | ||
has$1 = function (it) { | ||
return wmhas.call(store$1, it); | ||
}; | ||
} else { | ||
var STATE = sharedKey('state'); | ||
hiddenKeys[STATE] = true; | ||
set = function (it, metadata) { | ||
createNonEnumerableProperty(it, STATE, metadata); | ||
return metadata; | ||
}; | ||
get = function (it) { | ||
return has(it, STATE) ? it[STATE] : {}; | ||
}; | ||
has$1 = function (it) { | ||
return has(it, STATE); | ||
}; | ||
} | ||
var inspectSource = sharedStore.inspectSource; | ||
var internalState = { | ||
set: set, | ||
get: get, | ||
has: has$1, | ||
enforce: enforce, | ||
getterFor: getterFor | ||
}; | ||
var WeakMap = global_1.WeakMap; | ||
var redefine = createCommonjsModule(function (module) { | ||
var getInternalState = internalState.get; | ||
var enforceInternalState = internalState.enforce; | ||
var TEMPLATE = String(String).split('String'); | ||
var nativeWeakMap = typeof WeakMap === 'function' && /native code/.test(inspectSource(WeakMap)); | ||
(module.exports = function (O, key, value, options) { | ||
var unsafe = options ? !!options.unsafe : false; | ||
var simple = options ? !!options.enumerable : false; | ||
var noTargetGet = options ? !!options.noTargetGet : false; | ||
if (typeof value == 'function') { | ||
if (typeof key == 'string' && !has(value, 'name')) createNonEnumerableProperty(value, 'name', key); | ||
enforceInternalState(value).source = TEMPLATE.join(typeof key == 'string' ? key : ''); | ||
} | ||
if (O === global_1) { | ||
if (simple) O[key] = value; | ||
else setGlobal(key, value); | ||
return; | ||
} else if (!unsafe) { | ||
delete O[key]; | ||
} else if (!noTargetGet && O[key]) { | ||
simple = true; | ||
} | ||
if (simple) O[key] = value; | ||
else createNonEnumerableProperty(O, key, value); | ||
// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative | ||
})(Function.prototype, 'toString', function toString() { | ||
return typeof this == 'function' && getInternalState(this).source || inspectSource(this); | ||
}); | ||
}); | ||
var shared = createCommonjsModule(function (module) { | ||
(module.exports = function (key, value) { | ||
return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {}); | ||
})('versions', []).push({ | ||
version: '3.15.2', | ||
mode: 'global', | ||
copyright: '© 2021 Denis Pushkarev (zloirock.ru)' | ||
}); | ||
}); | ||
var path = global_1; | ||
var id = 0; | ||
var postfix = Math.random(); | ||
var aFunction = function (variable) { | ||
return typeof variable == 'function' ? variable : undefined; | ||
}; | ||
var uid = function (key) { | ||
return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36); | ||
}; | ||
var getBuiltIn = function (namespace, method) { | ||
return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(global_1[namespace]) | ||
: path[namespace] && path[namespace][method] || global_1[namespace] && global_1[namespace][method]; | ||
}; | ||
var keys = shared('keys'); | ||
var ceil = Math.ceil; | ||
var floor = Math.floor; | ||
var sharedKey = function (key) { | ||
return keys[key] || (keys[key] = uid(key)); | ||
}; | ||
// `ToInteger` abstract operation | ||
// https://tc39.github.io/ecma262/#sec-tointeger | ||
var toInteger = function (argument) { | ||
return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument); | ||
}; | ||
var hiddenKeys = {}; | ||
var min = Math.min; | ||
var OBJECT_ALREADY_INITIALIZED = 'Object already initialized'; | ||
var WeakMap$1 = global_1.WeakMap; | ||
var set, get, has$1; | ||
// `ToLength` abstract operation | ||
// https://tc39.github.io/ecma262/#sec-tolength | ||
var toLength = function (argument) { | ||
return argument > 0 ? min(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991 | ||
}; | ||
var enforce = function (it) { | ||
return has$1(it) ? get(it) : set(it, {}); | ||
}; | ||
var max = Math.max; | ||
var min$1 = Math.min; | ||
var getterFor = function (TYPE) { | ||
return function (it) { | ||
var state; | ||
if (!isObject(it) || (state = get(it)).type !== TYPE) { | ||
throw TypeError('Incompatible receiver, ' + TYPE + ' required'); | ||
} return state; | ||
}; | ||
}; | ||
// Helper for a popular repeating case of the spec: | ||
// Let integer be ? ToInteger(index). | ||
// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length). | ||
var toAbsoluteIndex = function (index, length) { | ||
var integer = toInteger(index); | ||
return integer < 0 ? max(integer + length, 0) : min$1(integer, length); | ||
}; | ||
if (nativeWeakMap || sharedStore.state) { | ||
var store$1 = sharedStore.state || (sharedStore.state = new WeakMap$1()); | ||
var wmget = store$1.get; | ||
var wmhas = store$1.has; | ||
var wmset = store$1.set; | ||
set = function (it, metadata) { | ||
if (wmhas.call(store$1, it)) throw new TypeError(OBJECT_ALREADY_INITIALIZED); | ||
metadata.facade = it; | ||
wmset.call(store$1, it, metadata); | ||
return metadata; | ||
}; | ||
get = function (it) { | ||
return wmget.call(store$1, it) || {}; | ||
}; | ||
has$1 = function (it) { | ||
return wmhas.call(store$1, it); | ||
}; | ||
} else { | ||
var STATE = sharedKey('state'); | ||
hiddenKeys[STATE] = true; | ||
set = function (it, metadata) { | ||
if (has(it, STATE)) throw new TypeError(OBJECT_ALREADY_INITIALIZED); | ||
metadata.facade = it; | ||
createNonEnumerableProperty(it, STATE, metadata); | ||
return metadata; | ||
}; | ||
get = function (it) { | ||
return has(it, STATE) ? it[STATE] : {}; | ||
}; | ||
has$1 = function (it) { | ||
return has(it, STATE); | ||
}; | ||
} | ||
// `Array.prototype.{ indexOf, includes }` methods implementation | ||
var createMethod = function (IS_INCLUDES) { | ||
return function ($this, el, fromIndex) { | ||
var O = toIndexedObject($this); | ||
var length = toLength(O.length); | ||
var index = toAbsoluteIndex(fromIndex, length); | ||
var value; | ||
// Array#includes uses SameValueZero equality algorithm | ||
// eslint-disable-next-line no-self-compare | ||
if (IS_INCLUDES && el != el) while (length > index) { | ||
value = O[index++]; | ||
// eslint-disable-next-line no-self-compare | ||
if (value != value) return true; | ||
// Array#indexOf ignores holes, Array#includes - not | ||
} else for (;length > index; index++) { | ||
if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0; | ||
} return !IS_INCLUDES && -1; | ||
}; | ||
}; | ||
var internalState = { | ||
set: set, | ||
get: get, | ||
has: has$1, | ||
enforce: enforce, | ||
getterFor: getterFor | ||
}; | ||
var arrayIncludes = { | ||
// `Array.prototype.includes` method | ||
// https://tc39.github.io/ecma262/#sec-array.prototype.includes | ||
includes: createMethod(true), | ||
// `Array.prototype.indexOf` method | ||
// https://tc39.github.io/ecma262/#sec-array.prototype.indexof | ||
indexOf: createMethod(false) | ||
}; | ||
var redefine = createCommonjsModule(function (module) { | ||
var getInternalState = internalState.get; | ||
var enforceInternalState = internalState.enforce; | ||
var TEMPLATE = String(String).split('String'); | ||
var indexOf = arrayIncludes.indexOf; | ||
(module.exports = function (O, key, value, options) { | ||
var unsafe = options ? !!options.unsafe : false; | ||
var simple = options ? !!options.enumerable : false; | ||
var noTargetGet = options ? !!options.noTargetGet : false; | ||
var state; | ||
if (typeof value == 'function') { | ||
if (typeof key == 'string' && !has(value, 'name')) { | ||
createNonEnumerableProperty(value, 'name', key); | ||
} | ||
state = enforceInternalState(value); | ||
if (!state.source) { | ||
state.source = TEMPLATE.join(typeof key == 'string' ? key : ''); | ||
} | ||
} | ||
if (O === global_1) { | ||
if (simple) O[key] = value; | ||
else setGlobal(key, value); | ||
return; | ||
} else if (!unsafe) { | ||
delete O[key]; | ||
} else if (!noTargetGet && O[key]) { | ||
simple = true; | ||
} | ||
if (simple) O[key] = value; | ||
else createNonEnumerableProperty(O, key, value); | ||
// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative | ||
})(Function.prototype, 'toString', function toString() { | ||
return typeof this == 'function' && getInternalState(this).source || inspectSource(this); | ||
}); | ||
}); | ||
var path = global_1; | ||
var objectKeysInternal = function (object, names) { | ||
var O = toIndexedObject(object); | ||
var i = 0; | ||
var result = []; | ||
var key; | ||
for (key in O) !has(hiddenKeys, key) && has(O, key) && result.push(key); | ||
// Don't enum bug & hidden keys | ||
while (names.length > i) if (has(O, key = names[i++])) { | ||
~indexOf(result, key) || result.push(key); | ||
} | ||
return result; | ||
}; | ||
var aFunction = function (variable) { | ||
return typeof variable == 'function' ? variable : undefined; | ||
}; | ||
// IE8- don't enum bug keys | ||
var enumBugKeys = [ | ||
'constructor', | ||
'hasOwnProperty', | ||
'isPrototypeOf', | ||
'propertyIsEnumerable', | ||
'toLocaleString', | ||
'toString', | ||
'valueOf' | ||
]; | ||
var getBuiltIn = function (namespace, method) { | ||
return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(global_1[namespace]) | ||
: path[namespace] && path[namespace][method] || global_1[namespace] && global_1[namespace][method]; | ||
}; | ||
var hiddenKeys$1 = enumBugKeys.concat('length', 'prototype'); | ||
var ceil = Math.ceil; | ||
var floor = Math.floor; | ||
// `Object.getOwnPropertyNames` method | ||
// https://tc39.github.io/ecma262/#sec-object.getownpropertynames | ||
var f$3 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { | ||
return objectKeysInternal(O, hiddenKeys$1); | ||
}; | ||
// `ToInteger` abstract operation | ||
// https://tc39.es/ecma262/#sec-tointeger | ||
var toInteger = function (argument) { | ||
return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument); | ||
}; | ||
var objectGetOwnPropertyNames = { | ||
f: f$3 | ||
}; | ||
var min = Math.min; | ||
var f$4 = Object.getOwnPropertySymbols; | ||
// `ToLength` abstract operation | ||
// https://tc39.es/ecma262/#sec-tolength | ||
var toLength = function (argument) { | ||
return argument > 0 ? min(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991 | ||
}; | ||
var objectGetOwnPropertySymbols = { | ||
f: f$4 | ||
}; | ||
var max = Math.max; | ||
var min$1 = Math.min; | ||
// all object keys, includes non-enumerable and symbols | ||
var ownKeys = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) { | ||
var keys = objectGetOwnPropertyNames.f(anObject(it)); | ||
var getOwnPropertySymbols = objectGetOwnPropertySymbols.f; | ||
return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys; | ||
}; | ||
// Helper for a popular repeating case of the spec: | ||
// Let integer be ? ToInteger(index). | ||
// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length). | ||
var toAbsoluteIndex = function (index, length) { | ||
var integer = toInteger(index); | ||
return integer < 0 ? max(integer + length, 0) : min$1(integer, length); | ||
}; | ||
var copyConstructorProperties = function (target, source) { | ||
var keys = ownKeys(source); | ||
var defineProperty = objectDefineProperty.f; | ||
var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f; | ||
for (var i = 0; i < keys.length; i++) { | ||
var key = keys[i]; | ||
if (!has(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key)); | ||
} | ||
}; | ||
// `Array.prototype.{ indexOf, includes }` methods implementation | ||
var createMethod = function (IS_INCLUDES) { | ||
return function ($this, el, fromIndex) { | ||
var O = toIndexedObject($this); | ||
var length = toLength(O.length); | ||
var index = toAbsoluteIndex(fromIndex, length); | ||
var value; | ||
// Array#includes uses SameValueZero equality algorithm | ||
// eslint-disable-next-line no-self-compare -- NaN check | ||
if (IS_INCLUDES && el != el) while (length > index) { | ||
value = O[index++]; | ||
// eslint-disable-next-line no-self-compare -- NaN check | ||
if (value != value) return true; | ||
// Array#indexOf ignores holes, Array#includes - not | ||
} else for (;length > index; index++) { | ||
if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0; | ||
} return !IS_INCLUDES && -1; | ||
}; | ||
}; | ||
var replacement = /#|\.prototype\./; | ||
var arrayIncludes = { | ||
// `Array.prototype.includes` method | ||
// https://tc39.es/ecma262/#sec-array.prototype.includes | ||
includes: createMethod(true), | ||
// `Array.prototype.indexOf` method | ||
// https://tc39.es/ecma262/#sec-array.prototype.indexof | ||
indexOf: createMethod(false) | ||
}; | ||
var isForced = function (feature, detection) { | ||
var value = data[normalize(feature)]; | ||
return value == POLYFILL ? true | ||
: value == NATIVE ? false | ||
: typeof detection == 'function' ? fails(detection) | ||
: !!detection; | ||
}; | ||
var indexOf = arrayIncludes.indexOf; | ||
var normalize = isForced.normalize = function (string) { | ||
return String(string).replace(replacement, '.').toLowerCase(); | ||
}; | ||
var data = isForced.data = {}; | ||
var NATIVE = isForced.NATIVE = 'N'; | ||
var POLYFILL = isForced.POLYFILL = 'P'; | ||
var objectKeysInternal = function (object, names) { | ||
var O = toIndexedObject(object); | ||
var i = 0; | ||
var result = []; | ||
var key; | ||
for (key in O) !has(hiddenKeys, key) && has(O, key) && result.push(key); | ||
// Don't enum bug & hidden keys | ||
while (names.length > i) if (has(O, key = names[i++])) { | ||
~indexOf(result, key) || result.push(key); | ||
} | ||
return result; | ||
}; | ||
var isForced_1 = isForced; | ||
// IE8- don't enum bug keys | ||
var enumBugKeys = [ | ||
'constructor', | ||
'hasOwnProperty', | ||
'isPrototypeOf', | ||
'propertyIsEnumerable', | ||
'toLocaleString', | ||
'toString', | ||
'valueOf' | ||
]; | ||
var getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f; | ||
var hiddenKeys$1 = enumBugKeys.concat('length', 'prototype'); | ||
// `Object.getOwnPropertyNames` method | ||
// https://tc39.es/ecma262/#sec-object.getownpropertynames | ||
// eslint-disable-next-line es/no-object-getownpropertynames -- safe | ||
var f$3 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { | ||
return objectKeysInternal(O, hiddenKeys$1); | ||
}; | ||
var objectGetOwnPropertyNames = { | ||
f: f$3 | ||
}; | ||
// eslint-disable-next-line es/no-object-getownpropertysymbols -- safe | ||
var f$4 = Object.getOwnPropertySymbols; | ||
var objectGetOwnPropertySymbols = { | ||
f: f$4 | ||
}; | ||
// all object keys, includes non-enumerable and symbols | ||
var ownKeys$1 = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) { | ||
var keys = objectGetOwnPropertyNames.f(anObject(it)); | ||
var getOwnPropertySymbols = objectGetOwnPropertySymbols.f; | ||
return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys; | ||
}; | ||
/* | ||
options.target - name of the target object | ||
options.global - target is the global object | ||
options.stat - export as static methods of target | ||
options.proto - export as prototype methods of target | ||
options.real - real prototype method for the `pure` version | ||
options.forced - export even if the native feature is available | ||
options.bind - bind methods to the target, required for the `pure` version | ||
options.wrap - wrap constructors to preventing global pollution, required for the `pure` version | ||
options.unsafe - use the simple assignment of property instead of delete + defineProperty | ||
options.sham - add a flag to not completely full polyfills | ||
options.enumerable - export as enumerable property | ||
options.noTargetGet - prevent calling a getter on target | ||
*/ | ||
var _export = function (options, source) { | ||
var TARGET = options.target; | ||
var GLOBAL = options.global; | ||
var STATIC = options.stat; | ||
var FORCED, target, key, targetProperty, sourceProperty, descriptor; | ||
if (GLOBAL) { | ||
target = global_1; | ||
} else if (STATIC) { | ||
target = global_1[TARGET] || setGlobal(TARGET, {}); | ||
} else { | ||
target = (global_1[TARGET] || {}).prototype; | ||
} | ||
if (target) for (key in source) { | ||
sourceProperty = source[key]; | ||
if (options.noTargetGet) { | ||
descriptor = getOwnPropertyDescriptor$1(target, key); | ||
targetProperty = descriptor && descriptor.value; | ||
} else targetProperty = target[key]; | ||
FORCED = isForced_1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced); | ||
// contained in target | ||
if (!FORCED && targetProperty !== undefined) { | ||
if (typeof sourceProperty === typeof targetProperty) continue; | ||
copyConstructorProperties(sourceProperty, targetProperty); | ||
} | ||
// add a flag to not completely full polyfills | ||
if (options.sham || (targetProperty && targetProperty.sham)) { | ||
createNonEnumerableProperty(sourceProperty, 'sham', true); | ||
} | ||
// extend global | ||
redefine(target, key, sourceProperty, options); | ||
} | ||
}; | ||
var copyConstructorProperties = function (target, source) { | ||
var keys = ownKeys$1(source); | ||
var defineProperty = objectDefineProperty.f; | ||
var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f; | ||
for (var i = 0; i < keys.length; i++) { | ||
var key = keys[i]; | ||
if (!has(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key)); | ||
} | ||
}; | ||
// `IsArray` abstract operation | ||
// https://tc39.github.io/ecma262/#sec-isarray | ||
var isArray = Array.isArray || function isArray(arg) { | ||
return classofRaw(arg) == 'Array'; | ||
}; | ||
var replacement = /#|\.prototype\./; | ||
// `ToObject` abstract operation | ||
// https://tc39.github.io/ecma262/#sec-toobject | ||
var toObject = function (argument) { | ||
return Object(requireObjectCoercible(argument)); | ||
}; | ||
var isForced = function (feature, detection) { | ||
var value = data[normalize(feature)]; | ||
return value == POLYFILL ? true | ||
: value == NATIVE ? false | ||
: typeof detection == 'function' ? fails(detection) | ||
: !!detection; | ||
}; | ||
var createProperty = function (object, key, value) { | ||
var propertyKey = toPrimitive(key); | ||
if (propertyKey in object) objectDefineProperty.f(object, propertyKey, createPropertyDescriptor(0, value)); | ||
else object[propertyKey] = value; | ||
}; | ||
var normalize = isForced.normalize = function (string) { | ||
return String(string).replace(replacement, '.').toLowerCase(); | ||
}; | ||
var nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () { | ||
// Chrome 38 Symbol has incorrect toString conversion | ||
// eslint-disable-next-line no-undef | ||
return !String(Symbol()); | ||
}); | ||
var data = isForced.data = {}; | ||
var NATIVE = isForced.NATIVE = 'N'; | ||
var POLYFILL = isForced.POLYFILL = 'P'; | ||
var useSymbolAsUid = nativeSymbol | ||
// eslint-disable-next-line no-undef | ||
&& !Symbol.sham | ||
// eslint-disable-next-line no-undef | ||
&& typeof Symbol.iterator == 'symbol'; | ||
var isForced_1 = isForced; | ||
var WellKnownSymbolsStore = shared('wks'); | ||
var Symbol$1 = global_1.Symbol; | ||
var createWellKnownSymbol = useSymbolAsUid ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid; | ||
var getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f; | ||
var wellKnownSymbol = function (name) { | ||
if (!has(WellKnownSymbolsStore, name)) { | ||
if (nativeSymbol && has(Symbol$1, name)) WellKnownSymbolsStore[name] = Symbol$1[name]; | ||
else WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name); | ||
} return WellKnownSymbolsStore[name]; | ||
}; | ||
var SPECIES = wellKnownSymbol('species'); | ||
// `ArraySpeciesCreate` abstract operation | ||
// https://tc39.github.io/ecma262/#sec-arrayspeciescreate | ||
var arraySpeciesCreate = function (originalArray, length) { | ||
var C; | ||
if (isArray(originalArray)) { | ||
C = originalArray.constructor; | ||
// cross-realm fallback | ||
if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined; | ||
else if (isObject(C)) { | ||
C = C[SPECIES]; | ||
if (C === null) C = undefined; | ||
} | ||
} return new (C === undefined ? Array : C)(length === 0 ? 0 : length); | ||
}; | ||
var engineUserAgent = getBuiltIn('navigator', 'userAgent') || ''; | ||
var process = global_1.process; | ||
var versions = process && process.versions; | ||
var v8 = versions && versions.v8; | ||
var match, version; | ||
if (v8) { | ||
match = v8.split('.'); | ||
version = match[0] + match[1]; | ||
} else if (engineUserAgent) { | ||
match = engineUserAgent.match(/Edge\/(\d+)/); | ||
if (!match || match[1] >= 74) { | ||
match = engineUserAgent.match(/Chrome\/(\d+)/); | ||
if (match) version = match[1]; | ||
} | ||
} | ||
/* | ||
options.target - name of the target object | ||
options.global - target is the global object | ||
options.stat - export as static methods of target | ||
options.proto - export as prototype methods of target | ||
options.real - real prototype method for the `pure` version | ||
options.forced - export even if the native feature is available | ||
options.bind - bind methods to the target, required for the `pure` version | ||
options.wrap - wrap constructors to preventing global pollution, required for the `pure` version | ||
options.unsafe - use the simple assignment of property instead of delete + defineProperty | ||
options.sham - add a flag to not completely full polyfills | ||
options.enumerable - export as enumerable property | ||
options.noTargetGet - prevent calling a getter on target | ||
*/ | ||
var _export = function (options, source) { | ||
var TARGET = options.target; | ||
var GLOBAL = options.global; | ||
var STATIC = options.stat; | ||
var FORCED, target, key, targetProperty, sourceProperty, descriptor; | ||
if (GLOBAL) { | ||
target = global_1; | ||
} else if (STATIC) { | ||
target = global_1[TARGET] || setGlobal(TARGET, {}); | ||
} else { | ||
target = (global_1[TARGET] || {}).prototype; | ||
} | ||
if (target) for (key in source) { | ||
sourceProperty = source[key]; | ||
if (options.noTargetGet) { | ||
descriptor = getOwnPropertyDescriptor$1(target, key); | ||
targetProperty = descriptor && descriptor.value; | ||
} else targetProperty = target[key]; | ||
FORCED = isForced_1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced); | ||
// contained in target | ||
if (!FORCED && targetProperty !== undefined) { | ||
if (typeof sourceProperty === typeof targetProperty) continue; | ||
copyConstructorProperties(sourceProperty, targetProperty); | ||
} | ||
// add a flag to not completely full polyfills | ||
if (options.sham || (targetProperty && targetProperty.sham)) { | ||
createNonEnumerableProperty(sourceProperty, 'sham', true); | ||
} | ||
// extend global | ||
redefine(target, key, sourceProperty, options); | ||
} | ||
}; | ||
var engineV8Version = version && +version; | ||
// `IsArray` abstract operation | ||
// https://tc39.es/ecma262/#sec-isarray | ||
// eslint-disable-next-line es/no-array-isarray -- safe | ||
var isArray = Array.isArray || function isArray(arg) { | ||
return classofRaw(arg) == 'Array'; | ||
}; | ||
var SPECIES$1 = wellKnownSymbol('species'); | ||
var createProperty = function (object, key, value) { | ||
var propertyKey = toPrimitive(key); | ||
if (propertyKey in object) objectDefineProperty.f(object, propertyKey, createPropertyDescriptor(0, value)); | ||
else object[propertyKey] = value; | ||
}; | ||
var arrayMethodHasSpeciesSupport = function (METHOD_NAME) { | ||
// We can't use this feature detection in V8 since it causes | ||
// deoptimization and serious performance degradation | ||
// https://github.com/zloirock/core-js/issues/677 | ||
return engineV8Version >= 51 || !fails(function () { | ||
var array = []; | ||
var constructor = array.constructor = {}; | ||
constructor[SPECIES$1] = function () { | ||
return { foo: 1 }; | ||
}; | ||
return array[METHOD_NAME](Boolean).foo !== 1; | ||
}); | ||
}; | ||
var engineUserAgent = getBuiltIn('navigator', 'userAgent') || ''; | ||
var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable'); | ||
var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF; | ||
var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded'; | ||
var process = global_1.process; | ||
var versions = process && process.versions; | ||
var v8 = versions && versions.v8; | ||
var match, version; | ||
// We can't use this feature detection in V8 since it causes | ||
// deoptimization and serious performance degradation | ||
// https://github.com/zloirock/core-js/issues/679 | ||
var IS_CONCAT_SPREADABLE_SUPPORT = engineV8Version >= 51 || !fails(function () { | ||
var array = []; | ||
array[IS_CONCAT_SPREADABLE] = false; | ||
return array.concat()[0] !== array; | ||
}); | ||
if (v8) { | ||
match = v8.split('.'); | ||
version = match[0] < 4 ? 1 : match[0] + match[1]; | ||
} else if (engineUserAgent) { | ||
match = engineUserAgent.match(/Edge\/(\d+)/); | ||
if (!match || match[1] >= 74) { | ||
match = engineUserAgent.match(/Chrome\/(\d+)/); | ||
if (match) version = match[1]; | ||
} | ||
} | ||
var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat'); | ||
var engineV8Version = version && +version; | ||
var isConcatSpreadable = function (O) { | ||
if (!isObject(O)) return false; | ||
var spreadable = O[IS_CONCAT_SPREADABLE]; | ||
return spreadable !== undefined ? !!spreadable : isArray(O); | ||
}; | ||
/* eslint-disable es/no-symbol -- required for testing */ | ||
var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT; | ||
// `Array.prototype.concat` method | ||
// https://tc39.github.io/ecma262/#sec-array.prototype.concat | ||
// with adding support of @@isConcatSpreadable and @@species | ||
_export({ target: 'Array', proto: true, forced: FORCED }, { | ||
concat: function concat(arg) { // eslint-disable-line no-unused-vars | ||
var O = toObject(this); | ||
var A = arraySpeciesCreate(O, 0); | ||
var n = 0; | ||
var i, k, length, len, E; | ||
for (i = -1, length = arguments.length; i < length; i++) { | ||
E = i === -1 ? O : arguments[i]; | ||
if (isConcatSpreadable(E)) { | ||
len = toLength(E.length); | ||
if (n + len > MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED); | ||
for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]); | ||
} else { | ||
if (n >= MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED); | ||
createProperty(A, n++, E); | ||
} | ||
} | ||
A.length = n; | ||
return A; | ||
} | ||
}); | ||
function _defineProperty(obj, key, value) { | ||
if (key in obj) { | ||
Object.defineProperty(obj, key, { | ||
value: value, | ||
enumerable: true, | ||
configurable: true, | ||
writable: true | ||
}); | ||
} else { | ||
obj[key] = value; | ||
} | ||
// eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing | ||
var nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () { | ||
var symbol = Symbol(); | ||
// Chrome 38 Symbol has incorrect toString conversion | ||
// `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances | ||
return !String(symbol) || !(Object(symbol) instanceof Symbol) || | ||
// Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances | ||
!Symbol.sham && engineV8Version && engineV8Version < 41; | ||
}); | ||
return obj; | ||
} | ||
/* eslint-disable es/no-symbol -- required for testing */ | ||
function ownKeys$1(object, enumerableOnly) { | ||
var keys = Object.keys(object); | ||
if (Object.getOwnPropertySymbols) { | ||
var symbols = Object.getOwnPropertySymbols(object); | ||
if (enumerableOnly) symbols = symbols.filter(function (sym) { | ||
return Object.getOwnPropertyDescriptor(object, sym).enumerable; | ||
}); | ||
keys.push.apply(keys, symbols); | ||
} | ||
var useSymbolAsUid = nativeSymbol | ||
&& !Symbol.sham | ||
&& typeof Symbol.iterator == 'symbol'; | ||
return keys; | ||
} | ||
var WellKnownSymbolsStore = shared('wks'); | ||
var Symbol$1 = global_1.Symbol; | ||
var createWellKnownSymbol = useSymbolAsUid ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid; | ||
function _objectSpread2(target) { | ||
for (var i = 1; i < arguments.length; i++) { | ||
var source = arguments[i] != null ? arguments[i] : {}; | ||
var wellKnownSymbol = function (name) { | ||
if (!has(WellKnownSymbolsStore, name) || !(nativeSymbol || typeof WellKnownSymbolsStore[name] == 'string')) { | ||
if (nativeSymbol && has(Symbol$1, name)) { | ||
WellKnownSymbolsStore[name] = Symbol$1[name]; | ||
} else { | ||
WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name); | ||
} | ||
} return WellKnownSymbolsStore[name]; | ||
}; | ||
if (i % 2) { | ||
ownKeys$1(Object(source), true).forEach(function (key) { | ||
_defineProperty(target, key, source[key]); | ||
}); | ||
} else if (Object.getOwnPropertyDescriptors) { | ||
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); | ||
} else { | ||
ownKeys$1(Object(source)).forEach(function (key) { | ||
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); | ||
}); | ||
} | ||
} | ||
var SPECIES = wellKnownSymbol('species'); | ||
return target; | ||
} | ||
// `ArraySpeciesCreate` abstract operation | ||
// https://tc39.es/ecma262/#sec-arrayspeciescreate | ||
var arraySpeciesCreate = function (originalArray, length) { | ||
var C; | ||
if (isArray(originalArray)) { | ||
C = originalArray.constructor; | ||
// cross-realm fallback | ||
if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined; | ||
else if (isObject(C)) { | ||
C = C[SPECIES]; | ||
if (C === null) C = undefined; | ||
} | ||
} return new (C === undefined ? Array : C)(length === 0 ? 0 : length); | ||
}; | ||
function _newArrowCheck(innerThis, boundThis) { | ||
if (innerThis !== boundThis) { | ||
throw new TypeError("Cannot instantiate an arrow function"); | ||
} | ||
} | ||
var SPECIES$1 = wellKnownSymbol('species'); | ||
var script = { | ||
components: { | ||
widget: bpDialog.bpWidget | ||
}, | ||
props: { | ||
visible: Boolean, | ||
mask: { | ||
"default": false, | ||
type: Boolean | ||
}, | ||
maskClose: { | ||
"default": true, | ||
type: Boolean | ||
}, | ||
pageClass: String | Array, | ||
pageStyle: String | Array | Object, | ||
direction: { | ||
"default": 'auto', | ||
type: String | ||
}, | ||
trigger: { | ||
type: String | ||
}, | ||
bind: {} | ||
}, | ||
computed: { | ||
pStyle: function pStyle() { | ||
if (this.pageStyle) { | ||
if (typeof this.pageStyle === 'string') { | ||
return "left:".concat(this.offsetLeft, ";top:").concat(this.offsetTop, ";") + this.pageStyle; | ||
} else { | ||
return _objectSpread2({ | ||
left: this.offsetLeft, | ||
top: this.offsetTop | ||
}, this.pageStyle); | ||
} | ||
} else { | ||
return { | ||
left: this.offsetLeft, | ||
top: this.offsetTop | ||
}; | ||
} | ||
} | ||
}, | ||
data: function data() { | ||
return { | ||
visibleReal: false, | ||
directionData: 'auto', | ||
offsetTop: 0, | ||
offsetLeft: 0, | ||
offsetArrowLeft: null, | ||
offsetArrowTop: null, | ||
offsetArrowBottom: null, | ||
offsetArrowRight: null | ||
}; | ||
}, | ||
watch: { | ||
visible: function visible(v, oldV) { | ||
if (this.visibleReal != v) { | ||
this.visibleReal = v; | ||
var arrayMethodHasSpeciesSupport = function (METHOD_NAME) { | ||
// We can't use this feature detection in V8 since it causes | ||
// deoptimization and serious performance degradation | ||
// https://github.com/zloirock/core-js/issues/677 | ||
return engineV8Version >= 51 || !fails(function () { | ||
var array = []; | ||
var constructor = array.constructor = {}; | ||
constructor[SPECIES$1] = function () { | ||
return { foo: 1 }; | ||
}; | ||
return array[METHOD_NAME](Boolean).foo !== 1; | ||
}); | ||
}; | ||
if (v != oldV && v) { | ||
this._show(this.direction); // this._show('top'); | ||
// this._show('bottom'); | ||
// this._show('left'); | ||
// this._show('right'); | ||
var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable'); | ||
var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF; | ||
var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded'; | ||
} | ||
} | ||
}, | ||
visibleReal: function visibleReal(v) { | ||
this.$emit('update:visible', v); | ||
}, | ||
bind: function bind(v, oldV) { | ||
this._removeEvent(oldV); | ||
// We can't use this feature detection in V8 since it causes | ||
// deoptimization and serious performance degradation | ||
// https://github.com/zloirock/core-js/issues/679 | ||
var IS_CONCAT_SPREADABLE_SUPPORT = engineV8Version >= 51 || !fails(function () { | ||
var array = []; | ||
array[IS_CONCAT_SPREADABLE] = false; | ||
return array.concat()[0] !== array; | ||
}); | ||
this._bindEvent(v); | ||
} | ||
}, | ||
beforeMount: function beforeMount() { | ||
this.visibleReal = this.visible; | ||
}, | ||
beforeDestroy: function beforeDestroy() { | ||
$('body').off('click', this._hide); | ||
}, | ||
mounted: function mounted() { | ||
var _this = this; | ||
var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat'); | ||
// $('body').off('click', this._hide).on('click', this._hide); | ||
// if (this.trigger) { | ||
// let el = $(this.$el).parent(); | ||
// this._bindEvent(el); | ||
// } | ||
this.$nextTick(function () { | ||
_newArrowCheck(this, _this); | ||
var isConcatSpreadable = function (O) { | ||
if (!isObject(O)) return false; | ||
var spreadable = O[IS_CONCAT_SPREADABLE]; | ||
return spreadable !== undefined ? !!spreadable : isArray(O); | ||
}; | ||
this.$parent.$forceUpdate(); | ||
}.bind(this)); | ||
}, | ||
methods: { | ||
/** | ||
* @desc: 显示 | ||
* @return promise. | ||
*/ | ||
show: function show() { | ||
return this.$refs.widget.show(); | ||
}, | ||
var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT; | ||
/** | ||
* @desc: 隐藏. | ||
* @return promise. | ||
*/ | ||
hide: function hide() { | ||
return this.$refs.widget.hide(); | ||
}, | ||
_removeEvent: function _removeEvent(v) { | ||
if (v) { | ||
var el; | ||
// `Array.prototype.concat` method | ||
// https://tc39.es/ecma262/#sec-array.prototype.concat | ||
// with adding support of @@isConcatSpreadable and @@species | ||
_export({ target: 'Array', proto: true, forced: FORCED }, { | ||
// eslint-disable-next-line no-unused-vars -- required for `.length` | ||
concat: function concat(arg) { | ||
var O = toObject(this); | ||
var A = arraySpeciesCreate(O, 0); | ||
var n = 0; | ||
var i, k, length, len, E; | ||
for (i = -1, length = arguments.length; i < length; i++) { | ||
E = i === -1 ? O : arguments[i]; | ||
if (isConcatSpreadable(E)) { | ||
len = toLength(E.length); | ||
if (n + len > MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED); | ||
for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]); | ||
} else { | ||
if (n >= MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED); | ||
createProperty(A, n++, E); | ||
} | ||
} | ||
A.length = n; | ||
return A; | ||
} | ||
}); | ||
if (bpLibs.dom.isVueObject(v)) { | ||
el = v.$el; | ||
} else { | ||
el = v; | ||
} | ||
var script = { | ||
components: { | ||
widget: bpDialog.bpWidget | ||
}, | ||
props: { | ||
visible: Boolean, | ||
mask: { | ||
"default": false, | ||
type: Boolean | ||
}, | ||
maskClose: { | ||
"default": true, | ||
type: Boolean | ||
}, | ||
pageClass: String | Array, | ||
pageStyle: String | Array | Object, | ||
direction: { | ||
"default": 'auto', | ||
type: String | ||
}, | ||
trigger: { | ||
type: String | ||
}, | ||
bind: {} | ||
}, | ||
computed: { | ||
pStyle: function pStyle() { | ||
if (this.pageStyle) { | ||
if (typeof this.pageStyle === 'string') { | ||
return "left:".concat(this.offsetLeft, ";top:").concat(this.offsetTop, ";") + this.pageStyle; | ||
} else { | ||
return _objectSpread2({ | ||
left: this.offsetLeft, | ||
top: this.offsetTop | ||
}, this.pageStyle); | ||
} | ||
} else { | ||
return { | ||
left: this.offsetLeft, | ||
top: this.offsetTop | ||
}; | ||
} | ||
} | ||
}, | ||
data: function data() { | ||
return { | ||
visibleReal: false, | ||
directionData: 'auto', | ||
offsetTop: 0, | ||
offsetLeft: 0, | ||
offsetArrowLeft: null, | ||
offsetArrowTop: null, | ||
offsetArrowBottom: null, | ||
offsetArrowRight: null | ||
}; | ||
}, | ||
watch: { | ||
visible: function visible(v, oldV) { | ||
if (this.visibleReal != v) { | ||
this.visibleReal = v; | ||
$(el).off('mouseover', this._onTrigger); | ||
$(el).off('mouseleave', this._onTriggerHide); | ||
$(el).off('click', this._onTrigger); | ||
} | ||
}, | ||
_bindEvent: function _bindEvent(v) { | ||
this._removeEvent(v); | ||
if (v != oldV && v) { | ||
this._show(this.direction); // this._show('top'); | ||
// this._show('bottom'); | ||
// this._show('left'); | ||
// this._show('right'); | ||
if (v) { | ||
var el; | ||
} | ||
} | ||
}, | ||
visibleReal: function visibleReal(v) { | ||
this.$emit('update:visible', v); | ||
}, | ||
bind: function bind(v, oldV) { | ||
this._removeEvent(oldV); | ||
if (bpLibs.dom.isVueObject(v)) { | ||
el = v.$el; | ||
} else { | ||
el = v; | ||
} | ||
this._bindEvent(v); | ||
} | ||
}, | ||
beforeMount: function beforeMount() { | ||
this.visibleReal = this.visible; | ||
}, | ||
beforeDestroy: function beforeDestroy() { | ||
$('body').off('click', this._hide); | ||
}, | ||
mounted: function mounted() { | ||
var _this = this; | ||
if (this.trigger == 'hover') { | ||
if (bpLibs.device.browserIsMobile()) { | ||
$(el).on('click', this._onTrigger); | ||
} else { | ||
$(el).on('mouseover', this._onTrigger); | ||
$(el).on('mouseleave', this._onTriggerHide); | ||
} | ||
} else if (this.trigger == 'click') { | ||
var eventName = bpLibs.device.browserIsMobile() ? 'click' : 'click'; | ||
$(el).off(eventName, this._onTrigger).on(eventName, this._onTrigger); | ||
} | ||
} | ||
}, | ||
_onTrigger: function _onTrigger(ev) { | ||
var _this2 = this; | ||
// $('body').off('click', this._hide).on('click', this._hide); | ||
// if (this.trigger) { | ||
// let el = $(this.$el).parent(); | ||
// this._bindEvent(el); | ||
// } | ||
this.$nextTick(function () { | ||
_newArrowCheck(this, _this); | ||
this.visibleReal = true; | ||
setTimeout(function () { | ||
_newArrowCheck(this, _this2); | ||
this.$parent.$forceUpdate(); | ||
}.bind(this)); | ||
}, | ||
methods: { | ||
/** | ||
* @desc: 显示 | ||
* @return promise. | ||
*/ | ||
show: function show() { | ||
return this.$refs.widget.show(); | ||
}, | ||
$('body').off('click', this._hide).on('click', this._hide); | ||
}.bind(this), 10); | ||
/** | ||
* @desc: 隐藏. | ||
* @return promise. | ||
*/ | ||
hide: function hide() { | ||
return this.$refs.widget.hide(); | ||
}, | ||
_removeEvent: function _removeEvent(v) { | ||
if (v) { | ||
var el; | ||
this._show(this.direction); | ||
}, | ||
_onTriggerHide: function _onTriggerHide(ev) { | ||
this.visibleReal = false; | ||
$('body').off('click', this._hide); | ||
}, | ||
_show: function _show(directionData) { | ||
var _this3 = this; | ||
if (bpLibs.dom.isVueObject(v)) { | ||
el = v.$el; | ||
} else { | ||
el = v; | ||
} | ||
var bind = this.bind; | ||
$(el).off('mouseover', this._onTrigger); | ||
$(el).off('mouseleave', this._onTriggerHide); | ||
$(el).off('click', this._onTrigger); | ||
} | ||
}, | ||
_bindEvent: function _bindEvent(v) { | ||
this._removeEvent(v); | ||
if (!this.bind) { | ||
return; | ||
} | ||
if (v) { | ||
var el; | ||
var el; | ||
if (bpLibs.dom.isVueObject(v)) { | ||
el = v.$el; | ||
} else { | ||
el = v; | ||
} | ||
if (bpLibs.dom.isVueObject(bind)) { | ||
el = bind.$el; | ||
} else { | ||
el = bind; | ||
} | ||
if (this.trigger == 'hover') { | ||
if (bpLibs.device.browserIsMobile()) { | ||
$(el).on('click', this._onTrigger); | ||
} else { | ||
$(el).on('mouseover', this._onTrigger); | ||
$(el).on('mouseleave', this._onTriggerHide); | ||
} | ||
} else if (this.trigger == 'click') { | ||
var eventName = bpLibs.device.browserIsMobile() ? 'click' : 'click'; | ||
$(el).off(eventName, this._onTrigger).on(eventName, this._onTrigger); | ||
} | ||
} | ||
}, | ||
_onTrigger: function _onTrigger(ev) { | ||
var _this2 = this; | ||
var offset = bpLibs.dom.getElementOffset(el); | ||
var port = {}; | ||
port.height = el.clientHeight; | ||
port.width = el.clientWidth; | ||
var viewPort = bpLibs.dom.getViewPort(); | ||
var docOffset = bpLibs.dom.getDocumentOffset(); | ||
this.offsetTop = offset.top + docOffset.top; // this.offsetLeft = offset.left; | ||
// directionData. | ||
this.visibleReal = true; | ||
setTimeout(function () { | ||
_newArrowCheck(this, _this2); | ||
if (directionData == 'top') { | ||
this.directionData = 'top'; | ||
this.offsetTop -= port.height; | ||
this.offsetTop -= 8; | ||
} else if (directionData == 'bottom') { | ||
this.directionData = 'bottom'; | ||
this.offsetTop += port.height; | ||
} else if (directionData == 'left') { | ||
this.directionData = 'left'; | ||
this.offsetLeft = offset.left + port.width; | ||
} else if (directionData == 'right') { | ||
this.directionData = 'right'; | ||
this.offsetLeft = offset.left + port.width; | ||
} else { | ||
if (offset.top + port.height / 2 > viewPort.height / 2) { | ||
this.directionData = 'top'; | ||
this.offsetTop -= port.height; | ||
this.offsetTop -= 8; | ||
} else { | ||
this.directionData = 'bottom'; | ||
this.offsetTop += port.height; | ||
} | ||
} | ||
$('body').off('click', this._hide).on('click', this._hide); | ||
}.bind(this), 10); | ||
this.offsetTop = parseInt(this.offsetTop); | ||
this.offsetTop += 'px'; // arrow. | ||
this._show(this.direction); | ||
}, | ||
_onTriggerHide: function _onTriggerHide(ev) { | ||
this.visibleReal = false; | ||
$('body').off('click', this._hide); | ||
}, | ||
_show: function _show(directionData) { | ||
var _this3 = this; | ||
var arrowOffset; | ||
var bind = this.bind; | ||
if (directionData == 'left' || directionData == 'right') { | ||
arrowOffset = parseInt(offset.top + port.height / 2); | ||
} else { | ||
arrowOffset = parseInt(offset.left + port.width / 2); | ||
} | ||
if (!this.bind) { | ||
return; | ||
} | ||
var SCREEN_PADDING = 10; | ||
var main = this.$refs.main; | ||
bpLibs.dom.probeDom(400, function () { | ||
_newArrowCheck(this, _this3); | ||
var el; | ||
return main.clientWidth > 0; | ||
}.bind(this), function () { | ||
_newArrowCheck(this, _this3); | ||
if (bpLibs.dom.isVueObject(bind)) { | ||
el = bind.$el; | ||
} else { | ||
el = bind; | ||
} | ||
if (directionData == 'left' || directionData == 'right') { | ||
var mainOffset = parseInt(arrowOffset - main.clientHeight / 2); | ||
var offset = bpLibs.dom.getElementOffset(el); | ||
var port = {}; | ||
port.height = el.clientHeight; | ||
port.width = el.clientWidth; | ||
var viewPort = bpLibs.dom.getViewPort(); | ||
var docOffset = bpLibs.dom.getDocumentOffset(); | ||
this.offsetTop = offset.top + docOffset.top; // this.offsetLeft = offset.left; | ||
// directionData. | ||
if (mainOffset < SCREEN_PADDING) { | ||
mainOffset = SCREEN_PADDING; | ||
} | ||
if (directionData == 'top') { | ||
this.directionData = 'top'; | ||
this.offsetTop -= port.height; | ||
this.offsetTop -= 8; | ||
} else if (directionData == 'bottom') { | ||
this.directionData = 'bottom'; | ||
this.offsetTop += port.height; | ||
} else if (directionData == 'left') { | ||
this.directionData = 'left'; | ||
this.offsetLeft = offset.left + port.width; | ||
} else if (directionData == 'right') { | ||
this.directionData = 'right'; | ||
this.offsetLeft = offset.left + port.width; | ||
} else { | ||
if (offset.top + port.height / 2 > viewPort.height / 2) { | ||
this.directionData = 'top'; | ||
this.offsetTop -= port.height; | ||
this.offsetTop -= 8; | ||
} else { | ||
this.directionData = 'bottom'; | ||
this.offsetTop += port.height; | ||
} | ||
} | ||
if (mainOffset + main.clientHeight > viewPort.height - SCREEN_PADDING) { | ||
mainOffset = viewPort.height - SCREEN_PADDING - main.clientHeight; | ||
} | ||
this.offsetTop = parseInt(this.offsetTop); | ||
this.offsetTop += 'px'; // arrow. | ||
this.offsetTop = parseInt(mainOffset + docOffset.top) + 'px'; | ||
this.offsetLeft = directionData == 'right' ? offset.left + port.width - 6 : offset.left - main.clientWidth - 6; | ||
this.offsetLeft += docOffset.left; | ||
this.offsetLeft = parseInt(this.offsetLeft); | ||
this.offsetLeft += 'px'; | ||
this.offsetArrowLeft = null; | ||
this.offsetArrowBottom = null; | ||
this.offsetArrowTop = parseInt(arrowOffset - mainOffset - 6); | ||
var arrowOffset; | ||
if (this.offsetArrowTop < 10) { | ||
this.offsetArrowTop = 10; | ||
} else if (this.offsetArrowTop > main.clientHeight - 22) { | ||
this.offsetArrowTop = parseInt(main.clientHeight - 22); | ||
} | ||
if (directionData == 'left' || directionData == 'right') { | ||
arrowOffset = parseInt(offset.top + port.height / 2); | ||
} else { | ||
arrowOffset = parseInt(offset.left + port.width / 2); | ||
} | ||
this.offsetArrowTop += 'px'; | ||
this.offsetArrowRight = null; | ||
} else { | ||
var cw = parseInt(main.clientWidth || 50); | ||
var SCREEN_PADDING = 10; | ||
var main = this.$refs.main; | ||
bpLibs.dom.probeDom(400, function () { | ||
_newArrowCheck(this, _this3); | ||
var _mainOffset = parseInt(arrowOffset - cw / 2); | ||
return main.clientWidth > 0; | ||
}.bind(this), function () { | ||
_newArrowCheck(this, _this3); | ||
if (_mainOffset < SCREEN_PADDING) { | ||
_mainOffset = SCREEN_PADDING; | ||
} | ||
if (directionData == 'left' || directionData == 'right') { | ||
var mainOffset = parseInt(arrowOffset - main.clientHeight / 2); | ||
if (_mainOffset + cw > viewPort.width - SCREEN_PADDING) { | ||
_mainOffset = viewPort.width - SCREEN_PADDING - cw; | ||
} | ||
if (mainOffset < SCREEN_PADDING) { | ||
mainOffset = SCREEN_PADDING; | ||
} | ||
this.offsetLeft = parseInt(_mainOffset) + 'px'; | ||
this.offsetArrowLeft = parseInt(arrowOffset - _mainOffset) - 6; | ||
if (mainOffset + main.clientHeight > viewPort.height - SCREEN_PADDING) { | ||
mainOffset = viewPort.height - SCREEN_PADDING - main.clientHeight; | ||
} | ||
if (this.offsetArrowLeft < 10) { | ||
this.offsetArrowLeft = 10; | ||
} else if (this.offsetArrowLeft > cw - 22) { | ||
this.offsetArrowLeft = cw - 22; | ||
} | ||
this.offsetTop = parseInt(mainOffset + docOffset.top) + 'px'; | ||
this.offsetLeft = directionData == 'right' ? offset.left + port.width - 6 : offset.left - main.clientWidth - 6; | ||
this.offsetLeft += docOffset.left; | ||
this.offsetLeft = parseInt(this.offsetLeft); | ||
this.offsetLeft += 'px'; | ||
this.offsetArrowLeft = null; | ||
this.offsetArrowBottom = null; | ||
this.offsetArrowTop = parseInt(arrowOffset - mainOffset - 6); | ||
this.offsetArrowLeft += 'px'; | ||
this.offsetArrowBottom = null; | ||
this.offsetArrowTop = null; | ||
this.offsetArrowRight = null; | ||
} | ||
}.bind(this)); | ||
}, | ||
_hide: function _hide() { | ||
var _this4 = this; | ||
if (this.offsetArrowTop < 10) { | ||
this.offsetArrowTop = 10; | ||
} else if (this.offsetArrowTop > main.clientHeight - 22) { | ||
this.offsetArrowTop = parseInt(main.clientHeight - 22); | ||
} | ||
$('body').off('click', this._hide); | ||
this.hide().then(function (res) { | ||
_newArrowCheck(this, _this4); | ||
}.bind(this)); | ||
} | ||
} | ||
}; | ||
this.offsetArrowTop += 'px'; | ||
this.offsetArrowRight = null; | ||
} else { | ||
var cw = parseInt(main.clientWidth || 50); | ||
function normalizeComponent(template, style, script, scopeId, isFunctionalTemplate, moduleIdentifier | ||
/* server only */ | ||
, shadowMode, createInjector, createInjectorSSR, createInjectorShadow) { | ||
if (typeof shadowMode !== 'boolean') { | ||
createInjectorSSR = createInjector; | ||
createInjector = shadowMode; | ||
shadowMode = false; | ||
} // Vue.extend constructor export interop. | ||
var _mainOffset = parseInt(arrowOffset - cw / 2); | ||
if (_mainOffset < SCREEN_PADDING) { | ||
_mainOffset = SCREEN_PADDING; | ||
} | ||
var options = typeof script === 'function' ? script.options : script; // render functions | ||
if (_mainOffset + cw > viewPort.width - SCREEN_PADDING) { | ||
_mainOffset = viewPort.width - SCREEN_PADDING - cw; | ||
} | ||
if (template && template.render) { | ||
options.render = template.render; | ||
options.staticRenderFns = template.staticRenderFns; | ||
options._compiled = true; // functional template | ||
this.offsetLeft = parseInt(_mainOffset) + 'px'; | ||
this.offsetArrowLeft = parseInt(arrowOffset - _mainOffset) - 6; | ||
if (isFunctionalTemplate) { | ||
options.functional = true; | ||
} | ||
} // scopedId | ||
if (this.offsetArrowLeft < 10) { | ||
this.offsetArrowLeft = 10; | ||
} else if (this.offsetArrowLeft > cw - 22) { | ||
this.offsetArrowLeft = cw - 22; | ||
} | ||
this.offsetArrowLeft += 'px'; | ||
this.offsetArrowBottom = null; | ||
this.offsetArrowTop = null; | ||
this.offsetArrowRight = null; | ||
} | ||
}.bind(this)); | ||
}, | ||
_hide: function _hide() { | ||
var _this4 = this; | ||
if (scopeId) { | ||
options._scopeId = scopeId; | ||
} | ||
$('body').off('click', this._hide); | ||
this.hide().then(function (res) { | ||
_newArrowCheck(this, _this4); | ||
}.bind(this)); | ||
} | ||
} | ||
}; | ||
var hook; | ||
function normalizeComponent(template, style, script, scopeId, isFunctionalTemplate, moduleIdentifier | ||
/* server only */ | ||
, shadowMode, createInjector, createInjectorSSR, createInjectorShadow) { | ||
if (typeof shadowMode !== 'boolean') { | ||
createInjectorSSR = createInjector; | ||
createInjector = shadowMode; | ||
shadowMode = false; | ||
} // Vue.extend constructor export interop. | ||
if (moduleIdentifier) { | ||
// server build | ||
hook = function hook(context) { | ||
// 2.3 injection | ||
context = context || // cached call | ||
this.$vnode && this.$vnode.ssrContext || // stateful | ||
this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext; // functional | ||
// 2.2 with runInNewContext: true | ||
if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') { | ||
context = __VUE_SSR_CONTEXT__; | ||
} // inject component styles | ||
var options = typeof script === 'function' ? script.options : script; // render functions | ||
if (template && template.render) { | ||
options.render = template.render; | ||
options.staticRenderFns = template.staticRenderFns; | ||
options._compiled = true; // functional template | ||
if (style) { | ||
style.call(this, createInjectorSSR(context)); | ||
} // register component module identifier for async chunk inference | ||
if (isFunctionalTemplate) { | ||
options.functional = true; | ||
} | ||
} // scopedId | ||
if (context && context._registeredComponents) { | ||
context._registeredComponents.add(moduleIdentifier); | ||
} | ||
}; // used by ssr in case component is cached and beforeCreate | ||
// never gets called | ||
if (scopeId) { | ||
options._scopeId = scopeId; | ||
} | ||
var hook; | ||
options._ssrRegister = hook; | ||
} else if (style) { | ||
hook = shadowMode ? function (context) { | ||
style.call(this, createInjectorShadow(context, this.$root.$options.shadowRoot)); | ||
} : function (context) { | ||
style.call(this, createInjector(context)); | ||
}; | ||
} | ||
if (moduleIdentifier) { | ||
// server build | ||
hook = function hook(context) { | ||
// 2.3 injection | ||
context = context || // cached call | ||
this.$vnode && this.$vnode.ssrContext || // stateful | ||
this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext; // functional | ||
// 2.2 with runInNewContext: true | ||
if (hook) { | ||
if (options.functional) { | ||
// register for functional component in vue file | ||
var originalRender = options.render; | ||
if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') { | ||
context = __VUE_SSR_CONTEXT__; | ||
} // inject component styles | ||
options.render = function renderWithStyleInjection(h, context) { | ||
hook.call(context); | ||
return originalRender(h, context); | ||
}; | ||
} else { | ||
// inject component registration as beforeCreate hook | ||
var existing = options.beforeCreate; | ||
options.beforeCreate = existing ? [].concat(existing, hook) : [hook]; | ||
} | ||
} | ||
return script; | ||
} | ||
if (style) { | ||
style.call(this, createInjectorSSR(context)); | ||
} // register component module identifier for async chunk inference | ||
/* script */ | ||
var __vue_script__ = script; | ||
/* template */ | ||
var __vue_render__ = function __vue_render__() { | ||
var _vm = this; | ||
if (context && context._registeredComponents) { | ||
context._registeredComponents.add(moduleIdentifier); | ||
} | ||
}; // used by ssr in case component is cached and beforeCreate | ||
// never gets called | ||
var _h = _vm.$createElement; | ||
var _c = _vm._self._c || _h; | ||
options._ssrRegister = hook; | ||
} else if (style) { | ||
hook = shadowMode ? function (context) { | ||
style.call(this, createInjectorShadow(context, this.$root.$options.shadowRoot)); | ||
} : function (context) { | ||
style.call(this, createInjector(context)); | ||
}; | ||
} | ||
return _c("widget", { | ||
ref: "widget", | ||
staticClass: "bp-popover", | ||
attrs: { | ||
visible: _vm.visibleReal, | ||
maskClose: _vm.maskClose, | ||
mask: _vm.mask, | ||
preventEvent: false, | ||
hideBodyScroll: false, | ||
appendToBody: true | ||
}, | ||
on: { | ||
"update:visible": function updateVisible($event) { | ||
_vm.visibleReal = $event; | ||
} | ||
} | ||
}, [_c("div", { | ||
ref: "main", | ||
staticClass: "bp-popover__main", | ||
"class": _vm.pageClass, | ||
style: _vm.pStyle, | ||
attrs: { | ||
direction: _vm.directionData | ||
} | ||
}, [_vm._t("default"), _vm._v(" "), _c("div", { | ||
staticClass: "bp-popover__arrow", | ||
style: { | ||
left: _vm.offsetArrowLeft, | ||
top: _vm.offsetArrowTop, | ||
right: _vm.offsetArrowRight, | ||
bottom: _vm.offsetArrowBottom | ||
} | ||
})], 2)]); | ||
}; | ||
if (hook) { | ||
if (options.functional) { | ||
// register for functional component in vue file | ||
var originalRender = options.render; | ||
var __vue_staticRenderFns__ = []; | ||
__vue_render__._withStripped = true; | ||
/* style */ | ||
options.render = function renderWithStyleInjection(h, context) { | ||
hook.call(context); | ||
return originalRender(h, context); | ||
}; | ||
} else { | ||
// inject component registration as beforeCreate hook | ||
var existing = options.beforeCreate; | ||
options.beforeCreate = existing ? [].concat(existing, hook) : [hook]; | ||
} | ||
} | ||
var __vue_inject_styles__ = undefined; | ||
/* scoped */ | ||
return script; | ||
} | ||
var __vue_scope_id__ = undefined; | ||
/* module identifier */ | ||
/* script */ | ||
var __vue_script__ = script; | ||
/* template */ | ||
var __vue_module_identifier__ = undefined; | ||
/* functional template */ | ||
var __vue_render__ = function __vue_render__() { | ||
var _vm = this; | ||
var __vue_is_functional_template__ = false; | ||
/* style inject */ | ||
var _h = _vm.$createElement; | ||
/* style inject SSR */ | ||
var _c = _vm._self._c || _h; | ||
/* style inject shadow dom */ | ||
return _c("widget", { | ||
ref: "widget", | ||
staticClass: "bp-popover", | ||
attrs: { | ||
visible: _vm.visibleReal, | ||
maskClose: _vm.maskClose, | ||
mask: _vm.mask, | ||
preventEvent: false, | ||
hideBodyScroll: false, | ||
appendToBody: true | ||
}, | ||
on: { | ||
"update:visible": function updateVisible($event) { | ||
_vm.visibleReal = $event; | ||
} | ||
} | ||
}, [_c("div", { | ||
ref: "main", | ||
staticClass: "bp-popover__main", | ||
"class": _vm.pageClass, | ||
style: _vm.pStyle, | ||
attrs: { | ||
direction: _vm.directionData | ||
} | ||
}, [_vm._t("default"), _vm._v(" "), _c("div", { | ||
staticClass: "bp-popover__arrow", | ||
style: { | ||
left: _vm.offsetArrowLeft, | ||
top: _vm.offsetArrowTop, | ||
right: _vm.offsetArrowRight, | ||
bottom: _vm.offsetArrowBottom | ||
} | ||
})], 2)]); | ||
}; | ||
var __vue_component__ = /*#__PURE__*/normalizeComponent({ | ||
render: __vue_render__, | ||
staticRenderFns: __vue_staticRenderFns__ | ||
}, __vue_inject_styles__, __vue_script__, __vue_scope_id__, __vue_is_functional_template__, __vue_module_identifier__, false, undefined, undefined, undefined); | ||
var __vue_staticRenderFns__ = []; | ||
__vue_render__._withStripped = true; | ||
/* style */ | ||
var index = { | ||
bpPopover: __vue_component__ | ||
}; | ||
var __vue_inject_styles__ = undefined; | ||
/* scoped */ | ||
return index; | ||
var __vue_scope_id__ = undefined; | ||
/* module identifier */ | ||
var __vue_module_identifier__ = undefined; | ||
/* functional template */ | ||
var __vue_is_functional_template__ = false; | ||
/* style inject */ | ||
/* style inject SSR */ | ||
/* style inject shadow dom */ | ||
var __vue_component__ = /*#__PURE__*/normalizeComponent({ | ||
render: __vue_render__, | ||
staticRenderFns: __vue_staticRenderFns__ | ||
}, __vue_inject_styles__, __vue_script__, __vue_scope_id__, __vue_is_functional_template__, __vue_module_identifier__, false, undefined, undefined, undefined); | ||
var index = { | ||
bpPopover: __vue_component__ | ||
}; | ||
return index; | ||
}))); | ||
//# sourceMappingURL=index.js.map |
/*! | ||
* bpui popover v0.1.15 | ||
* bpui popover v0.1.16 | ||
* 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,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,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)},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=v(t),e=w(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},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,a=!!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?!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,o,r){var n,i=v(e),f=lt(i.length),s=function(t,e){var o=at(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\./,Tt=function(t,e){var o=St[Ot(t)];return o==At||o!=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,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,a){"boolean"!=typeof f&&(c=s,s=f,f=!1);var u,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?(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 o}!function(t,e){var o,r,n,f,s,c=t.target,a=t.global,u=t.stat;if(o=a?i:u?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(a?r:c+(u?".":"#")+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(),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,o),u.clientWidth>0}.bind(this),function(){if(Zt(this,o),"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 r=parseInt(u.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,appendToBody:!0},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)}})); | ||
!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";function o(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 r(t,e,o){return e in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function n(t,e){if(t!==e)throw new TypeError("Cannot instantiate an arrow function")}t=t&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t,e=e&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e;var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function f(t,e){return t(e={exports:{}},e.exports),e.exports}var s=function(t){return t&&t.Math==Math&&t},c=s("object"==typeof globalThis&&globalThis)||s("object"==typeof window&&window)||s("object"==typeof self&&self)||s("object"==typeof i&&i)||function(){return this}()||Function("return this")(),a=function(t){try{return!!t()}catch(t){return!0}},u=!a((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),l={}.propertyIsEnumerable,h=Object.getOwnPropertyDescriptor,p={f:h&&!l.call({1:2},1)?function(t){var e=h(this,t);return!!e&&e.enumerable}:l},d=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},g={}.toString,b=function(t){return g.call(t).slice(8,-1)},v="".split,y=a((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==b(t)?v.call(t,""):Object(t)}:Object,w=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},m=function(t){return y(w(t))},_=function(t){return"object"==typeof t?null!==t:"function"==typeof t},O=function(t,e){if(!_(t))return t;var o,r;if(e&&"function"==typeof(o=t.toString)&&!_(r=o.call(t)))return r;if("function"==typeof(o=t.valueOf)&&!_(r=o.call(t)))return r;if(!e&&"function"==typeof(o=t.toString)&&!_(r=o.call(t)))return r;throw TypeError("Can't convert object to primitive value")},T=function(t){return Object(w(t))},S={}.hasOwnProperty,j=Object.hasOwn||function(t,e){return S.call(T(t),e)},A=c.document,E=_(A)&&_(A.createElement),P=!u&&!a((function(){return 7!=Object.defineProperty((t="div",E?A.createElement(t):{}),"a",{get:function(){return 7}}).a;var t})),L=Object.getOwnPropertyDescriptor,x={f:u?L:function(t,e){if(t=m(t),e=O(e,!0),P)try{return L(t,e)}catch(t){}if(j(t,e))return d(!p.f.call(t,e),t[e])}},k=function(t){if(!_(t))throw TypeError(String(t)+" is not an object");return t},C=Object.defineProperty,I={f:u?C:function(t,e,o){if(k(t),e=O(e,!0),k(o),P)try{return C(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}},R=u?function(t,e,o){return I.f(t,e,d(1,o))}:function(t,e,o){return t[e]=o,t},D=function(t,e){try{R(c,t,e)}catch(o){c[t]=e}return e},M=c["__core-js_shared__"]||D("__core-js_shared__",{}),B=Function.toString;"function"!=typeof M.inspectSource&&(M.inspectSource=function(t){return B.call(t)});var H,F,N,V,W=M.inspectSource,z=c.WeakMap,q="function"==typeof z&&/native code/.test(W(z)),U=f((function(t){(t.exports=function(t,e){return M[t]||(M[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.15.2",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})})),G=0,X=Math.random(),K=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++G+X).toString(36)},Y=U("keys"),J={},Q=c.WeakMap;if(q||M.state){var Z=M.state||(M.state=new Q),tt=Z.get,et=Z.has,ot=Z.set;H=function(t,e){if(et.call(Z,t))throw new TypeError("Object already initialized");return e.facade=t,ot.call(Z,t,e),e},F=function(t){return tt.call(Z,t)||{}},N=function(t){return et.call(Z,t)}}else{var rt=Y[V="state"]||(Y[V]=K(V));J[rt]=!0,H=function(t,e){if(j(t,rt))throw new TypeError("Object already initialized");return e.facade=t,R(t,rt,e),e},F=function(t){return j(t,rt)?t[rt]:{}},N=function(t){return j(t,rt)}}var nt,it,ft={set:H,get:F,has:N,enforce:function(t){return N(t)?F(t):H(t,{})},getterFor:function(t){return function(e){var o;if(!_(e)||(o=F(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return o}}},st=f((function(t){var e=ft.get,o=ft.enforce,r=String(String).split("String");(t.exports=function(t,e,n,i){var f,s=!!i&&!!i.unsafe,a=!!i&&!!i.enumerable,u=!!i&&!!i.noTargetGet;"function"==typeof n&&("string"!=typeof e||j(n,"name")||R(n,"name",e),(f=o(n)).source||(f.source=r.join("string"==typeof e?e:""))),t!==c?(s?!u&&t[e]&&(a=!0):delete t[e],a?t[e]=n:R(t,e,n)):a?t[e]=n:D(e,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&e(this).source||W(this)}))})),ct=c,at=function(t){return"function"==typeof t?t:void 0},ut=function(t,e){return arguments.length<2?at(ct[t])||at(c[t]):ct[t]&&ct[t][e]||c[t]&&c[t][e]},lt=Math.ceil,ht=Math.floor,pt=function(t){return isNaN(t=+t)?0:(t>0?ht:lt)(t)},dt=Math.min,gt=function(t){return t>0?dt(pt(t),9007199254740991):0},bt=Math.max,vt=Math.min,yt=function(t){return function(e,o,r){var n,i=m(e),f=gt(i.length),s=function(t,e){var o=pt(t);return o<0?bt(o+e,0):vt(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}},wt={includes:yt(!0),indexOf:yt(!1)}.indexOf,mt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"].concat("length","prototype"),_t={f:Object.getOwnPropertyNames||function(t){return function(t,e){var o,r=m(t),n=0,i=[];for(o in r)!j(J,o)&&j(r,o)&&i.push(o);for(;e.length>n;)j(r,o=e[n++])&&(~wt(i,o)||i.push(o));return i}(t,mt)}},Ot={f:Object.getOwnPropertySymbols},Tt=ut("Reflect","ownKeys")||function(t){var e=_t.f(k(t)),o=Ot.f;return o?e.concat(o(t)):e},St=function(t,e){for(var o=Tt(e),r=I.f,n=x.f,i=0;i<o.length;i++){var f=o[i];j(t,f)||r(t,f,n(e,f))}},jt=/#|\.prototype\./,At=function(t,e){var o=Pt[Et(t)];return o==Lt||o!=$t&&("function"==typeof e?a(e):!!e)},Et=At.normalize=function(t){return String(t).replace(jt,".").toLowerCase()},Pt=At.data={},$t=At.NATIVE="N",Lt=At.POLYFILL="P",xt=At,kt=x.f,Ct=Array.isArray||function(t){return"Array"==b(t)},It=function(t,e,o){var r=O(e);r in t?I.f(t,r,d(0,o)):t[r]=o},Rt=ut("navigator","userAgent")||"",Dt=c.process,Mt=Dt&&Dt.versions,Bt=Mt&&Mt.v8;Bt?it=(nt=Bt.split("."))[0]<4?1:nt[0]+nt[1]:Rt&&(!(nt=Rt.match(/Edge\/(\d+)/))||nt[1]>=74)&&(nt=Rt.match(/Chrome\/(\d+)/))&&(it=nt[1]);var Ht,Ft=it&&+it,Nt=!!Object.getOwnPropertySymbols&&!a((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&Ft&&Ft<41})),Vt=Nt&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Wt=U("wks"),zt=c.Symbol,qt=Vt?zt:zt&&zt.withoutSetter||K,Ut=function(t){return j(Wt,t)&&(Nt||"string"==typeof Wt[t])||(Nt&&j(zt,t)?Wt[t]=zt[t]:Wt[t]=qt("Symbol."+t)),Wt[t]},Gt=Ut("species"),Xt=function(t,e){var o;return Ct(t)&&("function"!=typeof(o=t.constructor)||o!==Array&&!Ct(o.prototype)?_(o)&&null===(o=o[Gt])&&(o=void 0):o=void 0),new(void 0===o?Array:o)(0===e?0:e)},Kt=Ut("species"),Yt=Ut("isConcatSpreadable"),Jt=Ft>=51||!a((function(){var t=[];return t[Yt]=!1,t.concat()[0]!==t})),Qt=(Ht="concat",Ft>=51||!a((function(){var t=[];return(t.constructor={})[Kt]=function(){return{foo:1}},1!==t[Ht](Boolean).foo}))),Zt=function(t){if(!_(t))return!1;var e=t[Yt];return void 0!==e?!!e:Ct(t)};function te(t,e,o,r,n,i,f,s,c,a){"boolean"!=typeof f&&(c=s,s=f,f=!1);var u,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?(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 o}!function(t,e){var o,r,n,i,f,s=t.target,a=t.global,u=t.stat;if(o=a?c:u?c[s]||D(s,{}):(c[s]||{}).prototype)for(r in e){if(i=e[r],n=t.noTargetGet?(f=kt(o,r))&&f.value:o[r],!xt(a?r:s+(u?".":"#")+r,t.forced)&&void 0!==n){if(typeof i==typeof n)continue;St(i,n)}(t.sham||n&&n.sham)&&R(i,"sham",!0),st(o,r,i,t)}}({target:"Array",proto:!0,forced:!Jt||!Qt},{concat:function(t){var e,o,r,n,i,f=T(this),s=Xt(f,0),c=0;for(e=-1,r=arguments.length;e<r;e++)if(Zt(i=-1===e?f:arguments[e])){if(c+(n=gt(i.length))>9007199254740991)throw TypeError("Maximum allowed index exceeded");for(o=0;o<n;o++,c++)o in i&&It(s,c,i[o])}else{if(c>=9007199254740991)throw TypeError("Maximum allowed index exceeded");It(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 n=null!=arguments[e]?arguments[e]:{};e%2?o(Object(n),!0).forEach((function(e){r(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,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(){n(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(){n(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 i;i=t.dom.isVueObject(r)?r.$el:r;var f=t.dom.getElementOffset(i),s={};s.height=i.clientHeight,s.width=i.clientWidth;var c,a=t.dom.getViewPort(),u=t.dom.getDocumentOffset();this.offsetTop=f.top+u.top,"top"==e?(this.directionData="top",this.offsetTop-=s.height,this.offsetTop-=8):"bottom"==e?(this.directionData="bottom",this.offsetTop+=s.height):"left"==e?(this.directionData="left",this.offsetLeft=f.left+s.width):"right"==e?(this.directionData="right",this.offsetLeft=f.left+s.width):f.top+s.height/2>a.height/2?(this.directionData="top",this.offsetTop-=s.height,this.offsetTop-=8):(this.directionData="bottom",this.offsetTop+=s.height),this.offsetTop=parseInt(this.offsetTop),this.offsetTop+="px",c="left"==e||"right"==e?parseInt(f.top+s.height/2):parseInt(f.left+s.width/2);var l=this.$refs.main;t.dom.probeDom(400,function(){return n(this,o),l.clientWidth>0}.bind(this),function(){if(n(this,o),"left"==e||"right"==e){var t=parseInt(c-l.clientHeight/2);t<10&&(t=10),t+l.clientHeight>a.height-10&&(t=a.height-10-l.clientHeight),this.offsetTop=parseInt(t+u.top)+"px",this.offsetLeft="right"==e?f.left+s.width-6:f.left-l.clientWidth-6,this.offsetLeft+=u.left,this.offsetLeft=parseInt(this.offsetLeft),this.offsetLeft+="px",this.offsetArrowLeft=null,this.offsetArrowBottom=null,this.offsetArrowTop=parseInt(c-t-6),this.offsetArrowTop<10?this.offsetArrowTop=10:this.offsetArrowTop>l.clientHeight-22&&(this.offsetArrowTop=parseInt(l.clientHeight-22)),this.offsetArrowTop+="px",this.offsetArrowRight=null}else{var r=parseInt(l.clientWidth||50),i=parseInt(c-r/2);i<10&&(i=10),i+r>a.width-10&&(i=a.width-10-r),this.offsetLeft=parseInt(i)+"px",this.offsetArrowLeft=parseInt(c-i)-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){n(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,appendToBody:!0},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.34", | ||
"@bpui/libs": "^0.2.21" | ||
"@bpui/dialog": "^0.1.35", | ||
"@bpui/libs": "^0.2.22" | ||
}, | ||
@@ -38,3 +38,3 @@ "directories": {}, | ||
"name": "@bpui/popover", | ||
"version": "0.1.15" | ||
"version": "0.1.16" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
436156
4614
Updated@bpui/dialog@^0.1.35
Updated@bpui/libs@^0.2.22