UNPKG

34.3 kBJavaScriptView Raw
1/**
2 * multiple-select - Multiple select is a jQuery plugin to select multiple elements with checkboxes :).
3 *
4 * @version v1.4.1
5 * @homepage http://multiple-select.wenzhixin.net.cn
6 * @author wenzhixin <wenzhixin2010@gmail.com> (http://wenzhixin.net.cn/)
7 * @license MIT
8 */
9
10var commonjsGlobal="undefined"==typeof globalThis?"undefined"==typeof window?"undefined"==typeof global?"undefined"==typeof self?{}:self:global:window:globalThis;function createCommonjsModule(a,b){return b={exports:{}},a(b,b.exports),b.exports}var set,get,has$1,O="object",check=function(a){return a&&a.Math==Math&&a},global_1=check(typeof globalThis=="object"&&globalThis)||check(typeof window=="object"&&window)||check(typeof self=="object"&&self)||check(typeof commonjsGlobal=="object"&&commonjsGlobal)||Function("return this")(),fails=function(a){try{return!!a()}catch(a){return!0}},descriptors=!fails(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}),nativePropertyIsEnumerable={}.propertyIsEnumerable,getOwnPropertyDescriptor=Object.getOwnPropertyDescriptor,NASHORN_BUG=getOwnPropertyDescriptor&&!nativePropertyIsEnumerable.call({1:2},1),f=NASHORN_BUG?function(a){var b=getOwnPropertyDescriptor(this,a);return!!b&&b.enumerable}:nativePropertyIsEnumerable,objectPropertyIsEnumerable={f:f},createPropertyDescriptor=function(a,b){return{enumerable:!(1&a),configurable:!(2&a),writable:!(4&a),value:b}},toString={}.toString,classofRaw=function(a){return toString.call(a).slice(8,-1)},split="".split,indexedObject=fails(function(){return!Object("z").propertyIsEnumerable(0)})?function(a){return"String"==classofRaw(a)?split.call(a,""):Object(a)}:Object,requireObjectCoercible=function(a){if(a==null)throw TypeError("Can't call method on "+a);return a},toIndexedObject=function(a){return indexedObject(requireObjectCoercible(a))},isObject=function(a){return"object"==typeof a?null!==a:"function"==typeof a},toPrimitive=function(a,b){if(!isObject(a))return a;var c,d;if(b&&"function"==typeof(c=a.toString)&&!isObject(d=c.call(a)))return d;if("function"==typeof(c=a.valueOf)&&!isObject(d=c.call(a)))return d;if(!b&&"function"==typeof(c=a.toString)&&!isObject(d=c.call(a)))return d;throw TypeError("Can't convert object to primitive value")},hasOwnProperty={}.hasOwnProperty,has=function(a,b){return hasOwnProperty.call(a,b)},document=global_1.document,EXISTS=isObject(document)&&isObject(document.createElement),documentCreateElement=function(a){return EXISTS?document.createElement(a):{}},ie8DomDefine=!descriptors&&!fails(function(){return 7!=Object.defineProperty(documentCreateElement("div"),"a",{get:function(){return 7}}).a}),nativeGetOwnPropertyDescriptor=Object.getOwnPropertyDescriptor,f$1=descriptors?nativeGetOwnPropertyDescriptor:function(a,b){if(a=toIndexedObject(a),b=toPrimitive(b,!0),ie8DomDefine)try{return nativeGetOwnPropertyDescriptor(a,b)}catch(a){}return has(a,b)?createPropertyDescriptor(!objectPropertyIsEnumerable.f.call(a,b),a[b]):void 0},objectGetOwnPropertyDescriptor={f:f$1},anObject=function(a){if(!isObject(a))throw TypeError(a+" is not an object");return a},nativeDefineProperty=Object.defineProperty,f$2=descriptors?nativeDefineProperty:function(a,b,c){if(anObject(a),b=toPrimitive(b,!0),anObject(c),ie8DomDefine)try{return nativeDefineProperty(a,b,c)}catch(a){}if("get"in c||"set"in c)throw TypeError("Accessors not supported");return"value"in c&&(a[b]=c.value),a},objectDefineProperty={f:f$2},hide=descriptors?function(a,b,c){return objectDefineProperty.f(a,b,createPropertyDescriptor(1,c))}:function(a,b,c){return a[b]=c,a},setGlobal=function(a,b){try{hide(global_1,a,b)}catch(c){global_1[a]=b}return b},shared=createCommonjsModule(function(a){var b=global_1["__core-js_shared__"]||setGlobal("__core-js_shared__",{});(a.exports=function(a,c){return b[a]||(b[a]=c===void 0?{}:c)})("versions",[]).push({version:"3.2.1",mode:"global",copyright:"\xA9 2019 Denis Pushkarev (zloirock.ru)"})}),functionToString=shared("native-function-to-string",Function.toString),WeakMap=global_1.WeakMap,nativeWeakMap="function"==typeof WeakMap&&/native code/.test(functionToString.call(WeakMap)),id=0,postfix=Math.random(),uid=function(a){return"Symbol("+((a===void 0?"":a)+"")+")_"+(++id+postfix).toString(36)},keys=shared("keys"),sharedKey=function(a){return keys[a]||(keys[a]=uid(a))},hiddenKeys={},WeakMap$1=global_1.WeakMap,enforce=function(a){return has$1(a)?get(a):set(a,{})},getterFor=function(a){return function(b){var c;if(!isObject(b)||(c=get(b)).type!==a)throw TypeError("Incompatible receiver, "+a+" required");return c}};if(nativeWeakMap){var store=new WeakMap$1,wmget=store.get,wmhas=store.has,wmset=store.set;set=function(a,b){return wmset.call(store,a,b),b},get=function(a){return wmget.call(store,a)||{}},has$1=function(a){return wmhas.call(store,a)}}else{var STATE=sharedKey("state");hiddenKeys[STATE]=!0,set=function(a,b){return hide(a,STATE,b),b},get=function(a){return has(a,STATE)?a[STATE]:{}},has$1=function(a){return has(a,STATE)}}var internalState={set:set,get:get,has:has$1,enforce:enforce,getterFor:getterFor},redefine=createCommonjsModule(function(a){var b=internalState.get,c=internalState.enforce,d=(functionToString+"").split("toString");shared("inspectSource",function(a){return functionToString.call(a)}),(a.exports=function(a,b,e,f){var g=!!f&&!!f.unsafe,h=!!f&&!!f.enumerable,i=!!f&&!!f.noTargetGet;return("function"==typeof e&&("string"==typeof b&&!has(e,"name")&&hide(e,"name",b),c(e).source=d.join("string"==typeof b?b:"")),a===global_1)?void(h?a[b]=e:setGlobal(b,e)):void(g?!i&&a[b]&&(h=!0):delete a[b],h?a[b]=e:hide(a,b,e))})(Function.prototype,"toString",function(){return"function"==typeof this&&b(this).source||functionToString.call(this)})}),path=global_1,aFunction=function(a){return"function"==typeof a?a:void 0},getBuiltIn=function(a,b){return 2>arguments.length?aFunction(path[a])||aFunction(global_1[a]):path[a]&&path[a][b]||global_1[a]&&global_1[a][b]},ceil=Math.ceil,floor=Math.floor,toInteger=function(a){return isNaN(a=+a)?0:(0<a?floor:ceil)(a)},min=Math.min,toLength=function(a){return 0<a?min(toInteger(a),9007199254740991):0},max=Math.max,min$1=Math.min,toAbsoluteIndex=function(a,b){var c=toInteger(a);return 0>c?max(c+b,0):min$1(c,b)},createMethod=function(a){return function(b,c,d){var e,f=toIndexedObject(b),g=toLength(f.length),h=toAbsoluteIndex(d,g);if(a&&c!=c){for(;g>h;)if(e=f[h++],e!=e)return!0;}else for(;g>h;h++)if((a||h in f)&&f[h]===c)return a||h||0;return!a&&-1}},arrayIncludes={includes:createMethod(!0),indexOf:createMethod(!1)},indexOf=arrayIncludes.indexOf,objectKeysInternal=function(a,b){var c,d=toIndexedObject(a),e=0,f=[];for(c in d)!has(hiddenKeys,c)&&has(d,c)&&f.push(c);for(;b.length>e;)has(d,c=b[e++])&&(~indexOf(f,c)||f.push(c));return f},enumBugKeys=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],hiddenKeys$1=enumBugKeys.concat("length","prototype"),f$3=Object.getOwnPropertyNames||function(a){return objectKeysInternal(a,hiddenKeys$1)},objectGetOwnPropertyNames={f:f$3},f$4=Object.getOwnPropertySymbols,objectGetOwnPropertySymbols={f:f$4},ownKeys=getBuiltIn("Reflect","ownKeys")||function(a){var b=objectGetOwnPropertyNames.f(anObject(a)),c=objectGetOwnPropertySymbols.f;return c?b.concat(c(a)):b},copyConstructorProperties=function(a,b){for(var c,d=ownKeys(b),e=objectDefineProperty.f,f=objectGetOwnPropertyDescriptor.f,g=0;g<d.length;g++)c=d[g],has(a,c)||e(a,c,f(b,c))},replacement=/#|\.prototype\./,isForced=function(a,b){var c=data[normalize(a)];return!(c!=POLYFILL)||c!=NATIVE&&("function"==typeof b?fails(b):!!b)},normalize=isForced.normalize=function(a){return(a+"").replace(replacement,".").toLowerCase()},data=isForced.data={},NATIVE=isForced.NATIVE="N",POLYFILL=isForced.POLYFILL="P",isForced_1=isForced,getOwnPropertyDescriptor$1=objectGetOwnPropertyDescriptor.f,_export=function(a,b){var c,d,e,f,g,h,i=a.target,j=a.global,k=a.stat;if(d=j?global_1:k?global_1[i]||setGlobal(i,{}):(global_1[i]||{}).prototype,d)for(e in b){if(g=b[e],a.noTargetGet?(h=getOwnPropertyDescriptor$1(d,e),f=h&&h.value):f=d[e],c=isForced_1(j?e:i+(k?".":"#")+e,a.forced),!c&&void 0!==f){if(typeof g==typeof f)continue;copyConstructorProperties(g,f)}(a.sham||f&&f.sham)&&hide(g,"sham",!0),redefine(d,e,g,a)}},nativeSymbol=!!Object.getOwnPropertySymbols&&!fails(function(){return!(Symbol()+"")}),isArray=Array.isArray||function(a){return"Array"==classofRaw(a)},toObject=function(a){return Object(requireObjectCoercible(a))},objectKeys=Object.keys||function(a){return objectKeysInternal(a,enumBugKeys)},objectDefineProperties=descriptors?Object.defineProperties:function(a,b){anObject(a);for(var c,d=objectKeys(b),e=d.length,f=0;e>f;)objectDefineProperty.f(a,c=d[f++],b[c]);return a},html=getBuiltIn("document","documentElement"),IE_PROTO=sharedKey("IE_PROTO"),PROTOTYPE="prototype",Empty=function(){},createDict=function(){var a,b=documentCreateElement("iframe"),c=enumBugKeys.length,d="<",e="script",f=">";for(b.style.display="none",html.appendChild(b),b.src="java"+e+":"+"",a=b.contentWindow.document,a.open(),a.write(d+e+f+"document.F=Object"+d+"/"+e+f),a.close(),createDict=a.F;c--;)delete createDict[PROTOTYPE][enumBugKeys[c]];return createDict()},objectCreate=Object.create||function(a,b){var c;return null===a?c=createDict():(Empty[PROTOTYPE]=anObject(a),c=new Empty,Empty[PROTOTYPE]=null,c[IE_PROTO]=a),void 0===b?c:objectDefineProperties(c,b)};hiddenKeys[IE_PROTO]=!0;var nativeGetOwnPropertyNames=objectGetOwnPropertyNames.f,toString$1={}.toString,windowNames="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],getWindowNames=function(a){try{return nativeGetOwnPropertyNames(a)}catch(a){return windowNames.slice()}},f$5=function(a){return windowNames&&"[object Window]"==toString$1.call(a)?getWindowNames(a):nativeGetOwnPropertyNames(toIndexedObject(a))},objectGetOwnPropertyNamesExternal={f:f$5},Symbol$1=global_1.Symbol,store$1=shared("wks"),wellKnownSymbol=function(a){return store$1[a]||(store$1[a]=nativeSymbol&&Symbol$1[a]||(nativeSymbol?Symbol$1:uid)("Symbol."+a))},f$6=wellKnownSymbol,wrappedWellKnownSymbol={f:f$6},defineProperty=objectDefineProperty.f,defineWellKnownSymbol=function(a){var b=path.Symbol||(path.Symbol={});has(b,a)||defineProperty(b,a,{value:wrappedWellKnownSymbol.f(a)})},defineProperty$1=objectDefineProperty.f,TO_STRING_TAG=wellKnownSymbol("toStringTag"),setToStringTag=function(a,b,c){a&&!has(a=c?a:a.prototype,TO_STRING_TAG)&&defineProperty$1(a,TO_STRING_TAG,{configurable:!0,value:b})},aFunction$1=function(a){if("function"!=typeof a)throw TypeError(a+" is not a function");return a},bindContext=function(d,e,f){return(aFunction$1(d),void 0===e)?d:0===f?function(){return d.call(e)}:1===f?function(b){return d.call(e,b)}:2===f?function(c,a){return d.call(e,c,a)}:3===f?function(f,a,b){return d.call(e,f,a,b)}:function(){return d.apply(e,arguments)}},SPECIES=wellKnownSymbol("species"),arraySpeciesCreate=function(a,b){var c;return isArray(a)&&(c=a.constructor,"function"==typeof c&&(c===Array||isArray(c.prototype))?c=void 0:isObject(c)&&(c=c[SPECIES],null===c&&(c=void 0))),new(void 0===c?Array:c)(0===b?0:b)},push=[].push,createMethod$1=function(a){var b=1==a,c=4==a,d=6==a;return function(e,f,g,h){for(var i,j,k=toObject(e),l=indexedObject(k),m=bindContext(f,g,3),n=toLength(l.length),o=0,p=h||arraySpeciesCreate,q=b?p(e,n):2==a?p(e,0):void 0;n>o;o++)if((5==a||d||o in l)&&(i=l[o],j=m(i,o,k),a))if(b)q[o]=j;else if(j)switch(a){case 3:return!0;case 5:return i;case 6:return o;case 2:push.call(q,i);}else if(c)return!1;return d?-1:3==a||c?c:q}},arrayIteration={forEach:createMethod$1(0),map:createMethod$1(1),filter:createMethod$1(2),some:createMethod$1(3),every:createMethod$1(4),find:createMethod$1(5),findIndex:createMethod$1(6)},$forEach=arrayIteration.forEach,HIDDEN=sharedKey("hidden"),SYMBOL="Symbol",PROTOTYPE$1="prototype",TO_PRIMITIVE=wellKnownSymbol("toPrimitive"),setInternalState=internalState.set,getInternalState=internalState.getterFor(SYMBOL),ObjectPrototype=Object[PROTOTYPE$1],$Symbol=global_1.Symbol,JSON=global_1.JSON,nativeJSONStringify=JSON&&JSON.stringify,nativeGetOwnPropertyDescriptor$1=objectGetOwnPropertyDescriptor.f,nativeDefineProperty$1=objectDefineProperty.f,nativeGetOwnPropertyNames$1=objectGetOwnPropertyNamesExternal.f,nativePropertyIsEnumerable$1=objectPropertyIsEnumerable.f,AllSymbols=shared("symbols"),ObjectPrototypeSymbols=shared("op-symbols"),StringToSymbolRegistry=shared("string-to-symbol-registry"),SymbolToStringRegistry=shared("symbol-to-string-registry"),WellKnownSymbolsStore=shared("wks"),QObject=global_1.QObject,USE_SETTER=!QObject||!QObject[PROTOTYPE$1]||!QObject[PROTOTYPE$1].findChild,setSymbolDescriptor=descriptors&&fails(function(){return 7!=objectCreate(nativeDefineProperty$1({},"a",{get:function(){return nativeDefineProperty$1(this,"a",{value:7}).a}})).a})?function(a,b,c){var d=nativeGetOwnPropertyDescriptor$1(ObjectPrototype,b);d&&delete ObjectPrototype[b],nativeDefineProperty$1(a,b,c),d&&a!==ObjectPrototype&&nativeDefineProperty$1(ObjectPrototype,b,d)}:nativeDefineProperty$1,wrap=function(a,b){var c=AllSymbols[a]=objectCreate($Symbol[PROTOTYPE$1]);return setInternalState(c,{type:SYMBOL,tag:a,description:b}),descriptors||(c.description=b),c},isSymbol=nativeSymbol&&"symbol"==typeof $Symbol.iterator?function(a){return"symbol"==typeof a}:function(a){return Object(a)instanceof $Symbol},$defineProperty=function(a,b,c){a===ObjectPrototype&&$defineProperty(ObjectPrototypeSymbols,b,c),anObject(a);var d=toPrimitive(b,!0);return anObject(c),has(AllSymbols,d)?(c.enumerable?(has(a,HIDDEN)&&a[HIDDEN][d]&&(a[HIDDEN][d]=!1),c=objectCreate(c,{enumerable:createPropertyDescriptor(0,!1)})):(!has(a,HIDDEN)&&nativeDefineProperty$1(a,HIDDEN,createPropertyDescriptor(1,{})),a[HIDDEN][d]=!0),setSymbolDescriptor(a,d,c)):nativeDefineProperty$1(a,d,c)},$defineProperties=function(a,b){anObject(a);var c=toIndexedObject(b),d=objectKeys(c).concat($getOwnPropertySymbols(c));return $forEach(d,function(b){(!descriptors||$propertyIsEnumerable.call(c,b))&&$defineProperty(a,b,c[b])}),a},$create=function(a,b){return b===void 0?objectCreate(a):$defineProperties(objectCreate(a),b)},$propertyIsEnumerable=function(a){var b=toPrimitive(a,!0),c=nativePropertyIsEnumerable$1.call(this,b);return(this!==ObjectPrototype||!has(AllSymbols,b)||has(ObjectPrototypeSymbols,b))&&(!(c||!has(this,b)||!has(AllSymbols,b)||has(this,HIDDEN)&&this[HIDDEN][b])||c)},$getOwnPropertyDescriptor=function(a,b){var c=toIndexedObject(a),d=toPrimitive(b,!0);if(c!==ObjectPrototype||!has(AllSymbols,d)||has(ObjectPrototypeSymbols,d)){var e=nativeGetOwnPropertyDescriptor$1(c,d);return e&&has(AllSymbols,d)&&!(has(c,HIDDEN)&&c[HIDDEN][d])&&(e.enumerable=!0),e}},$getOwnPropertyNames=function(a){var b=nativeGetOwnPropertyNames$1(toIndexedObject(a)),c=[];return $forEach(b,function(a){has(AllSymbols,a)||has(hiddenKeys,a)||c.push(a)}),c},$getOwnPropertySymbols=function(a){var b=a===ObjectPrototype,c=nativeGetOwnPropertyNames$1(b?ObjectPrototypeSymbols:toIndexedObject(a)),d=[];return $forEach(c,function(a){has(AllSymbols,a)&&(!b||has(ObjectPrototype,a))&&d.push(AllSymbols[a])}),d};nativeSymbol||($Symbol=function(){if(this instanceof $Symbol)throw TypeError("Symbol is not a constructor");var a=arguments.length&&void 0!==arguments[0]?arguments[0]+"":void 0,b=uid(a),c=function(a){this===ObjectPrototype&&c.call(ObjectPrototypeSymbols,a),has(this,HIDDEN)&&has(this[HIDDEN],b)&&(this[HIDDEN][b]=!1),setSymbolDescriptor(this,b,createPropertyDescriptor(1,a))};return descriptors&&USE_SETTER&&setSymbolDescriptor(ObjectPrototype,b,{configurable:!0,set:c}),wrap(b,a)},redefine($Symbol[PROTOTYPE$1],"toString",function(){return getInternalState(this).tag}),objectPropertyIsEnumerable.f=$propertyIsEnumerable,objectDefineProperty.f=$defineProperty,objectGetOwnPropertyDescriptor.f=$getOwnPropertyDescriptor,objectGetOwnPropertyNames.f=objectGetOwnPropertyNamesExternal.f=$getOwnPropertyNames,objectGetOwnPropertySymbols.f=$getOwnPropertySymbols,descriptors&&(nativeDefineProperty$1($Symbol[PROTOTYPE$1],"description",{configurable:!0,get:function(){return getInternalState(this).description}}),redefine(ObjectPrototype,"propertyIsEnumerable",$propertyIsEnumerable,{unsafe:!0})),wrappedWellKnownSymbol.f=function(a){return wrap(wellKnownSymbol(a),a)}),_export({global:!0,wrap:!0,forced:!nativeSymbol,sham:!nativeSymbol},{Symbol:$Symbol}),$forEach(objectKeys(WellKnownSymbolsStore),function(a){defineWellKnownSymbol(a)}),_export({target:SYMBOL,stat:!0,forced:!nativeSymbol},{for:function(a){var b=a+"";if(has(StringToSymbolRegistry,b))return StringToSymbolRegistry[b];var c=$Symbol(b);return StringToSymbolRegistry[b]=c,SymbolToStringRegistry[c]=b,c},keyFor:function(a){if(!isSymbol(a))throw TypeError(a+" is not a symbol");return has(SymbolToStringRegistry,a)?SymbolToStringRegistry[a]:void 0},useSetter:function(){USE_SETTER=!0},useSimple:function(){USE_SETTER=!1}}),_export({target:"Object",stat:!0,forced:!nativeSymbol,sham:!descriptors},{create:$create,defineProperty:$defineProperty,defineProperties:$defineProperties,getOwnPropertyDescriptor:$getOwnPropertyDescriptor}),_export({target:"Object",stat:!0,forced:!nativeSymbol},{getOwnPropertyNames:$getOwnPropertyNames,getOwnPropertySymbols:$getOwnPropertySymbols}),_export({target:"Object",stat:!0,forced:fails(function(){objectGetOwnPropertySymbols.f(1)})},{getOwnPropertySymbols:function(a){return objectGetOwnPropertySymbols.f(toObject(a))}}),JSON&&_export({target:"JSON",stat:!0,forced:!nativeSymbol||fails(function(){var a=$Symbol();return"[null]"!=nativeJSONStringify([a])||"{}"!=nativeJSONStringify({a:a})||"{}"!=nativeJSONStringify(Object(a))})},{stringify:function(a){for(var b,c,d=[a],e=1;arguments.length>e;)d.push(arguments[e++]);if(c=b=d[1],(isObject(b)||void 0!==a)&&!isSymbol(a))return isArray(b)||(b=function(a,b){if("function"==typeof c&&(b=c.call(this,a,b)),!isSymbol(b))return b}),d[1]=b,nativeJSONStringify.apply(JSON,d)}}),$Symbol[PROTOTYPE$1][TO_PRIMITIVE]||hide($Symbol[PROTOTYPE$1],TO_PRIMITIVE,$Symbol[PROTOTYPE$1].valueOf),setToStringTag($Symbol,SYMBOL),hiddenKeys[HIDDEN]=!0;var defineProperty$2=objectDefineProperty.f,NativeSymbol=global_1.Symbol;if(descriptors&&"function"==typeof NativeSymbol&&(!("description"in NativeSymbol.prototype)||NativeSymbol().description!==void 0)){var EmptyStringDescriptionStore={},SymbolWrapper=function(){var a=1>arguments.length||void 0===arguments[0]?void 0:arguments[0]+"",b=this instanceof SymbolWrapper?new NativeSymbol(a):void 0===a?NativeSymbol():NativeSymbol(a);return""===a&&(EmptyStringDescriptionStore[b]=!0),b};copyConstructorProperties(SymbolWrapper,NativeSymbol);var symbolPrototype=SymbolWrapper.prototype=NativeSymbol.prototype;symbolPrototype.constructor=SymbolWrapper;var symbolToString=symbolPrototype.toString,native="Symbol(test)"==NativeSymbol("test")+"",regexp=/^Symbol\((.*)\)[^)]+$/;defineProperty$2(symbolPrototype,"description",{configurable:!0,get:function(){var a=isObject(this)?this.valueOf():this,b=symbolToString.call(a);if(has(EmptyStringDescriptionStore,a))return"";var c=native?b.slice(7,-1):b.replace(regexp,"$1");return""===c?void 0:c}}),_export({global:!0,forced:!0},{Symbol:SymbolWrapper})}defineWellKnownSymbol("iterator");var createProperty=function(a,b,c){var d=toPrimitive(b);d in a?objectDefineProperty.f(a,d,createPropertyDescriptor(0,c)):a[d]=c},SPECIES$1=wellKnownSymbol("species"),arrayMethodHasSpeciesSupport=function(a){return!fails(function(){var b=[],c=b.constructor={};return c[SPECIES$1]=function(){return{foo:1}},1!==b[a](Boolean).foo})},IS_CONCAT_SPREADABLE=wellKnownSymbol("isConcatSpreadable"),MAX_SAFE_INTEGER=9007199254740991,MAXIMUM_ALLOWED_INDEX_EXCEEDED="Maximum allowed index exceeded",IS_CONCAT_SPREADABLE_SUPPORT=!fails(function(){var a=[];return a[IS_CONCAT_SPREADABLE]=!1,a.concat()[0]!==a}),SPECIES_SUPPORT=arrayMethodHasSpeciesSupport("concat"),isConcatSpreadable=function(a){if(!isObject(a))return!1;var b=a[IS_CONCAT_SPREADABLE];return b===void 0?isArray(a):!!b},FORCED=!IS_CONCAT_SPREADABLE_SUPPORT||!SPECIES_SUPPORT;_export({target:"Array",proto:!0,forced:FORCED},{concat:function(){var a,b,c,d,e,f=toObject(this),g=arraySpeciesCreate(f,0),h=0;for(a=-1,c=arguments.length;a<c;a++)if(e=-1===a?f:arguments[a],isConcatSpreadable(e)){if(d=toLength(e.length),h+d>MAX_SAFE_INTEGER)throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);for(b=0;b<d;b++,h++)b in e&&createProperty(g,h,e[b])}else{if(h>=MAX_SAFE_INTEGER)throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);createProperty(g,h++,e)}return g.length=h,g}});var UNSCOPABLES=wellKnownSymbol("unscopables"),ArrayPrototype=Array.prototype;ArrayPrototype[UNSCOPABLES]==null&&hide(ArrayPrototype,UNSCOPABLES,objectCreate(null));var IteratorPrototype,PrototypeOfArrayIteratorPrototype,arrayIterator,addToUnscopables=function(a){ArrayPrototype[UNSCOPABLES][a]=!0},correctPrototypeGetter=!fails(function(){function a(){}return a.prototype.constructor=null,Object.getPrototypeOf(new a)!==a.prototype}),IE_PROTO$1=sharedKey("IE_PROTO"),ObjectPrototype$1=Object.prototype,objectGetPrototypeOf=correctPrototypeGetter?Object.getPrototypeOf:function(a){return a=toObject(a),has(a,IE_PROTO$1)?a[IE_PROTO$1]:"function"==typeof a.constructor&&a instanceof a.constructor?a.constructor.prototype:a instanceof Object?ObjectPrototype$1:null},ITERATOR=wellKnownSymbol("iterator"),BUGGY_SAFARI_ITERATORS=!1,returnThis=function(){return this};[].keys&&(arrayIterator=[].keys(),"next"in arrayIterator?(PrototypeOfArrayIteratorPrototype=objectGetPrototypeOf(objectGetPrototypeOf(arrayIterator)),PrototypeOfArrayIteratorPrototype!==Object.prototype&&(IteratorPrototype=PrototypeOfArrayIteratorPrototype)):BUGGY_SAFARI_ITERATORS=!0),IteratorPrototype==null&&(IteratorPrototype={}),has(IteratorPrototype,ITERATOR)||hide(IteratorPrototype,ITERATOR,returnThis);var iteratorsCore={IteratorPrototype:IteratorPrototype,BUGGY_SAFARI_ITERATORS:BUGGY_SAFARI_ITERATORS},IteratorPrototype$1=iteratorsCore.IteratorPrototype,createIteratorConstructor=function(a,b,c){return a.prototype=objectCreate(IteratorPrototype$1,{next:createPropertyDescriptor(1,c)}),setToStringTag(a,b+" Iterator",!1),a},aPossiblePrototype=function(a){if(!isObject(a)&&null!==a)throw TypeError("Can't set "+(a+" as a prototype"));return a},objectSetPrototypeOf=Object.setPrototypeOf||("__proto__"in{}?function(){var a,b=!1,c={};try{a=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set,a.call(c,[]),b=c instanceof Array}catch(a){}return function(c,d){return anObject(c),aPossiblePrototype(d),b?a.call(c,d):c.__proto__=d,c}}():void 0),IteratorPrototype$2=iteratorsCore.IteratorPrototype,BUGGY_SAFARI_ITERATORS$1=iteratorsCore.BUGGY_SAFARI_ITERATORS,ITERATOR$1=wellKnownSymbol("iterator"),KEYS="keys",VALUES="values",ENTRIES="entries",returnThis$1=function(){return this},defineIterator=function(a,b,c,d,e,f,g){createIteratorConstructor(c,b,d);var h,i,j,k=function(a){return a===e&&o?o:!BUGGY_SAFARI_ITERATORS$1&&a in m?m[a]:a===KEYS?function(){return new c(this,a)}:a===VALUES?function(){return new c(this,a)}:a===ENTRIES?function(){return new c(this,a)}:function(){return new c(this)}},l=!1,m=a.prototype,n=m[ITERATOR$1]||m["@@iterator"]||e&&m[e],o=!BUGGY_SAFARI_ITERATORS$1&&n||k(e),p="Array"==b?m.entries||n:n;if(p&&(h=objectGetPrototypeOf(p.call(new a)),IteratorPrototype$2!==Object.prototype&&h.next&&(objectGetPrototypeOf(h)!==IteratorPrototype$2&&(objectSetPrototypeOf?objectSetPrototypeOf(h,IteratorPrototype$2):"function"!=typeof h[ITERATOR$1]&&hide(h,ITERATOR$1,returnThis$1)),setToStringTag(h,b+" Iterator",!0))),e==VALUES&&n&&n.name!==VALUES&&(l=!0,o=function(){return n.call(this)}),m[ITERATOR$1]!==o&&hide(m,ITERATOR$1,o),e)if(i={values:k(VALUES),keys:f?o:k(KEYS),entries:k(ENTRIES)},g)for(j in i)(BUGGY_SAFARI_ITERATORS$1||l||!(j in m))&&redefine(m,j,i[j]);else _export({target:b,proto:!0,forced:BUGGY_SAFARI_ITERATORS$1||l},i);return i},ARRAY_ITERATOR="Array Iterator",setInternalState$1=internalState.set,getInternalState$1=internalState.getterFor(ARRAY_ITERATOR),es_array_iterator=defineIterator(Array,"Array",function(a,b){setInternalState$1(this,{type:ARRAY_ITERATOR,target:toIndexedObject(a),index:0,kind:b})},function(){var a=getInternalState$1(this),b=a.target,c=a.kind,d=a.index++;return!b||d>=b.length?(a.target=void 0,{value:void 0,done:!0}):"keys"==c?{value:d,done:!1}:"values"==c?{value:b[d],done:!1}:{value:[d,b[d]],done:!1}},"values");addToUnscopables("keys"),addToUnscopables("values"),addToUnscopables("entries");var inheritIfRequired=function(a,b,c){var d,e;return objectSetPrototypeOf&&"function"==typeof(d=b.constructor)&&d!==c&&isObject(e=d.prototype)&&e!==c.prototype&&objectSetPrototypeOf(a,e),a},whitespaces="\t\n\x0B\f\r \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF",whitespace="["+whitespaces+"]",ltrim=RegExp("^"+whitespace+whitespace+"*"),rtrim=RegExp(whitespace+whitespace+"*$"),createMethod$2=function(a){return function(b){var c=requireObjectCoercible(b)+"";return 1&a&&(c=c.replace(ltrim,"")),2&a&&(c=c.replace(rtrim,"")),c}},stringTrim={start:createMethod$2(1),end:createMethod$2(2),trim:createMethod$2(3)},getOwnPropertyNames=objectGetOwnPropertyNames.f,getOwnPropertyDescriptor$2=objectGetOwnPropertyDescriptor.f,defineProperty$3=objectDefineProperty.f,trim=stringTrim.trim,NUMBER="Number",NativeNumber=global_1[NUMBER],NumberPrototype=NativeNumber.prototype,BROKEN_CLASSOF=classofRaw(objectCreate(NumberPrototype))==NUMBER,toNumber=function(a){var b,c,d,e,f,g,h,i,j=toPrimitive(a,!1);if("string"==typeof j&&2<j.length)if(j=trim(j),b=j.charCodeAt(0),43===b||45===b){if(c=j.charCodeAt(2),88===c||120===c)return NaN;}else if(48===b){switch(j.charCodeAt(1)){case 66:case 98:d=2,e=49;break;case 79:case 111:d=8,e=55;break;default:return+j;}for(f=j.slice(2),g=f.length,h=0;h<g;h++)if(i=f.charCodeAt(h),48>i||i>e)return NaN;return parseInt(f,d)}return+j};if(isForced_1(NUMBER,!NativeNumber(" 0o1")||!NativeNumber("0b1")||NativeNumber("+0x1"))){for(var key,NumberWrapper=function(a){var b=1>arguments.length?0:a,c=this;return c instanceof NumberWrapper&&(BROKEN_CLASSOF?fails(function(){NumberPrototype.valueOf.call(c)}):classofRaw(c)!=NUMBER)?inheritIfRequired(new NativeNumber(toNumber(b)),c,NumberWrapper):toNumber(b)},keys$1=descriptors?getOwnPropertyNames(NativeNumber):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),j=0;keys$1.length>j;j++)has(NativeNumber,key=keys$1[j])&&!has(NumberWrapper,key)&&defineProperty$3(NumberWrapper,key,getOwnPropertyDescriptor$2(NativeNumber,key));NumberWrapper.prototype=NumberPrototype,NumberPrototype.constructor=NumberWrapper,redefine(global_1,NUMBER,NumberWrapper)}var TO_STRING_TAG$1=wellKnownSymbol("toStringTag"),CORRECT_ARGUMENTS="Arguments"==classofRaw(function(){return arguments}()),tryGet=function(a,b){try{return a[b]}catch(a){}},classof=function(a){var b,c,d;return a===void 0?"Undefined":null===a?"Null":"string"==typeof(c=tryGet(b=Object(a),TO_STRING_TAG$1))?c:CORRECT_ARGUMENTS?classofRaw(b):"Object"==(d=classofRaw(b))&&"function"==typeof b.callee?"Arguments":d},TO_STRING_TAG$2=wellKnownSymbol("toStringTag"),test={};test[TO_STRING_TAG$2]="z";var objectToString=function(){return"[object "+classof(this)+"]"},ObjectPrototype$2=Object.prototype;objectToString!==ObjectPrototype$2.toString&&redefine(ObjectPrototype$2,"toString",objectToString,{unsafe:!0});var createMethod$3=function(a){return function(b,c){var d,e,f=requireObjectCoercible(b)+"",g=toInteger(c),h=f.length;return 0>g||g>=h?a?"":void 0:(d=f.charCodeAt(g),55296>d||56319<d||g+1===h||56320>(e=f.charCodeAt(g+1))||57343<e?a?f.charAt(g):d:a?f.slice(g,g+2):(d-55296<<10)+(e-56320)+65536)}},stringMultibyte={codeAt:createMethod$3(!1),charAt:createMethod$3(!0)},charAt=stringMultibyte.charAt,STRING_ITERATOR="String Iterator",setInternalState$2=internalState.set,getInternalState$2=internalState.getterFor(STRING_ITERATOR);defineIterator(String,"String",function(a){setInternalState$2(this,{type:STRING_ITERATOR,string:a+"",index:0})},function(){var a,b=getInternalState$2(this),c=b.string,d=b.index;return d>=c.length?{value:void 0,done:!0}:(a=charAt(c,d),b.index+=a.length,{value:a,done:!1})});var domIterables={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},ITERATOR$2=wellKnownSymbol("iterator"),TO_STRING_TAG$3=wellKnownSymbol("toStringTag"),ArrayValues=es_array_iterator.values;for(var COLLECTION_NAME in domIterables){var Collection=global_1[COLLECTION_NAME],CollectionPrototype=Collection&&Collection.prototype;if(CollectionPrototype){if(CollectionPrototype[ITERATOR$2]!==ArrayValues)try{hide(CollectionPrototype,ITERATOR$2,ArrayValues)}catch(a){CollectionPrototype[ITERATOR$2]=ArrayValues}if(CollectionPrototype[TO_STRING_TAG$3]||hide(CollectionPrototype,TO_STRING_TAG$3,COLLECTION_NAME),domIterables[COLLECTION_NAME])for(var METHOD_NAME in es_array_iterator)if(CollectionPrototype[METHOD_NAME]!==es_array_iterator[METHOD_NAME])try{hide(CollectionPrototype,METHOD_NAME,es_array_iterator[METHOD_NAME])}catch(a){CollectionPrototype[METHOD_NAME]=es_array_iterator[METHOD_NAME]}}}function _defineProperty(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function ownKeys$1(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function _objectSpread2(a){for(var b,c=1;c<arguments.length;c++)b=null==arguments[c]?{}:arguments[c],c%2?ownKeys$1(b,!0).forEach(function(c){_defineProperty(a,c,b[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(b)):ownKeys$1(b).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))});return a}var $=window.jQuery,deepCopy=function(a){return a?$.extend(!0,Array.isArray(a)?[]:{},a):a},script={name:"MultipleSelect",props:{value:{type:[String,Number,Array],default:void 0},name:{type:String,default:void 0},single:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},width:{type:[Number,String],default:void 0},data:{type:Array,default:function(){}},options:{type:Object,default:function(){return{}}}},data:function(){return{currentValue:this.value}},watch:{value:function(){this.currentValue===this.value||(this.currentValue=this.value,this._initDefaultValue())},single:function(){this._initSelect()},disabled:function(){var a=this;this.$nextTick(function(){a.disabled?a.disable():a.enable()})},width:function(){this._initSelect()},options:{handler:function(){this._initSelect()},deep:!0},data:{handler:function(){this._initSelect()},deep:!0}},mounted:function(){var a=this;this.$select=$(this.$el).change(function(){var b=a.getSelects();b.length&&(a.currentValue=Array.isArray(a.currentValue)?b:b[0],a.$emit("input",a.currentValue),a.$emit("change",a.currentValue))});var b=function(b){/^on[A-Z]/.test(b)&&($.fn.multipleSelect.defaults[b]=function(){for(var c=arguments.length,d=Array(c),e=0;e<c;e++)d[e]=arguments[e];a.$emit.apply(a,[b].concat(d))})};for(var c in $.fn.multipleSelect.defaults)b(c);this._initSelect(),this._initDefaultValue()},methods:_objectSpread2({_initSelect:function(){var a=_objectSpread2({},deepCopy(this.options),{single:this.single,width:this.width,data:deepCopy(this.data)});this._hasInit?this.refreshOptions(a):(this.$select.multipleSelect(a),this._hasInit=!0)},_initDefaultValue:function(){var a=this;this.$nextTick(function(){a.setSelects(Array.isArray(a.currentValue)?a.currentValue:[a.currentValue])})}},function(){var a={},b=!0,c=!1,d=void 0;try{for(var e,f=function(){var b=e.value;a[b]=function(){for(var a,c=arguments.length,d=Array(c),e=0;e<c;e++)d[e]=arguments[e];return(a=this.$select).multipleSelect.apply(a,[b].concat(d))}},g=$.fn.multipleSelect.methods[Symbol.iterator]();!(b=(e=g.next()).done);b=!0)f()}catch(a){c=!0,d=a}finally{try{b||null==g.return||g.return()}finally{if(c)throw d}}return a}())};function normalizeComponent(a,b,c,d,e,f,g,h,i,j){"boolean"!=typeof g&&(i=h,h=g,g=!1);var k="function"==typeof c?c.options:c;a&&a.render&&(k.render=a.render,k.staticRenderFns=a.staticRenderFns,k._compiled=!0,e&&(k.functional=!0)),d&&(k._scopeId=d);var l;if(f?(l=function(a){a=a||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,a||"undefined"==typeof __VUE_SSR_CONTEXT__||(a=__VUE_SSR_CONTEXT__),b&&b.call(this,i(a)),a&&a._registeredComponents&&a._registeredComponents.add(f)},k._ssrRegister=l):b&&(l=g?function(){b.call(this,j(this.$root.$options.shadowRoot))}:function(a){b.call(this,h(a))}),l)if(k.functional){var m=k.render;k.render=function(a,b){return l.call(b),m(a,b)}}else{var n=k.beforeCreate;k.beforeCreate=n?[].concat(n,l):[l]}return c}var normalizeComponent_1=normalizeComponent;const __vue_script__=script;var __vue_render__=function(){var a=this,b=a.$createElement,c=a._self._c||b;return c("select",{directives:[{name:"model",rawName:"v-model",value:a.currentValue,expression:"currentValue"}],attrs:{name:a.name,multiple:!a.single,disabled:a.disabled},on:{change:function(b){var c=Array.prototype.filter.call(b.target.options,function(a){return a.selected}).map(function(a){var b="_value"in a?a._value:a.value;return b});a.currentValue=b.target.multiple?c:c[0]}}},[a._t("default")],2)},__vue_staticRenderFns__=[];__vue_render__._withStripped=!0;const __vue_inject_styles__=void 0,__vue_scope_id__=void 0,__vue_module_identifier__=void 0,__vue_is_functional_template__=!1;var MultipleSelect=normalizeComponent_1({render:__vue_render__,staticRenderFns:__vue_staticRenderFns__},void 0,__vue_script__,__vue_scope_id__,__vue_is_functional_template__,__vue_module_identifier__,void 0,void 0);export default MultipleSelect;