woocommerce/assets/js/select2/select2.min.js

8 lines
64 KiB
JavaScript
Raw Normal View History

2021-12-10 12:03:04 +00:00
/*!
* Select2 4.0.3
* https://select2.github.io
*
* Released under the MIT license
* https://github.com/select2/select2/blob/master/LICENSE.md
*/
!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?e(require("jquery")):e(jQuery)}(function(t){var e,n,i,d,r,o,p,h,f,g,m,y,s,a,v,i=(t&&t.fn&&t.fn.select2&&t.fn.select2.amd&&(u=t.fn.select2.amd),u&&u.requirejs||(u?n=u:u={},f={},g={},m={},y={},s=Object.prototype.hasOwnProperty,a=[].slice,v=/\.js$/,p=function(e,t){var n,i,s=c(e),r=s[0];return e=s[1],r&&(n=b(r=l(r,t))),r?e=n&&n.normalize?n.normalize(e,(i=t,function(e){return l(e,i)})):l(e,t):(r=(s=c(e=l(e,t)))[0],e=s[1],r&&(n=b(r))),{f:r?r+"!"+e:e,n:e,pr:r,p:n}},h={require:function(e){return w(e)},exports:function(e){var t=f[e];return void 0!==t?t:f[e]={}},module:function(e){return{id:e,uri:"",exports:f[e],config:(t=e,function(){return m&&m.config&&m.config[t]||{}})};var t}},r=function(e,t,n,i){var s,r,o,a,l,c=[],u=typeof n;if(i=i||e,"undefined"==u||"function"==u){for(t=!t.length&&n.length?["require","exports","module"]:t,a=0;a<t.length;a+=1)if("require"===(r=(o=p(t[a],i)).f))c[a]=h.require(e);else if("exports"===r)c[a]=h.exports(e),l=!0;else if("module"===r)s=c[a]=h.module(e);else if(_(f,r)||_(g,r)||_(y,r))c[a]=b(r);else{if(!o.p)throw new Error(e+" missing "+r);o.p.load(o.n,w(i,!0),function(t){return function(e){f[t]=e}}(r),{}),c[a]=f[r]}u=n?n.apply(f[e],c):undefined,e&&(s&&s.exports!==d&&s.exports!==f[e]?f[e]=s.exports:u===d&&l||(f[e]=u))}else e&&(f[e]=n)},e=n=o=function(e,t,n,i,s){if("string"==typeof e)return h[e]?h[e](t):b(p(e,t).f);if(!e.splice){if((m=e).deps&&o(m.deps,m.callback),!t)return;t.splice?(e=t,t=n,n=null):e=d}return t=t||function(){},"function"==typeof n&&(n=i,i=s),i?r(d,e,t,n):setTimeout(function(){r(d,e,t,n)},4),o},o.config=function(e){return o(e)},e._defined=f,(i=function(e,t,n){if("string"!=typeof e)throw new Error("See almond README: incorrect module build, no module name");t.splice||(n=t,t=[]),_(f,e)||_(g,e)||(g[e]=[e,t,n])}).amd={jQuery:!0},u.requirejs=e,u.require=n,u.define=i),u.define("almond",function(){}),u.define("jquery",[],function(){var e=t||$;return null==e&&console&&console.error&&console.error("Select2: An instance of jQuery or a jQuery-compatible library was not found. Make sure that you are including jQuery before Select2 on your web page."),e}),u.define("select2/utils",["jquery"],function(r){var e={};function c(e){var t,n=e.prototype,i=[];for(t in n){"function"==typeof n[t]&&"constructor"!==t&&i.push(t)}return i}e.Extend=function(e,t){var n,i={}.hasOwnProperty;function s(){this.constructor=e}for(n in t)i.call(t,n)&&(e[n]=t[n]);return s.prototype=t.prototype,e.prototype=new s,e.__super__=t.prototype,e},e.Decorate=function(i,s){var e=c(s),t=c(i);function r(){var e=Array.prototype.unshift,t=s.prototype.constructor.length,n=i.prototype.constructor;0<t&&(e.call(arguments,i.prototype.constructor),n=s.prototype.constructor),n.apply(this,arguments)}s.displayName=i.displayName,r.prototype=new function(){this.constructor=r};for(var n=0;n<t.length;n++){var o=t[n];r.prototype[o]=i.prototype[o]}for(var a=0;a<e.length;a++){var l=e[a];r.prototype[l]=function(e){var t=function(){};e in r.prototype&&(t=r.prototype[e]);var n=s.prototype[e];return function(){return Array.prototype.unshift.call(arguments,t),n.apply(this,arguments)}}(l)}return r};var t=function(){this.listeners={}};return t.prototype.on=function(e,t){this.listeners=this.listeners||{},e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t]},t.prototype.trigger=function(e){var t=Array.prototype.slice,n=t.call(arguments,1);this.listeners=this.listeners||{},null==n&&(n=[]),0===n.length&&n.push({}),(n[0]._type=e)in this.listeners&&this.invoke(this.listeners[e],t.call(arguments,1)),"*"in this.listeners&&this.invoke(this.listeners["*"],arguments)},t.prototype.invoke=function(e,t){for(var n=0,i=e.length;n<i;n++)e[n].apply(this,t)},e.Observable=t,e.generateChars=function(e){for(var t="",n=0;n<e;n++){t+=Math.floor(36*Math.random()).toString(36)}return t},e.bind=function(e,t){return function(){e.apply(t,arguments)}},e._convertData=function(e){for(var t in e){var n=t.split("-"),i=e;if(1!==n.length){for(var s=0;s<n.length;s++){var r=n[s];(r=r.subs