1/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ !(function (a) { 2 "function" == typeof define && define.amd 3 ? define(["jquery"], a) 4 : a("object" == typeof exports ? require("jquery") : jQuery); 5})(function (a) { 6 var b = (function () { 7 if (a && a.fn && a.fn.mselect2 && a.fn.mselect2.amd) var b = a.fn.mselect2.amd; 8 var b; 9 return ( 10 (function () { 11 if (!b || !b.requirejs) { 12 b ? (c = b) : (b = {}); 13 var a, c, d; 14 !(function (b) { 15 function e(a, b) { 16 return u.call(a, b); 17 } 18 function f(a, b) { 19 var c, 20 d, 21 e, 22 f, 23 g, 24 h, 25 i, 26 j, 27 k, 28 l, 29 m, 30 n = b && b.split("/"), 31 o = s.map, 32 p = (o && o["*"]) || {}; 33 if (a && "." === a.charAt(0)) 34 if (b) { 35 for ( 36 a = a.split("/"), 37 g = a.length - 1, 38 s.nodeIdCompat && 39 w.test(a[g]) && 40 (a[g] = a[g].replace(w, "")), 41 a = n.slice(0, n.length - 1).concat(a), 42 k = 0; 43 k < a.length; 44 k += 1 45 ) 46 if (((m = a[k]), "." === m)) a.splice(k, 1), (k -= 1); 47 else if (".." === m) { 48 if (1 === k && (".." === a[2] || ".." === a[0])) 49 break; 50 k > 0 && (a.splice(k - 1, 2), (k -= 2)); 51 } 52 a = a.join("/"); 53 } else 0 === a.indexOf("./") && (a = a.substring(2)); 54 if ((n || p) && o) { 55 for (c = a.split("/"), k = c.length; k > 0; k -= 1) { 56 if (((d = c.slice(0, k).join("/")), n)) 57 for (l = n.length; l > 0; l -= 1) 58 if ( 59 ((e = o[n.slice(0, l).join("/")]), 60 e && (e = e[d])) 61 ) { 62 (f = e), (h = k); 63 break; 64 } 65 if (f) break; 66 !i && p && p[d] && ((i = p[d]), (j = k)); 67 } 68 !f && i && ((f = i), (h = j)), 69 f && (c.splice(0, h, f), (a = c.join("/"))); 70 } 71 return a; 72 } 73 function g(a, c) { 74 return function () { 75 var d = v.call(arguments, 0); 76 return ( 77 "string" != typeof d[0] && 1 === d.length && d.push(null), 78 n.apply(b, d.concat([a, c])) 79 ); 80 }; 81 } 82 function h(a) { 83 return function (b) { 84 return f(b, a); 85 }; 86 } 87 function i(a) { 88 return function (b) { 89 q[a] = b; 90 }; 91 } 92 function j(a) { 93 if (e(r, a)) { 94 var c = r[a]; 95 delete r[a], (t[a] = !0), m.apply(b, c); 96 } 97 if (!e(q, a) && !e(t, a)) throw new Error("No " + a); 98 return q[a]; 99 } 100 function k(a) { 101 var b, 102 c = a ? a.indexOf("!") : -1; 103 return ( 104 c > -1 && 105 ((b = a.substring(0, c)), 106 (a = a.substring(c + 1, a.length))), 107 [b, a] 108 ); 109 } 110 function l(a) { 111 return function () { 112 return (s && s.config && s.config[a]) || {}; 113 }; 114 } 115 var m, 116 n, 117 o, 118 p, 119 q = {}, 120 r = {}, 121 s = {}, 122 t = {}, 123 u = Object.prototype.hasOwnProperty, 124 v = [].slice, 125 w = /\.js$/; 126 (o = function (a, b) { 127 var c, 128 d = k(a), 129 e = d[0]; 130 return ( 131 (a = d[1]), 132 e && ((e = f(e, b)), (c = j(e))), 133 e 134 ? (a = c && c.normalize ? c.normalize(a, h(b)) : f(a, b)) 135 : ((a = f(a, b)),
136 (d = k(a)), 137 (e = d[0]), 138 (a = d[1]), 139 e && (c = j(e))), 140 { f: e ? e + "!" + a : a, n: a, pr: e, p: c } 141 ); 142 }), 143 (p = { 144 require: function (a) { 145 return g(a); 146 }, 147 exports: function (a) { 148 var b = q[a]; 149 return "undefined" != typeof b ? b : (q[a] = {}); 150 }, 151 module: function (a) { 152 return { id: a, uri: "", exports: q[a], config: l(a) }; 153 }, 154 }), 155 (m = function (a, c, d, f) { 156 var h, 157 k, 158 l, 159 m, 160 n, 161 s, 162 u = [], 163 v = typeof d; 164 if (((f = f || a), "undefined" === v || "function" === v)) { 165 for ( 166 c = 167 !c.length && d.length 168 ? ["require", "exports", "module"] 169 : c, 170 n = 0; 171 n < c.length; 172 n += 1 173 ) 174 if (((m = o(c[n], f)), (k = m.f), "require" === k)) 175 u[n] = p.require(a); 176 else if ("exports" === k) 177 (u[n] = p.exports(a)), (s = !0); 178 else if ("module" === k) h = u[n] = p.module(a); 179 else if (e(q, k) || e(r, k) || e(t, k)) u[n] = j(k); 180 else { 181 if (!m.p) throw new Error(a + " missing " + k); 182 m.p.load(m.n, g(f, !0), i(k), {}), (u[n] = q[k]); 183 } 184 (l = d ? d.apply(q[a], u) : void 0), 185 a && 186 (h && h.exports !== b && h.exports !== q[a] 187 ? (q[a] = h.exports
187) 188 : (l === b && s) || (q[a] = l)); 189 } else a && (q[a] = d); 190 }), 191 (a = c = n = function (a, c, d, e, f) { 192 if ("string" == typeof a) return p[a] ? p[a](c) : j(o(a, c).f); 193 if (!a.splice) { 194 if (((s = a), s.deps && n(s.deps, s.callback), !c)) return; 195 c.splice ? ((a = c), (c = d), (d = null)) : (a = b); 196 } 197 return ( 198 (c = c || function () {}), 199 "function" == typeof d && ((d = e), (e = f)), 200 e 201 ? m(b, a, c, d) 202 : setTimeout(function () { 203 m(b, a, c, d); 204 }, 4), 205 n 206 ); 207 }), 208 (n.config = function (a) { 209 return n(a); 210 }), 211 (a._defined = q), 212 (d = function (a, b, c) { 213 if ("string" != typeof a) 214 throw new Error( 215 "See almond README: incorrect module build, no module name" 216 ); 217 b.splice || ((c = b), (b = [])), 218 e(q, a) || e(r, a) || (r[a] = [a, b, c]); 219 }), 220 (d.amd = { jQuery: !0 }); 221 })(), 222 (b.requirejs = a), 223 (b.require = c), 224 (b.define = d); 225 } 226 })(), 227 b.define("almond", function () {}), 228 b.define("jquery", [], function () { 229 var b = a || $; 230 return ( 231 null == b && 232 console && 233 console.error && 234 console.error( 235 "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." 236 ), 237 b 238 ); 239 }), 240 b.define("select2/utils", ["jquery"], function (a) { 241 function b(a) { 242 var b = a.prototype, 243 c = []; 244 for (var d in b) { 245 var e = b[d]; 246 "function" == typeof e && "constructor" !== d && c.push(d); 247 } 248 return c; 249 } 250 var c = {}; 251 (c.Extend = function (a, b) { 252 function c() { 253 this.constructor = a; 254 } 255 var d = {}.hasOwnProperty; 256 for (var e in b) d.call(b, e) && (a[e] = b[e]); 257 return ( 258 (c.prototype = b.prototype), 259 (a.prototype = new c()), 260 (a.__super__ = b.prototype), 261 a 262 ); 263 }), 264 (c.Decorate = function (a, c) { 265 function d() { 266 var b = Array.prototype.unshift, 267 d = c.prototype.constructor.length, 268 e = a.prototype.constructor; 269 d > 0 && 270 (b.call(arguments, a.prototype.constructor), 271 (e = c.prototype.constructor)), 272 e.apply(this, arguments); 273 } 274 function e() { 275 this.constructor = d; 276 } 277 var f = b(c), 278 g = b(a); 279 (c.displayName = a.displayName), (d.prototype = new e()); 280 for (var h = 0; h < g.length; h++) { 281 var i = g[h]; 282 d.prototype[i] = a.prototype[i]; 283 } 284 for ( 285 var j = function (a) { 286 var b = function () {}; 287 (a in d.prototype) && (b = d.prototype[a]); 288 var e = c.prototype[a]; 289 return function () { 290 var a = Array.prototype.unshift; 291 return a.call(arguments, b), e.apply(this, arguments); 292 }; 293 }, 294 k = 0; 295 k < f.length; 296 k++ 297 ) { 298 var l = f[k]; 299 d.prototype[l] = j(l); 300 } 301 return d; 302 }); 303 var d = function () { 304 this.listeners = {}; 305 }; 306 return ( 307 (d.prototype.on = function (a, b) { 308 (this.listeners = this.listeners || {}), 309 a in this.listeners 310 ? this.listeners[a].push(b) 311 : (this.listeners[a] = [b]); 312 }), 313 (d.prototype.trigger = function (a) { 314 var b = Array.prototype.slice, 315 c = b.call(arguments, 1); 316 (this.listeners = this.listeners || {}), 317 null == c && (c = []), 318 0 === c.length && c.push({}), 319 (c[0]._type = a), 320 a in this.listeners && 321 this.invoke(this.listeners[a], b.call(arguments, 1)), 322 "*" in this.listeners && 323 this.invoke(this.listeners["*"], arguments); 324 }), 325 (d.prototype.invoke = function (a, b) { 326 for (var c = 0, d = a.length; d > c; c++) a[c].apply(this, b); 327 }), 328 (c.Observable = d), 329 (c.generateChars = function (a) { 330 for (var b = "", c = 0; a > c; c++) { 331 var d = Math.floor(36 * Math.random()); 332 b += d.toString(36); 333 } 334 return b; 335 }), 336 (c.bind = function (a, b) { 337 return function () { 338 a.apply(b, arguments); 339 }; 340 }), 341 (c._convertData = function (a) { 342 for (var b in a) { 343 var c = b.split("-"), 344 d = a; 345 if (1 !== c.length) { 346 for (var e = 0; e < c.length; e++) { 347 var f = c[e]; 348 (f = f.substring(0, 1).toLowerCase() + f.substring(1)), 349 f in d || (d[f] = {}), 350 e == c.length - 1 && (d[f] = a[b]), 351 (d = d[f]); 352 } 353 delete a[b]; 354 } 355 } 356 return a; 357 }), 358 (c.hasScroll = function (b, c) { 359 var d = a(c), 360 e = c.style.overflowX, 361 f = c.style.overflowY; 362 return e !== f || ("hidden" !== f && "visible" !== f) 363 ? "scroll" === e || "scroll" === f 364 ? !0 365 : d.innerHeight() < c.scrollHeight || 366 d.innerWidth() < c.scrollWidth 367 : !1; 368 }), 369 (c.escapeMarkup = function (a) { 370 var b = { 371 "\\": "\", 372 "&": "&", 373 "<": "<", 374 ">": ">", 375 '"': """, 376 "'": "'", 377 "/": "/", 378 }; 379 return "string" != typeof a 380 ? a 381 : String(a).replace(/[&<>"'\/\\]/g, function (a) { 382 return b[a]; 383 }); 384 }), 385 (c.appendMany = function (b, c) { 386 if ("1.7" === a.fn.jquery.substr(0, 3)) { 387 var d = a(); 388 a.map(c, function (a) { 389 d = d.add(a); 390 }), 391 (c = d); 392 } 393 b.append(c); 394 }), 395 c 396 ); 397 }), 398 b.define("select2/results", ["jquery", "./utils"], function (a, b) { 399 function c(a, b, d) { 400 (this.$element = a), 401 (this.data = d), 402 (this.options = b), 403 c.__super__.constructor.call(this); 404 } 405 return ( 406 b.Extend(c, b.Observable), 407 (c.prototype.render = function () { 408 var b = a('<ul class="select2-results__options" role="tree"></ul>'); 409 return ( 410 this.options.get("multiple") && 411 b.attr("aria-multiselectable", "true"), 412 (this.$results = b), 413 b 414 ); 415 }), 416 (c.prototype.clear = function () { 417 this.$results.empty(); 418 }), 419 (c.prototype.displayMessage = function (b) { 420 var c = this.options.get("escapeMarkup"); 421 this.clear(), this.hideLoading(); 422 var d = a( 423 '<li role="treeitem" aria-live="assertive" class="select2-results__option"></li>' 424 ), 425 e = this.options.get("translations").get(b.message); 426 d.append(c(e(b.args))), 427 (d[0].className += " select2-results__message"), 428 this.$results.append(d); 429 }), 430 (c.prototype.hideMessages = function () { 431 this.$results.find(".select2-results__message").remove(); 432 }), 433 (c.prototype.append = function (a) { 434 this.hideLoading(); 435 var b = []; 436 if (null == a.results || 0 === a.results.length) 437 return void ( 438 0 === this.$results.children().length && 439 this.trigger("results:message", { message: "noResults" }) 440 ); 441 a.results = this.sort(a.results); 442 for (var c = 0; c < a.results.length; c++) { 443 var d = a.results[c], 444 e = this.option(d); 445 b.push(e); 446 } 447 this.$results.append(b); 448 }), 449 (c.prototype.position = function (a, b) { 450 var c = b.find(".select2-results"); 451 c.append(a); 452 }), 453 (c.prototype.sort = function (a) { 454 var b = this.options.get("sorter"); 455 return b(a); 456 }), 457 (c.prototype.highlightFirstItem = function () { 458 var a = this.$results.find(".select2-results__option[aria-selected]"), 459 b = a.filter("[aria-selected=true]"); 460 b.length > 0 461 ? b.first().trigger("mouseenter") 462 : a.first().trigger("mouseenter"), 463 this.ensureHighlightVisible(); 464 }), 465 (c.prototype.setClasses = function () { 466 var b = this; 467 this.data.current(function (c) { 468 var d = a.map(c, function (a) { 469 return a.id.toString(); 470 }), 471 e = b.$results.find(".select2-results__option[aria-selected]"); 472 e.each(function () { 473 var b = a(this), 474 c = a.data(this, "data"), 475 e = "" + c.id; 476 (null != c.element && c.element.selected) || 477 (null == c.element && a.inArray(e, d) > -1) 478 ? b.attr("aria-selected", "true") 479 : b.attr("aria-selected", "false"); 480 }); 481 }); 482 }), 483 (c.prototype.showLoading = function (a) { 484 this.hideLoading(); 485 var b = this.options.get("translations").get("searching"), 486 c = { disabled: !0, loading: !0, text: b(a) }, 487 d = this.option(c); 488 (d.className += " loading-results"), this.$results.prepend(d); 489 }), 490 (c.prototype.hideLoading = function () { 491 this.$results.find(".loading-results").remove(); 492 }), 493 (c.prototype.option = function (b) { 494 var c = document.createElement("li"); 495 c.className = "select2-results__option"; 496 var d = { role: "treeitem", "aria-selected": "false" }; 497
497 b.disabled && 498 (delete d["aria-selected"], (d["aria-disabled"] = "true")), 499 null == b.id && delete d["aria-selected"], 500 null != b._resultId && (c.id = b._resultId), 501 b.title && (c.title = b.title), 502 b.children && 503 ((d.role = "group"), 504 (d["aria-label"] = b.text), 505 delete d["aria-selected"]); 506 for (var e in d) { 507 var f = d[e]; 508 c.setAttribute(e, f); 509 } 510 if (b.children) { 511 var g = a(c), 512 h = document.createElement("strong"); 513 h.className = "select2-results__group"; 514 a(h); 515 this.template(b, h); 516 for (var i = [], j = 0; j < b.children.length; j++) { 517 var k = b.children[j], 518 l = this.option(k); 519 i.push(l); 520 } 521 var m = a("<ul></ul>", { 522 class: 523 "select2-results__options select2-results__options--nested", 524 }); 525 m.append(i), g.append(h), g.append(m); 526 } else this.template(b, c); 527 return a.data(c, "data", b), c; 528 }), 529 (c.prototype.bind = function (b, c) { 530 var d = this, 531 e = b.id + "-results"; 532 this.$results.attr("id", e), 533 b.on("results:all", function (a) { 534 d.clear(), 535 d.append(a.data), 536 b.isOpen() && (d.setClasses(), d.highlightFirstItem()); 537 }), 538 b.on("results:append", function (a) { 539 d.append(a.data), b.isOpen() && d.setClasses(); 540 }), 541 b.on("query", function (a) { 542 d.hideMessages(), d.showLoading(a); 543 }), 544 b.on("select", function () { 545 b.isOpen() && (d.setClasses(), d.highlightFirstItem()); 546 }), 547 b.on("unselect", function () { 548 b.isOpen() && (d.setClasses(), d.highlightFirstItem()); 549 }), 550 b.on("open", function () { 551 d.$results.attr("aria-expanded", "true"), 552 d.$results.attr("aria-hidden", "false"), 553 d.setClasses(), 554 d.ensureHighlightVisible(); 555 }), 556 b.on("close", function () { 557 d.$results.attr("aria-expanded", "false"), 558 d.$results.attr("aria-hidden", "true"), 559 d.$results.removeAttr("aria-activedescendant"); 560 }), 561 b.on("results:toggle", function () { 562 var a = d.getHighlightedResults(); 563 0 !== a.length && a.trigger("mouseup"); 564 }), 565 b.on("results:select", function () { 566 var a = d.getHighlightedResults(); 567 if (0 !== a.length) { 568 var b = a.data("data"); 569 "true" == a.attr("aria-selected") 570 ? d.trigger("close", {}) 571 : d.trigger("select", { data: b }); 572 } 573 }), 574 b.on("results:previous", function () { 575 var a = d.getHighlightedResults(), 576 b = d.$results.find("[aria-selected]"), 577 c = b.index(a); 578 if (0 !== c) { 579 var e = c - 1; 580 0 === a.length && (e = 0); 581 var f = b.eq(e); 582 f.trigger("mouseenter"); 583 var g = d.$results.offset().top, 584 h = f.offset().top, 585 i = d.$results.scrollTop() + (h - g); 586 0 === e 587 ? d.$results.scrollTop(0) 588 : 0 > h - g && d.$results.scrollTop(i); 589 } 590 }), 591 b.on("results:next", function () { 592 var a = d.getHighlightedResults(), 593 b = d.$results.find("[aria-selected]"), 594 c = b.index(a), 595 e = c + 1; 596 if (!(e >= b.length)) { 597 var f = b.eq(e); 598 f.trigger("mouseenter"); 599 var g = 600 d.$results.offset().top + 601 d.$results.outerHeight(!1), 602 h = f.offset().top + f.outerHeight(!1), 603 i = d.$results.scrollTop() + h - g; 604 0 === e 605 ? d.$results.scrollTop(0) 606 : h > g && d.$results.scrollTop(i); 607 } 608 }), 609 b.on("results:focus", function (a) { 610 a.element.addClass("select2-results__option--highlighted"); 611 }), 612 b.on("results:message", function (a) { 613 d.displayMessage(a); 614 }), 615 a.fn.mousewheel && 616 this.$results.on("mousewheel", function (a) { 617 var b = d.$results.scrollTop(), 618 c = d.$results.get(0).scrollHeight - b + a.deltaY, 619 e = a.deltaY > 0 && b - a.deltaY <= 0, 620 f = a.deltaY < 0 && c <= d.$results.height(); 621 e 622 ? (d.$results.scrollTop(0), 623 a.preventDefault(), 624 a.stopPropagation()) 625 : f && 626 (d.$results.scrollTop( 627 d.$results.get(0).scrollHeight - 628 d.$results.height() 629 ), 630 a.preventDefault(), 631 a.stopPropagation()); 632 }), 633 this.$results.on( 634 "mouseup", 635 ".select2-results__option[aria-selected]", 636 function (b) { 637 var c = a(this), 638 e = c.data("data"); 639 return "true" === c.attr("aria-selected") 640 ? void (d.options.get("multiple") 641 ? d.trigger("unselect", { 642 originalEvent: b, 643 data: e, 644 }) 645 : d.trigger("close", {})) 646 : void d.trigger("select", { 647 originalEvent: b, 648 data: e, 649 }); 650 } 651 ), 652 this.$results.on( 653 "mouseenter", 654 ".select2-results__option[aria-selected]", 655 function (b) { 656 var c = a(this).data("data"); 657 d 658 .getHighlightedResults() 659 .removeClass("select2-results__option--highlighted"), 660 d.trigger("results:focus", { 661 data: c, 662 element: a(this), 663 }); 664 } 665 ); 666 }), 667 (c.prototype.getHighlightedResults = function () { 668 var a = this.$results.find(".select2-results__option--highlighted"); 669 return a; 670 }), 671 (c.prototype.destroy = function () { 672 this.$results.remove(); 673 }), 674 (c.prototype.ensureHighlightVisible = function () { 675 var a = this.getHighlightedResults(); 676 if (0 !== a.length) { 677 var b = this.$results.find("[aria-selected]"), 678 c = b.index(a), 679 d = this.$results.offset().top, 680 e = a.offset().top, 681 f = this.$results.scrollTop() + (e - d), 682 g = e - d; 683 (f -= 2 * a.outerHeight(!1)), 684 2 >= c 685 ? this.$results.scrollTop(0) 686 : (g > this.$results.outerHeight() || 0 > g) && 687 this.$results.scrollTop(f); 688 } 689 }), 690 (c.prototype.template = function (b, c) { 691 var d = this.options.get("templateResult"), 692 e = this.options.get("escapeMarkup"), 693 f = d(b, c); 694 null == f 695 ? (c.style.display = "none") 696 : "string" == typeof f 697 ? (c.innerHTML = e(f)) 698 : a(c).append(f); 699 }), 700 c 701 ); 702 }), 703 b.define("select2/keys", [], function () { 704 var a = { 705 BACKSPACE: 8, 706 TAB: 9, 707 ENTER: 13, 708 SHIFT: 16, 709 CTRL: 17, 710 ALT: 18, 711 ESC: 27, 712 SPACE: 32, 713 PAGE_UP: 33, 714 PAGE_DOWN: 34, 715 END: 35, 716 HOME: 36, 717 LEFT: 37, 718 UP: 38, 719 RIGHT: 39, 720 DOWN: 40, 721 DELETE: 46, 722 }; 723 return a; 724 }), 725 b.define( 726 "select2/selection/base", 727 ["jquery", "../utils", "../keys"], 728 function (a, b, c) { 729 function d(a, b) { 730 (this.$element = a), 731 (this.options = b), 732 d.__super__.constructor.call(this); 733 } 734 return ( 735 b.Extend(d, b.Observable), 736 (d.prototype.render = function () { 737 var b = a( 738 '<span class="select2-selection" role="combobox" aria-haspopup="true" aria-expanded="false"></span>' 739 ); 740 return ( 741 (this._tabindex = 0), 742 null != this.$element.data("old-tabindex") 743 ? (this._tabindex = this.$element.data("old-tabindex")) 744 : null != this.$element.attr("tabindex") && 745 (this._tabindex = this.$element.attr("tabindex")), 746 b.attr("title", this.$element.attr("title")), 747 b.attr("tabindex", this._tabindex), 748 (this.$selection = b), 749 b 750 ); 751 }), 752 (d.prototype.bind = function (a, b) { 753 var d = this, 754 e = (a.id + "-container", a.id + "-results"); 755 (this.container = a), 756 this.$selection.on("focus", function (a) { 757 d.trigger("focus", a); 758 }), 759 this.$selection.on("blur", function (a) { 760 d._handleBlur(a); 761 }), 762 this.$selection.on("keydown", function (a) { 763 d.trigger("keypress", a), 764 a.which === c.SPACE && a.preventDefault(); 765 }), 766 a.on("results:focus", function (a) { 767 d.$selection.attr( 768 "aria-activedescendant", 769 a.data._resultId 770 ); 771 }), 772 a.on("selection:update", function (a) { 773 d.update(a.data); 774 }), 775 a.on("open", function () { 776 d.$selection.attr("aria-expanded", "true"), 777 d.$selection.attr("aria-owns", e), 778 d._attachCloseHandler(a); 779
779 }), 780 a.on("close", function () { 781 d.$selection.attr("aria-expanded", "false"), 782 d.$selection.removeAttr("aria-activedescendant"), 783 d.$selection.removeAttr("aria-owns"), 784 d.$selection.focus(), 785 d._detachCloseHandler(a); 786 }), 787 a.on("enable", function () { 788 d.$selection.attr("tabindex", d._tabindex); 789 }), 790 a.on("disable", function () { 791 d.$selection.attr("tabindex", "-1"); 792 }); 793 }), 794 (d.prototype._handleBlur = function (b) { 795 var c = this; 796 window.setTimeout(function () { 797 document.activeElement == c.$selection[0] || 798 a.contains(c.$selection[0], document.activeElement) || 799 c.trigger("blur", b); 800 }, 1); 801 }), 802 (d.prototype._attachCloseHandler = function (b) { 803 a(document.body).on("mousedown.select2." + b.id, function (b) { 804 var c = a(b.target), 805 d = c.closest(".select2"), 806 e = a(".select2.select2-container--open"); 807 e.each(function () { 808 var b = a(this); 809 if (this != d[0]) { 810 var c = b.data("element"); 811 c.mselect2("close"); 812 } 813 }); 814 }); 815 }), 816 (d.prototype._detachCloseHandler = function (b) { 817 a(document.body).off("mousedown.select2." + b.id); 818 }), 819 (d.prototype.position = function (a, b) { 820 var c = b.find(".selection"); 821 c.append(a); 822 }), 823 (d.prototype.destroy = function () { 824 this._detachCloseHandler(this.container); 825 }), 826 (d.prototype.update = function (a) { 827 throw new Error( 828 "The `update` method must be defined in child classes." 829 ); 830 }), 831 d 832 ); 833 } 834 ), 835 b.define( 836 "select2/selection/single", 837 ["jquery", "./base", "../utils", "../keys"], 838 function (a, b, c, d) { 839 function e() { 840 e.__super__.constructor.apply(this, arguments); 841 } 842 return ( 843 c.Extend(e, b), 844 (e.prototype.render = function () { 845 var a = e.__super__.render.call(this); 846 return ( 847 a.addClass("select2-selection--single"), 848 a.html( 849 '<span class="select2-selection__rendered"></span><span class="select2-selection__arrow" role="presentation"><b role="presentation"></b></span>' 850 ), 851 a 852 ); 853 }), 854 (e.prototype.bind = function (a, b) { 855 var c = this; 856 e.__super__.bind.apply(this, arguments); 857 var d = a.id + "-container"; 858 this.$selection.find(".select2-selection__rendered").attr("id", d), 859 this.$selection.attr("aria-labelledby", d), 860 this.$selection.on("mousedown", function (a) { 861 1 === a.which && c.trigger("toggle", { originalEvent: a }); 862 }), 863 this.$selection.on("focus", function (a) {}), 864 this.$selection.on("blur", function (a) {}), 865 a.on("focus", function (b) { 866 a.isOpen() || c.$selection.focus(); 867 }), 868 a.on("selection:update", function (a) { 869 c.update(a.data); 870 }); 871 }), 872 (e.prototype.clear = function () { 873 this.$selection.find(".select2-selection__rendered").empty(); 874 }), 875 (e.prototype.display = function (a, b) { 876 var c = this.options.get("templateSelection"), 877 d = this.options.get("escapeMarkup"); 878 return d(c(a, b)); 879 }), 880 (e.prototype.selectionContainer = function () { 881 return a("<span></span>"); 882 }), 883 (e.prototype.update = function (a) { 884 if (0 === a.length) return void this.clear(); 885 var b = a[0], 886 c = this.$selection.find(".select2-selection__rendered"), 887 d = this.display(b, c); 888 c.empty().append(d), c.prop("title", b.title || b.text); 889 }), 890 e 891 ); 892 } 893 ), 894 b.define( 895 "select2/selection/multiple", 896 ["jquery", "./base", "../utils"], 897 function (a, b, c) { 898 function d(a, b) { 899 d.__super__.constructor.apply(this, arguments); 900 } 901 return ( 902 c.Extend(d, b), 903 (d.prototype.render = function () { 904 var a = d.__super__.render.call(this); 905 return ( 906 a.addClass("select2-selection--multiple"), 907 a.html('<ul class="select2-selection__rendered"></ul>'), 908 a 909 ); 910 }), 911 (d.prototype.bind = function (b, c) { 912 var e = this; 913 d.__super__.bind.apply(this, arguments), 914 this.$selection.on("click", function (a) { 915 e.trigger("toggle", { originalEvent: a }); 916 }), 917 this.$selection.on( 918 "click", 919 ".select2-selection__choice__remove", 920 function (b) { 921 if (!e.options.get("disabled")) { 922 var c = a(this), 923 d = c.parent(), 924 f = d.data("data"); 925 e.trigger("unselect", { 926 originalEvent: b, 927 data: f, 928 }); 929 } 930 } 931 ); 932 }), 933 (d.prototype.clear = function () { 934 this.$selection.find(".select2-selection__rendered").empty(); 935 }), 936 (d.prototype.display = function (a, b) { 937 var c = this.options.get("templateSelection"), 938 d = this.options.get("escapeMarkup"); 939 return d(c(a, b)); 940 }), 941 (d.prototype.selectionContainer = function () { 942 var b = a( 943 '<li class="select2-selection__choice"><span class="select2-selection__choice__remove" role="presentation">×</span></li>' 944 ); 945 return b; 946 }), 947 (d.prototype.update = function (a) { 948 if ((this.clear(), 0 !== a.length)) { 949 for (var b = [], d = 0; d < a.length; d++) { 950 var e = a[d], 951 f = this.selectionContainer(), 952 g = this.display(e, f); 953 f.append(g), 954 f.prop("title", e.title || e.text), 955 f.data("data", e), 956 b.push(f); 957 } 958 var h = this.$selection.find(".select2-selection__rendered"); 959 c.appendMany(h, b); 960 } 961 }), 962 d 963 ); 964 } 965 ), 966 b.define("select2/selection/placeholder", ["../utils"], function (a) { 967 function b(a, b, c) { 968 (this.placeholder = this.normalizePlaceholder(c.get("placeholder"))), 969 a.call(this, b, c); 970 } 971 return ( 972 (b.prototype.normalizePlaceholder = function (a, b) { 973 return "string" == typeof b && (b = { id: "", text: b }), b; 974 }), 975 (b.prototype.createPlaceholder = function (a, b) { 976 var c = this.selectionContainer(); 977 return ( 978 c.html(this.display(b)), 979 c 980 .addClass("select2-selection__placeholder") 981 .removeClass("select2-selection__choice"), 982 c 983 ); 984 }), 985 (b.prototype.update = function (a, b) { 986 var c = 1 == b.length && b[0].id != this.placeholder.id, 987 d = b.length > 1; 988 if (d || c) return a.call(this, b); 989 this.clear(); 990 var e = this.createPlaceholder(this.placeholder); 991 this.$selection.find(".select2-selection__rendered").append(e); 992 }), 993 b 994 ); 995 }), 996 b.define("select2/selection/allowClear", ["jquery", "../keys"], function (a, b) { 997 function c() {} 998 return ( 999 (c.prototype.bind = function (a, b, c) { 1000 var d = this; 1001 a.call(this, b, c), 1002 null == this.placeholder && 1003 this.options.get("debug") && 1004 window.console && 1005 console.error && 1006 console.error( 1007 "Select2: The `allowClear` option should be used in combination with the `placeholder` option." 1008 ), 1009 this.$selection.on( 1010 "mousedown", 1011 ".select2-selection__clear", 1012 function (a) { 1013 d._handleClear(a); 1014 } 1015 ), 1016 b.on("keypress", function (a) { 1017 d._handleKeyboardClear(a, b); 1018 }); 1019 }), 1020 (c.prototype._handleClear = function (a, b) { 1021 if (!this.options.get("disabled")) { 1022 var c = this.$selection.find(".select2-selection__clear"); 1023 if (0 !== c.length) { 1024 b.stopPropagation(); 1025 for (var d = c.data("data"), e = 0; e < d.length; e++) { 1026 var f = { data: d[e] }; 1027 if ((this.trigger("unselect", f), f.prevented)) return; 1028 } 1029 this.$element.val(this.placeholder.id).trigger("change"), 1030 this.trigger("toggle", {}); 1031 } 1032 } 1033 }), 1034 (c.prototype._handleKeyboardClear = function (a, c, d) { 1035 d.isOpen() ||
1036 ((c.which == b.DELETE || c.which == b.BACKSPACE) && 1037 this._handleClear(c)); 1038 }), 1039 (c.prototype.update = function (b, c) { 1040 if ( 1041 (b.call(this, c), 1042 !( 1043 this.$selection.find(".select2-selection__placeholder").length > 1044 0 || 0 === c.length 1045 )) 1046 ) { 1047 var d = a('<span class="select2-selection__clear">×</span>'); 1048 d.data("data", c), 1049 this.$selection.find(".select2-selection__rendered").prepend(d); 1050 } 1051 }), 1052 c 1053 ); 1054 }), 1055 b.define( 1056 "select2/selection/search", 1057 ["jquery", "../utils", "../keys"], 1058 function (a, b, c) { 1059 function d(a, b, c) { 1060 a.call(this, b, c); 1061 } 1062 return ( 1063 (d.prototype.render = function (b) { 1064 var c = a( 1065 '<li class="select2-search select2-search--inline"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" role="textbox" aria-autocomplete="list" /></li>' 1066 ); 1067 (this.$searchContainer = c), (this.$search = c.find("input")); 1068 var d = b.call(this); 1069 return this._transferTabIndex(), d; 1070 }), 1071 (d.prototype.bind = function (a, b, d) { 1072 var e = this; 1073 a.call(this, b, d), 1074 b.on("open", function () { 1075 e.$search.trigger("focus"); 1076 }), 1077 b.on("close", function () { 1078 e.$search.val(""), 1079 e.$search.removeAttr("aria-activedescendant"), 1080 e.$search.trigger("focus"); 1081 }), 1082 b.on("enable", function () { 1083 e.$search.prop("disabled", !1), e._transferTabIndex(); 1084 }), 1085 b.on("disable", function () { 1086 e.$search.prop("disabled", !0); 1087 }), 1088 b.on("focus", function (a) { 1089 e.$search.trigger("focus"); 1090 }), 1091 b.on("results:focus", function (a) { 1092 e.$search.attr("aria-activedescendant", a.id); 1093 }), 1094 this.$selection.on( 1095 "focusin", 1096 ".select2-search--inline", 1097 function (a) { 1098 e.trigger("focus", a); 1099 } 1100 ), 1101 this.$selection.on( 1102 "focusout", 1103 ".select2-search--inline", 1104 function (a) { 1105 e._handleBlur(a); 1106 } 1107 ), 1108 this.$selection.on( 1109 "keydown", 1110 ".select2-search--inline", 1111 function (a) { 1112 a.stopPropagation(), 1113 e.trigger("keypress", a), 1114 (e._keyUpPrevented = a.isDefaultPrevented()); 1115 var b = a.which; 1116 if (b === c.BACKSPACE && "" === e.$search.val()) { 1117 var d = e.$searchContainer.prev( 1118 ".select2-selection__choice" 1119 ); 1120 if (d.length > 0) { 1121 var f = d.data("data"); 1122 e.searchRemoveChoice(f), a.preventDefault(); 1123 } 1124 } 1125 } 1126 ); 1127 var f = document.documentMode, 1128 g = f && 11 >= f; 1129 this.$selection.on( 1130 "input.searchcheck", 1131 ".select2-search--inline", 1132 function (a) { 1133 return g 1134 ? void e.$selection.off( 1135 "input.search input.searchcheck" 1136 ) 1137 : void e.$selection.off("keyup.search"); 1138 } 1139 ), 1140 this.$selection.on( 1141 "keyup.search input.search", 1142 ".select2-search--inline", 1143 function (a) { 1144 if (g && "input" === a.type) 1145 return void e.$selection.off( 1146 "input.search input.searchcheck" 1147 ); 1148 var b = a.which; 1149 b != c.SHIFT &&
1150 b != c.CTRL && 1151 b != c.ALT && 1152 b != c.TAB && 1153 e.handleSearch(a); 1154 } 1155 ); 1156 }), 1157 (d.prototype._transferTabIndex = function (a) { 1158 this.$search.attr("tabindex", this.$selection.attr("tabindex")), 1159 this.$selection.attr("tabindex", "-1"); 1160 }), 1161 (d.prototype.createPlaceholder = function (a, b) { 1162 this.$search.attr("placeholder", b.text); 1163 }), 1164 (d.prototype.update = function (a, b) { 1165 var c = this.$search[0] == document.activeElement; 1166 this.$search.attr("placeholder", ""), 1167 a.call(this, b), 1168 this.$selection 1169 .find(".select2-selection__rendered") 1170 .append(this.$searchContainer), 1171 this.resizeSearch(), 1172 c && this.$search.focus(); 1173 }), 1174 (d.prototype.handleSearch = function () { 1175 if ((this.resizeSearch(), !this._keyUpPrevented)) { 1176 var a = this.$search.val(); 1177 this.trigger("query", { term: a }); 1178 } 1179 this._keyUpPrevented = !1; 1180 }), 1181 (d.prototype.searchRemoveChoice = function (a, b) { 1182 this.trigger("unselect", { data: b }), 1183 this.$search.val(b.text), 1184 this.handleSearch(); 1185 }), 1186 (d.prototype.resizeSearch = function () { 1187 this.$search.css("width", "25px"); 1188 var a = ""; 1189 if ("" !== this.$search.attr("placeholder")) 1190 a = this.$selection 1191 .find(".select2-selection__rendered") 1192 .innerWidth(); 1193 else { 1194 var b = this.$search.val().length + 1; 1195 a = 0.75 * b + "em"; 1196 } 1197 this.$search.css("width", a); 1198 }), 1199 d 1200 ); 1201 } 1202 ), 1203 b.define("select2/selection/eventRelay", ["jquery"], function (a) { 1204 function b() {} 1205 return ( 1206 (b.prototype.bind = function (b, c, d) { 1207 var e = this, 1208 f = [ 1209 "open", 1210 "opening", 1211 "close", 1212 "closing", 1213 "select", 1214 "selecting", 1215 "unselect", 1216 "unselecting", 1217 ], 1218 g = ["opening", "closing", "selecting", "unselecting"]; 1219 b.call(this, c, d), 1220 c.on("*", function (b, c) { 1221 if (-1 !== a.inArray(b, f)) { 1222 c = c || {}; 1223 var d = a.Event("select2:" + b, { params: c }); 1224 e.$element.trigger(d), 1225 -1 !== a.inArray(b, g) && 1226 (c.prevented = d.isDefaultPrevented()); 1227 } 1228 }); 1229 }), 1230 b 1231 ); 1232 }), 1233 b.define("select2/translation", ["jquery", "require"], function (a, b) { 1234 function c(a) { 1235 this.dict = a || {}; 1236 } 1237 return ( 1238 (c.prototype.all = function () { 1239 return this.dict; 1240 }), 1241 (c.prototype.get = function (a) { 1242 return this.dict[a]; 1243 }), 1244 (c.prototype.extend = function (b) { 1245 this.dict = a.extend({}, b.all(), this.dict); 1246 }), 1247 (c._cache = {}), 1248 (c.loadPath = function (a) { 1249 if (!(a in c._cache)) { 1250 var d = b(a); 1251 c._cache[a] = d; 1252 } 1253 return new c(c._cache[a]); 1254 }), 1255 c 1256 ); 1257 }), 1258 b.define("select2/diacritics", [], function () { 1259 var a = { 1260 "â¶": "A", 1261 A: "A", 1262 Ã: "A", 1263 Ã: "A", 1264 Ã: "A", 1265 Ầ: "A", 1266 Ấ: "A", 1267 Ẫ: "A", 1268 Ẩ: "A", 1269 Ã: "A", 1270 Ä: "A", 1271 Ä: "A", 1272 Ằ: "A", 1273 Ắ: "A", 1274 Ẵ: "A", 1275 Ẳ: "A", 1276 Ȧ: "A", 1277 Ç : "A", 1278 Ã: "A", 1279 Ç: "A", 1280 Ả: "A", 1281 à : "A", 1282 Ǻ: "A", 1283 Ç: "A", 1284 È: "A", 1285 È: "A", 1286 Ạ: "A", 1287 Ậ: "A", 1288 Ặ: "A", 1289 á¸: "A", 1290 Ä: "A", 1291 Ⱥ: "A", 1292 Ɐ: "A", 1293 ê²: "AA", 1294 Ã: "AE", 1295 Ǽ: "AE", 1296 Ç¢: "AE", 1297 ê´: "AO", 1298 ê¶: "AU", 1299 ê¸: "AV", 1300 êº: "AV", 1301 ê¼: "AY", 1302 "â·": "B", 1303 ï¼¢: "B", 1304 á¸: "B", 1305 á¸: "B", 1306 á¸: "B", 1307 É: "B", 1308 Æ: "B", 1309 Æ: "B", 1310 "â¸": "C", 1311 ï¼£: "C", 1312 Ä: "C", 1313 Ä: "C", 1314 Ä: "C", 1315 Ä: "C", 1316 Ã: "C", 1317 á¸: "C", 1318 Æ: "C", 1319 È»: "C", 1320 ê¾: "C", 1321 "â¹": "D", 1322 D: "D", 1323 á¸: "D", 1324 Ä: "D", 1325 á¸: "D", 1326 á¸: "D", 1327 á¸: "D", 1328 á¸: "D", 1329 Ä: "D", 1330 Æ: "D", 1331 Æ: "D", 1332 Æ: "D", 1333 ê¹: "D", 1334 DZ: "DZ", 1335 Ç: "DZ", 1336 Dz: "Dz", 1337 Ç : "Dz", 1338 "âº": "E", 1339 ï¼¥: "E", 1340 Ã: "E", 1341 Ã: "E", 1342 Ã: "E", 1343 á»: "E", 1344 Ế: "E", 1345 á»: "E", 1346 á»: "E", 1347 Ẽ: "E", 1348 Ä: "E", 1349 á¸: "E", 1350 á¸: "E", 1351 Ä: "E", 1352 Ä: "E", 1353 Ã: "E", 1354 Ẻ: "E", 1355 Ä: "E", 1356 È: "E", 1357 È: "E", 1358 Ẹ: "E", 1359 á»: "E", 1360 Ȩ: "E", 1361 á¸: "E", 1362 Ä: "E", 1363 á¸: "E", 1364 á¸: "E", 1365 Æ: "E", 1366 Æ: "E", 1367 "â»": "F", 1368 F: "F", 1369 á¸: "F", 1370 Æ: "F", 1371 ê»: "F", 1372 "â¼": "G", 1373 ï¼§: "G", 1374 Ç´: "G", 1375 Ä: "G", 1376 Ḡ: "G", 1377 Ä: "G", 1378 Ä : "G", 1379 Ǧ: "G", 1380 Ä¢: "G", 1381 Ǥ: "G", 1382 Æ: "G", 1383 ê : "G", 1384 ê½: "G", 1385 ê¾: "G", 1386 "â½": "H", 1387 H: "H", 1388 Ĥ: "H", 1389 Ḣ: "H", 1390 Ḧ: "H", 1391 È: "H", 1392 Ḥ: "H", 1393 Ḩ: "H", 1394 Ḫ: "H", 1395 Ħ: "H", 1396 â±§: "H", 1397 â±µ: "H", 1398 ê: "H", 1399 "â¾": "I", 1400 I: "I", 1401 Ã: "I", 1402 Ã: "I", 1403 Ã: "I", 1404 Ĩ: "I", 1405 Ī: "I", 1406 Ĭ: "I", 1407 İ: "I", 1408 Ã: "I", 1409 Ḯ: "I", 1410 á»: "I", 1411 Ç: "I", 1412 È: "I", 1413 È: "I", 1414 á»: "I", 1415 Ä®: "I", 1416 Ḭ: "I", 1417 Æ: "I", 1418 "â¿": "J", 1419 J: "J", 1420 Ä´: "J", 1421 É: "J", 1422 "â": "K", 1423 K: "K", 1424 Ḱ: "K", 1425 Ǩ: "K",
1426 Ḳ: "K", 1427 Ķ: "K", 1428 Ḵ: "K", 1429 Æ: "K", 1430 Ⱪ: "K", 1431 ê: "K", 1432 ê: "K", 1433 ê: "K", 1434 ê¢: "K", 1435 "â": "L", 1436 L: "L", 1437 Ä¿: "L", 1438 Ĺ: "L", 1439 Ľ: "L", 1440 Ḷ: "L", 1441 Ḹ: "L", 1442 Ä»: "L", 1443 Ḽ: "L", 1444 Ḻ: "L", 1445 Å: "L", 1446 Ƚ: "L", 1447 â±¢: "L", 1448 â± : "L", 1449 ê: "L", 1450 ê: "L", 1451 ê: "L", 1452 Ç: "LJ", 1453 Ç: "Lj", 1454 "â": "M", 1455 ï¼: "M", 1456 Ḿ: "M", 1457 á¹: "M", 1458 á¹: "M", 1459 â±®: "M", 1460 Æ: "M", 1461 "â": "N", 1462 ï¼®: "N", 1463 Ǹ: "N", 1464 Å: "N", 1465 Ã: "N", 1466 á¹: "N", 1467 Å: "N", 1468 á¹: "N", 1469 Å : "N", 1470 á¹: "N", 1471 á¹: "N", 1472 È : "N", 1473 Æ: "N", 1474 ê: "N", 1475 ê¤: "N", 1476 Ç: "NJ", 1477 Ç: "Nj", 1478 "â": "O", 1479 O: "O", 1480 Ã: "O", 1481 Ã: "O", 1482 Ã: "O", 1483 á»: "O", 1484 á»: "O", 1485 á»: "O", 1486 á»: "O", 1487 Ã: "O", 1488 á¹: "O", 1489 Ȭ: "O", 1490 á¹: "O", 1491 Å: "O", 1492 á¹: "O", 1493 á¹: "O", 1494 Å: "O", 1495 È®: "O", 1496 Ȱ: "O", 1497 Ã: "O", 1498 Ȫ: "O", 1499 á»: "O", 1500 Å: "O", 1501 Ç: "O", 1502 È: "O", 1503 È: "O", 1504 Æ : "O", 1505 á»: "O", 1506 á»: "O", 1507 á» : "O", 1508 á»: "O", 1509 Ợ: "O", 1510 á»: "O", 1511 á»: "O", 1512 Ǫ: "O", 1513 Ǭ: "O", 1514 Ã: "O", 1515 Ǿ: "O", 1516 Æ: "O", 1517 Æ: "O", 1518 ê: "O", 1519 ê: "O", 1520 Æ¢: "OI", 1521 ê: "OO", 1522 È¢: "OU", 1523 "â ": "P", 1524 ï¼°: "P", 1525 á¹: "P", 1526 á¹: "P", 1527 Ƥ: "P", 1528 â±£: "P", 1529 ê: "P", 1530 ê: "P", 1531 ê: "P", 1532 "â": "Q", 1533 ï¼±: "Q", 1534 ê: "Q", 1535 ê: "Q", 1536 É: "Q", 1537 "â": "R", 1538 ï¼²: "R", 1539 Å: "R", 1540 á¹: "R", 1541 Å: "R", 1542 È: "R", 1543 È: "R", 1544 á¹: "R", 1545 á¹: "R", 1546 Å: "R", 1547 á¹: "R", 1548 É: "R", 1549 Ɽ: "R", 1550 ê: "R", 1551 ê¦: "R", 1552 ê: "R", 1553 "â": "S", 1554 ï¼³: "S", 1555 áº: "S", 1556 Å: "S", 1557 Ṥ: "S", 1558 Å: "S", 1559 á¹ : "S", 1560 Å : "S", 1561 Ṧ: "S", 1562 á¹¢: "S", 1563 Ṩ: "S", 1564 È: "S", 1565 Å: "S", 1566 â±¾: "S", 1567 ê¨: "S", 1568 ê: "S", 1569 "â": "T", 1570 ï¼´: "T", 1571 Ṫ: "T", 1572 Ť: "T", 1573 Ṭ: "T", 1574 È: "T", 1575 Å¢: "T", 1576 á¹°: "T", 1577 á¹®: "T", 1578 Ŧ: "T", 1579 Ƭ: "T", 1580 Æ®: "T", 1581 Ⱦ: "T", 1582 ê: "T", 1583 ê¨: "TZ", 1584 "â": "U", 1585 ï¼µ: "U", 1586 Ã: "U", 1587 Ã: "U", 1588 Ã: "U", 1589 Ũ: "U", 1590 Ṹ: "U", 1591 Ū: "U", 1592 Ṻ: "U", 1593 Ŭ: "U", 1594 Ã: "U", 1595 Ç: "U", 1596 Ç: "U", 1597 Ç: "U", 1598 Ç: "U", 1599 Ủ: "U", 1600 Å®: "U", 1601 Ű: "U", 1602 Ç: "U", 1603 È: "U", 1604 È: "U", 1605 Ư: "U", 1606 Ừ: "U", 1607 Ứ: "U", 1608 á»®: "U", 1609 Ử: "U", 1610 á»°: "U", 1611 Ụ: "U", 1612 á¹²: "U", 1613 Ų: "U", 1614 á¹¶: "U", 1615 á¹´: "U", 1616 É: "U", 1617 "â": "V", 1618 ï¼¶: "V", 1619 á¹¼: "V", 1620 á¹¾: "V", 1621 Ʋ: "V", 1622 ê: "V", 1623 É : "V", 1624 ê : "VY", 1625 "â": "W", 1626 ï¼·: "W", 1627 áº: "W", 1628 áº: "W", 1629 Å´: "W", 1630 áº: "W", 1631 áº: "W", 1632 áº: "W", 1633 â±²: "W", 1634 "â": "X", 1635 X: "X", 1636 áº: "X", 1637 áº: "X", 1638 "â": "Y", 1639 ï¼¹: "Y", 1640 Ỳ: "Y", 1641 Ã: "Y", 1642 Ŷ: "Y", 1643 Ỹ: "Y", 1644 Ȳ: "Y", 1645 áº: "Y", 1646 Ÿ: "Y", 1647 á»¶: "Y", 1648 á»´: "Y", 1649 Ƴ: "Y", 1650 É: "Y", 1651 Ỿ: "Y", 1652 "â": "Z", 1653 Z: "Z", 1654 Ź: "Z", 1655 áº: "Z", 1656 Å»: "Z", 1657 Ž: "Z", 1658 áº: "Z", 1659 áº: "Z", 1660 Ƶ: "Z", 1661 Ȥ: "Z", 1662 Ɀ: "Z", 1663 Ⱬ: "Z", 1664 ê¢: "Z", 1665 "â": "a", 1666 ï½: "a", 1667 áº: "a", 1668 à : "a", 1669 á: "a", 1670 â: "a", 1671 ầ: "a", 1672 ấ: "a", 1673 ẫ: "a", 1674 ẩ: "a", 1675 ã: "a", 1676 Ä: "a", 1677 Ä: "a", 1678 ằ: "a", 1679 ắ: "a", 1680 ẵ: "a", 1681 ẳ: "a", 1682 ȧ: "a", 1683 Ç¡: "a", 1684 ä: "a", 1685 Ç: "a", 1686 ả: "a", 1687 Ã¥: "a", 1688 Ç»: "a", 1689 Ç: "a", 1690 È: "a", 1691 È: "a", 1692 ạ: "a", 1693 áº: "a", 1694 ặ: "a", 1695 á¸: "a", 1696 Ä : "a", 1697 â±¥: "a", 1698 É: "a", 1699 ê³: "aa", 1700 æ: "ae", 1701 ǽ: "ae", 1702 Ç£: "ae", 1703 êµ: "ao", 1704 ê·: "au", 1705 ê¹: "av", 1706 ê»: "av", 1707 ê½: "ay", 1708 "â": "b", 1709 ï½: "b", 1710 á¸: "b", 1711 Ḡ: "b", 1712 á¸: "b", 1713 Æ: "b", 1714 Æ: "b", 1715 É: "b", 1716 "â": "c", 1717 ï½: "c", 1718 Ä: "c", 1719 Ä: "c", 1720 Ä: "c", 1721 Ä: "c", 1722 ç: "c", 1723 á¸: "c", 1724 Æ: "c", 1725 ȼ: "c", 1726 ê¿: "c", 1727 â: "c", 1728 "â": "d", 1729 ï½: "d", 1730 á¸: "d", 1731 Ä: "d", 1732 á¸: "d", 1733 á¸: "d", 1734 á¸: "d", 1735 á¸: "d", 1736 Ä: "d", 1737 Æ: "d", 1738 É: "d", 1739 É: "d", 1740 êº: "d", 1741 dz: "dz", 1742 Ç: "dz", 1743 "â": "e", 1744 ï½ : "e", 1745 è: "e", 1746 é: "e", 1747 ê: "e", 1748 á»: "e", 1749 ế: "e", 1750 á» : "e", 1751 á»: "e", 1752 ẽ: "e", 1753 Ä: "e", 1754 á¸: "e", 1755 á¸: "e", 1756 Ä: "e", 1757 Ä: "e", 1758 ë: "e", 1759 ẻ: "e", 1760 Ä: "e", 1761 È : "e", 1762 È: "e", 1763 ẹ: "e", 1764 á»: "e", 1765 È©: "e", 1766 á¸: "e", 1767 Ä: "e", 1768 á¸: "e", 1769 á¸: "e", 1770 É: "e", 1771 É: "e", 1772 Ç: "e", 1773 "â": "f", 1774 ï½: "f", 1775 á¸: "f", 1776 Æ: "f", 1777 ê¼: "f", 1778 "â": "g", 1779 ï½: "g", 1780 ǵ: "g", 1781 Ä: "g", 1782 ḡ: "g", 1783 Ä: "g", 1784 Ä¡: "g", 1785 ǧ: "g", 1786 Ä£: "g", 1787 Ç¥: "g", 1788 É : "g", 1789 ê¡: "g", 1790 áµ¹: "g", 1791 ê¿: "g", 1792 "â": "h", 1793 ï½: "h", 1794 Ä¥: "h", 1795 ḣ: "h", 1796 ḧ: "h", 1797 È: "h", 1798 ḥ: "h", 1799 ḩ: "h", 1800 ḫ: "h", 1801 áº: "h", 1802 ħ: "h", 1803 ⱨ: "h", 1804 â±¶: "h", 1805 É¥: "h", 1806 Æ: "hv", 1807 "â": "i", 1808 ï½: "i", 1809 ì: "i", 1810 Ã: "i", 1811 î: "i", 1812 Ä©: "i", 1813 Ä«: "i", 1814 Ä: "i", 1815 ï: "i", 1816 ḯ: "i", 1817 á»: "i", 1818 Ç: "i", 1819 È: "i", 1820 È: "i", 1821 á»: "i", 1822 į: "i", 1823 á¸: "i", 1824 ɨ: "i", 1825 ı: "i", 1826 "â": "j", 1827 ï½: "j", 1828 ĵ: "j", 1829 ǰ: "j", 1830 É: "j", 1831 "â": "k", 1832 ï½: "k", 1833 ḱ: "k", 1834 Ç©: "k", 1835 ḳ: "k", 1836 Ä·: "k", 1837 ḵ: "k", 1838 Æ: "k", 1839 ⱪ: "k", 1840 ê: "k", 1841 ê: "k", 1842 ê : "k", 1843 ê£: "k", 1844 "â": "l", 1845 ï½: "l", 1846 Å: "l", 1847 ĺ: "l", 1848 ľ: "l", 1849 ḷ: "l", 1850 ḹ: "l", 1851 ļ: "l", 1852 ḽ: "l", 1853 ḻ: "l", 1854 Å¿: "l", 1855 Å: "l", 1856 Æ: "l", 1857 É«: "l", 1858 ⱡ: "l", 1859 ê: "l", 1860 ê: "l", 1861 ê: "l", 1862 Ç: "lj", 1863 "â": "m", 1864 ï½: "m", 1865 ḿ: "m", 1866 á¹: "m", 1867 á¹: "m", 1868 ɱ: "m", 1869 ɯ: "m", 1870 "â": "n", 1871 ï½: "n", 1872 ǹ: "n", 1873 Å: "n", 1874 ñ: "n", 1875 á¹ : "n", 1876 Å: "n", 1877 á¹: "n", 1878 Å: "n", 1879 á¹: "n", 1880 á¹: "n",
1881 Æ: "n", 1882 ɲ: "n", 1883 Å: "n", 1884 ê: "n", 1885 ê¥: "n", 1886 Ç: "nj", 1887 "â": "o", 1888 ï½: "o", 1889 ò: "o", 1890 ó: "o", 1891 ô: "o", 1892 á»: "o", 1893 á»: "o", 1894 á»: "o", 1895 á»: "o", 1896 õ: "o", 1897 á¹: "o", 1898 È: "o", 1899 á¹: "o", 1900 Å: "o", 1901 á¹: "o", 1902 á¹: "o", 1903 Å: "o", 1904 ȯ: "o", 1905 ȱ: "o", 1906 ö: "o", 1907 È«: "o", 1908 á»: "o", 1909 Å: "o", 1910 Ç: "o", 1911 È: "o", 1912 È: "o", 1913 Æ¡: "o", 1914 á»: "o", 1915 á»: "o", 1916 ỡ: "o", 1917 á»: "o", 1918 ợ: "o", 1919 á»: "o", 1920 á»: "o", 1921 Ç«: "o", 1922 Ç: "o", 1923 ø: "o", 1924 Ç¿: "o", 1925 É: "o", 1926 ê: "o", 1927 ê: "o", 1928 ɵ: "o", 1929 Æ£: "oi", 1930 È£: "ou", 1931 ê: "oo", 1932 "â": "p", 1933 ï½: "p", 1934 á¹: "p", 1935 á¹: "p", 1936 Æ¥: "p", 1937 áµ½: "p", 1938 ê: "p", 1939 ê: "p", 1940 ê: "p", 1941 "â ": "q", 1942 ï½: "q", 1943 É: "q", 1944 ê: "q", 1945 ê: "q", 1946 "â¡": "r", 1947 ï½: "r", 1948 Å: "r", 1949 á¹: "r", 1950 Å: "r", 1951 È: "r", 1952 È: "r", 1953 á¹: "r", 1954 á¹: "r", 1955 Å: "r", 1956 á¹: "r", 1957 É: "r", 1958 ɽ: "r", 1959 ê: "r", 1960 ê§: "r", 1961 ê: "r", 1962 "â¢": "s", 1963 ï½: "s", 1964 Ã: "s", 1965 Å: "s", 1966 á¹¥: "s", 1967 Å: "s", 1968 ṡ: "s", 1969 Å¡: "s", 1970 á¹§: "s", 1971 á¹£: "s", 1972 ṩ: "s", 1973 È: "s", 1974 Å: "s", 1975 È¿: "s", 1976 ê©: "s", 1977 ê : "s", 1978 áº: "s", 1979 "â£": "t", 1980 ï½: "t", 1981 ṫ: "t", 1982 áº: "t", 1983 Å¥: "t", 1984 á¹: "t", 1985 È: "t", 1986 Å£: "t", 1987 á¹±: "t", 1988 ṯ: "t", 1989 ŧ: "t", 1990 Æ: "t", 1991 Ê: "t", 1992 ⱦ: "t", 1993 ê: "t", 1994 ê©: "tz", 1995 "â¤": "u", 1996 ï½: "u", 1997 ù: "u", 1998 ú: "u", 1999 û: "u", 2000 Å©: "u", 2001 á¹¹: "u", 2002 Å«: "u", 2003 á¹»: "u", 2004 Å: "u", 2005 ü: "u", 2006 Ç: "u", 2007 Ç: "u", 2008 Ç: "u", 2009 Ç: "u", 2010 á»§: "u", 2011 ů: "u", 2012 ű: "u", 2013 Ç: "u", 2014 È: "u", 2015 È: "u", 2016 ư: "u", 2017 ừ: "u", 2018 ứ: "u", 2019 ữ: "u", 2020 á»: "u", 2021 á»±: "u", 2022 ụ: "u", 2023 á¹³: "u", 2024 ų: "u", 2025 á¹·: "u", 2026 á¹µ: "u", 2027 Ê: "u", 2028 "â¥": "v", 2029 ï½: "v", 2030 á¹½: "v", 2031 ṿ: "v", 2032 Ê: "v", 2033 ê: "v", 2034 Ê: "v", 2035 ê¡: "vy", 2036 "â¦": "w", 2037 ï½: "w", 2038 áº: "w", 2039 áº: "w", 2040 ŵ: "w", 2041 áº: "w", 2042 Ạ: "w", 2043 áº: "w",
2044 áº: "w", 2045 â±³: "w", 2046 "â§": "x", 2047 ï½: "x", 2048 áº: "x", 2049 áº: "x", 2050 "â¨": "y", 2051 ï½: "y", 2052 ỳ: "y", 2053 ý: "y", 2054 Å·: "y", 2055 ỹ: "y", 2056 ȳ: "y", 2057 áº: "y", 2058 ÿ: "y", 2059 á»·: "y", 2060 áº: "y", 2061 ỵ: "y", 2062 Æ´: "y", 2063 É: "y", 2064 ỿ: "y", 2065 "â©": "z", 2066 ï½: "z", 2067 ź: "z", 2068 áº: "z", 2069 ż: "z", 2070 ž: "z", 2071 áº: "z", 2072 áº: "z", 2073 ƶ: "z", 2074 È¥: "z", 2075 É: "z", 2076 ⱬ: "z", 2077 ê£: "z", 2078 Î: "Î", 2079 Î: "Î", 2080 Î: "Î", 2081 Î: "Î", 2082 Ϊ: "Î", 2083 Î: "Î", 2084 Î: "Î¥", 2085 Ϋ: "Î¥", 2086 Î: "Ω", 2087 ά: "α", 2088 Î: "ε", 2089 ή: "η", 2090 ί: "ι", 2091 Ï: "ι", 2092 Î: "ι", 2093 Ï: "ο", 2094 Ï: "Ï ", 2095 Ï: "Ï ", 2096 ΰ: "Ï ", 2097 Ï: "Ï", 2098 Ï: "Ï", 2099 }; 2100 return a; 2101 }), 2102 b.define("select2/data/base", ["../utils"], function (a) { 2103 function b(a, c) { 2104 b.__super__.constructor.call(this); 2105 } 2106 return ( 2107 a.Extend(b, a.Observable), 2108 (b.prototype.current = function (a) { 2109 throw new Error( 2110 "The `current` method must be defined in child classes." 2111 ); 2112 }), 2113 (b.prototype.query = function (a, b) { 2114 throw new Error("The `query` method must be defined in child classes."); 2115 }), 2116 (b.prototype.bind = function (a, b) {}), 2117 (b.prototype.destroy = function () {}), 2118 (b.prototype.generateResultId = function (b, c) { 2119 var d = b.id + "-result-"; 2120 return ( 2121 (d += a.generateChars(4)), 2122 (d += 2123 null != c.id ? "-" + c.id.toString() : "-" + a.generateChars(4)) 2124 ); 2125 }), 2126 b 2127 ); 2128 }), 2129 b.define( 2130 "select2/data/select", 2131 ["./base", "../utils", "jquery"], 2132 function (a, b, c) { 2133 function d(a, b) { 2134 (this.$element = a), 2135 (this.options = b), 2136 d.__super__.constructor.call(this); 2137 } 2138 return ( 2139 b.Extend(d, a), 2140 (d.prototype.current = function (a) { 2141 var b = [], 2142 d = this; 2143 this.$element.find(":selected").each(function () { 2144 var a = c(this), 2145 e = d.item(a); 2146 b.push(e); 2147 }), 2148 a(b); 2149 }), 2150 (d.prototype.select = function (a) { 2151 var b = this; 2152 if (((a.selected = !0), c(a.element).is("option"))) 2153 return ( 2154 (a.element.selected = !0), 2155 void this.$element.trigger("change") 2156 ); 2157 if (this.$element.prop("multiple")) 2158 this.current(function (d) { 2159 var e = []; 2160 (a = [a]), a.push.apply(a, d); 2161 for (var f = 0; f < a.length; f++) { 2162 var g = a[f].id; 2163 -1 === c.inArray(g, e) && e.push(g); 2164 } 2165 b.$element.val(e), b.$element.trigger("change"); 2166 }); 2167 else { 2168 var d = a.id; 2169 this.$element.val(d), this.$element.trigger("change"); 2170 } 2171 }), 2172 (d.prototype.unselect = function (a) { 2173 var b = this; 2174 if (this.$element.prop("multiple")) 2175 return ( 2176 (a.selected = !1), 2177 c(a.element).is("option") 2178 ? ((a.element.selected = !1), 2179 void this.$element.trigger("change")) 2180 : void this.current(function (d) { 2181 for (var e = [], f = 0; f < d.length; f++) { 2182 var g = d[f].id; 2183 g !== a.id && 2184 -1 === c.inArray(g, e) && 2185 e.push(g); 2186 } 2187 b.$element.val(e), b.$element.trigger("change"); 2188 }) 2189 ); 2190 }), 2191 (d.prototype.bind = function (a, b) { 2192 var c = this; 2193 (this.container = a), 2194 a.on("select", function (a) { 2195 c.select(a.data); 2196 }), 2197 a.on("unselect", function (a) { 2198 c.unselect(a.data); 2199 }); 2200 }), 2201 (d.prototype.destroy = function () { 2202 this.$element.find("*").each(function () { 2203 c.removeData(this, "data"); 2204 }); 2205 }), 2206 (d.prototype.query = function (a, b) { 2207 var d = [], 2208 e = this, 2209 f = this.$element.children(); 2210 f.each(function () { 2211 var b = c(this); 2212 if (b.is("option") || b.is("optgroup")) { 2213 var f = e.item(b), 2214 g = e.matches(a, f); 2215 null !== g && d.push(g); 2216 } 2217 }), 2218 b({ results: d }); 2219 }), 2220 (d.prototype.addOptions = function (a) { 2221 b.appendMany(this.$element, a); 2222 }), 2223 (d.prototype.option = function (a) { 2224 var b; 2225 a.children 2226 ? ((b = document.createElement("optgroup")), (b.label = a.text)) 2227 : ((b = document.createElement("option")), 2228 void 0 !== b.textContent 2229 ? (b.textContent = a.text) 2230 : (b.innerText = a.text)), 2231 a.id && (b.value = a.id), 2232 a.disabled && (b.disabled = !0), 2233 a.selected && (b.selected = !0), 2234 a.title && (b.title = a.title); 2235 var d = c(b),
2236 e = this._normalizeItem(a); 2237 return (e.element = b), c.data(b, "data", e), d; 2238 }), 2239 (d.prototype.item = function (a) { 2240 var b = {}; 2241 if (((b = c.data(a[0], "data")), null != b)) return b; 2242 if (a.is("option")) 2243 b = { 2244 id: a.val(), 2245 text: a.text(), 2246 disabled: a.prop("disabled"), 2247 selected: a.prop("selected"), 2248 title: a.prop("title"), 2249 }; 2250 else if (a.is("optgroup")) { 2251 b = { 2252 text: a.prop("label"), 2253 children: [], 2254 title: a.prop("title"), 2255 }; 2256 for ( 2257 var d = a.children("option"), e = [], f = 0; 2258 f < d.length; 2259 f++ 2260 ) { 2261 var g = c(d[f]), 2262 h = this.item(g); 2263 e.push(h); 2264 } 2265 b.children = e; 2266 } 2267 return ( 2268 (b = this._normalizeItem(b)), 2269 (b.element = a[0]), 2270 c.data(a[0], "data", b), 2271 b 2272 ); 2273 }), 2274 (d.prototype._normalizeItem = function (a) { 2275 c.isPlainObject(a) || (a = { id: a, text: a }), 2276 (a = c.extend({}, { text: "" }, a)); 2277 var b = { selected: !1, disabled: !1 }; 2278 return ( 2279 null != a.id && (a.id = a.id.toString()), 2280 null != a.text && (a.text = a.text.toString()), 2281 null == a._resultId && 2282 a.id && 2283 null != this.container && 2284 (a._resultId = this.generateResultId(this.container, a)), 2285 c.extend({}, b, a) 2286 ); 2287 }), 2288 (d.prototype.matches = function (a, b) { 2289 var c = this.options.get("matcher"); 2290 return c(a, b); 2291 }), 2292 d 2293 ); 2294 } 2295 ), 2296 b.define( 2297 "select2/data/array", 2298 ["./select", "../utils", "jquery"], 2299 function (a, b, c) { 2300 function d(a, b) { 2301 var c = b.get("data") || []; 2302 d.__super__.constructor.call(this, a, b), 2303 this.addOptions(this.convertToOptions(c)); 2304 } 2305 return ( 2306 b.Extend(d, a), 2307 (d.prototype.select = function (a) { 2308 var b = this.$element.find("option").filter(function (b, c) { 2309 return c.value == a.id.toString(); 2310 }); 2311 0 === b.length && ((b = this.option(a)), this.addOptions(b)), 2312 d.__super__.select.call(this, a); 2313 }), 2314 (d.prototype.convertToOptions = function (a) { 2315 function d(a) { 2316 return function () { 2317 return c(this).val() == a.id; 2318 }; 2319 } 2320 for ( 2321 var e = this, 2322 f = this.$element.find("option"), 2323 g = f 2324 .map(function () { 2325 return e.item(c(this)).id; 2326 }) 2327 .get(), 2328 h = [], 2329 i = 0; 2330 i < a.length; 2331 i++ 2332 ) { 2333 var j = this._normalizeItem(
2333a[i]); 2334 if (c.inArray(j.id, g) >= 0) { 2335 var k = f.filter(d(j)), 2336 l = this.item(k), 2337 m = c.extend(!0, {}, j, l), 2338 n = this.option(m); 2339 k.replaceWith(n); 2340 } else { 2341 var o = this.option(j); 2342 if (j.children) { 2343 var p = this.convertToOptions(j.children); 2344 b.appendMany(o, p); 2345 } 2346 h.push(o); 2347 } 2348 } 2349 return h; 2350 }), 2351 d 2352 ); 2353 } 2354 ), 2355 b.define( 2356 "select2/data/ajax", 2357 ["./array", "../utils", "jquery"], 2358 function (a, b, c) { 2359 function d(a, b) { 2360 (this.ajaxOptions = this._applyDefaults(b.get("ajax"))), 2361 null != this.ajaxOptions.processResults && 2362 (this.processResults = this.ajaxOptions.processResults), 2363 d.__super__.constructor.call(this, a, b); 2364 } 2365 return ( 2366 b.Extend(d, a), 2367 (d.prototype._applyDefaults = function (a) { 2368 var b = { 2369 data: function (a) { 2370 return c.extend({}, a, { q: a.term }); 2371 }, 2372 transport: function (a, b, d) { 2373 var e = c.ajax(a); 2374 return e.then(b), e.fail(d), e; 2375 }, 2376 }; 2377 return c.extend({}, b, a, !0); 2378 }), 2379 (d.prototype.processResults = function (a) { 2380 return a; 2381 }), 2382 (d.prototype.query = function (a, b) { 2383 function d() { 2384 var d = f.transport( 2385 f, 2386 function (d) { 2387 var f = e.processResults(d, a); 2388 e.options.get("debug") && 2389 window.console && 2390 console.error && 2391 ((f && f.results && c.isArray(f.results)) || 2392 console.error( 2393 "Select2: The AJAX results did not return an array in the `results` key of the response." 2394 )), 2395 b(f); 2396 }, 2397 function () { 2398 (d.status && "0" === d.status) || 2399 e.trigger("results:message", { 2400 message: "errorLoading", 2401 }); 2402 } 2403 ); 2404 e._request = d; 2405 } 2406 var e = this; 2407 null != this._request && 2408 (c.isFunction(this._request.abort) && this._request.abort(), 2409 (this._request = null)); 2410 var f = c.extend({ type: "GET" }, this.ajaxOptions); 2411 "function" == typeof f.url && 2412 (f.url = f.url.call(this.$element, a)), 2413 "function" == typeof f.data && 2414 (f.data = f.data.call(this.$element, a)), 2415 this.ajaxOptions.delay && null != a.term 2416 ? (this._queryTimeout && 2417 window.clearTimeout(this._queryTimeout), 2418 (this._queryTimeout = window.setTimeout( 2419 d, 2420 this.ajaxOptions.delay 2421 ))) 2422 : d(); 2423 }), 2424 d 2425 ); 2426 } 2427 ), 2428 b.define("select2/data/tags", ["jquery"], function (a) { 2429 function b(b, c, d) { 2430 var e = d.get("tags"), 2431 f = d.get("createTag"); 2432 void 0 !== f && (this.createTag = f); 2433 var g = d.get("insertTag"); 2434 if ( 2435 (void 0 !== g && (this.insertTag = g), b.call(this, c, d), a.isArray(e)) 2436 ) 2437 for (var h = 0; h < e.length; h++) { 2438 var i = e[h], 2439 j = this._normalizeItem(i), 2440 k = this.option(j); 2441 this.$element.append(k); 2442 } 2443 } 2444 return ( 2445 (b.prototype.query = function (a, b, c) { 2446 function d(a, f) { 2447 for (var g = a.results, h = 0; h < g.length; h++) { 2448 var i = g[h], 2449 j = null != i.children && !d({ results: i.children }, !0), 2450 k = i.text === b.term; 2451 if (k || j) return f ? !1 : ((a.data = g), void c(a)); 2452 } 2453 if (f) return !0; 2454 var l = e.createTag(b); 2455 if (null != l) { 2456 var m = e.option(l); 2457 m.attr("data-select2-tag", !0), 2458 e.addOptions([m]), 2459 e.insertTag(g, l); 2460 } 2461 (a.results = g), c(a); 2462 } 2463 var e = this; 2464 return ( 2465 this._removeOldTags(), 2466 null == b.term || null != b.page 2467 ? void a.call(this, b, c) 2468 : void a.call(this, b, d) 2469 ); 2470 }), 2471 (b.prototype.createTag = function (b, c) { 2472 var d = a.trim(c.term); 2473 return "" === d ? null : { id: d, text: d }; 2474 }), 2475 (b.prototype.insertTag = function (a, b, c) { 2476 b.unshift(c); 2477 }), 2478 (b.prototype._removeOldTags = function (b) { 2479 var c = (this._lastTag, this.$element.find("option[data-select2-tag]")); 2480 c.each(function () { 2481 this.selected || a(this).remove(); 2482 }); 2483 }), 2484 b 2485 ); 2486 }), 2487 b.define("select2/data/tokenizer", ["jquery"], function (a) { 2488 function b(a, b, c) { 2489 var d = c.get("tokenizer"); 2490 void 0 !== d && (this.tokenizer = d), a.call(this, b, c); 2491 } 2492 return ( 2493 (b.prototype.bind = function (a, b, c) { 2494 a.call(this, b, c), 2495 (this.$search = 2496 b.dropdown.$search || 2497 b.selection.$search || 2498 c.find(".select2-search__field")); 2499 }), 2500 (b.prototype.query = function (b, c, d) { 2501 function e(b) { 2502 var c = g._normalizeItem(b), 2503 d = g.$element.find("option").filter(function () { 2504 return a(this).val() === c.id; 2505 }); 2506 if (!d.length) { 2507 var e = g.option(c); 2508 e.attr("data-select2-tag", !0), 2509 g._removeOldTags(), 2510 g.addOptions([e]); 2511 } 2512 f(c); 2513 } 2514 function f(a) { 2515 g.trigger("select", { data: a }); 2516 } 2517 var g = this; 2518 c.term = c.term || ""; 2519 var h = this.tokenizer(c, this.options, e); 2520 h.term !== c.term && 2521 (this.$search.length && 2522 (this.$search.val(h.term), this.$search.focus()), 2523 (c.term = h.term)), 2524 b.call(this, c, d); 2525 }), 2526 (b.prototype.tokenizer = function (b, c, d, e) { 2527 for ( 2528 var f = d.get("tokenSeparators") || [], 2529 g = c.term, 2530 h = 0, 2531 i = 2532 this.createTag || 2533 function (a) { 2534 return { id: a.term, text: a.term }; 2535 }; 2536 h < g.length; 2537 2538 ) { 2539 var j = g[h]; 2540 if (-1 !== a.inArray(j, f)) { 2541 var k = g.substr(0, h), 2542 l = a.extend({}, c, { term: k }), 2543 m = i(l); 2544 null != m ? (e(m), (g = g.substr(h + 1) || ""), (h = 0)) : h++; 2545 } else h++; 2546 } 2547 return { term: g }; 2548 }), 2549 b 2550 ); 2551 }), 2552 b.define("select2/data/minimumInputLength", [], function () { 2553 function a(a, b, c) { 2554 (this.minimumInputLength = c.get("minimumInputLength")), a.call(this, b, c); 2555 } 2556 return ( 2557 (a.prototype.query = function (a, b, c) { 2558 return ( 2559 (b.term = b.term || ""), 2560 b.term.length < this.minimumInputLength 2561 ? void this.trigger("results:message", { 2562 message: "inputTooShort", 2563 args: { 2564 minimum: this.minimumInputLength, 2565 input: b.term, 2566 params: b, 2567 }, 2568 }) 2569 : void a.call(this, b, c) 2570 ); 2571 }), 2572 a 2573 ); 2574 }), 2575 b.define("select2/data/maximumInputLength", [], function () { 2576 function a(a, b, c) { 2577 (this.maximumInputLength = c.get("maximumInputLength")), a.call(this, b, c); 2578 } 2579 return ( 2580 (a.prototype.query = function (a, b, c) { 2581 return ( 2582 (b.term = b.term || ""), 2583 this.maximumInputLength > 0 && 2584 b.term.length > this.maximumInputLength 2585 ? void this.trigger("results:message", { 2586 message: "inputTooLong", 2587 args: { 2588 maximum: this.maximumInputLength, 2589 input: b.term, 2590 params: b, 2591 }, 2592 }) 2593 : void a.call(this, b, c) 2594 ); 2595 }), 2596 a 2597 ); 2598 }), 2599 b.define("select2/data/maximumSelectionLength", [], function () { 2600 function a(a, b, c) { 2601 (this.maximumSelectionLength = c.get("maximumSelectionLength")), 2602 a.call(this, b, c); 2603 } 2604 return ( 2605 (a.prototype.query = function (a, b, c) { 2606 var d = this; 2607 this.current(function (e) { 2608 var f = null != e ? e.length : 0; 2609 return d.maximumSelectionLength > 0 && f >= d.maximumSelectionLength 2610 ? void d.trigger("results:message", { 2611 message: "maximumSelected", 2612 args: { maximum: d.maximumSelectionLength }, 2613 }) 2614 : void a.call(d, b, c); 2615 }); 2616 }), 2617 a 2618 ); 2619 }), 2620 b.define("select2/dropdown", ["jquery", "./utils"], function (a, b) { 2621 function c(a, b) { 2622 (this.$element = a), (this.options = b), c.__super__.constructor.call(this); 2623 } 2624 return ( 2625 b.Extend(c, b.Observable), 2626 (c.prototype.render = function () { 2627 var b = a( 2628 '<span class="select2-dropdown"><span class="select2-results"></span></span>' 2629 ); 2630 return b.attr("dir", this.options.get("dir")), (this.$dropdown = b), b; 2631 }), 2632 (c.prototype.bind = function () {}), 2633 (c.prototype.position = function (a, b) {}), 2634 (c.prototype.destroy = function () { 2635 this.$dropdown.remove(); 2636 }), 2637 c 2638 ); 2639 }), 2640 b.define("select2/dropdown/search", ["jquery", "../utils"], function (a, b) { 2641 function c() {} 2642 return ( 2643
2643 (c.prototype.render = function (b) { 2644 var c = b.call(this), 2645 d = a( 2646 '<span class="select2-search select2-search--dropdown"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" role="textbox" /></span>' 2647 ); 2648 return ( 2649 (this.$searchContainer = d), 2650 (this.$search = d.find("input")), 2651 c.prepend(d), 2652 c 2653 ); 2654 }), 2655 (c.prototype.bind = function (b, c, d) { 2656 var e = this; 2657 b.call(this, c, d), 2658 this.$search.on("keydown", function (a) { 2659 e.trigger("keypress", a), 2660 (e._keyUpPrevented = a.isDefaultPrevented()); 2661 }), 2662 this.$search.on("input", function (b) { 2663 a(this).off("keyup"); 2664 }), 2665 this.$search.on("keyup input", function (a) { 2666 e.handleSearch(a); 2667 }), 2668 c.on("open", function () { 2669 e.$search.attr("tabindex", 0), 2670 e.$search.focus(), 2671 window.setTimeout(function () { 2672 e.$search.focus(); 2673 }, 0); 2674 }), 2675 c.on("close", function () { 2676 e.$search.attr("tabindex", -1), e.$search.val(""); 2677 }), 2678 c.on("focus", function () { 2679 c.isOpen() && e.$search.focus(); 2680 }), 2681 c.on("results:all", function (a) { 2682 if (null == a.query.term || "" === a.query.term) { 2683 var b = e.showSearch(a); 2684 b 2685 ? e.$searchContainer.removeClass("select2-search--hide") 2686 : e.$searchContainer.addClass("select2-search--hide"); 2687 } 2688 }); 2689 }), 2690 (c.prototype.handleSearch = function (a) { 2691 if (!this._keyUpPrevented) { 2692 var b = this.$search.val(); 2693 this.trigger("query", { term: b }); 2694 } 2695 this._keyUpPrevented = !1; 2696 }), 2697 (c.prototype.showSearch = function (a, b) { 2698 return !0; 2699 }), 2700 c 2701 ); 2702 }), 2703 b.define("select2/dropdown/hidePlaceholder", [], function () { 2704 function a(a, b, c, d) { 2705 (this.placeholder = this.normalizePlaceholder(c.get("placeholder"))), 2706 a.call(this, b, c, d); 2707 } 2708 return ( 2709 (a.prototype.append = function (a, b) { 2710 (b.results = this.removePlaceholder(b.results)), a.call(this, b); 2711 }), 2712 (a.prototype.normalizePlaceholder = function (a, b) { 2713 return "string" == typeof b && (b = { id: "", text: b }), b; 2714 }), 2715 (a.prototype.removePlaceholder = function (a, b) { 2716 for (var c = b.slice(0), d = b.length - 1; d >= 0; d--) { 2717 var e = b[d]; 2718 this.placeholder.id === e.id && c.splice(d, 1); 2719 } 2720 return c; 2721 }), 2722 a 2723 ); 2724 }), 2725 b.define("select2/dropdown/infiniteScroll", ["jquery"], function (a) { 2726 function b(a, b, c, d) { 2727 (this.lastParams = {}), 2728 a.call(this, b, c, d), 2729 (this.$loadingMore = this.createLoadingMore()), 2730 (this.loading = !1); 2731 } 2732 return ( 2733 (b.prototype.append = function (a, b) { 2734 this.$loadingMore.remove(), 2735 (this.loading = !1), 2736 a.call(this, b), 2737 this.showLoadingMore(b) && this.$results.append(this.$loadingMore); 2738 }), 2739 (b.prototype.bind = function (b, c, d) { 2740 var e = this; 2741 b.call(this, c, d), 2742 c.on("query", function (a) { 2743 (e.lastParams = a), (e.loading = !0); 2744 }), 2745 c.on("query:append", function (a) { 2746 (e.lastParams = a), (e.loading = !0); 2747 }), 2748 this.$results.on("scroll", function () { 2749 var b = a.contains(document.documentElement, e.$loadingMore[0]); 2750 if (!e.loading && b) { 2751 var c = 2752 e.$results.offset().top + 2753 e.$results.outerHeight(!1), 2754 d = 2755 e.$loadingMore.offset().top + 2756 e.$loadingMore.outerHeight(!1); 2757 c + 50 >= d && e.loadMore(); 2758 } 2759 }); 2760 }), 2761 (b.prototype.loadMore = function () { 2762 this.loading = !0; 2763 var b = a.extend({}, { page: 1 }, this.lastParams); 2764 b.page++, this.trigger("query:append", b); 2765 }), 2766 (b.prototype.showLoadingMore = function (a, b) { 2767 return b.pagination && b.pagination.more; 2768 }), 2769 (b.prototype.createLoadingMore = function () { 2770 var b = a( 2771 '<li class="select2-results__option select2-results__option--load-more"role="treeitem" aria-disabled="true"></li>' 2772 ), 2773 c = this.options.get("translations").get("loadingMore"); 2774 return b.html(c(this.lastParams)), b; 2775 }), 2776 b 2777 ); 2778 }), 2779 b.define("select2/dropdown/attachBody", ["jquery", "../utils"], function (a, b) { 2780 function c(b, c, d) { 2781 (this.$dropdownParent = d.get("dropdownParent") || a(document.body)), 2782 b.call(this, c, d); 2783 } 2784 return ( 2785 (c.prototype.bind = function (a, b, c) { 2786 var d = this, 2787 e = !1; 2788 a.call(this, b, c), 2789 b.on("open", function () { 2790 d._showDropdown(), 2791 d._attachPositioningHandler(b), 2792 e || 2793 ((e = !0), 2794 b.on("results:all", function () { 2795 d._positionDropdown(), d._resizeDropdown(); 2796 }), 2797 b.on("results:append", function () { 2798 d._positionDropdown(), d._resizeDropdown(); 2799 })); 2800 }), 2801 b.on("close", function () { 2802 d._hideDropdown(), d._detachPositioningHandler(b); 2803 }), 2804 this.$dropdownContainer.on("mousedown", function (a) { 2805 a.stopPropagation(); 2806 }); 2807 }), 2808 (c.prototype.destroy = function (a) { 2809 a.call(this), this.$dropdownContainer.remove(); 2810 }), 2811 (c.prototype.position = function (a, b, c) { 2812 b.attr("class", c.attr("class")), 2813 b.removeClass("select2"), 2814 b.addClass("select2-container--open"), 2815 b.css({ position: "absolute", top: -999999 }), 2816 (this.$container = c); 2817 }), 2818 (c.prototype.render = function (b) { 2819 var c = a("<span></span>"), 2820 d = b.call(this); 2821 return c.append(d), (this.$dropdownContainer = c), c; 2822 }), 2823 (c.prototype._hideDropdown = function (a) { 2824 this.$dropdownContainer.detach(); 2825 }), 2826 (c.prototype._attachPositioningHandler = function (c, d) { 2827 var e = this, 2828 f = "scroll.select2." + d.id, 2829 g = "resize.select2." + d.id, 2830 h = "orientationchange.select2." + d.id, 2831 i = this.$container.parents().filter(b.hasScroll); 2832 i.each(function () { 2833 a(this).data("select2-scroll-position", { 2834 x: a(this).scrollLeft(), 2835 y: a(this).scrollTop(), 2836 }); 2837 }), 2838 i.on(f, function (b) { 2839 var c = a(this).data("select2-scroll-position"); 2840 a(this).scrollTop(c.y); 2841 }), 2842 a(window).on(f + " " + g + " " + h, function (a) { 2843 e._positionDropdown(), e._resizeDropdown(); 2844 }); 2845 }), 2846 (c.prototype._detachPositioningHandler = function (c, d) { 2847 var e = "scroll.select2." + d.id, 2848 f = "resize.select2." + d.id, 2849 g = "orientationchange.select2." + d.id, 2850 h = this.$container.parents().filter(b.hasScroll); 2851 h.off(e), a(window).off(e + " " + f + " " + g); 2852 }), 2853 (c.prototype._positionDropdown = function () { 2854 var b = a(window), 2855 c = this.$dropdown.hasClass("select2-dropdown--above"), 2856 d = this.$dropdown.hasClass("select2-dropdown--below"), 2857 e = null, 2858 f = this.$container.offset(); 2859 f.bottom = f.top + this.$container.outerHeight(!1); 2860 var g = { height: this.$container.outerHeight(!1) }; 2861 (g.top = f.top), (g.bottom = f.top + g.height); 2862 var h = { height: this.$dropdown.outerHeight(!1) }, 2863 i = { top: b.scrollTop(), bottom: b.scrollTop() + b.he
2863ight() }, 2864 j = i.top < f.top - h.height, 2865 k = i.bottom > f.bottom + h.height, 2866 l = { left: f.left, top: g.bottom }, 2867 m = this.$dropdownParent; 2868 "static" === m.css("position") && (m = m.offsetParent()); 2869 var n = m.offset(); 2870 (l.top -= n.top), 2871 (l.left -= n.left), 2872 c || d || (e = "below"), 2873 k || !j || c ? !j && k && c && (e = "below") : (e = "above"), 2874 ("above" == e || (c && "below" !== e)) && 2875 (l.top = g.top - n.top - h.height), 2876 null != e && 2877 (this.$dropdown 2878 .removeClass( 2879 "select2-dropdown--below select2-dropdown--above" 2880 ) 2881 .addClass("select2-dropdown--" + e), 2882 this.$container 2883 .removeClass( 2884 "select2-container--below select2-container--above" 2885 ) 2886 .addClass("select2-container--" + e)), 2887 this.$dropdownContainer.css(l); 2888 }), 2889 (c.prototype._resizeDropdown = function () { 2890 var a = { width: this.$container.outerWidth(!1) + "px" }; 2891 this.options.get("dropdownAutoWidth") && 2892 ((a.minWidth = a.width), 2893 (a.position = "relative"), 2894 (a.width = "auto")), 2895 this.$dropdown.css(a); 2896 }), 2897 (c.prototype._showDropdown = function (a) { 2898 this.$dropdownContainer.appendTo(this.$dropdownParent), 2899 this._positionDropdown(), 2900 this._resizeDropdown(); 2901 }), 2902 c 2903 ); 2904 }), 2905 b.define("select2/dropdown/minimumResultsForSearch", [], function () { 2906 function a(b) { 2907 for (var c = 0, d = 0; d < b.length; d++) { 2908 var e = b[d]; 2909 e.children ? (c += a(e.children)) : c++; 2910 } 2911 return c; 2912 } 2913 function b(a, b, c, d) { 2914 (this.minimumResultsForSearch = c.get("minimumResultsForSearch")), 2915 this.minimumResultsForSearch < 0 && 2916 (this.minimumResultsForSearch = 1 / 0), 2917 a.call(this, b, c, d); 2918 } 2919 return ( 2920 (b.prototype.showSearch = function (b, c) { 2921 return a(c.data.results) < this.minimumResultsForSearch 2922 ? !1 2923 : b.call(this, c); 2924 }), 2925 b 2926 ); 2927 }), 2928 b.define("select2/dropdown/selectOnClose", [], function () { 2929 function a() {} 2930 return ( 2931 (a.prototype.bind = function (a, b, c) { 2932 var d = this; 2933 a.call(this, b, c), 2934 b.on("close", function (a) { 2935 d._handleSelectOnClose(a); 2936 }); 2937 }), 2938 (a.prototype._handleSelectOnClose = function (a, b) { 2939 if (b && null != b.originalSelect2Event) { 2940 var c = b.originalSelect2Event; 2941 if ("select" === c._type || "unselect" === c._type) return; 2942 } 2943 var d = this.getHighlightedResults(); 2944 if (!(d.length < 1)) { 2945 var e = d.data("data"); 2946 (null != e.element && e.element.selected) || 2947 (null == e.element && e.selected) || 2948 this.trigger("select", { data: e }); 2949 } 2950 }), 2951 a 2952 ); 2953 }), 2954 b.define("select2/dropdown/closeOnSelect", [], function () { 2955 function a() {} 2956 return ( 2957 (a.prototype.bind = function (a, b, c) { 2958 var d = this; 2959 a.call(this, b, c), 2960 b.on("select", function (a) { 2961 d._selectTriggered(a); 2962 }), 2963 b.on("unselect", function (a) { 2964 d._selectTriggered(a); 2965 }); 2966 }), 2967 (a.prototype._selectTriggered = function (a, b) { 2968 var c = b.originalEvent; 2969 (c && c.ctrlKey) || 2970 this.trigger("close", { 2971 originalEvent: c, 2972 originalSelect2Event: b, 2973 }); 2974 }), 2975 a 2976 ); 2977 }), 2978 b.define("select2/i18n/en", [], function () { 2979 return { 2980 errorLoading: function () { 2981 return "The results could not be loaded."; 2982 }, 2983 inputTooLong: function (a) { 2984 var b = a.input.length - a.maximum, 2985 c = "Please delete " + b + " character"; 2986 return 1 != b && (c += "s"), c; 2987 }, 2988 inputTooShort: function (a) { 2989 var b = a.minimum - a.input.length, 2990 c = "Please enter " + b + " or more characters"; 2991 return c; 2992 }, 2993 loadingMore: function () { 2994 return "Loading more resultsâ¦"; 2995 }, 2996 maximumSelected: function (a) { 2997 var b = "You can only select " + a.maximum + " item"; 2998 return 1 != a.maximum && (b += "s"), b; 2999 }, 3000 noResults: function () { 3001 return "No results found"; 3002 }, 3003 searching: function () { 3004 return "Searchingâ¦"; 3005 }, 3006 }; 3007 }), 3008 b.define( 3009 "select2/defaults", 3010 [ 3011 "jquery", 3012 "require", 3013 "./results", 3014 "./selection/single", 3015 "./selection/multiple", 3016 "./selection/placeholder", 3017 "./selection/allowClear", 3018 "./selection/search", 3019 "./selection/eventRelay", 3020 "./utils", 3021 "./translation", 3022 "./diacritics", 3023 "./data/select", 3024 "./data/array", 3025 "./data/ajax", 3026 "./data/tags", 3027 "./data/tokenizer", 3028 "./data/minimumInputLength", 3029 "./data/maximumInputLength", 3030 "./data/maximumSelectionLength", 3031 "./dropdown", 3032 "./dropdown/search", 3033 "./dropdown/hidePlaceholder", 3034 "./dropdown/infiniteScroll", 3035 "./dropdown/attachBody", 3036 "./dropdown/minimumResultsForSearch", 3037 "./dropdown/selectOnClose", 3038 "./dropdown/closeOnSelect", 3039 "./i18n/en", 3040 ], 3041 function ( 3042 a, 3043 b, 3044 c, 3045 d, 3046 e, 3047 f, 3048 g, 3049 h, 3050 i, 3051 j, 3052 k, 3053 l, 3054 m, 3055 n, 3056 o, 3057 p, 3058 q, 3059 r, 3060 s, 3061 t, 3062 u, 3063 v, 3064 w, 3065 x, 3066 y, 3067 z, 3068 A, 3069 B, 3070 C 3071 ) { 3072 function D() { 3073 this.reset(); 3074 } 3075 (D.prototype.apply = function (l) { 3076 if (((l = a.extend(!0, {}, this.defaults, l)), null == l.dataAdapter)) { 3077 if ( 3078 (null != l.ajax 3079 ? (l.dataAdapter = o) 3080 : null != l.data 3081 ? (l.dataAdapter = n) 3082 : (l.dataAdapter = m), 3083 l.minimumInputLength > 0 && 3084 (l.dataAdapter = j.Decorate(l.dataAdapter, r)), 3085 l.maximumInputLength > 0 && 3086 (l.dataAdapter = j.Decorate(l.dataAdapter, s)), 3087 l.maximumSelectionLength > 0 && 3088 (l.dataAdapter = j.Decorate(l.dataAdapter, t)), 3089 l.tags && (l.dataAdapter = j.Decorate(l.dataAdapter, p)), 3090 (null != l.tokenSeparators || null != l.tokenizer) && 3091 (l.dataAdapter = j.Decorate(l.dataAdapter, q)), 3092 null != l.query) 3093 ) { 3094 var C = b(l.amdBase + "compat/query"); 3095 l.dataAdapter = j.Decorate(l.dataAdapter, C
3095); 3096 } 3097 if (null != l.initSelection) { 3098 var D = b(l.amdBase + "compat/initSelection"); 3099 l.dataAdapter = j.Decorate(l.dataAdapter, D); 3100 } 3101 } 3102 if ( 3103 (null == l.resultsAdapter && 3104 ((l.resultsAdapter = c), 3105 null != l.ajax && 3106 (l.resultsAdapter = j.Decorate(l.resultsAdapter, x)), 3107 null != l.placeholder && 3108 (l.resultsAdapter = j.Decorate(l.resultsAdapter, w)), 3109 l.selectOnClose && 3110 (l.resultsAdapter = j.Decorate(l.resultsAdapter, A))), 3111 null == l.dropdownAdapter) 3112 ) { 3113 if (l.multiple) l.dropdownAdapter = u; 3114 else { 3115 var E = j.Decorate(u, v); 3116 l.dropdownAdapter = E; 3117 } 3118 if ( 3119 (0 !== l.minimumResultsForSearch && 3120 (l.dropdownAdapter = j.Decorate(l.dropdownAdapter, z)), 3121 l.closeOnSelect && 3122 (l.dropdownAdapter = j.Decorate(l.dropdownAdapter, B)), 3123 null != l.dropdownCssClass || 3124 null != l.dropdownCss || 3125 null != l.adaptDropdownCssClass) 3126 ) { 3127 var F = b(l.amdBase + "compat/dropdownCss"); 3128 l.dropdownAdapter = j.Decorate(l.dropdownAdapter, F); 3129 } 3130 l.dropdownAdapter = j.Decorate(l.dropdownAdapter, y); 3131 } 3132 if (null == l.selectionAdapter) { 3133 if ( 3134 (l.multiple 3135 ? (l.selectionAdapter = e) 3136 : (l.selectionAdapter = d), 3137 null != l.placeholder && 3138 (l.selectionAdapter = j.Decorate(l.selectionAdapter, f)), 3139 l.allowClear && 3140 (l.selectionAdapter = j.Decorate(l.selectionAdapter, g)), 3141 l.multiple && 3142 (l.selectionAdapter = j.Decorate(l.selectionAdapter, h)), 3143 null != l.containerCssClass || 3144 null != l.containerCss || 3145 null != l.adaptContainerCssClass) 3146 ) { 3147 var G = b(l.amdBase + "compat/containerCss"); 3148 l.selectionAdapter = j.Decorate(l.selectionAdapter, G); 3149 } 3150 l.selectionAdapter = j.Decorate(l.selectionAdapter, i); 3151 } 3152 if ("string" == typeof l.language) 3153 if (l.language.indexOf("-") > 0) { 3154 var H = l.language.split("-"), 3155 I = H[0]; 3156 l.language = [l.language, I]; 3157 } else l.language = [l.language]; 3158 if (a.isArray(l.language)) { 3159 var J = new k(); 3160 l.language.push("en"); 3161 for (var K = l.language, L = 0; L < K.length; L++) { 3162 var M = K[L], 3163 N = {}; 3164 try { 3165 N = k.loadPath(M); 3166 } catch (O) { 3167 try { 3168 (M = this.defaults.amdLanguageBase + M), 3169 (N = k.loadPath(M)
3169); 3170 } catch (P) { 3171 l.debug && 3172 window.console && 3173 console.warn && 3174 console.warn( 3175 'Select2: The language file for "' + 3176 M + 3177 '" could not be automatically loaded. A fallback will be used instead.' 3178 ); 3179 continue; 3180 } 3181 } 3182 J.extend(N); 3183 } 3184 l.translations = J; 3185 } else { 3186 var Q = k.loadPath(this.defaults.amdLanguageBase + "en"), 3187 R = new k(l.language); 3188 R.extend(Q), (l.translations = R); 3189 } 3190 return l; 3191 }), 3192 (D.prototype.reset = function () { 3193 function b(a) { 3194 function b(a) { 3195 return l[a] || a; 3196 }
3197 return a.replace(/[^\u0000-\u007E]/g, b); 3198 } 3199 function c(d, e) { 3200 if ("" === a.trim(d.term)) return e; 3201 if (e.children && e.children.length > 0) { 3202 for ( 3203 var f = a.extend(!0, {}, e), g = e.children.length - 1; 3204 g >= 0; 3205 g-- 3206 ) { 3207 var h = e.children[g], 3208 i = c(d, h); 3209 null == i && f.children.splice(g, 1); 3210 } 3211 return f.children.length > 0 ? f : c(d, f); 3212 } 3213 var j = b(e.text).toUpperCase(), 3214 k = b(d.term).toUpperCase(); 3215 return j.indexOf(k) > -1 ? e : null; 3216 } 3217 this.defaults = { 3218 amdBase: "./", 3219 amdLanguageBase: "./i18n/", 3220 closeOnSelect: !0, 3221 debug: !1, 3222 dropdownAutoWidth: !1, 3223 escapeMarkup: j.escapeMarkup, 3224 language: C, 3225 matcher: c, 3226 minimumInputLength: 0, 3227 maximumInputLength: 0, 3228 maximumSelectionLength: 0, 3229 minimumResultsForSearch: 0, 3230 selectOnClose: !1, 3231 sorter: function (a) { 3232 return a; 3233 }, 3234 templateResult: function (a) { 3235 return a.text; 3236 }, 3237 templateSelection: function (a) { 3238 return a.text; 3239 }, 3240 theme: "default", 3241 width: "resolve", 3242 }; 3243 }), 3244 (D.prototype.set = function (b, c) { 3245 var d = a.camelCase(b), 3246 e = {}; 3247 e[d] = c; 3248 var f = j._convertData(e); 3249 a.extend(this.defaults, f); 3250 }); 3251 var E = new D(); 3252 return E; 3253 } 3254 ), 3255 b.define( 3256 "select2/options", 3257 ["require", "jquery", "./defaults", "./utils"], 3258 function (a, b, c, d) { 3259 function e(b, e) { 3260 if ( 3261 ((this.options = b), 3262 null != e && this.fromElement(e), 3263 (this.options = c.apply(this.options)), 3264 e && e.is("input")) 3265 ) { 3266 var f = a(this.get("amdBase") + "compat/inputData"); 3267 this.options.dataAdapter = d.Decorate(this.options.dataAdapter, f); 3268 } 3269 } 3270 return ( 3271 (e.prototype.fromElement = function (a) { 3272 var c = ["select2"]; 3273 null == this.options.multiple && 3274 (this.options.multiple = a.prop("multiple")), 3275 null == this.options.disabled && 3276 (this.options.disabled = a.prop("disabled")), 3277 null == this.options.language && 3278 (a.prop("lang") 3279 ? (this.options.language = a.prop("lang").toLowerCase()) 3280 : a.closest("[lang]").prop("lang") && 3281 (this.options.language = a 3282 .closest("[lang]") 3283 .prop("lang"))), 3284 null == this.options.dir && 3285 (a.prop("dir") 3286 ? (this.options.dir = a.prop("dir")) 3287 : a.closest("[dir]").prop("dir") 3288 ? (this.options.dir = a.closest("[dir]").prop("dir")) 3289 : (this.options.dir = "ltr")), 3290 a.prop("disabled", this.options.disabled), 3291 a.prop("multiple", this.options.multiple), 3292 a.data("select2Tags") && 3293 (this.options.debug && 3294 window.console && 3295 console.warn && 3296 console.warn( 3297 'Select2: The `data-select2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.' 3298 ), 3299 a.data("data", a.data("select2Tags")), 3300 a.data("tags", !0)), 3301 a.data("ajaxUrl") && 3302 (this.options.debug && 3303 window.console && 3304 console.warn && 3305 console.warn( 3306 "Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of Select2." 3307 ), 3308 a.attr("ajax--url", a.data("ajaxUrl")), 3309 a.data("ajax--url", a.data("ajaxUrl"))); 3310 var e = {}; 3311 e = 3312 b.fn.jquery && "1." == b.fn.jquery.substr(0, 2) && a[0].dataset 3313 ? b.extend(!0, {}, a[0].dataset, a.data()) 3314 : a.data(); 3315 var f = b.extend(!0, {}, e); 3316 f = d._convertData(f); 3317 for (var g in f) 3318 b.inArray(g, c) > -1 || 3319 (b.isPlainObject(this.options[g]) 3320 ? b.extend(this.options[g], f[g]) 3321 : (this.options[g] = f[g])); 3322 return this; 3323 }), 3324 (e.prototype.get = function (a) { 3325 return this.options[a]; 3326 }), 3327 (e.prototype.set = function (a, b) { 3328 this.options[a] = b; 3329 }), 3330 e 3331 ); 3332 } 3333 ), 3334 b.define( 3335 "select2/core", 3336 ["jquery", "./options", "./utils", "./keys"], 3337 function (a, b, c, d) { 3338 var e = function (a, c) { 3339 null != a.data("select2") && a.data("select2").destroy(), 3340 (this.$element = a), 3341 (this.id = this._generateId(a)), 3342 (c = c || {}), 3343 (this.options = new b(c, a)), 3344 e.__super__.constructor.call(this); 3345 var d = a.attr("tabindex") || 0; 3346 a.data("old-tabindex", d), a.attr("tabindex", "-1"); 3347 var f = this.options.get("dataAdapter"); 3348 this.dataAdapter = new f(a, this.options); 3349 var g = this.render(); 3350 this._placeContainer(g); 3351 var h = this.options.get("selectionAdapter"); 3352 (this.selection = new h(a, this.options)), 3353 (this.$selection = this.selection.render()), 3354 this.selection.position(this.$selection, g); 3355 var i = this.options.get("dropdownAdapter"); 3356 (this.dropdown = new i(a, this.options)), 3357 (this.$dropdown = this.dropdown.render()), 3358 this.dropdown.position(this.$dropdown, g); 3359 var j = this.options.get("resultsAdapter"); 3360 (this.results = new j(a, this.options, this.dataAdapter)), 3361 (this.$results = this.results.render()), 3362 this.results.position(this.$results, this.$dropdown); 3363 var k = this; 3364 this._bindAdapters(), 3365 this._registerDomEvents(), 3366 this._registerDataEvents(), 3367 this._registerSelectionEvents(), 3368 this._registerDropdownEvents(), 3369 this._registerResultsEvents(), 3370 this._registerEvents(), 3371 this.dataAdapter.current(function (a) { 3372 k.trigger("selection:update", { data: a }); 3373 }), 3374 a.addClass("select2-hidden-accessible"), 3375 a.attr("aria-hidden", "true"), 3376 this._syncAttributes(), 3377 a.data("select2", this); 3378 }; 3379 return ( 3380 c.Extend(e, c.Observable), 3381 (e.prototype._generateId = function (a) { 3382 var b = ""; 3383 return ( 3384 (b = 3385 null != a.attr("id") 3386 ? a.attr("id") 3387 : null != a.attr("name") 3388 ? a.attr("name") + "-" + c.generateChars(2) 3389 : c.generateChars(4)), 3390 (b = b.replace(/(:|\.|\[|\]|,)/g, "")), 3391 (b = "select2-" + b) 3392 ); 3393 }), 3394 (e.prototype._placeContainer = function (a) { 3395 a.insertAfter(this.$element); 3396 var b = this._resolveWidth( 3397 this.$element, 3398 this.options.get("width") 3399 ); 3400 null != b && a.css("width", b); 3401 }), 3402 (e.prototype._resolveWidth = function (a, b) { 3403 var c = /^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i; 3404 if ("resolve" == b) { 3405 var d = this._resolveWidth(a, "style"); 3406 return null != d ? d : this._resolveWidth(a, "element"); 3407 } 3408 if ("element" == b) { 3409 var e = a.outerWidth(!1); 3410 return 0 >= e ? "auto" : e + "px"; 3411 } 3412 if ("style" == b) { 3413 var f = a.attr("style"); 3414 if ("string" != typeof f) return null; 3415 for (var g = f.split(";"), h = 0, i = g.length; i > h; h += 1) { 3416 var j = g[h].replace(/\s/g, ""), 3417 k = j.match(c); 3418 if (null !== k && k.length >= 1) return k[1]; 3419 } 3420 return null; 3421 } 3422 return b; 3423 }), 3424 (e.prototype._bindAdapters = function () { 3425 this.dataAdapter.bind(this, this.$container), 3426 this.selection.bind(this, this.$container), 3427 this.dropdown.bind(this, this.$container), 3428 this.results.bind(this, this.$container); 3429 }), 3430 (e.prototype._registerDomEvents = function () { 3431 var b = this; 3432 this.$element.on("change.select2", function () { 3433 b.dataAdapter.current(function (a) { 3434 b.trigger("selection:update", { data: a }); 3435 }); 3436 }), 3437 this.$element.on("focus.select2", function (a) { 3438 b.trigger("focus", a); 3439 }), 3440 (this._syncA = c.bind(this._syncAttributes, this)), 3441 (this._syncS = c.bind(this._syncSubtree, this)), 3442 this.$element[0].attachEvent && 3443 this.$element[0].attachEvent( 3444 "onpropertychange", 3445 this._syncA 3446 ); 3447 var d = 3448 window.MutationObserver || 3449 window.WebKitMutationObserver || 3450 window.MozMutationObserver; 3451 null != d 3452 ? ((this._observer = new d(function (c) { 3453 a.each(c, b._syncA), a.each(c, b._syncS); 3454 })), 3455 this._observer.observe(this.$element[0], { 3456 attributes: !0, 3457 childList: !0, 3458 subtree: !1, 3459 })) 3460 : this.$element[0].addEventListener && 3461 (this.$element[0].addEventListener( 3462 "DOMAttrModified", 3463 b._syncA, 3464 !1 3465 ), 3466 this.$element[0].addEventListener( 3467 "DOMNodeInserted", 3468
3468 b._syncS, 3469 !1 3470 ), 3471 this.$element[0].addEventListener( 3472 "DOMNodeRemoved", 3473 b._syncS, 3474 !1 3475 )); 3476 }), 3477 (e.prototype._registerDataEvents = function () { 3478 var a = this; 3479 this.dataAdapter.on("*", function (b, c) { 3480 a.trigger(b, c); 3481 }); 3482 }), 3483 (e.prototype._registerSelectionEvents = function () { 3484 var b = this, 3485 c = ["toggle", "focus"]; 3486 this.selection.on("toggle", function () { 3487 b.toggleDropdown(); 3488 }), 3489 this.selection.on("focus", function (a) { 3490 b.focus(a); 3491 }), 3492 this.selection.on("*", function (d, e) { 3493 -1 === a.inArray(d, c) && b.trigger(d, e); 3494 }); 3495 }), 3496 (e.prototype._registerDropdownEvents = function () { 3497 var a = this; 3498 this.dropdown.on("*", function (b, c) { 3499 a.trigger(b, c); 3500 }); 3501 }), 3502 (e.prototype._registerResultsEvents = function () { 3503 var a = this; 3504 this.results.on("*", function (b, c) { 3505 a.trigger(b, c); 3506 }); 3507 }), 3508 (e.prototype._registerEvents = function () { 3509 var a = this; 3510 this.on("open", function () { 3511 a.$container.addClass("select2-container--open"); 3512 }), 3513 this.on("close", function () { 3514 a.$container.removeClass("select2-container--open"); 3515 }), 3516 this.on("enable", function () { 3517 a.$container.removeClass("select2-container--disabled"); 3518 }), 3519 this.on("disable", function () { 3520 a.$container.addClass("select2-container--disabled"); 3521 }), 3522 this.on("blur", function () { 3523 a.$container.removeClass("select2-container--focus"); 3524 }), 3525 this.on("query", function (b) { 3526 a.isOpen() || a.trigger("open", {}), 3527 this.dataAdapter.query(b, function (c) { 3528 a.trigger("results:all", { data: c, query: b }); 3529 }); 3530 }), 3531 this.on("query:append", function (b) { 3532 this.dataAdapter.query(b, function (c) { 3533 a.trigger("results:append", { data: c, query: b }); 3534 }); 3535 }), 3536 this.on("keypress", function (b) { 3537 var c = b.which; 3538 if (c === d.ENTER && (b.ctrlKey || b.metaKey)) 3539 a.close() || MapSVG.formBuilder.save(); 3540 if (c === d.ESC && !a.isOpen()) 3541 a.close() || MapSVG.formBuilder.close(); 3542 3543 a.isOpen() 3544 ? c === d.ESC || c === d.TAB || (c === d.UP && b.altKey) 3545 ? (a.close(), b.preventDefault()) 3546 : c === d.ENTER && !b.ctrlKey && !b.metaKey 3547 ? (a.trigger("results:select", {}), 3548 b.preventDefault()) 3549 : c === d.SPACE && b.ctrlKey 3550 ? (a.trigger("results:toggle", {}), 3551 b.preventDefault()) 3552 : c === d.UP 3553 ? (a.trigger("results:previous", {}), 3554 b.preventDefault()) 3555 : c === d.DOWN && 3556 (a.trigger("results:next", {}), 3557 b.preventDefault())
3558 : (c === (d.ENTER && !b.ctrlKey && !b.metaKey) || 3559 c === d.SPACE || 3560 (c === d.DOWN && b.altKey)) && 3561 (a.open(), b.preventDefault()); 3562 }); 3563 }), 3564 (e.prototype._syncAttributes = function () { 3565 this.options.set("disabled", this.$element.prop("disabled")), 3566 this.options.get("disabled") 3567 ? (this.isOpen() && this.close(), 3568 this.trigger("disable", {})) 3569 : this.trigger("enable", {}); 3570 }), 3571 (e.prototype._syncSubtree = function (a, b) { 3572 var c = !1, 3573 d = this; 3574 if ( 3575 !a || 3576 !a.target || 3577 "OPTION" === a.target.nodeName || 3578 "OPTGROUP" === a.target.nodeName 3579 ) { 3580 if (b) 3581 if (b.addedNodes && b.addedNodes.length > 0) 3582 for (var e = 0; e < b.addedNodes.length; e++) { 3583 var f = b.addedNodes[e]; 3584 f.selected && (c = !0); 3585 } 3586 else 3587 b.removedNodes && b.removedNodes.length > 0 && (c = !0); 3588 else c = !0; 3589 c && 3590 this.dataAdapter.current(function (a) { 3591 d.trigger("selection:update", { data: a }); 3592 }); 3593 } 3594 }), 3595 (e.prototype.trigger = function (a, b) { 3596 var c = e.__super__.trigger, 3597 d = { 3598 open: "opening", 3599 close: "closing", 3600 select: "selecting", 3601 unselect: "unselecting", 3602 }; 3603 if ((void 0 === b && (b = {}), a in d)) { 3604 var f = d[a], 3605 g = { prevented: !1, name: a, args: b }; 3606 if ((c.call(this, f, g), g.prevented)) 3607 return void (b.prevented = !0); 3608 } 3609 c.call(this, a, b); 3610 }), 3611 (e.prototype.toggleDropdown = function () { 3612 this.options.get("disabled") || 3613 (this.isOpen() ? this.close() : this.open()); 3614 }), 3615 (e.prototype.open = function () { 3616 this.isOpen() || this.trigger("query", {}); 3617 }), 3618 (e.prototype.close = function () { 3619 this.isOpen() && this.trigger("close", {}); 3620 }), 3621 (e.prototype.isOpen = function () { 3622 return this.$container.hasClass("select2-container--open"); 3623 }), 3624 (e.prototype.hasFocus = function () { 3625 return this.$container.hasClass("select2-container--focus"); 3626 }),
3627 (e.prototype.focus = function (a) { 3628 this.hasFocus() || 3629 (this.$container.addClass("select2-container--focus"), 3630 this.trigger("focus", {})); 3631 }), 3632 (e.prototype.enable = function (a) { 3633 this.options.get("debug") && 3634 window.console && 3635 console.warn && 3636 console.warn( 3637 'Select2: The `select2("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.' 3638 ), 3639 (null == a || 0 === a.length) && (a = [!0]); 3640 var b = !a[0]; 3641 this.$element.prop("disabled", b); 3642 }), 3643 (e.prototype.data = function () { 3644 this.options.get("debug") && 3645 arguments.length > 0 && 3646 window.console && 3647 console.warn && 3648 console.warn( 3649 'Select2: Data can no longer be set using `select2("data")`. You should consider setting the value instead using `$element.val()`.' 3650 ); 3651 var a = []; 3652 return ( 3653 this.dataAdapter.current(function (b) { 3654 a = b; 3655 }), 3656 a 3657 ); 3658 }), 3659 (e.prototype.val = function (b) { 3660 if ( 3661 (this.options.get("debug") && 3662 window.console && 3663 console.warn && 3664 console.warn( 3665 'Select2: The `select2("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.' 3666 ), 3667 null == b || 0 === b.length) 3668 ) 3669 return this.$element.val(); 3670 var c = b[0]; 3671 a.isArray(c) && 3672 (c = a.map(c, function (a) { 3673 return a.toString(); 3674 })), 3675 this.$element.val(c).trigger("change"); 3676 }), 3677 (e.prototype.destroy = function () { 3678 this.$container.remove(), 3679 this.$element[0].detachEvent && 3680 this.$element[0].detachEvent( 3681 "onpropertychange", 3682 this._syncA 3683 ), 3684 null != this._observer 3685 ? (this._observer.disconnect(), (this._observer = null)) 3686 : this.$element[0].removeEventListener && 3687 (this.$element[0].removeEventListener( 3688 "DOMAttrModified", 3689 this._syncA, 3690 !1 3691 ), 3692 this.$element[0].removeEventListener( 3693 "DOMNodeInserted", 3694 this._syncS, 3695 !1 3696 ), 3697 this.$element[0].removeEventListener( 3698 "DOMNodeRemoved", 3699 this._syncS, 3700 !1 3701 )), 3702 (this._syncA = null),
3703 (this._syncS = null), 3704 this.$element.off(".select2"), 3705 this.$element.attr( 3706 "tabindex", 3707 this.$element.data("old-tabindex") 3708 ), 3709 this.$element.removeClass("select2-hidden-accessible"), 3710 this.$element.attr("aria-hidden", "false"), 3711 this.$element.removeData("select2"), 3712 this.dataAdapter.destroy(), 3713 this.selection.destroy(), 3714 this.dropdown.destroy(), 3715 this.results.destroy(), 3716 (this.dataAdapter = null), 3717 (this.selection = null), 3718 (this.dropdown = null), 3719 (this.results = null); 3720 }), 3721 (e.prototype.render = function () { 3722 var b = a( 3723 '<span class="select2 select2-container"><span class="selection"></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>' 3724 ); 3725 return ( 3726 b.attr("dir", this.options.get("dir")), 3727 (this.$container = b), 3728 this.$container.addClass( 3729 "select2-container--" + this.options.get("theme") 3730 ), 3731 b.data("element", this.$element), 3732 b 3733 ); 3734 }), 3735 e 3736 ); 3737 } 3738 ), 3739 b.define("select2/compat/utils", ["jquery"], function (a) { 3740 function b(b, c, d) { 3741 var e, 3742 f, 3743 g = []; 3744 (e = a.trim(b.attr("class"))), 3745 e && 3746 ((e = "" + e), 3747 a(e.split(/\s+/)).each(function () { 3748 0 === this.indexOf("select2-") && g.push(this); 3749 })), 3750 (e = a.trim(c.attr("class"))), 3751 e && 3752 ((e = "" + e), 3753 a(e.split(/\s+/)).each(function () { 3754 0 !== this.indexOf("select2-") && 3755 ((f = d(this)), null != f && g.push(f)); 3756 })), 3757 b.attr("class", g.join(" ")); 3758 } 3759 return { syncCssClasses: b }; 3760 }), 3761 b.define("select2/compat/containerCss", ["jquery", "./utils"], function (a, b) { 3762 function c(a) { 3763 return null; 3764 } 3765 function d() {} 3766 return ( 3767 (d.prototype.render = function (d) { 3768 var e = d.call(this), 3769 f = this.options.get("containerCssClass") || ""; 3770 a.isFunction(f) && (f = f(this.$element)); 3771 var g = this.options.get("adaptContainerCssClass"); 3772 if (((g = g || c), -1 !== f.indexOf(":all:"))) { 3773 f = f.replace(":all:", ""); 3774 var h = g; 3775 g = function (a) { 3776 var b = h(a); 3777 return null != b ? b + " " + a : a; 3778 }; 3779 } 3780 var i = this.options.get("containerCss") || {}; 3781 return ( 3782 a.isFunction(i) && (i = i(this.$element)),
3783 b.syncCssClasses(e, this.$element, g), 3784 e.css(i), 3785 e.addClass(f), 3786 e 3787 ); 3788 }), 3789 d 3790 ); 3791 }), 3792 b.define("select2/compat/dropdownCss", ["jquery", "./utils"], function (a, b) { 3793 function c(a) { 3794 return null; 3795 } 3796 function d() {} 3797 return ( 3798 (d.prototype.render = function (d) { 3799 var e = d.call(this), 3800 f = this.options.get("dropdownCssClass") || ""; 3801 a.isFunction(f) && (f = f(this.$element)); 3802 var g = this.options.get("adaptDropdownCssClass"); 3803 if (((g = g || c), -1 !== f.indexOf(":all:"))) { 3804 f = f.replace(":all:", ""); 3805 var h = g; 3806 g = function (a) { 3807 var b = h(a); 3808 return null != b ? b + " " + a : a; 3809 }; 3810 } 3811 var i = this.options.get("dropdownCss") || {}; 3812 return ( 3813 a.isFunction(i) && (i = i(this.$element)), 3814 b.syncCssClasses(e, this.$element, g), 3815 e.css(i), 3816 e.addClass(f), 3817 e 3818 ); 3819 }), 3820 d 3821 ); 3822 }), 3823 b.define("select2/compat/initSelection", ["jquery"], function (a) { 3824 function b(a, b, c) { 3825 c.get("debug") && 3826 window.console && 3827 console.warn && 3828 console.warn( 3829 "Select2: The `initSelection` option has been deprecated in favor of a custom data adapter that overrides the `current` method. This method is now called multiple times instead of a single time when the instance is initialized. Support will be removed for the `initSelection` option in future versions of Select2" 3830 ), 3831 (this.initSelection = c.get("initSelection")), 3832 (this._isInitialized = !1), 3833 a.call(this, b, c); 3834 } 3835 return ( 3836 (b.prototype.current = function (b, c) { 3837 var d = this; 3838 return this._isInitialized 3839 ? void b.call(this, c) 3840 : void this.initSelection.call(null, this.$element, function (b) { 3841 (d._isInitialized = !0), a.isArray(b) || (b = [b]), c(b); 3842 }); 3843 }), 3844 b 3845 ); 3846 }), 3847 b.define("select2/compat/inputData", ["jquery"], function (a) { 3848 function b(a, b, c) { 3849 (this._currentData = []), 3850 (this._valueSeparator = c.get("valueSeparator") || ","), 3851 "hidden" === b.prop("type") && 3852 c.get("debug") && 3853 console && 3854 console.warn && 3855 console.warn( 3856 "Select2: Using a hidden input with Select2 is no longer supported and may stop working in the future. It is recommended to use a `<select>` element instead." 3857 ), 3858 a.call(this, b, c); 3859 } 3860 return ( 3861 (b.prototype.current = function (b, c) { 3862 function d(b, c) { 3863 var e = []; 3864 return ( 3865 b.selected || -1 !== a.inArray(b.id, c) 3866 ? ((b.selected = !0), e.push(b)) 3867 : (b.selected = !1), 3868 b.children && e.push.apply(e, d(b.children, c)), 3869 e 3870 ); 3871 } 3872 for (var e = [], f = 0; f < this._currentData.length; f++) { 3873 var g = this._currentData[f]; 3874 e.push.apply( 3875 e, 3876 d(g, this.$element.val().split(this._valueSeparator)) 3877 ); 3878 } 3879 c(e); 3880 }), 3881 (b.prototype.select = function (b, c) { 3882 if (this.options.get("multiple")) { 3883 var d = this.$element.val(); 3884 (d += this._valueSeparator + c.id), 3885 this.$element.val(d), 3886 this.$element.trigger("change"); 3887 } else 3888 this.current(function (b) { 3889 a.map(b, function (a) { 3890 a.selected = !1; 3891 }); 3892 }), 3893 this.$element.val(c.id), 3894 this.$element.trigger("change"); 3895 }), 3896 (b.prototype.unselect = function (a, b) { 3897 var c = this; 3898 (b.selected = !1), 3899 this.current(function (a) { 3900 for (var d = [], e = 0; e < a.length; e++) { 3901 var f = a[e]; 3902 b.id != f.id && d.push(f.id); 3903 } 3904 c.$element.val(d.join(c._valueSeparator)), 3905 c.$element.trigger("change"); 3906 }); 3907 }), 3908 (b.prototype.query = function (a, b, c) { 3909 for (var d = [], e = 0; e < this._currentData.length; e++) { 3910 var f = this._currentData[e], 3911 g = this.matches(b, f); 3912 null !== g && d.push(g); 3913 } 3914 c({ results: d }); 3915 }), 3916 (b.prototype.addOptions = function (b, c) { 3917 var d = a.map(c, function (b) { 3918 return a.data(b[0], "data"); 3919 }); 3920 this._currentData.push.apply(this._currentData, d); 3921 }), 3922 b 3923 ); 3924 }), 3925 b.define("select2/compat/matcher", ["jquery"], function (a) { 3926 function b(b) { 3927 function c(c, d) { 3928 var e = a.extend(!0, {}, d); 3929 if (null == c.term || "" === a.trim(c.term)) return e; 3930 if (d.children) { 3931 for (var f = d.children.length - 1; f >= 0;
3931 f--) { 3932 var g = d.children[f], 3933 h = b(c.term, g.text, g); 3934 h || e.children.splice(f, 1); 3935 } 3936 if (e.children.length > 0) return e; 3937 } 3938 return b(c.term, d.text, d) ? e : null; 3939 } 3940 return c; 3941 } 3942 return b; 3943 }), 3944 b.define("select2/compat/query", [], function () { 3945 function a(a, b, c) { 3946 c.get("debug") && 3947 window.console && 3948 console.warn && 3949 console.warn( 3950 "Select2: The `query` option has been deprecated in favor of a custom data adapter that overrides the `query` method. Support will be removed for the `query` option in future versions of Select2." 3951 ), 3952 a.call(this, b, c); 3953 } 3954 return ( 3955 (a.prototype.query = function (a, b, c) { 3956 b.callback = c; 3957 var d = this.options.get("query"); 3958 d.call(null, b); 3959 }), 3960 a 3961 ); 3962 }), 3963 b.define("select2/dropdown/attachContainer", [], function () { 3964 function a(a, b, c) { 3965 a.call(this, b, c); 3966 } 3967 return ( 3968 (a.prototype.position = function (a, b, c) { 3969 var d = c.find(".dropdown-wrapper"); 3970 d.append(b), 3971 b.addClass("select2-dropdown--below"), 3972 c.addClass("select2-container--below"); 3973 }), 3974 a 3975 ); 3976 }), 3977 b.define("select2/dropdown/stopPropagation", [], function () { 3978 function a() {} 3979 return ( 3980 (a.prototype.bind = function (a, b, c) { 3981 a.call(this, b, c); 3982 var d = [ 3983 "blur", 3984 "change", 3985 "click", 3986 "dblclick", 3987 "focus", 3988 "focusin", 3989 "focusout", 3990 "input", 3991 "keydown", 3992 "keyup", 3993 "keypress", 3994 "mousedown", 3995 "mouseenter", 3996 "mouseleave", 3997 "mousemove", 3998 "mouseover", 3999 "mouseup", 4000 "search", 4001 "touchend", 4002 "touchstart", 4003 ]; 4004 this.$dropdown.on(d.join(" "), function (a) { 4005 a.stopPropagation(); 4006 }); 4007 }), 4008 a 4009 ); 4010 }), 4011 b.define("select2/selection/stopPropagation", [], function () { 4012 function a() {} 4013 return ( 4014 (a.prototype.bind = function (a, b, c) { 4015 a.call(this, b, c); 4016 var d = [ 4017 "blur", 4018 "change", 4019 "click", 4020 "dblclick", 4021 "focus", 4022 "focusin", 4023 "focusout", 4024 "input", 4025 "keydown", 4026 "keyup", 4027 "keypress", 4028 "mousedown", 4029 "mouseenter", 4030 "mouseleave", 4031 "mousemove", 4032 "mouseover", 4033 "mouseup", 4034 "search", 4035 "touchend", 4036 "touchstart", 4037 ]; 4038 this.$selection.on(d.join(" "), function (a) { 4039 a.stopPropagation(); 4040 }); 4041 }), 4042 a 4043 ); 4044 }), 4045 (function (c) { 4046 "function" == typeof b.define && b.define.amd 4047 ? b.define("jquery-mousewheel", ["jquery"], c) 4048 : "object" == typeof exports 4049 ? (module.exports = c) 4050 : c(a); 4051 })(function (a) { 4052 function b(b) { 4053 var g = b || window.event, 4054 h = i.call(arguments, 1), 4055 j = 0, 4056 l = 0, 4057 m = 0, 4058 n = 0, 4059 o = 0, 4060 p = 0; 4061 if ( 4062 ((b = a.event.fix(g)), 4063 (b.type = "mousewheel"), 4064 "detail" in g && (m = -1 * g.detail), 4065 "wheelDelta" in g && (m = g.wheelDelta), 4066 "wheelDeltaY" in g && (m = g.wheelDeltaY), 4067 "wheelDeltaX" in g && (l = -1 * g.wheelDeltaX), 4068 "axis" in g && g.axis === g.HORIZONTAL_AXIS && ((l = -1 * m), (m = 0)), 4069 (j = 0 === m ? l : m), 4070 "deltaY" in g && ((m = -1 * g.deltaY), (j = m)), 4071 "deltaX" in g && ((l = g.deltaX), 0 === m && (j = -1 * l)), 4072 0 !== m || 0 !== l) 4073 ) { 4074 if (1 === g.deltaMode) { 4075 var q = a.data(this, "mousewheel-line-height"); 4076 (j *= q), (m *= q), (l *= q); 4077 } else if (2 === g.deltaMode) { 4078 var r = a.data(this, "mousewheel-page-height"); 4079 (j *= r), (m *= r), (l *= r); 4080 } 4081 if ( 4082 ((n = Math.max(Math.abs(m), Math.abs(l))), 4083 (!f || f > n) && ((f = n), d(g, n) && (f /= 40)), 4084 d(g, n) && ((j /= 40), (l /= 40), (m /= 40)), 4085 (j = Math[j >= 1 ? "floor" : "ceil"](j / f)), 4086 (l = Math[l >= 1 ? "floor" : "ceil"](l / f)), 4087 (m = Math[m >= 1 ? "floor" : "ceil"](m / f)), 4088 k.settings.normalizeOffset && this.getBoundingClientRect) 4089 ) { 4090 var s = this.getBoundingClientRect(); 4091 (o = b.clientX - s.left), (p = b.clientY - s.top); 4092 } 4093 return ( 4094 (b.deltaX = l), 4095 (b.deltaY = m), 4096 (b.deltaFactor = f), 4097 (b.offsetX = o), 4098 (b.offsetY = p), 4099 (b.deltaMode = 0), 4100 h.unshift(b, j, l, m), 4101 e && clearTimeout(e), 4102 (e = setTimeout(c, 200)), 4103 (a.event.dispatch || a.event.handle).apply(this, h) 4104 ); 4105 } 4106 } 4107 function c() { 4108 f = null; 4109 } 4110 function d(a, b) { 4111 return ( 4112 k.settings.adjustOldDeltas && "mousewheel" === a.type && b % 120 === 0 4113 ); 4114 } 4115 var e, 4116 f, 4117 g = ["wheel", "mousewheel", "DOMMouseScroll", "MozMousePixelScroll"], 4118 h = 4119 "onwheel" in document || document.documentMode >= 9 4120 ? ["wheel"] 4121 : ["mousewheel", "DomMouseScroll", "MozMousePixelScroll"], 4122 i = Array.prototype.slice; 4123 if (a.event.fixHooks) 4124 for (var j = g.length; j; ) a.event.fixHooks[g[--j]] = a.event.mouseHooks; 4125 var k = (a.event.special.mousewheel = { 4126 version: "3.1.12", 4127 setup: function () { 4128 if (this.addEventListener) 4129 for (var c = h.length; c; ) this.addEventListener(h[--c], b, !1); 4130 else this.onmousewheel = b; 4131 a.data(this, "mousewheel-line-height", k.getLineHeight(this)), 4132 a.data(this, "mousewheel-page-height", k.getPageHeight(this)); 4133 }, 4134 teardown: function () { 4135 if (this.removeEventListener) 4136 for (var c = h.length; c; ) this.removeEventListener(h[--c], b, !1); 4137 else this.onmousewheel = null; 4138 a.removeData(this, "mousewheel-line-height"), 4139 a.removeData(this, "mousewheel-page-height"); 4140 }, 4141 getLineHeight: function (b) { 4142 var c = a(b), 4143 d = c["offsetParent" in a.fn ? "offsetParent" : "parent"](); 4144 return ( 4145 d.length || (d = a("body")), 4146 parseInt(d.css("fontSize"), 10) || 4147 parseInt(c.css("fontSize"), 10) || 4148 16 4149 ); 4150 }, 4151 getPageHeight: function (b) { 4152 return a(b).height(); 4153 }, 4154 settings: { adjustOldDeltas: !0, normalizeOffset: !0 }, 4155 }); 4156 a.fn.extend({ 4157 mousewheel: function (a) { 4158 return a ? this.bind("mousewheel", a) : this.trigger("mousewheel"); 4159 }, 4160 unmousewheel: function (a) { 4161 return this.unbind("mousewheel", a); 4162 }, 4163 }); 4164 }), 4165 b.define( 4166 "jquery.select2", 4167 ["jquery", "jquery-mousewheel", "./select2/core", "./select2/defaults"], 4168 function (a, b, c, d) { 4169 if (null == a.fn.mselect2) { 4170 var e = ["open", "close", "destroy"]; 4171 a.fn.mselect2 = function (b) { 4172 if (((b = b || {}), "object" == typeof b)) 4173 return ( 4174 this.each(function () { 4175 var d = a.extend(!0, {}, b); 4176 new c(a(this), d); 4177 }), 4178 this 4179 ); 4180 if ("string" == typeof b) { 4181 var d, 4182 f = Array.prototype.slice.call(arguments, 1); 4183 return ( 4184 this.each(function () { 4185 var c = a(this).data("select2"); 4186 null == c && 4187 window.console && 4188 console.error && 4189 console.error( 4190 "The select2('" + 4191 b + 4192 "') method was called on an element that is not using Select2." 4193 ), 4194 (d = c[b].apply(c, f)); 4195 }), 4196 a.inArray(b, e) >
4196 -1 ? this : d 4197 ); 4198 } 4199 throw new Error("Invalid arguments for Select2: " + b); 4200 }; 4201 } 4202 return null == a.fn.mselect2.defaults && (a.fn.mselect2.defaults = d), c; 4203 } 4204 ), 4205 { define: b.define, require: b.require } 4206 ); 4207 })(), 4208 c = b.require("jquery.select2"); 4209 return (a.fn.mselect2.amd = b), c; 4210});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.